diff --git a/Makefile b/Makefile index 125c41dd7..9eca094fa 100644 --- a/Makefile +++ b/Makefile @@ -95,7 +95,7 @@ $(B_DIR)/lib/ultra/libc/llcvt.o: MIPSISET := -mips3 -32 # For these files, see their explicit targets towards the end of this file. $(B_DIR)/lib/lib_2fba0.o: OPT_LVL := -g $(B_DIR)/lib/lib_30ce0.o: OPT_LVL := -g -$(B_DIR)/lib/lib_37b00.o: OPT_LVL := -g +$(B_DIR)/lib/mp3.o: OPT_LVL := -g $(B_DIR)/lib/lib_3a100.o: OPT_LVL := -g $(B_DIR)/lib/lib_3d280.o: OPT_LVL := -g $(B_DIR)/lib/lib_3e730.o: OPT_LVL := -g diff --git a/ld/libfiles.ntsc-beta.inc b/ld/libfiles.ntsc-beta.inc index d904887e5..41f4f2f40 100644 --- a/ld/libfiles.ntsc-beta.inc +++ b/ld/libfiles.ntsc-beta.inc @@ -27,25 +27,25 @@ build/ROMID/lib/ultra/io/conteeplongwrite.o (section); \ build/ROMID/lib/ultra/io/pfsresizefile.o (section); \ build/ROMID/lib/ultra/io/pfsinitpak.o (section); \ - build/ROMID/lib/lib_070d0.o (section); \ + build/ROMID/lib/vm.o (section); \ build/ROMID/lib/rzip.o (section); \ build/ROMID/lib/audiomgr.o (section); \ build/ROMID/lib/lib_09660.o (section); \ - build/ROMID/lib/lib_09a80.o (section); \ - build/ROMID/lib/lib_0bfb0.o (section); \ - build/ROMID/lib/lib_0c000.o (section); \ + build/ROMID/lib/vi.o (section); \ + build/ROMID/lib/fault.o (section); \ + build/ROMID/lib/crash.o (section); \ build/ROMID/lib/getra.o (section); \ build/ROMID/lib/dma.o (section); \ build/ROMID/lib/main.o (section); \ build/ROMID/lib/snd.o (section); \ - build/ROMID/lib/lib_11420.o (section); \ + build/ROMID/lib/music.o (section); \ build/ROMID/lib/memory.o (section); \ build/ROMID/lib/lib_126b0.o (section); \ build/ROMID/lib/rng.o (section); \ build/ROMID/lib/args.o (section); \ build/ROMID/lib/str.o (section); \ build/ROMID/lib/ultra/libc/sprintf.o (section); \ - build/ROMID/lib/lib_13710.o (section); \ + build/ROMID/lib/pimgr.o (section); \ build/ROMID/lib/lib_13750.o (section); \ build/ROMID/lib/lib_13790.o (section); \ build/ROMID/lib/lib_13820.o (section); \ @@ -55,25 +55,26 @@ build/ROMID/lib/mtxasm.o (section); \ build/ROMID/lib/mtx.o (section); \ build/ROMID/lib/lib_17ce0.o (section); \ - build/ROMID/lib/lib_184d0.o (section); \ + build/ROMID/lib/ailist.o (section); \ + build/ROMID/lib/path.o (section); \ build/ROMID/lib/modelasm.o (section); \ build/ROMID/lib/model.o (section); \ build/ROMID/game/game_1a7560.o (section); \ - build/ROMID/lib/lib_233c0.o (section); \ - build/ROMID/lib/lib_24e40.o (section); \ + build/ROMID/lib/anim.o (section); \ + build/ROMID/lib/collision.o (section); \ build/ROMID/lib/lib_2f490.o (section); \ build/ROMID/lib/rdp.o (section); \ - build/ROMID/lib/lib_2fa00.o (section); \ + build/ROMID/lib/rmon.o (section); \ build/ROMID/lib/ultra/audio/heap.o (section); \ build/ROMID/lib/lib_2fba0.o (section); \ build/ROMID/lib/lib_2fc60.o (section); \ build/ROMID/lib/lib_30ce0.o (section); \ build/ROMID/lib/lib_317f0.o (section); \ - build/ROMID/lib/lib_34030.o (section); \ + build/ROMID/lib/speaker.o (section); \ build/ROMID/lib/ultra/audio/csplayer.o (section); \ build/ROMID/lib/lib_37650.o (section); \ build/ROMID/lib/ultra/audio/bnkf.o (section); \ - build/ROMID/lib/lib_37b00.o (section); \ + build/ROMID/lib/mp3.o (section); \ build/ROMID/lib/lib_38d10.o (section); \ build/ROMID/lib/ultra/audio/cseq.o (section); \ build/ROMID/lib/lib_39be0.o (section); \ diff --git a/ld/libfiles.ntsc-final.inc b/ld/libfiles.ntsc-final.inc index 2edc3f4aa..91e282a52 100644 --- a/ld/libfiles.ntsc-final.inc +++ b/ld/libfiles.ntsc-final.inc @@ -26,24 +26,24 @@ build/ROMID/lib/ultra/io/conteeplongwrite.o (section); \ build/ROMID/lib/ultra/io/pfsresizefile.o (section); \ build/ROMID/lib/ultra/io/pfsinitpak.o (section); \ - build/ROMID/lib/lib_070d0.o (section); \ + build/ROMID/lib/vm.o (section); \ build/ROMID/lib/rzip.o (section); \ build/ROMID/lib/audiomgr.o (section); \ build/ROMID/lib/lib_09660.o (section); \ - build/ROMID/lib/lib_09a80.o (section); \ - build/ROMID/lib/lib_0bfb0.o (section); \ - build/ROMID/lib/lib_0c000.o (section); \ + build/ROMID/lib/vi.o (section); \ + build/ROMID/lib/fault.o (section); \ + build/ROMID/lib/crash.o (section); \ build/ROMID/lib/dma.o (section); \ build/ROMID/lib/main.o (section); \ build/ROMID/lib/snd.o (section); \ - build/ROMID/lib/lib_11420.o (section); \ + build/ROMID/lib/music.o (section); \ build/ROMID/lib/memory.o (section); \ build/ROMID/lib/lib_126b0.o (section); \ build/ROMID/lib/rng.o (section); \ build/ROMID/lib/args.o (section); \ build/ROMID/lib/str.o (section); \ build/ROMID/lib/ultra/libc/sprintf.o (section); \ - build/ROMID/lib/lib_13710.o (section); \ + build/ROMID/lib/pimgr.o (section); \ build/ROMID/lib/lib_13750.o (section); \ build/ROMID/lib/lib_13790.o (section); \ build/ROMID/lib/lib_13820.o (section); \ @@ -53,24 +53,25 @@ build/ROMID/lib/mtxasm.o (section); \ build/ROMID/lib/mtx.o (section); \ build/ROMID/lib/lib_17ce0.o (section); \ - build/ROMID/lib/lib_184d0.o (section); \ + build/ROMID/lib/ailist.o (section); \ + build/ROMID/lib/path.o (section); \ build/ROMID/lib/modelasm.o (section); \ build/ROMID/lib/model.o (section); \ - build/ROMID/lib/lib_233c0.o (section); \ - build/ROMID/lib/lib_24e40.o (section); \ + build/ROMID/lib/anim.o (section); \ + build/ROMID/lib/collision.o (section); \ build/ROMID/lib/lib_2f490.o (section); \ build/ROMID/lib/rdp.o (section); \ - build/ROMID/lib/lib_2fa00.o (section); \ + build/ROMID/lib/rmon.o (section); \ build/ROMID/lib/ultra/audio/heap.o (section); \ build/ROMID/lib/lib_2fba0.o (section); \ build/ROMID/lib/lib_2fc60.o (section); \ build/ROMID/lib/lib_30ce0.o (section); \ build/ROMID/lib/lib_317f0.o (section); \ - build/ROMID/lib/lib_34030.o (section); \ + build/ROMID/lib/speaker.o (section); \ build/ROMID/lib/ultra/audio/csplayer.o (section); \ build/ROMID/lib/lib_37650.o (section); \ build/ROMID/lib/ultra/audio/bnkf.o (section); \ - build/ROMID/lib/lib_37b00.o (section); \ + build/ROMID/lib/mp3.o (section); \ build/ROMID/lib/lib_38d10.o (section); \ build/ROMID/lib/ultra/audio/cseq.o (section); \ build/ROMID/lib/lib_39be0.o (section); \ diff --git a/ld/libfiles.pal-final.inc b/ld/libfiles.pal-final.inc index 7092b8645..7730b17e2 100644 --- a/ld/libfiles.pal-final.inc +++ b/ld/libfiles.pal-final.inc @@ -26,24 +26,24 @@ build/ROMID/lib/ultra/io/conteeplongwrite.o (section); \ build/ROMID/lib/ultra/io/pfsresizefile.o (section); \ build/ROMID/lib/ultra/io/pfsinitpak.o (section); \ - build/ROMID/lib/lib_070d0.o (section); \ + build/ROMID/lib/vm.o (section); \ build/ROMID/lib/rzip.o (section); \ build/ROMID/lib/audiomgr.o (section); \ build/ROMID/lib/lib_09660.o (section); \ - build/ROMID/lib/lib_09a80.o (section); \ - build/ROMID/lib/lib_0bfb0.o (section); \ - build/ROMID/lib/lib_0c000.o (section); \ + build/ROMID/lib/vi.o (section); \ + build/ROMID/lib/fault.o (section); \ + build/ROMID/lib/crash.o (section); \ build/ROMID/lib/dma.o (section); \ build/ROMID/lib/main.o (section); \ build/ROMID/lib/snd.o (section); \ - build/ROMID/lib/lib_11420.o (section); \ + build/ROMID/lib/music.o (section); \ build/ROMID/lib/memory.o (section); \ build/ROMID/lib/lib_126b0.o (section); \ build/ROMID/lib/rng.o (section); \ build/ROMID/lib/args.o (section); \ build/ROMID/lib/str.o (section); \ build/ROMID/lib/ultra/libc/sprintf.o (section); \ - build/ROMID/lib/lib_13710.o (section); \ + build/ROMID/lib/pimgr.o (section); \ build/ROMID/lib/lib_13750.o (section); \ build/ROMID/lib/lib_13790.o (section); \ build/ROMID/lib/lib_13820.o (section); \ @@ -53,24 +53,25 @@ build/ROMID/lib/mtxasm.o (section); \ build/ROMID/lib/mtx.o (section); \ build/ROMID/lib/lib_17ce0.o (section); \ - build/ROMID/lib/lib_184d0.o (section); \ + build/ROMID/lib/ailist.o (section); \ + build/ROMID/lib/path.o (section); \ build/ROMID/lib/modelasm.o (section); \ build/ROMID/lib/model.o (section); \ - build/ROMID/lib/lib_233c0.o (section); \ - build/ROMID/lib/lib_24e40.o (section); \ + build/ROMID/lib/anim.o (section); \ + build/ROMID/lib/collision.o (section); \ build/ROMID/lib/lib_2f490.o (section); \ build/ROMID/lib/rdp.o (section); \ - build/ROMID/lib/lib_2fa00.o (section); \ + build/ROMID/lib/rmon.o (section); \ build/ROMID/lib/ultra/audio/heap.o (section); \ build/ROMID/lib/lib_2fba0.o (section); \ build/ROMID/lib/lib_2fc60.o (section); \ build/ROMID/lib/lib_30ce0.o (section); \ build/ROMID/lib/lib_317f0.o (section); \ - build/ROMID/lib/lib_34030.o (section); \ + build/ROMID/lib/speaker.o (section); \ build/ROMID/lib/ultra/audio/csplayer.o (section); \ build/ROMID/lib/lib_37650.o (section); \ build/ROMID/lib/ultra/audio/bnkf.o (section); \ - build/ROMID/lib/lib_37b00.o (section); \ + build/ROMID/lib/mp3.o (section); \ build/ROMID/lib/lib_38d10.o (section); \ build/ROMID/lib/ultra/audio/cseq.o (section); \ build/ROMID/lib/lib_39be0.o (section); \ diff --git a/src/game/activemenu/activemenu.c b/src/game/activemenu/activemenu.c index b2bb4e38a..551e93f1a 100644 --- a/src/game/activemenu/activemenu.c +++ b/src/game/activemenu/activemenu.c @@ -18,10 +18,10 @@ #include "game/mplayer/mplayer.h" #include "game/options.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/main.h" #include "lib/mtx.h" -#include "lib/lib_184d0.h" +#include "lib/ailist.h" #include "data.h" #include "types.h" diff --git a/src/game/bg.c b/src/game/bg.c index a20879f63..2487755c2 100644 --- a/src/game/bg.c +++ b/src/game/bg.c @@ -29,7 +29,7 @@ #include "game/wallhit.h" #include "bss.h" #include "lib/rzip.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/dma.h" #include "lib/main.h" #include "lib/memory.h" diff --git a/src/game/bondbike.c b/src/game/bondbike.c index b8b597c62..887041f49 100644 --- a/src/game/bondbike.c +++ b/src/game/bondbike.c @@ -18,8 +18,8 @@ #include "game/propobj.h" #include "bss.h" #include "lib/mtx.h" -#include "lib/lib_233c0.h" -#include "lib/lib_24e40.h" +#include "lib/anim.h" +#include "lib/collision.h" #include "data.h" #include "types.h" @@ -993,7 +993,7 @@ void bbike0f0d2b40(struct defaultobj *bike, struct coord *arg1, f32 arg2, struct struct coord sp60; struct coord sp54; - func00024e4c(&sp78, &sp6c, 333, "bondbike.c"); + cd00024e4c(&sp78, &sp6c, 333, "bondbike.c"); sp60.x = bike->prop->pos.x; sp60.y = bike->prop->pos.y; @@ -1296,7 +1296,7 @@ s32 bbike0f0d3680(struct coord *arg0, struct coord *arg1, struct coord *arg2) s32 result = bbikeCalculateNewPositionWithPush(arg0, 0); if (!result) { - func00024e4c(arg1, arg2, 659, "bondbike.c"); + cd00024e4c(arg1, arg2, 659, "bondbike.c"); } return result; @@ -1304,9 +1304,9 @@ s32 bbike0f0d3680(struct coord *arg0, struct coord *arg1, struct coord *arg2) s32 bbike0f0d36d4(struct coord *arg0, struct coord *arg1, struct coord *arg2, struct coord *arg3, struct coord *arg4) { - if (func00024ea4()) { + if (cd00024ea4()) { struct coord sp24; - f32 somefloat = func00024e98(); + f32 somefloat = cd00024e98(); s32 someint; sp24.x = arg0->x * somefloat * 0.25f; @@ -1320,7 +1320,7 @@ s32 bbike0f0d36d4(struct coord *arg0, struct coord *arg1, struct coord *arg2, st } if (someint == 0) { - func00024e4c(arg3, arg4, 685, "bondbike.c"); + cd00024e4c(arg3, arg4, 685, "bondbike.c"); if (arg3->f[0] != arg1->f[0] || arg3->f[1] != arg1->f[1] diff --git a/src/game/bondeyespy.c b/src/game/bondeyespy.c index 570cccfa3..0fdb6be48 100644 --- a/src/game/bondeyespy.c +++ b/src/game/bondeyespy.c @@ -20,8 +20,8 @@ #include "lib/main.h" #include "lib/snd.h" #include "lib/mtx.h" -#include "lib/lib_233c0.h" -#include "lib/lib_24e40.h" +#include "lib/anim.h" +#include "lib/collision.h" #include "data.h" #include "types.h" @@ -235,7 +235,7 @@ bool eyespyCalculateNewPositionWithPush(struct coord *vel) struct coord sp2c; struct coord sp20; - func00024e4c(&sp2c, &sp20, 286, "bondeyespy.c"); + cd00024e4c(&sp2c, &sp20, 286, "bondeyespy.c"); // Nothing is actually done with these coordinates... // This code was likely copied from bondwalk then the bounce @@ -271,10 +271,10 @@ bool eyespyCalculateNewPositionWithPush(struct coord *vel) s32 eyespy0f0cf890(struct coord *arg0, struct coord *arg1, struct coord *arg2, struct coord *arg3, struct coord *arg4) { - if (func00024ea4()) { + if (cd00024ea4()) { struct coord sp24; s32 someint; - f32 somefloat = func00024e98(); + f32 somefloat = cd00024e98(); sp24.x = arg0->x * somefloat * 0.25f; sp24.y = arg0->y * somefloat * 0.25f; sp24.z = arg0->z * somefloat * 0.25f; @@ -286,7 +286,7 @@ s32 eyespy0f0cf890(struct coord *arg0, struct coord *arg1, struct coord *arg2, s } if (someint == 0) { - func00024e4c(arg3, arg4, 350, "bondeyespy.c"); + cd00024e4c(arg3, arg4, 350, "bondeyespy.c"); if (arg3->f[0] != arg1->f[0] || arg3->f[1] != arg1->f[1] @@ -405,7 +405,7 @@ s32 eyespy0f0cfdd0(struct coord *vel, struct coord *arg1, struct coord *arg2) bool result = eyespyCalculateNewPositionWithPush(vel); if (result != CDRESULT_NOCOLLISION) { - func00024e4c(arg1, arg2, 473, "bondeyespy.c"); + cd00024e4c(arg1, arg2, 473, "bondeyespy.c"); } return result; @@ -2220,7 +2220,7 @@ glabel var7f1adb00 /* f0d2460: 25040008 */ addiu $a0,$t0,0x8 /* f0d2464: 25050028 */ addiu $a1,$t0,0x28 /* f0d2468: 24460008 */ addiu $a2,$v0,0x8 -/* f0d246c: 0c00b54f */ jal hasLineOfSight +/* f0d246c: 0c00b54f */ jal cdHasLineOfSight /* f0d2470: 24470028 */ addiu $a3,$v0,0x28 /* f0d2474: 3c09800a */ lui $t1,0x800a /* f0d2478: 14400003 */ bnez $v0,.PF0f0d2488 @@ -3832,7 +3832,7 @@ glabel var7f1adb00 /* f0d1ebc: 25040008 */ addiu $a0,$t0,0x8 /* f0d1ec0: 25050028 */ addiu $a1,$t0,0x28 /* f0d1ec4: 24460008 */ addiu $a2,$v0,0x8 -/* f0d1ec8: 0c00b70f */ jal hasLineOfSight +/* f0d1ec8: 0c00b70f */ jal cdHasLineOfSight /* f0d1ecc: 24470028 */ addiu $a3,$v0,0x28 /* f0d1ed0: 3c09800a */ lui $t1,%hi(g_Vars) /* f0d1ed4: 14400003 */ bnez $v0,.L0f0d1ee4 @@ -5463,7 +5463,7 @@ glabel var7f1adb00 /* f0cf688: 25040008 */ addiu $a0,$t0,0x8 /* f0cf68c: 25050028 */ addiu $a1,$t0,0x28 /* f0cf690: 24460008 */ addiu $a2,$v0,0x8 -/* f0cf694: 0c00bc11 */ jal hasLineOfSight +/* f0cf694: 0c00bc11 */ jal cdHasLineOfSight /* f0cf698: 24470028 */ addiu $a3,$v0,0x28 /* f0cf69c: 3c09800a */ lui $t1,0x800a /* f0cf6a0: 14400003 */ bnez $v0,.NB0f0cf6b0 @@ -6049,7 +6049,7 @@ glabel var7f1adb00 // g_EyespyPickup = false; // } // -// cdresult = hasLineOfSight(&g_Vars.currentplayer->prop->pos, g_Vars.currentplayer->prop->rooms, +// cdresult = cdHasLineOfSight(&g_Vars.currentplayer->prop->pos, g_Vars.currentplayer->prop->rooms, // &g_Vars.currentplayer->eyespy->prop->pos, g_Vars.currentplayer->eyespy->prop->rooms, 0x22, 0x1c); // // if (cdresult == CDRESULT_COLLISION) { diff --git a/src/game/bondgrab.c b/src/game/bondgrab.c index 9e1af3682..e79bb0eca 100644 --- a/src/game/bondgrab.c +++ b/src/game/bondgrab.c @@ -13,8 +13,8 @@ #include "game/propobj.h" #include "bss.h" #include "lib/mtx.h" -#include "lib/lib_233c0.h" -#include "lib/lib_24e40.h" +#include "lib/anim.h" +#include "lib/collision.h" #include "data.h" #include "types.h" @@ -108,11 +108,11 @@ void bgrabInit(void) obj->hidden |= OBJHFLAG_GRABBED; if (obj->flags3 & OBJFLAG3_GEOTYPE3) { - withforce = func000276c8(obj->geo3, + withforce = cd000276c8(obj->geo3, g_Vars.currentplayer->prop->pos.x, g_Vars.currentplayer->prop->pos.z, 45, 0, 0); } else { - withforce = func000274e0(obj->geo2, + withforce = cd000274e0(obj->geo2, g_Vars.currentplayer->prop->pos.x, g_Vars.currentplayer->prop->pos.z, 45, 0, 0); } @@ -221,7 +221,7 @@ glabel var7f1ad990 /* f0ccc74: 27a400b0 */ addiu $a0,$sp,0xb0 /* f0ccc78: c5460010 */ lwc1 $f6,0x10($t2) /* f0ccc7c: 46062200 */ add.s $f8,$f4,$f6 -/* f0ccc80: 0c009393 */ jal func00024e4c +/* f0ccc80: 0c009393 */ jal cd00024e4c /* f0ccc84: e7a800a0 */ swc1 $f8,0xa0($sp) /* f0ccc88: c7aa00ac */ lwc1 $f10,0xac($sp) /* f0ccc8c: c7a400b8 */ lwc1 $f4,0xb8($sp) @@ -294,10 +294,10 @@ glabel var7f1ad990 /* f0ccd88: 27a40068 */ addiu $a0,$sp,0x68 /* f0ccd8c: 240600e4 */ addiu $a2,$zero,0xe4 /* f0ccd90: adc90004 */ sw $t1,0x4($t6) -/* f0ccd94: 0c009393 */ jal func00024e4c +/* f0ccd94: 0c009393 */ jal cd00024e4c /* f0ccd98: adc10008 */ sw $at,0x8($t6) /* f0ccd9c: 27a40050 */ addiu $a0,$sp,0x50 -/* f0ccda0: 0c0094d9 */ jal func00025364 +/* f0ccda0: 0c0094d9 */ jal cd00025364 /* f0ccda4: 27a50044 */ addiu $a1,$sp,0x44 /* f0ccda8: 1040000e */ beqz $v0,.L0f0ccde4 /* f0ccdac: 27a40068 */ addiu $a0,$sp,0x68 @@ -643,7 +643,7 @@ glabel var7f1ad9c4 /* f0cd314: 46005101 */ sub.s $f4,$f10,$f0 /* f0cd318: e7a80018 */ swc1 $f8,0x18($sp) /* f0cd31c: 24450028 */ addiu $a1,$v0,0x28 -/* f0cd320: 0c00b62e */ jal func0002d8b8 +/* f0cd320: 0c00b62e */ jal cd0002d8b8 /* f0cd324: e7a4001c */ swc1 $f4,0x1c($sp) /* f0cd328: 24010001 */ addiu $at,$zero,0x1 /* f0cd32c: 14410014 */ bne $v0,$at,.L0f0cd380 @@ -664,7 +664,7 @@ glabel var7f1ad9c4 /* f0cd368: 46005101 */ sub.s $f4,$f10,$f0 /* f0cd36c: e7a80018 */ swc1 $f8,0x18($sp) /* f0cd370: 24440008 */ addiu $a0,$v0,0x8 -/* f0cd374: 0c00a9bf */ jal func0002a6fc +/* f0cd374: 0c00a9bf */ jal cd0002a6fc /* f0cd378: e7a4001c */ swc1 $f4,0x1c($sp) /* f0cd37c: afa200ec */ sw $v0,0xec($sp) .L0f0cd380: @@ -1201,7 +1201,7 @@ glabel var7f1ad9c4 /* f0cd314: 46005101 */ sub.s $f4,$f10,$f0 /* f0cd318: e7a80018 */ swc1 $f8,0x18($sp) /* f0cd31c: 24450028 */ addiu $a1,$v0,0x28 -/* f0cd320: 0c00b62e */ jal func0002d8b8 +/* f0cd320: 0c00b62e */ jal cd0002d8b8 /* f0cd324: e7a4001c */ swc1 $f4,0x1c($sp) /* f0cd328: 24010001 */ addiu $at,$zero,0x1 /* f0cd32c: 14410014 */ bne $v0,$at,.L0f0cd380 @@ -1222,7 +1222,7 @@ glabel var7f1ad9c4 /* f0cd368: 46005101 */ sub.s $f4,$f10,$f0 /* f0cd36c: e7a80018 */ swc1 $f8,0x18($sp) /* f0cd370: 24440008 */ addiu $a0,$v0,0x8 -/* f0cd374: 0c00a9bf */ jal func0002a6fc +/* f0cd374: 0c00a9bf */ jal cd0002a6fc /* f0cd378: e7a4001c */ swc1 $f4,0x1c($sp) /* f0cd37c: afa200ec */ sw $v0,0xec($sp) .L0f0cd380: @@ -1778,7 +1778,7 @@ glabel var7f1ad9c4 /* f0cab84: 46005101 */ sub.s $f4,$f10,$f0 /* f0cab88: e7a80018 */ swc1 $f8,0x18($sp) /* f0cab8c: 24450028 */ addiu $a1,$v0,0x28 -/* f0cab90: 0c00bb30 */ jal func0002d8b8 +/* f0cab90: 0c00bb30 */ jal cd0002d8b8 /* f0cab94: e7a4001c */ swc1 $f4,0x1c($sp) /* f0cab98: 24010001 */ addiu $at,$zero,0x1 /* f0cab9c: 14410014 */ bne $v0,$at,.NB0f0cabf0 @@ -1799,7 +1799,7 @@ glabel var7f1ad9c4 /* f0cabd8: 46005101 */ sub.s $f4,$f10,$f0 /* f0cabdc: e7a80018 */ swc1 $f8,0x18($sp) /* f0cabe0: 24440008 */ addiu $a0,$v0,0x8 -/* f0cabe4: 0c00aec1 */ jal func0002a6fc +/* f0cabe4: 0c00aec1 */ jal cd0002a6fc /* f0cabe8: e7a4001c */ swc1 $f4,0x1c($sp) /* f0cabec: afa200e4 */ sw $v0,0xe4($sp) .NB0f0cabf0: @@ -2304,7 +2304,7 @@ glabel var7f1ad9c8 /* f0cdb90: 27a400a4 */ addiu $a0,$sp,0xa4 /* f0cdb94: 27a50098 */ addiu $a1,$sp,0x98 /* f0cdb98: 240602a6 */ addiu $a2,$zero,0x2a6 -/* f0cdb9c: 0c009393 */ jal func00024e4c +/* f0cdb9c: 0c009393 */ jal cd00024e4c /* f0cdba0: e7ae0060 */ swc1 $f14,0x60($sp) /* f0cdba4: c7ac00a4 */ lwc1 $f12,0xa4($sp) /* f0cdba8: c7a40098 */ lwc1 $f4,0x98($sp) @@ -2407,7 +2407,7 @@ glabel var7f1ad9c8 /* f0cdd18: 10000049 */ b .L0f0cde40 /* f0cdd1c: c7ac00b0 */ lwc1 $f12,0xb0($sp) .L0f0cdd20: -/* f0cdd20: 0c0094d9 */ jal func00025364 +/* f0cdd20: 0c0094d9 */ jal cd00025364 /* f0cdd24: e7ae0060 */ swc1 $f14,0x60($sp) /* f0cdd28: 1040001c */ beqz $v0,.L0f0cdd9c /* f0cdd2c: c7ae0060 */ lwc1 $f14,0x60($sp) @@ -2549,7 +2549,7 @@ bool bgrab0f0cdf64(struct coord *delta, struct coord *arg1, struct coord *arg2) bool result = bgrabCalculateNewPositiontWithPush(delta, 0, true); if (!result) { - func00024e4c(arg1, arg2, 0x32f, "bondgrab.c"); + cd00024e4c(arg1, arg2, 0x32f, "bondgrab.c"); } return result; @@ -3671,7 +3671,7 @@ void bgrabTick(void) if (g_Vars.currentplayer->vv_ground <= -30000 || ydiff < -100 || ydiff > 100 || g_Vars.currentplayer->vv_ground < g_Vars.currentplayer->vv_manground - 50 - || !hasLineOfSight(&g_Vars.currentplayer->prop->pos, g_Vars.currentplayer->prop->rooms, + || !cdHasLineOfSight(&g_Vars.currentplayer->prop->pos, g_Vars.currentplayer->prop->rooms, &g_Vars.currentplayer->grabbedprop->pos, g_Vars.currentplayer->grabbedprop->rooms, CDTYPE_ALL, 12)) { bmoveSetMode(MOVEMODE_WALK); } diff --git a/src/game/bondgun.c b/src/game/bondgun.c index eab031e52..813ea9478 100644 --- a/src/game/bondgun.c +++ b/src/game/bondgun.c @@ -39,14 +39,14 @@ #include "game/options.h" #include "game/propobj.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/joy.h" #include "lib/main.h" #include "lib/model.h" #include "lib/snd.h" #include "lib/rng.h" #include "lib/mtx.h" -#include "lib/lib_233c0.h" +#include "lib/anim.h" #include "lib/lib_317f0.h" #include "data.h" #include "types.h" @@ -10971,7 +10971,7 @@ glabel var7f1ac72c /* f09f280: afa50038 */ sw $a1,0x38($sp) /* f09f284: 27a6017c */ addiu $a2,$sp,0x17c /* f09f288: 27a70160 */ addiu $a3,$sp,0x160 -/* f09f28c: 0c00b7ab */ jal func0002deac +/* f09f28c: 0c00b7ab */ jal cd0002deac /* f09f290: 24440008 */ addiu $a0,$v0,0x8 /* f09f294: 10400008 */ beqz $v0,.L0f09f2b8 /* f09f298: 8fab01d8 */ lw $t3,0x1d8($sp) @@ -11487,7 +11487,7 @@ glabel var7f1ac72c /* f09f280: afa50038 */ sw $a1,0x38($sp) /* f09f284: 27a6017c */ addiu $a2,$sp,0x17c /* f09f288: 27a70160 */ addiu $a3,$sp,0x160 -/* f09f28c: 0c00b7ab */ jal func0002deac +/* f09f28c: 0c00b7ab */ jal cd0002deac /* f09f290: 24440008 */ addiu $a0,$v0,0x8 /* f09f294: 10400008 */ beqz $v0,.L0f09f2b8 /* f09f298: 8fab01d8 */ lw $t3,0x1d8($sp) diff --git a/src/game/bondhead.c b/src/game/bondhead.c index 9ffde0006..f2e2c04f3 100644 --- a/src/game/bondhead.c +++ b/src/game/bondhead.c @@ -6,7 +6,7 @@ #include "bss.h" #include "lib/rng.h" #include "lib/mtx.h" -#include "lib/lib_233c0.h" +#include "lib/anim.h" #include "lib/model.h" #include "data.h" #include "types.h" diff --git a/src/game/bondmove.c b/src/game/bondmove.c index 77c781430..19866b247 100644 --- a/src/game/bondmove.c +++ b/src/game/bondmove.c @@ -26,13 +26,13 @@ #include "game/options.h" #include "game/propobj.h" #include "bss.h" -#include "lib/lib_09a80.h" -#include "lib/lib_24e40.h" +#include "lib/vi.h" +#include "lib/collision.h" #include "lib/joy.h" #include "lib/snd.h" #include "lib/rng.h" #include "lib/mtx.h" -#include "lib/lib_233c0.h" +#include "lib/anim.h" #include "data.h" #include "types.h" @@ -457,9 +457,9 @@ f32 bmoveCalculateLookahead(void) if ( #if VERSION >= VERSION_NTSC_1_0 - func0002a440(&spbc, sp80, &sp78, NULL, NULL) > 0 + cd0002a440(&spbc, sp80, &sp78, NULL, NULL) > 0 #else - func0002a440(&spbc, sp80, &sp78, NULL) > 0 + cd0002a440(&spbc, sp80, &sp78, NULL) > 0 #endif && sp78 - ground < 200 && sp78 - ground > -200) { diff --git a/src/game/bondview.c b/src/game/bondview.c index 3151eeffe..bf489e546 100644 --- a/src/game/bondview.c +++ b/src/game/bondview.c @@ -11,7 +11,7 @@ #include "game/lang.h" #include "game/options.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/main.h" #include "lib/rng.h" #include "lib/mtx.h" diff --git a/src/game/bondwalk.c b/src/game/bondwalk.c index cdad20ce8..1be59a11b 100644 --- a/src/game/bondwalk.c +++ b/src/game/bondwalk.c @@ -20,8 +20,8 @@ #include "lib/snd.h" #include "lib/rng.h" #include "lib/mtx.h" -#include "lib/lib_233c0.h" -#include "lib/lib_24e40.h" +#include "lib/anim.h" +#include "lib/collision.h" #include "data.h" #include "types.h" @@ -344,7 +344,7 @@ void bwalk0f0c3b38(struct coord *reltarget, struct defaultobj *obj) abstarget.y = g_Vars.currentplayer->prop->pos.y; abstarget.z = reltarget->z + g_Vars.currentplayer->prop->pos.z; - func00024e4c(&globalthinga, &globalthingb, 223, "bondwalk.c"); + cd00024e4c(&globalthinga, &globalthingb, 223, "bondwalk.c"); vector.x = globalthingb.z - globalthinga.z; vector.y = 0; @@ -891,7 +891,7 @@ glabel bwalkCalculateNewPositionWithPush /* f0c42dc: 3c077f1b */ lui $a3,%hi(var7f1ad75c) /* f0c42e0: 5540011c */ bnezl $t2,.L0f0c4754 /* f0c42e4: 8fbf0024 */ lw $ra,0x24($sp) -/* f0c42e8: 0c009393 */ jal func00024e4c +/* f0c42e8: 0c009393 */ jal cd00024e4c /* f0c42ec: 24e7d75c */ addiu $a3,$a3,%lo(var7f1ad75c) /* f0c42f0: c7a40080 */ lwc1 $f4,0x80($sp) /* f0c42f4: c7a6008c */ lwc1 $f6,0x8c($sp) @@ -1234,7 +1234,7 @@ glabel bwalkCalculateNewPositionWithPush /* f0c42dc: 3c077f1b */ lui $a3,%hi(var7f1ad75c) /* f0c42e0: 5540011c */ bnezl $t2,.L0f0c4754 /* f0c42e4: 8fbf0024 */ lw $ra,0x24($sp) -/* f0c42e8: 0c009393 */ jal func00024e4c +/* f0c42e8: 0c009393 */ jal cd00024e4c /* f0c42ec: 24e7d75c */ addiu $a3,$a3,%lo(var7f1ad75c) /* f0c42f0: c7a40080 */ lwc1 $f4,0x80($sp) /* f0c42f4: c7a6008c */ lwc1 $f6,0x8c($sp) @@ -1555,7 +1555,7 @@ glabel bwalkCalculateNewPositionWithPush // // if (door->doorflags & DOORFLAG_DAMAGEONCONTACT) { // if (!g_Vars.currentplayer->isdead) { -// func00024e4c(&sp84, &sp78, 465, "bondwalk.c"); +// cd00024e4c(&sp84, &sp78, 465, "bondwalk.c"); // // sp90.x = sp78.f[2] - sp84.f[2]; // sp90.y = 0; @@ -1686,7 +1686,7 @@ s32 bwalk0f0c4764(struct coord *delta, struct coord *arg1, struct coord *arg2, s s32 result = bwalkCalculateNewPositionWithPush(delta, 0, true, 0, types); if (result == CDRESULT_COLLISION) { - func00024e4c(arg1, arg2, 0x25f, "bondwalk.c"); + cd00024e4c(arg1, arg2, 0x25f, "bondwalk.c"); } return result; @@ -1698,8 +1698,8 @@ s32 bwalk0f0c47d0(struct coord *a, struct coord *b, struct coord *c, struct coord quarter; bool result; - if (func00024ea4()) { - f32 mult = func00024e98(); + if (cd00024ea4()) { + f32 mult = cd00024e98(); quarter.x = a->x * mult * 0.25f; quarter.y = a->y * mult * 0.25f; quarter.z = a->z * mult * 0.25f; @@ -1710,7 +1710,7 @@ s32 bwalk0f0c47d0(struct coord *a, struct coord *b, struct coord *c, } if (result == CDRESULT_COLLISION) { - func00024e4c(d, e, 0x27b, "bondwalk.c"); + cd00024e4c(d, e, 0x27b, "bondwalk.c"); if (b->x != d->x || b->y != d->y @@ -1922,7 +1922,7 @@ void bwalkUpdateVertical(void) // If this comes up false, a second check is done... maybe checking if the // player is touching a ladder from a room which shares the same coordinate // space? - onladder = func00029ffc(&g_Vars.currentplayer->prop->pos, + onladder = cd00029ffc(&g_Vars.currentplayer->prop->pos, width * 1.2f, ymax - g_Vars.currentplayer->prop->pos.y, g_Vars.currentplayer->vv_manground - g_Vars.currentplayer->prop->pos.y + 1, g_Vars.currentplayer->prop->rooms, 0x8040, &g_Vars.currentplayer->laddernormal); @@ -1933,7 +1933,7 @@ void bwalkUpdateVertical(void) testpos.z = g_Vars.currentplayer->prop->pos.z; roomsCopy(g_Vars.currentplayer->prop->rooms, rooms); bmove0f0cb79c(g_Vars.currentplayer, &testpos, rooms); - onladder2 = func00029ffc(&g_Vars.currentplayer->prop->pos, + onladder2 = cd00029ffc(&g_Vars.currentplayer->prop->pos, width * 1.1f, ymax - g_Vars.currentplayer->prop->pos.y, g_Vars.currentplayer->vv_manground - g_Vars.currentplayer->prop->pos.y - 10, rooms, 0x8040, &g_Vars.currentplayer->laddernormal); @@ -2369,7 +2369,7 @@ glabel var7f1a7b20nb /* f0c2c60: afb80014 */ sw $t8,0x14($sp) /* f0c2c64: 24640008 */ addiu $a0,$v1,0x8 /* f0c2c68: 44072000 */ mfc1 $a3,$f4 -/* f0c2c6c: 0c00ad11 */ jal func00029ffc +/* f0c2c6c: 0c00ad11 */ jal cd00029ffc /* f0c2c70: 00000000 */ sll $zero,$zero,0x0 /* f0c2c74: 14400031 */ bnez $v0,.NB0f0c2d3c /* f0c2c78: afa200d4 */ sw $v0,0xd4($sp) @@ -2418,7 +2418,7 @@ glabel var7f1a7b20nb /* f0c2d24: afac0010 */ sw $t4,0x10($sp) /* f0c2d28: 24640008 */ addiu $a0,$v1,0x8 /* f0c2d2c: 44074000 */ mfc1 $a3,$f8 -/* f0c2d30: 0c00ad11 */ jal func00029ffc +/* f0c2d30: 0c00ad11 */ jal cd00029ffc /* f0c2d34: 00000000 */ sll $zero,$zero,0x0 /* f0c2d38: afa200d0 */ sw $v0,0xd0($sp) .NB0f0c2d3c: @@ -4124,7 +4124,7 @@ glabel var7f1ad854 /* f0c780c: 460a3200 */ add.s $f8,$f6,$f10 /* f0c7810: 24440008 */ addiu $a0,$v0,0x8 /* f0c7814: 44074000 */ mfc1 $a3,$f8 -/* f0c7818: 0c00a68f */ jal func0002a13c +/* f0c7818: 0c00a68f */ jal cd0002a13c /* f0c781c: 00000000 */ nop /* f0c7820: 3c08800a */ lui $t0,0x800a /* f0c7824: 2508a510 */ addiu $t0,$t0,-23280 @@ -5175,7 +5175,7 @@ glabel var7f1ad854 /* f0c7274: 46062280 */ add.s $f10,$f4,$f6 /* f0c7278: 24440008 */ addiu $a0,$v0,0x8 /* f0c727c: 44075000 */ mfc1 $a3,$f10 -/* f0c7280: 0c00a84f */ jal func0002a13c +/* f0c7280: 0c00a84f */ jal cd0002a13c /* f0c7284: 00000000 */ nop /* f0c7288: 3c08800a */ lui $t0,%hi(g_Vars) /* f0c728c: 25089fc0 */ addiu $t0,$t0,%lo(g_Vars) @@ -6178,7 +6178,7 @@ glabel var7f1ad854 /* f0c4b40: 46064100 */ add.s $f4,$f8,$f6 /* f0c4b44: 24440008 */ addiu $a0,$v0,0x8 /* f0c4b48: 44072000 */ mfc1 $a3,$f4 -/* f0c4b4c: 0c00ad61 */ jal func0002a13c +/* f0c4b4c: 0c00ad61 */ jal cd0002a13c /* f0c4b50: 00000000 */ sll $zero,$zero,0x0 /* f0c4b54: 3c08800a */ lui $t0,0x800a /* f0c4b58: 2508e6c0 */ addiu $t0,$t0,-6464 @@ -6826,7 +6826,7 @@ u32 var80070e70 = 0x00000000; // } else { // propPlayerGetBbox(g_Vars.currentplayer->prop, &width, &ymax, &ymin); // -// lVar2 = func0002a13c(&g_Vars.currentplayer->prop->pos, +// lVar2 = cd0002a13c(&g_Vars.currentplayer->prop->pos, // width * 1.1f, ymax - g_Vars.currentplayer->prop->pos.y, // (g_Vars.currentplayer->vv_manground - g_Vars.currentplayer->prop->pos.y) + 1.0f, // g_Vars.currentplayer->prop->rooms, 0x8040); diff --git a/src/game/bossfile.c b/src/game/bossfile.c index b96ca4169..85484c3b2 100644 --- a/src/game/bossfile.c +++ b/src/game/bossfile.c @@ -15,7 +15,7 @@ #include "game/options.h" #include "game/utils.h" #include "bss.h" -#include "lib/lib_0bfb0.h" +#include "lib/fault.h" #include "lib/snd.h" #include "lib/lib_126b0.h" #include "data.h" diff --git a/src/game/chr/chr.c b/src/game/chr/chr.c index 6e2216df0..0b3ba41cc 100644 --- a/src/game/chr/chr.c +++ b/src/game/chr/chr.c @@ -36,13 +36,13 @@ #include "game/splat.h" #include "game/wallhit.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/main.h" #include "lib/model.h" #include "lib/rng.h" #include "lib/mtx.h" -#include "lib/lib_233c0.h" -#include "lib/lib_24e40.h" +#include "lib/anim.h" +#include "lib/collision.h" #include "data.h" #include "types.h" @@ -359,13 +359,13 @@ void chrCalculatePushPos(struct chrdata *chr, struct coord *dstpos, s16 *dstroom movez = dstpos->z - prop->pos.z; if (movex > halfwidth || movez > halfwidth || movex < -halfwidth || movez < -halfwidth) { - cdresult = func0002d8b8(&prop->pos, prop->rooms, dstpos, dstrooms, CDTYPE_ALL, 1, ymax - prop->pos.y, ymin - prop->pos.y); + cdresult = cd0002d8b8(&prop->pos, prop->rooms, dstpos, dstrooms, CDTYPE_ALL, 1, ymax - prop->pos.y, ymin - prop->pos.y); if (cdresult == CDRESULT_NOCOLLISION) { - cdresult = func0002a6fc(&prop->pos, dstpos, width, dstrooms, CDTYPE_ALL, 1, ymax - prop->pos.y, ymin - prop->pos.y); + cdresult = cd0002a6fc(&prop->pos, dstpos, width, dstrooms, CDTYPE_ALL, 1, ymax - prop->pos.y, ymin - prop->pos.y); } } else { - cdresult = func0002a6fc(&prop->pos, dstpos, width, sp84, CDTYPE_ALL, 1, ymax - prop->pos.y, ymin - prop->pos.y); + cdresult = cd0002a6fc(&prop->pos, dstpos, width, sp84, CDTYPE_ALL, 1, ymax - prop->pos.y, ymin - prop->pos.y); } if (cdresult != CDRESULT_ERROR) { @@ -379,9 +379,9 @@ void chrCalculatePushPos(struct chrdata *chr, struct coord *dstpos, s16 *dstroom moveok = true; } else { #if VERSION >= VERSION_NTSC_1_0 - func00024e4c(&sp78, &sp6c, 453, "chr/chr.c"); + cd00024e4c(&sp78, &sp6c, 453, "chr/chr.c"); #else - func00024e4c(&sp78, &sp6c, 451, "chr.c"); + cd00024e4c(&sp78, &sp6c, 451, "chr.c"); #endif // Attempt to find a valid position - method #1 @@ -857,7 +857,7 @@ glabel var7f1a992cpf /* f01f7a0: afad0014 */ sw $t5,0x14($sp) /* f01f7a4: 24440008 */ addiu $a0,$v0,0x8 /* f01f7a8: 44073000 */ mfc1 $a3,$f6 -/* f01f7ac: 0c00a63f */ jal func00029ffc +/* f01f7ac: 0c00a63f */ jal cd00029ffc /* f01f7b0: 00000000 */ nop /* f01f7b4: 3c08800a */ lui $t0,0x800a /* f01f7b8: c7ac00e0 */ lwc1 $f12,0xe0($sp) @@ -921,7 +921,7 @@ glabel var7f1a992cpf /* f01f890: 44065000 */ mfc1 $a2,$f10 /* f01f894: 24440008 */ addiu $a0,$v0,0x8 /* f01f898: 44073000 */ mfc1 $a3,$f6 -/* f01f89c: 0c00a68f */ jal func0002a13c +/* f01f89c: 0c00a68f */ jal cd0002a13c /* f01f8a0: 00000000 */ nop /* f01f8a4: 10400005 */ beqz $v0,.PF0f01f8bc /* f01f8a8: c7ac00e0 */ lwc1 $f12,0xe0($sp) @@ -954,7 +954,7 @@ glabel var7f1a992cpf /* f01f910: 44065000 */ mfc1 $a2,$f10 /* f01f914: 24440008 */ addiu $a0,$v0,0x8 /* f01f918: 44073000 */ mfc1 $a3,$f6 -/* f01f91c: 0c00a68f */ jal func0002a13c +/* f01f91c: 0c00a68f */ jal cd0002a13c /* f01f920: 00000000 */ nop /* f01f924: 10400005 */ beqz $v0,.PF0f01f93c /* f01f928: c7ac00e0 */ lwc1 $f12,0xe0($sp) @@ -2125,7 +2125,7 @@ glabel var7f1a8720 /* f01f670: afad0014 */ sw $t5,0x14($sp) /* f01f674: afae0018 */ sw $t6,0x18($sp) /* f01f678: 44075000 */ mfc1 $a3,$f10 -/* f01f67c: 0c00a7ff */ jal func00029ffc +/* f01f67c: 0c00a7ff */ jal cd00029ffc /* f01f680: e7ac00e0 */ swc1 $f12,0xe0($sp) /* f01f684: 3c08800a */ lui $t0,%hi(g_Vars) /* f01f688: c7ac00e0 */ lwc1 $f12,0xe0($sp) @@ -2188,7 +2188,7 @@ glabel var7f1a8720 /* f01f760: 44065000 */ mfc1 $a2,$f10 /* f01f764: 24440008 */ addiu $a0,$v0,0x8 /* f01f768: 44074000 */ mfc1 $a3,$f8 -/* f01f76c: 0c00a84f */ jal func0002a13c +/* f01f76c: 0c00a84f */ jal cd0002a13c /* f01f770: 00000000 */ nop /* f01f774: 10400005 */ beqz $v0,.L0f01f78c /* f01f778: c7ac00e0 */ lwc1 $f12,0xe0($sp) @@ -2221,7 +2221,7 @@ glabel var7f1a8720 /* f01f7e0: 46025101 */ sub.s $f4,$f10,$f2 /* f01f7e4: 24440008 */ addiu $a0,$v0,0x8 /* f01f7e8: 44072000 */ mfc1 $a3,$f4 -/* f01f7ec: 0c00a84f */ jal func0002a13c +/* f01f7ec: 0c00a84f */ jal cd0002a13c /* f01f7f0: 00000000 */ nop /* f01f7f4: 10400005 */ beqz $v0,.L0f01f80c /* f01f7f8: c7ac00e0 */ lwc1 $f12,0xe0($sp) @@ -3351,7 +3351,7 @@ glabel var7f1a8720 /* f01f398: 46024281 */ sub.s $f10,$f8,$f2 /* f01f39c: 24440008 */ addiu $a0,$v0,0x8 /* f01f3a0: 44075000 */ mfc1 $a3,$f10 -/* f01f3a4: 0c00ad11 */ jal func00029ffc +/* f01f3a4: 0c00ad11 */ jal cd00029ffc /* f01f3a8: 00000000 */ sll $zero,$zero,0x0 /* f01f3ac: 3c08800a */ lui $t0,0x800a /* f01f3b0: 44809000 */ mtc1 $zero,$f18 @@ -3413,7 +3413,7 @@ glabel var7f1a8720 /* f01f480: 46022181 */ sub.s $f6,$f4,$f2 /* f01f484: 44064000 */ mfc1 $a2,$f8 /* f01f488: 44073000 */ mfc1 $a3,$f6 -/* f01f48c: 0c00ad61 */ jal func0002a13c +/* f01f48c: 0c00ad61 */ jal cd0002a13c /* f01f490: 00000000 */ sll $zero,$zero,0x0 /* f01f494: 10400005 */ beqz $v0,.NB0f01f4ac /* f01f498: 3c017f1a */ lui $at,0x7f1a @@ -3444,7 +3444,7 @@ glabel var7f1a8720 /* f01f4f8: 24440008 */ addiu $a0,$v0,0x8 /* f01f4fc: 46024281 */ sub.s $f10,$f8,$f2 /* f01f500: 44075000 */ mfc1 $a3,$f10 -/* f01f504: 0c00ad61 */ jal func0002a13c +/* f01f504: 0c00ad61 */ jal cd0002a13c /* f01f508: 00000000 */ sll $zero,$zero,0x0 /* f01f50c: 10400004 */ beqz $v0,.NB0f01f520 /* f01f510: 3c0142b4 */ lui $at,0x42b4 @@ -6650,7 +6650,7 @@ void chrUncloak(struct chrdata *chr, bool value) } if (checksum != CHECKSUM_PLACEHOLDER) { - ((u32 *)&func0002a324)[-2] = 0; + ((u32 *)&cd0002a324)[-2] = 0; } } #endif @@ -7354,12 +7354,12 @@ glabel var7f1a99ecpf /* f023728: 31e80004 */ andi $t0,$t7,0x4 /* f02372c: 1100001e */ beqz $t0,.PF0f0237a8 /* f023730: 00000000 */ nop -/* f023734: 0c008d8e */ jal func00023d38 +/* f023734: 0c008d8e */ jal anim00023d38 /* f023738: 00000000 */ nop /* f02373c: 8e190020 */ lw $t9,0x20($s0) /* f023740: 8f220020 */ lw $v0,0x20($t9) /* f023744: 84440000 */ lh $a0,0x0($v0) -/* f023748: 0c008c53 */ jal func0002384c +/* f023748: 0c008c53 */ jal anim0002384c /* f02374c: 84450014 */ lh $a1,0x14($v0) /* f023750: 28440000 */ slti $a0,$v0,0x0 /* f023754: 54800014 */ bnezl $a0,.PF0f0237a8 @@ -7367,7 +7367,7 @@ glabel var7f1a99ecpf /* f02375c: 8e0e0020 */ lw $t6,0x20($s0) /* f023760: 8dc20020 */ lw $v0,0x20($t6) /* f023764: 84440000 */ lh $a0,0x0($v0) -/* f023768: 0c008c53 */ jal func0002384c +/* f023768: 0c008c53 */ jal anim0002384c /* f02376c: 84450016 */ lh $a1,0x16($v0) /* f023770: 28440000 */ slti $a0,$v0,0x0 /* f023774: 5080000c */ beqzl $a0,.PF0f0237a8 @@ -7714,12 +7714,12 @@ glabel var7f1a99ecpf /* f023c58: 31af0004 */ andi $t7,$t5,0x4 /* f023c5c: 11e0001e */ beqz $t7,.PF0f023cd8 /* f023c60: 00000000 */ nop -/* f023c64: 0c008d8e */ jal func00023d38 +/* f023c64: 0c008d8e */ jal anim00023d38 /* f023c68: 00000000 */ nop /* f023c6c: 8e180020 */ lw $t8,0x20($s0) /* f023c70: 8f020020 */ lw $v0,0x20($t8) /* f023c74: 84440000 */ lh $a0,0x0($v0) -/* f023c78: 0c008c53 */ jal func0002384c +/* f023c78: 0c008c53 */ jal anim0002384c /* f023c7c: 84450014 */ lh $a1,0x14($v0) /* f023c80: 28440000 */ slti $a0,$v0,0x0 /* f023c84: 54800014 */ bnezl $a0,.PF0f023cd8 @@ -7727,7 +7727,7 @@ glabel var7f1a99ecpf /* f023c8c: 8e080020 */ lw $t0,0x20($s0) /* f023c90: 8d020020 */ lw $v0,0x20($t0) /* f023c94: 84440000 */ lh $a0,0x0($v0) -/* f023c98: 0c008c53 */ jal func0002384c +/* f023c98: 0c008c53 */ jal anim0002384c /* f023c9c: 84450016 */ lh $a1,0x16($v0) /* f023ca0: 28440000 */ slti $a0,$v0,0x0 /* f023ca4: 5080000c */ beqzl $a0,.PF0f023cd8 @@ -8792,12 +8792,12 @@ glabel var7f1a87d8 /* f023604: 332e0004 */ andi $t6,$t9,0x4 /* f023608: 11c0001e */ beqz $t6,.L0f023684 /* f02360c: 00000000 */ nop -/* f023610: 0c008f4e */ jal func00023d38 +/* f023610: 0c008f4e */ jal anim00023d38 /* f023614: 00000000 */ nop /* f023618: 8e090020 */ lw $t1,0x20($s0) /* f02361c: 8d220020 */ lw $v0,0x20($t1) /* f023620: 84440000 */ lh $a0,0x0($v0) -/* f023624: 0c008e13 */ jal func0002384c +/* f023624: 0c008e13 */ jal anim0002384c /* f023628: 84450014 */ lh $a1,0x14($v0) /* f02362c: 28440000 */ slti $a0,$v0,0x0 /* f023630: 54800014 */ bnezl $a0,.L0f023684 @@ -8805,7 +8805,7 @@ glabel var7f1a87d8 /* f023638: 8e0a0020 */ lw $t2,0x20($s0) /* f02363c: 8d420020 */ lw $v0,0x20($t2) /* f023640: 84440000 */ lh $a0,0x0($v0) -/* f023644: 0c008e13 */ jal func0002384c +/* f023644: 0c008e13 */ jal anim0002384c /* f023648: 84450016 */ lh $a1,0x16($v0) /* f02364c: 28440000 */ slti $a0,$v0,0x0 /* f023650: 5080000c */ beqzl $a0,.L0f023684 @@ -9152,12 +9152,12 @@ glabel var7f1a87d8 /* f023b34: 31f90004 */ andi $t9,$t7,0x4 /* f023b38: 1320001e */ beqz $t9,.L0f023bb4 /* f023b3c: 00000000 */ nop -/* f023b40: 0c008f4e */ jal func00023d38 +/* f023b40: 0c008f4e */ jal anim00023d38 /* f023b44: 00000000 */ nop /* f023b48: 8e080020 */ lw $t0,0x20($s0) /* f023b4c: 8d020020 */ lw $v0,0x20($t0) /* f023b50: 84440000 */ lh $a0,0x0($v0) -/* f023b54: 0c008e13 */ jal func0002384c +/* f023b54: 0c008e13 */ jal anim0002384c /* f023b58: 84450014 */ lh $a1,0x14($v0) /* f023b5c: 28440000 */ slti $a0,$v0,0x0 /* f023b60: 54800014 */ bnezl $a0,.L0f023bb4 @@ -9165,7 +9165,7 @@ glabel var7f1a87d8 /* f023b68: 8e0e0020 */ lw $t6,0x20($s0) /* f023b6c: 8dc20020 */ lw $v0,0x20($t6) /* f023b70: 84440000 */ lh $a0,0x0($v0) -/* f023b74: 0c008e13 */ jal func0002384c +/* f023b74: 0c008e13 */ jal anim0002384c /* f023b78: 84450016 */ lh $a1,0x16($v0) /* f023b7c: 28440000 */ slti $a0,$v0,0x0 /* f023b80: 5080000c */ beqzl $a0,.L0f023bb4 @@ -10220,12 +10220,12 @@ glabel var7f1a87d8 /* f0230cc: 33080004 */ andi $t0,$t8,0x4 /* f0230d0: 1100001e */ beqz $t0,.NB0f02314c /* f0230d4: 00000000 */ sll $zero,$zero,0x0 -/* f0230d8: 0c009446 */ jal func00023d38 +/* f0230d8: 0c009446 */ jal anim00023d38 /* f0230dc: 00000000 */ sll $zero,$zero,0x0 /* f0230e0: 8e0f0020 */ lw $t7,0x20($s0) /* f0230e4: 8de20020 */ lw $v0,0x20($t7) /* f0230e8: 84440000 */ lh $a0,0x0($v0) -/* f0230ec: 0c00930b */ jal func0002384c +/* f0230ec: 0c00930b */ jal anim0002384c /* f0230f0: 84450014 */ lh $a1,0x14($v0) /* f0230f4: 28440000 */ slti $a0,$v0,0x0 /* f0230f8: 54800014 */ bnezl $a0,.NB0f02314c @@ -10233,7 +10233,7 @@ glabel var7f1a87d8 /* f023100: 8e190020 */ lw $t9,0x20($s0) /* f023104: 8f220020 */ lw $v0,0x20($t9) /* f023108: 84440000 */ lh $a0,0x0($v0) -/* f02310c: 0c00930b */ jal func0002384c +/* f02310c: 0c00930b */ jal anim0002384c /* f023110: 84450016 */ lh $a1,0x16($v0) /* f023114: 28440000 */ slti $a0,$v0,0x0 /* f023118: 5080000c */ beqzl $a0,.NB0f02314c @@ -10580,12 +10580,12 @@ glabel var7f1a87d8 /* f0235fc: 31b80004 */ andi $t8,$t5,0x4 /* f023600: 1300001e */ beqz $t8,.NB0f02367c /* f023604: 00000000 */ sll $zero,$zero,0x0 -/* f023608: 0c009446 */ jal func00023d38 +/* f023608: 0c009446 */ jal anim00023d38 /* f02360c: 00000000 */ sll $zero,$zero,0x0 /* f023610: 8e0c0020 */ lw $t4,0x20($s0) /* f023614: 8d820020 */ lw $v0,0x20($t4) /* f023618: 84440000 */ lh $a0,0x0($v0) -/* f02361c: 0c00930b */ jal func0002384c +/* f02361c: 0c00930b */ jal anim0002384c /* f023620: 84450014 */ lh $a1,0x14($v0) /* f023624: 28440000 */ slti $a0,$v0,0x0 /* f023628: 54800014 */ bnezl $a0,.NB0f02367c @@ -10593,7 +10593,7 @@ glabel var7f1a87d8 /* f023630: 8e080020 */ lw $t0,0x20($s0) /* f023634: 8d020020 */ lw $v0,0x20($t0) /* f023638: 84440000 */ lh $a0,0x0($v0) -/* f02363c: 0c00930b */ jal func0002384c +/* f02363c: 0c00930b */ jal anim0002384c /* f023640: 84450016 */ lh $a1,0x16($v0) /* f023644: 28440000 */ slti $a0,$v0,0x0 /* f023648: 5080000c */ beqzl $a0,.NB0f02367c @@ -15156,7 +15156,7 @@ void func0f0284ac(s32 arg0) g_SelectedAnimNum -= arg0; if (g_SelectedAnimNum <= 0) { - g_SelectedAnimNum = getNumAnimations() - 1; + g_SelectedAnimNum = animGetNumAnimations() - 1; } } @@ -15164,7 +15164,7 @@ void func0f0284f4(s32 arg0) { g_SelectedAnimNum += arg0; - if (g_SelectedAnimNum >= getNumAnimations()) { + if (g_SelectedAnimNum >= animGetNumAnimations()) { g_SelectedAnimNum = 1; } } diff --git a/src/game/chr/chraction.c b/src/game/chr/chraction.c index 1d16cbfe3..f4b9a254d 100644 --- a/src/game/chr/chraction.c +++ b/src/game/chr/chraction.c @@ -46,9 +46,9 @@ #include "lib/snd.h" #include "lib/rng.h" #include "lib/mtx.h" -#include "lib/lib_184d0.h" -#include "lib/lib_233c0.h" -#include "lib/lib_24e40.h" +#include "lib/ailist.h" +#include "lib/anim.h" +#include "lib/collision.h" #include "data.h" #include "types.h" @@ -1583,9 +1583,9 @@ void func0f02e4f8(struct coord *arg0, struct coord *arg1, struct coord *dst) struct coord sp20; #if VERSION >= VERSION_PAL_FINAL - func00024e4c(&sp2c, &sp20, 2298, "chr/chraction.c"); + cd00024e4c(&sp2c, &sp20, 2298, "chr/chraction.c"); #else - func00024e4c(&sp2c, &sp20, 2298, "chraction.c"); + cd00024e4c(&sp2c, &sp20, 2298, "chraction.c"); #endif func0f02e3dc(&sp2c, &sp20, arg0, arg1, dst); @@ -1611,7 +1611,7 @@ f32 func0f02e550(struct prop *prop, f32 arg1, f32 arg2, u32 arg3, f32 ymax, f32 chrSetOrUnsetHiddenFlag00000100(chr, false); - if (func0002d7c0(&prop->pos, prop->rooms, &sp50, arg3, 1, ymax - prop->pos.y, ymin - prop->pos.y) != CDRESULT_COLLISION) { + if (cd0002d7c0(&prop->pos, prop->rooms, &sp50, arg3, 1, ymax - prop->pos.y, ymin - prop->pos.y) != CDRESULT_COLLISION) { result = arg2; } else { #if VERSION >= VERSION_PAL_FINAL @@ -5182,7 +5182,7 @@ glabel func0f03645c /* f0364cc: 46004281 */ sub.s $f10,$f8,$f0 /* f0364d0: e7a60018 */ swc1 $f6,0x18($sp) /* f0364d4: 27a70030 */ addiu $a3,$sp,0x30 -/* f0364d8: 0c00b610 */ jal func0002d840 +/* f0364d8: 0c00b610 */ jal cd0002d840 /* f0364dc: e7aa001c */ swc1 $f10,0x1c($sp) /* f0364e0: 10400012 */ beqz $v0,.L0f03652c /* f0364e4: 24080001 */ addiu $t0,$zero,0x1 @@ -5198,7 +5198,7 @@ glabel func0f03645c /* f03650c: 46002181 */ sub.s $f6,$f4,$f0 /* f036510: e7b20014 */ swc1 $f18,0x14($sp) /* f036514: 8fa70064 */ lw $a3,0x64($sp) -/* f036518: 0c00b5ab */ jal func0002d6ac +/* f036518: 0c00b5ab */ jal cd0002d6ac /* f03651c: e7a60018 */ swc1 $f6,0x18($sp) /* f036520: 10400002 */ beqz $v0,.L0f03652c /* f036524: 240a0001 */ addiu $t2,$zero,0x1 @@ -5235,7 +5235,7 @@ bool func0f03654c(struct chrdata *chr, struct coord *pos, s16 *rooms, struct coo propChrGetBbox(prop, &width, &ymax, &ymin); if ((rooms2 && cdTestAToB2(pos, rooms, pos2, rooms2, types, 1, ymax - prop->pos.y, ymin - prop->pos.y)) - || (rooms2 == NULL && func0002d6ac(pos, rooms, pos2, types, 1, ymax - prop->pos.y, ymin - prop->pos.y))) { + || (rooms2 == NULL && cd0002d6ac(pos, rooms, pos2, types, 1, ymax - prop->pos.y, ymin - prop->pos.y))) { if (vector == NULL) { vector = &tmp; @@ -5265,8 +5265,8 @@ bool func0f03654c(struct chrdata *chr, struct coord *pos, s16 *rooms, struct coo sp50.y = pos2->y; sp50.z = pos2->z - a; - if (func0002d840(pos, rooms, &sp5c, sp40, types, 1, ymax - prop->pos.y, ymin - prop->pos.y) - && func0002d6ac(&sp5c, sp40, &sp50, types, 1, ymax - prop->pos.y, ymin - prop->pos.y)) { + if (cd0002d840(pos, rooms, &sp5c, sp40, types, 1, ymax - prop->pos.y, ymin - prop->pos.y) + && cd0002d6ac(&sp5c, sp40, &sp50, types, 1, ymax - prop->pos.y, ymin - prop->pos.y)) { sp5c.x = pos->x - b; sp5c.y = pos->y; sp5c.z = pos->z + a; @@ -5275,8 +5275,8 @@ bool func0f03654c(struct chrdata *chr, struct coord *pos, s16 *rooms, struct coo sp50.y = pos2->y; sp50.z = pos2->z + a; - if (func0002d840(pos, rooms, &sp5c, sp40, types, 1, ymax - prop->pos.y, ymin - prop->pos.y) - && func0002d6ac(&sp5c, sp40, &sp50, types, 1, ymax - prop->pos.y, ymin - prop->pos.y)) { + if (cd0002d840(pos, rooms, &sp5c, sp40, types, 1, ymax - prop->pos.y, ymin - prop->pos.y) + && cd0002d6ac(&sp5c, sp40, &sp50, types, 1, ymax - prop->pos.y, ymin - prop->pos.y)) { result = true; } } @@ -6559,7 +6559,7 @@ glabel var7f1a8dd0 /* f038c80: 46004281 */ sub.s $f10,$f8,$f0 /* f038c84: e7a60018 */ swc1 $f6,0x18($sp) /* f038c88: 27a7007c */ addiu $a3,$sp,0x7c -/* f038c8c: 0c00b610 */ jal func0002d840 +/* f038c8c: 0c00b610 */ jal cd0002d840 /* f038c90: e7aa001c */ swc1 $f10,0x1c($sp) /* f038c94: 10400002 */ beqz $v0,.L0f038ca0 /* f038c98: 02602025 */ or $a0,$s3,$zero @@ -6772,7 +6772,7 @@ glabel var7f1a8dd0 // // chrSetOrUnsetHiddenFlag00000100(chr, false); // -// if (func0002d840(&prop->pos, prop->rooms, &pad.pos, rooms, CDTYPE_BG, 1, +// if (cd0002d840(&prop->pos, prop->rooms, &pad.pos, rooms, CDTYPE_BG, 1, // ymax - prop->pos.y, ymin - prop->pos.y) != CDRESULT_COLLISION) { // nextstep = chr->patrolnextstep; // } @@ -6905,12 +6905,12 @@ bool chrCanSeeEntity(struct chrdata *chr, struct coord *chrpos, s16 *chrrooms, b func0f065dd8(chrpos, chrrooms, &frompos, fromrooms); - if (hasLineOfSight(&frompos, fromrooms, &targetpos, targetrooms, types, 0x10)) { + if (cdHasLineOfSight(&frompos, fromrooms, &targetpos, targetrooms, types, 0x10)) { chrRecordLastVisibleTargetTime(chr); result = true; } } else { - if (hasLineOfSight(chrpos, chrrooms, &targetpos, targetrooms, types, 0x10)) { + if (cdHasLineOfSight(chrpos, chrrooms, &targetpos, targetrooms, types, 0x10)) { chrRecordLastVisibleTargetTime(chr); result = true; } @@ -6927,13 +6927,13 @@ bool chrCanSeeEntity(struct chrdata *chr, struct coord *chrpos, s16 *chrrooms, b chrSetOrUnsetHiddenFlag00000100(targetchr, false); - if (hasLineOfSight(chrpos, chrrooms, &targetpos, targetrooms, types, 0x10)) { + if (cdHasLineOfSight(chrpos, chrrooms, &targetpos, targetrooms, types, 0x10)) { result = true; } chrSetOrUnsetHiddenFlag00000100(targetchr, true); } else if (attackflags & ATTACKFLAG_AIMATPAD) { - if (hasLineOfSight(chrpos, chrrooms, &targetpos, targetrooms, types, 0x10)) { + if (cdHasLineOfSight(chrpos, chrrooms, &targetpos, targetrooms, types, 0x10)) { result = true; } } @@ -6977,7 +6977,7 @@ bool chrCanSeeChr(struct chrdata *chr, struct chrdata *target, s16 *room) func0f065e74(&prop->pos, prop->rooms, &pos, rooms); - if (func0002dcfc(&pos, rooms, &target->prop->pos, target->prop->rooms, sp88, 307, 8)) { + if (cd0002dcfc(&pos, rooms, &target->prop->pos, target->prop->rooms, sp88, 307, 8)) { cansee = true; } @@ -7019,7 +7019,7 @@ bool chrHasLineOfSightToPos(struct chrdata *viewerchr, struct coord *pos, s16 *r chrSetOrUnsetHiddenFlag00000100(viewerchr, false); func0f065e74(&viewerprop->pos, viewerprop->rooms, &viewerpos, viewerrooms); - if (hasLineOfSight(&viewerpos, viewerrooms, pos, rooms, 307, 8)) { + if (cdHasLineOfSight(&viewerpos, viewerrooms, pos, rooms, 307, 8)) { result = true; } @@ -7865,7 +7865,7 @@ bool chrTryRunFromTarget(struct chrdata *chr) propGetBbox(prop, &width, &ymax, &ymin); // If dst runs into a wall, set it to closest valid spot - if (!func0002d7c0(&prop->pos, prop->rooms, &dst, 0x33, 1, + if (!cd0002d7c0(&prop->pos, prop->rooms, &dst, 0x33, 1, ymax - prop->pos.y, ymin - prop->pos.y)) { #if VERSION >= VERSION_PAL_FINAL cdGetPos(&dst, 8793, "chr/chraction.c"); @@ -7978,7 +7978,7 @@ bool chrGoToCoverProp(struct chrdata *chr) if (propheight > chrheight * 0.4f && propheight < chrheight * 0.9f) { propSetCollisionsEnabled(prop, false); - if (func0002dc18(&chrprop->pos, chrprop->rooms, &prop->pos, CDTYPE_DOORS | CDTYPE_BG)) { + if (cd0002dc18(&chrprop->pos, chrprop->rooms, &prop->pos, CDTYPE_DOORS | CDTYPE_BG)) { propSetCollisionsEnabled(prop, true); dstpos.x = prop->pos.x - (targetprop->pos.x - prop->pos.x) / targetdist * (propwidth * 1.25f + chrwidth); @@ -8054,7 +8054,7 @@ s32 chrConsiderGrenadeThrow(struct chrdata *chr, u32 attackflags, u32 entityid) pos.z = target->pos.z; } - if (target && func0002dc18(&chr->prop->pos, chr->prop->rooms, &pos, 0x33)) { + if (target && cd0002dc18(&chr->prop->pos, chr->prop->rooms, &pos, 0x33)) { struct prop *leftprop = chrGetEquippedWeaponProp(chr, 1); struct prop *rightprop = chrGetEquippedWeaponProp(chr, 0); struct weaponobj *weapon; @@ -8172,7 +8172,7 @@ void chrPunchInflictDamage(struct chrdata *chr, s32 damage, s32 range, u8 revers if (chrIsTargetInFov(chr, 20, reverse) && chrGetDistanceToTarget(chr) < range - && func0002dc18(&chr->prop->pos, chr->prop->rooms, &targetprop->pos, 0x33)) { + && cd0002dc18(&chr->prop->pos, chr->prop->rooms, &targetprop->pos, 0x33)) { vector.x = targetprop->pos.x - chr->prop->pos.x; vector.y = 0; vector.z = targetprop->pos.z - chr->prop->pos.z; @@ -12167,7 +12167,7 @@ glabel var7f1a9184 /* f0409c8: 27a60244 */ addiu $a2,$sp,0x244 /* f0409cc: 27a70234 */ addiu $a3,$sp,0x234 /* f0409d0: 25e40008 */ addiu $a0,$t7,0x8 -/* f0409d4: 0c00b5cd */ jal func0002de34 +/* f0409d4: 0c00b5cd */ jal cd0002de34 /* f0409d8: 25e50028 */ addiu $a1,$t7,0x28 /* f0409dc: 14400002 */ bnez $v0,.PF0f0409e8 /* f0409e0: 24050001 */ li $a1,0x1 @@ -13765,7 +13765,7 @@ glabel var7f1a9184 /* f040844: 27a60244 */ addiu $a2,$sp,0x244 /* f040848: 27a70234 */ addiu $a3,$sp,0x234 /* f04084c: 25e40008 */ addiu $a0,$t7,0x8 -/* f040850: 0c00b78d */ jal func0002de34 +/* f040850: 0c00b78d */ jal cd0002de34 /* f040854: 25e50028 */ addiu $a1,$t7,0x28 /* f040858: 14400002 */ bnez $v0,.L0f040864 /* f04085c: 24050001 */ addiu $a1,$zero,0x1 @@ -15355,7 +15355,7 @@ glabel var7f1a9184 /* f040024: 27a60244 */ addiu $a2,$sp,0x244 /* f040028: 27a70234 */ addiu $a3,$sp,0x234 /* f04002c: 25e40008 */ addiu $a0,$t7,0x8 -/* f040030: 0c00bc8f */ jal func0002de34 +/* f040030: 0c00bc8f */ jal cd0002de34 /* f040034: 25e50028 */ addiu $a1,$t7,0x28 /* f040038: 14400002 */ bnez $v0,.NB0f040044 /* f04003c: 24050001 */ addiu $a1,$zero,0x1 @@ -18711,7 +18711,7 @@ glabel var7f1a9244 /* f044e10: 46003281 */ sub.s $f10,$f6,$f0 /* f044e14: 46002201 */ sub.s $f8,$f4,$f0 /* f044e18: e7aa0018 */ swc1 $f10,0x18($sp) -/* f044e1c: 0c00b694 */ jal func0002da50 +/* f044e1c: 0c00b694 */ jal cd0002da50 /* f044e20: e7a8001c */ swc1 $f8,0x1c($sp) /* f044e24: 10400010 */ beqz $v0,.L0f044e68 /* f044e28: 24080001 */ addiu $t0,$zero,0x1 @@ -18727,7 +18727,7 @@ glabel var7f1a9244 /* f044e50: 46002201 */ sub.s $f8,$f4,$f0 /* f044e54: e7aa0014 */ swc1 $f10,0x14($sp) /* f044e58: 8fa70100 */ lw $a3,0x100($sp) -/* f044e5c: 0c00b5f0 */ jal func0002d7c0 +/* f044e5c: 0c00b5f0 */ jal cd0002d7c0 /* f044e60: e7a80018 */ swc1 $f8,0x18($sp) /* f044e64: 1440000c */ bnez $v0,.L0f044e98 .L0f044e68: @@ -18737,7 +18737,7 @@ glabel var7f1a9244 /* f044e74: 24e78ba0 */ addiu $a3,$a3,%lo(var7f1a8ba0) /* f044e78: 27a400ac */ addiu $a0,$sp,0xac /* f044e7c: 27a500a0 */ addiu $a1,$sp,0xa0 -/* f044e80: 0c009393 */ jal func00024e4c +/* f044e80: 0c009393 */ jal cd00024e4c /* f044e84: 24063741 */ addiu $a2,$zero,0x3747 /* f044e88: 27a400ac */ addiu $a0,$sp,0xac /* f044e8c: 27a500a0 */ addiu $a1,$sp,0xa0 @@ -18787,7 +18787,7 @@ glabel var7f1a9244 /* f044f38: 46002201 */ sub.s $f8,$f4,$f0 /* f044f3c: 46003281 */ sub.s $f10,$f6,$f0 /* f044f40: e7a80018 */ swc1 $f8,0x18($sp) -/* f044f44: 0c00b694 */ jal func0002da50 +/* f044f44: 0c00b694 */ jal cd0002da50 /* f044f48: e7aa001c */ swc1 $f10,0x1c($sp) /* f044f4c: 10400010 */ beqz $v0,.L0f044f90 /* f044f50: 240e0001 */ addiu $t6,$zero,0x1 @@ -18803,7 +18803,7 @@ glabel var7f1a9244 /* f044f78: 46003281 */ sub.s $f10,$f6,$f0 /* f044f7c: e7a80014 */ swc1 $f8,0x14($sp) /* f044f80: 8fa70100 */ lw $a3,0x100($sp) -/* f044f84: 0c00b5f0 */ jal func0002d7c0 +/* f044f84: 0c00b5f0 */ jal cd0002d7c0 /* f044f88: e7aa0018 */ swc1 $f10,0x18($sp) /* f044f8c: 1440000c */ bnez $v0,.L0f044fc0 .L0f044f90: @@ -18813,7 +18813,7 @@ glabel var7f1a9244 /* f044f9c: 24e78bac */ addiu $a3,$a3,%lo(var7f1a8bac) /* f044fa0: 27a40094 */ addiu $a0,$sp,0x94 /* f044fa4: 27a50088 */ addiu $a1,$sp,0x88 -/* f044fa8: 0c009393 */ jal func00024e4c +/* f044fa8: 0c009393 */ jal cd00024e4c /* f044fac: 24063750 */ addiu $a2,$zero,0x3756 /* f044fb0: 27a40094 */ addiu $a0,$sp,0x94 /* f044fb4: 27a50088 */ addiu $a1,$sp,0x88 @@ -18900,7 +18900,7 @@ glabel var7f1a9244 /* f0450e8: 46002201 */ sub.s $f8,$f4,$f0 /* f0450ec: e7aa0018 */ swc1 $f10,0x18($sp) /* f0450f0: 27a70040 */ addiu $a3,$sp,0x40 -/* f0450f4: 0c00b694 */ jal func0002da50 +/* f0450f4: 0c00b694 */ jal cd0002da50 /* f0450f8: e7a8001c */ swc1 $f8,0x1c($sp) /* f0450fc: 10400017 */ beqz $v0,.L0f04515c /* f045100: 8fae0104 */ lw $t6,0x104($sp) @@ -18920,7 +18920,7 @@ glabel var7f1a9244 /* f045138: 46002201 */ sub.s $f8,$f4,$f0 /* f04513c: e7aa0018 */ swc1 $f10,0x18($sp) /* f045140: 27a70040 */ addiu $a3,$sp,0x40 -/* f045144: 0c00a9bf */ jal func0002a6fc +/* f045144: 0c00a9bf */ jal cd0002a6fc /* f045148: e7a8001c */ swc1 $f8,0x1c($sp) /* f04514c: 10400003 */ beqz $v0,.L0f04515c .L0f045150: @@ -18932,7 +18932,7 @@ glabel var7f1a9244 /* f045160: 8fa400f0 */ lw $a0,0xf0($sp) /* f045164: 8fa500f4 */ lw $a1,0xf4($sp) /* f045168: 24e78bb8 */ addiu $a3,$a3,%lo(var7f1a8bb8) -/* f04516c: 0c009393 */ jal func00024e4c +/* f04516c: 0c009393 */ jal cd00024e4c /* f045170: 24063796 */ addiu $a2,$zero,0x379c /* f045174: 8fa400f0 */ lw $a0,0xf0($sp) /* f045178: 8fa500f4 */ lw $a1,0xf4($sp) @@ -19086,7 +19086,7 @@ glabel var7f1a9244 /* f044e10: 46003281 */ sub.s $f10,$f6,$f0 /* f044e14: 46002201 */ sub.s $f8,$f4,$f0 /* f044e18: e7aa0018 */ swc1 $f10,0x18($sp) -/* f044e1c: 0c00b694 */ jal func0002da50 +/* f044e1c: 0c00b694 */ jal cd0002da50 /* f044e20: e7a8001c */ swc1 $f8,0x1c($sp) /* f044e24: 10400010 */ beqz $v0,.L0f044e68 /* f044e28: 24080001 */ addiu $t0,$zero,0x1 @@ -19102,7 +19102,7 @@ glabel var7f1a9244 /* f044e50: 46002201 */ sub.s $f8,$f4,$f0 /* f044e54: e7aa0014 */ swc1 $f10,0x14($sp) /* f044e58: 8fa70100 */ lw $a3,0x100($sp) -/* f044e5c: 0c00b5f0 */ jal func0002d7c0 +/* f044e5c: 0c00b5f0 */ jal cd0002d7c0 /* f044e60: e7a80018 */ swc1 $f8,0x18($sp) /* f044e64: 1440000c */ bnez $v0,.L0f044e98 .L0f044e68: @@ -19112,7 +19112,7 @@ glabel var7f1a9244 /* f044e74: 24e78ba0 */ addiu $a3,$a3,%lo(var7f1a8ba0) /* f044e78: 27a400ac */ addiu $a0,$sp,0xac /* f044e7c: 27a500a0 */ addiu $a1,$sp,0xa0 -/* f044e80: 0c009393 */ jal func00024e4c +/* f044e80: 0c009393 */ jal cd00024e4c /* f044e84: 24063741 */ addiu $a2,$zero,0x3741 /* f044e88: 27a400ac */ addiu $a0,$sp,0xac /* f044e8c: 27a500a0 */ addiu $a1,$sp,0xa0 @@ -19162,7 +19162,7 @@ glabel var7f1a9244 /* f044f38: 46002201 */ sub.s $f8,$f4,$f0 /* f044f3c: 46003281 */ sub.s $f10,$f6,$f0 /* f044f40: e7a80018 */ swc1 $f8,0x18($sp) -/* f044f44: 0c00b694 */ jal func0002da50 +/* f044f44: 0c00b694 */ jal cd0002da50 /* f044f48: e7aa001c */ swc1 $f10,0x1c($sp) /* f044f4c: 10400010 */ beqz $v0,.L0f044f90 /* f044f50: 240e0001 */ addiu $t6,$zero,0x1 @@ -19178,7 +19178,7 @@ glabel var7f1a9244 /* f044f78: 46003281 */ sub.s $f10,$f6,$f0 /* f044f7c: e7a80014 */ swc1 $f8,0x14($sp) /* f044f80: 8fa70100 */ lw $a3,0x100($sp) -/* f044f84: 0c00b5f0 */ jal func0002d7c0 +/* f044f84: 0c00b5f0 */ jal cd0002d7c0 /* f044f88: e7aa0018 */ swc1 $f10,0x18($sp) /* f044f8c: 1440000c */ bnez $v0,.L0f044fc0 .L0f044f90: @@ -19188,7 +19188,7 @@ glabel var7f1a9244 /* f044f9c: 24e78bac */ addiu $a3,$a3,%lo(var7f1a8bac) /* f044fa0: 27a40094 */ addiu $a0,$sp,0x94 /* f044fa4: 27a50088 */ addiu $a1,$sp,0x88 -/* f044fa8: 0c009393 */ jal func00024e4c +/* f044fa8: 0c009393 */ jal cd00024e4c /* f044fac: 24063750 */ addiu $a2,$zero,0x3750 /* f044fb0: 27a40094 */ addiu $a0,$sp,0x94 /* f044fb4: 27a50088 */ addiu $a1,$sp,0x88 @@ -19275,7 +19275,7 @@ glabel var7f1a9244 /* f0450e8: 46002201 */ sub.s $f8,$f4,$f0 /* f0450ec: e7aa0018 */ swc1 $f10,0x18($sp) /* f0450f0: 27a70040 */ addiu $a3,$sp,0x40 -/* f0450f4: 0c00b694 */ jal func0002da50 +/* f0450f4: 0c00b694 */ jal cd0002da50 /* f0450f8: e7a8001c */ swc1 $f8,0x1c($sp) /* f0450fc: 10400017 */ beqz $v0,.L0f04515c /* f045100: 8fae0104 */ lw $t6,0x104($sp) @@ -19295,7 +19295,7 @@ glabel var7f1a9244 /* f045138: 46002201 */ sub.s $f8,$f4,$f0 /* f04513c: e7aa0018 */ swc1 $f10,0x18($sp) /* f045140: 27a70040 */ addiu $a3,$sp,0x40 -/* f045144: 0c00a9bf */ jal func0002a6fc +/* f045144: 0c00a9bf */ jal cd0002a6fc /* f045148: e7a8001c */ swc1 $f8,0x1c($sp) /* f04514c: 10400003 */ beqz $v0,.L0f04515c .L0f045150: @@ -19307,7 +19307,7 @@ glabel var7f1a9244 /* f045160: 8fa400f0 */ lw $a0,0xf0($sp) /* f045164: 8fa500f4 */ lw $a1,0xf4($sp) /* f045168: 24e78bb8 */ addiu $a3,$a3,%lo(var7f1a8bb8) -/* f04516c: 0c009393 */ jal func00024e4c +/* f04516c: 0c009393 */ jal cd00024e4c /* f045170: 24063796 */ addiu $a2,$zero,0x3796 /* f045174: 8fa400f0 */ lw $a0,0xf0($sp) /* f045178: 8fa500f4 */ lw $a1,0xf4($sp) @@ -19463,7 +19463,7 @@ glabel var7f1a9254 /* f045380: 46003281 */ sub.s $f10,$f6,$f0 /* f045384: 46002201 */ sub.s $f8,$f4,$f0 /* f045388: e7aa0018 */ swc1 $f10,0x18($sp) -/* f04538c: 0c00b694 */ jal func0002da50 +/* f04538c: 0c00b694 */ jal cd0002da50 /* f045390: e7a8001c */ swc1 $f8,0x1c($sp) /* f045394: 10400010 */ beqz $v0,.L0f0453d8 /* f045398: 24080001 */ addiu $t0,$zero,0x1 @@ -19479,7 +19479,7 @@ glabel var7f1a9254 /* f0453c0: 46002201 */ sub.s $f8,$f4,$f0 /* f0453c4: e7aa0014 */ swc1 $f10,0x14($sp) /* f0453c8: 8fa70108 */ lw $a3,0x108($sp) -/* f0453cc: 0c00b5f0 */ jal func0002d7c0 +/* f0453cc: 0c00b5f0 */ jal cd0002d7c0 /* f0453d0: e7a80018 */ swc1 $f8,0x18($sp) /* f0453d4: 1440000f */ bnez $v0,.L0f045414 .L0f0453d8: @@ -19489,13 +19489,13 @@ glabel var7f1a9254 /* f0453e4: 24e78bc4 */ addiu $a3,$a3,%lo(var7f1a8bc4) /* f0453e8: 27a400b4 */ addiu $a0,$sp,0xb4 /* f0453ec: 27a500a8 */ addiu $a1,$sp,0xa8 -/* f0453f0: 0c009393 */ jal func00024e4c +/* f0453f0: 0c009393 */ jal cd00024e4c /* f0453f4: 240637e6 */ addiu $a2,$zero,0x37ec /* f0453f8: 27a400b4 */ addiu $a0,$sp,0xb4 /* f0453fc: 27a500a8 */ addiu $a1,$sp,0xa8 /* f045400: 0fc112da */ jal func0f044b68 /* f045404: 27a600dc */ addiu $a2,$sp,0xdc -/* f045408: 0c009390 */ jal func00024e40 +/* f045408: 0c009390 */ jal cd00024e40 /* f04540c: 00000000 */ nop /* f045410: e7a00088 */ swc1 $f0,0x88($sp) .L0f045414: @@ -19542,7 +19542,7 @@ glabel var7f1a9254 /* f0454b4: 46002201 */ sub.s $f8,$f4,$f0 /* f0454b8: 46003281 */ sub.s $f10,$f6,$f0 /* f0454bc: e7a80018 */ swc1 $f8,0x18($sp) -/* f0454c0: 0c00b694 */ jal func0002da50 +/* f0454c0: 0c00b694 */ jal cd0002da50 /* f0454c4: e7aa001c */ swc1 $f10,0x1c($sp) /* f0454c8: 10400010 */ beqz $v0,.L0f04550c /* f0454cc: 240e0001 */ addiu $t6,$zero,0x1 @@ -19558,7 +19558,7 @@ glabel var7f1a9254 /* f0454f4: 46003281 */ sub.s $f10,$f6,$f0 /* f0454f8: e7a80014 */ swc1 $f8,0x14($sp) /* f0454fc: 8fa70108 */ lw $a3,0x108($sp) -/* f045500: 0c00b5f0 */ jal func0002d7c0 +/* f045500: 0c00b5f0 */ jal cd0002d7c0 /* f045504: e7aa0018 */ swc1 $f10,0x18($sp) /* f045508: 1440000f */ bnez $v0,.L0f045548 .L0f04550c: @@ -19568,13 +19568,13 @@ glabel var7f1a9254 /* f045518: 24e78bd0 */ addiu $a3,$a3,%lo(var7f1a8bd0) /* f04551c: 27a4009c */ addiu $a0,$sp,0x9c /* f045520: 27a50090 */ addiu $a1,$sp,0x90 -/* f045524: 0c009393 */ jal func00024e4c +/* f045524: 0c009393 */ jal cd00024e4c /* f045528: 240637f5 */ addiu $a2,$zero,0x37fb /* f04552c: 27a4009c */ addiu $a0,$sp,0x9c /* f045530: 27a50090 */ addiu $a1,$sp,0x90 /* f045534: 0fc112da */ jal func0f044b68 /* f045538: 27a600dc */ addiu $a2,$sp,0xdc -/* f04553c: 0c009390 */ jal func00024e40 +/* f04553c: 0c009390 */ jal cd00024e40 /* f045540: 00000000 */ nop /* f045544: e7a00084 */ swc1 $f0,0x84($sp) .L0f045548: @@ -19671,7 +19671,7 @@ glabel var7f1a9254 /* f0456a0: 46002201 */ sub.s $f8,$f4,$f0 /* f0456a4: e7aa0018 */ swc1 $f10,0x18($sp) /* f0456a8: 27a70040 */ addiu $a3,$sp,0x40 -/* f0456ac: 0c00b694 */ jal func0002da50 +/* f0456ac: 0c00b694 */ jal cd0002da50 /* f0456b0: e7a8001c */ swc1 $f8,0x1c($sp) /* f0456b4: 10400017 */ beqz $v0,.L0f045714 /* f0456b8: 8fae010c */ lw $t6,0x10c($sp) @@ -19691,7 +19691,7 @@ glabel var7f1a9254 /* f0456f0: 46002201 */ sub.s $f8,$f4,$f0 /* f0456f4: e7aa0018 */ swc1 $f10,0x18($sp) /* f0456f8: 27a70040 */ addiu $a3,$sp,0x40 -/* f0456fc: 0c00a9bf */ jal func0002a6fc +/* f0456fc: 0c00a9bf */ jal cd0002a6fc /* f045700: e7a8001c */ swc1 $f8,0x1c($sp) /* f045704: 10400003 */ beqz $v0,.L0f045714 .L0f045708: @@ -19703,7 +19703,7 @@ glabel var7f1a9254 /* f045718: 8fa400f8 */ lw $a0,0xf8($sp) /* f04571c: 8fa500fc */ lw $a1,0xfc($sp) /* f045720: 24e78bdc */ addiu $a3,$a3,%lo(var7f1a8bdc) -/* f045724: 0c009393 */ jal func00024e4c +/* f045724: 0c009393 */ jal cd00024e4c /* f045728: 2406383b */ addiu $a2,$zero,0x3841 /* f04572c: 8fa400f8 */ lw $a0,0xf8($sp) /* f045730: 8fa500fc */ lw $a1,0xfc($sp) @@ -19857,7 +19857,7 @@ glabel var7f1a9254 /* f045380: 46003281 */ sub.s $f10,$f6,$f0 /* f045384: 46002201 */ sub.s $f8,$f4,$f0 /* f045388: e7aa0018 */ swc1 $f10,0x18($sp) -/* f04538c: 0c00b694 */ jal func0002da50 +/* f04538c: 0c00b694 */ jal cd0002da50 /* f045390: e7a8001c */ swc1 $f8,0x1c($sp) /* f045394: 10400010 */ beqz $v0,.L0f0453d8 /* f045398: 24080001 */ addiu $t0,$zero,0x1 @@ -19873,7 +19873,7 @@ glabel var7f1a9254 /* f0453c0: 46002201 */ sub.s $f8,$f4,$f0 /* f0453c4: e7aa0014 */ swc1 $f10,0x14($sp) /* f0453c8: 8fa70108 */ lw $a3,0x108($sp) -/* f0453cc: 0c00b5f0 */ jal func0002d7c0 +/* f0453cc: 0c00b5f0 */ jal cd0002d7c0 /* f0453d0: e7a80018 */ swc1 $f8,0x18($sp) /* f0453d4: 1440000f */ bnez $v0,.L0f045414 .L0f0453d8: @@ -19883,13 +19883,13 @@ glabel var7f1a9254 /* f0453e4: 24e78bc4 */ addiu $a3,$a3,%lo(var7f1a8bc4) /* f0453e8: 27a400b4 */ addiu $a0,$sp,0xb4 /* f0453ec: 27a500a8 */ addiu $a1,$sp,0xa8 -/* f0453f0: 0c009393 */ jal func00024e4c +/* f0453f0: 0c009393 */ jal cd00024e4c /* f0453f4: 240637e6 */ addiu $a2,$zero,0x37e6 /* f0453f8: 27a400b4 */ addiu $a0,$sp,0xb4 /* f0453fc: 27a500a8 */ addiu $a1,$sp,0xa8 /* f045400: 0fc112da */ jal func0f044b68 /* f045404: 27a600dc */ addiu $a2,$sp,0xdc -/* f045408: 0c009390 */ jal func00024e40 +/* f045408: 0c009390 */ jal cd00024e40 /* f04540c: 00000000 */ nop /* f045410: e7a00088 */ swc1 $f0,0x88($sp) .L0f045414: @@ -19936,7 +19936,7 @@ glabel var7f1a9254 /* f0454b4: 46002201 */ sub.s $f8,$f4,$f0 /* f0454b8: 46003281 */ sub.s $f10,$f6,$f0 /* f0454bc: e7a80018 */ swc1 $f8,0x18($sp) -/* f0454c0: 0c00b694 */ jal func0002da50 +/* f0454c0: 0c00b694 */ jal cd0002da50 /* f0454c4: e7aa001c */ swc1 $f10,0x1c($sp) /* f0454c8: 10400010 */ beqz $v0,.L0f04550c /* f0454cc: 240e0001 */ addiu $t6,$zero,0x1 @@ -19952,7 +19952,7 @@ glabel var7f1a9254 /* f0454f4: 46003281 */ sub.s $f10,$f6,$f0 /* f0454f8: e7a80014 */ swc1 $f8,0x14($sp) /* f0454fc: 8fa70108 */ lw $a3,0x108($sp) -/* f045500: 0c00b5f0 */ jal func0002d7c0 +/* f045500: 0c00b5f0 */ jal cd0002d7c0 /* f045504: e7aa0018 */ swc1 $f10,0x18($sp) /* f045508: 1440000f */ bnez $v0,.L0f045548 .L0f04550c: @@ -19962,13 +19962,13 @@ glabel var7f1a9254 /* f045518: 24e78bd0 */ addiu $a3,$a3,%lo(var7f1a8bd0) /* f04551c: 27a4009c */ addiu $a0,$sp,0x9c /* f045520: 27a50090 */ addiu $a1,$sp,0x90 -/* f045524: 0c009393 */ jal func00024e4c +/* f045524: 0c009393 */ jal cd00024e4c /* f045528: 240637f5 */ addiu $a2,$zero,0x37f5 /* f04552c: 27a4009c */ addiu $a0,$sp,0x9c /* f045530: 27a50090 */ addiu $a1,$sp,0x90 /* f045534: 0fc112da */ jal func0f044b68 /* f045538: 27a600dc */ addiu $a2,$sp,0xdc -/* f04553c: 0c009390 */ jal func00024e40 +/* f04553c: 0c009390 */ jal cd00024e40 /* f045540: 00000000 */ nop /* f045544: e7a00084 */ swc1 $f0,0x84($sp) .L0f045548: @@ -20065,7 +20065,7 @@ glabel var7f1a9254 /* f0456a0: 46002201 */ sub.s $f8,$f4,$f0 /* f0456a4: e7aa0018 */ swc1 $f10,0x18($sp) /* f0456a8: 27a70040 */ addiu $a3,$sp,0x40 -/* f0456ac: 0c00b694 */ jal func0002da50 +/* f0456ac: 0c00b694 */ jal cd0002da50 /* f0456b0: e7a8001c */ swc1 $f8,0x1c($sp) /* f0456b4: 10400017 */ beqz $v0,.L0f045714 /* f0456b8: 8fae010c */ lw $t6,0x10c($sp) @@ -20085,7 +20085,7 @@ glabel var7f1a9254 /* f0456f0: 46002201 */ sub.s $f8,$f4,$f0 /* f0456f4: e7aa0018 */ swc1 $f10,0x18($sp) /* f0456f8: 27a70040 */ addiu $a3,$sp,0x40 -/* f0456fc: 0c00a9bf */ jal func0002a6fc +/* f0456fc: 0c00a9bf */ jal cd0002a6fc /* f045700: e7a8001c */ swc1 $f8,0x1c($sp) /* f045704: 10400003 */ beqz $v0,.L0f045714 .L0f045708: @@ -20097,7 +20097,7 @@ glabel var7f1a9254 /* f045718: 8fa400f8 */ lw $a0,0xf8($sp) /* f04571c: 8fa500fc */ lw $a1,0xfc($sp) /* f045720: 24e78bdc */ addiu $a3,$a3,%lo(var7f1a8bdc) -/* f045724: 0c009393 */ jal func00024e4c +/* f045724: 0c009393 */ jal cd00024e4c /* f045728: 2406383b */ addiu $a2,$zero,0x383b /* f04572c: 8fa400f8 */ lw $a0,0xf8($sp) /* f045730: 8fa500fc */ lw $a1,0xfc($sp) @@ -20353,7 +20353,7 @@ struct prop *chrOpenDoor(struct chrdata *chr, struct coord *coord) { struct prop *doorprop = NULL; - if (func0002d7c0(&chr->prop->pos, chr->prop->rooms, coord, 0x5020, 1, 0, 0) == CDRESULT_COLLISION) { + if (cd0002d7c0(&chr->prop->pos, chr->prop->rooms, coord, 0x5020, 1, 0, 0) == CDRESULT_COLLISION) { doorprop = cdGetObstacle(); } @@ -21316,7 +21316,7 @@ glabel goPosUpdateLiftAction /* f0468b0: 8faa0090 */ lw $t2,0x90($sp) /* f0468b4: e7a2003c */ swc1 $f2,0x3c($sp) /* f0468b8: 00003825 */ or $a3,$zero,$zero -/* f0468bc: 0c00a8db */ jal func0002a36c +/* f0468bc: 0c00a8db */ jal cd0002a36c /* f0468c0: a7aa002c */ sh $t2,0x2c($sp) /* f0468c4: 3c0141f0 */ lui $at,0x41f0 /* f0468c8: 44812000 */ mtc1 $at,$f4 @@ -21507,7 +21507,7 @@ u32 var8006843c = 0x0000ffff; // // rooms[0] = nextpad.room; // -// nextground = func0002a36c(&nextpad.pos, rooms, NULL, NULL); +// nextground = cd0002a36c(&nextpad.pos, rooms, NULL, NULL); // // // Begin exiting lift if lift is 30cm under destination or higher // advance = (lifty >= nextground - 30); @@ -21967,7 +21967,7 @@ bool chrStartSkJump(struct chrdata *chr, u8 arg1, u8 arg2, s32 arg3, u8 arg4) propChrGetBbox(prop, &width, &ymax, &ymin); chrSetOrUnsetHiddenFlag00000100(chr, false); propSetCollisionsEnabled(target, false); - iVar2 = func0002d6ac(&prop->pos, prop->rooms, &target->pos, 51, 1, + iVar2 = cd0002d6ac(&prop->pos, prop->rooms, &target->pos, 51, 1, ymax - prop->pos.y, ymin - prop->pos.y); chrSetOrUnsetHiddenFlag00000100(chr, true); propSetCollisionsEnabled(target, true); @@ -24542,7 +24542,7 @@ bool chrCanSeeTargetWithExtraCheck(struct chrdata *chr) if (target->type == PROPTYPE_PLAYER) { if (g_Vars.bondvisible && - (hasLineOfSight(&target->pos, target->rooms, &chr->prop->pos, chr->prop->rooms, 51, 8))) { + (cdHasLineOfSight(&target->pos, target->rooms, &chr->prop->pos, chr->prop->rooms, 51, 8))) { struct model *model = chr->model; struct coord sp68; struct coord sp56; @@ -24983,7 +24983,7 @@ bool chrSetPadPresetToPadOnRouteToTarget(struct chrdata *chr) struct pad pad; if (target->type != PROPTYPE_PLAYER || g_Vars.bondvisible) { - if (func0002dc18(&prop->pos, prop->rooms, &target->pos, CDTYPE_BG)) { + if (cd0002dc18(&prop->pos, prop->rooms, &target->pos, CDTYPE_BG)) { return false; } @@ -25004,8 +25004,8 @@ bool chrSetPadPresetToPadOnRouteToTarget(struct chrdata *chr) padUnpack(wp->padnum, PADFIELD_POS, &pad); - if (func0002dc18(&target->pos, target->rooms, &pad.pos, CDTYPE_BG)) { - if (func0002dc18(&prop->pos, prop->rooms, &pad.pos, CDTYPE_BG)) { + if (cd0002dc18(&target->pos, target->rooms, &pad.pos, CDTYPE_BG)) { + if (cd0002dc18(&prop->pos, prop->rooms, &pad.pos, CDTYPE_BG)) { chr->padpreset1 = wp->padnum; return true; } @@ -25101,8 +25101,8 @@ bool chrAdjustPosForSpawn(f32 width, struct coord *pos, s16 *rooms, f32 angle, b testpos.y = pos->y; testpos.z = pos->z + cosf(curangle) * 60; - if ((arg6 && func0002d840(pos, rooms, &testpos, testrooms, CDTYPE_ALL & ~CDTYPE_PLAYERS, 1, ymax, -200) != CDRESULT_COLLISION) - || (!arg6 && func0002deac(pos, rooms, &testpos, testrooms, CDTYPE_BG))) { + if ((arg6 && cd0002d840(pos, rooms, &testpos, testrooms, CDTYPE_ALL & ~CDTYPE_PLAYERS, 1, ymax, -200) != CDRESULT_COLLISION) + || (!arg6 && cd0002deac(pos, rooms, &testpos, testrooms, CDTYPE_BG))) { func0f021fa8(NULL, &testpos, testrooms); ground = cdFindGroundYSimple(&testpos, width, testrooms, 0, 0); ymin = -200; @@ -25161,7 +25161,7 @@ bool chrAdjustPosForSpawn(f32 width, struct coord *pos, s16 *rooms, f32 angle, b testpos.y = pos->y; testpos.z = cosf(curangle) * 60 + pos->z; - if (func0002deac(pos, rooms, &testpos, testrooms, CDTYPE_BG) + if (cd0002deac(pos, rooms, &testpos, testrooms, CDTYPE_BG) && cdTestVolume(&testpos, width, testrooms, CDTYPE_ALL, 1, 200, -200.0f) != CDRESULT_COLLISION && (arg4 || func0f04aeb0(&testpos, testrooms))) { pos->x = testpos.x; @@ -25325,7 +25325,7 @@ bool func0f04b658(struct chrdata *chr) chrSetOrUnsetHiddenFlag00000100(chr, false); propSetCollisionsEnabled(target, false); - if (!func0002dc18(&prop->pos, prop->rooms, &target->pos, 0x33)) { + if (!cd0002dc18(&prop->pos, prop->rooms, &target->pos, 0x33)) { struct prop *thing = cdGetObstacle(); if (thing && thing->type == PROPTYPE_OBJ @@ -25429,9 +25429,9 @@ bool chrCheckCoverOutOfSight(struct chrdata *chr, s32 covernum, bool arg2) } if (arg2) { - targetcanseecover = func0002db98(&target->pos, target->rooms, cover.pos, 35, 8); + targetcanseecover = cd0002db98(&target->pos, target->rooms, cover.pos, 35, 8); } else { - targetcanseecover = func0002f450(&target->pos, target->rooms, cover.pos, 50, 35); + targetcanseecover = cd0002f450(&target->pos, target->rooms, cover.pos, 50, 35); } if (!targetcanseecover != false) { @@ -26376,14 +26376,14 @@ bool chrIsTargetNearlyInSight(struct chrdata *chr, u32 distance) { struct prop *target = chrGetTargetProp(chr); - return func0002f450(&chr->prop->pos, chr->prop->rooms, &target->pos, distance, 32); + return cd0002f450(&chr->prop->pos, chr->prop->rooms, &target->pos, distance, 32); } bool chrIsNearlyInTargetsSight(struct chrdata *chr, u32 distance) { struct prop *target = chrGetTargetProp(chr); - return func0002f450(&target->pos, target->rooms, &chr->prop->pos, distance, 32); + return cd0002f450(&target->pos, target->rooms, &chr->prop->pos, distance, 32); } f32 func0f04c784(struct chrdata *chr) @@ -26531,7 +26531,7 @@ glabel var7f1a942c /* f04ca08: 02003025 */ or $a2,$s0,$zero /* f04ca0c: e7b00018 */ swc1 $f16,0x18($sp) /* f04ca10: 24070023 */ addiu $a3,$zero,0x23 -/* f04ca14: 0c00b5f0 */ jal func0002d7c0 +/* f04ca14: 0c00b5f0 */ jal cd0002d7c0 /* f04ca18: 24a50028 */ addiu $a1,$a1,0x28 /* f04ca1c: 1440002a */ bnez $v0,.L0f04cac8 /* f04ca20: 02002025 */ or $a0,$s0,$zero @@ -26774,7 +26774,7 @@ glabel var7f1a942c /* f04ca08: 02003025 */ or $a2,$s0,$zero /* f04ca0c: e7b00018 */ swc1 $f16,0x18($sp) /* f04ca10: 24070023 */ addiu $a3,$zero,0x23 -/* f04ca14: 0c00b5f0 */ jal func0002d7c0 +/* f04ca14: 0c00b5f0 */ jal cd0002d7c0 /* f04ca18: 24a50028 */ addiu $a1,$a1,0x28 /* f04ca1c: 1440002a */ bnez $v0,.L0f04cac8 /* f04ca20: 02002025 */ or $a0,$s0,$zero @@ -26951,7 +26951,7 @@ glabel var7f1a942c // propChrGetBbox(chr->prop, &width, &ymax, &ymin); // // // a14 -// result = func0002d7c0(&chrpos, chr->prop->rooms, pos, +// result = cd0002d7c0(&chrpos, chr->prop->rooms, pos, // CDTYPE_BG | CDTYPE_OBJS | CDTYPE_DOORS, 1, // ymax - chrpos.y, // ymin - chrpos.y); @@ -27579,7 +27579,7 @@ void chrAvoid(struct chrdata *chr) zdiff = dstpos.z - chr->prop->pos.z; if (xdiff > halfchrwidth || zdiff > halfchrwidth || xdiff < -halfchrwidth || zdiff < -halfchrwidth) { - cdresult = func0002d8b8(&chr->prop->pos, chr->prop->rooms, &dstpos, dstrooms, CDTYPE_ALL, true, ymax - chr->prop->pos.y, ymin - chr->prop->pos.y); + cdresult = cd0002d8b8(&chr->prop->pos, chr->prop->rooms, &dstpos, dstrooms, CDTYPE_ALL, true, ymax - chr->prop->pos.y, ymin - chr->prop->pos.y); } if (cdresult == CDRESULT_ERROR) { diff --git a/src/game/chr/chrai.c b/src/game/chr/chrai.c index 973b3d4a4..9e31098cb 100644 --- a/src/game/chr/chrai.c +++ b/src/game/chr/chrai.c @@ -5,7 +5,7 @@ #include "game/chr/chraicommands.h" #include "bss.h" #include "lib/rng.h" -#include "lib/lib_184d0.h" +#include "lib/ailist.h" #include "data.h" #include "types.h" diff --git a/src/game/chr/chraicommands.c b/src/game/chr/chraicommands.c index 836c6cd5c..5488c47ec 100644 --- a/src/game/chr/chraicommands.c +++ b/src/game/chr/chraicommands.c @@ -43,11 +43,11 @@ #include "lib/main.h" #include "lib/model.h" #include "lib/snd.h" -#include "lib/lib_11420.h" +#include "lib/music.h" #include "lib/rng.h" #include "lib/mtx.h" -#include "lib/lib_184d0.h" -#include "lib/lib_233c0.h" +#include "lib/ailist.h" +#include "lib/anim.h" #include "lib/lib_317f0.h" #include "lib/libc/ll.h" #include "data.h" @@ -12502,7 +12502,7 @@ bool aiConfigureEnvironment(void) sndPlayNosedive(value); break; case AIENVCMD_0B: - func0001190c(); + music0001190c(); break; case AIENVCMD_ROOM_SETFAULTYLIGHTS: roomSetLightsFaulty(room_id, value); diff --git a/src/game/credits.c b/src/game/credits.c index 3b9a37f42..f5da07def 100644 --- a/src/game/credits.c +++ b/src/game/credits.c @@ -15,7 +15,7 @@ #include "game/music.h" #include "game/lang.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/main.h" #include "lib/memory.h" #include "lib/rng.h" diff --git a/src/game/debug2.c b/src/game/debug2.c index 02690485c..389b28f3d 100644 --- a/src/game/debug2.c +++ b/src/game/debug2.c @@ -263,9 +263,9 @@ glabel debug0f11941cnb /* f119420: afbf0014 */ sw $ra,0x14($sp) /* f119424: 3c048008 */ lui $a0,0x8008 /* f119428: 248487f4 */ addiu $a0,$a0,-30732 -/* f11942c: 0c00c460 */ jal func0002fa30 +/* f11942c: 0c00c460 */ jal rmon0002fa30 /* f119430: 24050002 */ addiu $a1,$zero,0x2 -/* f119434: 0c00c462 */ jal func0002fa38 +/* f119434: 0c00c462 */ jal rmon0002fa38 /* f119438: 240400fa */ addiu $a0,$zero,0xfa /* f11943c: 8fbf0014 */ lw $ra,0x14($sp) /* f119440: 27bd0018 */ addiu $sp,$sp,0x18 @@ -277,7 +277,7 @@ GLOBAL_ASM( glabel debug0f11944cnb /* f11944c: 27bdffe8 */ addiu $sp,$sp,-24 /* f119450: afbf0014 */ sw $ra,0x14($sp) -/* f119454: 0c00c464 */ jal func0002fa40 +/* f119454: 0c00c464 */ jal rmon0002fa40 /* f119458: 00000000 */ sll $zero,$zero,0x0 /* f11945c: 8fbf0014 */ lw $ra,0x14($sp) /* f119460: 27bd0018 */ addiu $sp,$sp,0x18 diff --git a/src/game/endscreen.c b/src/game/endscreen.c index 2ac468a92..ab083fbd2 100644 --- a/src/game/endscreen.c +++ b/src/game/endscreen.c @@ -23,7 +23,7 @@ #include "game/options.h" #include "game/mpstats.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/main.h" #include "data.h" #include "types.h" diff --git a/src/game/explosions/explosions.c b/src/game/explosions/explosions.c index 303ef3c39..b8a908370 100644 --- a/src/game/explosions/explosions.c +++ b/src/game/explosions/explosions.c @@ -19,11 +19,11 @@ #include "game/utils.h" #include "game/wallhit.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/main.h" #include "lib/rng.h" #include "lib/mtx.h" -#include "lib/lib_233c0.h" +#include "lib/anim.h" #include "data.h" #include "types.h" @@ -104,12 +104,12 @@ bool explosionCreateComplex(struct prop *prop, struct coord *pos, s16 *rooms, s1 } if (prop) { - ret = func0002a564(&prop->pos, prop->rooms, &y, 0, &sp88, &sp68); + ret = cd0002a564(&prop->pos, prop->rooms, &y, 0, &sp88, &sp68); sp100.x = prop->pos.x; sp100.y = y; sp100.z = prop->pos.z; } else { - ret = func0002a564(pos, rooms, &y, 0, &sp88, &sp68); + ret = cd0002a564(pos, rooms, &y, 0, &sp88, &sp68); sp100.x = pos->x; sp100.y = y; sp100.z = pos->z; diff --git a/src/game/explosions/reset.c b/src/game/explosions/reset.c index b1f210193..022c7e5c0 100644 --- a/src/game/explosions/reset.c +++ b/src/game/explosions/reset.c @@ -2,7 +2,7 @@ #include "constants.h" #include "game/prop.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "data.h" #include "types.h" diff --git a/src/game/filelist.c b/src/game/filelist.c index 699776ff2..8df32c966 100644 --- a/src/game/filelist.c +++ b/src/game/filelist.c @@ -15,7 +15,7 @@ #include "game/options.h" #include "game/utils.h" #include "bss.h" -#include "lib/lib_0bfb0.h" +#include "lib/fault.h" #include "lib/snd.h" #include "lib/lib_126b0.h" #include "data.h" diff --git a/src/game/filemgr.c b/src/game/filemgr.c index 9512ac5a4..88f0f862a 100644 --- a/src/game/filemgr.c +++ b/src/game/filemgr.c @@ -13,7 +13,7 @@ #include "game/pak/pak.h" #include "game/utils.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/lib_126b0.h" #include "lib/str.h" #include "data.h" diff --git a/src/game/game_000130.c b/src/game/game_000130.c index 1fec55770..6d8fa8a9e 100644 --- a/src/game/game_000130.c +++ b/src/game/game_000130.c @@ -3,7 +3,7 @@ #include "game/game_000130.h" #include "game/floor.h" #include "bss.h" -#include "lib/lib_233c0.h" +#include "lib/anim.h" #include "data.h" #include "types.h" @@ -46,7 +46,7 @@ u16 func0f0002a0(s16 animnum, s32 frame, s32 endframe) u16 count = 0; while (frame < endframe) { - count += func0002485c(0, 0, &g_ModelTypeChr, animnum, frame, sp48, 0); + count += anim0002485c(0, 0, &g_ModelTypeChr, animnum, frame, sp48, 0); frame++; } @@ -59,7 +59,7 @@ s32 func0f000358(s16 animnum, s32 frame, s32 endframe) s16 sp44[4]; while (frame < endframe) { - func0002485c(0, 0, &g_ModelTypeChr, animnum, frame, sp44, 0); + anim0002485c(0, 0, &g_ModelTypeChr, animnum, frame, sp44, 0); count += sp44[2]; frame++; } diff --git a/src/game/game_006bd0.c b/src/game/game_006bd0.c index 27edc1467..b4ea096d8 100644 --- a/src/game/game_006bd0.c +++ b/src/game/game_006bd0.c @@ -15,7 +15,7 @@ #include "game/file.h" #include "game/gfxmemory.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/snd.h" #include "lib/rng.h" #include "lib/mtx.h" diff --git a/src/game/game_00c490.c b/src/game/game_00c490.c index f5dd7a3bd..7a5e9f992 100644 --- a/src/game/game_00c490.c +++ b/src/game/game_00c490.c @@ -32,9 +32,9 @@ #include "lib/model.h" #include "lib/rng.h" #include "lib/mtx.h" -#include "lib/lib_184d0.h" -#include "lib/lib_233c0.h" -#include "lib/lib_24e40.h" +#include "lib/ailist.h" +#include "lib/anim.h" +#include "lib/collision.h" #include "data.h" #include "types.h" @@ -3269,7 +3269,7 @@ void setupParseObjects(s32 stagenum) car->nextstep = 0; if (obj->flags & OBJFLAG_CHOPPER_INACTIVE) { - prop->pos.y = func0002a36c(&prop->pos, prop->rooms, NULL, 0) + 30; + prop->pos.y = cd0002a36c(&prop->pos, prop->rooms, NULL, 0) + 30; } prop->forcetick = true; diff --git a/src/game/game_011110.c b/src/game/game_011110.c index f8a02ce7c..4df94b609 100644 --- a/src/game/game_011110.c +++ b/src/game/game_011110.c @@ -19,7 +19,7 @@ #include "bss.h" #include "lib/memory.h" #include "lib/mtx.h" -#include "lib/lib_233c0.h" +#include "lib/anim.h" #include "data.h" #include "types.h" diff --git a/src/game/game_0125a0.c b/src/game/game_0125a0.c index 4781dfbd0..5477446c7 100644 --- a/src/game/game_0125a0.c +++ b/src/game/game_0125a0.c @@ -7,7 +7,7 @@ #include "game/pad.h" #include "bss.h" #include "lib/mtx.h" -#include "lib/lib_233c0.h" +#include "lib/anim.h" #include "lib/model.h" #include "data.h" #include "types.h" @@ -22,7 +22,7 @@ void func0f0125a0(s16 animnum, s32 loopframe, s32 endframe, s32 *arg3) arg3[2] = 0; while (loopframe < endframe) { - func0002485c(0, 0, &g_ModelTypeChr, animnum, loopframe, sp48, 0); + anim0002485c(0, 0, &g_ModelTypeChr, animnum, loopframe, sp48, 0); arg3[0] += sp48[0]; arg3[1] += sp48[1]; diff --git a/src/game/game_012aa0.c b/src/game/game_012aa0.c index 3326d5184..10a8afd0d 100644 --- a/src/game/game_012aa0.c +++ b/src/game/game_012aa0.c @@ -7,7 +7,7 @@ #include "game/pad.h" #include "bss.h" #include "lib/mtx.h" -#include "lib/lib_233c0.h" +#include "lib/anim.h" #include "lib/model.h" #include "data.h" #include "types.h" @@ -61,7 +61,7 @@ void padsPrepare(void) } if (roomsptr != NULL) { - roomnum = func0002a400(&pad.pos, roomsptr); + roomnum = cd0002a400(&pad.pos, roomsptr); if (roomnum > 0) { packedpad->room = roomnum; diff --git a/src/game/game_013ee0.c b/src/game/game_013ee0.c index 2ff3306d6..f7236fc2b 100644 --- a/src/game/game_013ee0.c +++ b/src/game/game_013ee0.c @@ -5,7 +5,7 @@ #include "game/pad.h" #include "bss.h" #include "lib/memory.h" -#include "lib/lib_233c0.h" +#include "lib/anim.h" #include "data.h" #include "types.h" @@ -105,7 +105,7 @@ void coverPrepare(void) g_CoverRooms[i] = -1; if (roomsptr != NULL) { - s32 room = func0002a400(cover.pos, roomsptr); + s32 room = cd0002a400(cover.pos, roomsptr); if (room > 0) { g_CoverRooms[i] = (s16)room; @@ -131,7 +131,7 @@ void coverPrepare(void) } if (roomsptr) { - s32 aimroom = func0002a400(&aimpos, roomsptr); + s32 aimroom = cd0002a400(&aimpos, roomsptr); if (aimroom > 0) { g_CoverFlags[i] |= (g_CoverRooms[i] == (s16)aimroom) ? COVERFLAG_AIMSAMEROOM : COVERFLAG_AIMDIFFROOM; diff --git a/src/game/game_0147d0.c b/src/game/game_0147d0.c index 608feae90..bc3e6c3b3 100644 --- a/src/game/game_0147d0.c +++ b/src/game/game_0147d0.c @@ -10,7 +10,7 @@ #include "lib/memory.h" #include "lib/model.h" #include "lib/rng.h" -#include "lib/lib_184d0.h" +#include "lib/ailist.h" #include "data.h" #include "types.h" diff --git a/src/game/game_015470.c b/src/game/game_015470.c index 6233ebd7c..e7f97c899 100644 --- a/src/game/game_015470.c +++ b/src/game/game_015470.c @@ -3,7 +3,7 @@ #include "game/game_015470.h" #include "game/game_01afc0.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/dma.h" #include "lib/lib_317f0.h" #include "data.h" diff --git a/src/game/game_01afc0.c b/src/game/game_01afc0.c index dd3ff7e44..3b0ce42e8 100644 --- a/src/game/game_01afc0.c +++ b/src/game/game_01afc0.c @@ -1,7 +1,7 @@ #include #include "constants.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "data.h" #include "types.h" diff --git a/src/game/game_01bea0.c b/src/game/game_01bea0.c index ad41746dd..2e22a1419 100644 --- a/src/game/game_01bea0.c +++ b/src/game/game_01bea0.c @@ -20,7 +20,7 @@ #include "game/gamefile.h" #include "game/mplayer/mplayer.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/main.h" #include "lib/snd.h" #include "data.h" diff --git a/src/game/game_02cde0.c b/src/game/game_02cde0.c index fe4a76954..291847e58 100644 --- a/src/game/game_02cde0.c +++ b/src/game/game_02cde0.c @@ -18,9 +18,9 @@ #include "lib/lib_126b0.h" #include "lib/rng.h" #include "lib/mtx.h" -#include "lib/lib_184d0.h" -#include "lib/lib_233c0.h" -#include "lib/lib_24e40.h" +#include "lib/ailist.h" +#include "lib/anim.h" +#include "lib/collision.h" #include "data.h" #include "types.h" diff --git a/src/game/game_0b2150.c b/src/game/game_0b2150.c index 605105fff..294e9abb9 100644 --- a/src/game/game_0b2150.c +++ b/src/game/game_0b2150.c @@ -2,7 +2,7 @@ #include "constants.h" #include "game/game_0b2150.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "data.h" #include "types.h" diff --git a/src/game/game_0b63b0.c b/src/game/game_0b63b0.c index 5e058c566..92a2cf3b5 100644 --- a/src/game/game_0b63b0.c +++ b/src/game/game_0b63b0.c @@ -50,13 +50,13 @@ #include "game/propobj.h" #include "game/splat.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/main.h" #include "lib/snd.h" #include "lib/memory.h" #include "lib/rng.h" #include "lib/mtx.h" -#include "lib/lib_233c0.h" +#include "lib/anim.h" #include "lib/lib_317f0.h" #include "data.h" #include "types.h" diff --git a/src/game/game_0b69d0.c b/src/game/game_0b69d0.c index 7640233c6..7be23c342 100644 --- a/src/game/game_0b69d0.c +++ b/src/game/game_0b69d0.c @@ -54,14 +54,14 @@ #include "game/mpstats.h" #include "bss.h" #include "lib/joy.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/main.h" #include "lib/snd.h" #include "lib/memory.h" #include "lib/model.h" #include "lib/rng.h" #include "lib/mtx.h" -#include "lib/lib_233c0.h" +#include "lib/anim.h" #include "lib/lib_317f0.h" #include "data.h" #include "types.h" @@ -3514,10 +3514,10 @@ void func0f0ba190(u32 arg0) var8009de2c = arg0; lastframe = animGetNumFrames(g_CutsceneAnimNum) - 1; - func00023d38(g_CutsceneAnimNum); - sp7f = func00023ab0(g_CutsceneAnimNum, lastframe); - func00023d0c(); - func00024050(0, 0, &g_ModelType20, g_CutsceneAnimNum, sp7f, &sp94, &sp88, &sp7c); + anim00023d38(g_CutsceneAnimNum); + sp7f = anim00023ab0(g_CutsceneAnimNum, lastframe); + anim00023d0c(); + anim00024050(0, 0, &g_ModelType20, g_CutsceneAnimNum, sp7f, &sp94, &sp88, &sp7c); mtx0001648c(&sp94, &sp38); theta = atan2f(-sp38.m[2][0], -sp38.m[2][2]); @@ -3561,7 +3561,7 @@ void func0f0ba29c(bool arg0) buttons = 0; } - func00023d38(g_CutsceneAnimNum); + anim00023d38(g_CutsceneAnimNum); endframe = animGetNumFrames(g_CutsceneAnimNum) - 1; @@ -3578,7 +3578,7 @@ void func0f0ba29c(bool arg0) #endif if (g_Anims[g_CutsceneAnimNum].flags & ANIMFLAG_08) { - while (g_CutsceneCurAnimFrame60 < endframe && func000239e0(g_CutsceneAnimNum, g_CutsceneCurAnimFrame60)) { + while (g_CutsceneCurAnimFrame60 < endframe && anim000239e0(g_CutsceneAnimNum, g_CutsceneCurAnimFrame60)) { #if VERSION >= VERSION_PAL_FINAL g_CutsceneCurAnimFrame240 += 1.2f; g_CutsceneCurAnimFrame60 = floorf(g_CutsceneCurAnimFrame240 + 0.01f); @@ -3606,9 +3606,9 @@ void func0f0ba29c(bool arg0) } g_Vars.in_cutscene = (g_Vars.tickmode == TICKMODE_CUTSCENE && g_CutsceneCurAnimFrame60 < endframe); - sp15f = func00023ab0(g_CutsceneAnimNum, g_CutsceneCurAnimFrame60); - func00023d0c(); - func00024050(0, 0, &g_ModelType20, g_CutsceneAnimNum, sp15f, &sp178, &sp16c, &sp160); + sp15f = anim00023ab0(g_CutsceneAnimNum, g_CutsceneCurAnimFrame60); + anim00023d0c(); + anim00024050(0, 0, &g_ModelType20, g_CutsceneAnimNum, sp15f, &sp178, &sp16c, &sp160); pos.x = sp16c.x * sp118; pos.y = sp16c.y * sp118; @@ -3624,8 +3624,8 @@ void func0f0ba29c(bool arg0) look.y = -sp11c.m[2][1]; look.z = -sp11c.m[2][2]; - fovy = func00024c14(1, g_CutsceneAnimNum, sp15f); - g_CutsceneBlurFrac = func00024c14(2, g_CutsceneAnimNum, sp15f); + fovy = anim00024c14(1, g_CutsceneAnimNum, sp15f); + g_CutsceneBlurFrac = anim00024c14(2, g_CutsceneAnimNum, sp15f); g_CutsceneBarFrac = 0; if (var8009de2c > 0 && var8009de2c >= endframe - g_CutsceneCurAnimFrame60) { @@ -14592,7 +14592,7 @@ void func0f0c1840(struct coord *pos, struct coord *up, struct coord *look, struc func0f162194(pos, sp90, sp64, 20, &sp52); if (sp90[0] != -1) { - tmp = room = func0002a400(pos, sp90); + tmp = room = cd0002a400(pos, sp90); if (room > 0) { currentPlayerSetCamPropertiesWithRoom(pos, up, look, tmp); @@ -14600,7 +14600,7 @@ void func0f0c1840(struct coord *pos, struct coord *up, struct coord *look, struc currentPlayerSetCamPropertiesWithRoom(pos, up, look, sp90[0]); } } else if (sp64[0] != -1) { - tmp = room = func0002a400(pos, sp64); + tmp = room = cd0002a400(pos, sp64); if (room > 0) { currentPlayerSetCamPropertiesWithoutRoom(pos, up, look, tmp); diff --git a/src/game/game_0e0770.c b/src/game/game_0e0770.c index 0cd1d7795..fb34114d1 100644 --- a/src/game/game_0e0770.c +++ b/src/game/game_0e0770.c @@ -9,7 +9,7 @@ #include "game/file.h" #include "game/utils.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/main.h" #include "lib/rng.h" #include "lib/mtx.h" diff --git a/src/game/game_0f09f0.c b/src/game/game_0f09f0.c index a1d54df11..f86a3b905 100644 --- a/src/game/game_0f09f0.c +++ b/src/game/game_0f09f0.c @@ -32,7 +32,7 @@ #include "game/options.h" #include "game/propobj.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/main.h" #include "lib/snd.h" #include "lib/memory.h" diff --git a/src/game/game_11f000.c b/src/game/game_11f000.c index b7816f38a..c8aaf7794 100644 --- a/src/game/game_11f000.c +++ b/src/game/game_11f000.c @@ -8,7 +8,7 @@ #include "game/game_165670.h" #include "game/pad.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/mtx.h" #include "data.h" #include "types.h" diff --git a/src/game/game_13c510.c b/src/game/game_13c510.c index 2f5ab62f9..1b013d4d2 100644 --- a/src/game/game_13c510.c +++ b/src/game/game_13c510.c @@ -11,7 +11,7 @@ #include "game/game_165670.h" #include "game/game_1668e0.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/mtx.h" #include "data.h" #include "types.h" diff --git a/src/game/game_1531a0.c b/src/game/game_1531a0.c index 28ab2926c..f6d22da9e 100644 --- a/src/game/game_1531a0.c +++ b/src/game/game_1531a0.c @@ -6,7 +6,7 @@ #include "game/file.h" #include "game/lang.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/dma.h" #include "lib/main.h" #include "lib/memory.h" diff --git a/src/game/game_1577f0.c b/src/game/game_1577f0.c index e3b7c682d..0711711e5 100644 --- a/src/game/game_1577f0.c +++ b/src/game/game_1577f0.c @@ -6,7 +6,7 @@ #include "game/file.h" #include "game/lang.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/dma.h" #include "lib/main.h" #include "lib/memory.h" diff --git a/src/game/game_165670.c b/src/game/game_165670.c index 6529bc2a6..b94822759 100644 --- a/src/game/game_165670.c +++ b/src/game/game_165670.c @@ -4,7 +4,7 @@ #include "game/bg.h" #include "game/game_165670.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "data.h" #include "types.h" diff --git a/src/game/game_1657c0.c b/src/game/game_1657c0.c index cc8dda260..9f28d6e3b 100644 --- a/src/game/game_1657c0.c +++ b/src/game/game_1657c0.c @@ -5,7 +5,7 @@ #include "game/bg.h" #include "game/game_165670.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "data.h" #include "types.h" diff --git a/src/game/game_176080.c b/src/game/game_176080.c index 3216049a5..b2ea73c0c 100644 --- a/src/game/game_176080.c +++ b/src/game/game_176080.c @@ -6,7 +6,7 @@ #include "game/mplayer/mplayer.h" #include "game/options.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/memory.h" #include "data.h" #include "types.h" diff --git a/src/game/game_190260.c b/src/game/game_190260.c index a3176cbd2..aa78c6920 100644 --- a/src/game/game_190260.c +++ b/src/game/game_190260.c @@ -28,7 +28,7 @@ #include "lib/model.h" #include "lib/rng.h" #include "lib/mtx.h" -#include "lib/lib_233c0.h" +#include "lib/anim.h" #include "data.h" #include "types.h" @@ -1867,7 +1867,7 @@ glabel var7f1b8ea8 /* f19113c: 24190022 */ addiu $t9,$zero,0x22 /* f191140: afb90010 */ sw $t9,0x10($sp) /* f191144: 24470028 */ addiu $a3,$v0,0x28 -/* f191148: 0c00b734 */ jal func0002dcd0 +/* f191148: 0c00b734 */ jal cd0002dcd0 /* f19114c: afa3003c */ sw $v1,0x3c($sp) /* f191150: 14400002 */ bnez $v0,.L0f19115c /* f191154: 8fa3003c */ lw $v1,0x3c($sp) @@ -2268,7 +2268,7 @@ glabel var7f1b8ea8 /* f18b228: 24180022 */ addiu $t8,$zero,0x22 /* f18b22c: afb80010 */ sw $t8,0x10($sp) /* f18b230: 24470028 */ addiu $a3,$v0,0x28 -/* f18b234: 0c00bc36 */ jal func0002dcd0 +/* f18b234: 0c00bc36 */ jal cd0002dcd0 /* f18b238: afa3003c */ sw $v1,0x3c($sp) /* f18b23c: 14400002 */ bnez $v0,.NB0f18b248 /* f18b240: 8fa3003c */ lw $v1,0x3c($sp) @@ -2468,7 +2468,7 @@ glabel var7f1b8ea8 // dprint(); // // if ((obj->flags2 & OBJFLAG2_PICKUPWITHOUTLOS) == 0 -// && !func0002dcd0(&chrprop->pos, chrprop->rooms, &prop->pos, prop->rooms, 0x22)) { +// && !cd0002dcd0(&chrprop->pos, chrprop->rooms, &prop->pos, prop->rooms, 0x22)) { // sp3c = false; // } // } diff --git a/src/game/game_1999b0.c b/src/game/game_1999b0.c index 822be664a..e941fcc3a 100644 --- a/src/game/game_1999b0.c +++ b/src/game/game_1999b0.c @@ -14,8 +14,8 @@ #include "bss.h" #include "lib/rng.h" #include "lib/mtx.h" -#include "lib/lib_233c0.h" -#include "lib/lib_24e40.h" +#include "lib/anim.h" +#include "lib/collision.h" #include "data.h" #include "types.h" @@ -480,7 +480,7 @@ void func0f19a7d0(u16 padnum, struct coord *pos) rooms[1] = -1; pos->x = pad.pos.x; - pos->y = func0002a36c(&pad.pos, rooms, 0, 0) + 150; + pos->y = cd0002a36c(&pad.pos, rooms, 0, 0) + 150; pos->z = pad.pos.z; } diff --git a/src/game/game_1a7560.c b/src/game/game_1a7560.c index 64e6c8b14..d13f318da 100644 --- a/src/game/game_1a7560.c +++ b/src/game/game_1a7560.c @@ -18,7 +18,7 @@ #include "game/mplayer/mplayer.h" #include "game/options.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/main.h" #include "data.h" #include "types.h" diff --git a/src/game/gamefile.c b/src/game/gamefile.c index e5b45c252..121ad7ec0 100644 --- a/src/game/gamefile.c +++ b/src/game/gamefile.c @@ -14,7 +14,7 @@ #include "game/options.h" #include "game/utils.h" #include "bss.h" -#include "lib/lib_0bfb0.h" +#include "lib/fault.h" #include "lib/snd.h" #include "lib/lib_126b0.h" #include "data.h" diff --git a/src/game/hudmsg.c b/src/game/hudmsg.c index 2d956589e..be6851481 100644 --- a/src/game/hudmsg.c +++ b/src/game/hudmsg.c @@ -14,7 +14,7 @@ #include "game/options.h" #include "game/propobj.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/snd.h" #include "lib/memory.h" #include "lib/mtx.h" diff --git a/src/game/lv.c b/src/game/lv.c index b779bc09b..25b41d5e7 100644 --- a/src/game/lv.c +++ b/src/game/lv.c @@ -94,14 +94,13 @@ #include "lib/args.h" #include "lib/joy.h" #include "lib/lib_06440.h" -#include "lib/lib_09a80.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/main.h" #include "lib/snd.h" -#include "lib/lib_11420.h" +#include "lib/music.h" #include "lib/rng.h" #include "lib/mtx.h" -#include "lib/lib_233c0.h" +#include "lib/anim.h" #include "lib/lib_317f0.h" #include "data.h" #include "types.h" @@ -450,7 +449,7 @@ void lvInit(s32 stagenum) } mpSetDefaultNamesIfEmpty(); - func0002373c(); + anim0002373c(); objectivesReset(); func0f013ba0(); func0f011110(); @@ -828,7 +827,7 @@ glabel var7f1b1f44nc .NB0f162a68: /* f162a68: 0fc609dc */ jal mpSetDefaultNamesIfEmpty /* f162a6c: 00000000 */ sll $zero,$zero,0x0 -/* f162a70: 0c0092c7 */ jal func0002373c +/* f162a70: 0c0092c7 */ jal anim0002373c /* f162a74: 00000000 */ sll $zero,$zero,0x0 /* f162a78: 0fc041c4 */ jal objectivesReset /* f162a7c: 00000000 */ sll $zero,$zero,0x0 @@ -8027,7 +8026,7 @@ glabel var7f1b8ed0pf /* f16d6cc: 2401005a */ li $at,0x5a /* f16d6d0: 0fc06bc9 */ jal titleTickOld /* f16d6d4: 00000000 */ nop -/* f16d6d8: 0c0046c5 */ jal func00011d84 +/* f16d6d8: 0c0046c5 */ jal music00011d84 /* f16d6dc: 00000000 */ nop /* f16d6e0: 8e8204b4 */ lw $v0,0x4b4($s4) /* f16d6e4: 2401005a */ li $at,0x5a @@ -8038,7 +8037,7 @@ glabel var7f1b8ed0pf /* f16d6f4: 00000000 */ nop /* f16d6f8: 0fc0764c */ jal func0f01d860 /* f16d6fc: 00000000 */ nop -/* f16d700: 0c0046c5 */ jal func00011d84 +/* f16d700: 0c0046c5 */ jal music00011d84 /* f16d704: 00000000 */ nop /* f16d708: 10000089 */ b .PF0f16d930 /* f16d70c: 8fbf0044 */ lw $ra,0x44($sp) @@ -8052,7 +8051,7 @@ glabel var7f1b8ed0pf /* f16d728: 00000000 */ nop /* f16d72c: 0fc07006 */ jal menuTickAll /* f16d730: 00000000 */ nop -/* f16d734: 0c0046c5 */ jal func00011d84 +/* f16d734: 0c0046c5 */ jal music00011d84 /* f16d738: 00000000 */ nop /* f16d73c: 0fc0764c */ jal func0f01d860 /* f16d740: 00000000 */ nop @@ -8066,7 +8065,7 @@ glabel var7f1b8ed0pf /* f16d75c: 2401005c */ li $at,0x5c /* f16d760: 0fc07006 */ jal menuTickAll /* f16d764: 00000000 */ nop -/* f16d768: 0c0046c5 */ jal func00011d84 +/* f16d768: 0c0046c5 */ jal music00011d84 /* f16d76c: 00000000 */ nop /* f16d770: 0fc0764c */ jal func0f01d860 /* f16d774: 00000000 */ nop @@ -8078,7 +8077,7 @@ glabel var7f1b8ed0pf .PF0f16d78c: /* f16d78c: 14410007 */ bne $v0,$at,.PF0f16d7ac /* f16d790: 00000000 */ nop -/* f16d794: 0c0046c5 */ jal func00011d84 +/* f16d794: 0c0046c5 */ jal music00011d84 /* f16d798: 00000000 */ nop /* f16d79c: 0fc0764c */ jal func0f01d860 /* f16d7a0: 00000000 */ nop @@ -8144,7 +8143,7 @@ glabel var7f1b8ed0pf /* f16d884: 0fc078dc */ jal propsTick2 /* f16d888: 00000000 */ nop .PF0f16d88c: -/* f16d88c: 0c0046c5 */ jal func00011d84 +/* f16d88c: 0c0046c5 */ jal music00011d84 /* f16d890: 00000000 */ nop /* f16d894: 0fc0764c */ jal func0f01d860 /* f16d898: 00000000 */ nop @@ -8467,26 +8466,26 @@ void lvTick(void) if (g_Vars.stagenum == STAGE_TEST_OLD) { titleTickOld(); - func00011d84(); + music00011d84(); } if (g_Vars.stagenum == STAGE_TITLE) { titleTick(); func0f01d860(); - func00011d84(); + music00011d84(); } else if (g_Vars.stagenum == STAGE_BOOTPAKMENU) { setCurrentPlayerNum(0); menuTickAll(); - func00011d84(); + music00011d84(); func0f01d860(); pakExecuteDebugOperations(); } else if (g_Vars.stagenum == STAGE_4MBMENU) { menuTickAll(); - func00011d84(); + music00011d84(); func0f01d860(); pakExecuteDebugOperations(); } else if (g_Vars.stagenum == STAGE_CREDITS) { - func00011d84(); + music00011d84(); func0f01d860(); } else { lvUpdateCutsceneTime(); @@ -8522,7 +8521,7 @@ void lvTick(void) propsTick2(); } - func00011d84(); + music00011d84(); func0f01d860(); propsTickPadEffects(); @@ -9629,7 +9628,7 @@ glabel lvTick /* f167640: 2401005a */ addiu $at,$zero,0x5a /* f167644: 0fc06ad8 */ jal titleTickOld /* f167648: 00000000 */ sll $zero,$zero,0x0 -/* f16764c: 0c004848 */ jal func00011d84 +/* f16764c: 0c004848 */ jal music00011d84 /* f167650: 00000000 */ sll $zero,$zero,0x0 /* f167654: 8e8204b4 */ lw $v0,0x4b4($s4) /* f167658: 2401005a */ addiu $at,$zero,0x5a @@ -9640,7 +9639,7 @@ glabel lvTick /* f167668: 00000000 */ sll $zero,$zero,0x0 /* f16766c: 0fc07550 */ jal func0f01d860 /* f167670: 00000000 */ sll $zero,$zero,0x0 -/* f167674: 0c004848 */ jal func00011d84 +/* f167674: 0c004848 */ jal music00011d84 /* f167678: 00000000 */ sll $zero,$zero,0x0 /* f16767c: 10000087 */ beqz $zero,.NB0f16789c /* f167680: 8fbf0044 */ lw $ra,0x44($sp) @@ -9652,7 +9651,7 @@ glabel lvTick /* f167694: 00002025 */ or $a0,$zero,$zero /* f167698: 0fc06f0a */ jal menuTickAll /* f16769c: 00000000 */ sll $zero,$zero,0x0 -/* f1676a0: 0c004848 */ jal func00011d84 +/* f1676a0: 0c004848 */ jal music00011d84 /* f1676a4: 00000000 */ sll $zero,$zero,0x0 /* f1676a8: 0fc07550 */ jal func0f01d860 /* f1676ac: 00000000 */ sll $zero,$zero,0x0 @@ -9666,7 +9665,7 @@ glabel lvTick /* f1676c8: 2401005c */ addiu $at,$zero,0x5c /* f1676cc: 0fc06f0a */ jal menuTickAll /* f1676d0: 00000000 */ sll $zero,$zero,0x0 -/* f1676d4: 0c004848 */ jal func00011d84 +/* f1676d4: 0c004848 */ jal music00011d84 /* f1676d8: 00000000 */ sll $zero,$zero,0x0 /* f1676dc: 0fc07550 */ jal func0f01d860 /* f1676e0: 00000000 */ sll $zero,$zero,0x0 @@ -9678,7 +9677,7 @@ glabel lvTick .NB0f1676f8: /* f1676f8: 14410007 */ bne $v0,$at,.NB0f167718 /* f1676fc: 00000000 */ sll $zero,$zero,0x0 -/* f167700: 0c004848 */ jal func00011d84 +/* f167700: 0c004848 */ jal music00011d84 /* f167704: 00000000 */ sll $zero,$zero,0x0 /* f167708: 0fc07550 */ jal func0f01d860 /* f16770c: 00000000 */ sll $zero,$zero,0x0 @@ -9744,7 +9743,7 @@ glabel lvTick /* f1677f0: 0fc077cc */ jal propsTick2 /* f1677f4: 00000000 */ sll $zero,$zero,0x0 .NB0f1677f8: -/* f1677f8: 0c004848 */ jal func00011d84 +/* f1677f8: 0c004848 */ jal music00011d84 /* f1677fc: 00000000 */ sll $zero,$zero,0x0 /* f167800: 0fc07550 */ jal func0f01d860 /* f167804: 00000000 */ sll $zero,$zero,0x0 diff --git a/src/game/mainmenu.c b/src/game/mainmenu.c index d2781e912..fddd0a5a2 100644 --- a/src/game/mainmenu.c +++ b/src/game/mainmenu.c @@ -24,7 +24,7 @@ #include "game/mplayer/mplayer.h" #include "game/options.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/main.h" #include "lib/snd.h" #include "data.h" diff --git a/src/game/menu/items.c b/src/game/menu/items.c index f7b5d74bb..665d4efbe 100644 --- a/src/game/menu/items.c +++ b/src/game/menu/items.c @@ -16,7 +16,7 @@ #include "game/mplayer/mplayer.h" #include "game/options.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/main.h" #include "data.h" #include "types.h" diff --git a/src/game/mplayer/mplayer.c b/src/game/mplayer/mplayer.c index 0b938e617..be90a5bf3 100644 --- a/src/game/mplayer/mplayer.c +++ b/src/game/mplayer/mplayer.c @@ -21,7 +21,7 @@ #include "game/pak/pak.h" #include "bss.h" #include "lib/args.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/main.h" #include "lib/rng.h" #include "lib/lib_317f0.h" diff --git a/src/game/mplayer/scenarios.c b/src/game/mplayer/scenarios.c index 66f10efee..430606407 100644 --- a/src/game/mplayer/scenarios.c +++ b/src/game/mplayer/scenarios.c @@ -25,13 +25,13 @@ #include "game/pad.h" #include "game/propobj.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/snd.h" #include "lib/memory.h" #include "lib/rng.h" #include "lib/mtx.h" -#include "lib/lib_233c0.h" -#include "lib/lib_24e40.h" +#include "lib/anim.h" +#include "lib/collision.h" #include "data.h" #include "types.h" @@ -2622,7 +2622,7 @@ void scenarioKohReset(void) g_ScenarioData.koh.hillpos.x = pad.pos.x; g_ScenarioData.koh.hillpos.y = pad.pos.y; g_ScenarioData.koh.hillpos.z = pad.pos.z; - g_ScenarioData.koh.hillpos.y = func0002a36c(&g_ScenarioData.koh.hillpos, &g_ScenarioData.koh.hillrooms[0], 0, 0); + g_ScenarioData.koh.hillpos.y = cd0002a36c(&g_ScenarioData.koh.hillpos, &g_ScenarioData.koh.hillrooms[0], 0, 0); g_ScenarioData.koh.unk08 = 0; roomSetLighting(g_ScenarioData.koh.hillrooms[0], LIGHTOP_5, 0, 0, 0); } @@ -2732,7 +2732,7 @@ glabel var7f1b8950 /* f182e3c: a66c000e */ sh $t4,0xe($s3) /* f182e40: e6680024 */ swc1 $f8,0x24($s3) /* f182e44: e66a0028 */ swc1 $f10,0x28($s3) -/* f182e48: 0c00a71b */ jal func0002a36c +/* f182e48: 0c00a71b */ jal cd0002a36c /* f182e4c: e672002c */ swc1 $f18,0x2c($s3) /* f182e50: e6600028 */ swc1 $f0,0x28($s3) /* f182e54: 8664000e */ lh $a0,0xe($s3) @@ -3424,7 +3424,7 @@ glabel var7f1b8950 /* f181e38: a66c000e */ sh $t4,0xe($s3) /* f181e3c: e6680024 */ swc1 $f8,0x24($s3) /* f181e40: e66a0028 */ swc1 $f10,0x28($s3) -/* f181e44: 0c00a8db */ jal func0002a36c +/* f181e44: 0c00a8db */ jal cd0002a36c /* f181e48: e672002c */ swc1 $f18,0x2c($s3) /* f181e4c: e6600028 */ swc1 $f0,0x28($s3) /* f181e50: 8664000e */ lh $a0,0xe($s3) diff --git a/src/game/mplayer/setup.c b/src/game/mplayer/setup.c index f7e004b32..5292ce53e 100644 --- a/src/game/mplayer/setup.c +++ b/src/game/mplayer/setup.c @@ -17,7 +17,7 @@ #include "game/options.h" #include "bss.h" #include "lib/snd.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/rng.h" #include "data.h" #include "types.h" diff --git a/src/game/music.c b/src/game/music.c index 6daf266c3..076dc414e 100644 --- a/src/game/music.c +++ b/src/game/music.c @@ -7,7 +7,7 @@ #include "game/game_176080.h" #include "bss.h" #include "lib/snd.h" -#include "lib/lib_11420.h" +#include "lib/music.h" #include "data.h" #include "types.h" @@ -244,7 +244,7 @@ void func0f16d3d0(void) var800840c4 = 1; - func0001190c(); + music0001190c(); } #if VERSION >= VERSION_NTSC_1_0 diff --git a/src/game/nbomb.c b/src/game/nbomb.c index f038d1aca..db41b9640 100644 --- a/src/game/nbomb.c +++ b/src/game/nbomb.c @@ -16,7 +16,7 @@ #include "game/file.h" #include "game/gfxmemory.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/snd.h" #include "lib/rng.h" #include "lib/mtx.h" diff --git a/src/game/padhalllv.c b/src/game/padhalllv.c index d322ad915..69fe43be7 100644 --- a/src/game/padhalllv.c +++ b/src/game/padhalllv.c @@ -6,7 +6,7 @@ #include "game/padhalllv.h" #include "bss.h" #include "lib/rng.h" -#include "lib/lib_233c0.h" +#include "lib/anim.h" #include "lib/libc/ll.h" #include "data.h" #include "types.h" @@ -228,7 +228,7 @@ glabel waypointFindClosestToPos /* f114538: 8fa503a4 */ lw $a1,0x3a4($sp) /* f11453c: 02003025 */ or $a2,$s0,$zero /* f114540: 02a03825 */ or $a3,$s5,$zero -/* f114544: 0c00b70f */ jal hasLineOfSight +/* f114544: 0c00b70f */ jal cdHasLineOfSight /* f114548: a7af010c */ sh $t7,0x10c($sp) /* f11454c: 10400023 */ beqz $v0,.L0f1145dc /* f114550: 02537021 */ addu $t6,$s2,$s3 @@ -240,7 +240,7 @@ glabel waypointFindClosestToPos /* f114568: 02a03825 */ or $a3,$s5,$zero /* f11456c: afbe0014 */ sw $s8,0x14($sp) /* f114570: e7b40018 */ swc1 $f20,0x18($sp) -/* f114574: 0c00b62e */ jal func0002d8b8 +/* f114574: 0c00b62e */ jal cd0002d8b8 /* f114578: e7b4001c */ swc1 $f20,0x1c($sp) /* f11457c: 2401ffff */ addiu $at,$zero,-1 /* f114580: 14410003 */ bne $v0,$at,.L0f114590 @@ -260,7 +260,7 @@ glabel waypointFindClosestToPos /* f1145b4: 24e73a80 */ addiu $a3,$a3,%lo(var7f1b3a80) /* f1145b8: 004d2821 */ addu $a1,$v0,$t5 /* f1145bc: 004c2021 */ addu $a0,$v0,$t4 -/* f1145c0: 0c009393 */ jal func00024e4c +/* f1145c0: 0c009393 */ jal cd00024e4c /* f1145c4: 240601b9 */ addiu $a2,$zero,0x1b9 /* f1145c8: 10000006 */ b .L0f1145e4 /* f1145cc: 26940001 */ addiu $s4,$s4,0x1 @@ -359,7 +359,7 @@ glabel waypointFindClosestToPos /* f114724: 46065100 */ add.s $f4,$f10,$f6 /* f114728: afb80014 */ sw $t8,0x14($sp) /* f11472c: afae0010 */ sw $t6,0x10($sp) -/* f114730: 0c00b610 */ jal func0002d840 +/* f114730: 0c00b610 */ jal cd0002d840 /* f114734: e7a40094 */ swc1 $f4,0x94($sp) /* f114738: 10400004 */ beqz $v0,.L0f11474c /* f11473c: c7b00098 */ lwc1 $f16,0x98($sp) @@ -385,7 +385,7 @@ glabel waypointFindClosestToPos /* f114788: 46043201 */ sub.s $f8,$f6,$f4 /* f11478c: afa90014 */ sw $t1,0x14($sp) /* f114790: afaa0010 */ sw $t2,0x10($sp) -/* f114794: 0c00b610 */ jal func0002d840 +/* f114794: 0c00b610 */ jal cd0002d840 /* f114798: e7a80094 */ swc1 $f8,0x94($sp) /* f11479c: 50400005 */ beqzl $v0,.L0f1147b4 /* f1147a0: 26940001 */ addiu $s4,$s4,0x1 diff --git a/src/game/prop.c b/src/game/prop.c index db6e4fd8b..1e46c99b3 100644 --- a/src/game/prop.c +++ b/src/game/prop.c @@ -32,7 +32,7 @@ #include "lib/snd.h" #include "lib/rng.h" #include "lib/mtx.h" -#include "lib/lib_233c0.h" +#include "lib/anim.h" #include "lib/lib_317f0.h" #include "data.h" #include "types.h" @@ -1174,7 +1174,7 @@ void handInflictCloseRangeDamage(s32 handnum, struct gset *gset, bool arg2) someval = 0; } - if (func0002dc18(&playerprop->pos, playerprop->rooms, &prop->pos, someval)) { + if (cd0002dc18(&playerprop->pos, playerprop->rooms, &prop->pos, someval)) { if (isbreakableobj) { struct model *model = obj->model; struct coord spd8; @@ -5349,9 +5349,9 @@ f32 func0f06438c(struct prop *prop, struct coord *arg1, f32 *arg2, f32 *arg3, f3 currentPlayerSetPerimEnabled(playerprop, false); if (arg5) { - lVar3 = func0002db98(&playerprop->pos, playerprop->rooms, &prop->pos, 0x32, 16); + lVar3 = cd0002db98(&playerprop->pos, playerprop->rooms, &prop->pos, 0x32, 16); } else { - lVar3 = func0002db98(&playerprop->pos, playerprop->rooms, &prop->pos, 0x33, 16); + lVar3 = cd0002db98(&playerprop->pos, playerprop->rooms, &prop->pos, 0x33, 16); } if (lVar3) { @@ -6019,7 +6019,7 @@ void func0f065e98(struct coord *pos, s16 *rooms, struct coord *pos2, s16 *rooms2 } if (ptr) { - s32 room = func0002a400(pos2, ptr); + s32 room = cd0002a400(pos2, ptr); if (room > 0) { rooms2[0] = room; diff --git a/src/game/propobj.c b/src/game/propobj.c index c7fbe7370..bd3c89931 100644 --- a/src/game/propobj.c +++ b/src/game/propobj.c @@ -60,7 +60,7 @@ #include "game/shards.h" #include "bss.h" #include "tvcmds.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/dma.h" #include "lib/main.h" #include "lib/snd.h" @@ -68,8 +68,8 @@ #include "lib/model.h" #include "lib/rng.h" #include "lib/mtx.h" -#include "lib/lib_233c0.h" -#include "lib/lib_24e40.h" +#include "lib/anim.h" +#include "lib/collision.h" #include "lib/lib_317f0.h" #include "data.h" #include "types.h" @@ -5323,7 +5323,7 @@ glabel func0f06a650 /* f06a67c: 8fa50054 */ lw $a1,0x54($sp) /* f06a680: 27a6003c */ addiu $a2,$sp,0x3c /* f06a684: 26070058 */ addiu $a3,$s0,0x58 -/* f06a688: 0c00a910 */ jal func0002a440 +/* f06a688: 0c00a910 */ jal cd0002a440 /* f06a68c: afa00010 */ sw $zero,0x10($sp) /* f06a690: 1840001d */ blez $v0,.L0f06a708 /* f06a694: a7a20042 */ sh $v0,0x42($sp) @@ -5384,7 +5384,7 @@ glabel func0f06a650 /* f0698e4: 8fa40044 */ lw $a0,0x44($sp) /* f0698e8: 8fa5004c */ lw $a1,0x4c($sp) /* f0698ec: 27a60034 */ addiu $a2,$sp,0x34 -/* f0698f0: 0c00ae22 */ jal func0002a440 +/* f0698f0: 0c00ae22 */ jal cd0002a440 /* f0698f4: 26070058 */ addiu $a3,$s0,0x58 /* f0698f8: 1840001d */ blez $v0,.NB0f069970 /* f0698fc: a7a2003a */ sh $v0,0x3a($sp) @@ -5629,7 +5629,7 @@ glabel var7f1aa200 /* f06a9f0: 27a50060 */ addiu $a1,$sp,0x60 /* f06a9f4: 27a60058 */ addiu $a2,$sp,0x58 /* f06a9f8: afa00010 */ sw $zero,0x10($sp) -/* f06a9fc: 0c00a910 */ jal func0002a440 +/* f06a9fc: 0c00a910 */ jal cd0002a440 /* f06aa00: 24e70058 */ addiu $a3,$a3,0x58 /* f06aa04: 18400047 */ blez $v0,.L0f06ab24 /* f06aa08: c7ae00bc */ lwc1 $f14,0xbc($sp) @@ -5919,7 +5919,7 @@ glabel var7f1aa200 /* f069c54: 27a400a8 */ addiu $a0,$sp,0xa8 /* f069c58: 27a50058 */ addiu $a1,$sp,0x58 /* f069c5c: 27a60050 */ addiu $a2,$sp,0x50 -/* f069c60: 0c00ae22 */ jal func0002a440 +/* f069c60: 0c00ae22 */ jal cd0002a440 /* f069c64: 24e70058 */ addiu $a3,$a3,0x58 /* f069c68: 18400047 */ blez $v0,.NB0f069d88 /* f069c6c: c7ae00b4 */ lwc1 $f14,0xb4($sp) @@ -6383,14 +6383,14 @@ glabel func0f06b488 /* f06b4a0: afa60050 */ sw $a2,0x50($sp) /* f06b4a4: 00c02825 */ or $a1,$a2,$zero /* f06b4a8: 00e08025 */ or $s0,$a3,$zero -/* f06b4ac: 0c00b7b6 */ jal func0002ded8 +/* f06b4ac: 0c00b7b6 */ jal cd0002ded8 /* f06b4b0: 8fa60048 */ lw $a2,0x48($sp) /* f06b4b4: 14400050 */ bnez $v0,.L0f06b5f8 /* f06b4b8: 27a4003c */ addiu $a0,$sp,0x3c /* f06b4bc: 3c077f1b */ lui $a3,%hi(var7f1a9f7c) /* f06b4c0: 24e79f7c */ addiu $a3,$a3,%lo(var7f1a9f7c) /* f06b4c4: 27a50030 */ addiu $a1,$sp,0x30 -/* f06b4c8: 0c009393 */ jal func00024e4c +/* f06b4c8: 0c009393 */ jal cd00024e4c /* f06b4cc: 24060b5d */ addiu $a2,$zero,0xb5e /* f06b4d0: 3c067f1b */ lui $a2,%hi(var7f1a9f88) /* f06b4d4: 24c69f88 */ addiu $a2,$a2,%lo(var7f1a9f88) @@ -6490,14 +6490,14 @@ glabel func0f06b488 /* f06b4a0: afa60050 */ sw $a2,0x50($sp) /* f06b4a4: 00c02825 */ or $a1,$a2,$zero /* f06b4a8: 00e08025 */ or $s0,$a3,$zero -/* f06b4ac: 0c00b7b6 */ jal func0002ded8 +/* f06b4ac: 0c00b7b6 */ jal cd0002ded8 /* f06b4b0: 8fa60048 */ lw $a2,0x48($sp) /* f06b4b4: 14400050 */ bnez $v0,.L0f06b5f8 /* f06b4b8: 27a4003c */ addiu $a0,$sp,0x3c /* f06b4bc: 3c077f1b */ lui $a3,%hi(var7f1a9f7c) /* f06b4c0: 24e79f7c */ addiu $a3,$a3,%lo(var7f1a9f7c) /* f06b4c4: 27a50030 */ addiu $a1,$sp,0x30 -/* f06b4c8: 0c009393 */ jal func00024e4c +/* f06b4c8: 0c009393 */ jal cd00024e4c /* f06b4cc: 24060b5d */ addiu $a2,$zero,0xb5d /* f06b4d0: 3c067f1b */ lui $a2,%hi(var7f1a9f88) /* f06b4d4: 24c69f88 */ addiu $a2,$a2,%lo(var7f1a9f88) @@ -8388,7 +8388,7 @@ glabel var7f1aa268 /* f06cf98: 27a500a0 */ addiu $a1,$sp,0xa0 /* f06cf9c: 27a601c4 */ addiu $a2,$sp,0x1c4 /* f06cfa0: 24070020 */ addiu $a3,$zero,0x20 -/* f06cfa4: 0c00b784 */ jal func0002de10 +/* f06cfa4: 0c00b784 */ jal cd0002de10 /* f06cfa8: a7ad00a0 */ sh $t5,0xa0($sp) /* f06cfac: 14400008 */ bnez $v0,.L0f06cfd0 /* f06cfb0: 02602025 */ or $a0,$s3,$zero @@ -8397,7 +8397,7 @@ glabel var7f1aa268 /* f06cfbc: 24c69f94 */ addiu $a2,$a2,%lo(var7f1a9f94) /* f06cfc0: 0c0093af */ jal cdGetPos /* f06cfc4: 240510a1 */ addiu $a1,$zero,0x10a2 -/* f06cfc8: 0c0093ba */ jal func00024ee8 +/* f06cfc8: 0c0093ba */ jal cd00024ee8 /* f06cfcc: 27a401dc */ addiu $a0,$sp,0x1dc .L0f06cfd0: /* f06cfd0: 1200006f */ beqz $s0,.L0f06d190 @@ -8835,7 +8835,7 @@ glabel var7f1aa268 /* f06cf98: 27a500a0 */ addiu $a1,$sp,0xa0 /* f06cf9c: 27a601c4 */ addiu $a2,$sp,0x1c4 /* f06cfa0: 24070020 */ addiu $a3,$zero,0x20 -/* f06cfa4: 0c00b784 */ jal func0002de10 +/* f06cfa4: 0c00b784 */ jal cd0002de10 /* f06cfa8: a7ad00a0 */ sh $t5,0xa0($sp) /* f06cfac: 14400008 */ bnez $v0,.L0f06cfd0 /* f06cfb0: 02602025 */ or $a0,$s3,$zero @@ -8844,7 +8844,7 @@ glabel var7f1aa268 /* f06cfbc: 24c69f94 */ addiu $a2,$a2,%lo(var7f1a9f94) /* f06cfc0: 0c0093af */ jal cdGetPos /* f06cfc4: 240510a1 */ addiu $a1,$zero,0x10a1 -/* f06cfc8: 0c0093ba */ jal func00024ee8 +/* f06cfc8: 0c0093ba */ jal cd00024ee8 /* f06cfcc: 27a401dc */ addiu $a0,$sp,0x1dc .L0f06cfd0: /* f06cfd0: 1200006f */ beqz $s0,.L0f06d190 @@ -9170,7 +9170,7 @@ glabel var7f1aa26c /* f06d460: afa5003c */ sw $a1,0x3c($sp) /* f06d464: e7a200a0 */ swc1 $f2,0xa0($sp) /* f06d468: e7a0001c */ swc1 $f0,0x1c($sp) -/* f06d46c: 0c00b6b2 */ jal func0002dac8 +/* f06d46c: 0c00b6b2 */ jal cd0002dac8 /* f06d470: e7a00020 */ swc1 $f0,0x20($sp) /* f06d474: 10400020 */ beqz $v0,.L0f06d4f8 /* f06d478: 8fa400a8 */ lw $a0,0xa8($sp) @@ -9216,7 +9216,7 @@ glabel var7f1aa26c /* f06d508: 154000fa */ bnez $t2,.L0f06d8f4 /* f06d50c: 24061121 */ addiu $a2,$zero,0x1122 /* f06d510: 3c077f1b */ lui $a3,%hi(var7f1a9fa0) -/* f06d514: 0c009393 */ jal func00024e4c +/* f06d514: 0c009393 */ jal cd00024e4c /* f06d518: 24e79fa0 */ addiu $a3,$a3,%lo(var7f1a9fa0) /* f06d51c: c7a40060 */ lwc1 $f4,0x60($sp) /* f06d520: c7a6006c */ lwc1 $f6,0x6c($sp) @@ -9394,7 +9394,7 @@ glabel var7f1aa26c /* f06d78c: 00000000 */ nop /* f06d790: e62a0008 */ swc1 $f10,0x8($s1) .L0f06d794: -/* f06d794: 0c0093a6 */ jal func00024e98 +/* f06d794: 0c0093a6 */ jal cd00024e98 /* f06d798: 00000000 */ nop /* f06d79c: 3c017f1b */ lui $at,%hi(var7f1aa26c) /* f06d7a0: c430a26c */ lwc1 $f16,%lo(var7f1aa26c)($at) @@ -9422,7 +9422,7 @@ glabel var7f1aa26c /* f06d7f8: afab0010 */ sw $t3,0x10($sp) /* f06d7fc: e7aa001c */ swc1 $f10,0x1c($sp) /* f06d800: e7a80018 */ swc1 $f8,0x18($sp) -/* f06d804: 0c00b694 */ jal func0002da50 +/* f06d804: 0c00b694 */ jal cd0002da50 /* f06d808: e7a60054 */ swc1 $f6,0x54($sp) /* f06d80c: 10400024 */ beqz $v0,.L0f06d8a0 /* f06d810: 8fa400a8 */ lw $a0,0xa8($sp) @@ -9561,7 +9561,7 @@ glabel var7f1aa26c /* f06d460: afa5003c */ sw $a1,0x3c($sp) /* f06d464: e7a200a0 */ swc1 $f2,0xa0($sp) /* f06d468: e7a0001c */ swc1 $f0,0x1c($sp) -/* f06d46c: 0c00b6b2 */ jal func0002dac8 +/* f06d46c: 0c00b6b2 */ jal cd0002dac8 /* f06d470: e7a00020 */ swc1 $f0,0x20($sp) /* f06d474: 10400020 */ beqz $v0,.L0f06d4f8 /* f06d478: 8fa400a8 */ lw $a0,0xa8($sp) @@ -9607,7 +9607,7 @@ glabel var7f1aa26c /* f06d508: 154000fa */ bnez $t2,.L0f06d8f4 /* f06d50c: 24061121 */ addiu $a2,$zero,0x1121 /* f06d510: 3c077f1b */ lui $a3,%hi(var7f1a9fa0) -/* f06d514: 0c009393 */ jal func00024e4c +/* f06d514: 0c009393 */ jal cd00024e4c /* f06d518: 24e79fa0 */ addiu $a3,$a3,%lo(var7f1a9fa0) /* f06d51c: c7a40060 */ lwc1 $f4,0x60($sp) /* f06d520: c7a6006c */ lwc1 $f6,0x6c($sp) @@ -9785,7 +9785,7 @@ glabel var7f1aa26c /* f06d78c: 00000000 */ nop /* f06d790: e62a0008 */ swc1 $f10,0x8($s1) .L0f06d794: -/* f06d794: 0c0093a6 */ jal func00024e98 +/* f06d794: 0c0093a6 */ jal cd00024e98 /* f06d798: 00000000 */ nop /* f06d79c: 3c017f1b */ lui $at,%hi(var7f1aa26c) /* f06d7a0: c430a26c */ lwc1 $f16,%lo(var7f1aa26c)($at) @@ -9813,7 +9813,7 @@ glabel var7f1aa26c /* f06d7f8: afab0010 */ sw $t3,0x10($sp) /* f06d7fc: e7aa001c */ swc1 $f10,0x1c($sp) /* f06d800: e7a80018 */ swc1 $f8,0x18($sp) -/* f06d804: 0c00b694 */ jal func0002da50 +/* f06d804: 0c00b694 */ jal cd0002da50 /* f06d808: e7a60054 */ swc1 $f6,0x54($sp) /* f06d80c: 10400024 */ beqz $v0,.L0f06d8a0 /* f06d810: 8fa400a8 */ lw $a0,0xa8($sp) @@ -18071,14 +18071,14 @@ glabel var7f1aa31c /* f072420: 27a60450 */ addiu $a2,$sp,0x450 /* f072424: 27a70440 */ addiu $a3,$sp,0x440 /* f072428: e7a00018 */ swc1 $f0,0x18($sp) -/* f07242c: 0c00b62e */ jal func0002d8b8 +/* f07242c: 0c00b62e */ jal cd0002d8b8 /* f072430: e7a0001c */ swc1 $f0,0x1c($sp) /* f072434: 2401ffff */ addiu $at,$zero,-1 /* f072438: 1041000e */ beq $v0,$at,.L0f072474 /* f07243c: afa20484 */ sw $v0,0x484($sp) /* f072440: 1440000c */ bnez $v0,.L0f072474 /* f072444: 8fa40038 */ lw $a0,0x38($sp) -/* f072448: 0c0094c5 */ jal func00025314 +/* f072448: 0c0094c5 */ jal cd00025314 /* f07244c: 27a50450 */ addiu $a1,$sp,0x450 /* f072450: 10000009 */ b .L0f072478 /* f072454: 8fb90484 */ lw $t9,0x484($sp) @@ -18120,12 +18120,12 @@ glabel var7f1aa31c /* f0724d8: 27a50450 */ addiu $a1,$sp,0x450 /* f0724dc: 8fa60100 */ lw $a2,0x100($sp) /* f0724e0: 27a70440 */ addiu $a3,$sp,0x440 -/* f0724e4: 0c00a9bf */ jal func0002a6fc +/* f0724e4: 0c00a9bf */ jal cd0002a6fc /* f0724e8: 24840008 */ addiu $a0,$a0,0x8 /* f0724ec: 10000004 */ b .L0f072500 /* f0724f0: afa20484 */ sw $v0,0x484($sp) .L0f0724f4: -/* f0724f4: 0c00bc0b */ jal func0002f02c +/* f0724f4: 0c00bc0b */ jal cd0002f02c /* f0724f8: 2406003f */ addiu $a2,$zero,0x3f /* f0724fc: afa20484 */ sw $v0,0x484($sp) .L0f072500: @@ -18357,10 +18357,10 @@ glabel var7f1aa320 /* f0728d8: 24e79fac */ addiu $a3,$a3,%lo(var7f1a9fac) /* f0728dc: 27a40070 */ addiu $a0,$sp,0x70 /* f0728e0: 27a50064 */ addiu $a1,$sp,0x64 -/* f0728e4: 0c009393 */ jal func00024e4c +/* f0728e4: 0c009393 */ jal cd00024e4c /* f0728e8: 24061cbb */ addiu $a2,$zero,0x1cbc /* f0728ec: 27a40058 */ addiu $a0,$sp,0x58 -/* f0728f0: 0c0094d9 */ jal func00025364 +/* f0728f0: 0c0094d9 */ jal cd00025364 /* f0728f4: 27a5004c */ addiu $a1,$sp,0x4c /* f0728f8: 1040000e */ beqz $v0,.L0f072934 /* f0728fc: 8fa80098 */ lw $t0,0x98($sp) @@ -18563,10 +18563,10 @@ glabel var7f1aa320 /* f0728d8: 24e79fac */ addiu $a3,$a3,%lo(var7f1a9fac) /* f0728dc: 27a40070 */ addiu $a0,$sp,0x70 /* f0728e0: 27a50064 */ addiu $a1,$sp,0x64 -/* f0728e4: 0c009393 */ jal func00024e4c +/* f0728e4: 0c009393 */ jal cd00024e4c /* f0728e8: 24061cbb */ addiu $a2,$zero,0x1cbb /* f0728ec: 27a40058 */ addiu $a0,$sp,0x58 -/* f0728f0: 0c0094d9 */ jal func00025364 +/* f0728f0: 0c0094d9 */ jal cd00025364 /* f0728f4: 27a5004c */ addiu $a1,$sp,0x4c /* f0728f8: 1040000e */ beqz $v0,.L0f072934 /* f0728fc: 8fa80098 */ lw $t0,0x98($sp) @@ -20431,7 +20431,7 @@ glabel var7f1aa3d0 /* f0739e8: afae0014 */ sw $t6,0x14($sp) /* f0739ec: afad0010 */ sw $t5,0x10($sp) /* f0739f0: 24460008 */ addiu $a2,$v0,0x8 -/* f0739f4: 0c00b70f */ jal hasLineOfSight +/* f0739f4: 0c00b70f */ jal cdHasLineOfSight /* f0739f8: 24470028 */ addiu $a3,$v0,0x28 /* f0739fc: 1040000b */ beqz $v0,.L0f073a2c /* f073a00: 00000000 */ nop @@ -20888,7 +20888,7 @@ glabel var7f1aa3d0 /* f0739e8: afae0014 */ sw $t6,0x14($sp) /* f0739ec: afad0010 */ sw $t5,0x10($sp) /* f0739f0: 24460008 */ addiu $a2,$v0,0x8 -/* f0739f4: 0c00b70f */ jal hasLineOfSight +/* f0739f4: 0c00b70f */ jal cdHasLineOfSight /* f0739f8: 24470028 */ addiu $a3,$v0,0x28 /* f0739fc: 1040000b */ beqz $v0,.L0f073a2c /* f073a00: 00000000 */ nop @@ -21625,7 +21625,7 @@ glabel var7f1ab6dcpf /* f07461c: 00000000 */ nop /* f074620: 450201a3 */ bc1fl .PF0f074cb0 /* f074624: 8fab0600 */ lw $t3,0x600($sp) -/* f074628: 0c009319 */ jal func00025364 +/* f074628: 0c009319 */ jal cd00025364 /* f07462c: e7b0058c */ swc1 $f16,0x58c($sp) /* f074630: 1040000e */ beqz $v0,.PF0f07466c /* f074634: c7b0058c */ lwc1 $f16,0x58c($sp) @@ -21648,7 +21648,7 @@ glabel var7f1ab6dcpf /* f074674: 27a403d0 */ addiu $a0,$sp,0x3d0 /* f074678: 27a503c4 */ addiu $a1,$sp,0x3c4 /* f07467c: 240620a8 */ li $a2,0x20a8 -/* f074680: 0c0091d3 */ jal func00024e4c +/* f074680: 0c0091d3 */ jal cd00024e4c /* f074684: e7b0058c */ swc1 $f16,0x58c($sp) /* f074688: c7aa03d0 */ lwc1 $f10,0x3d0($sp) /* f07468c: c7a803c4 */ lwc1 $f8,0x3c4($sp) @@ -21731,7 +21731,7 @@ glabel var7f1ab6dcpf /* f0747b0: 27a503dc */ addiu $a1,$sp,0x3dc /* f0747b4: 240620ce */ li $a2,0x20ce /* f0747b8: e60600dc */ swc1 $f6,0xdc($s0) -/* f0747bc: 0c0091d3 */ jal func00024e4c +/* f0747bc: 0c0091d3 */ jal cd00024e4c /* f0747c0: e7b0058c */ swc1 $f16,0x58c($sp) /* f0747c4: c7aa03e4 */ lwc1 $f10,0x3e4($sp) /* f0747c8: c7a803f0 */ lwc1 $f8,0x3f0($sp) @@ -23627,7 +23627,7 @@ glabel var7f1ab6dcpf /* f07636c: afa70074 */ sw $a3,0x74($sp) /* f076370: afa90014 */ sw $t1,0x14($sp) /* f076374: afb90010 */ sw $t9,0x10($sp) -/* f076378: 0c00a7b9 */ jal func0002a5e4 +/* f076378: 0c00a7b9 */ jal cd0002a5e4 /* f07637c: e7aa05b4 */ swc1 $f10,0x5b4($sp) /* f076380: 00021c00 */ sll $v1,$v0,0x10 /* f076384: 1840002e */ blez $v0,.PF0f076440 @@ -23645,7 +23645,7 @@ glabel var7f1ab6dcpf /* f0763b4: 45020023 */ bc1fl .PF0f076444 /* f0763b8: 26440008 */ addiu $a0,$s2,0x8 /* f0763bc: afad0010 */ sw $t5,0x10($sp) -/* f0763c0: 0c00b526 */ jal func0002db98 +/* f0763c0: 0c00b526 */ jal cd0002db98 /* f0763c4: a7b8038e */ sh $t8,0x38e($sp) /* f0763c8: 1440001d */ bnez $v0,.PF0f076440 /* f0763cc: 87a3038e */ lh $v1,0x38e($sp) @@ -23686,7 +23686,7 @@ glabel var7f1ab6dcpf /* f076450: 8fa5006c */ lw $a1,0x6c($sp) /* f076454: 27a60390 */ addiu $a2,$sp,0x390 /* f076458: 8fa70074 */ lw $a3,0x74($sp) -/* f07645c: 0c00a799 */ jal func0002a564 +/* f07645c: 0c00a799 */ jal cd0002a564 /* f076460: afa00014 */ sw $zero,0x14($sp) /* f076464: 00021c00 */ sll $v1,$v0,0x10 /* f076468: 00034c03 */ sra $t1,$v1,0x10 @@ -23702,7 +23702,7 @@ glabel var7f1ab6dcpf /* f076490: ae0b0000 */ sw $t3,0x0($s0) /* f076494: a7a9038e */ sh $t1,0x38e($sp) /* f076498: 27a405c8 */ addiu $a0,$sp,0x5c8 -/* f07649c: 0c00a740 */ jal func0002a400 +/* f07649c: 0c00a740 */ jal cd0002a400 /* f0764a0: 27a505b8 */ addiu $a1,$sp,0x5b8 /* f0764a4: 18400004 */ blez $v0,.PF0f0764b8 /* f0764a8: 87a3038e */ lh $v1,0x38e($sp) @@ -23729,7 +23729,7 @@ glabel var7f1ab6dcpf /* f0764f8: 8fa5006c */ lw $a1,0x6c($sp) /* f0764fc: 27a60390 */ addiu $a2,$sp,0x390 /* f076500: 8fa70074 */ lw $a3,0x74($sp) -/* f076504: 0c00a750 */ jal func0002a440 +/* f076504: 0c00a750 */ jal cd0002a440 /* f076508: afa00010 */ sw $zero,0x10($sp) /* f07650c: 00021c00 */ sll $v1,$v0,0x10 /* f076510: 0003cc03 */ sra $t9,$v1,0x10 @@ -24481,7 +24481,7 @@ glabel var7f1ab6dcpf /* f076fe8: c6440010 */ lwc1 $f4,0x10($s2) /* f076fec: afa70074 */ sw $a3,0x74($sp) /* f076ff0: afad0010 */ sw $t5,0x10($sp) -/* f076ff4: 0c00a774 */ jal func0002a4d0 +/* f076ff4: 0c00a774 */ jal cd0002a4d0 /* f076ff8: e7a405b4 */ swc1 $f4,0x5b4($sp) /* f076ffc: 00021c00 */ sll $v1,$v0,0x10 /* f077000: 1840000b */ blez $v0,.PF0f077030 @@ -24492,7 +24492,7 @@ glabel var7f1ab6dcpf /* f077014: 27a505b8 */ addiu $a1,$sp,0x5b8 /* f077018: 27a605ac */ addiu $a2,$sp,0x5ac /* f07701c: 24070021 */ li $a3,0x21 -/* f077020: 0c00b526 */ jal func0002db98 +/* f077020: 0c00b526 */ jal cd0002db98 /* f077024: a7aa00a2 */ sh $t2,0xa2($sp) /* f077028: 1040000b */ beqz $v0,.PF0f077058 /* f07702c: 87a300a2 */ lh $v1,0xa2($sp) @@ -24502,7 +24502,7 @@ glabel var7f1ab6dcpf /* f077038: 26440008 */ addiu $a0,$s2,0x8 /* f07703c: 8fa5006c */ lw $a1,0x6c($sp) /* f077040: 27a600a4 */ addiu $a2,$sp,0xa4 -/* f077044: 0c00a750 */ jal func0002a440 +/* f077044: 0c00a750 */ jal cd0002a440 /* f077048: 8fa70074 */ lw $a3,0x74($sp) /* f07704c: 00021c00 */ sll $v1,$v0,0x10 /* f077050: 00036403 */ sra $t4,$v1,0x10 @@ -24525,7 +24525,7 @@ glabel var7f1ab6dcpf /* f077090: 8fa40070 */ lw $a0,0x70($sp) /* f077094: 8fa5006c */ lw $a1,0x6c($sp) /* f077098: 27a600a4 */ addiu $a2,$sp,0xa4 -/* f07709c: 0c00a750 */ jal func0002a440 +/* f07709c: 0c00a750 */ jal cd0002a440 /* f0770a0: 8fa70074 */ lw $a3,0x74($sp) /* f0770a4: 00021c00 */ sll $v1,$v0,0x10 /* f0770a8: 00034c03 */ sra $t1,$v1,0x10 @@ -25163,7 +25163,7 @@ glabel var7f1aa438 /* f074398: 00000000 */ nop /* f07439c: 450201a3 */ bc1fl .L0f074a2c /* f0743a0: 8fab0600 */ lw $t3,0x600($sp) -/* f0743a4: 0c0094d9 */ jal func00025364 +/* f0743a4: 0c0094d9 */ jal cd00025364 /* f0743a8: e7b0058c */ swc1 $f16,0x58c($sp) /* f0743ac: 1040000e */ beqz $v0,.L0f0743e8 /* f0743b0: c7b0058c */ lwc1 $f16,0x58c($sp) @@ -25186,7 +25186,7 @@ glabel var7f1aa438 /* f0743f0: 27a403d0 */ addiu $a0,$sp,0x3d0 /* f0743f4: 27a503c4 */ addiu $a1,$sp,0x3c4 /* f0743f8: 24062093 */ addiu $a2,$zero,0x2093 -/* f0743fc: 0c009393 */ jal func00024e4c +/* f0743fc: 0c009393 */ jal cd00024e4c /* f074400: e7b0058c */ swc1 $f16,0x58c($sp) /* f074404: c7a803d0 */ lwc1 $f8,0x3d0($sp) /* f074408: c7a603c4 */ lwc1 $f6,0x3c4($sp) @@ -25269,7 +25269,7 @@ glabel var7f1aa438 /* f07452c: 27a503dc */ addiu $a1,$sp,0x3dc /* f074530: 240620b9 */ addiu $a2,$zero,0x20b9 /* f074534: e60400dc */ swc1 $f4,0xdc($s0) -/* f074538: 0c009393 */ jal func00024e4c +/* f074538: 0c009393 */ jal cd00024e4c /* f07453c: e7b0058c */ swc1 $f16,0x58c($sp) /* f074540: c7a803e4 */ lwc1 $f8,0x3e4($sp) /* f074544: c7a603f0 */ lwc1 $f6,0x3f0($sp) @@ -27165,7 +27165,7 @@ glabel var7f1aa438 /* f0760e8: afa70074 */ sw $a3,0x74($sp) /* f0760ec: afa90014 */ sw $t1,0x14($sp) /* f0760f0: afb90010 */ sw $t9,0x10($sp) -/* f0760f4: 0c00a979 */ jal func0002a5e4 +/* f0760f4: 0c00a979 */ jal cd0002a5e4 /* f0760f8: e7a805b4 */ swc1 $f8,0x5b4($sp) /* f0760fc: 00021c00 */ sll $v1,$v0,0x10 /* f076100: 1840002e */ blez $v0,.L0f0761bc @@ -27183,7 +27183,7 @@ glabel var7f1aa438 /* f076130: 45020023 */ bc1fl .L0f0761c0 /* f076134: 26440008 */ addiu $a0,$s2,0x8 /* f076138: afad0010 */ sw $t5,0x10($sp) -/* f07613c: 0c00b6e6 */ jal func0002db98 +/* f07613c: 0c00b6e6 */ jal cd0002db98 /* f076140: a7b8038e */ sh $t8,0x38e($sp) /* f076144: 1440001d */ bnez $v0,.L0f0761bc /* f076148: 87a3038e */ lh $v1,0x38e($sp) @@ -27224,7 +27224,7 @@ glabel var7f1aa438 /* f0761cc: 8fa5006c */ lw $a1,0x6c($sp) /* f0761d0: 27a60390 */ addiu $a2,$sp,0x390 /* f0761d4: 8fa70074 */ lw $a3,0x74($sp) -/* f0761d8: 0c00a959 */ jal func0002a564 +/* f0761d8: 0c00a959 */ jal cd0002a564 /* f0761dc: afa00014 */ sw $zero,0x14($sp) /* f0761e0: 00021c00 */ sll $v1,$v0,0x10 /* f0761e4: 00034c03 */ sra $t1,$v1,0x10 @@ -27240,7 +27240,7 @@ glabel var7f1aa438 /* f07620c: ae0b0000 */ sw $t3,0x0($s0) /* f076210: a7a9038e */ sh $t1,0x38e($sp) /* f076214: 27a405c8 */ addiu $a0,$sp,0x5c8 -/* f076218: 0c00a900 */ jal func0002a400 +/* f076218: 0c00a900 */ jal cd0002a400 /* f07621c: 27a505b8 */ addiu $a1,$sp,0x5b8 /* f076220: 18400004 */ blez $v0,.L0f076234 /* f076224: 87a3038e */ lh $v1,0x38e($sp) @@ -27267,7 +27267,7 @@ glabel var7f1aa438 /* f076274: 8fa5006c */ lw $a1,0x6c($sp) /* f076278: 27a60390 */ addiu $a2,$sp,0x390 /* f07627c: 8fa70074 */ lw $a3,0x74($sp) -/* f076280: 0c00a910 */ jal func0002a440 +/* f076280: 0c00a910 */ jal cd0002a440 /* f076284: afa00010 */ sw $zero,0x10($sp) /* f076288: 00021c00 */ sll $v1,$v0,0x10 /* f07628c: 0003cc03 */ sra $t9,$v1,0x10 @@ -28013,7 +28013,7 @@ glabel var7f1aa438 /* f076d4c: c6440010 */ lwc1 $f4,0x10($s2) /* f076d50: afa70074 */ sw $a3,0x74($sp) /* f076d54: afad0010 */ sw $t5,0x10($sp) -/* f076d58: 0c00a934 */ jal func0002a4d0 +/* f076d58: 0c00a934 */ jal cd0002a4d0 /* f076d5c: e7a405b4 */ swc1 $f4,0x5b4($sp) /* f076d60: 00021c00 */ sll $v1,$v0,0x10 /* f076d64: 1840000b */ blez $v0,.L0f076d94 @@ -28024,7 +28024,7 @@ glabel var7f1aa438 /* f076d78: 27a505b8 */ addiu $a1,$sp,0x5b8 /* f076d7c: 27a605ac */ addiu $a2,$sp,0x5ac /* f076d80: 24070021 */ addiu $a3,$zero,0x21 -/* f076d84: 0c00b6e6 */ jal func0002db98 +/* f076d84: 0c00b6e6 */ jal cd0002db98 /* f076d88: a7aa00a2 */ sh $t2,0xa2($sp) /* f076d8c: 1040000b */ beqz $v0,.L0f076dbc /* f076d90: 87a300a2 */ lh $v1,0xa2($sp) @@ -28034,7 +28034,7 @@ glabel var7f1aa438 /* f076d9c: 26440008 */ addiu $a0,$s2,0x8 /* f076da0: 8fa5006c */ lw $a1,0x6c($sp) /* f076da4: 27a600a4 */ addiu $a2,$sp,0xa4 -/* f076da8: 0c00a910 */ jal func0002a440 +/* f076da8: 0c00a910 */ jal cd0002a440 /* f076dac: 8fa70074 */ lw $a3,0x74($sp) /* f076db0: 00021c00 */ sll $v1,$v0,0x10 /* f076db4: 00036403 */ sra $t4,$v1,0x10 @@ -28057,7 +28057,7 @@ glabel var7f1aa438 /* f076df4: 8fa40070 */ lw $a0,0x70($sp) /* f076df8: 8fa5006c */ lw $a1,0x6c($sp) /* f076dfc: 27a600a4 */ addiu $a2,$sp,0xa4 -/* f076e00: 0c00a910 */ jal func0002a440 +/* f076e00: 0c00a910 */ jal cd0002a440 /* f076e04: 8fa70074 */ lw $a3,0x74($sp) /* f076e08: 00021c00 */ sll $v1,$v0,0x10 /* f076e0c: 00034c03 */ sra $t1,$v1,0x10 @@ -28688,7 +28688,7 @@ glabel var7f1aa438 /* f073114: 00000000 */ sll $zero,$zero,0x0 /* f073118: 450201a3 */ bc1fl .NB0f0737a8 /* f07311c: 8faa0600 */ lw $t2,0x600($sp) -/* f073120: 0c0099d1 */ jal func00025364 +/* f073120: 0c0099d1 */ jal cd00025364 /* f073124: e7b0058c */ swc1 $f16,0x58c($sp) /* f073128: 1040000e */ beqz $v0,.NB0f073164 /* f07312c: c7b0058c */ lwc1 $f16,0x58c($sp) @@ -28711,7 +28711,7 @@ glabel var7f1aa438 /* f07316c: 27a403d0 */ addiu $a0,$sp,0x3d0 /* f073170: 27a503c4 */ addiu $a1,$sp,0x3c4 /* f073174: 24062061 */ addiu $a2,$zero,0x2061 -/* f073178: 0c00988b */ jal func00024e4c +/* f073178: 0c00988b */ jal cd00024e4c /* f07317c: e7b0058c */ swc1 $f16,0x58c($sp) /* f073180: c7a803d0 */ lwc1 $f8,0x3d0($sp) /* f073184: c7a603c4 */ lwc1 $f6,0x3c4($sp) @@ -28794,7 +28794,7 @@ glabel var7f1aa438 /* f0732a8: 27a503dc */ addiu $a1,$sp,0x3dc /* f0732ac: 24062087 */ addiu $a2,$zero,0x2087 /* f0732b0: e60400dc */ swc1 $f4,0xdc($s0) -/* f0732b4: 0c00988b */ jal func00024e4c +/* f0732b4: 0c00988b */ jal cd00024e4c /* f0732b8: e7b0058c */ swc1 $f16,0x58c($sp) /* f0732bc: c7a803e4 */ lwc1 $f8,0x3e4($sp) /* f0732c0: c7a603f0 */ lwc1 $f6,0x3f0($sp) @@ -30668,7 +30668,7 @@ glabel var7f1aa438 /* f074e18: afa7007c */ sw $a3,0x7c($sp) /* f074e1c: afaa0014 */ sw $t2,0x14($sp) /* f074e20: afac0010 */ sw $t4,0x10($sp) -/* f074e24: 0c00ae7b */ jal func0002a5e4 +/* f074e24: 0c00ae7b */ jal cd0002a5e4 /* f074e28: e7a805b4 */ swc1 $f8,0x5b4($sp) /* f074e2c: 18400029 */ blez $v0,.NB0f074ed4 /* f074e30: c7aa037c */ lwc1 $f10,0x37c($sp) @@ -30683,7 +30683,7 @@ glabel var7f1aa438 /* f074e54: 240e0003 */ addiu $t6,$zero,0x3 /* f074e58: 4502001f */ bc1fl .NB0f074ed8 /* f074e5c: 27ab0380 */ addiu $t3,$sp,0x380 -/* f074e60: 0c00bbe8 */ jal func0002db98 +/* f074e60: 0c00bbe8 */ jal cd0002db98 /* f074e64: afae0010 */ sw $t6,0x10($sp) /* f074e68: 1440001a */ bnez $v0,.NB0f074ed4 /* f074e6c: 24180001 */ addiu $t8,$zero,0x1 @@ -30720,7 +30720,7 @@ glabel var7f1aa438 /* f074ee0: 8fa50070 */ lw $a1,0x70($sp) /* f074ee4: 27a60390 */ addiu $a2,$sp,0x390 /* f074ee8: 8fa7007c */ lw $a3,0x7c($sp) -/* f074eec: 0c00ae5b */ jal func0002a564 +/* f074eec: 0c00ae5b */ jal cd0002a564 /* f074ef0: afa00014 */ sw $zero,0x14($sp) .NB0f074ef4: /* f074ef4: 8fac0600 */ lw $t4,0x600($sp) @@ -31449,7 +31449,7 @@ glabel var7f1aa438 /* f07597c: e7a805b0 */ swc1 $f8,0x5b0($sp) /* f075980: c64a0010 */ lwc1 $f10,0x10($s2) /* f075984: afa7007c */ sw $a3,0x7c($sp) -/* f075988: 0c00ae3e */ jal func0002a4d0 +/* f075988: 0c00ae3e */ jal cd0002a4d0 /* f07598c: e7aa05b4 */ swc1 $f10,0x5b4($sp) /* f075990: 00021c00 */ sll $v1,$v0,0x10 /* f075994: 1840000b */ blez $v0,.NB0f0759c4 @@ -31460,7 +31460,7 @@ glabel var7f1aa438 /* f0759a8: 27a505b8 */ addiu $a1,$sp,0x5b8 /* f0759ac: 27a605ac */ addiu $a2,$sp,0x5ac /* f0759b0: 24070020 */ addiu $a3,$zero,0x20 -/* f0759b4: 0c00bbe8 */ jal func0002db98 +/* f0759b4: 0c00bbe8 */ jal cd0002db98 /* f0759b8: a7ac00a2 */ sh $t4,0xa2($sp) /* f0759bc: 10400009 */ beqz $v0,.NB0f0759e4 /* f0759c0: 87a300a2 */ lh $v1,0xa2($sp) @@ -31468,7 +31468,7 @@ glabel var7f1aa438 /* f0759c4: 26440008 */ addiu $a0,$s2,0x8 /* f0759c8: 8fa50070 */ lw $a1,0x70($sp) /* f0759cc: 27a600a4 */ addiu $a2,$sp,0xa4 -/* f0759d0: 0c00ae22 */ jal func0002a440 +/* f0759d0: 0c00ae22 */ jal cd0002a440 /* f0759d4: 8fa7007c */ lw $a3,0x7c($sp) /* f0759d8: 00021c00 */ sll $v1,$v0,0x10 /* f0759dc: 00035403 */ sra $t2,$v1,0x10 @@ -31489,7 +31489,7 @@ glabel var7f1aa438 /* f075a14: 8fa40074 */ lw $a0,0x74($sp) /* f075a18: 8fa50070 */ lw $a1,0x70($sp) /* f075a1c: 27a600a4 */ addiu $a2,$sp,0xa4 -/* f075a20: 0c00ae22 */ jal func0002a440 +/* f075a20: 0c00ae22 */ jal cd0002a440 /* f075a24: 8fa7007c */ lw $a3,0x7c($sp) /* f075a28: 00021c00 */ sll $v1,$v0,0x10 /* f075a2c: 00036c03 */ sra $t5,$v1,0x10 @@ -33059,7 +33059,7 @@ void liftTick(struct prop *prop) prevpos.y = prop->pos.y; prevpos.z = prop->pos.z; - platformGetRidingProps(prop, propnums, ARRAYCOUNT(propnums)); + cdGetPropsOnPlatform(prop, propnums, ARRAYCOUNT(propnums)); if (lift->dist == 0 && lift->speed == 0) { func0f08d784(lift->soundtype, lift->base.prop); @@ -33197,7 +33197,7 @@ void escastepTick(struct prop *prop) oldpos.y = prop->pos.y; oldpos.z = prop->pos.z; - platformGetRidingProps(prop, propnums, ARRAYCOUNT(propnums)); + cdGetPropsOnPlatform(prop, propnums, ARRAYCOUNT(propnums)); step->prevpos.x = prop->pos.x; step->prevpos.y = prop->pos.y; @@ -33213,7 +33213,7 @@ void escastepTick(struct prop *prop) prop->pos.z = newpos.z; if ((obj->flags & OBJFLAG_ILLUMINATED) == 0) { - func0002a36c(&prop->pos, prop->rooms, &obj->floorcol, 0); + cd0002a36c(&prop->pos, prop->rooms, &obj->floorcol, 0); } func0f069c70(obj, true, true); @@ -33331,7 +33331,7 @@ void cctvTick(struct prop *camprop) if (canseeplayer) { currentPlayerSetPerimEnabled(playerprop, false); - if (!hasLineOfSight(&camprop->pos, camprop->rooms, &playerprop->pos, playerprop->rooms, 315, 8)) { + if (!cdHasLineOfSight(&camprop->pos, camprop->rooms, &playerprop->pos, playerprop->rooms, 315, 8)) { canseeplayer = false; } @@ -34406,7 +34406,7 @@ glabel var7f1aa580 /* f079748: afa800ac */ sw $t0,0xac($sp) /* f07974c: e7b200a4 */ swc1 $f18,0xa4($sp) /* f079750: 25c60008 */ addiu $a2,$t6,0x8 -/* f079754: 0c00b70f */ jal hasLineOfSight +/* f079754: 0c00b70f */ jal cdHasLineOfSight /* f079758: 25c70028 */ addiu $a3,$t6,0x28 /* f07975c: 3c09800a */ lui $t1,%hi(g_Vars) /* f079760: 25299fc0 */ addiu $t1,$t1,%lo(g_Vars) @@ -35628,7 +35628,7 @@ glabel var7f1aa580 /* f079748: afa800ac */ sw $t0,0xac($sp) /* f07974c: e7b200a4 */ swc1 $f18,0xa4($sp) /* f079750: 25c60008 */ addiu $a2,$t6,0x8 -/* f079754: 0c00b70f */ jal hasLineOfSight +/* f079754: 0c00b70f */ jal cdHasLineOfSight /* f079758: 25c70028 */ addiu $a3,$t6,0x28 /* f07975c: 3c09800a */ lui $t1,%hi(g_Vars) /* f079760: 25299fc0 */ addiu $t1,$t1,%lo(g_Vars) @@ -36367,7 +36367,7 @@ glabel var7f1aa5a8 /* f07a190: afaa0010 */ sw $t2,0x10($sp) /* f07a194: 27a60168 */ addiu $a2,$sp,0x168 /* f07a198: 27a70158 */ addiu $a3,$sp,0x158 -/* f07a19c: 0c00b78d */ jal func0002de34 +/* f07a19c: 0c00b78d */ jal cd0002de34 /* f07a1a0: 24440008 */ addiu $a0,$v0,0x8 /* f07a1a4: 14400015 */ bnez $v0,.L0f07a1fc /* f07a1a8: 8fad0198 */ lw $t5,0x198($sp) @@ -37329,7 +37329,7 @@ glabel var7f1aa5a8 /* f07a190: afaa0010 */ sw $t2,0x10($sp) /* f07a194: 27a60168 */ addiu $a2,$sp,0x168 /* f07a198: 27a70158 */ addiu $a3,$sp,0x158 -/* f07a19c: 0c00b78d */ jal func0002de34 +/* f07a19c: 0c00b78d */ jal cd0002de34 /* f07a1a0: 24440008 */ addiu $a0,$v0,0x8 /* f07a1a4: 14400015 */ bnez $v0,.L0f07a1fc /* f07a1a8: 8fad0198 */ lw $t5,0x198($sp) @@ -38230,7 +38230,7 @@ bool chopperCheckTargetInSight(struct chopperobj *obj) struct prop *target = chopperGetTargetProp(chopper); if (target->type != PROPTYPE_PLAYER || g_Vars.bondvisible) { - visible = hasLineOfSight(&target->pos, target->rooms, &chopper->base.prop->pos, chopper->base.prop->rooms, 307, 16); + visible = cdHasLineOfSight(&target->pos, target->rooms, &chopper->base.prop->pos, chopper->base.prop->rooms, 307, 16); } chopper->targetvisible = visible; @@ -40759,7 +40759,7 @@ glabel var7f1aa698 /* f07c5d8: afa50040 */ sw $a1,0x40($sp) /* f07c5dc: afa40044 */ sw $a0,0x44($sp) /* f07c5e0: 46104480 */ add.s $f18,$f8,$f16 -/* f07c5e4: 0c00b784 */ jal func0002de10 +/* f07c5e4: 0c00b784 */ jal cd0002de10 /* f07c5e8: e7b200a0 */ swc1 $f18,0xa0($sp) /* f07c5ec: 14400058 */ bnez $v0,.L0f07c750 /* f07c5f0: 8fa40044 */ lw $a0,0x44($sp) @@ -41236,7 +41236,7 @@ glabel var7f1aa698 /* f07c5d8: afa50040 */ sw $a1,0x40($sp) /* f07c5dc: afa40044 */ sw $a0,0x44($sp) /* f07c5e0: 46104480 */ add.s $f18,$f8,$f16 -/* f07c5e4: 0c00b784 */ jal func0002de10 +/* f07c5e4: 0c00b784 */ jal cd0002de10 /* f07c5e8: e7b200a0 */ swc1 $f18,0xa0($sp) /* f07c5ec: 14400058 */ bnez $v0,.L0f07c750 /* f07c5f0: 8fa40044 */ lw $a0,0x44($sp) @@ -41712,7 +41712,7 @@ glabel var7f1aa698 /* f07b084: afa50040 */ sw $a1,0x40($sp) /* f07b088: afa40044 */ sw $a0,0x44($sp) /* f07b08c: 46048200 */ add.s $f8,$f16,$f4 -/* f07b090: 0c00bc86 */ jal func0002de10 +/* f07b090: 0c00bc86 */ jal cd0002de10 /* f07b094: e7a800a0 */ swc1 $f8,0xa0($sp) /* f07b098: 14400058 */ bnez $v0,.NB0f07b1fc /* f07b09c: 8fa40044 */ lw $a0,0x44($sp) @@ -41960,7 +41960,7 @@ glabel var7f1aa698 // sp98.f[1] = sp8c.f[1] * g_Vars.lvupdate240freal + chopperprop->pos.y; // sp98.f[2] = sp8c.f[2] * g_Vars.lvupdate240freal + chopperprop->pos.z; // -// if (func0002de10(&chopperprop->pos, chopperprop->rooms, &sp98, CDTYPE_BG) == CDRESULT_COLLISION) { +// if (cd0002de10(&chopperprop->pos, chopperprop->rooms, &sp98, CDTYPE_BG) == CDRESULT_COLLISION) { // struct coord sp74; // s16 room; // struct coord sp64; @@ -42412,7 +42412,7 @@ glabel var7f1aa6a8 /* f07cf30: 27a6014c */ addiu $a2,$sp,0x14c /* f07cf34: 24070133 */ addiu $a3,$zero,0x133 /* f07cf38: 25e40008 */ addiu $a0,$t7,0x8 -/* f07cf3c: 0c00b6e6 */ jal func0002db98 +/* f07cf3c: 0c00b6e6 */ jal cd0002db98 /* f07cf40: 25e50028 */ addiu $a1,$t7,0x28 /* f07cf44: 14400040 */ bnez $v0,.L0f07d048 /* f07cf48: 24050002 */ addiu $a1,$zero,0x2 @@ -42938,7 +42938,7 @@ glabel var7f1aa6e4 /* f07d680: 24075000 */ addiu $a3,$zero,0x5000 /* f07d684: afa00010 */ sw $zero,0x10($sp) /* f07d688: e7a00014 */ swc1 $f0,0x14($sp) -/* f07d68c: 0c00b5f0 */ jal func0002d7c0 +/* f07d68c: 0c00b5f0 */ jal cd0002d7c0 /* f07d690: e7a00018 */ swc1 $f0,0x18($sp) /* f07d694: 54400005 */ bnezl $v0,.L0f07d6ac /* f07d698: 8fa301f0 */ lw $v1,0x1f0($sp) @@ -43904,7 +43904,7 @@ glabel var7f1aa6e4 /* f07d680: 24075000 */ addiu $a3,$zero,0x5000 /* f07d684: afa00010 */ sw $zero,0x10($sp) /* f07d688: e7a00014 */ swc1 $f0,0x14($sp) -/* f07d68c: 0c00b5f0 */ jal func0002d7c0 +/* f07d68c: 0c00b5f0 */ jal cd0002d7c0 /* f07d690: e7a00018 */ swc1 $f0,0x18($sp) /* f07d694: 54400005 */ bnezl $v0,.L0f07d6ac /* f07d698: 8fa301f0 */ lw $v1,0x1f0($sp) @@ -44868,7 +44868,7 @@ glabel var7f1aa6e0 /* f07c12c: 24075000 */ addiu $a3,$zero,0x5000 /* f07c130: afa00010 */ sw $zero,0x10($sp) /* f07c134: e7a00014 */ swc1 $f0,0x14($sp) -/* f07c138: 0c00baf2 */ jal func0002d7c0 +/* f07c138: 0c00baf2 */ jal cd0002d7c0 /* f07c13c: e7a00018 */ swc1 $f0,0x18($sp) /* f07c140: 54400005 */ bnezl $v0,.NB0f07c158 /* f07c144: 8fa301f0 */ lw $v1,0x1f0($sp) @@ -45636,7 +45636,7 @@ glabel var7f1aa6e0 // } // // if (active) { -// if (func0002d7c0(&prop->pos, prop->rooms, &sp214, 0x5000, 0, 0, 0) == 0) { +// if (cd0002d7c0(&prop->pos, prop->rooms, &sp214, 0x5000, 0, 0, 0) == 0) { // doorprop = cdGetObstacle(); // } // @@ -46312,10 +46312,10 @@ s32 objTick(struct prop *prop) model0001ee18(model, iVar10, true); } - func00023d38(model->anim->animnum); + anim00023d38(model->anim->animnum); if ((g_Anims[model->anim->animnum].flags & 0x04) - && func0002384c(model->anim->animnum, model->anim->framea) < 0) { + && anim0002384c(model->anim->animnum, model->anim->framea) < 0) { sp552 = true; } else { if (sp572) { @@ -46368,7 +46368,7 @@ s32 objTick(struct prop *prop) } if ((obj->flags & OBJFLAG_ILLUMINATED) == 0) { - func0002a36c(&prop->pos, prop->rooms, &obj->floorcol, 0); + cd0002a36c(&prop->pos, prop->rooms, &obj->floorcol, 0); } func0f069c70(obj, true, true); @@ -46406,7 +46406,7 @@ s32 objTick(struct prop *prop) sp144 = floorf(model->anim->frame); for (i = sp148; i <= sp144; i++) { - func00024b64(0, 0, model->filedata->type, model->anim->animnum, i, &sp128, 0); + anim00024b64(0, 0, model->filedata->type, model->anim->animnum, i, &sp128, 0); sp116.x += sp128.x * 0.1f; sp112 = sp128.y * 0.1f; @@ -46470,7 +46470,7 @@ s32 objTick(struct prop *prop) if (objUpdateGeometry(prop, (u8 **)geos, &end) && geos[0]->type == TILETYPE_02 - && func0002e4c4((struct tiletype2 *) geos[0], prop->rooms, 4) == 0) { + && cd0002e4c4((struct tiletype2 *) geos[0], prop->rooms, 4) == 0) { damage = ((obj->maxdamage - obj->damage) + 1) / 250.0f; obj->flags &= ~OBJFLAG_INVINCIBLE; objDamage(obj, damage, &prop->pos, WEAPON_REMOTEMINE, -1); @@ -48897,9 +48897,9 @@ Gfx *objRenderShadow(struct defaultobj *obj, Gfx *gdl) f32 y; #if VERSION >= VERSION_NTSC_1_0 - s32 value = func0002a440(&obj->prop->pos, obj->prop->rooms, &y, NULL, NULL); + s32 value = cd0002a440(&obj->prop->pos, obj->prop->rooms, &y, NULL, NULL); #else - s32 value = func0002a440(&obj->prop->pos, obj->prop->rooms, &y, NULL); + s32 value = cd0002a440(&obj->prop->pos, obj->prop->rooms, &y, NULL); #endif if (value > 0 && (obj->modelnum == MODEL_HOOVERBOT || obj->modelnum == MODEL_TESTERBOT)) { @@ -54043,7 +54043,7 @@ glabel var7f1aa978 /* f083bec: 27a700d4 */ addiu $a3,$sp,0xd4 /* f083bf0: e7a400e4 */ swc1 $f4,0xe4($sp) /* f083bf4: e7a800e8 */ swc1 $f8,0xe8($sp) -/* f083bf8: 0c00b78d */ jal func0002de34 +/* f083bf8: 0c00b78d */ jal cd0002de34 /* f083bfc: e7a600ec */ swc1 $f6,0xec($sp) /* f083c00: 10400005 */ beqz $v0,.L0f083c18 /* f083c04: 8fa900cc */ lw $t1,0xcc($sp) @@ -55016,7 +55016,7 @@ glabel var7f1aa978 /* f083bec: 27a700d4 */ addiu $a3,$sp,0xd4 /* f083bf0: e7a400e4 */ swc1 $f4,0xe4($sp) /* f083bf4: e7a800e8 */ swc1 $f8,0xe8($sp) -/* f083bf8: 0c00b78d */ jal func0002de34 +/* f083bf8: 0c00b78d */ jal cd0002de34 /* f083bfc: e7a600ec */ swc1 $f6,0xec($sp) /* f083c00: 10400005 */ beqz $v0,.L0f083c18 /* f083c04: 8fa900cc */ lw $t1,0xcc($sp) @@ -59210,7 +59210,7 @@ bool objTestForInteract(struct prop *prop) } if (angle <= 0.3926365673542f) { - if ((obj->flags2 & OBJFLAG2_INTERACTCHECKLOS) == 0 || func0002dcd0(&playerprop->pos, playerprop->rooms, &prop->pos, prop->rooms, 0x20)) { + if ((obj->flags2 & OBJFLAG2_INTERACTCHECKLOS) == 0 || cd0002dcd0(&playerprop->pos, playerprop->rooms, &prop->pos, prop->rooms, 0x20)) { g_InteractProp = prop; } } @@ -62654,7 +62654,7 @@ s32 objTestForPickup(struct prop *prop) if (pickup && (obj->flags2 & OBJFLAG2_PICKUPWITHOUTLOS) == 0 && !usebigrange - && hasLineOfSight(&playerprop->pos, playerprop->rooms, &prop->pos, prop->rooms, 0x22, 0x1c) == 0) { + && cdHasLineOfSight(&playerprop->pos, playerprop->rooms, &prop->pos, prop->rooms, 0x22, 0x1c) == 0) { pickup = false; } @@ -67766,7 +67766,7 @@ void doorsCalcFrac(struct doorobj *door) { propSetCollisionsEnabled(loopprop, false); - cdresult = func0002e4c4(loopdoor->base.geo2, loopprop->rooms, + cdresult = cd0002e4c4(loopdoor->base.geo2, loopprop->rooms, CDTYPE_OBJS | CDTYPE_PLAYERS | CDTYPE_CHRS | CDTYPE_10 | CDTYPE_OBJSNOTSAFEORHELI); propSetCollisionsEnabled(loopprop, true); @@ -68462,7 +68462,7 @@ bool doorTestForInteract(struct prop *prop) if (maybe) { if ((door->base.flags2 & OBJFLAG2_INTERACTCHECKLOS) == 0 - || func0002dcd0(&playerprop->pos, playerprop->rooms, &prop->pos, prop->rooms, 0x20)) { + || cd0002dcd0(&playerprop->pos, playerprop->rooms, &prop->pos, prop->rooms, 0x20)) { checkmore = func0f08f968(door, false); if (checkmore && (door->base.flags2 & OBJFLAG2_80000000)) { diff --git a/src/game/radar.c b/src/game/radar.c index 37371c815..04e145e24 100644 --- a/src/game/radar.c +++ b/src/game/radar.c @@ -11,7 +11,7 @@ #include "game/radar.h" #include "game/options.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/mtx.h" #include "data.h" #include "types.h" diff --git a/src/game/savebuffer.c b/src/game/savebuffer.c index b9280b36c..72e6f8852 100644 --- a/src/game/savebuffer.c +++ b/src/game/savebuffer.c @@ -7,7 +7,7 @@ #include "game/file.h" #include "game/utils.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/main.h" #include "lib/mtx.h" #include "data.h" diff --git a/src/game/sight.c b/src/game/sight.c index 7fee4156d..6bf867e4b 100644 --- a/src/game/sight.c +++ b/src/game/sight.c @@ -14,7 +14,7 @@ #include "game/options.h" #include "game/propobj.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/main.h" #include "lib/snd.h" #include "data.h" diff --git a/src/game/sky.c b/src/game/sky.c index 77b1f4709..9daa7ea1c 100644 --- a/src/game/sky.c +++ b/src/game/sky.c @@ -5,7 +5,7 @@ #include "game/sky.h" #include "game/game_1531a0.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/memory.h" #include "lib/rng.h" #include "lib/mtx.h" diff --git a/src/game/sparks/sparks.c b/src/game/sparks/sparks.c index 6a5429b57..9cc6550eb 100644 --- a/src/game/sparks/sparks.c +++ b/src/game/sparks/sparks.c @@ -6,7 +6,7 @@ #include "game/sparks/sparks.h" #include "game/file.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/rng.h" #include "lib/mtx.h" #include "data.h" diff --git a/src/game/title.c b/src/game/title.c index a84aacce2..550b83f23 100644 --- a/src/game/title.c +++ b/src/game/title.c @@ -19,7 +19,7 @@ #include "game/propobj.h" #include "bss.h" #include "lib/joy.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/main.h" #include "lib/model.h" #include "lib/snd.h" diff --git a/src/game/training/menus.c b/src/game/training/menus.c index 40494342d..dd0958241 100644 --- a/src/game/training/menus.c +++ b/src/game/training/menus.c @@ -19,7 +19,7 @@ #include "game/mplayer/mplayer.h" #include "game/options.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/main.h" #include "data.h" #include "types.h" diff --git a/src/game/training/training.c b/src/game/training/training.c index 483ebee56..5965abe4c 100644 --- a/src/game/training/training.c +++ b/src/game/training/training.c @@ -25,7 +25,7 @@ #include "game/propobj.h" #include "game/wallhit.h" #include "bss.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/dma.h" #include "lib/main.h" #include "lib/snd.h" diff --git a/src/include/lib/ailist.h b/src/include/lib/ailist.h new file mode 100644 index 000000000..439581e8e --- /dev/null +++ b/src/include/lib/ailist.h @@ -0,0 +1,9 @@ +#ifndef _IN_LIB_AILIST_H +#define _IN_LIB_AILIST_H +#include +#include "data.h" +#include "types.h" + +u8 *ailistFindById(s32 ailistid); + +#endif diff --git a/src/include/lib/anim.h b/src/include/lib/anim.h new file mode 100644 index 000000000..a81010638 --- /dev/null +++ b/src/include/lib/anim.h @@ -0,0 +1,27 @@ +#ifndef _IN_LIB_ANIM_H +#define _IN_LIB_ANIM_H +#include +#include "data.h" +#include "types.h" + +void anim000233c0(void); +u32 anim00023640(void); +void anim0002373c(void); +s32 animGetNumFrames(s16 anim_id); +bool animHasFrames(s16 animnum); +s32 animGetNumAnimations(void); +u32 anim000237e8(void); +s32 anim0002384c(s32 animnum, s32 frame); +u32 anim00023908(void); +bool anim000239e0(s16 animnum, s32 frame); +s32 anim00023ab0(s16 animnum, s32 framenum); +void anim00023d0c(void); +void anim00023d38(s16 animnum); +u32 anim00023f50(void); +u32 anim00023fe0(void); +void anim00024050(s32 arg0, s32 arg1, struct modeltype *arg2, s32 animnum, u32 arg4, struct coord *arg5, struct coord *arg6, struct coord *arg7); +s32 anim0002485c(s32 arg0, s32 arg1, struct modeltype *arg2, s16 animnum, s32 loopframe, s16 *arg5, s32 arg6); +f32 anim00024b64(u32 arg0, u32 arg1, struct modeltype *arg2, s32 animnum, u32 arg4, struct coord *coord, u32 arg6); +f32 anim00024c14(u32 arg0, s32 animnum, u8 arg2); + +#endif diff --git a/src/include/lib/collision.h b/src/include/lib/collision.h new file mode 100644 index 000000000..c6af1b0e5 --- /dev/null +++ b/src/include/lib/collision.h @@ -0,0 +1,122 @@ +#ifndef _IN_LIB_COLLISION_H +#define _IN_LIB_COLLISION_H +#include +#include "data.h" +#include "types.h" + +f32 cd00024e40(void); +void cd00024e4c(struct coord *arg0, struct coord *arg1, u32 line, char *file); +f32 cd00024e98(void); +s32 cd00024ea4(void); +struct prop *cdGetObstacle(void); +void cdGetPos(struct coord *pos, u32 line, char *file); +void cd00024ee8(struct coord *arg0); +u32 cdGetTileFlags(void); +void cd00024f6c(void); +void cd00024fb0(struct coord *arg0, struct coord *arg1, struct prop *prop); +u32 cd00025038(void); +void cd000250cc(struct coord *arg0, struct coord *arg1, f32 width); +void cd00025168(struct prop *prop); +u32 cd000251ac(void); +void cd00025254(struct coord *arg0, struct coord *arg1, struct coord *pos, struct prop *prop, f32 arg4, struct tile *tile); +u32 cd00025314(void); +u32 cd00025364(void); +u32 cd000253c4(void); +u32 cd00025410(void); +u32 cd000254d8(void); +f32 cd00025654(f32 x1, f32 z1, f32 x2, f32 z2, f32 x3, f32 z3); +f32 cd00025724(f32 x1, f32 z1, f32 x2, f32 z2); +bool cd00025774(f32 x1, f32 z1, f32 x2, f32 z2, f32 x3, f32 z3); +void cd00025848(f32 tilex, f32 tilez, f32 tilewidth, f32 posx, f32 posz, f32 *x1, f32 *z1, f32 *x2, f32 *z2); +void cd00025928(struct tile *tile, struct coord *arg1); +void cdGetFloorCol(struct tile *tile, u16 *floorcol); +void cdGetFloorType(struct tile *tile, u8 *floortype); +f32 cdFindGroundInTileType0AtVertex(struct tiletype0 *tile, f32 x, f32 z, s32 vertexindex); +f32 cdFindGroundInTileType0(struct tiletype0 *tile, f32 x, f32 z); +f32 cdFindGroundInTileType1(struct tiletype1 *tile, f32 x, f32 z); +bool cdIs2dPointInTileType0(struct tiletype0 *tile, f32 x, f32 z); +bool cdIs2dPointInTileType1(struct tiletype1 *tile, f32 x, f32 z); +bool cdIs2dPointInTileType2(struct tiletype2 *tile, f32 x, f32 z); +bool cdIs2dPointInTileType3(struct tiletype3 *tile, f32 x, f32 z); +bool func000266a4(f32 x, f32 z, struct tile *tile); +void cdGetPropsOnPlatform(struct prop *platform, s16 *propnums, s32 len); +bool cd00026a04(struct coord *pos, u8 *start, u8 *end, u16 flags, s32 room, struct tile **tileptr, s32 *roomptr, f32 *groundptr, bool arg8); +void cd00026e7c(struct coord *pos, s16 *rooms, u16 arg2, struct tile **tileptr, s16 *arg4, f32 *arg5, struct prop **arg6, s32 arg7); +bool cd0002709c(struct tiletype0 *tile, f32 x, f32 z, f32 width, struct prop *prop, struct collisionthing *thing); +bool cd000272f8(struct tiletype1 *tile, f32 x, f32 z, f32 width, struct prop *prop, struct collisionthing *thing); +s32 cd000274e0(struct tiletype2 *tile, f32 x, f32 z, f32 width, struct prop *prop, struct collisionthing *thing); +bool cd000276c8(struct tiletype3 *tile, f32 x, f32 z, f32 width, struct prop *prop, struct collisionthing *thing); +void cd00027738(struct coord *pos, f32 width, u8 *start, u8 *end, u16 flags, bool checkvertical, f32 arg6, f32 arg7, struct prop *prop, struct collisionthing *things, s32 maxthings, s32 *thingnum, s32 roomnum); +void cd00027d1c(struct coord *pos, f32 width, s16 *rooms, u32 types, u16 arg4, u32 arg5, f32 arg6, f32 arg7, struct collisionthing *arg8, s32 arg9); +u32 cd00027f78(void); +s32 cd00028200(struct tiletype0 *tile, struct coord *pos, f32 width, f32 y1, f32 y2); +u32 cd0002840c(void); +u32 cd00028638(void); +u32 cd0002885c(void); +s32 cd00028914(u8 *start, u8 *end, struct coord *pos, f32 width, u16 flags, bool checkvertical, f32 arg6, f32 arg7, struct prop *prop, struct collisionthing *things, s32 maxthings, s32 *thingnum); +void cd00028df0(struct coord *pos, f32 width, s16 *rooms, u32 types, u16 arg4, u32 arg5, f32 ymax, f32 ymin, struct collisionthing *arg8, s32 arg9); +void cd0002901c(struct coord *pos, struct coord *dist, f32 width, struct collisionthing *arg3); +f32 cd000296a0(struct collisionthing *arg0, struct coord *pos, struct tilething **arg2, f32 width); +bool cd00029ffc(struct coord *pos, f32 width, f32 foreheadheight, f32 inversefeettoeyesheight, s16 *rooms, u16 arg5, struct coord *laddernormal); +bool cd0002a13c(struct coord *pos, f32 width, f32 arg2, f32 arg3, s16 *rooms, u16 arg5); +f32 cdFindGroundY(struct coord *pos, f32 width, s16 *rooms, u16 *floorcol, u8 *floortype, u16 *floorflags, s16 *floorroom, s32 *inlift, struct prop **lift); +f32 cd0002a324(void); +f32 cdFindGroundYSimple(struct coord *pos, f32 width, s16 *rooms, u16 *floorcol, u8 *floortype); +f32 cd0002a36c(struct coord *coord, s16 *rooms, u16 *floorcol, u8 *floortype); +s32 cd0002a400(struct coord *pos, s16 *rooms); + +#if VERSION >= VERSION_NTSC_1_0 +s16 cd0002a440(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcolptr, u16 *flagsptr); +#else +s16 cd0002a440(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcolptr); +#endif + +s16 cd0002a4d0(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcolptr, u16 *flagsptr); +s32 cd0002a564(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcol, struct coord *arg4, struct prop **propptr); +s32 cd0002a5e4(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcol, u16 *arg4, struct coord *arg5); +s32 cdTestVolume(struct coord *pos, f32 width, s16 *rooms, s32 types, s32 arg4, f32 ymax, f32 ymin); +s32 cd0002a6fc(struct coord *pos, struct coord *pos2, f32 width, s16 *rooms, s32 types, bool arg5, f32 arg6, f32 arg7); +s32 cdTestAToB1(struct coord *origpos, struct coord *dstpos, f32 width, s16 *dstrooms, s32 types, s32 arg5, f32 ymax, f32 ymin); +u32 cd0002aac0(void); +u32 cd0002ab98(void); +u32 cd0002ac70(void); +u32 cd0002b128(void); +u32 cd0002b560(void); +u32 cd0002b954(void); +bool cd0002bd04(u8 *start, u8 *end, struct coord *arg2, struct coord *arg3, struct coord *arg4, s32 arg5, s32 arg6, s32 arg7, f32 arg8, f32 arg9); +u32 cd0002c328(void); +u32 cd0002c528(void); +bool cd0002c714(u8 *start, u8 *end, struct coord *arg2, struct coord *arg3, struct coord *arg4, u16 arg5, s32 arg6, s32 arg7, f32 ymax, f32 ymin, f32 *arg10, struct coord *arg11, struct coord *arg12, struct coord *arg13, struct tile **tile, s32 roomnum); +bool cd0002d15c(struct coord *pos, struct coord *coord2, s16 *rooms, u32 types, u16 arg4, s32 arg5, s32 arg6, f32 arg7, f32 arg8); +s32 cd0002d3b0(struct coord *arg0, struct coord *arg1, s16 *arg2, s32 types, u16 arg4, s32 arg5, s32 arg6, f32 ymax, f32 ymin); +bool cd0002d6ac(struct coord *pos, s16 *rooms, struct coord *targetpos, u32 types, u32 arg4, f32 arg5, f32 arg6); +s32 cdTestAToB2(struct coord *pos, s16 *rooms, struct coord *coord2, s16 *rooms2, u32 types, s32 arg5, f32 arg6, f32 arg7); +bool cd0002d7c0(struct coord *pos, s16 *rooms, struct coord *arg2, u32 arg3, u32 arg4, f32 ymax, f32 ymin); +s32 cd0002d840(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, u32 types, s32 arg5, f32 ymax, f32 ymin); +s32 cd0002d8b8(struct coord *pos, s16 *rooms, struct coord *pos2, s16 *rooms2, s32 types, bool arg5, f32 ymax, f32 ymin); +s32 cdTestAToB3(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, f32 arg4, s32 types, s32 arg6, f32 ymax, f32 ymin); +void cd0002da50(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, u32 types, s32 arg5, f32 ymax, f32 ymin); +s32 cd0002dac8(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, f32 width, u32 types, s32 arg6, f32 ymax, f32 ymin); +bool cd0002db98(struct coord *viewpos, s16 *rooms, struct coord *targetpos, u32 types, u16 arg4); +bool cd0002dc18(struct coord *coord, s16 *rooms, struct coord *coord2, s32 arg3); +bool cdHasLineOfSight(struct coord *coord, s16 *rooms, struct coord *coord2, s16 *rooms2, s32 arg4, u16 arg5); +bool cd0002dcd0(struct coord *arg0, s16 *rooms1, struct coord *arg2, s16 *rooms2, u32 arg4); +bool cd0002dcfc(struct coord *pos, s16 *rooms, struct coord *pos2, s16 *rooms2, s16 *rooms3, u32 types, u16 arg6); +s32 cdTestAToB4(struct coord *pos, s16 *rooms, struct coord *pos2, u32 types, u16 arg4); +s32 cd0002de10(struct coord *pos, s16 *rooms, struct coord *pos2, u32 types); +s32 cd0002de34(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, u32 types, u16 arg5); +s32 cd0002deac(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, u32 types); +bool cd0002ded8(struct coord *arg0, struct coord *arg1, struct prop *prop); +bool cd0002dffc(struct tiletype2 *arg0, struct tiletype2 *arg1); +s32 cd0002e278(u8 *start, u8 *end, struct tiletype2 *ref, u16 flags); +s32 cd0002e4c4(struct tiletype2 *geo, s16 *rooms, u32 types); +u32 cd0002e680(void); +u32 cd0002e82c(void); +u32 cd0002e9d8(void); +u32 cd0002eb84(void); +u32 cd0002ed30(void); +u32 cd0002f02c(void); +bool cd0002f308(struct coord *viewpos, s16 *rooms, struct coord *targetpos, f32 distance, s32 arg4, u16 arg5); +bool cd0002f450(struct coord *viewpos, s16 *rooms, struct coord *targetpos, f32 distance, s32 arg4); + +#endif diff --git a/src/include/lib/lib_0c000.h b/src/include/lib/crash.h similarity index 90% rename from src/include/lib/lib_0c000.h rename to src/include/lib/crash.h index 749572e88..f8e8aa13f 100644 --- a/src/include/lib/lib_0c000.h +++ b/src/include/lib/crash.h @@ -1,5 +1,5 @@ -#ifndef _IN_LIB_LIB_0C000_H -#define _IN_LIB_LIB_0C000_H +#ifndef _IN_LIB_CRASH_H +#define _IN_LIB_CRASH_H #include #include "data.h" #include "types.h" @@ -87,20 +87,20 @@ extern const char var700529a4[]; extern const char var700529a8[]; extern const char var700529ac[]; -void faultCreateThread2(void); +void crashCreateThread(void); u32 crashGetParentStackFrame(u32 *ptr, u32 *start, u32 sp, u32 *regs); bool crashIsReturnAddress(u32 *instruction); u32 crashGetStackEnd(u32 sp, s32 tid); u32 crashGetStackStart(u32 arg0, s32 tid); bool crashIsDouble(f32 value); -void rmonPrintFloat(s32 index, f32 arg1); -void rmonPrint2Floats(s32 index, f32 value1, f32 value2); -void rmonPrint3Floats(s32 index, f32 value1, f32 value2, f32 value3); +void crashPrintFloat(s32 index, f32 arg1); +void crashPrint2Floats(s32 index, f32 value1, f32 value2); +void crashPrint3Floats(s32 index, f32 value1, f32 value2, f32 value3); void crashPutChar(s32 x, s32 y, char c); void crashAppendChar(char c); void crashScroll(s32 numlines); -void func0000cdc8(s32 x, s32 y, char c); +void crash0000cdc8(s32 x, s32 y, char c); void crashReset(void); -void func0000cf54(u8 *fb); +void crash0000cf54(u8 *fb); #endif diff --git a/src/include/lib/lib_0bfb0.h b/src/include/lib/fault.h similarity index 72% rename from src/include/lib/lib_0bfb0.h rename to src/include/lib/fault.h index f73b8d112..9109fd6d6 100644 --- a/src/include/lib/lib_0bfb0.h +++ b/src/include/lib/fault.h @@ -1,5 +1,5 @@ -#ifndef _IN_LIB_LIB_0BFB0_H -#define _IN_LIB_LIB_0BFB0_H +#ifndef _IN_LIB_FAULT_H +#define _IN_LIB_FAULT_H #include #include "data.h" #include "types.h" diff --git a/src/include/lib/lib_070d0.h b/src/include/lib/lib_070d0.h deleted file mode 100644 index 69d122700..000000000 --- a/src/include/lib/lib_070d0.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _IN_LIB_LIB_070D0_H -#define _IN_LIB_LIB_070D0_H -#include -#include "data.h" -#include "types.h" - -u32 func000070d0(void); - -#endif diff --git a/src/include/lib/lib_11420.h b/src/include/lib/lib_11420.h deleted file mode 100644 index 7bcc53f67..000000000 --- a/src/include/lib/lib_11420.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef _IN_LIB_LIB_11420_H -#define _IN_LIB_LIB_11420_H -#include -#include "data.h" -#include "types.h" - -u32 func00011420(void); -u32 func00011700(void); -u32 func00011780(void); -u32 func00011884(void); -u32 func000118f4(void); -void func0001190c(void); -void func00011d84(void); - -#endif diff --git a/src/include/lib/lib_13710.h b/src/include/lib/lib_13710.h deleted file mode 100644 index 942efaae4..000000000 --- a/src/include/lib/lib_13710.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _IN_LIB_LIB_13710_H -#define _IN_LIB_LIB_13710_H -#include -#include "data.h" -#include "types.h" - -void func00013710(void); - -#endif diff --git a/src/include/lib/lib_233c0.h b/src/include/lib/lib_233c0.h deleted file mode 100644 index 2f5d65bbf..000000000 --- a/src/include/lib/lib_233c0.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _IN_LIB_LIB_233C0_H -#define _IN_LIB_LIB_233C0_H -#include -#include "data.h" -#include "types.h" - -void func000233c0(void); -u32 func00023640(void); -void func0002373c(void); -s32 animGetNumFrames(s16 anim_id); -bool animHasFrames(s16 animnum); -s32 getNumAnimations(void); -u32 func000237e8(void); -s32 func0002384c(s32 animnum, s32 frame); -u32 func00023908(void); -bool func000239e0(s16 animnum, s32 frame); -s32 func00023ab0(s16 animnum, s32 framenum); -void func00023d0c(void); -void func00023d38(s16 animnum); -u32 func00023f50(void); -u32 func00023fe0(void); -void func00024050(s32 arg0, s32 arg1, struct modeltype *arg2, s32 animnum, u32 arg4, struct coord *arg5, struct coord *arg6, struct coord *arg7); -s32 func0002485c(s32 arg0, s32 arg1, struct modeltype *arg2, s16 animnum, s32 loopframe, s16 *arg5, s32 arg6); -f32 func00024b64(u32 arg0, u32 arg1, struct modeltype *arg2, s32 animnum, u32 arg4, struct coord *coord, u32 arg6); -f32 func00024c14(u32 arg0, s32 animnum, u8 arg2); - -#endif diff --git a/src/include/lib/lib_24e40.h b/src/include/lib/lib_24e40.h deleted file mode 100644 index 20ae1aacd..000000000 --- a/src/include/lib/lib_24e40.h +++ /dev/null @@ -1,122 +0,0 @@ -#ifndef _IN_LIB_LIB_24E40_H -#define _IN_LIB_LIB_24E40_H -#include -#include "data.h" -#include "types.h" - -f32 func00024e40(void); -void func00024e4c(struct coord *arg0, struct coord *arg1, u32 line, char *file); -f32 func00024e98(void); -s32 func00024ea4(void); -struct prop *cdGetObstacle(void); -void cdGetPos(struct coord *pos, u32 line, char *file); -void func00024ee8(struct coord *arg0); -u32 cdGetTileFlags(void); -void func00024f6c(void); -void func00024fb0(struct coord *arg0, struct coord *arg1, struct prop *prop); -u32 func00025038(void); -void func000250cc(struct coord *arg0, struct coord *arg1, f32 width); -void func00025168(struct prop *prop); -u32 func000251ac(void); -void func00025254(struct coord *arg0, struct coord *arg1, struct coord *pos, struct prop *prop, f32 arg4, struct tile *tile); -u32 func00025314(void); -u32 func00025364(void); -u32 func000253c4(void); -u32 func00025410(void); -u32 func000254d8(void); -f32 func00025654(f32 x1, f32 z1, f32 x2, f32 z2, f32 x3, f32 z3); -f32 func00025724(f32 x1, f32 z1, f32 x2, f32 z2); -bool func00025774(f32 x1, f32 z1, f32 x2, f32 z2, f32 x3, f32 z3); -void func00025848(f32 tilex, f32 tilez, f32 tilewidth, f32 posx, f32 posz, f32 *x1, f32 *z1, f32 *x2, f32 *z2); -void func00025928(struct tile *tile, struct coord *arg1); -void tileGetFloorCol(struct tile *tile, u16 *floorcol); -void tileGetFloorType(struct tile *tile, u8 *floortype); -f32 cdFindGroundInTileType0AtVertex(struct tiletype0 *tile, f32 x, f32 z, s32 vertexindex); -f32 cdFindGroundInTileType0(struct tiletype0 *tile, f32 x, f32 z); -f32 cdFindGroundInTileType1(struct tiletype1 *tile, f32 x, f32 z); -bool cdIs2dPointInTileType0(struct tiletype0 *tile, f32 x, f32 z); -bool cdIs2dPointInTileType1(struct tiletype1 *tile, f32 x, f32 z); -bool cdIs2dPointInTileType2(struct tiletype2 *tile, f32 x, f32 z); -bool cdIs2dPointInTileType3(struct tiletype3 *tile, f32 x, f32 z); -bool func000266a4(f32 x, f32 z, struct tile *tile); -void platformGetRidingProps(struct prop *platform, s16 *propnums, s32 len); -bool func00026a04(struct coord *pos, u8 *start, u8 *end, u16 flags, s32 room, struct tile **tileptr, s32 *roomptr, f32 *groundptr, bool arg8); -void func00026e7c(struct coord *pos, s16 *rooms, u16 arg2, struct tile **tileptr, s16 *arg4, f32 *arg5, struct prop **arg6, s32 arg7); -bool func0002709c(struct tiletype0 *tile, f32 x, f32 z, f32 width, struct prop *prop, struct collisionthing *thing); -bool func000272f8(struct tiletype1 *tile, f32 x, f32 z, f32 width, struct prop *prop, struct collisionthing *thing); -s32 func000274e0(struct tiletype2 *tile, f32 x, f32 z, f32 width, struct prop *prop, struct collisionthing *thing); -bool func000276c8(struct tiletype3 *tile, f32 x, f32 z, f32 width, struct prop *prop, struct collisionthing *thing); -void func00027738(struct coord *pos, f32 width, u8 *start, u8 *end, u16 flags, bool checkvertical, f32 arg6, f32 arg7, struct prop *prop, struct collisionthing *things, s32 maxthings, s32 *thingnum, s32 roomnum); -void func00027d1c(struct coord *pos, f32 width, s16 *rooms, u32 types, u16 arg4, u32 arg5, f32 arg6, f32 arg7, struct collisionthing *arg8, s32 arg9); -u32 func00027f78(void); -s32 func00028200(struct tiletype0 *tile, struct coord *pos, f32 width, f32 y1, f32 y2); -u32 func0002840c(void); -u32 func00028638(void); -u32 func0002885c(void); -s32 func00028914(u8 *start, u8 *end, struct coord *pos, f32 width, u16 flags, bool checkvertical, f32 arg6, f32 arg7, struct prop *prop, struct collisionthing *things, s32 maxthings, s32 *thingnum); -void func00028df0(struct coord *pos, f32 width, s16 *rooms, u32 types, u16 arg4, u32 arg5, f32 ymax, f32 ymin, struct collisionthing *arg8, s32 arg9); -void func0002901c(struct coord *pos, struct coord *dist, f32 width, struct collisionthing *arg3); -f32 func000296a0(struct collisionthing *arg0, struct coord *pos, struct tilething **arg2, f32 width); -bool func00029ffc(struct coord *pos, f32 width, f32 foreheadheight, f32 inversefeettoeyesheight, s16 *rooms, u16 arg5, struct coord *laddernormal); -bool func0002a13c(struct coord *pos, f32 width, f32 arg2, f32 arg3, s16 *rooms, u16 arg5); -f32 cdFindGroundY(struct coord *pos, f32 width, s16 *rooms, u16 *floorcol, u8 *floortype, u16 *floorflags, s16 *floorroom, s32 *inlift, struct prop **lift); -f32 func0002a324(void); -f32 cdFindGroundYSimple(struct coord *pos, f32 width, s16 *rooms, u16 *floorcol, u8 *floortype); -f32 func0002a36c(struct coord *coord, s16 *rooms, u16 *floorcol, u8 *floortype); -s32 func0002a400(struct coord *pos, s16 *rooms); - -#if VERSION >= VERSION_NTSC_1_0 -s16 func0002a440(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcolptr, u16 *flagsptr); -#else -s16 func0002a440(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcolptr); -#endif - -s16 func0002a4d0(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcolptr, u16 *flagsptr); -s32 func0002a564(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcol, struct coord *arg4, struct prop **propptr); -s32 func0002a5e4(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcol, u16 *arg4, struct coord *arg5); -s32 cdTestVolume(struct coord *pos, f32 width, s16 *rooms, s32 types, s32 arg4, f32 ymax, f32 ymin); -s32 func0002a6fc(struct coord *pos, struct coord *pos2, f32 width, s16 *rooms, s32 types, bool arg5, f32 arg6, f32 arg7); -s32 cdTestAToB1(struct coord *origpos, struct coord *dstpos, f32 width, s16 *dstrooms, s32 types, s32 arg5, f32 ymax, f32 ymin); -u32 func0002aac0(void); -u32 func0002ab98(void); -u32 func0002ac70(void); -u32 func0002b128(void); -u32 func0002b560(void); -u32 func0002b954(void); -bool func0002bd04(u8 *start, u8 *end, struct coord *arg2, struct coord *arg3, struct coord *arg4, s32 arg5, s32 arg6, s32 arg7, f32 arg8, f32 arg9); -u32 func0002c328(void); -u32 func0002c528(void); -bool func0002c714(u8 *start, u8 *end, struct coord *arg2, struct coord *arg3, struct coord *arg4, u16 arg5, s32 arg6, s32 arg7, f32 ymax, f32 ymin, f32 *arg10, struct coord *arg11, struct coord *arg12, struct coord *arg13, struct tile **tile, s32 roomnum); -bool func0002d15c(struct coord *pos, struct coord *coord2, s16 *rooms, u32 types, u16 arg4, s32 arg5, s32 arg6, f32 arg7, f32 arg8); -s32 func0002d3b0(struct coord *arg0, struct coord *arg1, s16 *arg2, s32 types, u16 arg4, s32 arg5, s32 arg6, f32 ymax, f32 ymin); -bool func0002d6ac(struct coord *pos, s16 *rooms, struct coord *targetpos, u32 types, u32 arg4, f32 arg5, f32 arg6); -s32 cdTestAToB2(struct coord *pos, s16 *rooms, struct coord *coord2, s16 *rooms2, u32 types, s32 arg5, f32 arg6, f32 arg7); -bool func0002d7c0(struct coord *pos, s16 *rooms, struct coord *arg2, u32 arg3, u32 arg4, f32 ymax, f32 ymin); -s32 func0002d840(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, u32 types, s32 arg5, f32 ymax, f32 ymin); -s32 func0002d8b8(struct coord *pos, s16 *rooms, struct coord *pos2, s16 *rooms2, s32 types, bool arg5, f32 ymax, f32 ymin); -s32 cdTestAToB3(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, f32 arg4, s32 types, s32 arg6, f32 ymax, f32 ymin); -void func0002da50(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, u32 types, s32 arg5, f32 ymax, f32 ymin); -s32 func0002dac8(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, f32 width, u32 types, s32 arg6, f32 ymax, f32 ymin); -bool func0002db98(struct coord *viewpos, s16 *rooms, struct coord *targetpos, u32 types, u16 arg4); -bool func0002dc18(struct coord *coord, s16 *rooms, struct coord *coord2, s32 arg3); -bool hasLineOfSight(struct coord *coord, s16 *rooms, struct coord *coord2, s16 *rooms2, s32 arg4, u16 arg5); -bool func0002dcd0(struct coord *arg0, s16 *rooms1, struct coord *arg2, s16 *rooms2, u32 arg4); -bool func0002dcfc(struct coord *pos, s16 *rooms, struct coord *pos2, s16 *rooms2, s16 *rooms3, u32 types, u16 arg6); -s32 cdTestAToB4(struct coord *pos, s16 *rooms, struct coord *pos2, u32 types, u16 arg4); -s32 func0002de10(struct coord *pos, s16 *rooms, struct coord *pos2, u32 types); -s32 func0002de34(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, u32 types, u16 arg5); -s32 func0002deac(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, u32 types); -bool func0002ded8(struct coord *arg0, struct coord *arg1, struct prop *prop); -bool func0002dffc(struct tiletype2 *arg0, struct tiletype2 *arg1); -s32 func0002e278(u8 *start, u8 *end, struct tiletype2 *ref, u16 flags); -s32 func0002e4c4(struct tiletype2 *geo, s16 *rooms, u32 types); -u32 func0002e680(void); -u32 func0002e82c(void); -u32 func0002e9d8(void); -u32 func0002eb84(void); -u32 func0002ed30(void); -u32 func0002f02c(void); -bool func0002f308(struct coord *viewpos, s16 *rooms, struct coord *targetpos, f32 distance, s32 arg4, u16 arg5); -bool func0002f450(struct coord *viewpos, s16 *rooms, struct coord *targetpos, f32 distance, s32 arg4); - -#endif diff --git a/src/include/lib/lib_34030.h b/src/include/lib/lib_34030.h deleted file mode 100644 index ec5440a20..000000000 --- a/src/include/lib/lib_34030.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _IN_LIB_LIB_34030_H -#define _IN_LIB_LIB_34030_H -#include -#include "data.h" -#include "types.h" - -void func00034030(s32 arg0); -void func00034104(s32 index, s32 arg1); - -#endif diff --git a/src/include/lib/lib_37b00.h b/src/include/lib/mp3.h similarity index 88% rename from src/include/lib/lib_37b00.h rename to src/include/lib/mp3.h index efe6310c7..903b39a8e 100644 --- a/src/include/lib/lib_37b00.h +++ b/src/include/lib/mp3.h @@ -1,5 +1,5 @@ -#ifndef _IN_LIB_LIB_37B00_H -#define _IN_LIB_LIB_37B00_H +#ifndef _IN_LIB_MP3_H +#define _IN_LIB_MP3_H #include #include "data.h" #include "types.h" diff --git a/src/include/lib/music.h b/src/include/lib/music.h new file mode 100644 index 000000000..99a60405b --- /dev/null +++ b/src/include/lib/music.h @@ -0,0 +1,15 @@ +#ifndef _IN_LIB_MUSIC_H +#define _IN_LIB_MUSIC_H +#include +#include "data.h" +#include "types.h" + +u32 music00011420(void); +u32 music00011700(void); +u32 music00011780(void); +u32 music00011884(void); +u32 music000118f4(void); +void music0001190c(void); +void music00011d84(void); + +#endif diff --git a/src/include/lib/lib_184d0.h b/src/include/lib/path.h similarity index 61% rename from src/include/lib/lib_184d0.h rename to src/include/lib/path.h index 1246c2098..2145885df 100644 --- a/src/include/lib/lib_184d0.h +++ b/src/include/lib/path.h @@ -1,10 +1,9 @@ -#ifndef _IN_LIB_LIB_184D0_H -#define _IN_LIB_LIB_184D0_H +#ifndef _IN_LIB_PATH_H +#define _IN_LIB_PATH_H #include #include "data.h" #include "types.h" -u8 *ailistFindById(s32 ailistid); void objSetBlockedPathUnblocked(struct defaultobj *blocker, bool unblocked); #endif diff --git a/src/include/lib/pimgr.h b/src/include/lib/pimgr.h new file mode 100644 index 000000000..cb79f747c --- /dev/null +++ b/src/include/lib/pimgr.h @@ -0,0 +1,9 @@ +#ifndef _IN_LIB_PIMGR_H +#define _IN_LIB_PIMGR_H +#include +#include "data.h" +#include "types.h" + +void pimgrCreate(void); + +#endif diff --git a/src/include/lib/lib_2fa00.h b/src/include/lib/rmon.h similarity index 53% rename from src/include/lib/lib_2fa00.h rename to src/include/lib/rmon.h index 8e0af17af..723d8beef 100644 --- a/src/include/lib/lib_2fa00.h +++ b/src/include/lib/rmon.h @@ -1,11 +1,11 @@ -#ifndef _IN_LIB_LIB_2FA00_H -#define _IN_LIB_LIB_2FA00_H +#ifndef _IN_LIB_RMON_H +#define _IN_LIB_RMON_H #include #include "data.h" #include "types.h" void rmonproc(); bool rmonIsDisabled(void); -void crashPrint(const char *format, ...); +void rmonPrint(const char *format, ...); #endif diff --git a/src/include/lib/speaker.h b/src/include/lib/speaker.h new file mode 100644 index 000000000..a57d1dc6a --- /dev/null +++ b/src/include/lib/speaker.h @@ -0,0 +1,10 @@ +#ifndef _IN_LIB_SPEAKER_H +#define _IN_LIB_SPEAKER_H +#include +#include "data.h" +#include "types.h" + +void speaker00034030(s32 arg0); +void speaker00034104(s32 index, s32 arg1); + +#endif diff --git a/src/include/lib/lib_09a80.h b/src/include/lib/vi.h similarity index 96% rename from src/include/lib/lib_09a80.h rename to src/include/lib/vi.h index 4b07339e9..b1aa5db17 100644 --- a/src/include/lib/lib_09a80.h +++ b/src/include/lib/vi.h @@ -1,5 +1,5 @@ -#ifndef _IN_LIB_LIB_09A80_H -#define _IN_LIB_LIB_09A80_H +#ifndef _IN_LIB_VI_H +#define _IN_LIB_VI_H #include #include "data.h" #include "types.h" diff --git a/src/include/lib/vm.h b/src/include/lib/vm.h new file mode 100644 index 000000000..84d42b2a6 --- /dev/null +++ b/src/include/lib/vm.h @@ -0,0 +1,9 @@ +#ifndef _IN_LIB_VM_H +#define _IN_LIB_VM_H +#include +#include "data.h" +#include "types.h" + +u32 vmInit(void); + +#endif diff --git a/src/lib/lib_184d0.c b/src/lib/ailist.c similarity index 60% rename from src/lib/lib_184d0.c rename to src/lib/ailist.c index 76c9bd9c2..84529232d 100644 --- a/src/lib/lib_184d0.c +++ b/src/lib/ailist.c @@ -1,10 +1,7 @@ #include #include "constants.h" -#include "game/atan2f.h" -#include "game/padhalllv.h" #include "bss.h" -#include "lib/mtx.h" -#include "lib/lib_184d0.h" +#include "lib/ailist.h" #include "data.h" #include "types.h" @@ -59,24 +56,3 @@ u8 *ailistFindById(s32 ailistid) return NULL; } - -void objSetBlockedPathUnblocked(struct defaultobj *blocker, bool unblocked) -{ - if (blocker->hidden & OBJHFLAG_02000000) { - struct blockedpathobj *bp = g_BlockedPaths; - - while (bp) { - if (bp->blocker == blocker) { - if (unblocked) { - waypointEnableSegment(&g_StageSetup.waypoints[bp->waypoint1], &g_StageSetup.waypoints[bp->waypoint2]); - break; - } else { - waypointDisableSegment(&g_StageSetup.waypoints[bp->waypoint1], &g_StageSetup.waypoints[bp->waypoint2]); - break; - } - } - - bp = bp->next; - } - } -} diff --git a/src/lib/lib_233c0.c b/src/lib/anim.c similarity index 97% rename from src/lib/lib_233c0.c rename to src/lib/anim.c index 423099337..04e625a7b 100644 --- a/src/lib/lib_233c0.c +++ b/src/lib/anim.c @@ -7,7 +7,7 @@ #include "lib/dma.h" #include "lib/memory.h" #include "lib/mtx.h" -#include "lib/lib_233c0.h" +#include "lib/anim.h" #include "lib/lib_2f490.h" #include "lib/libc/ll.h" #include "data.h" @@ -46,7 +46,7 @@ const u32 var700546a8[] = {0x40c907a9}; const u32 var700546ac[] = {0x3a83126f}; GLOBAL_ASM( -glabel func000233c0 +glabel anim000233c0 /* 233c0: 27bdffd8 */ addiu $sp,$sp,-40 /* 233c4: 3c0e007d */ lui $t6,%hi(_animationsTableRomEnd) /* 233c8: 3c0f007d */ lui $t7,%hi(_animationsTableRomStart) @@ -201,7 +201,7 @@ glabel func000233c0 /* 2360c: 0c0048f2 */ jal malloc /* 23610: 24050006 */ addiu $a1,$zero,0x6 /* 23614: 3c01800a */ lui $at,%hi(var8009a890) -/* 23618: 0c008d90 */ jal func00023640 +/* 23618: 0c008d90 */ jal anim00023640 /* 2361c: ac22a890 */ sw $v0,%lo(var8009a890)($at) /* 23620: 8fbf001c */ lw $ra,0x1c($sp) /* 23624: 3c018006 */ lui $at,%hi(var8005f024) @@ -214,7 +214,7 @@ glabel func000233c0 ); GLOBAL_ASM( -glabel func00023640 +glabel anim00023640 /* 23640: 3c048006 */ lui $a0,%hi(g_NumAnimations) /* 23644: 2484f008 */ addiu $a0,$a0,%lo(g_NumAnimations) /* 23648: 848e0000 */ lh $t6,0x0($a0) @@ -284,7 +284,7 @@ glabel func00023640 /* 23738: 00000000 */ nop ); -void func0002373c(void) +void anim0002373c(void) { g_NumAnimations = var8009a894; g_Anims = var8009a898; @@ -301,13 +301,13 @@ bool animHasFrames(s16 animnum) return animnum < g_NumAnimations && g_Anims[animnum].numframes > 0; } -s32 getNumAnimations(void) +s32 animGetNumAnimations(void) { return g_NumAnimations; } GLOBAL_ASM( -glabel func000237e8 +glabel anim000237e8 /* 237e8: 3c0e8006 */ lui $t6,%hi(var8005f020) /* 237ec: 8dcef020 */ lw $t6,%lo(var8005f020)($t6) /* 237f0: 27bdffe8 */ addiu $sp,$sp,-24 @@ -338,7 +338,7 @@ glabel func000237e8 ); GLOBAL_ASM( -glabel func0002384c +glabel anim0002384c /* 2384c: 3c0b8006 */ lui $t3,%hi(var8005f010) /* 23850: 8d6bf010 */ lw $t3,%lo(var8005f010)($t3) /* 23854: 00047400 */ sll $t6,$a0,0x10 @@ -392,7 +392,7 @@ glabel func0002384c ); GLOBAL_ASM( -glabel func00023908 +glabel anim00023908 /* 23908: 3c0b8006 */ lui $t3,%hi(var8005f010) /* 2390c: 8d6bf010 */ lw $t3,%lo(var8005f010)($t3) /* 23910: 00047400 */ sll $t6,$a0,0x10 @@ -453,7 +453,7 @@ glabel func00023908 ); GLOBAL_ASM( -glabel func000239e0 +glabel anim000239e0 /* 239e0: 3c098006 */ lui $t1,%hi(var8005f010) /* 239e4: 8d29f010 */ lw $t1,%lo(var8005f010)($t1) /* 239e8: 00047400 */ sll $t6,$a0,0x10 @@ -513,7 +513,7 @@ glabel func000239e0 ); GLOBAL_ASM( -glabel func00023ab0 +glabel anim00023ab0 /* 23ab0: 27bdffc0 */ addiu $sp,$sp,-64 /* 23ab4: afb10018 */ sw $s1,0x18($sp) /* 23ab8: 00048c00 */ sll $s1,$a0,0x10 @@ -594,7 +594,7 @@ glabel func00023ab0 /* 23bc8: 51a0000c */ beqzl $t5,.L00023bfc /* 23bcc: 94660002 */ lhu $a2,0x2($v1) /* 23bd0: afa7003c */ sw $a3,0x3c($sp) -/* 23bd4: 0c008e42 */ jal func00023908 +/* 23bd4: 0c008e42 */ jal anim00023908 /* 23bd8: afa90028 */ sw $t1,0x28($sp) /* 23bdc: 3c0f8006 */ lui $t7,%hi(g_Anims) /* 23be0: 8deff00c */ lw $t7,%lo(g_Anims)($t7) @@ -624,7 +624,7 @@ glabel func00023ab0 /* 23c3c: 00ed0019 */ multu $a3,$t5 /* 23c40: 00007012 */ mflo $t6 /* 23c44: 01cf2021 */ addu $a0,$t6,$t7 -/* 23c48: 0c008dfa */ jal func000237e8 +/* 23c48: 0c008dfa */ jal anim000237e8 /* 23c4c: 00000000 */ nop /* 23c50: 8fa7003c */ lw $a3,0x3c($sp) /* 23c54: 3c18800a */ lui $t8,%hi(var8009a874) @@ -680,7 +680,7 @@ glabel func00023ab0 ); GLOBAL_ASM( -glabel func00023d0c +glabel anim00023d0c /* 23d0c: 3c03800a */ lui $v1,%hi(var8009a880) /* 23d10: 2463a880 */ addiu $v1,$v1,%lo(var8009a880) /* 23d14: 00001025 */ or $v0,$zero,$zero @@ -696,7 +696,7 @@ glabel func00023d0c ); GLOBAL_ASM( -glabel func00023d38 +glabel anim00023d38 /* 23d38: 3c0b8006 */ lui $t3,%hi(var8005f010) /* 23d3c: 256bf010 */ addiu $t3,$t3,%lo(var8005f010) /* 23d40: 27bdffc0 */ addiu $sp,$sp,-64 @@ -792,7 +792,7 @@ glabel func00023d38 /* 23e90: afa70034 */ sw $a3,0x34($sp) /* 23e94: 00006012 */ mflo $t4 /* 23e98: afa30028 */ sw $v1,0x28($sp) -/* 23e9c: 0c008dfa */ jal func000237e8 +/* 23e9c: 0c008dfa */ jal anim000237e8 /* 23ea0: 01982021 */ addu $a0,$t4,$t8 /* 23ea4: 3c0d800a */ lui $t5,%hi(var8009a888) /* 23ea8: 8dada888 */ lw $t5,%lo(var8009a888)($t5) @@ -843,7 +843,7 @@ glabel func00023d38 ); GLOBAL_ASM( -glabel func00023f50 +glabel anim00023f50 /* 23f50: 30cf0007 */ andi $t7,$a2,0x7 /* 23f54: 24180008 */ addiu $t8,$zero,0x8 /* 23f58: 030f4023 */ subu $t0,$t8,$t7 @@ -886,11 +886,11 @@ glabel func00023f50 ); GLOBAL_ASM( -glabel func00023fe0 +glabel anim00023fe0 /* 23fe0: 27bdffe8 */ addiu $sp,$sp,-24 /* 23fe4: afbf0014 */ sw $ra,0x14($sp) /* 23fe8: afa5001c */ sw $a1,0x1c($sp) -/* 23fec: 0c008fd4 */ jal func00023f50 +/* 23fec: 0c008fd4 */ jal anim00023f50 /* 23ff0: 93a5001f */ lbu $a1,0x1f($sp) /* 23ff4: 93a3001f */ lbu $v1,0x1f($sp) /* 23ff8: 8fbf0014 */ lw $ra,0x14($sp) @@ -919,7 +919,7 @@ glabel func00023fe0 ); GLOBAL_ASM( -glabel func00024050 +glabel anim00024050 /* 24050: 27bdff98 */ addiu $sp,$sp,-104 /* 24054: 93b9007b */ lbu $t9,0x7b($sp) /* 24058: 3c18800a */ lui $t8,%hi(var8009a874) @@ -1054,7 +1054,7 @@ glabel func00024050 /* 2422c: afa20028 */ sw $v0,0x28($sp) /* 24230: 92050002 */ lbu $a1,0x2($s0) /* 24234: 02203025 */ or $a2,$s1,$zero -/* 24238: 0c008ff8 */ jal func00023fe0 +/* 24238: 0c008ff8 */ jal anim00023fe0 /* 2423c: a3a5005b */ sb $a1,0x5b($sp) /* 24240: 920d0001 */ lbu $t5,0x1($s0) /* 24244: 920a0000 */ lbu $t2,0x0($s0) @@ -1072,7 +1072,7 @@ glabel func00024050 /* 24274: e5060000 */ swc1 $f6,0x0($t0) /* 24278: 92050005 */ lbu $a1,0x5($s0) /* 2427c: 8fa40054 */ lw $a0,0x54($sp) -/* 24280: 0c008ff8 */ jal func00023fe0 +/* 24280: 0c008ff8 */ jal anim00023fe0 /* 24284: a3a5005b */ sb $a1,0x5b($sp) /* 24288: 92090004 */ lbu $t1,0x4($s0) /* 2428c: 920d0003 */ lbu $t5,0x3($s0) @@ -1090,7 +1090,7 @@ glabel func00024050 /* 242bc: e4ea0004 */ swc1 $f10,0x4($a3) /* 242c0: 92050008 */ lbu $a1,0x8($s0) /* 242c4: 8fa40054 */ lw $a0,0x54($sp) -/* 242c8: 0c008ff8 */ jal func00023fe0 +/* 242c8: 0c008ff8 */ jal anim00023fe0 /* 242cc: a3a5005b */ sb $a1,0x5b($sp) /* 242d0: 92190007 */ lbu $t9,0x7($s0) /* 242d4: 92080006 */ lbu $t0,0x6($s0) @@ -1118,7 +1118,7 @@ glabel func00024050 /* 24328: 92050000 */ lbu $a1,0x0($s0) /* 2432c: 8fa40054 */ lw $a0,0x54($sp) /* 24330: 02203025 */ or $a2,$s1,$zero -/* 24334: 0c008fd4 */ jal func00023f50 +/* 24334: 0c008fd4 */ jal anim00023f50 /* 24338: a3a5005b */ sb $a1,0x5b($sp) /* 2433c: 92190001 */ lbu $t9,0x1($s0) /* 24340: 920f0004 */ lbu $t7,0x4($s0) @@ -1143,7 +1143,7 @@ glabel func00024050 /* 2438c: e4ea0000 */ swc1 $f10,0x0($a3) /* 24390: 92050005 */ lbu $a1,0x5($s0) /* 24394: 8fa40054 */ lw $a0,0x54($sp) -/* 24398: 0c008fd4 */ jal func00023f50 +/* 24398: 0c008fd4 */ jal anim00023f50 /* 2439c: a3a5005b */ sb $a1,0x5b($sp) /* 243a0: 92080006 */ lbu $t0,0x6($s0) /* 243a4: 920f0009 */ lbu $t7,0x9($s0) @@ -1168,7 +1168,7 @@ glabel func00024050 /* 243f0: e4e60004 */ swc1 $f6,0x4($a3) /* 243f4: 9205000a */ lbu $a1,0xa($s0) /* 243f8: 8fa40054 */ lw $a0,0x54($sp) -/* 243fc: 0c008fd4 */ jal func00023f50 +/* 243fc: 0c008fd4 */ jal anim00023f50 /* 24400: a3a5005b */ sb $a1,0x5b($sp) /* 24404: 9209000b */ lbu $t1,0xb($s0) /* 24408: 920f000e */ lbu $t7,0xe($s0) @@ -1219,7 +1219,7 @@ glabel func00024050 /* 244b0: 31190010 */ andi $t9,$t0,0x10 /* 244b4: 92050002 */ lbu $a1,0x2($s0) /* 244b8: 02203025 */ or $a2,$s1,$zero -/* 244bc: 0c008fd4 */ jal func00023f50 +/* 244bc: 0c008fd4 */ jal anim00023f50 /* 244c0: a3a5005b */ sb $a1,0x5b($sp) /* 244c4: a7a2005c */ sh $v0,0x5c($sp) /* 244c8: 920a0000 */ lbu $t2,0x0($s0) @@ -1240,7 +1240,7 @@ glabel func00024050 /* 24504: afa30024 */ sw $v1,0x24($sp) /* 24508: 02203025 */ or $a2,$s1,$zero /* 2450c: 8fa40054 */ lw $a0,0x54($sp) -/* 24510: 0c008fd4 */ jal func00023f50 +/* 24510: 0c008fd4 */ jal anim00023f50 /* 24514: a3a5005b */ sb $a1,0x5b($sp) /* 24518: a7a2005e */ sh $v0,0x5e($sp) /* 2451c: 920d0003 */ lbu $t5,0x3($s0) @@ -1258,7 +1258,7 @@ glabel func00024050 /* 2454c: 92050008 */ lbu $a1,0x8($s0) /* 24550: 02203025 */ or $a2,$s1,$zero /* 24554: 8fa40054 */ lw $a0,0x54($sp) -/* 24558: 0c008fd4 */ jal func00023f50 +/* 24558: 0c008fd4 */ jal anim00023f50 /* 2455c: a3a5005b */ sb $a1,0x5b($sp) /* 24560: a7a20060 */ sh $v0,0x60($sp) /* 24564: 920d0006 */ lbu $t5,0x6($s0) @@ -1353,7 +1353,7 @@ glabel func00024050 /* 246a8: 8fa3007c */ lw $v1,0x7c($sp) /* 246ac: 8fa40054 */ lw $a0,0x54($sp) /* 246b0: 24050020 */ addiu $a1,$zero,0x20 -/* 246b4: 0c008fd4 */ jal func00023f50 +/* 246b4: 0c008fd4 */ jal anim00023f50 /* 246b8: 02203025 */ or $a2,$s1,$zero /* 246bc: 27b00038 */ addiu $s0,$sp,0x38 /* 246c0: afa20038 */ sw $v0,0x38($sp) @@ -1363,7 +1363,7 @@ glabel func00024050 /* 246d0: 02203025 */ or $a2,$s1,$zero /* 246d4: e4720000 */ swc1 $f18,0x0($v1) /* 246d8: 8fa40054 */ lw $a0,0x54($sp) -/* 246dc: 0c008fd4 */ jal func00023f50 +/* 246dc: 0c008fd4 */ jal anim00023f50 /* 246e0: 24050020 */ addiu $a1,$zero,0x20 /* 246e4: afa20038 */ sw $v0,0x38($sp) /* 246e8: 8fa3007c */ lw $v1,0x7c($sp) @@ -1372,7 +1372,7 @@ glabel func00024050 /* 246f4: 02203025 */ or $a2,$s1,$zero /* 246f8: e4640004 */ swc1 $f4,0x4($v1) /* 246fc: 8fa40054 */ lw $a0,0x54($sp) -/* 24700: 0c008fd4 */ jal func00023f50 +/* 24700: 0c008fd4 */ jal anim00023f50 /* 24704: 24050020 */ addiu $a1,$zero,0x20 /* 24708: afa20038 */ sw $v0,0x38($sp) /* 2470c: 8fa3007c */ lw $v1,0x7c($sp) @@ -1416,7 +1416,7 @@ glabel func00024050 /* 24794: 11e00018 */ beqz $t7,.L000247f8 /* 24798: 3c013f80 */ lui $at,0x3f80 /* 2479c: 24050020 */ addiu $a1,$zero,0x20 -/* 247a0: 0c008fd4 */ jal func00023f50 +/* 247a0: 0c008fd4 */ jal anim00023f50 /* 247a4: 02203025 */ or $a2,$s1,$zero /* 247a8: afa20034 */ sw $v0,0x34($sp) /* 247ac: 8fb00084 */ lw $s0,0x84($sp) @@ -1425,14 +1425,14 @@ glabel func00024050 /* 247b8: 02203025 */ or $a2,$s1,$zero /* 247bc: e6100000 */ swc1 $f16,0x0($s0) /* 247c0: 8fa40054 */ lw $a0,0x54($sp) -/* 247c4: 0c008fd4 */ jal func00023f50 +/* 247c4: 0c008fd4 */ jal anim00023f50 /* 247c8: 24050020 */ addiu $a1,$zero,0x20 /* 247cc: afa20034 */ sw $v0,0x34($sp) /* 247d0: c7b20034 */ lwc1 $f18,0x34($sp) /* 247d4: 26260020 */ addiu $a2,$s1,0x20 /* 247d8: 24050020 */ addiu $a1,$zero,0x20 /* 247dc: e6120004 */ swc1 $f18,0x4($s0) -/* 247e0: 0c008fd4 */ jal func00023f50 +/* 247e0: 0c008fd4 */ jal anim00023f50 /* 247e4: 8fa40054 */ lw $a0,0x54($sp) /* 247e8: afa20034 */ sw $v0,0x34($sp) /* 247ec: c7a40034 */ lwc1 $f4,0x34($sp) @@ -1469,7 +1469,7 @@ glabel func00024050 ); GLOBAL_ASM( -glabel func0002485c +glabel anim0002485c /* 2485c: 27bdffc8 */ addiu $sp,$sp,-56 /* 24860: 8fb80050 */ lw $t8,0x50($sp) /* 24864: 00077400 */ sll $t6,$a3,0x10 @@ -1497,12 +1497,12 @@ glabel func0002485c /* 248b8: 00072400 */ sll $a0,$a3,0x10 /* 248bc: 00046403 */ sra $t4,$a0,0x10 /* 248c0: 01802025 */ or $a0,$t4,$zero -/* 248c4: 0c008f4e */ jal func00023d38 +/* 248c4: 0c008f4e */ jal anim00023d38 /* 248c8: a7a70046 */ sh $a3,0x46($sp) /* 248cc: 87a40046 */ lh $a0,0x46($sp) -/* 248d0: 0c008eac */ jal func00023ab0 +/* 248d0: 0c008eac */ jal anim00023ab0 /* 248d4: 8fa50048 */ lw $a1,0x48($sp) -/* 248d8: 0c008f43 */ jal func00023d0c +/* 248d8: 0c008f43 */ jal anim00023d0c /* 248dc: a3a2002e */ sb $v0,0x2e($sp) /* 248e0: 93ae002e */ lbu $t6,0x2e($sp) /* 248e4: 3c0d800a */ lui $t5,%hi(var8009a874) @@ -1606,7 +1606,7 @@ glabel func0002485c /* 24a40: afa60030 */ sw $a2,0x30($sp) /* 24a44: afa30024 */ sw $v1,0x24($sp) /* 24a48: 00e02025 */ or $a0,$a3,$zero -/* 24a4c: 0c008ff8 */ jal func00023fe0 +/* 24a4c: 0c008ff8 */ jal anim00023fe0 /* 24a50: a3a5002f */ sb $a1,0x2f($sp) /* 24a54: 8fa30024 */ lw $v1,0x24($sp) /* 24a58: 93a5002f */ lbu $a1,0x2f($sp) @@ -1622,7 +1622,7 @@ glabel func0002485c /* 24a80: 90650006 */ lbu $a1,0x6($v1) /* 24a84: afa60030 */ sw $a2,0x30($sp) /* 24a88: 8fa40028 */ lw $a0,0x28($sp) -/* 24a8c: 0c008ff8 */ jal func00023fe0 +/* 24a8c: 0c008ff8 */ jal anim00023fe0 /* 24a90: a3a5002f */ sb $a1,0x2f($sp) /* 24a94: 8fa30024 */ lw $v1,0x24($sp) /* 24a98: 93a5002f */ lbu $a1,0x2f($sp) @@ -1638,7 +1638,7 @@ glabel func0002485c /* 24ac0: 90650009 */ lbu $a1,0x9($v1) /* 24ac4: afa60030 */ sw $a2,0x30($sp) /* 24ac8: 8fa40028 */ lw $a0,0x28($sp) -/* 24acc: 0c008ff8 */ jal func00023fe0 +/* 24acc: 0c008ff8 */ jal anim00023fe0 /* 24ad0: a3a5002f */ sb $a1,0x2f($sp) /* 24ad4: 8fa30024 */ lw $v1,0x24($sp) /* 24ad8: 93a5002f */ lbu $a1,0x2f($sp) @@ -1651,7 +1651,7 @@ glabel func0002485c /* 24af4: 012a5821 */ addu $t3,$t1,$t2 /* 24af8: a60b0004 */ sh $t3,0x4($s0) /* 24afc: 8fa40028 */ lw $a0,0x28($sp) -/* 24b00: 0c008ff8 */ jal func00023fe0 +/* 24b00: 0c008ff8 */ jal anim00023fe0 /* 24b04: 9065000c */ lbu $a1,0xc($v1) /* 24b08: 8fa30024 */ lw $v1,0x24($sp) /* 24b0c: 8fb9003c */ lw $t9,0x3c($sp) @@ -1680,7 +1680,7 @@ glabel func0002485c ); GLOBAL_ASM( -glabel func00024b64 +glabel anim00024b64 /* 24b64: 27bdffc8 */ addiu $sp,$sp,-56 /* 24b68: 8fb80048 */ lw $t8,0x48($sp) /* 24b6c: 8fa80050 */ lw $t0,0x50($sp) @@ -1691,7 +1691,7 @@ glabel func00024b64 /* 24b80: 000e3c03 */ sra $a3,$t6,0x10 /* 24b84: afb90014 */ sw $t9,0x14($sp) /* 24b88: afb80010 */ sw $t8,0x10($sp) -/* 24b8c: 0c009217 */ jal func0002485c +/* 24b8c: 0c009217 */ jal anim0002485c /* 24b90: afa80018 */ sw $t0,0x18($sp) /* 24b94: 87a90030 */ lh $t1,0x30($sp) /* 24b98: 8fa3004c */ lw $v1,0x4c($sp) @@ -1729,7 +1729,7 @@ glabel func00024b64 ); GLOBAL_ASM( -glabel func00024c14 +glabel anim00024c14 /* 24c14: 27bdffd0 */ addiu $sp,$sp,-48 /* 24c18: 3c19800a */ lui $t9,%hi(var8009a874) /* 24c1c: 8f39a874 */ lw $t9,%lo(var8009a874)($t9) @@ -1853,7 +1853,7 @@ glabel func00024c14 /* 24dc8: 11c00017 */ beqz $t6,.L00024e28 /* 24dcc: 00e03025 */ or $a2,$a3,$zero /* 24dd0: 90650000 */ lbu $a1,0x0($v1) -/* 24dd4: 0c008fd4 */ jal func00023f50 +/* 24dd4: 0c008fd4 */ jal anim00023f50 /* 24dd8: afa30020 */ sw $v1,0x20($sp) /* 24ddc: 8fa30020 */ lw $v1,0x20($sp) /* 24de0: 3c017005 */ lui $at,%hi(var700546ac) diff --git a/src/lib/args.c b/src/lib/args.c index c013a540c..ad9f7e02b 100644 --- a/src/lib/args.c +++ b/src/lib/args.c @@ -2,7 +2,7 @@ #include "constants.h" #include "bss.h" #include "lib/args.h" -#include "lib/lib_2fa00.h" +#include "lib/rmon.h" #include "data.h" #include "types.h" diff --git a/src/lib/boot.c b/src/lib/boot.c index 1c2e44952..8091ff346 100644 --- a/src/lib/boot.c +++ b/src/lib/boot.c @@ -9,12 +9,12 @@ #include "lib/args.h" #include "lib/rzip.h" #include "lib/lib_09660.h" -#include "lib/lib_0c000.h" +#include "lib/crash.h" #include "lib/main.h" #include "lib/snd.h" -#include "lib/lib_13710.h" +#include "lib/pimgr.h" #include "lib/lib_13750.h" -#include "lib/lib_2fa00.h" +#include "lib/rmon.h" #include "lib/lib_48150.h" #include "data.h" #include "types.h" @@ -774,7 +774,7 @@ void bootPhase2(void *arg) { bootCreateIdleThread(); func00013750(); - func00013710(); + pimgrCreate(); bootCreateRmonThread(); if (argsParseDebugArgs()) { diff --git a/src/lib/lib_24e40.c b/src/lib/collision.c similarity index 95% rename from src/lib/lib_24e40.c rename to src/lib/collision.c index 984e8e01b..7449899e9 100644 --- a/src/lib/lib_24e40.c +++ b/src/lib/collision.c @@ -9,8 +9,8 @@ #include "lib/memory.h" #include "lib/mtx.h" #include "lib/lib_17ce0.h" -#include "lib/lib_233c0.h" -#include "lib/lib_24e40.h" +#include "lib/anim.h" +#include "lib/collision.h" #include "lib/lib_2f490.h" #include "lib/libc/ll.h" #include "data.h" @@ -69,12 +69,12 @@ u32 var8005f030 = 0x00000000; u32 var8005f034 = 0x00000000; u32 var8005f038 = 0x00000000; -f32 func00024e40(void) +f32 cd00024e40(void) { return var8009a8f0; } -void func00024e4c(struct coord *a, struct coord *b, u32 line, char *file) +void cd00024e4c(struct coord *a, struct coord *b, u32 line, char *file) { a->x = var8009a8b8.x; a->y = var8009a8b8.y; @@ -85,12 +85,12 @@ void func00024e4c(struct coord *a, struct coord *b, u32 line, char *file) b->z = var8009a8c8.z; } -f32 func00024e98(void) +f32 cd00024e98(void) { return var8009a8b0; } -s32 func00024ea4(void) +s32 cd00024ea4(void) { return var8009a8ac; } @@ -107,9 +107,9 @@ void cdGetPos(struct coord *pos, u32 line, char *file) pos->z = g_CdPos.z; } -void func00024ee8(struct coord *arg0) +void cd00024ee8(struct coord *arg0) { - func00025928(var8009a964, arg0); + cd00025928(var8009a964, arg0); } u32 cdGetTileFlags(void) @@ -134,7 +134,7 @@ u32 cdGetTileFlags(void) return flags; } -void func00024f6c(void) +void cd00024f6c(void) { var8009a8b4 = 0; var8009a8ac = 0; @@ -146,7 +146,7 @@ void func00024f6c(void) var8005f038 = 0; } -void func00024fb0(struct coord *arg0, struct coord *arg1, struct prop *prop) +void cd00024fb0(struct coord *arg0, struct coord *arg1, struct prop *prop) { var8009a8b8.x = arg0->x; var8009a8b8.y = arg0->y; @@ -167,7 +167,7 @@ void func00024fb0(struct coord *arg0, struct coord *arg1, struct prop *prop) } GLOBAL_ASM( -glabel func00025038 +glabel cd00025038 /* 25038: 44876000 */ mtc1 $a3,$f12 /* 2503c: 3c01800a */ lui $at,%hi(var8009a8b0) /* 25040: 3c02800a */ lui $v0,%hi(var8009a8b8) @@ -207,7 +207,7 @@ glabel func00025038 /* 250c8: ac20f038 */ sw $zero,%lo(var8005f038)($at) ); -void func000250cc(struct coord *arg0, struct coord *arg1, f32 width) +void cd000250cc(struct coord *arg0, struct coord *arg1, f32 width) { f32 sp38[2]; f32 sp34; @@ -233,7 +233,7 @@ void func000250cc(struct coord *arg0, struct coord *arg1, f32 width) var8009a8ac = 1; } -void func00025168(struct prop *prop) +void cd00025168(struct prop *prop) { var8009a8b4 = 0; var8009a8ac = 0; @@ -246,7 +246,7 @@ void func00025168(struct prop *prop) } GLOBAL_ASM( -glabel func000251ac +glabel cd000251ac /* 251ac: c4840000 */ lwc1 $f4,0x0($a0) /* 251b0: 3c02800a */ lui $v0,%hi(var8009a8b8) /* 251b4: 2442a8b8 */ addiu $v0,$v0,%lo(var8009a8b8) @@ -291,7 +291,7 @@ glabel func000251ac /* 25250: ac20f038 */ sw $zero,%lo(var8005f038)($at) ); -void func00025254(struct coord *arg0, struct coord *arg1, struct coord *pos, struct prop *prop, f32 arg4, struct tile *tile) +void cd00025254(struct coord *arg0, struct coord *arg1, struct coord *pos, struct prop *prop, f32 arg4, struct tile *tile) { var8009a8b8.x = arg0->x; var8009a8b8.y = arg0->y; @@ -318,7 +318,7 @@ void func00025254(struct coord *arg0, struct coord *arg1, struct coord *pos, str } GLOBAL_ASM( -glabel func00025314 +glabel cd00025314 /* 25314: c4840000 */ lwc1 $f4,0x0($a0) /* 25318: 3c02800a */ lui $v0,%hi(var8009a8f8) /* 2531c: 2442a8f8 */ addiu $v0,$v0,%lo(var8009a8f8) @@ -342,7 +342,7 @@ glabel func00025314 ); GLOBAL_ASM( -glabel func00025364 +glabel cd00025364 /* 25364: 3c03800a */ lui $v1,%hi(var8009a8f4) /* 25368: 8c63a8f4 */ lw $v1,%lo(var8009a8f4)($v1) /* 2536c: 3c02800a */ lui $v0,%hi(var8009a8f8) @@ -371,7 +371,7 @@ glabel func00025364 ); GLOBAL_ASM( -glabel func000253c4 +glabel cd000253c4 /* 253c4: 3c0e800a */ lui $t6,%hi(var8009a918) /* 253c8: 25cea918 */ addiu $t6,$t6,%lo(var8009a918) /* 253cc: 00804025 */ or $t0,$a0,$zero @@ -395,7 +395,7 @@ glabel func000253c4 ); GLOBAL_ASM( -glabel func00025410 +glabel cd00025410 /* 25410: afa60008 */ sw $a2,0x8($sp) /* 25414: c7a40008 */ lwc1 $f4,0x8($sp) /* 25418: afa7000c */ sw $a3,0xc($sp) @@ -454,7 +454,7 @@ glabel func00025410 ); GLOBAL_ASM( -glabel func000254d8 +glabel cd000254d8 /* 254d8: 27bdffa8 */ addiu $sp,$sp,-88 /* 254dc: afa60060 */ sw $a2,0x60($sp) /* 254e0: afa70064 */ sw $a3,0x64($sp) @@ -478,7 +478,7 @@ glabel func000254d8 /* 25528: e7a20050 */ swc1 $f2,0x50($sp) /* 2552c: 460a9381 */ sub.s $f14,$f18,$f10 /* 25530: e7ac0028 */ swc1 $f12,0x28($sp) -/* 25534: 0c009504 */ jal func00025410 +/* 25534: 0c009504 */ jal cd00025410 /* 25538: e7ae0024 */ swc1 $f14,0x24($sp) /* 2553c: 8fa3005c */ lw $v1,0x5c($sp) /* 25540: afa2003c */ sw $v0,0x3c($sp) @@ -492,7 +492,7 @@ glabel func000254d8 /* 25560: 46082401 */ sub.s $f16,$f4,$f8 /* 25564: 44075000 */ mfc1 $a3,$f10 /* 25568: 44068000 */ mfc1 $a2,$f16 -/* 2556c: 0c009504 */ jal func00025410 +/* 2556c: 0c009504 */ jal cd00025410 /* 25570: 00000000 */ nop /* 25574: 8fae003c */ lw $t6,0x3c($sp) /* 25578: 8fa3005c */ lw $v1,0x5c($sp) @@ -513,7 +513,7 @@ glabel func000254d8 /* 255b4: 46009287 */ neg.s $f10,$f18 /* 255b8: 44074000 */ mfc1 $a3,$f8 /* 255bc: 44065000 */ mfc1 $a2,$f10 -/* 255c0: 0c009504 */ jal func00025410 +/* 255c0: 0c009504 */ jal cd00025410 /* 255c4: e7ae0048 */ swc1 $f14,0x48($sp) /* 255c8: afa20034 */ sw $v0,0x34($sp) /* 255cc: c6040008 */ lwc1 $f4,0x8($s0) @@ -526,7 +526,7 @@ glabel func000254d8 /* 255e8: 46045201 */ sub.s $f8,$f10,$f4 /* 255ec: 44069000 */ mfc1 $a2,$f18 /* 255f0: 44074000 */ mfc1 $a3,$f8 -/* 255f4: 0c009504 */ jal func00025410 +/* 255f4: 0c009504 */ jal cd00025410 /* 255f8: 00000000 */ nop /* 255fc: 8fb80034 */ lw $t8,0x34($sp) /* 25600: 24030001 */ addiu $v1,$zero,0x1 @@ -555,7 +555,7 @@ glabel func000254d8 /* 25650: 00601025 */ or $v0,$v1,$zero ); -f32 func00025654(f32 x1, f32 z1, f32 x2, f32 z2, f32 x3, f32 z3) +f32 cd00025654(f32 x1, f32 z1, f32 x2, f32 z2, f32 x3, f32 z3) { u32 stack[8]; f32 result; @@ -569,7 +569,7 @@ f32 func00025654(f32 x1, f32 z1, f32 x2, f32 z2, f32 x3, f32 z3) return ((x3 - x1) * (z2 - z1) + -(x2 - x1) * (z3 - z1)) / result; } -f32 func00025724(f32 x1, f32 z1, f32 x2, f32 z2) +f32 cd00025724(f32 x1, f32 z1, f32 x2, f32 z2) { x2 -= x1; z2 -= z1; @@ -577,7 +577,7 @@ f32 func00025724(f32 x1, f32 z1, f32 x2, f32 z2) return sqrtf(x2 * x2 + z2 * z2); } -bool func00025774(f32 x1, f32 z1, f32 x2, f32 z2, f32 x3, f32 z3) +bool cd00025774(f32 x1, f32 z1, f32 x2, f32 z2, f32 x3, f32 z3) { f32 f0; f32 f2; @@ -596,7 +596,7 @@ bool func00025774(f32 x1, f32 z1, f32 x2, f32 z2, f32 x3, f32 z3) return (f18 < f16 && f16 < 0) || (f16 > 0 && f16 < f18); } -void func00025848(f32 tilex, f32 tilez, f32 tilewidth, f32 posx, f32 posz, f32 *x1, f32 *z1, f32 *x2, f32 *z2) +void cd00025848(f32 tilex, f32 tilez, f32 tilewidth, f32 posx, f32 posz, f32 *x1, f32 *z1, f32 *x2, f32 *z2) { posx -= tilex; posz -= tilez; @@ -617,7 +617,7 @@ void func00025848(f32 tilex, f32 tilez, f32 tilewidth, f32 posx, f32 posz, f32 * *z2 = tilez + posz + posx; } -void func00025928(struct tile *tile, struct coord *arg1) +void cd00025928(struct tile *tile, struct coord *arg1) { if (tile->type == TILETYPE_00) { struct tiletype0 *tile0 = (struct tiletype0 *) tile; @@ -667,7 +667,7 @@ void func00025928(struct tile *tile, struct coord *arg1) } } -void tileGetFloorCol(struct tile *tile, u16 *floorcol) +void cdGetFloorCol(struct tile *tile, u16 *floorcol) { if (tile == NULL) { *floorcol = 0xfff; @@ -696,7 +696,7 @@ void tileGetFloorCol(struct tile *tile, u16 *floorcol) } } -void tileGetFloorType(struct tile *tile, u8 *floortype) +void cdGetFloorType(struct tile *tile, u8 *floortype) { bool water = false; @@ -1089,7 +1089,7 @@ bool func000266a4(f32 x, f32 z, struct tile *tile) /** * For a lift or escalator step, find the props which are riding on it. */ -void platformGetRidingProps(struct prop *platform, s16 *propnums, s32 maxlen) +void cdGetPropsOnPlatform(struct prop *platform, s16 *propnums, s32 maxlen) { u8 *start; u8 *end; @@ -1185,7 +1185,7 @@ void cdSetPropYBounds(struct prop *prop, f32 ymax, f32 ymin) } #endif -bool func00026a04(struct coord *pos, u8 *start, u8 *end, u16 flags, s32 room, struct tile **tileptr, s32 *roomptr, f32 *groundptr, bool arg8) +bool cd00026a04(struct coord *pos, u8 *start, u8 *end, u16 flags, s32 room, struct tile **tileptr, s32 *roomptr, f32 *groundptr, bool arg8) { bool result = false; struct tile *tile = (struct tile *) start; @@ -1253,7 +1253,7 @@ bool func00026a04(struct coord *pos, u8 *start, u8 *end, u16 flags, s32 room, st return result; } -void func00026e7c(struct coord *pos, s16 *rooms, u16 arg2, struct tile **tileptr, s16 *arg4, f32 *arg5, struct prop **arg6, s32 arg7) +void cd00026e7c(struct coord *pos, s16 *rooms, u16 arg2, struct tile **tileptr, s16 *arg4, f32 *arg5, struct prop **arg6, s32 arg7) { s16 *roomptr; s32 roomnum; @@ -1280,7 +1280,7 @@ void func00026e7c(struct coord *pos, s16 *rooms, u16 arg2, struct tile **tileptr start = g_TileFileData.u8 + g_TileRooms[roomnum]; end = g_TileFileData.u8 + g_TileRooms[roomnum + 1]; - func00026a04(pos, start, end, arg2, roomnum, &sp270, &sp26c, &sp274, arg7); + cd00026a04(pos, start, end, arg2, roomnum, &sp270, &sp26c, &sp274, arg7); } roomptr++; @@ -1294,7 +1294,7 @@ void func00026e7c(struct coord *pos, s16 *rooms, u16 arg2, struct tile **tileptr struct prop *prop = &g_Vars.props[*propnumptr]; if (propUpdateGeometry(prop, &start, &end) - && func00026a04(pos, start, end, arg2, prop->rooms[0], &sp270, &sp26c, &sp274, arg7)) { + && cd00026a04(pos, start, end, arg2, prop->rooms[0], &sp270, &sp26c, &sp274, arg7)) { sp268 = prop; } @@ -1310,7 +1310,7 @@ void func00026e7c(struct coord *pos, s16 *rooms, u16 arg2, struct tile **tileptr } } -bool func0002709c(struct tiletype0 *tile, f32 x, f32 z, f32 width, struct prop *prop, struct collisionthing *thing) +bool cd0002709c(struct tiletype0 *tile, f32 x, f32 z, f32 width, struct prop *prop, struct collisionthing *thing) { bool result = false; @@ -1325,16 +1325,16 @@ bool func0002709c(struct tiletype0 *tile, f32 x, f32 z, f32 width, struct prop * for (i = 0; i < numvertices; i++) { s32 next = (i + 1) % numvertices; - f32 value = func00025654(tile->vertices[i][0], tile->vertices[i][2], tile->vertices[next][0], tile->vertices[next][2], x, z); + f32 value = cd00025654(tile->vertices[i][0], tile->vertices[i][2], tile->vertices[next][0], tile->vertices[next][2], x, z); if (value < 0) { value = -value; } if (value <= width - && (func00025724(tile->vertices[i][0], tile->vertices[i][2], x, z) <= width - || func00025724(tile->vertices[next][0], tile->vertices[next][2], x, z) <= width - || func00025774(tile->vertices[i][0], tile->vertices[i][2], tile->vertices[next][0], tile->vertices[next][2], x, z))) { + && (cd00025724(tile->vertices[i][0], tile->vertices[i][2], x, z) <= width + || cd00025724(tile->vertices[next][0], tile->vertices[next][2], x, z) <= width + || cd00025774(tile->vertices[i][0], tile->vertices[i][2], tile->vertices[next][0], tile->vertices[next][2], x, z))) { thing->tile = &tile->header; thing->unk08 = i; thing->prop = prop; @@ -1347,7 +1347,7 @@ bool func0002709c(struct tiletype0 *tile, f32 x, f32 z, f32 width, struct prop * return result; } -bool func000272f8(struct tiletype1 *tile, f32 x, f32 z, f32 width, struct prop *prop, struct collisionthing *thing) +bool cd000272f8(struct tiletype1 *tile, f32 x, f32 z, f32 width, struct prop *prop, struct collisionthing *thing) { bool result = false; @@ -1362,16 +1362,16 @@ bool func000272f8(struct tiletype1 *tile, f32 x, f32 z, f32 width, struct prop * for (i = 0; i < numvertices; i++) { s32 next = (i + 1) % numvertices; - f32 value = func00025654(tile->vertices[i].x, tile->vertices[i].z, tile->vertices[next].x, tile->vertices[next].z, x, z); + f32 value = cd00025654(tile->vertices[i].x, tile->vertices[i].z, tile->vertices[next].x, tile->vertices[next].z, x, z); if (value < 0) { value = -value; } if (value <= width - && (func00025724(tile->vertices[i].x, tile->vertices[i].z, x, z) <= width - || func00025724(tile->vertices[next].x, tile->vertices[next].z, x, z) <= width - || func00025774(tile->vertices[i].x, tile->vertices[i].z, tile->vertices[next].x, tile->vertices[next].z, x, z))) { + && (cd00025724(tile->vertices[i].x, tile->vertices[i].z, x, z) <= width + || cd00025724(tile->vertices[next].x, tile->vertices[next].z, x, z) <= width + || cd00025774(tile->vertices[i].x, tile->vertices[i].z, tile->vertices[next].x, tile->vertices[next].z, x, z))) { thing->tile = &tile->header; thing->unk08 = i; thing->prop = prop; @@ -1384,7 +1384,7 @@ bool func000272f8(struct tiletype1 *tile, f32 x, f32 z, f32 width, struct prop * return result; } -s32 func000274e0(struct tiletype2 *tile, f32 x, f32 z, f32 width, struct prop *prop, struct collisionthing *thing) +s32 cd000274e0(struct tiletype2 *tile, f32 x, f32 z, f32 width, struct prop *prop, struct collisionthing *thing) { bool result = false; @@ -1402,7 +1402,7 @@ s32 func000274e0(struct tiletype2 *tile, f32 x, f32 z, f32 width, struct prop *p for (i = 0; i < numvertices; i++) { s32 next = (i + 1) % numvertices; - f32 value = func00025654(tile->vertices[i][0], tile->vertices[i][1], + f32 value = cd00025654(tile->vertices[i][0], tile->vertices[i][1], tile->vertices[next][0], tile->vertices[next][1], x, z); @@ -1411,9 +1411,9 @@ s32 func000274e0(struct tiletype2 *tile, f32 x, f32 z, f32 width, struct prop *p } if (value <= width - && (func00025724(tile->vertices[i][0], tile->vertices[i][1], x, z) <= width - || func00025724(tile->vertices[next][0], tile->vertices[next][1], x, z) <= width - || func00025774(tile->vertices[i][0], tile->vertices[i][1], tile->vertices[next][0], tile->vertices[next][1], x, z))) { + && (cd00025724(tile->vertices[i][0], tile->vertices[i][1], x, z) <= width + || cd00025724(tile->vertices[next][0], tile->vertices[next][1], x, z) <= width + || cd00025774(tile->vertices[i][0], tile->vertices[i][1], tile->vertices[next][0], tile->vertices[next][1], x, z))) { if (thing) { thing->tile = &tile->header; thing->unk08 = i; @@ -1429,7 +1429,7 @@ s32 func000274e0(struct tiletype2 *tile, f32 x, f32 z, f32 width, struct prop *p return result; } -bool func000276c8(struct tiletype3 *tile, f32 x, f32 z, f32 width, struct prop *prop, struct collisionthing *thing) +bool cd000276c8(struct tiletype3 *tile, f32 x, f32 z, f32 width, struct prop *prop, struct collisionthing *thing) { bool result = false; @@ -1450,7 +1450,7 @@ bool func000276c8(struct tiletype3 *tile, f32 x, f32 z, f32 width, struct prop * return result; } -void func00027738(struct coord *pos, f32 width, u8 *start, u8 *end, u16 flags, +void cd00027738(struct coord *pos, f32 width, u8 *start, u8 *end, u16 flags, bool checkvertical, f32 arg6, f32 arg7, struct prop *prop, struct collisionthing *things, s32 maxthings, s32 *thingnum, s32 roomnum) { @@ -1469,13 +1469,13 @@ void func00027738(struct coord *pos, f32 width, u8 *start, u8 *end, u16 flags, && (!checkvertical || (pos->y + arg6 >= *(s16 *)(type0->ymin + (u32)type0) && pos->y + arg7 <= *(s16 *)(type0->ymax + (u32)type0)))) { if (tile->flags & TILEFLAG_0080) { - result = func00028200(type0, pos, width, pos->y + arg7, pos->y + arg6); + result = cd00028200(type0, pos, width, pos->y + arg7, pos->y + arg6); } else { result = 1; } if (result != 0) { - if (func0002709c(type0, pos->x, pos->z, width, prop, &things[*thingnum])) { + if (cd0002709c(type0, pos->x, pos->z, width, prop, &things[*thingnum])) { things[*thingnum].roomnum = roomnum; *thingnum = *thingnum + 1; @@ -1498,7 +1498,7 @@ void func00027738(struct coord *pos, f32 width, u8 *start, u8 *end, u16 flags, && pos->z <= *(f32 *)((u32)type1 + type1->zmax * 0xc + 0x18) + width && (!checkvertical || (pos->y + arg6 >= *(f32*)((u32)type1 + type1->ymin * 0xc + 0x14) && pos->y + arg7 <= *(f32 *)((u32)type1 + type1->ymax * 0xc + 0x14)))) { - result = func000272f8(type1, pos->x, pos->z, width, prop, &things[*thingnum]); + result = cd000272f8(type1, pos->x, pos->z, width, prop, &things[*thingnum]); if (result != 0) { things[*thingnum].roomnum = roomnum; @@ -1517,7 +1517,7 @@ void func00027738(struct coord *pos, f32 width, u8 *start, u8 *end, u16 flags, if ((flags & (TILEFLAG_0004 | TILEFLAG_0008 | TILEFLAG_0010)) && (!checkvertical || (pos->y + arg6 >= tile2->ymin && pos->y + arg7 <= tile2->ymax))) { - result = func000274e0(tile2, pos->x, pos->z, width, prop, &things[*thingnum]); + result = cd000274e0(tile2, pos->x, pos->z, width, prop, &things[*thingnum]); if (result) { things[*thingnum].roomnum = roomnum; @@ -1536,7 +1536,7 @@ void func00027738(struct coord *pos, f32 width, u8 *start, u8 *end, u16 flags, if ((flags & tile->flags) && (!checkvertical || (pos->y + arg6 >= tile3->ymin && pos->y + arg7 <= tile3->ymax))) { - result = func000276c8(tile3, pos->x, pos->z, width, prop, &things[*thingnum]); + result = cd000276c8(tile3, pos->x, pos->z, width, prop, &things[*thingnum]); if (result) { things[*thingnum].roomnum = roomnum; @@ -1553,7 +1553,7 @@ void func00027738(struct coord *pos, f32 width, u8 *start, u8 *end, u16 flags, } } -void func00027d1c(struct coord *pos, f32 width, s16 *rooms, u32 types, u16 arg4, u32 arg5, f32 arg6, f32 arg7, struct collisionthing *arg8, s32 arg9) +void cd00027d1c(struct coord *pos, f32 width, s16 *rooms, u32 types, u16 arg4, u32 arg5, f32 arg6, f32 arg7, struct collisionthing *arg8, s32 arg9) { s16 *roomptr; s32 roomnum; @@ -1573,7 +1573,7 @@ void func00027d1c(struct coord *pos, f32 width, s16 *rooms, u32 types, u16 arg4, start = g_TileFileData.u8 + g_TileRooms[roomnum]; end = g_TileFileData.u8 + g_TileRooms[roomnum + 1]; - func00027738(pos, width, start, end, arg4, arg5, arg6, arg7, NULL, arg8, arg9, &sp294, roomnum); + cd00027738(pos, width, start, end, arg4, arg5, arg6, arg7, NULL, arg8, arg9, &sp294, roomnum); if (sp294 >= arg9) { goto end; @@ -1593,7 +1593,7 @@ void func00027d1c(struct coord *pos, f32 width, s16 *rooms, u32 types, u16 arg4, struct prop *prop = &g_Vars.props[*propnumptr]; if (propIsOfCdType(prop, types) && propUpdateGeometry(prop, &start, &end)) { - func00027738(pos, width, start, end, arg4, arg5, arg6, arg7, prop, arg8, arg9, &sp294, prop->rooms[0]); + cd00027738(pos, width, start, end, arg4, arg5, arg6, arg7, prop, arg8, arg9, &sp294, prop->rooms[0]); if (sp294 >= arg9) { break; @@ -1608,7 +1608,7 @@ end: } GLOBAL_ASM( -glabel func00027f78 +glabel cd00027f78 /* 27f78: 27bdff98 */ addiu $sp,$sp,-104 /* 27f7c: afbf0064 */ sw $ra,0x64($sp) /* 27f80: afbe0060 */ sw $s8,0x60($sp) @@ -1677,7 +1677,7 @@ glabel func00027f78 /* 2806c: 44064000 */ mfc1 $a2,$f8 /* 28070: 46802320 */ cvt.s.w $f12,$f4 /* 28074: 44075000 */ mfc1 $a3,$f10 -/* 28078: 0c009595 */ jal func00025654 +/* 28078: 0c009595 */ jal cd00025654 /* 2807c: 468033a0 */ cvt.s.w $f14,$f6 /* 28080: 461a003c */ c.lt.s $f0,$f26 /* 28084: 46000086 */ mov.s $f2,$f0 @@ -1696,7 +1696,7 @@ glabel func00027f78 /* 280b4: 448b9000 */ mtc1 $t3,$f18 /* 280b8: 4407b000 */ mfc1 $a3,$f22 /* 280bc: 46808320 */ cvt.s.w $f12,$f16 -/* 280c0: 0c0095c9 */ jal func00025724 +/* 280c0: 0c0095c9 */ jal cd00025724 /* 280c4: 468093a0 */ cvt.s.w $f14,$f18 /* 280c8: 4618003e */ c.le.s $f0,$f24 /* 280cc: 00000000 */ nop @@ -1709,7 +1709,7 @@ glabel func00027f78 /* 280e8: 448d3000 */ mtc1 $t5,$f6 /* 280ec: 4407b000 */ mfc1 $a3,$f22 /* 280f0: 46802320 */ cvt.s.w $f12,$f4 -/* 280f4: 0c0095c9 */ jal func00025724 +/* 280f4: 0c0095c9 */ jal cd00025724 /* 280f8: 468033a0 */ cvt.s.w $f14,$f6 /* 280fc: 4618003e */ c.le.s $f0,$f24 /* 28100: 00000000 */ nop @@ -1730,7 +1730,7 @@ glabel func00027f78 /* 2813c: 44068000 */ mfc1 $a2,$f16 /* 28140: 46804320 */ cvt.s.w $f12,$f8 /* 28144: 44079000 */ mfc1 $a3,$f18 -/* 28148: 0c0095dd */ jal func00025774 +/* 28148: 0c0095dd */ jal cd00025774 /* 2814c: 468053a0 */ cvt.s.w $f14,$f10 /* 28150: 50400019 */ beqzl $v0,.L000281b8 /* 28154: 02809825 */ or $s3,$s4,$zero @@ -1782,7 +1782,7 @@ glabel func00027f78 /* 281fc: 27bd0068 */ addiu $sp,$sp,0x68 ); -s32 func00028200(struct tiletype0 *tile, struct coord *pos, f32 width, f32 y1, f32 y2) +s32 cd00028200(struct tiletype0 *tile, struct coord *pos, f32 width, f32 y1, f32 y2) { s32 count; s32 i; @@ -1867,7 +1867,7 @@ s32 func00028200(struct tiletype0 *tile, struct coord *pos, f32 width, f32 y1, f } GLOBAL_ASM( -glabel func0002840c +glabel cd0002840c /* 2840c: 27bdff98 */ addiu $sp,$sp,-104 /* 28410: afbf0064 */ sw $ra,0x64($sp) /* 28414: afbe0060 */ sw $s8,0x60($sp) @@ -1931,7 +1931,7 @@ glabel func0002840c /* 284ec: 44060000 */ mfc1 $a2,$f0 /* 284f0: 8e070018 */ lw $a3,0x18($s0) /* 284f4: e7b60014 */ swc1 $f22,0x14($sp) -/* 284f8: 0c009595 */ jal func00025654 +/* 284f8: 0c009595 */ jal cd00025654 /* 284fc: e7b40010 */ swc1 $f20,0x10($sp) /* 28500: 461a003c */ c.lt.s $f0,$f26 /* 28504: 46000086 */ mov.s $f2,$f0 @@ -1946,7 +1946,7 @@ glabel func0002840c /* 28524: 4406a000 */ mfc1 $a2,$f20 /* 28528: 4407b000 */ mfc1 $a3,$f22 /* 2852c: c62c0010 */ lwc1 $f12,0x10($s1) -/* 28530: 0c0095c9 */ jal func00025724 +/* 28530: 0c0095c9 */ jal cd00025724 /* 28534: c62e0018 */ lwc1 $f14,0x18($s1) /* 28538: 4618003e */ c.le.s $f0,$f24 /* 2853c: 00000000 */ nop @@ -1955,7 +1955,7 @@ glabel func0002840c /* 28548: 4406a000 */ mfc1 $a2,$f20 /* 2854c: 4407b000 */ mfc1 $a3,$f22 /* 28550: c60c0010 */ lwc1 $f12,0x10($s0) -/* 28554: 0c0095c9 */ jal func00025724 +/* 28554: 0c0095c9 */ jal cd00025724 /* 28558: c60e0018 */ lwc1 $f14,0x18($s0) /* 2855c: 4618003e */ c.le.s $f0,$f24 /* 28560: 00000000 */ nop @@ -1966,7 +1966,7 @@ glabel func0002840c /* 28574: 8e060010 */ lw $a2,0x10($s0) /* 28578: 8e070018 */ lw $a3,0x18($s0) /* 2857c: e7b60014 */ swc1 $f22,0x14($sp) -/* 28580: 0c0095dd */ jal func00025774 +/* 28580: 0c0095dd */ jal cd00025774 /* 28584: e7b40010 */ swc1 $f20,0x10($sp) /* 28588: 50400019 */ beqzl $v0,.L000285f0 /* 2858c: 02809825 */ or $s3,$s4,$zero @@ -2019,7 +2019,7 @@ glabel func0002840c ); GLOBAL_ASM( -glabel func00028638 +glabel cd00028638 /* 28638: 27bdff98 */ addiu $sp,$sp,-104 /* 2863c: afbf0064 */ sw $ra,0x64($sp) /* 28640: afbe0060 */ sw $s8,0x60($sp) @@ -2081,7 +2081,7 @@ glabel func00028638 /* 28710: 44060000 */ mfc1 $a2,$f0 /* 28714: 8e070010 */ lw $a3,0x10($s0) /* 28718: e7b60014 */ swc1 $f22,0x14($sp) -/* 2871c: 0c009595 */ jal func00025654 +/* 2871c: 0c009595 */ jal cd00025654 /* 28720: e7b40010 */ swc1 $f20,0x10($sp) /* 28724: 461a003c */ c.lt.s $f0,$f26 /* 28728: 46000086 */ mov.s $f2,$f0 @@ -2096,7 +2096,7 @@ glabel func00028638 /* 28748: 4406a000 */ mfc1 $a2,$f20 /* 2874c: 4407b000 */ mfc1 $a3,$f22 /* 28750: c62c000c */ lwc1 $f12,0xc($s1) -/* 28754: 0c0095c9 */ jal func00025724 +/* 28754: 0c0095c9 */ jal cd00025724 /* 28758: c62e0010 */ lwc1 $f14,0x10($s1) /* 2875c: 4618003e */ c.le.s $f0,$f24 /* 28760: 00000000 */ nop @@ -2105,7 +2105,7 @@ glabel func00028638 /* 2876c: 4406a000 */ mfc1 $a2,$f20 /* 28770: 4407b000 */ mfc1 $a3,$f22 /* 28774: c60c000c */ lwc1 $f12,0xc($s0) -/* 28778: 0c0095c9 */ jal func00025724 +/* 28778: 0c0095c9 */ jal cd00025724 /* 2877c: c60e0010 */ lwc1 $f14,0x10($s0) /* 28780: 4618003e */ c.le.s $f0,$f24 /* 28784: 00000000 */ nop @@ -2116,7 +2116,7 @@ glabel func00028638 /* 28798: 8e06000c */ lw $a2,0xc($s0) /* 2879c: 8e070010 */ lw $a3,0x10($s0) /* 287a0: e7b60014 */ swc1 $f22,0x14($sp) -/* 287a4: 0c0095dd */ jal func00025774 +/* 287a4: 0c0095dd */ jal cd00025774 /* 287a8: e7b40010 */ swc1 $f20,0x10($sp) /* 287ac: 50400019 */ beqzl $v0,.L00028814 /* 287b0: 02809825 */ or $s3,$s4,$zero @@ -2169,7 +2169,7 @@ glabel func00028638 ); GLOBAL_ASM( -glabel func0002885c +glabel cd0002885c /* 2885c: afa7000c */ sw $a3,0xc($sp) /* 28860: c7aa000c */ lwc1 $f10,0xc($sp) /* 28864: c4880014 */ lwc1 $f8,0x14($a0) @@ -2220,7 +2220,7 @@ glabel func0002885c ); GLOBAL_ASM( -glabel func00028914 +glabel cd00028914 /* 28914: 27bdff88 */ addiu $sp,$sp,-120 /* 28918: f7b40028 */ sdc1 $f20,0x28($sp) /* 2891c: 4487a000 */ mtc1 $a3,$f20 @@ -2340,7 +2340,7 @@ glabel func00028914 /* 28adc: 02202825 */ or $a1,$s1,$zero /* 28ae0: 46160100 */ add.s $f4,$f0,$f22 /* 28ae4: 44073000 */ mfc1 $a3,$f6 -/* 28ae8: 0c00a080 */ jal func00028200 +/* 28ae8: 0c00a080 */ jal cd00028200 /* 28aec: e7a40010 */ swc1 $f4,0x10($sp) /* 28af0: 10000001 */ b .L00028af8 /* 28af4: 00401825 */ or $v1,$v0,$zero @@ -2354,7 +2354,7 @@ glabel func00028914 /* 28b10: afbe0018 */ sw $s8,0x18($sp) /* 28b14: afb70014 */ sw $s7,0x14($sp) /* 28b18: afb60010 */ sw $s6,0x10($sp) -/* 28b1c: 0c009fde */ jal func00027f78 +/* 28b1c: 0c009fde */ jal cd00027f78 /* 28b20: afaf001c */ sw $t7,0x1c($sp) .L00028b24: /* 28b24: 92780001 */ lbu $t8,0x1($s3) @@ -2447,7 +2447,7 @@ glabel func00028914 /* 28c74: afb70014 */ sw $s7,0x14($sp) /* 28c78: afbe0018 */ sw $s8,0x18($sp) /* 28c7c: afa20068 */ sw $v0,0x68($sp) -/* 28c80: 0c00a103 */ jal func0002840c +/* 28c80: 0c00a103 */ jal cd0002840c /* 28c84: afa8001c */ sw $t0,0x1c($sp) /* 28c88: 8fa20068 */ lw $v0,0x68($sp) /* 28c8c: 90490001 */ lbu $t1,0x1($v0) @@ -2487,7 +2487,7 @@ glabel func00028914 /* 28d08: afbe0018 */ sw $s8,0x18($sp) /* 28d0c: afb70014 */ sw $s7,0x14($sp) /* 28d10: afb60010 */ sw $s6,0x10($sp) -/* 28d14: 0c00a18e */ jal func00028638 +/* 28d14: 0c00a18e */ jal cd00028638 /* 28d18: afad001c */ sw $t5,0x1c($sp) .L00028d1c: /* 28d1c: 10000021 */ b .L00028da4 @@ -2523,7 +2523,7 @@ glabel func00028914 /* 28d8c: afbe0018 */ sw $s8,0x18($sp) /* 28d90: afb70014 */ sw $s7,0x14($sp) /* 28d94: afb60010 */ sw $s6,0x10($sp) -/* 28d98: 0c00a217 */ jal func0002885c +/* 28d98: 0c00a217 */ jal cd0002885c /* 28d9c: afb8001c */ sw $t8,0x1c($sp) /* 28da0: 26100018 */ addiu $s0,$s0,0x18 .L00028da4: @@ -2550,7 +2550,7 @@ glabel func00028914 /* 28dec: 27bd0078 */ addiu $sp,$sp,0x78 ); -void func00028df0(struct coord *pos, f32 width, s16 *rooms, u32 types, u16 arg4, u32 arg5, f32 ymax, f32 ymin, struct collisionthing *arg8, s32 arg9) +void cd00028df0(struct coord *pos, f32 width, s16 *rooms, u32 types, u16 arg4, u32 arg5, f32 ymax, f32 ymin, struct collisionthing *arg8, s32 arg9) { s16 *roomptr; s32 roomnum; @@ -2570,7 +2570,7 @@ void func00028df0(struct coord *pos, f32 width, s16 *rooms, u32 types, u16 arg4, start = g_TileFileData.u8 + g_TileRooms[roomnum]; end = g_TileFileData.u8 + g_TileRooms[roomnum + 1]; - func00028914(start, end, pos, width, arg4, arg5, ymax, ymin, NULL, arg8, arg9, &sp294); + cd00028914(start, end, pos, width, arg4, arg5, ymax, ymin, NULL, arg8, arg9, &sp294); } roomptr++; @@ -2586,7 +2586,7 @@ void func00028df0(struct coord *pos, f32 width, s16 *rooms, u32 types, u16 arg4, struct prop *prop = &g_Vars.props[*propnumptr]; if (propIsOfCdType(prop, types) && propUpdateGeometry(prop, &start, &end)) { - func00028914(start, end, pos, width, arg4, arg5, ymax, ymin, prop, arg8, arg9, &sp294); + cd00028914(start, end, pos, width, arg4, arg5, ymax, ymin, prop, arg8, arg9, &sp294); } propnumptr++; @@ -2596,7 +2596,7 @@ void func00028df0(struct coord *pos, f32 width, s16 *rooms, u32 types, u16 arg4, } GLOBAL_ASM( -glabel func0002901c +glabel cd0002901c /* 2901c: 27bdfef8 */ addiu $sp,$sp,-264 /* 29020: afbf0064 */ sw $ra,0x64($sp) /* 29024: afbe0060 */ sw $s8,0x60($sp) @@ -3015,7 +3015,7 @@ glabel func0002901c /* 29630: afb9001c */ sw $t9,0x1c($sp) /* 29634: afb80018 */ sw $t8,0x18($sp) /* 29638: afaf0014 */ sw $t7,0x14($sp) -/* 2963c: 0c009612 */ jal func00025848 +/* 2963c: 0c009612 */ jal cd00025848 /* 29640: e7a80010 */ swc1 $f8,0x10($sp) /* 29644: c64a0004 */ lwc1 $f10,0x4($s2) /* 29648: e7aa00c0 */ swc1 $f10,0xc0($sp) @@ -3025,7 +3025,7 @@ glabel func0002901c /* 29654: 4407a000 */ mfc1 $a3,$f20 /* 29658: 27a400bc */ addiu $a0,$sp,0xbc /* 2965c: 27a500b0 */ addiu $a1,$sp,0xb0 -/* 29660: 0c00940e */ jal func00025038 +/* 29660: 0c00940e */ jal cd00025038 /* 29664: 8e26000c */ lw $a2,0xc($s1) /* 29668: 8fbf0064 */ lw $ra,0x64($sp) /* 2966c: d7b40030 */ ldc1 $f20,0x30($sp) @@ -3045,7 +3045,7 @@ glabel func0002901c #if VERSION >= VERSION_NTSC_1_0 GLOBAL_ASM( -glabel func000296a0 +glabel cd000296a0 /* 296a0: 27bdfef0 */ addiu $sp,$sp,-272 /* 296a4: 3c01cf80 */ lui $at,0xcf80 /* 296a8: 44812000 */ mtc1 $at,$f4 @@ -3318,7 +3318,7 @@ glabel func000296a0 /* 29a7c: 0006000d */ break 0x6 .L00029a80: /* 29a80: 4600c386 */ mov.s $f14,$f24 -/* 29a84: 0c009595 */ jal func00025654 +/* 29a84: 0c009595 */ jal cd00025654 /* 29a88: 4600b306 */ mov.s $f12,$f22 /* 29a8c: 44804000 */ mtc1 $zero,$f8 /* 29a90: e7a000d4 */ swc1 $f0,0xd4($sp) @@ -3343,7 +3343,7 @@ glabel func000296a0 /* 29ad4: c6520008 */ lwc1 $f18,0x8($s2) /* 29ad8: 4600b306 */ mov.s $f12,$f22 /* 29adc: 4600c386 */ mov.s $f14,$f24 -/* 29ae0: 0c0095dd */ jal func00025774 +/* 29ae0: 0c0095dd */ jal cd00025774 /* 29ae4: e7b20014 */ swc1 $f18,0x14($sp) /* 29ae8: 5040002c */ beqzl $v0,.L00029b9c /* 29aec: 4600b306 */ mov.s $f12,$f22 @@ -3394,13 +3394,13 @@ glabel func000296a0 .L00029b9c: /* 29b9c: 4600c386 */ mov.s $f14,$f24 /* 29ba0: 8e460000 */ lw $a2,0x0($s2) -/* 29ba4: 0c0095c9 */ jal func00025724 +/* 29ba4: 0c0095c9 */ jal cd00025724 /* 29ba8: 8e470008 */ lw $a3,0x8($s2) /* 29bac: 46000506 */ mov.s $f20,$f0 /* 29bb0: 4600d306 */ mov.s $f12,$f26 /* 29bb4: 4600e386 */ mov.s $f14,$f28 /* 29bb8: 8e460000 */ lw $a2,0x0($s2) -/* 29bbc: 0c0095c9 */ jal func00025724 +/* 29bbc: 0c0095c9 */ jal cd00025724 /* 29bc0: 8e470008 */ lw $a3,0x8($s2) /* 29bc4: 4600a03c */ c.lt.s $f20,$f0 /* 29bc8: 46000586 */ mov.s $f22,$f0 @@ -3532,7 +3532,7 @@ glabel func000296a0 /* 29d94: 4407e000 */ mfc1 $a3,$f28 /* 29d98: 4600b306 */ mov.s $f12,$f22 /* 29d9c: 4600c386 */ mov.s $f14,$f24 -/* 29da0: 0c009595 */ jal func00025654 +/* 29da0: 0c009595 */ jal cd00025654 /* 29da4: e7a40014 */ swc1 $f4,0x14($sp) /* 29da8: 44804000 */ mtc1 $zero,$f8 /* 29dac: e7a00094 */ swc1 $f0,0x94($sp) @@ -3554,7 +3554,7 @@ glabel func000296a0 /* 29de8: c6520008 */ lwc1 $f18,0x8($s2) /* 29dec: 4600b306 */ mov.s $f12,$f22 /* 29df0: 4600c386 */ mov.s $f14,$f24 -/* 29df4: 0c0095dd */ jal func00025774 +/* 29df4: 0c0095dd */ jal cd00025774 /* 29df8: e7b20014 */ swc1 $f18,0x14($sp) /* 29dfc: 50400026 */ beqzl $v0,.L00029e98 /* 29e00: 4600b306 */ mov.s $f12,$f22 @@ -3598,13 +3598,13 @@ glabel func000296a0 .L00029e98: /* 29e98: 4600c386 */ mov.s $f14,$f24 /* 29e9c: 8e460000 */ lw $a2,0x0($s2) -/* 29ea0: 0c0095c9 */ jal func00025724 +/* 29ea0: 0c0095c9 */ jal cd00025724 /* 29ea4: 8e470008 */ lw $a3,0x8($s2) /* 29ea8: 46000506 */ mov.s $f20,$f0 /* 29eac: 4600d306 */ mov.s $f12,$f26 /* 29eb0: 4600e386 */ mov.s $f14,$f28 /* 29eb4: 8e460000 */ lw $a2,0x0($s2) -/* 29eb8: 0c0095c9 */ jal func00025724 +/* 29eb8: 0c0095c9 */ jal cd00025724 /* 29ebc: 8e470008 */ lw $a3,0x8($s2) /* 29ec0: 4600a03c */ c.lt.s $f20,$f0 /* 29ec4: 46000586 */ mov.s $f22,$f0 @@ -3694,7 +3694,7 @@ glabel func000296a0 ); #else GLOBAL_ASM( -glabel func000296a0 +glabel cd000296a0 /* 2ab9c: 27bdfef8 */ addiu $sp,$sp,-264 /* 2aba0: 3c01cf80 */ lui $at,0xcf80 /* 2aba4: 44812000 */ mtc1 $at,$f4 @@ -3953,7 +3953,7 @@ glabel func000296a0 /* 2af44: 0006000d */ break 0x6 .NB0002af48: /* 2af48: 4600c386 */ mov.s $f14,$f24 -/* 2af4c: 0c009a8d */ jal func00025654 +/* 2af4c: 0c009a8d */ jal cd00025654 /* 2af50: 4600b306 */ mov.s $f12,$f22 /* 2af54: 44804000 */ mtc1 $zero,$f8 /* 2af58: e7a000d4 */ swc1 $f0,0xd4($sp) @@ -3975,7 +3975,7 @@ glabel func000296a0 /* 2af94: c6520008 */ lwc1 $f18,0x8($s2) /* 2af98: 4600b306 */ mov.s $f12,$f22 /* 2af9c: 4600c386 */ mov.s $f14,$f24 -/* 2afa0: 0c009ad5 */ jal func00025774 +/* 2afa0: 0c009ad5 */ jal cd00025774 /* 2afa4: e7b20014 */ swc1 $f18,0x14($sp) /* 2afa8: 50400028 */ beqzl $v0,.NB0002b04c /* 2afac: 4600b306 */ mov.s $f12,$f22 @@ -4022,13 +4022,13 @@ glabel func000296a0 .NB0002b04c: /* 2b04c: 4600c386 */ mov.s $f14,$f24 /* 2b050: 8e460000 */ lw $a2,0x0($s2) -/* 2b054: 0c009ac1 */ jal func00025724 +/* 2b054: 0c009ac1 */ jal cd00025724 /* 2b058: 8e470008 */ lw $a3,0x8($s2) /* 2b05c: 46000506 */ mov.s $f20,$f0 /* 2b060: 4600d306 */ mov.s $f12,$f26 /* 2b064: 4600e386 */ mov.s $f14,$f28 /* 2b068: 8e460000 */ lw $a2,0x0($s2) -/* 2b06c: 0c009ac1 */ jal func00025724 +/* 2b06c: 0c009ac1 */ jal cd00025724 /* 2b070: 8e470008 */ lw $a3,0x8($s2) /* 2b074: 4600a03c */ c.lt.s $f20,$f0 /* 2b078: 46000586 */ mov.s $f22,$f0 @@ -4144,7 +4144,7 @@ glabel func000296a0 /* 2b20c: 4407e000 */ mfc1 $a3,$f28 /* 2b210: 4600b306 */ mov.s $f12,$f22 /* 2b214: 4600c386 */ mov.s $f14,$f24 -/* 2b218: 0c009a8d */ jal func00025654 +/* 2b218: 0c009a8d */ jal cd00025654 /* 2b21c: e7a40014 */ swc1 $f4,0x14($sp) /* 2b220: 44804000 */ mtc1 $zero,$f8 /* 2b224: e7a00098 */ swc1 $f0,0x98($sp) @@ -4166,7 +4166,7 @@ glabel func000296a0 /* 2b260: c6520008 */ lwc1 $f18,0x8($s2) /* 2b264: 4600b306 */ mov.s $f12,$f22 /* 2b268: 4600c386 */ mov.s $f14,$f24 -/* 2b26c: 0c009ad5 */ jal func00025774 +/* 2b26c: 0c009ad5 */ jal cd00025774 /* 2b270: e7b20014 */ swc1 $f18,0x14($sp) /* 2b274: 50400022 */ beqzl $v0,.NB0002b300 /* 2b278: 4600b306 */ mov.s $f12,$f22 @@ -4206,13 +4206,13 @@ glabel func000296a0 .NB0002b300: /* 2b300: 4600c386 */ mov.s $f14,$f24 /* 2b304: 8e460000 */ lw $a2,0x0($s2) -/* 2b308: 0c009ac1 */ jal func00025724 +/* 2b308: 0c009ac1 */ jal cd00025724 /* 2b30c: 8e470008 */ lw $a3,0x8($s2) /* 2b310: 46000506 */ mov.s $f20,$f0 /* 2b314: 4600d306 */ mov.s $f12,$f26 /* 2b318: 4600e386 */ mov.s $f14,$f28 /* 2b31c: 8e460000 */ lw $a2,0x0($s2) -/* 2b320: 0c009ac1 */ jal func00025724 +/* 2b320: 0c009ac1 */ jal cd00025724 /* 2b324: 8e470008 */ lw $a3,0x8($s2) /* 2b328: 4600a03c */ c.lt.s $f20,$f0 /* 2b32c: 46000586 */ mov.s $f22,$f0 @@ -4294,12 +4294,12 @@ glabel func000296a0 ); #endif -bool func00029ffc(struct coord *pos, f32 width, f32 foreheadheight, f32 inversefeettoeyesheight, s16 *rooms, u16 arg5, struct coord *laddernormal) +bool cd00029ffc(struct coord *pos, f32 width, f32 foreheadheight, f32 inversefeettoeyesheight, s16 *rooms, u16 arg5, struct coord *laddernormal) { u32 stack[5]; struct collisionthing thing; - func00027d1c(pos, width, rooms, CDTYPE_BG, + cd00027d1c(pos, width, rooms, CDTYPE_BG, arg5, 1, foreheadheight, inversefeettoeyesheight, &thing, 1); @@ -4307,7 +4307,7 @@ bool func00029ffc(struct coord *pos, f32 width, f32 foreheadheight, f32 inversef struct tiletype0 *tile = (struct tiletype0 *) thing.tile; struct coord dist; - func00025928(thing.tile, laddernormal); + cd00025928(thing.tile, laddernormal); dist.x = pos->x - tile->vertices[0][0]; dist.y = pos->y - tile->vertices[0][1]; @@ -4325,12 +4325,12 @@ bool func00029ffc(struct coord *pos, f32 width, f32 foreheadheight, f32 inversef return false; } -bool func0002a13c(struct coord *pos, f32 width, f32 arg2, f32 arg3, s16 *rooms, u16 arg5) +bool cd0002a13c(struct coord *pos, f32 width, f32 arg2, f32 arg3, s16 *rooms, u16 arg5) { u32 stack[5]; struct collisionthing thing; - func00027d1c(pos, width, rooms, CDTYPE_BG, arg5, 1, arg2, arg3, &thing, 1); + cd00027d1c(pos, width, rooms, CDTYPE_BG, arg5, 1, arg2, arg3, &thing, 1); if (thing.tile) { return true; @@ -4347,19 +4347,19 @@ f32 cdFindGroundY(struct coord *pos, f32 width, s16 *rooms, u16 *floorcol, f32 ground; struct tile *tile = NULL; - func00027d1c(pos, width, rooms, CDTYPE_ALL, 3, 0, 0, 0, cdthings, 20); - ground = func000296a0(cdthings, pos, &sp72, width); + cd00027d1c(pos, width, rooms, CDTYPE_ALL, 3, 0, 0, 0, cdthings, 20); + ground = cd000296a0(cdthings, pos, &sp72, width); if (sp72) { tile = sp72->tile; } if (floorcol) { - tileGetFloorCol(tile, floorcol); + cdGetFloorCol(tile, floorcol); } if (floortype) { - tileGetFloorType(tile, floortype); + cdGetFloorType(tile, floortype); } if (floorflags && tile) { @@ -4398,7 +4398,7 @@ f32 cdFindGroundY(struct coord *pos, f32 width, s16 *rooms, u16 *floorcol, * nop the jr ra at the end of cdFindGroundY, causing it to flow into this * function and return 0. */ -f32 func0002a324(void) +f32 cd0002a324(void) { return 0; } @@ -4408,59 +4408,59 @@ f32 cdFindGroundYSimple(struct coord *pos, f32 width, s16 *rooms, u16 *floorcol, return cdFindGroundY(pos, width, rooms, floorcol, floortype, NULL, NULL, NULL, NULL); } -f32 func0002a36c(struct coord *coord, s16 *rooms, u16 *floorcol, u8 *floortype) +f32 cd0002a36c(struct coord *coord, s16 *rooms, u16 *floorcol, u8 *floortype) { struct tile *tile; s16 sp30[2]; f32 sp2c; f32 result = -4294967296; - func00026e7c(coord, rooms, 3, &tile, &sp30[1], &sp2c, NULL, 0); + cd00026e7c(coord, rooms, 3, &tile, &sp30[1], &sp2c, NULL, 0); if (tile) { result = sp2c; } if (floorcol) { - tileGetFloorCol(tile, floorcol); + cdGetFloorCol(tile, floorcol); } if (floortype) { - tileGetFloorType(tile, floortype); + cdGetFloorType(tile, floortype); } return result; } -s32 func0002a400(struct coord *pos, s16 *rooms) +s32 cd0002a400(struct coord *pos, s16 *rooms) { struct tile *tile; s16 sp32; f32 sp2c; - func00026e7c(pos, rooms, 3, &tile, &sp32, &sp2c, 0, 0); + cd00026e7c(pos, rooms, 3, &tile, &sp32, &sp2c, 0, 0); return sp32; } #if VERSION >= VERSION_NTSC_1_0 -s16 func0002a440(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcolptr, u16 *flagsptr) +s16 cd0002a440(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcolptr, u16 *flagsptr) #else -s16 func0002a440(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcolptr) +s16 cd0002a440(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcolptr) #endif { struct tile *tile; s16 sp32; f32 sp2c; - func00026e7c(pos, rooms, 3, &tile, &sp32, &sp2c, NULL, 0); + cd00026e7c(pos, rooms, 3, &tile, &sp32, &sp2c, NULL, 0); if (tile != NULL) { *arg2 = sp2c; } if (floorcolptr != NULL) { - tileGetFloorCol(tile, floorcolptr); + cdGetFloorCol(tile, floorcolptr); } #if VERSION >= VERSION_NTSC_1_0 @@ -4472,20 +4472,20 @@ s16 func0002a440(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcolptr) return sp32; } -s16 func0002a4d0(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcolptr, u16 *flagsptr) +s16 cd0002a4d0(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcolptr, u16 *flagsptr) { struct tile *tile; s16 sp32; f32 sp2c; - func00026e7c(pos, rooms, 3, &tile, &sp32, &sp2c, NULL, 1); + cd00026e7c(pos, rooms, 3, &tile, &sp32, &sp2c, NULL, 1); if (tile != NULL) { *arg2 = sp2c; } if (floorcolptr != NULL) { - tileGetFloorCol(tile, floorcolptr); + cdGetFloorCol(tile, floorcolptr); } #if VERSION >= VERSION_NTSC_1_0 @@ -4497,41 +4497,41 @@ s16 func0002a4d0(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcolptr, u16 return sp32; } -s32 func0002a564(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcol, struct coord *arg4, struct prop **propptr) +s32 cd0002a564(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcol, struct coord *arg4, struct prop **propptr) { struct tile *tile; s16 sp32; f32 sp2c; - func00026e7c(pos, rooms, 3, &tile, &sp32, &sp2c, propptr, 0); + cd00026e7c(pos, rooms, 3, &tile, &sp32, &sp2c, propptr, 0); if (tile) { *arg2 = sp2c; - func00025928(tile, arg4); + cd00025928(tile, arg4); } if (floorcol) { - tileGetFloorCol(tile, floorcol); + cdGetFloorCol(tile, floorcol); } return sp32; } -s32 func0002a5e4(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcol, u16 *flagsptr, struct coord *arg5) +s32 cd0002a5e4(struct coord *pos, s16 *rooms, f32 *arg2, u16 *floorcol, u16 *flagsptr, struct coord *arg5) { struct tile *tile; s16 sp32; f32 sp2c; - func00026e7c(pos, rooms, 3, &tile, &sp32, &sp2c, NULL, 1); + cd00026e7c(pos, rooms, 3, &tile, &sp32, &sp2c, NULL, 1); if (tile) { *arg2 = sp2c; - func00025928(tile, arg5); + cd00025928(tile, arg5); } if (floorcol) { - tileGetFloorCol(tile, floorcol); + cdGetFloorCol(tile, floorcol); } if (flagsptr != NULL && tile != NULL) { @@ -4549,18 +4549,18 @@ s32 cdTestVolume(struct coord *pos, f32 width, s16 *rooms, s32 types, s32 arg4, struct collisionthing cdthings[2]; bool result = true; - func00027d1c(pos, width, rooms, types, 4, arg4, ymax, ymin, cdthings, 1); + cd00027d1c(pos, width, rooms, types, 4, arg4, ymax, ymin, cdthings, 1); if (cdthings[0].tile) { result = false; - func00025168(cdthings[0].prop); + cd00025168(cdthings[0].prop); } return result; } GLOBAL_ASM( -glabel func0002a6fc +glabel cd0002a6fc /* 2a6fc: 27bdff58 */ addiu $sp,$sp,-168 /* 2a700: 44866000 */ mtc1 $a2,$f12 /* 2a704: afb00030 */ sw $s0,0x30($sp) @@ -4585,7 +4585,7 @@ glabel func0002a6fc /* 2a750: 8fa700b8 */ lw $a3,0xb8($sp) /* 2a754: afb80014 */ sw $t8,0x14($sp) /* 2a758: e7a40018 */ swc1 $f4,0x18($sp) -/* 2a75c: 0c009f47 */ jal func00027d1c +/* 2a75c: 0c009f47 */ jal cd00027d1c /* 2a760: e7a6001c */ swc1 $f6,0x1c($sp) /* 2a764: 8fa90080 */ lw $t1,0x80($sp) /* 2a768: 5120009d */ beqzl $t1,.L0002a9e0 @@ -4744,7 +4744,7 @@ glabel func0002a6fc /* 2a9a8: afaa001c */ sw $t2,0x1c($sp) /* 2a9ac: afa90018 */ sw $t1,0x18($sp) /* 2a9b0: afa80014 */ sw $t0,0x14($sp) -/* 2a9b4: 0c009612 */ jal func00025848 +/* 2a9b4: 0c009612 */ jal cd00025848 /* 2a9b8: e7a80010 */ swc1 $f8,0x10($sp) /* 2a9bc: c60a0004 */ lwc1 $f10,0x4($s0) /* 2a9c0: e7aa0074 */ swc1 $f10,0x74($sp) @@ -4753,7 +4753,7 @@ glabel func0002a6fc .L0002a9cc: /* 2a9cc: 27a40070 */ addiu $a0,$sp,0x70 /* 2a9d0: 27a50064 */ addiu $a1,$sp,0x64 -/* 2a9d4: 0c0093ec */ jal func00024fb0 +/* 2a9d4: 0c0093ec */ jal cd00024fb0 /* 2a9d8: 8fa6008c */ lw $a2,0x8c($sp) /* 2a9dc: 8fbf0034 */ lw $ra,0x34($sp) .L0002a9e0: @@ -4764,7 +4764,7 @@ glabel func0002a6fc ); // Mismatch: Goal copies tile from t1 to v0 in the type 0 block -//s32 func0002a6fc(struct coord *pos, struct coord *pos2, f32 width, s16 *rooms, s32 types, bool arg5, f32 arg6, f32 arg7) +//s32 cd0002a6fc(struct coord *pos, struct coord *pos2, f32 width, s16 *rooms, s32 types, bool arg5, f32 arg6, f32 arg7) //{ // u32 stack[5]; // struct collisionthing thing; // 80 @@ -4774,7 +4774,7 @@ glabel func0002a6fc // // cdresult = CDRESULT_NOCOLLISION; // -// func00027d1c(pos2, width, rooms, types, 4, arg5, arg6, arg7, &thing, 1); +// cd00027d1c(pos2, width, rooms, types, 4, arg5, arg6, arg7, &thing, 1); // // // 768 // if (thing.tile != NULL) { @@ -4822,13 +4822,13 @@ glabel func0002a6fc // // if (1); // -// func00025848(type3->x, type3->z, type3->width, pos->x, pos->z, &sp70.x, &sp70.z, &sp64.x, &sp64.z); +// cd00025848(type3->x, type3->z, type3->width, pos->x, pos->z, &sp70.x, &sp70.z, &sp64.x, &sp64.z); // // sp70.y = pos->y; // sp64.y = pos->y; // } // -// func00024fb0(&sp70, &sp64, thing.prop); +// cd00024fb0(&sp70, &sp64, thing.prop); // } // // return cdresult; @@ -4840,7 +4840,7 @@ s32 cdTestAToB1(struct coord *origpos, struct coord *dstpos, f32 width, s16 *dst struct coord dist; s32 result = CDRESULT_NOCOLLISION; - func00028df0(dstpos, width, dstrooms, types, 4, arg5, ymax, ymin, things, 20); + cd00028df0(dstpos, width, dstrooms, types, 4, arg5, ymax, ymin, things, 20); if (things[0].tile) { result = CDRESULT_COLLISION; @@ -4849,14 +4849,14 @@ s32 cdTestAToB1(struct coord *origpos, struct coord *dstpos, f32 width, s16 *dst dist.y = dstpos->y - origpos->y; dist.z = dstpos->z - origpos->z; - func0002901c(origpos, &dist, width, things); + cd0002901c(origpos, &dist, width, things); } return result; } GLOBAL_ASM( -glabel func0002aac0 +glabel cd0002aac0 /* 2aac0: 27bdffa8 */ addiu $sp,$sp,-88 /* 2aac4: afbf0054 */ sw $ra,0x54($sp) /* 2aac8: afbe0050 */ sw $s8,0x50($sp) @@ -4918,7 +4918,7 @@ glabel func0002aac0 ); GLOBAL_ASM( -glabel func0002ab98 +glabel cd0002ab98 /* 2ab98: 27bdffa8 */ addiu $sp,$sp,-88 /* 2ab9c: afbf0054 */ sw $ra,0x54($sp) /* 2aba0: afbe0050 */ sw $s8,0x50($sp) @@ -4980,7 +4980,7 @@ glabel func0002ab98 ); GLOBAL_ASM( -glabel func0002ac70 +glabel cd0002ac70 /* 2ac70: 27bdff20 */ addiu $sp,$sp,-224 /* 2ac74: afbf007c */ sw $ra,0x7c($sp) /* 2ac78: afbe0078 */ sw $s8,0x78($sp) @@ -5096,7 +5096,7 @@ glabel func0002ac70 /* 2ae1c: 0006000d */ break 0x6 .L0002ae20: /* 2ae20: e7aa0014 */ swc1 $f10,0x14($sp) -/* 2ae24: 0c009536 */ jal func000254d8 +/* 2ae24: 0c009536 */ jal cd000254d8 /* 2ae28: 00000000 */ nop /* 2ae2c: 5040003e */ beqzl $v0,.L0002af28 /* 2ae30: 02609025 */ or $s2,$s3,$zero @@ -5301,7 +5301,7 @@ glabel func0002ac70 ); GLOBAL_ASM( -glabel func0002b128 +glabel cd0002b128 /* 2b128: 27bdff20 */ addiu $sp,$sp,-224 /* 2b12c: afbf007c */ sw $ra,0x7c($sp) /* 2b130: afbe0078 */ sw $s8,0x78($sp) @@ -5407,7 +5407,7 @@ glabel func0002b128 /* 2b2b0: 0006000d */ break 0x6 .L0002b2b4: /* 2b2b4: e7aa0014 */ swc1 $f10,0x14($sp) -/* 2b2b8: 0c009536 */ jal func000254d8 +/* 2b2b8: 0c009536 */ jal cd000254d8 /* 2b2bc: 00000000 */ nop /* 2b2c0: 50400033 */ beqzl $v0,.L0002b390 /* 2b2c4: 02609025 */ or $s2,$s3,$zero @@ -5589,7 +5589,7 @@ glabel func0002b128 ); GLOBAL_ASM( -glabel func0002b560 +glabel cd0002b560 /* 2b560: 27bdff30 */ addiu $sp,$sp,-208 /* 2b564: afb7006c */ sw $s7,0x6c($sp) /* 2b568: 8fb700ec */ lw $s7,0xec($sp) @@ -5684,7 +5684,7 @@ glabel func0002b560 /* 2b6b8: 0006000d */ break 0x6 .L0002b6bc: /* 2b6bc: e7aa0014 */ swc1 $f10,0x14($sp) -/* 2b6c0: 0c009536 */ jal func000254d8 +/* 2b6c0: 0c009536 */ jal cd000254d8 /* 2b6c4: 00000000 */ nop /* 2b6c8: 50400034 */ beqzl $v0,.L0002b79c /* 2b6cc: 02609025 */ or $s2,$s3,$zero @@ -5861,7 +5861,7 @@ glabel func0002b560 ); GLOBAL_ASM( -glabel func0002b954 +glabel cd0002b954 /* 2b954: 27bdff80 */ addiu $sp,$sp,-128 /* 2b958: afbf0034 */ sw $ra,0x34($sp) /* 2b95c: afb10030 */ sw $s1,0x30($sp) @@ -5918,7 +5918,7 @@ glabel func0002b954 /* 2ba1c: e7b2006c */ swc1 $f18,0x6c($sp) /* 2ba20: e7b00070 */ swc1 $f16,0x70($sp) /* 2ba24: e7b20014 */ swc1 $f18,0x14($sp) -/* 2ba28: 0c009595 */ jal func00025654 +/* 2ba28: 0c009595 */ jal cd00025654 /* 2ba2c: e7b00010 */ swc1 $f16,0x10($sp) /* 2ba30: 44805000 */ mtc1 $zero,$f10 /* 2ba34: 46000486 */ mov.s $f18,$f0 @@ -5936,7 +5936,7 @@ glabel func0002b954 /* 2ba60: 8fbf0034 */ lw $ra,0x34($sp) /* 2ba64: c60c0000 */ lwc1 $f12,0x0($s0) /* 2ba68: c60e0008 */ lwc1 $f14,0x8($s0) -/* 2ba6c: 0c0095c9 */ jal func00025724 +/* 2ba6c: 0c0095c9 */ jal cd00025724 /* 2ba70: e7b20074 */ swc1 $f18,0x74($sp) /* 2ba74: c7a60068 */ lwc1 $f6,0x68($sp) /* 2ba78: c7b20074 */ lwc1 $f18,0x74($sp) @@ -5947,7 +5947,7 @@ glabel func0002b954 /* 2ba8c: c6260000 */ lwc1 $f6,0x0($s1) /* 2ba90: c62c0000 */ lwc1 $f12,0x0($s1) /* 2ba94: c62e0008 */ lwc1 $f14,0x8($s1) -/* 2ba98: 0c0095c9 */ jal func00025724 +/* 2ba98: 0c0095c9 */ jal cd00025724 /* 2ba9c: e7b20074 */ swc1 $f18,0x74($sp) /* 2baa0: c7a40068 */ lwc1 $f4,0x68($sp) /* 2baa4: c7b20074 */ lwc1 $f18,0x74($sp) @@ -5963,7 +5963,7 @@ glabel func0002b954 /* 2bacc: 8e270008 */ lw $a3,0x8($s1) /* 2bad0: e7b20074 */ swc1 $f18,0x74($sp) /* 2bad4: e7aa0010 */ swc1 $f10,0x10($sp) -/* 2bad8: 0c0095dd */ jal func00025774 +/* 2bad8: 0c0095dd */ jal cd00025774 /* 2badc: e7a80014 */ swc1 $f8,0x14($sp) /* 2bae0: 10400082 */ beqz $v0,.L0002bcec /* 2bae4: c7b20074 */ lwc1 $f18,0x74($sp) @@ -6094,7 +6094,7 @@ glabel func0002b954 /* 2bcbc: afa80018 */ sw $t0,0x18($sp) /* 2bcc0: afa4001c */ sw $a0,0x1c($sp) /* 2bcc4: afa30014 */ sw $v1,0x14($sp) -/* 2bcc8: 0c009612 */ jal func00025848 +/* 2bcc8: 0c009612 */ jal cd00025848 /* 2bccc: e7a80010 */ swc1 $f8,0x10($sp) /* 2bcd0: 8fa20090 */ lw $v0,0x90($sp) /* 2bcd4: 8fa30094 */ lw $v1,0x94($sp) @@ -6114,7 +6114,7 @@ glabel func0002b954 ); GLOBAL_ASM( -glabel func0002bd04 +glabel cd0002bd04 /* 2bd04: 27bdff10 */ addiu $sp,$sp,-240 /* 2bd08: afb20048 */ sw $s2,0x48($sp) /* 2bd0c: afb10044 */ sw $s1,0x44($sp) @@ -6276,7 +6276,7 @@ glabel func0002bd04 /* 2bf60: afb80010 */ sw $t8,0x10($sp) /* 2bf64: 02202825 */ or $a1,$s1,$zero /* 2bf68: 02603025 */ or $a2,$s3,$zero -/* 2bf6c: 0c00aab0 */ jal func0002aac0 +/* 2bf6c: 0c00aab0 */ jal cd0002aac0 /* 2bf70: 02003825 */ or $a3,$s0,$zero /* 2bf74: 50400013 */ beqzl $v0,.L0002bfc4 /* 2bf78: 8fa900e8 */ lw $t1,0xe8($sp) @@ -6292,7 +6292,7 @@ glabel func0002bd04 /* 2bf9c: afa00018 */ sw $zero,0x18($sp) /* 2bfa0: afb6001c */ sw $s6,0x1c($sp) /* 2bfa4: e7b40020 */ swc1 $f20,0x20($sp) -/* 2bfa8: 0c00ab1c */ jal func0002ac70 +/* 2bfa8: 0c00ab1c */ jal cd0002ac70 /* 2bfac: e7b60024 */ swc1 $f22,0x24($sp) /* 2bfb0: 50400004 */ beqzl $v0,.L0002bfc4 /* 2bfb4: 8fa900e8 */ lw $t1,0xe8($sp) @@ -6434,7 +6434,7 @@ glabel func0002bd04 /* 2c1b0: afad0010 */ sw $t5,0x10($sp) /* 2c1b4: 02202825 */ or $a1,$s1,$zero /* 2c1b8: 02603025 */ or $a2,$s3,$zero -/* 2c1bc: 0c00aae6 */ jal func0002ab98 +/* 2c1bc: 0c00aae6 */ jal cd0002ab98 /* 2c1c0: 02003825 */ or $a3,$s0,$zero /* 2c1c4: 50400013 */ beqzl $v0,.L0002c214 /* 2c1c8: 8fb800b4 */ lw $t8,0xb4($sp) @@ -6450,7 +6450,7 @@ glabel func0002bd04 /* 2c1ec: afa00018 */ sw $zero,0x18($sp) /* 2c1f0: afb6001c */ sw $s6,0x1c($sp) /* 2c1f4: e7b40020 */ swc1 $f20,0x20($sp) -/* 2c1f8: 0c00ac4a */ jal func0002b128 +/* 2c1f8: 0c00ac4a */ jal cd0002b128 /* 2c1fc: e7b60024 */ swc1 $f22,0x24($sp) /* 2c200: 50400004 */ beqzl $v0,.L0002c214 /* 2c204: 8fb800b4 */ lw $t8,0xb4($sp) @@ -6481,7 +6481,7 @@ glabel func0002bd04 /* 2c25c: afa00018 */ sw $zero,0x18($sp) /* 2c260: afb6001c */ sw $s6,0x1c($sp) /* 2c264: e7b40020 */ swc1 $f20,0x20($sp) -/* 2c268: 0c00ad58 */ jal func0002b560 +/* 2c268: 0c00ad58 */ jal cd0002b560 /* 2c26c: e7b60024 */ swc1 $f22,0x24($sp) /* 2c270: 10400003 */ beqz $v0,.L0002c280 /* 2c274: 00000000 */ nop @@ -6507,7 +6507,7 @@ glabel func0002bd04 /* 2c2bc: afa00018 */ sw $zero,0x18($sp) /* 2c2c0: afb6001c */ sw $s6,0x1c($sp) /* 2c2c4: e7b40020 */ swc1 $f20,0x20($sp) -/* 2c2c8: 0c00ae55 */ jal func0002b954 +/* 2c2c8: 0c00ae55 */ jal cd0002b954 /* 2c2cc: e7b60024 */ swc1 $f22,0x24($sp) /* 2c2d0: 50400004 */ beqzl $v0,.L0002c2e4 /* 2c2d4: 26100018 */ addiu $s0,$s0,0x18 @@ -6539,7 +6539,7 @@ glabel func0002bd04 ); GLOBAL_ASM( -glabel func0002c328 +glabel cd0002c328 /* 2c328: 27bdffb8 */ addiu $sp,$sp,-72 /* 2c32c: f7b40010 */ sdc1 $f20,0x10($sp) /* 2c330: afbf0024 */ sw $ra,0x24($sp) @@ -6679,7 +6679,7 @@ glabel func0002c328 ); GLOBAL_ASM( -glabel func0002c528 +glabel cd0002c528 /* 2c528: 27bdffb8 */ addiu $sp,$sp,-72 /* 2c52c: f7b40010 */ sdc1 $f20,0x10($sp) /* 2c530: afbf0024 */ sw $ra,0x24($sp) @@ -6814,7 +6814,7 @@ glabel func0002c528 ); GLOBAL_ASM( -glabel func0002c714 +glabel cd0002c714 /* 2c714: 27bdfe90 */ addiu $sp,$sp,-368 /* 2c718: afb3004c */ sw $s3,0x4c($sp) /* 2c71c: afb10044 */ sw $s1,0x44($sp) @@ -6861,7 +6861,7 @@ glabel func0002c714 /* 2c7bc: 24060000 */ addiu $a2,$zero,0x0 /* 2c7c0: 46160180 */ add.s $f6,$f0,$f22 /* 2c7c4: 44072000 */ mfc1 $a3,$f4 -/* 2c7c8: 0c00a080 */ jal func00028200 +/* 2c7c8: 0c00a080 */ jal cd00028200 /* 2c7cc: e7a60010 */ swc1 $f6,0x10($sp) /* 2c7d0: 10000001 */ b .L0002c7d8 /* 2c7d4: 00401825 */ or $v1,$v0,$zero @@ -7000,7 +7000,7 @@ glabel func0002c714 /* 2c9cc: afa90010 */ sw $t1,0x10($sp) /* 2c9d0: 02602825 */ or $a1,$s3,$zero /* 2c9d4: 02e03025 */ or $a2,$s7,$zero -/* 2c9d8: 0c00aab0 */ jal func0002aac0 +/* 2c9d8: 0c00aab0 */ jal cd0002aac0 /* 2c9dc: 02003825 */ or $a3,$s0,$zero /* 2c9e0: 1040005e */ beqz $v0,.L0002cb5c /* 2c9e4: c7b2012c */ lwc1 $f18,0x12c($sp) @@ -7035,7 +7035,7 @@ glabel func0002c714 /* 2ca58: e6520004 */ swc1 $f18,0x4($s2) /* 2ca5c: c7a80134 */ lwc1 $f8,0x134($sp) /* 2ca60: e6480008 */ swc1 $f8,0x8($s2) -/* 2ca64: 0c00b0ca */ jal func0002c328 +/* 2ca64: 0c00b0ca */ jal cd0002c328 /* 2ca68: afb50010 */ sw $s5,0x10($sp) /* 2ca6c: 8fac01a8 */ lw $t4,0x1a8($sp) /* 2ca70: 1000003a */ b .L0002cb5c @@ -7053,7 +7053,7 @@ glabel func0002c714 /* 2ca9c: 02003825 */ or $a3,$s0,$zero /* 2caa0: e7b60020 */ swc1 $f22,0x20($sp) /* 2caa4: e7b40024 */ swc1 $f20,0x24($sp) -/* 2caa8: 0c00ab1c */ jal func0002ac70 +/* 2caa8: 0c00ab1c */ jal cd0002ac70 /* 2caac: afb8001c */ sw $t8,0x1c($sp) /* 2cab0: 1040002a */ beqz $v0,.L0002cb5c /* 2cab4: c7aa012c */ lwc1 $f10,0x12c($sp) @@ -7235,7 +7235,7 @@ glabel func0002c714 /* 2cd50: afae0010 */ sw $t6,0x10($sp) /* 2cd54: 02602825 */ or $a1,$s3,$zero /* 2cd58: 02e03025 */ or $a2,$s7,$zero -/* 2cd5c: 0c00aae6 */ jal func0002ab98 +/* 2cd5c: 0c00aae6 */ jal cd0002ab98 /* 2cd60: 02003825 */ or $a3,$s0,$zero /* 2cd64: 1040005e */ beqz $v0,.L0002cee0 /* 2cd68: c7b000e0 */ lwc1 $f16,0xe0($sp) @@ -7270,7 +7270,7 @@ glabel func0002c714 /* 2cddc: e6500004 */ swc1 $f16,0x4($s2) /* 2cde0: c7a400e8 */ lwc1 $f4,0xe8($sp) /* 2cde4: e6440008 */ swc1 $f4,0x8($s2) -/* 2cde8: 0c00b14a */ jal func0002c528 +/* 2cde8: 0c00b14a */ jal cd0002c528 /* 2cdec: afb50010 */ sw $s5,0x10($sp) /* 2cdf0: 8fb901a8 */ lw $t9,0x1a8($sp) /* 2cdf4: 1000003a */ b .L0002cee0 @@ -7288,7 +7288,7 @@ glabel func0002c714 /* 2ce20: 02003825 */ or $a3,$s0,$zero /* 2ce24: e7b60020 */ swc1 $f22,0x20($sp) /* 2ce28: e7b40024 */ swc1 $f20,0x24($sp) -/* 2ce2c: 0c00ac4a */ jal func0002b128 +/* 2ce2c: 0c00ac4a */ jal cd0002b128 /* 2ce30: afab001c */ sw $t3,0x1c($sp) /* 2ce34: 1040002a */ beqz $v0,.L0002cee0 /* 2ce38: c7b200e0 */ lwc1 $f18,0xe0($sp) @@ -7362,7 +7362,7 @@ glabel func0002c714 /* 2cf3c: 02003825 */ or $a3,$s0,$zero /* 2cf40: e7b60020 */ swc1 $f22,0x20($sp) /* 2cf44: e7b40024 */ swc1 $f20,0x24($sp) -/* 2cf48: 0c00ad58 */ jal func0002b560 +/* 2cf48: 0c00ad58 */ jal cd0002b560 /* 2cf4c: afad001c */ sw $t5,0x1c($sp) /* 2cf50: 1040002a */ beqz $v0,.L0002cffc /* 2cf54: c7a600b0 */ lwc1 $f6,0xb0($sp) @@ -7430,7 +7430,7 @@ glabel func0002c714 /* 2d044: 02003825 */ or $a3,$s0,$zero /* 2d048: e7b60020 */ swc1 $f22,0x20($sp) /* 2d04c: e7b40024 */ swc1 $f20,0x24($sp) -/* 2d050: 0c00ae55 */ jal func0002b954 +/* 2d050: 0c00ae55 */ jal cd0002b954 /* 2d054: afac001c */ sw $t4,0x1c($sp) /* 2d058: 1040002a */ beqz $v0,.L0002d104 /* 2d05c: c7b00088 */ lwc1 $f16,0x88($sp) @@ -7502,7 +7502,7 @@ glabel func0002c714 /* 2d158: 27bd0170 */ addiu $sp,$sp,0x170 ); -bool func0002d15c(struct coord *pos, struct coord *coord2, s16 *rooms, u32 types, u16 arg4, s32 arg5, s32 arg6, f32 arg7, f32 arg8) +bool cd0002d15c(struct coord *pos, struct coord *coord2, s16 *rooms, u32 types, u16 arg4, s32 arg5, s32 arg6, f32 arg7, f32 arg8) { s32 roomnum; s16 *roomptr; @@ -7525,8 +7525,8 @@ bool func0002d15c(struct coord *pos, struct coord *coord2, s16 *rooms, u32 types start = g_TileFileData.u8 + g_TileRooms[roomnum]; end = g_TileFileData.u8 + g_TileRooms[roomnum + 1]; - if (func0002bd04(start, end, pos, coord2, &sp27c, arg4, arg5, arg6, arg7, arg8) == 0) { - func00025168(NULL); + if (cd0002bd04(start, end, pos, coord2, &sp27c, arg4, arg5, arg6, arg7, arg8) == 0) { + cd00025168(NULL); return false; } } @@ -7545,8 +7545,8 @@ bool func0002d15c(struct coord *pos, struct coord *coord2, s16 *rooms, u32 types if (propIsOfCdType(prop, types) && propUpdateGeometry(prop, &start, &end) - && func0002bd04(start, end, pos, coord2, &sp27c, arg4, arg5, arg6, arg7, arg8) == 0) { - func00025168(prop); + && cd0002bd04(start, end, pos, coord2, &sp27c, arg4, arg5, arg6, arg7, arg8) == 0) { + cd00025168(prop); return false; } @@ -7557,7 +7557,7 @@ bool func0002d15c(struct coord *pos, struct coord *coord2, s16 *rooms, u32 types } GLOBAL_ASM( -glabel func0002d3b0 +glabel cd0002d3b0 /* 2d3b0: 27bdfd20 */ addiu $sp,$sp,-736 /* 2d3b4: 3c014f80 */ lui $at,0x4f80 /* 2d3b8: 44812000 */ mtc1 $at,$f4 @@ -7642,7 +7642,7 @@ glabel func0002d3b0 /* 2d4f0: 8fa702e4 */ lw $a3,0x2e4($sp) /* 2d4f4: afb90014 */ sw $t9,0x14($sp) /* 2d4f8: afaa001c */ sw $t2,0x1c($sp) -/* 2d4fc: 0c00b1c5 */ jal func0002c714 +/* 2d4fc: 0c00b1c5 */ jal cd0002c714 /* 2d500: afa90018 */ sw $t1,0x18($sp) /* 2d504: 1440000b */ bnez $v0,.L0002d534 /* 2d508: 240d0001 */ addiu $t5,$zero,0x1 @@ -7654,7 +7654,7 @@ glabel func0002d3b0 /* 2d520: 02403025 */ or $a2,$s2,$zero /* 2d524: 00003825 */ or $a3,$zero,$zero /* 2d528: e7b00010 */ swc1 $f16,0x10($sp) -/* 2d52c: 0c009495 */ jal func00025254 +/* 2d52c: 0c009495 */ jal cd00025254 /* 2d530: afae0014 */ sw $t6,0x14($sp) .L0002d534: /* 2d534: 86080002 */ lh $t0,0x2($s0) @@ -7719,7 +7719,7 @@ glabel func0002d3b0 /* 2d614: afb40034 */ sw $s4,0x34($sp) /* 2d618: afab0014 */ sw $t3,0x14($sp) /* 2d61c: afac0018 */ sw $t4,0x18($sp) -/* 2d620: 0c00b1c5 */ jal func0002c714 +/* 2d620: 0c00b1c5 */ jal cd0002c714 /* 2d624: afad001c */ sw $t5,0x1c($sp) /* 2d628: 1440000b */ bnez $v0,.L0002d658 /* 2d62c: 24190001 */ addiu $t9,$zero,0x1 @@ -7731,7 +7731,7 @@ glabel func0002d3b0 /* 2d644: 02403025 */ or $a2,$s2,$zero /* 2d648: 02003825 */ or $a3,$s0,$zero /* 2d64c: e7b20010 */ swc1 $f18,0x10($sp) -/* 2d650: 0c009495 */ jal func00025254 +/* 2d650: 0c009495 */ jal cd00025254 /* 2d654: afa90014 */ sw $t1,0x14($sp) .L0002d658: /* 2d658: 86220002 */ lh $v0,0x2($s1) @@ -7761,7 +7761,7 @@ glabel func0002d3b0 // Mismatch: Calculation of g_TileRooms[roomnum] is different // Other functions and the below use t3 as the offset, t2 as the base, then t2 + t3 // But goal for this function uses t2 as the offset, t3 as the base, then t2 + t3 -//s32 func0002d3b0(struct coord *arg0, struct coord *arg1, s16 *rooms, s32 types, u16 arg4, s32 arg5, s32 arg6, f32 ymax, f32 ymin) +//s32 cd0002d3b0(struct coord *arg0, struct coord *arg1, s16 *rooms, s32 types, u16 arg4, s32 arg5, s32 arg6, f32 ymax, f32 ymin) //{ // s32 roomnum; // s16 *roomptr; @@ -7790,9 +7790,9 @@ glabel func0002d3b0 // start = g_TileFileData.u8 + g_TileRooms[roomnum]; // end = g_TileFileData.u8 + g_TileRooms[roomnum + 1]; // -// if (!func0002c714(start, end, arg0, arg1, &sp2c4, arg4, arg5, arg6, ymax, ymin, &sp298, sp2b4, &sp2a8, &sp29c, &sp294, roomnum)) { +// if (!cd0002c714(start, end, arg0, arg1, &sp2c4, arg4, arg5, arg6, ymax, ymin, &sp298, sp2b4, &sp2a8, &sp29c, &sp294, roomnum)) { // sp2c0 = true; -// func00025254(&sp2a8, &sp29c, sp2b4, NULL, sp298, sp294); +// cd00025254(&sp2a8, &sp29c, sp2b4, NULL, sp298, sp294); // } // } // @@ -7809,9 +7809,9 @@ glabel func0002d3b0 // // if (propIsOfCdType(prop, types) // && propUpdateGeometry(prop, &start, &end) -// && !func0002c714(start, end, arg0, arg1, &sp2c4, arg4, arg5, arg6, ymax, ymin, &sp298, sp2b4, &sp2a8, &sp29c, &sp294, -999)) { +// && !cd0002c714(start, end, arg0, arg1, &sp2c4, arg4, arg5, arg6, ymax, ymin, &sp298, sp2b4, &sp2a8, &sp29c, &sp294, -999)) { // sp2c0 = true; -// func00025254(&sp2a8, &sp29c, sp2b4, prop, sp298, sp294); +// cd00025254(&sp2a8, &sp29c, sp2b4, prop, sp298, sp294); // } // // propnumptr++; @@ -7820,14 +7820,14 @@ glabel func0002d3b0 // return !sp2c0; //} -bool func0002d6ac(struct coord *pos, s16 *rooms, struct coord *targetpos, u32 types, u32 arg4, f32 arg5, f32 arg6) +bool cd0002d6ac(struct coord *pos, s16 *rooms, struct coord *targetpos, u32 types, u32 arg4, f32 arg5, f32 arg6) { s16 sp44[21]; s16 sp34[8]; func00018148(pos, targetpos, rooms, sp34, sp44, 20); - return func0002d15c(pos, targetpos, sp44, types, 4, 0, arg4, arg5, arg6); + return cd0002d15c(pos, targetpos, sp44, types, 4, 0, arg4, arg5, arg6); } s32 cdTestAToB2(struct coord *pos, s16 *rooms, struct coord *coord2, s16 *rooms2, u32 types, s32 arg5, f32 arg6, f32 arg7) @@ -7839,7 +7839,7 @@ s32 cdTestAToB2(struct coord *pos, s16 *rooms, struct coord *coord2, s16 *rooms2 func0f065d1c(pos, rooms, coord2, sp34, sp44, 20); if (arrayIntersects(sp34, rooms2)) { - result = func0002d15c(pos, coord2, sp44, types, 4, 0, arg5, arg6, arg7); + result = cd0002d15c(pos, coord2, sp44, types, 4, 0, arg5, arg6, arg7); } else { result = 0; } @@ -7847,26 +7847,26 @@ s32 cdTestAToB2(struct coord *pos, s16 *rooms, struct coord *coord2, s16 *rooms2 return result; } -bool func0002d7c0(struct coord *pos, s16 *rooms, struct coord *arg2, u32 arg3, u32 arg4, f32 ymax, f32 ymin) +bool cd0002d7c0(struct coord *pos, s16 *rooms, struct coord *arg2, u32 arg3, u32 arg4, f32 ymax, f32 ymin) { s16 sp44[21]; s16 sp34[8]; func00018148(pos, arg2, rooms, sp34, sp44, 20); - return func0002d3b0(pos, arg2, sp44, arg3, 4, 0, arg4, ymax, ymin); + return cd0002d3b0(pos, arg2, sp44, arg3, 4, 0, arg4, ymax, ymin); } -s32 func0002d840(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, u32 types, s32 arg5, f32 ymax, f32 ymin) +s32 cd0002d840(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, u32 types, s32 arg5, f32 ymax, f32 ymin) { s16 rooms[21]; func00018148(arg0, arg2, arg1, arg3, rooms, 20); - return func0002d15c(arg0, arg2, rooms, types, 4, 0, arg5, ymax, ymin); + return cd0002d15c(arg0, arg2, rooms, types, 4, 0, arg5, ymax, ymin); } -s32 func0002d8b8(struct coord *pos, s16 *rooms, struct coord *pos2, s16 *rooms2, s32 types, bool arg5, f32 ymax, f32 ymin) +s32 cd0002d8b8(struct coord *pos, s16 *rooms, struct coord *pos2, s16 *rooms2, s32 types, bool arg5, f32 ymax, f32 ymin) { s16 sp44[21]; s16 sp34[8]; @@ -7874,10 +7874,10 @@ s32 func0002d8b8(struct coord *pos, s16 *rooms, struct coord *pos2, s16 *rooms2, func0f065d1c(pos, rooms, pos2, sp34, sp44, 20); - result = func0002d3b0(pos, pos2, sp44, types, 4, 0, arg5, ymax, ymin); + result = cd0002d3b0(pos, pos2, sp44, types, 4, 0, arg5, ymax, ymin); if (result != CDRESULT_COLLISION && !arrayIntersects(sp34, rooms2)) { - func00024f6c(); + cd00024f6c(); result = CDRESULT_ERROR; } @@ -7894,31 +7894,31 @@ s32 cdTestAToB3(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, f3 func0f065d1c(arg0, arg1, arg2, sp4c, sp5c, 20); - result = func0002d3b0(arg0, arg2, sp5c, types, 4, 0, arg6, ymax, ymin); + result = cd0002d3b0(arg0, arg2, sp5c, types, 4, 0, arg6, ymax, ymin); if (result == CDRESULT_COLLISION) { sp40.x = arg2->x - arg0->x; sp40.y = arg2->y - arg0->y; sp40.z = arg2->z - arg0->z; - func000250cc(arg0, &sp40, width); + cd000250cc(arg0, &sp40, width); } else if (!arrayIntersects(sp4c, arg3)) { - func00024f6c(); + cd00024f6c(); result = -1; } return result; } -void func0002da50(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, u32 types, s32 arg5, f32 ymax, f32 ymin) +void cd0002da50(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, u32 types, s32 arg5, f32 ymax, f32 ymin) { s16 rooms[21]; func00018148(arg0, arg2, arg1, arg3, rooms, 20); - func0002d3b0(arg0, arg2, rooms, types, 4, 0, arg5, ymax, ymin); + cd0002d3b0(arg0, arg2, rooms, types, 4, 0, arg5, ymax, ymin); } -s32 func0002dac8(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, f32 width, u32 types, s32 arg6, f32 ymax, f32 ymin) +s32 cd0002dac8(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, f32 width, u32 types, s32 arg6, f32 ymax, f32 ymin) { s16 rooms[21]; struct coord sp40; @@ -7926,35 +7926,35 @@ s32 func0002dac8(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, f func00018148(arg0, arg2, arg1, arg3, rooms, 20); - result = func0002d3b0(arg0, arg2, rooms, types, 4, 0, arg6, ymax, ymin); + result = cd0002d3b0(arg0, arg2, rooms, types, 4, 0, arg6, ymax, ymin); if (result == 0) { sp40.x = arg2->x - arg0->x; sp40.y = arg2->y - arg0->y; sp40.z = arg2->z - arg0->z; - func000250cc(arg0, &sp40, width); + cd000250cc(arg0, &sp40, width); } return result; } -bool func0002db98(struct coord *viewpos, s16 *rooms, struct coord *targetpos, u32 types, u16 arg4) +bool cd0002db98(struct coord *viewpos, s16 *rooms, struct coord *targetpos, u32 types, u16 arg4) { s16 sp44[21]; s16 sp34[8]; func00018148(viewpos, targetpos, rooms, sp34, sp44, 20); - return func0002d15c(viewpos, targetpos, sp44, types, arg4, 1, 1, 0, 0); + return cd0002d15c(viewpos, targetpos, sp44, types, arg4, 1, 1, 0, 0); } -bool func0002dc18(struct coord *coord, s16 *rooms, struct coord *coord2, s32 arg3) +bool cd0002dc18(struct coord *coord, s16 *rooms, struct coord *coord2, s32 arg3) { - return func0002db98(coord, rooms, coord2, arg3, 0x1c); + return cd0002db98(coord, rooms, coord2, arg3, 0x1c); } -bool hasLineOfSight(struct coord *coord, s16 *rooms, struct coord *coord2, s16 *rooms2, s32 arg4, u16 arg5) +bool cdHasLineOfSight(struct coord *coord, s16 *rooms, struct coord *coord2, s16 *rooms2, s32 arg4, u16 arg5) { bool result; s16 sp44[20]; @@ -7963,7 +7963,7 @@ bool hasLineOfSight(struct coord *coord, s16 *rooms, struct coord *coord2, s16 * func0f065d1c(coord, rooms, coord2, sp34, sp44, 20); if (arrayIntersects(sp34, rooms2)) { - result = func0002d15c(coord, coord2, sp44, arg4, arg5, 1, 1, 0, 0); + result = cd0002d15c(coord, coord2, sp44, arg4, arg5, 1, 1, 0, 0); } else { result = false; } @@ -7971,12 +7971,12 @@ bool hasLineOfSight(struct coord *coord, s16 *rooms, struct coord *coord2, s16 * return result; } -bool func0002dcd0(struct coord *arg0, s16 *rooms1, struct coord *arg2, s16 *rooms2, u32 arg4) +bool cd0002dcd0(struct coord *arg0, s16 *rooms1, struct coord *arg2, s16 *rooms2, u32 arg4) { - return hasLineOfSight(arg0, rooms1, arg2, rooms2, arg4, 0x1c); + return cdHasLineOfSight(arg0, rooms1, arg2, rooms2, arg4, 0x1c); } -bool func0002dcfc(struct coord *pos, s16 *rooms, struct coord *pos2, s16 *rooms2, s16 *rooms3, u32 types, u16 arg6) +bool cd0002dcfc(struct coord *pos, s16 *rooms, struct coord *pos2, s16 *rooms2, s16 *rooms3, u32 types, u16 arg6) { bool result; s16 sp34[20]; @@ -7984,7 +7984,7 @@ bool func0002dcfc(struct coord *pos, s16 *rooms, struct coord *pos2, s16 *rooms2 func0f065d1c(pos, rooms, pos2, rooms3, sp34, 20); if (arrayIntersects(rooms3, rooms2)) { - result = func0002d15c(pos, pos2, sp34, types, arg6, 1, 1, 0, 0); + result = cd0002d15c(pos, pos2, sp34, types, arg6, 1, 1, 0, 0); } else { result = false; } @@ -7999,29 +7999,29 @@ s32 cdTestAToB4(struct coord *pos, s16 *rooms, struct coord *pos2, u32 types, u1 func00018148(pos, pos2, rooms, sp34, sp44, 20); - return func0002d3b0(pos, pos2, sp44, types, arg4, 1, 1, 0, 0); + return cd0002d3b0(pos, pos2, sp44, types, arg4, 1, 1, 0, 0); } -s32 func0002de10(struct coord *pos, s16 *rooms, struct coord *pos2, u32 types) +s32 cd0002de10(struct coord *pos, s16 *rooms, struct coord *pos2, u32 types) { return cdTestAToB4(pos, rooms, pos2, types, 0x1c); } -s32 func0002de34(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, u32 types, u16 arg5) +s32 cd0002de34(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, u32 types, u16 arg5) { s16 rooms[21]; func00018148(arg0, arg2, arg1, arg3, rooms, 20); - return func0002d15c(arg0, arg2, rooms, types, arg5, 1, 1, 0, 0); + return cd0002d15c(arg0, arg2, rooms, types, arg5, 1, 1, 0, 0); } -s32 func0002deac(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, u32 types) +s32 cd0002deac(struct coord *arg0, s16 *arg1, struct coord *arg2, s16 *arg3, u32 types) { - return func0002de34(arg0, arg1, arg2, arg3, types, 0x1c); + return cd0002de34(arg0, arg1, arg2, arg3, types, 0x1c); } -bool func0002ded8(struct coord *arg0, struct coord *arg1, struct prop *prop) +bool cd0002ded8(struct coord *arg0, struct coord *arg1, struct prop *prop) { u8 *start; u8 *end; @@ -8038,9 +8038,9 @@ bool func0002ded8(struct coord *arg0, struct coord *arg1, struct prop *prop) sp7c.z = arg1->z - arg0->z; if (propUpdateGeometry(prop, &start, &end)) { - if (!func0002c714(start, end, arg0, arg1, &sp7c, 0x1c, 1, 1, 0, 0, &sp50, &sp6c, &sp60, &sp54, &tile, -999)) { + if (!cd0002c714(start, end, arg0, arg1, &sp7c, 0x1c, 1, 1, 0, 0, &sp50, &sp6c, &sp60, &sp54, &tile, -999)) { result = true; - func00025254(&sp60, &sp54, &sp6c, prop, sp50, tile); + cd00025254(&sp60, &sp54, &sp6c, prop, sp50, tile); } } @@ -8048,7 +8048,7 @@ bool func0002ded8(struct coord *arg0, struct coord *arg1, struct prop *prop) } GLOBAL_ASM( -glabel func0002dffc +glabel cd0002dffc /* 2dffc: 27bdff78 */ addiu $sp,$sp,-136 /* 2e000: afbf003c */ sw $ra,0x3c($sp) /* 2e004: afb50038 */ sw $s5,0x38($sp) @@ -8229,7 +8229,7 @@ glabel func0002dffc ); // Mismatch: Float regalloc, likely related to the zero variable -//bool func0002dffc(struct tiletype2 *arg0, struct tiletype2 *arg1) +//bool cd0002dffc(struct tiletype2 *arg0, struct tiletype2 *arg1) //{ // u32 stack[4]; // f32 zero = 0; @@ -8286,7 +8286,7 @@ glabel func0002dffc // return false; //} -s32 func0002e278(u8 *start, u8 *end, struct tiletype2 *ref, u16 flags) +s32 cd0002e278(u8 *start, u8 *end, struct tiletype2 *ref, u16 flags) { struct tile *tile = (struct tile *) start; @@ -8318,7 +8318,7 @@ s32 func0002e278(u8 *start, u8 *end, struct tiletype2 *ref, u16 flags) } } - if (!func0002dffc(ref, tile2) && !func0002dffc(tile2, ref)) { + if (!cd0002dffc(ref, tile2) && !cd0002dffc(tile2, ref)) { return false; } } @@ -8330,7 +8330,7 @@ s32 func0002e278(u8 *start, u8 *end, struct tiletype2 *ref, u16 flags) if ((flags & tile->flags) && tile3->ymax >= ref->ymin && tile3->ymin <= ref->ymax - && func000274e0(ref, tile3->x, tile3->z, tile3->width, NULL, NULL)) { + && cd000274e0(ref, tile3->x, tile3->z, tile3->width, NULL, NULL)) { return false; } @@ -8341,7 +8341,7 @@ s32 func0002e278(u8 *start, u8 *end, struct tiletype2 *ref, u16 flags) return true; } -s32 func0002e4c4(struct tiletype2 *geo, s16 *rooms, u32 types) +s32 cd0002e4c4(struct tiletype2 *geo, s16 *rooms, u32 types) { s32 result = CDRESULT_NOCOLLISION; s32 roomnum; @@ -8361,10 +8361,10 @@ s32 func0002e4c4(struct tiletype2 *geo, s16 *rooms, u32 types) start = g_TileFileData.u8 + g_TileRooms[roomnum]; end = g_TileFileData.u8 + g_TileRooms[roomnum + 1]; - result = func0002e278(start, end, geo, TILEFLAG_0004); + result = cd0002e278(start, end, geo, TILEFLAG_0004); if (result == CDRESULT_COLLISION) { - func00025168(NULL); + cd00025168(NULL); break; } } @@ -8383,10 +8383,10 @@ s32 func0002e4c4(struct tiletype2 *geo, s16 *rooms, u32 types) struct prop *prop = &g_Vars.props[*propnumptr]; if (propIsOfCdType(prop, types) && propUpdateGeometry(prop, &start, &end)) { - result = func0002e278(start, end, geo, TILEFLAG_0004); + result = cd0002e278(start, end, geo, TILEFLAG_0004); if (result == CDRESULT_COLLISION) { - func00025168(prop); + cd00025168(prop); break; } } @@ -8399,7 +8399,7 @@ s32 func0002e4c4(struct tiletype2 *geo, s16 *rooms, u32 types) } GLOBAL_ASM( -glabel func0002e680 +glabel cd0002e680 /* 2e680: 27bdff60 */ addiu $sp,$sp,-160 /* 2e684: afb40048 */ sw $s4,0x48($sp) /* 2e688: afb1003c */ sw $s1,0x3c($sp) @@ -8480,19 +8480,19 @@ glabel func0002e680 /* 2e79c: 01423021 */ addu $a2,$t2,$v0 /* 2e7a0: 00004812 */ mflo $t1 /* 2e7a4: 02899821 */ addu $s3,$s4,$t1 -/* 2e7a8: 0c00ab1c */ jal func0002ac70 +/* 2e7a8: 0c00ab1c */ jal cd0002ac70 /* 2e7ac: 02602825 */ or $a1,$s3,$zero /* 2e7b0: 1040000e */ beqz $v0,.L0002e7ec /* 2e7b4: 26100001 */ addiu $s0,$s0,0x1 /* 2e7b8: 02e02025 */ or $a0,$s7,$zero /* 2e7bc: 03c02825 */ or $a1,$s8,$zero /* 2e7c0: 02c03025 */ or $a2,$s6,$zero -/* 2e7c4: 0c00946b */ jal func000251ac +/* 2e7c4: 0c00946b */ jal cd000251ac /* 2e7c8: 8fa700b0 */ lw $a3,0xb0($sp) /* 2e7cc: 02402025 */ or $a0,$s2,$zero -/* 2e7d0: 0c0094c5 */ jal func00025314 +/* 2e7d0: 0c0094c5 */ jal cd00025314 /* 2e7d4: 02602825 */ or $a1,$s3,$zero -/* 2e7d8: 0c0094f1 */ jal func000253c4 +/* 2e7d8: 0c0094f1 */ jal cd000253c4 /* 2e7dc: 8fa400b4 */ lw $a0,0xb4($sp) /* 2e7e0: 240b0001 */ addiu $t3,$zero,0x1 /* 2e7e4: 10000003 */ b .L0002e7f4 @@ -8518,7 +8518,7 @@ glabel func0002e680 ); GLOBAL_ASM( -glabel func0002e82c +glabel cd0002e82c /* 2e82c: 27bdff60 */ addiu $sp,$sp,-160 /* 2e830: afb40048 */ sw $s4,0x48($sp) /* 2e834: afb1003c */ sw $s1,0x3c($sp) @@ -8599,19 +8599,19 @@ glabel func0002e82c /* 2e948: 01423021 */ addu $a2,$t2,$v0 /* 2e94c: 00004812 */ mflo $t1 /* 2e950: 02899821 */ addu $s3,$s4,$t1 -/* 2e954: 0c00ac4a */ jal func0002b128 +/* 2e954: 0c00ac4a */ jal cd0002b128 /* 2e958: 02602825 */ or $a1,$s3,$zero /* 2e95c: 1040000e */ beqz $v0,.L0002e998 /* 2e960: 26100001 */ addiu $s0,$s0,0x1 /* 2e964: 02e02025 */ or $a0,$s7,$zero /* 2e968: 03c02825 */ or $a1,$s8,$zero /* 2e96c: 02c03025 */ or $a2,$s6,$zero -/* 2e970: 0c00946b */ jal func000251ac +/* 2e970: 0c00946b */ jal cd000251ac /* 2e974: 8fa700b0 */ lw $a3,0xb0($sp) /* 2e978: 02402025 */ or $a0,$s2,$zero -/* 2e97c: 0c0094c5 */ jal func00025314 +/* 2e97c: 0c0094c5 */ jal cd00025314 /* 2e980: 02602825 */ or $a1,$s3,$zero -/* 2e984: 0c0094f1 */ jal func000253c4 +/* 2e984: 0c0094f1 */ jal cd000253c4 /* 2e988: 8fa400b4 */ lw $a0,0xb4($sp) /* 2e98c: 240b0001 */ addiu $t3,$zero,0x1 /* 2e990: 10000003 */ b .L0002e9a0 @@ -8637,7 +8637,7 @@ glabel func0002e82c ); GLOBAL_ASM( -glabel func0002e9d8 +glabel cd0002e9d8 /* 2e9d8: 27bdff60 */ addiu $sp,$sp,-160 /* 2e9dc: afb40048 */ sw $s4,0x48($sp) /* 2e9e0: afb1003c */ sw $s1,0x3c($sp) @@ -8718,19 +8718,19 @@ glabel func0002e9d8 /* 2eaf4: 01423021 */ addu $a2,$t2,$v0 /* 2eaf8: 00004812 */ mflo $t1 /* 2eafc: 02899821 */ addu $s3,$s4,$t1 -/* 2eb00: 0c00ad58 */ jal func0002b560 +/* 2eb00: 0c00ad58 */ jal cd0002b560 /* 2eb04: 02602825 */ or $a1,$s3,$zero /* 2eb08: 1040000e */ beqz $v0,.L0002eb44 /* 2eb0c: 26100001 */ addiu $s0,$s0,0x1 /* 2eb10: 02e02025 */ or $a0,$s7,$zero /* 2eb14: 03c02825 */ or $a1,$s8,$zero /* 2eb18: 02c03025 */ or $a2,$s6,$zero -/* 2eb1c: 0c00946b */ jal func000251ac +/* 2eb1c: 0c00946b */ jal cd000251ac /* 2eb20: 8fa700b0 */ lw $a3,0xb0($sp) /* 2eb24: 02402025 */ or $a0,$s2,$zero -/* 2eb28: 0c0094c5 */ jal func00025314 +/* 2eb28: 0c0094c5 */ jal cd00025314 /* 2eb2c: 02602825 */ or $a1,$s3,$zero -/* 2eb30: 0c0094f1 */ jal func000253c4 +/* 2eb30: 0c0094f1 */ jal cd000253c4 /* 2eb34: 8fa400b4 */ lw $a0,0xb4($sp) /* 2eb38: 240b0001 */ addiu $t3,$zero,0x1 /* 2eb3c: 10000003 */ b .L0002eb4c @@ -8756,7 +8756,7 @@ glabel func0002e9d8 ); GLOBAL_ASM( -glabel func0002eb84 +glabel cd0002eb84 /* 2eb84: 27bdff60 */ addiu $sp,$sp,-160 /* 2eb88: afb40048 */ sw $s4,0x48($sp) /* 2eb8c: afb1003c */ sw $s1,0x3c($sp) @@ -8837,19 +8837,19 @@ glabel func0002eb84 /* 2eca0: 01423021 */ addu $a2,$t2,$v0 /* 2eca4: 00004812 */ mflo $t1 /* 2eca8: 02899821 */ addu $s3,$s4,$t1 -/* 2ecac: 0c00ae55 */ jal func0002b954 +/* 2ecac: 0c00ae55 */ jal cd0002b954 /* 2ecb0: 02602825 */ or $a1,$s3,$zero /* 2ecb4: 1040000e */ beqz $v0,.L0002ecf0 /* 2ecb8: 26100001 */ addiu $s0,$s0,0x1 /* 2ecbc: 02e02025 */ or $a0,$s7,$zero /* 2ecc0: 03c02825 */ or $a1,$s8,$zero /* 2ecc4: 02c03025 */ or $a2,$s6,$zero -/* 2ecc8: 0c00946b */ jal func000251ac +/* 2ecc8: 0c00946b */ jal cd000251ac /* 2eccc: 8fa700b0 */ lw $a3,0xb0($sp) /* 2ecd0: 02402025 */ or $a0,$s2,$zero -/* 2ecd4: 0c0094c5 */ jal func00025314 +/* 2ecd4: 0c0094c5 */ jal cd00025314 /* 2ecd8: 02602825 */ or $a1,$s3,$zero -/* 2ecdc: 0c0094f1 */ jal func000253c4 +/* 2ecdc: 0c0094f1 */ jal cd000253c4 /* 2ece0: 8fa400b4 */ lw $a0,0xb4($sp) /* 2ece4: 240b0001 */ addiu $t3,$zero,0x1 /* 2ece8: 10000003 */ b .L0002ecf8 @@ -8875,7 +8875,7 @@ glabel func0002eb84 ); GLOBAL_ASM( -glabel func0002ed30 +glabel cd0002ed30 /* 2ed30: 27bdffb8 */ addiu $sp,$sp,-72 /* 2ed34: afb40030 */ sw $s4,0x30($sp) /* 2ed38: afb10024 */ sw $s1,0x24($sp) @@ -8934,7 +8934,7 @@ glabel func0002ed30 /* 2ee08: 45020009 */ bc1fl .L0002ee30 /* 2ee0c: 924d0001 */ lbu $t5,0x1($s2) /* 2ee10: afb70010 */ sw $s7,0x10($sp) -/* 2ee14: 0c00b9a0 */ jal func0002e680 +/* 2ee14: 0c00b9a0 */ jal cd0002e680 /* 2ee18: afb10014 */ sw $s1,0x14($sp) /* 2ee1c: 50400004 */ beqzl $v0,.L0002ee30 /* 2ee20: 924d0001 */ lbu $t5,0x1($s2) @@ -8981,7 +8981,7 @@ glabel func0002ed30 /* 2eebc: 45020009 */ bc1fl .L0002eee4 /* 2eec0: 924d0001 */ lbu $t5,0x1($s2) /* 2eec4: afb70010 */ sw $s7,0x10($sp) -/* 2eec8: 0c00ba0b */ jal func0002e82c +/* 2eec8: 0c00ba0b */ jal cd0002e82c /* 2eecc: afb10014 */ sw $s1,0x14($sp) /* 2eed0: 50400004 */ beqzl $v0,.L0002eee4 /* 2eed4: 924d0001 */ lbu $t5,0x1($s2) @@ -9017,7 +9017,7 @@ glabel func0002ed30 /* 2ef44: 45000008 */ bc1f .L0002ef68 /* 2ef48: 00000000 */ nop /* 2ef4c: afb70010 */ sw $s7,0x10($sp) -/* 2ef50: 0c00ba76 */ jal func0002e9d8 +/* 2ef50: 0c00ba76 */ jal cd0002e9d8 /* 2ef54: afb10014 */ sw $s1,0x14($sp) /* 2ef58: 10400003 */ beqz $v0,.L0002ef68 /* 2ef5c: 00000000 */ nop @@ -9050,7 +9050,7 @@ glabel func0002ed30 /* 2efc0: 45020009 */ bc1fl .L0002efe8 /* 2efc4: 26100018 */ addiu $s0,$s0,0x18 /* 2efc8: afb70010 */ sw $s7,0x10($sp) -/* 2efcc: 0c00bae1 */ jal func0002eb84 +/* 2efcc: 0c00bae1 */ jal cd0002eb84 /* 2efd0: afb10014 */ sw $s1,0x14($sp) /* 2efd4: 50400004 */ beqzl $v0,.L0002efe8 /* 2efd8: 26100018 */ addiu $s0,$s0,0x18 @@ -9081,7 +9081,7 @@ glabel func0002ed30 ); GLOBAL_ASM( -glabel func0002f02c +glabel cd0002f02c /* 2f02c: 27bdfcb8 */ addiu $sp,$sp,-840 /* 2f030: afbf004c */ sw $ra,0x4c($sp) /* 2f034: afbe0048 */ sw $s8,0x48($sp) @@ -9192,7 +9192,7 @@ glabel func0002f02c /* 2f1bc: 03032821 */ addu $a1,$t8,$v1 /* 2f1c0: afa50338 */ sw $a1,0x338($sp) /* 2f1c4: afb70014 */ sw $s7,0x14($sp) -/* 2f1c8: 0c00bb4c */ jal func0002ed30 +/* 2f1c8: 0c00bb4c */ jal cd0002ed30 /* 2f1cc: afb50010 */ sw $s5,0x10($sp) /* 2f1d0: 10400005 */ beqz $v0,.L0002f1e8 /* 2f1d4: 00404825 */ or $t1,$v0,$zero @@ -9246,7 +9246,7 @@ glabel func0002f02c /* 2f288: 02403825 */ or $a3,$s2,$zero /* 2f28c: afb50010 */ sw $s5,0x10($sp) /* 2f290: afb70014 */ sw $s7,0x14($sp) -/* 2f294: 0c00bb4c */ jal func0002ed30 +/* 2f294: 0c00bb4c */ jal cd0002ed30 /* 2f298: afb0001c */ sw $s0,0x1c($sp) /* 2f29c: 10400005 */ beqz $v0,.L0002f2b4 /* 2f2a0: 00404825 */ or $t1,$v0,$zero @@ -9524,14 +9524,14 @@ glabel func0002f2fc /* 2f304: afa50004 */ sw $a1,0x4($sp) ); -bool func0002f308(struct coord *viewpos, s16 *rooms, struct coord *targetpos, f32 distance, s32 arg4, u16 arg5) +bool cd0002f308(struct coord *viewpos, s16 *rooms, struct coord *targetpos, f32 distance, s32 arg4, u16 arg5) { struct coord diff; f32 x; f32 z; struct coord vector; - if (func0002db98(viewpos, rooms, targetpos, arg4, arg5)) { + if (cd0002db98(viewpos, rooms, targetpos, arg4, arg5)) { return true; } @@ -9548,7 +9548,7 @@ bool func0002f308(struct coord *viewpos, s16 *rooms, struct coord *targetpos, f3 diff.y = targetpos->y; diff.z = targetpos->z + x; - if (func0002db98(viewpos, rooms, &diff, arg4, arg5)) { + if (cd0002db98(viewpos, rooms, &diff, arg4, arg5)) { return true; } @@ -9556,14 +9556,14 @@ bool func0002f308(struct coord *viewpos, s16 *rooms, struct coord *targetpos, f3 diff.y = targetpos->y; diff.z = targetpos->z - x; - if (func0002db98(viewpos, rooms, &diff, arg4, arg5)) { + if (cd0002db98(viewpos, rooms, &diff, arg4, arg5)) { return true; } return false; } -bool func0002f450(struct coord *viewpos, s16 *rooms, struct coord *targetpos, f32 distance, s32 arg4) +bool cd0002f450(struct coord *viewpos, s16 *rooms, struct coord *targetpos, f32 distance, s32 arg4) { - return func0002f308(viewpos, rooms, targetpos, distance, arg4, 8); + return cd0002f308(viewpos, rooms, targetpos, distance, arg4, 8); } diff --git a/src/lib/lib_0c000.c b/src/lib/crash.c similarity index 94% rename from src/lib/lib_0c000.c rename to src/lib/crash.c index c4aacf3bf..9539d488a 100644 --- a/src/lib/lib_0c000.c +++ b/src/lib/crash.c @@ -3,8 +3,8 @@ #include "bss.h" #include "lib/tlb.h" #include "lib/lib_09660.h" -#include "lib/lib_0c000.h" -#include "lib/lib_2fa00.h" +#include "lib/crash.h" +#include "lib/rmon.h" #include "data.h" #include "types.h" @@ -143,7 +143,7 @@ glabel func0000c1d0nb ); #endif -void faultCreateThread2(void) +void crashCreateThread(void) { osCreateMesgQueue(&g_FaultMesgQueue, &g_FaultMesg, 1); osCreateThread(&g_FaultThread, THREAD_FAULT, faultproc, NULL, &g_FaultStack[1024], THREADPRI_FAULT); @@ -476,12 +476,12 @@ glabel func0000c694nb /* c6e0: 3c047005 */ lui $a0,0x7005 /* c6e4: 3c047005 */ lui $a0,0x7005 /* c6e8: 24843fd0 */ addiu $a0,$a0,0x3fd0 -/* c6ec: 0c00c47d */ jal crashPrint +/* c6ec: 0c00c47d */ jal rmonPrint /* c6f0: 00e02825 */ or $a1,$a3,$zero /* c6f4: 10000004 */ beqz $zero,.NB0000c708 /* c6f8: 8fbf0014 */ lw $ra,0x14($sp) .NB0000c6fc: -/* c6fc: 0c00c47d */ jal crashPrint +/* c6fc: 0c00c47d */ jal rmonPrint /* c700: 24843fd8 */ addiu $a0,$a0,0x3fd8 /* c704: 8fbf0014 */ lw $ra,0x14($sp) .NB0000c708: @@ -521,12 +521,12 @@ glabel func0000c714nb /* c760: 3c047005 */ lui $a0,0x7005 /* c764: 3c047005 */ lui $a0,0x7005 /* c768: 24843fdc */ addiu $a0,$a0,0x3fdc -/* c76c: 0c00c47d */ jal crashPrint +/* c76c: 0c00c47d */ jal rmonPrint /* c770: 00e02825 */ or $a1,$a3,$zero /* c774: 10000004 */ beqz $zero,.NB0000c788 /* c778: 8fbf0014 */ lw $ra,0x14($sp) .NB0000c77c: -/* c77c: 0c00c47d */ jal crashPrint +/* c77c: 0c00c47d */ jal rmonPrint /* c780: 24843fe4 */ addiu $a0,$a0,0x3fe4 /* c784: 8fbf0014 */ lw $ra,0x14($sp) .NB0000c788: @@ -546,7 +546,7 @@ glabel func0000c794nb /* c79c: 3c047005 */ lui $a0,0x7005 /* c7a0: 3c058009 */ lui $a1,0x8009 /* c7a4: 8ca5710c */ lw $a1,0x710c($a1) -/* c7a8: 0c00c47d */ jal crashPrint +/* c7a8: 0c00c47d */ jal rmonPrint /* c7ac: 24843fe8 */ addiu $a0,$a0,0x3fe8 /* c7b0: 8fbf0014 */ lw $ra,0x14($sp) /* c7b4: 27bd0018 */ addiu $sp,$sp,0x18 @@ -570,7 +570,7 @@ u32 crashGetStackEnd(u32 sp, s32 tid) u32 end; if (tid <= 0 || tid > 6U) { - crashPrint("Bad tid\n"); + rmonPrint("Bad tid\n"); return 0; } @@ -589,7 +589,7 @@ u32 crashGetStackStart(u32 sp, s32 tid) u32 start; if (tid <= 0 || tid > 6U) { - crashPrint("Bad tid\n"); + rmonPrint("Bad tid\n"); return 0; } @@ -614,32 +614,32 @@ bool crashIsDouble(f32 value) void crashPrintFloat(s32 index, f32 value) { if (crashIsDouble(value)) { - crashPrint("%s%s%02d: % .7e ", "", "", index, (f64)value); + rmonPrint("%s%s%02d: % .7e ", "", "", index, (f64)value); } else { u32 bits = *(u32 *)&value; - crashPrint("%02d: I%d.%03d.%07d ", index, (bits & 0x80000000) >> 31, (bits & 0x7f800000) >> 23, bits & 0x7fffff); + rmonPrint("%02d: I%d.%03d.%07d ", index, (bits & 0x80000000) >> 31, (bits & 0x7f800000) >> 23, bits & 0x7fffff); } } void crashPrint2Floats(s32 index, f32 value1, f32 value2) { crashPrintFloat(index, value1); - crashPrint(" "); + rmonPrint(" "); crashPrintFloat(index + 1, value2); - crashPrint("\n"); + rmonPrint("\n"); } void crashPrint3Floats(s32 index, f32 value1, f32 value2, f32 value3) { crashPrintFloat(index, value1); - crashPrint(" "); + rmonPrint(" "); crashPrintFloat(index + 1, value2); - crashPrint(" "); + rmonPrint(" "); crashPrintFloat(index + 2, value3); - crashPrint("\n"); + rmonPrint("\n"); } #if VERSION >= VERSION_NTSC_1_0 @@ -654,7 +654,7 @@ u32 crashRender(OSThread *thread, u32 *callstack, s32 *tracelen) __OSThreadContext *ctx = &thread->context; bool done; - crashPrint("\n\nFAULT-\n"); + rmonPrint("\n\nFAULT-\n"); if (!g_Vars.fourmeg2player) { // Print a stack trace in a dodgy way. @@ -662,21 +662,21 @@ u32 crashRender(OSThread *thread, u32 *callstack, s32 *tracelen) // values which could potentially be a return address, and prints them. u32 *stackend = (u32 *) crashGetStackEnd(ctx->sp, thread->id); u32 *sp; - crashPrint("DodgyStackTrace: %08llx ", ctx->ra & 0xffffffff); + rmonPrint("DodgyStackTrace: %08llx ", ctx->ra & 0xffffffff); sp = (u32 *) ctx->sp; while (sp < stackend) { if (crashIsReturnAddress((u32 *)*sp)) { - crashPrint("%08x ", *sp); + rmonPrint("%08x ", *sp); } sp++; } - crashPrint(".\n"); + rmonPrint(".\n"); } - crashPrint("%H#@! Another Perfect Crash (tm)\n"); + rmonPrint("%H#@! Another Perfect Crash (tm)\n"); if (!g_Vars.fourmeg2player) { // Print floating point registers @@ -694,32 +694,32 @@ u32 crashRender(OSThread *thread, u32 *callstack, s32 *tracelen) } // Print integer registers - crashPrint("at 0x%016llx v0 0x%016llx v1 0x%016llx\n", ctx->at, ctx->v0, ctx->v1); - crashPrint("a0 0x%016llx a1 0x%016llx a2 0x%016llx\n", ctx->a0, ctx->a1, ctx->a2); - crashPrint("a3 0x%016llx t0 0x%016llx t1 0x%016llx\n", ctx->a3, ctx->t0, ctx->t1); - crashPrint("t2 0x%016llx t3 0x%016llx t4 0x%016llx\n", ctx->t2, ctx->t3, ctx->t4); - crashPrint("t5 0x%016llx t6 0x%016llx t7 0x%016llx\n", ctx->t5, ctx->t6, ctx->t7); - crashPrint("s0 0x%016llx s1 0x%016llx s2 0x%016llx\n", ctx->s0, ctx->s1, ctx->s2); - crashPrint("s3 0x%016llx s4 0x%016llx s5 0x%016llx\n", ctx->s3, ctx->s4, ctx->s5); - crashPrint("s6 0x%016llx s7 0x%016llx t8 0x%016llx\n", ctx->s6, ctx->s7, ctx->t8); - crashPrint("t9 0x%016llx gp 0x%016llx sp 0x%016llx\n", ctx->t9, ctx->gp, ctx->sp); - crashPrint("s8 0x%016llx ra 0x%016llx\n", ctx->s8, ctx->ra); + rmonPrint("at 0x%016llx v0 0x%016llx v1 0x%016llx\n", ctx->at, ctx->v0, ctx->v1); + rmonPrint("a0 0x%016llx a1 0x%016llx a2 0x%016llx\n", ctx->a0, ctx->a1, ctx->a2); + rmonPrint("a3 0x%016llx t0 0x%016llx t1 0x%016llx\n", ctx->a3, ctx->t0, ctx->t1); + rmonPrint("t2 0x%016llx t3 0x%016llx t4 0x%016llx\n", ctx->t2, ctx->t3, ctx->t4); + rmonPrint("t5 0x%016llx t6 0x%016llx t7 0x%016llx\n", ctx->t5, ctx->t6, ctx->t7); + rmonPrint("s0 0x%016llx s1 0x%016llx s2 0x%016llx\n", ctx->s0, ctx->s1, ctx->s2); + rmonPrint("s3 0x%016llx s4 0x%016llx s5 0x%016llx\n", ctx->s3, ctx->s4, ctx->s5); + rmonPrint("s6 0x%016llx s7 0x%016llx t8 0x%016llx\n", ctx->s6, ctx->s7, ctx->t8); + rmonPrint("t9 0x%016llx gp 0x%016llx sp 0x%016llx\n", ctx->t9, ctx->gp, ctx->sp); + rmonPrint("s8 0x%016llx ra 0x%016llx\n", ctx->s8, ctx->ra); - crashPrint("TID %d epc %08x caus %08x fp %08x badv %08x sr %08x\n", + rmonPrint("TID %d epc %08x caus %08x fp %08x badv %08x sr %08x\n", thread->id, ctx->pc, ctx->cause, ctx->fpcsr, ctx->badvaddr, ctx->sr); // Print the address of the faulted instruction, along with the instruction // itself and the next three - presumably to help the developer locate it. - crashPrint("dshex -a %08x %08x %08x %08x %08x\n", ctx->pc, + rmonPrint("dshex -a %08x %08x %08x %08x %08x\n", ctx->pc, ((u32 *)ctx->pc)[0], ((u32 *)ctx->pc)[1], ((u32 *)ctx->pc)[2], ((u32 *)ctx->pc)[3]); crashPrintDescription(ctx->cause, "cause", g_CrashCauseDescriptions); - crashPrint(" : "); + rmonPrint(" : "); crashPrintDescription(ctx->fpcsr, "fpcsr", g_CrashFpcsrDescriptions); - crashPrint("\n"); + rmonPrint("\n"); // Print a proper stack trace i = 0; @@ -729,17 +729,17 @@ u32 crashRender(OSThread *thread, u32 *callstack, s32 *tracelen) stackstart = (u32 *) crashGetStackStart((u32)sp, thread->id); ptr = ctx->pc; *tracelen = 0; - crashPrint("nearl: "); + rmonPrint("nearl: "); while (!done) { sp = (u32 *) crashGetParentStackFrame((u32 *) ptr, &_libSegmentStart, (u32)sp, regs); - crashPrint(" %08x ", ptr); + rmonPrint(" %08x ", ptr); callstack[*tracelen] = ptr; *tracelen = *tracelen + 1; if (i == 4) { - crashPrint("\n "); + rmonPrint("\n "); } if (sp == NULL) { @@ -760,8 +760,8 @@ u32 crashRender(OSThread *thread, u32 *callstack, s32 *tracelen) i++; } - crashPrint("\n"); - crashPrint("\n"); + rmonPrint("\n"); + rmonPrint("\n"); return 0; } @@ -806,7 +806,7 @@ glabel crashRender /* ca7c: afb1002c */ sw $s1,0x2c($sp) /* ca80: afb00028 */ sw $s0,0x28($sp) /* ca84: afa500fc */ sw $a1,0xfc($sp) -/* ca88: 0c00c47d */ jal crashPrint +/* ca88: 0c00c47d */ jal rmonPrint /* ca8c: 24844050 */ addiu $a0,$a0,0x4050 /* ca90: 8fa200f8 */ lw $v0,0xf8($sp) /* ca94: 24530020 */ addiu $s3,$v0,0x20 @@ -820,7 +820,7 @@ glabel crashRender /* cab4: 00409025 */ or $s2,$v0,$zero /* cab8: 03203825 */ or $a3,$t9,$zero /* cabc: 2484405c */ addiu $a0,$a0,0x405c -/* cac0: 0c00c47d */ jal crashPrint +/* cac0: 0c00c47d */ jal rmonPrint /* cac4: 00003025 */ or $a2,$zero,$zero /* cac8: 8e7000d4 */ lw $s0,0xd4($s3) /* cacc: 0212082b */ sltu $at,$s0,$s2 @@ -832,7 +832,7 @@ glabel crashRender /* cae0: 8e040000 */ lw $a0,0x0($s0) /* cae4: 10400003 */ beqz $v0,.NB0000caf4 /* cae8: 02202025 */ or $a0,$s1,$zero -/* caec: 0c00c47d */ jal crashPrint +/* caec: 0c00c47d */ jal rmonPrint /* caf0: 8e050000 */ lw $a1,0x0($s0) .NB0000caf4: /* caf4: 26100004 */ addiu $s0,$s0,0x4 @@ -841,10 +841,10 @@ glabel crashRender /* cb00: 00000000 */ sll $zero,$zero,0x0 .NB0000cb04: /* cb04: 3c047005 */ lui $a0,0x7005 -/* cb08: 0c00c47d */ jal crashPrint +/* cb08: 0c00c47d */ jal rmonPrint /* cb0c: 24844080 */ addiu $a0,$a0,0x4080 /* cb10: 3c047005 */ lui $a0,0x7005 -/* cb14: 0c00c47d */ jal crashPrint +/* cb14: 0c00c47d */ jal rmonPrint /* cb18: 24844084 */ addiu $a0,$a0,0x4084 /* cb1c: 00002025 */ or $a0,$zero,$zero /* cb20: 8e650114 */ lw $a1,0x114($s3) @@ -911,7 +911,7 @@ glabel crashRender /* cc14: 3c047005 */ lui $a0,0x7005 /* cc18: 2484409c */ addiu $a0,$a0,0x409c /* cc1c: afad001c */ sw $t5,0x1c($sp) -/* cc20: 0c00c47d */ jal crashPrint +/* cc20: 0c00c47d */ jal rmonPrint /* cc24: afac0018 */ sw $t4,0x18($sp) /* cc28: 8e6e0020 */ lw $t6,0x20($s3) /* cc2c: 8e6f0024 */ lw $t7,0x24($s3) @@ -924,7 +924,7 @@ glabel crashRender /* cc48: 3c047005 */ lui $a0,0x7005 /* cc4c: 248440c4 */ addiu $a0,$a0,0x40c4 /* cc50: afb9001c */ sw $t9,0x1c($sp) -/* cc54: 0c00c47d */ jal crashPrint +/* cc54: 0c00c47d */ jal rmonPrint /* cc58: afb80018 */ sw $t8,0x18($sp) /* cc5c: 8e680038 */ lw $t0,0x38($s3) /* cc60: 8e69003c */ lw $t1,0x3c($s3) @@ -937,7 +937,7 @@ glabel crashRender /* cc7c: 3c047005 */ lui $a0,0x7005 /* cc80: 248440ec */ addiu $a0,$a0,0x40ec /* cc84: afab001c */ sw $t3,0x1c($sp) -/* cc88: 0c00c47d */ jal crashPrint +/* cc88: 0c00c47d */ jal rmonPrint /* cc8c: afaa0018 */ sw $t2,0x18($sp) /* cc90: 8e6c0050 */ lw $t4,0x50($s3) /* cc94: 8e6d0054 */ lw $t5,0x54($s3) @@ -950,7 +950,7 @@ glabel crashRender /* ccb0: 3c047005 */ lui $a0,0x7005 /* ccb4: 24844114 */ addiu $a0,$a0,0x4114 /* ccb8: afaf001c */ sw $t7,0x1c($sp) -/* ccbc: 0c00c47d */ jal crashPrint +/* ccbc: 0c00c47d */ jal rmonPrint /* ccc0: afae0018 */ sw $t6,0x18($sp) /* ccc4: 8e780068 */ lw $t8,0x68($s3) /* ccc8: 8e79006c */ lw $t9,0x6c($s3) @@ -963,7 +963,7 @@ glabel crashRender /* cce4: 3c047005 */ lui $a0,0x7005 /* cce8: 2484413c */ addiu $a0,$a0,0x413c /* ccec: afa9001c */ sw $t1,0x1c($sp) -/* ccf0: 0c00c47d */ jal crashPrint +/* ccf0: 0c00c47d */ jal rmonPrint /* ccf4: afa80018 */ sw $t0,0x18($sp) /* ccf8: 8e6a0080 */ lw $t2,0x80($s3) /* ccfc: 8e6b0084 */ lw $t3,0x84($s3) @@ -976,7 +976,7 @@ glabel crashRender /* cd18: 3c047005 */ lui $a0,0x7005 /* cd1c: 24844164 */ addiu $a0,$a0,0x4164 /* cd20: afad001c */ sw $t5,0x1c($sp) -/* cd24: 0c00c47d */ jal crashPrint +/* cd24: 0c00c47d */ jal rmonPrint /* cd28: afac0018 */ sw $t4,0x18($sp) /* cd2c: 8e6e0098 */ lw $t6,0x98($s3) /* cd30: 8e6f009c */ lw $t7,0x9c($s3) @@ -989,7 +989,7 @@ glabel crashRender /* cd4c: 3c047005 */ lui $a0,0x7005 /* cd50: 2484418c */ addiu $a0,$a0,0x418c /* cd54: afb9001c */ sw $t9,0x1c($sp) -/* cd58: 0c00c47d */ jal crashPrint +/* cd58: 0c00c47d */ jal rmonPrint /* cd5c: afb80018 */ sw $t8,0x18($sp) /* cd60: 8e6800b0 */ lw $t0,0xb0($s3) /* cd64: 8e6900b4 */ lw $t1,0xb4($s3) @@ -1002,7 +1002,7 @@ glabel crashRender /* cd80: 3c047005 */ lui $a0,0x7005 /* cd84: 248441b4 */ addiu $a0,$a0,0x41b4 /* cd88: afab001c */ sw $t3,0x1c($sp) -/* cd8c: 0c00c47d */ jal crashPrint +/* cd8c: 0c00c47d */ jal rmonPrint /* cd90: afaa0018 */ sw $t2,0x18($sp) /* cd94: 8e6c00c8 */ lw $t4,0xc8($s3) /* cd98: 8e6d00cc */ lw $t5,0xcc($s3) @@ -1015,7 +1015,7 @@ glabel crashRender /* cdb4: 3c047005 */ lui $a0,0x7005 /* cdb8: 248441dc */ addiu $a0,$a0,0x41dc /* cdbc: afaf001c */ sw $t7,0x1c($sp) -/* cdc0: 0c00c47d */ jal crashPrint +/* cdc0: 0c00c47d */ jal rmonPrint /* cdc4: afae0018 */ sw $t6,0x18($sp) /* cdc8: 8e7800e0 */ lw $t8,0xe0($s3) /* cdcc: 8e7900e4 */ lw $t9,0xe4($s3) @@ -1024,7 +1024,7 @@ glabel crashRender /* cdd8: 8e6700dc */ lw $a3,0xdc($s3) /* cddc: 24844204 */ addiu $a0,$a0,0x4204 /* cde0: afb80010 */ sw $t8,0x10($sp) -/* cde4: 0c00c47d */ jal crashPrint +/* cde4: 0c00c47d */ jal rmonPrint /* cde8: afb90014 */ sw $t9,0x14($sp) /* cdec: 8fa800f8 */ lw $t0,0xf8($sp) /* cdf0: 8e69010c */ lw $t1,0x10c($s3) @@ -1037,7 +1037,7 @@ glabel crashRender /* ce0c: 24844220 */ addiu $a0,$a0,0x4220 /* ce10: afaa0014 */ sw $t2,0x14($sp) /* ce14: 8e6b00f8 */ lw $t3,0xf8($s3) -/* ce18: 0c00c47d */ jal crashPrint +/* ce18: 0c00c47d */ jal rmonPrint /* ce1c: afab0018 */ sw $t3,0x18($sp) /* ce20: 8e6500fc */ lw $a1,0xfc($s3) /* ce24: 3c047005 */ lui $a0,0x7005 @@ -1048,7 +1048,7 @@ glabel crashRender /* ce38: afac0010 */ sw $t4,0x10($sp) /* ce3c: 8cad000c */ lw $t5,0xc($a1) /* ce40: 00a01025 */ or $v0,$a1,$zero -/* ce44: 0c00c47d */ jal crashPrint +/* ce44: 0c00c47d */ jal rmonPrint /* ce48: afad0014 */ sw $t5,0x14($sp) /* ce4c: 3c057005 */ lui $a1,0x7005 /* ce50: 3c068006 */ lui $a2,0x8006 @@ -1057,7 +1057,7 @@ glabel crashRender /* ce5c: 0c00342d */ jal crashPrintDescription /* ce60: 8e640100 */ lw $a0,0x100($s3) /* ce64: 3c047005 */ lui $a0,0x7005 -/* ce68: 0c00c47d */ jal crashPrint +/* ce68: 0c00c47d */ jal rmonPrint /* ce6c: 24844284 */ addiu $a0,$a0,0x4284 /* ce70: 3c057005 */ lui $a1,0x7005 /* ce74: 3c068006 */ lui $a2,0x8006 @@ -1066,7 +1066,7 @@ glabel crashRender /* ce80: 0c00342d */ jal crashPrintDescription /* ce84: 8e64010c */ lw $a0,0x10c($s3) /* ce88: 3c047005 */ lui $a0,0x7005 -/* ce8c: 0c00c47d */ jal crashPrint +/* ce8c: 0c00c47d */ jal rmonPrint /* ce90: 24844290 */ addiu $a0,$a0,0x4290 /* ce94: 8e6400d4 */ lw $a0,0xd4($s3) /* ce98: 8fb800f8 */ lw $t8,0xf8($sp) @@ -1083,7 +1083,7 @@ glabel crashRender /* cec4: 8e7000fc */ lw $s0,0xfc($s3) /* cec8: 3c047005 */ lui $a0,0x7005 /* cecc: ae800000 */ sw $zero,0x0($s4) -/* ced0: 0c00c47d */ jal crashPrint +/* ced0: 0c00c47d */ jal rmonPrint /* ced4: 24844294 */ addiu $a0,$a0,0x4294 .NB0000ced8: /* ced8: 3c057000 */ lui $a1,0x7000 @@ -1095,7 +1095,7 @@ glabel crashRender /* cef0: 3c047005 */ lui $a0,0x7005 /* cef4: 00408825 */ or $s1,$v0,$zero /* cef8: 2484429c */ addiu $a0,$a0,0x429c -/* cefc: 0c00c47d */ jal crashPrint +/* cefc: 0c00c47d */ jal rmonPrint /* cf00: 02002825 */ or $a1,$s0,$zero /* cf04: 8e890000 */ lw $t1,0x0($s4) /* cf08: 8fa800fc */ lw $t0,0xfc($sp) @@ -1108,7 +1108,7 @@ glabel crashRender /* cf24: 258d0001 */ addiu $t5,$t4,0x1 /* cf28: 16410003 */ bne $s2,$at,.NB0000cf38 /* cf2c: ae8d0000 */ sw $t5,0x0($s4) -/* cf30: 0c00c47d */ jal crashPrint +/* cf30: 0c00c47d */ jal rmonPrint /* cf34: 248442a4 */ addiu $a0,$a0,0x42a4 .NB0000cf38: /* cf38: 16200002 */ bnez $s1,.NB0000cf44 @@ -1202,10 +1202,10 @@ glabel crashRender /* d074: 24040044 */ addiu $a0,$zero,0x44 .NB0000d078: /* d078: 3c047005 */ lui $a0,0x7005 -/* d07c: 0c00c47d */ jal crashPrint +/* d07c: 0c00c47d */ jal rmonPrint /* d080: 248442b0 */ addiu $a0,$a0,0x42b0 /* d084: 3c047005 */ lui $a0,0x7005 -/* d088: 0c00c47d */ jal crashPrint +/* d088: 0c00c47d */ jal rmonPrint /* d08c: 248442b4 */ addiu $a0,$a0,0x42b4 /* d090: 8fbf003c */ lw $ra,0x3c($sp) /* d094: 8fb00028 */ lw $s0,0x28($sp) @@ -1224,23 +1224,23 @@ void crashPrintDescription(u32 mask, char *label, struct crashdescription *descr bool first = true; s32 i; - crashPrint("%s <", label); + rmonPrint("%s <", label); while (description->mask != 0) { if ((description->mask & mask) == description->value) { if (first) { first = false; } else { - crashPrint(","); + rmonPrint(","); } - crashPrint("%s", description->text); + rmonPrint("%s", description->text); } description++; } - crashPrint(">"); + rmonPrint(">"); } void crashPutChar(s32 x, s32 y, char c) @@ -1313,7 +1313,7 @@ void crashScroll(s32 numlines) } #if VERSION >= VERSION_NTSC_1_0 -void func0000cdc8(s32 x, s32 y, char c) +void crash0000cdc8(s32 x, s32 y, char c) { s32 i; s32 j; @@ -1382,7 +1382,7 @@ void func0000cdc8(s32 x, s32 y, char c) } #else GLOBAL_ASM( -glabel func0000cdc8 +glabel crash0000cdc8 /* d398: 27bdffe8 */ addiu $sp,$sp,-24 /* d39c: afbf0014 */ sw $ra,0x14($sp) /* d3a0: afa40018 */ sw $a0,0x18($sp) @@ -1526,7 +1526,7 @@ glabel crashReset ); #endif -void func0000cf54(u8 *fb) +void crash0000cf54(u8 *fb) { s32 width; s32 height; @@ -1541,7 +1541,7 @@ void func0000cf54(u8 *fb) if (g_CrashCharBuffer != NULL) { for (y = 0; y < height && y < 29; y++) { for (x = 0; x < width - 5 && x < 71; x++) { - func0000cdc8(20 + x * 4, 7 + y * 7, g_CrashCharBuffer[y][x]); + crash0000cdc8(20 + x * 4, 7 + y * 7, g_CrashCharBuffer[y][x]); } } } diff --git a/src/lib/lib_0bfb0.c b/src/lib/fault.c similarity index 56% rename from src/lib/lib_0bfb0.c rename to src/lib/fault.c index 13a4f975b..67e32ca4c 100644 --- a/src/lib/lib_0bfb0.c +++ b/src/lib/fault.c @@ -1,17 +1,17 @@ #include #include "constants.h" #include "bss.h" -#include "lib/lib_0c000.h" -#include "lib/lib_2fa00.h" +#include "lib/crash.h" +#include "lib/rmon.h" #include "data.h" #include "types.h" void faultCreateThread(void) { - faultCreateThread2(); + crashCreateThread(); } void faultAssert(char *message, char *file, s32 line) { - crashPrint("ASSERTION : %s, %d: (\"%s\")\n", file, line, message); + rmonPrint("ASSERTION : %s, %d: (\"%s\")\n", file, line, message); } diff --git a/src/lib/lib_44bc0.c b/src/lib/lib_44bc0.c index 22635a6ba..5d2370edb 100644 --- a/src/lib/lib_44bc0.c +++ b/src/lib/lib_44bc0.c @@ -1,7 +1,7 @@ #include #include "constants.h" #include "bss.h" -#include "lib/lib_37b00.h" +#include "lib/mp3.h" #include "lib/lib_3a100.h" #include "data.h" #include "types.h" diff --git a/src/lib/main.c b/src/lib/main.c index 376f688aa..8a9f10723 100644 --- a/src/lib/main.c +++ b/src/lib/main.c @@ -41,12 +41,12 @@ #include "game/utils.h" #include "bss.h" #include "lib/args.h" -#include "lib/lib_070d0.h" +#include "lib/vm.h" #include "lib/rzip.h" #include "lib/lib_09660.h" -#include "lib/lib_09a80.h" -#include "lib/lib_0bfb0.h" -#include "lib/lib_0c000.h" +#include "lib/vi.h" +#include "lib/fault.h" +#include "lib/crash.h" #include "lib/dma.h" #include "lib/main.h" #include "lib/snd.h" @@ -54,10 +54,10 @@ #include "lib/lib_126b0.h" #include "lib/lib_13750.h" #include "lib/lib_13790.h" -#include "lib/lib_233c0.h" +#include "lib/anim.h" #include "lib/rdp.h" #include "lib/lib_2f490.h" -#include "lib/lib_2fa00.h" +#include "lib/rmon.h" #include "data.h" #include "types.h" @@ -580,7 +580,7 @@ glabel mainInit /* d678: 1000ffff */ b .PF0000d678 /* d67c: 00000000 */ nop .PF0000d680: -/* d680: 0c001c04 */ jal func000070d0 +/* d680: 0c001c04 */ jal vmInit /* d684: 00000000 */ nop /* d688: 0fc6a2ac */ jal func0f1a78b0 /* d68c: 00000000 */ nop @@ -664,7 +664,7 @@ glabel mainInit /* d7c0: 00000000 */ nop /* d7c4: 0fc52c1b */ jal func0f14a3bc /* d7c8: 00000000 */ nop -/* d7cc: 0c008b30 */ jal func000233c0 +/* d7cc: 0c008b30 */ jal anim000233c0 /* d7d0: 00000000 */ nop /* d7d4: 0fc00040 */ jal func0f000100 /* d7d8: 00000000 */ nop @@ -983,7 +983,7 @@ glabel mainInit /* d93c: 1000ffff */ b .L0000d93c /* d940: 00000000 */ nop .L0000d944: -/* d944: 0c001c34 */ jal func000070d0 +/* d944: 0c001c34 */ jal vmInit /* d948: 00000000 */ nop /* d94c: 0fc69e2c */ jal func0f1a78b0 /* d950: 00000000 */ nop @@ -1067,7 +1067,7 @@ glabel mainInit /* da84: 00000000 */ nop /* da88: 0fc528ef */ jal func0f14a3bc /* da8c: 00000000 */ nop -/* da90: 0c008cf0 */ jal func000233c0 +/* da90: 0c008cf0 */ jal anim000233c0 /* da94: 00000000 */ nop /* da98: 0fc00040 */ jal func0f000100 /* da9c: 00000000 */ nop @@ -1356,7 +1356,7 @@ glabel mainInit /* de4c: 3c018006 */ lui $at,0x8006 /* de50: ac2ff2f4 */ sw $t7,-0xd0c($at) .NB0000de54: -/* de54: 0c001c6c */ jal func000070d0 +/* de54: 0c001c6c */ jal vmInit /* de58: 00000000 */ sll $zero,$zero,0x0 /* de5c: 0fc68554 */ jal func0f1a78b0 /* de60: 00000000 */ sll $zero,$zero,0x0 @@ -1440,7 +1440,7 @@ glabel mainInit /* df94: 00000000 */ sll $zero,$zero,0x0 /* df98: 0fc512e3 */ jal func0f14a3bc /* df9c: 00000000 */ sll $zero,$zero,0x0 -/* dfa0: 0c0091e8 */ jal func000233c0 +/* dfa0: 0c0091e8 */ jal anim000233c0 /* dfa4: 00000000 */ sll $zero,$zero,0x0 /* dfa8: 0fc00040 */ jal func0f000100 /* dfac: 00000000 */ sll $zero,$zero,0x0 @@ -1624,7 +1624,7 @@ const char var70053aa0[] = " -ml0 -me0 -mgfx100 -mvtx50 -mt700 -ma400"; // while (1); // } // -// func000070d0(); +// vmInit(); // func0f1a78b0(); // func0f166f74(); // stub0f175f50(); @@ -1667,7 +1667,7 @@ const char var70053aa0[] = " -ml0 -me0 -mgfx100 -mvtx50 -mt700 -ma400"; // phAllocate(); // pakInitAll(); // func0f14a3bc(); -// func000233c0(); +// anim000233c0(); // func0f000100(); // func0f000130(); // stub0f000850(); diff --git a/src/lib/model.c b/src/lib/model.c index 3cdfa95f9..e492d9e4c 100644 --- a/src/lib/model.c +++ b/src/lib/model.c @@ -13,7 +13,7 @@ #include "bss.h" #include "lib/rng.h" #include "lib/mtx.h" -#include "lib/lib_233c0.h" +#include "lib/anim.h" #include "lib/model.h" #include "data.h" #include "types.h" @@ -701,7 +701,7 @@ void model0001b400(struct objticksp476 *arg0, struct model *model, struct modeln sp24c = arg0->matrix; } - func00024050(sp240, anim->flip, type, anim->animnum, anim->unk04, &sp230, &sp224, &sp218); + anim00024050(sp240, anim->flip, type, anim->animnum, anim->unk04, &sp230, &sp224, &sp218); if (g_Vars.in_cutscene && anim->speed > 0) { #if VERSION >= VERSION_PAL_FINAL @@ -714,15 +714,15 @@ void model0001b400(struct objticksp476 *arg0, struct model *model, struct modeln } if (sp154 != 0.0f) { - func00024050(sp240, anim->flip, type, anim->animnum, anim->unk05, &sp148, &sp13c, &sp130); + anim00024050(sp240, anim->flip, type, anim->animnum, anim->unk05, &sp148, &sp13c, &sp130); model0001b07c(&sp230, &sp148, sp154); } if (anim->fracmerge != 0.0f) { - func00024050(sp240, anim->flip2, type, anim->animnum2, anim->unk06, &sp124, &sp118, &sp10c); + anim00024050(sp240, anim->flip2, type, anim->animnum2, anim->unk06, &sp124, &sp118, &sp10c); if (anim->frac2 != 0.0f) { - func00024050(sp240, anim->flip2, type, anim->animnum2, anim->unk07, &spd0, &spc4, &spb8); + anim00024050(sp240, anim->flip2, type, anim->animnum2, anim->unk07, &spd0, &spc4, &spb8); model0001b07c(&sp124, &spd0, anim->frac2); } @@ -1384,7 +1384,7 @@ glabel var70053fc0pf /* 1bdf8: afb80014 */ sw $t8,0x14($sp) /* 1bdfc: 8fa40154 */ lw $a0,0x154($sp) /* 1be00: 8fa60150 */ lw $a2,0x150($sp) -/* 1be04: 0c008e54 */ jal func00024050 +/* 1be04: 0c008e54 */ jal anim00024050 /* 1be08: afb90010 */ sw $t9,0x10($sp) /* 1be0c: 3c0a800a */ lui $t2,0x800a /* 1be10: 8d4aa9dc */ lw $t2,-0x5624($t2) @@ -1425,7 +1425,7 @@ glabel var70053fc0pf /* 1be94: e7a200e0 */ swc1 $f2,0xe0($sp) /* 1be98: afad0018 */ sw $t5,0x18($sp) /* 1be9c: afac0014 */ sw $t4,0x14($sp) -/* 1bea0: 0c008e54 */ jal func00024050 +/* 1bea0: 0c008e54 */ jal anim00024050 /* 1bea4: afab0010 */ sw $t3,0x10($sp) /* 1bea8: c7a200e0 */ lwc1 $f2,0xe0($sp) /* 1beac: 27a40144 */ addiu $a0,$sp,0x144 @@ -1481,7 +1481,7 @@ glabel var70053fc0pf /* 1bf60: afaa001c */ sw $t2,0x1c($sp) /* 1bf64: afa90018 */ sw $t1,0x18($sp) /* 1bf68: afa80014 */ sw $t0,0x14($sp) -/* 1bf6c: 0c008e54 */ jal func00024050 +/* 1bf6c: 0c008e54 */ jal anim00024050 /* 1bf70: afb80010 */ sw $t8,0x10($sp) /* 1bf74: 44802000 */ mtc1 $zero,$f4 /* 1bf78: c6060034 */ lwc1 $f6,0x34($s0) @@ -1499,7 +1499,7 @@ glabel var70053fc0pf /* 1bfa8: afae001c */ sw $t6,0x1c($sp) /* 1bfac: afad0018 */ sw $t5,0x18($sp) /* 1bfb0: afac0014 */ sw $t4,0x14($sp) -/* 1bfb4: 0c008e54 */ jal func00024050 +/* 1bfb4: 0c008e54 */ jal anim00024050 /* 1bfb8: afab0010 */ sw $t3,0x10($sp) /* 1bfbc: 27a400b0 */ addiu $a0,$sp,0xb0 /* 1bfc0: 27a5005c */ addiu $a1,$sp,0x5c @@ -1806,7 +1806,7 @@ glabel model0001bfa8 /* 1c054: afb80014 */ sw $t8,0x14($sp) /* 1c058: 8fa40154 */ lw $a0,0x154($sp) /* 1c05c: 8fa60150 */ lw $a2,0x150($sp) -/* 1c060: 0c009014 */ jal func00024050 +/* 1c060: 0c009014 */ jal anim00024050 /* 1c064: afb90010 */ sw $t9,0x10($sp) /* 1c068: 3c0a800a */ lui $t2,%hi(g_Vars+0x4cc) /* 1c06c: 8d4aa48c */ lw $t2,%lo(g_Vars+0x4cc)($t2) @@ -1844,7 +1844,7 @@ glabel model0001bfa8 /* 1c0e4: e7a200e0 */ swc1 $f2,0xe0($sp) /* 1c0e8: afad0018 */ sw $t5,0x18($sp) /* 1c0ec: afac0014 */ sw $t4,0x14($sp) -/* 1c0f0: 0c009014 */ jal func00024050 +/* 1c0f0: 0c009014 */ jal anim00024050 /* 1c0f4: afab0010 */ sw $t3,0x10($sp) /* 1c0f8: c7a200e0 */ lwc1 $f2,0xe0($sp) /* 1c0fc: 27a40144 */ addiu $a0,$sp,0x144 @@ -1896,7 +1896,7 @@ glabel model0001bfa8 /* 1c1a4: afa9001c */ sw $t1,0x1c($sp) /* 1c1a8: afa80018 */ sw $t0,0x18($sp) /* 1c1ac: afb80014 */ sw $t8,0x14($sp) -/* 1c1b0: 0c009014 */ jal func00024050 +/* 1c1b0: 0c009014 */ jal anim00024050 /* 1c1b4: afb90010 */ sw $t9,0x10($sp) /* 1c1b8: 44808000 */ mtc1 $zero,$f16 /* 1c1bc: c6120034 */ lwc1 $f18,0x34($s0) @@ -1914,7 +1914,7 @@ glabel model0001bfa8 /* 1c1ec: afad001c */ sw $t5,0x1c($sp) /* 1c1f0: afac0018 */ sw $t4,0x18($sp) /* 1c1f4: afab0014 */ sw $t3,0x14($sp) -/* 1c1f8: 0c009014 */ jal func00024050 +/* 1c1f8: 0c009014 */ jal anim00024050 /* 1c1fc: afaa0010 */ sw $t2,0x10($sp) /* 1c200: 27a400b0 */ addiu $a0,$sp,0xb0 /* 1c204: 27a5005c */ addiu $a1,$sp,0x5c @@ -2561,23 +2561,23 @@ void model0001cebc(struct objticksp476 *arg0, struct model *model) } } - func00023d38(anim->animnum); - anim->unk04 = func00023ab0(anim->animnum, anim->framea); + anim00023d38(anim->animnum); + anim->unk04 = anim00023ab0(anim->animnum, anim->framea); if (anim->frac != 0) { - anim->unk05 = func00023ab0(anim->animnum, anim->frameb); + anim->unk05 = anim00023ab0(anim->animnum, anim->frameb); } if (anim->animnum2) { - func00023d38(anim->animnum2); - anim->unk06 = func00023ab0(anim->animnum2, anim->frame2a); + anim00023d38(anim->animnum2); + anim->unk06 = anim00023ab0(anim->animnum2, anim->frame2a); if (anim->frac2 != 0) { - anim->unk07 = func00023ab0(anim->animnum2, anim->frame2b); + anim->unk07 = anim00023ab0(anim->animnum2, anim->frame2b); } } - func00023d0c(); + anim00023d0c(); } model0001ce64(arg0, model); @@ -2800,10 +2800,10 @@ void model0001d62c(struct model *model, s16 animnum, s32 flip, f32 fstartframe, if (g_Anims[anim->animnum].flags & ANIMFLAG_02) { sp64 = func0f15c888(); - func00023d38(anim->animnum); - sp83 = func00023ab0(anim->animnum, anim->framea); - func00023d0c(); - func00024050(spa4, anim->flip, type, anim->animnum, sp83, &sp74, &sp88, &sp68); + anim00023d38(anim->animnum); + sp83 = anim00023ab0(anim->animnum, anim->framea); + anim00023d0c(); + anim00024050(spa4, anim->flip, type, anim->animnum, sp83, &sp74, &sp88, &sp68); rwdata->unk34.x = sp88.x * sp64; rwdata->unk34.y = sp88.y * sp64; @@ -2813,10 +2813,10 @@ void model0001d62c(struct model *model, s16 animnum, s32 flip, f32 fstartframe, if (anim->frac == 0) { rwdata->unk01 = 0; } else { - func00023d38(anim->animnum); - sp83 = func00023ab0(anim->animnum, anim->frameb); - func00023d0c(); - func00024050(spa4, anim->flip, type, anim->animnum, sp83, &sp74, &sp88, &sp68); + anim00023d38(anim->animnum); + sp83 = anim00023ab0(anim->animnum, anim->frameb); + anim00023d0c(); + anim00024050(spa4, anim->flip, type, anim->animnum, sp83, &sp74, &sp88, &sp68); rwdata->unk24.x = sp88.x * sp64; rwdata->unk24.y = sp88.y * sp64; @@ -2826,7 +2826,7 @@ void model0001d62c(struct model *model, s16 animnum, s32 flip, f32 fstartframe, rwdata->unk01 = 1; } } else { - sp84 = func00024b64(spa4, anim->flip, type, anim->animnum, anim->frameb, &sp88, anim->average); + sp84 = anim00024b64(spa4, anim->flip, type, anim->animnum, anim->frameb, &sp88, anim->average); scale = model->scale * anim->animscale; if (scale != 1) { @@ -3291,12 +3291,12 @@ glabel var70054450 /* 1e4ec: 1000001f */ b .L0001e56c /* 1e4f0: e7a600e8 */ swc1 $f6,0xe8($sp) .L0001e4f4: -/* 1e4f4: 0c008f4e */ jal func00023d38 +/* 1e4f4: 0c008f4e */ jal anim00023d38 /* 1e4f8: 86240000 */ lh $a0,0x0($s1) /* 1e4fc: 86240000 */ lh $a0,0x0($s1) -/* 1e500: 0c008eac */ jal func00023ab0 +/* 1e500: 0c008eac */ jal anim00023ab0 /* 1e504: 02002825 */ or $a1,$s0,$zero -/* 1e508: 0c008f43 */ jal func00023d0c +/* 1e508: 0c008f43 */ jal anim00023d0c /* 1e50c: 305000ff */ andi $s0,$v0,0xff /* 1e510: 82250008 */ lb $a1,0x8($s1) /* 1e514: 86270000 */ lh $a3,0x0($s1) @@ -3308,7 +3308,7 @@ glabel var70054450 /* 1e52c: afb80014 */ sw $t8,0x14($sp) /* 1e530: afb00010 */ sw $s0,0x10($sp) /* 1e534: 8fa40118 */ lw $a0,0x118($sp) -/* 1e538: 0c009014 */ jal func00024050 +/* 1e538: 0c009014 */ jal anim00024050 /* 1e53c: 8fa60114 */ lw $a2,0x114($sp) /* 1e540: c7a200fc */ lwc1 $f2,0xfc($sp) /* 1e544: c7aa0100 */ lwc1 $f10,0x100($sp) @@ -3336,12 +3336,12 @@ glabel var70054450 /* 1e590: 8e260018 */ lw $a2,0x18($s1) /* 1e594: 00408025 */ or $s0,$v0,$zero /* 1e598: a6220016 */ sh $v0,0x16($s1) -/* 1e59c: 0c008f4e */ jal func00023d38 +/* 1e59c: 0c008f4e */ jal anim00023d38 /* 1e5a0: 86240000 */ lh $a0,0x0($s1) /* 1e5a4: 86240000 */ lh $a0,0x0($s1) -/* 1e5a8: 0c008eac */ jal func00023ab0 +/* 1e5a8: 0c008eac */ jal anim00023ab0 /* 1e5ac: 02002825 */ or $a1,$s0,$zero -/* 1e5b0: 0c008f43 */ jal func00023d0c +/* 1e5b0: 0c008f43 */ jal anim00023d0c /* 1e5b4: 305000ff */ andi $s0,$v0,0xff /* 1e5b8: 82250008 */ lb $a1,0x8($s1) /* 1e5bc: 86270000 */ lh $a3,0x0($s1) @@ -3353,7 +3353,7 @@ glabel var70054450 /* 1e5d4: afad0014 */ sw $t5,0x14($sp) /* 1e5d8: afb00010 */ sw $s0,0x10($sp) /* 1e5dc: 8fa40118 */ lw $a0,0x118($sp) -/* 1e5e0: 0c009014 */ jal func00024050 +/* 1e5e0: 0c009014 */ jal anim00024050 /* 1e5e4: 8fa60114 */ lw $a2,0x114($sp) /* 1e5e8: c7a200fc */ lwc1 $f2,0xfc($sp) /* 1e5ec: c7a60100 */ lwc1 $f6,0x100($sp) @@ -3415,7 +3415,7 @@ glabel var70054450 /* 1e6b4: afb00010 */ sw $s0,0x10($sp) /* 1e6b8: 8239000b */ lb $t9,0xb($s1) /* 1e6bc: 8fa60114 */ lw $a2,0x114($sp) -/* 1e6c0: 0c0092d9 */ jal func00024b64 +/* 1e6c0: 0c0092d9 */ jal anim00024b64 /* 1e6c4: afb90018 */ sw $t9,0x18($sp) /* 1e6c8: 3c013f80 */ lui $at,0x3f80 /* 1e6cc: 44815000 */ mtc1 $at,$f10 @@ -3513,7 +3513,7 @@ glabel var70054450 /* 1e828: 822c000b */ lb $t4,0xb($s1) /* 1e82c: 240b0001 */ addiu $t3,$zero,0x1 /* 1e830: afab00c8 */ sw $t3,0xc8($sp) -/* 1e834: 0c0092d9 */ jal func00024b64 +/* 1e834: 0c0092d9 */ jal anim00024b64 /* 1e838: afac0018 */ sw $t4,0x18($sp) /* 1e83c: 3c013f80 */ lui $at,0x3f80 /* 1e840: 44819000 */ mtc1 $at,$f18 @@ -3834,7 +3834,7 @@ glabel var70054450 /* 1ecd0: 8239000b */ lb $t9,0xb($s1) /* 1ecd4: 8fa60114 */ lw $a2,0x114($sp) /* 1ecd8: 8fa40118 */ lw $a0,0x118($sp) -/* 1ecdc: 0c0092d9 */ jal func00024b64 +/* 1ecdc: 0c0092d9 */ jal anim00024b64 /* 1ece0: afb90018 */ sw $t9,0x18($sp) /* 1ece4: 3c013f80 */ lui $at,0x3f80 /* 1ece8: 44816000 */ mtc1 $at,$f12 diff --git a/src/lib/lib_37b00.c b/src/lib/mp3.c similarity index 99% rename from src/lib/lib_37b00.c rename to src/lib/mp3.c index e06b728b3..cf7fff402 100644 --- a/src/lib/lib_37b00.c +++ b/src/lib/mp3.c @@ -1,7 +1,7 @@ #include #include "constants.h" #include "bss.h" -#include "lib/lib_37b00.h" +#include "lib/mp3.h" #include "types.h" struct mp3vars g_Mp3Vars; @@ -14,7 +14,7 @@ void mp3Init(ALHeap *heap) bzero(&g_Mp3Vars, sizeof(struct mp3vars)); #if VERSION < VERSION_NTSC_1_0 - crashPrint("MPEG : RWI -> Allocating %d bytes for ASISTREAM from audio heap\n", 0x8480); + rmonPrint("MPEG : RWI -> Allocating %d bytes for ASISTREAM from audio heap\n", 0x8480); #endif var8009c3f4 = alHeapAlloc(heap, 0x8480, 1); diff --git a/src/lib/mtx.c b/src/lib/mtx.c index 78000d759..963ebc192 100644 --- a/src/lib/mtx.c +++ b/src/lib/mtx.c @@ -913,7 +913,7 @@ glabel func00018000nb /* 18050: 0000b025 */ or $s6,$zero,$zero /* 18054: 0080b825 */ or $s7,$a0,$zero .NB00018058: -/* 18058: 0c00c47d */ jal crashPrint +/* 18058: 0c00c47d */ jal rmonPrint /* 1805c: 03c02025 */ or $a0,$s8,$zero /* 18060: 00008025 */ or $s0,$zero,$zero /* 18064: 02e08825 */ or $s1,$s7,$zero @@ -923,13 +923,13 @@ glabel func00018000nb /* 18070: 02602825 */ or $a1,$s3,$zero /* 18074: 460021a1 */ cvt.d.s $f6,$f4 /* 18078: 02803025 */ or $a2,$s4,$zero -/* 1807c: 0c00c47d */ jal crashPrint +/* 1807c: 0c00c47d */ jal rmonPrint /* 18080: f7a60010 */ sdc1 $f6,0x10($sp) /* 18084: 26100004 */ addiu $s0,$s0,0x4 /* 18088: 1615fff7 */ bne $s0,$s5,.NB00018068 /* 1808c: 26310004 */ addiu $s1,$s1,0x4 /* 18090: 3c047005 */ lui $a0,0x7005 -/* 18094: 0c00c47d */ jal crashPrint +/* 18094: 0c00c47d */ jal rmonPrint /* 18098: 24845998 */ addiu $a0,$a0,0x5998 /* 1809c: 26d60001 */ addiu $s6,$s6,0x1 /* 180a0: 24010004 */ addiu $at,$zero,0x4 diff --git a/src/lib/lib_11420.c b/src/lib/music.c similarity index 98% rename from src/lib/lib_11420.c rename to src/lib/music.c index 489804dc6..02a1c232c 100644 --- a/src/lib/lib_11420.c +++ b/src/lib/music.c @@ -4,7 +4,7 @@ #include "game/game_176080.h" #include "bss.h" #include "lib/snd.h" -#include "lib/lib_11420.h" +#include "lib/music.h" #include "lib/lib_38d10.h" #include "lib/lib_39c80.h" #include "lib/lib_39f70.h" @@ -44,20 +44,20 @@ u32 var8005edf8 = 0x00000000; u32 var8005edfc = 0x00000000; GLOBAL_ASM( -glabel func00011420 +glabel music00011420 .late_rodata glabel var70053fc4 -.word func00011420+0x50 +.word music00011420+0x50 glabel var70053fc8 -.word func00011420+0x50 +.word music00011420+0x50 glabel var70053fcc -.word func00011420+0x50 +.word music00011420+0x50 glabel var70053fd0 -.word func00011420+0x50 +.word music00011420+0x50 glabel var70053fd4 -.word func00011420+0x50 +.word music00011420+0x50 glabel var70053fd8 -.word func00011420+0x50 +.word music00011420+0x50 .text /* 11420: 27bdffc0 */ addiu $sp,$sp,-64 /* 11424: afbf0034 */ sw $ra,0x34($sp) @@ -266,7 +266,7 @@ glabel var70053fd8 ); GLOBAL_ASM( -glabel func00011700 +glabel music00011700 /* 11700: 27bdffd8 */ addiu $sp,$sp,-40 /* 11704: afbf0014 */ sw $ra,0x14($sp) /* 11708: afa5002c */ sw $a1,0x2c($sp) @@ -305,7 +305,7 @@ glabel func00011700 ); GLOBAL_ASM( -glabel func00011780 +glabel music00011780 /* 11780: 27bdffc8 */ addiu $sp,$sp,-56 /* 11784: afb50028 */ sw $s5,0x28($sp) /* 11788: afb30020 */ sw $s3,0x20($sp) @@ -378,7 +378,7 @@ glabel func00011780 ); GLOBAL_ASM( -glabel func00011884 +glabel music00011884 /* 11884: 27bdffd8 */ addiu $sp,$sp,-40 /* 11888: afb20020 */ sw $s2,0x20($sp) /* 1188c: afb1001c */ sw $s1,0x1c($sp) @@ -412,7 +412,7 @@ glabel func00011884 #if VERSION >= VERSION_NTSC_1_0 GLOBAL_ASM( -glabel func000118f4 +glabel music000118f4 /* 118f4: afa50004 */ sw $a1,0x4($sp) /* 118f8: 8c8e0004 */ lw $t6,0x4($a0) /* 118fc: 3c018008 */ lui $at,%hi(var800840e0) @@ -424,18 +424,18 @@ glabel func000118f4 #if VERSION >= VERSION_NTSC_1_0 GLOBAL_ASM( -glabel func0001190c +glabel music0001190c .late_rodata glabel var70053fdc -.word func0001190c+0x324 +.word music0001190c+0x324 glabel var70053fe0 -.word func0001190c+0x338 +.word music0001190c+0x338 glabel var70053fe4 -.word func0001190c+0x34c +.word music0001190c+0x34c glabel var70053fe8 -.word func0001190c+0x360 +.word music0001190c+0x360 glabel var70053fec -.word func0001190c+0x370 +.word music0001190c+0x370 .text /* 1190c: 27bdffb8 */ addiu $sp,$sp,-72 /* 11910: 3c0e8006 */ lui $t6,%hi(g_SndDisabled) @@ -661,26 +661,26 @@ glabel var70053fec /* 11c28: 03000008 */ jr $t8 /* 11c2c: 00000000 */ nop /* 11c30: 02402025 */ or $a0,$s2,$zero -/* 11c34: 0c004508 */ jal func00011420 +/* 11c34: 0c004508 */ jal music00011420 /* 11c38: 00002825 */ or $a1,$zero,$zero /* 11c3c: 10000013 */ b .L00011c8c /* 11c40: 00402025 */ or $a0,$v0,$zero /* 11c44: 02402025 */ or $a0,$s2,$zero -/* 11c48: 0c0045c0 */ jal func00011700 +/* 11c48: 0c0045c0 */ jal music00011700 /* 11c4c: 00002825 */ or $a1,$zero,$zero /* 11c50: 1000000e */ b .L00011c8c /* 11c54: 00402025 */ or $a0,$v0,$zero /* 11c58: 02402025 */ or $a0,$s2,$zero -/* 11c5c: 0c0045e0 */ jal func00011780 +/* 11c5c: 0c0045e0 */ jal music00011780 /* 11c60: 00002825 */ or $a1,$zero,$zero /* 11c64: 10000009 */ b .L00011c8c /* 11c68: 00402025 */ or $a0,$v0,$zero -/* 11c6c: 0c004621 */ jal func00011884 +/* 11c6c: 0c004621 */ jal music00011884 /* 11c70: 00002025 */ or $a0,$zero,$zero /* 11c74: 10000005 */ b .L00011c8c /* 11c78: 00402025 */ or $a0,$v0,$zero /* 11c7c: 02402025 */ or $a0,$s2,$zero -/* 11c80: 0c00463d */ jal func000118f4 +/* 11c80: 0c00463d */ jal music000118f4 /* 11c84: 00002825 */ or $a1,$zero,$zero /* 11c88: 00402025 */ or $a0,$v0,$zero .L00011c8c: @@ -756,7 +756,7 @@ glabel var70053fec ); #else GLOBAL_ASM( -glabel func0001190c +glabel music0001190c /* 11cb4: 27bdffa8 */ addiu $sp,$sp,-88 /* 11cb8: 3c0e8006 */ lui $t6,0x8006 /* 11cbc: 8dcef6c0 */ lw $t6,-0x940($t6) @@ -982,22 +982,22 @@ glabel func0001190c /* 11fd8: 10000010 */ beqz $zero,.NB0001201c /* 11fdc: 00000000 */ sll $zero,$zero,0x0 .NB00011fe0: -/* 11fe0: 0c0045f8 */ jal func00011420 +/* 11fe0: 0c0045f8 */ jal music00011420 /* 11fe4: 02a02025 */ or $a0,$s5,$zero /* 11fe8: 1000000c */ beqz $zero,.NB0001201c /* 11fec: 00402025 */ or $a0,$v0,$zero .NB00011ff0: -/* 11ff0: 0c0046b0 */ jal func00011700 +/* 11ff0: 0c0046b0 */ jal music00011700 /* 11ff4: 02a02025 */ or $a0,$s5,$zero /* 11ff8: 10000008 */ beqz $zero,.NB0001201c /* 11ffc: 00402025 */ or $a0,$v0,$zero .NB00012000: -/* 12000: 0c0046d0 */ jal func00011780 +/* 12000: 0c0046d0 */ jal music00011780 /* 12004: 02a02025 */ or $a0,$s5,$zero /* 12008: 10000004 */ beqz $zero,.NB0001201c /* 1200c: 00402025 */ or $a0,$v0,$zero .NB00012010: -/* 12010: 0c004711 */ jal func00011884 +/* 12010: 0c004711 */ jal music00011884 /* 12014: 00002025 */ or $a0,$zero,$zero /* 12018: 00402025 */ or $a0,$v0,$zero .NB0001201c: @@ -1078,7 +1078,7 @@ glabel func0001190c #if VERSION >= VERSION_PAL_FINAL GLOBAL_ASM( -glabel func00011d84 +glabel music00011d84 /* 11d84: 3c0e8006 */ lui $t6,%hi(g_SndDisabled) /* 11d88: 8dcedda0 */ lw $t6,%lo(g_SndDisabled)($t6) /* 11d8c: 27bdffd8 */ addiu $sp,$sp,-40 @@ -1325,7 +1325,7 @@ glabel func00011d84 .L0001210c: /* 1210c: ac790000 */ sw $t9,0x0($v1) .L00012110: -/* 12110: 0c004643 */ jal func0001190c +/* 12110: 0c004643 */ jal music0001190c /* 12114: 00000000 */ nop .L00012118: /* 12118: 8fbf0014 */ lw $ra,0x14($sp) @@ -1335,7 +1335,7 @@ glabel func00011d84 ); #elif VERSION >= VERSION_NTSC_1_0 GLOBAL_ASM( -glabel func00011d84 +glabel music00011d84 /* 11d84: 3c0e8006 */ lui $t6,%hi(g_SndDisabled) /* 11d88: 8dcedda0 */ lw $t6,%lo(g_SndDisabled)($t6) /* 11d8c: 27bdffd8 */ addiu $sp,$sp,-40 @@ -1582,7 +1582,7 @@ glabel func00011d84 .L0001210c: /* 1210c: ac790000 */ sw $t9,0x0($v1) .L00012110: -/* 12110: 0c004643 */ jal func0001190c +/* 12110: 0c004643 */ jal music0001190c /* 12114: 00000000 */ nop .L00012118: /* 12118: 8fbf0014 */ lw $ra,0x14($sp) @@ -1592,7 +1592,7 @@ glabel func00011d84 ); #else GLOBAL_ASM( -glabel func00011d84 +glabel music00011d84 /* 12120: 3c0e8006 */ lui $t6,0x8006 /* 12124: 8dcef6c0 */ lw $t6,-0x940($t6) /* 12128: 27bdffd8 */ addiu $sp,$sp,-40 @@ -1839,7 +1839,7 @@ glabel func00011d84 .NB000124a8: /* 124a8: ac780000 */ sw $t8,0x0($v1) .NB000124ac: -/* 124ac: 0c00472d */ jal func0001190c +/* 124ac: 0c00472d */ jal music0001190c /* 124b0: 00000000 */ sll $zero,$zero,0x0 .NB000124b4: /* 124b4: 8fbf0014 */ lw $ra,0x14($sp) diff --git a/src/lib/path.c b/src/lib/path.c new file mode 100644 index 000000000..1553446df --- /dev/null +++ b/src/lib/path.c @@ -0,0 +1,26 @@ +#include +#include "constants.h" +#include "bss.h" +#include "data.h" +#include "types.h" + +void objSetBlockedPathUnblocked(struct defaultobj *blocker, bool unblocked) +{ + if (blocker->hidden & OBJHFLAG_02000000) { + struct blockedpathobj *bp = g_BlockedPaths; + + while (bp) { + if (bp->blocker == blocker) { + if (unblocked) { + waypointEnableSegment(&g_StageSetup.waypoints[bp->waypoint1], &g_StageSetup.waypoints[bp->waypoint2]); + break; + } else { + waypointDisableSegment(&g_StageSetup.waypoints[bp->waypoint1], &g_StageSetup.waypoints[bp->waypoint2]); + break; + } + } + + bp = bp->next; + } + } +} diff --git a/src/lib/lib_13710.c b/src/lib/pimgr.c similarity index 80% rename from src/lib/lib_13710.c rename to src/lib/pimgr.c index 28245214e..dfc015b06 100644 --- a/src/lib/lib_13710.c +++ b/src/lib/pimgr.c @@ -1,14 +1,14 @@ #include #include "constants.h" #include "bss.h" -#include "lib/lib_13710.h" +#include "lib/pimgr.h" #include "data.h" #include "types.h" OSMesg var80099900[64]; OSMesgQueue var80099a00; -void func00013710(void) +void pimgrCreate(void) { osCreatePiManager(150, &var80099a00, var80099900, 64); } diff --git a/src/lib/lib_2fa00.c b/src/lib/rmon.c similarity index 57% rename from src/lib/lib_2fa00.c rename to src/lib/rmon.c index 268e83966..a83cb1a2e 100644 --- a/src/lib/lib_2fa00.c +++ b/src/lib/rmon.c @@ -1,7 +1,7 @@ #include #include "constants.h" #include "bss.h" -#include "lib/lib_0c000.h" +#include "lib/crash.h" #include "lib/libc/xprintf.h" #include "data.h" #include "types.h" @@ -16,42 +16,42 @@ bool rmonIsDisabled(void) return true; } -s32 func0002fa10(void) +s32 rmon0002fa10(void) { return -1; } -void func0002fa18(void) +void rmon0002fa18(void) { // empty } -void func0002fa20(void) +void rmon0002fa20(void) { // empty } -void func0002fa28(void) +void rmon0002fa28(void) { // empty } -void func0002fa30(void) +void rmon0002fa30(void) { // empty } -void func0002fa38(void) +void rmon0002fa38(void) { // empty } -void func0002fa40(void) +void rmon0002fa40(void) { // empty } -char *crashProut(char *dst, const char *src, size_t count) +char *rmonProut(char *dst, const char *src, size_t count) { s32 i = 0; @@ -62,10 +62,10 @@ char *crashProut(char *dst, const char *src, size_t count) return (char *) 1; } -void crashPrint(const char *format, ...) +void rmonPrint(const char *format, ...) { va_list ap; va_start(ap, format); - _Printf(crashProut, NULL, format, ap); + _Printf(rmonProut, NULL, format, ap); } diff --git a/src/lib/rzip.s b/src/lib/rzip.s index 40ebb942e..0ff618d69 100644 --- a/src/lib/rzip.s +++ b/src/lib/rzip.s @@ -278,7 +278,7 @@ glabel rzipInflate sw $sp, 0x74($sp) sw $s8, 0x78($sp) addiu $sp, $sp, -0x18 - jal crashPrint + jal rmonPrint addiu $a0, $a0, %lo(errstr_unrecognised) addiu $sp, $sp, 0x18 lw $ra, 0x0($sp) @@ -351,7 +351,7 @@ glabel rzipInflate sw $sp, 0x74($sp) sw $s8, 0x78($sp) addiu $sp, $sp, -0x18 - jal crashPrint + jal rmonPrint addiu $a0, $a0, %lo(errstr_unrecognised) addiu $sp, $sp, 0x18 lw $ra, 0x0($sp) @@ -465,7 +465,7 @@ glabel rzipInflate sw $v0, 0x4($sp) lui $a0, %hi(errstr_inflatefailed) addiu $a0, $a0, %lo(errstr_inflatefailed) - jal crashPrint + jal rmonPrint lw $a1, 0x4($sp) addiu $sp, $sp, 0x18 lw $ra, 0x0($sp) @@ -897,7 +897,7 @@ glabel rzipInflateDynamic sw $sp, 0x74($sp) sw $s8, 0x78($sp) addiu $sp, $sp, -24 - jal crashPrint + jal rmonPrint addiu $a0, $a0, %lo(errstr_badlen) addiu $sp, $sp, 0x18 lw $ra, 0x0($sp) @@ -1401,7 +1401,7 @@ glabel rzipBuildHufts sw $s3, 0x4($sp) lui $a0, %hi(errstr_huftsoverflow) addiu $a0, $a0, %lo(errstr_huftsoverflow) - jal crashPrint + jal rmonPrint lw $a1, 0x4($sp) addiu $sp, $sp, 0x18 lw $ra, 0x0($sp) diff --git a/src/lib/sched.c b/src/lib/sched.c index 32c93a968..a85b63095 100644 --- a/src/lib/sched.c +++ b/src/lib/sched.c @@ -8,12 +8,12 @@ #include "lib/audiomgr.h" #include "lib/rzip.h" #include "lib/lib_09660.h" -#include "lib/lib_0c000.h" +#include "lib/crash.h" #include "lib/main.h" #include "lib/snd.h" -#include "lib/lib_13710.h" +#include "lib/pimgr.h" #include "lib/lib_13750.h" -#include "lib/lib_2fa00.h" +#include "lib/rmon.h" #include "lib/lib_48150.h" #include "data.h" #include "types.h" @@ -85,7 +85,7 @@ void func00001b34(u32 value) void func00001b40(void *framebuffer) { if ((var8005ce68 && var8005ce64) || var8005ce60) { - func0000cf54(framebuffer); + crash0000cf54(framebuffer); var8005ce70 = osGetCount(); } } @@ -94,8 +94,8 @@ void func00001b98(u32 value) { if ((value & 0xf) == 0 && ((var8005ce68 && var8005ce64) || var8005ce60)) { if (osGetCount() - var8005ce70 > var8005ce6c) { - func0000cf54(g_FrameBuffers[0]); - func0000cf54(g_FrameBuffers[1]); + crash0000cf54(g_FrameBuffers[0]); + crash0000cf54(g_FrameBuffers[1]); } } } diff --git a/src/lib/snd.c b/src/lib/snd.c index 6b4b3f0ea..51d14e6bd 100644 --- a/src/lib/snd.c +++ b/src/lib/snd.c @@ -13,7 +13,7 @@ #include "lib/lib_2fc60.h" #include "lib/lib_317f0.h" #include "lib/lib_37650.h" -#include "lib/lib_37b00.h" +#include "lib/mp3.h" #include "lib/lib_38d10.h" #include "lib/lib_39be0.h" #include "lib/lib_39c80.h" @@ -1695,27 +1695,27 @@ void sndSetSoundMode(s32 mode) switch (mode) { case SOUNDMODE_MONO: - func00034030(1); + speaker00034030(1); break; case SOUNDMODE_STEREO: - func00034030(2); + speaker00034030(2); break; case SOUNDMODE_HEADPHONE: - func00034030(3); + speaker00034030(3); break; case SOUNDMODE_SURROUND: - func00034030(4); + speaker00034030(4); break; } - func00034104(0, 4); + speaker00034104(0, 4); for (i = 1; i < var80094ea8; i++) { switch (mode) { case SOUNDMODE_STEREO: case SOUNDMODE_HEADPHONE: case SOUNDMODE_SURROUND: - func00034104(i, 4); + speaker00034104(i, 4); break; } } diff --git a/src/lib/lib_34030.c b/src/lib/speaker.c similarity index 98% rename from src/lib/lib_34030.c rename to src/lib/speaker.c index 0f68565c9..903f545d7 100644 --- a/src/lib/lib_34030.c +++ b/src/lib/speaker.c @@ -23,7 +23,7 @@ u32 var8009c344; u32 var8009c348; GLOBAL_ASM( -glabel func00034030 +glabel speaker00034030 /* 34030: 27bdffd8 */ addiu $sp,$sp,-40 /* 34034: afbf001c */ sw $ra,0x1c($sp) /* 34038: afa40028 */ sw $a0,0x28($sp) @@ -68,7 +68,7 @@ glabel func00034030 /* 340c4: afa00024 */ sw $zero,0x24($sp) .L000340c8: /* 340c8: 8fa40024 */ lw $a0,0x24($sp) -/* 340cc: 0c00d041 */ jal func00034104 +/* 340cc: 0c00d041 */ jal speaker00034104 /* 340d0: 00002825 */ or $a1,$zero,$zero /* 340d4: 8fb90024 */ lw $t9,0x24($sp) /* 340d8: 27280001 */ addiu $t0,$t9,0x1 @@ -86,7 +86,7 @@ glabel func00034030 ); GLOBAL_ASM( -glabel func00034104 +glabel speaker00034104 /* 34104: 27bdfff8 */ addiu $sp,$sp,-8 /* 34108: 14a00004 */ bnez $a1,.L0003411c /* 3410c: 00000000 */ nop diff --git a/src/lib/str.c b/src/lib/str.c index 5eb8c71c3..47433d0eb 100644 --- a/src/lib/str.c +++ b/src/lib/str.c @@ -1,5 +1,5 @@ #include -#include "lib/lib_0bfb0.h" +#include "lib/fault.h" char *strcpy(char *dst, char *src) { diff --git a/src/lib/ultra/audio/synsetpriority.c b/src/lib/ultra/audio/synsetpriority.c index 0140afffb..42bc63c30 100644 --- a/src/lib/ultra/audio/synsetpriority.c +++ b/src/lib/ultra/audio/synsetpriority.c @@ -1,7 +1,7 @@ #include #include "constants.h" #include "bss.h" -#include "lib/lib_37b00.h" +#include "lib/mp3.h" #include "lib/lib_3a100.h" #include "data.h" #include "types.h" diff --git a/src/lib/ultra/io/pfsinitpak.c b/src/lib/ultra/io/pfsinitpak.c index d34151887..fe2ff7720 100644 --- a/src/lib/ultra/io/pfsinitpak.c +++ b/src/lib/ultra/io/pfsinitpak.c @@ -96,7 +96,7 @@ s32 osPfsInitPak(OSMesgQueue *queue, OSPfs *pfs, s32 channel) return ret; } - crashPrint("pfsinitpak.c -> ret = %d\n", ret); + rmonPrint("pfsinitpak.c -> ret = %d\n", ret); ret = osPfsChecker(pfs); pfs->status |= PFS_INITIALIZED; #endif diff --git a/src/lib/lib_09a80.c b/src/lib/vi.c similarity index 99% rename from src/lib/lib_09a80.c rename to src/lib/vi.c index 7c2c8e1eb..ed9f53f03 100644 --- a/src/lib/lib_09a80.c +++ b/src/lib/vi.c @@ -9,7 +9,7 @@ #include "game/options.h" #include "bss.h" #include "lib/lib_09660.h" -#include "lib/lib_09a80.h" +#include "lib/vi.h" #include "lib/memory.h" #include "lib/mtx.h" #include "lib/lib_30ce0.h" diff --git a/src/lib/lib_070d0.c b/src/lib/vm.c similarity index 99% rename from src/lib/lib_070d0.c rename to src/lib/vm.c index 148315b27..81fa13eaf 100644 --- a/src/lib/lib_070d0.c +++ b/src/lib/vm.c @@ -23,7 +23,7 @@ u32 var8005cf88 = 0; #if VERSION >= VERSION_NTSC_1_0 GLOBAL_ASM( -glabel func000070d0 +glabel vmInit /* 70d0: 27bdeb58 */ addiu $sp,$sp,-5288 /* 70d4: afb0001c */ sw $s0,0x1c($sp) /* 70d8: 24100001 */ addiu $s0,$zero,0x1 @@ -305,7 +305,7 @@ glabel func000070d0 const char var70053af0nb[] = "DMA-Crash %s %d Ram: %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"; const char var70053b48nb[] = "vm_m.c"; GLOBAL_ASM( -glabel func000070d0 +glabel vmInit /* 71b0: 27bdea98 */ addiu $sp,$sp,-5480 /* 71b4: afb00054 */ sw $s0,0x54($sp) /* 71b8: 24100001 */ addiu $s0,$zero,0x1