game/mario/sprites.cpp

86 lines
4.3 KiB
C++
Raw Normal View History

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";
const SDL_Rect MARIO_STANDING_SRC = { 1, 9, 16, 16 };
const SDL_Rect MARIO_DEATH_SRC = { 22, 9, 16, 16 };
const std::vector< SDL_Rect > MARIO_WALK_ANIM = { { 43, 9, 16, 16 },
2021-04-25 20:42:55 +00:00
{ 60, 9, 16, 16 },
{ 77, 9, 16, 16 } };
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
const SDL_Rect MARIO_STANDING_BIG_SRC = { 1, 26, 16, 32 };
const SDL_Rect MARIO_DEATH_BIG_SRC = { 22, 26, 16, 32 };
const std::vector< SDL_Rect > MARIO_WALK_BIG_ANIM = {
2021-04-25 20:42:55 +00:00
{ 43, 26, 16, 32 }, { 60, 9, 16, 32 }, { 77, 9, 16, 32 }
};
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
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 };
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 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};