mirror of
https://github.com/zeldaret/oot.git
synced 2024-12-28 15:56:51 +00:00
[PAL N64] Create macros for 50-Hz-related values (#2206)
* [PAL N64] Create macros for 50-Hz-related values * Use FRAME_RATE_DEPENDENT for player speeds and boot data too * FRAME_RATE_DEPENDENT -> FRAMERATE_CONST
This commit is contained in:
parent
2122a4345b
commit
8348132511
7 changed files with 258 additions and 130 deletions
|
@ -214,6 +214,13 @@
|
|||
#define LANGUAGE_ARRAY(jpn, eng, ger, fra) { eng, ger, fra }
|
||||
#endif
|
||||
|
||||
// Macro for constants that change in 50 Hz N64 PAL versions.
|
||||
#if !OOT_PAL_N64
|
||||
#define FRAMERATE_CONST(value60Hz, value50Hz) (value60Hz)
|
||||
#else
|
||||
#define FRAMERATE_CONST(value60Hz, value50Hz) (value50Hz)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* `x` vertex x
|
||||
* `y` vertex y
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "ultra64.h"
|
||||
#include "global.h"
|
||||
#include "versions.h"
|
||||
|
||||
#define ABS_ALT(x) ((x) < 0 ? -(x) : (x))
|
||||
|
||||
|
@ -824,151 +825,151 @@ u8 sOcaMemoryGameNumNotes[] = { 5, 6, 8 };
|
|||
OcarinaNote sOcarinaSongNotes[OCARINA_SONG_MAX][20] = {
|
||||
// OCARINA_SONG_MINUET
|
||||
{
|
||||
{ OCARINA_PITCH_D4, 18, 86, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D5, 18, 92, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_B4, 72, 86, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, 18, 80, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_B4, 18, 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, 144, 86, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D4, FRAMERATE_CONST(18, 15), 86, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D5, FRAMERATE_CONST(18, 15), 92, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_B4, FRAMERATE_CONST(72, 60), 86, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, FRAMERATE_CONST(18, 15), 80, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_B4, FRAMERATE_CONST(18, 15), 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, FRAMERATE_CONST(144, 120), 86, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_NONE, 0, 86, 0, 0, 0 },
|
||||
},
|
||||
|
||||
// OCARINA_SONG_BOLERO
|
||||
{
|
||||
{ OCARINA_PITCH_F4, 15, 80, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D4, 15, 72, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_F4, 15, 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D4, 15, 76, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, 15, 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_F4, 15, 74, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, 15, 78, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_F4, 135, 66, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_F4, FRAMERATE_CONST(15, 12), 80, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D4, FRAMERATE_CONST(15, 13), 72, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_F4, FRAMERATE_CONST(15, 12), 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D4, FRAMERATE_CONST(15, 13), 76, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, FRAMERATE_CONST(15, 12), 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_F4, FRAMERATE_CONST(15, 13), 74, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, FRAMERATE_CONST(15, 12), 78, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_F4, FRAMERATE_CONST(135, 113), 66, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_NONE, 0, 66, 0, 0, 0 },
|
||||
},
|
||||
|
||||
// OCARINA_SONG_SERENADE
|
||||
{
|
||||
{ OCARINA_PITCH_D4, 36, 60, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_F4, 36, 78, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, 33, 82, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_NONE, 3, 82, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, 36, 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_B4, 144, 90, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D4, FRAMERATE_CONST(36, 30), 60, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_F4, FRAMERATE_CONST(36, 30), 78, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, FRAMERATE_CONST(33, 27), 82, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_NONE, FRAMERATE_CONST(3, 3), 82, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, FRAMERATE_CONST(36, 30), 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_B4, FRAMERATE_CONST(144, 120), 90, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_NONE, 0, 90, 0, 0, 0 },
|
||||
},
|
||||
|
||||
// OCARINA_SONG_REQUIEM
|
||||
{
|
||||
{ OCARINA_PITCH_D4, 45, 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_F4, 23, 86, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D4, 22, 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, 45, 86, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_F4, 45, 94, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D4, 180, 94, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D4, FRAMERATE_CONST(45, 37), 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_F4, FRAMERATE_CONST(23, 19), 86, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D4, FRAMERATE_CONST(22, 19), 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, FRAMERATE_CONST(45, 37), 86, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_F4, FRAMERATE_CONST(45, 38), 94, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D4, FRAMERATE_CONST(180, 150), 94, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_NONE, 0, 94, 0, 0, 0 },
|
||||
},
|
||||
|
||||
// OCARINA_SONG_NOCTURNE
|
||||
{
|
||||
{ OCARINA_PITCH_B4, 36, 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, 33, 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_NONE, 3, 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, 18, 82, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D4, 18, 60, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_B4, 18, 90, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, 18, 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_F4, 144, 96, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_B4, FRAMERATE_CONST(36, 30), 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, FRAMERATE_CONST(33, 27), 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_NONE, FRAMERATE_CONST(3, 3), 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, FRAMERATE_CONST(18, 15), 82, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D4, FRAMERATE_CONST(18, 15), 60, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_B4, FRAMERATE_CONST(18, 15), 90, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, FRAMERATE_CONST(18, 15), 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_F4, FRAMERATE_CONST(144, 120), 96, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_NONE, 0, 96, 0, 0, 0 },
|
||||
},
|
||||
|
||||
// OCARINA_SONG_PRELUDE
|
||||
{
|
||||
{ OCARINA_PITCH_D5, 15, 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, 45, 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D5, 15, 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, 15, 82, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_B4, 15, 86, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D5, 60, 90, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_NONE, 75, 90, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D5, FRAMERATE_CONST(15, 12), 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, FRAMERATE_CONST(45, 38), 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D5, FRAMERATE_CONST(15, 12), 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, FRAMERATE_CONST(15, 13), 82, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_B4, FRAMERATE_CONST(15, 12), 86, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D5, FRAMERATE_CONST(60, 50), 90, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_NONE, FRAMERATE_CONST(75, 63), 90, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_NONE, 0, 90, 0, 0, 0 },
|
||||
},
|
||||
|
||||
// OCARINA_SONG_SARIAS
|
||||
{
|
||||
{ OCARINA_PITCH_F4, 17, 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, 17, 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_B4, 34, 80, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_F4, 17, 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, 17, 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_B4, 136, 80, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_F4, FRAMERATE_CONST(17, 14), 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, FRAMERATE_CONST(17, 14), 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_B4, FRAMERATE_CONST(34, 28), 80, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_F4, FRAMERATE_CONST(17, 14), 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, FRAMERATE_CONST(17, 14), 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_B4, FRAMERATE_CONST(136, 113), 80, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_NONE, 0, 90, 0, 0, 0 },
|
||||
},
|
||||
|
||||
// OCARINA_SONG_EPONAS
|
||||
{
|
||||
{ OCARINA_PITCH_D5, 18, 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_B4, 18, 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, 72, 80, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D5, 18, 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_B4, 18, 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, 144, 80, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D5, FRAMERATE_CONST(18, 15), 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_B4, FRAMERATE_CONST(18, 15), 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, FRAMERATE_CONST(72, 60), 80, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D5, FRAMERATE_CONST(18, 15), 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_B4, FRAMERATE_CONST(18, 15), 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, FRAMERATE_CONST(144, 120), 80, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_NONE, 0, 90, 0, 0, 0 },
|
||||
},
|
||||
|
||||
// OCARINA_SONG_LULLABY
|
||||
{
|
||||
{ OCARINA_PITCH_B4, 51, 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D5, 25, 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, 78, 80, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_B4, 51, 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D5, 25, 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, 100, 80, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_B4, FRAMERATE_CONST(51, 42), 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D5, FRAMERATE_CONST(25, 21), 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, FRAMERATE_CONST(78, 65), 80, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_B4, FRAMERATE_CONST(51, 42), 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D5, FRAMERATE_CONST(25, 21), 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, FRAMERATE_CONST(100, 83), 80, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_NONE, 0, 90, 0, 0, 0 },
|
||||
},
|
||||
|
||||
// OCARINA_SONG_SUNS
|
||||
{
|
||||
{ OCARINA_PITCH_A4, 12, 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_F4, 13, 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D5, 29, 80, 2, 0, 0 },
|
||||
{ OCARINA_PITCH_NONE, 9, 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, 12, 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_F4, 13, 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D5, 120, 80, 3, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, FRAMERATE_CONST(12, 10), 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_F4, FRAMERATE_CONST(13, 10), 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D5, FRAMERATE_CONST(29, 25), 80, 2, 0, 0 },
|
||||
{ OCARINA_PITCH_NONE, FRAMERATE_CONST(9, 9), 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, FRAMERATE_CONST(12, 10), 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_F4, FRAMERATE_CONST(13, 10), 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D5, FRAMERATE_CONST(120, 100), 80, 3, 0, 0 },
|
||||
{ OCARINA_PITCH_NONE, 0, 90, 0, 0, 0 },
|
||||
},
|
||||
|
||||
// OCARINA_SONG_TIME
|
||||
{
|
||||
{ OCARINA_PITCH_A4, 32, 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D4, 65, 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_F4, 33, 80, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, 32, 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D4, 65, 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_F4, 99, 80, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, FRAMERATE_CONST(32, 26), 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D4, FRAMERATE_CONST(65, 54), 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_F4, FRAMERATE_CONST(33, 28), 80, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_A4, FRAMERATE_CONST(32, 26), 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D4, FRAMERATE_CONST(65, 54), 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_F4, FRAMERATE_CONST(99, 83), 80, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_NONE, 0, 90, 0, 0, 0 },
|
||||
},
|
||||
|
||||
// OCARINA_SONG_STORMS
|
||||
{
|
||||
{ OCARINA_PITCH_D4, 11, 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_F4, 11, 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D5, 45, 80, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D4, 11, 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_F4, 11, 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D5, 90, 80, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D4, FRAMERATE_CONST(11, 9), 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_F4, FRAMERATE_CONST(11, 9), 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D5, FRAMERATE_CONST(45, 37), 80, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D4, FRAMERATE_CONST(11, 9), 84, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_F4, FRAMERATE_CONST(11, 9), 88, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D5, FRAMERATE_CONST(90, 75), 80, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_NONE, 0, 90, 0, 0, 0 },
|
||||
},
|
||||
|
||||
// OCARINA_SONG_SCARECROW_SPAWN
|
||||
{
|
||||
{ OCARINA_PITCH_D4, 3, 0, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D4, FRAMERATE_CONST(3, 3), 0, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_NONE, 0, 255, 0, 0, 0 },
|
||||
},
|
||||
|
||||
// OCARINA_SONG_MEMORY_GAME
|
||||
{
|
||||
{ OCARINA_PITCH_D4, 3, 0, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_D4, FRAMERATE_CONST(3, 3), 0, 0, 0, 0 },
|
||||
{ OCARINA_PITCH_NONE, 0, 0, 0, 0, 0 },
|
||||
},
|
||||
};
|
||||
|
@ -2199,7 +2200,7 @@ s32 AudioOcarina_MemoryGameNextNote(void) {
|
|||
}
|
||||
|
||||
sOcarinaSongNotes[OCARINA_SONG_MEMORY_GAME][sOcaMemoryGameAppendPos].pitch = randomPitch;
|
||||
sOcarinaSongNotes[OCARINA_SONG_MEMORY_GAME][sOcaMemoryGameAppendPos].length = 45;
|
||||
sOcarinaSongNotes[OCARINA_SONG_MEMORY_GAME][sOcaMemoryGameAppendPos].length = FRAMERATE_CONST(45, 38);
|
||||
sOcarinaSongNotes[OCARINA_SONG_MEMORY_GAME][sOcaMemoryGameAppendPos].volume = 0x50;
|
||||
sOcarinaSongNotes[OCARINA_SONG_MEMORY_GAME][sOcaMemoryGameAppendPos].vibrato = 0;
|
||||
sOcarinaSongNotes[OCARINA_SONG_MEMORY_GAME][sOcaMemoryGameAppendPos].bend = 0;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "ultra64.h"
|
||||
#include "global.h"
|
||||
#include "versions.h"
|
||||
|
||||
void AudioHeap_InitSampleCaches(u32 persistentSampleCacheSize, u32 temporarySampleCacheSize);
|
||||
SampleCacheEntry* AudioHeap_AllocTemporarySampleCacheEntry(u32 size);
|
||||
|
@ -907,8 +908,8 @@ void AudioHeap_Init(void) {
|
|||
}
|
||||
|
||||
// Determine the length of the buffer for storing the audio command list passed to the rsp audio microcode
|
||||
gAudioCtx.maxAudioCmds =
|
||||
gAudioCtx.numNotes * 0x10 * gAudioCtx.audioBufferParameters.ticksPerUpdate + spec->numReverbs * 0x18 + 0x140;
|
||||
gAudioCtx.maxAudioCmds = gAudioCtx.numNotes * 0x10 * gAudioCtx.audioBufferParameters.ticksPerUpdate +
|
||||
spec->numReverbs * 0x18 + FRAMERATE_CONST(0x140, 0x1C0);
|
||||
|
||||
// Calculate sizes for various caches on the audio heap
|
||||
persistentSize =
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "versions.h"
|
||||
#include "assets/objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "assets/objects/object_link_boy/object_link_boy.h"
|
||||
#include "assets/objects/object_link_child/object_link_child.h"
|
||||
|
@ -13,12 +14,126 @@ typedef struct BowSlingshotStringData {
|
|||
FlexSkeletonHeader* gPlayerSkelHeaders[] = { &gLinkAdultSkel, &gLinkChildSkel };
|
||||
|
||||
s16 sBootData[PLAYER_BOOTS_MAX][17] = {
|
||||
{ 200, 1000, 300, 700, 550, 270, 600, 350, 800, 600, -100, 600, 590, 750, 125, 200, 130 },
|
||||
{ 200, 1000, 300, 700, 550, 270, 1000, 0, 800, 300, -160, 600, 590, 750, 125, 200, 130 },
|
||||
{ 200, 1000, 300, 700, 550, 270, 600, 600, 800, 550, -100, 600, 540, 270, 25, 0, 130 },
|
||||
{ 200, 1000, 300, 700, 380, 400, 0, 300, 800, 500, -100, 600, 590, 750, 125, 200, 130 },
|
||||
{ 80, 800, 150, 700, 480, 270, 600, 50, 800, 550, -40, 400, 540, 270, 25, 0, 80 },
|
||||
{ 200, 1000, 300, 800, 500, 400, 800, 400, 800, 550, -100, 600, 540, 750, 125, 400, 200 },
|
||||
// PLAYER_BOOTS_KOKIRI
|
||||
{
|
||||
200, // REG(19)
|
||||
FRAMERATE_CONST(1000, 1200), // REG(30)
|
||||
FRAMERATE_CONST(300, 360), // REG(32)
|
||||
700, // REG(34)
|
||||
FRAMERATE_CONST(550, 660), // REG(35)
|
||||
FRAMERATE_CONST(270, 324), // REG(36)
|
||||
600, // REG(37)
|
||||
FRAMERATE_CONST(350, 420), // REG(38)
|
||||
800, // REG(43)
|
||||
600, // REG(45)
|
||||
-100, // REG(68)
|
||||
600, // REG(69)
|
||||
590, // IREG(66)
|
||||
750, // IREG(67)
|
||||
125, // IREG(68)
|
||||
200, // IREG(69)
|
||||
FRAMERATE_CONST(130, 156), // MREG(95)
|
||||
},
|
||||
// PLAYER_BOOTS_IRON
|
||||
{
|
||||
200, // REG(19)
|
||||
FRAMERATE_CONST(1000, 1200), // REG(30)
|
||||
FRAMERATE_CONST(300, 360), // REG(32)
|
||||
700, // REG(34)
|
||||
FRAMERATE_CONST(550, 660), // REG(35)
|
||||
FRAMERATE_CONST(270, 324), // REG(36)
|
||||
1000, // REG(37)
|
||||
FRAMERATE_CONST(0, 0), // REG(38)
|
||||
800, // REG(43)
|
||||
300, // REG(45)
|
||||
-160, // REG(68)
|
||||
600, // REG(69)
|
||||
590, // IREG(66)
|
||||
750, // IREG(67)
|
||||
125, // IREG(68)
|
||||
200, // IREG(69)
|
||||
FRAMERATE_CONST(130, 156), // MREG(95)
|
||||
},
|
||||
// PLAYER_BOOTS_HOVER
|
||||
{
|
||||
200, // REG(19)
|
||||
FRAMERATE_CONST(1000, 1200), // REG(30)
|
||||
FRAMERATE_CONST(300, 360), // REG(32)
|
||||
700, // REG(34)
|
||||
FRAMERATE_CONST(550, 660), // REG(35)
|
||||
FRAMERATE_CONST(270, 324), // REG(36)
|
||||
600, // REG(37)
|
||||
FRAMERATE_CONST(600, 720), // REG(38)
|
||||
800, // REG(43)
|
||||
550, // REG(45)
|
||||
-100, // REG(68)
|
||||
600, // REG(69)
|
||||
540, // IREG(66)
|
||||
270, // IREG(67)
|
||||
25, // IREG(68)
|
||||
0, // IREG(69)
|
||||
FRAMERATE_CONST(130, 156), // MREG(95)
|
||||
},
|
||||
// PLAYER_BOOTS_INDOOR
|
||||
{
|
||||
200, // REG(19)
|
||||
FRAMERATE_CONST(1000, 1200), // REG(30)
|
||||
FRAMERATE_CONST(300, 360), // REG(32)
|
||||
700, // REG(34)
|
||||
FRAMERATE_CONST(380, 456), // REG(35)
|
||||
FRAMERATE_CONST(400, 480), // REG(36)
|
||||
0, // REG(37)
|
||||
FRAMERATE_CONST(300, 360), // REG(38)
|
||||
800, // REG(43)
|
||||
500, // REG(45)
|
||||
-100, // REG(68)
|
||||
600, // REG(69)
|
||||
590, // IREG(66)
|
||||
750, // IREG(67)
|
||||
125, // IREG(68)
|
||||
200, // IREG(69)
|
||||
FRAMERATE_CONST(130, 156), // MREG(95)
|
||||
},
|
||||
// PLAYER_BOOTS_IRON_UNDERWATER
|
||||
{
|
||||
80, // REG(19)
|
||||
FRAMERATE_CONST(800, 960), // REG(30)
|
||||
FRAMERATE_CONST(150, 180), // REG(32)
|
||||
700, // REG(34)
|
||||
FRAMERATE_CONST(480, 576), // REG(35)
|
||||
FRAMERATE_CONST(270, 324), // REG(36)
|
||||
600, // REG(37)
|
||||
FRAMERATE_CONST(50, 60), // REG(38)
|
||||
800, // REG(43)
|
||||
550, // REG(45)
|
||||
-40, // REG(68)
|
||||
400, // REG(69)
|
||||
540, // IREG(66)
|
||||
270, // IREG(67)
|
||||
25, // IREG(68)
|
||||
0, // IREG(69)
|
||||
FRAMERATE_CONST(80, 96), // MREG(95)
|
||||
},
|
||||
// PLAYER_BOOTS_KOKIRI_CHILD
|
||||
{
|
||||
200, // REG(19)
|
||||
FRAMERATE_CONST(1000, 1200), // REG(30)
|
||||
FRAMERATE_CONST(300, 360), // REG(32)
|
||||
800, // REG(34)
|
||||
FRAMERATE_CONST(500, 600), // REG(35)
|
||||
FRAMERATE_CONST(400, 480), // REG(36)
|
||||
800, // REG(37)
|
||||
FRAMERATE_CONST(400, 480), // REG(38)
|
||||
800, // REG(43)
|
||||
550, // REG(45)
|
||||
-100, // REG(68)
|
||||
600, // REG(69)
|
||||
540, // IREG(66)
|
||||
750, // IREG(67)
|
||||
125, // IREG(68)
|
||||
400, // IREG(69)
|
||||
FRAMERATE_CONST(200, 240), // MREG(95)
|
||||
},
|
||||
};
|
||||
|
||||
// Used to map item actions to model groups
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "z_demo_effect.h"
|
||||
#include "terminal.h"
|
||||
#include "versions.h"
|
||||
#include "assets/objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "assets/objects/object_efc_crystal_light/object_efc_crystal_light.h"
|
||||
#include "assets/objects/object_efc_fire_ball/object_efc_fire_ball.h"
|
||||
|
@ -357,16 +358,16 @@ void DemoEffect_Init(Actor* thisx, PlayState* play2) {
|
|||
case DEMO_EFFECT_LIGHTRING_EXPANDING:
|
||||
this->initDrawFunc = DemoEffect_DrawLightRing;
|
||||
this->initUpdateFunc = DemoEffect_UpdateLightRingExpanding;
|
||||
this->lightRing.timer = 20;
|
||||
this->lightRing.timerIncrement = 4;
|
||||
this->lightRing.timer = FRAMERATE_CONST(20, 6);
|
||||
this->lightRing.timerIncrement = FRAMERATE_CONST(4, 5);
|
||||
this->lightRing.alpha = 255;
|
||||
break;
|
||||
|
||||
case DEMO_EFFECT_LIGHTRING_TRIFORCE:
|
||||
this->initDrawFunc = DemoEffect_DrawLightRing;
|
||||
this->initUpdateFunc = DemoEffect_UpdateLightRingTriforce;
|
||||
this->lightRing.timer = 20;
|
||||
this->lightRing.timerIncrement = 4;
|
||||
this->lightRing.timer = FRAMERATE_CONST(20, 6);
|
||||
this->lightRing.timerIncrement = FRAMERATE_CONST(4, 5);
|
||||
this->lightRing.alpha = 0;
|
||||
this->cueChannel = 4;
|
||||
break;
|
||||
|
@ -374,8 +375,8 @@ void DemoEffect_Init(Actor* thisx, PlayState* play2) {
|
|||
case DEMO_EFFECT_LIGHTRING_SHRINKING:
|
||||
this->initDrawFunc = DemoEffect_DrawLightRing;
|
||||
this->initUpdateFunc = DemoEffect_UpdateLightRingShrinking;
|
||||
this->lightRing.timer = 351;
|
||||
this->lightRing.timerIncrement = 2;
|
||||
this->lightRing.timer = FRAMERATE_CONST(351, 405);
|
||||
this->lightRing.timerIncrement = FRAMERATE_CONST(2, 3);
|
||||
this->lightRing.alpha = 0;
|
||||
break;
|
||||
|
||||
|
@ -834,7 +835,7 @@ void DemoEffect_UpdateTriforceSpot(DemoEffect* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (gSaveContext.save.entranceIndex == ENTR_CUTSCENE_MAP_0 && gSaveContext.sceneLayer == 6 &&
|
||||
play->csCtx.curFrame == 143) {
|
||||
play->csCtx.curFrame == FRAMERATE_CONST(143, 120)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_IT_DM_RING_EXPLOSION);
|
||||
}
|
||||
}
|
||||
|
@ -959,10 +960,10 @@ void DemoEffect_InitCreationFireball(DemoEffect* this, PlayState* play) {
|
|||
Actor* parent = this->actor.parent;
|
||||
|
||||
this->actor.world.rot.y = parent->shape.rot.y;
|
||||
this->fireBall.timer = 50;
|
||||
this->actor.speed = 1.5f;
|
||||
this->actor.minVelocityY = -1.5f;
|
||||
this->actor.gravity = -0.03f;
|
||||
this->fireBall.timer = FRAMERATE_CONST(50, 42);
|
||||
this->actor.speed = FRAMERATE_CONST(1.5f, 1.8f);
|
||||
this->actor.minVelocityY = FRAMERATE_CONST(-1.5f, -2.5f);
|
||||
this->actor.gravity = FRAMERATE_CONST(-0.03f, -0.05f);
|
||||
this->updateFunc = DemoEffect_UpdateCreationFireball;
|
||||
}
|
||||
|
||||
|
@ -1134,22 +1135,22 @@ void DemoEffect_UpdateGodLgtDin(DemoEffect* this, PlayState* play) {
|
|||
if (gSaveContext.save.entranceIndex == ENTR_CUTSCENE_MAP_0) {
|
||||
switch (gSaveContext.sceneLayer) {
|
||||
case 4:
|
||||
if (play->csCtx.curFrame == 288) {
|
||||
if (play->csCtx.curFrame == FRAMERATE_CONST(288, 240)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_IT_DM_FLYING_GOD_PASS);
|
||||
}
|
||||
if (play->csCtx.curFrame == 635) {
|
||||
if (play->csCtx.curFrame == FRAMERATE_CONST(635, 535)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_IT_DM_FLYING_GOD_PASS);
|
||||
}
|
||||
break;
|
||||
|
||||
case 6:
|
||||
if (play->csCtx.curFrame == 55) {
|
||||
if (play->csCtx.curFrame == FRAMERATE_CONST(55, 25)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_IT_DM_FLYING_GOD_DASH);
|
||||
}
|
||||
break;
|
||||
|
||||
case 11:
|
||||
if (play->csCtx.curFrame == 350) {
|
||||
if (play->csCtx.curFrame == FRAMERATE_CONST(350, 353)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_IT_DM_FLYING_GOD_DASH);
|
||||
}
|
||||
break;
|
||||
|
@ -1189,19 +1190,18 @@ void DemoEffect_UpdateGodLgtNayru(DemoEffect* this, PlayState* play) {
|
|||
if (gSaveContext.save.entranceIndex == ENTR_CUTSCENE_MAP_0) {
|
||||
switch (gSaveContext.sceneLayer) {
|
||||
case 4:
|
||||
if (play->csCtx.curFrame == 298) {
|
||||
if (play->csCtx.curFrame == FRAMERATE_CONST(298, 248)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_IT_DM_FLYING_GOD_PASS);
|
||||
}
|
||||
break;
|
||||
|
||||
case 6:
|
||||
if (play->csCtx.curFrame == 105) {
|
||||
if (play->csCtx.curFrame == FRAMERATE_CONST(105, 88)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_IT_DM_FLYING_GOD_DASH);
|
||||
}
|
||||
break;
|
||||
|
||||
case 11:
|
||||
if (play->csCtx.curFrame == 360) {
|
||||
if (play->csCtx.curFrame == FRAMERATE_CONST(360, 362)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_IT_DM_FLYING_GOD_DASH);
|
||||
}
|
||||
break;
|
||||
|
@ -1209,10 +1209,10 @@ void DemoEffect_UpdateGodLgtNayru(DemoEffect* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (gSaveContext.save.entranceIndex == ENTR_DEATH_MOUNTAIN_TRAIL_0 && gSaveContext.sceneLayer == 4) {
|
||||
if (play->csCtx.curFrame == 72) {
|
||||
if (play->csCtx.curFrame == FRAMERATE_CONST(72, 57)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_IT_DM_FLYING_GOD_DASH);
|
||||
}
|
||||
if (play->csCtx.curFrame == 80) {
|
||||
if (play->csCtx.curFrame == FRAMERATE_CONST(80, 72)) {
|
||||
Audio_PlayCutsceneEffectsSequence(SEQ_CS_EFFECTS_NAYRU_MAGIC);
|
||||
}
|
||||
}
|
||||
|
@ -1249,19 +1249,19 @@ void DemoEffect_UpdateGodLgtFarore(DemoEffect* this, PlayState* play) {
|
|||
if (gSaveContext.save.entranceIndex == ENTR_CUTSCENE_MAP_0) {
|
||||
switch (gSaveContext.sceneLayer) {
|
||||
case 4:
|
||||
if (play->csCtx.curFrame == 315) {
|
||||
if (play->csCtx.curFrame == FRAMERATE_CONST(315, 265)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_IT_DM_FLYING_GOD_PASS);
|
||||
}
|
||||
break;
|
||||
|
||||
case 6:
|
||||
if (play->csCtx.curFrame == 80) {
|
||||
if (play->csCtx.curFrame == FRAMERATE_CONST(80, 60)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_IT_DM_FLYING_GOD_DASH);
|
||||
}
|
||||
break;
|
||||
|
||||
case 11:
|
||||
if (play->csCtx.curFrame == 370) {
|
||||
if (play->csCtx.curFrame == FRAMERATE_CONST(370, 371)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_IT_DM_FLYING_GOD_DASH);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include "z_end_title.h"
|
||||
#include "versions.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
|
||||
|
||||
|
@ -70,14 +71,14 @@ void EndTitle_DrawFull(Actor* thisx, PlayState* play) {
|
|||
OPEN_DISPS(play->state.gfxCtx, "../z_end_title.c", 419);
|
||||
|
||||
// Draw title cards on the screen
|
||||
if ((csCurFrame > 890) && (this->endAlpha < 200)) {
|
||||
this->endAlpha += 7;
|
||||
if ((csCurFrame > FRAMERATE_CONST(890, 740)) && (this->endAlpha < 200)) {
|
||||
this->endAlpha += FRAMERATE_CONST(7, 8);
|
||||
}
|
||||
if ((csCurFrame > 810) && (this->tlozAlpha < 200)) {
|
||||
this->tlozAlpha += 15;
|
||||
if ((csCurFrame > FRAMERATE_CONST(810, 675)) && (this->tlozAlpha < 200)) {
|
||||
this->tlozAlpha += FRAMERATE_CONST(15, 18);
|
||||
}
|
||||
if ((csCurFrame > 850) && (this->ootAlpha < 200)) {
|
||||
this->ootAlpha += 15;
|
||||
if ((csCurFrame > FRAMERATE_CONST(850, 710)) && (this->ootAlpha < 200)) {
|
||||
this->ootAlpha += FRAMERATE_CONST(15, 18);
|
||||
}
|
||||
|
||||
OVERLAY_DISP = Gfx_SetupDL_64(OVERLAY_DISP);
|
||||
|
@ -114,7 +115,7 @@ void EndTitle_DrawNintendoLogo(Actor* thisx, PlayState* play) {
|
|||
s32 pad;
|
||||
s32 csCurFrame = play->csCtx.curFrame;
|
||||
|
||||
if ((csCurFrame >= 1101) && (this->endAlpha < 255)) {
|
||||
if ((csCurFrame > FRAMERATE_CONST(1100, 950)) && (this->endAlpha < 255)) {
|
||||
this->endAlpha += 3;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "ultra64.h"
|
||||
#include "global.h"
|
||||
#include "quake.h"
|
||||
#include "versions.h"
|
||||
|
||||
#include "overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.h"
|
||||
#include "overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.h"
|
||||
|
@ -5980,7 +5981,7 @@ void func_8083BC04(Player* this, PlayState* play) {
|
|||
Player_SetupAction(play, this, Player_Action_80844708, 0);
|
||||
LinkAnimation_PlayOnceSetSpeed(play, &this->skelAnime,
|
||||
GET_PLAYER_ANIM(PLAYER_ANIMGROUP_landing_roll, this->modelAnimType),
|
||||
1.25f * D_808535E8);
|
||||
FRAMERATE_CONST(1.25f, 1.5f) * D_808535E8);
|
||||
}
|
||||
|
||||
s32 func_8083BC7C(Player* this, PlayState* play) {
|
||||
|
@ -6583,7 +6584,7 @@ void func_8083D53C(PlayState* play, Player* this) {
|
|||
void func_8083D6EC(PlayState* play, Player* this) {
|
||||
Vec3f ripplePos;
|
||||
|
||||
this->actor.minVelocityY = -20.0f;
|
||||
this->actor.minVelocityY = FRAMERATE_CONST(-20.0f, -24.0f);
|
||||
this->actor.gravity = REG(68) / 100.0f;
|
||||
|
||||
if (func_8083816C(sFloorType)) {
|
||||
|
@ -9214,7 +9215,7 @@ void Player_Action_80844708(Player* this, PlayState* play) {
|
|||
sp44 = LinkAnimation_Update(play, &this->skelAnime);
|
||||
|
||||
if (LinkAnimation_OnFrame(&this->skelAnime, 8.0f)) {
|
||||
func_80837AFC(this, -10);
|
||||
func_80837AFC(this, FRAMERATE_CONST(-10, -8));
|
||||
}
|
||||
|
||||
if (func_80842964(this, play) == 0) {
|
||||
|
@ -11882,7 +11883,7 @@ void func_8084B000(Player* this) {
|
|||
f32 phi_f14;
|
||||
f32 depthInWater;
|
||||
|
||||
phi_f14 = -5.0f;
|
||||
phi_f14 = FRAMERATE_CONST(-5.0f, -6.0f);
|
||||
|
||||
phi_f16 = this->ageProperties->unk_28;
|
||||
if (this->actor.velocity.y < 0.0f) {
|
||||
|
@ -11898,10 +11899,10 @@ void func_8084B000(Player* this) {
|
|||
phi_f18 = -0.1f - phi_f16;
|
||||
} else {
|
||||
if (!(this->stateFlags1 & PLAYER_STATE1_DEAD) && (this->currentBoots == PLAYER_BOOTS_IRON) &&
|
||||
(this->actor.velocity.y >= -3.0f)) {
|
||||
(this->actor.velocity.y >= FRAMERATE_CONST(-3.0f, -3.6f))) {
|
||||
phi_f18 = -0.2f;
|
||||
} else {
|
||||
phi_f14 = 2.0f;
|
||||
phi_f14 = FRAMERATE_CONST(2.0f, 2.4f);
|
||||
if (this->actor.velocity.y >= 0.0f) {
|
||||
phi_f16 = 0.0f;
|
||||
} else {
|
||||
|
@ -11927,17 +11928,19 @@ void func_8084B000(Player* this) {
|
|||
|
||||
void func_8084B158(PlayState* play, Player* this, Input* input, f32 arg3) {
|
||||
f32 temp;
|
||||
f32 limit;
|
||||
|
||||
if ((input != NULL) && CHECK_BTN_ANY(input->press.button, BTN_A | BTN_B)) {
|
||||
temp = 1.0f;
|
||||
temp = limit = FRAMERATE_CONST(1.0f, 1.2f);
|
||||
} else {
|
||||
temp = 0.5f;
|
||||
temp = FRAMERATE_CONST(0.5f, 0.6f);
|
||||
limit = FRAMERATE_CONST(1.0f, 1.2f);
|
||||
}
|
||||
|
||||
temp *= arg3;
|
||||
|
||||
if (temp < 1.0f) {
|
||||
temp = 1.0f;
|
||||
if (temp < limit) {
|
||||
temp = limit;
|
||||
}
|
||||
|
||||
this->skelAnime.playSpeed = temp;
|
||||
|
|
Loading…
Reference in a new issue