Files
source/Ja2/Screens.h
T
Marco Antonio J. Costaandmajcosta 86ad401186 add newline at end of file where it's lacking
.editorconfig already enforces it but it's getting changed piecemeal in
every commit. just get it done with.

the script:
```

find . -type f -not -path "./.git/*" -not -path "./.vs/*" | while read -r file; do
	isFile=$(file -0 "$file" | cut -d $'\0' -f2)
	case "$isFile" in
		(*text*)
			echo "$file is text"
			if [[ $(tail -c 1 "$file" | wc -l) -ne 1 ]]; then
				echo "" >> "$file"
			fi
			;;
		(*)
			echo "file isn't text"
			;;
	esac
done
```
2024-12-14 19:05:48 -03:00

38 lines
1.3 KiB
C

#ifndef __SCREEN_MANAGER
#define __SCREEN_MANAGER
#include "Types.h"
#include "ScreenIds.h"
// Each screen in the game comes with a Status flag (what was the last thing the screen was doing), an Initialization
// function (which loads up the screen if necessary), a Handler function which is called while the screen is showing and
// a shutdown function which is called when the screen is getting ready to make another screen active.
typedef struct Screens
{
UINT32 (*InitializeScreen)(void);
UINT32 (*HandleScreen)(void);
UINT32 (*ShutdownScreen)(void);
} Screens;
// These defines are used as flags for each screen state. The only legal transition of states is
// SCR_INACTIVE->SCR_INITIALIZING->SCR_ACTIVE->SCR_SHUTTING_DOWN->SCR_INACTIVE ... Anything else
// will cause the system to yak.
#define SCR_INACTIVE 0x00
#define SCR_INITIALIZING 0x01
#define SCR_ACTIVE 0x02
#define SCR_SHUTTING_DOWN 0x04
// This extern is made available to make sure that external modules will have access to the screen information
extern Screens GameScreens[MAX_SCREENS];
// We must include all the following .H files which have prototypes for all the initialization, handler and shutdown
// functions for all the screens. There should be as many includes as there are screens.
#include "jascreens.h"
#endif