Created
June 12, 2018 23:45
-
-
Save hikilaka/37b68aea7aabcde3a7310ae712d482b1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdint.h> | |
#include <stdlib.h> | |
#include <game.h> | |
#include <globals.h> | |
#include <jag_arc.h> | |
#include <log.h> | |
#include <surface.h> | |
void game_load_resources(struct game *game) { | |
struct jag_arc jagex_arc; | |
int error = jag_arc_load(&jagex_arc, "release/jagex.jag"); | |
if (error) { | |
log_fatal("failed to load jagex.jag"); | |
game_stop(game); | |
return; | |
} | |
jag_arc_get(&jagex_arc, "logo.tga"); | |
} | |
void game_update(struct game *game) { (void)game; } | |
void game_render(struct game *game) { | |
(void)game; | |
surface_render_begin(g_screen); | |
surface_clear(g_screen); | |
surface_circle_fill(g_screen, 300, 150, 35, SURFACE_GREEN, 255); | |
surface_render_end(g_screen); | |
} | |
int main(void) { | |
struct game game; | |
struct surface surface; | |
game_init(&game, "runescape classic", 512, 384); | |
surface_init(&surface, &game, 10); | |
g_game = &game; | |
g_screen = &surface; | |
game_start(&game); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment