mirror of
https://github.com/luksamuk/engine-psx.git
synced 2025-04-28 13:28:02 +03:00
Add credits music
This commit is contained in:
parent
12d90c0d87
commit
b2e15f1c4f
5 changed files with 31 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
|||
1 xa youremyhero.xa 1 0
|
||||
1 xa amenbreak.xa 1 1
|
||||
1 null
|
||||
1 xa herormx.xa 1 2
|
||||
1 null
|
||||
|
|
BIN
assets/bgm/herormx.flac
Normal file
BIN
assets/bgm/herormx.flac
Normal file
Binary file not shown.
|
@ -6,6 +6,10 @@
|
|||
#include "render.h"
|
||||
#include "basic_font.h"
|
||||
#include "input.h"
|
||||
#include "sound.h"
|
||||
#include "util.h"
|
||||
|
||||
extern int debug_mode;
|
||||
|
||||
static const char *creditstxt[] = {
|
||||
"SONIC XA CREDITS",
|
||||
|
@ -62,11 +66,13 @@ static const char *creditstxt[] = {
|
|||
"By pkVortex",
|
||||
"\r",
|
||||
|
||||
"Intro FMV",
|
||||
"You Can Do Anything",
|
||||
"By Sonic Team",
|
||||
"Level Select",
|
||||
"Sonic 3D Blast Main Title: You're My Hero",
|
||||
"By Richard Jacques",
|
||||
"\r",
|
||||
|
||||
// TODO: Credits (You're My Hero Remix)
|
||||
|
||||
|
||||
/* Graphics credits */
|
||||
"Character Sprites Ripping",
|
||||
|
@ -141,17 +147,24 @@ screen_credits_load()
|
|||
data->fade = 0;
|
||||
data->countdown = FADE_FRAMES;
|
||||
data->state = 0;
|
||||
|
||||
sound_play_xa("\\BGM\\MNU001.XA;1", 0, 2, 0);
|
||||
}
|
||||
|
||||
void
|
||||
screen_credits_unload(void *)
|
||||
{
|
||||
sound_stop_xa();
|
||||
screen_free();
|
||||
}
|
||||
|
||||
void
|
||||
screen_credits_update(void *d)
|
||||
{
|
||||
uint32_t elapsed_sectors;
|
||||
sound_xa_get_elapsed_sectors(&elapsed_sectors);
|
||||
if(elapsed_sectors >= 4850) sound_stop_xa();
|
||||
|
||||
screen_credits_data *data = (screen_credits_data *)d;
|
||||
if(creditstxt[data->entry] != NULL
|
||||
&& (!pad_pressed(PAD_START) && !pad_pressed(PAD_CROSS))) {
|
||||
|
@ -203,6 +216,17 @@ screen_credits_draw(void *d)
|
|||
{
|
||||
screen_credits_data *data = (screen_credits_data *)d;
|
||||
|
||||
if(debug_mode) {
|
||||
uint32_t elapsed_sectors;
|
||||
sound_xa_get_elapsed_sectors(&elapsed_sectors);
|
||||
FntPrint(-1, "%-29s %4s %3d\n",
|
||||
GIT_COMMIT,
|
||||
GetVideoMode() == MODE_PAL ? "PAL" : "NTSC",
|
||||
get_frame_rate());
|
||||
FntPrint(-1, " %08u\n", elapsed_sectors);
|
||||
FntFlush(-1);
|
||||
}
|
||||
|
||||
// Get current text
|
||||
const char **window = &creditstxt[data->entry];
|
||||
if(*window != NULL) {
|
||||
|
|
|
@ -87,7 +87,7 @@ screen_levelselect_load()
|
|||
// to have any points. :)
|
||||
level_score_count = 0;
|
||||
|
||||
sound_play_xa("\\BGM\\MNU001.XA;1", 0, 0, 0); // 2600
|
||||
sound_play_xa("\\BGM\\MNU001.XA;1", 0, 0, 0);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -167,7 +167,7 @@ screen_levelselect_update(void *d)
|
|||
|
||||
uint32_t elapsed_sectors;
|
||||
sound_xa_get_elapsed_sectors(&elapsed_sectors);
|
||||
if(elapsed_sectors >= 2600) sound_stop_xa();
|
||||
if(elapsed_sectors >= 1550) sound_stop_xa();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -151,7 +151,7 @@ screen_title_update(void *d)
|
|||
|
||||
uint32_t elapsed_sectors;
|
||||
sound_xa_get_elapsed_sectors(&elapsed_sectors);
|
||||
if(elapsed_sectors >= 950) sound_stop_xa();
|
||||
if(elapsed_sectors >= 450) sound_stop_xa();
|
||||
|
||||
/* data->planet.rot.vz -= 24; */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue