From dffe9f3b06993a73c7ff0f542f6214338f56b07f Mon Sep 17 00:00:00 2001 From: nkorslund Date: Sat, 22 Nov 2008 21:21:09 +0000 Subject: [PATCH] Cosmetic changes git-svn-id: https://openmw.svn.sourceforge.net/svnroot/openmw/trunk@75 ea6a568a-9f4f-0410-981a-c910a81bb256 --- esm/listkeeper.d | 38 -------------------------------------- esm/loadglob.d | 2 ++ esmtool.d | 6 +++++- 3 files changed, 7 insertions(+), 39 deletions(-) diff --git a/esm/listkeeper.d b/esm/listkeeper.d index 391852d49..3722a5d12 100644 --- a/esm/listkeeper.d +++ b/esm/listkeeper.d @@ -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 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 // reference to an item. The ItemBase might change after we have // looked it up (for forward references), so we have to use a pointer. @@ -305,29 +290,6 @@ struct Item { 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 diff --git a/esm/loadglob.d b/esm/loadglob.d index 32ee3c770..aa2a8c767 100644 --- a/esm/loadglob.d +++ b/esm/loadglob.d @@ -55,6 +55,8 @@ struct Global 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"); } } diff --git a/esmtool.d b/esmtool.d index 640697899..fd5ace835 100644 --- a/esmtool.d +++ b/esmtool.d @@ -355,7 +355,11 @@ void printRaw() { 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") writefln(getHVUint()); else