26 #ifndef SAGA2_INTRFACE_H 27 #define SAGA2_INTRFACE_H 29 #include "saga2/button.h" 30 #include "saga2/modal.h" 31 #include "saga2/player.h" 46 void SetupUserControls();
47 void CleanupButtonImages();
48 void CleanupUserControls();
49 void SetupContainerViews(ContainerWindow *viewWindow);
50 void **loadButtonRes(hResContext *con, int16 resID, int16 numRes);
51 void **loadButtonRes(hResContext *con, int16 resID, int16 numRes,
char a,
char b,
char c);
52 void **loadImageRes(hResContext *con, int16 resID, int16 numRes,
char a,
char b,
char c);
53 void unloadImageRes(
void **images, int16 numRes);
57 uint16 getPlayerActorWeightRatio(PlayerActor *player, uint16 &maxRatio,
bool bReturnMaxRatio);
58 uint16 getPlayerActorBulkRatio(PlayerActor *player, uint16 &maxRatio,
bool bReturnMaxRatio);
59 template<
class T >
inline T GetRatio(T curUnits, T maxUnits, T ratio);
60 uint16 getBulkRatio(GameObject *obj, uint16 &maxRatio,
bool bReturnMaxRatio);
61 uint16 getWeightRatio(GameObject *obj, uint16 &maxRatio,
bool bReturnMaxRatio);
62 void GetTotalMassBulk(GameObject *obj, uint16 &totalMass, uint16 &totalBulk);
65 void setIndivBtns(uint16 broNum);
67 void setCenterBtns(uint16 whichBrother);
68 void setControlPanelsToIndividualMode(uint16 whichBrother);
69 void setControlPanelsToTrioMode();
70 void setCenterBrother(uint16 whichBrother);
71 void toggleBrotherBanding(uint16 whichBrother);
72 uint16 translatePanID(uint16 ID);
73 void updateBrotherPortrait(uint16 brotherID, int16 pType);
74 void updateBrotherAggressionButton(uint16 brotherID,
bool aggressive);
75 void updateBrotherBandingButton(uint16 brotherID,
bool banded);
76 void updateBrotherRadioButtons(uint16 brotherID);
77 void updateReadyContainers();
78 void updateBrotherArmor(uint16 brotherID);
80 void updateAllUserControls();
81 void updateBrotherControls(PlayerActorID brotherID);
82 void enableUserControls();
83 void disableUserControls();
85 bool isBrotherDead(PlayerActorID brotherID);
88 void updateIndicators();
93 void cleanupUIState();
96 void StatusMsg(
const char *msg, ...);
99 const uint32 faceGroupID =
MKTAG(
'F',
'A',
'C',
'E');
100 const uint32 mentGroupID =
MKTAG(
'C',
'O',
'N',
'T');
111 extern uint16 indivBrother;
151 const int16 kAggressResNum = 0;
152 const int16 kJumpResNum = 6;
153 const int16 kCenterResNum = 4;
154 const int16 kBandingResNum = 2;
155 const int16 kMenConBtnResNum = 18;
156 const int16 kMassBulkResNum = 0;
157 const int16 kPieIndResNum = 0;
158 const int16 kJulBtnResNum = 22;
159 const int16 kPhiBtnResNum = 24;
160 const int16 kKevBtnResNum = 26;
161 const int16 kOptBtnResNum = 20;
166 const int16 kNumBtnImages = 2;
169 const uint16 kNumPortImages = 8;
172 const uint16 kNumPieIndImages = 16;
190 char _lineBuf[kBufSize];
203 void invalidate(
Rect16 *unused =
nullptr);
206 virtual void drawClipped(
gPort &,
235 static uint8 bump(uint8 i) {
241 int16,
textPallete, int32, int16, AppFunc *cmd = NULL);
244 void setLine(
char *, uint32 frameTime);
245 void experationCheck();
268 PortraitType _currentState[kNumViews + 1];
274 void setPortrait(uint16);
280 void ORset(uint16, PortraitType type);
281 void set(uint16 brotherID, PortraitType type);
282 PortraitType getCurrentState(uint16 brotherID) {
283 return _currentState[brotherID];
285 void getStateString(
char buf[], int8 size, uint16 brotherID);
298 static bool _bRedraw;
303 kBackImageXSize = 88,
304 kBackImageYSize = 43,
309 kBulkPieXOffset = 53,
339 void invalidate(
Rect16 *unused =
nullptr) {
340 _pieMass->invalidate();
341 _pieBulk->invalidate();
347 uint16 getMassPieDiv() {
348 return _pieMass->getMax();
350 uint16 getBulkPieDiv() {
351 return _pieBulk->getMax();
354 void setMassPie(uint16 val) {
355 _pieMass->setCurrent(val);
357 void setBulkPie(uint16 val) {
358 _pieBulk->setCurrent(val);
361 static void update();
414 kCenterX = kAreaX + kAreaXSize / 2,
415 kCenterY = kAreaY + kAreaYSize / 2,
418 kWellX = (kAreaXSize / 2 - kWellXSize / 2) + 1,
419 kWellY = kAreaYSize / 2 - kWellYSize / 2
424 enum manaEndCoordsBase {
428 kManaUpperLeftX = 16 + kManaXOffset,
429 kManaUpperLeftY = 45 + kManaYOffset,
430 kManaUpperMidX = 70 + kManaXOffset,
431 kManaUpperMidY = 13 + kManaYOffset,
432 kManaUpperRightX = 122 + kManaXOffset,
433 kManaUpperRightY = 45 + kManaYOffset,
434 kManaLowerLeftX = 16 + kManaXOffset,
435 kManaLowerLeftY = 106 + kManaYOffset,
436 kManaLowerMidX = 70 + kManaXOffset,
437 kManaLowerMidY = 135 + kManaYOffset,
438 kManaLowerRightX = 122 + kManaXOffset,
439 kManaLowerRightY = 106 + kManaYOffset
443 kManaRedEndX = kManaUpperLeftX,
444 kManaRedEndY = kManaUpperLeftY,
445 kManaOrangeEndX = kManaUpperMidX,
446 kManaOrangeEndY = kManaUpperMidY,
447 kManaYellowEndX = kManaUpperRightX,
448 kManaYellowEndY = kManaUpperRightY,
449 kManaGreenEndX = kManaLowerLeftX,
450 kManaGreenEndY = kManaLowerLeftY,
451 kManaBlueEndX = kManaLowerMidX,
452 kManaBlueEndY = kManaLowerMidY,
453 kManaVioletEndX = kManaLowerRightX,
454 kManaVioletEndY = kManaLowerRightY,
455 kManaNumXYCoords = 12,
456 kManaNumManaTypes = kManaNumXYCoords / 2
461 kManaStartOffset = 12
467 kManaNumManaRegions = kManaNumManaTypes
476 kResNumManaColors = 13
484 uint8 starImageIndex;
485 uint8 ringImageIndex;
509 Point16 _starRingEndPos[kManaNumManaTypes];
511 Point16 _starSizes[kResNumStars];
512 Point16 _ringSizes[kResNumRings];
515 int32 _currentMana[kManaNumManaTypes], _currentBaseMana[kManaNumManaTypes];
523 void getManaLineInfo(uint16 index, int16 manaAmount, int16 baseManaAmount,
manaLineInfo *info);
541 Rect16 getManaRegionRect(int8 region);
542 int getNumManaRegions() {
543 return kManaNumManaRegions;
558 static const char *_hintText;
561 kHealthStarFrameResNum = 14,
562 kHealthStarFrameNum = 1,
563 kHealthStarStart = 0,
565 kHealthStarInitial = 0,
566 kHealthStarLevels = 24,
567 kHealthNumControls = kNumViews
571 kHealthStarXPos = 572,
572 kHealthStarYPos = 21,
573 kHealthStarXSize = 32,
574 kHealthStarYSize = 32,
575 kHealthStarYOffset = 150,
576 kHealthFrameXPos = 571,
577 kHealthFrameYPos = 20,
578 kHealthFrameXSize = 32,
579 kHealthFrameYSize = 32
593 void *_starFrameImag;
595 void updateStar(
GfxCompImage *starCtl, int32 bro, int32 baseVitality, int32 curVitality);
599 int16 _imageIndexMemory[4];
Definition: intrface.h:555
Definition: savefile.h:54
Definition: intrface.h:365
Definition: intrface.h:293
Definition: intrface.h:481
Definition: intrface.h:266
Definition: intrface.h:220
Definition: intrface.h:136
Definition: intrface.h:127
Definition: objects.h:118
#define MKTAG(a0, a1, a2, a3)
Definition: endian.h:188
Definition: intrface.h:182