mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
8077dcd633
The bulk of this commit is "code rape"--or rather, caressing, rewritten for readability. Actual changes/fixes: - fixed "walking" in 2d mode - fixed DELETE key in OSD in SDL build - main loop in general (timeout for event wait after 200 ms so that highlights blink) - access to some pr_override* variables in m32script (suggested by Roma Loom) - API cleanup (added statics and consts here and there) git-svn-id: https://svn.eduke32.com/eduke32@1644 1a8010ca-5511-0410-912e-c29ae57300e0
177 lines
5.6 KiB
Diff
177 lines
5.6 KiB
Diff
// All things old go here to keep the sources clean. To have a reference to the place
|
|
// in the code, place a marker like __SomeMarker__ in the source file, and refer to it
|
|
// by placing it as the first context line of the corresponding hunk.
|
|
|
|
Index: astub.c
|
|
==============================
|
|
+++ astub.c
|
|
--- astub.c
|
|
@@ -2118,1 +2118,37 @@
|
|
///__ShowHelpText__
|
|
+#if 0
|
|
+static void ShowHelpText(char *name)
|
|
+{
|
|
+ BFILE *fp;
|
|
+ char x=0,y=4;
|
|
+ UNREFERENCED_PARAMETER(name);
|
|
+ if ((fp=fopenfrompath("helpdoc.txt","rb")) == NULL)
|
|
+ {
|
|
+ begindrawing();
|
|
+ printext256(1*4,4*8,whitecol,-1,"ERROR: file not found.",0);
|
|
+ enddrawing();
|
|
+ return;
|
|
+ }
|
|
+ /*
|
|
+ Bfgets(tempbuf,80,fp);
|
|
+ while(!Bfeof(fp) && Bstrcmp(tempbuf,"SectorEffector"))
|
|
+ {
|
|
+ Bfgets(tempbuf,80,fp);
|
|
+ }
|
|
+ */
|
|
+ y=2;
|
|
+ Bfgets(tempbuf,80,fp);
|
|
+ Bstrcat(tempbuf,"\n");
|
|
+ begindrawing();
|
|
+ while (!Bfeof(fp) && !(Bstrcmp(tempbuf,"SectorEffector")==0))
|
|
+ {
|
|
+ Bfgets(tempbuf,80,fp);
|
|
+ Bstrcat(tempbuf,"\n");
|
|
+ printext256(x*4,(y*6)+2,whitecol,-1,tempbuf,1);
|
|
+ y++;
|
|
+ }
|
|
+ enddrawing();
|
|
+
|
|
+ Bfclose(fp);
|
|
+}// end ShowHelpText
|
|
+#endif
|
|
@@ -6777,1 +6777,34 @@
|
|
///__bigcomment__
|
|
+ /*
|
|
+ if ((totalclock > getmessagetimeoff) && (totalclock > (lastpm16time + 120*3)))
|
|
+ {
|
|
+ if (pointhighlight >= 16384)
|
|
+ {
|
|
+ char tmpbuf[2048];
|
|
+ i = pointhighlight-16384;
|
|
+ if (strlen(names[sprite[i].picnum]) > 0)
|
|
+ {
|
|
+ if (sprite[i].picnum==SECTOREFFECTOR)
|
|
+ Bsprintf(tmpbuf,"Sprite %d %s, hi:%d ex:%d",i,SectorEffectorText(i),sprite[i].hitag,sprite[i].extra);
|
|
+ else Bsprintf(tmpbuf,"Sprite %d %s: lo:%d hi:%d ex:%d",i,names[sprite[i].picnum],sprite[i].lotag,sprite[i].hitag,sprite[i].extra);
|
|
+ }
|
|
+ else Bsprintf(tmpbuf,"Sprite %d picnum %d: lo:%d hi:%d ex:%d",i,sprite[i].picnum,sprite[i].lotag,sprite[i].hitag,sprite[i].extra);
|
|
+ _printmessage16(tmpbuf);
|
|
+ }
|
|
+ else if ((linehighlight >= 0) && (sectorofwall(linehighlight) == cursectornum))
|
|
+ {
|
|
+ int32_t dax, day, dist;
|
|
+ dax = wall[linehighlight].x-wall[wall[linehighlight].point2].x;
|
|
+ day = wall[linehighlight].y-wall[wall[linehighlight].point2].y;
|
|
+ dist = ksqrt(dax*dax+day*day);
|
|
+ Bsprintf(tempbuf,"Wall %d: length:%d lo:%d hi:%d ex:%d",linehighlight,dist,wall[linehighlight].lotag,wall[linehighlight].hitag,wall[linehighlight].extra);
|
|
+ _printmessage16(tempbuf);
|
|
+ }
|
|
+ else if (cursectornum >= 0)
|
|
+ {
|
|
+ Bsprintf(tempbuf,"Sector %d: lo:%d hi:%d ex:%d",cursectornum,sector[cursectornum].lotag,sector[cursectornum].hitag,sector[cursectornum].extra);
|
|
+ _printmessage16(tempbuf);
|
|
+ }
|
|
+ else _printmessage16("");
|
|
+ }
|
|
+ */
|
|
@@ -6723,1 +6723,29 @@
|
|
///__old_sprite_search_1__
|
|
+#if 0
|
|
+ {
|
|
+ if (cursearchspritenum>0) cursearchspritenum--;
|
|
+ for (i=cursearchspritenum; i>=0; 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))
|
|
+ )
|
|
+ {
|
|
+ pos.x=sprite[i].x;
|
|
+ pos.y=sprite[i].y;
|
|
+ ang= sprite[i].ang;
|
|
+ printmessage16("< Sprite search: found");
|
|
+ // curspritenum--;
|
|
+ keystatus[KEYSC_LBRACK]=0;
|
|
+ return;
|
|
+ }
|
|
+ cursearchspritenum--;
|
|
+ }
|
|
+ printmessage16("< Sprite search: none found");
|
|
+ }
|
|
+#endif
|
|
@@ -6757,1 +6757,27 @@
|
|
///__old_sprite_search_2__
|
|
+#if 0
|
|
+ {
|
|
+ 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))
|
|
+ )
|
|
+ {
|
|
+ pos.x=sprite[i].x;
|
|
+ pos.y=sprite[i].y;
|
|
+ ang= sprite[i].ang;
|
|
+ printmessage16("> Sprite search: found");
|
|
+ // curspritenum++;
|
|
+ keystatus[KEYSC_RBRACK]=0;
|
|
+ return;
|
|
+ }
|
|
+ cursearchspritenum++;
|
|
+ }
|
|
+ printmessage16("> Sprite search: none found");
|
|
+ }
|
|
+#endif
|
|
@@ -6840,1 +6840,37 @@
|
|
///__motorcycle__
|
|
+ /*
|
|
+ if (keystatus[KEYSC_QUOTE] && PRESSED_KEYSC(5)) // ' 5
|
|
+ {
|
|
+ sprintf(tempbuf,"Power-Up Ammo now equals Normal");
|
|
+ printmessage16(tempbuf);
|
|
+ for(i=0;i<MAXSPRITES;i++)
|
|
+ {
|
|
+ if(sprite[i].picnum>=20 && sprite[i].picnum<=59)
|
|
+ {
|
|
+ sprite[i].xrepeat = 32;
|
|
+ sprite[i].yrepeat = 32;
|
|
+ }
|
|
+ }
|
|
+
|
|
+ }
|
|
+ */
|
|
+
|
|
+ // What the fuck is this supposed to do?
|
|
+
|
|
+ /* Motorcycle ha ha ha
|
|
+ if (keystatus[KEYSC_QUOTE] && PRESSED_KEYSC(5)) // ' 5
|
|
+ {
|
|
+ sidemode++; if (sidemode > 2) sidemode = 0;
|
|
+ if (sidemode == 1)
|
|
+ {
|
|
+ editstatus = 0;
|
|
+ zmode = 2;
|
|
+ pos.z = ((sector[cursectnum].ceilingz+sector[cursectnum].floorz)>>1);
|
|
+ }
|
|
+ else
|
|
+ {
|
|
+ editstatus = 1;
|
|
+ zmode = 1;
|
|
+ }
|
|
+ }
|
|
+ */
|