timesynk/xibalba
kts 149cd25ef9 After much struggling due to a fool's lack of documentation, the tile_editor is now (seemingly) fully functional. Changes to tile entries can now be made by adding/deleting/modifying the UI elements and pressing the 'commit changes' button. This only does a change for the TileData, etc., stored in ram. These changes can be saved to a file by specifying a filename in the data field and pressing the 'save' button. On a more technical note, fixed some bugs in the data reading code, such as inventory lines being partially read but then being assigned as a simple key=>string pair rather than an InventoryData struct - this, of course, caused segfaults and was particularly mystifying. Table structs now also have a 'count' property that is incremented or decremented whenever a TablePair is added. 2014-01-20 02:21:15 -08:00
..
doors added pack_tiles.c, providing pack_tiles, a program that takes a directory as an argument and creates a new file (directory/directory.tsd) from cleaned files 'doors', 'floors', 'npcs', 'walls', 'equips', 'items', and 'players' in that directory. At the moment it can be used on the xibalba directory to create 'xibalba/xibalba.tsd', which can then be tested with test/t2d.c, providing the internal filename referenced is changed. At the moment the Data system does not properly deal with inventories so any inventory/equipment declaration is ignored. 2013-12-21 02:38:08 -08:00
equips
floors added pack_tiles.c, providing pack_tiles, a program that takes a directory as an argument and creates a new file (directory/directory.tsd) from cleaned files 'doors', 'floors', 'npcs', 'walls', 'equips', 'items', and 'players' in that directory. At the moment it can be used on the xibalba directory to create 'xibalba/xibalba.tsd', which can then be tested with test/t2d.c, providing the internal filename referenced is changed. At the moment the Data system does not properly deal with inventories so any inventory/equipment declaration is ignored. 2013-12-21 02:38:08 -08:00
items Yet again committed the sin of not committing for a long duration of time. As I recall: Finished most of the code for parsing a ts tile declaration file into data structures. In doing so added the InventoryData structure, which simply contains the name of the target tile, the count of tiles(using struct Range, which has min and max properties), the chance of spawn(using a float from 0.0 to 100.0), and an optional pointer to the next InventoryData in the line (akin to Tile Chains). Still todo is for TileData's TablePairs to be parsed into more than char*=>char* pairs, such as char*=>int, char*=>float, etc.. This will be far more efficient and given that TablePair(s) already contain the property for type, it should be done. Also added variations to addTablePair/setTablePair - addTablePairPointer and setTablePairPointer. These functions set the value pointer to the passed pointer rather than allocating new memory and copying the pointer's target memory to that new memory. 2013-12-24 05:37:15 -08:00
npcs Yet again committed the sin of not committing for a long duration of time. As I recall: Finished most of the code for parsing a ts tile declaration file into data structures. In doing so added the InventoryData structure, which simply contains the name of the target tile, the count of tiles(using struct Range, which has min and max properties), the chance of spawn(using a float from 0.0 to 100.0), and an optional pointer to the next InventoryData in the line (akin to Tile Chains). Still todo is for TileData's TablePairs to be parsed into more than char*=>char* pairs, such as char*=>int, char*=>float, etc.. This will be far more efficient and given that TablePair(s) already contain the property for type, it should be done. Also added variations to addTablePair/setTablePair - addTablePairPointer and setTablePairPointer. These functions set the value pointer to the passed pointer rather than allocating new memory and copying the pointer's target memory to that new memory. 2013-12-24 05:37:15 -08:00
players added getTileDataById to data.h, as it was causing segfaults on gcc 4.2.1, mac os 10.6.8/x86 without it. Also fixed pack_data.c, as it was attempting to load the tile data directory before checking argc if an arg was passed. Also added equipment to ibexian shocktrooper and barbarian in xibalba/players for additional testing. 2013-12-24 06:01:43 -08:00
walls added pack_tiles.c, providing pack_tiles, a program that takes a directory as an argument and creates a new file (directory/directory.tsd) from cleaned files 'doors', 'floors', 'npcs', 'walls', 'equips', 'items', and 'players' in that directory. At the moment it can be used on the xibalba directory to create 'xibalba/xibalba.tsd', which can then be tested with test/t2d.c, providing the internal filename referenced is changed. At the moment the Data system does not properly deal with inventories so any inventory/equipment declaration is ignored. 2013-12-21 02:38:08 -08:00
xibalba.tsd After much struggling due to a fool's lack of documentation, the tile_editor is now (seemingly) fully functional. Changes to tile entries can now be made by adding/deleting/modifying the UI elements and pressing the 'commit changes' button. This only does a change for the TileData, etc., stored in ram. These changes can be saved to a file by specifying a filename in the data field and pressing the 'save' button. On a more technical note, fixed some bugs in the data reading code, such as inventory lines being partially read but then being assigned as a simple key=>string pair rather than an InventoryData struct - this, of course, caused segfaults and was particularly mystifying. Table structs now also have a 'count' property that is incremented or decremented whenever a TablePair is added. 2014-01-20 02:21:15 -08:00