make resource ids their own individual types. last commit before overhaul to sub-packages

This commit is contained in:
Andrew Gallant (Ocelot)
2012-05-10 12:47:19 -04:00
parent 00c6217ca9
commit e239bb3c68
35 changed files with 1906 additions and 1685 deletions

View File

@@ -12,7 +12,7 @@ func (f *SingleField) Define(c *Context) {
func ReadSimpleSingleField(c *Context, name string, typ Type) {
switch t := typ.(type) {
case *Resource:
c.Putln("%s = Id(Get32(buf[b:]))", name)
c.Putln("%s = %s(Get32(buf[b:]))", name, t.SrcName())
case *TypeDef:
switch t.Size().Eval() {
case 1: