Skip to content

Commit

Permalink
Rotate warp song models on Z Axis
Browse files Browse the repository at this point in the history
Rotates all 6 warp songs models by 180° on Z Axis
  • Loading branch information
GSKirox committed Dec 3, 2022
1 parent b09b04d commit d575af4
Show file tree
Hide file tree
Showing 8 changed files with 20,516 additions and 20,550 deletions.
830 changes: 415 additions & 415 deletions ASM/build/asm_symbols.txt

Large diffs are not rendered by default.

Binary file modified ASM/build/bundle.o
Binary file not shown.
503 changes: 252 additions & 251 deletions ASM/build/c_symbols.txt

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions ASM/c/item_draw_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ typedef void (*duplicate_sys_matrix_fn)(void);
typedef void (*pop_sys_matrix_fn)(void);
typedef void (*translate_sys_matrix_fn)(float x, float y, float z, int32_t in_place_flag);
typedef void (*scale_sys_matrix_fn)(float x, float y, float z, int32_t in_place_flag);
typedef void (*rotate_Z_sys_matrix_fn)(float z, int32_t in_place_flag);
typedef void (*update_sys_matrix_fn)(float mf[4][4]);
typedef Mtx *(*append_sys_matrix_fn)(z64_gfx_t *gfx);

Expand All @@ -25,6 +26,7 @@ typedef Mtx *(*append_sys_matrix_fn)(z64_gfx_t *gfx);
#define pop_sys_matrix ((pop_sys_matrix_fn)0x800AA724)
#define translate_sys_matrix ((translate_sys_matrix_fn)0x800AA7F4)
#define scale_sys_matrix ((scale_sys_matrix_fn)0x800AA8FC)
#define rotate_Z_sys_matrix ((rotate_Z_sys_matrix_fn)0x800AAD4C)
#define update_sys_matrix ((update_sys_matrix_fn)0x800ABE54)
#define append_sys_matrix ((append_sys_matrix_fn)0x800AB900)

