Commit b2cc1455 authored by Steven Fuller's avatar Steven Fuller

Compiled, linked, now to make it work!

parent 40ed398f
...@@ -4,3 +4,6 @@ so does wl_menu.c ...@@ -4,3 +4,6 @@ so does wl_menu.c
* would it not make sense to remove bufferseg from id_ca.c? * would it not make sense to remove bufferseg from id_ca.c?
* menu code is a mess, always does things differently than the rest of the * menu code is a mess, always does things differently than the rest of the
code, it really needs to be cleaned up code, it really needs to be cleaned up
* id_ca.c cache code: nice idea but messy and maybe can be fixed
in an effort to not allocate everything to memory and forget about it
* remove virtualreality
...@@ -41,8 +41,6 @@ void *grsegs[NUMCHUNKS]; ...@@ -41,8 +41,6 @@ void *grsegs[NUMCHUNKS];
byte grneeded[NUMCHUNKS]; byte grneeded[NUMCHUNKS];
byte ca_levelbit,ca_levelnum; byte ca_levelbit,ca_levelnum;
memptr bufferseg;
/* /*
============================================================================= =============================================================================
...@@ -843,13 +841,16 @@ void CAL_ExpandGrChunk (int chunk, byte *source) ...@@ -843,13 +841,16 @@ void CAL_ExpandGrChunk (int chunk, byte *source)
====================== ======================
*/ */
void CA_CacheGrChunk (int chunk) void CA_CacheGrChunk(int chunk)
{ {
long pos,compressed; long pos,compressed;
memptr bigbufferseg; memptr bigbufferseg;
byte *source; byte *source;
int next; int next;
if ( (grhandle == 0) || (grhandle == -1) ) /* make sure this works ok */
return;
grneeded[chunk] |= ca_levelbit; /* make sure it doesn't get removed */ grneeded[chunk] |= ca_levelbit; /* make sure it doesn't get removed */
if (grsegs[chunk]) if (grsegs[chunk])
{ {
...@@ -873,22 +874,13 @@ void CA_CacheGrChunk (int chunk) ...@@ -873,22 +874,13 @@ void CA_CacheGrChunk (int chunk)
lseek(grhandle,pos,SEEK_SET); lseek(grhandle,pos,SEEK_SET);
if (compressed<=BUFFERSIZE)
{
CA_FarRead(grhandle,bufferseg,compressed);
source = bufferseg;
}
else
{
MM_GetPtr(&bigbufferseg,compressed); MM_GetPtr(&bigbufferseg,compressed);
MM_SetLock (&bigbufferseg,true); MM_SetLock (&bigbufferseg,true);
CA_FarRead(grhandle,bigbufferseg,compressed); CA_FarRead(grhandle,bigbufferseg,compressed);
source = bigbufferseg; source = bigbufferseg;
}
CAL_ExpandGrChunk (chunk,source); CAL_ExpandGrChunk (chunk,source);
if (compressed>BUFFERSIZE)
MM_FreePtr(&bigbufferseg); MM_FreePtr(&bigbufferseg);
} }
...@@ -978,14 +970,9 @@ void CA_CacheMap(int mapnum) ...@@ -978,14 +970,9 @@ void CA_CacheMap(int mapnum)
dest = (memptr)&mapsegs[plane]; dest = (memptr)&mapsegs[plane];
lseek(maphandle,pos,SEEK_SET); lseek(maphandle,pos,SEEK_SET);
if (compressed<=BUFFERSIZE)
source = bufferseg;
else
{
MM_GetPtr(&bigbufferseg,compressed); MM_GetPtr(&bigbufferseg,compressed);
MM_SetLock (&bigbufferseg,true); MM_SetLock (&bigbufferseg,true);
source = bigbufferseg; source = bigbufferseg;
}
CA_FarRead(maphandle,(byte *)source,compressed); CA_FarRead(maphandle,(byte *)source,compressed);
/* /*
...@@ -1002,7 +989,6 @@ void CA_CacheMap(int mapnum) ...@@ -1002,7 +989,6 @@ void CA_CacheMap(int mapnum)
((mapfiletype *)tinf)->RLEWtag); ((mapfiletype *)tinf)->RLEWtag);
MM_FreePtr (&buffer2seg); MM_FreePtr (&buffer2seg);
if (compressed>BUFFERSIZE)
MM_FreePtr(&bigbufferseg); MM_FreePtr(&bigbufferseg);
} }
} }
...@@ -1022,6 +1008,7 @@ void CA_CacheMap(int mapnum) ...@@ -1022,6 +1008,7 @@ void CA_CacheMap(int mapnum)
void CA_UpLevel (void) void CA_UpLevel (void)
{ {
/*
int i; int i;
if (ca_levelnum==7) if (ca_levelnum==7)
...@@ -1032,6 +1019,7 @@ void CA_UpLevel (void) ...@@ -1032,6 +1019,7 @@ void CA_UpLevel (void)
MM_SetPurge ((memptr)&grsegs[i],3); MM_SetPurge ((memptr)&grsegs[i],3);
ca_levelbit<<=1; ca_levelbit<<=1;
ca_levelnum++; ca_levelnum++;
*/
} }
//=========================================================================== //===========================================================================
...@@ -1049,11 +1037,13 @@ void CA_UpLevel (void) ...@@ -1049,11 +1037,13 @@ void CA_UpLevel (void)
void CA_DownLevel (void) void CA_DownLevel (void)
{ {
/*
if (!ca_levelnum) if (!ca_levelnum)
Quit ("CA_DownLevel: Down past level 0!"); Quit ("CA_DownLevel: Down past level 0!");
ca_levelbit>>=1; ca_levelbit>>=1;
ca_levelnum--; ca_levelnum--;
CA_CacheMarks(); CA_CacheMarks();
*/
} }
//=========================================================================== //===========================================================================
...@@ -1067,7 +1057,7 @@ void CA_DownLevel (void) ...@@ -1067,7 +1057,7 @@ void CA_DownLevel (void)
= =
====================== ======================
*/ */
#if 0
void CA_ClearMarks (void) void CA_ClearMarks (void)
{ {
int i; int i;
...@@ -1075,7 +1065,7 @@ void CA_ClearMarks (void) ...@@ -1075,7 +1065,7 @@ void CA_ClearMarks (void)
for (i=0;i<NUMCHUNKS;i++) for (i=0;i<NUMCHUNKS;i++)
grneeded[i]&=~ca_levelbit; grneeded[i]&=~ca_levelbit;
} }
#endif
//=========================================================================== //===========================================================================
...@@ -1088,14 +1078,14 @@ void CA_ClearMarks (void) ...@@ -1088,14 +1078,14 @@ void CA_ClearMarks (void)
= =
====================== ======================
*/ */
#if 0
void CA_ClearAllMarks (void) void CA_ClearAllMarks (void)
{ {
memset (grneeded,0,sizeof(grneeded)); memset (grneeded,0,sizeof(grneeded));
ca_levelbit = 1; ca_levelbit = 1;
ca_levelnum = 0; ca_levelnum = 0;
} }
#endif
//=========================================================================== //===========================================================================
...@@ -1106,7 +1096,7 @@ void CA_ClearAllMarks (void) ...@@ -1106,7 +1096,7 @@ void CA_ClearAllMarks (void)
= =
====================== ======================
*/ */
#if 0
void CA_SetGrPurge (void) void CA_SetGrPurge (void)
{ {
int i; int i;
...@@ -1120,7 +1110,7 @@ void CA_SetGrPurge (void) ...@@ -1120,7 +1110,7 @@ void CA_SetGrPurge (void)
if (grsegs[i]) if (grsegs[i])
MM_SetPurge ((memptr)&grsegs[i],3); MM_SetPurge ((memptr)&grsegs[i],3);
} }
#endif
/* /*
====================== ======================
= =
...@@ -1130,7 +1120,7 @@ void CA_SetGrPurge (void) ...@@ -1130,7 +1120,7 @@ void CA_SetGrPurge (void)
= =
====================== ======================
*/ */
#if 0
void CA_SetAllPurge (void) void CA_SetAllPurge (void)
{ {
int i; int i;
...@@ -1148,10 +1138,10 @@ void CA_SetAllPurge (void) ...@@ -1148,10 +1138,10 @@ void CA_SetAllPurge (void)
// //
CA_SetGrPurge (); CA_SetGrPurge ();
} }
#endif
//=========================================================================== //===========================================================================
#if 0
/* /*
====================== ======================
= =
...@@ -1265,6 +1255,7 @@ void CA_CacheMarks (void) ...@@ -1265,6 +1255,7 @@ void CA_CacheMarks (void)
} }
} }
#endif
void CA_CannotOpen(char *string) void CA_CannotOpen(char *string)
{ {
...@@ -1297,7 +1288,6 @@ void CA_CannotOpen(char *string) ...@@ -1297,7 +1288,6 @@ void CA_CannotOpen(char *string)
void MM_Startup (void) void MM_Startup (void)
{ {
MM_GetPtr (&bufferseg, BUFFERSIZE);
} }
/* /*
...@@ -1312,8 +1302,6 @@ void MM_Startup (void) ...@@ -1312,8 +1302,6 @@ void MM_Startup (void)
void MM_Shutdown(void) void MM_Shutdown(void)
{ {
MM_FreePtr(bufferseg);
bufferseg = NULL;
} }
/* /*
......
...@@ -63,9 +63,12 @@ void CA_SetGrPurge (void); ...@@ -63,9 +63,12 @@ void CA_SetGrPurge (void);
void CA_CacheAudioChunk (int chunk); void CA_CacheAudioChunk (int chunk);
void CA_LoadAllSounds (void); void CA_LoadAllSounds (void);
void CA_CacheMap (int mapnum);
void CA_CacheGrChunk (int chunk);
void CA_UpLevel (void); void CA_UpLevel (void);
void CA_DownLevel (void); void CA_DownLevel (void);
/*
void CA_SetAllPurge (void); void CA_SetAllPurge (void);
void CA_ClearMarks (void); void CA_ClearMarks (void);
...@@ -73,15 +76,11 @@ void CA_ClearAllMarks (void); ...@@ -73,15 +76,11 @@ void CA_ClearAllMarks (void);
#define CA_MarkGrChunk(chunk) grneeded[chunk]|=ca_levelbit #define CA_MarkGrChunk(chunk) grneeded[chunk]|=ca_levelbit
void CA_CacheGrChunk (int chunk);
void CA_CacheMap (int mapnum);
void CA_CacheMarks (void); void CA_CacheMarks (void);
*/
void CA_CacheScreen (int chunk); void CA_CacheScreen (int chunk);
#define BUFFERSIZE 0x1000 // miscelanious, allways available buffer
//========================================================================== //==========================================================================
void MM_Startup (void); void MM_Startup (void);
......
...@@ -111,7 +111,7 @@ void VWB_Vlin(int y1, int y2, int x, int color) ...@@ -111,7 +111,7 @@ void VWB_Vlin(int y1, int y2, int x, int color)
void VW_UpdateScreen(void) void VW_UpdateScreen(void)
{ {
VH_UpdateScreen (); VL_UpdateScreen ();
} }
/* /*
......
...@@ -26,11 +26,6 @@ extern byte fontcolor; ...@@ -26,11 +26,6 @@ extern byte fontcolor;
extern int fontnumber; extern int fontnumber;
extern int px,py; extern int px,py;
//
// Double buffer management routines
//
int VW_MarkUpdateBlock (int x1, int y1, int x2, int y2);
void VW_UpdateScreen (void); void VW_UpdateScreen (void);
// //
...@@ -52,7 +47,6 @@ extern byte gamepal; ...@@ -52,7 +47,6 @@ extern byte gamepal;
#define VW_Startup VL_Startup #define VW_Startup VL_Startup
#define VW_Shutdown VL_Shutdown #define VW_Shutdown VL_Shutdown
#define VW_SetScreen VL_SetScreen
#define VW_Bar VL_Bar #define VW_Bar VL_Bar
#define VW_Plot VL_Plot #define VW_Plot VL_Plot
#define VW_Hlin(x,z,y,c) VL_Hlin(x,y,(z)-(x)+1,c) #define VW_Hlin(x,z,y,c) VL_Hlin(x,y,(z)-(x)+1,c)
...@@ -61,15 +55,14 @@ extern byte gamepal; ...@@ -61,15 +55,14 @@ extern byte gamepal;
#define VW_WaitVBL VL_WaitVBL #define VW_WaitVBL VL_WaitVBL
#define VW_FadeIn() VL_FadeIn(0,255,&gamepal,30); #define VW_FadeIn() VL_FadeIn(0,255,&gamepal,30);
#define VW_FadeOut() VL_FadeOut(0,255,0,0,0,30); #define VW_FadeOut() VL_FadeOut(0,255,0,0,0,30);
#define VW_ScreenToScreen VL_ScreenToScreen
void VW_MeasurePropString(char *string, word *width, word *height); void VW_MeasurePropString(char *string, word *width, word *height);
#define LatchDrawChar(x,y,p) VL_LatchToScreen(latchpics[0]+(p)*16,2,8,x,y) #define LatchDrawChar(x,y,p) VL_LatchToScreen(latchpics[0]+(p)*16,2,8,x,y)
#define LatchDrawTile(x,y,p) VL_LatchToScreen(latchpics[1]+(p)*64,4,16,x,y) #define LatchDrawTile(x,y,p) VL_LatchToScreen(latchpics[1]+(p)*64,4,16,x,y)
void LatchDrawPic (unsigned x, unsigned y, unsigned picnum); void LatchDrawPic(unsigned x, unsigned y, unsigned picnum);
void LoadLatchMem (void); void LoadLatchMem(void);
boolean FizzleFade (byte *source, unsigned width,unsigned height, unsigned frames,boolean abortable); boolean FizzleFade(byte *source, unsigned width,unsigned height, unsigned frames,boolean abortable);
#define NUMLATCHPICS 100 #define NUMLATCHPICS 100
extern unsigned latchpics[NUMLATCHPICS]; extern unsigned latchpics[NUMLATCHPICS];
......
...@@ -6,12 +6,16 @@ boolean screenfaded; ...@@ -6,12 +6,16 @@ boolean screenfaded;
byte palette1[256][3], palette2[256][3]; byte palette1[256][3], palette2[256][3];
byte *gfxbuf; byte *gfxbuf = NULL;
void VL_WaitVBL(int vbls) void VL_WaitVBL(int vbls)
{ {
} }
void VL_UpdateScreen()
{
}
/* /*
======================= =======================
= =
...@@ -22,6 +26,8 @@ void VL_WaitVBL(int vbls) ...@@ -22,6 +26,8 @@ void VL_WaitVBL(int vbls)
void VL_Startup (void) void VL_Startup (void)
{ {
if (gfxbuf == NULL)
gfxbuf = malloc(320 * 200 * 1);
} }
/* /*
...@@ -34,6 +40,10 @@ void VL_Startup (void) ...@@ -34,6 +40,10 @@ void VL_Startup (void)
void VL_Shutdown (void) void VL_Shutdown (void)
{ {
if (gfxbuf != NULL) {
free(gfxbuf);
gfxbuf = NULL;
}
} }
//=========================================================================== //===========================================================================
...@@ -71,7 +81,7 @@ void VL_ClearVideo (byte color) ...@@ -71,7 +81,7 @@ void VL_ClearVideo (byte color)
================= =================
*/ */
void VL_FillPalette (int red, int green, int blue) void VL_FillPalette(int red, int green, int blue)
{ {
} }
...@@ -431,46 +441,3 @@ asm mov ds,ax ...@@ -431,46 +441,3 @@ asm mov ds,ax
VGAWRITEMODE(0); VGAWRITEMODE(0);
#endif #endif
} }
/* ======================================================================== */
#if 0
/*
=================
=
= VL_ScreenToScreen
=
=================
*/
void VL_ScreenToScreen (unsigned source, unsigned dest,int width, int height)
{
VGAWRITEMODE(1);
VGAMAPMASK(15);
asm mov si,[source]
asm mov di,[dest]
asm mov ax,[width]
asm mov bx,[linewidth]
asm sub bx,ax
asm mov dx,[height]
asm mov cx,SCREENSEG
asm mov ds,cx
asm mov es,cx
drawline:
asm mov cx,ax
asm rep movsb
asm add si,bx
asm add di,bx
asm dec dx
asm jnz drawline
asm mov ax,ss
asm mov ds,ax
VGAWRITEMODE(0);
}
#endif
...@@ -3,17 +3,8 @@ ...@@ -3,17 +3,8 @@
//=========================================================================== //===========================================================================
#define SCREENWIDTH 80 // default screen width in bytes
#define TILEWIDTH 4
//===========================================================================
extern byte *gfxbuf; extern byte *gfxbuf;
extern unsigned bufferofs; // all drawing is reletive to this
extern unsigned displayofs; // last setscreen coordinates
extern boolean screenfaded; extern boolean screenfaded;
//=========================================================================== //===========================================================================
...@@ -40,7 +31,6 @@ void VL_Vlin (int x, int y, int height, int color); ...@@ -40,7 +31,6 @@ void VL_Vlin (int x, int y, int height, int color);
void VL_Bar (int x, int y, int width, int height, int color); void VL_Bar (int x, int y, int width, int height, int color);
void VL_MemToLatch (byte *source, int width, int height, word dest); void VL_MemToLatch (byte *source, int width, int height, word dest);
void VL_ScreenToScreen (unsigned source, unsigned dest,int width, int height);
void VL_MemToScreen (byte *source, int width, int height, int x, int y); void VL_MemToScreen (byte *source, int width, int height, int x, int y);
void VL_DrawPropString (char *str, unsigned tile8ptr, int printx, int printy); void VL_DrawPropString (char *str, unsigned tile8ptr, int printx, int printy);
......
...@@ -154,16 +154,10 @@ void PicturePause (void) ...@@ -154,16 +154,10 @@ void PicturePause (void)
// vga stuff... // vga stuff...
// //
ClearMemory ();
CA_SetAllPurge();
/* TODO: save picture to file */ /* TODO: save picture to file */
VL_SetPalette (&gamepal); VL_SetPalette (&gamepal);
IN_Shutdown ();
VW_WaitVBL(70); VW_WaitVBL(70);
VW_WaitVBL(70); VW_WaitVBL(70);
Quit(NULL); Quit(NULL);
......
...@@ -712,7 +712,6 @@ extern char str[80],str2[20]; ...@@ -712,7 +712,6 @@ extern char str[80],str2[20];
extern fixed focallength; extern fixed focallength;
extern unsigned viewangles; extern unsigned viewangles;
extern unsigned screenofs;
extern int viewwidth; extern int viewwidth;
extern int viewheight; extern int viewheight;
extern int centerx; extern int centerx;
......
...@@ -42,7 +42,6 @@ int dirangle[9] = {0,ANGLES/8,2*ANGLES/8,3*ANGLES/8,4*ANGLES ...@@ -42,7 +42,6 @@ int dirangle[9] = {0,ANGLES/8,2*ANGLES/8,3*ANGLES/8,4*ANGLES
// proejection variables // proejection variables
// //
fixed focallength; fixed focallength;
unsigned screenofs;
int viewwidth; int viewwidth;
int viewheight; int viewheight;
int centerx; int centerx;
...@@ -1048,10 +1047,7 @@ void InitGame (void) ...@@ -1048,10 +1047,7 @@ void InitGame (void)
else else
virtualreality = false; virtualreality = false;
MM_Startup (); // so the signon screen can be freed MM_Startup ();
SignonScreen ();
VW_Startup (); VW_Startup ();
IN_Startup (); IN_Startup ();
PM_Startup (); PM_Startup ();
...@@ -1059,6 +1055,8 @@ void InitGame (void) ...@@ -1059,6 +1055,8 @@ void InitGame (void)
CA_Startup (); CA_Startup ();
US_Startup (); US_Startup ();
SignonScreen ();
// //
// build some tables // build some tables
// //
...@@ -1129,7 +1127,6 @@ boolean SetViewSize (unsigned width, unsigned height) ...@@ -1129,7 +1127,6 @@ boolean SetViewSize (unsigned width, unsigned height)
viewheight = height&~1; // must be even viewheight = height&~1; // must be even
centerx = viewwidth/2-1; centerx = viewwidth/2-1;
shootdelta = viewwidth/10; shootdelta = viewwidth/10;
screenofs = ((200-STATUSLINES-viewheight)/2*SCREENWIDTH+(320-viewwidth)/8);
yoffset = (200-STATUSLINES-viewheight)/2; yoffset = (200-STATUSLINES-viewheight)/2;
xoffset = (320-viewwidth)/2; xoffset = (320-viewwidth)/2;
...@@ -1196,26 +1193,28 @@ void NewViewSize (int width) ...@@ -1196,26 +1193,28 @@ void NewViewSize (int width)
void Quit (char *error) void Quit (char *error)
{ {
unsigned finscreen;
memptr screen; memptr screen;
ClearMemory ();
if (!*error) if (!*error)
{ {
#ifndef JAPAN #ifndef JAPAN
CA_CacheGrChunk (ORDERSCREEN); CA_CacheGrChunk(ORDERSCREEN);
screen = grsegs[ORDERSCREEN]; screen = grsegs[ORDERSCREEN];
#endif #endif
WriteConfig (); WriteConfig ();
} }
else else
{ {
CA_CacheGrChunk (ERRORSCREEN); CA_CacheGrChunk(ERRORSCREEN);
screen = grsegs[ERRORSCREEN]; screen = grsegs[ERRORSCREEN];
} }
ShutdownId (); ShutdownId ();
if (screen) {
/* blah blah */
}
if (error && *error) if (error && *error)
printf("Quit: %s\n", error); printf("Quit: %s\n", error);
else else
......
...@@ -639,7 +639,6 @@ void CheckKeys (void) ...@@ -639,7 +639,6 @@ void CheckKeys (void)
ClearMemory (); ClearMemory ();
CA_CacheGrChunk (STARTFONT+1); CA_CacheGrChunk (STARTFONT+1);
ClearSplitVWB (); ClearSplitVWB ();
VW_ScreenToScreen (displayofs,bufferofs,80,160);
Message(STR_CHEATER1"\n" Message(STR_CHEATER1"\n"
STR_CHEATER2"\n\n" STR_CHEATER2"\n\n"
...@@ -672,7 +671,6 @@ void CheckKeys (void) ...@@ -672,7 +671,6 @@ void CheckKeys (void)
ClearMemory (); ClearMemory ();
CA_CacheGrChunk (STARTFONT+1); CA_CacheGrChunk (STARTFONT+1);
ClearSplitVWB (); ClearSplitVWB ();
VW_ScreenToScreen (displayofs,bufferofs,80,160);
Message("Debugging keys are\nnow available!"); Message("Debugging keys are\nnow available!");
UNCACHEGRCHUNK(STARTFONT+1); UNCACHEGRCHUNK(STARTFONT+1);
...@@ -693,7 +691,6 @@ void CheckKeys (void) ...@@ -693,7 +691,6 @@ void CheckKeys (void)
ClearMemory (); ClearMemory ();
CA_CacheGrChunk (STARTFONT+1); CA_CacheGrChunk (STARTFONT+1);
ClearSplitVWB (); ClearSplitVWB ();
VW_ScreenToScreen (displayofs,bufferofs,80,160);
Message("Commander Keen is also\n" Message("Commander Keen is also\n"
"available from Apogee, but\n" "available from Apogee, but\n"
...@@ -733,7 +730,6 @@ void CheckKeys (void) ...@@ -733,7 +730,6 @@ void CheckKeys (void)
{ {
ClearMemory (); ClearMemory ();
ClearSplitVWB (); ClearSplitVWB ();
VW_ScreenToScreen (displayofs,bufferofs,80,160);
US_ControlPanel(scan); US_ControlPanel(scan);
DrawAllPlayBorderSides (); DrawAllPlayBorderSides ();
......
...@@ -556,23 +556,32 @@ void CacheLayoutGraphics (void) ...@@ -556,23 +556,32 @@ void CacheLayoutGraphics (void)
numpages++; numpages++;
if (ch == 'E') // end of file, so load graphics and return if (ch == 'E') // end of file, so load graphics and return
{ {
/*
CA_MarkGrChunk(H_TOPWINDOWPIC); CA_MarkGrChunk(H_TOPWINDOWPIC);
CA_MarkGrChunk(H_LEFTWINDOWPIC); CA_MarkGrChunk(H_LEFTWINDOWPIC);
CA_MarkGrChunk(H_RIGHTWINDOWPIC); CA_MarkGrChunk(H_RIGHTWINDOWPIC);
CA_MarkGrChunk(H_BOTTOMINFOPIC); CA_MarkGrChunk(H_BOTTOMINFOPIC);
CA_CacheMarks (); CA_CacheMarks ();
*/
CA_CacheGrChunk(H_TOPWINDOWPIC);
CA_CacheGrChunk(H_LEFTWINDOWPIC);
CA_CacheGrChunk(H_RIGHTWINDOWPIC);
CA_CacheGrChunk(H_BOTTOMINFOPIC);
text = textstart; text = textstart;
return; return;
} }
if (ch == 'G') // draw graphic command, so mark graphics if (ch == 'G') // draw graphic command, so mark graphics
{ {
ParsePicCommand (); ParsePicCommand ();
CA_MarkGrChunk (picnum); /* CA_MarkGrChunk (picnum); */
CA_CacheGrChunk(picnum);
} }
if (ch == 'T') // timed draw graphic command, so mark graphics if (ch == 'T') // timed draw graphic command, so mark graphics
{ {
ParseTimedCommand (); ParseTimedCommand ();
CA_MarkGrChunk (picnum); /* CA_MarkGrChunk (picnum); */
CA_CacheGrChunk(picnum);
} }
} }
else else
...@@ -644,7 +653,8 @@ void ShowArticle (char *article) ...@@ -644,7 +653,8 @@ void ShowArticle (char *article)
text = article; text = article;
oldfontnumber = fontnumber; oldfontnumber = fontnumber;
fontnumber = 0; fontnumber = 0;
CA_MarkGrChunk(STARTFONT); /* CA_MarkGrChunk(STARTFONT); */
CA_CacheGrChunk(STARTFONT);
VWB_Bar (0,0,320,200,BACKCOLOR); VWB_Bar (0,0,320,200,BACKCOLOR);
CacheLayoutGraphics (); CacheLayoutGraphics ();
#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