New experimental Mapster32 hybrid 2D/3D mode feature. Pressing F10 in 2D mode enables a picture-in-picture 3D view in the corner of the screen. When moving the mouse over the 3D view, the controls change to 3D mode controls and all 3D mode operations can be performed. The 3D view can be resized with shift + F10 and can be moved to different positions by holding CTRL and using the arrow keys.

This commit also implements a much more useful automatic grid sizing feature and smooths out zooming in and out of the map.

git-svn-id: https://svn.eduke32.com/eduke32@5281 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2015-07-08 03:34:42 +00:00
parent f784eca65b
commit 86f94d2897
5 changed files with 317 additions and 141 deletions

View file

@ -5,6 +5,7 @@
#ifndef editor_h_ #ifndef editor_h_
#define editor_h_ #define editor_h_
#include "baselayer.h"
#include <math.h> #include <math.h>
#ifdef __cplusplus #ifdef __cplusplus
@ -362,6 +363,18 @@ extern int32_t showtags;
int32_t select_sprite_tag(int32_t spritenum); int32_t select_sprite_tag(int32_t spritenum);
extern int32_t m32_2d3dmode, m32_2d3dsize;
extern vec2_t m32_2d3d;
#define XSIZE_2D3D (xdim2d / m32_2d3dsize)
#define YSIZE_2D3D (ydim2d / m32_2d3dsize)
static inline int32_t m32_is2d3dmode(void)
{
return !in3dmode() && m32_2d3dmode && searchx > m32_2d3d.x && searchx < (m32_2d3d.x + XSIZE_2D3D) &&
searchy > m32_2d3d.y && searchy < (m32_2d3d.y + YSIZE_2D3D);
}
#define NEXTWALL(i) (wall[wall[i].nextwall]) #define NEXTWALL(i) (wall[wall[i].nextwall])
#define POINT2(i) (wall[wall[i].point2]) #define POINT2(i) (wall[wall[i].point2])

View file

