Overhauled the Music ID enum
This should be ASM-accurate, since SurfaceID was
This commit is contained in:
parent
3e34136f69
commit
b7d01aae3f
8 changed files with 63 additions and 63 deletions
|
@ -316,7 +316,7 @@ void ActionCredit_Read()
|
||||||
++Credit.offset;
|
++Credit.offset;
|
||||||
a = GetScriptNumber(&Credit.pData[Credit.offset]);
|
a = GetScriptNumber(&Credit.pData[Credit.offset]);
|
||||||
Credit.offset += 4;
|
Credit.offset += 4;
|
||||||
ChangeMusic(a);
|
ChangeMusic((MusicID)a);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case '~': // Start fading out music
|
case '~': // Start fading out music
|
||||||
|
|
14
src/Game.cpp
14
src/Game.cpp
|
@ -121,7 +121,7 @@ int ModeOpening(HWND hWnd)
|
||||||
InitFade();
|
InitFade();
|
||||||
InitFlash();
|
InitFlash();
|
||||||
InitBossLife();
|
InitBossLife();
|
||||||
ChangeMusic(0);
|
ChangeMusic(MUS_SILENCE);
|
||||||
TransferStage(72, 100, 3, 3);
|
TransferStage(72, 100, 3, 3);
|
||||||
SetFrameTargetMyChar(16);
|
SetFrameTargetMyChar(16);
|
||||||
SetFadeMask();
|
SetFadeMask();
|
||||||
|
@ -315,15 +315,15 @@ int ModeTitle(HWND hWnd)
|
||||||
|
|
||||||
// Set music to character's specific music
|
// Set music to character's specific music
|
||||||
if (char_type == 1)
|
if (char_type == 1)
|
||||||
ChangeMusic(mus_RunningHell);
|
ChangeMusic(MUS_RUNNING_HELL);
|
||||||
else if (char_type == 2)
|
else if (char_type == 2)
|
||||||
ChangeMusic(mus_TorokosTheme);
|
ChangeMusic(MUS_TOROKOS_THEME);
|
||||||
else if (char_type == 3)
|
else if (char_type == 3)
|
||||||
ChangeMusic(mus_White);
|
ChangeMusic(MUS_WHITE);
|
||||||
else if (char_type == 4)
|
else if (char_type == 4)
|
||||||
ChangeMusic(mus_Safety);
|
ChangeMusic(MUS_SAFETY);
|
||||||
else
|
else
|
||||||
ChangeMusic(mus_CaveStory);
|
ChangeMusic(MUS_CAVE_STORY);
|
||||||
|
|
||||||
// Reset cliprect, flags, and give the player the Nikumaru counter
|
// Reset cliprect, flags, and give the player the Nikumaru counter
|
||||||
grcGame.left = 0;
|
grcGame.left = 0;
|
||||||
|
@ -454,7 +454,7 @@ int ModeTitle(HWND hWnd)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ChangeMusic(0);
|
ChangeMusic(MUS_SILENCE);
|
||||||
|
|
||||||
// Black screen when option is selected
|
// Black screen when option is selected
|
||||||
wait = SDL_GetTicks(); // The original version used GetTickCount instead
|
wait = SDL_GetTicks(); // The original version used GetTickCount instead
|
||||||
|
|
|
@ -160,7 +160,7 @@ BOOL LoadProfile(const char *name)
|
||||||
#else
|
#else
|
||||||
fread(profile.code, 8, 1, fp);
|
fread(profile.code, 8, 1, fp);
|
||||||
profile.stage = File_ReadLE32(fp);
|
profile.stage = File_ReadLE32(fp);
|
||||||
profile.music = File_ReadLE32(fp);
|
profile.music = (MusicID)File_ReadLE32(fp);
|
||||||
profile.x = File_ReadLE32(fp);
|
profile.x = File_ReadLE32(fp);
|
||||||
profile.y = File_ReadLE32(fp);
|
profile.y = File_ReadLE32(fp);
|
||||||
profile.direct = File_ReadLE32(fp);
|
profile.direct = File_ReadLE32(fp);
|
||||||
|
|
|
@ -4,12 +4,13 @@
|
||||||
|
|
||||||
#include "ArmsItem.h"
|
#include "ArmsItem.h"
|
||||||
#include "SelStage.h"
|
#include "SelStage.h"
|
||||||
|
#include "Stage.h"
|
||||||
|
|
||||||
struct PROFILE
|
struct PROFILE
|
||||||
{
|
{
|
||||||
char code[8];
|
char code[8];
|
||||||
int stage;
|
int stage;
|
||||||
int music;
|
MusicID music;
|
||||||
int x;
|
int x;
|
||||||
int y;
|
int y;
|
||||||
int direct;
|
int direct;
|
||||||
|
|
47
src/Sound.h
47
src/Sound.h
|
@ -43,53 +43,6 @@ class SOUNDBUFFER
|
||||||
double samplePosition;
|
double samplePosition;
|
||||||
};
|
};
|
||||||
|
|
||||||
//Music ID enum
|
|
||||||
enum MUSIC_IDS
|
|
||||||
{
|
|
||||||
mus_Silence = 0x0,
|
|
||||||
mus_MischievousRobot = 0x1,
|
|
||||||
mus_Safety = 0x2,
|
|
||||||
mus_GameOver = 0x3,
|
|
||||||
mus_Gravity = 0x4,
|
|
||||||
mus_OnToGrasstown = 0x5,
|
|
||||||
mus_Meltdown2 = 0x6,
|
|
||||||
mus_EyesOfFlame = 0x7,
|
|
||||||
mus_Gestation = 0x8,
|
|
||||||
mus_MimigaTown = 0x9,
|
|
||||||
mus_GetItem = 0xA,
|
|
||||||
mus_BalrogsTheme = 0xB,
|
|
||||||
mus_Cemetary = 0xC,
|
|
||||||
mus_Plant = 0xD,
|
|
||||||
mus_Pulse = 0xE,
|
|
||||||
mus_Victory = 0xF,
|
|
||||||
mus_GetLifeCapsule = 0x10,
|
|
||||||
mus_Tyrant = 0x11,
|
|
||||||
mus_Run = 0x12,
|
|
||||||
mus_Jenka1 = 0x13,
|
|
||||||
mus_LabyrinthFight = 0x14,
|
|
||||||
mus_Access = 0x15,
|
|
||||||
mus_Oppression = 0x16,
|
|
||||||
mus_Geothermal = 0x17,
|
|
||||||
mus_CaveStory = 0x18,
|
|
||||||
mus_Moonsong = 0x19,
|
|
||||||
mus_Herosend = 0x1A,
|
|
||||||
mus_ScorchingBack = 0x1B,
|
|
||||||
mus_Quiet = 0x1C,
|
|
||||||
mus_FinalCave = 0x1D,
|
|
||||||
mus_Balcony = 0x1E,
|
|
||||||
mus_Charge = 0x1F,
|
|
||||||
mus_LastBattle = 0x20,
|
|
||||||
mus_TheWayBackHome = 0x21,
|
|
||||||
mus_Zombie = 0x22,
|
|
||||||
mus_BreakDown = 0x23,
|
|
||||||
mus_RunningHell = 0x24,
|
|
||||||
mus_Jenka2 = 0x25,
|
|
||||||
mus_LivingWaterway = 0x26,
|
|
||||||
mus_SealChamber = 0x27,
|
|
||||||
mus_TorokosTheme = 0x28,
|
|
||||||
mus_White = 0x29
|
|
||||||
};
|
|
||||||
|
|
||||||
#define SE_MAX 160 // According to the Organya source code release, this is the real name for this constant
|
#define SE_MAX 160 // According to the Organya source code release, this is the real name for this constant
|
||||||
extern SOUNDBUFFER* lpSECONDARYBUFFER[SE_MAX];
|
extern SOUNDBUFFER* lpSECONDARYBUFFER[SE_MAX];
|
||||||
|
|
||||||
|
|
|
@ -250,10 +250,10 @@ const char *gMusicTable[42] =
|
||||||
};
|
};
|
||||||
|
|
||||||
unsigned int gOldPos;
|
unsigned int gOldPos;
|
||||||
int gOldNo;
|
MusicID gOldNo;
|
||||||
int gMusicNo;
|
MusicID gMusicNo;
|
||||||
|
|
||||||
void ChangeMusic(int no)
|
void ChangeMusic(MusicID no)
|
||||||
{
|
{
|
||||||
if (no && no == gMusicNo)
|
if (no && no == gMusicNo)
|
||||||
return;
|
return;
|
||||||
|
|
50
src/Stage.h
50
src/Stage.h
|
@ -2,6 +2,52 @@
|
||||||
|
|
||||||
#include "WindowsWrapper.h"
|
#include "WindowsWrapper.h"
|
||||||
|
|
||||||
|
enum MusicID
|
||||||
|
{
|
||||||
|
MUS_SILENCE = 0x0,
|
||||||
|
MUS_MISCHIEVOUS_ROBOT = 0x1,
|
||||||
|
MUS_SAFETY = 0x2,
|
||||||
|
MUS_GAME_OVER = 0x3,
|
||||||
|
MUS_GRAVITY = 0x4,
|
||||||
|
MUS_ON_TO_GRASSTOWN = 0x5,
|
||||||
|
MUS_MELTDOWN2 = 0x6,
|
||||||
|
MUS_EYES_OF_FLAME = 0x7,
|
||||||
|
MUS_GESTATION = 0x8,
|
||||||
|
MUS_MIMIGA_TOWN = 0x9,
|
||||||
|
MUS_GOT_ITEM = 0xA,
|
||||||
|
MUS_BALROGS_THEME = 0xB,
|
||||||
|
MUS_CEMETERY = 0xC,
|
||||||
|
MUS_PLANT = 0xD,
|
||||||
|
MUS_PULSE = 0xE,
|
||||||
|
MUS_VICTORY = 0xF,
|
||||||
|
MUS_GET_HEART_TANK = 0x10,
|
||||||
|
MUS_TYRANT = 0x11,
|
||||||
|
MUS_RUN = 0x12,
|
||||||
|
MUS_JENKA1 = 0x13,
|
||||||
|
MUS_LABYRINTH_FIGHT = 0x14,
|
||||||
|
MUS_ACCESS = 0x15,
|
||||||
|
MUS_OPPRESSION = 0x16,
|
||||||
|
MUS_GEOTHERMAL = 0x17,
|
||||||
|
MUS_CAVE_STORY = 0x18,
|
||||||
|
MUS_MOONSONG = 0x19,
|
||||||
|
MUS_HEROS_END = 0x1A,
|
||||||
|
MUS_SCORCHING_BACK = 0x1B,
|
||||||
|
MUS_QUIET = 0x1C,
|
||||||
|
MUS_LAST_CAVE = 0x1D,
|
||||||
|
MUS_BALCONY = 0x1E,
|
||||||
|
MUS_CHARGE = 0x1F,
|
||||||
|
MUS_LAST_BATTLE = 0x20,
|
||||||
|
MUS_THE_WAY_BACK_HOME = 0x21,
|
||||||
|
MUS_ZOMBIE = 0x22,
|
||||||
|
MUS_BREAK_DOWN = 0x23,
|
||||||
|
MUS_RUNNING_HELL = 0x24,
|
||||||
|
MUS_JENKA2 = 0x25,
|
||||||
|
MUS_LIVING_WATERWAY = 0x26,
|
||||||
|
MUS_SEAL_CHAMBER = 0x27,
|
||||||
|
MUS_TOROKOS_THEME = 0x28,
|
||||||
|
MUS_WHITE = 0x29
|
||||||
|
};
|
||||||
|
|
||||||
struct STAGE_TABLE
|
struct STAGE_TABLE
|
||||||
{
|
{
|
||||||
char parts[0x20];
|
char parts[0x20];
|
||||||
|
@ -15,8 +61,8 @@ struct STAGE_TABLE
|
||||||
};
|
};
|
||||||
|
|
||||||
extern int gStageNo;
|
extern int gStageNo;
|
||||||
extern int gMusicNo;
|
extern MusicID gMusicNo;
|
||||||
|
|
||||||
BOOL TransferStage(int no, int w, int x, int y);
|
BOOL TransferStage(int no, int w, int x, int y);
|
||||||
void ChangeMusic(int no);
|
void ChangeMusic(MusicID no);
|
||||||
void ReCallMusic();
|
void ReCallMusic();
|
||||||
|
|
|
@ -1036,7 +1036,7 @@ int TextScriptProc()
|
||||||
else if (IS_COMMAND('C','M','U'))
|
else if (IS_COMMAND('C','M','U'))
|
||||||
{
|
{
|
||||||
z = GetTextScriptNo(gTS.p_read + 4);
|
z = GetTextScriptNo(gTS.p_read + 4);
|
||||||
ChangeMusic(z);
|
ChangeMusic((MusicID)z);
|
||||||
gTS.p_read += 8;
|
gTS.p_read += 8;
|
||||||
}
|
}
|
||||||
else if (IS_COMMAND('F','M','U'))
|
else if (IS_COMMAND('F','M','U'))
|
||||||
|
|
Loading…
Add table
Reference in a new issue