Subversion Repositories Games.Descent

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 pmbaty 1
/*
2
 * Portions of this file are copyright Rebirth contributors and licensed as
3
 * described in COPYING.txt.
4
 * Portions of this file are copyright Parallax Software and licensed
5
 * according to the Parallax license below.
6
 * See COPYING.txt for license details.
7
 
8
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
9
SOFTWARE CORPORATION ("PARALLAX").  PARALLAX, IN DISTRIBUTING THE CODE TO
10
END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
11
ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
12
IN USING, DISPLAYING,  AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
13
SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
14
FREE PURPOSES.  IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
15
CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES.  THE END-USER UNDERSTANDS
16
AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
17
COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION.  ALL RIGHTS RESERVED.
18
*/
19
 
20
/*
21
 *
22
 * Header file for multiplayer robot support.
23
 *
24
 */
25
 
26
#pragma once
27
 
28
#include "pstypes.h"
29
 
30
#ifdef __cplusplus
31
#include "fwd-player.h" // playernum_t
32
#include "fwd-vclip.h"
33
#include "fwd-vecmat.h"
34
 
35
constexpr std::integral_constant<std::size_t, 5> MAX_ROBOTS_CONTROLLED{};
36
constexpr std::integral_constant<std::size_t, MAX_ROBOTS_CONTROLLED> HANDS_OFF_PERIOD{}; // i.e. one slow above max
37
 
38
extern std::array<objnum_t, MAX_ROBOTS_CONTROLLED> robot_controlled;
39
extern std::array<int, MAX_ROBOTS_CONTROLLED> robot_agitation, robot_fired;
40
 
41
#if defined(DXX_BUILD_DESCENT_I) || defined(DXX_BUILD_DESCENT_II)
42
int multi_can_move_robot(vmobjptridx_t objnum, int agitation);
43
void multi_send_robot_position(object &objnum, int fired);
44
void multi_send_robot_fire(vmobjptridx_t objnum, int gun_num, const vms_vector &fire);
45
void multi_send_claim_robot(vmobjptridx_t objnum);
46
void multi_send_robot_explode(imobjptridx_t objnum, objnum_t killer);
47
void multi_send_create_robot(int robotcen, objnum_t objnum, int type);
48
#ifdef dsx
49
namespace dsx {
50
void multi_send_boss_teleport(vmobjptridx_t bossobjnum, vcsegidx_t where);
51
}
52
#endif
53
void multi_send_boss_cloak(objnum_t bossobjnum);
54
void multi_send_boss_start_gate(objnum_t bossobjnum);
55
void multi_send_boss_stop_gate(objnum_t bossobjnum);
56
void multi_send_boss_create_robot(vmobjidx_t bossobjnum, vmobjptridx_t objnum);
57
#ifdef dsx
58
namespace dsx {
59
int multi_explode_robot_sub(vmobjptridx_t botnum);
60
}
61
#endif
62
void multi_drop_robot_powerups(vmobjptr_t objnum);
63
int multi_send_robot_frame(int sent);
64
#ifdef dsx
65
namespace dsx {
66
void multi_robot_request_change(vmobjptridx_t robot, int playernum);
67
#if defined(DXX_BUILD_DESCENT_II)
68
void multi_send_thief_frame();
69
#endif
70
}
71
#endif
72
#endif
73
 
74
void multi_do_robot_explode(const ubyte *buf);
75
void multi_do_robot_position(playernum_t pnum, const ubyte *buf);
76
void multi_do_claim_robot(playernum_t pnum, const ubyte *buf);
77
void multi_do_release_robot(playernum_t pnum, const ubyte *buf);
78
#ifdef dsx
79
namespace dsx {
80
void multi_do_robot_fire(const ubyte *buf);
81
void multi_do_create_robot(const d_vclip_array &Vclip, playernum_t pnum, const uint8_t *buf);
82
void multi_do_boss_teleport(const d_vclip_array &Vclip, playernum_t pnum, const uint8_t *buf);
83
}
84
#endif
85
void multi_do_create_robot_powerups(playernum_t pnum, const ubyte *buf);
86
#ifdef dsx
87
namespace dsx {
88
void multi_do_boss_cloak(const ubyte *buf);
89
}
90
#endif
91
void multi_do_boss_start_gate(const ubyte *buf);
92
void multi_do_boss_stop_gate(const ubyte *buf);
93
void multi_do_boss_create_robot(playernum_t pnum, const ubyte *buf);
94
 
95
void multi_strip_robots(int playernum);
96
void multi_check_robot_timeout(void);
97
 
98
#endif