@ -121,8 +121,8 @@ const char *g_namesFileName = "NAMES.H";
int16_t asksave = 0; int16_t asksave = 0;
int32_t osearchx, osearchy; //old search input int32_t osearchx, osearchy; //old search input
int32_t grid = 3, autogrid = 0, gridlock = 1, showtags = 2; int32_t grid = 0, autogrid = 1, gridlock = 1, showtags = 2;
int32_t zoom = 768, gettilezoom = 1; int32_t zoom = 768, gettilezoom = 1, ztarget = 768;
int32_t lastpm16time = 0; int32_t lastpm16time = 0;
extern int32_t mapversion; extern int32_t mapversion;
@ -183,6 +183,10 @@ static int32_t minhlsectorfloorz, numhlsecwalls;
// - trace_loop // - trace_loop
static uint8_t visited[MAXWALLS>>3]; static uint8_t visited[MAXWALLS>>3];
int32_t m32_2d3dmode = 0;
int32_t m32_2d3dsize = 4;
vec2_t m32_2d3d ={ 4, 4 };
typedef struct typedef struct
{ {
int16_t numsectors, numwalls, numsprites; int16_t numsectors, numwalls, numsprites;
@ -968,6 +972,19 @@ static void mainloop_move(void)
int32_t xvect, yvect, doubvel; int32_t xvect, yvect, doubvel;
if (angvel != 0) //ang += angvel * constant if (angvel != 0) //ang += angvel * constant
{
if (eitherCTRL && m32_2d3dmode)
{
int x = m32_2d3d.x + (angvel / 32);
int xx = m32_2d3d.x + XSIZE_2D3D + (angvel / 32);
if (x > 4 && xx < xdim2d - 4)
{
silentmessage("2d3d x:%d y:%d", m32_2d3d.x, m32_2d3d.y);
m32_2d3d.x += (angvel / 32);
}
}
else
{ {
//ENGINE calculates angvel for you //ENGINE calculates angvel for you
@ -983,7 +1000,22 @@ static void mainloop_move(void)
getmessagetimeoff = totalclock+30; getmessagetimeoff = totalclock+30;
} }
} }
}
if ((vel|svel) != 0) if ((vel|svel) != 0)
{
if (eitherCTRL && m32_2d3dmode)
{
int y = m32_2d3d.y - (vel / 64);
int yy = m32_2d3d.y + YSIZE_2D3D - (vel / 64);
if (y > 4 && yy < ydim2d - STATUS2DSIZ2 - 4)
{
silentmessage("2d3d x:%d y:%d", m32_2d3d.x, m32_2d3d.y);
m32_2d3d.y -= (vel / 64);
}
}
else
{ {
//Lt. shift doubles forward velocity //Lt. shift doubles forward velocity
doubvel = (1+(DOWN_BK(RUN)))*synctics; doubvel = (1+(DOWN_BK(RUN)))*synctics;
@ -1005,6 +1037,7 @@ static void mainloop_move(void)
move_and_update(xvect, yvect, 0); move_and_update(xvect, yvect, 0);
} }
} }
}
static void handle_sprite_in_clipboard(int32_t i) static void handle_sprite_in_clipboard(int32_t i)
{ {
@ -1420,7 +1453,7 @@ void editinput(void)
} }
if (keystatus[buildkeys[BK_MODE2D_3D]]) // Enter if (keystatus[buildkeys[BK_MODE2D_3D]] && !m32_is2d3dmode()) // Enter
{ {
vid_gamma_3d = vid_gamma; vid_gamma_3d = vid_gamma;
@ -3268,6 +3301,9 @@ void overheadeditor(void)
{ {
int32_t mousx, mousy; int32_t mousx, mousy;
if (zoom < ztarget) zoom += (ztarget-zoom)>>3;
if (zoom > ztarget) zoom -= (zoom-ztarget)>>3;
if (!((vel|angvel|svel) //DOWN_BK(MOVEFORWARD) || DOWN_BK(MOVEBACKWARD) || DOWN_BK(TURNLEFT) || DOWN_BK(TURNRIGHT) if (!((vel|angvel|svel) //DOWN_BK(MOVEFORWARD) || DOWN_BK(MOVEBACKWARD) || DOWN_BK(TURNLEFT) || DOWN_BK(TURNRIGHT)
|| DOWN_BK(MOVEUP) || DOWN_BK(MOVEDOWN) || keystatus[0x10] || keystatus[0x11] || DOWN_BK(MOVEUP) || DOWN_BK(MOVEDOWN) || keystatus[0x10] || keystatus[0x11]
|| keystatus[0x48] || keystatus[0x4b] || keystatus[0x4d] || keystatus[0x50] // keypad keys || keystatus[0x48] || keystatus[0x4b] || keystatus[0x4d] || keystatus[0x50] // keypad keys
@ -3312,6 +3348,8 @@ void overheadeditor(void)
// printext16(8L,ydim-STATUS2DSIZ+32L,editorcolors[9],-1,kensig,0); // printext16(8L,ydim-STATUS2DSIZ+32L,editorcolors[9],-1,kensig,0);
} }
if (!m32_is2d3dmode())
{
oldmousebstatus = bstatus; oldmousebstatus = bstatus;
getmousevalues(&mousx, &mousy, &bstatus); getmousevalues(&mousx, &mousy, &bstatus);
@ -3339,6 +3377,7 @@ void overheadeditor(void)
getpoint(searchx, searchy, &mousxplc, &mousyplc); getpoint(searchx, searchy, &mousxplc, &mousyplc);
linehighlight = getlinehighlight(mousxplc, mousyplc, linehighlight, 0); linehighlight = getlinehighlight(mousxplc, mousyplc, linehighlight, 0);
linehighlight2 = getlinehighlight(mousxplc, mousyplc, linehighlight, 1); linehighlight2 = getlinehighlight(mousxplc, mousyplc, linehighlight, 1);
}
if (newnumwalls >= numwalls) if (newnumwalls >= numwalls)
{ {
@ -3382,11 +3421,10 @@ void overheadeditor(void)
if (graphicsmode == 2) if (graphicsmode == 2)
totalclocklock = totalclock; totalclocklock = totalclock;
drawmapview(pos.x, pos.y, zoom, m32_sideview ? -m32_sideang + 1536 : 1536); drawmapview(pos.x, pos.y, zoom, m32_sideview ? (3584 - m32_sideang) & 2047: 1536);
} }
draw2dgrid(pos.x,pos.y,pos.z,cursectnum,ang,zoom,grid); draw2dgrid(pos.x,pos.y,pos.z,cursectnum,ang,zoom,grid);
CallExtPreCheckKeys(); CallExtPreCheckKeys();
{ {
@ -3552,7 +3590,7 @@ void overheadeditor(void)
if (keystatus[0x2a]) // LShift if (keystatus[0x2a]) // LShift
{ {
if (m32_sideview || highlightcnt <= 0) if (!m32_is2d3dmode() && (m32_sideview || highlightcnt <= 0))
{ {
drawlinepat = 0x00ff00ff; drawlinepat = 0x00ff00ff;
drawline16(searchx,0, searchx,ydim2d-1, editorcolors[15]); drawline16(searchx,0, searchx,ydim2d-1, editorcolors[15]);
@ -3714,6 +3752,47 @@ void overheadeditor(void)
drawline16(searchx,0, searchx,8, editorcolors[15]); drawline16(searchx,0, searchx,8, editorcolors[15]);
drawline16(0,searchy, 8,searchy, editorcolors[15]); drawline16(0,searchy, 8,searchy, editorcolors[15]);
// 2d3d mode
if (m32_2d3dmode)
{
int bakrendmode = rendmode;
vec2_t bdim ={ xdim, ydim };
xdim = xdim2d;
ydim = ydim2d;
rendmode = REND_CLASSIC;
if (m32_2d3d.x + XSIZE_2D3D > xdim2d - 4)
m32_2d3d.x = xdim2d - 4 - XSIZE_2D3D;
if (m32_2d3d.y + YSIZE_2D3D > ydim2d - 4 - STATUS2DSIZ2)
m32_2d3d.y = ydim2d - 4 - YSIZE_2D3D - STATUS2DSIZ2;
setview(m32_2d3d.x, m32_2d3d.y, m32_2d3d.x + XSIZE_2D3D, m32_2d3d.y + YSIZE_2D3D);
clearview(-1);
vec2_t osearch ={ searchx, searchy };
searchx -= m32_2d3d.x;
searchy -= m32_2d3d.y;
M32_DrawRoomsAndMasks();
setview(0, 0, xdim2d-1, ydim2d-1);
rendmode = bakrendmode;
xdim = bdim.x;
ydim = bdim.y;
searchx = osearch.x;
searchy = osearch.y;
drawline16(m32_2d3d.x, m32_2d3d.y, m32_2d3d.x + XSIZE_2D3D, m32_2d3d.y, editorcolors[15]);
drawline16(m32_2d3d.x + XSIZE_2D3D, m32_2d3d.y, m32_2d3d.x + XSIZE_2D3D, m32_2d3d.y + YSIZE_2D3D, editorcolors[15]);
drawline16(m32_2d3d.x, m32_2d3d.y, m32_2d3d.x, m32_2d3d.y + YSIZE_2D3D, editorcolors[15]);
drawline16(m32_2d3d.x, m32_2d3d.y + YSIZE_2D3D, m32_2d3d.x + XSIZE_2D3D, m32_2d3d.y + YSIZE_2D3D, editorcolors[15]);
}
if (!m32_is2d3dmode())
{
////// draw mouse pointer ////// draw mouse pointer
col = editorcolors[15 - 3*gridlock]; col = editorcolors[15 - 3*gridlock];
if (joinsector[0] >= 0) if (joinsector[0] >= 0)
@ -3794,6 +3873,7 @@ void overheadeditor(void)
drawline16base(x2, y2, 0, 0, 0, 0, col); drawline16base(x2, y2, 0, 0, 0, 0, col);
} }
} }
}
enddrawing(); //}}} enddrawing(); //}}}
@ -3802,9 +3882,14 @@ void overheadeditor(void)
inputchecked = 1; inputchecked = 1;
VM_OnEvent(EVENT_PREKEYS2D, -1); VM_OnEvent(EVENT_PREKEYS2D, -1);
CallExtCheckKeys(); // TX 20050101, it makes more sense to have this here so keys can be overwritten with new functions in bstub.c CallExtCheckKeys(); // TX 20050101, it makes more sense to have this here so keys can be overwritten with new functions in bstub.c
// 2d3d mode
if (m32_is2d3dmode())
goto nokeys;
// Flip/mirror sector Ed Coolidge // Flip/mirror sector Ed Coolidge
if (keystatus[0x2d] || keystatus[0x15]) // X or Y (2D) if (keystatus[0x2d] || keystatus[0x15]) // X or Y (2D)
{ {
@ -5707,7 +5792,7 @@ end_point_dragging:
searchy = midydim16; searchy = midydim16;
} }
} }
else if ((oldmousebstatus&6) > 0) // else if ((oldmousebstatus&6) > 0)
updatesectorz(pos.x,pos.y,pos.z,&cursectnum); updatesectorz(pos.x,pos.y,pos.z,&cursectnum);
if (circlewall != -1 && (keystatus[0x4a] || ((bstatus&32) && !eitherCTRL))) // -, mousewheel down if (circlewall != -1 && (keystatus[0x4a] || ((bstatus&32) && !eitherCTRL))) // -, mousewheel down
@ -5793,22 +5878,22 @@ end_point_dragging:
{ {
int32_t didzoom=0; int32_t didzoom=0;
if ((DOWN_BK(MOVEUP) || (bstatus&16)) && zoom < 65536) if ((DOWN_BK(MOVEUP) || (bstatus&16)) && zoom < 32768)
{ {
if (DOWN_BK(MOVEUP)) if (DOWN_BK(MOVEUP))
zoom += synctics*(zoom>>4); ztarget += synctics*(ztarget>>4);
if (bstatus&16) if (bstatus&16)
zoom += 4*(zoom>>4); ztarget += 4*(ztarget>>4);
if (zoom < 24) zoom += 2; if (zoom < 24) zoom += 2;
didzoom = 1; didzoom = 1;
} }
if ((DOWN_BK(MOVEDOWN) || (bstatus&32)) && zoom > 8) if ((DOWN_BK(MOVEDOWN) || (bstatus&32)) && zoom > 32)
{ {
if (DOWN_BK(MOVEDOWN)) if (DOWN_BK(MOVEDOWN))
zoom -= synctics*(zoom>>4); ztarget -= synctics*(ztarget>>4);
if (bstatus&32) if (bstatus&32)
zoom -= 4*(zoom>>4); ztarget -= 4*(ztarget>>4);
didzoom = 1; didzoom = 1;
} }
@ -5822,8 +5907,8 @@ end_point_dragging:
pos.x = mousxplc; pos.x = mousxplc;
pos.y = mousyplc; pos.y = mousyplc;
} }
zoom = clamp(zoom, 8, 65536); ztarget = clamp(ztarget, 32, 32768);
_printmessage16("Zoom: %d",zoom); _printmessage16("Zoom: %d",ztarget);
} }
} }
@ -7673,6 +7758,8 @@ end_insert_points:
//printext16(9L,336+9L,4,-1,kensig,0); //printext16(9L,336+9L,4,-1,kensig,0);
//printext16(8L,336+8L,12,-1,kensig,0); //printext16(8L,336+8L,12,-1,kensig,0);
nokeys:
showframe(1); showframe(1);
synctics = totalclock-lockclock; synctics = totalclock-lockclock;
lockclock += synctics; lockclock += synctics;

