enum Tile Behavior

This commit is contained in:
Adrienn Tindall 2022-12-07 00:05:12 -05:00
parent edcbbe9d2d
commit d356b19434
5 changed files with 339 additions and 74 deletions

View File

@ -0,0 +1,240 @@
enum TILE_BEHAVIOR {
TILE_BEHAVIOR_0,
TILE_BEHAVIOR_1,
TILE_BEHAVIOR_2,
TILE_BEHAVIOR_3,
TILE_BEHAVIOR_4,
TILE_BEHAVIOR_5,
TILE_BEHAVIOR_HEADBUTT,
TILE_BEHAVIOR_7,
TILE_BEHAVIOR_8,
TILE_BEHAVIOR_9,
TILE_BEHAVIOR_10,
TILE_BEHAVIOR_11,
TILE_BEHAVIOR_12,
TILE_BEHAVIOR_13,
TILE_BEHAVIOR_14,
TILE_BEHAVIOR_15,
TILE_BEHAVIOR_16,
TILE_BEHAVIOR_WHIRLPOOL,
TILE_BEHAVIOR_18,
TILE_BEHAVIOR_19,
TILE_BEHAVIOR_20,
TILE_BEHAVIOR_21,
TILE_BEHAVIOR_22,
TILE_BEHAVIOR_23,
TILE_BEHAVIOR_24,
TILE_BEHAVIOR_25,
TILE_BEHAVIOR_26,
TILE_BEHAVIOR_27,
TILE_BEHAVIOR_28,
TILE_BEHAVIOR_29,
TILE_BEHAVIOR_30,
TILE_BEHAVIOR_31,
TILE_BEHAVIOR_32,
TILE_BEHAVIOR_33,
TILE_BEHAVIOR_34,
TILE_BEHAVIOR_35,
TILE_BEHAVIOR_36,
TILE_BEHAVIOR_37,
TILE_BEHAVIOR_38,
TILE_BEHAVIOR_39,
TILE_BEHAVIOR_40,
TILE_BEHAVIOR_41,
TILE_BEHAVIOR_42,
TILE_BEHAVIOR_43,
TILE_BEHAVIOR_44,
TILE_BEHAVIOR_45,
TILE_BEHAVIOR_46,
TILE_BEHAVIOR_47,
TILE_BEHAVIOR_48,
TILE_BEHAVIOR_49,
TILE_BEHAVIOR_50,
TILE_BEHAVIOR_51,
TILE_BEHAVIOR_52,
TILE_BEHAVIOR_53,
TILE_BEHAVIOR_54,
TILE_BEHAVIOR_55,
TILE_BEHAVIOR_56,
TILE_BEHAVIOR_57,
TILE_BEHAVIOR_58,
TILE_BEHAVIOR_59,
TILE_BEHAVIOR_60,
TILE_BEHAVIOR_61,
TILE_BEHAVIOR_62,
TILE_BEHAVIOR_63,
TILE_BEHAVIOR_64,
TILE_BEHAVIOR_65,
TILE_BEHAVIOR_66,
TILE_BEHAVIOR_67,
TILE_BEHAVIOR_68,
TILE_BEHAVIOR_69,
TILE_BEHAVIOR_70,
TILE_BEHAVIOR_71,
TILE_BEHAVIOR_72,
TILE_BEHAVIOR_73,
TILE_BEHAVIOR_74,
TILE_BEHAVIOR_75,
TILE_BEHAVIOR_76,
TILE_BEHAVIOR_77,
TILE_BEHAVIOR_78,
TILE_BEHAVIOR_79,
TILE_BEHAVIOR_80,
TILE_BEHAVIOR_81,
TILE_BEHAVIOR_82,
TILE_BEHAVIOR_83,
TILE_BEHAVIOR_84,
TILE_BEHAVIOR_85,
TILE_BEHAVIOR_86,
TILE_BEHAVIOR_87,
TILE_BEHAVIOR_88,
TILE_BEHAVIOR_89,
TILE_BEHAVIOR_90,
TILE_BEHAVIOR_91,
TILE_BEHAVIOR_92,
TILE_BEHAVIOR_93,
TILE_BEHAVIOR_94,
TILE_BEHAVIOR_95,
TILE_BEHAVIOR_96,
TILE_BEHAVIOR_97,
TILE_BEHAVIOR_98,
TILE_BEHAVIOR_99,
TILE_BEHAVIOR_100,
TILE_BEHAVIOR_101,
TILE_BEHAVIOR_102,
TILE_BEHAVIOR_103,
TILE_BEHAVIOR_104,
TILE_BEHAVIOR_105,
TILE_BEHAVIOR_106,
TILE_BEHAVIOR_107,
TILE_BEHAVIOR_108,
TILE_BEHAVIOR_109,
TILE_BEHAVIOR_110,
TILE_BEHAVIOR_111,
TILE_BEHAVIOR_112,
TILE_BEHAVIOR_113,
TILE_BEHAVIOR_114,
TILE_BEHAVIOR_115,
TILE_BEHAVIOR_116,
TILE_BEHAVIOR_117,
TILE_BEHAVIOR_118,
TILE_BEHAVIOR_119,
TILE_BEHAVIOR_120,
TILE_BEHAVIOR_121,
TILE_BEHAVIOR_122,
TILE_BEHAVIOR_123,
TILE_BEHAVIOR_124,
TILE_BEHAVIOR_125,
TILE_BEHAVIOR_126,
TILE_BEHAVIOR_127,
TILE_BEHAVIOR_128,
TILE_BEHAVIOR_129,
TILE_BEHAVIOR_130,
TILE_BEHAVIOR_131,
TILE_BEHAVIOR_132,
TILE_BEHAVIOR_133,
TILE_BEHAVIOR_134,
TILE_BEHAVIOR_135,
TILE_BEHAVIOR_136,
TILE_BEHAVIOR_137,
TILE_BEHAVIOR_138,
TILE_BEHAVIOR_139,
TILE_BEHAVIOR_140,
TILE_BEHAVIOR_141,
TILE_BEHAVIOR_142,
TILE_BEHAVIOR_143,
TILE_BEHAVIOR_144,
TILE_BEHAVIOR_145,
TILE_BEHAVIOR_146,
TILE_BEHAVIOR_147,
TILE_BEHAVIOR_148,
TILE_BEHAVIOR_149,
TILE_BEHAVIOR_150,
TILE_BEHAVIOR_151,
TILE_BEHAVIOR_152,
TILE_BEHAVIOR_153,
TILE_BEHAVIOR_154,
TILE_BEHAVIOR_155,
TILE_BEHAVIOR_156,
TILE_BEHAVIOR_157,
TILE_BEHAVIOR_158,
TILE_BEHAVIOR_159,
TILE_BEHAVIOR_160,
TILE_BEHAVIOR_161,
TILE_BEHAVIOR_162,
TILE_BEHAVIOR_163,
TILE_BEHAVIOR_164,
TILE_BEHAVIOR_165,
TILE_BEHAVIOR_166,
TILE_BEHAVIOR_167,
TILE_BEHAVIOR_168,
TILE_BEHAVIOR_169,
TILE_BEHAVIOR_170,
TILE_BEHAVIOR_171,
TILE_BEHAVIOR_172,
TILE_BEHAVIOR_173,
TILE_BEHAVIOR_174,
TILE_BEHAVIOR_175,
TILE_BEHAVIOR_176,
TILE_BEHAVIOR_177,
TILE_BEHAVIOR_178,
TILE_BEHAVIOR_179,
TILE_BEHAVIOR_180,
TILE_BEHAVIOR_181,
TILE_BEHAVIOR_182,
TILE_BEHAVIOR_183,
TILE_BEHAVIOR_184,
TILE_BEHAVIOR_185,
TILE_BEHAVIOR_186,
TILE_BEHAVIOR_187,
TILE_BEHAVIOR_188,
TILE_BEHAVIOR_189,
TILE_BEHAVIOR_190,
TILE_BEHAVIOR_191,
TILE_BEHAVIOR_192,
TILE_BEHAVIOR_193,
TILE_BEHAVIOR_194,
TILE_BEHAVIOR_195,
TILE_BEHAVIOR_196,
TILE_BEHAVIOR_197,
TILE_BEHAVIOR_198,
TILE_BEHAVIOR_199,
TILE_BEHAVIOR_200,
TILE_BEHAVIOR_201,
TILE_BEHAVIOR_202,
TILE_BEHAVIOR_203,
TILE_BEHAVIOR_204,
TILE_BEHAVIOR_205,
TILE_BEHAVIOR_206,
TILE_BEHAVIOR_207,
TILE_BEHAVIOR_208,
TILE_BEHAVIOR_209,
TILE_BEHAVIOR_210,
TILE_BEHAVIOR_211,
TILE_BEHAVIOR_212,
TILE_BEHAVIOR_213,
TILE_BEHAVIOR_214,
TILE_BEHAVIOR_215,
TILE_BEHAVIOR_216,
TILE_BEHAVIOR_217,
TILE_BEHAVIOR_218,
TILE_BEHAVIOR_219,
TILE_BEHAVIOR_220,
TILE_BEHAVIOR_221,
TILE_BEHAVIOR_222,
TILE_BEHAVIOR_223,
TILE_BEHAVIOR_224,
TILE_BEHAVIOR_225,
TILE_BEHAVIOR_226,
TILE_BEHAVIOR_227,
TILE_BEHAVIOR_228,
TILE_BEHAVIOR_229,
TILE_BEHAVIOR_230,
TILE_BEHAVIOR_231,
TILE_BEHAVIOR_232,
TILE_BEHAVIOR_233,
TILE_BEHAVIOR_234,
TILE_BEHAVIOR_235,
TILE_BEHAVIOR_236,
TILE_BEHAVIOR_NONE = 255
};

