From 0a75bce02fa1c6784285dc319b1b95d598a3a6b2 Mon Sep 17 00:00:00 2001 From: anselme16 Date: Thu, 22 Jan 2015 13:08:07 +0100 Subject: [PATCH] changed some things on default window size --- main.c | 13 ++++++++++--- main.h | 5 +++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/main.c b/main.c index d27de08..ea46358 100755 --- a/main.c +++ b/main.c @@ -54,6 +54,7 @@ void updateTeam(t_team team){ int i; for(i=0; isuccess = 1; }else dude->success = 0; break; case PUT : + dude->success = 1; if(dude->inventory != -1 && (target.type == GRASS || target.type == MARK || target.type == dude->inventory)){ if(target.type == GRASS || target.type == MARK){ map[target_pos.x][target_pos.y].type = dude->inventory; @@ -327,6 +330,7 @@ void handleAction(t_dude* dude){ dude->success = 1; break; default : + dude->success = 0; break; } break; @@ -395,7 +399,7 @@ int MAIN int paused = 0; int x_offset = 0; int y_offset = 0; - int zoom_level = 1; + int zoom_level = DEFAULT_STARTING_ZOOM; int over = 0; int time = 0; int wait_time = 100; @@ -404,6 +408,8 @@ int MAIN int fullscreen = 0; int width = DEFAULT_GAME_WIDTH; int height = DEFAULT_GAME_HEIGHT; + int disp_width = DEFAULT_WINDOW_WIDTH; + int disp_height = DEFAULT_WINDOW_HEIGHT; #ifndef _WIN32 argv++; @@ -415,9 +421,11 @@ int MAIN break; case 'w' : width = atoi(argv[0]+2); + disp_width = 2*width; break; case 'h' : height = atoi(argv[0]+2); + disp_height = 2*height; break; default : break; @@ -427,7 +435,7 @@ int MAIN } #endif - screen = initSDL(width, height, fullscreen); + screen = initSDL(disp_width, disp_height, fullscreen); initWorld(width, height); SDL_Flip(img); @@ -504,7 +512,6 @@ int MAIN spawnDudes(); for(i=0; i