View file

@ -65,7 +65,7 @@ extern char game_executable[BMAX_PATH];
extern int32_t fullscreen; extern int32_t fullscreen;
extern char default_buildkeys[NUMBUILDKEYS]; extern char default_buildkeys[NUMBUILDKEYS];
static char *const keys = default_buildkeys; static char *const keys = default_buildkeys;
static int32_t default_grid=3; static int32_t default_grid=9;
extern int32_t AmbienceToggle, MixRate; extern int32_t AmbienceToggle, MixRate;
extern int32_t ParentalLock; extern int32_t ParentalLock;
@ -222,6 +222,18 @@ int32_t loadsetup(const char *fn)
if (readconfig(fp, "pathsearchmode", val, VL) > 0) if (readconfig(fp, "pathsearchmode", val, VL) > 0)
pathsearchmode = clamp(atoi_safe(val), 0, 1); pathsearchmode = clamp(atoi_safe(val), 0, 1);
if (readconfig(fp, "2d3dmode", val, VL) > 0)
m32_2d3dmode = clamp(atoi_safe(val), 0, 1);
if (readconfig(fp, "2d3dsize", val, VL) > 0)
m32_2d3dsize = clamp(atoi_safe(val), 3, 5);
if (readconfig(fp, "2d3d_x", val, VL) > 0)
m32_2d3d.x = clamp(atoi_safe(val), 0, 0xffff);
if (readconfig(fp, "2d3d_y", val, VL) > 0)
m32_2d3d.y = clamp(atoi_safe(val), 0, 0xffff);
if (readconfig(fp, "autogray", val, VL) > 0) if (readconfig(fp, "autogray", val, VL) > 0)
autogray = !!atoi_safe(val); autogray = !!atoi_safe(val);
// if (readconfig(fp, "showinnergray", val, VL) > 0) // if (readconfig(fp, "showinnergray", val, VL) > 0)
@ -491,6 +503,12 @@ int32_t writesetup(const char *fn)
"; Default filesystem mode\n" "; Default filesystem mode\n"
"pathsearchmode = %d\n" "pathsearchmode = %d\n"
"\n" "\n"
"; Experimental 2d/3d hybrid mode\n"
"2d3dmode = %d\n"
"2d3dsize = %d\n"
"2d3d_x = %d\n"
"2d3d_y = %d\n"
"\n"
"; TROR: Automatic grayout of plain (non-extended) sectors,\n" "; TROR: Automatic grayout of plain (non-extended) sectors,\n"
"; toggled with Ctrl-A:\n" "; toggled with Ctrl-A:\n"
"autogray = %d\n" "autogray = %d\n"
@ -604,6 +622,7 @@ int32_t writesetup(const char *fn)
revertCTRL,scrollamount,pk_turnaccel,pk_turndecel,autosave,autocorruptcheck, revertCTRL,scrollamount,pk_turnaccel,pk_turndecel,autosave,autocorruptcheck,
corruptcheck_noalreadyrefd, fixmaponsave_sprites, keeptexturestretch, corruptcheck_noalreadyrefd, fixmaponsave_sprites, keeptexturestretch,
showheightindicators,showambiencesounds,pathsearchmode, showheightindicators,showambiencesounds,pathsearchmode,
m32_2d3dmode,m32_2d3dsize,m32_2d3d.x, m32_2d3d.y,
autogray, //showinnergray, autogray, //showinnergray,
graphicsmode, graphicsmode,
MixRate,AmbienceToggle,ParentalLock, !!m32_osd_tryscript, MixRate,AmbienceToggle,ParentalLock, !!m32_osd_tryscript,

