Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
aerth committed Jul 9, 2022
1 parent b5591ec commit 3a6b072
Show file tree
Hide file tree
Showing 6 changed files with 182 additions and 100 deletions.
128 changes: 64 additions & 64 deletions assets/assets.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion librpg/common/loadpic.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/faiface/pixel"
)

// loadPicture from assets
// loadPicture from embedded assets
func LoadPicture(path string) (pixel.Picture, error) {
b, err := assets.Asset(path)
if err != nil {
Expand Down
11 changes: 0 additions & 11 deletions librpg/common/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,3 @@ func (o Object) Draw(win pixel.Target, spritesheet pixel.Picture, sheetFrames []
// }

}

const _ObjectType_name = "O_NONEO_TILEO_BLOCKO_INVISIBLEO_SPECIALO_WINO_DYNAMIC"

var _ObjectType_index = [...]uint8{0, 6, 12, 19, 30, 39, 44, 53}

func (i ObjectType) String() string {
if i < 0 || i >= ObjectType(len(_ObjectType_index)-1) {
return fmt.Sprintf("ObjectType(%d)", i)
}
return _ObjectType_name[_ObjectType_index[i]:_ObjectType_index[i+1]]
}
29 changes: 29 additions & 0 deletions librpg/common/strings.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

107 changes: 84 additions & 23 deletions librpg/strings.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ help:
dev: clean generate embed-assets build

generate:
stringer -output librpg/common/strings.go -type EntityType,EntityState,ItemType,ObjectType,animState,ActionType,StatusEffect,DObjectType librpg/common
# stringer -output librpg/common/strings.go -type EntityType,EntityState,ItemType,ObjectType,animState,ActionType,StatusEffect,DObjectType librpg/common
stringer -output librpg/strings.go -type ActionType,EntityState,EntityType,ItemType,animState,StatusEffect ./librpg/
stringer -output librpg/common/strings.go -type ObjectType ./librpg/common



embed-assets:
Expand Down

0 comments on commit 3a6b072

Please sign in to comment.