Add support for reading those strange flags in the mood materials

develop
simon 2010-04-26 15:34:07 +02:00
parent 4ef3108d58
commit 2188ab1122
4 changed files with 7 additions and 1 deletions

@ -265,6 +265,7 @@ namespace DFHack
int16_t typeA;
int16_t typeB;
int16_t typeC;
uint32_t flags;
};
struct t_job
{

@ -375,6 +375,7 @@ bool Creatures::ReadJob(const t_creature * furball, vector<t_material> & mat)
mat[i].typeA = p->readWord(cmats[i] + minfo->getOffset("job_material_maintype"));
mat[i].typeB = p->readWord(cmats[i] + minfo->getOffset("job_material_sectype1"));
mat[i].typeC = p->readWord(cmats[i] + minfo->getOffset("job_material_sectype2"));
mat[i].flags = p->readWord(cmats[i] + minfo->getOffset("job_material_flags"));
}
return true;
}

@ -276,11 +276,14 @@ void printCreature(DFHack::API & DF, const DFHack::t_creature & creature)
case 57:
maintype = (char*)"cloth";
break;
case -1:
maintype = (char*)"bones/shell";
break;
default:
maintype = (char*)"????";
break;
}
printf("\t%s\t%d %d\n", maintype, mat[i].typeB, mat[i].typeC);
printf("\t%s\t%d %d - %.8x\n", maintype, mat[i].typeB, mat[i].typeC, mat[i].flags);
}
}
}

@ -1429,6 +1429,7 @@ map_data_1b60_offset 0x1B9c
<Offset name="job_material_maintype">0x0</Offset> like mood materials, 0=bars, 4=stone, 5=wood, 57=cloth, 54=leather ...
<Offset name="job_material_sectype1">0x2</Offset> always -1
<Offset name="job_material_sectype2">0x4</Offset> subtype ?
<Offset name="job_material_flags">0x18</Offset> set only for shell / bone mood requirements ?
Materials
=========