Commit 2bb2fbd9 authored by Steven Fuller's avatar Steven Fuller

Removed DEMOSEXTERN

parent 220fe6fd
......@@ -21,3 +21,4 @@
code
* Have some sort of way of playing both digital and adlib sounds on all
platforms...
* Test with other (compatible) available mods
CC = gcc
#CFLAGS = -Wall -O6 -fomit-frame-pointer -mpentiumpro -mcpu=pentiumpro -march=pentiumpro -DUSEVGA
#CFLAGS = -O6 -fomit-frame-pointer -ffast-math -funroll-loops -mpentiumpro -mcpu=pentiumpro -march=pentiumpro
#CFLAGS = -g -Wall -pedantic
CFLAGS = -g
#CFLAGS = -g -Wall -DUSEVGA -DDEBUG
#CFLAGS = -g -DUSEVGA -DDEBUG
#CFLAGS = -g -pg -DDEBUG
OBJS = objs.o misc.o id_ca.o id_in.o id_sd.o id_vl.o id_vh.o id_us.o \
wl_scale.o wl_draw.o wl_act1.o wl_act2.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 \
......
Someone is actually reading the README...
<put links here>
http://rinkworks.com/apogee/s/2.4.5.shtml
http://www.3dportal.com/hideout/stuff/odd.html
http://www.maccentral.com/news/0001/24.wolf3d.shtml
General:
* inconsistancy:
id_ca.c has code for setting the data filenames' extension
so does wl_menu.c
......@@ -55,3 +56,12 @@ remove them
* implement fizzlefade, and get that last pixel!
* remove the time verification code (in wl_inter.c)
* fix wl_debug.c, lots of junk code..
* change the current parameter handling code to something like getopt
Specific:
* memory/sound intro screen goes
- trademarked images, only came with wolf3d 1.4's (I believe)
* japan code goes
- Unable to find, doubtful if released
* spanish code goes
- Unable to find, doubtful if released
......@@ -15,7 +15,6 @@
/* #define JAPAN */
/* #define JAPDEMO */
#define GOODTIMES
#define DEMOSEXTERN
#define UPLOAD
#elif WMODE == 1
......@@ -24,7 +23,6 @@
/* #define JAPAN */
/* #define JAPDEMO */
#define GOODTIMES
#define DEMOSEXTERN
/* #define UPLOAD */
#elif WMODE == 2
......@@ -33,7 +31,6 @@
/* #define JAPAN */
/* #define JAPDEMO */
#define GOODTIMES
#define DEMOSEXTERN
/* #define UPLOAD */
#elif WMODE == 3
......@@ -42,7 +39,6 @@
/* #define JAPAN */
/* #define JAPDEMO */
#define GOODTIMES
#define DEMOSEXTERN
/* #define UPLOAD */
/*
......
......@@ -878,7 +878,7 @@ void StartDemoRecord (int levelnumber)
==================
*/
char demoname[13] = "demo?.";
char demoname[13] = "demo?.dem";
void FinishDemoRecord (void)
{
......@@ -896,7 +896,7 @@ void FinishDemoRecord (void)
US_Print(" Demo number (0-9):");
VW_UpdateScreen();
if (US_LineInput (px,py,str,NULL,true,2,0))
if (US_LineInput(px,py,str,NULL,true,2,0))
{
level = atoi (str);
if (level>=0 && level<=9)
......@@ -922,7 +922,7 @@ void FinishDemoRecord (void)
==================
*/
void RecordDemo (void)
void RecordDemo(void)
{
int level,esc;
......@@ -954,6 +954,8 @@ void RecordDemo (void)
StartDemoRecord (level);
DrawPlayScreen ();
VW_UpdateScreen();
VW_FadeIn ();
startgame = false;
......@@ -986,12 +988,10 @@ void RecordDemo (void)
==================
*/
void PlayDemo (int demonumber)
void PlayDemo(int demonumber)
{
int length;
#ifdef DEMOSEXTERN
// debug: load chunk
#ifndef SPEARDEMO
int dems[4]={T_DEMO0,T_DEMO1,T_DEMO2,T_DEMO3};
#else
......@@ -1001,12 +1001,6 @@ void PlayDemo (int demonumber)
CA_CacheGrChunk(dems[demonumber]);
demoptr = grsegs[dems[demonumber]];
MM_SetLock (&grsegs[dems[demonumber]],true);
#else
demoname[4] = '0'+demonumber;
CA_LoadFile (demoname,&demobuffer);
MM_SetLock (&demobuffer,true);
demoptr = (char *)demobuffer;
#endif
NewGame (1,0);
gamestate.mapon = *demoptr++;
......@@ -1019,7 +1013,9 @@ void PlayDemo (int demonumber)
SETFONTCOLOR(0,15);
DrawPlayScreen ();
VW_FadeIn ();
VW_UpdateScreen(); /* force redraw */
VW_FadeIn();
startgame = false;
demoplayback = true;
......@@ -1030,11 +1026,7 @@ void PlayDemo (int demonumber)
PlayLoop ();
#ifdef DEMOSEXTERN
UNCACHEGRCHUNK(dems[demonumber]);
#else
MM_FreePtr (&demobuffer);
#endif
demoplayback = false;
......@@ -1043,6 +1035,49 @@ void PlayDemo (int demonumber)
ClearMemory ();
}
void PlayDemoFromFile(char *demoname)
{
int length;
CA_LoadFile(demoname, &demobuffer);
MM_SetLock(&demobuffer,true);
demoptr = (char *)demobuffer;
NewGame(1,0);
gamestate.mapon = *demoptr++;
gamestate.difficulty = gd_hard;
length = *((word *)demoptr)++;
demoptr++;
lastdemoptr = demoptr-4+length;
VW_FadeOut ();
SETFONTCOLOR(0,15);
DrawPlayScreen ();
VW_UpdateScreen(); /* force redraw */
VW_FadeIn ();
startgame = false;
demoplayback = true;
SetupGameLevel ();
StartMusic ();
fizzlein = true;
PlayLoop ();
MM_FreePtr(&demobuffer);
demoplayback = false;
StopMusic ();
VW_FadeOut ();
ClearMemory ();
IN_Ack();
}
//==========================================================================
/*
......
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