69 lines
1.5 KiB
C
69 lines
1.5 KiB
C
#ifndef STATE_ANIMATOR_H
|
|
#define STATE_ANIMATOR_H
|
|
#include "Primitives.h"
|
|
#include "Ui.h"
|
|
#include <SDL2/SDL.h>
|
|
int openAnimatorState();
|
|
int closeAnimatorState();
|
|
int handleAnimatorState(SDL_Event event);
|
|
int processAnimatorState();
|
|
int renderAnimatorState();
|
|
// funcs
|
|
int initializeAnims();
|
|
int buildAnimList();
|
|
// ui sync/update stuff
|
|
int updateAnim();
|
|
int updateSets();
|
|
int updateFaces();
|
|
int updateFrames();
|
|
int refreshData();
|
|
int syncFrames();
|
|
int set_index;
|
|
int face_index;
|
|
int frame_index;
|
|
|
|
// UI data
|
|
struct Box *anim_window;
|
|
// left-hand
|
|
struct List *anim_list;
|
|
struct Button *anim_list_item;
|
|
struct Button *anim_init;
|
|
struct Button *anim_rebuild;
|
|
struct Button *anim_delete;
|
|
struct Button *anim_buttons[6];
|
|
struct Button *anim_button;
|
|
// right-hand
|
|
struct Box *anim_box; // replace with Image?
|
|
struct List *anim_sets;
|
|
struct List *anim_faces;
|
|
struct Box *anim_frames_box;
|
|
struct Textt **anim_frames;
|
|
int anim_frames_count;
|
|
int anim_frames_offset;
|
|
struct Box *anim_frames_i_box;
|
|
struct TextInput **anim_frames_input;
|
|
struct TextInput *anim_input;
|
|
int anim_input_i;
|
|
struct Button *anim_sets_item;
|
|
struct Button *anim_faces_item;
|
|
//
|
|
struct Button *anim_save;
|
|
struct Button *anim_play;
|
|
struct Button *anim_stop;
|
|
// loaded/local Anim
|
|
struct AnimData *l_anim_data;
|
|
struct SetData *l_set_data;
|
|
struct FaceData *l_face_data;
|
|
struct FrameData *l_frame_data;
|
|
#define ANIM_INIT 0
|
|
#define ANIM_REBUILD 1
|
|
#define ANIM_DELETE 2
|
|
#define ANIM_SAVE 3
|
|
#define ANIM_PLAY 4
|
|
#define ANIM_STOP 5
|
|
#define ANIM_BUTTONS 6
|
|
// right-hand
|
|
int mouse_x;
|
|
int mouse_y;
|
|
#endif
|