naev 0.12.6
board.c File Reference

Deals with boarding ships. More...

#include "board.h"
#include "commodity.h"
#include "hook.h"
#include "log.h"
#include "ndata.h"
#include "nlua.h"
#include "pilot.h"
#include "player.h"
#include "space.h"
Include dependency graph for board.c:

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

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 25 of file board.c.

◆ BOARDING_WIDTH

#define BOARDING_WIDTH   380

Boarding window width.

Definition at line 24 of file board.c.

◆ BUTTON_HEIGHT

#define BUTTON_HEIGHT   30

Boarding button height.

Definition at line 28 of file board.c.

◆ BUTTON_WIDTH

#define BUTTON_WIDTH   50

Boarding button width.

Definition at line 27 of file board.c.

Function Documentation

◆ board_hook()

int board_hook ( void * data)

Definition at line 43 of file board.c.

◆ board_unboard()

void board_unboard ( void )

Forces unboarding of the pilot.

Definition at line 210 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 221 of file board.c.

◆ pilot_boardComplete()

void pilot_boardComplete ( Pilot * p)

Finishes the boarding.

Parameters
pPilot to finish the boarding.

Definition at line 274 of file board.c.

◆ player_canBoard()

int player_canBoard ( int noisy)

Sees if the pilot can board a pilot.

Definition at line 110 of file board.c.

◆ player_isBoarded()

int player_isBoarded ( void )

Gets if the player is boarded.

Definition at line 38 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 31 of file board.c.

◆ board_env

nlua_env board_env
static
Initial value:
=
LUA_NOREF

Lua environment to do the boarding.

Definition at line 32 of file board.c.

◆ board_stopboard

int board_stopboard = 0
static

Whether or not to unboard.

Definition at line 30 of file board.c.