User talk:Ismarc

From FIFE development wiki
Jump to: navigation, search

I do apologize for the inconvenience, however, we are only able to provide support for official releases of FIFE. Because of the nature of software development, the Subversion repository is considered a work in progress. The content and and features included in the software located in the repository is always changing and growing. Access to this repository is provided for convenience for those who wish to work directly with the source code and with very limited direct support. If you do not wish to work directly with the source code itself, it is highly recommended that you download and use a pre-compiled binary for the platform you are developing on.

TODO List

  • Reasonable write support for VFS.
  • Look at the current maploader method, see if/how much needs to be revamped
  • Work on the map format...


Semi-personal notes/ideas for map format

Header

  • Tile Geometry used
  • Grid Geometry used
  • filename
  • Version number

Body

The body contains 3 sections: Tile objects, Grid objects and Contained objects.

Tile Objects

This describes each entry for a tile object

  • tile location (pattern determined by tile geometry)
  • tile image filename - This can be one of two methods, relative path or just the filename. If it's just the filename, the loader should do a quick search to find it and substitute black if it doesn't exist. This entry missing would be for a solid black tile.
  • roof image filename - Same as for tile image filename
  • long int tile properties - This is for whatever the script/game/etc wants to store for the properties, associated with tile for convenience.
Grid Objects

This describes each entry for a grid object

  • grid location (pattern determined by grid geometry)
  • grid image filename - Similar to tile image filename. If not found, object does not exist instead of black.
  • object ID - This is a string/integer based method of giving a specific ID to this object. If one isn't specified, one will be automatically generated when the object is first loaded into memory.
  • associated script - This can be a script filename, a script function name or a hard-coded (c++) function name/object
NonVisible Objects

NonVisible objects are any objects which can be considered part of the map but are not immediately visible. This can include blockers, objects which are contained in other objects, lights, etc.

  • location (tile or grid type location, system compares against pattern and assigns as appropriate) - Can be null/missing if an object isn't on the map itself
  • container - Similar to location, this is the containing object's ID, can be null/missing.


NOTE: If location and container are both missing/null the object does not exist anywhere!!!

  • object ID - Same conditions/use as a Grid Object
  • associated script - Same as for Grid Object

VFS Write stuff

  • Call made to VFS(the class) with data structure, file name and format to write.
  • VFS finds the appropriate formatter for that format and passes the data structure and file name to the formatter.
  • Formatter potentially calls other formatters to write portions of the file with subsections of the data structure and file name.
  • Each formatter calls the writer with the RawData to be written and the flags for opening the file.
    • The first formatter would make a call to open the file to truncate or create the file.
    • The first formatter then calls the other formatters that would the call the writer with append specified.
  • The writer takes the data and writes it to disk, ensuring endianness is preserved.

Editor schtuff

Editor Specific Signals. This includes only signals that need to be specifically implemented for the editor to communicate data and map changes. This does not detail normal functioning application signals.

  • Signals to Signal Processor - each pane has the possibility to emit these signals.
    • I selected a new object
    • I changed the selected object
    • I no longer have a selected object
    • I selected multiple objects
    • I changed multiple selected objects
    • I loaded a new map
    • I closed the map
    • I changed the map view area
    • I added an object to the map
    • I removed an object from the map
  • Signals emitted by Signal Processor
    • New Selected Object
    • Selected Object Changed
    • No Selected Object
    • Multiple Objects Selected
    • Selected Multiple Objects Changed
    • Map Loaded
    • Map Closed
    • Map View Area Changed
    • Object Added To Map
    • Object Removed From Map
  • Prevention of problems
    • Infinite loops - inherant structure of this set up prevents it
      • Pane 1 emits the signal of having selected an object
      • Signal processor receives signal, emits New Selected Object
      • Pane 1 and 2 receive New Selected Object, compare their local data against the main internal data and update as necessary. This does not emit a signal as nothing has been actively done by the pane, only reacted to data.