Subversion Repositories eduke32


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

Filtering Options

Rev Age Author Path Log message Diff
5039 2185d 20h hendricks266 /polymer/eduke32/source/gamedef.h CON: Add "resetplayerflags". Flag 1 means "don't ask the user if they want to load".  
5033 2195d 0h hendricks266 /polymer/eduke32/source/gamedef.h CON: Add "definevolumeflags", currently equipped to hide an episode from the single player and/or multiplayer screens.

5032 2195d 0h hendricks266 /polymer/eduke32/source/gamedef.h CON: Extend undefinevolume so that it also undefines all levels in the specified volume.  
5031 2195d 0h hendricks266 /polymer/eduke32/source/gamedef.h CON: Rename "cutscene" command to "startcutscene".  
4988 2206d 17h terminx /polymer/eduke32/source/gamedef.h C-CON changes  
4987 2206d 17h 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:

ifcutscene ANIM_SOMEFILE
ifvare RETURN 12 // frame 12
sound FLY_BY
rotatesprite ...

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 2208d 16h hendricks266 /polymer/eduke32/source/gamedef.h CON: Add undefinevolume, undefineskill, and undefinelevel.  
4970 2209d 14h hendricks266 /polymer/eduke32/source/gamedef.h CON: Add read-only access to ud.config.MusicToggle through the "musictoggle" member.  
4969 2209d 14h hendricks266 /polymer/eduke32/source/gamedef.h CON: Add STR_YOURTIME, STR_PARTIME, STR_DESIGNERTIME, and STR_BESTTIME to qgetsysstr.  
4968 2209d 14h 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 2223d 10h 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.


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


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

onevent EVENT_DISPLAYMENUREST state DisplayMenuCommon endevent
onevent EVENT_DISPLAYINACTIVEMENUREST state DisplayMenuCommon endevent
4928 2231d 22h 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 2237d 17h terminx /polymer/eduke32/source/gamedef.h Questionable CON changes and optimizations. <3  
4766 2283d 17h 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 2287d 9h 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 2287d 10h 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 2412d 13h 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.

4416 2518d 11h 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 2532d 13h terminx /polymer/eduke32/source/gamedef.h Widespread use of ARRAY_SIZE macro.  
4146 2663d 5h 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.

Show All