mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
Misc tweaks, patch from HelixHorned, half of gameexec.c moved to gamestructures.c
git-svn-id: https://svn.eduke32.com/eduke32@1048 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
fbf25c7483
commit
7b94cf4758
12 changed files with 4236 additions and 4117 deletions
|
@ -73,8 +73,6 @@ extern void ExtShowSpriteData(short spritenum);
|
||||||
extern void ExtEditSectorData(short sectnum);
|
extern void ExtEditSectorData(short sectnum);
|
||||||
extern void ExtEditWallData(short wallnum);
|
extern void ExtEditWallData(short wallnum);
|
||||||
extern void ExtEditSpriteData(short spritenum);
|
extern void ExtEditSpriteData(short spritenum);
|
||||||
extern char ExtCustomSpriteColor(short picnum);
|
|
||||||
extern void ExtSetupSpecialSpriteCols(void);
|
|
||||||
|
|
||||||
extern int circlewall;
|
extern int circlewall;
|
||||||
|
|
||||||
|
|
|
@ -45,8 +45,6 @@ extern void ExtShowSpriteData(short spritenum);
|
||||||
extern void ExtEditSectorData(short sectnum);
|
extern void ExtEditSectorData(short sectnum);
|
||||||
extern void ExtEditWallData(short wallnum);
|
extern void ExtEditWallData(short wallnum);
|
||||||
extern void ExtEditSpriteData(short spritenum);
|
extern void ExtEditSpriteData(short spritenum);
|
||||||
extern char ExtCustomSpriteColor(short picnum);
|
|
||||||
extern void ExtSetupSpecialSpriteCols(void);
|
|
||||||
|
|
||||||
extern char spritecol2d[MAXTILES][2];
|
extern char spritecol2d[MAXTILES][2];
|
||||||
|
|
||||||
|
@ -368,8 +366,6 @@ int app_main(int argc, const char **argv)
|
||||||
Bstrcpy(kensig,"Based on BUILD by Ken Silverman");
|
Bstrcpy(kensig,"Based on BUILD by Ken Silverman");
|
||||||
initcrc();
|
initcrc();
|
||||||
|
|
||||||
ExtSetupSpecialSpriteCols();
|
|
||||||
|
|
||||||
if (!loaddefinitionsfile(defsfilename)) initprintf("Definitions file loaded.\n");
|
if (!loaddefinitionsfile(defsfilename)) initprintf("Definitions file loaded.\n");
|
||||||
|
|
||||||
if (setgamemode(fullscreen,xdimgame,ydimgame,bppgame) < 0)
|
if (setgamemode(fullscreen,xdimgame,ydimgame,bppgame) < 0)
|
||||||
|
@ -2977,10 +2973,12 @@ void overheadeditor(void)
|
||||||
drawline16(0,ydim-STATUS2DSIZ+24,xdim-1,ydim-STATUS2DSIZ+24,1);
|
drawline16(0,ydim-STATUS2DSIZ+24,xdim-1,ydim-STATUS2DSIZ+24,1);
|
||||||
drawline16(192-24,ydim-STATUS2DSIZ,192-24,ydim-STATUS2DSIZ+24,1); */
|
drawline16(192-24,ydim-STATUS2DSIZ,192-24,ydim-STATUS2DSIZ+24,1); */
|
||||||
if (totalclock < 120*5)
|
if (totalclock < 120*5)
|
||||||
printext16(8L,ydim-STATUS2DSIZ+32L,9,-1,kensig,0);
|
{
|
||||||
|
printmessage16("Press F1 for help");
|
||||||
|
printext16(8L,ydim-STATUS2DSIZ+32L,9,-1,kensig,0);
|
||||||
|
}
|
||||||
|
|
||||||
// printmessage16("Version: "VERSION);
|
// printmessage16("Version: "VERSION);
|
||||||
if (totalclock < 30) printmessage16("Press F1 for help");
|
|
||||||
// drawline16(0,ydim-1-20,xdim-1,ydim-1-20,1);
|
// drawline16(0,ydim-1-20,xdim-1,ydim-1-20,1);
|
||||||
drawline16(256,ydim-1-20,256,ydim-1,1);
|
drawline16(256,ydim-1-20,256,ydim-1,1);
|
||||||
ydim16 = ydim-STATUS2DSIZ;
|
ydim16 = ydim-STATUS2DSIZ;
|
||||||
|
@ -3135,8 +3133,9 @@ void overheadeditor(void)
|
||||||
draw2dscreen(posx,posy,ang,zoom,grid);
|
draw2dscreen(posx,posy,ang,zoom,grid);
|
||||||
|
|
||||||
begindrawing(); //{{{
|
begindrawing(); //{{{
|
||||||
if ((showtags == 1) && (zoom >= 768))
|
if (showtags == 1)
|
||||||
{
|
{
|
||||||
|
if (zoom >= 768)
|
||||||
for (i=0;i<numsectors;i++)
|
for (i=0;i<numsectors;i++)
|
||||||
{
|
{
|
||||||
dabuffer = (char *)ExtGetSectorCaption(i);
|
dabuffer = (char *)ExtGetSectorCaption(i);
|
||||||
|
@ -3192,6 +3191,7 @@ void overheadeditor(void)
|
||||||
if (newnumwalls >= 0) i = newnumwalls-1;
|
if (newnumwalls >= 0) i = newnumwalls-1;
|
||||||
for (wal=&wall[i];i>=0;i--,wal--)
|
for (wal=&wall[i];i>=0;i--,wal--)
|
||||||
{
|
{
|
||||||
|
if (zoom < 768 && !(wal->cstat & (1<<14))) continue;
|
||||||
//Get average point of wall
|
//Get average point of wall
|
||||||
dax = ((wal->x+wall[wal->point2].x)>>1);
|
dax = ((wal->x+wall[wal->point2].x)>>1);
|
||||||
day = ((wal->y+wall[wal->point2].y)>>1);
|
day = ((wal->y+wall[wal->point2].y)>>1);
|
||||||
|
@ -3221,6 +3221,7 @@ void overheadeditor(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
i = 0; j = numsprites;
|
i = 0; j = numsprites;
|
||||||
|
if (zoom >= 768)
|
||||||
while ((j > 0) && (i < MAXSPRITES))
|
while ((j > 0) && (i < MAXSPRITES))
|
||||||
{
|
{
|
||||||
if (sprite[i].statnum < MAXSTATUS)
|
if (sprite[i].statnum < MAXSTATUS)
|
||||||
|
@ -3441,7 +3442,7 @@ void overheadeditor(void)
|
||||||
j = nextspritesect[j];
|
j = nextspritesect[j];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (k == 0) keystatus[0x2d] = 0;
|
/*if (k == 0)*/ keystatus[0x2d] = 0;
|
||||||
printmessage16("Selected sector(s) flipped");
|
printmessage16("Selected sector(s) flipped");
|
||||||
asksave = 1;
|
asksave = 1;
|
||||||
}
|
}
|
||||||
|
@ -3559,7 +3560,7 @@ void overheadeditor(void)
|
||||||
j = nextspritesect[j];
|
j = nextspritesect[j];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (k == 0) keystatus[0x15] = 0;
|
/*if (k == 0)*/ keystatus[0x15] = 0;
|
||||||
printmessage16("Selected sector(s) flipped");
|
printmessage16("Selected sector(s) flipped");
|
||||||
asksave = 1;
|
asksave = 1;
|
||||||
}
|
}
|
||||||
|
@ -3657,7 +3658,7 @@ void overheadeditor(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (keystatus[0x33]) // , (2D)
|
if (keystatus[0x33] || (bstatus&1 && bstatus&32)) // , (2D)
|
||||||
{
|
{
|
||||||
if (highlightsectorcnt > 0)
|
if (highlightsectorcnt > 0)
|
||||||
{
|
{
|
||||||
|
@ -3732,6 +3733,8 @@ void overheadeditor(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (k == 0) keystatus[0x33] = 0;
|
if (k == 0) keystatus[0x33] = 0;
|
||||||
|
mouseb &= ~32;
|
||||||
|
bstatus &= ~32;
|
||||||
asksave = 1;
|
asksave = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -3747,12 +3750,15 @@ void overheadeditor(void)
|
||||||
keystatus[0x33] = 0;
|
keystatus[0x33] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mouseb &= ~32;
|
||||||
|
bstatus &= ~32;
|
||||||
|
|
||||||
clearmidstatbar16();
|
clearmidstatbar16();
|
||||||
showspritedata((short)pointhighlight-16384);
|
showspritedata((short)pointhighlight-16384);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (keystatus[0x34]) // . (2D)
|
if (keystatus[0x34] || (bstatus&1 && bstatus&16)) // . (2D)
|
||||||
{
|
{
|
||||||
if (highlightsectorcnt > 0)
|
if (highlightsectorcnt > 0)
|
||||||
{
|
{
|
||||||
|
@ -3827,6 +3833,8 @@ void overheadeditor(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (k == 0) keystatus[0x34] = 0;
|
if (k == 0) keystatus[0x34] = 0;
|
||||||
|
mouseb &= ~16;
|
||||||
|
bstatus &= ~16;
|
||||||
asksave = 1;
|
asksave = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -3842,6 +3850,8 @@ void overheadeditor(void)
|
||||||
keystatus[0x34] = 0;
|
keystatus[0x34] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mouseb &= ~16;
|
||||||
|
bstatus &= ~16;
|
||||||
clearmidstatbar16();
|
clearmidstatbar16();
|
||||||
showspritedata((short)pointhighlight-16384);
|
showspritedata((short)pointhighlight-16384);
|
||||||
}
|
}
|
||||||
|
@ -4672,6 +4682,10 @@ void overheadeditor(void)
|
||||||
printmessage16("Sectors joined.");
|
printmessage16("Sectors joined.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printmessage16("No sectors joined.");
|
||||||
|
}
|
||||||
joinsector[0] = -1;
|
joinsector[0] = -1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -6705,12 +6719,18 @@ void fixrepeats(short i)
|
||||||
wall[i].xrepeat = (char)min(max(mulscale10(dist,day),1),255);
|
wall[i].xrepeat = (char)min(max(mulscale10(dist,day),1),255);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int overridepm16y = -1;
|
||||||
|
|
||||||
void clearmidstatbar16(void)
|
void clearmidstatbar16(void)
|
||||||
{
|
{
|
||||||
begindrawing();
|
begindrawing();
|
||||||
ydim16 = ydim;
|
ydim16 = ydim;
|
||||||
// clearbuf((char *)(frameplace + (bytesperline*(ydim-STATUS2DSIZ+25L))),(bytesperline*(STATUS2DSIZ-1-(25<<1))) >> 2, 0x08080808l);
|
// clearbuf((char *)(frameplace + (bytesperline*(ydim-STATUS2DSIZ+25L))),(bytesperline*(STATUS2DSIZ-1-(25<<1))) >> 2, 0x08080808l);
|
||||||
clearbuf((char *)(frameplace + (bytesperline*(ydim-STATUS2DSIZ+25L))),(bytesperline*(STATUS2DSIZ+2-(25<<1))) >> 2, 0x00000000l);
|
if (overridepm16y < 0)
|
||||||
|
clearbuf((char *)(frameplace + (bytesperline*(ydim-STATUS2DSIZ+25L))),(bytesperline*(STATUS2DSIZ+2-(25<<1))) >> 2, 0x00000000l);
|
||||||
|
else
|
||||||
|
clearbuf((char *)(frameplace + (bytesperline*(ydim-3*STATUS2DSIZ+25L))),(bytesperline*(3*STATUS2DSIZ+2-(25<<1))) >> 2, 0x00000000l);
|
||||||
drawline16(0,ydim-STATUS2DSIZ,0,ydim-1,7);
|
drawline16(0,ydim-STATUS2DSIZ,0,ydim-1,7);
|
||||||
drawline16(xdim-1,ydim-STATUS2DSIZ,xdim-1,ydim-1,7);
|
drawline16(xdim-1,ydim-STATUS2DSIZ,xdim-1,ydim-1,7);
|
||||||
ydim16 = ydim-STATUS2DSIZ;
|
ydim16 = ydim-STATUS2DSIZ;
|
||||||
|
@ -7823,7 +7843,7 @@ void keytimerstuff(void)
|
||||||
|
|
||||||
void _printmessage16(const char *fmt, ...)
|
void _printmessage16(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
int i;
|
int i, ybase;
|
||||||
char snotbuf[60];
|
char snotbuf[60];
|
||||||
char tmpstr[64];
|
char tmpstr[64];
|
||||||
va_list va;
|
va_list va;
|
||||||
|
@ -7845,7 +7865,8 @@ void _printmessage16(const char *fmt, ...)
|
||||||
}
|
}
|
||||||
snotbuf[54] = 0;
|
snotbuf[54] = 0;
|
||||||
begindrawing();
|
begindrawing();
|
||||||
printext16(200L-24, ydim-STATUS2DSIZ+8L, 9, 0, snotbuf, 0);
|
ybase = (overridepm16y >= 0) ? overridepm16y : ydim-STATUS2DSIZ;
|
||||||
|
printext16(200L-24, ybase+8L, 9, 0, snotbuf, 0);
|
||||||
i = 0;
|
i = 0;
|
||||||
while (i < 54)
|
while (i < 54)
|
||||||
{
|
{
|
||||||
|
@ -7853,7 +7874,7 @@ void _printmessage16(const char *fmt, ...)
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
snotbuf[54] = 0;
|
snotbuf[54] = 0;
|
||||||
printext16(200L-24, ydim-STATUS2DSIZ+17L, 9, 0, snotbuf, 0);
|
printext16(200L-24, ybase+17L, 9, 0, snotbuf, 0);
|
||||||
enddrawing();
|
enddrawing();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11133,7 +11133,7 @@ void draw2dscreen(int posxe, int posye, short ange, int zoome, short gride)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
col = 31;
|
col = 33;
|
||||||
if ((wal->cstat&1) != 0) col = 5;
|
if ((wal->cstat&1) != 0) col = 5;
|
||||||
if (wal->nextwall!=-1&&((wal->cstat^wall[wal->nextwall].cstat)&1)) col = 2;
|
if (wal->nextwall!=-1&&((wal->cstat^wall[wal->nextwall].cstat)&1)) col = 2;
|
||||||
if ((i == linehighlight) || ((linehighlight >= 0) && (i == wall[linehighlight].nextwall)))
|
if ((i == linehighlight) || ((linehighlight >= 0) && (i == wall[linehighlight].nextwall)))
|
||||||
|
|
|
@ -115,6 +115,7 @@ GAMEOBJS=$(OBJ)/game.$o \
|
||||||
$(OBJ)/config.$o \
|
$(OBJ)/config.$o \
|
||||||
$(OBJ)/gamedef.$o \
|
$(OBJ)/gamedef.$o \
|
||||||
$(OBJ)/gameexec.$o \
|
$(OBJ)/gameexec.$o \
|
||||||
|
$(OBJ)/gamestructures.$o \
|
||||||
$(OBJ)/gamevars.$o \
|
$(OBJ)/gamevars.$o \
|
||||||
$(OBJ)/global.$o \
|
$(OBJ)/global.$o \
|
||||||
$(OBJ)/menus.$o \
|
$(OBJ)/menus.$o \
|
||||||
|
|
|
@ -6,6 +6,7 @@ $(OBJ)/actors.$o: $(SRC)/actors.c $(duke3d_h)
|
||||||
$(OBJ)/anim.$o: $(SRC)/anim.c $(duke3d_h) $(SRC)/jmact/animlib.h
|
$(OBJ)/anim.$o: $(SRC)/anim.c $(duke3d_h) $(SRC)/jmact/animlib.h
|
||||||
$(OBJ)/gamedef.$o: $(SRC)/gamedef.c $(duke3d_h) $(gamedef_h)
|
$(OBJ)/gamedef.$o: $(SRC)/gamedef.c $(duke3d_h) $(gamedef_h)
|
||||||
$(OBJ)/gameexec.$o: $(SRC)/gameexec.c $(duke3d_h) $(gamedef_h)
|
$(OBJ)/gameexec.$o: $(SRC)/gameexec.c $(duke3d_h) $(gamedef_h)
|
||||||
|
$(OBJ)/gamestructures.$o: $(SRC)/gamestructures.c $(duke3d_h) $(gamedef_h)
|
||||||
$(OBJ)/gamevars.$o: $(SRC)/gamevars.c $(duke3d_h) $(gamedef_h)
|
$(OBJ)/gamevars.$o: $(SRC)/gamevars.c $(duke3d_h) $(gamedef_h)
|
||||||
$(OBJ)/global.$o: $(SRC)/*.c $(SRC)/global.c $(duke3d_h)
|
$(OBJ)/global.$o: $(SRC)/*.c $(SRC)/global.c $(duke3d_h)
|
||||||
$(OBJ)/mdump.$o: $(SRC)/mdump.cpp $(SRC)/mdump.h
|
$(OBJ)/mdump.$o: $(SRC)/mdump.cpp $(SRC)/mdump.h
|
||||||
|
|
|
@ -77,6 +77,7 @@ GAMEOBJS=$(OBJ)\game.$o \
|
||||||
$(OBJ)\anim.$o \
|
$(OBJ)\anim.$o \
|
||||||
$(OBJ)\gamedef.$o \
|
$(OBJ)\gamedef.$o \
|
||||||
$(OBJ)\gameexec.$o \
|
$(OBJ)\gameexec.$o \
|
||||||
|
$(OBJ)\gamestructures.$o \
|
||||||
$(OBJ)\gamevars.$o \
|
$(OBJ)\gamevars.$o \
|
||||||
$(OBJ)\global.$o \
|
$(OBJ)\global.$o \
|
||||||
$(OBJ)\menus.$o \
|
$(OBJ)\menus.$o \
|
||||||
|
|
|
@ -58,6 +58,7 @@ GAMEOBJS=$(OBJ)\game.$o &
|
||||||
$(OBJ)\anim.$o &
|
$(OBJ)\anim.$o &
|
||||||
$(OBJ)\gamedef.$o &
|
$(OBJ)\gamedef.$o &
|
||||||
$(OBJ)\gameexec.$o &
|
$(OBJ)\gameexec.$o &
|
||||||
|
$(OBJ)\gamestructures.$o &
|
||||||
$(OBJ)\gamevars.$o &
|
$(OBJ)\gamevars.$o &
|
||||||
$(OBJ)\global.$o &
|
$(OBJ)\global.$o &
|
||||||
$(OBJ)\menus.$o &
|
$(OBJ)\menus.$o &
|
||||||
|
|
|
@ -43,7 +43,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define BUILDDATE " 20080828"
|
#define BUILDDATE " 20080902"
|
||||||
#define VERSION " 1.2.0devel"
|
#define VERSION " 1.2.0devel"
|
||||||
|
|
||||||
static int floor_over_floor;
|
static int floor_over_floor;
|
||||||
|
@ -1158,14 +1158,23 @@ typedef struct helppage_
|
||||||
helppage_t **helppage=NULL;
|
helppage_t **helppage=NULL;
|
||||||
int numhelppages=0;
|
int numhelppages=0;
|
||||||
|
|
||||||
|
static int emptyline(const char *start)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i=0; i<80; i++)
|
||||||
|
{
|
||||||
|
if (start[i]=='\n' || !start[i]) break;
|
||||||
|
if (start[i]!=' ' && start[i]!='\t' && start[i]!='\r')
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
static int newpage(const char *start)
|
static int newpage(const char *start)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i=80-1; i>=0; i--)
|
for (i=80-1; i>=0; i--)
|
||||||
{
|
{
|
||||||
// if (start[i]=='\n' || !start[i]) break;
|
|
||||||
// if (start[i]!=' ' && start[i]!='\t' && start[i]!='\r')
|
|
||||||
// return 0;
|
|
||||||
if (start[i] == '^' && start[i+1] == 'P')
|
if (start[i] == '^' && start[i+1] == 'P')
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -1282,21 +1291,32 @@ HELPFILE_ERROR:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define IHELP_NUMDISPLINES 10
|
#define IHELP_NUMDISPLINES 42
|
||||||
#define IHELP_PATLEN 45
|
#define IHELP_PATLEN 45
|
||||||
|
extern int overridepm16y; // influences printmessage16() and clearmidstatbar16()
|
||||||
|
|
||||||
static void IntegratedHelp()
|
static void IntegratedHelp()
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
int curhp=0, curline=0;
|
static int curhp=0, curline=0;
|
||||||
int highlighthp=-1, highlightline=-1, lasthighlighttime=0;
|
int highlighthp=-1, highlightline=-1, lasthighlighttime=0;
|
||||||
char disptext[IHELP_NUMDISPLINES][80];
|
char disptext[IHELP_NUMDISPLINES][80];
|
||||||
char oldpattern[IHELP_PATLEN+1];
|
char oldpattern[IHELP_PATLEN+1];
|
||||||
|
|
||||||
if (!helppage) return;
|
if (!helppage) return;
|
||||||
|
|
||||||
|
begindrawing();
|
||||||
|
clearbuf((char *)(frameplace + (ydim-3*STATUS2DSIZ)*bytesperline), (bytesperline*(3*STATUS2DSIZ-25)) >> 2, 0L);
|
||||||
|
|
||||||
|
drawline16(0,ydim-3*STATUS2DSIZ,xdim-1,ydim-3*STATUS2DSIZ,1);
|
||||||
|
Bsprintf(tempbuf, "Mapster32" VERSION);
|
||||||
|
printext16(9L,ydim2d-3*STATUS2DSIZ+9L,4,-1,tempbuf,0);
|
||||||
|
printext16(8L,ydim2d-3*STATUS2DSIZ+8L,12,-1,tempbuf,0);
|
||||||
|
enddrawing();
|
||||||
|
|
||||||
memset(oldpattern, 0, sizeof(char));
|
memset(oldpattern, 0, sizeof(char));
|
||||||
clearmidstatbar16();
|
overridepm16y = ydim-3*STATUS2DSIZ;
|
||||||
|
// clearmidstatbar16();
|
||||||
|
|
||||||
while (keystatus[KEYSC_ESC]==0 && keystatus[KEYSC_Q]==0)
|
while (keystatus[KEYSC_ESC]==0 && keystatus[KEYSC_Q]==0)
|
||||||
{
|
{
|
||||||
|
@ -1342,6 +1362,32 @@ static void IntegratedHelp()
|
||||||
i=IHELP_NUMDISPLINES;
|
i=IHELP_NUMDISPLINES;
|
||||||
while (i>0 && curline+IHELP_NUMDISPLINES < helppage[curhp]->numlines) i--, curline++;
|
while (i>0 && curline+IHELP_NUMDISPLINES < helppage[curhp]->numlines) i--, curline++;
|
||||||
}
|
}
|
||||||
|
else if (keystatus[KEYSC_SPACE]) // goto next paragraph
|
||||||
|
{
|
||||||
|
keystatus[KEYSC_SPACE]=0;
|
||||||
|
for (i=curline, j=0; i < helppage[curhp]->numlines; i++)
|
||||||
|
{
|
||||||
|
if (emptyline(helppage[curhp]->line[i])) { j=1; continue; }
|
||||||
|
if (j==1 && !emptyline(helppage[curhp]->line[i])) { j=2; break; }
|
||||||
|
}
|
||||||
|
if (j==2)
|
||||||
|
{
|
||||||
|
if (i+IHELP_NUMDISPLINES < helppage[curhp]->numlines)
|
||||||
|
curline=i;
|
||||||
|
else if (helppage[curhp]->numlines-IHELP_NUMDISPLINES > curline)
|
||||||
|
curline = helppage[curhp]->numlines-IHELP_NUMDISPLINES;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (keystatus[KEYSC_BS]) // goto prev paragraph
|
||||||
|
{
|
||||||
|
keystatus[KEYSC_BS]=0;
|
||||||
|
for (i=curline-1, j=0; i>=0; i--)
|
||||||
|
{
|
||||||
|
if (!emptyline(helppage[curhp]->line[i])) { j=1; continue; }
|
||||||
|
if (j==1 && emptyline(helppage[curhp]->line[i])) { j=2; break; }
|
||||||
|
}
|
||||||
|
if (j==2 || i==-1) curline=i+1;
|
||||||
|
}
|
||||||
else if (keystatus[KEYSC_HOME]) // goto beginning of page
|
else if (keystatus[KEYSC_HOME]) // goto beginning of page
|
||||||
{
|
{
|
||||||
keystatus[KEYSC_HOME]=0;
|
keystatus[KEYSC_HOME]=0;
|
||||||
|
@ -1353,18 +1399,18 @@ static void IntegratedHelp()
|
||||||
if ((curline=helppage[curhp]->numlines-IHELP_NUMDISPLINES) >= 0) /**/;
|
if ((curline=helppage[curhp]->numlines-IHELP_NUMDISPLINES) >= 0) /**/;
|
||||||
else curline=0;
|
else curline=0;
|
||||||
}
|
}
|
||||||
else if (keystatus[KEYSC_LEFT]) // prev page
|
else if (keystatus[KEYSC_LEFT] || keystatus[KEYSC_LBRACK]) // prev page
|
||||||
{
|
{
|
||||||
keystatus[KEYSC_LEFT]=0;
|
keystatus[KEYSC_LEFT] = keystatus[KEYSC_LBRACK] = 0;
|
||||||
if (curhp>0)
|
if (curhp>0)
|
||||||
{
|
{
|
||||||
curhp--;
|
curhp--;
|
||||||
curline=0;
|
curline=0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (keystatus[KEYSC_RIGHT]) // next page
|
else if (keystatus[KEYSC_RIGHT] || keystatus[KEYSC_RBRACK]) // next page
|
||||||
{
|
{
|
||||||
keystatus[KEYSC_RIGHT]=0;
|
keystatus[KEYSC_RIGHT] = keystatus[KEYSC_RBRACK] = 0;
|
||||||
if (curhp<numhelppages-1)
|
if (curhp<numhelppages-1)
|
||||||
{
|
{
|
||||||
curhp++;
|
curhp++;
|
||||||
|
@ -1454,6 +1500,7 @@ ENDFOR1:
|
||||||
if (i--<12 && i<numhelppages)
|
if (i--<12 && i<numhelppages)
|
||||||
{
|
{
|
||||||
curhp=i;
|
curhp=i;
|
||||||
|
curline=0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1473,7 +1520,7 @@ ENDFOR1:
|
||||||
i<IHELP_NUMDISPLINES && j<helppage[curhp]->numlines; i++)
|
i<IHELP_NUMDISPLINES && j<helppage[curhp]->numlines; i++)
|
||||||
{
|
{
|
||||||
Bmemcpy(disptext[i], helppage[curhp]->line[j], 80);
|
Bmemcpy(disptext[i], helppage[curhp]->line[j], 80);
|
||||||
printext16(8,ydim-STATUS2DSIZ+32+i*9,11,
|
printext16(8,ydim-3*STATUS2DSIZ+28+i*9,11,
|
||||||
(j==highlightline && curhp==highlighthp
|
(j==highlightline && curhp==highlighthp
|
||||||
&& totalclock-lasthighlighttime<120*5)?1:-1,
|
&& totalclock-lasthighlighttime<120*5)?1:-1,
|
||||||
disptext[i],0);
|
disptext[i],0);
|
||||||
|
@ -1482,6 +1529,12 @@ ENDFOR1:
|
||||||
showframe(1);
|
showframe(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clearmidstatbar16();
|
||||||
|
overridepm16y = -1;
|
||||||
|
i=ydim16;
|
||||||
|
ydim16=ydim;
|
||||||
|
drawline16(0,ydim-STATUS2DSIZ,xdim-1,ydim-STATUS2DSIZ,1);
|
||||||
|
ydim16=i;
|
||||||
printmessage16("");
|
printmessage16("");
|
||||||
showframe(1);
|
showframe(1);
|
||||||
|
|
||||||
|
@ -5929,7 +5982,7 @@ static void Keys2d(void)
|
||||||
char col;
|
char col;
|
||||||
|
|
||||||
int repeatcountx=0,repeatcounty=0,smooshyalign,changedir;
|
int repeatcountx=0,repeatcounty=0,smooshyalign,changedir;
|
||||||
static int opointhighlight=0, olinehighlight=0, ocursectornum=0;
|
static int opointhighlight=-1, olinehighlight=-1, ocursectornum=-1;
|
||||||
/*
|
/*
|
||||||
for(i=0;i<0x50;i++)
|
for(i=0;i<0x50;i++)
|
||||||
{if(keystatus[i]==1) {Bsprintf(tempbuf,"key %d",i); printmessage16(tempbuf);
|
{if(keystatus[i]==1) {Bsprintf(tempbuf,"key %d",i); printmessage16(tempbuf);
|
||||||
|
@ -6286,60 +6339,56 @@ static void Keys2d(void)
|
||||||
{
|
{
|
||||||
SearchSectorsForward();
|
SearchSectorsForward();
|
||||||
}
|
}
|
||||||
else
|
else if (wallsprite==1)
|
||||||
|
{
|
||||||
if (wallsprite==1)
|
if (curwallnum<MAXWALLS) curwallnum++;
|
||||||
|
for (i=curwallnum;i<=MAXWALLS;i++)
|
||||||
{
|
{
|
||||||
if (curwallnum<MAXWALLS) curwallnum++;
|
if (
|
||||||
for (i=curwallnum;i<=MAXWALLS;i++)
|
(wall[i].picnum==wall[curwall].picnum)
|
||||||
|
&&((search_lotag==0)||
|
||||||
|
(search_lotag!=0 && search_lotag==wall[i].lotag))
|
||||||
|
&&((search_hitag==0)||
|
||||||
|
(search_hitag!=0 && search_hitag==wall[i].hitag))
|
||||||
|
)
|
||||||
{
|
{
|
||||||
if (
|
posx=(wall[i].x)-(((wall[i].x)-(wall[wall[i].point2].x))/2);
|
||||||
(wall[i].picnum==wall[curwall].picnum)
|
posy=(wall[i].y)-(((wall[i].y)-(wall[wall[i].point2].y))/2);
|
||||||
&&((search_lotag==0)||
|
printmessage16("> Wall search: found");
|
||||||
(search_lotag!=0 && search_lotag==wall[i].lotag))
|
// curwallnum++;
|
||||||
&&((search_hitag==0)||
|
keystatus[KEYSC_RBRACK]=0;
|
||||||
(search_hitag!=0 && search_hitag==wall[i].hitag))
|
return;
|
||||||
)
|
|
||||||
{
|
|
||||||
posx=(wall[i].x)-(((wall[i].x)-(wall[wall[i].point2].x))/2);
|
|
||||||
posy=(wall[i].y)-(((wall[i].y)-(wall[wall[i].point2].y))/2);
|
|
||||||
printmessage16("> Wall search: found");
|
|
||||||
// curwallnum++;
|
|
||||||
keystatus[KEYSC_RBRACK]=0;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
curwallnum++;
|
|
||||||
}
|
}
|
||||||
printmessage16("> Wall search: none found");
|
curwallnum++;
|
||||||
}
|
}
|
||||||
else
|
printmessage16("> Wall search: none found");
|
||||||
|
}
|
||||||
if (wallsprite==2)
|
else if (wallsprite==2)
|
||||||
|
{
|
||||||
|
if (cursearchspritenum<MAXSPRITES) cursearchspritenum++;
|
||||||
|
for (i=cursearchspritenum;i<=MAXSPRITES;i++)
|
||||||
|
{
|
||||||
|
if (
|
||||||
|
(sprite[i].picnum==sprite[cursearchsprite].picnum &&
|
||||||
|
sprite[i].statnum==0)
|
||||||
|
&&((search_lotag==0)||
|
||||||
|
(search_lotag!=0 && search_lotag==sprite[i].lotag))
|
||||||
|
&&((search_hitag==0)||
|
||||||
|
(search_hitag!=0 && search_hitag==sprite[i].hitag))
|
||||||
|
)
|
||||||
{
|
{
|
||||||
if (cursearchspritenum<MAXSPRITES) cursearchspritenum++;
|
posx=sprite[i].x;
|
||||||
for (i=cursearchspritenum;i<=MAXSPRITES;i++)
|
posy=sprite[i].y;
|
||||||
{
|
ang= sprite[i].ang;
|
||||||
if (
|
printmessage16("> Sprite search: found");
|
||||||
(sprite[i].picnum==sprite[cursearchsprite].picnum &&
|
// curspritenum++;
|
||||||
sprite[i].statnum==0)
|
keystatus[KEYSC_RBRACK]=0;
|
||||||
&&((search_lotag==0)||
|
return;
|
||||||
(search_lotag!=0 && search_lotag==sprite[i].lotag))
|
|
||||||
&&((search_hitag==0)||
|
|
||||||
(search_hitag!=0 && search_hitag==sprite[i].hitag))
|
|
||||||
)
|
|
||||||
{
|
|
||||||
posx=sprite[i].x;
|
|
||||||
posy=sprite[i].y;
|
|
||||||
ang= sprite[i].ang;
|
|
||||||
printmessage16("> Sprite search: found");
|
|
||||||
// curspritenum++;
|
|
||||||
keystatus[KEYSC_RBRACK]=0;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
cursearchspritenum++;
|
|
||||||
}
|
|
||||||
printmessage16("> Sprite search: none found");
|
|
||||||
}
|
}
|
||||||
|
cursearchspritenum++;
|
||||||
|
}
|
||||||
|
printmessage16("> Sprite search: none found");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -6405,7 +6454,7 @@ static void Keys2d(void)
|
||||||
printmessage16(tempbuf);
|
printmessage16(tempbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (pointhighlight <= 16383)
|
else if (pointhighlight >= 0 /*<= 16383*/)
|
||||||
{
|
{
|
||||||
i = linehighlight;
|
i = linehighlight;
|
||||||
j = wall[i].x;
|
j = wall[i].x;
|
||||||
|
@ -6507,10 +6556,6 @@ static void Keys2d(void)
|
||||||
|
|
||||||
}// end key2d
|
}// end key2d
|
||||||
|
|
||||||
void ExtSetupSpecialSpriteCols(void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static void InitCustomColors(void)
|
static void InitCustomColors(void)
|
||||||
{
|
{
|
||||||
/* blue */
|
/* blue */
|
||||||
|
@ -9459,7 +9504,7 @@ static void FuncMenu(void)
|
||||||
/*
|
/*
|
||||||
#define UNDODEPTH 96
|
#define UNDODEPTH 96
|
||||||
|
|
||||||
typedef struct
|
typedef struct _mapundo
|
||||||
{
|
{
|
||||||
int numsectors;
|
int numsectors;
|
||||||
int numwalls;
|
int numwalls;
|
||||||
|
@ -9479,10 +9524,10 @@ typedef struct
|
||||||
|
|
||||||
int revision;
|
int revision;
|
||||||
|
|
||||||
mapundo_t *next; // 'redo' loads this
|
struct _mapundo *next; // 'redo' loads this
|
||||||
mapundo_t *prev; // 'undo' loads this
|
struct _mapundo *prev; // 'undo' loads this
|
||||||
} mapundo_t;
|
} mapundo_t;
|
||||||
|
|
||||||
mapundo_t *undopos = NULL; // pointer to current
|
mapundo_t *undopos = NULL;
|
||||||
mapundo_t undoredo[UNDODEPTH];
|
mapundo_t undoredo[UNDODEPTH];
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
// this is checked against http://eduke32.com/VERSION
|
// this is checked against http://eduke32.com/VERSION
|
||||||
#define BUILDDATE " 20080901"
|
#define BUILDDATE " 20080902"
|
||||||
#define APPNAME "EDuke32"
|
#define APPNAME "EDuke32"
|
||||||
#define VERSION " 1.5.0devel"
|
#define VERSION " 1.5.0devel"
|
||||||
#define HEAD2 APPNAME VERSION BUILDDATE
|
#define HEAD2 APPNAME VERSION BUILDDATE
|
||||||
|
|
|
@ -55,6 +55,7 @@ extern char cheatstrings[][MAXCHEATLEN];
|
||||||
extern char compilefile[BMAX_PATH];
|
extern char compilefile[BMAX_PATH];
|
||||||
extern int total_lines,line_number;
|
extern int total_lines,line_number;
|
||||||
extern int error,warning;
|
extern int error,warning;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
char *name;
|
char *name;
|
||||||
|
@ -72,6 +73,26 @@ extern const memberlabel_t userdeflabels[];
|
||||||
extern const memberlabel_t inputlabels[];
|
extern const memberlabel_t inputlabels[];
|
||||||
extern const memberlabel_t tsprlabels[];
|
extern const memberlabel_t tsprlabels[];
|
||||||
|
|
||||||
|
extern void DoUserDef(int iSet, int lLabelID, int lVar2);
|
||||||
|
extern void DoThisProjectile(int iSet, int lVar1, int lLabelID, int lVar2);
|
||||||
|
extern void DoPlayer(int iSet, int lVar1, int lLabelID, int lVar2, int lParm2);
|
||||||
|
extern void DoInput(int iSet, int lVar1, int lLabelID, int lVar2);
|
||||||
|
extern void DoWall(int iSet, int lVar1, int lLabelID, int lVar2);
|
||||||
|
extern void DoSector(int iSet, int lVar1, int lLabelID, int lVar2);
|
||||||
|
extern void DoActor(int iSet, int lVar1, int lLabelID, int lVar2, int lParm2);
|
||||||
|
extern void DoTsprite(int iSet, int lVar1, int lLabelID, int lVar2);
|
||||||
|
extern void DoProjectile(int iSet, int lVar1, int lLabelID, int lVar2);
|
||||||
|
|
||||||
|
#define CON_ERROR OSD_ERROR "Line %d, %s: "
|
||||||
|
|
||||||
|
extern int g_i,g_p;
|
||||||
|
extern int checkCON;
|
||||||
|
|
||||||
|
extern int line_num;
|
||||||
|
extern int g_tw;
|
||||||
|
extern const char *keyw[];
|
||||||
|
extern spritetype *g_sp;
|
||||||
|
|
||||||
enum errors
|
enum errors
|
||||||
{
|
{
|
||||||
ERROR_CLOSEBRACKET,
|
ERROR_CLOSEBRACKET,
|
||||||
|
|
File diff suppressed because it is too large
Load diff
4002
polymer/eduke32/source/gamestructures.c
Normal file
4002
polymer/eduke32/source/gamestructures.c
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue