summaryrefslogtreecommitdiff
path: root/include/state.h
blob: 4b2fe2c7786997a6226c15c6dd20d72a6d068039 (plain)
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
#pragma once

#define ALLOC_PAGE_SIZE 256

typedef struct {
	char *exePath;
	bool hasWindow;
	bool run;
	bool gcUnload;
	lua_State *luaState;
	Vector2 resolution;
	int logLevelInvalid;
	Font defaultFont;
	Material defaultMaterial;
	int *RLGLcurrentShaderLocs;
	/* Events. */
	/* GLFW events. */
#ifdef PLATFORM_DESKTOP
		/* Window events. */
	GLFWwindowsizefun raylibWindowSizeCallback;
	GLFWwindowmaximizefun raylibWindowMaximizeCallback;
	GLFWwindowiconifyfun raylibWindowIconifyCallback;
	GLFWwindowfocusfun raylibWindowFocusCallback;
	GLFWdropfun raylibWindowDropCallback;
		/* Input events. */
	GLFWkeyfun raylibKeyCallback;
	GLFWcharfun raylibCharCallback;
	GLFWmousebuttonfun raylibMouseButtonCallback;
	GLFWcursorposfun raylibMouseCursorPosCallback;
	GLFWscrollfun raylibMouseScrollCallback;
	GLFWcursorenterfun raylibCursorEnterCallback;
	GLFWjoystickfun raylibJoystickCallback;
// #elif PLATFORM_DESKTOP_SDL

#endif
} State;

extern State *state;

bool stateInit( int argn, const char **argc, const char *exePath );
void stateInitInterpret( int argn, const char **argc );
void stateFree();