twn_input: singleton rework, twn_control.h and fixes
This commit is contained in:
		@@ -4,6 +4,7 @@
 | 
			
		||||
#include "twn_context.h"
 | 
			
		||||
#include "twn_textures_c.h"
 | 
			
		||||
#include "twn_audio_c.h"
 | 
			
		||||
#include "twn_input_c.h"
 | 
			
		||||
#include "twn_engine_api.h"
 | 
			
		||||
#include "rendering/twn_draw_c.h"
 | 
			
		||||
 | 
			
		||||
@@ -18,6 +19,8 @@ typedef struct EngineContext {
 | 
			
		||||
    /* user code facing context */
 | 
			
		||||
    Context game;
 | 
			
		||||
 | 
			
		||||
    InputState input;
 | 
			
		||||
 | 
			
		||||
    /* the program's actual argc and argv */
 | 
			
		||||
    int argc;
 | 
			
		||||
    char **argv;
 | 
			
		||||
@@ -64,6 +67,7 @@ typedef struct EngineContext {
 | 
			
		||||
    bool was_successful;
 | 
			
		||||
} EngineContext;
 | 
			
		||||
 | 
			
		||||
/* TODO: does it need to be marked with TWN_API? */
 | 
			
		||||
TWN_API extern EngineContext ctx;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user