From f7e8583a527ce2440c3b78a4cfe14b2f2ec1847a Mon Sep 17 00:00:00 2001 From: terminx Date: Fri, 16 May 2008 20:15:43 +0000 Subject: [PATCH] git-svn-id: https://svn.eduke32.com/eduke32@729 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/build/src/build.c | 18 +++++++++++++++++- polymer/eduke32/source/astub.c | 14 ++++++++++---- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/polymer/build/src/build.c b/polymer/build/src/build.c index 223fc2cae..7047691b9 100644 --- a/polymer/build/src/build.c +++ b/polymer/build/src/build.c @@ -2941,6 +2941,7 @@ void overheadeditor(void) short hitsect, hitwall, hitsprite; int hitx, hity, hitz; walltype *wal; + int prefixarg; //qsetmode640480(); qsetmodeany(xdim2d,ydim2d); @@ -4629,6 +4630,14 @@ void overheadeditor(void) keystatus[0x24] = 0; } +// PK + for (i=0x02; i<=0x0b; i++) // keys '1' to '0' on the upper row + if (keystatus[i]) + { + prefixarg = i-1; + break; + } + if ((keystatus[0x38]||keystatus[0xb8])&&keystatus[0x1f]) //ALT-S { if ((linehighlight >= 0) && (wall[linehighlight].nextwall == -1)) @@ -4705,7 +4714,14 @@ void overheadeditor(void) else sprite[i].picnum = 0; - if (somethingintab == 3) +// PK + if (prefixarg) + { + sprite[i].picnum = prefixarg; + sprite[i].xrepeat = sprite[i].yrepeat = 48; + prefixarg=0; + } + else if (somethingintab == 3) { sprite[i].picnum = temppicnum; if ((tilesizx[temppicnum] <= 0) || (tilesizy[temppicnum] <= 0)) diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 09493321a..d6267a53c 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -1945,7 +1945,7 @@ static int m32gettile(int idInitialTile) if (searchy < 12) searchy = 12; if (searchx > xdim-13) searchx = xdim-13; if (searchy > ydim-23) searchy = ydim-23; - if (bstatus&2) +/* if (bstatus&2) { moffset+=mousedy; if (iTopLeftTile==0 && moffset>0)moffset=0; @@ -1960,6 +1960,12 @@ static int m32gettile(int idInitialTile) moffset+=ZoomToThumbSize[s_Zoom]; } } +*/ + if (bstatus&16 && !eitherCTRL) + iTopLeftTile -= nXTiles; + if (bstatus&32 && !eitherCTRL) + iTopLeftTile += nXTiles; + mtile=iTile=(searchx/ZoomToThumbSize[s_Zoom])+((searchy-moffset)/ZoomToThumbSize[s_Zoom])*nXTiles+iTopLeftTile; while (iTile >= iTopLeftTile + nDisplayedTiles) { @@ -1978,10 +1984,10 @@ static int m32gettile(int idInitialTile) lockclock += synctics; // Zoom in / out using numeric key pad's / and * keys - if (((keystatus[KEYSC_gSLASH] || bstatus&16) && s_Zoom<(signed)(NUM_ZOOMS-1)) - || ((keystatus[KEYSC_gSTAR] || bstatus&32) && s_Zoom>0)) + if (((keystatus[KEYSC_gSLASH] || (eitherCTRL && (bstatus&16))) && s_Zoom<(signed)(NUM_ZOOMS-1)) + || ((keystatus[KEYSC_gSTAR] || (eitherCTRL && (bstatus&32))) && s_Zoom>0)) { - if (keystatus[KEYSC_gSLASH] || bstatus&16) + if (keystatus[KEYSC_gSLASH] || (eitherCTRL && (bstatus&16))) { keystatus[KEYSC_gSLASH] = 0; mouseb &= ~16;