Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
blog:x68_launcher_2 [2020/08/23 17:21] – [data.c / data.h] john | blog:x68_launcher_2 [2020/08/23 19:20] (current) – [Control Flow (a simple main.c)] john | ||
---|---|---|---|
Line 347: | Line 347: | ||
**Output** | **Output** | ||
- | * gamedata_t * | + | * gamedata_t *gamedata |
**Description** | **Description** | ||
Line 419: | Line 419: | ||
**Description** | **Description** | ||
+ | |||
+ | Works much the same as the getLastGamedata() function in that it traverses the image list from the current position until it finds the end (determined by the //next// value being NULL). | ||
**Example** | **Example** | ||
+ | |||
+ | This function is only called within getImageList() within data.c, and is used to build the list of image/ | ||
+ | |||
+ | <code " | ||
+ | imagefile = getLastImage(imagefile); | ||
+ | imagefile-> | ||
+ | strcpy(imagefile-> | ||
+ | imagefile-> | ||
+ | </ | ||
---- | ---- | ||
Line 435: | Line 446: | ||
**Description** | **Description** | ||
+ | |||
+ | Behaves the same as // | ||
**Example** | **Example** | ||
+ | |||
+ | __Not currently used.__ | ||
---- | ---- | ||
- | === int removeGamedata() === | + | === removeGamedata() === |
**Input** | **Input** | ||
Line 674: | Line 689: | ||
gamedata_t *gamedata_head = NULL; // Constant pointer to the start of the gamedata list | gamedata_t *gamedata_head = NULL; // Constant pointer to the start of the gamedata list | ||
- | // Create a new empty gamedata entry | + | // Create a new empty gamedata entry which will hold all of |
+ | // the games that we find | ||
gamedata = (gamedata_t *) malloc(sizeof(gamedata_t)); | gamedata = (gamedata_t *) malloc(sizeof(gamedata_t)); | ||
gamedata-> | gamedata-> | ||
- | // Parse the gamedirs that are set | + | // Create a new gamedir list to hold the game search directories |
+ | // which are extracted from the application config file | ||
gamedir = (gamedir_t *) malloc(sizeof(gamedir_t)); | gamedir = (gamedir_t *) malloc(sizeof(gamedir_t)); | ||
gamedir-> | gamedir-> | ||
- | // Create an instance of a config data | + | // Create an instance of a config data, which will be filled |
+ | // by parsing the application config ini file | ||
config = (config_t *) malloc(sizeof(config_t)); | config = (config_t *) malloc(sizeof(config_t)); | ||
config-> | config-> |