2010-08-02 08:13:51 +00:00
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
/*
|
|
|
|
Copyright (C) 2010 EDuke32 developers and contributors
|
|
|
|
|
|
|
|
This file is part of EDuke32.
|
|
|
|
|
|
|
|
EDuke32 is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License version 2
|
|
|
|
as published by the Free Software Foundation.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
|
|
|
See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
2014-07-20 08:55:56 +00:00
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2010-08-02 08:13:51 +00:00
|
|
|
*/
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
2014-11-22 12:32:56 +00:00
|
|
|
#ifndef anim_h_
|
|
|
|
#define anim_h_
|
2010-08-02 08:13:51 +00:00
|
|
|
|
2018-11-18 18:09:48 +00:00
|
|
|
#include "compat.h"
|
|
|
|
#include "hash.h"
|
2019-12-25 08:51:44 +00:00
|
|
|
#include "tarray.h"
|
|
|
|
#include "zstring.h"
|
2018-11-18 18:09:48 +00:00
|
|
|
|
2019-09-21 20:53:00 +00:00
|
|
|
BEGIN_DUKE_NS
|
|
|
|
|
2017-06-25 11:24:19 +00:00
|
|
|
typedef struct {
|
2020-01-03 08:45:15 +00:00
|
|
|
uint16_t frame = 0;
|
|
|
|
int16_t sound = 0;
|
2017-06-25 11:24:19 +00:00
|
|
|
} animsound_t;
|
|
|
|
|
2015-02-11 05:22:07 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
2019-12-25 08:51:44 +00:00
|
|
|
FString name;
|
2020-01-03 08:45:15 +00:00
|
|
|
double frameaspect1 = 0.0, frameaspect2 = 0.0;
|
|
|
|
uint8_t* animbuf = nullptr;
|
2019-12-25 08:51:44 +00:00
|
|
|
TArray<animsound_t> Sounds;
|
2020-01-03 08:45:15 +00:00
|
|
|
uint8_t framedelay = 0;
|
|
|
|
uint8_t frameflags = 0;
|
2015-02-11 05:22:07 +00:00
|
|
|
} dukeanim_t;
|
|
|
|
|
2019-12-25 08:51:44 +00:00
|
|
|
extern dukeanim_t* g_animPtr;
|
|
|
|
extern TArray<dukeanim_t> g_Animations;
|
|
|
|
|
2016-02-07 02:38:28 +00:00
|
|
|
extern dukeanim_t * Anim_Find(const char *s);
|
2017-06-25 11:24:10 +00:00
|
|
|
extern dukeanim_t * Anim_Create(const char *fn);
|
2016-02-07 02:38:28 +00:00
|
|
|
int32_t Anim_Play(const char *fn);
|
|
|
|
void Anim_Init(void);
|
Possibility of specifying sounds for a VPX anim-replacement via DEF.
The syntax is as follows:
animsounds <anim> { frame1 sound1 frame2 sound2 ... }
<anim> has to be one of the tokens: cineov2, cineov3, RADLOGO, DUKETEAM,
logo, vol41a, vol42a, vol4e1, vol43a, vol4e2, or vol4e3, corresponding
to hard-coded Duke3D anims.
The frameN's (1-based frame numbers) have to be in ascending order (but not
necessarily strictly ascending, so that a frame may have more than one sound).
Example: for Duke3D's XBLA nuke logo animation (IVF extracted from nuke.webm),
the following definition overlays the video with a sound sequence similar
(identical save for timing) to the original nuke animation:
// frame 1: FLY_BY, frame 64: PIPEBOMB_EXPLODE
animsounds logo { 1 244 64 14 }
git-svn-id: https://svn.eduke32.com/eduke32@2242 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-10 23:43:54 +00:00
|
|
|
|
2019-09-21 20:53:00 +00:00
|
|
|
END_DUKE_NS
|
|
|
|
|
2010-08-02 08:13:51 +00:00
|
|
|
#endif
|