CHEWY: Remove the CursorStatus flag

This commit is contained in:
Filippos Karapetis 2022-07-01 19:32:52 +03:00
parent 72ada40051
commit 25a1e9b277
6 changed files with 7 additions and 7 deletions

View File

@ -97,6 +97,10 @@ void Cursor::hideCursor() {
CursorMan.showMouse(false);
}
bool Cursor::isCursorVisible() const {
return CursorMan.isVisible();
}
void Cursor::setAnimation(uint8 start, uint8 end, int16 delay) {
_aniCount = _animStart = start;
_animEnd = end;

View File

@ -41,6 +41,7 @@ public:
void updateCursor();
void showCursor();
void hideCursor();
bool isCursorVisible() const;
void setAnimation(uint8 start, uint8 end, int16 delay);
void setCustomCursor(byte *data, uint16 width, uint16 height);
void setCustomRoomCursor(byte *roomSprite);

View File

@ -204,7 +204,7 @@ public:
MouseInfo _minfo;
RaumBlk _room_blk;
Flags _flags = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0 };
0, 0, 0, 0, 0, 0, 0, 0 };
CustomInfo _Ci;
GotoPkt _gpkt;

View File

@ -133,7 +133,6 @@ void var_init() {
_G(pfeil_delay) = 0;
_G(pfeil_ani) = 0;
_G(timer_action_ctr) = 0;
_G(flags).CursorStatus = true;
_G(savegameFlag) = false;
}

View File

@ -170,13 +170,11 @@ void cursorChoice(int16 nr) {
void hideCur() {
_G(flags).ShowAtsInvTxt = false;
_G(cur)->hideCursor();
_G(flags).CursorStatus = false;
}
void showCur() {
_G(flags).ShowAtsInvTxt = true;
_G(cur)->showCursor();
_G(flags).CursorStatus = true;
}
void menuEntry() {
@ -540,7 +538,7 @@ void setupScreen(SetupScreenMode mode) {
if (_G(cur_display) && mode == DO_SETUP) {
_G(cur)->updateCursor();
if (_G(cur)->usingInventoryCursor() && _G(flags).CursorStatus)
if (_G(cur)->usingInventoryCursor() && _G(cur)->isCursorVisible())
_G(out)->spriteSet(
_G(cur)->getCursorSprite(),
g_events->_mousePos.x,

View File

@ -580,8 +580,6 @@ struct Flags {
uint16 NoDiaBox : 1;
uint16 NoEndPosMovObj: 1;
uint16 SavePersonRnr : 1;
uint16 CursorStatus : 1;
};
extern void *MALLOC(size_t size);