20 lines
419 B
C++
20 lines
419 B
C++
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "../datatypes.cpp"
|
|
#include "../helpers.cpp"
|
|
#include "mapperbase.cpp"
|
|
|
|
namespace UwU {
|
|
class TileMapper : public MapperBase<TileMapper> { // not actually tilemapping yet
|
|
public:
|
|
TileMapper() {}
|
|
|
|
Coord2 map(uint16_t x0, uint16_t y0, uint16_t x, uint16_t y) {
|
|
uint16_t u = x -x0;
|
|
uint16_t v = y -y0;
|
|
return Coord2(u, v);
|
|
}
|
|
};
|
|
} |