View file

@ -15751,7 +15751,9 @@ void clearview(int32_t dacol)
intptr_t p; intptr_t p;
int32_t y, dx; int32_t y, dx;
if (!in3dmode()) return; if (!in3dmode() && dacol != -1) return;
if (dacol == -1) dacol = 0;
#ifdef USE_OPENGL #ifdef USE_OPENGL
if (getrendermode() >= REND_POLYMOST) if (getrendermode() >= REND_POLYMOST)

View file

@ -3289,7 +3289,7 @@ static int32_t OnSelectTile(int32_t iTile)
#ifdef USE_OPENGL #ifdef USE_OPENGL
bglEnable(GL_TEXTURE_2D); bglEnable(GL_TEXTURE_2D);
#endif #endif
clearview(0); clearview(-1);
// //
// Await appropriate selection keypress. // Await appropriate selection keypress.
@ -3519,7 +3519,7 @@ static int32_t DrawTiles(int32_t iTopLeft, int32_t iSelected, int32_t nXTiles, i
bglDrawBuffer(GL_FRONT_AND_BACK); bglDrawBuffer(GL_FRONT_AND_BACK);
} }
#endif #endif
clearview(0); clearview(-1);
begindrawing(); begindrawing();
@ -4424,7 +4424,7 @@ static void Keys3d(void)
y = (int32_t)(WIND1Y*(ydimgame/200.)); y = (int32_t)(WIND1Y*(ydimgame/200.));
y += (ydimgame>>6)*8; y += (ydimgame>>6)*8;
if (getmessageleng) if (getmessageleng && !m32_is2d3dmode())
{ {
while (num < 4) while (num < 4)
lines[num++][0] = 0; lines[num++][0] = 0;
@ -4507,7 +4507,7 @@ static void Keys3d(void)
message("Floor-over-floor display %s",floor_over_floor?"enabled":"disabled"); message("Floor-over-floor display %s",floor_over_floor?"enabled":"disabled");
} }
if (PRESSED_KEYSC(F3)) if (PRESSED_KEYSC(F3) && !m32_is2d3dmode())
{ {
mlook = !mlook; mlook = !mlook;
message("Mouselook: %s",mlook?"enabled":"disabled"); message("Mouselook: %s",mlook?"enabled":"disabled");
@ -7704,9 +7704,13 @@ static void Keys2d(void)
if (autogrid) if (autogrid)
{ {
grid = min(zoom+512, 65536); grid = 0;
grid = scale(grid, 6, 6144);
grid = clamp(grid, 0, 7); while (grid++ < 7)
{
if (mulscale14((2048>>grid), zoom) <= 16)
break;
}
} }
@ -8647,6 +8651,20 @@ static int32_t osdcmd_vars_pk(const osdfuncparm_t *parm)
return OSDCMD_OK; return OSDCMD_OK;
} }
if (!Bstrcasecmp(parm->name, "m32_2d3dmode"))
{
if (parm->numparms > 1)
return OSDCMD_SHOWHELP;
if (setval)
m32_2d3dmode = atoi_safe(parm->parms[0]);
OSD_Printf("Experimental 2d/3d hybrid mode: %s\n",
ONOFF(m32_2d3dmode));
return OSDCMD_OK;
}
if (!Bstrcasecmp(parm->name, "corruptcheck")) if (!Bstrcasecmp(parm->name, "corruptcheck"))
{ {
if (parm->numparms >= 1) if (parm->numparms >= 1)
@ -9050,6 +9068,7 @@ static int32_t registerosdcommands(void)
OSD_RegisterFunction("sensitivity","sensitivity <value>: changes the mouse sensitivity", osdcmd_sensitivity); OSD_RegisterFunction("sensitivity","sensitivity <value>: changes the mouse sensitivity", osdcmd_sensitivity);
//PK //PK
OSD_RegisterFunction("m32_2d3dmode", "2d3dmode: experimental 2d/3d hybrid mode", osdcmd_vars_pk);
OSD_RegisterFunction("pk_turnaccel", "pk_turnaccel <value>: sets turning acceleration+deceleration", osdcmd_vars_pk); OSD_RegisterFunction("pk_turnaccel", "pk_turnaccel <value>: sets turning acceleration+deceleration", osdcmd_vars_pk);
OSD_RegisterFunction("pk_turndecel", "pk_turndecel <value>: sets turning deceleration", osdcmd_vars_pk); OSD_RegisterFunction("pk_turndecel", "pk_turndecel <value>: sets turning deceleration", osdcmd_vars_pk);
OSD_RegisterFunction("pk_uedaccel", "pk_uedaccel <value>: sets UnrealEd movement speed factor (0-5, exponentially)", osdcmd_vars_pk); OSD_RegisterFunction("pk_uedaccel", "pk_uedaccel <value>: sets UnrealEd movement speed factor (0-5, exponentially)", osdcmd_vars_pk);
@ -10181,7 +10200,7 @@ void ExtPreCheckKeys(void) // just before drawrooms
{ {
if (frames==10) frames=0; if (frames==10) frames=0;
k = 1536;//getangle(tspr->x-pos.x,tspr->y-pos.y); k = 1536;//getangle(tspr->x-pos.x,tspr->y-pos.y);
k = (((sprite[i].ang+3072+128-k)&2047)>>8)&7; k = (((sprite[i].ang+3072+128-k+(m32_sideview ? (2048 - m32_sideang) : 0))&2047)>>8)&7;
//This guy has only 5 pictures for 8 angles (3 are x-flipped) //This guy has only 5 pictures for 8 angles (3 are x-flipped)
if (k <= 4) if (k <= 4)
{ {
@ -10455,6 +10474,34 @@ static void Keys2d3d(void)
// mapstate = mapstate->prev; // mapstate = mapstate->prev;
} }
#endif #endif
if (keystatus[KEYSC_F10])
{
keystatus[KEYSC_F10]=0;
if (!in3dmode())
{
if (eitherSHIFT)
{
// shrinking the size while in a corner pulls the PIP into that corner
if (m32_2d3d.x + XSIZE_2D3D >= xdim2d - 5)
m32_2d3d.x = 0xffff;
if (m32_2d3d.y + YSIZE_2D3D >= ydim2d - 5 - STATUS2DSIZ2)
m32_2d3d.y = 0xffff;
if (++m32_2d3dsize > 5)
m32_2d3dsize = 3;
printmessage16("2d3d size %d", m32_2d3dsize);
}
else
{
m32_2d3dmode = !m32_2d3dmode;
printmessage16("2d3d mode %s", m32_2d3dmode ? "enabled" : "disabled");
}
}
}
if (keystatus[KEYSC_QUOTE] && PRESSED_KEYSC(A)) // 'A if (keystatus[KEYSC_QUOTE] && PRESSED_KEYSC(A)) // 'A
{ {
if (in3dmode()) if (in3dmode())
@ -10629,14 +10676,22 @@ void ExtCheckKeys(void)
Keys2d3d(); Keys2d3d();
if (in3dmode()) // 2d3d mode
if ((in3dmode() && !m32_is2d3dmode()) || m32_is2d3dmode())
{ {
int bakrendmode = rendmode;
if (m32_is2d3dmode())
rendmode = REND_CLASSIC;
Keys3d(); Keys3d();
editinput(); editinput();
if (infobox&2) if (infobox&2)
m32_showmouse(); m32_showmouse();
rendmode = bakrendmode;
} }
else else if (!in3dmode())
{ {
Keys2d(); Keys2d();