Commit Graph

7 Commits (master)

Author SHA1 Message Date
kts 722ceb5747 Reorganized the project root, deleted unnecessary files, moved data.c/.h, fio.c/.h, llist.c/.h into common and old code into old/ directory. All modules will now reside on the modules/ directory. 2014-03-10 12:41:49 -07:00
kts 30f71466fd Much progress on the tile editor, as it can now read in a .tsd file using the earlier developed data.c/data.h (Data, TileSetData, TileData, etc. structs and accompanying functions). Once a file is successfully loaded, changing the set/id will attempt to populate the GUI with key=>value pairs for the given tile, if it exists. Partially implemented is the parsing of InventoryData. Will implement adding new TablePairs through the GUI and the saving of any changes back to a .tsd file. Fixed some memory allocation problems as well - some leakage still existing in the tile editor as well as the Data functions/structs, but they are noted and will be taken care of in time. 2014-01-17 04:03:10 -08:00
kts 4ca32efeee Added an empty skeleton for the tile editor, including its own sub-directory in tile_editor/ (along with corresponding Makefile), as well as its own Target in timesynk's XCode project file. 2013-12-27 23:22:04 -08:00
kts d5f4947c90 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
kts c7f3ac15d3 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
kts 0005a93d65 Implemented Data system fully now (not integrated into ts engine itself yet). In the process added a new Table (hash table) system that matches keys to values. More information pertaining to that in data.h/data.c. Might switch over to a system wherein all Tiles are actually TileData structs (or contain TileData structs). This would increase the processing necessary, as values for properties must be acquired from a string instead of reading from a pre-defined struct, but it would increase the modularity immensely as there is no real limit on the amount of properties a Tile may contain (which will be most important once the interpreter is implemented and used for tile movement, collisions, etc.). 2013-12-20 18:24:06 -08:00
kts e2e015c76b Added two folders: test/ and xibalba/. Contained within test/ are two test/devel-beds for two systems that will be integrated within ts. The first is script.c, which is the development program for the interpreter system - this interpreter system allows for the setting of variables (both local and global), the creation of new functions, and the definition of default in-game functions such as dice rolling and the like. The second file, t2d.c functions as a basic test utility for Tile Data loading and the like - it interprets a tileset/tile definition file into Data, TileDataSet, and TileData(s) respectively. These structs, as defined in data.c/.h, allow for reference to tiles by TID:ID or simply by name through the use of key=>value pairs. It is from these structs and their accompanying access functions that new Tiles will be created (perhaps later optimized through a basic Tile array that contains semi-populated Tile(s) that can be memcpy'd similar to the current system). Also added the xibalba/ sub-dir that will contain the various data for Xibalba (tile definitions, graphics, map creation, etc.), moving majority of what is in tiles/ into xibalba/. 2013-12-17 17:08:37 -08:00