BAGEL: Remove two unused rectangles in CMainWindow::attach, add a default case in CNavWindow::onLButtonDown

This commit is contained in:
Strangerke 2024-06-10 21:43:06 +01:00
parent b102e2d6b0
commit d2d52ad372
2 changed files with 8 additions and 10 deletions

View File

@ -142,7 +142,6 @@ ErrorCode CMainWindow::attach() {
}
if (_pThudBmp && (CBagObject *)nullptr == getFGObjects(CBofString(THUD_WLD))) {
CBofRect r(1, tmpRect.height() - 101, 101, tmpRect.height() - 1);
_pThudBmp->setAssociateWnd(this);
insertFGObjects(_pThudBmp);
}
@ -201,7 +200,6 @@ ErrorCode CMainWindow::attach() {
}
if ((CBagObject *)nullptr == getFGObjects(CBofString(PDA_WLD))) {
CBofRect r(0, 0, 300, 200);
_pPDABmp->setAssociateWnd(this);
// To fix pda not updating problem

View File

@ -633,7 +633,7 @@ void CNavWindow::onLButtonDown(uint32 /*nFlags*/, CBofPoint *pPoint, void *) {
assert(pPoint != nullptr);
switch (_level) {
case 0: {
case 0:
if (_pPinna->ptInRect(*pPoint))
onPinna();
@ -658,9 +658,8 @@ void CNavWindow::onLButtonDown(uint32 /*nFlags*/, CBofPoint *pPoint, void *) {
if (_pFruufnia->ptInRect(*pPoint))
onFruufnia();
break;
}//close case
case 1: {
case 1:
if (_pWilbur->ptInRect(*pPoint))
onWilbur();
@ -689,9 +688,8 @@ void CNavWindow::onLButtonDown(uint32 /*nFlags*/, CBofPoint *pPoint, void *) {
onPizer();
break;
}//close case
case 2: {
case 2:
if (_pBackwater->ptInRect(*pPoint))
onBackwater();
@ -717,8 +715,8 @@ void CNavWindow::onLButtonDown(uint32 /*nFlags*/, CBofPoint *pPoint, void *) {
onMaggotsnest();
break;
}
case 3: {
case 3:
if (_pPeggleboz->ptInRect(*pPoint))
onPeggleboz();
@ -750,7 +748,9 @@ void CNavWindow::onLButtonDown(uint32 /*nFlags*/, CBofPoint *pPoint, void *) {
onBattlefish();
break;
} //close case
default:
break;
} //close switch
if (_cargo <= 0)