Skip to content

Commit 52cdeaa

Browse files
committed
Merge 'New model for ice traps' (#2375)
# Conflicts: # ASM/build/asm_symbols.txt # data/generated/patch_symbols.json # data/generated/rom_patch.txt # data/generated/symbols.json
2 parents 3716f89 + b1e7a98 commit 52cdeaa

13 files changed

Lines changed: 24398 additions & 24260 deletions

ASM/build/asm_symbols.txt

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

ASM/build/bundle.o

652 Bytes
Binary file not shown.

ASM/build/c_symbols.txt

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

ASM/c/get_items.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -926,6 +926,11 @@ uint8_t item_give_collectible(uint8_t item, z64_link_t* link, z64_actor_t* from_
926926
uint16_t resolved_item_id = resolve_upgrades(collectible_override);
927927
item_row_t* item_row = get_item_row(resolved_item_id);
928928

929+
// If we picked an ice trap, show the ice model instead of the fake item model.
930+
if (item_id == GI_ICE_TRAP) {
931+
pItem->model.graphic_id = 0xA4;
932+
}
933+
929934
// Set the collectible flag
930935
Set_NewFlag(&flag);
931936
//if (item == ITEM00_HEART_PIECE || item == ITEM00_SMALL_KEY) { // Don't allow heart pieces or small keys to be collected a second time. This is really just for the "Drop" types.

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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,6 @@ void draw_gi_magic_meter(z64_game_t* game, uint32_t draw_id);
5555
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);
5656
void draw_gi_xlu_with_flame(z64_game_t *game, uint32_t draw_id);
5757
void draw_gi_deku_nut_with_flame(z64_game_t* game, uint32_t draw_id);
58+
void draw_ice_trap(z64_game_t* game, uint32_t draw_id);
5859

5960
#endif

ASM/c/item_draw_table.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ item_draw_table_entry_t item_draw_table[] = {
178178
[0xA0] = { draw_gi_xlu_with_flame, { 0x060004D0, 0xC0C0C0FF, 0xC0C0C0FF } }, // Deku Stick Upgrade w/ Smoke Effect
179179
[0xA1] = { draw_gi_deku_nut_with_flame, { 0x06000E90, 0xC0C0C0FF, 0xC0C0C0FF } }, // Deku Nut Upgrade w/ Smoke Effect
180180
[0xA2] = { draw_gi_magic_meter, { 0x06000000, 0x06000CC0, 0x06000F08, 0x060014E8, 0x286428FF, 0x000000FF } }, // Magic Meter Scroll 2
181+
[0xA3] = { draw_ice_trap, { 0x04034380 } }, // Ice trap
181182
};
182183

183184
void base_draw_gi_model(z64_game_t* game, uint32_t 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, 0xA4, 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

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
## Other changes
1212
* Big poe souls can now be collected while riding Epona.
13+
* Ice traps have a new item model that's displayed instead of nothing after being picked up.
1314

1415
# 8.3
1516

data/generated/patch_symbols.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)