From f967a747e4ae01fba3a6c3fd693d0e753faf3ae4 Mon Sep 17 00:00:00 2001 From: anon5 Date: Tue, 22 Jun 2021 16:30:50 +0000 Subject: Add String methods to some types using stringer and fix some minor defects --- tileanim.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'tileanim.go') 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 -- cgit v1.2.3