2019-09-18 22:27:46 +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
|
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#ifndef anim_h_
|
|
|
|
#define anim_h_
|
|
|
|
|
2019-09-21 22:10:48 +00:00
|
|
|
BEGIN_RR_NS
|
|
|
|
|
2019-09-18 22:27:46 +00:00
|
|
|
typedef struct {
|
2020-01-03 10:47:10 +00:00
|
|
|
uint16_t frame = 0;
|
|
|
|
int16_t sound = 0;
|
2019-09-18 22:27:46 +00:00
|
|
|
} animsound_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2019-12-25 08:51:44 +00:00
|
|
|
FString name;
|
2020-01-03 10:47:10 +00:00
|
|
|
double frameaspect1 = 0, frameaspect2 = 0;
|
|
|
|
uint8_t* animbuf = nullptr;
|
2019-12-25 08:51:44 +00:00
|
|
|
TArray<animsound_t> Sounds;
|
2020-01-03 10:47:10 +00:00
|
|
|
uint8_t framedelay = 0;
|
|
|
|
uint8_t frameflags = 0;
|
2019-09-18 22:27:46 +00:00
|
|
|
} dukeanim_t;
|
|
|
|
|
2019-12-25 08:51:44 +00:00
|
|
|
extern dukeanim_t* g_animPtr;
|
|
|
|
extern TArray<dukeanim_t> g_Animations;
|
2019-09-18 22:27:46 +00:00
|
|
|
extern dukeanim_t * Anim_Find(const char *s);
|
|
|
|
extern dukeanim_t * Anim_Create(const char *fn);
|
|
|
|
int32_t Anim_Play(const char *fn);
|
|
|
|
void Anim_Init(void);
|
|
|
|
|
2019-09-21 22:10:48 +00:00
|
|
|
END_RR_NS
|
2019-09-18 22:27:46 +00:00
|
|
|
#endif
|
2019-09-21 22:10:48 +00:00
|
|
|
|