~rabbits/hiversaires

ref: 3e1627a4c505fa9109dd8d7d107a0b9946af8e5c hiversaires/src/gui.h -rw-r--r-- 3.0 KiB
3e1627a4Rezmason Implementing the credits as just a slower splash, with fading in mixed in, and click-through links to the logos' corresponding sites. Added Aliceffekt logo and the secret logo. Updated the credit trigger to only show the secret if the player has an extra fuse *and* didn't use the walkthrough. 1 year, 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#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();