naev 0.10.4
Data Structures | Macros | Functions | Variables
start.c File Reference

Contains information about the module scenario start. More...

#include "start.h"
#include "log.h"
#include "ndata.h"
#include "nxml.h"

Go to the source code of this file.

Data Structures

struct  ndata_start_t
 The start data structure. More...
 

Macros

#define XML_START_ID   "Start"
 
#define MELEMENT(o, s)    if (o) WARN(_("Module start data missing/invalid '%s' element"), s)
 

Functions

int start_load (void)
 Loads the module start data. More...
 
void start_cleanup (void)
 Cleans up after the module start data. More...
 
const char * start_name (void)
 Gets the module name. More...
 
const char * start_ship (void)
 Gets the module player starting ship. More...
 
const char * start_shipname (void)
 Gets the module's starting ship's name. More...
 
const char * start_acquired (void)
 Gets the module's starting ship was acquired. More...
 
unsigned int start_credits (void)
 Gets the player's starting credits. More...
 
ntime_t start_date (void)
 Gets the starting date. More...
 
const char * start_system (void)
 Gets the starting system name. More...
 
void start_position (double *x, double *y)
 Gets the starting position of the player. More...
 
const char * start_mission (void)
 Gets the starting mission of the player. More...
 
const char * start_event (void)
 Gets the starting event of the player. More...
 
const char * start_chapter (void)
 Gets the player's starting chapter. More...
 
const char * start_spob_lua_default (void)
 Gets the default spob Lua file. More...
 

Variables

static ndata_start_t start_data
 

Detailed Description

Contains information about the module scenario start.

This information is important when creating a new game.

Definition in file start.c.

Macro Definition Documentation

◆ XML_START_ID

#define XML_START_ID   "Start"

XML document tag of module start file.

Definition at line 21 of file start.c.

Function Documentation

◆ start_acquired()

const char * start_acquired ( void  )

Gets the module's starting ship was acquired.

Returns
The default acquiration method of the starting ship.

Definition at line 192 of file start.c.

◆ start_chapter()

const char * start_chapter ( void  )

Gets the player's starting chapter.

Returns
The starting chapter of the player.

Definition at line 257 of file start.c.

◆ start_cleanup()

void start_cleanup ( void  )

Cleans up after the module start data.

Definition at line 147 of file start.c.

◆ start_credits()

unsigned int start_credits ( void  )

Gets the player's starting credits.

Returns
The starting credits of the player.

Definition at line 201 of file start.c.

◆ start_date()

ntime_t start_date ( void  )

Gets the starting date.

Returns
The starting date of the player.

Definition at line 210 of file start.c.

◆ start_event()

const char * start_event ( void  )

Gets the starting event of the player.

Returns
The starting event of the player (or NULL if inapplicable).

Definition at line 248 of file start.c.

◆ start_load()

int start_load ( void  )

Loads the module start data.

Returns
0 on success.

system name,

Todo:
percent chance

< Define to help check for data errors.

Definition at line 48 of file start.c.

◆ start_mission()

const char * start_mission ( void  )

Gets the starting mission of the player.

Returns
The starting mission of the player (or NULL if inapplicable).

Definition at line 239 of file start.c.

◆ start_name()

const char * start_name ( void  )

Gets the module name.

Returns
Name of the module.

Definition at line 165 of file start.c.

◆ start_position()

void start_position ( double *  x,
double *  y 
)

Gets the starting position of the player.

Parameters
[out]xStarting X position.
[out]yStarting Y position.

Definition at line 229 of file start.c.

◆ start_ship()

const char * start_ship ( void  )

Gets the module player starting ship.

Returns
The starting ship of the player.

Definition at line 174 of file start.c.

◆ start_shipname()

const char * start_shipname ( void  )

Gets the module's starting ship's name.

Returns
The default name of the starting ship.

Definition at line 183 of file start.c.

◆ start_spob_lua_default()

const char * start_spob_lua_default ( void  )

Gets the default spob Lua file.

Returns
The default spob lua file.

Definition at line 266 of file start.c.

◆ start_system()

const char * start_system ( void  )

Gets the starting system name.

Returns
The name of the starting system.

Definition at line 219 of file start.c.

Variable Documentation

◆ start_data

ndata_start_t start_data
static

The actual starting data.

Definition at line 41 of file start.c.