Files
DevilutionX/Source/interfac.h
Gleb Mazovetskiy eb51a8beb3 Reduce demo message size
`DemoMsg` struct and event data are now kept separately.

RAM usage for the timedemo messages: -85% (1.8 MiB -> 261 KiB)

Demo (`.dmo`) file size: -57% (590,790 bytes -> 253,410 bytes)
2023-08-27 16:49:13 +01:00

61 lines
987 B
C++

/**
* @file interfac.h
*
* Interface of load screens.
*/
#pragma once
#include <cstdint>
#include "utils/ui_fwd.h"
namespace devilution {
/**
* @brief Custom events.
*/
enum interface_mode : uint8_t {
WM_DIABNEXTLVL = 0,
WM_DIABPREVLVL,
WM_DIABRTNLVL,
WM_DIABSETLVL,
WM_DIABWARPLVL,
WM_DIABTOWNWARP,
WM_DIABTWARPUP,
WM_DIABRETOWN,
WM_DIABNEWGAME,
WM_DIABLOADGAME,
WM_FIRST = WM_DIABNEXTLVL,
WM_LAST = WM_DIABLOADGAME,
};
void RegisterCustomEvents();
bool IsCustomEvent(uint16_t eventType);
interface_mode GetCustomEvent(uint16_t eventType);
uint16_t CustomEventToSdlEvent(interface_mode eventType);
enum Cutscenes : uint8_t {
CutStart,
CutTown,
CutLevel1,
CutLevel2,
CutLevel3,
CutLevel4,
CutLevel5,
CutLevel6,
CutPortal,
CutPortalRed,
CutGate,
};
void interface_msg_pump();
void IncProgress();
void CompleteProgress();
void ShowProgress(interface_mode uMsg);
} // namespace devilution