diff --git a/games/VentureAdventure/Documentation/blanklevel.txt b/games/VentureAdventure/Documentation/blanklevel.txt index e2ccf3fa..73c93d64 100644 --- a/games/VentureAdventure/Documentation/blanklevel.txt +++ b/games/VentureAdventure/Documentation/blanklevel.txt @@ -1,16 +1,16 @@ -14 43 44 43 44 43 44 43 44 43 44 43 44 43 44 14 -30 400 0 0 0 0 0 0 0 0 0 0 0 0 0 30 -14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 -30 0 0 0 0 0 0 0 0 0 0 0 0 0 0 30 -14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 -30 0 0 0 0 0 0 0 0 0 0 0 0 0 0 30 -14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 -30 0 0 0 0 0 0 0 0 0 0 0 0 0 0 30 -14 0 0 0 0 0 0 0 84 0 0 0 0 0 0 14 -30 0 0 0 0 0 0 0 0 0 0 0 0 0 0 30 -14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 -30 0 0 0 0 0 0 0 0 0 0 0 0 0 0 30 -14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 -30 0 0 0 0 0 0 0 0 0 0 0 0 0 0 30 -14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 -30 43 44 43 44 43 44 43 44 43 44 43 44 43 44 30 \ No newline at end of file +14 43 44 43 44 43 44 43 44 43 44 43 44 43 44 43 44 43 44 43 44 43 44 +30 400 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 +14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 30 +30 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 +14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 30 +30 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 +14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 30 +30 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 +14 0 0 0 0 0 0 0 84 0 0 0 0 0 0 0 0 0 0 0 0 0 30 +30 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 +14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 30 +30 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 +14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 30 +30 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 +14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 30 +30 43 44 43 44 43 44 43 44 43 44 43 44 43 44 43 44 43 44 43 44 43 44 \ No newline at end of file diff --git a/games/VentureAdventure/Resources/levels/level1.txt b/games/VentureAdventure/Resources/levels/level1.txt index 3a6533eb..a54b20b3 100644 --- a/games/VentureAdventure/Resources/levels/level1.txt +++ b/games/VentureAdventure/Resources/levels/level1.txt @@ -1,16 +1,16 @@ -14 43 44 43 44 43 44 43 44 43 44 43 44 43 44 14 -30 400 400 1 27 0 0 0 0 0 300 0 0 400 400 30 -14 1 1 1 300 1 1 400 1 1 1 116 117 118 400 14 -30 1 1 1 27 0 1 0 0 0 0 132 133 134 400 30 -14 27 27 27 27 0 1 400 300 1 0 148 149 150 0 14 -30 50 50 50 0 0 1 0 1 1 1 1 0 0 0 30 -14 0 1 1 1 0 1 0 300 1 400 0 0 0 200 14 -30 0 0 0 0 53 53 1 1 300 300 0 50 0 50 30 -14 300 50 50 300 53 0 300 84 1 0 50 27 27 27 14 -30 0 400 28 0 0 400 300 1 0 0 0 300 0 0 30 -14 0 0 300 0 0 0 300 1 0 400 0 27 400 27 14 -30 0 0 0 50 50 50 0 1 0 55 56 300 300 50 30 -14 0 50 50 400 1 300 1 1 0 0 50 1 0 0 14 -30 0 0 28 1 0 0 300 0 0 300 300 1 0 400 30 -14 400 50 1 1 1 0 50 0 0 0 50 1 400 400 14 -30 43 44 43 44 43 44 43 44 43 44 43 44 43 44 30 \ No newline at end of file +14 43 44 43 44 43 44 43 44 43 44 43 44 43 44 14 0 0 0 0 0 0 0 +30 400 400 1 27 0 0 0 0 0 300 0 0 400 400 30 0 0 0 0 0 0 0 +14 1 1 1 300 1 1 400 1 1 1 116 117 118 400 14 0 0 0 0 0 0 0 +30 1 1 1 27 0 1 0 0 0 0 132 133 134 400 30 0 0 0 0 0 0 0 +14 27 27 27 27 0 1 400 300 1 0 148 149 150 0 14 0 0 0 0 0 0 0 +30 50 50 50 0 0 1 0 1 1 1 1 0 0 0 30 0 0 0 0 0 0 0 +14 0 1 1 1 0 1 0 300 1 400 0 0 0 200 14 0 0 0 0 0 0 0 +30 0 0 0 0 53 53 1 1 300 300 0 50 0 50 30 0 0 0 0 0 0 0 +14 300 50 50 300 53 0 300 84 1 0 50 27 27 27 14 0 0 0 0 0 0 0 +30 0 400 28 0 0 400 300 1 0 0 0 300 0 0 30 0 0 0 0 0 0 0 +14 0 0 300 0 0 0 300 1 0 400 0 27 400 27 14 0 0 0 0 0 0 0 +30 0 0 0 50 50 50 0 1 0 55 56 300 300 50 30 0 0 0 0 0 0 0 +14 0 50 50 400 1 300 1 1 0 0 50 1 0 0 14 0 0 0 0 0 0 0 +30 0 0 28 1 0 0 300 0 0 300 300 1 0 400 30 0 0 0 0 0 0 0 +14 400 50 1 1 1 0 50 0 0 0 50 1 400 400 14 0 0 0 0 0 0 0 +30 43 44 43 44 43 44 43 44 43 44 43 44 43 44 30 0 0 0 0 0 0 0 \ No newline at end of file diff --git a/games/VentureAdventure/Resources/levels/level2.txt b/games/VentureAdventure/Resources/levels/level2.txt index 1f6574ba..a420494f 100644 --- a/games/VentureAdventure/Resources/levels/level2.txt +++ b/games/VentureAdventure/Resources/levels/level2.txt @@ -1,16 +1,16 @@ -14 43 44 43 44 43 44 43 44 43 44 43 44 43 44 14 -30 0 50 50 200 0 0 0 0 0 0 27 27 27 27 30 -14 400 1 1 55 56 0 116 117 118 0 0 300 0 27 14 -30 400 1 1 300 0 0 132 133 134 27 27 300 0 400 30 -14 400 1 1 55 56 0 148 149 150 0 0 0 27 400 14 -30 300 300 50 0 0 1 0 1 1 1 1 27 27 27 30 -14 0 1 0 1 50 27 27 27 0 27 27 27 400 27 14 -30 50 0 0 50 400 27 0 1 0 27 400 27 0 27 30 -14 400 0 50 0 0 300 0 84 1 0 0 300 0 0 14 -30 50 0 0 50 400 27 0 1 0 27 0 27 0 27 30 -14 200 0 0 0 50 27 27 27 27 0 0 27 0 27 14 -30 0 0 50 0 0 0 0 1 50 0 27 0 0 27 30 -14 0 0 0 0 1 50 1 1 0 300 27 1 27 400 14 -30 0 50 400 50 0 400 0 0 0 0 1 1 0 0 30 -14 400 0 1 1 1 0 0 0 0 50 27 27 27 400 14 -30 43 44 43 44 43 44 43 44 43 44 43 44 43 44 30 \ No newline at end of file +14 43 44 43 44 43 44 43 44 43 44 43 44 43 44 14 0 0 0 0 0 0 0 +30 0 50 50 200 0 0 0 0 0 0 27 27 27 27 30 0 0 0 0 0 0 0 +14 400 1 1 55 56 0 116 117 118 0 0 300 0 27 14 0 0 0 0 0 0 0 +30 400 1 1 300 0 0 132 133 134 27 27 300 0 400 30 0 0 0 0 0 0 0 +14 400 1 1 55 56 0 148 149 150 0 0 0 27 400 14 0 0 0 0 0 0 0 +30 300 300 50 0 0 1 0 1 1 1 1 27 27 27 30 0 0 0 0 0 0 0 +14 0 1 0 1 50 27 27 27 0 27 27 27 400 27 14 0 0 0 0 0 0 0 +30 50 0 0 50 400 27 0 1 0 27 400 27 0 27 30 0 0 0 0 0 0 0 +14 400 0 50 0 0 300 0 84 1 0 0 300 0 0 14 0 0 0 0 0 0 0 +30 50 0 0 50 400 27 0 1 0 27 0 27 0 27 30 0 0 0 0 0 0 0 +14 200 0 0 0 50 27 27 27 27 0 0 27 0 27 14 0 0 0 0 0 0 0 +30 0 0 50 0 0 0 0 1 50 0 27 0 0 27 30 0 0 0 0 0 0 0 +14 0 0 0 0 1 50 1 1 0 300 27 1 27 400 14 0 0 0 0 0 0 0 +30 0 50 400 50 0 400 0 0 0 0 1 1 0 0 30 0 0 0 0 0 0 0 +14 400 0 1 1 1 0 0 0 0 50 27 27 27 400 14 0 0 0 0 0 0 0 +30 43 44 43 44 43 44 43 44 43 44 43 44 43 44 30 0 0 0 0 0 0 0 \ No newline at end of file diff --git a/games/VentureAdventure/Resources/levels/level3.txt b/games/VentureAdventure/Resources/levels/level3.txt index b5832833..b5c2bb4c 100644 --- a/games/VentureAdventure/Resources/levels/level3.txt +++ b/games/VentureAdventure/Resources/levels/level3.txt @@ -1,16 +1,16 @@ -14 43 44 43 44 43 44 43 44 43 44 43 44 43 44 14 -30 400 0 27 0 0 300 400 400 400 400 0 200 76 77 30 -14 53 0 0 0 0 0 55 56 50 0 50 300 92 93 14 -30 400 53 0 0 0 0 0 50 0 0 0 0 50 50 30 -14 0 50 55 56 0 0 0 0 50 50 300 300 0 400 14 -30 0 0 50 200 0 400 0 0 0 0 0 0 0 0 30 -14 0 300 0 0 0 50 0 0 0 0 300 27 0 0 14 -30 0 0 300 0 0 0 0 0 0 27 400 0 0 0 30 -14 0 50 400 0 0 0 0 84 0 119 120 121 0 0 14 -30 0 76 77 0 0 0 0 0 0 135 136 137 27 400 30 -14 0 92 93 50 0 0 50 0 0 151 152 153 0 28 14 -30 400 0 200 78 0 0 0 0 0 50 0 27 300 400 30 -96 97 96 97 94 0 0 0 0 28 0 300 0 0 50 14 -98 99 98 99 97 400 50 0 0 300 0 0 0 187 27 30 -114 115 114 115 113 50 400 0 53 0 0 28 0 0 400 14 -98 99 98 99 97 43 44 43 44 43 44 43 44 43 44 30 \ No newline at end of file +14 43 44 43 44 43 44 43 44 43 44 43 44 43 44 14 0 0 0 0 0 0 0 +30 400 0 27 0 0 300 400 400 400 400 0 200 76 77 30 0 0 0 0 0 0 0 +14 53 0 0 0 0 0 55 56 50 0 50 300 92 93 14 0 0 0 0 0 0 0 +30 400 53 0 0 0 0 0 50 0 0 0 0 50 50 30 0 0 0 0 0 0 0 +14 0 50 55 56 0 0 0 0 50 50 300 300 0 400 14 0 0 0 0 0 0 0 +30 0 0 50 200 0 400 0 0 0 0 0 0 0 0 30 0 0 0 0 0 0 0 +14 0 300 0 0 0 50 0 0 0 0 300 27 0 0 14 0 0 0 0 0 0 0 +30 0 0 300 0 0 0 0 0 0 27 400 0 0 0 30 0 0 0 0 0 0 0 +14 0 50 400 0 0 0 0 84 0 119 120 121 0 0 14 0 0 0 0 0 0 0 +30 0 76 77 0 0 0 0 0 0 135 136 137 27 400 30 0 0 0 0 0 0 0 +14 0 92 93 50 0 0 50 0 0 151 152 153 0 28 14 0 0 0 0 0 0 0 +30 400 0 200 78 0 0 0 0 0 50 0 27 300 400 30 0 0 0 0 0 0 0 +96 97 96 97 94 0 0 0 0 28 0 300 0 0 50 14 0 0 0 0 0 0 0 +98 99 98 99 97 400 50 0 0 300 0 0 0 187 27 30 0 0 0 0 0 0 0 +114 115 114 115 113 50 400 0 53 0 0 28 0 0 400 14 0 0 0 0 0 0 0 +98 99 98 99 97 43 44 43 44 43 44 43 44 43 44 30 0 0 0 0 0 0 0 \ No newline at end of file diff --git a/games/VentureAdventure/Resources/levels/level4.txt b/games/VentureAdventure/Resources/levels/level4.txt index 71c94658..6c5a69da 100644 --- a/games/VentureAdventure/Resources/levels/level4.txt +++ b/games/VentureAdventure/Resources/levels/level4.txt @@ -1,16 +1,16 @@ -14 43 44 43 44 43 44 43 44 43 44 43 44 43 44 14 -30 400 0 1 1 0 0 0 0 0 0 0 0 0 400 30 -14 1 27 27 27 300 50 400 50 300 27 400 27 0 0 14 -30 1 1 27 0 0 50 50 50 0 400 27 400 0 0 30 -14 0 0 27 0 0 50 400 50 1 27 400 27 0 0 14 -30 0 0 0 0 0 1 0 1 1 1 1 0 0 0 30 -14 0 53 1 53 0 1 0 0 1 0 116 117 118 400 14 -30 0 53 400 53 0 55 56 1 0 0 132 133 134 400 30 -14 0 53 53 53 0 0 0 84 1 0 148 149 150 400 14 -30 0 0 0 53 0 0 0 1 0 0 0 0 0 0 30 -14 0 0 0 300 0 0 0 1 0 0 0 0 0 0 14 -30 27 27 27 0 50 0 300 1 27 0 0 50 0 50 30 -14 27 1 27 0 50 300 1 27 0 27 0 50 400 50 14 -30 27 27 27 1 50 0 0 27 27 27 0 1 50 0 30 -14 27 400 1 1 50 50 400 27 0 27 400 400 50 0 14 -30 43 44 43 44 43 44 43 44 43 44 43 44 43 44 30 \ No newline at end of file +14 43 44 43 44 43 44 43 44 43 44 43 44 43 44 14 0 0 0 0 0 0 0 +30 400 0 1 1 0 0 0 0 0 0 0 0 0 400 30 0 0 0 0 0 0 0 +14 1 27 27 27 300 50 400 50 300 27 400 27 0 0 14 0 0 0 0 0 0 0 +30 1 1 27 0 0 50 50 50 0 400 27 400 0 0 30 0 0 0 0 0 0 0 +14 0 0 27 0 0 50 400 50 1 27 400 27 0 0 14 0 0 0 0 0 0 0 +30 0 0 0 0 0 1 0 1 1 1 1 0 0 0 30 0 0 0 0 0 0 0 +14 0 53 1 53 0 1 0 0 1 0 116 117 118 400 14 0 0 0 0 0 0 0 +30 0 53 400 53 0 55 56 1 0 0 132 133 134 400 30 0 0 0 0 0 0 0 +14 0 53 53 53 0 0 0 84 1 0 148 149 150 400 14 0 0 0 0 0 0 0 +30 0 0 0 53 0 0 0 1 0 0 0 0 0 0 30 0 0 0 0 0 0 0 +14 0 0 0 300 0 0 0 1 0 0 0 0 0 0 14 0 0 0 0 0 0 0 +30 27 27 27 0 50 0 300 1 27 0 0 50 0 50 30 0 0 0 0 0 0 0 +14 27 1 27 0 50 300 1 27 0 27 0 50 400 50 14 0 0 0 0 0 0 0 +30 27 27 27 1 50 0 0 27 27 27 0 1 50 0 30 0 0 0 0 0 0 0 +14 27 400 1 1 50 50 400 27 0 27 400 400 50 0 14 0 0 0 0 0 0 0 +30 43 44 43 44 43 44 43 44 43 44 43 44 43 44 30 0 0 0 0 0 0 0 \ No newline at end of file diff --git a/games/VentureAdventure/game.cpp b/games/VentureAdventure/game.cpp index ba6c2176..bd80905a 100644 --- a/games/VentureAdventure/game.cpp +++ b/games/VentureAdventure/game.cpp @@ -58,9 +58,9 @@ vector > new_level(string file) vector map_line; int temp; - for (int i = 0; i < 16; i++) + for (int i = 0; i < MAP_HEIGHT; i++) { - for (int j = 0; j < 16; j++) + for (int j = 0; j < MAP_WIDTH; j++) { map_level >> temp; map_line.push_back(temp); @@ -77,11 +77,11 @@ vector > new_level(string file) // gets coordinates of all objects and if they are solid or not void get_objects(game_data &game) { - int w = SCREEN_WIDTH /TILESIZE; //16 - int h = SCREEN_HEIGHT/TILESIZE; //16 + int w = MAP_WIDTH; + int h = MAP_HEIGHT; - for (int i = 0; i < w; i++) - for (int j = 0; j < h; j++) + for (int i = 0; i < h; i++) + for (int j = 0; j < w; j++) { // Tiles with numbers defined between 1 and 300 are 'solid'. // Excludes 'enemy' currently defined as 200, and campfire(84), so that collision is possible. This if statement needs to be adjusted if more enemy tile numbers are added) @@ -106,25 +106,30 @@ void get_objects(game_data &game) // draws all objects void draw_game(const game_data &game) { - int w = SCREEN_WIDTH /TILESIZE; //16 - int h = SCREEN_HEIGHT/TILESIZE; //16 + int w = MAP_WIDTH; //16 + int h = MAP_HEIGHT; //16 bitmap hud = load_bitmap("hud", "ground_tiles.png"); bitmap_set_cell_details(hud,32,32,16,16,256); - for (int i = 0; i < w; i++) - for (int j = 0; j < h; j++) + for (int i = 0; i < h; i++) + for (int j = 0; j < w; j++) { // draw grass over whole map draw_bitmap(game.map, j*TILESIZE, i*TILESIZE, option_with_bitmap_cell(game.index[j])); // draw remaining map objects draw_bitmap(game.map, j*TILESIZE, i*TILESIZE, option_with_bitmap_cell(game.map_array[i][j])); } + + // extra strip of grass to cover extra 1px in the bottom + for (int j = 0; j < w; j++) + draw_bitmap(game.map, j*TILESIZE, (h)*TILESIZE, option_with_bitmap_cell(game.index[j])); + - for (int i = 0; i < 17; i++) + for (int i = 0; i < MAP_HEIGHT + 1; i++) { int count = 0; - for (int j = 16; j < 21; j++) + for (int j = MAP_WIDTH; j < MAP_WIDTH + 6; j++) { // draw hud draw_bitmap(hud, j*TILESIZE, i*TILESIZE, option_with_bitmap_cell(52)); @@ -988,10 +993,10 @@ bool level_clear(game_data &game) if(game.gems.size() == 0) { // draws lit fire bitmap in middle when all gems collected - draw_bitmap(fire, SCREEN_HEIGHT/2, SCREEN_WIDTH/2); + draw_bitmap(fire, CAMPFIRE_POS_X, CAMPFIRE_POS_Y); // level is complete when player returns to the fire - if(sprite_bitmap_collision(game.player.player_sprite, fire, SCREEN_HEIGHT/2, SCREEN_WIDTH/2)) + if(sprite_bitmap_collision(game.player.player_sprite, fire, CAMPFIRE_POS_X, CAMPFIRE_POS_Y)) { sprite_set_x(game.player.player_sprite, game.player.x_prev); sprite_set_y(game.player.player_sprite, game.player.y_prev); @@ -1075,18 +1080,22 @@ void draw_hud(game_data &game, int level_id) { string level_name = "Level " + std::to_string(level_id); - draw_text(level_name , COLOR_BLACK, "font.ttf", 30, 17*TILESIZE, 0*TILESIZE); - draw_text("Collect all the gems" , COLOR_BLACK, "font.ttf", 20, 16*TILESIZE+5, 1*TILESIZE); - draw_text("and return to camp" , COLOR_BLACK, "font.ttf", 20, 16*TILESIZE+5, 2*TILESIZE); - draw_bitmap("hero", 17*TILESIZE, 4*TILESIZE, option_with_bitmap_cell(1)); - draw_text(" x "+ std::to_string(game.lives) , COLOR_BLACK, "font.ttf", 20, 18*TILESIZE, 4*TILESIZE+10); - draw_bitmap("gems", 17*TILESIZE, 5*TILESIZE, option_with_bitmap_cell(2)); - draw_text(" x "+ std::to_string(game.gemCount), COLOR_BLACK, "font.ttf", 20, 18*TILESIZE, 5*TILESIZE+10); - draw_text("Move: ", COLOR_BLACK, "font.ttf", 20, 16*TILESIZE + 5, 9*TILESIZE); - draw_text("WASD Keys /", COLOR_BLACK, "font.ttf", 20, 16*TILESIZE + 5, 10*TILESIZE); - draw_text(" Joystick ", COLOR_BLACK, "font.ttf", 20, 19*TILESIZE - 5, 11*TILESIZE - 10); - draw_text("Reset Map: ", COLOR_BLACK, "font.ttf", 20, 16*TILESIZE + 5, 12*TILESIZE); - draw_text("R key /", COLOR_BLACK, "font.ttf", 20, 16*TILESIZE + 5, 13*TILESIZE); - draw_text("Button 1 ", COLOR_BLACK, "font.ttf", 20, 18*TILESIZE, 14*TILESIZE - 10); + draw_text(level_name , COLOR_BLACK, "font.ttf", 30, (MAP_WIDTH + 1)*TILESIZE + 10, 0*TILESIZE); + draw_text("Collect all the gems" , COLOR_BLACK, "font.ttf", 20, (MAP_WIDTH)*TILESIZE+3, 1*TILESIZE); + draw_text("and return to camp" , COLOR_BLACK, "font.ttf", 20, (MAP_WIDTH + 1)*TILESIZE, 2*TILESIZE); + draw_bitmap("hero", (MAP_WIDTH + 2)*TILESIZE - 10, 4*TILESIZE, option_with_bitmap_cell(1)); + draw_text(" x "+ std::to_string(game.lives) , COLOR_BLACK, "font.ttf", 20, (MAP_WIDTH + 3)*TILESIZE - 10, 4*TILESIZE+10); + draw_bitmap("gems", (MAP_WIDTH + 2)*TILESIZE - 10, 5*TILESIZE, option_with_bitmap_cell(2)); + draw_text(" x "+ std::to_string(game.gemCount), COLOR_BLACK, "font.ttf", 20, (MAP_WIDTH + 3)*TILESIZE - 10, 5*TILESIZE+10); + draw_text("Move: ", COLOR_BLACK, "font.ttf", 20, (MAP_WIDTH)*TILESIZE + 5, 9*TILESIZE); + if(game.key_list.MOVE_UP == UP_KEY) + draw_text("Arrows / Joystick ", COLOR_BLACK, "font.ttf", 20, (MAP_WIDTH + 1)*TILESIZE + 5, 10*TILESIZE); + else + draw_text("WASD Keys", COLOR_BLACK, "font.ttf", 20, (MAP_WIDTH + 2)*TILESIZE + 5, 10*TILESIZE); + draw_text("Reset Map: ", COLOR_BLACK, "font.ttf", 20, (MAP_WIDTH)*TILESIZE + 5, 12*TILESIZE); + if(game.key_list.RESET_LEVEL == P1_B1_KEY) + draw_text("P1 Button 1 ", COLOR_BLACK, "font.ttf", 20, (MAP_WIDTH + 2)*TILESIZE + 15, 13*TILESIZE); + else + draw_text("R key", COLOR_BLACK, "font.ttf", 20, (MAP_WIDTH + 3)*TILESIZE + 10, 12*TILESIZE); } \ No newline at end of file diff --git a/games/VentureAdventure/game.h b/games/VentureAdventure/game.h index 6be545d3..d904c278 100644 --- a/games/VentureAdventure/game.h +++ b/games/VentureAdventure/game.h @@ -9,8 +9,13 @@ #include "key_list.h" #include -#define SCREEN_WIDTH 512 -#define SCREEN_HEIGHT 512 +#define SCREEN_WIDTH 736 +#define SCREEN_HEIGHT 513 +#define MENU_WIDTH 176 +#define MAP_WIDTH 23 +#define MAP_HEIGHT 16 +#define CAMPFIRE_POS_X 256 +#define CAMPFIRE_POS_Y 256 #define TILESIZE 32 #define BOX 300 // boxes are indicated with '300' on the map #define GEM 400 // gems are indicated with '400' on the map diff --git a/games/VentureAdventure/player.cpp b/games/VentureAdventure/player.cpp index 0067aedb..3716a94d 100644 --- a/games/VentureAdventure/player.cpp +++ b/games/VentureAdventure/player.cpp @@ -63,8 +63,8 @@ player_data new_player() result.player_sprite = create_sprite(hero_pack, result.animation); // set player in centre of map - sprite_set_x(result.player_sprite, 256); - sprite_set_y(result.player_sprite, 256); + sprite_set_x(result.player_sprite, CAMPFIRE_POS_X); + sprite_set_y(result.player_sprite, CAMPFIRE_POS_Y); // set player co-ords result.x_pos = sprite_x(result.player_sprite); diff --git a/games/VentureAdventure/program.cpp b/games/VentureAdventure/program.cpp index bb359dcd..f972f906 100644 --- a/games/VentureAdventure/program.cpp +++ b/games/VentureAdventure/program.cpp @@ -25,7 +25,7 @@ int main(int argc, char** argv) } } const string WINDOW_NAME = "VentureAdventure"; - const int WINDOW_WIDTH = 672; + const int WINDOW_WIDTH = SCREEN_WIDTH + MENU_WIDTH; const int WINDOW_HEIGHT = SCREEN_HEIGHT; open_window(WINDOW_NAME, WINDOW_WIDTH, WINDOW_HEIGHT);