This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
es:orx:config:main [2016/11/10 18:49 (9 years ago)] – [Información General] sausage | es:orx:config:main [2020/08/19 21:15 (5 years ago)] (current) – Old content sausage | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Configuración ====== | ||
- | This section is dedicated to the config system used by [[http:// | ||
- | |||
- | |||
- | ===== Introducción ===== | ||
- | |||
- | The config system is part of orx's core modules. It's the main module that makes orx a data-driven game engine.\\ | ||
- | As it permits to do on-the-fly tweaks and modifications, | ||
- | When you get comfortable with it, your development time will be drastically shortened. | ||
- | |||
- | |||
- | Its format is basically the one used in [[wp> | ||
- | A couple of specific operators have also been added ((for handling lists, randoms or included files, for example)) and will be covered in the [[syntax|syntax section]]. | ||
- | |||
- | |||
- | ===== Información General ===== | ||
- | |||
- | When orx is initialized, | ||
- | Basically it will remove the extension from your executable name, if any, and add the '' | ||
- | In the same way, if your program is called '' | ||
- | |||
- | In that file you can include as many other config files ((with any kind of extension, '' | ||
- | You can also load config files directly in code. | ||
- | |||
- | <code c> | ||
- | |||
- | Once a config file is loaded, accessing its information will be done in memory, the file won't be read from disk again unless specifically asked with calls to '' | ||
- | |||
- | You can even save the content of the config to a file, either completely or partially. Here's the function you need to call in order to do so: | ||
- | |||
- | <code c> | ||
- | |||
- | '' | ||
- | If you pass '' | ||
- | Please note that the original comments of originally loaded files won't be saved as they' | ||
- | |||
- | In your '' | ||
- | In the first case, you will then be asked for each key/value pair of this section if you want to save it or not. | ||
- | |||
- | This filter system is very handy when you want to save partial data, like for handling save games as you'll see in [[tutorials: | ||
- | |||
- | You can find the config module API in doxygen format via [[http:// | ||
- | We believe the API is self explanatory and shouldn' | ||
- | |||
- | Config' | ||
- | The last section shows how to adapt it for handling save games. | ||
- | |||
- | There are many ways in which the config module can be helpful: for example, it already is the base for the localization module.\\ | ||
- | It's now up to you to find other clever ways of using it depending on your needs. =) | ||
- | |||
- | |||
- | ===== Secciones ===== | ||
- | |||
- | * [[Syntax]] | ||
- | * [[es: | ||
- | * [[es: | ||
- | * [[encryption|Encriptación & Programa orxCrypt]] | ||
- | * [[savegame|Usando el modulo configuración para salvar juegos]] |