forming the skeleton

This commit is contained in:
2025-06-21 21:36:32 -04:00
parent 3bedd81d96
commit ea2e7e918c
22 changed files with 921 additions and 309 deletions

View File

@@ -1,26 +1,40 @@
#pragma once
#include "anm2.h"
#include "resources.h"
static const SDL_DialogFileFilter ANM2_DIALOG_FILE_FILTER[] =
static const SDL_DialogFileFilter DIALOG_FILE_FILTER_ANM2[] =
{
{"Anm2", "anm2;xml"}
};
static const SDL_DialogFileFilter DIALOG_FILE_FILTER_PNG[] =
{
{"png", "png"}
};
enum DialogType
{
DIALOG_NONE,
DIALOG_ANM2_OPEN,
DIALOG_ANM2_SAVE
DIALOG_ANM2_SAVE,
DIALOG_PNG_OPEN,
DIALOG_PNG_REPLACE
};
struct Dialog
{
Anm2* anm2 = NULL;
enum DialogType type = DIALOG_ANM2_OPEN;
Resources* resources = NULL;
s32 replaceID = -1;
enum DialogType type = DIALOG_NONE;
char path[PATH_MAX] = "";
bool isSelected = false;
};
void dialog_init(Dialog* self, Anm2* anm2, Resources* resources);
void dialog_anm2_open(Dialog* self);
void dialog_png_open(Dialog* self);
void dialog_png_replace(Dialog* self);
void dialog_anm2_save(Dialog* self);
void dialog_tick(Dialog* self);