52 lines
753 B
C++
52 lines
753 B
C++
#ifndef BACKGROUND_H
|
|
#define BACKGROUND_H
|
|
|
|
|
|
#include <cstdint>
|
|
#include <stdlib.h>
|
|
|
|
#include <azur/gint/render.h>
|
|
|
|
#include <vector>
|
|
#include "num/num.h"
|
|
|
|
struct Map {
|
|
/*width, height and the number of layer of the map*/
|
|
int w, h, nblayers;
|
|
|
|
/*the tileset to use*/
|
|
bopti_image_t *tileset;
|
|
int tileset_size;
|
|
|
|
/*list of all the tiles*/
|
|
short *layers[];
|
|
};
|
|
|
|
|
|
class Background
|
|
{
|
|
public:
|
|
Background( );
|
|
~Background( );
|
|
|
|
void Update( float dt );
|
|
void Render( );
|
|
|
|
void IncXCoordinate( libnum::num x );
|
|
void IncYCoordinate( libnum::num y );
|
|
|
|
int GetXCoordinate( void );
|
|
int GetYCoordinate( void );
|
|
|
|
void SetSpeed( libnum::num s );
|
|
|
|
private:
|
|
libnum::num xlevel, ylevel;
|
|
libnum::num speed;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|