diff options
Diffstat (limited to 'pkg/pointer/storage-offset.go')
-rw-r--r-- | pkg/pointer/storage-offset.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pkg/pointer/storage-offset.go b/pkg/pointer/storage-offset.go new file mode 100644 index 0000000..0fcd9ed --- /dev/null +++ b/pkg/pointer/storage-offset.go @@ -0,0 +1,13 @@ +package pointer + +func (p Pointer) GetStorageOffset() (x, y int) { + return p.sox, p.soy +} + +func (p *Pointer) CalculateNewStorageOffset() { + p.sox, p.soy = p.x+p.delta.x, p.y+p.delta.y +} + +func (p *Pointer) SetStorageOffset(x, y int) { + p.sox, p.soy = x, y +} |