Skip to content

Commit

Permalink
redesigning
Browse files Browse the repository at this point in the history
  • Loading branch information
goblinhack committed Jan 21, 2024
1 parent 0ece706 commit da25920
Show file tree
Hide file tree
Showing 56 changed files with 661 additions and 876 deletions.
Binary file modified data/gfx.tgz
Binary file not shown.
2 changes: 1 addition & 1 deletion src/game_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ void Game::init(void)

level_ph2_norm_init();
level_ph2_entrances();
level_ph2_exit_init();
level_ph2_dungeon_exit_init();
level_ph2_secr_init();
level_ph2_lock_init();
level_ph2_key_init();
Expand Down
3 changes: 1 addition & 2 deletions src/gfx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,7 @@ void gfx_init(void)
gfx_init14();
gfx_init15();
gfx_init_16x16();
gfx_init_rocks();
gfx_init_walls();
gfx_init_world();
gfx_init_24x24();
gfx_init_32x32();
}
Expand Down
12 changes: 1 addition & 11 deletions src/gfx_16x16.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,7 @@ void gfx_init_16x16(void)
{
std::initializer_list< std::string > tiles = {
// clang-format off
"ladder.0", "block.0", "rock_gold.0", "spike.0", "snake.0", "snake.1", "snake.2", "snake.3", "", "",
"ladder.1", "block.1", "rock_gold.1", "spike.1", "", "", "", "", "", "",
"ladder.2", "block.2", "rock_gold.2", "spike.2", "", "", "", "", "", "",
"ladder.3", "block.3", "rock_gold.3", "spike.3", "", "", "", "", "", "",
"ladder.4", "block.4", "rock_gold.4", "spike.4", "", "", "", "", "", "",
"key0", "", "", "", "", "", "", "", "", "",
"crystal0", "crystal1", "crystal2", "crystal3", "crystal4", "crystal5", "crystal6", "", "", "",
"player.idle.0", "player.idle.1", "", "", "", "", "", "", "", "",
"player.up.0", "player.up.1", "", "", "", "", "", "", "", "",
"player.walk.0", "player.walk.1", "", "", "", "", "", "", "", "",
"player.run.0", "player.run.1", "player.run.2", "player.run.3", "player.run.4", "player.run.5", "", "", "", "",
"", "", "", "", "", "", "", "",
// clang-format on
};
const std::vector< std::string > arr(tiles);
Expand Down
19 changes: 17 additions & 2 deletions src/gfx_32x32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,23 @@ void gfx_init_32x32(void)
{
std::initializer_list< std::string > tiles = {
// clang-format off
"entrance", "", "", "", "", "", "", "",
"exit.0", "exit.1", "exit.2", "exit.3", "exit.4", "exit.5", "exit.6", "exit.7",
"dungeon_entrance",
"",
"",
"",
"",
"",
"",
"",
// ##############################################################################
"dungeon_exit.0",
"dungeon_exit.1",
"dungeon_exit.2",
"dungeon_exit.3",
"dungeon_exit.4",
"dungeon_exit.5",
"dungeon_exit.6",
"dungeon_exit.7",
// clang-format on
};
const std::vector< std::string > arr(tiles);
Expand Down
40 changes: 0 additions & 40 deletions src/gfx_rock.cpp

This file was deleted.

39 changes: 0 additions & 39 deletions src/gfx_walls.cpp

This file was deleted.

36 changes: 36 additions & 0 deletions src/gfx_world.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
//
// Copyright Neil McGill, [email protected]
//

#include "my_tile.hpp"
#include "my_ui.hpp"

void gfx_init_world(void)
{
std::initializer_list< std::string > tiles = {
// clang-format off
"world_mountains.tl.0", "world_mountains.top.0", "world_mountains.tr.0",
"world_mountains.tl.1", "world_mountains.top.1", "world_mountains.tr.1",
"world_mountains.tl.2", "world_mountains.top.2", "world_mountains.tr.2",
"world_mountains.tl.3", "world_mountains.top.3", "world_mountains.tr.3",
"world_mountains.tl.4", "world_mountains.top.4", "world_mountains.tr.4",
"world_mountains.tl.5", "world_mountains.top.5", "world_mountains.tr.5",
// ###############################################################################
"world_mountains.left.0", "world_mountains.0", "world_mountains.right.0",
"world_mountains.left.1", "world_mountains.1", "world_mountains.right.1",
"world_mountains.left.2", "world_mountains.2", "world_mountains.right.2",
"world_mountains.left.3", "world_mountains.3", "world_mountains.right.3",
"world_mountains.left.4", "world_mountains.4", "world_mountains.right.4",
"world_mountains.left.5", "world_mountains.5", "world_mountains.right.5",
// ###############################################################################
"world_mountains.bl.0", "world_mountains.bot.0", "world_mountains.br.0",
"world_mountains.bl.1", "world_mountains.bot.1", "world_mountains.br.1",
"world_mountains.bl.2", "world_mountains.bot.2", "world_mountains.br.2",
"world_mountains.bl.3", "world_mountains.bot.3", "world_mountains.br.3",
"world_mountains.bl.4", "world_mountains.bot.4", "world_mountains.br.4",
"world_mountains.bl.5", "world_mountains.bot.5", "world_mountains.br.5",
// clang-format on
};
const std::vector< std::string > arr(tiles);
tile_load_arr_sprites("data/gfx/world.tga", "world", 16, 16, arr);
}
2 changes: 1 addition & 1 deletion src/level_anim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "my_level.hpp"
#include "my_level_data.hpp"
#include "my_main.hpp"
#include "my_thing_template.hpp"
#include "my_tp.hpp"

void Level::anim(void)
{
Expand Down
Loading

0 comments on commit da25920

Please sign in to comment.