Skip to content

Commit

Permalink
Merge 'Magic Meter Item: Scroll' (#2340)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjohnson57 committed Jan 5, 2025
2 parents 9c6944b + c233f3a commit 64ed7ff
Show file tree
Hide file tree
Showing 10 changed files with 17,816 additions and 17,757 deletions.
1,064 changes: 532 additions & 532 deletions ASM/build/asm_symbols.txt

Large diffs are not rendered by default.

Binary file modified ASM/build/bundle.o
Binary file not shown.
1,016 changes: 508 additions & 508 deletions ASM/build/c_symbols.txt

Large diffs are not rendered by default.

32 changes: 20 additions & 12 deletions ASM/c/item_draw_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -718,29 +718,37 @@ void draw_gi_stones(z64_game_t* game, uint32_t draw_id) {
void draw_gi_magic_meter(z64_game_t* game, uint32_t draw_id) {
z64_gfx_t *gfx = game->common.gfx;

// InnerOutline
colorRGBA8_t prim_outline = item_draw_table[draw_id].args[5].color;
// Container
colorRGBA8_t prim_container = item_draw_table[draw_id].args[4].color;
colorRGBA8_t env_color = item_draw_table[draw_id].args[4].color;
// Magic
colorRGBA8_t prim_color = item_draw_table[draw_id].args[3].color;
if (CFG_CORRECT_MODEL_COLORS) {
prim_color.r = CFG_MAGIC_COLOR .r;
prim_color.g = CFG_MAGIC_COLOR .g;
prim_color.b = CFG_MAGIC_COLOR .b;
}
colorRGBA8_t env_color = item_draw_table[draw_id].args[4].color;

// Magic
append_setup_dl_25_to_opa(gfx);
gSPMatrix(gfx->poly_opa.p++, append_sys_matrix(gfx), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH);
gDPSetPrimColor(gfx->poly_opa.p++, 0, 0x80, prim_color.r, prim_color.g, prim_color.b, prim_color.a);
//Writing
append_setup_dl_25_to_xlu(gfx);
gSPMatrix(gfx->poly_xlu.p++, append_sys_matrix(gfx), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH);
gSPDisplayList(gfx->poly_xlu.p++, item_draw_table[draw_id].args[4].dlist);
// Shine
append_setup_dl_25_to_xlu(gfx);
gSPMatrix(gfx->poly_xlu.p++, append_sys_matrix(gfx), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH);
gDPSetPrimColor(gfx->poly_xlu.p++, 0, 0x80, prim_color.r, prim_color.g, prim_color.b, 0x40);
gDPSetEnvColor(gfx->poly_xlu.p++, env_color.r, env_color.g, env_color.b, env_color.a);
gSPDisplayList(gfx->poly_opa.p++, item_draw_table[draw_id].args[0].dlist);
// Container
gSPDisplayList(gfx->poly_xlu.p++, item_draw_table[draw_id].args[2].dlist);
// Jar
append_setup_dl_25_to_xlu(gfx);
gSPMatrix(gfx->poly_xlu.p++, append_sys_matrix(gfx), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH);
gDPSetPrimColor(gfx->poly_xlu.p++, 0, 0x80, prim_container.r, prim_container.g, prim_container.b, prim_container.a);
gDPSetPrimColor(gfx->poly_xlu.p++, 0, 0x80, prim_color.r, prim_color.g, prim_color.b, 0x40);
gDPSetEnvColor(gfx->poly_xlu.p++, env_color.r, env_color.g, env_color.b, env_color.a);
gSPDisplayList(gfx->poly_xlu.p++, item_draw_table[draw_id].args[0].dlist);
// Label
append_setup_dl_25_to_xlu(gfx);
gSPMatrix(gfx->poly_xlu.p++, append_sys_matrix(gfx), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH);
gSPDisplayList(gfx->poly_xlu.p++, item_draw_table[draw_id].args[1].dlist);
// Parchment
append_setup_dl_25_to_opa(gfx);
gSPMatrix(gfx->poly_opa.p++, append_sys_matrix(gfx), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH);
gSPDisplayList(gfx->poly_opa.p++, item_draw_table[draw_id].args[3].dlist);
}
2 changes: 1 addition & 1 deletion ASM/c/item_draw_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ item_draw_table_entry_t item_draw_table[] = {
[0x9C] = { draw_gi_stones, { 0x06000b00, 0x060012f0, 0x32ffffff, 0x320096ff } }, // Zora Sapphire
[0x9D] = { draw_gi_fairy, { 0x06000EF0 } }, // Fairy (not in a bottle but uses the fairy from the bottle)
[0x9E] = { draw_gi_nothing, {} },
[0x9F] = { draw_gi_magic_meter, { 0x06000000, 0x06000670, 0x00CE00FF, 0xFFFFFFFF, 0x000000FF } }, // Magic Meter
[0x9F] = { draw_gi_magic_meter, { 0x06000000, 0x060007B0, 0x06000FD8, 0x060009F8, 0x06001438, 0xFFFFFF80, 0x000000FF } }, // Magic Meter Scroll
};

void base_draw_gi_model(z64_game_t* game, uint32_t draw_id) {
Expand Down
2 changes: 1 addition & 1 deletion Patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def patch_rom(spoiler: Spoiler, world: World, rom: Rom) -> Rom:
('object_gi_abutton', data_path('items/A_Button.zobj'), 0x1A8), # A button
('object_gi_cbutton', data_path('items/C_Button_Horizontal.zobj'), 0x1A9), # C button Horizontal
('object_gi_cbutton', data_path('items/C_Button_Vertical.zobj'), 0x1AA), # C button Vertical
('object_gi_magic_meter', data_path('items/MagicMeter.zobj'), 0x1B4), # Magic Meter
('object_gi_magic_meter', data_path('items/MagicScroll.zobj'), 0x1B4), # Magic Scroll
)

if world.settings.key_appearance_match_dungeon:
Expand Down
Loading

0 comments on commit 64ed7ff

Please sign in to comment.