Cosmetic changes

git-svn-id: https://openmw.svn.sourceforge.net/svnroot/openmw/trunk@75 ea6a568a-9f4f-0410-981a-c910a81bb256
This commit is contained in:
nkorslund 2008-11-22 21:21:09 +00:00
parent 5f2078b3f8
commit dffe9f3b06
3 changed files with 7 additions and 39 deletions

View file

@ -200,17 +200,6 @@ class ListID(Type) : ListKeeper
} }
} }
/*
class Dummy : ListKeeper
{
this() {}
void load() {}
void* lookup(char[] s) { return null; }
void endFile() {}
uint length() { return 0; }
}
*/
// A pointer to an item // A pointer to an item
struct ItemBase struct ItemBase
{ {
@ -284,10 +273,6 @@ struct ItemBaseList
} }
} }
// Um... I think this code is double up because I had to split it into
// separate files to avoid template stuff. I don't think we need to do
// that anymore.
// An item. Contains a reference to an ItemBase, which again is a // An item. Contains a reference to an ItemBase, which again is a
// reference to an item. The ItemBase might change after we have // reference to an item. The ItemBase might change after we have
// looked it up (for forward references), so we have to use a pointer. // looked it up (for forward references), so we have to use a pointer.
@ -305,29 +290,6 @@ struct Item
{ {
return cast(T*)getPtr(Type); return cast(T*)getPtr(Type);
} }
/* Avoid the templates for now
alias getType!(Potion, ItemType.Potion) getPotion;
alias getType!(Apparatus, ItemType.Apparatus) getApparatus;
alias getType!(Armor, ItemType.Armor) getArmor;
alias getType!(Weapon, ItemType.Weapon) getWeapon;
alias getType!(Book, ItemType.Book) getBook;
alias getType!(Clothing, ItemType.Clothing) getClothing;
alias getType!(Light, ItemType.Light) getLight;
alias getType!(Ingredient, ItemType.Ingredient) getIngredient;
alias getType!(Tool, ItemType.Pick) getPick;
alias getType!(Tool, ItemType.Probe) getProbe;
alias getType!(Tool, ItemType.Repair) getRepair;
alias getType!(Misc, ItemType.Misc) getMisc;
alias getType!(LeveledItems, ItemType.ItemList) getItemList;
alias getType!(Creature, ItemType.Creature) getCreature;
alias getType!(LeveledCreatures, ItemType.CreatureList) getCreatureList;
alias getType!(NPC, ItemType.NPC) getNPC;
alias getType!(Door, ItemType.Door) getDoor;
alias getType!(Activator, ItemType.Activator) getActivator;
alias getType!(Static, ItemType.Static) getStatic;
alias getType!(Container, ItemType.Container) getContainer;
*/
} }
struct ItemList struct ItemList

View file

@ -55,6 +55,8 @@ struct Global
type = t; type = t;
// The value looks like a float in many cases, and like an integer
// in others (for the s type at least.) Figure it out.
value = esFile.getHNFloat("FLTV"); value = esFile.getHNFloat("FLTV");
} }
} }

View file

@ -355,7 +355,11 @@ void printRaw()
{ {
writefln("'%s'", getHString()); writefln("'%s'", getHString());
} }
else if(subName == "FLTV" || subName == "XSCL") writefln(getHFloat()); else if(subName == "FLTV" || subName == "XSCL")
{
float f = getHFloat();
writefln("f=", f, " i=", *(cast(int*)&f));
}
else if(subName == "INTV" /*|| subName == "NAM0"*/ || subName == "FRMR") else if(subName == "INTV" /*|| subName == "NAM0"*/ || subName == "FRMR")
writefln(getHVUint()); writefln(getHVUint());
else else