windows build compatibility, twn_game_object as abstraction for bridging game code and the engine
This commit is contained in:
		| @@ -5,6 +5,8 @@ | ||||
|  | ||||
| #include "townengine/game_api.h" | ||||
|  | ||||
| #include <stdio.h> | ||||
|  | ||||
|  | ||||
| static void title_tick(struct state *state) { | ||||
|     struct scene_title *scn = (struct scene_title *)state->scene; | ||||
| @@ -20,9 +22,9 @@ static void title_tick(struct state *state) { | ||||
|      | ||||
|      | ||||
|     /* draw the tick count as an example of dynamic text */ | ||||
|     size_t text_str_len = snprintf(NULL, 0, "%ld", state->ctx->tick_count) + 1; | ||||
|     size_t text_str_len = snprintf(NULL, 0, "%lld", state->ctx->tick_count) + 1; | ||||
|     char *text_str = cmalloc(text_str_len); | ||||
|     snprintf(text_str, text_str_len, "%ld", state->ctx->tick_count); | ||||
|     snprintf(text_str, text_str_len, "%lld", state->ctx->tick_count); | ||||
|  | ||||
|     const char *font = "fonts/kenney-pixel.ttf"; | ||||
|     int text_h = 32; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user