Skip to content

Commit

Permalink
Merge pull request fenhl#1 from mracsys/warp-song-models
Browse files Browse the repository at this point in the history
Add inverted music note model for warp songs
  • Loading branch information
GSKirox authored Dec 11, 2022
2 parents d575af4 + 8483e57 commit e811125
Show file tree
Hide file tree
Showing 10 changed files with 14,261 additions and 14,248 deletions.
638 changes: 319 additions & 319 deletions ASM/build/asm_symbols.txt

Large diffs are not rendered by default.

Binary file modified ASM/build/bundle.o
Binary file not shown.
264 changes: 132 additions & 132 deletions ASM/build/c_symbols.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ASM/c/item_draw_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ void draw_gi_song_notes(z64_game_t *game, uint32_t draw_id) {
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);
scale_sys_matrix(1.5f, 1.5f, 1.5f, 1);
}

append_setup_dl_25_to_xlu(gfx);
Expand Down
12 changes: 6 additions & 6 deletions ASM/c/item_draw_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +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)
[0x77] = { draw_gi_song_notes, { 0x06000EC0, 0x00C800FF, 1 } }, // Music Note inverted (Green)
[0x78] = { draw_gi_song_notes, { 0x06000EC0, 0xFF3200FF, 1 } }, // Music Note inverted (Red)
[0x79] = { draw_gi_song_notes, { 0x06000EC0, 0x0096FFFF, 1 } }, // Music Note inverted (Blue)
[0x7A] = { draw_gi_song_notes, { 0x06000EC0, 0xFF9600FF, 1 } }, // Music Note inverted (Orange)
[0x7B] = { draw_gi_song_notes, { 0x06000EC0, 0xC832FFFF, 1 } }, // Music Note inverted (Purple)
[0x7C] = { draw_gi_song_notes, { 0x06000EC0, 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, 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
[0xBB] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x0073, 0x0196, 0x78, no_upgrade, give_song, 6, -1 ), // Minuet of Forest
[0xBC] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x0074, 0x0196, 0x79, no_upgrade, give_song, 7, -1 ), // Bolero of Fire
[0xBD] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x0075, 0x0196, 0x7A, no_upgrade, give_song, 8, -1 ), // Serenade of Water
[0xBE] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x0076, 0x0196, 0x7B, no_upgrade, give_song, 9, -1 ), // Requiem of Spirit
[0xBF] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x0077, 0x0196, 0x7C, no_upgrade, give_song, 10, -1), // Nocturn of Shadow
[0xC0] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x0078, 0x0196, 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
11 changes: 11 additions & 0 deletions Patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,17 @@ def patch_rom(spoiler:Spoiler, world:World, rom:Rom):
# Add it to the extended object table
add_to_extended_object_table(rom, 0x195, keyring_obj_file)

# Load Key Ring model into a file
warpsong_obj_file = File({ 'Name': 'object_gi_warpsong' })
warpsong_obj_file.copy(rom)
with open(data_path('Note.zobj'), 'rb') as stream:
obj_data = stream.read()
rom.write_bytes(warpsong_obj_file.start, obj_data)
warpsong_obj_file.end = warpsong_obj_file.start + len(obj_data)
update_dmadata(rom, warpsong_obj_file)
# Add it to the extended object table
add_to_extended_object_table(rom, 0x196, warpsong_obj_file)

# Create the textures for pots/crates. Note: No copyrighted material can be distributed w/ the randomizer. Because of this, patch files are used to create the new textures from the original texture in ROM.
# Apply patches for custom textures for pots and crates and add as new files in rom
# Crates are ci4 textures in the normal ROM but for pot/crate textures match contents were upgraded to ci8 to support more colors
Expand Down
Binary file added data/Note.zobj
Binary file not shown.
Loading

0 comments on commit e811125

Please sign in to comment.