From d6f525b44bb2ec1d634c0ce769dd1b0bcafe8ef4 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sun, 25 Oct 2009 23:25:38 +0000 Subject: [PATCH] crude demo fast-forward/rewind; more m32script goodness git-svn-id: https://svn.eduke32.com/eduke32@1536 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/a.m32 | 122 ++++++++++++++++++++++------- polymer/eduke32/build/src/osd.c | 4 + polymer/eduke32/m32script_ex.map | Bin 0 -> 9454 bytes polymer/eduke32/source/astub.c | 2 + polymer/eduke32/source/game.c | 129 +++++++++++++++++++++++++++++-- polymer/eduke32/source/m32def.c | 14 +++- polymer/eduke32/source/m32def.h | 2 + polymer/eduke32/source/m32exec.c | 37 ++++++--- polymer/eduke32/source/premap.c | 65 ++++++++++------ 9 files changed, 302 insertions(+), 73 deletions(-) create mode 100755 polymer/eduke32/m32script_ex.map diff --git a/polymer/eduke32/a.m32 b/polymer/eduke32/a.m32 index 8460e5400..87323b521 100644 --- a/polymer/eduke32/a.m32 +++ b/polymer/eduke32/a.m32 @@ -3,10 +3,14 @@ include names.h -gamevar i 0 1 // per-block (top-level, event, or state) variable +// flag 1: per-block (top-level, event, or state) variable +gamevar i 0 1 gamevar j 0 1 gamevar k 0 1 gamevar l 0 1 +gamevar m 0 1 +gamevar p 0 1 +gamevar q 0 1 gamevar tmp 0 0 @@ -243,18 +247,6 @@ onevent EVENT_ENTER3DMODE state setas endevent -onevent EVENT_ANALYZESPRITES - for i drawnsprites - { - set j tsprite[i].owner - switch sprite[j].picnum - case LIZTROOP spritepal 1 break - case PIGCOP spritepal 2 break - case BOSS1 spritepal 6 break - endswitch - } -endevent - defstate cmp_by_lotag set RETURN sprite[SV2].lotag sub RETURN sprite[SV1].lotag @@ -290,7 +282,7 @@ onevent EVENT_DRAW2DSCREEN set drawlinepat -1 for i allsprites ifactor LIZTROOP - drawcircle16b sprite[i].x sprite[i].y 256 9 + drawcircle16b sprite[i].x sprite[i].y 256 drawcol */ endevent @@ -310,6 +302,73 @@ onevent EVENT_INSERTSPRITE2D } endevent +// rotates and duplicates selected sprites around +// pivot sprite (extra=123, ang:dang, yrepeat<<5:dz (pos. if pal!=0), lo:cnt) +defstate duprot + ifn searchstat 3 return + ifn sprite[searchwall].extra 123 return + ifl sprite[searchwall].shade 1 return + set k searchwall + + for i range sprite[k].shade + { + for j selsprites, ifn j k + { + dupsprite j + set tmp i, add tmp 1, mul tmp sprite[k].ang + rotatepoint sprite[k].x sprite[k].y .x .y tmp (l m) + add .ang tmp + set tmp i, add tmp 1, mul tmp sprite[k].yrepeat, shiftl tmp 5 + ife sprite[k].pal 0 inv tmp + add tmp .z + bsetsprite I l m tmp + } + } +ends + +// same as above but with tsprite[], as a kind of preview +defstate tduprot + ifn searchstat 3 return + ifn sprite[searchwall].extra 123 return + ifl sprite[searchwall].shade 1 return + set k searchwall + + for i range sprite[k].shade + { + for j selsprites, ifn j k + { + set p spritesortcnt + tdupsprite j + set tmp i, add tmp 1, mul tmp sprite[k].ang + rotatepoint sprite[k].x sprite[k].y tsprite[p].x tsprite[p].y tmp (l m) + add tsprite[p].ang tmp + set tmp i, add tmp 1, mul tmp sprite[k].yrepeat, shiftl tmp 5 + ife sprite[k].pal 0 inv tmp + add tmp tsprite[p].z + set tsprite[p].x l + set tsprite[p].y m + set tsprite[p].z tmp + or tsprite[p].cstat 514 +// bsetsprite I l m tmp + } + } +ends + +onevent EVENT_ANALYZESPRITES + state tduprot +/* + for i drawnsprites + { + set j tsprite[i].owner + switch sprite[j].picnum + case LIZTROOP spritepal 1 break + case PIGCOP spritepal 2 break + case BOSS1 spritepal 6 break + endswitch + } +*/ +endevent + onevent EVENT_KEYS3D // swinging doors tester -- hit space on a door wall ife searchstat 0 @@ -371,26 +430,33 @@ onevent EVENT_KEYS3D ife searchstat 3 ifhitkey KEY_SPACE { - ifn sprite[searchwall].picnum SECTOREFFECTOR return - set tmp 0 - ife sprite[searchwall].lotag 7 set tmp 1 - ife sprite[searchwall].lotag 17 set tmp 1 - ife tmp 0 return - - for i allsprites + ife sprite[searchwall].picnum SECTOREFFECTOR { - ifn i searchwall, ifactor SECTOREFFECTOR, ife sprite[i].lotag sprite[searchwall].lotag - ife sprite[i].hitag sprite[searchwall].hitag + set tmp 0 + ife sprite[searchwall].lotag 7 set tmp 1 + ife sprite[searchwall].lotag 17 set tmp 1 + ife tmp 0 return + + for i allsprites { - add posx sprite[i].x, sub posx sprite[searchwall].x - add posy sprite[i].y, sub posy sprite[searchwall].y - add posz sprite[i].z, sub posz sprite[searchwall].z + ifn i searchwall, ifactor SECTOREFFECTOR, ife sprite[i].lotag sprite[searchwall].lotag + ife sprite[i].hitag sprite[searchwall].hitag + { + add posx sprite[i].x, sub posx sprite[searchwall].x + add posy sprite[i].y, sub posy sprite[searchwall].y + add posz sprite[i].z, sub posz sprite[searchwall].z - updatecursectnum + updatecursectnum - return + return + } } } + else ife sprite[searchwall].extra 123 + { + state duprot + add sprite[searchwall].extra 1 + } } ifholdkey KEY_0 diff --git a/polymer/eduke32/build/src/osd.c b/polymer/eduke32/build/src/osd.c index ce1bb9a17..43c15b6e0 100644 --- a/polymer/eduke32/build/src/osd.c +++ b/polymer/eduke32/build/src/osd.c @@ -1380,6 +1380,8 @@ void OSD_Draw(void) // and write it to the log file // +extern int32_t premap_quickenterlevel; + static inline void linefeed(void) { Bmemmove(osdtext+osdcols, osdtext, TEXTSIZE-osdcols); @@ -1397,6 +1399,8 @@ void OSD_Printf(const char *fmt, ...) if (!osdinited) OSD_Init(); + if (premap_quickenterlevel) return; + va_start(va, fmt); Bvsnprintf(tmpstr, 8192, fmt, va); va_end(va); diff --git a/polymer/eduke32/m32script_ex.map b/polymer/eduke32/m32script_ex.map new file mode 100755 index 0000000000000000000000000000000000000000..0d79ee674a0f9eedd3e674302d8f9d3408098519 GIT binary patch literal 9454 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 demo_startreccnt) + demo_goalreccnt = demo_startreccnt; + + demo_goalreccnt = -demo_goalreccnt; + ud.config.SoundToggle = 0; + FX_StopAllSounds(); + S_ClearSoundLocks(); + } + } + if (SHIFTS_IS_PRESSED || ALT_IS_PRESSED) { i = 0; @@ -11384,6 +11458,7 @@ static int32_t G_OpenDemoRead(int32_t g_whichDemo) // 0 = mine } i = ud.reccnt/((TICRATE/TICSPERFRAME)*ud.multimode); OSD_Printf("demo duration: %d min %d sec\n", i/60, i%60); + demo_startreccnt = ud.reccnt; ud.god = ud.cashman = ud.eog = ud.showallmap = 0; ud.clipping = ud.scrollmode = ud.overhead_on = ud.pause_on = 0; @@ -11483,6 +11558,7 @@ void G_CloseDemoWrite(void) } static int32_t g_whichDemo = 1; +extern int32_t premap_quickenterlevel; // extern int32_t syncs[]; static int32_t G_PlaybackDemo(void) @@ -11501,14 +11577,13 @@ RECHECK: pus = NUMPAGES; flushperms(); - if (ud.multimode < 2) foundemo = G_OpenDemoRead(g_whichDemo); - if (foundemo == 0) { if (g_whichDemo > 1) { g_whichDemo = 1; + premap_quickenterlevel=0; goto RECHECK; } fadepal(0,0,0, 0,63,7); @@ -11525,14 +11600,18 @@ RECHECK: ud.recstat = 2; g_whichDemo++; if (g_whichDemo == 10) g_whichDemo = 1; + if (G_EnterLevel(MODE_DEMO)) ud.recstat = foundemo = 0; } - if (foundemo == 0 || in_menu || KB_KeyWaiting() || numplayers > 1) + if (!premap_quickenterlevel) { - FX_StopAllSounds(); - S_ClearSoundLocks(); - g_player[myconnectindex].ps->gm |= MODE_MENU; + if (foundemo == 0 || in_menu || KB_KeyWaiting() || numplayers > 1) + { + FX_StopAllSounds(); + S_ClearSoundLocks(); + g_player[myconnectindex].ps->gm |= MODE_MENU; + } } ready2send = 0; @@ -11545,7 +11624,9 @@ RECHECK: while (ud.reccnt > 0 || foundemo == 0) { if (foundemo) - while (totalclock >= (lockclock+TICSPERFRAME)) + { + while (totalclock >= (lockclock+TICSPERFRAME) || + (demo_goalreccnt>0 && demo_goalreccnt= RECSYNCBUFSIZ)) { @@ -11571,8 +11652,35 @@ RECHECK: } G_DoMoveThings(); ototalclock += TICSPERFRAME; + + if (demo_goalreccnt > 0) + { + if (demo_goalreccnt 1) // load the same demo again and FF from beginning... yay! + g_whichDemo--; + foundemo = 0; + ud.reccnt = 0; + kclose(recfilep); + premap_quickenterlevel=1; + goto RECHECK; + } + } + if (demo_goalreccnt > 0 && ud.reccnt<=demo_goalreccnt) + { + demo_goalreccnt = 0; + ud.config.SoundToggle = demo_oldsoundtoggle; + premap_quickenterlevel = 0; + } + } + if (foundemo == 0) G_DrawBackground(); else @@ -11584,6 +11692,13 @@ RECHECK: G_DrawRooms(screenpeek,j); G_DisplayRest(j); + if (demo_showstats && (g_player[myconnectindex].ps->gm&MODE_MENU) == 0) + { + j=(demo_startreccnt-ud.reccnt)/(TICRATE/TICSPERFRAME); + Bsprintf(buf, "%02d:%02d", j/60, j%60); + gametext(18,16,buf,0,2+8+16); + } + if (ud.multimode > 1 && g_player[myconnectindex].ps->gm) Net_GetPackets(); diff --git a/polymer/eduke32/source/m32def.c b/polymer/eduke32/source/m32def.c index b7aaecc41..157289ecf 100644 --- a/polymer/eduke32/source/m32def.c +++ b/polymer/eduke32/source/m32def.c @@ -310,6 +310,7 @@ const char *keyw[] = "resetkey", "insertsprite", "dupsprite", + "tdupsprite", "deletesprite", "lastwall", "updatecursectnum", @@ -2183,8 +2184,7 @@ repeatcase: if ((tw==CON_GETTSPR || tw==CON_SETTSPR) && cs.currentEvent != EVENT_ANALYZESPRITES) { - C_ReportError(-1); - initprintf("%s:%d: warning: found `%s' outside of EVENT_ANALYZESPRITES\n",g_szScriptFileName,g_lineNumber,tempbuf); + C_ReportError(WARNING_OUTSIDEDRAWSPRITE); g_numCompilerWarnings++; } @@ -2733,6 +2733,12 @@ repeatcase: } // *** BUILD functions + case CON_TDUPSPRITE: + if (cs.currentEvent>=0 && cs.currentEvent != EVENT_ANALYZESPRITES) + { + C_ReportError(WARNING_OUTSIDEDRAWSPRITE); + g_numCompilerWarnings++; + } case CON_RESETKEY: case CON_INSERTSPRITE: case CON_DUPSPRITE: @@ -3568,5 +3574,9 @@ void C_ReportError(int32_t iError) initprintf("%s:%d: warning: constants where gamevars are expected save only 16 bits.\n", g_szScriptFileName,g_lineNumber); break; + case WARNING_OUTSIDEDRAWSPRITE: + initprintf("%s:%d: warning: found `%s' outside of EVENT_ANALYZESPRITES\n", + g_szScriptFileName,g_lineNumber,tempbuf); + break; } } diff --git a/polymer/eduke32/source/m32def.h b/polymer/eduke32/source/m32def.h index b9f0049ae..df061d8c2 100644 --- a/polymer/eduke32/source/m32def.h +++ b/polymer/eduke32/source/m32def.h @@ -137,6 +137,7 @@ enum ScriptError_t WARNING_LABELSONLY, WARNING_NAMEMATCHESVAR, WARNING_CONSTANTBITSIZE, + WARNING_OUTSIDEDRAWSPRITE, }; @@ -390,6 +391,7 @@ enum ScriptKeywords_t CON_RESETKEY, CON_INSERTSPRITE, CON_DUPSPRITE, + CON_TDUPSPRITE, CON_DELETESPRITE, CON_LASTWALL, CON_UPDATECURSECTNUM, diff --git a/polymer/eduke32/source/m32exec.c b/polymer/eduke32/source/m32exec.c index 50ddf5821..50892feb2 100644 --- a/polymer/eduke32/source/m32exec.c +++ b/polymer/eduke32/source/m32exec.c @@ -1524,6 +1524,7 @@ badindex: continue; case CON_DUPSPRITE: + case CON_TDUPSPRITE: insptr++; { int32_t ospritenum = Gv_GetVarX(*insptr++), nspritenum; @@ -1533,26 +1534,38 @@ badindex: OSD_Printf(CON_ERROR "Tried to duplicate nonexistent sprite %d\n",g_errorLineNum,keyw[g_tw],ospritenum); vm.flags |= VMFLAG_ERROR; } - if (numsprites >= MAXSPRITES) + if ((tw==CON_DUPSPRITE && numsprites >= MAXSPRITES) || + (tw==CON_DUPSPRITE && spritesortcnt >= MAXSPRITESONSCREEN)) { OSD_Printf(CON_ERROR "Maximum number of sprites reached.\n",g_errorLineNum,keyw[g_tw]); vm.flags |= VMFLAG_ERROR; } if (vm.flags&VMFLAG_ERROR) continue; - nspritenum = insertsprite(sprite[ospritenum].sectnum, sprite[ospritenum].statnum); - - if (nspritenum < 0) + if (tw==CON_DUPSPRITE) { - OSD_Printf(CON_ERROR "Internal error.\n",g_errorLineNum,keyw[g_tw]); - vm.flags |= VMFLAG_ERROR; - continue; - } + nspritenum = insertsprite(sprite[ospritenum].sectnum, sprite[ospritenum].statnum); - Bmemcpy(&sprite[nspritenum], &sprite[ospritenum], sizeof(spritetype)); - vm.g_i = nspritenum; - vm.g_sp = &sprite[nspritenum]; - numsprites++; + if (nspritenum < 0) + { + OSD_Printf(CON_ERROR "Internal error.\n",g_errorLineNum,keyw[g_tw]); + vm.flags |= VMFLAG_ERROR; + continue; + } + + Bmemcpy(&sprite[nspritenum], &sprite[ospritenum], sizeof(spritetype)); + vm.g_i = nspritenum; + vm.g_sp = &sprite[nspritenum]; + numsprites++; + } + else + { + Bmemcpy(&tsprite[spritesortcnt], &sprite[ospritenum], sizeof(spritetype)); + tsprite[spritesortcnt].owner = ospritenum; + vm.g_i = -1; + vm.g_sp = &tsprite[spritesortcnt]; + spritesortcnt++; + } } continue; diff --git a/polymer/eduke32/source/premap.c b/polymer/eduke32/source/premap.c index 90ffc7ed8..29907f0e3 100644 --- a/polymer/eduke32/source/premap.c +++ b/polymer/eduke32/source/premap.c @@ -1204,11 +1204,16 @@ static inline void prelevel(char g) } } +int32_t premap_quickenterlevel=0; + void G_NewGame(int32_t vn,int32_t ln,int32_t sk) { DukePlayer_t *p = g_player[0].ps; int32_t i; + if (!premap_quickenterlevel) + goto quick; + handleevents(); Net_GetPackets(); @@ -1250,6 +1255,7 @@ void G_NewGame(int32_t vn,int32_t ln,int32_t sk) FX_StopAllSounds(); } +quick: g_showShareware = GAMETICSPERSEC*34; ud.level_number = ln; @@ -1653,7 +1659,6 @@ int32_t G_EnterLevel(int32_t g) // flushpackets(); // waitforeverybody(); - vote_map = vote_episode = voting = -1; if ((g&MODE_DEMO) != MODE_DEMO) ud.recstat = ud.m_recstat; @@ -1674,7 +1679,6 @@ int32_t G_EnterLevel(int32_t g) FX_SetReverb(0); setgamemode(ud.config.ScreenMode,ud.config.ScreenWidth,ud.config.ScreenHeight,ud.config.ScreenBPP); - if (boardfilename[0] != 0 && ud.m_level_number == 7 && ud.m_volume_number == 0) { int32_t volume, level; @@ -1713,11 +1717,15 @@ int32_t G_EnterLevel(int32_t g) } } - i = ud.screen_size; - ud.screen_size = 0; - G_DoLoadScreen(NULL, -1); - G_UpdateScreenArea(); - ud.screen_size = i; + if (!premap_quickenterlevel) + { + i = ud.screen_size; + ud.screen_size = 0; + + G_DoLoadScreen(NULL, -1); + G_UpdateScreenArea(); + ud.screen_size = i; + } if (boardfilename[0] != 0 && ud.m_level_number == 7 && ud.m_volume_number == 0) { @@ -1728,7 +1736,6 @@ int32_t G_EnterLevel(int32_t g) Bstrcpy(tempbuf,apptitle); wm_setapptitle(tempbuf); - if (!VOLUMEONE) { if (boardfilename[0] != 0 && ud.m_level_number == 7 && ud.m_volume_number == 0) @@ -1856,9 +1863,12 @@ int32_t G_EnterLevel(int32_t g) } } - g_precacheCount = 0; - clearbufbyte(gotpic,sizeof(gotpic),0L); - clearbufbyte(precachehightile, sizeof(precachehightile), 0l); + if (!premap_quickenterlevel) + { + g_precacheCount = 0; + clearbufbyte(gotpic,sizeof(gotpic),0L); + clearbufbyte(precachehightile, sizeof(precachehightile), 0l); + } //clearbufbyte(ActorExtra,sizeof(ActorExtra),0l); // JBF 20040531: yes? no? prelevel(g); @@ -1869,7 +1879,8 @@ int32_t G_EnterLevel(int32_t g) cachedebug = 0; automapping = 0; - G_CacheMapData(); + if (!premap_quickenterlevel) + G_CacheMapData(); if (ud.recstat != 2) { @@ -1919,10 +1930,13 @@ int32_t G_EnterLevel(int32_t g) //g_player[myconnectindex].ps->palette = palette; //G_FadePalette(0,0,0,0); - P_SetGamePalette(g_player[myconnectindex].ps, palette, 0); // JBF 20040308 + if (!premap_quickenterlevel) + { + P_SetGamePalette(g_player[myconnectindex].ps, palette, 0); // JBF 20040308 - P_UpdateScreenPal(g_player[myconnectindex].ps); - flushperms(); + P_UpdateScreenPal(g_player[myconnectindex].ps); + flushperms(); + } everyothertime = 0; g_globalRandom = 0; @@ -1935,14 +1949,17 @@ int32_t G_EnterLevel(int32_t g) g_restorePalette = 1; - Net_WaitForEverybody(); - mmulti_flushpackets(); + if (!premap_quickenterlevel) + { + Net_WaitForEverybody(); + mmulti_flushpackets(); - G_FadePalette(0,0,0,0); - G_UpdateScreenArea(); - clearview(0L); - G_DrawBackground(); - G_DrawRooms(myconnectindex,65536); + G_FadePalette(0,0,0,0); + G_UpdateScreenArea(); + clearview(0L); + G_DrawBackground(); + G_DrawRooms(myconnectindex,65536); + } for (i=0; i