47 lines
794 B
C++
47 lines
794 B
C++
#include "background.h"
|
|
#include <azur/azur.h>
|
|
#include <azur/gint/render.h>
|
|
|
|
#include <cstdint>
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
extern struct Map map_Level1;
|
|
|
|
|
|
Background::Background( )
|
|
{
|
|
|
|
}
|
|
|
|
Background::~Background( )
|
|
{
|
|
|
|
}
|
|
|
|
void Background::Render( void )
|
|
{
|
|
|
|
for(int i=0; i<25; i++)
|
|
{
|
|
for(int j=0; j<14; j++)
|
|
{
|
|
uint16_t index = j * map_Level1.w + i;
|
|
uint16_t currentTile = map_Level1.layers[ index ];
|
|
if (currentTile!=0)
|
|
{
|
|
uint16_t xtile = ((currentTile % 9)-1) * 16;
|
|
uint16_t ytile = (currentTile / 9) * 16;
|
|
azrp_subimage_p8( i*16, j*16, map_Level1.tileset, xtile, ytile, 16, 16, DIMAGE_NONE );
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
|
|
void Background::Update( float dt )
|
|
{
|
|
|
|
} |