14 #define CALLBACK_TERMINATOR 255
17 #define TYPE_NOT_DATA 255
18 #define TYPE_SEXP_OPERATOR 0
19 #define TYPE_ARGUMENT_COUNT 1
20 #define TYPE_DATA_TERMINATES 2
24 #define TYPE_PARSE_OBJECT 6
25 #define TYPE_BOOLEAN 7
28 #define TYPE_USHORT 10
29 #define TYPE_OBJECT 11
161 int sub_packet_size = 0;
178 sub_packet_size = packet_end + 1;
243 Warning (
LOCATION,
"Attempt to send data in multi_sexp.cpp without first starting a callback");
469 data[
i] = received_packet[
i];
484 ubyte possible_terminator;
485 bool terminator_found =
false;
491 Warning(
LOCATION,
"%s has returned to multi_sexp_eval() claiming %d arguments left. %d actually found. Trace out and fix this!",
Operators[
op_num].text, current_argument_count,
i);
492 terminator_found =
true;
498 if (!terminator_found) {
504 Warning(
LOCATION,
"%s has returned to multi_sexp_eval() without finding the terminator. Discarding packet! Trace out and fix this!",
Operators[
op_num].text);
510 Warning(
LOCATION,
"%s has returned to multi_sexp_eval() without removing all the data the server wrote during its callback. Trace out and fix this!",
Operators[
op_num].text);
555 Warning(
LOCATION,
"multi_get_x function call has read an invalid amount of data. Trace out and fix this!");
571 Warning(
LOCATION,
"multi_get_x function call has been called on an improperly terminated callback. Trace out and fix this!");
665 shipp = &
Ships[shipnum];
690 if((objp != NULL) && (objp->
instance >=0)){
728 int starting_offset =
offset;
743 int starting_offset =
offset;
822 Warning(
LOCATION,
"Attempt to discard remaining data failed! Callback lacks proper termination. Entire packet may be corrupt. Discarding remaining packet");
void sexp_packet_received(ubyte *received_packet, int num_ubytes)
void multi_finished_callback()
GLsizei const GLfloat * value
void multi_send_object(object *objp)
void _cdecl void void _cdecl void _cdecl Warning(char *filename, int line, SCP_FORMAT_STRING const char *format,...) SCP_FORMAT_STRING_ARGS(3
#define TYPE_SEXP_OPERATOR
#define TYPE_PARSE_OBJECT
bool multi_sexp_discard_operator()
std::basic_string< char, std::char_traits< char >, std::allocator< char > > SCP_string
void multi_start_callback()
void multi_sexp_flush_packet()
int current_argument_count
bool multi_get_bool(bool &value)
typedef int(SCP_EXT_CALLCONV *SCPDLL_PFVERSION)(SCPDLL_Version *)
p_object * mission_parse_get_arrival_ship(const char *name)
Returns the parse object on the ship arrival list associated with the given name. ...
int Multi_sexp_bytes_left
void multi_reduce_counts(int amount)
#define TYPE_DATA_TERMINATES
bool multi_get_int(int &value)
void multi_send_string(char *string)
void multi_discard_remaining_callback_data()
bool multi_get_string(char *buffer)
void multi_send_ship(int shipnum)
bool argument_count_is_valid()
void multi_send_short(short value)
void multi_send_parse_object(p_object *pobjp)
void send_sexp_packet(ubyte *sexp_packet, int num_ubytes)
void multi_send_ushort(ushort value)
object Objects[MAX_OBJECTS]
bool packet_flagged_invalid
#define CALLBACK_TERMINATOR
void multi_sexp_ensure_space_remains(int data_size)
void multi_send_float(float value)
int multi_sexp_get_operator()
GLboolean GLboolean GLboolean b
typedef float(SCP_EXT_CALLCONV *SCPTRACKIR_PFFLOATVOID)()
bool multi_get_parse_object(p_object *&pobjp)
#define TYPE_ARGUMENT_COUNT
bool multi_get_float(float &value)
void multi_end_callback()
bool multi_get_ship(int &value)
#define MULTIPLAYER_MASTER
GLenum GLsizei GLenum GLenum const GLvoid * data
void multi_send_int(int value)
object * multi_get_network_object(ushort net_signature)
GLenum GLuint GLenum GLsizei length
void multi_send_bool(bool value)
bool multi_get_ushort(ushort &value)
int multi_sexp_get_next_operator()
SCP_vector< int > Current_sexp_operator
void initalise_sexp_packet()
bool multi_get_object(object *&objp)
bool multi_get_short(short &value)