Commit 02cae373 authored by Steven Fuller's avatar Steven Fuller

Oops, meant #else instead of #elif. Documented version.h. Briefly tested

Spear of Destiny Demo.
parent 73be6e3d
* One binary, any game type. Store certain things in a new file?
...@@ -139,6 +139,6 @@ void PM_Startup(void), ...@@ -139,6 +139,6 @@ void PM_Startup(void),
memptr PM_GetPageAddress(int pagenum), memptr PM_GetPageAddress(int pagenum),
PM_GetPage(int pagenum); // Use this one to cache page PM_GetPage(int pagenum); // Use this one to cache page
#elif #else
#error "fix me TODO" #error "fix me TODO"
#endif #endif
...@@ -115,6 +115,6 @@ extern byte fontcolor,backcolor; ...@@ -115,6 +115,6 @@ extern byte fontcolor,backcolor;
#define SETFONTCOLOR(f,b) fontcolor=f;backcolor=b; #define SETFONTCOLOR(f,b) fontcolor=f;backcolor=b;
#elif #else
#error "fix me: TODO" #error "fix me: TODO"
#endif #endif
...@@ -167,6 +167,6 @@ void INL_GetJoyDelta(word joy,int *dx,int *dy); ...@@ -167,6 +167,6 @@ void INL_GetJoyDelta(word joy,int *dx,int *dy);
void IN_StartAck(void); void IN_StartAck(void);
boolean IN_CheckAck (void); boolean IN_CheckAck (void);
#elif #else
#error "fix me TODO" #error "fix me TODO"
#endif #endif
...@@ -19,55 +19,12 @@ typedef struct ...@@ -19,55 +19,12 @@ typedef struct
word priority; word priority;
} SoundCommon; } SoundCommon;
// PC Sound stuff
#define pcTimer 0x42
#define pcTAccess 0x43
#define pcSpeaker 0x61
#define pcSpkBits 3
typedef struct typedef struct
{ {
SoundCommon common; SoundCommon common;
byte data[1]; byte data[1];
} PCSound; } PCSound;
// Registers for the Sound Blaster card - needs to be offset by n0 (0x10,0x20,0x30,0x40,0x50,0x60)
#define sbReset 0x206 // W
#define sbFMStatus 0x208 // R
#define sbFMAddr 0x208 // W
#define sbFMData 0x209 // W
#define sbReadData 0x20a // R
#define sbWriteCmd 0x20c // W
#define sbWriteData 0x20c // W
#define sbWriteStat 0x20c // R
#define sbDataAvail 0x20e // R
// Registers for the Sound Blaster Pro card - needs to be offset by n0 (0x20 or 0x40)
#define sbpLFMStatus 0x200 // R
#define sbpLFMAddr 0x200 // W
#define sbpLFMData 0x201 // W
#define sbpRFMStatus 0x202 // R
#define sbpRFMAddr 0x202 // W
#define sbpRFMData 0x203 // W
#define sbpMixerAddr 0x204 // W
#define sbpMixerData 0x205 // RW
#define sbpCDData 0x210 // R
#define sbpCDCommand 0x210 // W
#define sbpCDStatus 0x211 // R
#define sbpCDReset 0x212 // W
// SBPro Mixer addresses
#define sbpmReset 0x00
#define sbpmVoiceVol 0x04
#define sbpmMicMix 0x0a
#define sbpmFilterADC 0x0c
#define sbpmControl 0x0e
#define sbpmMasterVol 0x22
#define sbpmFMVol 0x26
#define sbpmCDVol 0x28
#define sbpmLineVol 0x2e
typedef struct typedef struct
{ {
SoundCommon common; SoundCommon common;
...@@ -77,25 +34,6 @@ typedef struct ...@@ -77,25 +34,6 @@ typedef struct
data[1]; data[1];
} SampledSound; } SampledSound;
// Registers for the AdLib card
#define alFMStatus 0x388 // R
#define alFMAddr 0x388 // W
#define alFMData 0x389 // W
// Register addresses
// Operator stuff
#define alChar 0x20
#define alScale 0x40
#define alAttack 0x60
#define alSus 0x80
#define alWave 0xe0
// Channel stuff
#define alFreqL 0xa0
#define alFreqH 0xb0
#define alFeedCon 0xc0
// Global stuff
#define alEffects 0xbd
typedef struct typedef struct
{ {
byte mChar,cChar, byte mChar,cChar,
...@@ -201,6 +139,6 @@ extern void SD_SetDigiDevice(SDSMode), ...@@ -201,6 +139,6 @@ extern void SD_SetDigiDevice(SDSMode),
SD_StopDigitized(void), SD_StopDigitized(void),
SD_Poll(void); SD_Poll(void);
#elif #else
#error "fix me TODO" #error "fix me TODO"
#endif #endif
...@@ -55,6 +55,6 @@ int US_CheckParm(char *parm,char **strings), ...@@ -55,6 +55,6 @@ int US_CheckParm(char *parm,char **strings),
void USL_PrintInCenter(char *s,Rect r); void USL_PrintInCenter(char *s,Rect r);
#elif #else
#error "fix me: TODO" #error "fix me: TODO"
#endif #endif
...@@ -68,6 +68,6 @@ boolean FizzleFade(byte *source, unsigned width,unsigned height, unsigned frames ...@@ -68,6 +68,6 @@ boolean FizzleFade(byte *source, unsigned width,unsigned height, unsigned frames
extern unsigned latchpics[NUMLATCHPICS]; extern unsigned latchpics[NUMLATCHPICS];
extern unsigned freelatch; extern unsigned freelatch;
#elif #else
#error "fix me: TODO" #error "fix me: TODO"
#endif #endif
...@@ -35,6 +35,6 @@ void VL_MemToScreen(byte *source, int width, int height, int x, int y); ...@@ -35,6 +35,6 @@ void VL_MemToScreen(byte *source, int width, int height, int x, int y);
void VL_DeModeXize(byte *buf, int width, int height); void VL_DeModeXize(byte *buf, int width, int height);
#elif #else
#error "fix me: TODO" #error "fix me: TODO"
#endif #endif
...@@ -13,6 +13,6 @@ char *itoa(short int value, char *string, int radix); ...@@ -13,6 +13,6 @@ char *itoa(short int value, char *string, int radix);
char *ltoa(long value, char *string, int radix); char *ltoa(long value, char *string, int radix);
char *ultoa(unsigned long value, char *string, int radix); char *ultoa(unsigned long value, char *string, int radix);
#elif #else
#error "fix me TODO" #error "fix me TODO"
#endif #endif
#ifndef __VERSION_H__ #ifndef __VERSION_H__
#define __VERSION_H__ #define __VERSION_H__
/* WL1 = 0 */
/* WL6 = 1 */
/* SDM = 2 */
/* SOD = 3 */
#define WMODE 1
#if WMODE == 0
/* #define SPEAR */
/* #define SPEARDEMO */
/* #define JAPAN */
#define GOODTIMES
#define DEMOSEXTERN
#define UPLOAD
#error "wl1 does not work yet"
#elif WMODE == 1
/* #define SPEAR */ /* #define SPEAR */
/* #define SPEARDEMO */ /* #define SPEARDEMO */
/* #define JAPAN */ /* #define JAPAN */
...@@ -8,6 +24,26 @@ ...@@ -8,6 +24,26 @@
#define DEMOSEXTERN #define DEMOSEXTERN
/* #define UPLOAD */ /* #define UPLOAD */
#elif #elif WMODE == 2
#define SPEAR
#define SPEARDEMO
/* #define JAPAN */
#define GOODTIMES
#define DEMOSEXTERN
/* #define UPLOAD */
#elif WMODE == 3
#define SPEAR
/* #define SPEARDEMO */
/* #define JAPAN */
#define GOODTIMES
#define DEMOSEXTERN
/* #define UPLOAD */
#else
#error "please edit version.h and fix WMODE"
#endif
#else
#error "fix me: TODO" #error "fix me: TODO"
#endif #endif
...@@ -1952,7 +1952,7 @@ moveok: ...@@ -1952,7 +1952,7 @@ moveok:
for (y=yl ; y<=yh ; y++) for (y=yl ; y<=yh ; y++)
for (x=xl ; x<=xh ; x++) for (x=xl ; x<=xh ; x++)
{ {
tile = actorat[x][y]; tile = (unsigned)actorat[x][y];
if (!tile) if (!tile)
continue; continue;
if (tile<256) if (tile<256)
......
...@@ -1170,6 +1170,6 @@ void SpawnHitler (int tilex, int tiley); ...@@ -1170,6 +1170,6 @@ void SpawnHitler (int tilex, int tiley);
extern void HelpScreens(void); extern void HelpScreens(void);
extern void EndText(void); extern void EndText(void);
#elif #else
#error "fix me TODO" #error "fix me TODO"
#endif #endif
...@@ -1237,9 +1237,9 @@ startplayloop: ...@@ -1237,9 +1237,9 @@ startplayloop:
SD_PlaySound(GETSPEARSND); SD_PlaySound(GETSPEARSND);
if (DigiMode != sds_Off) if (DigiMode != sds_Off)
{ {
long lasttimecount = TimeCount; long lasttimecount = get_TimeCount();
while(TimeCount < lasttimecount+150) while(get_TimeCount() < lasttimecount+150)
//while(DigiPlaying!=false) //while(DigiPlaying!=false)
SD_Poll(); SD_Poll();
} }
...@@ -1292,7 +1292,7 @@ startplayloop: ...@@ -1292,7 +1292,7 @@ startplayloop:
CheckHighScore (gamestate.score,gamestate.mapon+1); CheckHighScore (gamestate.score,gamestate.mapon+1);
#ifndef JAPAN #ifndef JAPAN
_fstrcpy(MainMenu[viewscores].string,STR_VS); strcpy(MainMenu[viewscores].string,STR_VS);
#endif #endif
MainMenu[viewscores].routine = CP_ViewScores; MainMenu[viewscores].routine = CP_ViewScores;
......
...@@ -1264,7 +1264,6 @@ void DemoLoop (void) ...@@ -1264,7 +1264,6 @@ void DemoLoop (void)
// main game cycle // main game cycle
// //
#ifndef UPLOAD #ifndef UPLOAD
#ifndef GOODTIMES #ifndef GOODTIMES
......
...@@ -472,7 +472,7 @@ void US_ControlPanel(byte scancode) ...@@ -472,7 +472,7 @@ void US_ControlPanel(byte scancode)
if (SoundMode != sdm_Off) if (SoundMode != sdm_Off)
for (i=0;i<NUMSOUNDS;i++,start++) for (i=0;i<NUMSOUNDS;i++,start++)
if (audiosegs[start]) if (audiosegs[start])
MM_SetPurge (&(memptr)audiosegs[start],3); // make purgable MM_SetPurge ((memptr)&audiosegs[start],3); // make purgable
} }
#endif #endif
...@@ -610,9 +610,7 @@ void CP_ReadThis(void) ...@@ -610,9 +610,7 @@ void CP_ReadThis(void)
#endif #endif
#endif #endif
#ifndef SPEAR #if defined(SPEAR) || defined(GOODTIMES)
#ifndef GOODTIMES
#else
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// //
// BOSS KEY // BOSS KEY
...@@ -622,7 +620,6 @@ void BossKey(void) ...@@ -622,7 +620,6 @@ void BossKey(void)
{ {
} }
#endif #endif
#endif
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// //
......
...@@ -24,8 +24,9 @@ TEXT FORMATTING COMMANDS ...@@ -24,8 +24,9 @@ TEXT FORMATTING COMMANDS
============================================================================= =============================================================================
*/ */
#define BACKCOLOR 0x11 #ifndef SPEAR
#define BACKCOLOR 0x11
#define WORDLIMIT 80 #define WORDLIMIT 80
#define FONTHEIGHT 10 #define FONTHEIGHT 10
...@@ -747,7 +748,6 @@ int helpextern = T_HELPART; ...@@ -747,7 +748,6 @@ int helpextern = T_HELPART;
= =
================= =================
*/ */
#ifndef SPEAR
void HelpScreens (void) void HelpScreens (void)
{ {
int artnum; int artnum;
...@@ -781,7 +781,6 @@ void HelpScreens (void) ...@@ -781,7 +781,6 @@ void HelpScreens (void)
MM_SortMem (); MM_SortMem ();
#endif #endif
} }
#endif
// //
// END ARTICLES // END ARTICLES
...@@ -828,3 +827,5 @@ void EndText (void) ...@@ -828,3 +827,5 @@ void EndText (void)
MM_SortMem (); MM_SortMem ();
#endif #endif
} }
#endif
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