From 898e6669ef5c95a7fff154175bbcbe67a271299a Mon Sep 17 00:00:00 2001 From: terminx Date: Thu, 4 Sep 2008 23:11:48 +0000 Subject: [PATCH] git-svn-id: https://svn.eduke32.com/eduke32@1055 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/build/include/editor.h | 4 +-- polymer/build/src/build.c | 52 +++++++++++++++++++++------------ polymer/eduke32/source/astub.c | 12 +++++--- polymer/eduke32/source/duke3d.h | 2 +- 4 files changed, 44 insertions(+), 26 deletions(-) diff --git a/polymer/build/include/editor.h b/polymer/build/include/editor.h index ae22fde1c..2b02a5ec7 100644 --- a/polymer/build/include/editor.h +++ b/polymer/build/include/editor.h @@ -83,9 +83,9 @@ int writesetup(const char *fn); // from config.c void editinput(void); void clearmidstatbar16(void); -int _getnumber256(char namestart[80], int num, int maxnumber, char sign, void *(func)(int)); +int _getnumber256(char *namestart, int num, int maxnumber, char sign, void *(func)(int)); #define getnumber256(namestart, num, maxnumber, sign) _getnumber256(namestart, num, maxnumber, sign, NULL) -int _getnumber16(char namestart[80], int num, int maxnumber, char sign, void *(func)(int)); +int _getnumber16(char *namestart, int num, int maxnumber, char sign, void *(func)(int)); #define getnumber16(namestart, num, maxnumber, sign) _getnumber16(namestart, num, maxnumber, sign, NULL) void printmessage256(int x, int y, char *name); void _printmessage16(const char *fmt, ...); diff --git a/polymer/build/src/build.c b/polymer/build/src/build.c index c2805528e..fa5b90d68 100644 --- a/polymer/build/src/build.c +++ b/polymer/build/src/build.c @@ -612,12 +612,28 @@ void editinput(void) getmousevalues(&mousx,&mousy,&bstatus); mousx = (mousx<<16)+mousexsurp; mousy = (mousy<<16)+mouseysurp; + + if ((unrealedlook && !mskip) && + (((!mlook && (bstatus&2) && !(bstatus&(1|4)))) || ((bstatus&1) && !(bstatus&(2|4))))) + mlook = 3; + { ldiv_t ld; - ld = ldiv((int)(mousx), (1<<16)); mousx = ld.quot; mousexsurp = ld.rem; - ld = ldiv((int)(mousy), (1<<16)); mousy = ld.quot; mouseysurp = ld.rem; + if (mlook) + { + ld = ldiv((int)(mousx), (1<<16)/(msens*0.5f)); mousx = ld.quot; mousexsurp = ld.rem; + ld = ldiv((int)(mousy), (1<<16)/(msens*0.25f)); mousy = ld.quot; mouseysurp = ld.rem; + } + else + { + ld = ldiv((int)(mousx), (1<<16)/msens); mousx = ld.quot; mousexsurp = ld.rem; + ld = ldiv((int)(mousy), (1<<16)/msens); mousy = ld.quot; mouseysurp = ld.rem; + } } + if (mlook == 3) + mlook = 0; + // UnrealEd: // rmb: mouselook // lbm: x:turn y:fwd/back local x @@ -628,11 +644,9 @@ void editinput(void) { if ((bstatus&1) && !(bstatus&(2|4))) { - ang += (mousx>>1)*msens; - if (mousx && !(mousx>>1)) - ang++; - xvect = -((mousy*(int)sintable[(ang+2560)&2047])<>1)*msens; - horiz -= (mousy>>2)*msens; + ang += mousx; + horiz -= mousy; - if (mousy && !(mousy>>2)) - horiz--; - if (mousx && !(mousx>>1)) - ang++; +// if (mousy && !(mousy/4)) + // horiz--; + // if (mousx && !(mousx/2)) + // ang++; if (horiz > 299) horiz = 299; if (horiz < -99) @@ -1462,7 +1476,7 @@ void overheadeditor(void) // printmessage16("Version: "VERSION); // 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; enddrawing(); //}}} @@ -1530,8 +1544,8 @@ void overheadeditor(void) ld = ldiv((int)(mousx), (1<<16)); mousx = ld.quot; mousexsurp = ld.rem; ld = ldiv((int)(mousy), (1<<16)); mousy = ld.quot; mouseysurp = ld.rem; } - searchx += mousx*msens; - searchy += mousy*msens; + searchx += mousx; + searchy += mousy; if (searchx < 8) searchx = 8; if (searchx > xdim-8-1) searchx = xdim-8-1; if (searchy < 8) searchy = 8; @@ -5216,7 +5230,7 @@ int numloopsofsector(short sectnum) return(numloops); } -int _getnumber16(char namestart[80], int num, int maxnumber, char sign, void *(func)(int)) +int _getnumber16(char *namestart, int num, int maxnumber, char sign, void *(func)(int)) { char buffer[80], ch; int n, danum, oldnum; @@ -5273,7 +5287,7 @@ int _getnumber16(char namestart[80], int num, int maxnumber, char sign, void *(f return(oldnum); } -int _getnumber256(char namestart[80], int num, int maxnumber, char sign, void *(func)(int)) +int _getnumber256(char *namestart, int num, int maxnumber, char sign, void *(func)(int)) { char buffer[80], ch; int n, danum, oldnum; @@ -6021,7 +6035,7 @@ void printcoords16(int posxe, int posye, short ange) } snotbuf[46] = 0; - printext16(264, ydim-STATUS2DSIZ+128+2, 9+m, 0, snotbuf,0); + printext16(264, ydim-STATUS2DSIZ+128, 9+m, 0, snotbuf,0); } void updatenumsprites(void) diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index fa86920de..9659799ef 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -43,7 +43,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #endif -#define BUILDDATE " 20080902" +#define BUILDDATE " 20080904" #define VERSION " 1.2.0devel" static int floor_over_floor; @@ -1528,6 +1528,9 @@ ENDFOR1: } clearmidstatbar16(); + + + if (curhp < helppage[0]->numlines) { printmessage16(helppage[0]->line[curhp]); @@ -1543,7 +1546,7 @@ ENDFOR1: inumlines; i++) { Bmemcpy(disptext[i], helppage[curhp]->line[j], 80); - printext16(8,ydim-overridepm16y+28+i*9,11, + printext16(8,ydim-overridepm16y+28+i*9,15, (j==highlightline && curhp==highlighthp && totalclock-lasthighlighttime<120*5)?1:-1, disptext[i],0); @@ -3023,7 +3026,8 @@ void drawtileinfo(char *title,int x,int y,int picnum,int shade,int pal,int cstat printext256(x,y+i*7,whitecol,-1,buf,j); enddrawing(); } -int snap=0;int saveval1,saveval2,saveval3; +int snap=0; +int saveval1,saveval2,saveval3; static inline void getnumber_dochar(char *ptr, int num) { @@ -3045,7 +3049,7 @@ static inline void getnumber_doint64(int64 *ptr, int num) *ptr = (int64) num; } -void getnumberptr256(char namestart[80], void *num, int bytes, int maxnumber, char sign, void *(func)(int)) +void getnumberptr256(char *namestart, void *num, int bytes, int maxnumber, char sign, void *(func)(int)) { char buffer[80], ch; int n, danum = 0, oldnum; diff --git a/polymer/eduke32/source/duke3d.h b/polymer/eduke32/source/duke3d.h index 6a0a7212e..59f3c2b85 100644 --- a/polymer/eduke32/source/duke3d.h +++ b/polymer/eduke32/source/duke3d.h @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //------------------------------------------------------------------------- // this is checked against http://eduke32.com/VERSION -#define BUILDDATE " 20080902" +#define BUILDDATE " 20080904" #define APPNAME "EDuke32" #define VERSION " 1.5.0devel" #define HEAD2 APPNAME VERSION BUILDDATE