mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 01:11:44 +00:00
Undo/redo support for Mapster32 and some other minor changes
git-svn-id: https://svn.eduke32.com/eduke32@1361 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
c585380de6
commit
f3d93e8406
8 changed files with 722 additions and 360 deletions
|
@ -54,6 +54,10 @@ extern int32_t autosave;
|
|||
extern int32_t mlook;
|
||||
extern int16_t prefixtiles[16];
|
||||
|
||||
extern char program_origcwd[BMAX_PATH];
|
||||
extern char *mapster32_fullpath;
|
||||
extern char *testplay_addparam;
|
||||
|
||||
extern int32_t ExtInit(void);
|
||||
extern int32_t ExtPreInit(int32_t argc,const char **argv);
|
||||
extern void ExtUnInit(void);
|
||||
|
@ -107,6 +111,8 @@ int32_t getpointhighlight(int32_t xplc, int32_t yplc, int32_t point);
|
|||
#define DEFAULT_GAME_LOCAL_EXEC "./eduke32"
|
||||
#endif
|
||||
|
||||
void test_map(int32_t mode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -133,6 +133,10 @@ int32_t mlook = 0,mskip=0;
|
|||
int32_t revertCTRL=0,scrollamount=3;
|
||||
int32_t unrealedlook=1, quickmapcycling=1; //PK
|
||||
|
||||
char program_origcwd[BMAX_PATH];
|
||||
char *mapster32_fullpath;
|
||||
char *testplay_addparam = 0;
|
||||
|
||||
static char boardfilename[BMAX_PATH], selectedboardfilename[BMAX_PATH];
|
||||
|
||||
static CACHE1D_FIND_REC *finddirs=NULL, *findfiles=NULL, *finddirshigh=NULL, *findfileshigh=NULL;
|
||||
|
@ -1176,7 +1180,7 @@ void overheadeditor(void)
|
|||
drawline16(192-24,ydim-STATUS2DSIZ,192-24,ydim-STATUS2DSIZ+24,1); */
|
||||
if (totalclock < 120*5)
|
||||
{
|
||||
printmessage16("Press F1 for help");
|
||||
printmessage16("Press F1 for help. This is a test release, expect bugs!");
|
||||
printext16(8L,ydim-STATUS2DSIZ+32L,editorcolors[9],-1,kensig,0);
|
||||
}
|
||||
|
||||
|
@ -1508,6 +1512,7 @@ void overheadeditor(void)
|
|||
drawlinepat = 0xffffffff;
|
||||
|
||||
Bsprintf(tempbuf,"(%d,%d)",mousxplc,mousyplc);
|
||||
/*
|
||||
i = (Bstrlen(tempbuf)<<3)+6;
|
||||
if ((searchx+i) < (xdim2d-1))
|
||||
i = 0;
|
||||
|
@ -1516,12 +1521,15 @@ void overheadeditor(void)
|
|||
j = 0;
|
||||
else j = (searchy+16)-(ydim2d-STATUS2DSIZ2-1);
|
||||
printext16(searchx+6-i,searchy+6-j,editorcolors[11],-1,tempbuf,0);
|
||||
*/
|
||||
_printmessage16(tempbuf);
|
||||
}
|
||||
drawline16(searchx,0,searchx,8,editorcolors[15]);
|
||||
drawline16(0,searchy,8,searchy,editorcolors[15]);
|
||||
|
||||
col = 15-((gridlock<<1)+gridlock);
|
||||
if (joinsector[0] >= 0)col = 11;
|
||||
|
||||
drawline16(searchx,searchy-8,searchx,searchy-1,editorcolors[col]);
|
||||
drawline16(searchx+1,searchy-8,searchx+1,searchy-1,editorcolors[col]);
|
||||
drawline16(searchx,searchy+2,searchx,searchy+9,editorcolors[col]);
|
||||
|
@ -2093,7 +2101,7 @@ void overheadeditor(void)
|
|||
|
||||
if (keystatus[0x3f]) //F5
|
||||
{
|
||||
keystatus[0x3f] = 0;
|
||||
// keystatus[0x3f] = 0;
|
||||
|
||||
for (i=0; i<numsectors; i++)
|
||||
if (inside(mousxplc,mousyplc,i) == 1)
|
||||
|
@ -2106,7 +2114,7 @@ void overheadeditor(void)
|
|||
}
|
||||
if (keystatus[0x40]) //F6
|
||||
{
|
||||
keystatus[0x40] = 0;
|
||||
// keystatus[0x40] = 0;
|
||||
|
||||
if (pointhighlight >= 16384)
|
||||
{
|
||||
|
@ -4139,7 +4147,7 @@ CANCEL:
|
|||
if (keystatus[1])
|
||||
{
|
||||
keystatus[1] = 0;
|
||||
_printmessage16("(N)ew, (L)oad, (S)ave, save (A)s, (Q)uit");
|
||||
_printmessage16("(N)ew, (L)oad, (S)ave, save (A)s, (T)est map, (Q)uit");
|
||||
// printext16(200L+248, ydim-STATUS2DSIZ+20L, 9, 0, "(U)ndo, (R)edo", 0);
|
||||
showframe(1);
|
||||
bflushchars();
|
||||
|
@ -4498,6 +4506,10 @@ CANCEL:
|
|||
printmessage16((res==0)?"Board saved.":"Saving board failed.");
|
||||
showframe(1);
|
||||
}
|
||||
else if (ch == 't' || ch == 'T')
|
||||
{
|
||||
test_map(0);
|
||||
}
|
||||
else if (ch == 'q' || ch == 'Q') //Q
|
||||
{
|
||||
bad = 0;
|
||||
|
@ -5051,6 +5063,7 @@ void clearmidstatbar16(void)
|
|||
void clearministatbar16(void)
|
||||
{
|
||||
int32_t i, col = whitecol - 16;
|
||||
char tempbuf[32];
|
||||
begindrawing();
|
||||
|
||||
for (i=ydim-STATUS2DSIZ2; i<ydim; i++)
|
||||
|
@ -6003,68 +6016,86 @@ void showsectordata(int16_t sectnum)
|
|||
char snotbuf[80];
|
||||
int32_t col = 1, row = 0;
|
||||
int32_t mode = (sectnum & 16384);
|
||||
int32_t color = mode?whitecol:editorcolors[11];
|
||||
|
||||
if (mode) row = 2;
|
||||
if (mode)
|
||||
{
|
||||
int32_t i;
|
||||
|
||||
row = 2;
|
||||
begindrawing();
|
||||
col = whitecol - 16;
|
||||
for (i=ydim-(row*96)-STATUS2DSIZ+16; i<ydim-STATUS2DSIZ2-8; i++)
|
||||
{
|
||||
// drawline256(0, i<<12, xdim<<12, i<<12, col);
|
||||
clearbufbyte((char *)(frameplace + (i*bytesperline) + 4), 192, ((int32_t)col<<24)|((int32_t)col<<16)|((int32_t)col<<8)|col);
|
||||
if (col > 0) col--;
|
||||
}
|
||||
enddrawing();
|
||||
col = 1;
|
||||
}
|
||||
sectnum &= ~16384;
|
||||
|
||||
Bsprintf(snotbuf,"^10Sector %d ^O(F7 to edit)",sectnum);
|
||||
printext16(8,ydim-(row*96)-STATUS2DSIZ+32,editorcolors[11],-1,snotbuf,2);
|
||||
Bsprintf(snotbuf,"^10Sector %d",sectnum);
|
||||
if (mode)
|
||||
Bstrcat(snotbuf," ^O(F7 to edit)");
|
||||
printext16(8,ydim-(row*96)-STATUS2DSIZ+32,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Firstwall: %d",sector[sectnum].wallptr);
|
||||
printext16(8,ydim-(row*96)-STATUS2DSIZ+48,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8,ydim-(row*96)-STATUS2DSIZ+48,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Numberofwalls: %d",sector[sectnum].wallnum);
|
||||
printext16(8,ydim-(row*96)-STATUS2DSIZ+56,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8,ydim-(row*96)-STATUS2DSIZ+56,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Firstsprite: %d",headspritesect[sectnum]);
|
||||
printext16(8,ydim-(row*96)-STATUS2DSIZ+64,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8,ydim-(row*96)-STATUS2DSIZ+64,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Tags: %d, %d",sector[sectnum].hitag,sector[sectnum].lotag);
|
||||
printext16(8,ydim-(row*96)-STATUS2DSIZ+72,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8,ydim-(row*96)-STATUS2DSIZ+72,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf," (0x%x), (0x%x)",sector[sectnum].hitag,sector[sectnum].lotag);
|
||||
printext16(8,ydim-(row*96)-STATUS2DSIZ+80,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8,ydim-(row*96)-STATUS2DSIZ+80,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Extra: %d",sector[sectnum].extra);
|
||||
printext16(8,ydim-(row*96)-STATUS2DSIZ+88,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8,ydim-(row*96)-STATUS2DSIZ+88,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Visibility: %d",sector[sectnum].visibility);
|
||||
printext16(8,ydim-(row*96)-STATUS2DSIZ+96,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8,ydim-(row*96)-STATUS2DSIZ+96,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Pixel height: %d",(sector[sectnum].floorz-sector[sectnum].ceilingz)>>8);
|
||||
printext16(8,ydim-(row*96)-STATUS2DSIZ+104,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8,ydim-(row*96)-STATUS2DSIZ+104,color,-1,snotbuf,0);
|
||||
|
||||
if (mode)
|
||||
row--;
|
||||
else col++;
|
||||
|
||||
printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+32,editorcolors[11],-1,"^10CEILINGS:^O",2);
|
||||
printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+32,color,-1,"^10CEILING:^O",0);
|
||||
Bsprintf(snotbuf,"Flags (hex): %x",sector[sectnum].ceilingstat);
|
||||
printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+48,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+48,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"(X,Y)pan: %d, %d",sector[sectnum].ceilingxpanning,sector[sectnum].ceilingypanning);
|
||||
printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+56,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+56,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Shade byte: %d",sector[sectnum].ceilingshade);
|
||||
printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+64,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+64,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Z-coordinate: %d",sector[sectnum].ceilingz);
|
||||
printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+72,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+72,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Tile number: %d",sector[sectnum].ceilingpicnum);
|
||||
printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+80,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+80,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Ceiling heinum: %d",sector[sectnum].ceilingheinum);
|
||||
printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+88,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+88,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Palookup number: %d",sector[sectnum].ceilingpal);
|
||||
printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+96,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+96,color,-1,snotbuf,0);
|
||||
|
||||
if (mode)
|
||||
row--;
|
||||
else col++;
|
||||
|
||||
printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+32,editorcolors[11],-1,"^10FLOORS:^O",2);
|
||||
printext16(8+((col-1)*200),ydim-STATUS2DSIZ+32,color,-1,"^10FLOOR:^O",0);
|
||||
Bsprintf(snotbuf,"Flags (hex): %x",sector[sectnum].floorstat);
|
||||
printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+48,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-STATUS2DSIZ+48,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"(X,Y)pan: %d, %d",sector[sectnum].floorxpanning,sector[sectnum].floorypanning);
|
||||
printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+56,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-STATUS2DSIZ+56,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Shade byte: %d",sector[sectnum].floorshade);
|
||||
printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+64,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-STATUS2DSIZ+64,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Z-coordinate: %d",sector[sectnum].floorz);
|
||||
printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+72,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-STATUS2DSIZ+72,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Tile number: %d",sector[sectnum].floorpicnum);
|
||||
printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+80,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-STATUS2DSIZ+80,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Floor heinum: %d",sector[sectnum].floorheinum);
|
||||
printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+88,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-STATUS2DSIZ+88,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Palookup number: %d",sector[sectnum].floorpal);
|
||||
printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+96,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-STATUS2DSIZ+96,color,-1,snotbuf,0);
|
||||
}
|
||||
|
||||
void showwalldata(int16_t wallnum)
|
||||
|
@ -6073,58 +6104,76 @@ void showwalldata(int16_t wallnum)
|
|||
char snotbuf[80];
|
||||
int32_t col = 1, row = 0;
|
||||
int32_t mode = (wallnum & 16384);
|
||||
int32_t color = mode?whitecol:editorcolors[11];
|
||||
|
||||
if (mode)
|
||||
{
|
||||
int32_t i;
|
||||
|
||||
row = 2;
|
||||
begindrawing();
|
||||
col = whitecol - 16;
|
||||
for (i=ydim-(row*80)-STATUS2DSIZ+16; i<ydim-STATUS2DSIZ2-8; i++)
|
||||
{
|
||||
// drawline256(0, i<<12, xdim<<12, i<<12, col);
|
||||
clearbufbyte((char *)(frameplace + (i*bytesperline) + 4), 192, ((int32_t)col<<24)|((int32_t)col<<16)|((int32_t)col<<8)|col);
|
||||
if (col > 0) col--;
|
||||
}
|
||||
enddrawing();
|
||||
col = 1;
|
||||
}
|
||||
|
||||
if (mode) row = 2;
|
||||
wallnum &= ~16384;
|
||||
|
||||
Bsprintf(snotbuf,"^10Wall %d ^O(F8 to edit)",wallnum);
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+32,editorcolors[11],-1,snotbuf,2);
|
||||
Bsprintf(snotbuf,"^10Wall %d",wallnum);
|
||||
if (mode) Bstrcat(snotbuf," ^O(F8 to edit)");
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+32,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"X-coordinate: %d",wall[wallnum].x);
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+48,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+48,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Y-coordinate: %d",wall[wallnum].y);
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+56,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+56,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Point2: %d",wall[wallnum].point2);
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+64,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+64,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Sector: ^010%d",sectorofwall(wallnum));
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+72,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+72,color,-1,snotbuf,0);
|
||||
|
||||
Bsprintf(snotbuf,"Tags: %d, %d",wall[wallnum].hitag,wall[wallnum].lotag);
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+88,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+88,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf," (0x%x), (0x%x)",wall[wallnum].hitag,wall[wallnum].lotag);
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+96,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+96,color,-1,snotbuf,0);
|
||||
|
||||
if (mode)
|
||||
row--;
|
||||
else col++;
|
||||
|
||||
Bsprintf(snotbuf,"^10%s^O",names[wall[wallnum].picnum]);
|
||||
printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+32,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+32,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Flags (hex): %x",wall[wallnum].cstat);
|
||||
printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+48,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+48,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Shade: %d",wall[wallnum].shade);
|
||||
printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+56,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+56,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Pal: %d",wall[wallnum].pal);
|
||||
printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+64,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+64,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"(X,Y)repeat: %d, %d",wall[wallnum].xrepeat,wall[wallnum].yrepeat);
|
||||
printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+72,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+72,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"(X,Y)pan: %d, %d",wall[wallnum].xpanning,wall[wallnum].ypanning);
|
||||
printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+80,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+80,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Tile number: %d",wall[wallnum].picnum);
|
||||
printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+88,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+88,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"OverTile number: %d",wall[wallnum].overpicnum);
|
||||
printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+96,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+96,color,-1,snotbuf,0);
|
||||
|
||||
if (mode)
|
||||
row--;
|
||||
else col++;
|
||||
|
||||
Bsprintf(snotbuf,"nextsector: %d",wall[wallnum].nextsector);
|
||||
printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+48,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-STATUS2DSIZ+48-(mode?16:0),color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"nextwall: %d",wall[wallnum].nextwall);
|
||||
printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+56,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-STATUS2DSIZ+56-(mode?16:0),color,-1,snotbuf,0);
|
||||
|
||||
Bsprintf(snotbuf,"Extra: %d",wall[wallnum].extra);
|
||||
printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+72,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-STATUS2DSIZ+72-(mode?16:0),color,-1,snotbuf,0);
|
||||
|
||||
dax = wall[wallnum].x-wall[wall[wallnum].point2].x;
|
||||
day = wall[wallnum].y-wall[wall[wallnum].point2].y;
|
||||
|
@ -6133,11 +6182,11 @@ void showwalldata(int16_t wallnum)
|
|||
// TX 20050102 I'm not sure what unit dist<<4 is supposed to be, but dist itself is correct in terms of game coordinates as one would expect
|
||||
|
||||
Bsprintf(snotbuf,"Wall length: %d",dist);
|
||||
printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+96,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-STATUS2DSIZ+96-(mode?16:0),color,-1,snotbuf,0);
|
||||
|
||||
dax = (int32_t)sectorofwall(wallnum);
|
||||
Bsprintf(snotbuf,"Pixel height: %d",(sector[dax].floorz-sector[dax].ceilingz)>>8);
|
||||
printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+104,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-STATUS2DSIZ+104-(mode?16:0),color,-1,snotbuf,0);
|
||||
}
|
||||
|
||||
void showspritedata(int16_t spritenum)
|
||||
|
@ -6145,66 +6194,83 @@ void showspritedata(int16_t spritenum)
|
|||
char snotbuf[80];
|
||||
int32_t col = 1, row = 0;
|
||||
int32_t mode = (spritenum & 16384);
|
||||
int32_t color = mode?whitecol:editorcolors[11];
|
||||
|
||||
if (mode) row = 2;
|
||||
if (mode)
|
||||
{
|
||||
int32_t i;
|
||||
|
||||
row = 2;
|
||||
begindrawing();
|
||||
col = whitecol - 16;
|
||||
for (i=ydim-(row*80)-STATUS2DSIZ+16; i<ydim-STATUS2DSIZ2-8; i++)
|
||||
{
|
||||
// drawline256(0, i<<12, xdim<<12, i<<12, col);
|
||||
clearbufbyte((char *)(frameplace + (i*bytesperline) + 4), 224, ((int32_t)col<<24)|((int32_t)col<<16)|((int32_t)col<<8)|col);
|
||||
if (col > 0) col--;
|
||||
}
|
||||
enddrawing();
|
||||
col = 1;
|
||||
}
|
||||
spritenum &= ~16384;
|
||||
|
||||
Bsprintf(snotbuf,"^10Sprite %d ^O(F8 to edit)",spritenum);
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+32,editorcolors[11],-1,snotbuf,2);
|
||||
Bsprintf(snotbuf,"^10Sprite %d",spritenum);
|
||||
if (mode) Bstrcat(snotbuf," ^O(F8 to edit)");
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+32,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"X-coordinate: %d",sprite[spritenum].x);
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+48,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+48,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Y-coordinate: %d",sprite[spritenum].y);
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+56,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+56,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Z-coordinate: %d",sprite[spritenum].z);
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+64,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+64,color,-1,snotbuf,0);
|
||||
|
||||
Bsprintf(snotbuf,"Sectnum: ^010%d",sprite[spritenum].sectnum);
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+72,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+72,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Statnum: %d",sprite[spritenum].statnum);
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+80,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+80,color,-1,snotbuf,0);
|
||||
|
||||
Bsprintf(snotbuf,"Tags: %d, %d",sprite[spritenum].hitag,sprite[spritenum].lotag);
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+96,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+96,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf," (0x%x), (0x%x)",sprite[spritenum].hitag,sprite[spritenum].lotag);
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+104,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8,ydim-(row*80)-STATUS2DSIZ+104,color,-1,snotbuf,0);
|
||||
|
||||
if (mode)
|
||||
row--;
|
||||
else col++;
|
||||
|
||||
Bsprintf(snotbuf,"^10%s^O",names[sprite[spritenum].picnum]);
|
||||
printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+32,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+32,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Flags (hex): %x",sprite[spritenum].cstat);
|
||||
printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+48,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+48,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Shade: %d",sprite[spritenum].shade);
|
||||
printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+56,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+56,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Pal: %d",sprite[spritenum].pal);
|
||||
printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+64,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+64,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"(X,Y)repeat: %d, %d",sprite[spritenum].xrepeat,sprite[spritenum].yrepeat);
|
||||
printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+72,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+72,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"(X,Y)offset: %d, %d",sprite[spritenum].xoffset,sprite[spritenum].yoffset);
|
||||
printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+80,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+80,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Tile number: %d",sprite[spritenum].picnum);
|
||||
printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+88,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+88,color,-1,snotbuf,0);
|
||||
|
||||
if (mode)
|
||||
row--;
|
||||
else col++;
|
||||
|
||||
Bsprintf(snotbuf,"Angle (2048 degrees): %d",sprite[spritenum].ang);
|
||||
printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+48,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-STATUS2DSIZ+48,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"X-Velocity: %d",sprite[spritenum].xvel);
|
||||
printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+56,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-STATUS2DSIZ+56,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Y-Velocity: %d",sprite[spritenum].yvel);
|
||||
printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+64,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-STATUS2DSIZ+64,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Z-Velocity: %d",sprite[spritenum].zvel);
|
||||
printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+72,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-STATUS2DSIZ+72,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Owner: %d",sprite[spritenum].owner);
|
||||
printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+80,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-STATUS2DSIZ+80,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Clipdist: %d",sprite[spritenum].clipdist);
|
||||
printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+88,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-STATUS2DSIZ+88,color,-1,snotbuf,0);
|
||||
Bsprintf(snotbuf,"Extra: %d",sprite[spritenum].extra);
|
||||
printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+96,editorcolors[11],-1,snotbuf,2);
|
||||
printext16(8+((col-1)*200),ydim-STATUS2DSIZ+96,color,-1,snotbuf,0);
|
||||
}
|
||||
|
||||
void keytimerstuff(void)
|
||||
|
@ -6263,9 +6329,10 @@ void _printmessage16(const char *fmt, ...)
|
|||
clearministatbar16();
|
||||
|
||||
begindrawing();
|
||||
ybase = (overridepm16y >= 0) ? ydim-overridepm16y : ydim-STATUS2DSIZ+128-8;
|
||||
// ybase = (overridepm16y >= 0) ? ydim-overridepm16y : ydim-STATUS2DSIZ+128-8;
|
||||
ybase = ydim-STATUS2DSIZ+128-8;
|
||||
|
||||
printext16((overridepm16y >= 0) ? 200L-24 : 8, ybase+8L, whitecol, -1, snotbuf, 0);
|
||||
printext16(/*(overridepm16y >= 0) ? 200L-24 :*/ 8, ybase+8L, whitecol, -1, snotbuf, 0);
|
||||
enddrawing();
|
||||
}
|
||||
|
||||
|
@ -6446,8 +6513,105 @@ void AutoAlignWalls(int32_t nWall0, int32_t ply)
|
|||
}
|
||||
}
|
||||
|
||||
void test_map(int32_t mode)
|
||||
{
|
||||
if (!mode)
|
||||
updatesector(pos.x, pos.y, &cursectnum);
|
||||
else
|
||||
updatesector(startposx, startposy, &startsectnum);
|
||||
|
||||
/*
|
||||
* vim:ts=4:
|
||||
*/
|
||||
if ((!mode && cursectnum >= 0) || (mode && startsectnum >= 0))
|
||||
{
|
||||
char *param = " -map autosave.map -noinstancechecking";
|
||||
char *fullparam;
|
||||
char current_cwd[BMAX_PATH];
|
||||
int32_t slen = 0;
|
||||
BFILE *fp;
|
||||
|
||||
if ((program_origcwd[0] == '\0') || !getcwd(current_cwd, BMAX_PATH))
|
||||
current_cwd[0] = '\0';
|
||||
else // Before we check if file exists, for the case there's no absolute path.
|
||||
chdir(program_origcwd);
|
||||
|
||||
fp = fopen(game_executable, "rb"); // File exists?
|
||||
if (fp != NULL)
|
||||
fclose(fp);
|
||||
else
|
||||
{
|
||||
#ifdef _WIN32
|
||||
fullparam = Bstrrchr(mapster32_fullpath, '\\');
|
||||
#else
|
||||
fullparam = Bstrrchr(mapster32_fullpath, '/');
|
||||
#endif
|
||||
if (fullparam)
|
||||
{
|
||||
slen = fullparam-mapster32_fullpath+1;
|
||||
Bstrncpy(game_executable, mapster32_fullpath, slen);
|
||||
// game_executable is now expected to not be NULL-terminated!
|
||||
Bstrcpy(game_executable+slen, DEFAULT_GAME_EXEC);
|
||||
}
|
||||
else
|
||||
Bstrcpy(game_executable, DEFAULT_GAME_LOCAL_EXEC);
|
||||
}
|
||||
|
||||
if (current_cwd[0] != '\0') // Temporarily changing back,
|
||||
chdir(current_cwd); // after checking if file exists.
|
||||
|
||||
if (testplay_addparam)
|
||||
slen = Bstrlen(testplay_addparam);
|
||||
|
||||
// Considering the NULL character, quatation marks
|
||||
// and a possible extra space not in testplay_addparam,
|
||||
// the length should be Bstrlen(game_executable)+Bstrlen(param)+(slen+1)+2+1.
|
||||
|
||||
fullparam = Bmalloc(Bstrlen(game_executable)+Bstrlen(param)+slen+4);
|
||||
Bsprintf(fullparam,"\"%s\"",game_executable);
|
||||
|
||||
if (testplay_addparam)
|
||||
{
|
||||
Bstrcat(fullparam, " ");
|
||||
Bstrcat(fullparam, testplay_addparam);
|
||||
}
|
||||
Bstrcat(fullparam, param);
|
||||
|
||||
fixspritesectors(); //Do this before saving!
|
||||
ExtPreSaveMap();
|
||||
if (mode)
|
||||
saveboard("autosave.map",&startposx,&startposy,&startposz,&startang,&startsectnum);
|
||||
else
|
||||
saveboard("autosave.map",&pos.x,&pos.y,&pos.z,&ang,&cursectnum);
|
||||
_printmessage16("Board saved to AUTOSAVE.MAP. Starting the game...");
|
||||
showframe(1);
|
||||
uninitmouse();
|
||||
#ifdef _WIN32
|
||||
{
|
||||
STARTUPINFO si;
|
||||
PROCESS_INFORMATION pi;
|
||||
|
||||
ZeroMemory(&si,sizeof(si));
|
||||
ZeroMemory(&pi,sizeof(pi));
|
||||
si.cb = sizeof(si);
|
||||
|
||||
if (!CreateProcess(NULL,fullparam,NULL,NULL,0,0,NULL,NULL,&si,&pi))
|
||||
printmessage16("Error launching the game!");
|
||||
else WaitForSingleObject(pi.hProcess,INFINITE);
|
||||
}
|
||||
#else
|
||||
if (current_cwd[0] != '\0')
|
||||
{
|
||||
chdir(program_origcwd);
|
||||
system(fullparam);
|
||||
// message("Error launching the game!");
|
||||
chdir(current_cwd);
|
||||
}
|
||||
else system(fullparam);
|
||||
#endif
|
||||
printmessage16("Game process exited");
|
||||
initmouse();
|
||||
|
||||
Bfree(fullparam);
|
||||
}
|
||||
else
|
||||
printmessage16("Position must be in valid player space to test map!");
|
||||
|
||||
}
|
|
@ -553,7 +553,7 @@ int32_t polymer_init(void)
|
|||
{
|
||||
int32_t i;
|
||||
|
||||
if (pr_verbosity >= 1) OSD_Printf("Initalizing Polymer subsystem...\n");
|
||||
if (pr_verbosity >= 1) OSD_Printf("Initializing Polymer subsystem...\n");
|
||||
|
||||
Bmemset(&prsectors[0], 0, sizeof(prsectors[0]) * MAXSECTORS);
|
||||
Bmemset(&prwalls[0], 0, sizeof(prwalls[0]) * MAXWALLS);
|
||||
|
@ -561,7 +561,7 @@ int32_t polymer_init(void)
|
|||
prtess = bgluNewTess();
|
||||
if (prtess == 0)
|
||||
{
|
||||
OSD_Printf("PR : Tesselator initialization failed.\n");
|
||||
OSD_Printf("PR : Tessellation object initialization failed!\n");
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
|
|
@ -866,6 +866,7 @@ void setjoypresscallback(void (*callback)(int32_t, int32_t)) { joypresscallback
|
|||
|
||||
DWORD WINAPI ProcessMouse(LPVOID lpThreadParameter)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(lpThreadParameter);
|
||||
while (moustat && lpDID[MOUSE])
|
||||
{
|
||||
if (!appactive)
|
||||
|
@ -876,7 +877,7 @@ DWORD WINAPI ProcessMouse(LPVOID lpThreadParameter)
|
|||
if ((WaitForSingleObject(inputevt[MOUSE], INFINITE)) != WAIT_OBJECT_0)
|
||||
continue;
|
||||
{
|
||||
DWORD i;
|
||||
/*DWORD i;*/
|
||||
uint32_t t;
|
||||
int32_t result;
|
||||
DIDEVICEOBJECTDATA didod;
|
||||
|
@ -1405,7 +1406,7 @@ static BOOL InitDirectInput(void)
|
|||
*devicedef[devn].did = NULL;
|
||||
|
||||
// initprintf(" - Creating %s device\n", devicedef[devn].name);
|
||||
result = IDirectInput7_CreateDeviceEx(lpDI, &guidDevs[devn], &IID_IDirectInputDevice7, &dev, NULL);
|
||||
result = IDirectInput7_CreateDeviceEx(lpDI, &guidDevs[devn], &IID_IDirectInputDevice7, (void *)&dev, NULL);
|
||||
if FAILED(result) { HorribleDInputDeath("Failed creating device", result); }
|
||||
else if (result != DI_OK) initprintf(" Created device with warning: %s\n",GetDInputError(result));
|
||||
|
||||
|
@ -2846,6 +2847,7 @@ static BOOL WINAPI InitDirectDraw_enum(GUID *lpGUID, LPSTR lpDesc, LPSTR lpName,
|
|||
UNREFERENCED_PARAMETER(lpGUID);
|
||||
UNREFERENCED_PARAMETER(lpName);
|
||||
UNREFERENCED_PARAMETER(lpContext);
|
||||
UNREFERENCED_PARAMETER(lpDesc);
|
||||
// initprintf(" * %s\n", lpDesc);
|
||||
return 1;
|
||||
}
|
||||
|
@ -3400,9 +3402,9 @@ static int32_t SetupOpenGL(int32_t width, int32_t height, int32_t bitspp)
|
|||
glinfo.texcompr = 0;
|
||||
|
||||
// process the extensions string and flag stuff we recognize
|
||||
p = (char *)Bstrdup(glinfo.extensions);
|
||||
p = (GLubyte *)Bstrdup(glinfo.extensions);
|
||||
p3 = p;
|
||||
while ((p2 = (char *)Bstrtoken(p3==p?(char *)p:NULL, " ", (char**)&p3, 1)) != NULL)
|
||||
while ((p2 = (GLubyte *)Bstrtoken(p3==p?(char *)p:NULL, " ", (char**)&p3, 1)) != NULL)
|
||||
{
|
||||
if (!Bstrcmp((char *)p2, "GL_EXT_texture_filter_anisotropic"))
|
||||
{
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -44,7 +44,7 @@ static int32_t g_checkingSwitch = 0, g_currentEvent = -1;
|
|||
static int32_t g_labelsOnly = 0, g_skipKeywordCheck = 0, g_dynamicTileMapping = 0;
|
||||
static int32_t g_numBraces = 0;
|
||||
|
||||
static int32_t C_IncreaseScriptSize(int32_t size);
|
||||
static int32_t C_SetScriptSize(int32_t size);
|
||||
|
||||
int32_t g_numQuoteRedefinitions = 0;
|
||||
|
||||
|
@ -1014,7 +1014,7 @@ void C_FreeHashes(void)
|
|||
#define IFELSE_MAGIC 31337
|
||||
static int32_t g_ifElseAborted;
|
||||
|
||||
static int32_t C_IncreaseScriptSize(int32_t size)
|
||||
static int32_t C_SetScriptSize(int32_t size)
|
||||
{
|
||||
intptr_t oscriptPtr = (unsigned)(g_scriptPtr-script);
|
||||
intptr_t ocaseScriptPtr = (unsigned)(g_caseScriptPtr-script);
|
||||
|
@ -1216,7 +1216,7 @@ static int32_t C_SkipComments(void)
|
|||
while ((c = *textptr));
|
||||
|
||||
if ((unsigned)(g_scriptPtr-script) > (unsigned)(g_scriptSize-32))
|
||||
return C_IncreaseScriptSize(g_scriptSize<<1);
|
||||
return C_SetScriptSize(g_scriptSize<<1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -5544,7 +5544,7 @@ repeatcase:
|
|||
j = *(g_scriptPtr-1);
|
||||
g_scriptPtr--;
|
||||
C_SkipComments();
|
||||
return C_IncreaseScriptSize(j);
|
||||
return C_SetScriptSize(j);
|
||||
|
||||
case CON_FALL:
|
||||
case CON_TIP:
|
||||
|
@ -5802,6 +5802,7 @@ static void C_AddDefaultDefinitions(void)
|
|||
C_AddDefinition("PROJ_DROP",PROJ_DROP,LABEL_DEFINE);
|
||||
C_AddDefinition("PROJ_EXTRA",PROJ_EXTRA,LABEL_DEFINE);
|
||||
C_AddDefinition("PROJ_EXTRA_RAND",PROJ_EXTRA_RAND,LABEL_DEFINE);
|
||||
C_AddDefinition("PROJ_FLASH_COLOR",PROJ_FLASH_COLOR,LABEL_DEFINE);
|
||||
C_AddDefinition("PROJ_HITRADIUS",PROJ_HITRADIUS,LABEL_DEFINE);
|
||||
C_AddDefinition("PROJ_ISOUND",PROJ_ISOUND,LABEL_DEFINE);
|
||||
C_AddDefinition("PROJ_OFFSET",PROJ_OFFSET,LABEL_DEFINE);
|
||||
|
@ -5944,24 +5945,6 @@ void C_Compile(const char *filenam)
|
|||
if (g_numCompilerWarnings|g_numCompilerErrors)
|
||||
initprintf("Found %d warning(s), %d error(s).\n",g_numCompilerWarnings,g_numCompilerErrors);
|
||||
|
||||
/* if (error == 0 && warning != 0)
|
||||
{
|
||||
if (g_groupFileHandle != -1 && g_loadFromGroupOnly == 0)
|
||||
{
|
||||
initprintf("Warning(s) found in file `%s'. Do you want to use the INTERNAL DEFAULTS (y/N)?",filenam);
|
||||
|
||||
i=wm_ynbox("CON File Compilation Warning", "Warning(s) found in file `%s'. Do you want to use the "
|
||||
"INTERNAL DEFAULTS?",filenam);
|
||||
if (i) i = 'y';
|
||||
if (i == 'y' || i == 'Y')
|
||||
{
|
||||
g_loadFromGroupOnly = 1;
|
||||
initprintf(" Yes\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
} */
|
||||
|
||||
if (g_numCompilerErrors)
|
||||
{
|
||||
if (g_loadFromGroupOnly)
|
||||
|
@ -6014,7 +5997,7 @@ void C_Compile(const char *filenam)
|
|||
|
||||
g_totalLines += g_lineNumber;
|
||||
|
||||
C_IncreaseScriptSize(g_scriptPtr-script+8);
|
||||
C_SetScriptSize(g_scriptPtr-script+8);
|
||||
|
||||
flushlogwindow = 0;
|
||||
|
||||
|
|
|
@ -1605,7 +1605,9 @@ static void Gv_AddSystemVars(void)
|
|||
Gv_NewVar("NUMWALLS",(intptr_t)&numwalls, GAMEVAR_SYSTEM | GAMEVAR_SHORTPTR | GAMEVAR_READONLY);
|
||||
Gv_NewVar("NUMSECTORS",(intptr_t)&numsectors, GAMEVAR_SYSTEM | GAMEVAR_SHORTPTR | GAMEVAR_READONLY);
|
||||
|
||||
Gv_NewVar("lastsavepos",(intptr_t)&g_lastSaveSlot, GAMEVAR_SYSTEM | GAMEVAR_INTPTR);
|
||||
Gv_NewVar("lastsavepos",(intptr_t)&g_lastSaveSlot, GAMEVAR_SYSTEM | GAMEVAR_INTPTR | GAMEVAR_SYNCCHECK);
|
||||
|
||||
Gv_NewVar("rendmode",(int32_t)&rendmode, GAMEVAR_READONLY | GAMEVAR_INTPTR | GAMEVAR_SYSTEM | GAMEVAR_SYNCCHECK);
|
||||
}
|
||||
|
||||
void Gv_Init(void)
|
||||
|
@ -1758,4 +1760,5 @@ void Gv_RefreshPointers(void)
|
|||
aGameVars[Gv_GetVarIndex("NUMSECTORS")].val.lValue = (intptr_t)&numsectors;
|
||||
|
||||
aGameVars[Gv_GetVarIndex("lastsavepos")].val.lValue = (intptr_t)&g_lastSaveSlot;
|
||||
aGameVars[Gv_GetVarIndex("rendmode")].val.lValue = (int32_t)&rendmode;
|
||||
}
|
||||
|
|
|
@ -215,10 +215,6 @@ extern int16_t localartlookup[MAXTILES], localartlookupnum;
|
|||
extern int32_t lockclock;
|
||||
extern void clearkeys(void);
|
||||
|
||||
static char program_origcwd[BMAX_PATH];
|
||||
static char *mapster32_fullpath;
|
||||
static char *testplay_addparam = 0;
|
||||
|
||||
int32_t gs_sprite[3][7];
|
||||
char gs_spritewhat[3][7];
|
||||
int16_t gs_cursprite=-1;
|
||||
|
|
Loading…
Reference in a new issue