Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 820f818

Browse files
committed
Rename Box::WithinBox methods to IsWithinBox
Nothing in the data repo is using the lua bindings so no extra work there
1 parent 9ceb69b commit 820f818

File tree

12 files changed

+24
-24
lines changed

12 files changed

+24
-24
lines changed

Activities/GATutorial.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ void GATutorial::Update()
705705
for (int area = 0; area < AREACOUNT; ++area)
706706
{
707707
// Switch if within the trigger box of a new area
708-
if (area != m_CurrentArea && m_TriggerBoxes[area].WithinBox(m_pControlledActor[m_TutorialPlayer]->GetPos()))
708+
if (area != m_CurrentArea && m_TriggerBoxes[area].IsWithinBox(m_pControlledActor[m_TutorialPlayer]->GetPos()))
709709
{
710710
// Change to the new area
711711
m_PrevArea = m_CurrentArea;
@@ -722,7 +722,7 @@ void GATutorial::Update()
722722
{
723723
724724
// Switch if within the trigger box of a new area
725-
if (area != m_CurrentArea && m_TriggerBoxes[area].WithinBox(m_pControlledActor[m_TutorialPlayer]->GetPos()))
725+
if (area != m_CurrentArea && m_TriggerBoxes[area].IsWithinBox(m_pControlledActor[m_TutorialPlayer]->GetPos()))
726726
{
727727
728728
if (m_FightTriggers[stage].Reset();
@@ -843,7 +843,7 @@ void GATutorial::Update()
843843
if (m_pControlledActor[m_TutorialPlayer])
844844
{
845845
// Triggered defending stage
846-
if (m_CurrentFightStage == NOFIGHT && m_FightTriggers[DEFENDING].WithinBox(m_pControlledActor[m_TutorialPlayer]->GetPos()))
846+
if (m_CurrentFightStage == NOFIGHT && m_FightTriggers[DEFENDING].IsWithinBox(m_pControlledActor[m_TutorialPlayer]->GetPos()))
847847
{
848848
// Take over control of screen messages
849849
m_MsgTimer[m_TutorialPlayer].Reset();

Activities/GameActivity.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2271,7 +2271,7 @@ void GameActivity::DrawGUI(BITMAP *pTargetBitmap, const Vector &targetPos, int w
22712271
for (list<Box>::iterator wItr = wrappedBoxes.begin(); wItr != wrappedBoxes.end(); ++wItr)
22722272
{
22732273
// See if we found the point to be within the screen or not
2274-
if (wItr->WithinBox((*itr).m_ScenePos))
2274+
if (wItr->IsWithinBox((*itr).m_ScenePos))
22752275
{
22762276
nearestBoxItr = wItr;
22772277
withinAny = true;

Entities/Deployment.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ bool Deployment::IsOnScenePoint(Vector &scenePoint) const
669669
for (int i = 0; i < passes; ++i)
670670
{
671671
672-
if (WithinBox(aScenePoint[i], m_Pos + m_BitmapOffset, m_pFGColor->w, m_pFGColor->h))
672+
if (IsWithinBox(aScenePoint[i], m_Pos + m_BitmapOffset, m_pFGColor->w, m_pFGColor->h))
673673
{
674674
if (getpixel(m_pFGColor, aScenePoint[i].m_X, aScenePoint[i].m_Y) != g_KeyColor ||
675675
(m_pBGColor && getpixel(m_pBGColor, aScenePoint[i].m_X, aScenePoint[i].m_Y) != g_KeyColor) ||

Entities/MOSRotating.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1363,7 +1363,7 @@ bool MOSRotating::IsOnScenePoint(Vector &scenePoint) const
13631363
// Check all the passes needed
13641364
for (int i = 0; i < passes; ++i)
13651365
{
1366-
if (WithinBox(aScenePoint[i], m_Pos + m_BitmapOffset, m_pFGColor->w, m_pFGColor->h))
1366+
if (IsWithinBox(aScenePoint[i], m_Pos + m_BitmapOffset, m_pFGColor->w, m_pFGColor->h))
13671367
{
13681368
if (getpixel(m_pFGColor, aScenePoint[i].m_X, aScenePoint[i].m_Y) != g_KeyColor ||
13691369
(m_pBGColor && getpixel(m_pBGColor, aScenePoint[i].m_X, aScenePoint[i].m_Y) != g_KeyColor) ||

Entities/MOSprite.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ bool MOSprite::IsOnScenePoint(Vector &scenePoint) const
399399
// Check all the passes needed
400400
for (int i = 0; i < passes; ++i)
401401
{
402-
if (WithinBox(aScenePoint[i], m_Pos + m_BitmapOffset, m_pFGColor->w, m_pFGColor->h))
402+
if (IsWithinBox(aScenePoint[i], m_Pos + m_BitmapOffset, m_pFGColor->w, m_pFGColor->h))
403403
{
404404
if (getpixel(m_pFGColor, aScenePoint[i].m_X, aScenePoint[i].m_Y) != g_KeyColor ||
405405
(m_pBGColor && getpixel(m_pBGColor, aScenePoint[i].m_X, aScenePoint[i].m_Y) != g_KeyColor) ||

Entities/Scene.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ bool Scene::Area::IsInside(const Vector &point) const
185185
// Iterate through the wrapped boxes - will only be one if there's no wrapping
186186
for (list<Box>::iterator wItr = wrappedBoxes.begin(); wItr != wrappedBoxes.end(); ++wItr)
187187
{
188-
if (wItr->WithinBox(point))
188+
if (wItr->IsWithinBox(point))
189189
return true;
190190
}
191191
}
@@ -211,7 +211,7 @@ bool Scene::Area::IsInsideX(float pointX) const
211211
// Iterate through the wrapped boxes - will only be one if there's no wrapping
212212
for (list<Box>::iterator wItr = wrappedBoxes.begin(); wItr != wrappedBoxes.end(); ++wItr)
213213
{
214-
if (wItr->WithinBoxX(pointX))
214+
if (wItr->IsWithinBoxX(pointX))
215215
return true;
216216
}
217217
}
@@ -237,7 +237,7 @@ bool Scene::Area::IsInsideY(float pointY) const
237237
// Iterate through the wrapped boxes - will only be one if there's no wrapping
238238
for (list<Box>::iterator wItr = wrappedBoxes.begin(); wItr != wrappedBoxes.end(); ++wItr)
239239
{
240-
if (wItr->WithinBoxY(pointY))
240+
if (wItr->IsWithinBoxY(pointY))
241241
return true;
242242
}
243243
}
@@ -324,7 +324,7 @@ Box * Scene::Area::GetBoxInside(const Vector &point)
324324
for (list<Box>::const_iterator wItr = wrappedBoxes.begin(); wItr != wrappedBoxes.end(); ++wItr)
325325
{
326326
// Return the BoxList box, not the inconsequential wrapped copy
327-
if (wItr->WithinBox(point))
327+
if (wItr->IsWithinBox(point))
328328
return &(*aItr);
329329
}
330330
}
@@ -351,7 +351,7 @@ Box Scene::Area::RemoveBoxInside(const Vector &point)
351351
// Iterate through the wrapped boxes - will only be one if there's no wrapping
352352
for (list<Box>::iterator wItr = wrappedBoxes.begin(); wItr != wrappedBoxes.end(); ++wItr)
353353
{
354-
if (wItr->WithinBox(point))
354+
if (wItr->IsWithinBox(point))
355355
{
356356
// Remove the BoxList box, not the inconsequential wrapped copy
357357
returnBox = (*aItr);

Entities/TerrainObject.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ bool TerrainObject::IsOnScenePoint(Vector &scenePoint) const
327327
for (int i = 0; i < passes; ++i)
328328
{
329329
330-
if (WithinBox(aScenePoint[i], m_Pos + m_BitmapOffset, m_pFGColor->w, m_pFGColor->h))
330+
if (IsWithinBox(aScenePoint[i], m_Pos + m_BitmapOffset, m_pFGColor->w, m_pFGColor->h))
331331
{
332332
if (getpixel(m_pFGColor, aScenePoint[i].m_X, aScenePoint[i].m_Y) != g_KeyColor ||
333333
(m_pBGColor && getpixel(m_pBGColor, aScenePoint[i].m_X, aScenePoint[i].m_Y) != g_KeyColor) ||

Managers/LuaMan.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -514,9 +514,9 @@ int LuaMan::Create()
514514
.property("Area", &Box::GetArea)
515515
.def("GetRandomPoint", &Box::GetRandomPoint)
516516
.def("Unflip", &Box::Unflip)
517-
.def("WithinBox", &Box::WithinBox)
518-
.def("WithinBoxX", &Box::WithinBoxX)
519-
.def("WithinBoxY", &Box::WithinBoxY)
517+
.def("IsWithinBox", &Box::IsWithinBox)
518+
.def("IsWithinBoxX", &Box::IsWithinBoxX)
519+
.def("IsWithinBoxY", &Box::IsWithinBoxY)
520520
.def("GetWithinBoxX", &Box::GetWithinBoxX)
521521
.def("GetWithinBoxY", &Box::GetWithinBoxY)
522522
.def("GetWithinBox", &Box::GetWithinBox),

Menus/MainMenuGUI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ void MainMenuGUI::Update()
681681
m_pGUIInput->GetMousePosition(&mouseX, &mouseY);
682682
Vector mouse(mouseX, mouseY);
683683

684-
if (m_PioneerPromoBox.WithinBox(mouse))
684+
if (m_PioneerPromoBox.IsWithinBox(mouse))
685685
{
686686
OpenBrowserToURL("http://store.steampowered.com/app/300260/");
687687
}

Menus/PieMenuGUI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1159,7 +1159,7 @@ void PieMenuGUI::Draw(BITMAP *pTargetBitmap, const Vector &targetPos) const
11591159
for (list<Box>::iterator wItr = wrappedBoxes.begin(); wItr != wrappedBoxes.end(); ++wItr)
11601160
{
11611161
// See if we found the point to be within the screen or not
1162-
if (wItr->WithinBox(m_CenterPos))
1162+
if (wItr->IsWithinBox(m_CenterPos))
11631163
{
11641164
nearestBoxItr = wItr;
11651165
withinAny = true;

0 commit comments

Comments
 (0)