From 5f5722c8505e4feb51da398678f29cfedc9f679b Mon Sep 17 00:00:00 2001 From: HailSanta <53960937+HailSanta@users.noreply.github.com> Date: Fri, 10 Nov 2023 00:19:40 -0500 Subject: [PATCH] sfx and render modes cleanup (#1124) * misc * map_init returns * remaining render mode names * fix render mode case order * minor additions --------- Co-authored-by: HailSanta --- include/common_structs.h | 13 - include/enums.h | 630 +++++----- include/macros.h | 8 + include/model.h | 15 +- src/animator.c | 56 +- src/audio.h | 39 +- src/audio/2e230_len_2190.c | 4 +- src/audio/sfx_player.c | 124 +- src/background.c | 2 +- src/battle/entity_model_icons.c | 2 +- src/effects.c | 2 +- src/effects/aura.c | 2 +- src/effects/big_smoke_puff.c | 2 +- src/effects/big_snowflakes.c | 2 +- src/effects/blast.c | 2 +- src/effects/bombette_breaking.c | 2 +- src/effects/breaking_junk.c | 2 +- src/effects/bulb_glow.c | 2 +- src/effects/butterflies.c | 2 +- src/effects/chapter_change.c | 2 +- src/effects/cloud_puff.c | 2 +- src/effects/cloud_trail.c | 2 +- src/effects/cold_breath.c | 2 +- src/effects/confetti.c | 2 +- src/effects/damage_stars.c | 2 +- src/effects/debuff.c | 2 +- src/effects/drop_leaves.c | 2 +- src/effects/effect_3D.c | 2 +- src/effects/effect_46.c | 2 +- src/effects/effect_63.c | 2 +- src/effects/effect_65.c | 2 +- src/effects/effect_86.c | 2 +- src/effects/embers.c | 2 +- src/effects/emote.c | 2 +- src/effects/ending_decals.c | 2 +- src/effects/energy_in_out.c | 2 +- src/effects/energy_orb_wave.c | 2 +- src/effects/explosion.c | 2 +- src/effects/falling_leaves.c | 2 +- src/effects/fire_breath.c | 2 +- src/effects/fire_flower.c | 2 +- src/effects/floating_cloud_puff.c | 2 +- src/effects/floating_flower.c | 2 +- src/effects/floating_rock.c | 2 +- src/effects/flower_splash.c | 2 +- src/effects/flower_trail.c | 2 +- src/effects/footprint.c | 2 +- src/effects/fright_jar.c | 2 +- src/effects/gather_energy_pink.c | 2 +- src/effects/got_item_outline.c | 2 +- src/effects/green_impact.c | 2 +- src/effects/hieroglyphs.c | 2 +- src/effects/huff_puff_breath.c | 2 +- src/effects/ice_pillar.c | 2 +- src/effects/ice_shard.c | 2 +- src/effects/landing_dust.c | 2 +- src/effects/lens_flare.c | 2 +- src/effects/light_rays.c | 2 +- src/effects/lightning_bolt.c | 2 +- src/effects/lil_oink.c | 2 +- src/effects/merlin_house_stars.c | 2 +- src/effects/misc_particles.c | 2 +- src/effects/motion_blur_flame.c | 2 +- src/effects/moving_cloud.c | 2 +- src/effects/music_note.c | 2 +- src/effects/peach_star_beam.c | 2 +- src/effects/pink_sparkles.c | 2 +- src/effects/purple_ring.c | 2 +- src/effects/quizmo_assistant.c | 2 +- src/effects/quizmo_audience.c | 2 +- src/effects/radial_shimmer.c | 2 +- src/effects/red_impact.c | 2 +- src/effects/ring_blast.c | 2 +- src/effects/rising_bubble.c | 2 +- src/effects/shape_spell.c | 2 +- src/effects/shattering_stones.c | 2 +- src/effects/shimmer_burst.c | 2 +- src/effects/shimmer_wave.c | 2 +- src/effects/shiny_flare.c | 2 +- src/effects/shockwave.c | 2 +- src/effects/sleep_bubble.c | 2 +- src/effects/small_gold_sparkle.c | 2 +- src/effects/smoke_burst.c | 2 +- src/effects/smoke_impact.c | 2 +- src/effects/smoke_ring.c | 2 +- src/effects/snaking_static.c | 2 +- src/effects/snowfall.c | 2 +- src/effects/snowflake.c | 2 +- src/effects/snowman_doll.c | 2 +- src/effects/sparkles.c | 2 +- src/effects/spiky_white_aura.c | 2 +- src/effects/squirt.c | 2 +- src/effects/star.c | 2 +- src/effects/star_outline.c | 2 +- src/effects/star_spirits_energy.c | 2 +- src/effects/stars_burst.c | 2 +- src/effects/stars_shimmer.c | 8 +- src/effects/stars_spread.c | 2 +- src/effects/steam_burst.c | 2 +- src/effects/stop_watch.c | 2 +- src/effects/sun.c | 2 +- src/effects/sweat.c | 2 +- src/effects/throw_spiny.c | 2 +- src/effects/thunderbolt_ring.c | 2 +- src/effects/tubba_heart_attack.c | 2 +- src/effects/underwater.c | 2 +- src/effects/walking_dust.c | 2 +- src/effects/water_block.c | 2 +- src/effects/water_fountain.c | 2 +- src/effects/water_splash.c | 2 +- src/effects/waterfall.c | 2 +- src/effects/whirlwind.c | 2 +- src/effects/windy_leaves.c | 2 +- src/entity.c | 12 +- src/entity/sbk_omo/StarBoxLauncher.c | 4 +- src/entity_model.c | 229 ++-- src/evt/map_api.c | 8 +- src/inventory.c | 2 +- src/item_entity.c | 12 +- src/level_up.c | 2 +- src/model.c | 1038 +++++++++-------- src/starpoint.c | 26 +- src/trigger.c | 2 +- src/world/area_kmr/kmr_20/kmr_20_13_records.c | 2 +- src/world/area_kpa/kpa_100/kpa_100_2_main.c | 2 +- src/world/area_kpa/kpa_101/kpa_101_2_main.c | 2 +- src/world/area_kpa/kpa_114/kpa_114_2_main.c | 2 +- src/world/area_mac/mac_00/mac_00_2_main.c | 2 +- .../area_mgm/mgm_00/mgm_00_3_scoreboard.c | 2 +- src/world/area_mgm/mgm_01/mgm_01_1_main.c | 2 +- src/world/area_mgm/mgm_01/mgm_01_2_npc.c | 2 +- src/world/area_mgm/mgm_02/mgm_02_2_npc.c | 2 +- src/world/area_osr/osr_04/osr_04_2_assault.c | 2 +- src/world/area_sam/sam_06/sam_06_2_main.c | 4 +- src/world/partner/goombario.c | 4 +- ver/ique/asm/bss.s | 2 +- ver/ique/asm/bss3.s | 4 +- ver/pal/asm/bss3.s | 4 +- ver/pal/undefined_syms.txt | 2 +- ver/us/asm/bss.s | 2 +- ver/us/asm/bss3.s | 4 +- ver/us/symbol_addrs.txt | 138 +-- 142 files changed, 1360 insertions(+), 1264 deletions(-) diff --git a/include/common_structs.h b/include/common_structs.h index 94441d2c4b..75246d51bb 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -1048,19 +1048,6 @@ typedef struct CollisionData { /* 0x0E */ char unk_0E[2]; } CollisionData; // size = 0x10 -typedef struct ModelGroupData { - /* 0x00 */ Mtx* transformMatrix; - /* 0x04 */ Lightsn* lightingGroup; - /* 0x08 */ s32 numLights; - /* 0x0C */ s32 numChildren; - /* 0x10 */ struct ModelNode** childList; -} ModelGroupData; // size = 0x14 - -typedef struct ModelDisplayData { - /* 0x0 */ Gfx* displayList; - /* 0x4 */ char unk_04[0x4]; -} ModelDisplayData; // size = 0x8 - typedef struct AnimatorNode { /* 0x00 */ Gfx* displayList; /* 0x04 */ struct AnimatorNode* children[32]; diff --git a/include/enums.h b/include/enums.h index c44d99e463..09280871af 100644 --- a/include/enums.h +++ b/include/enums.h @@ -522,6 +522,27 @@ enum EasingType { EASING_COS_IN = 12, }; +enum SoundIDBits { + SOUND_ID_STOP = 0x00008000, + SOUND_ID_LOWER = 0x000023FF, + SOUND_ID_UNK = 0x00002000, // sounds belonging to special large section + SOUND_ID_ADJUST = 0x00001000, + SOUND_ID_TRIGGER_MASK = 0x00000C00, + SOUND_ID_TRIGGER_CHANGE_VOLUME = 0x00000800, + SOUND_ID_TRIGGER_CHANGE_SOUND = 0x00000400, + SOUND_ID_SECTION_MASK = 0x00000300, // corresponds to sections 0-3 for indices < 0xC0 and 4-7 for those above + SOUND_ID_INDEX_MASK = 0x000000FF, + SOUND_ID_UNK_INDEX_MASK = 0x000001FF, // indices for the special large section +}; + +enum SoundType { + SOUND_TYPE_SPECIAL = 0x80000000, + SOUND_TYPE_LOOPING = 0, // 0x80000000 (with SOUND_TYPE_SPECIAL) + SOUND_TYPE_EXIT_DOOR = 1, // 0x90000000 (with SOUND_TYPE_SPECIAL) + SOUND_TYPE_ROOM_DOOR = 2, // 0xA0000000 (with SOUND_TYPE_SPECIAL) + SOUND_TYPE_ALTERNATING = 3, // 0xB0000000 (with SOUND_TYPE_SPECIAL) +}; + enum SoundIDs { SOUND_NONE = 0x00000000, SOUND_OPEN_POPUP_1 = 0x00000001, @@ -1290,272 +1311,272 @@ enum SoundIDs { SOUND_THROW = 0x000003FA, SOUND_PLAYER_COLLAPSE = 0x000003FB, SOUND_LUCKY = 0x000003FC, - SOUND_GOOMBARIO_GATHERING = 0x00002003, - SOUND_PARAKARRY_PREDIVE = 0x00002004, - SOUND_PARAKARRY_DIVE = 0x00002005, - SOUND_PARAKARRY_SHELL_SHOT = 0x00002006, - SOUND_PARAKARRY_FLAP = 0x00002009, - SOUND_PARAKARRY_AIR_RAID_1 = 0x0000200A, // #whoosh - SOUND_PARAKARRY_AIR_RAID_2 = 0x0000200B, // #whoosh #echoing - SOUND_KOOPER_SHELL_SPINUP = 0x0000200C, - SOUND_GOOMBARIO_JUMP = 0x0000200D, - SOUND_BOW_VANISH = 0x0000200E, - SOUND_BOW_APPEAR = 0x0000200F, - SOUND_EGG_MISSILE_BLAST = 0x00002010, - SOUND_WATT_REPEL_DARKNESS = 0x00002011, - SOUND_WATT_RESUME_DARKNESS = 0x00002012, - SOUND_SUSHIE_EMBARK = 0x00002013, - SOUND_SUSHIE_RIDE_IDLE = 0x00002014, - SOUND_SUSHIE_RIDE_MOVING = 0x00002015, - SOUND_BOMBETTE_BLAST_LV1 = 0x00002016, - SOUND_BOMBETTE_BLAST_LV2 = 0x00002017, - SOUND_BOMBETTE_BLAST_LV3 = 0x00002018, - SOUND_BOW_SMACK = 0x00002019, - SOUND_BOW_FAN_SMACK = 0x0000201A, - SOUND_LAKILESTER_THROW_SPINY_A = 0x0000201B, - SOUND_LAKILESTER_THROW_SPINY_B = 0x0000201C, - SOUND_LAKILESTER_MAKE_CLOUD_NINE = 0x0000201D, - SOUND_LAKILESTER_HURRICANE_INHALE = 0x0000201E, - SOUND_LAKILESTER_HURRICANE_EXHALE = 0x0000201F, - SOUND_BOMBETTE_BODY_SLAM = 0x00002020, - SOUND_SHELL_SPIN = 0x00002021, - SOUND_FAN_SMACK_HIT = 0x00002022, // #windy - SOUND_FAN_SMACK_END = 0x00002023, // #windy - SOUND_WATT_MEGA_CHARGE_WAVE = 0x00002024, - SOUND_DIZZY_SHELL = 0x00002026, - SOUND_SHUFFLE_CARD_A = 0x0000202A, - SOUND_SHUFFLE_CARD_B = 0x0000202B, - SOUND_FIRE_FLOWER_A = 0x0000202C, - SOUND_FIRE_FLOWER_B = 0x0000202D, - SOUND_SNOWMAN_DOLL_JUMP = 0x0000202E, - SOUND_NOISE_RUSH = 0x0000202F, // unused - SOUND_POW_BLOCK = 0x00002030, - SOUND_INFLICT_SLEEP = 0x00002031, - SOUND_INFLICT_STATUS = 0x00002032, - SOUND_DIZZY_DIAL = 0x00002033, - SOUND_SUSHIE_BELLY_FLOP = 0x00002034, - SOUND_CREATE_WATER_BLOCK = 0x00002035, - SOUND_WHALE_OPEN_MOUTH = 0x00002036, - SOUND_WHALE_CLOSE_MOUTH = 0x00002037, - SOUND_TUBBA_SNORE_INHALE = 0x00002038, - SOUND_TUBBA_SNORE_EXHALE = 0x00002039, - SOUND_KPA_BRIDGE_COLLAPSE_A = 0x0000203A, - SOUND_KPA_BRIDGE_COLLAPSE_B = 0x0000203B, - SOUND_KPA_ARENA_EXPLODING = 0x0000203C, - SOUND_OBK_STAIRS_DROP = 0x0000203D, - SOUND_SHY_GUY_OUCH = 0x0000203E, - SOUND_SHY_GUY_RUN_AWAY = 0x0000203F, - SOUND_KPA_FLIP_BRIDGE_PANEL = 0x00002040, - SOUND_STAR_SPIRIT_APPEAR_A = 0x00002041, - SOUND_STAR_SPIRIT_APPEAR_B = 0x00002042, - SOUND_STAR_SPIRIT_CAST_A = 0x00002043, - SOUND_STAR_SPIRIT_CAST_B = 0x00002044, - SOUND_STAR_SPIRIT_DEPART_1 = 0x00002045, - SOUND_STAR_SPIRIT_DEPART_2 = 0x00002046, - SOUND_STAR_SPIRIT_DEPART_3 = 0x00002047, - SOUND_DARK_TOAD_DISPEL = 0x00002049, - SOUND_OPEN_MAGIC_CHEST = 0x0000204A, - SOUND_CLOSE_MAGIC_CHEST = 0x0000204B, - SOUND_QUICK_HINGE = 0x0000204C, // unused - SOUND_FLO_MOVE_PILLAR = 0x0000204D, - SOUND_WISH_ASCENDING = 0x00002051, - SOUND_UP_AND_AWAY_SEND_AWAY = 0x00002052, - SOUND_STAR_POWER_RECOVERY = 0x00002053, - SOUND_START_RECOVERY = 0x00002055, - SOUND_RECOVER = 0x00002056, - SOUND_FLOWERS_LIGHT_GIGGLE = 0x00002059, - SOUND_FLOWERS_SAD_GIGGLE = 0x0000205A, - SOUND_FLOWERS_LAUGH = 0x0000205B, - SOUND_FLOWERS_WITHER = 0x0000205C, - SOUND_FLOWERS_GROW = 0x0000205D, - SOUND_ROCK_LAUGHTER = 0x0000205E, - SOUND_TREE_LAUGHTER = 0x0000205F, - SOUND_IMPISH_LAUGH = 0x00002060, - SOUND_CHAIN_CHOMP_BITE = 0x00002061, - SOUND_CHAIN_CHOMP_THUD = 0x00002062, - SOUND_CHAIN_RATTLE = 0x00002063, - SOUND_SHY_STACK_SQUISH = 0x00002064, - SOUND_STILT_GUY_UNFOLD = 0x00002065, - SOUND_STILT_GUY_STEP = 0x00002066, - SOUND_STILTS_FALL = 0x00002067, // #woody - SOUND_TANK_BULB_FIRE = 0x00002069, // #electric - SOUND_TOY_TANK_OPEN_HATCH = 0x0000206A, - SOUND_TOY_TANK_CLOSE_HATCH = 0x0000206B, - SOUND_WOODEN_BLOCK = 0x0000206C, // #unused - SOUND_RECOVER_HEART = 0x0000206D, // #magic - SOUND_FUZZY_RUMBLE = 0x0000206E, - SOUND_FUZZY_SHAKE = 0x0000206F, - SOUND_FUZZY_DIVIDE = 0x00002070, - SOUND_UP_AND_AWAY_CAPTURE = 0x00002071, - SOUND_YOSHI = 0x00002072, - SOUND_HIT_WHACKA = 0x00002073, - SOUND_MAGIC_ASCENDING = 0x00002074, // #magic #ascending - SOUND_MAGIC_DESCENDING = 0x00002075, // #magic #descending - SOUND_BOMB_BLAST = 0x00002076, - SOUND_BULLET_BILL_EXPLODE_A = 0x00002078, - SOUND_BULLET_BILL_EXPLODE_B = 0x00002079, - SOUND_KAMMY_SUMMON_MAGIC = 0x0000207A, - SOUND_KAMMY_SUMMON_BLOCK = 0x0000207B, - SOUND_KAMMY_RAISE_OBJECT = 0x0000207C, - SOUND_KAMMY_LOWER_OBJECT = 0x0000207D, - SOUND_TWINK_ATTACK = 0x0000207E, - SOUND_TWINK_FLY_A = 0x0000207F, - SOUND_QUICK_PLAYER_JUMP = 0x00002081, - SOUND_JUMP_8BIT_MARIO = 0x00002082, - SOUND_STAR_BOX_LAUNCHER = 0x00002085, - SOUND_SPRING = 0x00002086, - SOUND_ZIPLINE_FINISH = 0x00002087, - SOUND_PUSH_BLOCK = 0x00002088, - SOUND_PULL_VINE = 0x00002089, - SOUND_FLOOR_SWITCH_DEPRESS = 0x0000208A, - SOUND_FLOOR_SWITCH_ACTIVATE = 0x0000208B, - SOUND_NO_DAMGE = 0x0000208C, - SOUND_USE_ITEM = 0x0000208D, - SOUND_GROW = 0x0000208E, - SOUND_CHARGE_UP = 0x0000208F, - SOUND_OPEN_TRAPDOOR = 0x00002091, - SOUND_BREAK_FLOOR = 0x00002092, - SOUND_SPIKES_EXTEND = 0x00002093, - SOUND_JUMP_SCARE = 0x00002094, - SOUND_EAT_OR_DRINK = 0x00002095, - SOUND_SPIT_OUT = 0x00002096, - SOUND_GLASS_SHATTER = 0x00002097, - SOUND_VANISH_IN_SMOKE = 0x00002098, - SOUND_HEART_PLANT = 0x00002099, - SOUND_HURT_PLANT_SHRIEK = 0x0000209A, - SOUND_MUNCHLESIA_SUCTION = 0x0000209B, - SOUND_JAN_LOG_LAND = 0x0000209D, - SOUND_JAN_LOG_SPLIT = 0x0000209E, - SOUND_SEPARATE_BUSHES = 0x0000209F, - SOUND_LARGE_NPC_IMPACT = 0x000020A0, - SOUND_STARSHIP_BOOST = 0x000020A1, - SOUND_IWA_SLIDE_GATE = 0x000020A2, - SOUND_CREAKY_WINDOW_OPEN = 0x000020A3, - SOUND_CREAKY_WINDOW_CLOSE = 0x000020A4, - SOUND_TRAIN_DOOR_OPEN = 0x000020A5, - SOUND_TRAIN_DOOR_CLOSE = 0x000020A6, - SOUND_TURN_MECHANISM = 0x000020A7, - SOUND_CAPSULE_OPEN = 0x000020A8, - SOUND_FLIP_PANEL = 0x000020AB, - SOUND_CLOSE_PANEL = 0x000020AC, - SOUND_WATER_SPLASH = 0x000020AD, - SOUND_BREAK_CRATE = 0x000020AE, // #boing - SOUND_HOLLOW_RISING = 0x000020AF, // #unused - SOUND_HOLLOW_FALLING = 0x000020B0, // #unused - SOUND_PIRANHA_SPIN_1 = 0x000020B1, - SOUND_PIRANHA_SPIN_2 = 0x000020B2, - SOUND_PIRANHA_TENSE = 0x000020B3, - SOUND_HEAVY_NPC_STEP_B = 0x000020B4, - SOUND_HUFF_N_PUFF_JIGGLE = 0x000020B6, - SOUND_HUFF_N_PUFF_WOBBLE = 0x000020B7, - SOUND_GHOST_TRANSFORM = 0x000020B8, - SOUND_JR_TROOPA_TRANSFORM = 0x000020B9, - SOUND_ACTOR_STEP_A = 0x000020BA, - SOUND_MASTER_FLUTTER = 0x000020BB, - SOUND_MASTER_KICK = 0x000020BC, - SOUND_MASTER_STANCE_CHANGE = 0x000020BD, - SOUND_MASTER_FLIP = 0x000020BE, - SOUND_LAVA_BUD_RECOVER = 0x000020BF, - SOUND_SMALL_NPC_STEP = 0x000020C1, - SOUND_BANDIT_STEAL = 0x000020C2, - SOUND_DISAPPOINTED = 0x000020C3, - SOUND_CLUBBA_STEP = 0x000020C4, - SOUND_CLUBBA_SWING = 0x000020C5, - SOUND_MBUSH_STEP = 0x000020C6, - SOUND_TUBBA_HEART_JUMP = 0x000020C8, - SOUND_MBUSH_LEAP = 0x000020C9, - SOUND_BZZAP_STING = 0x000020CA, - SOUND_MINI_BZZAP_STING = 0x000020CB, - SOUND_BZZAP_CALL_SWARM = 0x000020CC, - SOUND_BONY_BEETLE_STEP = 0x000020CD, - SOUND_BONY_BEETLE_EXTEND_SPIKES = 0x000020CE, - SOUND_BONY_BEETLE_RETRACT_SPIKES = 0x000020CF, - SOUND_CLEFT_STEP = 0x000020D0, - SOUND_CLEFT_TACKLE = 0x000020D1, - SOUND_LAKITU_THROW_SPINY = 0x000020D2, - SOUND_SHELL_TOSS = 0x000020D3, - SOUND_SPELL_CAST1 = 0x000020D4, - SOUND_SPELL_CAST2 = 0x000020D5, - SOUND_SPELL_CAST3 = 0x000020D6, - SOUND_SPELL_CAST4 = 0x000020D7, - SOUND_SPELL_CAST5 = 0x000020D8, // unused - SOUND_FUZZIPEDE_MOTION = 0x000020D9, - SOUND_FUZZIPEDE_LEAP = 0x000020DA, // #boing #spring #bounce - SOUND_FUZZIPEDE_STRIKE = 0x000020DB, // #boing #spring - SOUND_COMMAND_LOSS = 0x000020DC, - SOUND_GOOMBA_STEP = 0x000020DD, - SOUND_PIRANHA_BITE = 0x000020DE, - SOUND_PARAGOOMBA_FLY = 0x000020DF, - SOUND_PARAGOOMBA_PREDIVE = 0x000020E0, - SOUND_TUTANKOOPA_MAGIC = 0x000020E1, - SOUND_JR_TOOPA_JUMP = 0x000020E2, - SOUND_ACTOR_WITHER = 0x000020E3, - SOUND_ACTOR_COLLAPSE = 0x000020E4, - SOUND_KNOCKOUT_CHIRPING = 0x000020E5, // #bird #chirping - SOUND_TUTANKOOPA_LEVITATE = 0x000020E6, - SOUND_SPOOKY_LEVITATE = 0x000020E7, - SOUND_ILLUSION_DISSOLVE = 0x000020E8, - SOUND_HEAVY_NPC_FALLING = 0x000020E9, // #falling - SOUND_HEAVY_NPC_LANDING = 0x000020EA, // #echoing #thud #impact - SOUND_TUTANKOOPA_DEBRIS_FALL = 0x000020EB, // #falling - SOUND_HEAVY_NPC_STEP_A = 0x000020EC, - SOUND_GOOMBA_KING_SPIN = 0x000020ED, - SOUND_GULPIT_LICK = 0x000020EE, - SOUND_BUZZAR_FLAP = 0x000020EF, - SOUND_BUZZAR_WHIRLWIND = 0x000020F0, // #windy - SOUND_BUZZAR_WINDUP = 0x000020F1, - SOUND_BUZZAR_DIVE = 0x000020F2, - SOUND_SMALL_LENS_FLARE = 0x000020F3, - SOUND_BUZZAR_THROW = 0x000020F4, - SOUND_BUZZAR_GRAB = 0x000020F5, - SOUND_HEAVY_NPC_STEP_C = 0x000020F6, - SOUND_TUBBAS_HEART_CHARGE = 0x000020F7, - SOUND_TUBBAS_HEART_SWARM_ATTACK = 0x000020F9, - SOUND_TUBBAS_HEART_SWARM_DISPERSE = 0x000020FB, - SOUND_TUBBAS_HEART_SWARM_VANISH = 0x000020FC, - SOUND_FAKE_BOWSER_SWING = 0x000020FD, - SOUND_FAKE_BOWSER_STRIKE = 0x000020FE, - SOUND_FILE_MENU_MOVE_CURSOR = 0x00002101, - SOUND_CREATE_FILE_MOVE_CURSOR = 0x00002102, - SOUND_CREATE_FILE_SET_CHARACTER = 0x00002103, - SOUND_CREATE_FILE_BACKSPACE = 0x00002104, - SOUND_CREATE_FILE_CHANGE_CHARSET = 0x00002105, - SOUND_INFLICT_CHILL_OUT = 0x00002106, - SOUND_INFLICT_KO = 0x00002107, - SOUND_SPAWN_BLOCK = 0x00002108, - SOUND_D_DOWN_HIT_1 = 0x0000210A, - SOUND_D_DOWN_HIT_2 = 0x0000210B, - SOUND_D_DOWN_HIT_3 = 0x0000210C, - SOUND_SPIN = 0x00002111, - SOUND_SPEEDY_SPIN = 0x00002112, - SOUND_SPIN_ATTACK = 0x00002113, - SOUND_SPEEDY_SPIN_ATTACK = 0x00002114, - SOUND_HAMMER_SWING_1 = 0x00002115, - SOUND_HAMMER_SWING_2 = 0x00002116, - SOUND_HAMMER_SWING_3 = 0x00002117, - SOUND_HAMMER_STRIKE_1 = 0x00002118, - SOUND_HAMMER_STRIKE_2 = 0x00002119, - SOUND_HAMMER_STRIKE_3 = 0x0000211A, - SOUND_HAMMER_QUAKE_1 = 0x0000211B, - SOUND_HAMMER_QUAKE_2 = 0x0000211C, - SOUND_HAMMER_QUAKE_3 = 0x0000211D, - SOUND_SPIN_SMASH_1 = 0x0000211E, - SOUND_SPIN_SMASH_2 = 0x0000211F, - SOUND_SPIN_SMASH_3 = 0x00002120, - SOUND_BOWSER_STAR_ROD_USE = 0x00002121, - SOUND_BOWSER_STAR_ROD_DRAIN_WAVE = 0x00002122, - SOUND_BOWSER_STAR_ROD_GATHER = 0x00002123, - SOUND_BOWSER_STAR_ROD_SHOCKWAVE = 0x00002124, - SOUND_BOWSER_STAR_ROD_ENCHANT = 0x00002125, - SOUND_BOWSER_CAST_RECOVER = 0x00002126, - SOUND_BOWSER_LIGHTNING = 0x00002127, - SOUND_BOWSER_POWER_DOWN = 0x00002128, - SOUND_BOWSER_COLLAPSE = 0x00002129, - SOUND_OBK_CHANDELIER_RELEASE = 0x0000212A, - SOUND_OBK_CHANDELIER_STOP = 0x0000212B, - SOUND_OBK_CHANDELIER_RETRACT = 0x0000212C, - SOUND_RELEASE_ENERGY = 0x0000212D, - SOUND_GATHER_ENERGY = 0x0000212E, + SOUND_GOOMBARIO_GATHERING = SOUND_ID_UNK | 0x00000003, + SOUND_PARAKARRY_PREDIVE = SOUND_ID_UNK | 0x00000004, + SOUND_PARAKARRY_DIVE = SOUND_ID_UNK | 0x00000005, + SOUND_PARAKARRY_SHELL_SHOT = SOUND_ID_UNK | 0x00000006, + SOUND_PARAKARRY_FLAP = SOUND_ID_UNK | 0x00000009, + SOUND_PARAKARRY_AIR_RAID_1 = SOUND_ID_UNK | 0x0000000A, // #whoosh + SOUND_PARAKARRY_AIR_RAID_2 = SOUND_ID_UNK | 0x0000000B, // #whoosh #echoing + SOUND_KOOPER_SHELL_SPINUP = SOUND_ID_UNK | 0x0000000C, + SOUND_GOOMBARIO_JUMP = SOUND_ID_UNK | 0x0000000D, + SOUND_BOW_VANISH = SOUND_ID_UNK | 0x0000000E, + SOUND_BOW_APPEAR = SOUND_ID_UNK | 0x0000000F, + SOUND_EGG_MISSILE_BLAST = SOUND_ID_UNK | 0x00000010, + SOUND_WATT_REPEL_DARKNESS = SOUND_ID_UNK | 0x00000011, + SOUND_WATT_RESUME_DARKNESS = SOUND_ID_UNK | 0x00000012, + SOUND_SUSHIE_EMBARK = SOUND_ID_UNK | 0x00000013, + SOUND_SUSHIE_RIDE_IDLE = SOUND_ID_UNK | 0x00000014, + SOUND_SUSHIE_RIDE_MOVING = SOUND_ID_UNK | 0x00000015, + SOUND_BOMBETTE_BLAST_LV1 = SOUND_ID_UNK | 0x00000016, + SOUND_BOMBETTE_BLAST_LV2 = SOUND_ID_UNK | 0x00000017, + SOUND_BOMBETTE_BLAST_LV3 = SOUND_ID_UNK | 0x00000018, + SOUND_BOW_SMACK = SOUND_ID_UNK | 0x00000019, + SOUND_BOW_FAN_SMACK = SOUND_ID_UNK | 0x0000001A, + SOUND_LAKILESTER_THROW_SPINY_A = SOUND_ID_UNK | 0x0000001B, + SOUND_LAKILESTER_THROW_SPINY_B = SOUND_ID_UNK | 0x0000001C, + SOUND_LAKILESTER_MAKE_CLOUD_NINE = SOUND_ID_UNK | 0x0000001D, + SOUND_LAKILESTER_HURRICANE_INHALE = SOUND_ID_UNK | 0x0000001E, + SOUND_LAKILESTER_HURRICANE_EXHALE = SOUND_ID_UNK | 0x0000001F, + SOUND_BOMBETTE_BODY_SLAM = SOUND_ID_UNK | 0x00000020, + SOUND_SHELL_SPIN = SOUND_ID_UNK | 0x00000021, + SOUND_FAN_SMACK_HIT = SOUND_ID_UNK | 0x00000022, // #windy + SOUND_FAN_SMACK_END = SOUND_ID_UNK | 0x00000023, // #windy + SOUND_WATT_MEGA_CHARGE_WAVE = SOUND_ID_UNK | 0x00000024, + SOUND_DIZZY_SHELL = SOUND_ID_UNK | 0x00000026, + SOUND_SHUFFLE_CARD_A = SOUND_ID_UNK | 0x0000002A, + SOUND_SHUFFLE_CARD_B = SOUND_ID_UNK | 0x0000002B, + SOUND_FIRE_FLOWER_A = SOUND_ID_UNK | 0x0000002C, + SOUND_FIRE_FLOWER_B = SOUND_ID_UNK | 0x0000002D, + SOUND_SNOWMAN_DOLL_JUMP = SOUND_ID_UNK | 0x0000002E, + SOUND_NOISE_RUSH = SOUND_ID_UNK | 0x0000002F, // unused + SOUND_POW_BLOCK = SOUND_ID_UNK | 0x00000030, + SOUND_INFLICT_SLEEP = SOUND_ID_UNK | 0x00000031, + SOUND_INFLICT_STATUS = SOUND_ID_UNK | 0x00000032, + SOUND_DIZZY_DIAL = SOUND_ID_UNK | 0x00000033, + SOUND_SUSHIE_BELLY_FLOP = SOUND_ID_UNK | 0x00000034, + SOUND_CREATE_WATER_BLOCK = SOUND_ID_UNK | 0x00000035, + SOUND_WHALE_OPEN_MOUTH = SOUND_ID_UNK | 0x00000036, + SOUND_WHALE_CLOSE_MOUTH = SOUND_ID_UNK | 0x00000037, + SOUND_TUBBA_SNORE_INHALE = SOUND_ID_UNK | 0x00000038, + SOUND_TUBBA_SNORE_EXHALE = SOUND_ID_UNK | 0x00000039, + SOUND_KPA_BRIDGE_COLLAPSE_A = SOUND_ID_UNK | 0x0000003A, + SOUND_KPA_BRIDGE_COLLAPSE_B = SOUND_ID_UNK | 0x0000003B, + SOUND_KPA_ARENA_EXPLODING = SOUND_ID_UNK | 0x0000003C, + SOUND_OBK_STAIRS_DROP = SOUND_ID_UNK | 0x0000003D, + SOUND_SHY_GUY_OUCH = SOUND_ID_UNK | 0x0000003E, + SOUND_SHY_GUY_RUN_AWAY = SOUND_ID_UNK | 0x0000003F, + SOUND_KPA_FLIP_BRIDGE_PANEL = SOUND_ID_UNK | 0x00000040, + SOUND_STAR_SPIRIT_APPEAR_A = SOUND_ID_UNK | 0x00000041, + SOUND_STAR_SPIRIT_APPEAR_B = SOUND_ID_UNK | 0x00000042, + SOUND_STAR_SPIRIT_CAST_A = SOUND_ID_UNK | 0x00000043, + SOUND_STAR_SPIRIT_CAST_B = SOUND_ID_UNK | 0x00000044, + SOUND_STAR_SPIRIT_DEPART_1 = SOUND_ID_UNK | 0x00000045, + SOUND_STAR_SPIRIT_DEPART_2 = SOUND_ID_UNK | 0x00000046, + SOUND_STAR_SPIRIT_DEPART_3 = SOUND_ID_UNK | 0x00000047, + SOUND_DARK_TOAD_DISPEL = SOUND_ID_UNK | 0x00000049, + SOUND_OPEN_MAGIC_CHEST = SOUND_ID_UNK | 0x0000004A, + SOUND_CLOSE_MAGIC_CHEST = SOUND_ID_UNK | 0x0000004B, + SOUND_QUICK_HINGE = SOUND_ID_UNK | 0x0000004C, // unused + SOUND_FLO_MOVE_PILLAR = SOUND_ID_UNK | 0x0000004D, + SOUND_WISH_ASCENDING = SOUND_ID_UNK | 0x00000051, + SOUND_UP_AND_AWAY_SEND_AWAY = SOUND_ID_UNK | 0x00000052, + SOUND_STAR_POWER_RECOVERY = SOUND_ID_UNK | 0x00000053, + SOUND_START_RECOVERY = SOUND_ID_UNK | 0x00000055, + SOUND_RECOVER = SOUND_ID_UNK | 0x00000056, + SOUND_FLOWERS_LIGHT_GIGGLE = SOUND_ID_UNK | 0x00000059, + SOUND_FLOWERS_SAD_GIGGLE = SOUND_ID_UNK | 0x0000005A, + SOUND_FLOWERS_LAUGH = SOUND_ID_UNK | 0x0000005B, + SOUND_FLOWERS_WITHER = SOUND_ID_UNK | 0x0000005C, + SOUND_FLOWERS_GROW = SOUND_ID_UNK | 0x0000005D, + SOUND_ROCK_LAUGHTER = SOUND_ID_UNK | 0x0000005E, + SOUND_TREE_LAUGHTER = SOUND_ID_UNK | 0x0000005F, + SOUND_IMPISH_LAUGH = SOUND_ID_UNK | 0x00000060, + SOUND_CHAIN_CHOMP_BITE = SOUND_ID_UNK | 0x00000061, + SOUND_CHAIN_CHOMP_THUD = SOUND_ID_UNK | 0x00000062, + SOUND_CHAIN_RATTLE = SOUND_ID_UNK | 0x00000063, + SOUND_SHY_STACK_SQUISH = SOUND_ID_UNK | 0x00000064, + SOUND_STILT_GUY_UNFOLD = SOUND_ID_UNK | 0x00000065, + SOUND_STILT_GUY_STEP = SOUND_ID_UNK | 0x00000066, + SOUND_STILTS_FALL = SOUND_ID_UNK | 0x00000067, // #woody + SOUND_TANK_BULB_FIRE = SOUND_ID_UNK | 0x00000069, // #electric + SOUND_TOY_TANK_OPEN_HATCH = SOUND_ID_UNK | 0x0000006A, + SOUND_TOY_TANK_CLOSE_HATCH = SOUND_ID_UNK | 0x0000006B, + SOUND_WOODEN_BLOCK = SOUND_ID_UNK | 0x0000006C, // #unused + SOUND_RECOVER_HEART = SOUND_ID_UNK | 0x0000006D, // #magic + SOUND_FUZZY_RUMBLE = SOUND_ID_UNK | 0x0000006E, + SOUND_FUZZY_SHAKE = SOUND_ID_UNK | 0x0000006F, + SOUND_FUZZY_DIVIDE = SOUND_ID_UNK | 0x00000070, + SOUND_UP_AND_AWAY_CAPTURE = SOUND_ID_UNK | 0x00000071, + SOUND_YOSHI = SOUND_ID_UNK | 0x00000072, + SOUND_HIT_WHACKA = SOUND_ID_UNK | 0x00000073, + SOUND_MAGIC_ASCENDING = SOUND_ID_UNK | 0x00000074, // #magic #ascending + SOUND_MAGIC_DESCENDING = SOUND_ID_UNK | 0x00000075, // #magic #descending + SOUND_BOMB_BLAST = SOUND_ID_UNK | 0x00000076, + SOUND_BULLET_BILL_EXPLODE_A = SOUND_ID_UNK | 0x00000078, + SOUND_BULLET_BILL_EXPLODE_B = SOUND_ID_UNK | 0x00000079, + SOUND_KAMMY_SUMMON_MAGIC = SOUND_ID_UNK | 0x0000007A, + SOUND_KAMMY_SUMMON_BLOCK = SOUND_ID_UNK | 0x0000007B, + SOUND_KAMMY_RAISE_OBJECT = SOUND_ID_UNK | 0x0000007C, + SOUND_KAMMY_LOWER_OBJECT = SOUND_ID_UNK | 0x0000007D, + SOUND_TWINK_ATTACK = SOUND_ID_UNK | 0x0000007E, + SOUND_TWINK_FLY_A = SOUND_ID_UNK | 0x0000007F, + SOUND_QUICK_PLAYER_JUMP = SOUND_ID_UNK | 0x00000081, + SOUND_JUMP_8BIT_MARIO = SOUND_ID_UNK | 0x00000082, + SOUND_STAR_BOX_LAUNCHER = SOUND_ID_UNK | 0x00000085, + SOUND_SPRING = SOUND_ID_UNK | 0x00000086, + SOUND_ZIPLINE_FINISH = SOUND_ID_UNK | 0x00000087, + SOUND_PUSH_BLOCK = SOUND_ID_UNK | 0x00000088, + SOUND_PULL_VINE = SOUND_ID_UNK | 0x00000089, + SOUND_FLOOR_SWITCH_DEPRESS = SOUND_ID_UNK | 0x0000008A, + SOUND_FLOOR_SWITCH_ACTIVATE = SOUND_ID_UNK | 0x0000008B, + SOUND_NO_DAMGE = SOUND_ID_UNK | 0x0000008C, + SOUND_USE_ITEM = SOUND_ID_UNK | 0x0000008D, + SOUND_GROW = SOUND_ID_UNK | 0x0000008E, + SOUND_CHARGE_UP = SOUND_ID_UNK | 0x0000008F, + SOUND_OPEN_TRAPDOOR = SOUND_ID_UNK | 0x00000091, + SOUND_BREAK_FLOOR = SOUND_ID_UNK | 0x00000092, + SOUND_SPIKES_EXTEND = SOUND_ID_UNK | 0x00000093, + SOUND_JUMP_SCARE = SOUND_ID_UNK | 0x00000094, + SOUND_EAT_OR_DRINK = SOUND_ID_UNK | 0x00000095, + SOUND_SPIT_OUT = SOUND_ID_UNK | 0x00000096, + SOUND_GLASS_SHATTER = SOUND_ID_UNK | 0x00000097, + SOUND_VANISH_IN_SMOKE = SOUND_ID_UNK | 0x00000098, + SOUND_HEART_PLANT = SOUND_ID_UNK | 0x00000099, + SOUND_HURT_PLANT_SHRIEK = SOUND_ID_UNK | 0x0000009A, + SOUND_MUNCHLESIA_SUCTION = SOUND_ID_UNK | 0x0000009B, + SOUND_JAN_LOG_LAND = SOUND_ID_UNK | 0x0000009D, + SOUND_JAN_LOG_SPLIT = SOUND_ID_UNK | 0x0000009E, + SOUND_SEPARATE_BUSHES = SOUND_ID_UNK | 0x0000009F, + SOUND_LARGE_NPC_IMPACT = SOUND_ID_UNK | 0x000000A0, + SOUND_STARSHIP_BOOST = SOUND_ID_UNK | 0x000000A1, + SOUND_IWA_SLIDE_GATE = SOUND_ID_UNK | 0x000000A2, + SOUND_CREAKY_WINDOW_OPEN = SOUND_ID_UNK | 0x000000A3, + SOUND_CREAKY_WINDOW_CLOSE = SOUND_ID_UNK | 0x000000A4, + SOUND_TRAIN_DOOR_OPEN = SOUND_ID_UNK | 0x000000A5, + SOUND_TRAIN_DOOR_CLOSE = SOUND_ID_UNK | 0x000000A6, + SOUND_TURN_MECHANISM = SOUND_ID_UNK | 0x000000A7, + SOUND_CAPSULE_OPEN = SOUND_ID_UNK | 0x000000A8, + SOUND_FLIP_PANEL = SOUND_ID_UNK | 0x000000AB, + SOUND_CLOSE_PANEL = SOUND_ID_UNK | 0x000000AC, + SOUND_WATER_SPLASH = SOUND_ID_UNK | 0x000000AD, + SOUND_BREAK_CRATE = SOUND_ID_UNK | 0x000000AE, // #boing + SOUND_HOLLOW_RISING = SOUND_ID_UNK | 0x000000AF, // #unused + SOUND_HOLLOW_FALLING = SOUND_ID_UNK | 0x000000B0, // #unused + SOUND_PIRANHA_SPIN_1 = SOUND_ID_UNK | 0x000000B1, + SOUND_PIRANHA_SPIN_2 = SOUND_ID_UNK | 0x000000B2, + SOUND_PIRANHA_TENSE = SOUND_ID_UNK | 0x000000B3, + SOUND_HEAVY_NPC_STEP_B = SOUND_ID_UNK | 0x000000B4, + SOUND_HUFF_N_PUFF_JIGGLE = SOUND_ID_UNK | 0x000000B6, + SOUND_HUFF_N_PUFF_WOBBLE = SOUND_ID_UNK | 0x000000B7, + SOUND_GHOST_TRANSFORM = SOUND_ID_UNK | 0x000000B8, + SOUND_JR_TROOPA_TRANSFORM = SOUND_ID_UNK | 0x000000B9, + SOUND_ACTOR_STEP_A = SOUND_ID_UNK | 0x000000BA, + SOUND_MASTER_FLUTTER = SOUND_ID_UNK | 0x000000BB, + SOUND_MASTER_KICK = SOUND_ID_UNK | 0x000000BC, + SOUND_MASTER_STANCE_CHANGE = SOUND_ID_UNK | 0x000000BD, + SOUND_MASTER_FLIP = SOUND_ID_UNK | 0x000000BE, + SOUND_LAVA_BUD_RECOVER = SOUND_ID_UNK | 0x000000BF, + SOUND_SMALL_NPC_STEP = SOUND_ID_UNK | 0x000000C1, + SOUND_BANDIT_STEAL = SOUND_ID_UNK | 0x000000C2, + SOUND_DISAPPOINTED = SOUND_ID_UNK | 0x000000C3, + SOUND_CLUBBA_STEP = SOUND_ID_UNK | 0x000000C4, + SOUND_CLUBBA_SWING = SOUND_ID_UNK | 0x000000C5, + SOUND_MBUSH_STEP = SOUND_ID_UNK | 0x000000C6, + SOUND_TUBBA_HEART_JUMP = SOUND_ID_UNK | 0x000000C8, + SOUND_MBUSH_LEAP = SOUND_ID_UNK | 0x000000C9, + SOUND_BZZAP_STING = SOUND_ID_UNK | 0x000000CA, + SOUND_MINI_BZZAP_STING = SOUND_ID_UNK | 0x000000CB, + SOUND_BZZAP_CALL_SWARM = SOUND_ID_UNK | 0x000000CC, + SOUND_BONY_BEETLE_STEP = SOUND_ID_UNK | 0x000000CD, + SOUND_BONY_BEETLE_EXTEND_SPIKES = SOUND_ID_UNK | 0x000000CE, + SOUND_BONY_BEETLE_RETRACT_SPIKES = SOUND_ID_UNK | 0x000000CF, + SOUND_CLEFT_STEP = SOUND_ID_UNK | 0x000000D0, + SOUND_CLEFT_TACKLE = SOUND_ID_UNK | 0x000000D1, + SOUND_LAKITU_THROW_SPINY = SOUND_ID_UNK | 0x000000D2, + SOUND_SHELL_TOSS = SOUND_ID_UNK | 0x000000D3, + SOUND_SPELL_CAST1 = SOUND_ID_UNK | 0x000000D4, + SOUND_SPELL_CAST2 = SOUND_ID_UNK | 0x000000D5, + SOUND_SPELL_CAST3 = SOUND_ID_UNK | 0x000000D6, + SOUND_SPELL_CAST4 = SOUND_ID_UNK | 0x000000D7, + SOUND_SPELL_CAST5 = SOUND_ID_UNK | 0x000000D8, // unused + SOUND_FUZZIPEDE_MOTION = SOUND_ID_UNK | 0x000000D9, + SOUND_FUZZIPEDE_LEAP = SOUND_ID_UNK | 0x000000DA, // #boing #spring #bounce + SOUND_FUZZIPEDE_STRIKE = SOUND_ID_UNK | 0x000000DB, // #boing #spring + SOUND_COMMAND_LOSS = SOUND_ID_UNK | 0x000000DC, + SOUND_GOOMBA_STEP = SOUND_ID_UNK | 0x000000DD, + SOUND_PIRANHA_BITE = SOUND_ID_UNK | 0x000000DE, + SOUND_PARAGOOMBA_FLY = SOUND_ID_UNK | 0x000000DF, + SOUND_PARAGOOMBA_PREDIVE = SOUND_ID_UNK | 0x000000E0, + SOUND_TUTANKOOPA_MAGIC = SOUND_ID_UNK | 0x000000E1, + SOUND_JR_TOOPA_JUMP = SOUND_ID_UNK | 0x000000E2, + SOUND_ACTOR_WITHER = SOUND_ID_UNK | 0x000000E3, + SOUND_ACTOR_COLLAPSE = SOUND_ID_UNK | 0x000000E4, + SOUND_KNOCKOUT_CHIRPING = SOUND_ID_UNK | 0x000000E5, // #bird #chirping + SOUND_TUTANKOOPA_LEVITATE = SOUND_ID_UNK | 0x000000E6, + SOUND_SPOOKY_LEVITATE = SOUND_ID_UNK | 0x000000E7, + SOUND_ILLUSION_DISSOLVE = SOUND_ID_UNK | 0x000000E8, + SOUND_HEAVY_NPC_FALLING = SOUND_ID_UNK | 0x000000E9, // #falling + SOUND_HEAVY_NPC_LANDING = SOUND_ID_UNK | 0x000000EA, // #echoing #thud #impact + SOUND_TUTANKOOPA_DEBRIS_FALL = SOUND_ID_UNK | 0x000000EB, // #falling + SOUND_HEAVY_NPC_STEP_A = SOUND_ID_UNK | 0x000000EC, + SOUND_GOOMBA_KING_SPIN = SOUND_ID_UNK | 0x000000ED, + SOUND_GULPIT_LICK = SOUND_ID_UNK | 0x000000EE, + SOUND_BUZZAR_FLAP = SOUND_ID_UNK | 0x000000EF, + SOUND_BUZZAR_WHIRLWIND = SOUND_ID_UNK | 0x000000F0, // #windy + SOUND_BUZZAR_WINDUP = SOUND_ID_UNK | 0x000000F1, + SOUND_BUZZAR_DIVE = SOUND_ID_UNK | 0x000000F2, + SOUND_SMALL_LENS_FLARE = SOUND_ID_UNK | 0x000000F3, + SOUND_BUZZAR_THROW = SOUND_ID_UNK | 0x000000F4, + SOUND_BUZZAR_GRAB = SOUND_ID_UNK | 0x000000F5, + SOUND_HEAVY_NPC_STEP_C = SOUND_ID_UNK | 0x000000F6, + SOUND_TUBBAS_HEART_CHARGE = SOUND_ID_UNK | 0x000000F7, + SOUND_TUBBAS_HEART_SWARM_ATTACK = SOUND_ID_UNK | 0x000000F9, + SOUND_TUBBAS_HEART_SWARM_DISPERSE = SOUND_ID_UNK | 0x000000FB, + SOUND_TUBBAS_HEART_SWARM_VANISH = SOUND_ID_UNK | 0x000000FC, + SOUND_FAKE_BOWSER_SWING = SOUND_ID_UNK | 0x000000FD, + SOUND_FAKE_BOWSER_STRIKE = SOUND_ID_UNK | 0x000000FE, + SOUND_FILE_MENU_MOVE_CURSOR = SOUND_ID_UNK | 0x00000101, + SOUND_CREATE_FILE_MOVE_CURSOR = SOUND_ID_UNK | 0x00000102, + SOUND_CREATE_FILE_SET_CHARACTER = SOUND_ID_UNK | 0x00000103, + SOUND_CREATE_FILE_BACKSPACE = SOUND_ID_UNK | 0x00000104, + SOUND_CREATE_FILE_CHANGE_CHARSET = SOUND_ID_UNK | 0x00000105, + SOUND_INFLICT_CHILL_OUT = SOUND_ID_UNK | 0x00000106, + SOUND_INFLICT_KO = SOUND_ID_UNK | 0x00000107, + SOUND_SPAWN_BLOCK = SOUND_ID_UNK | 0x00000108, + SOUND_D_DOWN_HIT_1 = SOUND_ID_UNK | 0x0000010A, + SOUND_D_DOWN_HIT_2 = SOUND_ID_UNK | 0x0000010B, + SOUND_D_DOWN_HIT_3 = SOUND_ID_UNK | 0x0000010C, + SOUND_SPIN = SOUND_ID_UNK | 0x00000111, + SOUND_SPEEDY_SPIN = SOUND_ID_UNK | 0x00000112, + SOUND_SPIN_ATTACK = SOUND_ID_UNK | 0x00000113, + SOUND_SPEEDY_SPIN_ATTACK = SOUND_ID_UNK | 0x00000114, + SOUND_HAMMER_SWING_1 = SOUND_ID_UNK | 0x00000115, + SOUND_HAMMER_SWING_2 = SOUND_ID_UNK | 0x00000116, + SOUND_HAMMER_SWING_3 = SOUND_ID_UNK | 0x00000117, + SOUND_HAMMER_STRIKE_1 = SOUND_ID_UNK | 0x00000118, + SOUND_HAMMER_STRIKE_2 = SOUND_ID_UNK | 0x00000119, + SOUND_HAMMER_STRIKE_3 = SOUND_ID_UNK | 0x0000011A, + SOUND_HAMMER_QUAKE_1 = SOUND_ID_UNK | 0x0000011B, + SOUND_HAMMER_QUAKE_2 = SOUND_ID_UNK | 0x0000011C, + SOUND_HAMMER_QUAKE_3 = SOUND_ID_UNK | 0x0000011D, + SOUND_SPIN_SMASH_1 = SOUND_ID_UNK | 0x0000011E, + SOUND_SPIN_SMASH_2 = SOUND_ID_UNK | 0x0000011F, + SOUND_SPIN_SMASH_3 = SOUND_ID_UNK | 0x00000120, + SOUND_BOWSER_STAR_ROD_USE = SOUND_ID_UNK | 0x00000121, + SOUND_BOWSER_STAR_ROD_DRAIN_WAVE = SOUND_ID_UNK | 0x00000122, + SOUND_BOWSER_STAR_ROD_GATHER = SOUND_ID_UNK | 0x00000123, + SOUND_BOWSER_STAR_ROD_SHOCKWAVE = SOUND_ID_UNK | 0x00000124, + SOUND_BOWSER_STAR_ROD_ENCHANT = SOUND_ID_UNK | 0x00000125, + SOUND_BOWSER_CAST_RECOVER = SOUND_ID_UNK | 0x00000126, + SOUND_BOWSER_LIGHTNING = SOUND_ID_UNK | 0x00000127, + SOUND_BOWSER_POWER_DOWN = SOUND_ID_UNK | 0x00000128, + SOUND_BOWSER_COLLAPSE = SOUND_ID_UNK | 0x00000129, + SOUND_OBK_CHANDELIER_RELEASE = SOUND_ID_UNK | 0x0000012A, + SOUND_OBK_CHANDELIER_STOP = SOUND_ID_UNK | 0x0000012B, + SOUND_OBK_CHANDELIER_RETRACT = SOUND_ID_UNK | 0x0000012C, + SOUND_RELEASE_ENERGY = SOUND_ID_UNK | 0x0000012D, + SOUND_GATHER_ENERGY = SOUND_ID_UNK | 0x0000012E, // looping sounds SOUND_LOOP_BOMBETTE_FUSE = 0x80000000, SOUND_LOOP_BOBOMB_FUSE = 0x80000001, @@ -1726,23 +1747,6 @@ enum SoundSpatializationFlags { SOUND_PARAM_QUIET = 0x00400000, }; -enum SoundType { - SOUND_TYPE_SPECIAL = 0x80000000, - SOUND_TYPE_LOOPING = 0, // 0x80000000 (with SOUND_TYPE_SPECIAL) - SOUND_TYPE_EXIT_DOOR = 1, // 0x90000000 (with SOUND_TYPE_SPECIAL) - SOUND_TYPE_ROOM_DOOR = 2, // 0xA0000000 (with SOUND_TYPE_SPECIAL) - SOUND_TYPE_ALTERNATING = 3, // 0xB0000000 (with SOUND_TYPE_SPECIAL) -}; - -enum SoundIDBits { - SOUND_ID_STOP = 0x00008000, - SOUND_ID_LOWER = 0x000023FF, - SOUND_ID_ADJUST = 0x00001000, - SOUND_ID_TRIGGER_MASK = 0x00000C00, - SOUND_ID_TRIGGER_CHANGE_SOUND = 0x00000400, - SOUND_ID_TRIGGER_CHANGE_VOLUME = 0x00000800, -}; - enum SoundTriggers { SOUND_TRIGGER_CHANGE_SOUND = 1, SOUND_TRIGGER_CHANGE_VOLUME = 2, @@ -2582,7 +2586,7 @@ enum EntityTypes { ENTITY_TYPE_SIMPLE_SPRING = 0x2E, ENTITY_TYPE_SCRIPT_SPRING = 0x2F, ENTITY_TYPE_HIDDEN_PANEL = 0x30, - ENTITY_TYPE_STAR_BOX_LAUCHER = 0x31, + ENTITY_TYPE_STAR_BOX_LAUNCHER = 0x31, ENTITY_TYPE_CHEST = 0x32, ENTITY_TYPE_SIGNPOST = 0x33, ENTITY_TYPE_RED_ARROW_SIGNS = 0x34, @@ -3249,60 +3253,58 @@ enum RenderModeIndex { RENDER_MODE_IDX_3A = 0x3A, RENDER_MODE_IDX_3B = 0x3B, RENDER_MODE_IDX_3C = 0x3C, - RENDER_MODE_IDX_3D = 0x3D, }; /// not really enum RenderMode { RENDER_MODE_SURF_SOLID_AA_ZB_LAYER0 = 0x00000000, RENDER_MODE_SURFACE_OPA = 0x00000001, - RENDER_MODE_2 = 0x00000002, + RENDER_MODE_02_UNUSED = 0x00000002, RENDER_MODE_SURFACE_OPA_NO_AA = 0x00000003, RENDER_MODE_SURFACE_OPA_NO_ZB = 0x00000004, RENDER_MODE_DECAL_OPA = 0x00000005, - RENDER_MODE_6 = 0x00000006, + RENDER_MODE_06_UNUSED = 0x00000006, RENDER_MODE_DECAL_OPA_NO_AA = 0x00000007, - RENDER_MODE_8 = 0x00000008, + RENDER_MODE_08_UNUSED = 0x00000008, RENDER_MODE_INTERSECTING_OPA = 0x00000009, - RENDER_MODE_A = 0x0000000A, - RENDER_MODE_B = 0x0000000B, - RENDER_MODE_C = 0x0000000C, + RENDER_MODE_0A_UNUSED = 0x0000000A, + RENDER_MODE_0B_UNUSED = 0x0000000B, + RENDER_MODE_0C_UNUSED = 0x0000000C, RENDER_MODE_ALPHATEST = 0x0000000D, - RENDER_MODE_E = 0x0000000E, + RENDER_MODE_0E_UNUSED = 0x0000000E, RENDER_MODE_ALPHATEST_ONESIDED = 0x0000000F, RENDER_MODE_ALPHATEST_NO_ZB = 0x00000010, RENDER_MODE_SURFACE_XLU_LAYER1 = 0x00000011, - RENDER_MODE_12 = 0x00000012, + RENDER_MODE_12_UNUSED = 0x00000012, RENDER_MODE_SURFACE_XLU_NO_AA = 0x00000013, RENDER_MODE_SURFACE_XLU_NO_ZB = 0x00000014, - RENDER_MODE_SURFXLU_ZB_ZUPD = 0x00000015, + RENDER_MODE_SURFACE_XLU_ZB_ZUPD = 0x00000015, RENDER_MODE_SURFACE_XLU_LAYER2 = 0x00000016, - RENDER_MODE_17 = 0x00000017, - RENDER_MODE_18 = 0x00000018, - RENDER_MODE_19 = 0x00000019, + RENDER_MODE_17_UNUSED = 0x00000017, + RENDER_MODE_18_UNUSED = 0x00000018, + RENDER_MODE_19_UNUSED = 0x00000019, RENDER_MODE_DECAL_XLU = 0x0000001A, - RENDER_MODE_1B = 0x0000001B, - RENDER_MODE_DECAL_XLU_NOAA = 0x0000001C, - RENDER_MODE_1D = 0x0000001D, - RENDER_MODE_1E = 0x0000001E, - RENDER_MODE_1F = 0x0000001F, + RENDER_MODE_1B_UNUSED = 0x0000001B, + RENDER_MODE_DECAL_XLU_NO_AA = 0x0000001C, + RENDER_MODE_1D_UNUSED = 0x0000001D, + RENDER_MODE_DECAL_XLU_AHEAD = 0x0000001E, // special case RENDER_MODE_DECAL_XLU for rendering in front of others + RENDER_MODE_1F_UNUSED = 0x0000001F, RENDER_MODE_SHADOW = 0x00000020, - RENDER_MODE_21 = 0x00000021, + RENDER_MODE_21_UNUSED = 0x00000021, RENDER_MODE_SURFACE_XLU_LAYER3 = 0x00000022, - RENDER_MODE_23 = 0x00000023, - RENDER_MODE_24 = 0x00000024, - RENDER_MODE_25 = 0x00000025, + RENDER_MODE_23_UNUSED = 0x00000023, + RENDER_MODE_24_UNUSED = 0x00000024, + RENDER_MODE_25_UNUSED = 0x00000025, RENDER_MODE_INTERSECTING_XLU = 0x00000026, - RENDER_MODE_27 = 0x00000027, - RENDER_MODE_28 = 0x00000028, - RENDER_MODE_SURFXLU_AA_ZB_ZUPD = 0x00000029, - RENDER_MODE_2A = 0x0000002A, - RENDER_MODE_2B = 0x0000002B, - RENDER_MODE_2C = 0x0000002C, - RENDER_MODE_2D = 0x0000002D, + RENDER_MODE_27_UNUSED = 0x00000027, + RENDER_MODE_PASS_THROUGH = 0x00000028, // no render mode is set, only geometry modes are initialized + RENDER_MODE_SURFACE_XLU_AA_ZB_ZUPD = 0x00000029, + RENDER_MODE_SURFACE_OPA_NO_ZB_BEHIND = 0x0000002A, + RENDER_MODE_ALPHATEST_NO_ZB_BEHIND = 0x0000002B, + RENDER_MODE_SURFACE_XLU_NO_ZB_BEHIND = 0x0000002C, + RENDER_MODE_CLOUD_NO_ZCMP = 0x0000002D, RENDER_MODE_CLOUD = 0x0000002E, RENDER_MODE_CLOUD_NO_ZB = 0x0000002F, - RENDER_MODE_COUNT = 0x00000030, }; enum RenderTaskFlags { diff --git a/include/macros.h b/include/macros.h index a6a5c41751..b2e2701528 100644 --- a/include/macros.h +++ b/include/macros.h @@ -276,6 +276,8 @@ #define PACK_PAL_RGBA(r, g, b, a) (((r) << 11) | ((g) << 6) | ((b) << 1) | (a)); +#define PM_RM_TILEMODE_B GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA) + #define PM_CC_01 0, 0, 0, TEXEL0, PRIMITIVE, 0, TEXEL0, 0 #define PM_CC_02 0, 0, 0, TEXEL0, TEXEL0, 0, PRIMITIVE, 0 #define PM_CC_03 TEXEL0, 0, SHADE, 0, PRIMITIVE, 0, SHADE, 0 @@ -302,6 +304,12 @@ #define PM_CC_16 COMBINED, 0, PRIMITIVE, 0, 0, 0, 0, COMBINED #define PM_CC_17 COMBINED, 0, PRIMITIVE, ENVIRONMENT, 0, 0, 0, COMBINED +#define PM_CC_18 COMBINED, 0, SHADE, 0, 0, 0, 0, COMBINED +#define PM_CC_19 COMBINED, 0, SHADE, PRIMITIVE, 0, 0, 0, COMBINED +#define PM_CC_1A COMBINED, 0, PRIMITIVE, ENVIRONMENT, 0, 0, 0, COMBINED + +#define PM_CC_ALT_TRILERP TEXEL1, TEXEL0, LOD_FRACTION, TEXEL0, TEXEL1, TEXEL0, LOD_FRACTION, TEXEL0 + // custom cycle1 modes for window styles #define PM_CC_WINDOW_2 PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, 0, 0, 0, TEXEL1 #define PM_CC_WINDOW_3 PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, PRIMITIVE, 0, TEXEL1, 0 diff --git a/include/model.h b/include/model.h index 599023f561..ed0d502c5e 100644 --- a/include/model.h +++ b/include/model.h @@ -35,6 +35,19 @@ typedef struct ModelNodeProperty { /* 0x8 */ ModelNodePropertyData data; } ModelNodeProperty; // size = 0xC; +typedef struct ModelGroupData { + /* 0x00 */ Mtx* transformMatrix; + /* 0x04 */ Lightsn* lightingGroup; + /* 0x08 */ s32 numLights; + /* 0x0C */ s32 numChildren; + /* 0x10 */ struct ModelNode** childList; +} ModelGroupData; // size = 0x14 + +typedef struct ModelDisplayData { + /* 0x0 */ Gfx* displayList; + /* 0x4 */ char unk_04[0x4]; +} ModelDisplayData; // size = 0x8 + typedef struct ModelNode { /* 0x00 */ s32 type; /* 2 = model */ /* 0x04 */ ModelDisplayData* displayData; @@ -172,7 +185,7 @@ typedef struct ShapeFile { } ShapeFile; // size = variable typedef ModelTreeInfo ModelTreeInfoList[0x200]; -extern ModelTreeInfoList* mdl_currentModelTreeNodeInfo; +extern ModelTreeInfoList* gCurrentModelTreeNodeInfo; extern ModelList* gCurrentModels; void set_model_fog_color_parameters(u8 primR, u8 primG, u8 primB, u8 primA, u8 fogR, u8 fogG, u8 fogB, s32 fogStart, s32 fogEnd); diff --git a/src/animator.c b/src/animator.c index ab0f94c9a5..8b06d4df5b 100644 --- a/src/animator.c +++ b/src/animator.c @@ -29,20 +29,20 @@ SHIFT_BSS Matrix4f gAnimTranslateMtx; SHIFT_BSS Matrix4f gAnimRotScaleMtx; SHIFT_BSS StaticAnimatorNode** gAnimTreeRoot; -extern Gfx D_8014B7F8[]; -extern Gfx D_8014B820[]; -extern Gfx D_8014B848[]; -extern Gfx D_8014B870[]; -extern Gfx D_8014B898[]; -extern Gfx D_8014B8C0[]; -extern Gfx D_8014B8E8[]; -extern Gfx D_8014BE78[]; -extern Gfx D_8014BEA0[]; -extern Gfx D_8014BEC8[]; -extern Gfx D_8014BEF0[]; -extern Gfx D_8014BF18[]; -extern Gfx D_8014BF40[]; -extern Gfx D_8014BF68[]; +extern Gfx Gfx_RM1_SURFACE_OPA[]; +extern Gfx Gfx_RM1_DECAL_OPA[]; +extern Gfx Gfx_RM1_INTERSECTING_OPA[]; +extern Gfx Gfx_RM1_ALPHATEST[]; +extern Gfx Gfx_RM1_SURFACE_XLU[]; +extern Gfx Gfx_RM1_DECAL_XLU[]; +extern Gfx Gfx_RM1_INTERSECTING_XLU[]; +extern Gfx Gfx_RM3_SURFACE_OPA[]; +extern Gfx Gfx_RM3_DECAL_OPA[]; +extern Gfx Gfx_RM3_INTERSECTING_OPA[]; +extern Gfx Gfx_RM3_ALPHATEST[]; +extern Gfx Gfx_RM3_SURFACE_XLU[]; +extern Gfx Gfx_RM3_DECAL_XLU[]; +extern Gfx Gfx_RM3_INTERSECTING_XLU[]; AnimScript gAnimScriptDefault = { as_Wait(60) @@ -786,50 +786,50 @@ void appendGfx_animator(ModelAnimator* animator) { case FALSE: switch (animator->renderMode) { case RENDER_MODE_SURFACE_OPA: - gSPDisplayList(gMainGfxPos++, D_8014B7F8); + gSPDisplayList(gMainGfxPos++, Gfx_RM1_SURFACE_OPA); break; case RENDER_MODE_DECAL_OPA: - gSPDisplayList(gMainGfxPos++, D_8014B820); + gSPDisplayList(gMainGfxPos++, Gfx_RM1_DECAL_OPA); break; case RENDER_MODE_INTERSECTING_OPA: - gSPDisplayList(gMainGfxPos++, D_8014B848); + gSPDisplayList(gMainGfxPos++, Gfx_RM1_INTERSECTING_OPA); break; case RENDER_MODE_ALPHATEST: - gSPDisplayList(gMainGfxPos++, D_8014B870); + gSPDisplayList(gMainGfxPos++, Gfx_RM1_ALPHATEST); break; case RENDER_MODE_SURFACE_XLU_LAYER1: - gSPDisplayList(gMainGfxPos++, D_8014B898); + gSPDisplayList(gMainGfxPos++, Gfx_RM1_SURFACE_XLU); break; case RENDER_MODE_DECAL_XLU: - gSPDisplayList(gMainGfxPos++, D_8014B8C0); + gSPDisplayList(gMainGfxPos++, Gfx_RM1_DECAL_XLU); break; case RENDER_MODE_INTERSECTING_XLU: - gSPDisplayList(gMainGfxPos++, D_8014B8E8); + gSPDisplayList(gMainGfxPos++, Gfx_RM1_INTERSECTING_XLU); break; } break; case TRUE: switch (animator->renderMode) { case RENDER_MODE_SURFACE_OPA: - gSPDisplayList(gMainGfxPos++, D_8014BE78); + gSPDisplayList(gMainGfxPos++, Gfx_RM3_SURFACE_OPA); break; case RENDER_MODE_DECAL_OPA: - gSPDisplayList(gMainGfxPos++, D_8014BEA0); + gSPDisplayList(gMainGfxPos++, Gfx_RM3_DECAL_OPA); break; case RENDER_MODE_INTERSECTING_OPA: - gSPDisplayList(gMainGfxPos++, D_8014BEC8); + gSPDisplayList(gMainGfxPos++, Gfx_RM3_INTERSECTING_OPA); break; case RENDER_MODE_ALPHATEST: - gSPDisplayList(gMainGfxPos++, D_8014BEF0); + gSPDisplayList(gMainGfxPos++, Gfx_RM3_ALPHATEST); break; case RENDER_MODE_SURFACE_XLU_LAYER1: - gSPDisplayList(gMainGfxPos++, D_8014BF18); + gSPDisplayList(gMainGfxPos++, Gfx_RM3_SURFACE_XLU); break; case RENDER_MODE_DECAL_XLU: - gSPDisplayList(gMainGfxPos++, D_8014BF40); + gSPDisplayList(gMainGfxPos++, Gfx_RM3_DECAL_XLU); break; case RENDER_MODE_INTERSECTING_XLU: - gSPDisplayList(gMainGfxPos++, D_8014BF68); + gSPDisplayList(gMainGfxPos++, Gfx_RM3_INTERSECTING_XLU); break; } diff --git a/src/audio.h b/src/audio.h index 9f1eea5503..33d1c94a11 100644 --- a/src/audio.h +++ b/src/audio.h @@ -612,7 +612,7 @@ typedef struct SoundPlayer { /* 0x85 */ u8 triggers; /* 0x86 */ char unk_86[0x2]; /* 0x88 */ s8* loopStartPos; - /* 0x8C */ u8 loopIterCount; + /* 0x8C */ u8 loopIterCount; // loopIterCount = 0 for infinite loop /* 0x8D */ char unk_8D; /* 0x8E */ u16 delay; /* 0x90 */ u16 playLength; @@ -783,28 +783,25 @@ typedef struct BGMInstrumentInfo { /* 0x07 */ char pad_7[1]; } BGMInstrumentInfo; // size = 0x8 +typedef struct AUFileMetadata { + /* 0x00 */ s32 signature; // file type identifer: 'SBN ', 'SEF ', etc + /* 0x04 */ s32 size; // full file size, including header and data +} AUFileMetadata; + typedef struct SBNHeader { - /* 0x00 */ s32 signature; // 'SBN ' - /* 0x04 */ s32 size; - /* 0x08 */ s32 unk_08; - /* 0x0C */ s32 unk_0C; - /* 0x10 */ s32 tableOffset; // = 0x40 - /* 0x14 */ s32 numEntries; - /* 0x18 */ s32 unk_18; - /* 0x1C */ s32 unk_1C; - /* 0x20 */ s32 unk_20; + /* 0x00 */ AUFileMetadata mdata; // uses identifer 'SBN ' + /* 0x08 */ char unused_08[8]; + /* 0x10 */ s32 tableOffset; // offset in the SBN file of the file table (== sizeof(SBNHeader)) + /* 0x14 */ s32 numEntries; // number of entries in the SBN file table + /* 0x18 */ s32 fileSize; // full size of the SBN file (unread) + /* 0x1C */ s32 versionOffset; + /* 0x20 */ char unused_04[4]; /* 0x24 */ s32 INIToffset; - /* 0x28 */ s32 unk_28; - /* 0x2C */ s32 unk_2C; - /* 0x30 */ s32 unk_30; - /* 0x34 */ s32 unk_34; - /* 0x38 */ s32 unk_38; - /* 0x3C */ s32 unk_3C; + /* 0x28 */ char reserved[24]; } SBNHeader; // size = 0x40 typedef struct SEFHeader { - /* 0x00 */ s32 signature; // 'SEF ' - /* 0x04 */ s32 size; + /* 0x00 */ AUFileMetadata mdata; // uses identifer 'SEF ' /* 0x08 */ s32 unk8; /* 0x0C */ s8 unkC; // 0 /* 0x0D */ s8 unkD; // 0 @@ -815,8 +812,7 @@ typedef struct SEFHeader { } SEFHeader; // size = 0x22 typedef struct INITHeader { - /* 0x00 */ s32 signature; // 'INIT' - /* 0x04 */ s32 size; + /* 0x00 */ AUFileMetadata mdata; // uses identifer 'INIT' /* 0x08 */ u16 entriesOffset; /* 0x0A */ u16 entriesSize; /* 0x0C */ u16 tblOffset; @@ -827,8 +823,7 @@ typedef struct INITHeader { } INITHeader; // size = 0x20 typedef struct PERHeader { - /* 0x00 */ s32 signature; // 'PER ' or 'PRG ' - /* 0x04 */ s32 size; // including this header + /* 0x00 */ AUFileMetadata mdata; // uses identifer 'PER ' or 'PRG ' /* 0x08 */ char unk_08[8]; } PERHeader; // size = 0x10 diff --git a/src/audio/2e230_len_2190.c b/src/audio/2e230_len_2190.c index 73c051f5c8..146c847bf9 100644 --- a/src/audio/2e230_len_2190.c +++ b/src/audio/2e230_len_2190.c @@ -798,7 +798,7 @@ void au_load_PER(AuGlobals* globals, s32 romAddr) { void* end; au_read_rom(romAddr, &header, sizeof(header)); - size = header.size - sizeof(header); + size = header.mdata.size - sizeof(header); au_read_rom(romAddr + sizeof(header), globals->dataPER, size); numItems = size / sizeof(PEREntry); numItemsLeft = 6 - numItems; @@ -819,7 +819,7 @@ void au_load_PRG(AuGlobals* arg0, s32 romAddr) { au_read_rom(romAddr, &header, sizeof(header)); dataRomAddr = romAddr + sizeof(header); - size = header.size - sizeof(header); + size = header.mdata.size - sizeof(header); if (size > 0x200) { size = 0x200; } diff --git a/src/audio/sfx_player.c b/src/audio/sfx_player.c index 324b7bc871..12b6532fb3 100644 --- a/src/audio/sfx_player.c +++ b/src/audio/sfx_player.c @@ -650,7 +650,7 @@ void au_sfx_update_main(SoundManager* manager) { } } } - sfxEntry->soundID = 0; + sfxEntry->soundID = SOUND_NONE; j++; if (j >= ARRAY_COUNT(manager->soundQueue)) { @@ -695,7 +695,7 @@ void au_sfx_load_sound(SoundManager* manager, SoundSFXEntry* entry, SoundManager s32 playerIndex; u16* cmdList; s32 trackCount; - s32 cond = FALSE; + s32 foundPlayer = FALSE; u32 exclusiveID; s32 sectionIndex; u16 soundInfo; @@ -709,9 +709,9 @@ void au_sfx_load_sound(SoundManager* manager, SoundSFXEntry* entry, SoundManager u16 soundIDLower = entry->soundID & SOUND_ID_LOWER; u16 soundID = entry->soundID; - if (soundID & 0x2000) { + if (soundID & SOUND_ID_UNK) { // sound from extra section - soundIndex = (entry->soundID - 1) & 0x1FF; + soundIndex = (entry->soundID - 1) & SOUND_ID_UNK_INDEX_MASK; if (soundIndex < 0x140) { cmdList = (u16*)&manager->extraSounds[soundIndex]; if (*cmdList != 0) { @@ -719,23 +719,23 @@ void au_sfx_load_sound(SoundManager* manager, SoundSFXEntry* entry, SoundManager for (playerIndex = 7; playerIndex >= 0; playerIndex--) { player = &manager->players[playerIndex]; if (player->curSoundID == soundIDLower) { - cond = TRUE; + foundPlayer = TRUE; break; } } - if (!cond) { + if (!foundPlayer) { //find free player for (playerIndex = 7; playerIndex >= 0; playerIndex--) { player = &manager->players[playerIndex]; if (player->sefDataReadPos == NULL) { - cond = TRUE; + foundPlayer = TRUE; break; } } } - if (cond) { + if (foundPlayer) { au_sfx_play_sound(manager, player, (s8*)cmdList, entry, 0, 0); } } @@ -756,23 +756,23 @@ void au_sfx_load_sound(SoundManager* manager, SoundSFXEntry* entry, SoundManager for (playerIndex = 7; playerIndex >= 0; playerIndex--) { player = &manager->players[playerIndex]; if (player->curSoundID == soundIDLower) { - cond = TRUE; + foundPlayer = TRUE; break; } } - if (!cond) { + if (!foundPlayer) { //find free player for (playerIndex = 7; playerIndex >= 0; playerIndex--) { player = &manager->players[playerIndex]; if (player->sefDataReadPos == NULL) { - cond = TRUE; + foundPlayer = TRUE; break; } } } - if (cond) { + if (foundPlayer) { au_sfx_play_sound(manager, player, (u8*)cmdList, entry, 0, 0); } } @@ -785,6 +785,7 @@ void au_sfx_load_sound(SoundManager* manager, SoundSFXEntry* entry, SoundManager } if (*cmdList != 0) { + // read sound info chunk soundInfo = cmdList[1]; priority = (soundInfo & 0x300) >> 8; // bits 8, 9 @@ -797,14 +798,14 @@ void au_sfx_load_sound(SoundManager* manager, SoundSFXEntry* entry, SoundManager for (playerIndex = 0; playerIndex < 8; playerIndex++) { player = &manager->players[playerIndex]; if (player->curSoundID == entry->upperSoundID) { - cond = TRUE; + foundPlayer = TRUE; break; } } } if (useSpecificPlayerMode == 0) { - if (!cond) { + if (!foundPlayer) { playerIndex = soundInfo & 0x7; player = &manager->players[playerIndex]; if (player->sefDataReadPos == NULL || priority >= player->priority) { @@ -814,49 +815,49 @@ void au_sfx_load_sound(SoundManager* manager, SoundSFXEntry* entry, SoundManager } } - if (!cond) { + if (!foundPlayer) { // lower 4 bits of soundInfo: max playerIndex // check if any player is playing this sound for (playerIndex = soundInfo & 0x7; playerIndex >= 0; playerIndex--) { player = &manager->players[playerIndex]; if (player->curSoundID == soundIDLower) { - cond = TRUE; + foundPlayer = TRUE; break; } } } - if (!cond) { + if (!foundPlayer) { // find free player for (playerIndex = soundInfo & 0x7; playerIndex >= 0; playerIndex--) { player = &manager->players[playerIndex]; if (player->sefDataReadPos == NULL) { - cond = TRUE; + foundPlayer = TRUE; break; } } } - if (!cond) { + if (!foundPlayer) { // if there is no free player try stealing one with lower priority for (playerIndex = soundInfo & 0x7; playerIndex >= 0; playerIndex--) { player = &manager->players[playerIndex]; if (player->priority < priority) { - cond = TRUE; + foundPlayer = TRUE; break; } } } - if (!cond) { + if (!foundPlayer) { playerIndex = soundInfo & 0x7; player = &manager->players[playerIndex]; if (player->priority <= priority) { - cond = TRUE; + foundPlayer = TRUE; } } - if (cond) { + if (foundPlayer) { au_sfx_play_sound(manager, player, AU_FILE_RELATIVE(manager->sefData, *cmdList), entry, priority, 0); } } else { @@ -1436,9 +1437,7 @@ static void au_SEFCmd_00_SetVolume(SoundManager* manager, SoundPlayer* player) { } static void au_SEFCmd_01_SetPan(SoundManager* manager, SoundPlayer* player) { - AuFilePos buf = player->sefDataReadPos; - s32 sfxPan = buf[0]; - player->sefDataReadPos = &buf[1]; + s32 sfxPan = *player->sefDataReadPos++; player->changed.pan = TRUE; player->sfxPan = sfxPan; @@ -1448,16 +1447,14 @@ static void au_SEFCmd_02_SetInstrument(SoundManager* manager, SoundPlayer* playe AuFilePos buf = player->sefDataReadPos; s32 bank = buf[0]; s32 patch = buf[1]; - player->sefDataReadPos = &buf[2]; + player->sefDataReadPos += 2; player->instrumentIndex = patch; player->sfxInstrumentRef = au_get_instrument(manager->globals, bank, patch, &player->envelope); } static void au_SEFCmd_03_SetReverb(SoundManager* manager, SoundPlayer* player) { - AuFilePos buf = player->sefDataReadPos; - u8 reverb = buf[0]; - player->sefDataReadPos = &buf[1]; + u8 reverb = *player->sefDataReadPos++; if (player->sfxParamsFlags & SFX_PARAM_FLAG_FIXED_REVERB) { reverb = manager->defaultReverbAmt; @@ -1470,11 +1467,9 @@ static void au_SEFCmd_04_SetEnvelope(SoundManager* manager, SoundPlayer* player) Instrument* other; EnvelopePreset* envPreset; - AuFilePos buf = player->sefDataReadPos; - u8 temp_v1 = buf[0]; - player->sefDataReadPos = &buf[1]; + u8 envelope = *player->sefDataReadPos++; - player->envelopePreset = temp_v1 & 0x7F; + player->envelopePreset = envelope & 0x7F; other = player->sfxInstrumentRef; player->sfxInstrument.base = other->base; @@ -1505,11 +1500,7 @@ static void au_SEFCmd_05_CoarseTune(SoundManager* manager, SoundPlayer* player) } static void au_SEFCmd_06_FineTune(SoundManager* manager, SoundPlayer* player) { - AuFilePos buf = player->sefDataReadPos; - s32 unkTemp = buf[0]; - player->sefDataReadPos = &buf[1]; - - player->fineTune = unkTemp; + player->fineTune = *player->sefDataReadPos++; } static void au_SEFCmd_07_WaitForEnd(SoundManager* manager, SoundPlayer* player) { @@ -1520,12 +1511,11 @@ static void au_SEFCmd_07_WaitForEnd(SoundManager* manager, SoundPlayer* player) } static void au_SEFCmd_08_PitchSweep(SoundManager* manager, SoundPlayer* player) { - AuFilePos buf = player->sefDataReadPos; - s32 hi = buf[0]; - s32 lo = buf[1]; - s16 newValue = (buf[2] & 0x7F) * 100; + s32 hi = player->sefDataReadPos[0]; + s32 lo = player->sefDataReadPos[1]; + s16 newValue = (player->sefDataReadPos[2] & 0x7F) * 100; s16 time = lo + (hi << 8); - player->sefDataReadPos = &buf[3]; + player->sefDataReadPos += 3; if (time <= 0) { time = 1; @@ -1537,9 +1527,7 @@ static void au_SEFCmd_08_PitchSweep(SoundManager* manager, SoundPlayer* player) } static void au_SEFCmd_09_StartLoop(SoundManager* manager, SoundPlayer* player) { - AuFilePos buf = player->sefDataReadPos; - s32 loopIterCount = buf[0]; // loopIterCount = 0 for infinite loop - player->sefDataReadPos = &buf[1]; + s32 loopIterCount = *player->sefDataReadPos++; player->loopStartPos = player->sefDataReadPos; player->loopIterCount = loopIterCount; @@ -1559,9 +1547,7 @@ static void au_SEFCmd_0B_WaitForRelease(SoundManager* manager, SoundPlayer* play } static void au_SEFCmd_0C_SetCurrentVolume(SoundManager* manager, SoundPlayer* player) { - AuFilePos buf = player->sefDataReadPos; - s32 vol = buf[0]; - player->sefDataReadPos = &buf[1]; + s32 vol = *player->sefDataReadPos++; if (vol != 0) { vol = (vol << 0x18) | 0xFFFFFF; @@ -1571,12 +1557,11 @@ static void au_SEFCmd_0C_SetCurrentVolume(SoundManager* manager, SoundPlayer* pl } static void au_SEFCmd_0D_VolumeRamp(SoundManager* manager, SoundPlayer* player) { - AuFilePos buf = player->sefDataReadPos; - s32 hi = buf[0]; - s32 lo = buf[1]; - s32 newValue = buf[2]; + s32 hi = player->sefDataReadPos[0]; + s32 lo = player->sefDataReadPos[1]; + s32 newValue = player->sefDataReadPos[2]; s16 time = lo + (hi << 8); - player->sefDataReadPos = &buf[3]; + player->sefDataReadPos += 3; if (newValue != 0) { newValue = (newValue << 8) | 0xFF; @@ -1591,10 +1576,11 @@ static void au_SEFCmd_0D_VolumeRamp(SoundManager* manager, SoundPlayer* player) } static void au_SEFCmd_0E_SetAlternativeSound(SoundManager* manager, SoundPlayer* player) { - AuFilePos buf = player->sefDataReadPos; - AuFilePos pos = AU_FILE_RELATIVE(manager->sefData, (buf[1] << 8) + buf[2]); - u8 type = buf[0]; - player->sefDataReadPos = &buf[3]; + s32 hi = player->sefDataReadPos[1]; + s32 lo = player->sefDataReadPos[2]; + AuFilePos pos = AU_FILE_RELATIVE(manager->sefData, (hi << 8) + lo); + u8 type = player->sefDataReadPos[0]; + player->sefDataReadPos += 3; player->alternativeType = type; switch (type) { @@ -1634,27 +1620,15 @@ static void au_SEFCmd_12_NOP(SoundManager* manager, SoundPlayer* player) { } static void au_SEFCmd_13_SetRandomPitch(SoundManager* manager, SoundPlayer* player) { - AuFilePos buf = player->sefDataReadPos; - s32 randomPitch = buf[0]; - player->sefDataReadPos = &buf[1]; - - player->randomPitch = randomPitch; + player->randomPitch = *player->sefDataReadPos++; } static void au_SEFCmd_14_SetRandomVelocity(SoundManager* manager, SoundPlayer* player) { - AuFilePos buf = player->sefDataReadPos; - s32 unkTemp = buf[0]; - player->sefDataReadPos = &buf[1]; - - player->randomVelocity = unkTemp; + player->randomVelocity = *player->sefDataReadPos++; } static void au_SEFCmd_15_SetUnkA3(SoundManager* manager, SoundPlayer* player) { - AuFilePos buf = player->sefDataReadPos; - s32 unkTemp = buf[0]; - player->sefDataReadPos = &buf[1]; - - player->unk_A3 = unkTemp; + player->unk_A3 = *player->sefDataReadPos++;; } static void au_SEFCmd_16_SetEnvelopePress(SoundManager* manager, SoundPlayer* player) { @@ -1685,7 +1659,7 @@ static void au_SEFCmd_17_PlaySound(SoundManager* manager, SoundPlayer* player) { } static void au_SEFCmd_18_SetAlternativeVolume(SoundManager* manager, SoundPlayer* player) { - player->alternativeVolume = *(u8*)player->sefDataReadPos++; + player->alternativeVolume = *player->sefDataReadPos++; if (player->alternativeVolume != 0) { player->alternativeVolume = player->alternativeVolume << 8 | 0xFF; } diff --git a/src/background.c b/src/background.c index 3fded87588..64640dbc41 100644 --- a/src/background.c +++ b/src/background.c @@ -192,7 +192,7 @@ void appendGfx_background_texture(void) { scrollValue += gGameStatusPtr->backgroundMaxX * 32; } - bgXOffset =gGameStatusPtr->backgroundXOffset = ((s32)scrollValue) % gGameStatusPtr->backgroundMaxX; + bgXOffset = gGameStatusPtr->backgroundXOffset = ((s32)scrollValue) % gGameStatusPtr->backgroundMaxX; bgMaxX = gGameStatusPtr->backgroundMaxX; bgMaxY = gGameStatusPtr->backgroundMaxY; bgMinX = gGameStatusPtr->backgroundMinX; diff --git a/src/battle/entity_model_icons.c b/src/battle/entity_model_icons.c index aba805227c..4f42b43afd 100644 --- a/src/battle/entity_model_icons.c +++ b/src/battle/entity_model_icons.c @@ -68,7 +68,7 @@ Gfx BtlBonkModelGfx[] = { gsSPEndDisplayList(), }; -EntityModelScript EMS_BonkIcon = STANDARD_ENTITY_MODEL_SCRIPT(BtlBonkModelGfx, RENDER_MODE_2D); +EntityModelScript EMS_BonkIcon = STANDARD_ENTITY_MODEL_SCRIPT(BtlBonkModelGfx, RENDER_MODE_CLOUD_NO_ZCMP); Vtx BtlStarModelVtx[] = { {{{ -16, -16, 0 }, 0, { 0, 1024 }, { 0, 0, 0, 255 }}}, diff --git a/src/effects.c b/src/effects.c index 93f11042f3..2c415cf166 100644 --- a/src/effects.c +++ b/src/effects.c @@ -326,7 +326,7 @@ s32 load_effect(s32 effectIndex) { // Copy the effect into the newly mapped space dma_copy(effectEntry->dmaStart, effectEntry->dmaEnd, effectEntry->dmaDest); - // If there's extra data the effect normally loads, allocate space and copy into the new space + // If there's graphics data for the effect, allocate space and copy into the new space if (effectEntry->graphicsDmaStart != NULL) { void* effectDataBuf = general_heap_malloc(effectEntry->graphicsDmaEnd - effectEntry->graphicsDmaStart); effectGraphics->data = effectDataBuf; diff --git a/src/effects/aura.c b/src/effects/aura.c index 195f98ba23..42c1d02fab 100644 --- a/src/effects/aura.c +++ b/src/effects/aura.c @@ -280,7 +280,7 @@ void aura_render(EffectInstance* effect) { renderTask.appendGfx = aura_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/big_smoke_puff.c b/src/effects/big_smoke_puff.c index 9cc3383f3b..84d43af3a5 100644 --- a/src/effects/big_smoke_puff.c +++ b/src/effects/big_smoke_puff.c @@ -113,7 +113,7 @@ void big_smoke_puff_render(EffectInstance* effect) { renderTask.appendGfx = big_smoke_puff_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/big_snowflakes.c b/src/effects/big_snowflakes.c index 9cab0d3416..afc780578e 100644 --- a/src/effects/big_snowflakes.c +++ b/src/effects/big_snowflakes.c @@ -101,7 +101,7 @@ void big_snowflakes_render(EffectInstance* effect) { renderTask.appendGfx = big_snowflakes_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/blast.c b/src/effects/blast.c index 0234038a72..062601a73c 100644 --- a/src/effects/blast.c +++ b/src/effects/blast.c @@ -86,7 +86,7 @@ void blast_render(EffectInstance* effect) { renderTask.appendGfx = blast_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_28; + renderTask.renderMode = RENDER_MODE_PASS_THROUGH; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/bombette_breaking.c b/src/effects/bombette_breaking.c index bafd182a64..f9b0c77b43 100644 --- a/src/effects/bombette_breaking.c +++ b/src/effects/bombette_breaking.c @@ -196,7 +196,7 @@ void bombette_breaking_render(EffectInstance* effect) { renderTask.appendGfx = bombette_breaking_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_28; + renderTask.renderMode = RENDER_MODE_PASS_THROUGH; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/breaking_junk.c b/src/effects/breaking_junk.c index 9a53c13f8c..a92f5456cf 100644 --- a/src/effects/breaking_junk.c +++ b/src/effects/breaking_junk.c @@ -125,7 +125,7 @@ void breaking_junk_render(EffectInstance* effect) { renderTask.appendGfx = breaking_junk_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/bulb_glow.c b/src/effects/bulb_glow.c index d016d62816..404fcb0ae0 100644 --- a/src/effects/bulb_glow.c +++ b/src/effects/bulb_glow.c @@ -141,7 +141,7 @@ void bulb_glow_render(EffectInstance* effect) { renderTaskPtr->renderMode = RENDER_MODE_SURFACE_OPA; } else { renderTask.dist = -100; - renderTaskPtr->renderMode = RENDER_MODE_2D; + renderTaskPtr->renderMode = RENDER_MODE_CLOUD_NO_ZCMP; } retTask = queue_render_task(renderTaskPtr); diff --git a/src/effects/butterflies.c b/src/effects/butterflies.c index c36516215e..0de39eba67 100644 --- a/src/effects/butterflies.c +++ b/src/effects/butterflies.c @@ -154,7 +154,7 @@ void butterflies_render(EffectInstance* effect) { renderTask.appendGfx = butterflies_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/chapter_change.c b/src/effects/chapter_change.c index 28bdfffe49..4a9573456e 100644 --- a/src/effects/chapter_change.c +++ b/src/effects/chapter_change.c @@ -220,7 +220,7 @@ void chapter_change_render(EffectInstance* effect) { renderTask.appendGfx = chapter_change_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/cloud_puff.c b/src/effects/cloud_puff.c index f73489b606..9f28d22133 100644 --- a/src/effects/cloud_puff.c +++ b/src/effects/cloud_puff.c @@ -106,7 +106,7 @@ void cloud_puff_render(EffectInstance* effect) { renderTask.appendGfx = cloud_puff_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_28; + renderTask.renderMode = RENDER_MODE_PASS_THROUGH; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/cloud_trail.c b/src/effects/cloud_trail.c index 3882efd513..c42d1c5647 100644 --- a/src/effects/cloud_trail.c +++ b/src/effects/cloud_trail.c @@ -107,7 +107,7 @@ void cloud_trail_render(EffectInstance* effect) { renderTask.appendGfx = cloud_trail_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_28; + renderTask.renderMode = RENDER_MODE_PASS_THROUGH; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/cold_breath.c b/src/effects/cold_breath.c index 9baefc587d..acaa20c838 100644 --- a/src/effects/cold_breath.c +++ b/src/effects/cold_breath.c @@ -170,7 +170,7 @@ void cold_breath_render(EffectInstance* effect) { renderTask.appendGfx = cold_breath_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 6; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/confetti.c b/src/effects/confetti.c index b65c1bb95e..fc35c38999 100644 --- a/src/effects/confetti.c +++ b/src/effects/confetti.c @@ -239,7 +239,7 @@ void confetti_render(EffectInstance* effect) { renderTask.appendGfx = confetti_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); } diff --git a/src/effects/damage_stars.c b/src/effects/damage_stars.c index 7222eeb9be..e0f626d105 100644 --- a/src/effects/damage_stars.c +++ b/src/effects/damage_stars.c @@ -227,7 +227,7 @@ void damage_stars_render(EffectInstance* effect) { renderTask.appendGfx = damage_stars_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/debuff.c b/src/effects/debuff.c index d52501775d..2c2c330752 100644 --- a/src/effects/debuff.c +++ b/src/effects/debuff.c @@ -124,7 +124,7 @@ void debuff_render(EffectInstance* effect) { renderTask.appendGfx = debuff_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_28; + renderTask.renderMode = RENDER_MODE_PASS_THROUGH; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/drop_leaves.c b/src/effects/drop_leaves.c index 0f23df2245..5afa1afbc3 100644 --- a/src/effects/drop_leaves.c +++ b/src/effects/drop_leaves.c @@ -120,7 +120,7 @@ void drop_leaves_render(EffectInstance* effect) { renderTask.appendGfx = drop_leaves_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/effect_3D.c b/src/effects/effect_3D.c index 81e9539097..b053fe2538 100644 --- a/src/effects/effect_3D.c +++ b/src/effects/effect_3D.c @@ -205,7 +205,7 @@ void effect_3D_render(EffectInstance* effect) { renderTask.appendGfx = effect_3D_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/effect_46.c b/src/effects/effect_46.c index 2ce46c9bc5..6e55f9beec 100644 --- a/src/effects/effect_46.c +++ b/src/effects/effect_46.c @@ -193,7 +193,7 @@ void effect_46_render(EffectInstance* effect) { renderTask.appendGfx = effect_46_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/effect_63.c b/src/effects/effect_63.c index 97ff9c53ac..45e9b3cc84 100644 --- a/src/effects/effect_63.c +++ b/src/effects/effect_63.c @@ -201,7 +201,7 @@ void effect_63_render(EffectInstance* effect) { renderTask.appendGfx = effect_63_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/effect_65.c b/src/effects/effect_65.c index 8b3bf49423..add49ec0a7 100644 --- a/src/effects/effect_65.c +++ b/src/effects/effect_65.c @@ -200,7 +200,7 @@ void effect_65_render(EffectInstance* effect) { renderTask.appendGfx = effect_65_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/effect_86.c b/src/effects/effect_86.c index d908c81fc5..1faeb01b54 100644 --- a/src/effects/effect_86.c +++ b/src/effects/effect_86.c @@ -101,7 +101,7 @@ void effect_86_render(EffectInstance* effect) { renderTask.appendGfx = effect_86_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/embers.c b/src/effects/embers.c index d5c90fbff5..5c8dc40926 100644 --- a/src/effects/embers.c +++ b/src/effects/embers.c @@ -176,7 +176,7 @@ void embers_render(EffectInstance* effect) { renderTask.appendGfx = embers_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/emote.c b/src/effects/emote.c index 74b1ab2916..af46fe4a81 100644 --- a/src/effects/emote.c +++ b/src/effects/emote.c @@ -195,7 +195,7 @@ void emote_render(EffectInstance* effect) { renderTask.appendGfx = emote_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/ending_decals.c b/src/effects/ending_decals.c index caef475dea..1723c337f5 100644 --- a/src/effects/ending_decals.c +++ b/src/effects/ending_decals.c @@ -122,7 +122,7 @@ void ending_decals_render(EffectInstance* effect) { if (data->type == 0) { renderTaskPtr->renderMode = RENDER_MODE_SURFACE_OPA; } else { - renderTaskPtr->renderMode = RENDER_MODE_2D; + renderTaskPtr->renderMode = RENDER_MODE_CLOUD_NO_ZCMP; } retTask = queue_render_task(renderTaskPtr); diff --git a/src/effects/energy_in_out.c b/src/effects/energy_in_out.c index feef352d33..6d2f1620c2 100644 --- a/src/effects/energy_in_out.c +++ b/src/effects/energy_in_out.c @@ -231,7 +231,7 @@ void energy_in_out_render(EffectInstance* effect) { renderTask.appendGfx = energy_in_out_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); } diff --git a/src/effects/energy_orb_wave.c b/src/effects/energy_orb_wave.c index 2f2dedd24a..e75c480b33 100644 --- a/src/effects/energy_orb_wave.c +++ b/src/effects/energy_orb_wave.c @@ -211,7 +211,7 @@ void energy_orb_wave_render(EffectInstance* effect) { renderTask.appendGfx = energy_orb_wave_appendGfx; renderTask.dist = 10; renderTask.appendGfxArg = effect; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; if (effect82->unk_00 >= 3) { queue_render_task(renderTaskPointer); return; diff --git a/src/effects/explosion.c b/src/effects/explosion.c index 22c050e8d1..d586d783c3 100644 --- a/src/effects/explosion.c +++ b/src/effects/explosion.c @@ -158,7 +158,7 @@ void explosion_render(EffectInstance* effect) { renderTask.appendGfx = explosion_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); } diff --git a/src/effects/falling_leaves.c b/src/effects/falling_leaves.c index ea10a7f29f..9690e125c5 100644 --- a/src/effects/falling_leaves.c +++ b/src/effects/falling_leaves.c @@ -115,7 +115,7 @@ void falling_leaves_render(EffectInstance* effect) { renderTask.appendGfx = falling_leaves_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/fire_breath.c b/src/effects/fire_breath.c index 62c1d18b50..34c04218c2 100644 --- a/src/effects/fire_breath.c +++ b/src/effects/fire_breath.c @@ -173,7 +173,7 @@ void fire_breath_render(EffectInstance* effect) { renderTask.dist = 0; } - renderTaskPointer->renderMode = RENDER_MODE_2D; + renderTaskPointer->renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(renderTaskPointer); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; } diff --git a/src/effects/fire_flower.c b/src/effects/fire_flower.c index a6d804516c..1a59238060 100644 --- a/src/effects/fire_flower.c +++ b/src/effects/fire_flower.c @@ -194,7 +194,7 @@ void fire_flower_render(EffectInstance* effect) { renderTask.appendGfx = fire_flower_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/floating_cloud_puff.c b/src/effects/floating_cloud_puff.c index 74f8272cc6..b565d0182a 100644 --- a/src/effects/floating_cloud_puff.c +++ b/src/effects/floating_cloud_puff.c @@ -104,7 +104,7 @@ void floating_cloud_puff_render(EffectInstance* effect) { renderTask.appendGfx = floating_cloud_puff_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/floating_flower.c b/src/effects/floating_flower.c index 56297d7599..312cb2f08d 100644 --- a/src/effects/floating_flower.c +++ b/src/effects/floating_flower.c @@ -134,7 +134,7 @@ void floating_flower_render(EffectInstance* effect) { renderTask.appendGfx = floating_flower_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/floating_rock.c b/src/effects/floating_rock.c index d5f17155d7..e9a5c6e465 100644 --- a/src/effects/floating_rock.c +++ b/src/effects/floating_rock.c @@ -103,7 +103,7 @@ void floating_rock_render(EffectInstance *effect) { renderTask.appendGfx = floating_rock_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = effect76->pos.z; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/flower_splash.c b/src/effects/flower_splash.c index 5ef3ac5bda..fceed4ba70 100644 --- a/src/effects/flower_splash.c +++ b/src/effects/flower_splash.c @@ -132,7 +132,7 @@ void flower_splash_render(EffectInstance* effect) { renderTask.appendGfx = flower_splash_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_28; + renderTask.renderMode = RENDER_MODE_PASS_THROUGH; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/flower_trail.c b/src/effects/flower_trail.c index 547726abd1..e80f773bae 100644 --- a/src/effects/flower_trail.c +++ b/src/effects/flower_trail.c @@ -148,7 +148,7 @@ void flower_trail_render(EffectInstance* effect) { renderTask.appendGfx = flower_trail_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_28; + renderTask.renderMode = RENDER_MODE_PASS_THROUGH; queuedTaskPtr = queue_render_task(&renderTask); queuedTaskPtr->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/footprint.c b/src/effects/footprint.c index a7808089b5..459aca41d5 100644 --- a/src/effects/footprint.c +++ b/src/effects/footprint.c @@ -104,7 +104,7 @@ void footprint_render(EffectInstance* effect) { renderTask.appendGfx = footprint_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_28; + renderTask.renderMode = RENDER_MODE_PASS_THROUGH; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/fright_jar.c b/src/effects/fright_jar.c index 55a54a4e4a..3167811a79 100644 --- a/src/effects/fright_jar.c +++ b/src/effects/fright_jar.c @@ -103,7 +103,7 @@ void fright_jar_render(EffectInstance* effect) { renderTask.appendGfx = fright_jar_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/gather_energy_pink.c b/src/effects/gather_energy_pink.c index 662c6945e2..d237905eb2 100644 --- a/src/effects/gather_energy_pink.c +++ b/src/effects/gather_energy_pink.c @@ -151,7 +151,7 @@ void gather_energy_pink_render(EffectInstance* effect) { renderTask.appendGfx = gather_energy_pink_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/got_item_outline.c b/src/effects/got_item_outline.c index c96c7a9f3d..4cac7886f1 100644 --- a/src/effects/got_item_outline.c +++ b/src/effects/got_item_outline.c @@ -98,7 +98,7 @@ void got_item_outline_render(EffectInstance* effect) { renderTask.appendGfx = got_item_outline_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/green_impact.c b/src/effects/green_impact.c index 2c58df095e..1af70ce493 100644 --- a/src/effects/green_impact.c +++ b/src/effects/green_impact.c @@ -124,7 +124,7 @@ void green_impact_render(EffectInstance* effect) { renderTask.appendGfx = green_impact_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_28; + renderTask.renderMode = RENDER_MODE_PASS_THROUGH; retTask = queue_render_task(&renderTask); } diff --git a/src/effects/hieroglyphs.c b/src/effects/hieroglyphs.c index 2901681a23..fdcdfad22e 100644 --- a/src/effects/hieroglyphs.c +++ b/src/effects/hieroglyphs.c @@ -103,7 +103,7 @@ void hieroglyphs_render(EffectInstance* effect) { renderTask.appendGfx = hieroglyphs_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/huff_puff_breath.c b/src/effects/huff_puff_breath.c index 7e4d952bbc..6ff62dcf9b 100644 --- a/src/effects/huff_puff_breath.c +++ b/src/effects/huff_puff_breath.c @@ -116,7 +116,7 @@ void huff_puff_breath_render(EffectInstance* effect) { renderTask.appendGfx = huff_puff_breath_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); } diff --git a/src/effects/ice_pillar.c b/src/effects/ice_pillar.c index dd6c73084a..d9b2452da4 100644 --- a/src/effects/ice_pillar.c +++ b/src/effects/ice_pillar.c @@ -145,7 +145,7 @@ void ice_pillar_render(EffectInstance* effect) { renderTask.appendGfx = ice_pillar_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 5; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/ice_shard.c b/src/effects/ice_shard.c index 892daef22a..7d854156c8 100644 --- a/src/effects/ice_shard.c +++ b/src/effects/ice_shard.c @@ -124,7 +124,7 @@ void ice_shard_render(EffectInstance* effect) { renderTask.appendGfx = ice_shard_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/landing_dust.c b/src/effects/landing_dust.c index b51f3de479..6a3bd21706 100644 --- a/src/effects/landing_dust.c +++ b/src/effects/landing_dust.c @@ -251,7 +251,7 @@ void landing_dust_render(EffectInstance* effect) { renderTask.appendGfx = landing_dust_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_28; + renderTask.renderMode = RENDER_MODE_PASS_THROUGH; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/lens_flare.c b/src/effects/lens_flare.c index 0b49a41f4c..688957bad6 100644 --- a/src/effects/lens_flare.c +++ b/src/effects/lens_flare.c @@ -100,7 +100,7 @@ void lens_flare_render(EffectInstance* effect) { renderTask.appendGfx = lens_flare_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 20; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/light_rays.c b/src/effects/light_rays.c index 8cb735e950..fb23bf8325 100644 --- a/src/effects/light_rays.c +++ b/src/effects/light_rays.c @@ -261,7 +261,7 @@ void light_rays_render(EffectInstance* effect) { renderTask.appendGfx = light_rays_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/lightning_bolt.c b/src/effects/lightning_bolt.c index 46001c5fe1..6a9c24742c 100644 --- a/src/effects/lightning_bolt.c +++ b/src/effects/lightning_bolt.c @@ -161,7 +161,7 @@ void lightning_bolt_render(EffectInstance *effect) { renderTask.dist = 10; } - renderTaskPointer->renderMode = RENDER_MODE_2D; + renderTaskPointer->renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(renderTaskPointer); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; } diff --git a/src/effects/lil_oink.c b/src/effects/lil_oink.c index bc60b88a24..f5e1c302ec 100644 --- a/src/effects/lil_oink.c +++ b/src/effects/lil_oink.c @@ -162,7 +162,7 @@ void lil_oink_render(EffectInstance* effect) { renderTask.appendGfx = lil_oink_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/merlin_house_stars.c b/src/effects/merlin_house_stars.c index 4828e853a5..9609745533 100644 --- a/src/effects/merlin_house_stars.c +++ b/src/effects/merlin_house_stars.c @@ -117,7 +117,7 @@ void merlin_house_stars_render(EffectInstance* effect) { renderTask.appendGfx = merlin_house_stars_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/misc_particles.c b/src/effects/misc_particles.c index 85ecf28415..538a63e69b 100644 --- a/src/effects/misc_particles.c +++ b/src/effects/misc_particles.c @@ -289,7 +289,7 @@ void misc_particles_render(EffectInstance* effect) { renderTask.appendGfx = misc_particles_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 7; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/motion_blur_flame.c b/src/effects/motion_blur_flame.c index 3973543fa7..506e9b72ca 100644 --- a/src/effects/motion_blur_flame.c +++ b/src/effects/motion_blur_flame.c @@ -114,7 +114,7 @@ void motion_blur_flame_render(EffectInstance* effect) { renderTask.appendGfx = motion_blur_flame_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 100; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/moving_cloud.c b/src/effects/moving_cloud.c index ae03a22a5f..85c41cd46d 100644 --- a/src/effects/moving_cloud.c +++ b/src/effects/moving_cloud.c @@ -170,7 +170,7 @@ void moving_cloud_render(EffectInstance* effect) { renderTask.appendGfx = moving_cloud_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/music_note.c b/src/effects/music_note.c index 26f3fe60fe..2d3dffbdac 100644 --- a/src/effects/music_note.c +++ b/src/effects/music_note.c @@ -122,7 +122,7 @@ void music_note_render(EffectInstance* effect) { renderTask.appendGfx = music_note_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/peach_star_beam.c b/src/effects/peach_star_beam.c index 66760979ed..7f0563f1b9 100644 --- a/src/effects/peach_star_beam.c +++ b/src/effects/peach_star_beam.c @@ -156,7 +156,7 @@ void peach_star_beam_render(EffectInstance* effect) { renderTask.appendGfx = peach_star_beam_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/pink_sparkles.c b/src/effects/pink_sparkles.c index 8955c403c3..dec62f3f31 100644 --- a/src/effects/pink_sparkles.c +++ b/src/effects/pink_sparkles.c @@ -221,7 +221,7 @@ void pink_sparkles_render(EffectInstance* effect) { renderTask.appendGfx = pink_sparkles_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); } diff --git a/src/effects/purple_ring.c b/src/effects/purple_ring.c index 559bdccc2c..dc1986e859 100644 --- a/src/effects/purple_ring.c +++ b/src/effects/purple_ring.c @@ -182,7 +182,7 @@ void purple_ring_render(EffectInstance* effect) { renderTask.appendGfx = purple_ring_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/quizmo_assistant.c b/src/effects/quizmo_assistant.c index 3e3daf2a58..713d7ac4d3 100644 --- a/src/effects/quizmo_assistant.c +++ b/src/effects/quizmo_assistant.c @@ -91,7 +91,7 @@ void quizmo_assistant_render(EffectInstance* effect) { renderTask.appendGfx = quizmo_assistant_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/quizmo_audience.c b/src/effects/quizmo_audience.c index 58924d3447..4e2f0f0e28 100644 --- a/src/effects/quizmo_audience.c +++ b/src/effects/quizmo_audience.c @@ -171,7 +171,7 @@ void quizmo_audience_render(EffectInstance* effect) { renderTask.appendGfx = quizmo_audience_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/radial_shimmer.c b/src/effects/radial_shimmer.c index eef0576e06..cc8d9417a0 100644 --- a/src/effects/radial_shimmer.c +++ b/src/effects/radial_shimmer.c @@ -278,7 +278,7 @@ void radial_shimmer_render(EffectInstance* effect) { renderTask.appendGfx = radial_shimmer_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/red_impact.c b/src/effects/red_impact.c index e44de35759..02a5d6f6af 100644 --- a/src/effects/red_impact.c +++ b/src/effects/red_impact.c @@ -134,7 +134,7 @@ void red_impact_render(EffectInstance* effect) { renderTask.appendGfx = red_impact_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_28; + renderTask.renderMode = RENDER_MODE_PASS_THROUGH; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/ring_blast.c b/src/effects/ring_blast.c index 202f6a4625..b9368060fd 100644 --- a/src/effects/ring_blast.c +++ b/src/effects/ring_blast.c @@ -77,7 +77,7 @@ void ring_blast_render(EffectInstance* effect) { renderTask.appendGfx = ring_blast_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_28; + renderTask.renderMode = RENDER_MODE_PASS_THROUGH; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/rising_bubble.c b/src/effects/rising_bubble.c index c2ece900fe..19fa80e9f2 100644 --- a/src/effects/rising_bubble.c +++ b/src/effects/rising_bubble.c @@ -99,7 +99,7 @@ void rising_bubble_render(EffectInstance* effect) { renderTask.appendGfx = rising_bubble_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/shape_spell.c b/src/effects/shape_spell.c index d7529986a0..9af181ab14 100644 --- a/src/effects/shape_spell.c +++ b/src/effects/shape_spell.c @@ -127,7 +127,7 @@ void shape_spell_render(EffectInstance* effect) { renderTask.appendGfx = shape_spell_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/shattering_stones.c b/src/effects/shattering_stones.c index 44678957e8..60f751e78f 100644 --- a/src/effects/shattering_stones.c +++ b/src/effects/shattering_stones.c @@ -132,7 +132,7 @@ void shattering_stones_render(EffectInstance* effect) { renderTask.appendGfx = shattering_stones_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/shimmer_burst.c b/src/effects/shimmer_burst.c index 328f155275..dd63f9e812 100644 --- a/src/effects/shimmer_burst.c +++ b/src/effects/shimmer_burst.c @@ -190,7 +190,7 @@ void shimmer_burst_render(EffectInstance* effect) { renderTask.appendGfx = shimmer_burst_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/shimmer_wave.c b/src/effects/shimmer_wave.c index bd262220c0..209c85f55d 100644 --- a/src/effects/shimmer_wave.c +++ b/src/effects/shimmer_wave.c @@ -178,7 +178,7 @@ void shimmer_wave_render(EffectInstance* effect) { renderTask.appendGfx = shimmer_wave_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/shiny_flare.c b/src/effects/shiny_flare.c index 51192d333d..4070854970 100644 --- a/src/effects/shiny_flare.c +++ b/src/effects/shiny_flare.c @@ -88,7 +88,7 @@ void shiny_flare_render(EffectInstance* effect) { renderTask.appendGfx = shiny_flare_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/shockwave.c b/src/effects/shockwave.c index b282b86e39..ec67535e00 100644 --- a/src/effects/shockwave.c +++ b/src/effects/shockwave.c @@ -259,7 +259,7 @@ void shockwave_render(EffectInstance* effect) { renderTask.appendGfx = shockwave_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_28; + renderTask.renderMode = RENDER_MODE_PASS_THROUGH; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/sleep_bubble.c b/src/effects/sleep_bubble.c index 348cfc809f..bab33aa20a 100644 --- a/src/effects/sleep_bubble.c +++ b/src/effects/sleep_bubble.c @@ -118,7 +118,7 @@ void sleep_bubble_render(EffectInstance* effect) { renderTask.appendGfx = sleep_bubble_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/small_gold_sparkle.c b/src/effects/small_gold_sparkle.c index 222b909a2a..9b22742141 100644 --- a/src/effects/small_gold_sparkle.c +++ b/src/effects/small_gold_sparkle.c @@ -103,7 +103,7 @@ void small_gold_sparkle_render(EffectInstance* effect) { renderTask.appendGfx = small_gold_sparkle_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/smoke_burst.c b/src/effects/smoke_burst.c index fb927c239f..59477baefa 100644 --- a/src/effects/smoke_burst.c +++ b/src/effects/smoke_burst.c @@ -92,7 +92,7 @@ void smoke_burst_render(EffectInstance* effect) { renderTask.appendGfx = smoke_burst_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_28; + renderTask.renderMode = RENDER_MODE_PASS_THROUGH; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/smoke_impact.c b/src/effects/smoke_impact.c index 36a70fc338..0fecf8fa66 100644 --- a/src/effects/smoke_impact.c +++ b/src/effects/smoke_impact.c @@ -110,7 +110,7 @@ void smoke_impact_render(EffectInstance* effect) { renderTask.appendGfx = smoke_impact_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_28; + renderTask.renderMode = RENDER_MODE_PASS_THROUGH; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/smoke_ring.c b/src/effects/smoke_ring.c index 09e88d9d67..439c2900b5 100644 --- a/src/effects/smoke_ring.c +++ b/src/effects/smoke_ring.c @@ -113,7 +113,7 @@ void smoke_ring_render(EffectInstance* effect) { renderTask.appendGfx = smoke_ring_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_28; + renderTask.renderMode = RENDER_MODE_PASS_THROUGH; retTask = queue_render_task(&renderTask); } diff --git a/src/effects/snaking_static.c b/src/effects/snaking_static.c index e2cd13c0b6..8b90c41030 100644 --- a/src/effects/snaking_static.c +++ b/src/effects/snaking_static.c @@ -149,7 +149,7 @@ void snaking_static_render(EffectInstance* effect) { renderTask.appendGfx = snaking_static_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/snowfall.c b/src/effects/snowfall.c index 22510d5e75..fcf8bf5204 100644 --- a/src/effects/snowfall.c +++ b/src/effects/snowfall.c @@ -154,7 +154,7 @@ void snowfall_render(EffectInstance* effect) { renderTask.appendGfx = snowfall_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/snowflake.c b/src/effects/snowflake.c index 82e5c7c90d..316cf563a0 100644 --- a/src/effects/snowflake.c +++ b/src/effects/snowflake.c @@ -111,7 +111,7 @@ void snowflake_render(EffectInstance* effect) { renderTaskPtr->appendGfx = &snowflake_appendGfx; renderTaskPtr->appendGfxArg = effect; renderTaskPtr->dist = 0; - renderTaskPtr->renderMode = RENDER_MODE_2D; + renderTaskPtr->renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(renderTaskPtr); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/snowman_doll.c b/src/effects/snowman_doll.c index 0b52277178..5298f7d386 100644 --- a/src/effects/snowman_doll.c +++ b/src/effects/snowman_doll.c @@ -280,7 +280,7 @@ void snowman_doll_render(EffectInstance* effect) { renderTask.appendGfx = snowman_doll_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = -10; - renderTask.renderMode = RENDER_MODE_28; + renderTask.renderMode = RENDER_MODE_PASS_THROUGH; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/sparkles.c b/src/effects/sparkles.c index ffc0de57c8..958bb69411 100644 --- a/src/effects/sparkles.c +++ b/src/effects/sparkles.c @@ -237,7 +237,7 @@ void sparkles_render(EffectInstance* effect) { renderTask.appendGfx = sparkles_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); } diff --git a/src/effects/spiky_white_aura.c b/src/effects/spiky_white_aura.c index 61408ad19d..61c7178aa8 100644 --- a/src/effects/spiky_white_aura.c +++ b/src/effects/spiky_white_aura.c @@ -169,7 +169,7 @@ void spiky_white_aura_render(EffectInstance* effect) { renderTask.appendGfx = spiky_white_aura_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/squirt.c b/src/effects/squirt.c index b83c6b9403..cda27ece7c 100644 --- a/src/effects/squirt.c +++ b/src/effects/squirt.c @@ -147,7 +147,7 @@ void squirt_render(EffectInstance* effect) { renderTask.appendGfx = squirt_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/star.c b/src/effects/star.c index 9e93c8f330..6d8112614f 100644 --- a/src/effects/star.c +++ b/src/effects/star.c @@ -192,7 +192,7 @@ void star_render(EffectInstance* effect) { renderTask.appendGfx = star_appendGfx; renderTask.dist = 0; if (data->type != FX_STAR_BACKGROUND) { - renderModeTemp = RENDER_MODE_2D; + renderModeTemp = RENDER_MODE_CLOUD_NO_ZCMP; } else { renderModeTemp = RENDER_MODE_SURF_SOLID_AA_ZB_LAYER0; } diff --git a/src/effects/star_outline.c b/src/effects/star_outline.c index 736df7cd17..ec97825983 100644 --- a/src/effects/star_outline.c +++ b/src/effects/star_outline.c @@ -138,7 +138,7 @@ void star_outline_render(EffectInstance* effect) { renderTask.appendGfx = star_outline_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/star_spirits_energy.c b/src/effects/star_spirits_energy.c index 39b5da0f93..b9d3383e88 100644 --- a/src/effects/star_spirits_energy.c +++ b/src/effects/star_spirits_energy.c @@ -329,7 +329,7 @@ void star_spirits_energy_render(EffectInstance* effect) { renderTask.appendGfx = star_spirits_energy_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/stars_burst.c b/src/effects/stars_burst.c index 81538c498a..95632fc9ef 100644 --- a/src/effects/stars_burst.c +++ b/src/effects/stars_burst.c @@ -122,7 +122,7 @@ void stars_burst_render(EffectInstance* effect) { renderTask.appendGfx = stars_burst_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/stars_shimmer.c b/src/effects/stars_shimmer.c index 0f64f1d485..157597290e 100644 --- a/src/effects/stars_shimmer.c +++ b/src/effects/stars_shimmer.c @@ -274,7 +274,7 @@ void stars_shimmer_render(EffectInstance* effect) { renderTask.appendGfx = stars_shimmer_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); } @@ -282,14 +282,14 @@ void stars_shimmer_render(EffectInstance* effect) { void stars_shimmer_appendGfx(void* effect) { Matrix4f sp18, sp58, sp98; StarsShimmerFXData* data = ((EffectInstance*)effect)->data.starsShimmer; - s32 type; + s32 state; s32 temp_s4; s32 unk_28; f32 rf, gf, bf; s32 r, g, b; s32 i; - type = data->state; + state = data->state; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); @@ -300,7 +300,7 @@ void stars_shimmer_appendGfx(void* effect) { guRotateF(sp58, -gCameras[gCurrentCameraID].curYaw, 0.0f, 1.0f, 0.0f); guMtxCatF(sp58, sp18, sp98); - switch (type) { + switch (state) { case 0: case 1: case 2: diff --git a/src/effects/stars_spread.c b/src/effects/stars_spread.c index 10f74886be..30bbb2a8e3 100644 --- a/src/effects/stars_spread.c +++ b/src/effects/stars_spread.c @@ -113,7 +113,7 @@ void stars_spread_render(EffectInstance* effect) { renderTask.appendGfx = stars_spread_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_28; + renderTask.renderMode = RENDER_MODE_PASS_THROUGH; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/steam_burst.c b/src/effects/steam_burst.c index 8d573ac3be..360c7029a7 100644 --- a/src/effects/steam_burst.c +++ b/src/effects/steam_burst.c @@ -101,7 +101,7 @@ void steam_burst_render(EffectInstance* effect) { renderTask.appendGfx = steam_burst_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_28; + renderTask.renderMode = RENDER_MODE_PASS_THROUGH; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/stop_watch.c b/src/effects/stop_watch.c index a63ff51839..2d3121d703 100644 --- a/src/effects/stop_watch.c +++ b/src/effects/stop_watch.c @@ -169,7 +169,7 @@ void stop_watch_render(EffectInstance* effect) { renderTask.appendGfx = stop_watch_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); } diff --git a/src/effects/sun.c b/src/effects/sun.c index 4569169405..4b171d9e73 100644 --- a/src/effects/sun.c +++ b/src/effects/sun.c @@ -139,7 +139,7 @@ void sun_render(EffectInstance* effect) { renderTask.appendGfx = sun_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/sweat.c b/src/effects/sweat.c index 97f4615aa3..99763226e7 100644 --- a/src/effects/sweat.c +++ b/src/effects/sweat.c @@ -75,7 +75,7 @@ void sweat_render(EffectInstance* effect) { renderTask.appendGfx = sweat_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/throw_spiny.c b/src/effects/throw_spiny.c index bb5dcadf55..473fedabc8 100644 --- a/src/effects/throw_spiny.c +++ b/src/effects/throw_spiny.c @@ -147,7 +147,7 @@ void throw_spiny_render(EffectInstance* effect) { renderTask.appendGfx = throw_spiny_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/thunderbolt_ring.c b/src/effects/thunderbolt_ring.c index e4738177ea..7a0d490762 100644 --- a/src/effects/thunderbolt_ring.c +++ b/src/effects/thunderbolt_ring.c @@ -91,7 +91,7 @@ void thunderbolt_ring_render(EffectInstance* effect) { renderTask.appendGfx = thunderbolt_ring_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); } diff --git a/src/effects/tubba_heart_attack.c b/src/effects/tubba_heart_attack.c index 407d7b4685..efd247673f 100644 --- a/src/effects/tubba_heart_attack.c +++ b/src/effects/tubba_heart_attack.c @@ -294,7 +294,7 @@ void tubba_heart_attack_render(EffectInstance* effect) { renderTask.appendGfx = tubba_heart_attack_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/underwater.c b/src/effects/underwater.c index 66ec12a5ba..2b16fef831 100644 --- a/src/effects/underwater.c +++ b/src/effects/underwater.c @@ -143,7 +143,7 @@ void underwater_render(EffectInstance* effect) { renderTask.appendGfx = underwater_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 100; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); } diff --git a/src/effects/walking_dust.c b/src/effects/walking_dust.c index 3a43673b45..8d8586c292 100644 --- a/src/effects/walking_dust.c +++ b/src/effects/walking_dust.c @@ -86,7 +86,7 @@ void walking_dust_render(EffectInstance* effect) { renderTask.appendGfx = walking_dust_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_28; + renderTask.renderMode = RENDER_MODE_PASS_THROUGH; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/water_block.c b/src/effects/water_block.c index ea81bd918c..a4b1981001 100644 --- a/src/effects/water_block.c +++ b/src/effects/water_block.c @@ -204,7 +204,7 @@ void water_block_render(EffectInstance* effect) { renderTask.appendGfx = water_block_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 20; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/water_fountain.c b/src/effects/water_fountain.c index dff6c6c6cf..aa51b5dc40 100644 --- a/src/effects/water_fountain.c +++ b/src/effects/water_fountain.c @@ -196,7 +196,7 @@ void water_fountain_render(EffectInstance* effect) { renderTask.appendGfx = water_fountain_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/water_splash.c b/src/effects/water_splash.c index 6f7f8156fd..ce5bbeb0c4 100644 --- a/src/effects/water_splash.c +++ b/src/effects/water_splash.c @@ -158,7 +158,7 @@ void water_splash_render(EffectInstance* effect) { renderTask.appendGfx = water_splash_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); } diff --git a/src/effects/waterfall.c b/src/effects/waterfall.c index 7e8fccac6b..c1211b717d 100644 --- a/src/effects/waterfall.c +++ b/src/effects/waterfall.c @@ -108,7 +108,7 @@ void waterfall_render(EffectInstance* effect) { renderTask.appendGfx = waterfall_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); } diff --git a/src/effects/whirlwind.c b/src/effects/whirlwind.c index a397b918f6..500fa8c34f 100644 --- a/src/effects/whirlwind.c +++ b/src/effects/whirlwind.c @@ -137,7 +137,7 @@ void whirlwind_render(EffectInstance* effect) { renderTask.appendGfx = whirlwind_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 10; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; queuedTask = queue_render_task(&renderTask); queuedTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/effects/windy_leaves.c b/src/effects/windy_leaves.c index 1ea90c7454..dd79041b14 100644 --- a/src/effects/windy_leaves.c +++ b/src/effects/windy_leaves.c @@ -224,7 +224,7 @@ void windy_leaves_render(EffectInstance* effect) { renderTask.appendGfx = windy_leaves_appendGfx; renderTask.appendGfxArg = effect; renderTask.dist = 0; - renderTask.renderMode = RENDER_MODE_2D; + renderTask.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; retTask = queue_render_task(&renderTask); retTask->renderMode |= RENDER_TASK_FLAG_REFLECT_FLOOR; diff --git a/src/entity.c b/src/entity.c index f824246423..744a375aa4 100644 --- a/src/entity.c +++ b/src/entity.c @@ -2,6 +2,7 @@ #include "ld_addrs.h" #include "entity.h" #include "model.h" +#include "sprite/player.h" #if VERSION_IQUE // TODO: remove if sections are split in iQue release @@ -1301,7 +1302,7 @@ s32 create_entity(EntityBlueprint* bp, ...) { case ENTITY_TYPE_RED_SWITCH: case ENTITY_TYPE_SIMPLE_SPRING: case ENTITY_TYPE_SCRIPT_SPRING: - case ENTITY_TYPE_STAR_BOX_LAUCHER: + case ENTITY_TYPE_STAR_BOX_LAUNCHER: entity->flags |= ENTITY_FLAG_4000; break; } @@ -1722,11 +1723,10 @@ void set_peach_shadow_scale(Shadow* shadow, f32 scale) { if (!gGameStatusPtr->isBattle) { switch (playerStatus->anim) { - //TODO raw player anims - case 0xC0018: - case 0xC0019: - case 0xC001A: - case 0xD0008: + case ANIM_Peach2_Carried: + case ANIM_Peach2_Thrown: + case ANIM_Peach2_Land: + case ANIM_Peach3_TiedSideways: shadow->scale.x = 0.26f - (scale / 2600.0f); if (shadow->scale.x < 0.01) { shadow->scale.x = 0.01f; diff --git a/src/entity/sbk_omo/StarBoxLauncher.c b/src/entity/sbk_omo/StarBoxLauncher.c index 8fc6c47a94..617ac956b5 100644 --- a/src/entity/sbk_omo/StarBoxLauncher.c +++ b/src/entity/sbk_omo/StarBoxLauncher.c @@ -76,7 +76,7 @@ void entity_StarBoxLauncher_check_launch(Entity* entity) { add_vec2D_polar(&x, &z, 10.0f, func_800E5348()); if (npc_raycast_down_sides(COLLIDER_FLAG_IGNORE_PLAYER, &x, &y, &z, &hitDepth) != 0) { if (NpcHitQueryColliderID & COLLISION_WITH_ENTITY_BIT) { - result = get_entity_type(NpcHitQueryColliderID) == ENTITY_TYPE_STAR_BOX_LAUCHER; + result = get_entity_type(NpcHitQueryColliderID) == ENTITY_TYPE_STAR_BOX_LAUNCHER; } } } else if ((entity->collisionFlags & ENTITY_COLLISION_PLAYER_TOUCH_FLOOR) && (actionState == ACTION_STATE_SPIN_POUND || actionState == ACTION_STATE_TORNADO_POUND)) { @@ -269,6 +269,6 @@ EntityBlueprint Entity_StarBoxLauncher = { .updateEntityScript = Entity_StarBoxLauncher_Script, .fpHandleCollision = NULL, { .dma = ENTITY_ROM(StarBoxLauncher) }, - .entityType = ENTITY_TYPE_STAR_BOX_LAUCHER, + .entityType = ENTITY_TYPE_STAR_BOX_LAUNCHER, .aabbSize = { 35, 35, 35 } }; diff --git a/src/entity_model.c b/src/entity_model.c index cf45cc6cb4..e0babc75da 100644 --- a/src/entity_model.c +++ b/src/entity_model.c @@ -21,28 +21,28 @@ SHIFT_BSS s32 entity_fog_alpha; SHIFT_BSS s32 entity_fog_dist_min; SHIFT_BSS s32 entity_fog_dist_max; -extern Gfx D_8014B7F8[]; -extern Gfx D_8014B820[]; -extern Gfx D_8014B848[]; -extern Gfx D_8014B870[]; -extern Gfx D_8014B898[]; -extern Gfx D_8014B8C0[]; -extern Gfx D_8014B8E8[]; -extern Gfx D_8014B988[]; -extern Gfx D_8014B9B0[]; -extern Gfx D_8014B9D8[]; -extern Gfx D_8014BA00[]; -extern Gfx D_8014BA48[]; -extern Gfx D_8014BA70[]; -extern Gfx D_8014BA98[]; -extern Gfx D_8014BAE8[]; -extern Gfx D_8014BE78[]; -extern Gfx D_8014BEA0[]; -extern Gfx D_8014BEC8[]; -extern Gfx D_8014BEF0[]; -extern Gfx D_8014BF18[]; -extern Gfx D_8014BF40[]; -extern Gfx D_8014BF68[]; +extern Gfx Gfx_RM1_SURFACE_OPA[]; +extern Gfx Gfx_RM1_DECAL_OPA[]; +extern Gfx Gfx_RM1_INTERSECTING_OPA[]; +extern Gfx Gfx_RM1_ALPHATEST[]; +extern Gfx Gfx_RM1_SURFACE_XLU[]; +extern Gfx Gfx_RM1_DECAL_XLU[]; +extern Gfx Gfx_RM1_INTERSECTING_XLU[]; +extern Gfx Gfx_RM1_ALPHATEST_ONESIDED[]; +extern Gfx Gfx_RM1_SURFACE_XLU_NO_AA[]; +extern Gfx Gfx_RM1_DECAL_XLU_NO_AA[]; +extern Gfx Gfx_RM1_PASS_THROUGH[]; +extern Gfx Gfx_RM1_SURFACE_OPA_NO_ZB[]; +extern Gfx Gfx_RM1_ALPHATEST_NO_ZB[]; +extern Gfx Gfx_RM1_SURFACE_XLU_NO_ZB[]; +extern Gfx Gfx_RM1_CLOUD_NO_ZCMP[]; +extern Gfx Gfx_RM3_SURFACE_OPA[]; +extern Gfx Gfx_RM3_DECAL_OPA[]; +extern Gfx Gfx_RM3_INTERSECTING_OPA[]; +extern Gfx Gfx_RM3_ALPHATEST[]; +extern Gfx Gfx_RM3_SURFACE_XLU[]; +extern Gfx Gfx_RM3_DECAL_XLU[]; +extern Gfx Gfx_RM3_INTERSECTING_XLU[]; s32 step_entity_model_commandlist(EntityModel* entityModel); void free_entity_model_by_ref(EntityModel* entityModel); @@ -60,13 +60,13 @@ void clear_entity_models(void) { (*gCurrentEntityModelList)[i] = NULL; } + gEntityModelCount = 0; + entity_fog_enabled = 0; entity_fog_red = 10; entity_fog_green = 10; entity_fog_blue = 10; - entity_fog_alpha = 10; + entity_fog_alpha = 10; entity_fog_dist_min = 800; - gEntityModelCount = 0; - entity_fog_enabled = 0; entity_fog_dist_max = 1000; } @@ -79,18 +79,19 @@ void init_entity_models(void) { gCurrentEntityModelList = &gBattleEntityModelList; } + gEntityModelCount = 0; + entity_fog_enabled = 0; entity_fog_red = 10; entity_fog_green = 10; entity_fog_blue = 10; entity_fog_alpha = 10; entity_fog_dist_min = 800; - gEntityModelCount = 0; - entity_fog_enabled = 0; entity_fog_dist_max = 1000; } s32 load_entity_model(EntityModelScript* cmdList) { EntityModel* newEntityModel; + s32* entityModelCount; s32 i; for (i = 0; i < MAX_ENTITY_MODELS; i++) { @@ -100,12 +101,10 @@ s32 load_entity_model(EntityModelScript* cmdList) { } ASSERT(i < MAX_ENTITY_MODELS); - { - s32* entityModelCount; - (*gCurrentEntityModelList)[i] = newEntityModel = heap_malloc(sizeof(*newEntityModel)); - entityModelCount = &gEntityModelCount; - (*entityModelCount)++; - } + (*gCurrentEntityModelList)[i] = newEntityModel = heap_malloc(sizeof(*newEntityModel)); + entityModelCount = &gEntityModelCount; + (*entityModelCount)++; + ASSERT(newEntityModel != NULL); newEntityModel->flags = (ENTITY_MODEL_FLAG_CAM0 | ENTITY_MODEL_FLAG_CAM1 | ENTITY_MODEL_FLAG_CAM2 | ENTITY_MODEL_FLAG_ENABLED); @@ -194,33 +193,33 @@ s32 step_entity_model_commandlist(EntityModel* entityModel) { u32* curPos = *entityModel->cmdListReadPos; switch (*curPos++) { - case 0: // kill model + case ENTITY_MODEL_SCRIPT_OP_End: // kill model free_entity_model_by_ref(entityModel); return 1; - case 1: // set display list ptr + case ENTITY_MODEL_SCRIPT_OP_Draw: // set display list ptr entityModel->nextFrameTime = (f32) *curPos++; entityModel->gfx.displayList = (Gfx*) *curPos++; entityModel->cmdListReadPos = (EntityModelScript*) curPos; break; - case 2: // restore saved position + case ENTITY_MODEL_SCRIPT_OP_Restart: // restore saved position entityModel->cmdListReadPos = entityModel->cmdListSavedPos; return 1; - case 3: // set saved position + case ENTITY_MODEL_SCRIPT_OP_Loop: // set saved position entityModel->cmdListReadPos = entityModel->cmdListSavedPos = (EntityModelScript*) curPos; return 1; - case 4: // set render mode + case ENTITY_MODEL_SCRIPT_OP_SetRenderMode: // set render mode entityModel->renderMode = *curPos++; entityModel->cmdListReadPos = (EntityModelScript*) curPos; return 1; - case 5: // set flags + case ENTITY_MODEL_SCRIPT_OP_SetFlags: // set flags entityModel->flags |= *curPos++; entityModel->cmdListReadPos = (EntityModelScript*) curPos; return 1; - case 6: // clear flags + case ENTITY_MODEL_SCRIPT_OP_ClearFlags: // clear flags entityModel->flags &= ~*curPos++; entityModel->cmdListReadPos = (EntityModelScript*) curPos; return 1; - case 7: // set image data + case ENTITY_MODEL_SCRIPT_OP_DrawImage: // set image data imageData = entityModel->gfx.imageData; entityModel->nextFrameTime = *curPos++; imageData->raster = (u8*)*curPos++; @@ -251,8 +250,6 @@ void appendGfx_entity_model(EntityModel* model) { gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (!(model->flags & ENTITY_MODEL_FLAG_USE_IMAGE)) { if (!(model->flags & ENTITY_MODEL_FLAG_10000)) { - s32 cond; - gDPPipeSync(gMainGfxPos++); gDPSetRenderMode(gMainGfxPos++, G_RM_TEX_EDGE, G_RM_TEX_EDGE2); gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, 255); @@ -260,89 +257,85 @@ void appendGfx_entity_model(EntityModel* model) { gDPSetAlphaCompare(gMainGfxPos++, G_AC_NONE); gSPSetOtherMode(gMainGfxPos++, G_SETOTHERMODE_H, G_MDSFT_ALPHADITHER, 18, G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_POINT | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE); - cond = FALSE; - if (entity_fog_enabled && !(model->flags & ENTITY_MODEL_FLAG_FOG_DISABLED)) { - cond = TRUE; - } - switch (cond) { + switch (entity_fog_enabled && !(model->flags & ENTITY_MODEL_FLAG_FOG_DISABLED)) { case FALSE: switch (model->renderMode) { case RENDER_MODE_SURFACE_OPA: - gSPDisplayList(gMainGfxPos++, D_8014B7F8); + gSPDisplayList(gMainGfxPos++, Gfx_RM1_SURFACE_OPA); break; case RENDER_MODE_DECAL_OPA: - gSPDisplayList(gMainGfxPos++, D_8014B820); + gSPDisplayList(gMainGfxPos++, Gfx_RM1_DECAL_OPA); break; case RENDER_MODE_INTERSECTING_OPA: - gSPDisplayList(gMainGfxPos++, D_8014B848); + gSPDisplayList(gMainGfxPos++, Gfx_RM1_INTERSECTING_OPA); break; case RENDER_MODE_ALPHATEST: - gSPDisplayList(gMainGfxPos++, D_8014B870); + gSPDisplayList(gMainGfxPos++, Gfx_RM1_ALPHATEST); break; case RENDER_MODE_SURFACE_XLU_LAYER1: case RENDER_MODE_SURFACE_XLU_LAYER2: case RENDER_MODE_SURFACE_XLU_LAYER3: - gSPDisplayList(gMainGfxPos++, D_8014B898); + gSPDisplayList(gMainGfxPos++, Gfx_RM1_SURFACE_XLU); break; case RENDER_MODE_SURFACE_XLU_NO_AA: - gSPDisplayList(gMainGfxPos++, D_8014B9B0); + gSPDisplayList(gMainGfxPos++, Gfx_RM1_SURFACE_XLU_NO_AA); break; case RENDER_MODE_DECAL_XLU: - case RENDER_MODE_1E: - gSPDisplayList(gMainGfxPos++, D_8014B8C0); + case RENDER_MODE_DECAL_XLU_AHEAD: + gSPDisplayList(gMainGfxPos++, Gfx_RM1_DECAL_XLU); break; - case RENDER_MODE_DECAL_XLU_NOAA: + case RENDER_MODE_DECAL_XLU_NO_AA: case RENDER_MODE_SHADOW: - gSPDisplayList(gMainGfxPos++, D_8014B9D8); + gSPDisplayList(gMainGfxPos++, Gfx_RM1_DECAL_XLU_NO_AA); break; case RENDER_MODE_INTERSECTING_XLU: - gSPDisplayList(gMainGfxPos++, D_8014B8E8); + gSPDisplayList(gMainGfxPos++, Gfx_RM1_INTERSECTING_XLU); break; - case RENDER_MODE_28: - gSPDisplayList(gMainGfxPos++, D_8014BA00); + case RENDER_MODE_PASS_THROUGH: + gSPDisplayList(gMainGfxPos++, Gfx_RM1_PASS_THROUGH); break; case RENDER_MODE_ALPHATEST_ONESIDED: - gSPDisplayList(gMainGfxPos++, D_8014B988); + gSPDisplayList(gMainGfxPos++, Gfx_RM1_ALPHATEST_ONESIDED); break; case RENDER_MODE_SURFACE_OPA_NO_ZB: - case RENDER_MODE_2A: - gSPDisplayList(gMainGfxPos++, D_8014BA48); + case RENDER_MODE_SURFACE_OPA_NO_ZB_BEHIND: + gSPDisplayList(gMainGfxPos++, Gfx_RM1_SURFACE_OPA_NO_ZB); break; case RENDER_MODE_ALPHATEST_NO_ZB: - case RENDER_MODE_2B: - gSPDisplayList(gMainGfxPos++, D_8014BA70); + case RENDER_MODE_ALPHATEST_NO_ZB_BEHIND: + gSPDisplayList(gMainGfxPos++, Gfx_RM1_ALPHATEST_NO_ZB); break; case RENDER_MODE_SURFACE_XLU_NO_ZB: - case RENDER_MODE_2C: - gSPDisplayList(gMainGfxPos++, D_8014BA98); + case RENDER_MODE_SURFACE_XLU_NO_ZB_BEHIND: + gSPDisplayList(gMainGfxPos++, Gfx_RM1_SURFACE_XLU_NO_ZB); break; - case RENDER_MODE_2D: - gSPDisplayList(gMainGfxPos++, D_8014BAE8); + case RENDER_MODE_CLOUD_NO_ZCMP: + gSPDisplayList(gMainGfxPos++, Gfx_RM1_CLOUD_NO_ZCMP); break; } break; case TRUE: switch (model->renderMode) { case RENDER_MODE_SURFACE_OPA: - gSPDisplayList(gMainGfxPos++, D_8014BE78); + gSPDisplayList(gMainGfxPos++, Gfx_RM3_SURFACE_OPA); break; case RENDER_MODE_DECAL_OPA: - gSPDisplayList(gMainGfxPos++, D_8014BEA0); + gSPDisplayList(gMainGfxPos++, Gfx_RM3_DECAL_OPA); break; case RENDER_MODE_INTERSECTING_OPA: - gSPDisplayList(gMainGfxPos++, D_8014BEC8); + gSPDisplayList(gMainGfxPos++, Gfx_RM3_INTERSECTING_OPA); break; case RENDER_MODE_ALPHATEST: - gSPDisplayList(gMainGfxPos++, D_8014BEF0); + gSPDisplayList(gMainGfxPos++, Gfx_RM3_ALPHATEST); break; case RENDER_MODE_SURFACE_XLU_LAYER1: - gSPDisplayList(gMainGfxPos++, D_8014BF18); + gSPDisplayList(gMainGfxPos++, Gfx_RM3_SURFACE_XLU); break; case RENDER_MODE_DECAL_XLU: - gSPDisplayList(gMainGfxPos++, D_8014BF40); + gSPDisplayList(gMainGfxPos++, Gfx_RM3_DECAL_XLU); break; case RENDER_MODE_INTERSECTING_XLU: - gSPDisplayList(gMainGfxPos++, D_8014BF68); + gSPDisplayList(gMainGfxPos++, Gfx_RM3_INTERSECTING_XLU); break; } gDPSetFogColor(gMainGfxPos++, entity_fog_red, entity_fog_green, entity_fog_blue, entity_fog_alpha); @@ -418,8 +411,8 @@ void draw_entity_model_A(s32 modelIdx, Mtx* transformMtx) { f32 x, y, z, w; f32 inX, inY, inZ; - if ((!gGameStatusPtr->isBattle) || (modelIdx & 0x800)) { - modelIdx &= ~0x800; + if ((!gGameStatusPtr->isBattle) || (modelIdx & BATTLE_ENTITY_ID_BIT)) { + modelIdx &= ~BATTLE_ENTITY_ID_BIT; model = (*gCurrentEntityModelList)[modelIdx]; if (model != NULL) { @@ -456,8 +449,8 @@ void draw_entity_model_B(s32 modelIdx, Mtx* transformMtx, s32 vertexSegment, Vec f32 x, y, z, w; f32 inX, inY, inZ; - if ((!gGameStatusPtr->isBattle) || (modelIdx & 0x800)) { - modelIdx &= ~0x800; + if ((!gGameStatusPtr->isBattle) || (modelIdx & BATTLE_ENTITY_ID_BIT)) { + modelIdx &= ~BATTLE_ENTITY_ID_BIT; model = (*gCurrentEntityModelList)[modelIdx]; if (model != NULL) { @@ -491,8 +484,8 @@ void draw_entity_model_C(s32 modelIdx, Mtx* transformMtx) { RenderTask rt; RenderTask* rtPtr = &rt; - if ((!gGameStatusPtr->isBattle) || (modelIdx & 0x800)) { - modelIdx &= ~0x800; + if ((!gGameStatusPtr->isBattle) || (modelIdx & BATTLE_ENTITY_ID_BIT)) { + modelIdx &= ~BATTLE_ENTITY_ID_BIT; model = (*gCurrentEntityModelList)[modelIdx]; if (model != NULL) { @@ -521,8 +514,8 @@ void draw_entity_model_D(s32 modelIdx, Mtx* transformMtx, s32 arg2, Vec3s* verte RenderTask rt; RenderTask* rtPtr = &rt; - if ((!gGameStatusPtr->isBattle) || (modelIdx & 0x800)) { - modelIdx &= ~0x800; + if ((!gGameStatusPtr->isBattle) || (modelIdx & BATTLE_ENTITY_ID_BIT)) { + modelIdx &= ~BATTLE_ENTITY_ID_BIT; model = (*gCurrentEntityModelList)[modelIdx]; if (model != NULL) { @@ -548,7 +541,7 @@ void draw_entity_model_D(s32 modelIdx, Mtx* transformMtx, s32 arg2, Vec3s* verte } void draw_entity_model_E(s32 modelIdx, Mtx* transformMtx) { - EntityModel* model = (*gCurrentEntityModelList)[modelIdx & ~0x800]; + EntityModel* model = (*gCurrentEntityModelList)[modelIdx & ~BATTLE_ENTITY_ID_BIT]; Matrix4f mtx; Matrix4f mtx2; ImgFXTexture ifxImg; @@ -578,89 +571,85 @@ void draw_entity_model_E(s32 modelIdx, Mtx* transformMtx) { gDisplayContext->matrixStack[gMatrixListPos] = model->transform; gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (!(model->flags & ENTITY_MODEL_FLAG_USE_IMAGE)) { - s32 cond = FALSE; - if (entity_fog_enabled && !(model->flags & ENTITY_MODEL_FLAG_FOG_DISABLED)) { - cond = TRUE; - } - switch (cond) { + switch (entity_fog_enabled && !(model->flags & ENTITY_MODEL_FLAG_FOG_DISABLED)) { case FALSE: switch (model->renderMode) { case RENDER_MODE_SURFACE_OPA: - gSPDisplayList(gMainGfxPos++, D_8014B7F8); + gSPDisplayList(gMainGfxPos++, Gfx_RM1_SURFACE_OPA); break; case RENDER_MODE_DECAL_OPA: - gSPDisplayList(gMainGfxPos++, D_8014B820); + gSPDisplayList(gMainGfxPos++, Gfx_RM1_DECAL_OPA); break; case RENDER_MODE_INTERSECTING_OPA: - gSPDisplayList(gMainGfxPos++, D_8014B848); + gSPDisplayList(gMainGfxPos++, Gfx_RM1_INTERSECTING_OPA); break; case RENDER_MODE_ALPHATEST: - gSPDisplayList(gMainGfxPos++, D_8014B870); + gSPDisplayList(gMainGfxPos++, Gfx_RM1_ALPHATEST); break; case RENDER_MODE_SURFACE_XLU_LAYER1: case RENDER_MODE_SURFACE_XLU_LAYER2: case RENDER_MODE_SURFACE_XLU_LAYER3: - gSPDisplayList(gMainGfxPos++, D_8014B898); + gSPDisplayList(gMainGfxPos++, Gfx_RM1_SURFACE_XLU); break; case RENDER_MODE_SURFACE_XLU_NO_AA: - gSPDisplayList(gMainGfxPos++, D_8014B9B0); + gSPDisplayList(gMainGfxPos++, Gfx_RM1_SURFACE_XLU_NO_AA); break; case RENDER_MODE_DECAL_XLU: - case RENDER_MODE_1E: - gSPDisplayList(gMainGfxPos++, D_8014B8C0); + case RENDER_MODE_DECAL_XLU_AHEAD: + gSPDisplayList(gMainGfxPos++, Gfx_RM1_DECAL_XLU); break; - case RENDER_MODE_DECAL_XLU_NOAA: + case RENDER_MODE_DECAL_XLU_NO_AA: case RENDER_MODE_SHADOW: - gSPDisplayList(gMainGfxPos++, D_8014B9D8); + gSPDisplayList(gMainGfxPos++, Gfx_RM1_DECAL_XLU_NO_AA); break; case RENDER_MODE_INTERSECTING_XLU: - gSPDisplayList(gMainGfxPos++, D_8014B8E8); + gSPDisplayList(gMainGfxPos++, Gfx_RM1_INTERSECTING_XLU); break; - case RENDER_MODE_28: - gSPDisplayList(gMainGfxPos++, D_8014BA00); + case RENDER_MODE_PASS_THROUGH: + gSPDisplayList(gMainGfxPos++, Gfx_RM1_PASS_THROUGH); break; case RENDER_MODE_ALPHATEST_ONESIDED: - gSPDisplayList(gMainGfxPos++, D_8014B988); + gSPDisplayList(gMainGfxPos++, Gfx_RM1_ALPHATEST_ONESIDED); break; case RENDER_MODE_SURFACE_OPA_NO_ZB: - case RENDER_MODE_2A: - gSPDisplayList(gMainGfxPos++, D_8014BA48); + case RENDER_MODE_SURFACE_OPA_NO_ZB_BEHIND: + gSPDisplayList(gMainGfxPos++, Gfx_RM1_SURFACE_OPA_NO_ZB); break; case RENDER_MODE_ALPHATEST_NO_ZB: - case RENDER_MODE_2B: - gSPDisplayList(gMainGfxPos++, D_8014BA70); + case RENDER_MODE_ALPHATEST_NO_ZB_BEHIND: + gSPDisplayList(gMainGfxPos++, Gfx_RM1_ALPHATEST_NO_ZB); break; case RENDER_MODE_SURFACE_XLU_NO_ZB: - case RENDER_MODE_2C: - gSPDisplayList(gMainGfxPos++, D_8014BA98); + case RENDER_MODE_SURFACE_XLU_NO_ZB_BEHIND: + gSPDisplayList(gMainGfxPos++, Gfx_RM1_SURFACE_XLU_NO_ZB); break; - case RENDER_MODE_2D: - gSPDisplayList(gMainGfxPos++, D_8014BAE8); + case RENDER_MODE_CLOUD_NO_ZCMP: + gSPDisplayList(gMainGfxPos++, Gfx_RM1_CLOUD_NO_ZCMP); break; } break; case TRUE: switch (model->renderMode) { case RENDER_MODE_SURFACE_OPA: - gSPDisplayList(gMainGfxPos++, D_8014BE78); + gSPDisplayList(gMainGfxPos++, Gfx_RM3_SURFACE_OPA); break; case RENDER_MODE_DECAL_OPA: - gSPDisplayList(gMainGfxPos++, D_8014BEA0); + gSPDisplayList(gMainGfxPos++, Gfx_RM3_DECAL_OPA); break; case RENDER_MODE_INTERSECTING_OPA: - gSPDisplayList(gMainGfxPos++, D_8014BEC8); + gSPDisplayList(gMainGfxPos++, Gfx_RM3_INTERSECTING_OPA); break; case RENDER_MODE_ALPHATEST: - gSPDisplayList(gMainGfxPos++, D_8014BEF0); + gSPDisplayList(gMainGfxPos++, Gfx_RM3_ALPHATEST); break; case RENDER_MODE_SURFACE_XLU_LAYER1: - gSPDisplayList(gMainGfxPos++, D_8014BF18); + gSPDisplayList(gMainGfxPos++, Gfx_RM3_SURFACE_XLU); break; case RENDER_MODE_DECAL_XLU: - gSPDisplayList(gMainGfxPos++, D_8014BF40); + gSPDisplayList(gMainGfxPos++, Gfx_RM3_DECAL_XLU); break; case RENDER_MODE_INTERSECTING_XLU: - gSPDisplayList(gMainGfxPos++, D_8014BF68); + gSPDisplayList(gMainGfxPos++, Gfx_RM3_INTERSECTING_XLU); break; } gDPSetFogColor(gMainGfxPos++, entity_fog_red, entity_fog_green, entity_fog_blue, entity_fog_alpha); diff --git a/src/evt/map_api.c b/src/evt/map_api.c index 3ba9b86d17..81e4db9e39 100644 --- a/src/evt/map_api.c +++ b/src/evt/map_api.c @@ -5,7 +5,7 @@ extern LavaReset* gLavaResetList; extern s32 LastSafeFloor; -extern ModelTreeInfoList* mdl_currentModelTreeNodeInfo; +extern ModelTreeInfoList* gCurrentModelTreeNodeInfo; ApiStatus TranslateModel(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; @@ -293,17 +293,17 @@ void apply_transform_to_children(ApiStatus (*apiFunc)(Evt*, s32), Evt* script) { firstChild = -1; parentModelID = evt_get_variable(script, *script->ptrReadPos); - modelIndex = (*mdl_currentModelTreeNodeInfo)[parentModelID].modelIndex; + modelIndex = (*gCurrentModelTreeNodeInfo)[parentModelID].modelIndex; lastChild = -1; if (modelIndex < 0xFF) { firstChild = lastChild = modelIndex; } else { - s32 treeDepth = (*mdl_currentModelTreeNodeInfo)[parentModelID].treeDepth; + s32 treeDepth = (*gCurrentModelTreeNodeInfo)[parentModelID].treeDepth; // check all models with a lowerID in the tree for (i = parentModelID - 1; i >= 0; i--) { - childModelInfo = &(*mdl_currentModelTreeNodeInfo)[i]; + childModelInfo = &(*gCurrentModelTreeNodeInfo)[i]; if (treeDepth < childModelInfo->treeDepth) { s32 childModelIndex = childModelInfo->modelIndex; diff --git a/src/inventory.c b/src/inventory.c index d40d93f74e..85d18e85e9 100644 --- a/src/inventory.c +++ b/src/inventory.c @@ -1162,7 +1162,7 @@ void update_coin_counter(void) { if (statusBar->unk_6D != 0) { statusBar->unk_6D--; - if ((statusBar->unk_6D == 0) && (statusBar->iconIndex12 >= 0)) { + if ((statusBar->unk_6D == 0) && (statusBar->iconIndex12 > -1)) { hud_element_free(statusBar->iconIndex12); hud_element_free(statusBar->iconIndex13); statusBar->iconIndex12 = -1; diff --git a/src/item_entity.c b/src/item_entity.c index 45d72a4d79..695b155bc2 100644 --- a/src/item_entity.c +++ b/src/item_entity.c @@ -20,8 +20,8 @@ extern Addr icon_ROM_START; extern SparkleScript SparkleScript_Coin; -extern Gfx D_8014B870[]; -extern Gfx D_8014BBD8[]; +extern Gfx Gfx_RM1_ALPHATEST[]; +extern Gfx Gfx_RM2_ALPHATEST[]; extern Lights1 ItemEntityLights; extern HudCacheEntry* gHudElementCacheTableRaster; @@ -946,9 +946,9 @@ void appendGfx_item_entity(void* data) { G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (gSpriteShadingProfile->flags != 0) { - gSPDisplayList(gMainGfxPos++, D_8014BBD8); + gSPDisplayList(gMainGfxPos++, Gfx_RM2_ALPHATEST); } else { - gSPDisplayList(gMainGfxPos++, D_8014B870); + gSPDisplayList(gMainGfxPos++, Gfx_RM1_ALPHATEST); } gSPClearGeometryMode(gMainGfxPos++, G_CULL_BOTH | G_LIGHTING); gSPDisplayList(gMainGfxPos++, D_8014C620); @@ -1153,9 +1153,9 @@ void render_item_entities(void) { gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (gSpriteShadingProfile->flags != 0) { - gSPDisplayList(gMainGfxPos++, D_8014BBD8); + gSPDisplayList(gMainGfxPos++, Gfx_RM2_ALPHATEST); } else { - gSPDisplayList(gMainGfxPos++, D_8014B870); + gSPDisplayList(gMainGfxPos++, Gfx_RM1_ALPHATEST); } gSPClearGeometryMode(gMainGfxPos++, G_LIGHTING); gSPDisplayList(gMainGfxPos++, D_8014C620); diff --git a/src/level_up.c b/src/level_up.c index 1281d4ff50..14a048bb2e 100644 --- a/src/level_up.c +++ b/src/level_up.c @@ -307,7 +307,7 @@ Gfx D_802A7A88_7A59C8[] = { #include "level_up/select_one_to_upgrade.png.inc.c" #include "level_up/select_one_to_upgrade.pal.inc.c" -EntityModelScript EMS_level_up = STANDARD_ENTITY_MODEL_SCRIPT(D_802A7A88_7A59C8, RENDER_MODE_2D); +EntityModelScript EMS_level_up = STANDARD_ENTITY_MODEL_SCRIPT(D_802A7A88_7A59C8, RENDER_MODE_CLOUD_NO_ZCMP); HudScript HES_level_up_heart = HES_TEMPLATE_CI_ENUM_SIZE(level_up_heart, 40, 40); HudScript HES_level_up_heart_copy = HES_TEMPLATE_CI_ENUM_SIZE(level_up_heart, 40, 40); diff --git a/src/model.c b/src/model.c index b7007fd532..fdf8b2ce8a 100644 --- a/src/model.c +++ b/src/model.c @@ -11,7 +11,7 @@ SHIFT_BSS u8* gBackgroundFogModePtr; SHIFT_BSS ModelList* gCurrentModels; -SHIFT_BSS ModelTreeInfoList* mdl_currentModelTreeNodeInfo; +SHIFT_BSS ModelTreeInfoList* gCurrentModelTreeNodeInfo; extern Addr MapTextureMemory; @@ -22,135 +22,134 @@ typedef struct Fog { /* 0x18 */ s32 endDistance; } Fog; // size = 0x1C -extern Gfx D_8014B7F8[]; -extern Gfx D_8014B820[]; -extern Gfx D_8014B848[]; -extern Gfx D_8014B870[]; -extern Gfx D_8014B898[]; -extern Gfx D_8014B8C0[]; -extern Gfx D_8014B8E8[]; -extern Gfx D_8014B910[]; -extern Gfx D_8014B938[]; -extern Gfx D_8014B960[]; -extern Gfx D_8014B988[]; -extern Gfx D_8014B9B0[]; -extern Gfx D_8014B9D8[]; -extern Gfx D_8014BA00[]; -extern Gfx D_8014BA20[]; -extern Gfx D_8014BA48[]; -extern Gfx D_8014BA70[]; -extern Gfx D_8014BA98[]; -extern Gfx D_8014BAC0[]; -extern Gfx D_8014BAE8[]; -extern Gfx D_8014BB10[]; -extern Gfx D_8014BB38[]; -extern Gfx D_8014BB60[]; -extern Gfx D_8014BB88[]; -extern Gfx D_8014BBB0[]; -extern Gfx D_8014BBD8[]; -extern Gfx D_8014BC00[]; -extern Gfx D_8014BC28[]; -extern Gfx D_8014BC50[]; -extern Gfx D_8014BC78[]; -extern Gfx D_8014BCA0[]; -extern Gfx D_8014BCC8[]; -extern Gfx D_8014BCF8[]; -extern Gfx D_8014BD18[]; -extern Gfx D_8014BD40[]; -extern Gfx D_8014BD68[]; -extern Gfx D_8014BD88[]; -extern Gfx D_8014BDB0[]; -extern Gfx D_8014BDD8[]; -extern Gfx D_8014BE00[]; -extern Gfx D_8014BE28[]; -extern Gfx D_8014BE50[]; -extern Gfx D_8014BE78[]; -extern Gfx D_8014BEA0[]; -extern Gfx D_8014BEC8[]; -extern Gfx D_8014BEF0[]; -extern Gfx D_8014BF18[]; -extern Gfx D_8014BF40[]; -extern Gfx D_8014BF68[]; -extern Gfx D_8014BF90[]; -extern Gfx D_8014BFB8[]; -extern Gfx D_8014BFE0[]; -extern Gfx D_8014C008[]; -extern Gfx D_8014C028[]; -extern Gfx D_8014C050[]; -extern Gfx D_8014C078[]; -extern Gfx D_8014C098[]; -extern Gfx D_8014C0C0[]; -extern Gfx D_8014C0E8[]; -extern Gfx D_8014C110[]; -extern Gfx D_8014C138[]; -extern Gfx D_8014C160[]; +extern Gfx Gfx_RM1_SURFACE_OPA[]; +extern Gfx Gfx_RM1_DECAL_OPA[]; +extern Gfx Gfx_RM1_INTERSECTING_OPA[]; +extern Gfx Gfx_RM1_ALPHATEST[]; +extern Gfx Gfx_RM1_SURFACE_XLU[]; +extern Gfx Gfx_RM1_DECAL_XLU[]; +extern Gfx Gfx_RM1_INTERSECTING_XLU[]; +extern Gfx Gfx_RM1_SURFACE_OPA_NO_AA[]; +extern Gfx Gfx_RM1_DECAL_OPA_NO_AA[]; +extern Gfx Gfx_RM1_INTERSECTING_OPA_NO_AA[]; +extern Gfx Gfx_RM1_ALPHATEST_ONESIDED[]; +extern Gfx Gfx_RM1_SURFACE_XLU_NO_AA[]; +extern Gfx Gfx_RM1_DECAL_XLU_NO_AA[]; +extern Gfx Gfx_RM1_PASS_THROUGH[]; +extern Gfx Gfx_RM1_SURFACE_XLU_AA_ZB_ZUPD[]; +extern Gfx Gfx_RM1_SURFACE_OPA_NO_ZB[]; +extern Gfx Gfx_RM1_ALPHATEST_NO_ZB[]; +extern Gfx Gfx_RM1_SURFACE_XLU_NO_ZB[]; +extern Gfx Gfx_RM1_SURFACE_XLU_ZB_ZUPD[]; +extern Gfx Gfx_RM1_CLOUD_NO_ZCMP[]; +extern Gfx Gfx_RM1_CLOUD[]; +extern Gfx Gfx_RM1_CLOUD_NO_ZB[]; +extern Gfx Gfx_RM2_SURFACE_OPA[]; +extern Gfx Gfx_RM2_DECAL_OPA[]; +extern Gfx Gfx_RM2_INTERSECTING_OPA[]; +extern Gfx Gfx_RM2_ALPHATEST[]; +extern Gfx Gfx_RM2_SURFACE_XLU[]; +extern Gfx Gfx_RM2_DECAL_XLU[]; +extern Gfx Gfx_RM2_INTERSECTING_XLU[]; +extern Gfx Gfx_RM2_SURFACE_OPA_NO_AA[]; +extern Gfx Gfx_RM2_DECAL_OPA_NO_AA[]; +extern Gfx Gfx_RM2_INTERSECTING_OPA_NO_AA[]; +extern Gfx Gfx_RM2_ALPHATEST_ONESIDED[]; +extern Gfx Gfx_RM2_SURFACE_XLU_NO_AA[]; +extern Gfx Gfx_RM2_DECAL_XLU_NO_AA[]; +extern Gfx Gfx_RM2_PASS_THROUGH[]; +extern Gfx Gfx_RM2_SURFACE_XLU_AA_ZB_ZUPD[]; +extern Gfx Gfx_RM2_SURFACE_OPA_NO_ZB[]; +extern Gfx Gfx_RM2_ALPHATEST_NO_ZB[]; +extern Gfx Gfx_RM2_SURFACE_XLU_NO_ZB[]; +extern Gfx Gfx_RM2_CLOUD[]; +extern Gfx Gfx_RM2_CLOUD_NO_ZB[]; +extern Gfx Gfx_RM3_SURFACE_OPA[]; +extern Gfx Gfx_RM3_DECAL_OPA[]; +extern Gfx Gfx_RM3_INTERSECTING_OPA[]; +extern Gfx Gfx_RM3_ALPHATEST[]; +extern Gfx Gfx_RM3_SURFACE_XLU[]; +extern Gfx Gfx_RM3_DECAL_XLU[]; +extern Gfx Gfx_RM3_INTERSECTING_XLU[]; +extern Gfx Gfx_RM3_SURFACE_OPA_NO_AA[]; +extern Gfx Gfx_RM3_DECAL_OPA_NO_AA[]; +extern Gfx Gfx_RM3_INTERSECTING_OPA_NO_AA[]; +extern Gfx Gfx_RM3_ALPHATEST_ONESIDED[]; +extern Gfx Gfx_RM3_SURFACE_XLU_NO_AA[]; +extern Gfx Gfx_RM3_DECAL_XLU_NO_AA[]; +extern Gfx Gfx_RM3_PASS_THROUGH[]; +extern Gfx Gfx_RM3_SURFACE_XLU_AA_ZB_ZUPD[]; +extern Gfx Gfx_RM3_SURFACE_OPA_NO_ZB[]; +extern Gfx Gfx_RM3_ALPHATEST_NO_ZB[]; +extern Gfx Gfx_RM3_SURFACE_XLU_NO_ZB[]; +extern Gfx Gfx_RM3_CLOUD[]; +extern Gfx Gfx_RM3_CLOUD_NO_ZB[]; Gfx* ModelRenderModes[] = { - [RENDER_MODE_IDX_00] D_8014B7F8, - [RENDER_MODE_IDX_01] D_8014B910, - [RENDER_MODE_IDX_02] D_8014B820, - [RENDER_MODE_IDX_03] D_8014B938, - [RENDER_MODE_IDX_04] D_8014B848, - [RENDER_MODE_IDX_05] D_8014B960, - [RENDER_MODE_IDX_06] D_8014B870, - [RENDER_MODE_IDX_07] D_8014B988, - [RENDER_MODE_IDX_08] D_8014B898, - [RENDER_MODE_IDX_09] D_8014BA20, - [RENDER_MODE_IDX_0A] D_8014B9B0, - [RENDER_MODE_IDX_0B] D_8014BAC0, - [RENDER_MODE_IDX_0C] D_8014B8C0, - [RENDER_MODE_IDX_0D] D_8014B9D8, - [RENDER_MODE_IDX_0E] D_8014B8E8, - [RENDER_MODE_IDX_0F] D_8014BA00, - [RENDER_MODE_IDX_10] D_8014BB60, - [RENDER_MODE_IDX_11] D_8014BC78, - [RENDER_MODE_IDX_12] D_8014BB88, - [RENDER_MODE_IDX_13] D_8014BCA0, - [RENDER_MODE_IDX_14] D_8014BBB0, - [RENDER_MODE_IDX_15] D_8014BCC8, - [RENDER_MODE_IDX_16] D_8014BBD8, - [RENDER_MODE_IDX_17] D_8014BCF8, - [RENDER_MODE_IDX_18] D_8014BC00, - [RENDER_MODE_IDX_19] D_8014BD88, - [RENDER_MODE_IDX_1A] D_8014BD18, - [RENDER_MODE_IDX_1B] D_8014BC28, - [RENDER_MODE_IDX_1C] D_8014BD40, - [RENDER_MODE_IDX_1D] D_8014BC50, - [RENDER_MODE_IDX_1E] D_8014BD68, - [RENDER_MODE_IDX_1F] D_8014BE78, - [RENDER_MODE_IDX_20] D_8014BF90, - [RENDER_MODE_IDX_21] D_8014BEA0, - [RENDER_MODE_IDX_22] D_8014BFB8, - [RENDER_MODE_IDX_23] D_8014BEC8, - [RENDER_MODE_IDX_24] D_8014BFE0, - [RENDER_MODE_IDX_25] D_8014BEF0, - [RENDER_MODE_IDX_26] D_8014C008, - [RENDER_MODE_IDX_27] D_8014BF18, - [RENDER_MODE_IDX_28] D_8014C098, - [RENDER_MODE_IDX_29] D_8014C028, - [RENDER_MODE_IDX_2A] D_8014BF40, - [RENDER_MODE_IDX_2B] D_8014C050, - [RENDER_MODE_IDX_2C] D_8014BF68, - [RENDER_MODE_IDX_2D] D_8014C078, - [RENDER_MODE_IDX_2E] D_8014BA48, - [RENDER_MODE_IDX_2F] D_8014BA70, - [RENDER_MODE_IDX_30] D_8014BA98, - [RENDER_MODE_IDX_31] D_8014BDB0, - [RENDER_MODE_IDX_32] D_8014BDD8, - [RENDER_MODE_IDX_33] D_8014BE00, - [RENDER_MODE_IDX_34] D_8014C0C0, - [RENDER_MODE_IDX_35] D_8014C0E8, - [RENDER_MODE_IDX_36] D_8014C110, - [RENDER_MODE_IDX_37] D_8014BB10, - [RENDER_MODE_IDX_38] D_8014BB38, - [RENDER_MODE_IDX_39] D_8014BE28, - [RENDER_MODE_IDX_3A] D_8014BE50, - [RENDER_MODE_IDX_3B] D_8014C138, - [RENDER_MODE_IDX_3C] D_8014C160, - [RENDER_MODE_IDX_3D] NULL + [RENDER_MODE_IDX_00] Gfx_RM1_SURFACE_OPA, + [RENDER_MODE_IDX_01] Gfx_RM1_SURFACE_OPA_NO_AA, + [RENDER_MODE_IDX_02] Gfx_RM1_DECAL_OPA, + [RENDER_MODE_IDX_03] Gfx_RM1_DECAL_OPA_NO_AA, + [RENDER_MODE_IDX_04] Gfx_RM1_INTERSECTING_OPA, + [RENDER_MODE_IDX_05] Gfx_RM1_INTERSECTING_OPA_NO_AA, + [RENDER_MODE_IDX_06] Gfx_RM1_ALPHATEST, + [RENDER_MODE_IDX_07] Gfx_RM1_ALPHATEST_ONESIDED, + [RENDER_MODE_IDX_08] Gfx_RM1_SURFACE_XLU, + [RENDER_MODE_IDX_09] Gfx_RM1_SURFACE_XLU_AA_ZB_ZUPD, + [RENDER_MODE_IDX_0A] Gfx_RM1_SURFACE_XLU_NO_AA, + [RENDER_MODE_IDX_0B] Gfx_RM1_SURFACE_XLU_ZB_ZUPD, + [RENDER_MODE_IDX_0C] Gfx_RM1_DECAL_XLU, + [RENDER_MODE_IDX_0D] Gfx_RM1_DECAL_XLU_NO_AA, + [RENDER_MODE_IDX_0E] Gfx_RM1_INTERSECTING_XLU, + [RENDER_MODE_IDX_0F] Gfx_RM1_PASS_THROUGH, + [RENDER_MODE_IDX_10] Gfx_RM2_SURFACE_OPA, + [RENDER_MODE_IDX_11] Gfx_RM2_SURFACE_OPA_NO_AA, + [RENDER_MODE_IDX_12] Gfx_RM2_DECAL_OPA, + [RENDER_MODE_IDX_13] Gfx_RM2_DECAL_OPA_NO_AA, + [RENDER_MODE_IDX_14] Gfx_RM2_INTERSECTING_OPA, + [RENDER_MODE_IDX_15] Gfx_RM2_INTERSECTING_OPA_NO_AA, + [RENDER_MODE_IDX_16] Gfx_RM2_ALPHATEST, + [RENDER_MODE_IDX_17] Gfx_RM2_ALPHATEST_ONESIDED, + [RENDER_MODE_IDX_18] Gfx_RM2_SURFACE_XLU, + [RENDER_MODE_IDX_19] Gfx_RM2_SURFACE_XLU_AA_ZB_ZUPD, + [RENDER_MODE_IDX_1A] Gfx_RM2_SURFACE_XLU_NO_AA, + [RENDER_MODE_IDX_1B] Gfx_RM2_DECAL_XLU, + [RENDER_MODE_IDX_1C] Gfx_RM2_DECAL_XLU_NO_AA, + [RENDER_MODE_IDX_1D] Gfx_RM2_INTERSECTING_XLU, + [RENDER_MODE_IDX_1E] Gfx_RM2_PASS_THROUGH, + [RENDER_MODE_IDX_1F] Gfx_RM3_SURFACE_OPA, + [RENDER_MODE_IDX_20] Gfx_RM3_SURFACE_OPA_NO_AA, + [RENDER_MODE_IDX_21] Gfx_RM3_DECAL_OPA, + [RENDER_MODE_IDX_22] Gfx_RM3_DECAL_OPA_NO_AA, + [RENDER_MODE_IDX_23] Gfx_RM3_INTERSECTING_OPA, + [RENDER_MODE_IDX_24] Gfx_RM3_INTERSECTING_OPA_NO_AA, + [RENDER_MODE_IDX_25] Gfx_RM3_ALPHATEST, + [RENDER_MODE_IDX_26] Gfx_RM3_ALPHATEST_ONESIDED, + [RENDER_MODE_IDX_27] Gfx_RM3_SURFACE_XLU, + [RENDER_MODE_IDX_28] Gfx_RM3_SURFACE_XLU_AA_ZB_ZUPD, + [RENDER_MODE_IDX_29] Gfx_RM3_SURFACE_XLU_NO_AA, + [RENDER_MODE_IDX_2A] Gfx_RM3_DECAL_XLU, + [RENDER_MODE_IDX_2B] Gfx_RM3_DECAL_XLU_NO_AA, + [RENDER_MODE_IDX_2C] Gfx_RM3_INTERSECTING_XLU, + [RENDER_MODE_IDX_2D] Gfx_RM3_PASS_THROUGH, + [RENDER_MODE_IDX_2E] Gfx_RM1_SURFACE_OPA_NO_ZB, + [RENDER_MODE_IDX_2F] Gfx_RM1_ALPHATEST_NO_ZB, + [RENDER_MODE_IDX_30] Gfx_RM1_SURFACE_XLU_NO_ZB, + [RENDER_MODE_IDX_31] Gfx_RM2_SURFACE_OPA_NO_ZB, + [RENDER_MODE_IDX_32] Gfx_RM2_ALPHATEST_NO_ZB, + [RENDER_MODE_IDX_33] Gfx_RM2_SURFACE_XLU_NO_ZB, + [RENDER_MODE_IDX_34] Gfx_RM3_SURFACE_OPA_NO_ZB, + [RENDER_MODE_IDX_35] Gfx_RM3_ALPHATEST_NO_ZB, + [RENDER_MODE_IDX_36] Gfx_RM3_SURFACE_XLU_NO_ZB, + [RENDER_MODE_IDX_37] Gfx_RM1_CLOUD, + [RENDER_MODE_IDX_38] Gfx_RM1_CLOUD_NO_ZB, + [RENDER_MODE_IDX_39] Gfx_RM2_CLOUD, + [RENDER_MODE_IDX_3A] Gfx_RM2_CLOUD_NO_ZB, + [RENDER_MODE_IDX_3B] Gfx_RM3_CLOUD, + [RENDER_MODE_IDX_3C] Gfx_RM3_CLOUD_NO_ZB, }; -Gfx ModelCombineModesA[21][5] = { +Gfx ModelCombineModesStandard[21][5] = { { gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE), gsDPSetCombineMode(G_CC_SHADE, G_CC_PASS2), @@ -179,28 +178,28 @@ Gfx ModelCombineModesA[21][5] = { }, { gsDPSetCombineMode(G_CC_TRILERP, G_CC_MODULATEIA2), - gsDPSetCombineLERP(TEXEL1, TEXEL0, LOD_FRACTION, TEXEL0, TEXEL1, TEXEL0, LOD_FRACTION, TEXEL0, COMBINED, 0, SHADE, 0, 0, 0, 0, COMBINED), + gsDPSetCombineMode(PM_CC_ALT_TRILERP, PM_CC_18), gsDPSetCombineMode(G_CC_TRILERP, G_CC_MODULATEIA2), - gsDPSetCombineLERP(TEXEL1, TEXEL0, LOD_FRACTION, TEXEL0, TEXEL1, TEXEL0, LOD_FRACTION, TEXEL0, COMBINED, 0, SHADE, PRIMITIVE, 0, 0, 0, COMBINED), - gsDPSetCombineLERP(TEXEL1, TEXEL0, LOD_FRACTION, TEXEL0, TEXEL1, TEXEL0, LOD_FRACTION, TEXEL0, COMBINED, 0, PRIMITIVE, ENVIRONMENT, 0, 0, 0, COMBINED), + gsDPSetCombineMode(PM_CC_ALT_TRILERP, PM_CC_19), + gsDPSetCombineMode(PM_CC_ALT_TRILERP, PM_CC_1A), }, { gsDPSetCombineMode(G_CC_TRILERP, G_CC_MODULATEIA2), - gsDPSetCombineLERP(TEXEL1, TEXEL0, LOD_FRACTION, TEXEL0, TEXEL1, TEXEL0, LOD_FRACTION, TEXEL0, COMBINED, 0, SHADE, 0, 0, 0, 0, COMBINED), + gsDPSetCombineMode(PM_CC_ALT_TRILERP, PM_CC_18), gsDPSetCombineMode(G_CC_TRILERP, G_CC_MODULATEIA2), - gsDPSetCombineLERP(TEXEL1, TEXEL0, LOD_FRACTION, TEXEL0, TEXEL1, TEXEL0, LOD_FRACTION, TEXEL0, COMBINED, 0, SHADE, PRIMITIVE, 0, 0, 0, COMBINED), - gsDPSetCombineLERP(TEXEL1, TEXEL0, LOD_FRACTION, TEXEL0, TEXEL1, TEXEL0, LOD_FRACTION, TEXEL0, COMBINED, 0, PRIMITIVE, ENVIRONMENT, 0, 0, 0, COMBINED), + gsDPSetCombineMode(PM_CC_ALT_TRILERP, PM_CC_19), + gsDPSetCombineMode(PM_CC_ALT_TRILERP, PM_CC_1A), }, { gsDPSetCombineMode(G_CC_TRILERP, G_CC_MODULATEIA2), - gsDPSetCombineLERP(TEXEL1, TEXEL0, LOD_FRACTION, TEXEL0, TEXEL1, TEXEL0, LOD_FRACTION, TEXEL0, COMBINED, 0, SHADE, 0, 0, 0, 0, COMBINED), + gsDPSetCombineMode(PM_CC_ALT_TRILERP, PM_CC_18), gsDPSetCombineMode(G_CC_TRILERP, G_CC_MODULATEIA2), - gsDPSetCombineLERP(TEXEL1, TEXEL0, LOD_FRACTION, TEXEL0, TEXEL1, TEXEL0, LOD_FRACTION, TEXEL0, COMBINED, 0, SHADE, PRIMITIVE, 0, 0, 0, COMBINED), - gsDPSetCombineLERP(TEXEL1, TEXEL0, LOD_FRACTION, TEXEL0, TEXEL1, TEXEL0, LOD_FRACTION, TEXEL0, COMBINED, 0, PRIMITIVE, ENVIRONMENT, 0, 0, 0, COMBINED), + gsDPSetCombineMode(PM_CC_ALT_TRILERP, PM_CC_19), + gsDPSetCombineMode(PM_CC_ALT_TRILERP, PM_CC_1A), }, { gsDPSetCombineLERP(TEXEL1, 0, TEXEL0, 0, TEXEL1, 0, TEXEL0, 0, COMBINED, 0, SHADE, 0, COMBINED, 0, SHADE, 0), - gsDPSetCombineLERP(TEXEL0, 0, TEXEL1, 0, TEXEL0, 0, TEXEL1, 0, COMBINED, 0, SHADE, 0, 0, 0, 0, COMBINED), + gsDPSetCombineMode(G_CC_INTERFERENCE, PM_CC_18), gsDPSetCombineLERP(TEXEL1, 0, TEXEL0, 0, TEXEL1, 0, TEXEL0, 0, COMBINED, 0, SHADE, 0, COMBINED, 0, SHADE, 0), gsDPSetCombineLERP(TEXEL1, 0, TEXEL0, 0, TEXEL1, 0, TEXEL0, 0, COMBINED, 0, SHADE, 0, COMBINED, 0, SHADE, 0), gsDPSetCombineLERP(TEXEL1, 0, TEXEL0, 0, TEXEL1, 0, TEXEL0, 0, COMBINED, 0, PRIMITIVE, ENVIRONMENT, COMBINED, 0, SHADE, 0), @@ -298,7 +297,7 @@ Gfx ModelCombineModesA[21][5] = { }, }; -Gfx ModelCombineModesB[21][5] = { +Gfx ModelCombineModesAlphaTest[21][5] = { { gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE), gsDPSetCombineMode(G_CC_SHADE, G_CC_PASS2), @@ -522,10 +521,12 @@ DepthFloatFactors depthFloatLookupTable[] = { s32 gLastRenderTaskCount = 0; -// padding? -s32 D_8014B7F4 = 0; +// ---------------------------------------------------------------------------- +// TILE_MODE_1A, basic AA variants -Gfx D_8014B7F8[] = { +// RENDER_MODE_IDX_00: RENDER_MODE_SURFACE_OPA, TILE_MODE_1A +// used by entity models +Gfx Gfx_RM1_SURFACE_OPA[] = { gsDPSetRenderMode(G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2), gsDPSetCycleType(G_CYC_1CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | @@ -534,7 +535,9 @@ Gfx D_8014B7F8[] = { gsSPEndDisplayList(), }; -Gfx D_8014B820[] = { +// RENDER_MODE_IDX_02: RENDER_MODE_DECAL_OPA, TILE_MODE_1A +// used by entity models +Gfx Gfx_RM1_DECAL_OPA[] = { gsDPSetRenderMode(G_RM_AA_ZB_OPA_DECAL, G_RM_AA_ZB_OPA_DECAL2), gsDPSetCycleType(G_CYC_1CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | @@ -543,7 +546,9 @@ Gfx D_8014B820[] = { gsSPEndDisplayList(), }; -Gfx D_8014B848[] = { +// RENDER_MODE_IDX_04: RENDER_MODE_INTERSECTING_OPA, TILE_MODE_1A +// used by entity models +Gfx Gfx_RM1_INTERSECTING_OPA[] = { gsDPSetRenderMode(G_RM_AA_ZB_OPA_INTER, G_RM_AA_ZB_OPA_INTER2), gsDPSetCycleType(G_CYC_1CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | @@ -552,7 +557,9 @@ Gfx D_8014B848[] = { gsSPEndDisplayList(), }; -Gfx D_8014B870[] = { +// RENDER_MODE_IDX_06: RENDER_MODE_ALPHATEST, TILE_MODE_1A +// used by entity models and item entities +Gfx Gfx_RM1_ALPHATEST[] = { gsDPSetRenderMode(G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2), gsDPSetCycleType(G_CYC_1CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -560,7 +567,9 @@ Gfx D_8014B870[] = { gsSPEndDisplayList(), }; -Gfx D_8014B898[] = { +// RENDER_MODE_IDX_08: RENDER_MODE_SURFACE_XLU, TILE_MODE_1A +// used by entity models +Gfx Gfx_RM1_SURFACE_XLU[] = { gsDPSetRenderMode(G_RM_AA_ZB_XLU_SURF, G_RM_AA_ZB_XLU_SURF2), gsDPSetCycleType(G_CYC_1CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -568,7 +577,9 @@ Gfx D_8014B898[] = { gsSPEndDisplayList(), }; -Gfx D_8014B8C0[] = { +// RENDER_MODE_IDX_0C: RENDER_MODE_DECAL_XLU, TILE_MODE_1A +// used by entity models +Gfx Gfx_RM1_DECAL_XLU[] = { gsDPSetRenderMode(G_RM_AA_ZB_XLU_DECAL, G_RM_AA_ZB_XLU_DECAL2), gsDPSetCycleType(G_CYC_1CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -576,7 +587,9 @@ Gfx D_8014B8C0[] = { gsSPEndDisplayList(), }; -Gfx D_8014B8E8[] = { +// RENDER_MODE_IDX_0E: RENDER_MODE_INTERSECTING_XLU, TILE_MODE_1A +// used by entity models +Gfx Gfx_RM1_INTERSECTING_XLU[] = { gsDPSetRenderMode(G_RM_AA_ZB_XLU_INTER, G_RM_AA_ZB_XLU_INTER2), gsDPSetCycleType(G_CYC_1CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -584,7 +597,11 @@ Gfx D_8014B8E8[] = { gsSPEndDisplayList(), }; -Gfx D_8014B910[] = { +// ---------------------------------------------------------------------------- +// TILE_MODE_1A, basic NO_AA variants + +// RENDER_MODE_IDX_01: RENDER_MODE_SURFACE_OPA_NO_AA, TILE_MODE_1A +Gfx Gfx_RM1_SURFACE_OPA_NO_AA[] = { gsDPSetRenderMode(G_RM_ZB_OPA_SURF, G_RM_ZB_OPA_SURF2), gsDPSetCycleType(G_CYC_1CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -592,7 +609,8 @@ Gfx D_8014B910[] = { gsSPEndDisplayList(), }; -Gfx D_8014B938[] = { +// RENDER_MODE_IDX_03: RENDER_MODE_DECAL_OPA_NO_AA, TILE_MODE_1A +Gfx Gfx_RM1_DECAL_OPA_NO_AA[] = { gsDPSetRenderMode(G_RM_ZB_OPA_DECAL, G_RM_ZB_OPA_DECAL2), gsDPSetCycleType(G_CYC_1CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -600,7 +618,8 @@ Gfx D_8014B938[] = { gsSPEndDisplayList(), }; -Gfx D_8014B960[] = { +// RENDER_MODE_IDX_05: unused +Gfx Gfx_RM1_INTERSECTING_OPA_NO_AA[] = { gsDPSetRenderMode(G_RM_AA_ZB_OPA_INTER, G_RM_AA_ZB_OPA_INTER2), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), gsSPSetGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BACK | G_LIGHTING | G_SHADING_SMOOTH), @@ -608,7 +627,9 @@ Gfx D_8014B960[] = { gsSPEndDisplayList(), }; -Gfx D_8014B988[] = { +// RENDER_MODE_IDX_07: RENDER_MODE_ALPHATEST_ONESIDED, TILE_MODE_1A +// used by entity models +Gfx Gfx_RM1_ALPHATEST_ONESIDED[] = { gsDPSetRenderMode(G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2), gsDPSetCycleType(G_CYC_1CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -616,7 +637,9 @@ Gfx D_8014B988[] = { gsSPEndDisplayList(), }; -Gfx D_8014B9B0[] = { +// RENDER_MODE_IDX_0A: RENDER_MODE_SURFACE_XLU_NO_AA, TILE_MODE_1A +// used by entity models +Gfx Gfx_RM1_SURFACE_XLU_NO_AA[] = { gsDPSetRenderMode(G_RM_ZB_XLU_SURF, G_RM_ZB_XLU_SURF2), gsDPSetCycleType(G_CYC_1CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -624,7 +647,9 @@ Gfx D_8014B9B0[] = { gsSPEndDisplayList(), }; -Gfx D_8014B9D8[] = { +// RENDER_MODE_IDX_0D: RENDER_MODE_DECAL_XLU_NO_AA, TILE_MODE_1A +// used by entity models +Gfx Gfx_RM1_DECAL_XLU_NO_AA[] = { gsDPSetRenderMode(G_RM_ZB_OVL_SURF, G_RM_ZB_OVL_SURF2), gsDPSetCycleType(G_CYC_1CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -632,14 +657,20 @@ Gfx D_8014B9D8[] = { gsSPEndDisplayList(), }; -Gfx D_8014BA00[] = { +// ---------------------------------------------------------------------------- +// TILE_MODE_1A, special modes + +// RENDER_MODE_IDX_0F: unused +// used by entity models for RENDER_MODE_PASS_THROUGH +Gfx Gfx_RM1_PASS_THROUGH[] = { gsDPSetCycleType(G_CYC_1CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), gsSPSetGeometryMode(G_ZBUFFER | G_SHADE | G_LIGHTING | G_SHADING_SMOOTH), gsSPEndDisplayList(), }; -Gfx D_8014BA20[] = { +// RENDER_MODE_IDX_09: RENDER_MODE_SURFACE_XLU_AA_ZB_ZUPD, TILE_MODE_1A +Gfx Gfx_RM1_SURFACE_XLU_AA_ZB_ZUPD[] = { gsDPSetRenderMode(AA_EN | Z_CMP | Z_UPD | IM_RD | CLR_ON_CVG | CVG_DST_WRAP | ZMODE_XLU | FORCE_BL | GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA), AA_EN | Z_CMP | Z_UPD | IM_RD | CLR_ON_CVG | CVG_DST_WRAP | ZMODE_XLU | FORCE_BL | @@ -650,7 +681,9 @@ Gfx D_8014BA20[] = { gsSPEndDisplayList(), }; -Gfx D_8014BA48[] = { +// RENDER_MODE_IDX_2E: RENDER_MODE_SURFACE_OPA_NO_ZB, TILE_MODE_1A +// used by entity models +Gfx Gfx_RM1_SURFACE_OPA_NO_ZB[] = { gsDPSetRenderMode(G_RM_AA_OPA_SURF, G_RM_AA_OPA_SURF2), gsDPSetCycleType(G_CYC_1CYCLE), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -658,7 +691,9 @@ Gfx D_8014BA48[] = { gsSPEndDisplayList(), }; -Gfx D_8014BA70[] = { +// RENDER_MODE_IDX_2F: RENDER_MODE_ALPHATEST_NO_ZB, TILE_MODE_1A +// used by entity models +Gfx Gfx_RM1_ALPHATEST_NO_ZB[] = { gsDPSetRenderMode(G_RM_AA_TEX_EDGE, G_RM_AA_TEX_EDGE2), gsDPSetCycleType(G_CYC_1CYCLE), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -666,7 +701,9 @@ Gfx D_8014BA70[] = { gsSPEndDisplayList(), }; -Gfx D_8014BA98[] = { +// RENDER_MODE_IDX_30: RENDER_MODE_SURFACE_XLU_NO_ZB, TILE_MODE_1A +// used by entity models +Gfx Gfx_RM1_SURFACE_XLU_NO_ZB[] = { gsDPSetRenderMode(G_RM_AA_XLU_SURF, G_RM_AA_XLU_SURF2), gsDPSetCycleType(G_CYC_1CYCLE), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -674,10 +711,12 @@ Gfx D_8014BA98[] = { gsSPEndDisplayList(), }; -Gfx D_8014BAC0[] = { - gsDPSetRenderMode(AA_EN | Z_CMP | Z_UPD | IM_RD | CLR_ON_CVG | CVG_DST_WRAP | ZMODE_XLU | FORCE_BL | - GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA), AA_EN | Z_CMP | Z_UPD | IM_RD | - CLR_ON_CVG | CVG_DST_WRAP | ZMODE_XLU | FORCE_BL | +// RENDER_MODE_IDX_0B: RENDER_MODE_SURFACE_XLU_ZB_ZUPD, TILE_MODE_1A +// custom render mode similar to RM_AA_XLU_SURF, using ZMODE_XLU instead of ZMODE_OPA and setting Z_CMP | Z_UPD +Gfx Gfx_RM1_SURFACE_XLU_ZB_ZUPD[] = { + gsDPSetRenderMode(AA_EN | IM_RD | CVG_DST_WRAP | CLR_ON_CVG | FORCE_BL | Z_CMP | Z_UPD | + GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA), + AA_EN | IM_RD | CVG_DST_WRAP | CLR_ON_CVG | FORCE_BL | Z_CMP | Z_UPD | ZMODE_XLU | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)), gsDPSetCycleType(G_CYC_1CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -685,17 +724,22 @@ Gfx D_8014BAC0[] = { gsSPEndDisplayList(), }; -Gfx D_8014BAE8[] = { +// no corresponding RENDER_MODE_IDX +// used by entity models for RENDER_MODE_CLOUD_NO_ZCMP +// custom render mode is identical to RM_ZB_CLD_SURF, except leaving out Z_CMP +Gfx Gfx_RM1_CLOUD_NO_ZCMP[] = { gsDPSetRenderMode(IM_RD | CVG_DST_SAVE | ZMODE_XLU | FORCE_BL | - GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA), IM_RD | CVG_DST_SAVE | ZMODE_XLU | - FORCE_BL | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)), + GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA), + IM_RD | CVG_DST_SAVE | ZMODE_XLU | FORCE_BL | + GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)), gsDPSetCycleType(G_CYC_1CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), gsSPSetGeometryMode(G_ZBUFFER | G_SHADE | G_LIGHTING | G_SHADING_SMOOTH), gsSPEndDisplayList(), }; -Gfx D_8014BB10[] = { +// RENDER_MODE_IDX_37: RENDER_MODE_CLOUD, TILE_MODE_1A +Gfx Gfx_RM1_CLOUD[] = { gsDPSetRenderMode(G_RM_ZB_CLD_SURF, G_RM_ZB_CLD_SURF2), gsDPSetCycleType(G_CYC_1CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -703,7 +747,8 @@ Gfx D_8014BB10[] = { gsSPEndDisplayList(), }; -Gfx D_8014BB38[] = { +// RENDER_MODE_IDX_38: RENDER_MODE_CLOUD_NO_ZB, TILE_MODE_1A +Gfx Gfx_RM1_CLOUD_NO_ZB[] = { gsDPSetRenderMode(G_RM_CLD_SURF, G_RM_CLD_SURF2), gsDPSetCycleType(G_CYC_1CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -711,7 +756,11 @@ Gfx D_8014BB38[] = { gsSPEndDisplayList(), }; -Gfx D_8014BB60[] = { +// ---------------------------------------------------------------------------- +// TILE_MODE_2A, basic AA variants + +// RENDER_MODE_IDX_10: RENDER_MODE_SURFACE_OPA, TILE_MODE_2A +Gfx Gfx_RM2_SURFACE_OPA[] = { gsDPSetRenderMode(G_RM_PASS, G_RM_AA_ZB_OPA_SURF2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -719,7 +768,8 @@ Gfx D_8014BB60[] = { gsSPEndDisplayList(), }; -Gfx D_8014BB88[] = { +// RENDER_MODE_IDX_12: RENDER_MODE_DECAL_OPA, TILE_MODE_2A +Gfx Gfx_RM2_DECAL_OPA[] = { gsDPSetRenderMode(G_RM_PASS, G_RM_AA_ZB_OPA_DECAL2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -727,7 +777,8 @@ Gfx D_8014BB88[] = { gsSPEndDisplayList(), }; -Gfx D_8014BBB0[] = { +// RENDER_MODE_IDX_14: RENDER_MODE_INTERSECTING_OPA, TILE_MODE_2A +Gfx Gfx_RM2_INTERSECTING_OPA[] = { gsDPSetRenderMode(G_RM_PASS, G_RM_AA_ZB_OPA_INTER2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -735,7 +786,9 @@ Gfx D_8014BBB0[] = { gsSPEndDisplayList(), }; -Gfx D_8014BBD8[] = { +// RENDER_MODE_IDX_16: RENDER_MODE_ALPHATEST, TILE_MODE_2A +// used by entity models, item entities with shading +Gfx Gfx_RM2_ALPHATEST[] = { gsDPSetRenderMode(G_RM_PASS, G_RM_AA_ZB_TEX_EDGE2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -743,7 +796,8 @@ Gfx D_8014BBD8[] = { gsSPEndDisplayList(), }; -Gfx D_8014BC00[] = { +// RENDER_MODE_IDX_18: RENDER_MODE_SURFACE_XLU, TILE_MODE_2A +Gfx Gfx_RM2_SURFACE_XLU[] = { gsDPSetRenderMode(G_RM_PASS, G_RM_AA_ZB_XLU_SURF2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -751,7 +805,8 @@ Gfx D_8014BC00[] = { gsSPEndDisplayList(), }; -Gfx D_8014BC28[] = { +// RENDER_MODE_IDX_1B: RENDER_MODE_DECAL_XLU, TILE_MODE_2A +Gfx Gfx_RM2_DECAL_XLU[] = { gsDPSetRenderMode(G_RM_PASS, G_RM_AA_ZB_XLU_DECAL2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -759,7 +814,8 @@ Gfx D_8014BC28[] = { gsSPEndDisplayList(), }; -Gfx D_8014BC50[] = { +// RENDER_MODE_IDX_1D: RENDER_MODE_INTERSECTING_XLU, TILE_MODE_2A +Gfx Gfx_RM2_INTERSECTING_XLU[] = { gsDPSetRenderMode(G_RM_PASS, G_RM_AA_ZB_XLU_INTER2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -767,7 +823,11 @@ Gfx D_8014BC50[] = { gsSPEndDisplayList(), }; -Gfx D_8014BC78[] = { +// ---------------------------------------------------------------------------- +// TILE_MODE_2A, basic NO_AA variants + +// RENDER_MODE_IDX_11: RENDER_MODE_SURFACE_OPA_NO_AA, TILE_MODE_2A +Gfx Gfx_RM2_SURFACE_OPA_NO_AA[] = { gsDPSetRenderMode(G_RM_PASS, G_RM_ZB_OPA_SURF2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -775,7 +835,8 @@ Gfx D_8014BC78[] = { gsSPEndDisplayList(), }; -Gfx D_8014BCA0[] = { +// RENDER_MODE_IDX_13: RENDER_MODE_DECAL_OPA_NO_AA, TILE_MODE_2A +Gfx Gfx_RM2_DECAL_OPA_NO_AA[] = { gsDPSetRenderMode(G_RM_PASS, G_RM_ZB_OPA_DECAL2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -783,7 +844,8 @@ Gfx D_8014BCA0[] = { gsSPEndDisplayList(), }; -Gfx D_8014BCC8[] = { +// RENDER_MODE_IDX_15: unused +Gfx Gfx_RM2_INTERSECTING_OPA_NO_AA[] = { gsDPSetRenderMode(G_RM_PASS, G_RM_AA_ZB_OPA_INTER2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -792,14 +854,16 @@ Gfx D_8014BCC8[] = { gsSPEndDisplayList(), }; -Gfx D_8014BCF8[] = { +// RENDER_MODE_IDX_17: RENDER_MODE_ALPHATEST_ONESIDED, TILE_MODE_2A +Gfx Gfx_RM2_ALPHATEST_ONESIDED[] = { gsDPSetRenderMode(G_RM_PASS, G_RM_AA_ZB_TEX_EDGE2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), gsSPEndDisplayList(), }; -Gfx D_8014BD18[] = { +// RENDER_MODE_IDX_1A: RENDER_MODE_SURFACE_XLU_NO_AA, TILE_MODE_2A +Gfx Gfx_RM2_SURFACE_XLU_NO_AA[] = { gsDPSetRenderMode(G_RM_PASS, G_RM_ZB_XLU_SURF2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -807,7 +871,8 @@ Gfx D_8014BD18[] = { gsSPEndDisplayList(), }; -Gfx D_8014BD40[] = { +// RENDER_MODE_IDX_1C: RENDER_MODE_DECAL_XLU_NO_AA, TILE_MODE_2A +Gfx Gfx_RM2_DECAL_XLU_NO_AA[] = { gsDPSetRenderMode(G_RM_PASS, G_RM_ZB_XLU_DECAL2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -815,14 +880,19 @@ Gfx D_8014BD40[] = { gsSPEndDisplayList(), }; -Gfx D_8014BD68[] = { +// ---------------------------------------------------------------------------- +// TILE_MODE_2A, special modes + +// RENDER_MODE_IDX_1E: unused +Gfx Gfx_RM2_PASS_THROUGH[] = { gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), gsSPSetGeometryMode(G_ZBUFFER | G_SHADE | G_LIGHTING | G_SHADING_SMOOTH), gsSPEndDisplayList(), }; -Gfx D_8014BD88[] = { +// RENDER_MODE_IDX_19: RENDER_MODE_SURFACE_XLU_AA_ZB_ZUPD, TILE_MODE_2A +Gfx Gfx_RM2_SURFACE_XLU_AA_ZB_ZUPD[] = { gsDPSetRenderMode(G_RM_PASS, G_RM_AA_ZB_XLU_SURF2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -830,7 +900,8 @@ Gfx D_8014BD88[] = { gsSPEndDisplayList(), }; -Gfx D_8014BDB0[] = { +// RENDER_MODE_IDX_31: RENDER_MODE_SURFACE_OPA_NO_ZB, TILE_MODE_2A +Gfx Gfx_RM2_SURFACE_OPA_NO_ZB[] = { gsDPSetRenderMode(G_RM_PASS, G_RM_AA_OPA_SURF2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -838,7 +909,8 @@ Gfx D_8014BDB0[] = { gsSPEndDisplayList(), }; -Gfx D_8014BDD8[] = { +// RENDER_MODE_IDX_32: RENDER_MODE_ALPHATEST_NO_ZB, TILE_MODE_2A +Gfx Gfx_RM2_ALPHATEST_NO_ZB[] = { gsDPSetRenderMode(G_RM_PASS, G_RM_AA_TEX_EDGE2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -846,7 +918,8 @@ Gfx D_8014BDD8[] = { gsSPEndDisplayList(), }; -Gfx D_8014BE00[] = { +// RENDER_MODE_IDX_33: RENDER_MODE_SURFACE_XLU_NO_ZB, TILE_MODE_2A +Gfx Gfx_RM2_SURFACE_XLU_NO_ZB[] = { gsDPSetRenderMode(G_RM_PASS, G_RM_AA_XLU_SURF2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -854,7 +927,8 @@ Gfx D_8014BE00[] = { gsSPEndDisplayList(), }; -Gfx D_8014BE28[] = { +// RENDER_MODE_IDX_39: RENDER_MODE_CLOUD, TILE_MODE_2A +Gfx Gfx_RM2_CLOUD[] = { gsDPSetRenderMode(G_RM_PASS, G_RM_ZB_CLD_SURF2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -862,7 +936,8 @@ Gfx D_8014BE28[] = { gsSPEndDisplayList(), }; -Gfx D_8014BE50[] = { +// RENDER_MODE_IDX_3A: RENDER_MODE_CLOUD_NO_ZB, TILE_MODE_2A +Gfx Gfx_RM2_CLOUD_NO_ZB[] = { gsDPSetRenderMode(G_RM_PASS, G_RM_CLD_SURF2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -870,7 +945,12 @@ Gfx D_8014BE50[] = { gsSPEndDisplayList(), }; -Gfx D_8014BE78[] = { +// ---------------------------------------------------------------------------- +// TILE_MODE_3A+, basic AA variants + +// RENDER_MODE_IDX_1F: RENDER_MODE_SURFACE_OPA, TILE_MODE_3A / TILE_MODE_3B / TILE_MODE_1B / TILE_MODE_1C +// used by entity models +Gfx Gfx_RM3_SURFACE_OPA[] = { gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_AA_ZB_OPA_SURF2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -878,7 +958,9 @@ Gfx D_8014BE78[] = { gsSPEndDisplayList(), }; -Gfx D_8014BEA0[] = { +// RENDER_MODE_IDX_21: RENDER_MODE_DECAL_OPA, TILE_MODE_3A / TILE_MODE_3B / TILE_MODE_1B / TILE_MODE_1C +// used by entity models +Gfx Gfx_RM3_DECAL_OPA[] = { gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_AA_ZB_OPA_DECAL2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -886,7 +968,9 @@ Gfx D_8014BEA0[] = { gsSPEndDisplayList(), }; -Gfx D_8014BEC8[] = { +// RENDER_MODE_IDX_23: RENDER_MODE_INTERSECTING_OPA, TILE_MODE_3A / TILE_MODE_3B / TILE_MODE_1B / TILE_MODE_1C +// used by entity models +Gfx Gfx_RM3_INTERSECTING_OPA[] = { gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_AA_ZB_OPA_INTER2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -894,7 +978,9 @@ Gfx D_8014BEC8[] = { gsSPEndDisplayList(), }; -Gfx D_8014BEF0[] = { +// RENDER_MODE_IDX_25: RENDER_MODE_ALPHATEST, TILE_MODE_3A / TILE_MODE_3B / TILE_MODE_1B / TILE_MODE_1C +// used by entity models +Gfx Gfx_RM3_ALPHATEST[] = { gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_AA_ZB_TEX_EDGE2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -902,7 +988,9 @@ Gfx D_8014BEF0[] = { gsSPEndDisplayList(), }; -Gfx D_8014BF18[] = { +// RENDER_MODE_IDX_27: RENDER_MODE_SURFACE_XLU, TILE_MODE_3A / TILE_MODE_3B +// used by entity models +Gfx Gfx_RM3_SURFACE_XLU[] = { gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_AA_ZB_XLU_SURF2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -910,7 +998,9 @@ Gfx D_8014BF18[] = { gsSPEndDisplayList(), }; -Gfx D_8014BF40[] = { +// RENDER_MODE_IDX_2A: RENDER_MODE_DECAL_XLU, TILE_MODE_3A / TILE_MODE_3B +// used by entity models +Gfx Gfx_RM3_DECAL_XLU[] = { gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_AA_ZB_XLU_DECAL2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -918,7 +1008,9 @@ Gfx D_8014BF40[] = { gsSPEndDisplayList(), }; -Gfx D_8014BF68[] = { +// RENDER_MODE_IDX_2C: RENDER_MODE_INTERSECTING_XLU, TILE_MODE_3A / TILE_MODE_3B +// used by entity models +Gfx Gfx_RM3_INTERSECTING_XLU[] = { gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_AA_ZB_XLU_INTER2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -926,7 +1018,11 @@ Gfx D_8014BF68[] = { gsSPEndDisplayList(), }; -Gfx D_8014BF90[] = { +// ---------------------------------------------------------------------------- +// TILE_MODE_3A+, basic NO_AA variants + +//RENDER_MODE_IDX_20: RENDER_MODE_SURFACE_OPA_NO_AA, TILE_MODE_3A / TILE_MODE_3B +Gfx Gfx_RM3_SURFACE_OPA_NO_AA[] = { gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_ZB_OPA_SURF2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -934,7 +1030,8 @@ Gfx D_8014BF90[] = { gsSPEndDisplayList(), }; -Gfx D_8014BFB8[] = { +// RENDER_MODE_IDX_22: RENDER_MODE_DECAL_OPA_NO_AA, TILE_MODE_3A / TILE_MODE_3B +Gfx Gfx_RM3_DECAL_OPA_NO_AA[] = { gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_ZB_OPA_DECAL2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -942,7 +1039,8 @@ Gfx D_8014BFB8[] = { gsSPEndDisplayList(), }; -Gfx D_8014BFE0[] = { +// RENDER_MODE_IDX_24: unused +Gfx Gfx_RM3_INTERSECTING_OPA_NO_AA[] = { gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_AA_ZB_OPA_INTER2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -950,14 +1048,16 @@ Gfx D_8014BFE0[] = { gsSPEndDisplayList(), }; -Gfx D_8014C008[] = { +// RENDER_MODE_IDX_26: RENDER_MODE_ALPHATEST_ONESIDED, TILE_MODE_3A / TILE_MODE_3B +Gfx Gfx_RM3_ALPHATEST_ONESIDED[] = { gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_AA_ZB_TEX_EDGE2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), gsSPEndDisplayList(), }; -Gfx D_8014C028[] = { +// RENDER_MODE_IDX_29: RENDER_MODE_SURFACE_XLU_NO_AA, TILE_MODE_3A / TILE_MODE_3B +Gfx Gfx_RM3_SURFACE_XLU_NO_AA[] = { gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_ZB_XLU_SURF2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -965,7 +1065,8 @@ Gfx D_8014C028[] = { gsSPEndDisplayList(), }; -Gfx D_8014C050[] = { +// RENDER_MODE_IDX_2B: RENDER_MODE_DECAL_XLU_NO_AA, TILE_MODE_3A / TILE_MODE_3B +Gfx Gfx_RM3_DECAL_XLU_NO_AA[] = { gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_ZB_XLU_DECAL2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -973,14 +1074,19 @@ Gfx D_8014C050[] = { gsSPEndDisplayList(), }; -Gfx D_8014C078[] = { +// ---------------------------------------------------------------------------- +// TILE_MODE_3A+, special modes + +// RENDER_MODE_IDX_2D: unused +Gfx Gfx_RM3_PASS_THROUGH[] = { gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), gsSPSetGeometryMode(G_ZBUFFER | G_SHADE | G_FOG | G_LIGHTING | G_SHADING_SMOOTH), gsSPEndDisplayList(), }; -Gfx D_8014C098[] = { +// RENDER_MODE_IDX_28: RENDER_MODE_SURFACE_XLU_AA_ZB_ZUPD, TILE_MODE_3A / TILE_MODE_3B +Gfx Gfx_RM3_SURFACE_XLU_AA_ZB_ZUPD[] = { gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_AA_ZB_XLU_SURF2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -988,7 +1094,8 @@ Gfx D_8014C098[] = { gsSPEndDisplayList(), }; -Gfx D_8014C0C0[] = { +// RENDER_MODE_IDX_34: RENDER_MODE_SURFACE_OPA_NO_ZB, TILE_MODE_3A / TILE_MODE_3B +Gfx Gfx_RM3_SURFACE_OPA_NO_ZB[] = { gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_AA_OPA_SURF2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -996,7 +1103,8 @@ Gfx D_8014C0C0[] = { gsSPEndDisplayList(), }; -Gfx D_8014C0E8[] = { +// RENDER_MODE_IDX_35: RENDER_MODE_ALPHATEST_NO_ZB, TILE_MODE_3A / TILE_MODE_3B +Gfx Gfx_RM3_ALPHATEST_NO_ZB[] = { gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_AA_TEX_EDGE2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -1004,7 +1112,8 @@ Gfx D_8014C0E8[] = { gsSPEndDisplayList(), }; -Gfx D_8014C110[] = { +// RENDER_MODE_IDX_36: RENDER_MODE_SURFACE_XLU_NO_ZB, TILE_MODE_3A / TILE_MODE_3B +Gfx Gfx_RM3_SURFACE_XLU_NO_ZB[] = { gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_AA_XLU_SURF2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -1012,7 +1121,8 @@ Gfx D_8014C110[] = { gsSPEndDisplayList(), }; -Gfx D_8014C138[] = { +// RENDER_MODE_IDX_3B: RENDER_MODE_CLOUD, TILE_MODE_3A / TILE_MODE_3B / TILE_MODE_1B / TILE_MODE_1C +Gfx Gfx_RM3_CLOUD[] = { gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_ZB_CLD_SURF2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -1020,7 +1130,8 @@ Gfx D_8014C138[] = { gsSPEndDisplayList(), }; -Gfx D_8014C160[] = { +// RENDER_MODE_IDX_3C: RENDER_MODE_CLOUD_NO_ZB, TILE_MODE_3A / TILE_MODE_3B / TILE_MODE_1B / TILE_MODE_1C +Gfx Gfx_RM3_CLOUD_NO_ZB[] = { gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_CLD_SURF2), gsDPSetCycleType(G_CYC_2CYCLE), gsSPClearGeometryMode(G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -1028,58 +1139,58 @@ Gfx D_8014C160[] = { gsSPEndDisplayList(), }; -s32 mdl_renderTaskBasePriorities[RENDER_MODE_COUNT] = { +s32 RenderTaskBasePriorities[] = { [RENDER_MODE_SURF_SOLID_AA_ZB_LAYER0] = -100000, [RENDER_MODE_SURFACE_OPA] = 1000000, - [RENDER_MODE_2] = 1000000, + [RENDER_MODE_02_UNUSED] = 1000000, [RENDER_MODE_SURFACE_OPA_NO_AA] = 1000000, [RENDER_MODE_SURFACE_OPA_NO_ZB] = 0, [RENDER_MODE_DECAL_OPA] = 1000000, - [RENDER_MODE_6] = 1000000, + [RENDER_MODE_06_UNUSED] = 1000000, [RENDER_MODE_DECAL_OPA_NO_AA] = 1000000, - [RENDER_MODE_8] = 0, + [RENDER_MODE_08_UNUSED] = 0, [RENDER_MODE_INTERSECTING_OPA] = 1000000, - [RENDER_MODE_A] = 1000000, - [RENDER_MODE_B] = 1000000, - [RENDER_MODE_C] = 0, + [RENDER_MODE_0A_UNUSED] = 1000000, + [RENDER_MODE_0B_UNUSED] = 1000000, + [RENDER_MODE_0C_UNUSED] = 0, [RENDER_MODE_ALPHATEST] = 1000000, - [RENDER_MODE_E] = 1000000, + [RENDER_MODE_0E_UNUSED] = 1000000, [RENDER_MODE_ALPHATEST_ONESIDED] = 1000000, [RENDER_MODE_ALPHATEST_NO_ZB] = 0, [RENDER_MODE_SURFACE_XLU_LAYER1] = 8000000, - [RENDER_MODE_12] = 8000000, + [RENDER_MODE_12_UNUSED] = 8000000, [RENDER_MODE_SURFACE_XLU_NO_AA] = 8000000, [RENDER_MODE_SURFACE_XLU_NO_ZB] = 0, - [RENDER_MODE_SURFXLU_ZB_ZUPD] = 8000000, + [RENDER_MODE_SURFACE_XLU_ZB_ZUPD] = 8000000, [RENDER_MODE_SURFACE_XLU_LAYER2] = 7500000, - [RENDER_MODE_17] = 7500000, - [RENDER_MODE_18] = 7500000, - [RENDER_MODE_19] = 0, + [RENDER_MODE_17_UNUSED] = 7500000, + [RENDER_MODE_18_UNUSED] = 7500000, + [RENDER_MODE_19_UNUSED] = 0, [RENDER_MODE_DECAL_XLU] = 7000000, - [RENDER_MODE_1B] = 7000000, - [RENDER_MODE_DECAL_XLU_NOAA] = 7000000, - [RENDER_MODE_1D] = 7000000, - [RENDER_MODE_1E] = 6500000, - [RENDER_MODE_1F] = 6500000, + [RENDER_MODE_1B_UNUSED] = 7000000, + [RENDER_MODE_DECAL_XLU_NO_AA] = 7000000, + [RENDER_MODE_1D_UNUSED] = 7000000, + [RENDER_MODE_DECAL_XLU_AHEAD] = 6500000, + [RENDER_MODE_1F_UNUSED] = 6500000, [RENDER_MODE_SHADOW] = 6500000, - [RENDER_MODE_21] = 0, + [RENDER_MODE_21_UNUSED] = 0, [RENDER_MODE_SURFACE_XLU_LAYER3] = 6000000, - [RENDER_MODE_23] = 6000000, - [RENDER_MODE_24] = 6000000, - [RENDER_MODE_25] = 0, + [RENDER_MODE_23_UNUSED] = 6000000, + [RENDER_MODE_24_UNUSED] = 6000000, + [RENDER_MODE_25_UNUSED] = 0, [RENDER_MODE_INTERSECTING_XLU] = 5500000, - [RENDER_MODE_27] = 5500000, - [RENDER_MODE_28] = 5500000, - [RENDER_MODE_SURFXLU_AA_ZB_ZUPD] = 8000000, - [RENDER_MODE_2A] = 4000000, - [RENDER_MODE_2B] = 4250000, - [RENDER_MODE_2C] = 4500000, - [RENDER_MODE_2D] = 4500000, + [RENDER_MODE_27_UNUSED] = 5500000, + [RENDER_MODE_PASS_THROUGH] = 5500000, + [RENDER_MODE_SURFACE_XLU_AA_ZB_ZUPD] = 8000000, + [RENDER_MODE_SURFACE_OPA_NO_ZB_BEHIND] = 4000000, + [RENDER_MODE_ALPHATEST_NO_ZB_BEHIND] = 4250000, + [RENDER_MODE_SURFACE_XLU_NO_ZB_BEHIND] = 4500000, + [RENDER_MODE_CLOUD_NO_ZCMP] = 4500000, [RENDER_MODE_CLOUD] = 8000000, [RENDER_MODE_CLOUD_NO_ZB] = 700000, }; -b8 D_8014C248 = FALSE; +b8 D_8014C248 = FALSE; // possibly a 'warm-up done' flag for boot. never read. SHIFT_BSS ModelCustomGfxBuilderList* gCurrentCustomModelGfxBuildersPtr; SHIFT_BSS ModelNode** gCurrentModelTreeRoot; @@ -1105,8 +1216,8 @@ SHIFT_BSS ModelLocalVertexCopyList* gCurrentModelLocalVtxBuffers; SHIFT_BSS ModelNode* wModelTreeRoot; SHIFT_BSS ModelNode* bModelTreeRoot; -SHIFT_BSS ModelTreeInfoList D_80152220; -SHIFT_BSS ModelTreeInfoList D_80152A20; +SHIFT_BSS ModelTreeInfoList wModelTreeNodeInfo; +SHIFT_BSS ModelTreeInfoList bModelTreeNodeInfo; SHIFT_BSS s8 wBackgroundFogMode; SHIFT_BSS s8 bBackgroundFogMode; @@ -1145,6 +1256,18 @@ void build_custom_gfx(void); MATCHING_BSS(0x3A0); +enum { + TILE_MODE_STRIDE = 3, + TILE_MODE_1A = 1, // render modes are single-cycle + TILE_MODE_2A = 2, // render modes are two-cycle, starting with G_RM_PASS + TILE_MODE_3A = 3, // render modes are two-cycle, starting with G_RM_FOG_SHADE_A + TILE_MODE_1B = 4, // render modes use Gfx_RM2_SURFACE_OPA, but overwrite + TILE_MODE_2B = 5, + TILE_MODE_3B = 6, + TILE_MODE_1C = 10, + TILE_MODE_2C = 11, +}; + void appendGfx_model(void* data) { Model* model = data; s32 mtxPushMode; @@ -1187,32 +1310,36 @@ void appendGfx_model(void* data) { renderMode = model->renderMode; combineSubType = 0; + if (textureHeader != NULL) { switch (extraTileType) { case EXTRA_TILE_NONE: - texturingMode = 1; + texturingMode = TILE_MODE_1A; break; case EXTRA_TILE_MIPMAPS: case EXTRA_TILE_AUX_SAME_AS_MAIN: case EXTRA_TILE_AUX_INDEPENDENT: - texturingMode = 2; + texturingMode = TILE_MODE_2A; break; default: - texturingMode = 1; + texturingMode = TILE_MODE_1A; break; } } else { - texturingMode = 1; + texturingMode = TILE_MODE_1A; } - if ((textureHeader != NULL || renderMode <= RENDER_MODE_ALPHATEST_NO_ZB) && gCurrentFogSettings->enabled && !(flags & MODEL_FLAG_40)) { - texturingMode = 3; - combineSubType = 1; + + if (textureHeader != NULL || renderMode <= RENDER_MODE_ALPHATEST_NO_ZB) { + if (gCurrentFogSettings->enabled && !(flags & MODEL_FLAG_40)) { + texturingMode = TILE_MODE_3A; + combineSubType = 1; + } } // fog mode switch ((u32)(model->customGfxIndex >> 4)) { case FOG_MODE_1: - texturingMode += 3; + texturingMode += TILE_MODE_STRIDE; combineSubType = 2; break; case FOG_MODE_2: @@ -1225,12 +1352,12 @@ void appendGfx_model(void* data) { mdl_renderModelFogColorG, mdl_renderModelFogColorB, 0); gSPFogPosition((*gfxPos)++, mdl_renderModelFogStart, mdl_renderModelFogEnd); - texturingMode += 9; + texturingMode += TILE_MODE_STRIDE * 3; combineSubType = 3; } break; case FOG_MODE_3: - texturingMode = 2; + texturingMode = TILE_MODE_2A; combineSubType = 4; gDPSetPrimColor((*gfxPos)++, 0, 0, gRenderModelPrimR, gRenderModelPrimG, @@ -1244,32 +1371,32 @@ void appendGfx_model(void* data) { gDPPipeSync((*gfxPos)++); if (model->groupData != NULL) { - Lightsn* lightningGroup = model->groupData->lightingGroup; + Lightsn* lights = model->groupData->lightingGroup; if (model->groupData->lightingGroup != NULL) { switch (model->groupData->numLights) { case 0: - gSPSetLights0((*gfxPos)++, lightningGroup[0]); + gSPSetLights0((*gfxPos)++, lights[0]); break; case 1: - gSPSetLights1((*gfxPos)++, lightningGroup[0]); + gSPSetLights1((*gfxPos)++, lights[0]); break; case 2: - gSPSetLights2((*gfxPos)++, lightningGroup[0]); + gSPSetLights2((*gfxPos)++, lights[0]); break; case 3: - gSPSetLights3((*gfxPos)++, lightningGroup[0]); + gSPSetLights3((*gfxPos)++, lights[0]); break; case 4: - gSPSetLights4((*gfxPos)++, lightningGroup[0]); + gSPSetLights4((*gfxPos)++, lights[0]); break; case 5: - gSPSetLights5((*gfxPos)++, lightningGroup[0]); + gSPSetLights5((*gfxPos)++, lights[0]); break; case 6: - gSPSetLights6((*gfxPos)++, lightningGroup[0]); + gSPSetLights6((*gfxPos)++, lights[0]); break; case 7: - gSPSetLights7((*gfxPos)++, lightningGroup[0]); + gSPSetLights7((*gfxPos)++, lights[0]); break; } } @@ -1306,27 +1433,27 @@ void appendGfx_model(void* data) { } if (combineSubType != 0 || renderMode == RENDER_MODE_ALPHATEST || renderMode == RENDER_MODE_ALPHATEST_ONESIDED) { - u32 v1 = 0; + u32 combineType = 0; if (textureHeader != NULL) { u32 colorCombineType = textureHeader->colorCombineType; if (colorCombineType >= 3) { - v1 = colorCombineType + 10; + combineType = colorCombineType + 10; } else { - v1 = extraTileType * 3 + 1 + textureHeader->colorCombineSubType; + combineType = extraTileType * 3 + 1 + textureHeader->colorCombineSubType; } } if (renderMode != RENDER_MODE_ALPHATEST && renderMode != RENDER_MODE_ALPHATEST_ONESIDED) { - *(*gfxPos) = ModelCombineModesA[v1][combineSubType]; + *(*gfxPos) = ModelCombineModesStandard[combineType][combineSubType]; } else { - *(*gfxPos) = ModelCombineModesB[v1][combineSubType]; + *(*gfxPos) = ModelCombineModesAlphaTest[combineType][combineSubType]; } (*gfxPos)++; } switch (texturingMode) { - case 1: + case TILE_MODE_1A: switch (renderMode) { case RENDER_MODE_SURFACE_OPA: renderModeIdx = RENDER_MODE_IDX_00; @@ -1349,7 +1476,7 @@ void appendGfx_model(void* data) { case RENDER_MODE_ALPHATEST_ONESIDED: renderModeIdx = RENDER_MODE_IDX_07; break; - case RENDER_MODE_SURFXLU_AA_ZB_ZUPD: + case RENDER_MODE_SURFACE_XLU_AA_ZB_ZUPD: renderModeIdx = RENDER_MODE_IDX_09; break; case RENDER_MODE_SURFACE_XLU_LAYER1: @@ -1360,13 +1487,13 @@ void appendGfx_model(void* data) { case RENDER_MODE_SURFACE_XLU_NO_AA: renderModeIdx = RENDER_MODE_IDX_0A; break; - case RENDER_MODE_SURFXLU_ZB_ZUPD: + case RENDER_MODE_SURFACE_XLU_ZB_ZUPD: renderModeIdx = RENDER_MODE_IDX_0B; break; case RENDER_MODE_DECAL_XLU: renderModeIdx = RENDER_MODE_IDX_0C; break; - case RENDER_MODE_DECAL_XLU_NOAA: + case RENDER_MODE_DECAL_XLU_NO_AA: renderModeIdx = RENDER_MODE_IDX_0D; break; case RENDER_MODE_INTERSECTING_XLU: @@ -1393,8 +1520,11 @@ void appendGfx_model(void* data) { } gSPDisplayList((*gfxPos)++, ModelRenderModes[renderModeIdx]); break; - case 2: + case TILE_MODE_2A: switch (renderMode) { + case RENDER_MODE_SURFACE_OPA: + renderModeIdx = RENDER_MODE_IDX_10; + break; case RENDER_MODE_SURFACE_OPA_NO_AA: renderModeIdx = RENDER_MODE_IDX_11; break; @@ -1418,7 +1548,7 @@ void appendGfx_model(void* data) { case RENDER_MODE_SURFACE_XLU_LAYER3: renderModeIdx = RENDER_MODE_IDX_18; break; - case RENDER_MODE_SURFXLU_AA_ZB_ZUPD: + case RENDER_MODE_SURFACE_XLU_AA_ZB_ZUPD: renderModeIdx = RENDER_MODE_IDX_19; break; case RENDER_MODE_SURFACE_XLU_NO_AA: @@ -1427,7 +1557,7 @@ void appendGfx_model(void* data) { case RENDER_MODE_DECAL_XLU: renderModeIdx = RENDER_MODE_IDX_1B; break; - case RENDER_MODE_DECAL_XLU_NOAA: + case RENDER_MODE_DECAL_XLU_NO_AA: renderModeIdx = RENDER_MODE_IDX_1C; break; case RENDER_MODE_INTERSECTING_XLU: @@ -1448,162 +1578,17 @@ void appendGfx_model(void* data) { case RENDER_MODE_CLOUD_NO_ZB: renderModeIdx = RENDER_MODE_IDX_3A; break; - case RENDER_MODE_SURFACE_OPA: - renderModeIdx = RENDER_MODE_IDX_10; - break; default: renderModeIdx = RENDER_MODE_IDX_10; break; } gSPDisplayList((*gfxPos)++, ModelRenderModes[renderModeIdx]); break; - case 3: - temp = RENDER_MODE_IDX_25; // required to match + case TILE_MODE_3A: switch (renderMode) { - case RENDER_MODE_SURFACE_OPA_NO_AA: - renderModeIdx = RENDER_MODE_IDX_20; - break; - case RENDER_MODE_DECAL_OPA: - renderModeIdx = RENDER_MODE_IDX_21; - break; - case RENDER_MODE_DECAL_OPA_NO_AA: - renderModeIdx = RENDER_MODE_IDX_22; - break; - case RENDER_MODE_INTERSECTING_OPA: - renderModeIdx = RENDER_MODE_IDX_23; - break; - case RENDER_MODE_ALPHATEST: - renderModeIdx = temp; - break; - case RENDER_MODE_ALPHATEST_ONESIDED: - renderModeIdx = RENDER_MODE_IDX_26; - break; - case RENDER_MODE_SURFACE_XLU_LAYER1: - case RENDER_MODE_SURFACE_XLU_LAYER2: - case RENDER_MODE_SURFACE_XLU_LAYER3: - renderModeIdx = RENDER_MODE_IDX_27; - break; - case RENDER_MODE_SURFXLU_AA_ZB_ZUPD: - renderModeIdx = RENDER_MODE_IDX_28; - break; - case RENDER_MODE_SURFACE_XLU_NO_AA: - renderModeIdx = RENDER_MODE_IDX_29; - break; - case RENDER_MODE_DECAL_XLU: - renderModeIdx = RENDER_MODE_IDX_2A; - break; - case RENDER_MODE_DECAL_XLU_NOAA: - renderModeIdx = RENDER_MODE_IDX_2B; - break; - case RENDER_MODE_INTERSECTING_XLU: - renderModeIdx = RENDER_MODE_IDX_2C; - break; - case RENDER_MODE_SURFACE_OPA_NO_ZB: - renderModeIdx = RENDER_MODE_IDX_34; - break; - case RENDER_MODE_ALPHATEST_NO_ZB: - renderModeIdx = RENDER_MODE_IDX_35; - break; - case RENDER_MODE_SURFACE_XLU_NO_ZB: - renderModeIdx = RENDER_MODE_IDX_36; - break; - case RENDER_MODE_CLOUD: - renderModeIdx = RENDER_MODE_IDX_3B; - break; - case RENDER_MODE_CLOUD_NO_ZB: - renderModeIdx = RENDER_MODE_IDX_3C; - break; case RENDER_MODE_SURFACE_OPA: renderModeIdx = RENDER_MODE_IDX_1F; break; - default: - renderModeIdx = RENDER_MODE_IDX_1F; - break; - } - gSPDisplayList((*gfxPos)++, ModelRenderModes[renderModeIdx]); - gDPSetFogColor((*gfxPos)++, gCurrentFogSettings->color.r, - gCurrentFogSettings->color.g, - gCurrentFogSettings->color.b, - gCurrentFogSettings->color.a); - gSPFogPosition((*gfxPos)++, gCurrentFogSettings->startDistance, gCurrentFogSettings->endDistance); - break; - case 4: - case 5: - if (mdl_bgMultiplyColorA == 255) { - return; - } - gSPDisplayList((*gfxPos)++, ModelRenderModes[RENDER_MODE_IDX_10]); - switch (renderMode) { - case RENDER_MODE_SURFACE_OPA: - gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_OPA_SURF2); - break; - case RENDER_MODE_SURFACE_OPA_NO_AA: - gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_ZB_OPA_SURF2); - break; - case RENDER_MODE_DECAL_OPA: - gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_OPA_DECAL2); - break; - case RENDER_MODE_DECAL_OPA_NO_AA: - gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_ZB_OPA_DECAL2); - break; - case RENDER_MODE_INTERSECTING_OPA: - gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_OPA_INTER2); - break; - case RENDER_MODE_ALPHATEST: - gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_TEX_EDGE2); - break; - case RENDER_MODE_ALPHATEST_ONESIDED: - gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_TEX_EDGE2); - break; - case RENDER_MODE_SURFACE_XLU_LAYER1: - gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_XLU_SURF2); - break; - case RENDER_MODE_SURFACE_XLU_LAYER2: - gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_XLU_SURF2); - break; - case RENDER_MODE_SURFACE_XLU_LAYER3: - gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_XLU_SURF2); - break; - case RENDER_MODE_SURFACE_XLU_NO_AA: - gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_ZB_XLU_SURF2); - break; - case RENDER_MODE_DECAL_XLU: - gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_XLU_DECAL2); - break; - case RENDER_MODE_DECAL_XLU_NOAA: - gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_XLU_DECAL2); - break; - case RENDER_MODE_INTERSECTING_XLU: - gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_XLU_INTER2); - break; - case RENDER_MODE_SURFACE_OPA_NO_ZB: - gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_OPA_SURF2); - break; - case RENDER_MODE_ALPHATEST_NO_ZB: - gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_TEX_EDGE2); - break; - case RENDER_MODE_SURFACE_XLU_NO_ZB: - gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_XLU_SURF2); - break; - case RENDER_MODE_CLOUD: - gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_ZB_CLD_SURF2); - break; - case RENDER_MODE_CLOUD_NO_ZB: - gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_CLD_SURF2); - break; - } - gDPSetFogColor((*gfxPos)++, gCurrentFogSettings->color.r, - gCurrentFogSettings->color.g, - gCurrentFogSettings->color.b, - mdl_bgMultiplyColorA); - gDPSetBlendColor((*gfxPos)++, mdl_bgMultiplyColorR, - mdl_bgMultiplyColorG, - mdl_bgMultiplyColorB, - 255); - gSPFogPosition((*gfxPos)++, 970, 1000); - break; - case 6: - switch (renderMode) { case RENDER_MODE_SURFACE_OPA_NO_AA: renderModeIdx = RENDER_MODE_IDX_20; break; @@ -1627,7 +1612,7 @@ void appendGfx_model(void* data) { case RENDER_MODE_SURFACE_XLU_LAYER3: renderModeIdx = RENDER_MODE_IDX_27; break; - case RENDER_MODE_SURFXLU_AA_ZB_ZUPD: + case RENDER_MODE_SURFACE_XLU_AA_ZB_ZUPD: renderModeIdx = RENDER_MODE_IDX_28; break; case RENDER_MODE_SURFACE_XLU_NO_AA: @@ -1636,7 +1621,7 @@ void appendGfx_model(void* data) { case RENDER_MODE_DECAL_XLU: renderModeIdx = RENDER_MODE_IDX_2A; break; - case RENDER_MODE_DECAL_XLU_NOAA: + case RENDER_MODE_DECAL_XLU_NO_AA: renderModeIdx = RENDER_MODE_IDX_2B; break; case RENDER_MODE_INTERSECTING_XLU: @@ -1657,9 +1642,150 @@ void appendGfx_model(void* data) { case RENDER_MODE_CLOUD_NO_ZB: renderModeIdx = RENDER_MODE_IDX_3C; break; + default: + renderModeIdx = RENDER_MODE_IDX_1F; + break; + } + gSPDisplayList((*gfxPos)++, ModelRenderModes[renderModeIdx]); + gDPSetFogColor((*gfxPos)++, gCurrentFogSettings->color.r, + gCurrentFogSettings->color.g, + gCurrentFogSettings->color.b, + gCurrentFogSettings->color.a); + gSPFogPosition((*gfxPos)++, gCurrentFogSettings->startDistance, gCurrentFogSettings->endDistance); + break; + case TILE_MODE_1B: + case TILE_MODE_2B: + if (mdl_bgMultiplyColorA == 255) { + return; + } + gSPDisplayList((*gfxPos)++, ModelRenderModes[RENDER_MODE_IDX_10]); + switch (renderMode) { + case RENDER_MODE_SURFACE_OPA: + gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_AA_ZB_OPA_SURF2); + break; + case RENDER_MODE_SURFACE_OPA_NO_AA: + gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_ZB_OPA_SURF2); + break; + case RENDER_MODE_DECAL_OPA: + gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_AA_ZB_OPA_DECAL2); + break; + case RENDER_MODE_DECAL_OPA_NO_AA: + gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_ZB_OPA_DECAL2); + break; + case RENDER_MODE_INTERSECTING_OPA: + gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_AA_ZB_OPA_INTER2); + break; + case RENDER_MODE_ALPHATEST: + gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_AA_ZB_TEX_EDGE2); + break; + case RENDER_MODE_ALPHATEST_ONESIDED: + gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_AA_ZB_TEX_EDGE2); + break; + case RENDER_MODE_SURFACE_XLU_LAYER1: + gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_AA_ZB_XLU_SURF2); + break; + case RENDER_MODE_SURFACE_XLU_LAYER2: + gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_AA_ZB_XLU_SURF2); + break; + case RENDER_MODE_SURFACE_XLU_LAYER3: + gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_AA_ZB_XLU_SURF2); + break; + case RENDER_MODE_SURFACE_XLU_NO_AA: + gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_ZB_XLU_SURF2); + break; + case RENDER_MODE_DECAL_XLU: + gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_AA_ZB_XLU_DECAL2); + break; + case RENDER_MODE_DECAL_XLU_NO_AA: + gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_AA_ZB_XLU_DECAL2); + break; + case RENDER_MODE_INTERSECTING_XLU: + gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_AA_ZB_XLU_INTER2); + break; + case RENDER_MODE_SURFACE_OPA_NO_ZB: + gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_AA_OPA_SURF2); + break; + case RENDER_MODE_ALPHATEST_NO_ZB: + gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_AA_TEX_EDGE2); + break; + case RENDER_MODE_SURFACE_XLU_NO_ZB: + gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_AA_XLU_SURF2); + break; + case RENDER_MODE_CLOUD: + gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_ZB_CLD_SURF2); + break; + case RENDER_MODE_CLOUD_NO_ZB: + gDPSetRenderMode(gMainGfxPos++, PM_RM_TILEMODE_B, G_RM_CLD_SURF2); + break; + } + gDPSetFogColor((*gfxPos)++, gCurrentFogSettings->color.r, + gCurrentFogSettings->color.g, + gCurrentFogSettings->color.b, + mdl_bgMultiplyColorA); + gDPSetBlendColor((*gfxPos)++, mdl_bgMultiplyColorR, + mdl_bgMultiplyColorG, + mdl_bgMultiplyColorB, + 255); + gSPFogPosition((*gfxPos)++, 970, 1000); + break; + case TILE_MODE_3B: + switch (renderMode) { case RENDER_MODE_SURFACE_OPA: renderModeIdx = RENDER_MODE_IDX_1F; break; + case RENDER_MODE_SURFACE_OPA_NO_AA: + renderModeIdx = RENDER_MODE_IDX_20; + break; + case RENDER_MODE_DECAL_OPA: + renderModeIdx = RENDER_MODE_IDX_21; + break; + case RENDER_MODE_DECAL_OPA_NO_AA: + renderModeIdx = RENDER_MODE_IDX_22; + break; + case RENDER_MODE_INTERSECTING_OPA: + renderModeIdx = RENDER_MODE_IDX_23; + break; + case RENDER_MODE_ALPHATEST: + renderModeIdx = RENDER_MODE_IDX_25; + break; + case RENDER_MODE_ALPHATEST_ONESIDED: + renderModeIdx = RENDER_MODE_IDX_26; + break; + case RENDER_MODE_SURFACE_XLU_LAYER1: + case RENDER_MODE_SURFACE_XLU_LAYER2: + case RENDER_MODE_SURFACE_XLU_LAYER3: + renderModeIdx = RENDER_MODE_IDX_27; + break; + case RENDER_MODE_SURFACE_XLU_AA_ZB_ZUPD: + renderModeIdx = RENDER_MODE_IDX_28; + break; + case RENDER_MODE_SURFACE_XLU_NO_AA: + renderModeIdx = RENDER_MODE_IDX_29; + break; + case RENDER_MODE_DECAL_XLU: + renderModeIdx = RENDER_MODE_IDX_2A; + break; + case RENDER_MODE_DECAL_XLU_NO_AA: + renderModeIdx = RENDER_MODE_IDX_2B; + break; + case RENDER_MODE_INTERSECTING_XLU: + renderModeIdx = RENDER_MODE_IDX_2C; + break; + case RENDER_MODE_SURFACE_OPA_NO_ZB: + renderModeIdx = RENDER_MODE_IDX_34; + break; + case RENDER_MODE_ALPHATEST_NO_ZB: + renderModeIdx = RENDER_MODE_IDX_35; + break; + case RENDER_MODE_SURFACE_XLU_NO_ZB: + renderModeIdx = RENDER_MODE_IDX_36; + break; + case RENDER_MODE_CLOUD: + renderModeIdx = RENDER_MODE_IDX_3B; + break; + case RENDER_MODE_CLOUD_NO_ZB: + renderModeIdx = RENDER_MODE_IDX_3C; + break; default: renderModeIdx = RENDER_MODE_IDX_1F; break; @@ -1676,9 +1802,12 @@ void appendGfx_model(void* data) { gDPSetFogColor(gMainGfxPos++, fogR, fogG, fogB, gCurrentFogSettings->color.a); gSPFogPosition((*gfxPos)++, fogMin, fogMax); break; - case 10: - case 11: + case TILE_MODE_1C: + case TILE_MODE_2C: switch (renderMode) { + case RENDER_MODE_SURFACE_OPA: + renderModeIdx = RENDER_MODE_IDX_1F; + break; case RENDER_MODE_DECAL_OPA: renderModeIdx = RENDER_MODE_IDX_21; break; @@ -1694,7 +1823,6 @@ void appendGfx_model(void* data) { case RENDER_MODE_CLOUD_NO_ZB: renderModeIdx = RENDER_MODE_IDX_3C; break; - case RENDER_MODE_SURFACE_OPA: default: renderModeIdx = RENDER_MODE_IDX_1F; break; @@ -1836,7 +1964,7 @@ void load_texture_by_name(ModelNodeProperty* propertyName, s32 romOffset, s32 si s32 mainSize; if (textureName == NULL) { - (*mdl_currentModelTreeNodeInfo)[mdl_treeIterPos].textureID = 0; + (*gCurrentModelTreeNodeInfo)[mdl_treeIterPos].textureID = 0; return; } @@ -1933,17 +2061,17 @@ void load_texture_by_name(ModelNodeProperty* propertyName, s32 romOffset, s32 si if (romOffset >= startOffset + 0x40000) { // did not find the texture with `textureName` - (*mdl_currentModelTreeNodeInfo)[mdl_treeIterPos].textureID = 0; + (*gCurrentModelTreeNodeInfo)[mdl_treeIterPos].textureID = 0; return; } - (*mdl_currentModelTreeNodeInfo)[mdl_treeIterPos].textureID = textureIdx + 1; - textureHandle = &mdl_textureHandles[(*mdl_currentModelTreeNodeInfo)[mdl_treeIterPos].textureID]; + (*gCurrentModelTreeNodeInfo)[mdl_treeIterPos].textureID = textureIdx + 1; + textureHandle = &mdl_textureHandles[(*gCurrentModelTreeNodeInfo)[mdl_treeIterPos].textureID]; romOffset += sizeof(*header); if (textureHandle->gfx == NULL) { load_texture_impl(romOffset, textureHandle, header, rasterSize, paletteSize, auxRasterSize, auxPaletteSize); - load_texture_variants(romOffset + rasterSize + paletteSize + auxRasterSize + auxPaletteSize, (*mdl_currentModelTreeNodeInfo)[mdl_treeIterPos].textureID, startOffset, size); + load_texture_variants(romOffset + rasterSize + paletteSize + auxRasterSize + auxPaletteSize, (*gCurrentModelTreeNodeInfo)[mdl_treeIterPos].textureID, startOffset, size); } } @@ -2146,7 +2274,7 @@ void clear_model_data(void) { gCurrentCustomModelGfxBuildersPtr = &wCustomModelGfxBuilders; gCurrentModelTreeRoot = &wModelTreeRoot; gCurrentModelLocalVtxBuffers = &wModelLocalVtxBuffers; - mdl_currentModelTreeNodeInfo = &D_80152220; + gCurrentModelTreeNodeInfo = &wModelTreeNodeInfo; gBackgroundFogModePtr = &wBackgroundFogMode; mdl_bgMultiplyColorA = 0; mdl_bgMultiplyColorR = 0; @@ -2160,7 +2288,7 @@ void clear_model_data(void) { gCurrentCustomModelGfxBuildersPtr = &bCustomModelGfxBuilders; gCurrentModelTreeRoot = &bModelTreeRoot; gCurrentModelLocalVtxBuffers = &bModelLocalVtxBuffers; - mdl_currentModelTreeNodeInfo = &D_80152A20; + gCurrentModelTreeNodeInfo = &bModelTreeNodeInfo; gBackgroundFogModePtr = &bBackgroundFogMode; gCurrentFogSettings = &bFogSettings; } @@ -2180,10 +2308,10 @@ void clear_model_data(void) { *gCurrentModelTreeRoot = NULL; - for (i = 0; i < ARRAY_COUNT(*mdl_currentModelTreeNodeInfo); i++) { - (*mdl_currentModelTreeNodeInfo)[i].modelIndex = -1; - (*mdl_currentModelTreeNodeInfo)[i].treeDepth = 0; - (*mdl_currentModelTreeNodeInfo)[i].textureID = 0; + for (i = 0; i < ARRAY_COUNT(*gCurrentModelTreeNodeInfo); i++) { + (*gCurrentModelTreeNodeInfo)[i].modelIndex = -1; + (*gCurrentModelTreeNodeInfo)[i].treeDepth = 0; + (*gCurrentModelTreeNodeInfo)[i].textureID = 0; } *gBackgroundFogModePtr = FOG_MODE_0; @@ -2211,7 +2339,7 @@ void init_model_data(void) { gCurrentCustomModelGfxBuildersPtr = &wCustomModelGfxBuilders; gCurrentModelTreeRoot = &wModelTreeRoot; gCurrentModelLocalVtxBuffers = &wModelLocalVtxBuffers; - mdl_currentModelTreeNodeInfo = &D_80152220; + gCurrentModelTreeNodeInfo = &wModelTreeNodeInfo; gBackgroundFogModePtr = &wBackgroundFogMode; gCurrentFogSettings = &wFogSettings; } else { @@ -2221,7 +2349,7 @@ void init_model_data(void) { gCurrentCustomModelGfxBuildersPtr = &bCustomModelGfxBuilders; gCurrentModelTreeRoot = &bModelTreeRoot; gCurrentModelLocalVtxBuffers = &bModelLocalVtxBuffers; - mdl_currentModelTreeNodeInfo = &D_80152A20; + gCurrentModelTreeNodeInfo = &bModelTreeNodeInfo; gBackgroundFogModePtr = &bBackgroundFogMode; gCurrentFogSettings = &bFogSettings; } @@ -2313,7 +2441,7 @@ void mdl_create_model(ModelBlueprint* bp, s32 unused) { model->renderMode = RENDER_MODE_SURFACE_OPA; } - model->textureID = (*mdl_currentModelTreeNodeInfo)[mdl_treeIterPos].textureID; + model->textureID = (*gCurrentModelTreeNodeInfo)[mdl_treeIterPos].textureID; model->textureVariation = 0; if (!is_identity_fixed_mtx(bp->mtx)) { @@ -2358,7 +2486,7 @@ void mdl_create_model(ModelBlueprint* bp, s32 unused) { if (model->bakedMtx == NULL && x < 100.0f && y < 100.0f && z < 100.0f) { model->flags |= MODEL_FLAG_DO_BOUNDS_CULLING; } - (*mdl_currentModelTreeNodeInfo)[mdl_treeIterPos].modelIndex = modelIdx; + (*gCurrentModelTreeNodeInfo)[mdl_treeIterPos].modelIndex = modelIdx; } // Mysterious no-op @@ -2714,11 +2842,11 @@ void render_models(void) { void appendGfx_model_group(void* data) { Model* model = data; - s32 modelTreeDepth = (*mdl_currentModelTreeNodeInfo)[model->modelID].treeDepth; + s32 modelTreeDepth = (*gCurrentModelTreeNodeInfo)[model->modelID].treeDepth; s32 i; for (i = model->modelID - 1; i >= 0; i--) { - if (modelTreeDepth >= (*mdl_currentModelTreeNodeInfo)[i].treeDepth) { + if (modelTreeDepth >= (*gCurrentModelTreeNodeInfo)[i].treeDepth) { break; } } @@ -2760,7 +2888,7 @@ void func_80117D00(Model* model) { newModel.renderMode = 0; } - newModel.textureID = (*mdl_currentModelTreeNodeInfo)[mdl_treeIterPos].textureID; + newModel.textureID = (*gCurrentModelTreeNodeInfo)[mdl_treeIterPos].textureID; newModel.textureVariation = 0; func_80117D00(&newModel); } @@ -2927,7 +3055,7 @@ void make_texture_gfx(TextureHeader* header, Gfx** gfxPos, IMG_PTR raster, PAL_P renderType = header->extraTiles * 3 + 1 + header->colorCombineSubType; } - **gfxPos = ModelCombineModesA[renderType][0]; + **gfxPos = ModelCombineModesStandard[renderType][0]; (*gfxPos)++; switch (extraTileType) { @@ -3148,8 +3276,8 @@ void load_model_transforms(ModelNode* model, ModelNode* parent, Matrix4f mdlTran treeDepth + 1); } - (*mdl_currentModelTreeNodeInfo)[mdl_treeIterPos].modelIndex = -1; - (*mdl_currentModelTreeNodeInfo)[mdl_treeIterPos].treeDepth = treeDepth; + (*gCurrentModelTreeNodeInfo)[mdl_treeIterPos].modelIndex = -1; + (*gCurrentModelTreeNodeInfo)[mdl_treeIterPos].treeDepth = treeDepth; mdl_treeIterPos += 1; return; } @@ -3165,14 +3293,14 @@ void load_model_transforms(ModelNode* model, ModelNode* parent, Matrix4f mdlTran s32 childCount = mdl_get_child_count(model); for (i = mdl_treeIterPos; i < mdl_treeIterPos + childCount; i++) { - (*mdl_currentModelTreeNodeInfo)[i].modelIndex = -1; - (*mdl_currentModelTreeNodeInfo)[i].treeDepth = treeDepth + 1; + (*gCurrentModelTreeNodeInfo)[i].modelIndex = -1; + (*gCurrentModelTreeNodeInfo)[i].treeDepth = treeDepth + 1; } mdl_treeIterPos += childCount; } mdl_create_model(modelBPptr, 4); - (*mdl_currentModelTreeNodeInfo)[mdl_treeIterPos].treeDepth = treeDepth; + (*gCurrentModelTreeNodeInfo)[mdl_treeIterPos].treeDepth = treeDepth; mdl_treeIterPos += 1; } @@ -3180,7 +3308,7 @@ s32 get_model_list_index_from_tree_index(s32 treeIndex) { s32 i; if (treeIndex < MAX_MODELS) { - u8 modelIndex = (*mdl_currentModelTreeNodeInfo)[treeIndex].modelIndex; + u8 modelIndex = (*gCurrentModelTreeNodeInfo)[treeIndex].modelIndex; if (modelIndex != (u8)-1) { return modelIndex; @@ -3419,20 +3547,20 @@ void clone_model(u16 srcModelID, u16 newModelID) { void set_model_group_visibility(u16 treeIndex, s32 flags, s32 mode) { s32 maxGroupIndex = -1; s32 minGroupIndex; - s32 modelIndex = (*mdl_currentModelTreeNodeInfo)[treeIndex].modelIndex; + s32 modelIndex = (*gCurrentModelTreeNodeInfo)[treeIndex].modelIndex; s32 siblingIndex; s32 i; if (modelIndex < MAX_MODELS - 1) { minGroupIndex = maxGroupIndex = modelIndex; } else { - s32 treeDepth = (*mdl_currentModelTreeNodeInfo)[treeIndex].treeDepth; + s32 treeDepth = (*gCurrentModelTreeNodeInfo)[treeIndex].treeDepth; for (i = treeIndex - 1; i >= 0; i--) { - if ((*mdl_currentModelTreeNodeInfo)[i].treeDepth <= treeDepth) { + if ((*gCurrentModelTreeNodeInfo)[i].treeDepth <= treeDepth) { break; } - siblingIndex = (*mdl_currentModelTreeNodeInfo)[i].modelIndex; + siblingIndex = (*gCurrentModelTreeNodeInfo)[i].modelIndex; if (siblingIndex < MAX_MODELS - 1) { if (maxGroupIndex == -1) { @@ -3478,20 +3606,20 @@ void func_8011B950(u16 modelID, s32 customGfxIndex, s32 fogType, s32 arg3) { s32 maxGroupIndex = -1; s32 i; s32 minGroupIndex; - s32 modelIndex = (*mdl_currentModelTreeNodeInfo)[modelID].modelIndex; + s32 modelIndex = (*gCurrentModelTreeNodeInfo)[modelID].modelIndex; s32 siblingIndex; s32 maskLow, maskHigh, packedFogType; if (modelIndex < MAX_MODELS - 1) { minGroupIndex = maxGroupIndex = modelIndex; } else { - s32 treeDepth = (*mdl_currentModelTreeNodeInfo)[modelID].treeDepth; + s32 treeDepth = (*gCurrentModelTreeNodeInfo)[modelID].treeDepth; for (i = modelID - 1; i >= 0; i--) { - if ((*mdl_currentModelTreeNodeInfo)[i].treeDepth <= treeDepth) { + if ((*gCurrentModelTreeNodeInfo)[i].treeDepth <= treeDepth) { break; } - siblingIndex = (*mdl_currentModelTreeNodeInfo)[i].modelIndex; + siblingIndex = (*gCurrentModelTreeNodeInfo)[i].modelIndex; if (siblingIndex < MAX_MODELS - 1) { if (maxGroupIndex == -1) { @@ -4343,13 +4471,13 @@ RenderTask* queue_render_task(RenderTask* task) { ret = &ret[mdl_renderTaskCount++]; ret->renderMode = RENDER_TASK_FLAG_ENABLED; - if (task->renderMode == RENDER_MODE_2D) { + if (task->renderMode == RENDER_MODE_CLOUD_NO_ZCMP) { ret->renderMode |= RENDER_TASK_FLAG_20; } ret->appendGfxArg = task->appendGfxArg; ret->appendGfx = task->appendGfx; - ret->dist = mdl_renderTaskBasePriorities[task->renderMode] - task->dist; + ret->dist = RenderTaskBasePriorities[task->renderMode] - task->dist; return ret; } diff --git a/src/starpoint.c b/src/starpoint.c index 1d26592a17..c9affb6748 100644 --- a/src/starpoint.c +++ b/src/starpoint.c @@ -126,20 +126,20 @@ Gfx D_802A32D8_7AAC78[] = { #include "starpoint/_render_digit_9.gfx.inc.c" #include "starpoint/render_digit_9.gfx.inc.c" -EntityModelScript EMS_starpoint_starpoint = STANDARD_ENTITY_MODEL_SCRIPT(D_802A2158_7A9AF8, RENDER_MODE_2D); -EntityModelScript EMS_starpoint_starpoints = STANDARD_ENTITY_MODEL_SCRIPT(D_802A32D8_7AAC78, RENDER_MODE_2D); -EntityModelScript EMS_starpoint_digit_0 = STANDARD_ENTITY_MODEL_SCRIPT(D_802A4410_7ABDB0, RENDER_MODE_2D); -EntityModelScript EMS_starpoint_digit_1 = STANDARD_ENTITY_MODEL_SCRIPT(D_802A5530_7ACED0, RENDER_MODE_2D); -EntityModelScript EMS_starpoint_digit_2 = STANDARD_ENTITY_MODEL_SCRIPT(D_802A6650_7ADFF0, RENDER_MODE_2D); -EntityModelScript EMS_starpoint_digit_3 = STANDARD_ENTITY_MODEL_SCRIPT(D_802A7770_7AF110, RENDER_MODE_2D); -EntityModelScript EMS_starpoint_digit_4 = STANDARD_ENTITY_MODEL_SCRIPT(D_802A8890_7B0230, RENDER_MODE_2D); -EntityModelScript EMS_starpoint_digit_5 = STANDARD_ENTITY_MODEL_SCRIPT(D_802A99B0_7B1350, RENDER_MODE_2D); -EntityModelScript EMS_starpoint_digit_6 = STANDARD_ENTITY_MODEL_SCRIPT(D_802AAAD0_7B2470, RENDER_MODE_2D); -EntityModelScript EMS_starpoint_digit_7 = STANDARD_ENTITY_MODEL_SCRIPT(D_802ABBF0_7B3590, RENDER_MODE_2D); -EntityModelScript EMS_starpoint_digit_8 = STANDARD_ENTITY_MODEL_SCRIPT(D_802ACD10_7B46B0, RENDER_MODE_2D); -EntityModelScript EMS_starpoint_digit_9 = STANDARD_ENTITY_MODEL_SCRIPT(D_802ADE30_7B57D0, RENDER_MODE_2D); +EntityModelScript EMS_starpoint_starpoint = STANDARD_ENTITY_MODEL_SCRIPT(D_802A2158_7A9AF8, RENDER_MODE_CLOUD_NO_ZCMP); +EntityModelScript EMS_starpoint_starpoints = STANDARD_ENTITY_MODEL_SCRIPT(D_802A32D8_7AAC78, RENDER_MODE_CLOUD_NO_ZCMP); +EntityModelScript EMS_starpoint_digit_0 = STANDARD_ENTITY_MODEL_SCRIPT(D_802A4410_7ABDB0, RENDER_MODE_CLOUD_NO_ZCMP); +EntityModelScript EMS_starpoint_digit_1 = STANDARD_ENTITY_MODEL_SCRIPT(D_802A5530_7ACED0, RENDER_MODE_CLOUD_NO_ZCMP); +EntityModelScript EMS_starpoint_digit_2 = STANDARD_ENTITY_MODEL_SCRIPT(D_802A6650_7ADFF0, RENDER_MODE_CLOUD_NO_ZCMP); +EntityModelScript EMS_starpoint_digit_3 = STANDARD_ENTITY_MODEL_SCRIPT(D_802A7770_7AF110, RENDER_MODE_CLOUD_NO_ZCMP); +EntityModelScript EMS_starpoint_digit_4 = STANDARD_ENTITY_MODEL_SCRIPT(D_802A8890_7B0230, RENDER_MODE_CLOUD_NO_ZCMP); +EntityModelScript EMS_starpoint_digit_5 = STANDARD_ENTITY_MODEL_SCRIPT(D_802A99B0_7B1350, RENDER_MODE_CLOUD_NO_ZCMP); +EntityModelScript EMS_starpoint_digit_6 = STANDARD_ENTITY_MODEL_SCRIPT(D_802AAAD0_7B2470, RENDER_MODE_CLOUD_NO_ZCMP); +EntityModelScript EMS_starpoint_digit_7 = STANDARD_ENTITY_MODEL_SCRIPT(D_802ABBF0_7B3590, RENDER_MODE_CLOUD_NO_ZCMP); +EntityModelScript EMS_starpoint_digit_8 = STANDARD_ENTITY_MODEL_SCRIPT(D_802ACD10_7B46B0, RENDER_MODE_CLOUD_NO_ZCMP); +EntityModelScript EMS_starpoint_digit_9 = STANDARD_ENTITY_MODEL_SCRIPT(D_802ADE30_7B57D0, RENDER_MODE_CLOUD_NO_ZCMP); Gfx D_802ADF90_7B5930[] = { gsSPEndDisplayList(), }; -EntityModelScript EMS_starpoint_dummy = STANDARD_ENTITY_MODEL_SCRIPT(D_802ADF90_7B5930, RENDER_MODE_2D); +EntityModelScript EMS_starpoint_dummy = STANDARD_ENTITY_MODEL_SCRIPT(D_802ADF90_7B5930, RENDER_MODE_CLOUD_NO_ZCMP); diff --git a/src/trigger.c b/src/trigger.c index 19707dc42b..5499619aff 100644 --- a/src/trigger.c +++ b/src/trigger.c @@ -290,7 +290,7 @@ s32 should_collider_allow_interact(s32 colliderID) { if (trigger != NULL && trigger->hasPlayerInteractPrompt != 0 && trigger->location.colliderID == colliderID - && trigger->flags & TRIGGER_WALL_PRESS_A + && trigger->flags & TRIGGER_WALL_PRESS_A ) { return TRUE; } diff --git a/src/world/area_kmr/kmr_20/kmr_20_13_records.c b/src/world/area_kmr/kmr_20/kmr_20_13_records.c index 7033dd3be3..f4a3c16c08 100644 --- a/src/world/area_kmr/kmr_20/kmr_20_13_records.c +++ b/src/world/area_kmr/kmr_20/kmr_20_13_records.c @@ -182,7 +182,7 @@ void N(appendGfx_records)(void* data) { void N(worker_draw_game_records)(void) { RenderTask rt; - rt.renderMode = RENDER_MODE_2D; + rt.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; rt.appendGfxArg = NULL; rt.appendGfx = N(appendGfx_records); rt.dist = 0; diff --git a/src/world/area_kpa/kpa_100/kpa_100_2_main.c b/src/world/area_kpa/kpa_100/kpa_100_2_main.c index 6f8a6fd173..27f9349d4f 100644 --- a/src/world/area_kpa/kpa_100/kpa_100_2_main.c +++ b/src/world/area_kpa/kpa_100/kpa_100_2_main.c @@ -4,7 +4,7 @@ s32 N(map_init)(void) { sprintf(wMapShapeName, "kpa_117_shape"); sprintf(wMapHitName, "kpa_117_hit"); - return ApiStatus_BLOCK; + return FALSE; } EvtScript N(EVS_ExitWalk_kpa_08_1) = EVT_EXIT_WALK(60, kpa_100_ENTRY_0, "kpa_08", kpa_08_ENTRY_1); diff --git a/src/world/area_kpa/kpa_101/kpa_101_2_main.c b/src/world/area_kpa/kpa_101/kpa_101_2_main.c index 651a040342..7e8787babc 100644 --- a/src/world/area_kpa/kpa_101/kpa_101_2_main.c +++ b/src/world/area_kpa/kpa_101/kpa_101_2_main.c @@ -3,7 +3,7 @@ s32 N(map_init)(void) { sprintf(wMapShapeName, "kpa_119_shape"); sprintf(wMapHitName, "kpa_119_hit"); - return ApiStatus_BLOCK; + return FALSE; } EvtScript N(EVS_ExitWalk_kpa_09_0) = EVT_EXIT_WALK(60, kpa_101_ENTRY_0, "kpa_09", kpa_09_ENTRY_0); diff --git a/src/world/area_kpa/kpa_114/kpa_114_2_main.c b/src/world/area_kpa/kpa_114/kpa_114_2_main.c index aba6d7ed94..a01650546c 100644 --- a/src/world/area_kpa/kpa_114/kpa_114_2_main.c +++ b/src/world/area_kpa/kpa_114/kpa_114_2_main.c @@ -4,7 +4,7 @@ s32 N(map_init)(void) { sprintf(wMapShapeName, "kpa_112_shape"); sprintf(wMapHitName, "kpa_112_hit"); - return ApiStatus_BLOCK; + return FALSE; } EvtScript N(EVS_ExitWalk_kpa_113_2) = EVT_EXIT_WALK(60, kpa_114_ENTRY_0, "kpa_113", kpa_113_ENTRY_2); diff --git a/src/world/area_mac/mac_00/mac_00_2_main.c b/src/world/area_mac/mac_00/mac_00_2_main.c index 5392702b70..6b1c94c57d 100644 --- a/src/world/area_mac/mac_00/mac_00_2_main.c +++ b/src/world/area_mac/mac_00/mac_00_2_main.c @@ -79,7 +79,7 @@ EvtScript N(EVS_Main) = { EVT_IF_GE(GB_StoryProgress, STORY_CH0_KAMMY_RETURNED_TO_BOWSER) EVT_SET(GF_MAP_ToadTown, TRUE) EVT_END_IF - EVT_CALL(SetRenderMode, MODEL_minka1_yuka, RENDER_MODE_SURFXLU_ZB_ZUPD) + EVT_CALL(SetRenderMode, MODEL_minka1_yuka, RENDER_MODE_SURFACE_XLU_ZB_ZUPD) EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_dummy, COLLIDER_FLAGS_UPPER_MASK) EVT_SWITCH(GB_StoryProgress) EVT_CASE_EQ(STORY_INTRO) diff --git a/src/world/area_mgm/mgm_00/mgm_00_3_scoreboard.c b/src/world/area_mgm/mgm_00/mgm_00_3_scoreboard.c index 824da6c590..9cbb544acb 100644 --- a/src/world/area_mgm/mgm_00/mgm_00_3_scoreboard.c +++ b/src/world/area_mgm/mgm_00/mgm_00_3_scoreboard.c @@ -150,7 +150,7 @@ void N(animate_and_draw_record)(void* renderData) { void N(work_draw_record)(void) { RenderTask task; - task.renderMode = RENDER_MODE_2D; + task.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; task.appendGfxArg = 0; task.appendGfx = &N(animate_and_draw_record); task.dist = 0; diff --git a/src/world/area_mgm/mgm_01/mgm_01_1_main.c b/src/world/area_mgm/mgm_01/mgm_01_1_main.c index 5aa3c1b68a..0c164bb8cd 100644 --- a/src/world/area_mgm/mgm_01/mgm_01_1_main.c +++ b/src/world/area_mgm/mgm_01/mgm_01_1_main.c @@ -67,7 +67,7 @@ EvtScript N(D_8024189C_E13FFC) = { EvtScript N(EVS_Main) = { EVT_CALL(SetSpriteShading, SHADING_ARN_09) EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(SetRenderMode, MODEL_o36, RENDER_MODE_SURFXLU_ZB_ZUPD) + EVT_CALL(SetRenderMode, MODEL_o36, RENDER_MODE_SURFACE_XLU_ZB_ZUPD) EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) EVT_EXEC_WAIT(N(EVS_MakeEntities)) EVT_EXEC(N(EVS_UpdateSpotlight)) diff --git a/src/world/area_mgm/mgm_01/mgm_01_2_npc.c b/src/world/area_mgm/mgm_01/mgm_01_2_npc.c index f3c97e238e..989f3f8a80 100644 --- a/src/world/area_mgm/mgm_01/mgm_01_2_npc.c +++ b/src/world/area_mgm/mgm_01/mgm_01_2_npc.c @@ -153,7 +153,7 @@ void N(appendGfx_score_display) (void* renderData) { void N(worker_draw_score)(void) { RenderTask task; - task.renderMode = RENDER_MODE_2D; + task.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; task.appendGfxArg = 0; task.appendGfx = &mgm_01_appendGfx_score_display; task.dist = 0; diff --git a/src/world/area_mgm/mgm_02/mgm_02_2_npc.c b/src/world/area_mgm/mgm_02/mgm_02_2_npc.c index 7560a6cc2d..92ad6ac43c 100644 --- a/src/world/area_mgm/mgm_02/mgm_02_2_npc.c +++ b/src/world/area_mgm/mgm_02/mgm_02_2_npc.c @@ -194,7 +194,7 @@ void N(appendGfx_score_display)(void* renderData) { void N(worker_draw_score)(void) { RenderTask task; - task.renderMode = RENDER_MODE_2D; + task.renderMode = RENDER_MODE_CLOUD_NO_ZCMP; task.appendGfxArg = 0; task.appendGfx = &N(appendGfx_score_display); task.dist = 0; diff --git a/src/world/area_osr/osr_04/osr_04_2_assault.c b/src/world/area_osr/osr_04/osr_04_2_assault.c index 34aee25bbb..e539b64a3a 100644 --- a/src/world/area_osr/osr_04/osr_04_2_assault.c +++ b/src/world/area_osr/osr_04/osr_04_2_assault.c @@ -4,7 +4,7 @@ s32 N(map_init)(void) { gGameStatusPtr->playerSpriteSet = PLAYER_SPRITES_COMBINED_EPILOGUE; sprintf(wMapShapeName, "osr_03_shape"); sprintf(wMapHitName, "osr_03_hit"); - return ApiStatus_BLOCK; + return FALSE; } API_CALLABLE(N(MakeCastleChainAngle)) { diff --git a/src/world/area_sam/sam_06/sam_06_2_main.c b/src/world/area_sam/sam_06/sam_06_2_main.c index 51fd1bb07b..3372d257eb 100644 --- a/src/world/area_sam/sam_06/sam_06_2_main.c +++ b/src/world/area_sam/sam_06/sam_06_2_main.c @@ -109,8 +109,8 @@ EvtScript N(EVS_Main) = { EVT_EXEC(N(EVS_ManageSnowfall)) EVT_EXEC(N(EVS_TexPan_Fire)) EVT_EXEC_WAIT(N(EVS_SetupRooms)) - EVT_CALL(SetRenderMode, MODEL_h_yuki2, RENDER_MODE_SURFXLU_ZB_ZUPD) - EVT_CALL(SetRenderMode, MODEL_khm_y2, RENDER_MODE_SURFXLU_ZB_ZUPD) + EVT_CALL(SetRenderMode, MODEL_h_yuki2, RENDER_MODE_SURFACE_XLU_ZB_ZUPD) + EVT_CALL(SetRenderMode, MODEL_khm_y2, RENDER_MODE_SURFACE_XLU_ZB_ZUPD) EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_ground, SURFACE_TYPE_SNOW) EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilisw, SURFACE_TYPE_SNOW) EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_kabe, SURFACE_TYPE_SNOW) diff --git a/src/world/partner/goombario.c b/src/world/partner/goombario.c index dcda2f03dd..28f91261ed 100644 --- a/src/world/partner/goombario.c +++ b/src/world/partner/goombario.c @@ -49,7 +49,7 @@ s32 N(EntityTattles)[] = { ENTITY_TYPE_CHEST, MSG_EntityTattle_Chest, ENTITY_TYPE_WOODEN_CRATE, MSG_EntityTattle_WoodenCrate_CantBreak, ENTITY_TYPE_BOARDED_FLOOR, MSG_EntityTattle_BoardedFloor_CantBreak, - ENTITY_TYPE_STAR_BOX_LAUCHER, MSG_EntityTattle_JackInTheBox_SpinJump, + ENTITY_TYPE_STAR_BOX_LAUNCHER, MSG_EntityTattle_JackInTheBox_SpinJump, ENTITY_TYPE_BELLBELL_PLANT, MSG_EntityTattle_BellbellPlant, ENTITY_TYPE_TRUMPET_PLANT, MSG_EntityTattle_TrumpetPlant, ENTITY_TYPE_CYMBAL_PLANT, MSG_EntityTattle_CymbalBush, @@ -339,7 +339,7 @@ API_CALLABLE(N(SelectTattleMsg)) { msgID = MSG_EntityTattle_FloorSwitch_TornadoJump; } break; - case ENTITY_TYPE_STAR_BOX_LAUCHER: + case ENTITY_TYPE_STAR_BOX_LAUNCHER: if (gPlayerData.bootsLevel >= 2) { msgID = MSG_EntityTattle_JackInTheBox_TornadoJump; } diff --git a/ver/ique/asm/bss.s b/ver/ique/asm/bss.s index 7d3d9ef767..850e5d0a0c 100644 --- a/ver/ique/asm/bss.s +++ b/ver/ique/asm/bss.s @@ -67,7 +67,7 @@ dlabel D_8009A5EC dlabel nuGfxCfbCounter .space 4 -dlabel mdl_currentModelTreeNodeInfo +dlabel gCurrentModelTreeNodeInfo .space 4 dlabel nuGfxDisplay diff --git a/ver/ique/asm/bss3.s b/ver/ique/asm/bss3.s index b1a3b79dd2..e297315b70 100644 --- a/ver/ique/asm/bss3.s +++ b/ver/ique/asm/bss3.s @@ -216,10 +216,10 @@ dlabel bModelTreeRoot dlabel D_8015221C .space 4 -dlabel D_80152220 +dlabel wModelTreeNodeInfo .space 0x00000800 -dlabel D_80152A20 +dlabel bModelTreeNodeInfo .space 0x00000800 dlabel wBackgroundFogMode diff --git a/ver/pal/asm/bss3.s b/ver/pal/asm/bss3.s index 0f1993f818..e4d1f05620 100644 --- a/ver/pal/asm/bss3.s +++ b/ver/pal/asm/bss3.s @@ -218,10 +218,10 @@ dlabel bModelTreeRoot dlabel D_8015221C .space 4 -dlabel D_80152220 +dlabel wModelTreeNodeInfo .space 0x00000800 -dlabel D_80152A20 +dlabel bModelTreeNodeInfo .space 0x00000800 dlabel wBackgroundFogMode diff --git a/ver/pal/undefined_syms.txt b/ver/pal/undefined_syms.txt index 0d91e755a5..4bc751f5cd 100644 --- a/ver/pal/undefined_syms.txt +++ b/ver/pal/undefined_syms.txt @@ -275,7 +275,7 @@ EVS_800936C0 = 0x8008FA60; EVS_NpcHitRecoil = 0x8008FA7C; timeFreezeMode = 0x800969AC; nuGfxZBuffer = 0x800969B0; -mdl_currentModelTreeNodeInfo = 0x800969C8; +gCurrentModelTreeNodeInfo = 0x800969C8; gEncounterState = 0x800969D4; gCurrentCamID = 0x80096A0C; nuGfxCfb_ptr = 0x80096A24; diff --git a/ver/us/asm/bss.s b/ver/us/asm/bss.s index 33d34356ac..96425836d7 100644 --- a/ver/us/asm/bss.s +++ b/ver/us/asm/bss.s @@ -60,7 +60,7 @@ dlabel D_8009A5EC dlabel nuGfxCfbCounter .space 4 -dlabel mdl_currentModelTreeNodeInfo +dlabel gCurrentModelTreeNodeInfo .space 4 dlabel nuGfxDisplay diff --git a/ver/us/asm/bss3.s b/ver/us/asm/bss3.s index f5d1088ba4..5148ddd9c0 100644 --- a/ver/us/asm/bss3.s +++ b/ver/us/asm/bss3.s @@ -218,10 +218,10 @@ dlabel bModelTreeRoot dlabel D_8015221C .space 4 -dlabel D_80152220 +dlabel wModelTreeNodeInfo .space 0x00000800 -dlabel D_80152A20 +dlabel bModelTreeNodeInfo .space 0x00000800 dlabel wBackgroundFogMode diff --git a/ver/us/symbol_addrs.txt b/ver/us/symbol_addrs.txt index 4ea143c333..b6749fcc5a 100644 --- a/ver/us/symbol_addrs.txt +++ b/ver/us/symbol_addrs.txt @@ -2562,7 +2562,7 @@ __osViIntrCount = 0x8009A5E4; // rom:0x759E4 BeginSoundUpdateCallback = 0x8009A5E8; // rom:0x759E8 D_8009A5EC = 0x8009A5EC; // rom:0x759EC nuGfxCfbCounter = 0x8009A5F0; // rom:0x759F0 -mdl_currentModelTreeNodeInfo = 0x8009A5F4; // rom:0x759F4 +gCurrentModelTreeNodeInfo = 0x8009A5F4; // rom:0x759F4 nuGfxDisplay = 0x8009A5F8; // rom:0x759F8 gBGMPlayerB = 0x8009A5FC; // rom:0x759FC gEncounterState = 0x8009A600; // rom:0x75A00 @@ -3900,7 +3900,7 @@ func_80110BF8 = 0x80110BF8; // type:func rom:0xA72F8 load_area_specific_entity_data = 0x80110C14; // type:func rom:0xA7314 clear_entity_data = 0x80110CB8; // type:func rom:0xA73B8 init_entity_data = 0x80110E58; // type:func rom:0xA7558 -func_80110F10 = 0x80110F10; // type:func rom:0xA7610 +reload_world_entity_data = 0x80110F10; // type:func rom:0xA7610 entity_anim_make_vertex_pointers = 0x801110B4; // type:func rom:0xA77B4 is_entity_data_loaded = 0x8011115C; // type:func rom:0xA785C load_simple_entity_data = 0x801112A4; // type:func rom:0xA79A4 @@ -4448,9 +4448,9 @@ func_8014AFA0 = 0x8014AFA0; // type:func rom:0xE16A0 D_8014AFB0 = 0x8014AFB0; // rom:0xE16B0 D_8014AFB4 = 0x8014AFB4; // rom:0xE16B4 ModelRenderModes = 0x8014AFC0; // rom:0xE16C0 -ModelCombineModesA = 0x8014B0B8; // rom:0xE17B8 +ModelCombineModesStandard = 0x8014B0B8; // rom:0xE17B8 D_8014B0BC = 0x8014B0BC; // rom:0xE17BC -ModelCombineModesB = 0x8014B400; // rom:0xE1B00 +ModelCombineModesAlphaTest = 0x8014B400; // rom:0xE1B00 D_8014B404 = 0x8014B404; // rom:0xE1B04 TextureHeapBase = 0x8014B748; // rom:0xE1E48 mdl_bgMultiplyColorA = 0x8014B74C; // rom:0xE1E4C @@ -4478,69 +4478,69 @@ D_8014B767 = 0x8014B767; // rom:0xE1E67 mdl_RDPIdentity = 0x8014B768; // rom:0xE1E68 depthFloatLookupTable = 0x8014B7A8; // rom:0xE1EA8 gLastRenderTaskCount = 0x8014B7F0; // rom:0xE1EF0 -D_8014B7F8 = 0x8014B7F8; // rom:0xE1EF8 -D_8014B820 = 0x8014B820; // rom:0xE1F20 -D_8014B848 = 0x8014B848; // rom:0xE1F48 -D_8014B870 = 0x8014B870; // rom:0xE1F70 -D_8014B898 = 0x8014B898; // rom:0xE1F98 -D_8014B8C0 = 0x8014B8C0; // rom:0xE1FC0 -D_8014B8E8 = 0x8014B8E8; // rom:0xE1FE8 -D_8014B910 = 0x8014B910; // rom:0xE2010 -D_8014B938 = 0x8014B938; // rom:0xE2038 -D_8014B960 = 0x8014B960; // rom:0xE2060 -D_8014B988 = 0x8014B988; // rom:0xE2088 -D_8014B9B0 = 0x8014B9B0; // rom:0xE20B0 -D_8014B9D8 = 0x8014B9D8; // rom:0xE20D8 -D_8014BA00 = 0x8014BA00; // rom:0xE2100 -D_8014BA20 = 0x8014BA20; // rom:0xE2120 -D_8014BA48 = 0x8014BA48; // rom:0xE2148 -D_8014BA70 = 0x8014BA70; // rom:0xE2170 -D_8014BA98 = 0x8014BA98; // rom:0xE2198 -D_8014BAC0 = 0x8014BAC0; // rom:0xE21C0 -D_8014BAE8 = 0x8014BAE8; // rom:0xE21E8 -D_8014BB10 = 0x8014BB10; // rom:0xE2210 -D_8014BB38 = 0x8014BB38; // rom:0xE2238 -D_8014BB60 = 0x8014BB60; // rom:0xE2260 -D_8014BB88 = 0x8014BB88; // rom:0xE2288 -D_8014BBB0 = 0x8014BBB0; // rom:0xE22B0 -D_8014BBD8 = 0x8014BBD8; // rom:0xE22D8 -D_8014BC00 = 0x8014BC00; // rom:0xE2300 -D_8014BC28 = 0x8014BC28; // rom:0xE2328 -D_8014BC50 = 0x8014BC50; // rom:0xE2350 -D_8014BC78 = 0x8014BC78; // rom:0xE2378 -D_8014BCA0 = 0x8014BCA0; // rom:0xE23A0 -D_8014BCC8 = 0x8014BCC8; // rom:0xE23C8 -D_8014BCF8 = 0x8014BCF8; // rom:0xE23F8 -D_8014BD18 = 0x8014BD18; // rom:0xE2418 -D_8014BD40 = 0x8014BD40; // rom:0xE2440 -D_8014BD68 = 0x8014BD68; // rom:0xE2468 -D_8014BD88 = 0x8014BD88; // rom:0xE2488 -D_8014BDB0 = 0x8014BDB0; // rom:0xE24B0 -D_8014BDD8 = 0x8014BDD8; // rom:0xE24D8 -D_8014BE00 = 0x8014BE00; // rom:0xE2500 -D_8014BE28 = 0x8014BE28; // rom:0xE2528 -D_8014BE50 = 0x8014BE50; // rom:0xE2550 -D_8014BE78 = 0x8014BE78; // rom:0xE2578 -D_8014BEA0 = 0x8014BEA0; // rom:0xE25A0 -D_8014BEC8 = 0x8014BEC8; // rom:0xE25C8 -D_8014BEF0 = 0x8014BEF0; // rom:0xE25F0 -D_8014BF18 = 0x8014BF18; // rom:0xE2618 -D_8014BF40 = 0x8014BF40; // rom:0xE2640 -D_8014BF68 = 0x8014BF68; // rom:0xE2668 -D_8014BF90 = 0x8014BF90; // rom:0xE2690 -D_8014BFB8 = 0x8014BFB8; // rom:0xE26B8 -D_8014BFE0 = 0x8014BFE0; // rom:0xE26E0 -D_8014C008 = 0x8014C008; // rom:0xE2708 -D_8014C028 = 0x8014C028; // rom:0xE2728 -D_8014C050 = 0x8014C050; // rom:0xE2750 -D_8014C078 = 0x8014C078; // rom:0xE2778 -D_8014C098 = 0x8014C098; // rom:0xE2798 -D_8014C0C0 = 0x8014C0C0; // rom:0xE27C0 -D_8014C0E8 = 0x8014C0E8; // rom:0xE27E8 -D_8014C110 = 0x8014C110; // rom:0xE2810 -D_8014C138 = 0x8014C138; // rom:0xE2838 -D_8014C160 = 0x8014C160; // rom:0xE2860 -mdl_renderTaskBasePriorities = 0x8014C188; // rom:0xE2888 +Gfx_RM1_SURFACE_OPA = 0x8014B7F8; // rom:0xE1EF8 +Gfx_RM1_DECAL_OPA = 0x8014B820; // rom:0xE1F20 +Gfx_RM1_INTERSECTING_OPA = 0x8014B848; // rom:0xE1F48 +Gfx_RM1_ALPHATEST = 0x8014B870; // rom:0xE1F70 +Gfx_RM1_SURFACE_XLU = 0x8014B898; // rom:0xE1F98 +Gfx_RM1_DECAL_XLU = 0x8014B8C0; // rom:0xE1FC0 +Gfx_RM1_INTERSECTING_XLU = 0x8014B8E8; // rom:0xE1FE8 +Gfx_RM1_SURFACE_OPA_NO_AA = 0x8014B910; // rom:0xE2010 +Gfx_RM1_DECAL_OPA_NO_AA = 0x8014B938; // rom:0xE2038 +Gfx_RM1_INTERSECTING_OPA_NO_AA = 0x8014B960; // rom:0xE2060 +Gfx_RM1_ALPHATEST_ONESIDED = 0x8014B988; // rom:0xE2088 +Gfx_RM1_SURFACE_XLU_NO_AA = 0x8014B9B0; // rom:0xE20B0 +Gfx_RM1_DECAL_XLU_NO_AA = 0x8014B9D8; // rom:0xE20D8 +Gfx_RM1_PASS_THROUGH = 0x8014BA00; // rom:0xE2100 +Gfx_RM1_SURFACE_XLU_AA_ZB_ZUPD = 0x8014BA20; // rom:0xE2120 +Gfx_RM1_SURFACE_OPA_NO_ZB = 0x8014BA48; // rom:0xE2148 +Gfx_RM1_ALPHATEST_NO_ZB = 0x8014BA70; // rom:0xE2170 +Gfx_RM1_SURFACE_XLU_NO_ZB = 0x8014BA98; // rom:0xE2198 +Gfx_RM1_SURFACE_XLU_ZB_ZUPD = 0x8014BAC0; // rom:0xE21C0 +Gfx_RM1_CLOUD_NO_ZCMP = 0x8014BAE8; // rom:0xE21E8 +Gfx_RM1_CLOUD = 0x8014BB10; // rom:0xE2210 +Gfx_RM1_CLOUD_NO_ZB = 0x8014BB38; // rom:0xE2238 +Gfx_RM2_SURFACE_OPA = 0x8014BB60; // rom:0xE2260 +Gfx_RM2_DECAL_OPA = 0x8014BB88; // rom:0xE2288 +Gfx_RM2_INTERSECTING_OPA = 0x8014BBB0; // rom:0xE22B0 +Gfx_RM2_ALPHATEST = 0x8014BBD8; // rom:0xE22D8 +Gfx_RM2_SURFACE_XLU = 0x8014BC00; // rom:0xE2300 +Gfx_RM2_DECAL_XLU = 0x8014BC28; // rom:0xE2328 +Gfx_RM2_INTERSECTING_XLU = 0x8014BC50; // rom:0xE2350 +Gfx_RM2_SURFACE_OPA_NO_AA = 0x8014BC78; // rom:0xE2378 +Gfx_RM2_DECAL_OPA_NO_AA = 0x8014BCA0; // rom:0xE23A0 +Gfx_RM2_INTERSECTING_OPA_NO_AA = 0x8014BCC8; // rom:0xE23C8 +Gfx_RM2_ALPHATEST_ONESIDED = 0x8014BCF8; // rom:0xE23F8 +Gfx_RM2_SURFACE_XLU_NO_AA = 0x8014BD18; // rom:0xE2418 +Gfx_RM2_DECAL_XLU_NO_AA = 0x8014BD40; // rom:0xE2440 +Gfx_RM2_PASS_THROUGH = 0x8014BD68; // rom:0xE2468 +Gfx_RM2_SURFACE_XLU_AA_ZB_ZUPD = 0x8014BD88; // rom:0xE2488 +Gfx_RM2_SURFACE_OPA_NO_ZB = 0x8014BDB0; // rom:0xE24B0 +Gfx_RM2_ALPHATEST_NO_ZB = 0x8014BDD8; // rom:0xE24D8 +Gfx_RM2_SURFACE_XLU_NO_ZB = 0x8014BE00; // rom:0xE2500 +Gfx_RM2_CLOUD = 0x8014BE28; // rom:0xE2528 +Gfx_RM2_CLOUD_NO_ZB = 0x8014BE50; // rom:0xE2550 +Gfx_RM3_SURFACE_OPA = 0x8014BE78; // rom:0xE2578 +Gfx_RM3_DECAL_OPA = 0x8014BEA0; // rom:0xE25A0 +Gfx_RM3_INTERSECTING_OPA = 0x8014BEC8; // rom:0xE25C8 +Gfx_RM3_ALPHATEST = 0x8014BEF0; // rom:0xE25F0 +Gfx_RM3_SURFACE_XLU = 0x8014BF18; // rom:0xE2618 +Gfx_RM3_DECAL_XLU = 0x8014BF40; // rom:0xE2640 +Gfx_RM3_INTERSECTING_XLU = 0x8014BF68; // rom:0xE2668 +Gfx_RM3_SURFACE_OPA_NO_AA = 0x8014BF90; // rom:0xE2690 +Gfx_RM3_DECAL_OPA_NO_AA = 0x8014BFB8; // rom:0xE26B8 +Gfx_RM3_INTERSECTING_OPA_NO_AA = 0x8014BFE0; // rom:0xE26E0 +Gfx_RM3_ALPHATEST_ONESIDED = 0x8014C008; // rom:0xE2708 +Gfx_RM3_SURFACE_XLU_NO_AA = 0x8014C028; // rom:0xE2728 +Gfx_RM3_DECAL_XLU_NO_AA = 0x8014C050; // rom:0xE2750 +Gfx_RM3_PASS_THROUGH = 0x8014C078; // rom:0xE2778 +Gfx_RM3_SURFACE_XLU_AA_ZB_ZUPD = 0x8014C098; // rom:0xE2798 +Gfx_RM3_SURFACE_OPA_NO_ZB = 0x8014C0C0; // rom:0xE27C0 +Gfx_RM3_ALPHATEST_NO_ZB = 0x8014C0E8; // rom:0xE27E8 +Gfx_RM3_SURFACE_XLU_NO_ZB = 0x8014C110; // rom:0xE2810 +Gfx_RM3_CLOUD = 0x8014C138; // rom:0xE2838 +Gfx_RM3_CLOUD_NO_ZB = 0x8014C160; // rom:0xE2860 +RenderTaskBasePriorities = 0x8014C188; // rom:0xE2888 D_8014C248 = 0x8014C248; // rom:0xE2948 gAnimScriptDefault = 0x8014C250; // rom:0xE2950 D_8014C260 = 0x8014C260; // rom:0xE2960 @@ -4840,7 +4840,7 @@ gCurrentModelLocalVtxBuffers = 0x80152210; // rom:0xE8910 wModelTreeRoot = 0x80152214; // rom:0xE8914 bModelTreeRoot = 0x80152218; // rom:0xE8918 D_8015221C = 0x8015221C; // rom:0xE891C -D_80152220 = 0x80152220; // rom:0xE8920 +wModelTreeNodeInfo = 0x80152220; // rom:0xE8920 kill_script_by_ID = 0x802C40AC; // type:func rom:0xE8A5C kill_all_scripts = 0x802C4114; // type:func rom:0xE8AC4 does_script_exist = 0x802C4164; // type:func rom:0xE8B14 @@ -4862,7 +4862,7 @@ suspend_all_group = 0x802C45E8; // type:func rom:0xE8F98 resume_all_group = 0x802C4648; // type:func rom:0xE8FF8 suspend_group_others = 0x802C46A8; // type:func rom:0xE9058 resume_group_others = 0x802C471C; // type:func rom:0xE90CC -D_80152A20 = 0x80152A20; // rom:0xE9120 +bModelTreeNodeInfo = 0x80152A20; // rom:0xE9120 get_script_by_index = 0x802C4790; // type:func rom:0xE9140 get_script_by_id = 0x802C47A8; // type:func rom:0xE9158 set_script_flags = 0x802C47E8; // type:func rom:0xE9198