23 #ifndef BAGEL_SPACEBAR_SRAF_COMPUTER_H 24 #define BAGEL_SPACEBAR_SRAF_COMPUTER_H 26 #include "bagel/boflib/gui/button.h" 27 #include "bagel/boflib/gui/list_box.h" 28 #include "bagel/boflib/gui/text_box.h" 29 #include "bagel/boflib/gui/dialog.h" 30 #include "bagel/boflib/file.h" 31 #include "bagel/baglib/storage_dev_win.h" 42 IRK4 = 0, YEEF8, QUOSH23
49 const char *_pSellerName;
53 PYLON3 = 0, DIPPIK10, VEBBIL18, GUNG14,
54 REYES24, GILD13, HEM20, DORK44, RAWLEY23,
55 JELLA37, SINJIN11, HUNDEY42, CHANDRA15, CLANG2,
56 MINMARTZN, MINMARTBA, MINMARTRG, MINMARTUT,
61 NORG72 = 0, PNURTH81, ZIG64, LENTIL24, VARGAS20, CHURG53, DURTEEN97
68 const char *_pBuyerName;
71 #define mOtherParty 0x0001 73 #define mSeller 0x0004 77 #define mNorg72 0x0008 78 #define mPnurth81 0x0010 80 #define mLentil24 0x0040 81 #define mVargas20 0x0080 82 #define mChurg53 0x0100 84 #define mStafferMale 0x0200 85 #define mStafferFemale 0x0400 91 int _nDispatchTime = 0;
92 int _nTeamCaptain = 0;
93 int _nMeetingTime = 0;
112 int createTextScreen(
CBofWindow *pParent =
nullptr);
113 void displayTextScreen();
116 void onClose()
override;
117 void onPaint(
CBofRect * pRect)
override;
121 #define NUM_MAIL_MESSAGES 8 122 #define NUM_MINERALS 14 123 #define NUM_STAFFERS 6 124 #define NUM_MAIN_ITEMS 11 125 #define NUM_SELLERS 3 126 #define NUM_BUYERS 20 127 #define NUM_OTHER_PARTYS 3 128 #define NUM_MUSICAL_SCORES 7 129 #define NUM_CODE_WORDS 10 130 #define NUM_SRAFCOMPBUTT 11 131 #define NUM_OFFERINGS 2 135 #define kOthersList 1 136 #define kSellersList 2 137 #define kBuyersList 3 138 #define kStaffersList 4 146 void onKeyHit(uint32 lKey, uint32 nRepCount)
override;
147 ErrorCode attach()
override;
148 ErrorCode detach()
override;
149 void onLButtonDown(uint32 nFlags,
CBofPoint *xPoint,
void * =
nullptr)
override;
150 void onLButtonUp(uint32 nFlags,
CBofPoint *xPoint,
void * =
nullptr)
override;
151 void onMainLoop()
override;
152 void onPaint(
CBofRect *pRect)
override;
154 void onBofListBox(
CBofObject *pListBox,
int nItemIndex)
override;
158 void alignAtColumn(
CBofString &sStr,
const char *szRightText,
int nAlignAt);
161 void deleteListBox();
163 ErrorCode createListBox();
167 void hideAllButtons();
169 void activateDealSummary();
170 void activateBuyerBids();
171 void activateDealBackground();
172 void activateSellerBios();
173 void activateOtherBios();
174 void activateStaffBios();
175 void activateDispatchTeam();
176 void activateCurrentEMail();
177 void activateAudioSettings();
178 void activateRoboButler();
179 void activateCheckTeams();
180 void activateCodeWords();
182 void deactivateMainScreen();
183 void activateMainScreen();
185 void initDealSummary();
186 void initBuyerBids();
187 void initDealBackground();
188 void initSellerBios();
189 void initOtherBios();
190 void initStaffBios();
191 void initDispatchTeam();
192 void initCurrentEMail();
193 void initAudioSettings();
194 void initRoboButler();
196 void onListMainScreen();
197 void onListDealSummary();
198 void onListBuyerBids();
199 void onListDealBackground();
200 void onListSellerBios();
201 void onListOtherBios();
202 void onListStaffBios();
203 void onListDispatchTeam();
204 void onListCurrentEMail();
205 void onListAudioSettings();
206 void onListRoboButler();
207 void onListCheckTeams();
208 void onListCodeWords();
210 void onButtonMainScreen(
CBofButton *pButton,
int nState);
211 void onButtonDealSummary(
CBofButton *pButton,
int nState);
212 void onButtonBuyerBids(
CBofButton *pButton,
int nState);
213 void onButtonDealBackground(
CBofButton *pButton,
int nState);
214 void onButtonSellerBios(
CBofButton *pButton,
int nState);
215 void onButtonOtherBios(
CBofButton *pButton,
int nState);
216 void onButtonStaffBios(
CBofButton *pButton,
int nState);
217 void onButtonDispatchTeam(
CBofButton *pButton,
int nState);
218 void onButtonCurrentEMail(
CBofButton *pButton,
int nState);
219 void onButtonAudioSettings(
CBofButton *pButton,
int nState);
220 void onButtonRoboButler(
CBofButton *pButton,
int nState);
221 void onButtonCheckTeams(
CBofButton *pButton,
int nState);
222 void onButtonCodeWords(
CBofButton *pButton,
int nState);
227 void recalcSellerSummaryList();
228 void recalcBuyerSummaryList();
229 void recalcDispatchList(
int);
231 bool onButtonSubmitOffer();
234 int getMeetMember(
int);
240 int getAdjustedIndex(
int,
int,
bool);
243 bool verifyDispatchTeam();
245 int calculateMeetingTime(
int nFlags);
246 bool reportMeetingStatus(
int);
252 void setMeetingResult(
int,
int,
bool);
254 int getTeamCaptain(
int nFlags);
255 int getTeamGender(
int nFlags);
259 void doOrderBeverage();
261 void doShowChowButtons();
265 static void setMainScreen();
270 void displayMessage(
const char *szMsg);
273 void incrementTurnCount();
280 void displayTurnCount(
int);
281 void onButtonFinished(
bool);
285 void saveSraffanVars();
286 void restoreSraffanVars();
290 SC_ON, SC_OFF, SC_DONE
294 SC_MAIN, SC_DEAL, SC_BIDS, SC_BACKGROUND_DATA,
295 SC_SELLER_BIOS, SC_OTHER_BIOS, SC_STAFF_BIOS,
296 SC_DISPATCH, SC_EMAIL, SC_AUDIO, SC_ORDER,
297 SC_CHECK_TEAMS, SC_CODE_WORDS
301 RGBCOLOR _cTextColor;
302 RGBCOLOR _cTextHiliteColor;
303 RGBCOLOR _cTextLineColor;
315 int _nListItemHeight;
324 static bool _bSwonzaEnlightened;
325 static int _nStartingTime;
329 static bool _bRandomAudio;
330 static int _nRandomTime;
332 static bool _bFailureNotified;
Definition: storage_dev_win.h:406
Definition: sraf_computer.h:45
Definition: sraf_computer.h:96
Definition: list_box.h:49
Definition: sraf_computer.h:142
Definition: text_box.h:34
Definition: sraf_computer.h:87
Definition: sraf_computer.h:64
Definition: sraf_computer.h:36