From e287d206ee7e7e42793719e006f5632c180c46a6 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Wed, 23 Oct 2024 20:03:48 -0400 Subject: [PATCH] Convert more function names to CamelCase --- src/swauto.c | 10 ++++----- src/swcollsn.c | 15 ++++++------- src/swgames.c | 38 ++++++++++++++++----------------- src/swgames.h | 2 +- src/swinit.c | 48 ++++++++++++++++++++--------------------- src/swmain.c | 19 ++++++++--------- src/swmove.c | 4 ++-- src/swsplat.c | 6 +++--- src/swsymbol.c | 58 +++++++++++++++++++++++++------------------------- src/swsymbol.h | 6 +++--- src/tcpcomm.c | 10 ++++----- 11 files changed, 106 insertions(+), 110 deletions(-) diff --git a/src/swauto.c b/src/swauto.c index 61458a7..a2ac98b 100644 --- a/src/swauto.c +++ b/src/swauto.c @@ -81,7 +81,7 @@ static int shoot(OBJECTS *obt) return 0; } -static bool within_home_range(OBJECTS *ob, int x, int y) +static bool WithinHomeRange(OBJECTS *ob, int x, int y) { const original_ob_t *orig_ob = ob->ob_original_ob; @@ -89,7 +89,7 @@ static bool within_home_range(OBJECTS *ob, int x, int y) && abs(y - ob->ob_orig_y) < HOME; } -static bool is_target(OBJECTS *ob) +static bool IsTarget(OBJECTS *ob) { return ob->ob_type == TARGET || ob->ob_type == OX; } @@ -107,7 +107,7 @@ static bool tstcrash2(OBJECTS *ob, int x, int y, int alt, int dy) // don't need to look three tics ahead. Otherwise at high speeds the // autopilot can end up endlessly circling the runway, afraid any // downward movement at all will lead to a crash. - if (ob->ob_home && within_home_range(ob, x, y)) { + if (ob->ob_home && WithinHomeRange(ob, x, y)) { lookahead = 1; } @@ -144,7 +144,7 @@ static bool tstcrash2(OBJECTS *ob, int x, int y, int alt, int dy) for (; obt->ob_xnext != NULL; obt = obt->ob_xnext) { - if (!is_target(obt) || obt->ob_x < xl) { + if (!IsTarget(obt) || obt->ob_x < xl) { continue; } if (obt->ob_x > xr) { @@ -327,7 +327,7 @@ int gohome(OBJECTS *ob) } courseadj = ((countmove & 0x001F) < 16) << 4; - if (within_home_range(ob, ob->ob_x, ob->ob_y)) { + if (WithinHomeRange(ob, ob->ob_x, ob->ob_y)) { if (plyrplane) { initplyr(ob); initdisp(true); diff --git a/src/swcollsn.c b/src/swcollsn.c index 9144441..d3dd280 100644 --- a/src/swcollsn.c +++ b/src/swcollsn.c @@ -23,7 +23,7 @@ #include "swsplat.h" static void tstcrash(OBJECTS *obp); -static void blast_target(OBJECTS *ob, obtype_t type); +static void BlastTarget(OBJECTS *ob, obtype_t type); static OBJECTS *killed[MAX_OBJS*2], *killer[MAX_OBJS*2]; static int killptr; @@ -298,7 +298,7 @@ static void swkill(OBJECTS * ob1, OBJECTS * ob2) ob->ob_onmap = false; initexpl(ob, 0); - blast_target(ob, ttype); + BlastTarget(ob, ttype); scoretarg(ob, ob->ob_orient == TARGET_OIL_TANK ? 200 : 100); --numtarg[ob->ob_clr - 1]; @@ -527,10 +527,7 @@ static void tstcrash(OBJECTS *obp) } } - -/* Determine valour factor */ - -static int compute_valour(OBJECTS *ob) +static int ComputeValour(OBJECTS *ob) { int reverse; OBJECTS *so = get_score_obj(ob, &reverse); @@ -572,7 +569,7 @@ static int compute_valour(OBJECTS *ob) return valour; } -static void blast_target(OBJECTS *ob, obtype_t type) +static void BlastTarget(OBJECTS *ob, obtype_t type) { int reverse; OBJECTS *so = get_score_obj(ob, &reverse); @@ -583,7 +580,7 @@ static void blast_target(OBJECTS *ob, obtype_t type) if (type == BOMB || type == SHOT || type == MISSILE || type == PLANE) { so->ob_flightscore.killscore += 4; - so->ob_flightscore.valour += 3 * compute_valour (ob); + so->ob_flightscore.valour += 3 * ComputeValour (ob); } } @@ -602,7 +599,7 @@ void scorepln(OBJECTS * ob, obtype_t type) scobj->ob_flightscore.planekills++; } scobj->ob_flightscore.valour += - 4 * (2 + compute_valour (ob)); + 4 * (2 + ComputeValour (ob)); } scobj->ob_flightscore.killscore += 3; diff --git a/src/swgames.c b/src/swgames.c index ee7d96c..c1249d7 100644 --- a/src/swgames.c +++ b/src/swgames.c @@ -282,7 +282,7 @@ bool have_custom_level; #define cl custom_level -static void free_custom_level(void) +static void FreeCustomLevel(void) { free(cl.gm_objects); cl.gm_objects = NULL; @@ -293,7 +293,7 @@ static void free_custom_level(void) cl.gm_rseed = 12345; } -static void add_object(original_ob_t *ob, struct yocton_object *yo) +static void AddObject(original_ob_t *ob, struct yocton_object *yo) { struct yocton_prop *p; @@ -308,7 +308,7 @@ static void add_object(original_ob_t *ob, struct yocton_object *yo) } } -static void set_ground(struct yocton_object *yo) +static void SetGround(struct yocton_object *yo) { struct yocton_prop *p; @@ -320,23 +320,23 @@ static void set_ground(struct yocton_object *yo) } } -static void process_level(struct yocton_object *obj) +static void ProcessLevel(struct yocton_object *obj) { struct yocton_prop *p; while ((p = yocton_next_prop(obj)) != NULL) { YOCTON_VAR_ARRAY(p, "object", cl.gm_objects, cl.gm_num_objects, { - add_object(&cl.gm_objects[cl.gm_num_objects], - yocton_prop_inner(p)); + AddObject(&cl.gm_objects[cl.gm_num_objects], + yocton_prop_inner(p)); ++cl.gm_num_objects; }); YOCTON_IF_PROP(p, "ground", { - set_ground(yocton_prop_inner(p)); + SetGround(yocton_prop_inner(p)); }); } } -static void process_symbol(const char *name, struct yocton_object *obj) +static void ProcessSymbol(const char *name, struct yocton_object *obj) { symset_t *s; struct yocton_prop *p; @@ -351,19 +351,19 @@ static void process_symbol(const char *name, struct yocton_object *obj) yocton_check(obj, "expecting frame number as property name", *ptr == '\0' && errno != ERANGE && l < 256); - s = lookup_symset(name, l); + s = LookupSymset(name, l); yocton_check(obj, "expecting valid symbol name and " "frame number", s != NULL); value = yocton_prop_value(p); if (s != NULL && value != NULL) { // TODO: Symbols must currently be the same size as // the symbol they are replacing. - symset_from_text(s, value, s->sym[0].w, s->sym[0].h); + SymsetFromText(s, value, s->sym[0].w, s->sym[0].h); } } } -static void process_sounds(struct yocton_object *obj) +static void ProcessSounds(struct yocton_object *obj) { struct yocton_prop *p; char *title_tune = NULL; @@ -377,17 +377,17 @@ static void process_sounds(struct yocton_object *obj) } } -static void process_symbols(struct yocton_object *obj) +static void ProcessSymbols(struct yocton_object *obj) { struct yocton_prop *p; while ((p = yocton_next_prop(obj)) != NULL) { - process_symbol(yocton_prop_name(p), - yocton_prop_inner(p)); + ProcessSymbol(yocton_prop_name(p), + yocton_prop_inner(p)); } } -void load_custom_level(const char *filename) +void LoadCustomLevel(const char *filename) { FILE *fs; struct yocton_object *obj; @@ -396,7 +396,7 @@ void load_custom_level(const char *filename) struct yocton_prop *p; bool processed_level = false; - free_custom_level(); + FreeCustomLevel(); fs = fopen(filename, "r"); if (fs == NULL) { @@ -414,14 +414,14 @@ void load_custom_level(const char *filename) if (!strcmp(name, "level")) { yocton_check(obj, "only one level per file supported", !processed_level); - process_level(yocton_prop_inner(p)); + ProcessLevel(yocton_prop_inner(p)); processed_level = true; } if (!strcmp(name, "symbols")) { - process_symbols(yocton_prop_inner(p)); + ProcessSymbols(yocton_prop_inner(p)); } if (!strcmp(name, "sounds")) { - process_sounds(yocton_prop_inner(p)); + ProcessSounds(yocton_prop_inner(p)); } } diff --git a/src/swgames.h b/src/swgames.h index c8b6793..bf477ef 100644 --- a/src/swgames.h +++ b/src/swgames.h @@ -18,6 +18,6 @@ extern const GAMES original_level; extern GAMES custom_level; extern bool have_custom_level; -void load_custom_level(const char *filename); +void LoadCustomLevel(const char *filename); #endif diff --git a/src/swinit.c b/src/swinit.c index 5a12003..1484bdb 100644 --- a/src/swinit.c +++ b/src/swinit.c @@ -130,7 +130,7 @@ static void initflightscore(flight_score_t *score) #define VALOUR_PRELIMIT 175 #define VALOUR_LIMIT 250 -static bool have_medal(int *medals, int medals_nr, int medal_id) +static bool HaveMedal(int *medals, int medals_nr, int medal_id) { int i; @@ -143,25 +143,25 @@ static bool have_medal(int *medals, int medals_nr, int medal_id) return false; } -static void give_medal(OBJECTS *ob, int medal_id) +static void GiveMedal(OBJECTS *ob, int medal_id) { score_t *sc = &ob->ob_score; - if (!have_medal(sc->medals, sc->medals_nr, medal_id)) { + if (!HaveMedal(sc->medals, sc->medals_nr, medal_id)) { assert(sc->medals_nr < 3); sc->medals[sc->medals_nr++] = medal_id; } } -static void give_ribbon(OBJECTS *ob, int ribbon_id) +static void GiveRibbon(OBJECTS *ob, int ribbon_id) { score_t *sc = &ob->ob_score; - if (!have_medal(sc->ribbons, sc->ribbons_nr, ribbon_id)) { + if (!HaveMedal(sc->ribbons, sc->ribbons_nr, ribbon_id)) { assert(sc->ribbons_nr < 6); sc->ribbons[sc->ribbons_nr++] = ribbon_id; } } -static void get_awards(OBJECTS *ob) +static void GetAwards(OBJECTS *ob) { flight_score_t *fsc = &ob->ob_flightscore; score_t *sc = &ob->ob_score; @@ -169,7 +169,7 @@ static void get_awards(OBJECTS *ob) // We only award purple heart if wounded in combat (=hit by bullet), // not from a bird strike or flying into an ox. if (fsc->combatwound) { - give_medal(ob, MEDAL_PURPLEHEART); + GiveMedal(ob, MEDAL_PURPLEHEART); } // We count up the number of planes shot down, but they only count if @@ -177,10 +177,10 @@ static void get_awards(OBJECTS *ob) sc->planekills += fsc->planekills; //printf("planes %d %d\n", sc->planekills, fsc->planekills); if (sc->planekills >= 5) { - give_ribbon(ob, RIBBON_ACE); + GiveRibbon(ob, RIBBON_ACE); } if (sc->planekills >= 25) { - give_ribbon(ob, RIBBON_TOPACE); + GiveRibbon(ob, RIBBON_TOPACE); } // We count the number of landings during which we did a decent amount @@ -190,16 +190,16 @@ static void get_awards(OBJECTS *ob) } //printf("kills %d landings %d\n", fsc->killscore, sc->landings); if (sc->landings >= 3) { - give_ribbon(ob, RIBBON_SERVICE); + GiveRibbon(ob, RIBBON_SERVICE); } // If a huge number of damage is done, we give a medal (first time) or // ribbon (second time) if (fsc->killscore >= COMPETENCE_KILLSCORE) { - if (!have_medal(sc->medals, sc->medals_nr, MEDAL_COMPETENCE)) { - give_medal(ob, MEDAL_COMPETENCE); + if (!HaveMedal(sc->medals, sc->medals_nr, MEDAL_COMPETENCE)) { + GiveMedal(ob, MEDAL_COMPETENCE); } else { - give_ribbon(ob, RIBBON_COMPETENCE2); + GiveRibbon(ob, RIBBON_COMPETENCE2); } } @@ -208,19 +208,19 @@ static void get_awards(OBJECTS *ob) sc->valour += fsc->valour; //printf("valour %d %d\n", sc->valour, fsc->valour); if (sc->valour >= VALOUR_PRELIMIT) { - give_ribbon(ob, RIBBON_PREVALOUR); + GiveRibbon(ob, RIBBON_PREVALOUR); } if (sc->valour >= VALOUR_LIMIT) { - give_medal(ob, MEDAL_VALOUR); + GiveMedal(ob, MEDAL_VALOUR); } } -static void get_endlevel(OBJECTS *ob) +static void GetEndLevel(OBJECTS *ob) { - get_awards(ob); + GetAwards(ob); if (ob->ob_crashcnt == 0) { - give_ribbon(ob, RIBBON_PERFECT); + GiveRibbon(ob, RIBBON_PERFECT); } } @@ -243,7 +243,7 @@ OBJECTS *initpln(OBJECTS * obp) if (obp && ob->ob_state != CRASHED && !ob->ob_athome) { /* Just returned home */ - get_awards(ob); + GetAwards(ob); } initflightscore(&ob->ob_flightscore); @@ -655,7 +655,7 @@ static OBJECTS *inittarget(const original_ob_t *orig_ob) // Number of explosion fragments is calculated based on the number of pixels // in the "destroyed target" sprite: -static int target_explosion_size(int target_type) +static int TargetExplosionSize(int target_type) { symset_t *ss = &symbol_target_hit[target_type]; sopsym_t *s = &ss->sym[0]; @@ -722,7 +722,7 @@ void initexpl(OBJECTS *obo, int small) // target sprite. For the original Sopwith destroyed- // building sprite, this evaluates to 2, which is // the original behavior. - ic = 110 / target_explosion_size(obo->ob_orient); + ic = 110 / TargetExplosionSize(obo->ob_orient); } else { ic = 2; } @@ -1028,7 +1028,7 @@ void swrestart(void) ob = planes[player]; inc = 0; - get_endlevel(ob); + GetEndLevel(ob); // Count down the remaining lives; the player gets awarded // extra points for each life. @@ -1082,7 +1082,7 @@ void swinit(int argc, char *argv[]) // We must generate symbols early, so that custom map files // can replace symbols: - symbol_generate(); + GenerateSymbols(); for (i=1; i countmove. */ @@ -128,7 +127,7 @@ static int can_move(void) /* Calculate lag between the controls and the game */ -static void calculate_lag(void) +static void CalculateLag(void) { int lag = Timer_GetMS() - player_command_time[countmove % MAX_NET_LAG]; int compensation; @@ -151,7 +150,7 @@ static void calculate_lag(void) skip_time += compensation; } -static void new_move(void) +static void NewMove(void) { int multkey; int tictime; @@ -181,7 +180,7 @@ static void new_move(void) } #if 0 -static void dump_cmds(void) +static void DumpCmds(void) { printf("%i: %i, %i\n", countmove, latest_player_commands[0][countmove % MAX_NET_LAG], @@ -228,7 +227,7 @@ int swmain(int argc, char *argv[]) if (nowtime > nexttic && latest_player_time[player] - countmove < MAX_NET_LAG) { - new_move(); + NewMove(); /* Be accurate (exact amount between tics); * However, if a large spike occurs between tics, @@ -252,9 +251,9 @@ int swmain(int argc, char *argv[]) /* if we have all the tic commands we need, we can move */ - if (can_move()) { - calculate_lag(); - //dump_cmds(); + if (CanMove()) { + CalculateLag(); + //DumpCmds(); swmove(); swdisp(); swcollsn(); diff --git a/src/swmove.c b/src/swmove.c index a9f7246..b19e3ed 100644 --- a/src/swmove.c +++ b/src/swmove.c @@ -838,7 +838,7 @@ bool moveburst(OBJECTS *ob) return y < MAX_Y; } -static void target_enemy_planes(OBJECTS *ob) +static void TargetEnemyPlanes(OBJECTS *ob) { OBJECTS *obp; int r; @@ -901,7 +901,7 @@ bool movetarg(OBJECTS *ob) && gamenum > 0 && aggression > 0 && (gamenum > 1 || (countmove % aggression) == (aggression - 1))) { - target_enemy_planes(ob); + TargetEnemyPlanes(ob); } --ob->ob_hitcount; diff --git a/src/swsplat.c b/src/swsplat.c index 4d1a3d5..fb4cffc 100644 --- a/src/swsplat.c +++ b/src/swsplat.c @@ -71,7 +71,7 @@ static unsigned long randsd(void) return 0; } -static void add_splat(splat_t *splat) +static void AddSplat(splat_t *splat) { if (num_splats < MAX_SPLATS) { memcpy(&splats[num_splats], splat, sizeof(splat_t)); @@ -91,7 +91,7 @@ void swsplatbird(void) splat.sym = &symbol_birdsplat[0].sym[0]; splat.clr = OWNER_PLAYER2; - add_splat(&splat); + AddSplat(&splat); } void swwindshot(void) @@ -105,7 +105,7 @@ void swwindshot(void) splat.sym = &symbol_shotwin[0].sym[0]; splat.clr = OWNER_PLAYER1; - add_splat(&splat); + AddSplat(&splat); } void swsplatox(void) diff --git a/src/swsymbol.c b/src/swsymbol.c index bf88e8b..b0310c3 100644 --- a/src/swsymbol.c +++ b/src/swsymbol.c @@ -841,7 +841,7 @@ static const char *swribbonsym[] = { "- - # # # - - \n", /* MMWWWMM : PREVALOUR */ }; -static void rotate(int *x, int *y, int w, int h, int rotations, bool mirror) +static void Rotate(int *x, int *y, int w, int h, int rotations, bool mirror) { int i, tmp; @@ -855,8 +855,8 @@ static void rotate(int *x, int *y, int w, int h, int rotations, bool mirror) } } -static void sopsym_from_text(sopsym_t *sym, const char *text, int w, int h, - int rotations, bool mirror) +static void SopsymFromText(sopsym_t *sym, const char *text, int w, int h, + int rotations, bool mirror) { const char *p, *p2; int x, y, dx, dy, c; @@ -885,7 +885,7 @@ static void sopsym_from_text(sopsym_t *sym, const char *text, int w, int h, if (x < w * 2 && y < h && (x % 2) == 0) { dx = x / 2; dy = y; - rotate(&dx, &dy, w, h, rotations, mirror); + Rotate(&dx, &dy, w, h, rotations, mirror); sym->data[dy * sym->w + dx] = c; } x++; @@ -893,18 +893,18 @@ static void sopsym_from_text(sopsym_t *sym, const char *text, int w, int h, } } -void symset_from_text(symset_t *s, const char *text, int w, int h) +void SymsetFromText(symset_t *s, const char *text, int w, int h) { int r; for (r = 0; r < 4; r++) { - sopsym_from_text(&s->sym[r], text, w, h, r, false); - sopsym_from_text(&s->sym[r + 4], text, w, h, r, true); + SopsymFromText(&s->sym[r], text, w, h, r, false); + SopsymFromText(&s->sym[r + 4], text, w, h, r, true); } } -symset_t *lookup_symset(const char *name, int frame) +symset_t *LookupSymset(const char *name, int frame) { symset_t *s; @@ -917,7 +917,7 @@ symset_t *lookup_symset(const char *name, int frame) return NULL; } -static void init_symset(symset_t *s, const char *name, int frame) +static void InitSymset(symset_t *s, const char *name, int frame) { s->name = name; s->frame = frame; @@ -955,32 +955,32 @@ sopsym_t symbol_pixel = { }; // generate array of symset_t structs from array of strings: -#define symsets_from_text(text, w, h, out) \ +#define SYMSETS_FROM_TEXT(text, w, h, out) \ { int _i; \ for (_i = 0; _i < arrlen(out); ++_i) { \ - init_symset(&(out)[_i], #text, _i); \ - symset_from_text(&(out)[_i], (text)[_i], (w), (h)); \ + InitSymset(&(out)[_i], #text, _i); \ + SymsetFromText(&(out)[_i], (text)[_i], (w), (h)); \ } \ } -void symbol_generate(void) +void GenerateSymbols(void) { - symsets_from_text(swbmbsym, 8, 8, symbol_bomb); - symsets_from_text(swtrgsym, 16, 16, symbol_targets); - symsets_from_text(swexpsym, 8, 8, symbol_debris); - symsets_from_text(swflksym, 16, 16, symbol_flock); - symsets_from_text(swbrdsym, 4, 2, symbol_bird); - symsets_from_text(swoxsym, 16, 16, symbol_ox); - symsets_from_text(swmscsym, 8, 8, symbol_missile); - symsets_from_text(swbstsym, 8, 8, symbol_burst); - symsets_from_text(swplnsym, 16, 16, symbol_plane); - symsets_from_text(swhitsym, 16, 16, symbol_plane_hit); - symsets_from_text(swwinsym, 16, 16, symbol_plane_win); - symsets_from_text(swmedalsym, 8, 12, symbol_medal); - symsets_from_text(swribbonsym, 8, 2, symbol_ribbon); - symsets_from_text(swhtrsym, 16, 16, symbol_target_hit); - symsets_from_text(swshtsym, 16, 16, symbol_shotwin); - symsets_from_text(swsplsym, 32, 32, symbol_birdsplat); + SYMSETS_FROM_TEXT(swbmbsym, 8, 8, symbol_bomb); + SYMSETS_FROM_TEXT(swtrgsym, 16, 16, symbol_targets); + SYMSETS_FROM_TEXT(swexpsym, 8, 8, symbol_debris); + SYMSETS_FROM_TEXT(swflksym, 16, 16, symbol_flock); + SYMSETS_FROM_TEXT(swbrdsym, 4, 2, symbol_bird); + SYMSETS_FROM_TEXT(swoxsym, 16, 16, symbol_ox); + SYMSETS_FROM_TEXT(swmscsym, 8, 8, symbol_missile); + SYMSETS_FROM_TEXT(swbstsym, 8, 8, symbol_burst); + SYMSETS_FROM_TEXT(swplnsym, 16, 16, symbol_plane); + SYMSETS_FROM_TEXT(swhitsym, 16, 16, symbol_plane_hit); + SYMSETS_FROM_TEXT(swwinsym, 16, 16, symbol_plane_win); + SYMSETS_FROM_TEXT(swmedalsym, 8, 12, symbol_medal); + SYMSETS_FROM_TEXT(swribbonsym, 8, 2, symbol_ribbon); + SYMSETS_FROM_TEXT(swhtrsym, 16, 16, symbol_target_hit); + SYMSETS_FROM_TEXT(swshtsym, 16, 16, symbol_shotwin); + SYMSETS_FROM_TEXT(swsplsym, 32, 32, symbol_birdsplat); } // diff --git a/src/swsymbol.h b/src/swsymbol.h index 9c25ea7..852a298 100644 --- a/src/swsymbol.h +++ b/src/swsymbol.h @@ -54,9 +54,9 @@ extern symset_t symbol_ribbon[6]; // swribbonsym extern sopsym_t symbol_pixel; -extern void symbol_generate(void); -extern void symset_from_text(symset_t *s, const char *text, int w, int h); -symset_t *lookup_symset(const char *name, int frame); +extern void GenerateSymbols(void); +extern void SymsetFromText(symset_t *s, const char *text, int w, int h); +symset_t *LookupSymset(const char *name, int frame); #endif diff --git a/src/tcpcomm.c b/src/tcpcomm.c index e312a07..7d35a6f 100644 --- a/src/tcpcomm.c +++ b/src/tcpcomm.c @@ -69,10 +69,10 @@ static void comminit(void) initialized = true; } -// poll_socket returns 1 if there appears to be new data ready on the given +// PollSocket returns 1 if there appears to be new data ready on the given // socket. It uses select() because this works everywhere, while every OS // seems to have their own unique way of setting a non-blocking socket. -static int poll_socket(int s) +static int PollSocket(int s) { fd_set in_fds, except_fds; struct timeval timeout = { 0, 1 }; // 1us = ~immediate @@ -201,7 +201,7 @@ void commlisten(void) error_exit("commlisten: user aborted connect"); } - if (!poll_socket(server_sock)) { + if (!PollSocket(server_sock)) { Timer_Sleep(50); continue; } @@ -236,7 +236,7 @@ int commin(void) return -1; } - if (!poll_socket(tcp_sock)) { + if (!PollSocket(tcp_sock)) { return -1; } @@ -297,4 +297,4 @@ bool isNetworkGame(void) #endif /* #ifdef TCPIP */ return false; -} \ No newline at end of file +}