June 24th, 2018 (back)

RAPTR - New Sprite and Platforms

Rework of Walk and Idle Animations

I decided to go back and rework the design of the Raptr. He looks more dinosaur (without feathers) like now. I also added in some very simple gravity.

Static Meshes

Static meshes are a pretty simple object that inherits the basic Entity class in the game.

#pragma once

#include <cstdint>
#include <memory>
#include <string>

#include "entity.hpp"

namespace raptr {

class Sprite;
class Game;

class StaticMesh : public Entity {
  virtual bool intersects(const Entity* other) const;
  virtual int32_t id() const;
  virtual SDL_Rect bbox() const;
  virtual void think(std::shared_ptr<Game> game);

  std::shared_ptr<Sprite> sprite;
  int32_t _id;


It loads in a sprite and provides methods for intersecting with that sprite. Now, we can make some basic platforms and interact with them.