Subversion Repositories eduke32

Rev

Show changed files | Details | Compare with Previous | Blame | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
5045 2184d 7h hendricks266 /polymer/eduke32/source/events_defs.h CON: Add EVENT_DISPLAYLEVELSTATS. Set RETURN to -1 to disable them.  
5003 2209d 8h hendricks266 /polymer/eduke32/source/events_defs.h Replace erroneous use of EVENT_DISPLAYCROSSHAIR with new event EVENT_DISPLAYCURSOR.  
4987 2209d 10h terminx /polymer/eduke32/source/events_defs.h Animation system overhaul part 1. This allows for an unlimited number of .anm/.ivf files to be defined via duke3d.def and played back at any time with the new CON commands. Syntax is currently as follows, but may change:

cutscene "somefile.anm" { delay 10 } // defines somefile.anm with a delay of 10 120Hz tics between frames. a more typical framerate method may come later, but this is how the originals worked.

Once defined, they can be played through CON with the new playback command, also called "cutscene". It works like this:

definequote 12345 somefile.anm
define ANIM_SOMEFILE 12345

...

cutscene ANIM_SOMEFILE // halts game execution and immediately plays cutscene, resuming execution when finished

...

Sounds can be played during animations (and tiles can be overlaid, etc) like this:

onevent EVENT_CUTSCENE
ifcutscene ANIM_SOMEFILE
{
ifvare RETURN 12 // frame 12
sound FLY_BY
rotatesprite ...
}
endevent

The value of the RETURN var at the end of EVENT_CUTSCENE determines the next frame to play. This can be used for looping, etc. Attempting to play animations backwards outright is not advised as animations only seek in one direction (so rewinding requires running it through from frame 0 again). This is will WIP and hasn't been heavily tested at all, so please try it out.
 
4945 2226d 3h hendricks266 /polymer/eduke32/source/events_defs.h Add events EVENT_DISPLAYINACTIVEMENU and EVENT_DISPLAYINACTIVEMENUREST and userdef members m_origin_x and m_origin_y.

This allows for CON screen display code to use menu animations. The following is an example of how to adapt screen features that should animate.

before:

onevent EVENT_DISPLAYMENUREST
ifvare current_menu 0 // main menu
{
setvar x 1
setvar y 1
rotatesprite x y zoom ang tilenum shade pal orientation 0 0 xdim ydim
}
endevent

after:

state DisplayMenuCommon
ifvare RETURN 0 // main menu
{
getuserdef[THISACTOR].m_origin_x x
getuserdef[THISACTOR].m_origin_y y
addvar x 65536
addvar y 65536
rotatesprite16 x y zoom ang tilenum shade pal orientation 0 0 xdim ydim
}
ends

onevent EVENT_DISPLAYMENUREST state DisplayMenuCommon endevent
onevent EVENT_DISPLAYINACTIVEMENUREST state DisplayMenuCommon endevent
 
4711 2311d 18h helixhorned /polymer/eduke32/source/events_defs.h Add forgotten events_defs.h, oops. DONT_BUILD.