diff options
author | anon5 <anon5clam@protonmail.com> | 2021-06-22 16:30:50 +0000 |
---|---|---|
committer | anon5 <anon5clam@protonmail.com> | 2021-06-22 16:30:50 +0000 |
commit | f967a747e4ae01fba3a6c3fd693d0e753faf3ae4 (patch) | |
tree | 22d628df079bb5cac93cc2338cfbe585ff8a2763 /tileanim.go | |
parent | 425da65ed46061303604610bb539d6495b2b1f3f (diff) | |
download | mt-f967a747e4ae01fba3a6c3fd693d0e753faf3ae4.tar.xz |
Add String methods to some types using stringer and fix some minor defects
Diffstat (limited to 'tileanim.go')
-rw-r--r-- | tileanim.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tileanim.go b/tileanim.go index bc6d6dd..8d664df 100644 --- a/tileanim.go +++ b/tileanim.go @@ -3,17 +3,19 @@ package mt type AnimType uint8 const ( - NoAnim AnimType = iota - VerticalFrameAnim - SpritesheetAnim + NoAnim AnimType = iota // none + VerticalFrameAnim // vertical frame + SpriteSheetAnim // sprite sheet maxAnim ) +//go:generate stringer -linecomment -type AnimType + type TileAnim struct { Type AnimType //mt:assert %s.Type < maxAnim - //mt:if %s.Type == SpritesheetAnim + //mt:if %s.Type == SpriteSheetAnim AspectRatio [2]uint8 //mt:end |