mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Mapster fixes
git-svn-id: https://svn.eduke32.com/eduke32@1360 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
0ee75ced2a
commit
c585380de6
5 changed files with 71 additions and 58 deletions
|
@ -9,6 +9,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define VERSION " 1.3.0devel"
|
||||
|
||||
// Build keys
|
||||
#define BK_MOVEFORWARD 0
|
||||
#define BK_MOVEBACKWARD 1
|
||||
|
|
|
@ -12,8 +12,6 @@
|
|||
#include "cache1d.h"
|
||||
#include "editor.h"
|
||||
|
||||
#define VERSION "("__DATE__" "__TIME__")"
|
||||
|
||||
#include "baselayer.h"
|
||||
#ifdef RENDERTYPEWIN
|
||||
#include "winlayer.h"
|
||||
|
@ -376,15 +374,6 @@ int32_t app_main(int32_t argc, const char **argv)
|
|||
|
||||
if (!loaddefinitionsfile(defsfilename)) initprintf("Definitions file loaded.\n");
|
||||
|
||||
if (setgamemode(fullscreen,xdimgame,ydimgame,bppgame) < 0)
|
||||
{
|
||||
ExtUnInit();
|
||||
uninitengine();
|
||||
Bprintf("%d * %d not supported in this graphics mode\n",xdim,ydim);
|
||||
exit(0);
|
||||
}
|
||||
setbrightness(brightness,palette,0);
|
||||
|
||||
k = 0;
|
||||
for (i=0; i<256; i++)
|
||||
{
|
||||
|
@ -438,6 +427,17 @@ int32_t app_main(int32_t argc, const char **argv)
|
|||
vid_gamma = gamma;
|
||||
setbrightness(brightness,palette,0);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (setgamemode(fullscreen,xdimgame,ydimgame,bppgame) < 0)
|
||||
{
|
||||
ExtUnInit();
|
||||
uninitengine();
|
||||
Bprintf("%d * %d not supported in this graphics mode\n",xdim,ydim);
|
||||
exit(0);
|
||||
}
|
||||
setbrightness(brightness,palette,0);
|
||||
}
|
||||
CANCEL:
|
||||
quitflag = 0;
|
||||
while (quitflag == 0)
|
||||
|
@ -5048,6 +5048,28 @@ void clearmidstatbar16(void)
|
|||
enddrawing();
|
||||
}
|
||||
|
||||
void clearministatbar16(void)
|
||||
{
|
||||
int32_t i, col = whitecol - 16;
|
||||
begindrawing();
|
||||
|
||||
for (i=ydim-STATUS2DSIZ2; i<ydim; i++)
|
||||
{
|
||||
// drawline256(0, i<<12, xdim<<12, i<<12, col);
|
||||
clearbufbyte((char *)(frameplace + (i*bytesperline)), (bytesperline), ((int32_t)col<<24)|((int32_t)col<<16)|((int32_t)col<<8)|col);
|
||||
col--;
|
||||
if (col <= 0) break;
|
||||
}
|
||||
|
||||
clearbufbyte((char *)(frameplace + (i*bytesperline)), (ydim-i)*(bytesperline), 0);
|
||||
|
||||
Bsprintf(tempbuf, "Mapster32" VERSION);
|
||||
printext16(xdim2d-(Bstrlen(tempbuf)<<3)-3,ydim2d-STATUS2DSIZ2+10L,editorcolors[4],-1,tempbuf,0);
|
||||
printext16(xdim2d-(Bstrlen(tempbuf)<<3)-2,ydim2d-STATUS2DSIZ2+9L,editorcolors[12],-1,tempbuf,0);
|
||||
|
||||
enddrawing();
|
||||
}
|
||||
|
||||
int16_t loopinside(int32_t x, int32_t y, int16_t startwall)
|
||||
{
|
||||
int32_t x1, y1, x2, y2, tempint;
|
||||
|
@ -5115,7 +5137,7 @@ int32_t _getnumber16(char *namestart, int32_t num, int32_t maxnumber, char sign,
|
|||
{
|
||||
Bsprintf(buffer,"^011%s",(char *)func((int32_t)danum));
|
||||
// printext16(200L-24, ydim-STATUS2DSIZ+20L, editorcolors[9], editorcolors[0], buffer, 0);
|
||||
printext16(n<<3, ydim-STATUS2DSIZ+128, editorcolors[9], editorcolors[0], buffer,0);
|
||||
printext16(n<<3, ydim-STATUS2DSIZ+128, editorcolors[9], -1, buffer,0);
|
||||
}
|
||||
|
||||
showframe(1);
|
||||
|
@ -5888,7 +5910,9 @@ void printcoords16(int32_t posxe, int32_t posye, int16_t ange)
|
|||
}
|
||||
snotbuf[30] = 0;
|
||||
|
||||
printext16(8, ydim-STATUS2DSIZ+128, editorcolors[9], editorcolors[0], snotbuf,0);
|
||||
clearministatbar16();
|
||||
|
||||
printext16(8, ydim-STATUS2DSIZ+128, whitecol, -1, snotbuf,0);
|
||||
|
||||
m = (numsectors > MAXSECTORSV7 || numwalls > MAXWALLSV7 || numsprites > MAXSPRITESV7);
|
||||
|
||||
|
@ -5907,7 +5931,7 @@ void printcoords16(int32_t posxe, int32_t posye, int16_t ange)
|
|||
}
|
||||
snotbuf[46] = 0;
|
||||
|
||||
printext16(264, ydim-STATUS2DSIZ+128, editorcolors[9+m], editorcolors[0], snotbuf,0);
|
||||
printext16(264, ydim-STATUS2DSIZ+128, m?editorcolors[10]:whitecol, -1, snotbuf,0);
|
||||
}
|
||||
|
||||
void updatenumsprites(void)
|
||||
|
@ -6232,27 +6256,16 @@ void _printmessage16(const char *fmt, ...)
|
|||
snotbuf[i] = tmpstr[i];
|
||||
i++;
|
||||
}
|
||||
while (i < 94)
|
||||
{
|
||||
snotbuf[i] = 32;
|
||||
i++;
|
||||
}
|
||||
snotbuf[94] = 0;
|
||||
snotbuf[i] = 0;
|
||||
if (lastpm16time == totalclock)
|
||||
Bstrcpy(lastpm16buf, snotbuf);
|
||||
|
||||
clearministatbar16();
|
||||
|
||||
begindrawing();
|
||||
ybase = (overridepm16y >= 0) ? ydim-overridepm16y : ydim-STATUS2DSIZ+128-8;
|
||||
printext16((overridepm16y >= 0) ? 200L-24 : 8, ybase+8L, editorcolors[9], editorcolors[0], snotbuf, 0);
|
||||
/*
|
||||
i = 0;
|
||||
while (i < 54)
|
||||
{
|
||||
snotbuf[i] = 32;
|
||||
i++;
|
||||
}
|
||||
snotbuf[54] = 0;
|
||||
printext16(200L-24, ybase+20L, editorcolors[9], editorcolors[0], snotbuf, 0);
|
||||
*/
|
||||
|
||||
printext16((overridepm16y >= 0) ? 200L-24 : 8, ybase+8L, whitecol, -1, snotbuf, 0);
|
||||
enddrawing();
|
||||
}
|
||||
|
||||
|
|
|
@ -6432,6 +6432,7 @@ void drawmapview(int32_t dax, int32_t day, int32_t zoome, int16_t ang)
|
|||
|
||||
cx1 = (windowx1<<12); cy1 = (windowy1<<12);
|
||||
cx2 = ((windowx2+1)<<12)-1; cy2 = ((windowy2+1)<<12)-1;
|
||||
if (zoome == 2048) zoome = 2047; // FIXME
|
||||
zoome <<= 8;
|
||||
bakgxvect = divscale28(sintable[(1536-ang)&2047],zoome);
|
||||
bakgyvect = divscale28(sintable[(2048-ang)&2047],zoome);
|
||||
|
|
|
@ -2531,10 +2531,12 @@ static void G_MoveWeapons(void)
|
|||
if (ActorExtra[i].projectile.isound >= 0)
|
||||
A_PlaySound(ActorExtra[i].projectile.isound,i);
|
||||
|
||||
if (!(ActorExtra[i].projectile.workslike & PROJECTILE_FORCEIMPACT))KILLIT(i);
|
||||
if (!(ActorExtra[i].projectile.workslike & PROJECTILE_FORCEIMPACT))
|
||||
KILLIT(i);
|
||||
|
||||
}
|
||||
if (ActorExtra[i].projectile.workslike & PROJECTILE_FORCEIMPACT)goto BOLT;
|
||||
if (ActorExtra[i].projectile.workslike & PROJECTILE_FORCEIMPACT)
|
||||
goto BOLT;
|
||||
|
||||
}
|
||||
else if ((j&49152) == 32768)
|
||||
|
@ -2611,18 +2613,6 @@ static void G_MoveWeapons(void)
|
|||
}
|
||||
}
|
||||
|
||||
if (ActorExtra[i].projectile.workslike & PROJECTILE_RPG && ActorExtra[i].projectile.spawns > 0)
|
||||
{
|
||||
k = A_Spawn(i,ActorExtra[i].projectile.spawns);
|
||||
Bmemcpy(&sprite[k],&davect,sizeof(vec3_t));
|
||||
|
||||
if (ActorExtra[i].projectile.sxrepeat > 4)
|
||||
sprite[k].xrepeat=ActorExtra[i].projectile.sxrepeat;
|
||||
if (ActorExtra[i].projectile.syrepeat > 4)
|
||||
sprite[k].yrepeat=ActorExtra[i].projectile.syrepeat;
|
||||
}
|
||||
|
||||
|
||||
if (ActorExtra[i].projectile.workslike & PROJECTILE_HITSCAN)
|
||||
{
|
||||
if (!actorscrptr[sprite[i].picnum])
|
||||
|
@ -2634,6 +2624,17 @@ static void G_MoveWeapons(void)
|
|||
|
||||
if (ActorExtra[i].projectile.workslike & PROJECTILE_RPG)
|
||||
{
|
||||
if (ActorExtra[i].projectile.spawns > 0)
|
||||
{
|
||||
k = A_Spawn(i,ActorExtra[i].projectile.spawns);
|
||||
Bmemcpy(&sprite[k],&davect,sizeof(vec3_t));
|
||||
|
||||
if (ActorExtra[i].projectile.sxrepeat > 4)
|
||||
sprite[k].xrepeat=ActorExtra[i].projectile.sxrepeat;
|
||||
if (ActorExtra[i].projectile.syrepeat > 4)
|
||||
sprite[k].yrepeat=ActorExtra[i].projectile.syrepeat;
|
||||
}
|
||||
|
||||
if (ActorExtra[i].projectile.isound >= 0)
|
||||
A_PlaySound(ActorExtra[i].projectile.isound,i);
|
||||
|
||||
|
|
|
@ -50,7 +50,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#endif
|
||||
|
||||
#define BUILDDATE " 20090430"
|
||||
#define VERSION " 1.3.0devel"
|
||||
|
||||
static int32_t floor_over_floor;
|
||||
|
||||
|
@ -7192,10 +7191,6 @@ static void Keys2d(void)
|
|||
}}
|
||||
*/
|
||||
|
||||
Bsprintf(tempbuf, "Mapster32" VERSION);
|
||||
printext16(xdim2d-(Bstrlen(tempbuf)<<3)-3,ydim2d-STATUS2DSIZ2+10L,editorcolors[4],-1,tempbuf,0);
|
||||
printext16(xdim2d-(Bstrlen(tempbuf)<<3)-2,ydim2d-STATUS2DSIZ2+9L,editorcolors[12],-1,tempbuf,0);
|
||||
|
||||
cursectornum = -1;
|
||||
|
||||
for (i=0; i<numsectors; i++)
|
||||
|
@ -7207,36 +7202,37 @@ static void Keys2d(void)
|
|||
|
||||
searchsector=cursectornum;
|
||||
|
||||
// if (bstatus&1 || opointhighlight != pointhighlight || olinehighlight != linehighlight || ocursectornum != cursectornum)
|
||||
if (keystatus[KEYSC_TAB]) //TAB
|
||||
{
|
||||
if (cursectornum >= 0)
|
||||
showsectordata((int16_t)i+16384);
|
||||
// keystatus[KEYSC_TAB] = 0;
|
||||
}
|
||||
else
|
||||
else if (!(keystatus[KEYSC_F7]|keystatus[KEYSC_F8]))
|
||||
{
|
||||
if (pointhighlight >= 16384)
|
||||
{
|
||||
i = pointhighlight-16384;
|
||||
// clearmidstatbar16();
|
||||
showspritedata((int16_t)i+16384);
|
||||
|
||||
if (sprite[i].picnum==SECTOREFFECTOR)
|
||||
{
|
||||
char buffer[80];
|
||||
|
||||
Bsprintf(buffer,"^10%s",SectorEffectorText(i));
|
||||
_printmessage16(buffer);
|
||||
}
|
||||
}
|
||||
else if ((linehighlight >= 0) && (bstatus&1 || sectorofwall(linehighlight) == cursectornum))
|
||||
{
|
||||
// clearmidstatbar16();
|
||||
showwalldata((int16_t)linehighlight+16384);
|
||||
}
|
||||
else if (cursectornum >= 0)
|
||||
{
|
||||
// clearmidstatbar16();
|
||||
showsectordata((int16_t)cursectornum+16384);
|
||||
}
|
||||
// else clearmidstatbar16();
|
||||
if (totalclock < (lastpm16time + 120*3))
|
||||
_printmessage16(lastpm16buf);
|
||||
}
|
||||
|
||||
/*
|
||||
if ((totalclock > getmessagetimeoff) && (totalclock > (lastpm16time + 120*3)))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue