Files
UwUGL/mappers/tilemapper.cpp
T

20 lines
419 B
C++
Raw Normal View History

2026-07-24 18:01:59 -07:00
#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:
2026-07-24 19:06:14 -07:00
TileMapper() {}
2026-07-24 18:01:59 -07:00
2026-07-24 19:06:14 -07:00
Coord2 map(uint16_t x0, uint16_t y0, uint16_t x, uint16_t y) {
2026-07-24 18:01:59 -07:00
uint16_t u = x -x0;
uint16_t v = y -y0;
return Coord2(u, v);
}
};
}