naev 0.11.5
board.c File Reference

Deals with boarding ships. More...

#include "board.h"
#include "array.h"
#include "commodity.h"
#include "damagetype.h"
#include "hook.h"
#include "log.h"
#include "nstring.h"
#include "ndata.h"
#include "nlua.h"
#include "pilot.h"
#include "player.h"
#include "rng.h"
#include "space.h"
#include "toolkit.h"

Go to the source code of this file.

Macros

#define BOARDING_WIDTH   380
 
#define BOARDING_HEIGHT   200
 
#define BUTTON_WIDTH   50
 
#define BUTTON_HEIGHT   30
 

Functions

int player_isBoarded (void)
 Gets if the player is boarded.
 
int board_hook (void *data)
 
int player_canBoard (int noisy)
 Sees if the pilot can board a pilot.
 
int player_tryBoard (int noisy)
 Attempt to board the player's target.
 
void board_unboard (void)
 Forces unboarding of the pilot.
 
int pilot_board (Pilot *p)
 Has a pilot attempt to board another pilot.
 
void pilot_boardComplete (Pilot *p)
 Finishes the boarding.
 

Variables

static int board_stopboard = 0
 
static int board_boarded = 0
 
static nlua_env board_env = LUA_NOREF
 

Detailed Description

Deals with boarding ships.

Definition in file board.c.

Macro Definition Documentation

◆ BOARDING_HEIGHT

#define BOARDING_HEIGHT   200

Boarding window height.

Definition at line 30 of file board.c.

◆ BOARDING_WIDTH

#define BOARDING_WIDTH   380

Boarding window width.

Definition at line 29 of file board.c.

◆ BUTTON_HEIGHT

#define BUTTON_HEIGHT   30

Boarding button height.

Definition at line 33 of file board.c.

◆ BUTTON_WIDTH

#define BUTTON_WIDTH   50

Boarding button width.

Definition at line 32 of file board.c.

Function Documentation

◆ board_hook()

int board_hook ( void * data)

Definition at line 47 of file board.c.

◆ board_unboard()

void board_unboard ( void )

Forces unboarding of the pilot.

Definition at line 208 of file board.c.

◆ pilot_board()

int pilot_board ( Pilot * p)

Has a pilot attempt to board another pilot.

Parameters
pPilot doing the boarding.
Returns
1 if target was boarded.

Definition at line 219 of file board.c.

◆ pilot_boardComplete()

void pilot_boardComplete ( Pilot * p)

Finishes the boarding.

Parameters
pPilot to finish the boarding.

Definition at line 271 of file board.c.

◆ player_canBoard()

int player_canBoard ( int noisy)

Sees if the pilot can board a pilot.

Definition at line 114 of file board.c.

◆ player_isBoarded()

int player_isBoarded ( void )

Gets if the player is boarded.

Definition at line 42 of file board.c.

◆ player_tryBoard()

int player_tryBoard ( int noisy)

Attempt to board the player's target.

Creates the window on success.

Definition at line 152 of file board.c.

Variable Documentation

◆ board_boarded

int board_boarded = 0
static

Whether or not the player is boarded.

Definition at line 36 of file board.c.

◆ board_env

nlua_env board_env = LUA_NOREF
static

Lua environment to do the boarding.

Definition at line 37 of file board.c.

◆ board_stopboard

int board_stopboard = 0
static

Whether or not to unboard.

Definition at line 35 of file board.c.