Skip to content

Instantly share code, notes, and snippets.

@nex3
Created January 7, 2009 05:38
Show Gist options
  • Save nex3/44188 to your computer and use it in GitHub Desktop.
Save nex3/44188 to your computer and use it in GitHub Desktop.
diff --git a/game.c b/game.c
index 89bbb33..aaa5221 100644
--- a/game.c
+++ b/game.c
@@ -23,6 +23,11 @@
#define GAME_TITLE "Beret"
+#ifdef __WIN32__
+#define DIRSEP "\\"
+#else
+#define DIRSEP "/"
+#endif
int i, j;
int inactive = 0, paused = 0, guides = 0;
@@ -140,10 +145,10 @@ int init() {
int load_files() {
// Load images
- tilesheet = load_img("images\\tilesheet.png");
- spritesheet = load_img("images\\spritesheet.png");
- background = load_img("images\\bkg2.png");
- teleguide = load_img("images\\teleguide.png");
+ tilesheet = load_img("images" DIRSEP "tilesheet.png");
+ spritesheet = load_img("images" DIRSEP "spritesheet.png");
+ background = load_img("images" DIRSEP "bkg2.png");
+ teleguide = load_img("images" DIRSEP "teleguide.png");
// Load fonts
font = TTF_OpenFont( "tahoma.ttf", 36 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment