added origin to mapper parameters

This commit is contained in:
2026-07-24 19:06:14 -07:00
parent eddbb85256
commit 5298e75fdb
10 changed files with 23 additions and 25 deletions
+2 -6
View File
@@ -9,13 +9,9 @@
namespace UwU {
class OffsetMapper : public MapperBase<OffsetMapper> {
public:
OffsetMapper(uint16_t x0, uint16_t y0) {
this->x0 = x0;
this->y0 = y0;
}
uint16_t x0, y0;
OffsetMapper() {}
Coord2 map(uint16_t x, uint16_t y) {
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);