I'm almost finished with the alpha for the companion program to DatLoader, which takes the memory and makes dat files (for investigation into hyper units). This is good news because this program uses many of the same files and methods, so the only impediment to the completion of DatLoader currently is that I have close to no idea how to use SFmpqapi.
Wheeee... Units.dat: dec. 24-28 = STUFF!
Time to look at DatEdit source i guess..
Then again, since DatEdit does no reading, i am pretty much screwed.
I think I have an incorrect value somewere in my data, can someone find it.
CODE
typedef struct DatFmt {
size_t numvars; /* number of vars in this format */
DatFmtEnt entries[64]; // array of pointers to the var formats,
// 64 should be enough entries.
char *filename; // filename (i.e. arr\units.dat)
};
typedef struct DatFmtEnt {
size_t size; /* total size size of the vars, they are all together in the memory
and file, so theres no reason to separate them.. */
char *name; /* name of this var */
unsigned int *memoffset; //Memory offset for where these values are loaded.
};
CODE
#include "datfmt.h"
static DatFmt dat_units = {
54,
{
{ 228, "Graphic", (unsigned int*)0x6c5910},
{ 456, "Subunit1", (unsigned int*)0x6c3f98},
{ 456, "Subunit2", (unsigned int*)0x6c3c08},
{ 192, "InfestationPointer", (unsigned int*)0x6c4de8},
{ 912, "ConstructionAnim", (unsigned int*)0x6c45e0},
{ 228, "SubunitTurning", (unsigned int*)0x6c45e0},
{ 228, "ShieldEnable", (unsigned int*)7090496},
{ 456, "ShieldAmount", (unsigned int*)7098712},
{ 912, "HitPoints", (unsigned int*)7090960},
{ 228, "AnimLevel", (unsigned int*)7108688},
{ 228, "MovementType", (unsigned int*)7107992},
{ 228, "StareditOrder/Sublabel", (unsigned int*)7092560},
{ 228, "ActionCompAIIdle", (unsigned int*)7101384},
{ 228, "ActionHumanAIIdle", (unsigned int*)7092328},
{ 228, "IdleAfterAction", (unsigned int*)7105936},
{ 228, "ActionGroundAttack", (unsigned int*)7095544},
{ 228, "ActionAirAttack", (unsigned int*)7092096},
{ 228, "WeaponGround", (unsigned int*)7100920},
{ 228, "MaxHitGround", (unsigned int*)7102048},
{ 228, "WeaponAir", (unsigned int*)7098480},
{ 228, "MaxHitAir", (unsigned int*)7090728},
{ 228, "OrderFlags", (unsigned int*)7090048},
{ 912, "SpecialAbilityFlags", (unsigned int*)7108920},
{ 228, "TargetAcquireRange", (unsigned int*)7103648},
{ 228, "SightRange", (unsigned int*)7108456},
{ 228, "ArmorUpgradeGroup", (unsigned int*)7108224},
{ 228, "Size", (unsigned int*)7099168},
{ 228, "ArmorAmount", (unsigned int*)7101152},
{ 228, "RightClickAction", (unsigned int*)7094624},
{ 212, "ReadySound", (unsigned int*)7090280},
{ 496, "WhatSoundStart", (unsigned int*)7096920},
{ 496, "WhatSoundEnd", (unsigned int*)7093712},
{ 212, "PissSoundStart", (unsigned int*)7091880},
{ 212, "PissSoundEnd", (unsigned int*)7101616},
{ 212, "YesSoundStart", (unsigned int*)7101832},
{ 212, "YesSoundEnd", (unsigned int*)7099856},
{ 912, "PlacementDimesions", (unsigned int*)7102280},
{ 384, "AddonPlacement", (unsigned int*)7100304},
{ 1824, "BufferDimensions", (unsigned int*)7104632},
{ 496, "Portrait", (unsigned int*)7097376},
{ 496, "MineralCost", (unsigned int*)7094856},
{ 496, "VespeneCost", (unsigned int*)7103880},
{ 496, "BuildTime", (unsigned int*)7098024},
{ 496, "ResrictionFlags", (unsigned int*)7099400},
{ 228, "StareditGroupFlags", (unsigned int*)7104792},
{ 228, "FoodGiven", (unsigned int*)7096688},
{ 228, "FoodProduced", (unsigned int*)7089816},
{ 228, "FoodCost", (unsigned int*)7093024},
{ 228, "TransportOrBunkerSpace", (unsigned int*)7095312},
{ 496, "BuildScore", (unsigned int*)7105024},
{ 496, "DestroyScore", (unsigned int*)7105480},
{ 496, "MapStringRefrencer", (unsigned int*)7104336},
{ 496, "StareditAvailabilityFlags", (unsigned int*)7103192},
},
"arr\\units.dat"
};
Woo for sloppy coding!