Subversion Repositories eduke32


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

Filtering Options

Rev Age Author Path Log message Diff
4987 2414d 21h terminx /polymer/eduke32/source/anim.c 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.
4859 2460d 6h hendricks266 /polymer/eduke32/source/anim.c Fix playing end-of-episode ANMs.  
4662 2523d 23h terminx /polymer/eduke32/source/anim.c if 0 the input check at the beginning of animation playback as it seems to cause some cutscenes to be skipped.  
4626 2548d 22h terminx /polymer/eduke32/source/anim.c Optimize .anm playback; update frames on screen at the .anm's framerate instead of blindly looping as fast as possible  
4623 2548d 22h terminx /polymer/eduke32/source/anim.c More Polymost cleanup, also consolidate tilesizx and tilesizy into a single tilesiz vec2_t to ensure both x and y are always in the same cache line. I may add a new vec2_16t later. Still need to take care of emulating the old flat array for the sake of CON access.  
4541 2620d 18h hendricks266 /polymer/eduke32/source/anim.c 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.

4524 2648d 0h hendricks266 /polymer/eduke32/source/anim.c Keep track of allocated cache space for ANM files so they aren't allocated multiple times. Also, unlock the handles after playback is done so they can be freed if necessary.  
4243 2809d 13h hendricks266 /polymer/eduke32/source/anim.c Allow the episode 4 cutscenes to be skipped in their entirety with one keypress, as in the original DOS game, instead of requiring input for each ANM file.  
3628 3096d 8h helixhorned /polymer/eduke32/source/anim.c Add rudimentary sanity checks when playing ANM files.

- Don't attempt to play an ANM file if it is empty (warn) or too short (error).
- If failing to read IVF file header or initializing VPX codec, don't play ANM.
- Return early from gltexapplyprops() if not in GL modes.
3346 3187d 6h terminx /polymer/eduke32/source/anim.c Add predefined REND_CLASSIC, REND_POLYMOST and REND_POLYMER constants and use them everywhere getrendermode() is called.  
2996 3303d 9h helixhorned /polymer/eduke32/source/anim.c Move G_HandleAsync() into game.h as 'static inline' and use everywhere else.  
2924 3320d 14h helixhorned /polymer/eduke32/source/anim.c In places where fullscreen tiles are drawn (logo etc.), use clearallviews().

This really fixes clearing the borders to the left and right with widescreen
and hud_bgstretch=0. Also, it seems to fix glitches when the "screen size"
is small (ud.screen_size is large).
2912 3323d 5h helixhorned /polymer/eduke32/source/anim.c Clear the screen first in some non-in-game places, also in classic.

Compare with revision 2584.
2833 3357d 8h helixhorned /polymer/eduke32/source/anim.c VP8: don't call I_ClearAllInput() before idle loop.

If input is cleared before, it can become impossible to cancel the video
when decoding and displaying a frame takes longer than a frame.
2832 3357d 8h helixhorned /polymer/eduke32/source/anim.c VP8: collect times while playing the video and print a summary to the log afterwards.  
2728 3397d 10h hendricks266 /polymer/eduke32/source/anim.c Massive menu input control revamp/cleanup/factor. (added: input.[ch])

New Wii control defaults for the Wii Remote + Nunchuk and the Classic Controller. This includes new code added just so that the Home key brings up the menu in-game, reducing the need for a USB keyboard.

On the technical side, raw joystick access (comparable to what is available for keyboard and mouse) is now present in jmact, on the game side. (added: joystick.[ch])

Using this new raw joystick access, I replaced tueidj's hack to map A and B to LMB/RMB and D-Pad Up/Down to the scrollwheel.

I made the menus more friendly to mouse and joystick browsing by adding and unifying checks and clears for various buttons and gamefuncs. In fact, the majority of the time spent on this commit was tracking down problems that appeared with the factoring and trying to understand the menu system and the way input checks are precariously executed.

In addition, "Press any key or button to continue" now truly means what it says.

As a result of incorporating proper raw access into control.c instead of it directly accessing the implementaiton, the program *may* no longer be affected by joystick input when it is out of focus. This follows the pattern set by the mouse, and I think this is a positive change.

A small bonus: In the classic/old keyboard preset, the key for Show_Console has been changed from '`' to 'C' because '`' is taken by Quick_Kick.
2584 3457d 8h helixhorned /polymer/eduke32/source/anim.c When in GL modes, clear the screen first in some non-in-game places.

This is so that when hud_bgstretch is disabled (i.e. background pictures are
not stretched to the whole screen), the frame buffer has no leftover contents
from previous frames on the sides of the screen. This was particularly noticable
when using the console.
The "places" are the following:
- before drawing an anim frame
- before drawing a "full-screen" background
- while displaying logo, titlescreen, loadscreen
(this leaves a couple others which I didn't test, and didn't tweak)
2559 3464d 7h helixhorned /polymer/eduke32/source/anim.c Replace various occurences of "Bstrncpy(buf, src, sz); buf[sz-1]=0;" with Bstrncpyz  
2516 3470d 4h helixhorned /polymer/eduke32/source/anim.c Remove global 'uint8_t *anim_pal' which was only used once as a temporary.  
2308 3519d 9h helixhorned /polymer/eduke32/source/anim.c legibility improvements: rotatesprite(..., 0,0,xdim-1,ydim-1) -> rotatesprite_fs  

Show All