Subversion Repositories eduke32

Rev

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

Filtering Options

Rev Age Author Path Log message Diff
4987 2355d 18h terminx /polymer/eduke32/source/gamedef.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.
 
4977 2357d 17h hendricks266 /polymer/eduke32/source/gamedef.h CON: Add undefinevolume, undefineskill, and undefinelevel.  
4970 2358d 15h hendricks266 /polymer/eduke32/source/gamedef.h CON: Add read-only access to ud.config.MusicToggle through the "musictoggle" member.  
4969 2358d 15h hendricks266 /polymer/eduke32/source/gamedef.h CON: Add STR_YOURTIME, STR_PARTIME, STR_DESIGNERTIME, and STR_BESTTIME to qgetsysstr.  
4968 2358d 15h hendricks266 /polymer/eduke32/source/gamedef.h Factor out generation of strings for time values in the bonus screen. This involves the creation of ud.playerbest.  
4945 2372d 11h hendricks266 /polymer/eduke32/source/gamedef.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
 
4928 2380d 23h hendricks266 /polymer/eduke32/source/gamedef.h CON: Add new commands "getmusicposition" and "setmusicposition" that operate on the playback position of the current music track.

// Example: Switch between tracks like radio stations.
getmusicposition temp
starttrackvar next_music_track
setmusicposition temp

Only implemented for Ogg Vorbis, FLAC, and XA. Consult the devs before using these commands.
 
4902 2386d 18h terminx /polymer/eduke32/source/gamedef.h Questionable CON changes and optimizations. <3  
4766 2432d 18h hendricks266 /polymer/eduke32/source/gamedef.h Make a bunch of things extern "C". This should fix C++ builds on OS X and with Lunatic. DONT_BUILD.  
4747 2436d 10h terminx /polymer/eduke32/source/gamedef.h Part 1 of attempting to adhere to C standard section 7.1.3. It turns out it's illegal to use identifiers that begin with _ or have __ anywhere in them. DONT_BUILD.  
4745 2436d 11h terminx /polymer/eduke32/source/gamedef.h Mainly misc cleanups (and a fix for the C++ build), but there are a few important changes in here.

VM_OnEvent() has become VM_OnEvent(), VM_OnEventWithReturn(), VM_OnEventWithDist(), and VM_OnEventWithBoth() (the latter of which is only ever used once...). Of course, this required every call to VM_OnEvent() be changed.

memberlabel_t and vmstate_t have been changed to use the regular "int" type versus explicitly specifying int32_t as they did previously. The rationale for this change is simply that it looks cleaner, and I think we should move toward just using "int" in most cases where there's no particular reason to specify an explicit data type.

Also changes CON_KILLIT to just "return" instead of "continue". DONT_BUILD.
 
4541 2561d 14h hendricks266 /polymer/eduke32/source/gamedef.h Replace the funkily-formatted GNU.TXT with the FSF's official gpl-2.0.txt. Also, update the FSF's address in all source files that contain it.

DONT_BUILD.
 
4416 2667d 12h helixhorned /polymer/eduke32/source/gamedef.h Rename sector[].filler member to '.fogpal'. From CON, keep the '.alignto' alias.

The overall situation is thus as follows:
- in C and from Lua, that member is called 'fogpal'
- In CON (both C-CON and LunaCON), it's 'fogpal' with 'alignto' being an alias;
'filler' wasn't available before, either.
- In m32script, it's 'fogpal' or 'alignto' ('filler' is not available any more)
 
4385 2681d 14h terminx /polymer/eduke32/source/gamedef.h Widespread use of ARRAY_SIZE macro.  
4146 2812d 6h helixhorned /polymer/eduke32/source/gamedef.h CON: add sprite pseudo-member 'isvalid', getting 1 if the sprite is valid.

And 0 otherwise. Before accessing a sprite that is not not known to be
definitely valid (e.g. a loop over all sprites from 0 to MAXSPRITES-1),
one should check for validity before accessing it in any other fashion.
 
3961 2928d 5h helixhorned /polymer/eduke32/source/gamedef.h Retire global 'lastvisinc'.

It was only ever used as upper bound to the time that a visibility change
decays, but since it does that in an exponential fashion, there's really
no point.
 
3945 2933d 2h helixhorned /polymer/eduke32/source/gamedef.h LunaCON: add forgotted "screensound" to keyword list in con_lang.lua.

Also, fix 'spriteflags' directive.
 
3912 2948d 9h helixhorned /polymer/eduke32/source/gamedef.h CON: New command 'screensound', unconditionally playing a session-wide sound.  
3866 2967d 6h helixhorned /polymer/eduke32/source/gamedef.h CON: add projectile member .userdata and predefined label PROJ_USERDATA.

It is a 32-bit signed integer. No version bump necessary, although CON code
accessing this new member will not work with earlier revisions (obviously).
 
3834 2975d 16h hendricks266 /polymer/eduke32/source/gamedef.h Dynamicsoundremap.  

Show All