View File

@ -9,7 +9,7 @@
#include "save_flypoints.h"
#include "overlay_01.h"
#include "overlay_02.h"
#include "unk_0205B6E8.h"
#include "metatile_behavior.h"
#include "unk_0203BC10.h"
#include "map_header.h"
#include "sys_flags.h"

View File

@ -13,7 +13,7 @@
#include "overlay_01.h"
#include "overlay_02.h"
#include "unk_02054E00.h"
#include "unk_0205B6E8.h"
#include "metatile_behavior.h"
#include "unk_0203E348.h"
#include "unk_0200E398.h"
#include "unk_0200FA24.h"

View File

@ -1,4 +1,5 @@
#include "metatile_behavior.h"
#include "constants/metatile_behavior.h"
static const u8 _020FCA74[] = {
0x00, 0x00, 0x02, 0x02, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
@ -20,51 +21,51 @@ static const u8 _020FCA74[] = {
};
BOOL sub_0205B6E8(u8 tile) {
return tile == 2;
return tile == TILE_BEHAVIOR_2;
}
BOOL sub_0205B6F4(u8 tile) {
return tile == 3;
return tile == TILE_BEHAVIOR_3;
}
BOOL sub_0205B700(u8 tile) {
return tile == 128;
return tile == TILE_BEHAVIOR_128;
}
BOOL sub_0205B70C(u8 tile) {
return tile == 105;
return tile == TILE_BEHAVIOR_105;
}
BOOL sub_0205B718(u8 tile) {
return tile == 98;
return tile == TILE_BEHAVIOR_98;
}
BOOL sub_0205B724(u8 tile) {
return tile == 99;
return tile == TILE_BEHAVIOR_99;
}
BOOL sub_0205B730(u8 tile) {
return tile == 100;
return tile == TILE_BEHAVIOR_100;
}
BOOL sub_0205B73C(u8 tile) {
return tile == 101;
return tile == TILE_BEHAVIOR_101;
}
BOOL sub_0205B748(u8 tile) {
return tile == 108;
return tile == TILE_BEHAVIOR_108;
}
BOOL sub_0205B754(u8 tile) {
return tile == 109;
return tile == TILE_BEHAVIOR_109;
}
BOOL sub_0205B760(u8 tile) {
return tile == 110;
return tile == TILE_BEHAVIOR_110;
}
BOOL sub_0205B76C(u8 tile) {
return tile == 111;
return tile == TILE_BEHAVIOR_111;
}
BOOL sub_0205B778(u8 tile) {
@ -72,143 +73,157 @@ BOOL sub_0205B778(u8 tile) {
}
BOOL sub_0205B78C(u8 tile) {
return tile == 34;
return tile == TILE_BEHAVIOR_34;
}
BOOL sub_0205B798(u8 tile) {
return tile == 33;
return tile == TILE_BEHAVIOR_33;
}
BOOL sub_0205B7A4(u8 tile) {
return tile == 23;
return tile == TILE_BEHAVIOR_23;
}
BOOL sub_0205B7B0(u8 tile) {
return tile == 58;
return tile == TILE_BEHAVIOR_58;
}
BOOL sub_0205B7BC(u8 tile) {
return tile == 59;
return tile == TILE_BEHAVIOR_59;
}
BOOL sub_0205B7C8(u8 tile) {
return tile == 57;
return tile == TILE_BEHAVIOR_57;
}
BOOL sub_0205B7D4(u8 tile) {
return tile == 56;
return tile == TILE_BEHAVIOR_56;
}
BOOL sub_0205B7E0(u8 tile) {
return tile == 131;
return tile == TILE_BEHAVIOR_131;
}
BOOL sub_0205B7EC(u8 tile) {
return tile == 133;
return tile == TILE_BEHAVIOR_133;
}
BOOL sub_0205B7F8(u8 tile) {
return tile == 106;
return tile == TILE_BEHAVIOR_106;
}
BOOL sub_0205B804(u8 tile) {
return tile == 107;
return tile == TILE_BEHAVIOR_107;
}
BOOL sub_0205B810(u8 tile) {
return tile == 94;
return tile == TILE_BEHAVIOR_94;
}
BOOL sub_0205B81C(u8 tile) {
return tile == 95;
return tile == TILE_BEHAVIOR_95;
}
BOOL sub_0205B828(u8 tile) {
return tile == 32;
return tile == TILE_BEHAVIOR_32;
}
BOOL sub_0205B834(u8 tile) {
return tile == 75;
return tile == TILE_BEHAVIOR_75;
}
BOOL sub_0205B840(u8 tile) {
return tile == 76;
return tile == TILE_BEHAVIOR_76;
}
BOOL sub_0205B84C(u8 tile) {
return tile == 224;
return tile == TILE_BEHAVIOR_224;
}
BOOL sub_0205B858(u8 tile) {
return tile == 234;
return tile == TILE_BEHAVIOR_234;
}
BOOL sub_0205B864(u8 tile) {
return tile == 225;
return tile == TILE_BEHAVIOR_225;
}
BOOL sub_0205B870(u8 tile) {
return tile == 226;
return tile == TILE_BEHAVIOR_226;
}
BOOL sub_0205B87C(u8 tile) {
return tile == 228;
return tile == TILE_BEHAVIOR_228;
}
BOOL sub_0205B888(u8 tile) {
return tile == 229;
return tile == TILE_BEHAVIOR_229;
}
BOOL sub_0205B894(u8 tile) {
return tile == 235;
return tile == TILE_BEHAVIOR_235;
}
BOOL sub_0205B8A0(u8 tile) {
return tile == 236;
return tile == TILE_BEHAVIOR_236;
}
BOOL sub_0205B8AC(u8 tile) {
return tile == 164;
return tile == TILE_BEHAVIOR_164;
}
BOOL sub_0205B8B8(u8 tile) {
return tile == 168;
return tile == TILE_BEHAVIOR_168;
}
BOOL sub_0205B8C4(u8 tile) {
return tile == 168;
return tile == TILE_BEHAVIOR_168;
}
BOOL sub_0205B8D0(u8 tile) {
return tile == 8;
return tile == TILE_BEHAVIOR_8;
}
BOOL MetatileBehavior_IsWaterfall(u8 tile) {
return tile == 19;
return tile == TILE_BEHAVIOR_19;
}
BOOL MetatileBehavior_IsWhirlpool(u8 tile) {
return tile == 17;
return tile == TILE_BEHAVIOR_WHIRLPOOL;
}
BOOL sub_0205B8F4(u8 tile) {
return tile == 50 || tile == 52 || tile == 53 || tile == 60 || tile == 73;
return tile == TILE_BEHAVIOR_50 ||
tile == TILE_BEHAVIOR_52 ||
tile == TILE_BEHAVIOR_53 ||
tile == TILE_BEHAVIOR_60 ||
tile == TILE_BEHAVIOR_73;
}
BOOL sub_0205B918(u8 tile) {
return tile == 51 || tile == 54 || tile == 55 || tile == 61 || tile == 73;
return tile == TILE_BEHAVIOR_51 ||
tile == TILE_BEHAVIOR_54 ||
tile == TILE_BEHAVIOR_55 ||
tile == TILE_BEHAVIOR_61 ||
tile == TILE_BEHAVIOR_73;
}
BOOL sub_0205B93C(u8 tile) {
return tile == 49 || tile == 53 || tile == 55 || tile == 74;
return tile == TILE_BEHAVIOR_49 ||
tile == TILE_BEHAVIOR_53 ||
tile == TILE_BEHAVIOR_55 ||
tile == TILE_BEHAVIOR_74;
}
BOOL sub_0205B960(u8 tile) {
return tile == 48 || tile == 52 || tile == 54 || tile == 74;
return tile == TILE_BEHAVIOR_48 ||
tile == TILE_BEHAVIOR_52 ||
tile == TILE_BEHAVIOR_54 ||
tile == TILE_BEHAVIOR_74;
}
BOOL sub_0205B984(u8 tile) {
return tile == 22 || tile == 29;
return tile == TILE_BEHAVIOR_22 || tile == TILE_BEHAVIOR_29;
}
BOOL sub_0205B994(u8 tile) {
@ -216,87 +231,97 @@ BOOL sub_0205B994(u8 tile) {
}
BOOL sub_0205B9AC(u8 tile) {
return tile == 134;
return tile == TILE_BEHAVIOR_134;
}
BOOL sub_0205B9B8(u8 tile) {
return tile == 16 || tile == 22 || tile == 29 || tile == 32 || tile == 45;
return tile == TILE_BEHAVIOR_16 ||
tile == TILE_BEHAVIOR_22 ||
tile == TILE_BEHAVIOR_29 ||
tile == TILE_BEHAVIOR_32 ||
tile == TILE_BEHAVIOR_45;
}
BOOL sub_0205B9DC(u8 tile) {
return tile == 64;
return tile == TILE_BEHAVIOR_64;
}
BOOL sub_0205B9E8(u8 tile) {
return tile == 65;
return tile == TILE_BEHAVIOR_65;
}
BOOL sub_0205B9F4(u8 tile) {
return tile == 66;
return tile == TILE_BEHAVIOR_66;
}
BOOL sub_0205BA00(u8 tile) {
return tile == 67;
return tile == TILE_BEHAVIOR_67;
}
BOOL sub_0205BA0C(u8 tile) {
return tile == 77;
return tile == TILE_BEHAVIOR_77;
}
BOOL sub_0205BA18(u8 tile) {
return tile == 103;
return tile == TILE_BEHAVIOR_103;
}
BOOL sub_0205BA24(u8 tile) {
return tile == 112;
return tile == TILE_BEHAVIOR_112;
}
BOOL sub_0205BA30(u8 tile) {
return tile == 113 || tile == 114 || tile == 115;
return tile == TILE_BEHAVIOR_113 ||
tile == TILE_BEHAVIOR_114 ||
tile == TILE_BEHAVIOR_115;
}
BOOL sub_0205BA44(u8 tile) {
return tile == 113 || tile == 114;
return tile == TILE_BEHAVIOR_113 || tile == TILE_BEHAVIOR_114;
}
BOOL sub_0205BA54(u8 tile) {
return tile == 115;
return tile == TILE_BEHAVIOR_115;
}
BOOL sub_0205BA60(u8 tile) {
return tile == 255;
return tile == TILE_BEHAVIOR_NONE;
}
u8 sub_0205BA6C(void) {
return 255;
return TILE_BEHAVIOR_NONE;
}
BOOL sub_0205BA70(u8 tile) {
return tile == 29 || tile == 32 || tile == 45;
return tile == TILE_BEHAVIOR_29 ||
tile == TILE_BEHAVIOR_32 ||
tile == TILE_BEHAVIOR_45;
}
BOOL sub_0205BA94(u8 tile) {
return tile == 169;
return tile == TILE_BEHAVIOR_169;
}
BOOL sub_0205BAA0(u8 tile) {
return tile == 60;
return tile == TILE_BEHAVIOR_60;
}
BOOL sub_0205BAAC(u8 tile) {
return tile == 61;
return tile == TILE_BEHAVIOR_61;
}
BOOL sub_0205BAB8(u8 tile) {
return tile == 62;
return tile == TILE_BEHAVIOR_62;
}
BOOL sub_0205BAC4(u8 tile) {
return tile == 44;
return tile == TILE_BEHAVIOR_44;
}
BOOL sub_0205BAD0(u8 tile) {
return (tile == 0 || tile == 33 || tile == 164);
return tile == TILE_BEHAVIOR_0 ||
tile == TILE_BEHAVIOR_33 ||
tile == TILE_BEHAVIOR_164;
}
BOOL sub_0205BAE4(u8 tile) {
@ -304,14 +329,14 @@ BOOL sub_0205BAE4(u8 tile) {
}
BOOL sub_0205BAEC(u8 tile) {
return tile == 35;
return tile == TILE_BEHAVIOR_35;
}
BOOL MetatileBehavior_IsHeadbutt(u8 tile) {
return tile == 6;
return tile == TILE_BEHAVIOR_HEADBUTT;
}
BOOL sub_0205BB04(u8 tile) {
return sub_0205BA44(tile) || tile == 46;
return sub_0205BA44(tile) || tile == TILE_BEHAVIOR_46;
}

View File

@ -22,7 +22,7 @@
#include "map_events.h"
#include "unk_0205FD20.h"
#include "unk_02054648.h"
#include "unk_0205B6E8.h"
#include "metatile_behavior.h"
#include "unk_0203E348.h"
#include "unk_02055418.h"
#include "unk_020932A4.h"