forked from kdx/jtmm2-old
33 lines
658 B
C
33 lines
658 B
C
#include <gint/display.h>
|
|
|
|
#include "level.h"
|
|
#include "camera.h"
|
|
|
|
void level_step(const Level *level)
|
|
{
|
|
}
|
|
|
|
void level_draw(const Level *level, Camera *camera)
|
|
{
|
|
layer_draw(level, camera, 0);
|
|
}
|
|
|
|
void layer_draw(const Level *level, Camera *camera, uint layer_id)
|
|
{
|
|
return;
|
|
const uint8_t *layer = level->layers[layer_id];
|
|
for (int y = 0; y < level->width; ++y)
|
|
{
|
|
for (int x = 0; x < level->height; ++x)
|
|
{
|
|
const uint8_t cell = layer[x + y * level->width];
|
|
#ifdef FX9860G
|
|
dpixel(x, y, (cell == 100) ? C_LIGHT : C_BLACK);
|
|
#endif /* FX9860G */
|
|
#ifdef FXCG50
|
|
dpixel(x, y, (cell == 100) ? C_RED : C_BLACK);
|
|
#endif /* FXCG50 */
|
|
}
|
|
}
|
|
}
|