naev 0.11.5
start.c File Reference

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

#include "start.h"
#include "log.h"
#include "ndata.h"
#include "nxml.h"
#include "damagetype.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)
 

Functions

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

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

◆ MELEMENT

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

◆ XML_START_ID

#define XML_START_ID   "Start"

XML document tag of module start file.

Definition at line 22 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 204 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 278 of file start.c.

◆ start_cleanup()

void start_cleanup ( void )

Cleans up after the module start data.

Definition at line 156 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 222 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 231 of file start.c.

◆ start_dtype_default()

const char * start_dtype_default ( void )

Gets the default damage type.

Returns
The default damage type.

Definition at line 296 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 269 of file start.c.

◆ start_gui()

const char * start_gui ( void )

Gets the module's starting ship was acquired.

Returns
The default GUI of the player.

Definition at line 213 of file start.c.

◆ start_load()

int start_load ( void )

Loads the module start data.

Returns
0 on success.

system name,

Todo
percent chance

Definition at line 52 of file start.c.

◆ start_local_map_default()

const char * start_local_map_default ( void )

Gets the default local map.

Returns
The default local map.

Definition at line 305 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 260 of file start.c.

◆ start_name()

const char * start_name ( void )

Gets the module name.

Returns
Name of the module.

Definition at line 177 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 250 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 186 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 195 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 287 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 240 of file start.c.

Variable Documentation

◆ start_data

ndata_start_t start_data
static

The actual starting data.

Definition at line 45 of file start.c.