Created level_object_entries.h in include/

This commit is contained in:
David Benepe
2022-02-12 21:24:56 -05:00
parent 6742bb0d14
commit b01d9da41e
4 changed files with 473 additions and 99 deletions
+379
View File
@@ -0,0 +1,379 @@
#ifndef _LEVEL_OBJECT_ENTRIES_H_
#define _LEVEL_OBJECT_ENTRIES_H_
/* Size: 8 bytes. Shared across every entry. */
typedef struct LevelObjectEntryCommon {
u8 object_id; // 9-bit object ID to load (uses size's MSB).
u8 size; // 7-bit total entry length (MSB is used in object_id).
s16 x, y, z; // Position in level
} LevelObjectEntryCommon;
typedef struct LevelObjectEntry_1 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_1;
typedef struct LevelObjectEntry_2 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_2;
typedef struct LevelObjectEntry_3 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_3;
typedef struct LevelObjectEntry_4 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_4;
typedef struct LevelObjectEntry_5 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_5;
typedef struct LevelObjectEntry_6 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_6;
typedef struct LevelObjectEntry_7 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_7;
typedef struct LevelObjectEntry_8 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_8;
typedef struct LevelObjectEntry_9 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_9;
typedef struct LevelObjectEntry_10 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_10;
typedef struct LevelObjectEntry_11 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_11;
typedef struct LevelObjectEntry_12 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_12;
typedef struct LevelObjectEntry_13 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_13;
typedef struct LevelObjectEntry_14 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_14;
typedef struct LevelObjectEntry_15 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_15;
typedef struct LevelObjectEntry_16 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_16;
typedef struct LevelObjectEntry_17 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_17;
typedef struct LevelObjectEntry_18 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_18;
typedef struct LevelObjectEntry_19 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_19;
typedef struct LevelObjectEntry_22 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_22;
typedef struct LevelObjectEntry_23 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_23;
typedef struct LevelObjectEntry_25 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_25;
typedef struct LevelObjectEntry_26 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_26;
typedef struct LevelObjectEntry_27 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_27;
typedef struct LevelObjectEntry_28 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_28;
typedef struct LevelObjectEntry_29 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_29;
typedef struct LevelObjectEntry_30 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_30;
typedef struct LevelObjectEntry_31 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_31;
typedef struct LevelObjectEntry_32 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_32;
typedef struct LevelObjectEntry_33 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_33;
typedef struct LevelObjectEntry_36 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_36;
typedef struct LevelObjectEntry_37 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_37;
typedef struct LevelObjectEntry_38 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_38;
typedef struct LevelObjectEntry_39 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_39;
typedef struct LevelObjectEntry_40 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_40;
typedef struct LevelObjectEntry_41 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_41;
typedef struct LevelObjectEntry_43 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_43;
typedef struct LevelObjectEntry_44 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_44;
typedef struct LevelObjectEntry_45 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_45;
typedef struct LevelObjectEntry_46 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_46;
typedef struct LevelObjectEntry_47 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_47;
typedef struct LevelObjectEntry_49 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_49;
typedef struct LevelObjectEntry_52 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_52;
typedef struct LevelObjectEntry_55 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_55;
typedef struct LevelObjectEntry_57 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_57;
typedef struct LevelObjectEntry_58 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_58;
typedef struct LevelObjectEntry_59 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_59;
typedef struct LevelObjectEntry_61 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_61;
typedef struct LevelObjectEntry_62 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_62;
typedef struct LevelObjectEntry_64 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_64;
typedef struct LevelObjectEntry_65 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_65;
typedef struct LevelObjectEntry_66 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_66;
typedef struct LevelObjectEntry_67 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_67;
typedef struct LevelObjectEntry_68 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_68;
typedef struct LevelObjectEntry_69 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_69;
typedef struct LevelObjectEntry_70 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_70;
typedef struct LevelObjectEntry_71 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_71;
typedef struct LevelObjectEntry_72 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_72;
typedef struct LevelObjectEntry_73 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_73;
typedef struct LevelObjectEntry_74 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_74;
typedef struct LevelObjectEntry_75 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_75;
typedef struct LevelObjectEntry_76 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_76;
typedef struct LevelObjectEntry_77 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_77;
typedef struct LevelObjectEntry_78 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_78;
typedef struct LevelObjectEntry_79 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_79;
typedef struct LevelObjectEntry_82 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_82;
typedef struct LevelObjectEntry_83 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_83;
typedef struct LevelObjectEntry_84 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_84;
typedef struct LevelObjectEntry_88 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_88;
typedef struct LevelObjectEntry_89 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_89;
typedef struct LevelObjectEntry_90 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_90;
typedef struct LevelObjectEntry_93 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_93;
typedef struct LevelObjectEntry_94 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_94;
typedef struct LevelObjectEntry_95 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_95;
typedef struct LevelObjectEntry_96 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_96;
typedef struct LevelObjectEntry_97 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_97;
typedef struct LevelObjectEntry_98 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_98;
typedef struct LevelObjectEntry_99 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_99;
typedef struct LevelObjectEntry_100 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_100;
typedef struct LevelObjectEntry_101 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_101;
typedef struct LevelObjectEntry_102 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_102;
typedef struct LevelObjectEntry_103 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_103;
typedef struct LevelObjectEntry_104 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_104;
typedef struct LevelObjectEntry_105 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_105;
typedef struct LevelObjectEntry_108 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_108;
typedef struct LevelObjectEntry_109 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_109;
typedef struct LevelObjectEntry_110 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_110;
typedef struct LevelObjectEntry_111 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_111;
typedef struct LevelObjectEntry_112 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_112;
typedef struct LevelObjectEntry_116 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_116;
typedef struct LevelObjectEntry_117 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_117;
typedef struct LevelObjectEntry_118 {
/* 0x00 */ LevelObjectEntryCommon common;
} LevelObjectEntry_118;
#endif
-7
View File
@@ -453,13 +453,6 @@ typedef struct LevelModel {
/* 0x38 */ u32 minimapColor;
} LevelModel;
/* Size: 8 bytes. */
typedef struct LevelObjectEntryCommon {
u8 object_id; // 9-bit object ID to load (uses size'a MSB).
u8 size; // 7-bit total entry length (MSB is used in object_id).
s16 x, y, z; // Position in level
} LevelObjectEntryCommon;
typedef struct Object_3C {
u8 pad0[0x2];
s16 unk2;
+93 -92
View File
@@ -7,6 +7,7 @@
#include "types.h"
#include "macros.h"
#include "structs.h"
#include "level_object_entries.h"
#include "asset_sections.h"
#include "asset_loading.h"
#include "thread0_epc.h"
@@ -1510,260 +1511,260 @@ GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_800235DC.s")
void func_800238BC(Object *arg0, void *arg1) {
arg0->unk48 = arg0->descriptor_ptr->unk54;
switch (arg0->unk48 - 1) {
case 0x00:
case 0:
func_8004DAB0(arg0, arg1);
break;
case 0x01:
case 1:
func_80033CC0(arg0, arg1);
break;
case 0x02:
case 2:
func_80036C30(arg0, arg1);
break;
case 0x03:
case 3:
func_800376E0(arg0, arg1);
break;
case 0x05:
case 5:
func_800389AC(arg0, arg1);
break;
case 0x18:
case 24:
func_80038A6C(arg0, arg1);
break;
case 0x15:
case 21:
func_80038B74(arg0, arg1);
break;
case 0x06:
case 6:
func_80038E3C(arg0, arg1);
break;
case 0x07:
case 7:
func_8003FD68(arg0, arg1);
break;
case 0x08:
case 0x12:
case 8:
case 18:
func_8003FEF4(arg0, arg1);
break;
case 0x1A:
case 26:
func_8004001C(arg0, arg1);
break;
case 0x09:
case 9:
func_80039160(arg0, arg1);
break;
case 0x0A:
case 10:
func_80039190(arg0, arg1);
break;
case 0x0B:
case 11:
func_800391C8(arg0, arg1);
break;
case 0x0C:
case 12:
func_8003ACBC(arg0, arg1);
break;
case 0x1D:
case 29:
func_8003AD34(arg0, arg1);
break;
case 0x28:
case 40:
func_8003B058(arg0, arg1);
break;
case 0x0D:
case 13:
func_8003B7CC(arg0, arg1);
break;
case 0x6E:
case 110:
func_8003C1E0(arg0, arg1);
break;
case 0x0E:
case 14:
func_8003CF18(arg0, arg1);
break;
case 0x0F:
case 15:
func_8003CFE0(arg0, arg1);
break;
case 0x10:
case 16:
func_8003DFCC(arg0, arg1);
break;
case 0x16:
case 22:
func_8003E5B0(arg0, arg1);
break;
case 0x04:
case 0x11:
case 4:
case 17:
func_8003E5C8(arg0, arg1);
break;
case 0x19:
case 25:
func_8003CF58(arg0, arg1);
break;
case 0x1B:
case 27:
func_80034AF0(arg0, arg1);
break;
case 0x1C:
case 28:
func_800400A4(arg0, arg1);
break;
case 0x1E:
case 30:
func_80036194(arg0, arg1);
break;
case 0x1F:
case 31:
func_8003D534(arg0, arg1);
break;
case 0x20:
case 32:
func_800403A8(arg0, arg1);
break;
case 0x23:
case 35:
func_800403D8(arg0, arg1);
break;
case 0x42:
case 66:
func_8004049C(arg0, arg1);
break;
case 0x24:
case 36:
func_80040800(arg0, arg1);
break;
case 0x25:
case 37:
func_8003C9EC(arg0, arg1);
break;
case 0x26:
case 38:
func_8003CE64(arg0, arg1);
break;
case 0x27:
case 39:
func_8003CF00(arg0, arg1);
break;
case 0x2A:
case 42:
func_8004092C(arg0, arg1);
break;
case 0x2B:
case 43:
func_8004094C(arg0, arg1);
break;
case 0x2C:
case 44:
func_8003522C(arg0, arg1);
break;
case 0x2D:
case 45:
func_80035640(arg0, arg1);
break;
case 0x2E:
case 46:
func_80035EF8(arg0, arg1);
break;
case 0x30:
case 48:
func_80037A18(arg0, arg1);
break;
case 0x33:
case 51:
func_80038854(arg0, arg1);
break;
case 0x36:
case 54:
func_8003C644(arg0, arg1);
break;
case 0x38:
case 0x5C:
case 56:
case 92:
func_8003588C(arg0, arg1);
break;
case 0x39:
case 57:
func_80035E20(arg0, arg1);
break;
case 0x3A:
case 58:
func_800409A4(arg0, arg1);
break;
case 0x3C:
case 60:
func_800409C8(arg0, arg1);
break;
case 0x3D:
case 61:
func_800392B8(arg0, arg1);
break;
case 0x3F:
case 63:
func_8003DE74(arg0, arg1);
break;
case 0x40:
case 64:
func_8003D3EC(arg0, arg1);
break;
case 0x41:
case 65:
func_8003D038(arg0, arg1);
break;
case 0x43:
case 67:
func_80037578(arg0, arg1);
break;
case 0x44:
case 68:
func_80037624(arg0, arg1);
break;
case 0x45:
case 0x66:
case 69:
case 102:
func_8003818C(arg0, arg1);
break;
case 0x47:
case 0x5E:
case 0x67:
case 71:
case 94:
case 103:
func_800381E0(arg0, arg1);
break;
case 0x5F:
case 0x64:
case 95:
case 100:
func_80038214(arg0, arg1);
break;
case 0x60:
case 0x65:
case 96:
case 101:
func_80038248(arg0, arg1);
break;
case 0x46:
case 70:
func_80041A90(arg0, arg1);
break;
case 0x6F:
case 111:
func_80041E80(arg0, arg1);
break;
case 0x75:
case 117:
func_80042014(arg0, arg1);
break;
case 0x48:
case 72:
func_80034B68(arg0, arg1);
break;
case 0x49:
case 73:
func_80034E70(arg0, arg1);
break;
case 0x4A:
case 74:
func_8004203C(arg0, arg1);
break;
case 0x4B:
case 75:
func_8003D2AC(arg0, arg1);
break;
case 0x4C:
case 76:
func_8003B368(arg0, arg1);
break;
case 0x4D:
case 77:
func_80034844(arg0, arg1);
break;
case 0x4E:
case 78:
func_80034530(arg0, arg1);
break;
case 0x51:
case 81:
func_80035AE8(arg0, arg1);
break;
case 0x52:
case 82:
func_80037D54(arg0, arg1);
break;
case 0x53:
case 83:
func_80037D6C(arg0, arg1);
break;
case 0x58:
case 88:
func_8004210C(arg0, arg1);
break;
case 0x57:
case 87:
func_8003DC5C(arg0, arg1);
break;
case 0x59:
case 89:
func_80038AC8(arg0, arg1);
break;
case 0x5D:
case 93:
func_80042150(arg0, arg1);
break;
case 0x61:
case 97:
func_80038D58(arg0, arg1);
break;
case 0x62:
case 0x63:
case 98:
case 99:
func_8003572C(arg0, arg1);
break;
case 0x68:
case 104:
func_8004216C(arg0, arg1);
break;
case 0x6B:
case 0x73:
case 107:
case 115:
func_80033F44(arg0, arg1);
break;
case 0x6C:
case 108:
func_80042210(arg0, arg1);
break;
case 0x6D:
case 109:
func_8003DBA0(arg0, arg1);
break;
case 0x74:
case 116:
func_80042A1C(arg0, arg1);
break;
}
+1
View File
@@ -3,6 +3,7 @@
#include "types.h"
#include "structs.h"
#include "level_object_entries.h"
#define WORLD_KEY_GRAB_CHECK_RADIUS 50
#define SOUND_WORLD_KEY_GRAB 54