Create basic engine
This commit is contained in:
34
engine/include/engine_hooks.h
Normal file
34
engine/include/engine_hooks.h
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright (c) Camden Dixie O'Brien
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
#ifndef ENGINE_HOOKS_H
|
||||
#define ENGINE_HOOKS_H
|
||||
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
typedef struct {
|
||||
struct {
|
||||
const char *title;
|
||||
unsigned w, h;
|
||||
} win;
|
||||
size_t memsize;
|
||||
} engineconf_t;
|
||||
|
||||
typedef enum {
|
||||
GAMESTATUS_OK,
|
||||
GAMESTATUS_QUIT,
|
||||
} gamestatus_t;
|
||||
|
||||
extern const engineconf_t game_conf;
|
||||
|
||||
void game_init(int argc, char *argv[], void *mem, SDL_Renderer *renderer);
|
||||
void game_teardown(void *mem);
|
||||
|
||||
gamestatus_t game_evthandle(void *mem, const SDL_Event *evt);
|
||||
gamestatus_t game_update(void *mem, unsigned dt);
|
||||
|
||||
void game_render(const void *mem, SDL_Renderer *renderer, long unsigned t);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user