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1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
|
||||
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
|
||||
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
|
||||
|
@ -1,68 +0,0 @@
|
||||
{ "frames": [
|
||||
{
|
||||
"filename": "0",
|
||||
"frame": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||
"sourceSize": { "w": 32, "h": 32 },
|
||||
"duration": 100
|
||||
},
|
||||
{
|
||||
"filename": "1",
|
||||
"frame": { "x": 32, "y": 0, "w": 32, "h": 32 },
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||
"sourceSize": { "w": 32, "h": 32 },
|
||||
"duration": 100
|
||||
},
|
||||
{
|
||||
"filename": "2",
|
||||
"frame": { "x": 64, "y": 0, "w": 32, "h": 32 },
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||
"sourceSize": { "w": 32, "h": 32 },
|
||||
"duration": 100
|
||||
},
|
||||
{
|
||||
"filename": "3",
|
||||
"frame": { "x": 96, "y": 0, "w": 32, "h": 32 },
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||
"sourceSize": { "w": 32, "h": 32 },
|
||||
"duration": 100
|
||||
},
|
||||
{
|
||||
"filename": "4",
|
||||
"frame": { "x": 128, "y": 0, "w": 32, "h": 32 },
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||
"sourceSize": { "w": 32, "h": 32 },
|
||||
"duration": 100
|
||||
},
|
||||
{
|
||||
"filename": "5",
|
||||
"frame": { "x": 160, "y": 0, "w": 32, "h": 32 },
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||
"sourceSize": { "w": 32, "h": 32 },
|
||||
"duration": 100
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"app": "http://www.aseprite.org/",
|
||||
"version": "1.2.25-x64",
|
||||
"image": "robberrodent.png",
|
||||
"format": "RGBA8888",
|
||||
"size": { "w": 192, "h": 32 },
|
||||
"scale": "1",
|
||||
"frameTags": [
|
||||
{ "name": "moveW", "from": 0, "to": 5, "direction": "forward" }
|
||||
]
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 1.1 KiB |
BIN
assets/textures/arne32-palette.png
Normal file
After Width: | Height: | Size: 217 B |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 692 B |
Before Width: | Height: | Size: 877 B |
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 2.6 KiB |
BIN
assets/textures/tiles/background-sky.aseprite
Normal file
BIN
assets/textures/tiles/background-sky.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
assets/textures/tiles/br-tiles.png
Normal file
After Width: | Height: | Size: 272 B |
BIN
assets/textures/tiles/br-tiles.pyxel
Normal file
Before Width: | Height: | Size: 334 B |
Before Width: | Height: | Size: 7.1 KiB |
BIN
assets/textures/ui/ui-element-cloud.aseprite
Normal file
BIN
assets/textures/ui/ui-element-cloud.png
Normal file
After Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 2.8 KiB |
BIN
assets/textures/ui/ui-font-cloud-sans.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 4.1 KiB |
@ -1,6 +1,6 @@
|
||||
{
|
||||
"GameName":"Graveyard Shift",
|
||||
"WindowName":"Graveyard Shift",
|
||||
"GameName":"Beagle Rescue",
|
||||
"WindowName":"Beagle Rescue",
|
||||
"WindowSize":{"w":320,"h":240},
|
||||
"WindowFullScreen": 0,
|
||||
"GlobalScale": 4
|
||||
|
@ -45,6 +45,7 @@ public:
|
||||
spriteText,
|
||||
spriteObject,
|
||||
spriteTileMap,
|
||||
spriteBackground,
|
||||
spriteActor,
|
||||
spriteAnimation,
|
||||
spriteAtlas
|
||||
@ -157,7 +158,7 @@ public:
|
||||
destRect.w = letterWidth*scale;
|
||||
destRect.h = letterHeight*scale;
|
||||
break;
|
||||
case spriteUIL0: case spriteUIL1:
|
||||
case spriteUIL0: case spriteUIL1: case spriteBackground:
|
||||
break;
|
||||
case spriteActor: case spriteAnimation: case spriteAtlas: case spriteObject: case spriteTileMap:
|
||||
srcRect.x = srcRect.y = 0;
|
||||
@ -173,7 +174,7 @@ public:
|
||||
{
|
||||
switch(spriteType)
|
||||
{
|
||||
case spriteUIL0: case spriteUIL1: case spriteText:
|
||||
case spriteUIL0: case spriteUIL1: case spriteText: case spriteBackground:
|
||||
destRect.x = static_cast<int>(transform->position.x);
|
||||
destRect.y = static_cast<int>(transform->position.y);
|
||||
break;
|
||||
|
@ -42,10 +42,10 @@ auto& player(manager.addEntity());
|
||||
|
||||
auto& enemy(manager.addEntity());
|
||||
|
||||
auto& scoreboard(manager.addEntity());
|
||||
auto& uiInfo(manager.addEntity());
|
||||
auto& background(manager.addEntity());
|
||||
|
||||
auto& tree(manager.addEntity());
|
||||
// auto& scoreboard(manager.addEntity());
|
||||
auto& uiInfo(manager.addEntity());
|
||||
|
||||
bool Game::debugCollisionBoxes = false;
|
||||
|
||||
@ -94,17 +94,14 @@ void Game::init(const char *title, int width, int height, bool fullscreen, int g
|
||||
SDL_LogError(SDL_LOG_CATEGORY_ERROR, "Couldn't initialize SDL audio mixer!, Error: %s", SDL_GetError());
|
||||
}
|
||||
|
||||
assets->AddTexture("terrain", "assets/textures/tiles/GS-tiles2.png");
|
||||
assets->AddTexture("terrain", "assets/textures/tiles/br-tiles.png");
|
||||
assets->AddTexture("player", "assets/textures/actors/owl_anim.png");
|
||||
assets->AddTexture("font", "assets/textures/ui/ui-font-tombstone-serif.png");
|
||||
assets->AddTexture("textBox", "assets/textures/ui/ui-element-tombstone.png");
|
||||
assets->AddTexture("tree","assets/textures/objects/tree.png");
|
||||
assets->AddTexture("jewel","assets/textures/objects/jewel.png");
|
||||
assets->AddTexture("daynighticon","assets/textures/ui/day-night-icon.png");
|
||||
assets->AddTexture("robber","assets/textures/actors/robberrodent.png");
|
||||
assets->AddTexture("font", "assets/textures/ui/ui-font-cloud-sans.png");
|
||||
assets->AddTexture("textBox", "assets/textures/ui/ui-element-cloud.png");
|
||||
assets->AddMusicTrack("simonZ","assets/audio/music/sailing16.ogg");
|
||||
assets->AddSoundClip("bwoop","assets/audio/sfx/bwoop.wav");
|
||||
|
||||
assets->AddTexture("background","assets/textures/tiles/background-sky.png");
|
||||
|
||||
map = new Map("terrain",globalScale,16);
|
||||
|
||||
const char* myText = "Beagle Rescue";
|
||||
@ -116,39 +113,11 @@ void Game::init(const char *title, int width, int height, bool fullscreen, int g
|
||||
myDestRect.w = 140;
|
||||
myDestRect.h = 40;
|
||||
my9Slice = new UINineSlice("textBox");
|
||||
my9Slice->MakeSlices("textBox",128,128,16,111,16,111,myDestRect,globalScale);
|
||||
|
||||
const char* sbText = "500";
|
||||
scoreboardText = new UIText(sbText, "font", 0, 0, 8, 12, globalScale);
|
||||
scoreboardText->ParseString(sbText, 190, 22, globalScale);
|
||||
SDL_Rect scoreboardDestRect = SDL_Rect();
|
||||
scoreboardDestRect.x = 164;
|
||||
scoreboardDestRect.y = 8;
|
||||
scoreboardDestRect.w = 140;
|
||||
scoreboardDestRect.h = 40;
|
||||
scoreboard9Slice = new UINineSlice("textBox");
|
||||
SDL_Rect jewelSrcRect = SDL_Rect();
|
||||
jewelSrcRect.x = 0;
|
||||
jewelSrcRect.y = 0;
|
||||
jewelSrcRect.w = 24;
|
||||
jewelSrcRect.h = 22;
|
||||
SDL_Rect jewelDestRect = SDL_Rect();
|
||||
jewelDestRect.x = 0;
|
||||
jewelDestRect.y = 0;
|
||||
jewelDestRect.w = 24*globalScale;
|
||||
jewelDestRect.h = 22*globalScale;
|
||||
scoreboard9Slice->MakeSlices("textBox",128,128,16,111,16,111,scoreboardDestRect,globalScale);
|
||||
scoreboard.addComponent<TransformComponent>(172*globalScale,16*globalScale,24,22,globalScale);
|
||||
scoreboard.addComponent<SpriteComponent>("jewel", SpriteComponent::spriteUIL1, jewelSrcRect, jewelDestRect);
|
||||
scoreboard.addGroup(groupUI_Layer1);
|
||||
|
||||
tree.addComponent<TransformComponent>(292*globalScale,168*globalScale,192,142,globalScale);
|
||||
tree.addComponent<SpriteComponent>("tree",SpriteComponent::spriteObject);
|
||||
tree.addGroup(groupObjects);
|
||||
my9Slice->MakeSlices("textBox",32,32,14,17,14,17,myDestRect,globalScale);
|
||||
|
||||
//ecs implementation
|
||||
|
||||
map->LoadMap("assets/maps/GS-Night.txt",48,32, globalScale);
|
||||
map->LoadMap("assets/maps/br-map.txt",60,25, globalScale);
|
||||
|
||||
player.addComponent<TransformComponent>(50*globalScale,50*globalScale,40,40,globalScale);
|
||||
player.addComponent<SpriteComponent>("player", SpriteComponent::spriteAnimation, "assets/textures/actors/owl_anim.json");
|
||||
@ -156,9 +125,13 @@ void Game::init(const char *title, int width, int height, bool fullscreen, int g
|
||||
player.addComponent<ColliderComponent>("player");
|
||||
player.addGroup(groupPlayers);
|
||||
|
||||
enemy.addComponent<TransformComponent>(180*globalScale,180*globalScale,32,32,globalScale);
|
||||
enemy.addComponent<SpriteComponent>("robber", SpriteComponent::spriteAnimation, "assets/textures/actors/robberrodent.json");
|
||||
enemy.addGroup(groupEnemies);
|
||||
|
||||
background.addComponent<TransformComponent>(0*globalScale,0*globalScale,320,240,globalScale);
|
||||
background.addComponent<SpriteComponent>("background", SpriteComponent::spriteObject);
|
||||
background.addGroup(groupObjects);
|
||||
// enemy.addComponent<TransformComponent>(180*globalScale,180*globalScale,32,32,globalScale);
|
||||
// enemy.addComponent<SpriteComponent>("robber", SpriteComponent::spriteAnimation, "assets/textures/actors/robberrodent.json");
|
||||
// enemy.addGroup(groupEnemies);
|
||||
|
||||
} else {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't Initialize SDL: %s", SDL_GetError());
|
||||
@ -176,6 +149,7 @@ auto& enemies(manager.getGroup(Game::groupEnemies));
|
||||
// auto& projectiles(manager.getGroup(Game::groupProjectiles));
|
||||
auto& gui(manager.getGroup(Game::groupUI_Layer0));
|
||||
auto& uiText(manager.getGroup(Game::groupUI_Layer1));
|
||||
auto& backgrounds(manager.getGroup(Game::groupBackground));
|
||||
|
||||
void Game::handleEvents()
|
||||
{
|
||||
@ -226,7 +200,6 @@ void Game::update()
|
||||
camera.x = player.getComponent<TransformComponent>().position.x - camera.w/2;
|
||||
camera.y = player.getComponent<TransformComponent>().position.y - camera.h/2;
|
||||
|
||||
|
||||
if(camera.x < 0)
|
||||
camera.x = 0;
|
||||
if (camera.y < 0)
|
||||
@ -241,7 +214,18 @@ void Game::update()
|
||||
void Game::render()
|
||||
{
|
||||
SDL_RenderClear(renderer);
|
||||
for (auto& t : tiles)
|
||||
|
||||
for (auto& b : backgrounds)
|
||||
{
|
||||
b->draw();
|
||||
}
|
||||
|
||||
for (auto& o : objects)
|
||||
{
|
||||
o->draw();
|
||||
}
|
||||
|
||||
for (auto& t : tiles)
|
||||
{
|
||||
t->draw();
|
||||
}
|
||||
@ -252,11 +236,6 @@ void Game::render()
|
||||
c->draw();
|
||||
}
|
||||
}
|
||||
|
||||
for (auto& o : objects)
|
||||
{
|
||||
o->draw();
|
||||
}
|
||||
|
||||
for (auto& e : enemies)
|
||||
{
|
||||
|
@ -47,6 +47,7 @@ public:
|
||||
groupColliders,
|
||||
groupProjectiles,
|
||||
groupObjects,
|
||||
groupBackground,
|
||||
groupUI_Layer0,
|
||||
groupUI_Layer1
|
||||
};
|
||||
|