Skip to content

Commit b52a584

Browse files
committed
Ice trap model
1 parent 03b7479 commit b52a584

7 files changed

Lines changed: 38773 additions & 33 deletions

File tree

ASM/c/item_draw_functions.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -829,3 +829,17 @@ void draw_gi_deku_nut_with_flame(z64_game_t* game, uint32_t draw_id) {
829829

830830
draw_gi_deku_nut(game, draw_id);
831831
}
832+
833+
void draw_ice_trap(z64_game_t* game, uint32_t draw_id) {
834+
z64_gfx_t* gfx = game->common.gfx;
835+
static const float scale = 0.5f;
836+
837+
translate_sys_matrix(0, -25.f, 0, 1);
838+
scale_sys_matrix(scale, scale, scale, 1);
839+
append_setup_dl_25_to_xlu(gfx);
840+
gSPSegment(gfx->poly_xlu.p++, 0x08,
841+
gen_double_tile(gfx, G_TX_RENDERTILE, 0, (0 - game->common.state_frames) % 128, 32, 32, 1, 0, (game->common.state_frames * -2) % 128, 32, 32));
842+
gSPMatrix(gfx->poly_xlu.p++, append_sys_matrix(gfx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
843+
gDPSetEnvColor(gfx->poly_xlu.p++, 0, 50, 100, 255);
844+
gSPDisplayList(gfx->poly_xlu.p++, item_draw_table[draw_id].args[0].dlist);
845+
}

ASM/c/item_draw_functions.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,12 @@ void draw_gi_nothing(z64_game_t* game, uint32_t draw_id);
5252
void draw_gi_medallions(z64_game_t* game, uint32_t draw_id);
5353
void draw_gi_stones(z64_game_t* game, uint32_t draw_id);
5454
void draw_gi_magic_meter(z64_game_t* game, uint32_t draw_id);
55+
<<<<<<< HEAD
5556
void draw_gi_flame(z64_disp_buf_t* dl, z64_game_t *game, colorRGBA8_t prim, colorRGBA8_t env, z64_xyzf_t translation, z64_xyzf_t scale);
5657
void draw_gi_xlu_with_flame(z64_game_t *game, uint32_t draw_id);
5758
void draw_gi_deku_nut_with_flame(z64_game_t* game, uint32_t draw_id);
59+
=======
60+
void draw_ice_trap(z64_game_t* game, uint32_t draw_id);
61+
>>>>>>> 04e5195c (Ice trap model)
5862

5963
#endif

ASM/c/item_draw_table.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,17 @@ item_draw_table_entry_t item_draw_table[] = {
174174
[0x9C] = { draw_gi_stones, { 0x06000b00, 0x060012f0, 0x32ffffff, 0x320096ff } }, // Zora Sapphire
175175
[0x9D] = { draw_gi_fairy, { 0x06000EF0 } }, // Fairy (not in a bottle but uses the fairy from the bottle)
176176
[0x9E] = { draw_gi_nothing, {} },
177+
<<<<<<< HEAD
177178
[0x9F] = { draw_gi_magic_meter, { 0x06000000, 0x060007B0, 0x060009F8, 0x06000FD8, 0x286428FF, 0x000000FF } }, // Magic Meter Scroll
178179
[0xA0] = { draw_gi_xlu_with_flame, { 0x060004D0, 0xC0C0C0FF, 0xC0C0C0FF } }, // Deku Stick Upgrade w/ Smoke Effect
179180
[0xA1] = { draw_gi_deku_nut_with_flame, { 0x06000E90, 0xC0C0C0FF, 0xC0C0C0FF } }, // Deku Nut Upgrade w/ Smoke Effect
180181
[0xA2] = { draw_gi_magic_meter, { 0x06000000, 0x06000CC0, 0x06000F08, 0x060014E8, 0x286428FF, 0x000000FF } }, // Magic Meter Scroll 2
181182
};
183+
=======
184+
[0x9F] = { draw_gi_magic_meter, { 0x06000000, 0x060007B0, 0x06000FD8, 0x060009F8, 0x06001438, 0x286428FF, 0x000000FF } }, // Magic Meter Scroll
185+
[0xA0] = { draw_ice_trap, { 0x04034380 } }, // Ice trap
186+
};
187+
>>>>>>> 04e5195c (Ice trap model)
182188

183189
void base_draw_gi_model(z64_game_t* game, uint32_t draw_id) {
184190
item_draw_table[draw_id].draw_func(game, draw_id);

ASM/c/item_table.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ item_row_t item_table[GI_RANDO_MAX] = {
154154
[GI_DEKU_NUT_UPGRADE_30] = ITEM_ROW(0x53, BROWN_CHEST, 0x9A, -1, 0x00A7, 0x00BB, 0xA2, no_upgrade, no_effect, -1, -1, NULL), // Deku Nut Upgrade (30)
155155
[GI_DEKU_NUT_UPGRADE_40] = ITEM_ROW(0x53, BROWN_CHEST, 0x9B, -1, 0x00A8, 0x00BB, 0xA2, no_upgrade, no_effect, -1, -1, NULL), // Deku Nut Upgrade (40)
156156
[GI_BULLET_BAG_50] = ITEM_ROW(0x53, GILDED_CHEST, 0x49, -1, 0x006C, 0x017B, 0x73, no_upgrade, no_effect, -1, -1, NULL), // Bullet Bag (50)
157-
[GI_ICE_TRAP] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x9002, 0x0000, 0x00, no_upgrade, ice_trap_effect, -1, -1, NULL), // Ice Trap
157+
[GI_ICE_TRAP] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x9002, 0x0000, 0xA1, no_upgrade, ice_trap_effect, -1, -1, NULL), // Ice Trap
158158

159159
[GI_CAPPED_PIECE_OF_HEART] = ITEM_ROW(0x3E, HEART_CHEST_SMALL, 0x41, -1, 0x90C2, 0x00BD, 0x14, no_upgrade, full_heal, -1, -1, NULL), // Capped Piece of Heart
160160
[GI_CAPPED_HEART_CONTAINER] = ITEM_ROW(0x3E, HEART_CHEST_SMALL, 0x41, -1, 0x90C6, 0x00BD, 0x13, no_upgrade, full_heal, -1, -1, NULL), // Capped Heart Container

data/generated/patch_symbols.json

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)