2021-04-25 20:42:55 +00:00
|
|
|
#include "sprites.hpp"
|
|
|
|
|
2021-04-30 19:02:14 +00:00
|
|
|
double BLOCK_SIZE = 1.0 / 16;
|
2021-04-25 20:42:55 +00:00
|
|
|
|
|
|
|
const std::string MARIO_OVERWORLD_COLORKEY = "#93bbec";
|
|
|
|
|
2021-04-30 07:10:58 +00:00
|
|
|
const SDL_Rect MARIO_STANDING_SRC = { 1, 9, 16, 16 };
|
|
|
|
const SDL_Rect MARIO_DEATH_SRC = { 22, 9, 16, 16 };
|
2021-10-18 07:08:35 +00:00
|
|
|
const std::vector<SDL_Rect> MARIO_WALK_ANIM = { { 43, 9, 16, 16 },
|
|
|
|
{ 60, 9, 16, 16 },
|
|
|
|
{ 77, 9, 16, 16 } };
|
2021-04-30 07:10:58 +00:00
|
|
|
const SDL_Rect MARIO_CHANGE_DIR_SRC = { 98, 9, 16, 16 };
|
|
|
|
const SDL_Rect MARIO_JUMP_SRC = { 119, 9, 16, 16 };
|
2021-04-25 20:42:55 +00:00
|
|
|
|
2021-04-30 07:10:58 +00:00
|
|
|
const SDL_Rect MARIO_STANDING_BIG_SRC = { 1, 26, 16, 32 };
|
|
|
|
const SDL_Rect MARIO_DEATH_BIG_SRC = { 22, 26, 16, 32 };
|
2021-10-18 07:08:35 +00:00
|
|
|
const std::vector<SDL_Rect> MARIO_WALK_BIG_ANIM = { { 43, 26, 16, 32 },
|
2022-10-25 17:33:09 +00:00
|
|
|
{ 60, 26, 16, 32 },
|
|
|
|
{ 77, 26, 16, 32 } };
|
2021-04-30 07:10:58 +00:00
|
|
|
const SDL_Rect MARIO_CHANGE_DIR_BIG_SRC = { 98, 26, 16, 32 };
|
|
|
|
const SDL_Rect MARIO_JUMP_BIG_SRC = { 119, 26, 16, 32 };
|
2021-04-25 20:42:55 +00:00
|
|
|
|
2022-11-11 18:47:35 +00:00
|
|
|
const SDL_Rect MARIO_STANDING_FIRE_SRC = { 1, 157, 16, 32 };
|
|
|
|
const SDL_Rect MARIO_DEATH_FIRE_SRC = { 22, 157, 16, 32 };
|
|
|
|
const std::vector<SDL_Rect> MARIO_WALK_FIRE_ANIM = { { 43, 157, 16, 32 },
|
|
|
|
{ 60, 157, 16, 32 },
|
|
|
|
{ 77, 157, 16, 32 } };
|
|
|
|
const SDL_Rect MARIO_CHANGE_DIR_FIRE_SRC = { 98, 157, 16, 32 };
|
|
|
|
const SDL_Rect MARIO_JUMP_FIRE_SRC = { 119, 157, 16, 32 };
|
|
|
|
|
2022-11-12 20:32:18 +00:00
|
|
|
extern const std::vector<SDL_Rect> FIRE_BALL_ANIM = { {96, 144, 8, 8},
|
|
|
|
{104, 144, 8, 8},
|
|
|
|
{96, 152, 8, 8},
|
|
|
|
{104, 152, 8, 8},
|
|
|
|
};
|
|
|
|
|
2021-04-30 07:10:58 +00:00
|
|
|
const SDL_Rect FLOOR_SRC = { 1, 131, 16, 16 };
|
|
|
|
const SDL_Rect HILL_INCLINE_SRC = { 137, 97, 16, 16 };
|
|
|
|
const SDL_Rect HILL_DECLINE_SRC = { 205, 97, 16, 16 };
|
|
|
|
const SDL_Rect HILL_FILL_SRC = { 171, 97, 16, 16 };
|
|
|
|
const SDL_Rect HILL_DOTS_RIGHT_SRC = { 154, 97, 16, 16 };
|
|
|
|
const SDL_Rect HILL_DOTS_LEFT_SRC = { 188, 97, 16, 16 };
|
|
|
|
const SDL_Rect HILL_TOP_SRC = { 171, 63, 16, 16 };
|
2021-10-18 07:08:35 +00:00
|
|
|
const SDL_Rect BUSH_LEFT_SRC = { 222, 97, 16, 16 };
|
|
|
|
const SDL_Rect BUSH_MIDDLE_SRC = { 239, 97, 16, 16 };
|
|
|
|
const SDL_Rect BUSH_RIGHT_SRC = { 256, 97, 16, 16 };
|
|
|
|
const SDL_Rect CLOUD_LEFT_BOTTOM_SRC = { 222, 80, 16, 16 };
|
|
|
|
const SDL_Rect CLOUD_MIDDLE_BOTTOM_SRC = { 239, 80, 16, 16 };
|
|
|
|
const SDL_Rect CLOUD_RIGHT_BOTTOM_SRC = { 256, 80, 16, 16 };
|
|
|
|
const SDL_Rect CLOUD_LEFT_TOP_SRC = { 222, 63, 16, 16 };
|
|
|
|
const SDL_Rect CLOUD_MIDDLE_TOP_SRC = { 239, 63, 16, 16 };
|
|
|
|
const SDL_Rect CLOUD_RIGHT_TOP_SRC = { 256, 63, 16, 16 };
|
|
|
|
const SDL_Rect PIPE_LEFT_BOTTOM_SRC = { 103, 63, 16, 16 };
|
|
|
|
const SDL_Rect PIPE_LEFT_TOP_SRC = { 103, 46, 16, 16 };
|
|
|
|
const SDL_Rect PIPE_RIGHT_BOTTOM_SRC = { 120, 63, 16, 16 };
|
|
|
|
const SDL_Rect PIPE_RIGHT_TOP_SRC = { 120, 46, 16, 16 };
|
|
|
|
const SDL_Rect CASTLE_LEFT_SRC = { 69, 131, 16, 16 };
|
|
|
|
const SDL_Rect CASTLE_RIGHT_SRC = { 103, 131, 16, 16 };
|
|
|
|
const SDL_Rect CASTLE_BLACK_SRC = { 86, 131, 16, 16 };
|
|
|
|
const SDL_Rect CASTLE_ENTRY_SRC = { 86, 114, 16, 16 };
|
|
|
|
const SDL_Rect CASTLE_TOWER_SRC = { 69, 114, 16, 16 };
|
|
|
|
const SDL_Rect CASTLE_TOWER_FILLED_SRC = { 103, 114, 16, 16 };
|
|
|
|
const SDL_Rect VINE_TOP_SRC = { 69, 29, 16, 16 };
|
|
|
|
const SDL_Rect VINE_BOTTOM_SRC = { 69, 46, 16, 16 };
|
|
|
|
const SDL_Rect POLE_TOP_SRC = { 86, 29, 16, 16 };
|
|
|
|
const SDL_Rect POLE_BOTTOM_SRC = { 86, 46, 16, 16 };
|
|
|
|
const SDL_Rect FLAG_SRC = { 137, 46, 16, 16 };
|
|
|
|
const SDL_Rect STEP_SRC = { 86, 63, 16, 16 };
|
|
|
|
const SDL_Rect BRICK_SRC = { 35, 97, 16, 16 };
|
|
|
|
const SDL_Rect BRICK_TOP_SRC = { 18, 97, 16, 16 };
|
|
|
|
const SDL_Rect SIDEWAY_PIPE_END_TOP_SRC = { 69, 80, 16, 16 };
|
|
|
|
const SDL_Rect SIDEWAY_PIPE_END_BOTTOM_SRC = { 69, 97, 16, 16 };
|
|
|
|
const SDL_Rect SIDEWAY_PIPE_MIDDLE_TOP_SRC = { 86, 80, 16, 16 };
|
|
|
|
const SDL_Rect SIDEWAY_PIPE_MIDDLE_BOTTOM_SRC = { 86, 97, 16, 16 };
|
|
|
|
const SDL_Rect SIDEWAY_PIPE_CONNECTOR_TOP_SRC = { 103, 80, 16, 16 };
|
|
|
|
const SDL_Rect SIDEWAY_PIPE_CONNECTOR_BOTTOM_SRC = { 103, 97, 16, 16 };
|
|
|
|
const SDL_Rect TREE_PLATFORM_TOP_LEFT_SRC = { 137, 12, 16, 16 };
|
|
|
|
const SDL_Rect TREE_PLATFORM_TOP_MIDDLE_SRC = { 154, 12, 16, 16 };
|
|
|
|
const SDL_Rect TREE_PLATFORM_TOP_RIGHT_SRC = { 171, 12, 16, 16 };
|
|
|
|
const SDL_Rect TREE_PLATFORM_BARK_SRC = { 154, 46, 16, 16 };
|
|
|
|
const SDL_Rect WATER_TOP_SRC = { 171, 29, 16, 16 };
|
|
|
|
const SDL_Rect WATER_FILL_SRC = { 171, 46, 16, 16 };
|
|
|
|
const SDL_Rect MUSHROOM_PLATFORM_TOP_LEFT_SRC = { 188, 12, 16, 16 };
|
|
|
|
const SDL_Rect MUSHROOM_PLATFORM_TOP_MIDDLE_SRC = { 205, 12, 16, 16 };
|
|
|
|
const SDL_Rect MUSHROOM_PLATFORM_TOP_RIGHT_SRC = { 222, 12, 16, 16 };
|
|
|
|
const SDL_Rect MUSHROOM_PLATFORM_BARK_TOP_SRC = { 205, 29, 16, 16 };
|
|
|
|
const SDL_Rect MUSHROOM_PLATFORM_BARK_BOTTOM_SRC = { 205, 46, 16, 16 };
|
|
|
|
const SDL_Rect TREE_BARK_SRC = { 222, 46, 16, 16 };
|
|
|
|
const SDL_Rect TREE_LEAVES_SMALL_SRC = { 222, 29, 16, 16 };
|
|
|
|
const SDL_Rect TREE_LEAVES_TOP_SRC = { 239, 12, 16, 16 };
|
|
|
|
const SDL_Rect TREE_LEAVES_BOTTOM_SRC = { 239, 29, 16, 16 };
|
|
|
|
const SDL_Rect CANNON_TOWER_SRC = { 256, 46, 16, 16 };
|
|
|
|
const SDL_Rect CANNON_PEDESTAL_SRC = { 256, 29, 16, 16 };
|
|
|
|
const SDL_Rect CANNON_SRC = { 256, 12, 16, 16 };
|
|
|
|
const SDL_Rect COIN_SRC = { 549, 202, 16, 16 };
|
|
|
|
const SDL_Rect MUSHROOM_SRC = { 69, 12, 16, 16 };
|
2022-11-11 18:47:35 +00:00
|
|
|
const SDL_Rect FIRE_FLOWER_SRC = { 1, 12, 16, 16 };
|
|
|
|
const SDL_Rect HARD_SRC = { 69, 63, 16, 16 };
|
2021-04-30 07:10:58 +00:00
|
|
|
|
2021-10-18 07:08:35 +00:00
|
|
|
extern const SDL_Rect MOD_DESTRUCTIBLE_SRC = { 0, 0, 16, 16 };
|
|
|
|
extern const SDL_Rect MOD_BACKGROUND_SRC = { 16, 0, 16, 16 };
|
|
|
|
extern const SDL_Rect MOD_COIN_SRC = { 32, 0, 16, 16 };
|
|
|
|
extern const SDL_Rect MOD_MUSHROOM_SRC = { 48, 0, 16, 16 };
|
2022-11-13 18:52:39 +00:00
|
|
|
extern const SDL_Rect MOD_TELEPORT_SRC = { 0, 16, 16, 16 };
|
2021-05-25 22:46:19 +00:00
|
|
|
|
2021-10-18 07:08:35 +00:00
|
|
|
const SDLPP::Vec2D<uint64_t> OVERWORLD_SHIFT = { 0, 0 };
|
|
|
|
const SDLPP::Vec2D<uint64_t> UNDERWORLD_SHIFT = { 274, 0 };
|
|
|
|
const SDLPP::Vec2D<uint64_t> WATER_SHIFT = { 548, 0 };
|
|
|
|
const SDLPP::Vec2D<uint64_t> BOWSER_SHIFT = { 0, 173 };
|
2021-08-08 19:45:05 +00:00
|
|
|
|
2021-10-18 07:08:35 +00:00
|
|
|
const std::vector<SDL_Rect> GOOMBA_WALK_ANIM = { { 1, 28, 16, 16 },
|
|
|
|
{ 18, 28, 16, 16 } };
|
|
|
|
const SDL_Rect GOOMBA_DEATH_SRC = { 39, 28, 16, 16 };
|