13 #ifndef SCUMM_INSANE_REBEL2_PSX_UI_H 14 #define SCUMM_INSANE_REBEL2_PSX_UI_H 16 #include "common/random.h" 17 #include "common/rect.h" 19 #include "graphics/surface.h" 21 #include "scumm/insane/rebel2/psx/psx.h" 34 void clear() { _textures.
clear(); }
37 uint16 width, uint16 height);
38 bool has(
const char *name)
const {
return find(name) !=
nullptr; }
43 BlendMode blend = kBlendOpaque)
const;
45 int x,
int y,
int brightness = 0x80)
const;
46 int measureText(
const char *text)
const;
48 void drawHeadline(
Graphics::Surface &surface,
const char *text,
int x,
int y)
const;
49 int measureHeadline(
const char *text)
const;
52 const RA2PSXTexture *find(
const char *name)
const;
54 const Common::Rect &source, byte r, byte g, byte b)
const;
64 bool load(
const RA2PSXArchive &archive,
int part,
int difficulty,
68 void update(
int aimX,
int aimY);
72 int shoot(
int aimX,
int aimY);
73 bool outOfCover()
const {
return _out && !_moving; }
75 bool exposed()
const {
return _out || _moving; }
76 bool busy()
const {
return _moving; }
77 bool cleared()
const {
return _clearTicks >= kRA2PSXLevel2ClearTicks; }
78 int kills()
const {
return _kills; }
79 int misses()
const {
return _misses; }
81 const RA2PSXLevel2PartInfo &info()
const;
85 int left,
int top)
const;
90 void setScrollTarget(
const int16 target[2][2]);
91 int aimFrame(
int aimX,
int aimY)
const;
93 int coverFrames()
const;
95 void startActor(RA2PSXLevel2Actor &actor,
int state,
int animation);
96 const RA2PSXPlayFrame *actorFrame(
const RA2PSXLevel2Actor &actor)
const;
97 void advanceActor(RA2PSXLevel2Actor &actor);
100 void projectShot(
const RA2PSXLevel2Shot &shot,
int step,
int &x,
int &y)
const;
114 int _scrollTarget[2][2];
115 int _scrollStep[2][2];
116 int _scrollHold[2][2];
118 RA2PSXLevel2Actor _troopers[kRA2PSXLevel2TrooperCount];
119 RA2PSXLevel2Actor _bolts[kRA2PSXLevel2TrooperCount];
120 RA2PSXLevel2Shot _shots[kRA2PSXLevel2ShotCount];
131 int r,
int g,
int b);
132 void drawRA2PSXGouraudLine(
Graphics::Surface &surface,
int x0,
int y0,
int x1,
int y1,
133 const byte *from,
const byte *to);
141 int frame,
int xOffset,
int yOffset)
const;
149 bool load(
const RA2PSXArchive &archive);
186 static bool isItemAvailable(
int item);
191 const RA2PSXSettings &settings)
const;
193 const RA2PSXSettings &settings)
const;
196 const char *question,
const char *detail,
int selection)
const;
200 bool centered,
int state)
const;
220 int scroll,
int selection,
int unlocked)
const;
221 static int rowY(
int chapter,
int scroll);
228 bool selected,
bool unlocked)
const;
234 enum { kRA2PSXHitFlashFrames = 5 };
240 kRA2PSXShieldFull = 0x1000,
241 kRA2PSXLowShield = 0x501
246 bool load(
const RA2PSXArchive &archive);
251 int driftX = 0,
int driftY = 0)
const;
253 void drawHUD(
Graphics::Surface &surface,
int score,
int lives,
int shield,
int frame)
const;
256 void drawShield(
Graphics::Surface &surface,
int shield,
int xOffset,
int yOffset)
const;
void clear()
Definition: array.h:321