#pragma once
#include <SDL2/SDL.h>
#include "datatypes.h"
#include "stage.h"
/*
Copyright (c) 2013-2021 Devine Lu Linvega
2018 web port by rezmason
2021 C89 port by rezmason
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE.
*/
/*
The GUI module bears a lot of responsibility. Every use
the game has for the Stage module is a function in GUI—
usually some expression of the game state.
Hiversaires has many small, persistent HUD images
and many large, uncommon images. The GUI module loads
the HUD images when the game initializes, and coordinates
the loading and unloading of the larger images on demand.
*/
typedef enum {
CURSORTYPE_FUSE,
CURSORTYPE_FORWARD,
CURSORTYPE_LEFT,
CURSORTYPE_RIGHT,
CURSORTYPE_SYSTEM,
NumberOfCursorTypes
} CursorType;
typedef enum {
ICONTYPE_ALERT,
ICONTYPE_CLOCK_0,
ICONTYPE_CLOCK_1,
ICONTYPE_CLOCK_2,
ICONTYPE_FOOTSTEP,
ICONTYPE_FUSE_0,
ICONTYPE_FUSE_1,
ICONTYPE_FUSE_2,
ICONTYPE_FUSE_3,
ICONTYPE_MUSIC_OFF,
ICONTYPE_MUSIC_ON,
ICONTYPE_SAVE,
NumberOfIconTypes
} IconType;
typedef enum {
CLOCKTYPE_SHADOW,
CLOCKTYPE_STATE_0,
CLOCKTYPE_STATE_1,
CLOCKTYPE_STATE_2,
NumberOfClockTypes
} ClockType;
typedef enum {
MODIFIER_NONE,
MODIFIER_ENERGY_FILLED,
MODIFIER_ENERGY_EMPTY,
MODIFIER_ON,
MODIFIER_DOOR_OPEN,
MODIFIER_DOOR_SECRET,
MODIFIER_SEAL_1,
MODIFIER_SEAL_2,
MODIFIER_STUDIO_UNLOCKED,
MODIFIER_STUDIO_SEAL_1,
MODIFIER_STUDIO_SEAL_2,
MODIFIER_STUDIO_SEAL_BOTH,
MODIFIER_ENTENTE_EXIT
} NodeModifier;
typedef enum {
FOOTSTEP_LEFT,
FOOTSTEP_STRAIGHT,
FOOTSTEP_RIGHT
} Footstep;
int GUI_PreloadAssets();
void GUI_Init();
void GUI_Quit();
void GUI_SetActionTrigger(int active);
void GUI_HideCursor();
void GUI_UpdateCursor(int mouseX, int mouseY, int pressed);
void GUI_EnableFuseCursor(int enable);
RegionName GUI_GetRegionNameAt(int mouseX, int mouseY);
void GUI_Reset();
void GUI_ShowClockFace(int state, int refresh);
void GUI_ShowClock(int state);
void GUI_ShowClockAlert();
void GUI_ShowSeals(Zone zone1, Zone zone2);
void GUI_ShowSealAlert();
void GUI_ShowEnergy(int level);
void GUI_ShowEnergyAlert();
void GUI_ShowAudio(int enabled);
void GUI_HideMenu();
void GUI_ShowHomeMenu();
void GUI_ShowMovement(int nudgeX, int nudgeY);
void GUI_ShowNode(char *nodeName, Orientation orientation, NodeModifier modifier, double fadeDuration, double fadeDelay);
void GUI_ShowCredits(int showSecret);
void GUI_LaunchCreditURL();
void GUI_RunSplash(void (*onComplete)());
void GUI_SkipSplash();
void GUI_FlashVignette();
void GUI_ShowSave();
void GUI_ShowProgressScreen(Chapter chapter);
void GUI_ShowEntenteScreen();
void GUI_ShowMazeInstruction(MazeAxis axis, MazeInstruction instruction);
void GUI_ShowFootstep(Footstep step);
void GUI_TintRed();
void GUI_TintCyan();
void GUI_StopTint();