Commit b76bc11f authored by Steven Fuller's avatar Steven Fuller

sd_comm.c, wl_main.c: Moved InitDigiList to its own file.

wl_inter.c, id_ca.c: Removed PM_Preload, PreloadGraphics can do it itself.

id_ca.c: Added a PM_FreePage

sd_oal.c: Working OpenAL implementation. (no adlib sound yet)
parent 04cd0215
......@@ -10,7 +10,7 @@ CFLAGS = -g -Wall -pedantic
OBJS = objs.o misc.o id_ca.o id_vh.o id_us.o \
wl_act1.o wl_act2.o wl_act3.o wl_agent.o wl_game.o \
wl_inter.o wl_menu.o wl_play.o wl_state.o wl_text.o wl_main.o \
wl_debug.o vi_comm.o
wl_debug.o vi_comm.o sd_comm.o
ROBJS = wl_draw.o
SOBJS = $(OBJS) $(ROBJS) vi_svga.o
XOBJS = $(OBJS) $(ROBJS) vi_xlib.o
......@@ -23,8 +23,10 @@ OBJS += sd_null.o
#CFLAGS += -D_REENTRANT
#LFLAGS += -lpthread
#OBJS += sd_oal.o
#CFLAGS += -D_REENTRANT
#LFLAGS += -lpthread #-lopenal
#CFLAGS += -D_REENTRANT -I/home/relnev/cvs/oal/include/
#LFLAGS += -lpthread -ldl -L/home/relnev/cvs/oal/linux/src/ -lopenal # /home/relnev/cvs/oal/linux/src/libopenal.a
#LFLAGS += -lpthread /home/relnev/ElectricFence-2.2.2/libefence.a
CFLAGS += `sdl-config --cflags`
......
......@@ -6,7 +6,7 @@ Just some random facts/thoughts/ideas/musings:
- SNES
- Macintosh
- Jaguar
- Apple IIGS [http://www.sheppyware.com/products/a2/wolf3d/]
- Apple IIGS: http://www.sheppyware.com/products/a2/wolf3d/
- 3DO
* Rumored/Never Released?
......@@ -18,10 +18,12 @@ Just some random facts/thoughts/ideas/musings:
* Unofficial ports:
- Linux (this, xwolf, wolfgl)
XWolf: http://www.sirius.demon.co.uk/xwolf/
XWolf: http://www.sirius.demon.co.uk/xwolf/
- Amiga (port of my first pc wolf3d linux port)
[http://www.silab.dsi.unimi.it/~cs556770/wolf3d/]
- Windows (wolfgl) [http://www.sourceforge.net/projects/wolfgl/]
http://www.silab.dsi.unimi.it/~cs556770/wolf3d/
- Windows
WolfGL: http://www.sourceforge.net/projects/wolfgl/
Wolf DX: http://www.phoebe.co.uk/glwolf/
- Acorn/Archemedes
* PC source released August(?) ??, 1995:
......@@ -32,10 +34,10 @@ Just some random facts/thoughts/ideas/musings:
- http://www.wolf3dmansion.com/index.phtml
* Macintosh source released January 21, 2000
- http://www.maccentral.com/news/0001/24.wolf3d.shtml
* TED5 source (editor used for tons of games including wolf3d)
* TED5 source (map editor used for tons of games including wolf3d)
- ftp://ftp.3drealms.com/misc/ted5.zip
* Games which used the Wolfenstein 3D Engine:
- Blake Stone
- Blake Stone (Aliens of Gold, Planet Strike)
- Corridor 7
- Operation Body Count
......
......@@ -31,6 +31,9 @@ B I - add mouse support
B M - add joystick/gamepad support
P I - fill in the new fizzlefade function
P I - add sound "emulation" to the necessary targets so WaitSoundDone works
B R - autoconf/automake
P R - change boolean SD_PlaySound to void SD_PlaySound
P M - position pushwall sounds
Complete:
P I - fix or remove fizzle fade
......
......@@ -833,15 +833,20 @@ memptr PM_GetPage(int pagenum)
return page->addr;
}
void PM_Preload(boolean (*update)(int current, int total))
void PM_FreePage(int pagenum)
{
int i;
PageListStruct *page;
if (pagenum >= ChunksInFile)
Quit("PM_FreePage: Invalid page request");
for (i = 0; i < 50; i++)
update(i, 50); /* yay */
update(50, 50);
page = &PMPages[pagenum];
if (page->addr != NULL) {
MM_FreePtr((memptr)&page->addr);
page->addr = NULL;
}
}
void PM_Startup()
{
if (PMStarted)
......
......@@ -72,11 +72,10 @@ extern PageListStruct *PMPages;
#define PM_GetSoundPage(v) PM_GetPage(PMSoundStart + (v))
#define PM_GetSpritePage(v) PM_GetPage(PMSpriteStart + (v))
memptr PM_GetPage(int pagenum);
void PM_FreePage(int pagenum);
void PM_Startup();
void PM_Shutdown();
void PM_Preload(boolean (*update)(int current, int total));
memptr PM_GetPage(int pagenum);
#endif
#include "wl_def.h"
/*
=====================
=
= InitDigiMap
=
=====================
*/
int DigiMap[LASTSOUND];
static int wolfdigimap[] =
{
#ifndef SPEAR
HALTSND, 0,
DOGBARKSND, 1,
CLOSEDOORSND, 2,
OPENDOORSND, 3,
ATKMACHINEGUNSND, 4,
ATKPISTOLSND, 5,
ATKGATLINGSND, 6,
SCHUTZADSND, 7,
GUTENTAGSND, 8,
MUTTISND, 9,
BOSSFIRESND, 10,
SSFIRESND, 11,
DEATHSCREAM1SND, 12,
DEATHSCREAM2SND, 13,
DEATHSCREAM3SND, 13,
TAKEDAMAGESND, 14,
PUSHWALLSND, 15,
LEBENSND, 20,
NAZIFIRESND, 21,
SLURPIESND, 22,
YEAHSND, 32,
#ifndef UPLOAD
DOGDEATHSND, 16,
AHHHGSND, 17,
DIESND, 18,
EVASND, 19,
TOT_HUNDSND, 23,
MEINGOTTSND, 24,
SCHABBSHASND, 25,
HITLERHASND, 26,
SPIONSND, 27,
NEINSOVASSND, 28,
DOGATTACKSND, 29,
LEVELDONESND, 30,
MECHSTEPSND, 31,
SCHEISTSND, 33,
DEATHSCREAM4SND, 34, /* AIIEEE */
DEATHSCREAM5SND, 35, /* DEE-DEE */
DONNERSND, 36, /* EPISODE 4 BOSS DIE */
EINESND, 37, /* EPISODE 4 BOSS SIGHTING */
ERLAUBENSND, 38, /* EPISODE 6 BOSS SIGHTING */
DEATHSCREAM6SND, 39, /* FART */
DEATHSCREAM7SND, 40, /* GASP */
DEATHSCREAM8SND, 41, /* GUH-BOY! */
DEATHSCREAM9SND, 42, /* AH GEEZ! */
KEINSND, 43, /* EPISODE 5 BOSS SIGHTING */
MEINSND, 44, /* EPISODE 6 BOSS DIE */
ROSESND, 45, /* EPISODE 5 BOSS DIE */
#endif
#else /* SPEAR OF DESTINY DIGISOUNDS */
HALTSND, 0,
CLOSEDOORSND, 2,
OPENDOORSND, 3,
ATKMACHINEGUNSND, 4,
ATKPISTOLSND, 5,
ATKGATLINGSND, 6,
SCHUTZADSND, 7,
BOSSFIRESND, 8,
SSFIRESND, 9,
DEATHSCREAM1SND, 10,
DEATHSCREAM2SND, 11,
TAKEDAMAGESND, 12,
PUSHWALLSND, 13,
AHHHGSND, 15,
LEBENSND, 16,
NAZIFIRESND, 17,
SLURPIESND, 18,
LEVELDONESND, 22,
DEATHSCREAM4SND, 23, // AIIEEE
DEATHSCREAM3SND, 23, // DOUBLY-MAPPED!!!
DEATHSCREAM5SND, 24, // DEE-DEE
DEATHSCREAM6SND, 25, // FART
DEATHSCREAM7SND, 26, // GASP
DEATHSCREAM8SND, 27, // GUH-BOY!
DEATHSCREAM9SND, 28, // AH GEEZ!
GETGATLINGSND, 38, // Got Gat replacement
#ifndef SPEARDEMO
DOGBARKSND, 1,
DOGDEATHSND, 14,
SPIONSND, 19,
NEINSOVASSND, 20,
DOGATTACKSND, 21,
TRANSSIGHTSND, 29, // Trans Sight
TRANSDEATHSND, 30, // Trans Death
WILHELMSIGHTSND, 31, // Wilhelm Sight
WILHELMDEATHSND, 32, // Wilhelm Death
UBERDEATHSND, 33, // Uber Death
KNIGHTSIGHTSND, 34, // Death Knight Sight
KNIGHTDEATHSND, 35, // Death Knight Death
ANGELSIGHTSND, 36, // Angel Sight
ANGELDEATHSND, 37, // Angel Death
GETSPEARSND, 39, // Got Spear replacement
#endif
#endif
LASTSOUND
};
void InitDigiMap()
{
int *map, i;
for (i = 0; i < LASTSOUND; i++)
DigiMap[i] = -1;
for (map = wolfdigimap; *map != LASTSOUND; map += 2)
DigiMap[map[0]] = map[1];
}
......@@ -45,7 +45,7 @@ extern boolean AdLibPresent, SoundBlasterPresent;
extern SDMode SoundMode;
extern SDSMode DigiMode;
extern SMMode MusicMode;
extern int DigiMap[];
extern void SD_Startup();
extern void SD_Shutdown();
......@@ -58,15 +58,18 @@ extern void SD_StopSound(),
SD_MusicOff(),
SD_FadeOutMusic();
extern boolean SD_MusicPlaying(),
SD_SetSoundMode(SDMode mode),
SD_SetMusicMode(SMMode mode);
extern word SD_SoundPlaying();
extern boolean SD_MusicPlaying(), SD_SetSoundMode(SDMode mode),
SD_SetMusicMode(SMMode mode);
extern word SD_SoundPlaying();
extern void SD_SetDigiDevice(SDSMode);
extern void SD_Poll();
void PlaySoundLocGlobal(word s, int id, fixed gx, fixed gy);
void UpdateSoundLoc(fixed x, fixed y, int angle);
extern int DigiMap[];
void InitDigiMap();
#endif
......@@ -5,17 +5,11 @@ boolean AdLibPresent, SoundBlasterPresent;
SDMode SoundMode, MusicMode;
SDSMode DigiMode;
int DigiMap[LASTSOUND];
static boolean SD_Started;
static boolean sqActive;
void SD_Poll()
{
}
void SD_SetDigiDevice(SDSMode mode)
{
}
......@@ -49,6 +43,8 @@ void SD_Startup()
{
if (SD_Started)
return;
InitDigiMap();
}
///////////////////////////////////////////////////////////////////////////
......
This diff is collapsed.
......@@ -19,8 +19,6 @@ static int leftchannel, rightchannel;
static volatile boolean SoundPositioned;
int DigiMap[LASTSOUND];
static word *DigiList;
static volatile boolean SD_Started;
......@@ -258,15 +256,13 @@ void SD_Startup()
{
audio_buf_info info;
int want, set;
int i;
if (SD_Started)
return;
Blah();
for (i = 0; i < LASTSOUND; i++)
DigiMap[i] = -1;
InitDigiMap();
OPL = OPLCreate(OPL_TYPE_YM3812, 3579545, 44100);
......@@ -573,6 +569,8 @@ void SD_MusicOff()
///////////////////////////////////////////////////////////////////////////
void SD_StartMusic(int music)
{
CA_CacheAudioChunk(music);
SD_MusicOff();
SD_MusicOn();
Music = (MusicGroup *)audiosegs[music];
......@@ -601,10 +599,6 @@ boolean SD_MusicPlaying()
return sqActive;
}
void SD_Poll()
{
}
void SD_SetDigiDevice(SDSMode mode)
{
}
......
......@@ -87,8 +87,8 @@ void VL_Startup()
//if (gfxbuf == NULL)
// gfxbuf = malloc(vwidth * vheight * 1);
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
/* TODO: renable parachute for release version? */
if (SDL_Init(SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE) < 0) {
Quit("Couldn't init SDL");
}
......
......@@ -45,12 +45,11 @@ extern int vwidth, vheight; /* size of screen */
#define PLAYERSIZE MINDIST /* player radius */
#define MINACTORDIST 0x10000 /* minimum dist from player center */
/* to any actor center */
#define GLOBAL1 0x10000
#define TILESHIFT 16
#define UNSIGNEDSHIFT (TILESHIFT-8)
#define GLOBAL1 (1<<TILESHIFT)
#define TILEGLOBAL GLOBAL1
#define VIEWGLOBAL GLOBAL1
#define TILESHIFT 16
#define UNSIGNEDSHIFT 8
#define ANGLES 360 /* must be divisible by 4 */
#define ANGLEQUAD (ANGLES/4)
......@@ -741,7 +740,7 @@ void DrawPlayBorder();
void DrawPlayBorderSides();
void DrawStatusBar();
#define PlaySoundLocTile(s,tx,ty) PlaySoundLocGlobal(s,(int)((tx<<6)|(ty)),(((long)(tx) << TILESHIFT) + (1L << (TILESHIFT - 1))),(((long)ty << TILESHIFT) + (1L << (TILESHIFT - 1))))
#define PlaySoundLocTile(s,tx,ty) PlaySoundLocGlobal(s,(int)((tx<<6)|(ty)), (tx << TILESHIFT) + (1 << (TILESHIFT - 1)), (ty << TILESHIFT) + (1L << (TILESHIFT - 1)))
#define PlaySoundLocActor(s,ob) PlaySoundLocGlobal(s,(int)ob,(ob)->x,(ob)->y)
/*
......
......@@ -1041,18 +1041,15 @@ static void HitVertPWall()
#define DEG270 2700
#define DEG360 3600
#define xpartialbyystep() FixedByFrac(xpartial, ystep)
#define ypartialbyxstep() FixedByFrac(ypartial, xstep)
static int samex(int intercept, int tile)
{
if (xtilestep > 0) {
if ((intercept>>16) >= tile)
if ((intercept>>TILESHIFT) >= tile)
return 0;
else
return 1;
} else {
if ((intercept>>16) <= tile)
if ((intercept>>TILESHIFT) <= tile)
return 0;
else
return 1;
......@@ -1062,12 +1059,12 @@ static int samex(int intercept, int tile)
static int samey(int intercept, int tile)
{
if (ytilestep > 0) {
if ((intercept>>16) >= tile)
if ((intercept>>TILESHIFT) >= tile)
return 0;
else
return 1;
} else {
if ((intercept>>16) <= tile)
if ((intercept>>TILESHIFT) <= tile)
return 0;
else
return 1;
......@@ -1139,16 +1136,15 @@ for (postx = 0; postx < viewwidth; postx++) {
goto entry90;
}
/* add tilestep to fix raycasting problems? */
yintercept = viewy + xpartialbyystep(); // + xtilestep;
yintercept = viewy + FixedByFrac(xpartial, ystep); // + xtilestep;
xtile = focaltx + xtilestep;
xintercept = viewx + ypartialbyxstep(); // + ytilestep;
xintercept = viewx + FixedByFrac(ypartial, xstep); // + ytilestep;
ytile = focalty + ytilestep;
/* CORE LOOP */
#define TILE(n) ((n)>>16)
#define TILE(n) ((n)>>TILESHIFT)
/* check intersections with vertical walls */
vertcheck:
......@@ -1169,7 +1165,7 @@ vertentry:
goto passvert;
yintercept = doorhit;
xintercept = xtile << 16;
xintercept = xtile << TILESHIFT;
HitVertPWall();
} else {
/* vertdoor */
......@@ -1183,11 +1179,11 @@ vertentry:
goto passvert;
yintercept = doorhit;
xintercept = (xtile << 16) + 32768;
xintercept = (xtile << TILESHIFT) + TILEGLOBAL/2;
HitVertDoor();
}
} else {
xintercept = xtile << 16;
xintercept = xtile << TILESHIFT;
HitVertWall();
}
continue;
......@@ -1218,7 +1214,7 @@ horizentry:
goto passhoriz;
xintercept = doorhit;
yintercept = ytile << 16;
yintercept = ytile << TILESHIFT;
HitHorizPWall();
} else {
doorhit = xintercept + xstep / 2;
......@@ -1231,11 +1227,11 @@ horizentry:
goto passhoriz;
xintercept = doorhit;
yintercept = (ytile << 16) + 32768;
yintercept = (ytile << TILESHIFT) + TILEGLOBAL/2;
HitHorizDoor();
}
} else {
yintercept = ytile << 16;
yintercept = ytile << TILESHIFT;
HitHorizWall();
}
continue;
......
......@@ -1072,15 +1072,11 @@ startplayloop:
SD_StopSound();
SD_PlaySound(GETSPEARSND);
if (DigiMode != sds_Off)
{
if (DigiMode == sds_Off) {
long lasttimecount = get_TimeCount();
while(get_TimeCount() < (lasttimecount+150))
//while(SD_SoundPlaying()!=false)
SD_Poll();
}
else
while(get_TimeCount() < (lasttimecount+150)) ;
} else
SD_WaitSoundDone();
ClearMemory ();
......
......@@ -17,7 +17,7 @@ void ClearSplitVWB()
}
//==========================================================================
/* ======================================================================== */
#if defined(SPEAR) && !defined(SPEARDEMO)
////////////////////////////////////////////////////////
......@@ -90,7 +90,7 @@ void EndSpear()
}
#endif
//==========================================================================
/* ======================================================================== */
/*
==================
......@@ -236,11 +236,10 @@ void Victory()
EndSpear();
#endif
#endif // SPEARDEMO
#endif /* SPEARDEMO */
}
//==========================================================================
/* ======================================================================== */
/*
==================
......@@ -331,7 +330,7 @@ void Write(int x,int y,char *string)
//
// Breathe Mr. BJ!!!
//
void BJ_Breathe(void)
void BJ_Breathe()
{
static int which=0,max=10;
int pics[2]={L_GUYPIC,L_GUY2PIC};
......@@ -851,8 +850,6 @@ void LevelCompleted()
=
= PreloadGraphics
=
= Fill the cache up
=
=================
*/
......@@ -873,6 +870,8 @@ boolean PreloadUpdate(int current, int total)
void PreloadGraphics()
{
int i;
DrawLevel();
ClearSplitVWB();
......@@ -887,7 +886,10 @@ void PreloadGraphics()
VW_UpdateScreen();
VW_FadeIn();
PM_Preload(PreloadUpdate);
for (i = 0; i <= 40; i++)
PreloadUpdate(i, 50);
PreloadUpdate(50, 50);
IN_UserInput(70);
VW_FadeOut();
......
......@@ -60,7 +60,7 @@ fixed FixedByFrac(fixed a, fixed b)
int64_t r;
r = ra * rb;
r >>= 16;
r >>= TILESHIFT;
return (fixed)r;
}
......@@ -745,126 +745,6 @@ int MS_CheckParm(char *check)
return 0;
}
//===========================================================================
/*
=====================
=
= InitDigiMap
=
=====================
*/
static int wolfdigimap[] =
{
#ifndef SPEAR
HALTSND, 0,
DOGBARKSND, 1,
CLOSEDOORSND, 2,
OPENDOORSND, 3,
ATKMACHINEGUNSND, 4,
ATKPISTOLSND, 5,
ATKGATLINGSND, 6,
SCHUTZADSND, 7,
GUTENTAGSND, 8,
MUTTISND, 9,
BOSSFIRESND, 10,
SSFIRESND, 11,
DEATHSCREAM1SND, 12,
DEATHSCREAM2SND, 13,
DEATHSCREAM3SND, 13,
TAKEDAMAGESND, 14,
PUSHWALLSND, 15,
LEBENSND, 20,
NAZIFIRESND, 21,
SLURPIESND, 22,
YEAHSND, 32,
#ifndef UPLOAD
DOGDEATHSND, 16,
AHHHGSND, 17,
DIESND, 18,
EVASND, 19,
TOT_HUNDSND, 23,
MEINGOTTSND, 24,
SCHABBSHASND, 25,
HITLERHASND, 26,
SPIONSND, 27,
NEINSOVASSND, 28,
DOGATTACKSND, 29,
LEVELDONESND, 30,
MECHSTEPSND, 31,
SCHEISTSND, 33,
DEATHSCREAM4SND, 34, // AIIEEE
DEATHSCREAM5SND, 35, // DEE-DEE
DONNERSND, 36, // EPISODE 4 BOSS DIE
EINESND, 37, // EPISODE 4 BOSS SIGHTING
ERLAUBENSND, 38, // EPISODE 6 BOSS SIGHTING
DEATHSCREAM6SND, 39, // FART
DEATHSCREAM7SND, 40, // GASP
DEATHSCREAM8SND, 41, // GUH-BOY!
DEATHSCREAM9SND, 42, // AH GEEZ!
KEINSND, 43, // EPISODE 5 BOSS SIGHTING
MEINSND, 44, // EPISODE 6 BOSS DIE
ROSESND, 45, // EPISODE 5 BOSS DIE
#endif
#else /* SPEAR OF DESTINY DIGISOUNDS */
HALTSND, 0,
CLOSEDOORSND, 2,
OPENDOORSND, 3,
ATKMACHINEGUNSND, 4,
ATKPISTOLSND, 5,
ATKGATLINGSND, 6,
SCHUTZADSND, 7,
BOSSFIRESND, 8,
SSFIRESND, 9,
DEATHSCREAM1SND, 10,
DEATHSCREAM2SND, 11,
TAKEDAMAGESND, 12,
PUSHWALLSND, 13,
AHHHGSND, 15,
LEBENSND, 16,
NAZIFIRESND, 17,
SLURPIESND, 18,
LEVELDONESND, 22,
DEATHSCREAM4SND, 23, // AIIEEE
DEATHSCREAM3SND, 23, // DOUBLY-MAPPED!!!
DEATHSCREAM5SND, 24, // DEE-DEE
DEATHSCREAM6SND, 25, // FART
DEATHSCREAM7SND, 26, // GASP
DEATHSCREAM8SND, 27, // GUH-BOY!
DEATHSCREAM9SND, 28, // AH GEEZ!
GETGATLINGSND, 38, // Got Gat replacement
#ifndef SPEARDEMO
DOGBARKSND, 1,
DOGDEATHSND, 14,
SPIONSND, 19,
NEINSOVASSND, 20,
DOGATTACKSND, 21,
TRANSSIGHTSND, 29, // Trans Sight
TRANSDEATHSND, 30, // Trans Death
WILHELMSIGHTSND, 31, // Wilhelm Sight
WILHELMDEATHSND, 32, // Wilhelm Death
UBERDEATHSND, 33, // Uber Death
KNIGHTSIGHTSND, 34, // Death Knight Sight
KNIGHTDEATHSND, 35, // Death Knight Death
ANGELSIGHTSND, 36, // Angel Sight
ANGELDEATHSND, 37, // Angel Death
GETSPEARSND, 39, // Got Spear replacement
#endif
#endif
LASTSOUND
};
void InitDigiMap()
{
int *map;
for (map = wolfdigimap; *map != LASTSOUND; map += 2)
DigiMap[map[0]] = map[1];
}
/* ======================================================================== */
/*
......@@ -1217,7 +1097,6 @@ void InitGame()
//
// build some tables
//
InitDigiMap();
for (i = 0;i < MAPSIZE; i++)
{
......
......@@ -369,34 +369,6 @@ void US_ControlPanel(byte scancode)
break;
case backtodemo:
#ifdef SPEAR
/* TODO: why was this added for spear only? */
if (!ingame)
{
int start, i;
//
// DEALLOCATE ALL SOUNDS!
//
switch (SoundMode)
{
case sdm_PC:
start = STARTPCSOUNDS;
break;
case sdm_AdLib:
start = STARTADLIBSOUNDS;
break;
default:
start = 0;
break;
}
if (SoundMode != sdm_Off)
for (i=0;i<NUMSOUNDS;i++,start++)
if (audiosegs[start])
MM_SetPurge ((memptr)&audiosegs[start],3); // make purgable
}
#endif
MM_SortMem();
StartGame=1;
if (!ingame)
......@@ -439,7 +411,7 @@ void US_ControlPanel(byte scancode)
// RETURN/START GAME EXECUTION
#ifdef SPEAR
UnCacheLump (OPTIONS_LUMP_START,OPTIONS_LUMP_END);
UnCacheLump(OPTIONS_LUMP_START, OPTIONS_LUMP_END);
MM_SortMem();
#endif
}
......@@ -3177,18 +3149,12 @@ void StartCPMusic(int song)
lastmusic = song;
CA_CacheAudioChunk(STARTMUSIC + song);
SD_StartMusic(STARTMUSIC + song);
}
void FreeMusic()
{
SD_MusicOff();
if (lastmusic >= 0) {
CA_UnCacheAudioChunk(STARTMUSIC + lastmusic);
lastmusic = -1;
}
}
///////////////////////////////////////////////////////////////////////////
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment