naev 0.12.5
slots.c File Reference

Handles the slot properties. More...

#include "slots.h"
#include "array.h"
#include "log.h"
#include "ndata.h"
#include "nxml.h"
Include dependency graph for slots.c:

Go to the source code of this file.

Data Structures

struct  SlotProperty_t
 Representation of a slot property. More...

Macros

#define SP_XML_ID   "slot"

Functions

static int sp_check (unsigned int spid)
 Checks to see if in bound of array.
int sp_load (void)
 Initializes the slot properties.
void sp_cleanup (void)
 Cleans up after the slot properties.
unsigned int sp_get (const char *name)
 Gets the id of a slot property.
const char * sp_display (unsigned int spid)
 Gets the display name of a slot property (in English).
const char * sp_description (unsigned int spid)
 Gets the description of a slot property (in English).
int sp_required (unsigned int spid)
 Gets whether or not a slot property is required.
int sp_exclusive (unsigned int spid)
 Gets whether or not a slot property is exclusive.
int sp_locked (unsigned int spid)
 Gets whether or not a slot property is locked.
int sp_visible (unsigned int spid)
 Whether or not the slot should be visible even if locked.
const glTexturesp_icon (unsigned int spid)
 Gets the icon associated with the slot.

Variables

static SlotProperty_tsp_array = NULL

Detailed Description

Handles the slot properties.

Definition in file slots.c.

Macro Definition Documentation

◆ SP_XML_ID

#define SP_XML_ID   "slot"

SP XML node tag.

Definition at line 20 of file slots.c.

Function Documentation

◆ sp_check()

int sp_check ( unsigned int spid)
static

Checks to see if in bound of array.

Definition at line 155 of file slots.c.

◆ sp_cleanup()

void sp_cleanup ( void )

Cleans up after the slot properties.

Definition at line 120 of file slots.c.

◆ sp_description()

const char * sp_description ( unsigned int spid)

Gets the description of a slot property (in English).

Definition at line 175 of file slots.c.

◆ sp_display()

const char * sp_display ( unsigned int spid)

Gets the display name of a slot property (in English).

Definition at line 165 of file slots.c.

◆ sp_exclusive()

int sp_exclusive ( unsigned int spid)

Gets whether or not a slot property is exclusive.

Definition at line 195 of file slots.c.

◆ sp_get()

unsigned int sp_get ( const char * name)

Gets the id of a slot property.

Parameters
nameName to match.
Returns
ID of the slot property.

Definition at line 139 of file slots.c.

◆ sp_icon()

const glTexture * sp_icon ( unsigned int spid)

Gets the icon associated with the slot.

Definition at line 225 of file slots.c.

◆ sp_load()

int sp_load ( void )

Initializes the slot properties.

Definition at line 46 of file slots.c.

◆ sp_locked()

int sp_locked ( unsigned int spid)

Gets whether or not a slot property is locked.

Definition at line 205 of file slots.c.

◆ sp_required()

int sp_required ( unsigned int spid)

Gets whether or not a slot property is required.

Definition at line 185 of file slots.c.

◆ sp_visible()

int sp_visible ( unsigned int spid)

Whether or not the slot should be visible even if locked.

Definition at line 215 of file slots.c.

Variable Documentation

◆ sp_array

SlotProperty_t* sp_array = NULL
static

Slot property array.

Definition at line 36 of file slots.c.