Start displaying characters on maps
This commit is contained in:
@@ -12,6 +12,8 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/lunixbochs/struc"
|
||||
|
||||
"code.ur.gs/lupine/ordoor/internal/data"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -99,8 +101,9 @@ type Cell struct {
|
||||
}
|
||||
|
||||
type Character struct {
|
||||
Unknown1 []byte `struc:"[179]byte"`
|
||||
Name string `struc:"[80]byte"`
|
||||
Unknown1 []byte `struc:"[178]byte"`
|
||||
Type data.CharacterType `struc:"byte"`
|
||||
Name string `struc:"[80]byte"`
|
||||
|
||||
// Attributes guessed by matching up numbers. Starts at 0x103
|
||||
WeaponSkill int `struc:"byte"`
|
||||
@@ -339,9 +342,11 @@ func nullTerminate(s *string) {
|
||||
|
||||
func (c *Character) String() string {
|
||||
return fmt.Sprintf(
|
||||
"squad=%v pos=(%v,%v) name=%q\n\t%3d %3d %3d %3d %3d\n\t%3d %3d ??? ??? %3d\n",
|
||||
"squad=%v pos=(%v,%v) type=%q name=%q\n"+
|
||||
"\t%3d %3d %3d %3d %3d\n\t%3d %3d ??? ??? %3d\n",
|
||||
c.SquadNumber,
|
||||
c.XPos, c.YPos,
|
||||
c.Type.String(),
|
||||
c.Name,
|
||||
c.ActionPoints, c.Health, c.Armor, c.BallisticSkill, c.WeaponSkill,
|
||||
c.Strength, c.Toughness /*c.Initiative, c.Attacks,*/, c.Leadership,
|
||||
|
Reference in New Issue
Block a user