#include "Buzz_inc.h"
#include "options.h"
#include "utils.h"
#include "logging.h"
#include "externs.h"
#include <ctype.h>
Go to the source code of this file.
Defines | |
#define | BSOUND 1 |
#define | HOST 0 |
#define | MODEM_ERROR 4 |
#define | SLAVE 1 |
Functions | |
void | Box (int x1, int y1, int x2, int y2) |
int | CheckIfMissionGo (char plr, char launchIdx) |
utility fn for AI to see if it should scrub the mission | |
void | DestroyPad (char plr, char pad, int cost, char mode) |
Destroy Pad and Reset any Crews affected. | |
void | DispBig (int x, int y, char *txt, char mode, char te) |
void | DispChr (char chr) |
void | DispMB (int x, int y, int val) |
void | DispNum (int xx, int yy, int num) |
void | DNArrow (int x1, int y1) |
void | DockingKludge (void) |
void | DrawLED (int x, int y, char st) |
void | DV (GXHEADER *obj) |
void | Flag (int x, int y, char plr) |
void | FlagSm (char plr, int xm, int ym) |
void | FreePadMen (char plr, struct MissionType *XMis) |
void | GetMisType (char mcode) |
Opens "MISSION.DAT" to find mission data. | |
void | GetMouse (void) |
void | GetMouse_fast (void) |
void | Gl (int x1, int x2, int y, char t) |
void | GradRect (int x1, int y1, int x2, int y2, char plr) |
void | GV (GXHEADER *obj, int w, int h) |
void | InBox (int x1, int y1, int x2, int y2) |
void | InitData (void) |
void | IOBox (int x1, int y1, int x2, int y2) |
LOG_DEFAULT_CATEGORY (LOG_ROOT_CAT) | |
void | LTArrow (int x1, int y1) |
int | main (int argc, char *argv[]) |
void | MainLoop (void) |
int | MisRandom (void) |
void | OutBox (int x1, int y1, int x2, int y2) |
void | PauseMouse (void) |
void | PrintAt (int x, int y, char *s) |
void | PrintAtKey (int x, int y, char *s, char val) |
void | RectFill (int x1, int y1, int x2, int y2, char col) |
void | RTArrow (int x1, int y1) |
void | ShBox (int x1, int y1, int x2, int y2) |
void | UPArrow (int x1, int y1) |
void | VerifyCrews (char plr) |
void | VerifySF (char plr) |
void | WaitForKeyOrMouseDown (void) |
void | WaitForMouseUp (void) |
Variables | |
char | AI [2] = {0,0} |
unsigned char | AL_CALL |
char | BIG |
1 for fullscreen mission playback, 0 otherwise | |
char * | buffer |
unsigned char | BUTLOAD |
int | cdROM |
struct cdtable * | cdt |
struct Players * | Data |
char | df |
unsigned char | FADE |
int | FadeVal |
int | fOFF = -1 |
unsigned char | HARD1 |
int | hDISK |
char | IDLE [2] |
char | IDT [5] |
char | IKEY [5] |
int | key |
ui16 | LetHand |
unsigned char | LOAD |
char | MAIL = -1 |
struct ManPool * | Men |
struct mStr | Mis |
int | mousebuttons |
struct Prest_Upd | MP [3] |
char | Name [20] |
char * | oldpal |
int | oldx |
int | oldy |
char | Option = -1 |
struct order | Order [6] |
long | PalOff |
char | plr [NUM_PLAYERS] |
char | pNeg [NUM_PLAYERS][MAX_MISSIONS] |
unsigned char | QUIT |
char * | S_Name [] |
int | SEG = 15 |
HTIMER | server |
unsigned char | UNIT1 |
GXHEADER | vhptr |
GXHEADER | vhptr2 |
int | x |
unsigned char | XMAS |
long | xMODE |
int | y |
void Box | ( | int | x1, | |
int | y1, | |||
int | x2, | |||
int | y2 | |||
) |
Definition at line 850 of file main.c.
Referenced by DrawBudget(), DrawNews(), DrawPastExp(), DrawTopNewsBox(), IOBox(), and NFrame().
int CheckIfMissionGo | ( | char | plr, | |
char | launchIdx | |||
) |
utility fn for AI to see if it should scrub the mission
Rules are:
plr | Playerdata | |
launchIdx | ID of the launch |
Definition at line 275 of file main.c.
Referenced by MainLoop().
void DestroyPad | ( | char | plr, | |
char | pad, | |||
int | cost, | |||
char | mode | |||
) |
Destroy Pad and Reset any Crews affected.
cost | amount of MB to pay for repairs | |
pad | number of the launch facility destroyed | |
plr | Player data | |
mode | 0 if future mission, 1 is current mission |
Definition at line 568 of file main.c.
Referenced by FailEval().
void DispBig | ( | int | x, | |
int | y, | |||
char * | txt, | |||
char | mode, | |||
char | te | |||
) |
Definition at line 704 of file main.c.
Referenced by AI_Begin(), BChoice(), CrewProb(), DamProb(), DispVAB(), DrawAstSel(), DrawBre(), DrawBudget(), DrawFuture(), DrawHardef(), DrawHPurc(), DrawIStat(), DrawLimbo(), DrawMisHist(), DrawPrefs(), DrawProgs(), DrawRD(), DrawReview(), DrawRush(), DrawStatistics(), DrawTrain(), DrawViewing(), EditAst(), EndGame(), FailureMode(), FakeWin(), Help(), Hospital(), LMBld(), LMDraw(), MChoice(), MisRev(), News(), NextTurn(), PadDraw(), PlayFirst(), Programs(), RankMe(), Records(), Request(), RequestX(), SatDraw(), ShowAstrosHist(), ShowHard(), ShowPrest(), ShowSpHist(), and SpecialEnd().
void DispChr | ( | char | chr | ) |
Definition at line 937 of file main.c.
Referenced by BackIntel(), Bd(), DispNum(), DrawBudget(), DrawNText(), DrawRevText(), DrawVText(), FailureMode(), FutureCheck(), MisReq(), MissionName(), Prefs(), PrintAt(), PrintAtKey(), PrintHist(), PrintOne(), SetRush(), and ShowUnit().
void DispMB | ( | int | x, | |
int | y, | |||
int | val | |||
) |
Definition at line 767 of file main.c.
Referenced by Admin(), DrawBudget(), DrawHPurc(), DrawRD(), DrawSpaceport(), Intel(), Museum(), and ShowUnit().
void DispNum | ( | int | xx, | |
int | yy, | |||
int | num | |||
) |
Definition at line 735 of file main.c.
Referenced by Admin(), AI_Begin(), AstLevel(), AstStats(), BackIntel(), BarSkill(), ChangeStat(), ClearRecord(), DispEight(), DispEight2(), DisplAst(), DisplAstData(), DispMB(), DispWts(), DPrest(), Draw_Mis_Stats(), DrawAstCheck(), DrawAstSel(), DrawBudget(), DrawHard(), DrawHardef(), DrawIStat(), DrawPastExp(), DrawProgs(), DrawRank(), DrawReview(), DrawSpaceport(), DrawStats(), DrawViewing(), Drec(), EndGame(), FailureMode(), FakeWin(), FileText(), First(), FutAstList(), FutureCheck(), GetMinus(), HInfo(), IInfo(), Intel(), LimboText(), LMBld(), MisAnn(), MisOrd(), Missions(), Moon(), Museum(), NextTurn(), OnHand(), PadDraw(), PInfo(), PlanText(), Programs(), RDButTxt(), Records(), RetFile(), SatText(), Second(), SetRush(), ShowRkt(), ShowUnit(), ShowVA(), and TrainText().
void DNArrow | ( | int | x1, | |
int | y1 | |||
) |
Definition at line 815 of file main.c.
Referenced by DrawAstSel(), DrawBottomNewsBox(), DrawBre(), DrawFuture(), DrawLimbo(), DrawNews(), DrawProgs(), DrawTrain(), DrawViewing(), EditAst(), FileAccess(), Help(), Hospital(), Records(), and ShowPrest().
Definition at line 597 of file main.c.
Referenced by AstFaces(), AstLevel(), BadFileType(), BChoice(), BigHardMe(), BudPict(), CloseAnim(), Del_RD_BUT(), DispBaby(), DispIt(), Display_ARROW(), DispRck(), DispVA(), DoPack(), DrawSpaceport(), DrawStatistics(), EndPict(), Future(), GetBlockName(), GetMse(), HardCrewAssign(), HDispIt(), Help(), HModel(), LMove(), LMPict(), Load_LenFlag(), LoserPict(), MChoice(), MisReq(), Moon(), NewEnd(), PadPict(), PatchMe(), PlaceEquip(), PortPlace(), Prefs(), PresPict(), Request(), RequestX(), SatDraw(), ShowAstrosHist(), SmHardMe(), SMove(), SpotCrap(), TopSecret(), and WaveFlagDel().
void Flag | ( | int | x, | |
int | y, | |||
char | plr | |||
) |
Definition at line 903 of file main.c.
Referenced by DamProb(), DrawBudget(), DrawStatistics(), and MisAnn().
void FlagSm | ( | char | plr, | |
int | xm, | |||
int | ym | |||
) |
Definition at line 868 of file main.c.
Referenced by DispVAB(), DPrest(), DrawAstCheck(), DrawAstSel(), DrawBre(), DrawFuture(), DrawHardef(), DrawHPurc(), DrawIStat(), DrawLimbo(), DrawProgs(), DrawRank(), DrawRD(), DrawReview(), DrawRush(), DrawTrain(), DrawViewing(), Drec(), EditAst(), EndGame(), FailureMode(), FakeWin(), Hospital(), LMDraw(), MisOrd(), MisRev(), Moon(), PadDraw(), SatDraw(), ShowAstrosHist(), ShowSpHist(), and SpecialEnd().
void FreePadMen | ( | char | plr, | |
struct MissionType * | XMis | |||
) |
void GetMisType | ( | char | mcode | ) |
Opens "MISSION.DAT" to find mission data.
mcode | Code of the mission - works as index for the file |
Definition at line 1071 of file main.c.
Referenced by AIFuture(), AIVabCheck(), AllotPrest(), BuildVAB(), DisplAstData(), DispVAB(), Draw_Mis_Stats(), DrawHard(), DrawRush(), DrawViewing(), FutureCheck(), HardRequest(), Master(), MisAnn(), MissionCodes(), MissionName(), MissionSetup(), NewAI(), REvent(), Rush(), Scheduler(), SecondHard(), U_AllotPrest(), and XSpec().
Definition at line 604 of file main.c.
Referenced by AsnCrew(), AstLevel(), AstSel(), Bre(), Budget(), Burst(), ChangeStat(), Credits(), CrewProb(), DamProb(), Draw_Mis_Stats(), EditAst(), EndGame(), FailureMode(), FakeWin(), FileAccess(), FutBad(), Future(), FutureCheck(), HardRequest(), Help(), Hospital(), HPurc(), IStat(), Limbo(), LMBld(), MainLoop(), MChoice(), MisAnn(), MisReq(), Moon(), NewEnd(), PauseMouse(), Prefs(), Programs(), RankMe(), RD(), Records(), Request(), RequestX(), Review(), Rush(), SatBld(), SecondHard(), ShowAstrosHist(), ShowHard(), ShowPad(), ShowPrest(), ShowSpHist(), SpecialEnd(), Stat(), Train(), VAB(), Viewing(), WaitForKeyOrMouseDown(), and WaitForMouseUp().
void GradRect | ( | int | x1, | |
int | y1, | |||
int | x2, | |||
int | y2, | |||
char | plr | |||
) |
Definition at line 856 of file main.c.
Referenced by DisplAst(), DrawBudget(), DrawHardef(), DrawIStat(), DrawReview(), HInfo(), IInfo(), PInfo(), and ShowHard().
Definition at line 592 of file main.c.
Referenced by AstFaces(), AstLevel(), BadFileType(), BChoice(), BigHardMe(), BudPict(), DispBaby(), DispIt(), Display_ARROW(), DispRck(), DispVA(), DoPack(), DrawSpaceport(), DrawStatistics(), EndPict(), Future(), GetBlockName(), GetMse(), HardCrewAssign(), HDispIt(), Help(), HModel(), LMove(), LMPict(), Load_LenFlag(), Load_RD_BUT(), LoserPict(), MChoice(), MisReq(), Moon(), NewEnd(), OpenAnim(), OpenEmUp(), PadPict(), PatchMe(), PlaceEquip(), PortPlace(), Prefs(), PresPict(), Request(), RequestX(), SatDraw(), ShowAstrosHist(), SmHardMe(), SMove(), SpotCrap(), TopSecret(), and WaveFlagSetup().
void InBox | ( | int | x1, | |
int | y1, | |||
int | x2, | |||
int | y2 | |||
) |
Definition at line 822 of file main.c.
Referenced by AsnCrew(), AstLevel(), AstSel(), Bad(), BadFileType(), BButs(), BChoice(), Bre(), Budget(), ChangeStat(), CrewProb(), DamProb(), DispVAB(), Draw_Mis_Stats(), Draw_NewEnd(), DrawAstCheck(), DrawAstSel(), DrawBottomNewsBox(), DrawBre(), DrawBudget(), DrawFuture(), DrawHard(), DrawHardef(), DrawHPurc(), DrawIStat(), DrawLimbo(), DrawNews(), DrawPastExp(), DrawPrefs(), DrawProgs(), DrawRank(), DrawRD(), DrawReview(), DrawRush(), DrawStatistics(), DrawTopNewsBox(), DrawTrain(), DrawViewing(), Drec(), EditAst(), EndGame(), FailureMode(), FakeWin(), FileAccess(), Flts(), FutBad(), Future(), FutureCheck(), GetBlockName(), HardRequest(), Help(), Hospital(), HPurc(), InRFBox(), IOBox(), IStat(), Limbo(), LMBld(), LMDraw(), ManSel(), MChoice(), MisAnn(), MisOrd(), MisReq(), MisRev(), Moon(), NewEnd(), News(), NFrame(), PadDraw(), PlayFirst(), Prefs(), Programs(), QUnit(), RD(), ReButs(), Records(), Request(), RequestX(), Review(), Rush(), SatBld(), SatDraw(), SecondHard(), SetRush(), ShowAstrosHist(), ShowHard(), ShowPad(), ShowPrest(), ShowSpHist(), SpecialEnd(), Stat(), Train(), VAB(), and Viewing().
void IOBox | ( | int | x1, | |
int | y1, | |||
int | x2, | |||
int | y2 | |||
) |
Definition at line 836 of file main.c.
Referenced by AsnCrew(), ChangeStat(), CrewProb(), DamProb(), DispVAB(), Draw_Mis_Stats(), Draw_NewEnd(), DrawAstCheck(), DrawAstSel(), DrawBre(), DrawBudget(), DrawFuture(), DrawHard(), DrawHardef(), DrawHPurc(), DrawIStat(), DrawLimbo(), DrawNews(), DrawPrefs(), DrawProgs(), DrawRD(), DrawReview(), DrawRush(), DrawStatistics(), DrawTopNewsBox(), DrawTrain(), DrawViewing(), EditAst(), EndGame(), FailureMode(), FakeWin(), FileAccess(), FutBad(), FutureCheck(), HardRequest(), Help(), Hospital(), LMDraw(), MisAnn(), MisReq(), MisRev(), Moon(), News(), PadDraw(), Programs(), Records(), Request(), RequestX(), SatDraw(), SecondHard(), ShowPrest(), ShowSpHist(), and SpecialEnd().
LOG_DEFAULT_CATEGORY | ( | LOG_ROOT_CAT | ) |
void LTArrow | ( | int | x1, | |
int | y1 | |||
) |
int MisRandom | ( | void | ) |
void OutBox | ( | int | x1, | |
int | y1, | |||
int | x2, | |||
int | y2 | |||
) |
Definition at line 829 of file main.c.
Referenced by AsnCrew(), AstSel(), BButs(), Bre(), Budget(), ChangeStat(), Draw_Mis_Stats(), DrawFuture(), DrawHPurc(), DrawLimbo(), DrawNews(), DrawPrefs(), DrawRD(), DrawRush(), DrawStatistics(), DrawTopNewsBox(), EditAst(), EndGame(), FailureMode(), FakeWin(), FileAccess(), Flts(), Future(), Help(), Hospital(), HPurc(), IOBox(), IStat(), Limbo(), ManSel(), MisAnn(), NewEnd(), News(), NFrame(), Prefs(), Programs(), QUnit(), RD(), ReButs(), Records(), ResetRush(), Rush(), SatBld(), ShBox(), ShowAstrosHist(), ShowHard(), ShowPad(), ShowPrest(), ShowSpHist(), Stat(), Train(), VAB(), and Viewing().
void PrintAt | ( | int | x, | |
int | y, | |||
char * | s | |||
) |
Definition at line 672 of file main.c.
Referenced by Admin(), AI_Begin(), AsnCrew(), AstLevel(), AstNames(), AstStats(), BackIntel(), Bad(), BadFileType(), BarSkill(), ChangeStat(), Credits(), CrewProb(), DamProb(), DispEight(), DispEight2(), DispHelp(), DisplAst(), DisplAstData(), DispLeft(), DispLoc(), DispMB(), DispNum(), DispVAB(), DispWts(), DPrest(), Draw_Mis_Stats(), Draw_NewEnd(), DrawAstCheck(), DrawAstSel(), DrawBre(), DrawBudget(), DrawFiles(), DrawFuture(), DrawHard(), DrawHardef(), DrawHPurc(), DrawIStat(), DrawLimbo(), DrawMisHist(), DrawNews(), DrawPastExp(), DrawPosition(), DrawPrefs(), DrawProgs(), DrawRank(), DrawRD(), DrawReview(), DrawRush(), DrawSpaceport(), DrawStatistics(), DrawStats(), DrawTopNewsBox(), DrawTrain(), DrawViewing(), Drec(), DurPri(), EditAst(), EndGame(), FailureMode(), FakeWin(), FileAccess(), FileText(), First(), FltsTxt(), FutAstList(), FutBad(), FutFltsTxt(), FutSt2(), FutureCheck(), GetBlockName(), GetMinus(), GuyDisp(), Help(), HModel(), Hospital(), IInfo(), Intel(), Limbo(), LimboText(), LMBld(), LMDraw(), MisAnn(), MisCheck(), MisOrd(), MisReq(), MisRev(), Missions(), Moon(), Museum(), News(), NextTurn(), OnHand(), PadDraw(), PlanText(), PlayFirst(), PortText(), Prefs(), PrintAtKey(), Programs(), RankMe(), RDButTxt(), Records(), Request(), RequestX(), RetFile(), Rush(), SatDraw(), SatText(), Second(), SetRush(), ShowAstrosHist(), ShowHard(), ShowPrest(), ShowRkt(), ShowSpHist(), ShowUnit(), ShowVA(), Special(), SpecialEnd(), SRPrintAt(), TrainText(), and XSpec().
void PrintAtKey | ( | int | x, | |
int | y, | |||
char * | s, | |||
char | val | |||
) |
void RectFill | ( | int | x1, | |
int | y1, | |||
int | x2, | |||
int | y2, | |||
char | col | |||
) |
Definition at line 843 of file main.c.
Referenced by Admin(), AsnCrew(), AstLevel(), AstNames(), AstSel(), BadFileType(), Bd(), Bre(), ChangeStat(), Clear(), ClearIt(), ClearRecord(), ClearRX(), CrewProb(), DispEight(), DispEight2(), DispHelp(), DisplAst(), DisplAstData(), DispRck(), DispVA(), DispVAB(), DispWts(), DPrest(), Draw_Mis_Stats(), DrawAstCheck(), DrawAstSel(), DrawBottomNewsBox(), DrawBre(), DrawBudget(), DrawFuture(), DrawHard(), DrawHardef(), DrawHPurc(), DrawLimbo(), DrawMisHist(), DrawNews(), DrawNText(), DrawPastExp(), DrawPrefs(), DrawProgs(), DrawRD(), DrawReview(), DrawStats(), DrawTopNewsBox(), DrawTrain(), DrawViewing(), DrawVText(), Drec(), EditAst(), EndGame(), FakeWin(), FileAccess(), FileText(), Flag(), FlagSm(), FutAstList(), FutSt2(), FutureCheck(), GetBlockName(), GetMinus(), GradRect(), GradRect2(), Help(), HInfo(), HModel(), Hospital(), IInfo(), InRFBox(), Intel(), Limbo(), LimboText(), LMDraw(), MCGraph(), MisCheck(), Missions(), Moon(), Museum(), NewAstList(), NewEnd(), News(), PadDraw(), PInfo(), PlaceRX(), PlanText(), PlayFirst(), PortText(), Prefs(), Programs(), RankMe(), RDButTxt(), Records(), RetFile(), Rush(), SatDraw(), SetRush(), ShBox(), ShowAstrosHist(), ShowHard(), ShowPrest(), ShowRkt(), ShowUnit(), ShowVA(), SpecialEnd(), Train(), and TrainText().
void RTArrow | ( | int | x1, | |
int | y1 | |||
) |
void ShBox | ( | int | x1, | |
int | y1, | |||
int | x2, | |||
int | y2 | |||
) |
Definition at line 787 of file main.c.
Referenced by AI_Begin(), AsnCrew(), AstLevel(), AstSel(), Bad(), BadFileType(), BCDraw(), ClearRecord(), CrewProb(), DamProb(), DispVAB(), Draw_Mis_Stats(), Draw_NewEnd(), DrawAstCheck(), DrawAstSel(), DrawBottomNewsBox(), DrawBre(), DrawBudget(), DrawFuture(), DrawHard(), DrawHardef(), DrawHPurc(), DrawIStat(), DrawLimbo(), DrawNews(), DrawPrefs(), DrawProgs(), DrawRD(), DrawReview(), DrawRush(), DrawSpaceport(), DrawStatistics(), DrawTopNewsBox(), DrawTrain(), DrawViewing(), Drec(), EditAst(), EndGame(), FailureMode(), FakeWin(), FileAccess(), FutBad(), Future(), FutureCheck(), GetBlockName(), Help(), Hospital(), Limbo(), LMBld(), LMDraw(), MChoice(), MisAnn(), MisOrd(), MisReq(), MisRev(), Moon(), NewEnd(), News(), NextTurn(), PadDraw(), PlayFirst(), Programs(), RankMe(), Records(), Request(), RequestX(), SatDraw(), ShowAstrosHist(), ShowPrest(), SpecialEnd(), and Train().
void UPArrow | ( | int | x1, | |
int | y1 | |||
) |
Definition at line 794 of file main.c.
Referenced by DrawAstSel(), DrawBottomNewsBox(), DrawBre(), DrawFuture(), DrawLimbo(), DrawNews(), DrawProgs(), DrawTrain(), DrawViewing(), EditAst(), FileAccess(), Help(), Hospital(), Records(), and ShowPrest().
void VerifyCrews | ( | char | plr | ) |
void VerifySF | ( | char | plr | ) |
Definition at line 646 of file main.c.
Referenced by Admin(), AsnCrew(), AstLevel(), AstSel(), BChoice(), Bre(), Budget(), ChangeStat(), CrewProb(), DamProb(), Draw_Mis_Stats(), EditAst(), EndGame(), FailureMode(), FakeWin(), FileAccess(), FutBad(), Future(), FutureCheck(), HardRequest(), Help(), Hospital(), HPurc(), IStat(), Limbo(), LMBld(), MChoice(), MisAnn(), MisOrd(), Moon(), NewEnd(), News(), NextTurn(), Prefs(), Programs(), RankMe(), RD(), Records(), Replay(), RequestX(), Review(), Rush(), SatBld(), SecondHard(), ShowAstrosHist(), ShowHard(), ShowPad(), ShowPrest(), ShowSpHist(), SpecialEnd(), Stat(), Train(), VAB(), and Viewing().
unsigned char AL_CALL |
char BIG |
1 for fullscreen mission playback, 0 otherwise
Definition at line 61 of file main.c.
Referenced by Launch(), MisAnn(), MisCheck(), and PlaySequence().
unsigned char BUTLOAD |
char IDLE[2] |
int mousebuttons |
int oldx |
int oldy |
char pNeg[NUM_PLAYERS][MAX_MISSIONS] |