diff --git a/polymer/eduke32/build/include/editor.h b/polymer/eduke32/build/include/editor.h index b9e0c4282..7a6623f6f 100644 --- a/polymer/eduke32/build/include/editor.h +++ b/polymer/eduke32/build/include/editor.h @@ -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 diff --git a/polymer/eduke32/build/src/build.c b/polymer/eduke32/build/src/build.c index 43d481c3e..717817cc7 100644 --- a/polymer/eduke32/build/src/build.c +++ b/polymer/eduke32/build/src/build.c @@ -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= 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 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 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 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!"); + +} \ No newline at end of file diff --git a/polymer/eduke32/build/src/polymer.c b/polymer/eduke32/build/src/polymer.c index 1fa80d6cc..16394ca29 100644 --- a/polymer/eduke32/build/src/polymer.c +++ b/polymer/eduke32/build/src/polymer.c @@ -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); } diff --git a/polymer/eduke32/build/src/winlayer.c b/polymer/eduke32/build/src/winlayer.c index b87ff367b..3b936fae1 100644 --- a/polymer/eduke32/build/src/winlayer.c +++ b/polymer/eduke32/build/src/winlayer.c @@ -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")) { diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 65d8caa52..6c50019c6 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -87,6 +87,223 @@ static struct strllist #define eitherCTRL (keystatus[KEYSC_LCTRL]| keystatus[KEYSC_RCTRL]) #define eitherSHIFT (keystatus[KEYSC_LSHIFT]|keystatus[KEYSC_RSHIFT]) +static char *type2str[]={"Wall","Sector","Sector","Sprite","Wall"}; + +static CACHE1D_FIND_REC *finddirs=NULL, *findfiles=NULL, *finddirshigh=NULL, *findfileshigh=NULL; +static int32_t numdirs=0, numfiles=0; +static int32_t currentlist=0; +static int32_t mouseaction=0, mouseax=0, mouseay=0; +static int32_t repeatcountx, repeatcounty; +static int32_t infobox=3; // bit0: current window, bit1: mouse pointer, the variable should be renamed + +extern char mskip; +extern int16_t capturecount; +extern int32_t editorgridextent; // in engine.c +extern char game_executable[BMAX_PATH]; + +extern int32_t fillsector(int16_t sectnum, char fillcolor); + +void message(const char *fmt, ...) +{ + char tmpstr[256]; + va_list va; + + va_start(va, fmt); + Bvsnprintf(tmpstr, 256, fmt, va); + va_end(va); + + Bstrcpy(getmessage,tmpstr); + getmessageleng = strlen(getmessage); + getmessagetimeoff = totalclock+120*3; + lastmessagetime = totalclock; + if (!mouseaction) + { + Bstrcat(tmpstr,"\n"); + OSD_Printf(tmpstr); + } +} + +#define UNDODEPTH 96 + +typedef struct _mapundo +{ + int32_t numsectors; + int32_t numwalls; + int32_t numsprites; + + sectortype *sectors; + walltype *walls; + spritetype *sprites; + + int32_t revision; + + uint32_t sectcrc; + uint32_t wallcrc; + uint32_t spritecrc; + + struct _mapundo *next; // 'redo' loads this + struct _mapundo *prev; // 'undo' loads this +} mapundo_t; + +mapundo_t *mapstate = NULL; + +int32_t map_revision = 0; + +void create_map_snapshot(void) +{ + int32_t j; + +// if (mapstate == NULL) mapstate = (mapundo_t *)Bcalloc(1, sizeof(mapundo_t)); + + if (mapstate->prev == NULL && mapstate->next != NULL) // should be the first map version + mapstate = mapstate->next; + + if (mapstate->next != NULL) + { + mapundo_t *next = mapstate->next; + next->prev = NULL; + + while (next->next) + next = next->next; + + while (next->prev) + { + next = next->prev; + if (next->next->sectors && next->next->sectors != next->sectors) Bfree(next->next->sectors); + if (next->next->walls && next->next->walls != next->walls) Bfree(next->next->walls); + if (next->next->sprites && next->next->sprites != next->sprites) Bfree(next->next->sprites); + Bfree(next->next); + } + } + + mapstate->next = (mapundo_t *)Bcalloc(1, sizeof(mapundo_t)); + mapstate->next->prev = mapstate; + + fixspritesectors(); + + numsprites = 0; + for (j=0; jnumsectors = numsectors; + mapstate->numwalls = numwalls; + mapstate->numsprites = numsprites; + + if (mapstate->prev && mapstate->prev->numsectors == numsectors && + mapstate->prev->sectcrc == crc32once((uint8_t *)§or[0],sizeof(sectortype) * numsectors)) + { + mapstate->sectors = mapstate->prev->sectors; + /*OSD_Printf("found a match between undo sectors\n");*/ + } + else + { + mapstate->sectors = (sectortype *)Bcalloc(1, sizeof(sectortype) * numsectors); + Bmemcpy(&mapstate->sectors[0], §or[0], sizeof(sectortype) * numsectors); + mapstate->sectcrc = crc32once((uint8_t *)&mapstate->sectors[0],sizeof(sectortype) * numsectors); + } + + if (mapstate->prev && mapstate->prev->numwalls == numwalls && + mapstate->prev->wallcrc == crc32once((uint8_t *)&wall[0],sizeof(walltype) * numwalls)) + { + mapstate->walls = mapstate->prev->walls; + /*OSD_Printf("found a match between undo walls\n");*/ + } + else + { + mapstate->walls = (walltype *)Bcalloc(1, sizeof(walltype) * numwalls); + Bmemcpy(&mapstate->walls[0], &wall[0], sizeof(walltype) * numwalls); + mapstate->wallcrc = crc32once((uint8_t *)&mapstate->walls[0],sizeof(walltype) * numwalls); + } + + if (mapstate->prev && mapstate->prev->numsprites == numsprites && + mapstate->prev->spritecrc == crc32once((uint8_t *)&sprite[0],sizeof(spritetype) * numsprites)) + { + mapstate->sprites = mapstate->prev->sprites; + /*OSD_Printf("found a match between undo sprites\n");*/ + } + else + { + spritetype *spri; + mapstate->sprites = (spritetype *)Bcalloc(1, sizeof(spritetype) * numsprites); + spri=&mapstate->sprites[0]; + + for (j=0; jspritecrc = crc32once((uint8_t *)&mapstate->sprites[0],sizeof(spritetype) * numsprites); + } + + mapstate->revision = ++map_revision; + mapstate = mapstate->next; +} + +int32_t map_undo(void) +{ + int32_t i; + + if (mapstate == NULL || mapstate->prev == NULL) return 1; + + mapstate = mapstate->prev; + + numsectors = mapstate->numsectors; + numwalls = mapstate->numwalls; + numsprites = mapstate->numsprites; + + initspritelists(); + + Bmemcpy(§or[0], &mapstate->sectors[0], sizeof(sectortype) * numsectors); + Bmemcpy(&wall[0], &mapstate->walls[0], sizeof(walltype) * numwalls); + Bmemcpy(&sprite[0], &mapstate->sprites[0], sizeof(spritetype) * numsprites); + + updatenumsprites(); + + for (i=0; irevision; + + return 0; +} + +int32_t map_redo(void) +{ + int32_t i; + + if (mapstate == NULL || mapstate->next == NULL || !mapstate->next->numsectors) return 1; + + mapstate = mapstate->next; + + numsectors = mapstate->numsectors; + numwalls = mapstate->numwalls; + numsprites = mapstate->numsprites; + + initspritelists(); + + Bmemcpy(§or[0], &mapstate->sectors[0], sizeof(sectortype) * numsectors); + Bmemcpy(&wall[0], &mapstate->walls[0], sizeof(walltype) * numwalls); + Bmemcpy(&sprite[0], &mapstate->sprites[0], sizeof(spritetype) * numsprites); + + updatenumsprites(); + + for (i=0; irevision; + + return 0; +} + static char *Help2d[]= { " 'A = Autosave toggle", @@ -176,21 +393,6 @@ static char *Help3d[]= " HOME = PGUP/PGDN MODIFIER (256 UNITS)", " END = PGUP/PGDN MODIFIER (512 UNITS)", }; -static char *type2str[]={"Wall","Sector","Sector","Sprite","Wall"}; - -static CACHE1D_FIND_REC *finddirs=NULL, *findfiles=NULL, *finddirshigh=NULL, *findfileshigh=NULL; -static int32_t numdirs=0, numfiles=0; -static int32_t currentlist=0; -static int32_t mouseaction=0, mouseax=0, mouseay=0; -static int32_t repeatcountx, repeatcounty; -static int32_t infobox=3; // bit0: current window, bit1: mouse pointer, the variable should be renamed - -extern char mskip; -extern int16_t capturecount; -extern int32_t editorgridextent; // in engine.c -extern char game_executable[BMAX_PATH]; - -extern int32_t fillsector(int16_t sectnum, char fillcolor); static void clearfilenames(void) { @@ -329,6 +531,32 @@ void ExtLoadMap(const char *mapname) pskybits=3; parallaxtype=0; Bsprintf(tempbuf, "Mapster32 - %s",mapname); + + if (mapstate) + { + if (mapstate->next != NULL) + { + mapundo_t *next = mapstate->next; + + while (next->next) + next = next->next; + + while (next->prev) + { + next = next->prev; + if (next->next->sectors && next->next->sectors != next->sectors) Bfree(next->next->sectors); + if (next->next->walls && next->next->walls != next->walls) Bfree(next->next->walls); + if (next->next->sprites && next->next->sprites != next->sprites) Bfree(next->next->sprites); + Bfree(next->next); + } + } + + Bfree(mapstate); + mapstate = NULL; + } + + map_revision = 0; + wm_setapptitle(tempbuf); } @@ -787,7 +1015,7 @@ void ExtShowSectorData(int16_t sectnum) //F5 x2=14; y=4; begindrawing(); - printext16(x*8,ydim16+y*8,editorcolors[11],-1,"Item Count",0); + printext16(x*8,ydim-STATUS2DSIZ+y*8,editorcolors[11],-1,"Item Count",0); enddrawing(); PrintStatus("10%health=",numsprite[COLA],x,y+2,11); PrintStatus("",multisprite[COLA],x2,y+2,9); @@ -804,7 +1032,7 @@ void ExtShowSectorData(int16_t sectnum) //F5 x2=30; y=4; begindrawing(); - printext16(x*8,ydim16+y*8,editorcolors[11],-1,"Inventory",0); + printext16(x*8,ydim-STATUS2DSIZ+y*8,editorcolors[11],-1,"Inventory",0); enddrawing(); PrintStatus("Steroids =",numsprite[STEROIDS],x,y+2,11); PrintStatus("",multisprite[STEROIDS],x2,y+2,9); @@ -824,7 +1052,7 @@ void ExtShowSectorData(int16_t sectnum) //F5 x2=46; y=4; begindrawing(); - printext16(x*8,ydim16+y*8,editorcolors[11],-1,"Weapon Count",0); + printext16(x*8,ydim-STATUS2DSIZ+y*8,editorcolors[11],-1,"Weapon Count",0); enddrawing(); PrintStatus("Pistol =",numsprite[FIRSTGUNSPRITE],x,y+2,11); PrintStatus("",multisprite[FIRSTGUNSPRITE],x2,y+2,9); @@ -849,7 +1077,7 @@ void ExtShowSectorData(int16_t sectnum) //F5 x2=62; y=4; begindrawing(); - printext16(x*8,ydim16+y*8,editorcolors[11],-1,"Ammo Count",0); + printext16(x*8,ydim-STATUS2DSIZ+y*8,editorcolors[11],-1,"Ammo Count",0); enddrawing(); PrintStatus("Pistol =",numsprite[AMMO],x,y+2,11); PrintStatus("",multisprite[AMMO],x2,y+2,9); @@ -871,11 +1099,11 @@ void ExtShowSectorData(int16_t sectnum) //F5 PrintStatus("",multisprite[FREEZEAMMO],x2,y+10,9); begindrawing(); - printext16(65*8,ydim16+4*8,editorcolors[11],-1,"MISC",0); + printext16(65*8,ydim-STATUS2DSIZ+4*8,editorcolors[11],-1,"MISC",0); enddrawing(); PrintStatus("Secrets =",secrets,65,6,11); begindrawing(); - printext16(65*8,ydim16+8*8,editorcolors[11],-1,"ACTORS",0); + printext16(65*8,ydim-STATUS2DSIZ+8*8,editorcolors[11],-1,"ACTORS",0); enddrawing(); PrintStatus("Skill 1 =",totalactors1,65,10,11); PrintStatus("Skill 2 =",totalactors2,65,11,11); @@ -1349,7 +1577,7 @@ HELPFILE_ERROR: } // why can't MSVC allocate an array of variable size?! -#define IHELP_NUMDISPLINES 42 // ((overridepm16y>>4)+(overridepm16y>>5)+(overridepm16y>>7)-2) +#define IHELP_NUMDISPLINES 100 // ((overridepm16y>>4)+(overridepm16y>>5)+(overridepm16y>>7)-2) #define IHELP_PATLEN 45 extern int32_t overridepm16y; // influences printmessage16() and clearmidstatbar16() @@ -1357,20 +1585,30 @@ static void IntegratedHelp() { if (!helppage) return; - overridepm16y = 3*STATUS2DSIZ; + overridepm16y = ydim;//3*STATUS2DSIZ; { - int32_t i, j; + int32_t i, j, col; static int32_t curhp=0, curline=0; int32_t highlighthp=-1, highlightline=-1, lasthighlighttime=0; char disptext[IHELP_NUMDISPLINES][80]; char oldpattern[IHELP_PATLEN+1]; begindrawing(); - clearbuf((char *)(frameplace + (ydim-overridepm16y)*bytesperline), (bytesperline*(overridepm16y-25)) >> 2, 0L); - drawline16(0,ydim-overridepm16y,xdim-1,ydim-overridepm16y,editorcolors[1]); - Bsprintf(tempbuf, "Mapster32 Help Mode"); + col = whitecol-16; + + for (i=ydim-overridepm16y; inumlines) curline++; + if (curline + 32/*+IHELP_NUMDISPLINES*/ < helppage[curhp]->numlines) curline++; } else if (keystatus[KEYSC_PGUP]) // scroll one page up { @@ -1420,7 +1658,7 @@ static void IntegratedHelp() { keystatus[KEYSC_PGDN]=0; i=IHELP_NUMDISPLINES; - while (i>0 && curline+IHELP_NUMDISPLINES < helppage[curhp]->numlines) i--, curline++; + while (i>0 && curline + 32/*+IHELP_NUMDISPLINES*/ < helppage[curhp]->numlines) i--, curline++; } else if (keystatus[KEYSC_SPACE]) // goto next paragraph { @@ -1432,10 +1670,10 @@ static void IntegratedHelp() } if (j==2) { - if (i+IHELP_NUMDISPLINES < helppage[curhp]->numlines) + if (i + 32 /*+IHELP_NUMDISPLINES*/ < helppage[curhp]->numlines) curline=i; - else if (helppage[curhp]->numlines-IHELP_NUMDISPLINES > curline) - curline = helppage[curhp]->numlines-IHELP_NUMDISPLINES; + else if (helppage[curhp]->numlines - 32/*-IHELP_NUMDISPLINES*/ > curline) + curline = helppage[curhp]->numlines - 32/*-IHELP_NUMDISPLINES*/; } } else if (keystatus[KEYSC_BS]) // goto prev paragraph @@ -1456,7 +1694,7 @@ static void IntegratedHelp() else if (keystatus[KEYSC_END]) // goto end of page { keystatus[KEYSC_END]=0; - if ((curline=helppage[curhp]->numlines-IHELP_NUMDISPLINES) >= 0) /**/; + if ((curline=helppage[curhp]->numlines - 32/*-IHELP_NUMDISPLINES*/) >= 0) /**/; else curline=0; } else if (keystatus[KEYSC_LEFT] || keystatus[KEYSC_LBRACK]) // prev page @@ -1491,7 +1729,7 @@ static void IntegratedHelp() while (bad == 0) { Bsprintf(tempbuf,"Search: %s_", pattern); - printmessage16(tempbuf); + _printmessage16(tempbuf); showframe(1); if (handleevents()) @@ -1537,8 +1775,8 @@ static void IntegratedHelp() { curhp = i; - if ((curline=j) <= helppage[i]->numlines-IHELP_NUMDISPLINES) /**/; - else if ((curline=helppage[i]->numlines-IHELP_NUMDISPLINES) >= 0) /**/; + if ((curline=j) <= helppage[i]->numlines - 32 /*-IHELP_NUMDISPLINES*/) /**/; + else if ((curline=helppage[i]->numlines- 32 /*-IHELP_NUMDISPLINES*/) >= 0) /**/; else curline=0; highlighthp = i; @@ -1564,24 +1802,41 @@ ENDFOR1: } } - clearmidstatbar16(); + { + int32_t col = whitecol-16; + begindrawing(); + for (i=ydim-overridepm16y; inumlines) { - printmessage16(helppage[0]->line[curhp]); + _printmessage16(helppage[0]->line[curhp]); } else { for (i=Bsprintf(tempbuf, "%d. (Untitled page)", curhp); i<80; i++) tempbuf[i]=0; - printmessage16(tempbuf); + _printmessage16(tempbuf); } for (i=0; j=(curhp==0)?(i+curline+1):(i+curline), inumlines; i++) { + if (ydim-overridepm16y+28+i*9+32 >= ydim) break; Bmemcpy(disptext[i], helppage[curhp]->line[j], 80); printext16(8,ydim-overridepm16y+28+i*9,editorcolors[10], (j==highlightline && curhp==highlighthp @@ -1592,11 +1847,10 @@ ENDFOR1: showframe(1); } - clearmidstatbar16(); overridepm16y = -1; i=ydim16; ydim16=ydim; - drawline16(0,ydim-STATUS2DSIZ,xdim-1,ydim-STATUS2DSIZ,editorcolors[1]); +// drawline16(0,ydim-STATUS2DSIZ,xdim-1,ydim-STATUS2DSIZ,editorcolors[1]); ydim16=i; // printmessage16(""); showframe(1); @@ -1746,7 +2000,7 @@ static void SoundDisplay() { if (g_numsounds <= 0) return; - overridepm16y = 3*STATUS2DSIZ; + overridepm16y = ydim;//3*STATUS2DSIZ; { int32_t i, j; @@ -1754,15 +2008,6 @@ static void SoundDisplay() static int32_t cursnd=0, curofs=0; char disptext[SOUND_NUMDISPLINES][80]; - begindrawing(); - clearbuf((char *)(frameplace + (ydim-overridepm16y)*bytesperline), (bytesperline*(overridepm16y-25)) >> 2, 0L); - - drawline16(0,ydim-overridepm16y,xdim-1,ydim-overridepm16y,editorcolors[1]); - Bsprintf(tempbuf, "Sounds Listing"); - printext16(9L,ydim2d-overridepm16y+9L,editorcolors[4],-1,tempbuf,0); - printext16(8L,ydim2d-overridepm16y+8L,editorcolors[12],-1,tempbuf,0); - enddrawing(); - // SoundToggle = 1; while (keystatus[KEYSC_ESC]==0 && keystatus[KEYSC_Q]==0 && keystatus[KEYSC_F2]==0 @@ -1774,10 +2019,30 @@ static void SoundDisplay() } idle(); + { + int32_t col = whitecol-16; + + begindrawing(); + for (i=ydim-overridepm16y; i=g_numsounds-SOUND_NUMDISPLINES) - cursnd = g_numsounds-SOUND_NUMDISPLINES, curofs = i-cursnd; + else if (i>=g_numsounds- 32/*SOUND_NUMDISPLINES*/) + cursnd = g_numsounds-32/*SOUND_NUMDISPLINES*/, curofs = i-cursnd; else - curofs = SOUND_NUMDISPLINES/2, cursnd = i-curofs; + curofs = 32/*SOUND_NUMDISPLINES*//2, cursnd = i-curofs; } } else if (keystatus[KEYSC_UP]) // scroll up @@ -1802,9 +2067,9 @@ static void SoundDisplay() else if (keystatus[KEYSC_DOWN]) // scroll down { keystatus[KEYSC_DOWN]=0; - if (curofs0 && curofs0 && curofs<32/*SOUND_NUMDISPLINES*/-1 && cursnd+curofs0 && cursnd+SOUND_NUMDISPLINES < g_numsounds) + while (i>0 && cursnd+32/*SOUND_NUMDISPLINES*/ < g_numsounds) i--, cursnd++; } else if (keystatus[KEYSC_SPACE] || keystatus[KEYSC_ENTER]) // play/stop sound @@ -1844,8 +2109,8 @@ static void SoundDisplay() else if (keystatus[KEYSC_END]) // goto last sound# { keystatus[KEYSC_END]=0; - if ((cursnd=g_numsounds-SOUND_NUMDISPLINES) >= 0) - curofs=SOUND_NUMDISPLINES-1; + if ((cursnd=g_numsounds-32/*SOUND_NUMDISPLINES*/) >= 0) + curofs=32/*SOUND_NUMDISPLINES*/-1; else { cursnd = 0; @@ -1863,7 +2128,7 @@ static void SoundDisplay() while (bad == 0) { Bsprintf(tempbuf,"Sort by: (S)num (D)ef (F)ile ori(g) or (12345)"); - printmessage16(tempbuf); + _printmessage16(tempbuf); showframe(1); if (handleevents()) @@ -1897,15 +2162,15 @@ static void SoundDisplay() } } - clearmidstatbar16(); - - printmessage16(" FILE NAME PITCH RANGE PRI FLAGS VOLUME"); + _printmessage16(" FILE NAME PITCH RANGE PRI FLAGS VOLUME"); for (i=0; j=cursnd+i, i= ydim) break; + Bsprintf(disptext[i], "%4d .................... ................ %6d:%-6d %3d %c%c%c%c%c %6d", // 5678901234567890X23456789012345678901234567 @@ -1936,7 +2201,6 @@ static void SoundDisplay() showframe(1); } - clearmidstatbar16(); overridepm16y = -1; i=ydim16; ydim16=ydim; @@ -2345,7 +2609,7 @@ void ExtEditSectorData(int16_t sectnum) //F7 cursector_lotag = sector[sectnum].lotag; cursector_lotag=getnumber16("Enter search sector lotag : ", cursector_lotag, 65536L,0); Bsprintf(tempbuf,"Search sector lotag %d",cursector_lotag); - printmessage16(tempbuf); + _printmessage16(tempbuf); } else EditSectorData(sectnum); }// end ExtEditSectorData @@ -2368,7 +2632,7 @@ void ExtEditWallData(int16_t wallnum) //F8 // Bsprintf(tempbuf,"Current wall %d lo=%d hi=%d", // curwall,wall[curwall].lotag,wall[curwall].hitag); Bsprintf(tempbuf,"Search wall lo=%d hi=%d",search_lotag,search_hitag); - printmessage16(tempbuf); + _printmessage16(tempbuf); } else EditWallData(wallnum); } @@ -2403,7 +2667,7 @@ static void PrintStatus(char *string,int32_t num,char x,char y,char color) { Bsprintf(tempbuf,"%s %d",string,num); begindrawing(); - printext16(x*8,ydim16+y*8,editorcolors[(int32_t)color],-1,tempbuf,0); + printext16(x*8,ydim-STATUS2DSIZ+y*8,editorcolors[(int32_t)color],-1,tempbuf,0); enddrawing(); } @@ -2474,26 +2738,6 @@ static void ReadGamePalette() ReadPaletteTable(); } -void message(const char *fmt, ...) -{ - char tmpstr[256]; - va_list va; - - va_start(va, fmt); - Bvsnprintf(tmpstr, 256, fmt, va); - va_end(va); - - Bstrcpy(getmessage,tmpstr); - getmessageleng = strlen(getmessage); - getmessagetimeoff = totalclock+120*3; - lastmessagetime = totalclock; - if (!mouseaction) - { - Bstrcat(tmpstr,"\n"); - OSD_Printf(tmpstr); - } -} - static char lockbyte4094; static int32_t lastupdate, mousecol, mouseadd = 1, bstatus; @@ -2573,7 +2817,7 @@ static int32_t AskIfSure(char *text) } else { - printmessage16(text?text:"Are you sure you want to proceed?"); + _printmessage16(text?text:"Are you sure you want to proceed?"); } showframe(1); @@ -7207,7 +7451,7 @@ static void Keys2d(void) if (cursectornum >= 0) showsectordata((int16_t)i+16384); } - else if (!(keystatus[KEYSC_F7]|keystatus[KEYSC_F8])) + else if (!(keystatus[KEYSC_F5]|keystatus[KEYSC_F6]|keystatus[KEYSC_F7]|keystatus[KEYSC_F8])) { if (pointhighlight >= 16384) { @@ -10012,11 +10256,10 @@ static void Keys2d3d(void) { int32_t i; - if (keystatus[KEYSC_F12]) //F12 + if (mapstate == NULL) { - screencapture("captxxxx.tga",keystatus[KEYSC_LSHIFT]|keystatus[KEYSC_RSHIFT]); - message("Saved screenshot %04d",capturecount-1); - keystatus[KEYSC_F12] = 0; + mapstate = (mapundo_t *)Bcalloc(1, sizeof(mapundo_t)); + create_map_snapshot(); // initial map state } if (keystatus[KEYSC_QUOTE] && keystatus[KEYSC_A]) // ' a @@ -10046,19 +10289,19 @@ static void Keys2d3d(void) else message("Sprite clipping enabled"); } - if ((totalclock > autosavetimer) && (autosave)) + if (eitherCTRL && keystatus[KEYSC_Z]) // CTRL+Z { - if (asksave == 1) + keystatus[KEYSC_Z] = 0; + if (eitherSHIFT) { - fixspritesectors(); //Do this before saving! - // updatesector(startposx,startposy,&startsectnum); - ExtPreSaveMap(); - saveboard("autosave.map",&startposx,&startposy,&startposz,&startang,&startsectnum); - ExtSaveMap("autosave.map"); - message("Board autosaved to AUTOSAVE.MAP"); - asksave = 2; + if (map_redo()) message("Nothing to redo!"); + else message("Restored undo rev %d",map_revision); + } + else + { + if (map_undo()) message("Nothing to undo!"); + else message("Restored undo rev %d",map_revision); } - autosavetimer = totalclock+120*autosave; } if (eitherCTRL) //CTRL @@ -10076,106 +10319,7 @@ static void Keys2d3d(void) if (keystatus[KEYSC_P]) // Ctrl-P: Map playtesting { keystatus[KEYSC_P] = 0; - - if (!eitherALT) - updatesector(pos.x, pos.y, &cursectnum); - else - updatesector(startposx, startposy, &startsectnum); - - if ((!eitherALT && cursectnum >= 0) || (eitherALT && 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 (eitherALT) - saveboard("autosave.map",&startposx,&startposy,&startposz,&startang,&startsectnum); - else - saveboard("autosave.map",&pos.x,&pos.y,&pos.z,&ang,&cursectnum); - message("Board saved to AUTOSAVE.MAP. Starting the game..."); - - 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)) - message("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 - // message("Error launching the game!"); - message("Game process exited"); - initmouse(); - - Bfree(fullparam); - } - else - message("Position must be in valid player space to test map!"); + test_map(eitherALT); } if (keystatus[KEYSC_S]) // S @@ -10356,6 +10500,9 @@ void ExtCheckKeys(void) } } readmousebstatus(&bstatus); + + Keys2d3d(); + if (qsetmode == 200) //In 3D mode { Keys3d(); @@ -10367,7 +10514,35 @@ void ExtCheckKeys(void) return; } Keys2d(); - Keys2d3d(); + + if (asksave == 1 && bstatus == 0 && mapstate) + { +// message("Saved undo rev %d",map_revision); + create_map_snapshot(); + asksave = 2; + } + + if ((totalclock > autosavetimer) && (autosave)) + { + if (asksave == 2) + { + fixspritesectors(); //Do this before saving! + // updatesector(startposx,startposy,&startsectnum); + ExtPreSaveMap(); + saveboard("autosave.map",&startposx,&startposy,&startposz,&startang,&startsectnum); + ExtSaveMap("autosave.map"); + message("Board autosaved to AUTOSAVE.MAP"); + asksave = 3; + } + autosavetimer = totalclock+120*autosave; + } + + if (keystatus[KEYSC_F12]) //F12 + { + screencapture("captxxxx.tga",keystatus[KEYSC_LSHIFT]|keystatus[KEYSC_RSHIFT]); + message("Saved screenshot %04d",capturecount-1); + keystatus[KEYSC_F12] = 0; + } } void faketimerhandler(void) @@ -10526,7 +10701,23 @@ static void EditSectorData(int16_t sectnum) int32_t xpos = 208, ypos = ydim-STATUS2DSIZ+48; disptext[dispwidth] = 0; - clearmidstatbar16(); + col = whitecol-16; + + begindrawing(); + for (i=ydim-STATUS2DSIZ+16; i to exit"); + _printmessage16("Select an option, press to exit"); if (keystatus[KEYSC_DOWN]) { if (row < rowmax) @@ -11750,39 +11989,8 @@ static void FuncMenu(void) begindrawing(); printext16(xpos,ypos+row*MENU_Y_SPACING,editorcolors[11],editorcolors[0],disptext,0); enddrawing(); - clearmidstatbar16(); + /*clearmidstatbar16();*/ showframe(1); keystatus[KEYSC_ESC] = 0; } -/* -#define UNDODEPTH 96 -typedef struct _mapundo -{ - int32_t numsectors; - int32_t numwalls; - int32_t numsprites; - - sectortype *sectors; - walltype *walls; - spritetype *sprites; - - int16_t *headspritesect; - int16_t *prevspritesect; - int16_t *nextspritesect; - - int16_t *headspritestat; - int16_t *prevspritestat; - int16_t *nextspritestat; - - int32_t revision; - - struct _mapundo *next; // 'redo' loads this - struct _mapundo *prev; // 'undo' loads this -} mapundo_t; - -mapundo_t *undopos = NULL; -mapundo_t undoredo[UNDODEPTH]; - -int32_t map_revision = 0; -*/ diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index d979df639..d32880201 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -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; diff --git a/polymer/eduke32/source/gamevars.c b/polymer/eduke32/source/gamevars.c index c2af81f4d..48ec09c4d 100644 --- a/polymer/eduke32/source/gamevars.c +++ b/polymer/eduke32/source/gamevars.c @@ -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; } diff --git a/polymer/eduke32/source/mapster32.h b/polymer/eduke32/source/mapster32.h index f59e13573..126c49df0 100644 --- a/polymer/eduke32/source/mapster32.h +++ b/polymer/eduke32/source/mapster32.h @@ -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;