Expand Down Expand Up @@ -388,6 +390,10 @@ void draw_gi_song_notes(z64_game_t *game, uint32_t draw_id) {
z64_gfx_t *gfx = game->common.gfx;
colorRGBA8_t env_color = item_draw_table[draw_id].args[1].color;

if (item_draw_table[draw_id].args[2].dlist) {
rotate_Z_sys_matrix(3.14f, 1);
}

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);
gDPSetEnvColor(gfx->poly_xlu.p++, env_color.r, env_color.g, env_color.b, env_color.a);
Expand Down
18 changes: 12 additions & 6 deletions ASM/c/item_draw_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
item_draw_table_entry_t item_draw_table[] = {
[0x00] = { draw_gi_various_opa0_xlu1, { 0x06000670, 0x06000750 } }, // Empty Bottle
[0x01] = { draw_gi_small_keys, { 0x06000800, 0xFFFFFFFF, 0x3C505AFF } }, // Small Key
[0x02] = { draw_gi_song_notes, { 0x06000AE0, 0x00C800FF } }, // Music Note (Green)
[0x03] = { draw_gi_song_notes, { 0x06000AE0, 0xFF3200FF } }, // Music Note (Red)
[0x04] = { draw_gi_song_notes, { 0x06000AE0, 0x0096FFFF } }, // Music Note (Blue)
[0x05] = { draw_gi_song_notes, { 0x06000AE0, 0xFF9600FF } }, // Music Note (Orange)
[0x06] = { draw_gi_song_notes, { 0x06000AE0, 0xC832FFFF } }, // Music Note (Purple)
[0x07] = { draw_gi_song_notes, { 0x06000AE0, 0xC8FF00FF } }, // Music Note (Yellow)
[0x02] = { draw_gi_song_notes, { 0x06000AE0, 0x00C800FF, 0 } }, // Music Note (Green)
[0x03] = { draw_gi_song_notes, { 0x06000AE0, 0xFF3200FF, 0 } }, // Music Note (Red)
[0x04] = { draw_gi_song_notes, { 0x06000AE0, 0x0096FFFF, 0 } }, // Music Note (Blue)
[0x05] = { draw_gi_song_notes, { 0x06000AE0, 0xFF9600FF, 0 } }, // Music Note (Orange)
[0x06] = { draw_gi_song_notes, { 0x06000AE0, 0xC832FFFF, 0 } }, // Music Note (Purple)
[0x07] = { draw_gi_song_notes, { 0x06000AE0, 0xC8FF00FF, 0 } }, // Music Note (Yellow)
[0x08] = { draw_gi_recovery_heart, { 0x060000E0 } }, // Recovery Heart
[0x09] = { draw_gi_boss_keys, { 0x06000CA0, 0x06000F08, 0xFFAAFFFF, 0xFF0064FF } }, // Boss Key
[0x0A] = { draw_gi_compass, { 0x06000960, 0x06000C50 } }, // Compass
Expand Down Expand Up @@ -134,6 +134,12 @@ item_draw_table_entry_t item_draw_table[] = {
//Rando-added functions
[0x75] = { draw_gi_various_opa0, { 0x06000A30 } }, // Triforce Piece
[0x76] = { draw_gi_various_opa0, { 0x060015E8 } }, // Key Ring
[0x77] = { draw_gi_song_notes, { 0x06000AE0, 0x00C800FF, 1 } }, // Music Note inverted (Green)
[0x78] = { draw_gi_song_notes, { 0x06000AE0, 0xFF3200FF, 1 } }, // Music Note inverted (Red)
[0x79] = { draw_gi_song_notes, { 0x06000AE0, 0x0096FFFF, 1 } }, // Music Note inverted (Blue)
[0x7A] = { draw_gi_song_notes, { 0x06000AE0, 0xFF9600FF, 1 } }, // Music Note inverted (Orange)
[0x7B] = { draw_gi_song_notes, { 0x06000AE0, 0xC832FFFF, 1 } }, // Music Note inverted (Purple)
[0x7C] = { draw_gi_song_notes, { 0x06000AE0, 0xC8FF00FF, 1 } }, // Music Note inverted (Yellow)
};

void base_draw_gi_model(z64_game_t *game, uint32_t draw_id) {
Expand Down
12 changes: 6 additions & 6 deletions ASM/c/item_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,12 @@ item_row_t item_table[] = {
[0xB9] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x00E4, 0x00CD, 0x1E, no_upgrade, give_magic, -1, -1), // Magic Meter
[0xBA] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x00E8, 0x00CD, 0x1F, no_upgrade, give_double_magic, -1, -1), // Double Magic

[0xBB] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x0073, 0x00B6, 0x03, no_upgrade, give_song, 6, -1 ), // Minuet of Forest
[0xBC] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x0074, 0x00B6, 0x04, no_upgrade, give_song, 7, -1 ), // Bolero of Fire
[0xBD] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x0075, 0x00B6, 0x05, no_upgrade, give_song, 8, -1 ), // Serenade of Water
[0xBE] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x0076, 0x00B6, 0x06, no_upgrade, give_song, 9, -1 ), // Requiem of Spirit
[0xBF] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x0077, 0x00B6, 0x07, no_upgrade, give_song, 10, -1), // Nocturn of Shadow
[0xC0] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x0078, 0x00B6, 0x08, no_upgrade, give_song, 11, -1), // Prelude of Light
[0xBB] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x0073, 0x00B6, 0x78, no_upgrade, give_song, 6, -1 ), // Minuet of Forest
[0xBC] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x0074, 0x00B6, 0x79, no_upgrade, give_song, 7, -1 ), // Bolero of Fire
[0xBD] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x0075, 0x00B6, 0x7A, no_upgrade, give_song, 8, -1 ), // Serenade of Water
[0xBE] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x0076, 0x00B6, 0x7B, no_upgrade, give_song, 9, -1 ), // Requiem of Spirit
[0xBF] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x0077, 0x00B6, 0x7C, no_upgrade, give_song, 10, -1), // Nocturn of Shadow
[0xC0] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x0078, 0x00B6, 0x7D, no_upgrade, give_song, 11, -1), // Prelude of Light

[0xC1] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x00D4, 0x00B6, 0x04, no_upgrade, give_song, 12, -1), // Zelda's Lullaby
[0xC2] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x00D2, 0x00B6, 0x06, no_upgrade, give_song, 13, -1), // Epona's Song
Expand Down
Loading

0 comments on commit d575af4

Please sign in to comment.