mirror of
https://github.com/GearsProgress/Poke_Transporter_GB.git
synced 2026-09-10 18:15:31 -05:00
Implementing custom fanfare
This commit is contained in:
@@ -186,4 +186,46 @@ void sprite_var::insert_sprite_data(u8 mg_array[], const unsigned int sprite_arr
|
||||
mg_array[*curr_loc_ptr] = sprite_array[parser / 4] >> (8 * (parser % 4));
|
||||
(*curr_loc_ptr)++;
|
||||
}
|
||||
}
|
||||
|
||||
// MUSIC VAR
|
||||
|
||||
void music_var::set_start()
|
||||
{
|
||||
start_location_in_script = *curr_loc_ptr;
|
||||
}
|
||||
|
||||
void music_var::add_track(std::vector<byte> track)
|
||||
{
|
||||
trackArrays.push_back(track);
|
||||
}
|
||||
|
||||
void music_var::insert_music_data(u8 mg_array[], u8 blockCount, u8 priority, u8 reverb, u32 toneDataPointer)
|
||||
{
|
||||
for (int i = 0; i < trackArrays.size(); i++)
|
||||
{
|
||||
trackPointers.push_back(*curr_loc_ptr + curr_rom.loc_gSaveDataBuffer);
|
||||
for (int j = 0; j < trackArrays[i].size(); j++)
|
||||
{
|
||||
mg_array[(*curr_loc_ptr)++] = trackArrays[i][j];
|
||||
}
|
||||
}
|
||||
|
||||
set_start();
|
||||
mg_array[(*curr_loc_ptr)++] = trackArrays.size();
|
||||
mg_array[(*curr_loc_ptr)++] = blockCount;
|
||||
mg_array[(*curr_loc_ptr)++] = priority;
|
||||
mg_array[(*curr_loc_ptr)++] = reverb;
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
mg_array[(*curr_loc_ptr)++] = toneDataPointer >> (8 * i);
|
||||
}
|
||||
|
||||
for (int i = 0; i < trackArrays.size(); i++)
|
||||
{
|
||||
mg_array[(*curr_loc_ptr)++] = trackPointers[i] >> 0;
|
||||
mg_array[(*curr_loc_ptr)++] = trackPointers[i] >> 8;
|
||||
mg_array[(*curr_loc_ptr)++] = trackPointers[i] >> 16;
|
||||
mg_array[(*curr_loc_ptr)++] = trackPointers[i] >> 24;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user