EMI/GRIM: Rename getBoundingBoxPos to getScreenBoundingBox to better describe the behavior.
This commit is contained in:
parent
bed29f07b3
commit
60fa48490e
9 changed files with 16 additions and 16 deletions
|
@ -392,7 +392,7 @@ void EMIModel::updateLighting(const Math::Matrix4 &modelToWorld) {
|
||||||
|
|
||||||
void EMIModel::getBoundingBox(int *x1, int *y1, int *x2, int *y2) const {
|
void EMIModel::getBoundingBox(int *x1, int *y1, int *x2, int *y2) const {
|
||||||
int winX1, winY1, winX2, winY2;
|
int winX1, winY1, winX2, winY2;
|
||||||
g_driver->getBoundingBoxPos(this, &winX1, &winY1, &winX2, &winY2);
|
g_driver->getScreenBoundingBox(this, &winX1, &winY1, &winX2, &winY2);
|
||||||
if (winX1 != -1 && winY1 != -1 && winX2 != -1 && winY2 != -1) {
|
if (winX1 != -1 && winY1 != -1 && winX2 != -1 && winY2 != -1) {
|
||||||
*x1 = MIN(*x1, winX1);
|
*x1 = MIN(*x1, winX1);
|
||||||
*y1 = MIN(*y1, winY1);
|
*y1 = MIN(*y1, winY1);
|
||||||
|
|
|
@ -120,8 +120,8 @@ public:
|
||||||
* FIXME: The implementations of these functions (for Grim and EMI, respectively)
|
* FIXME: The implementations of these functions (for Grim and EMI, respectively)
|
||||||
* are very similar. Needs refactoring. See issue #789.
|
* are very similar. Needs refactoring. See issue #789.
|
||||||
*/
|
*/
|
||||||
virtual void getBoundingBoxPos(const Mesh *mesh, int *x1, int *y1, int *x2, int *y2) = 0;
|
virtual void getScreenBoundingBox(const Mesh *mesh, int *x1, int *y1, int *x2, int *y2) = 0;
|
||||||
virtual void getBoundingBoxPos(const EMIModel *mesh, int *x1, int *y1, int *x2, int *y2) = 0;
|
virtual void getScreenBoundingBox(const EMIModel *mesh, int *x1, int *y1, int *x2, int *y2) = 0;
|
||||||
virtual void startActorDraw(const Actor *act) = 0;
|
virtual void startActorDraw(const Actor *act) = 0;
|
||||||
virtual void finishActorDraw() = 0;
|
virtual void finishActorDraw() = 0;
|
||||||
virtual void setShadow(Shadow *shadow) = 0;
|
virtual void setShadow(Shadow *shadow) = 0;
|
||||||
|
|
|
@ -357,7 +357,7 @@ static void glShadowProjection(const Math::Vector3d &light, const Math::Vector3d
|
||||||
glMultMatrixf((GLfloat *)mat);
|
glMultMatrixf((GLfloat *)mat);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GfxOpenGL::getBoundingBoxPos(const Mesh *model, int *x1, int *y1, int *x2, int *y2) {
|
void GfxOpenGL::getScreenBoundingBox(const Mesh *model, int *x1, int *y1, int *x2, int *y2) {
|
||||||
if (_currentShadowArray) {
|
if (_currentShadowArray) {
|
||||||
*x1 = -1;
|
*x1 = -1;
|
||||||
*y1 = -1;
|
*y1 = -1;
|
||||||
|
@ -428,7 +428,7 @@ void GfxOpenGL::getBoundingBoxPos(const Mesh *model, int *x1, int *y1, int *x2,
|
||||||
*y2 = (int)bottom;
|
*y2 = (int)bottom;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GfxOpenGL::getBoundingBoxPos(const EMIModel *model, int *x1, int *y1, int *x2, int *y2) {
|
void GfxOpenGL::getScreenBoundingBox(const EMIModel *model, int *x1, int *y1, int *x2, int *y2) {
|
||||||
if (_currentShadowArray) {
|
if (_currentShadowArray) {
|
||||||
*x1 = -1;
|
*x1 = -1;
|
||||||
*y1 = -1;
|
*y1 = -1;
|
||||||
|
|
|
@ -62,8 +62,8 @@ public:
|
||||||
bool isHardwareAccelerated() override;
|
bool isHardwareAccelerated() override;
|
||||||
bool supportsShaders() override;
|
bool supportsShaders() override;
|
||||||
|
|
||||||
void getBoundingBoxPos(const Mesh *model, int *x1, int *y1, int *x2, int *y2) override;
|
void getScreenBoundingBox(const Mesh *model, int *x1, int *y1, int *x2, int *y2) override;
|
||||||
void getBoundingBoxPos(const EMIModel *model, int *x1, int *y1, int *x2, int *y2) override;
|
void getScreenBoundingBox(const EMIModel *model, int *x1, int *y1, int *x2, int *y2) override;
|
||||||
|
|
||||||
void startActorDraw(const Actor *actor) override;
|
void startActorDraw(const Actor *actor) override;
|
||||||
void finishActorDraw() override;
|
void finishActorDraw() override;
|
||||||
|
|
|
@ -511,11 +511,11 @@ void GfxOpenGLS::flipBuffer() {
|
||||||
g_system->updateScreen();
|
g_system->updateScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GfxOpenGLS::getBoundingBoxPos(const Mesh *mesh, int *x1, int *y1, int *x2, int *y2) {
|
void GfxOpenGLS::getScreenBoundingBox(const Mesh *mesh, int *x1, int *y1, int *x2, int *y2) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GfxOpenGLS::getBoundingBoxPos(const EMIModel *model, int *x1, int *y1, int *x2, int *y2) {
|
void GfxOpenGLS::getScreenBoundingBox(const EMIModel *model, int *x1, int *y1, int *x2, int *y2) {
|
||||||
if (_currentShadowArray) {
|
if (_currentShadowArray) {
|
||||||
*x1 = -1;
|
*x1 = -1;
|
||||||
*y1 = -1;
|
*y1 = -1;
|
||||||
|
|
|
@ -65,8 +65,8 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual void flipBuffer() override;
|
virtual void flipBuffer() override;
|
||||||
|
|
||||||
virtual void getBoundingBoxPos(const Mesh *mesh, int *x1, int *y1, int *x2, int *y2) override;
|
virtual void getScreenBoundingBox(const Mesh *mesh, int *x1, int *y1, int *x2, int *y2) override;
|
||||||
virtual void getBoundingBoxPos(const EMIModel *model, int *x1, int *y1, int *x2, int *y2) override;
|
virtual void getScreenBoundingBox(const EMIModel *model, int *x1, int *y1, int *x2, int *y2) override;
|
||||||
virtual void startActorDraw(const Actor *actor) override;
|
virtual void startActorDraw(const Actor *actor) override;
|
||||||
|
|
||||||
virtual void finishActorDraw() override;
|
virtual void finishActorDraw() override;
|
||||||
|
|
|
@ -370,7 +370,7 @@ static void tglShadowProjection(const Math::Vector3d &light, const Math::Vector3
|
||||||
tglMultMatrixf(mat);
|
tglMultMatrixf(mat);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GfxTinyGL::getBoundingBoxPos(const Mesh *model, int *x1, int *y1, int *x2, int *y2) {
|
void GfxTinyGL::getScreenBoundingBox(const Mesh *model, int *x1, int *y1, int *x2, int *y2) {
|
||||||
if (_currentShadowArray) {
|
if (_currentShadowArray) {
|
||||||
*x1 = -1;
|
*x1 = -1;
|
||||||
*y1 = -1;
|
*y1 = -1;
|
||||||
|
@ -441,7 +441,7 @@ void GfxTinyGL::getBoundingBoxPos(const Mesh *model, int *x1, int *y1, int *x2,
|
||||||
*y2 = (int)bottom;
|
*y2 = (int)bottom;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GfxTinyGL::getBoundingBoxPos(const EMIModel *model, int *x1, int *y1, int *x2, int *y2) {
|
void GfxTinyGL::getScreenBoundingBox(const EMIModel *model, int *x1, int *y1, int *x2, int *y2) {
|
||||||
if (_currentShadowArray) {
|
if (_currentShadowArray) {
|
||||||
*x1 = -1;
|
*x1 = -1;
|
||||||
*y1 = -1;
|
*y1 = -1;
|
||||||
|
|
|
@ -60,8 +60,8 @@ public:
|
||||||
bool isHardwareAccelerated() override;
|
bool isHardwareAccelerated() override;
|
||||||
bool supportsShaders() override;
|
bool supportsShaders() override;
|
||||||
|
|
||||||
void getBoundingBoxPos(const Mesh *model, int *x1, int *y1, int *x2, int *y2) override;
|
void getScreenBoundingBox(const Mesh *model, int *x1, int *y1, int *x2, int *y2) override;
|
||||||
void getBoundingBoxPos(const EMIModel *model, int *x1, int *y1, int *x2, int *y2) override;
|
void getScreenBoundingBox(const EMIModel *model, int *x1, int *y1, int *x2, int *y2) override;
|
||||||
|
|
||||||
void startActorDraw(const Actor *actor) override;
|
void startActorDraw(const Actor *actor) override;
|
||||||
void finishActorDraw() override;
|
void finishActorDraw() override;
|
||||||
|
|
|
@ -578,7 +578,7 @@ void Mesh::draw() const {
|
||||||
|
|
||||||
void Mesh::getBoundingBox(int *x1, int *y1, int *x2, int *y2) const {
|
void Mesh::getBoundingBox(int *x1, int *y1, int *x2, int *y2) const {
|
||||||
int winX1, winY1, winX2, winY2;
|
int winX1, winY1, winX2, winY2;
|
||||||
g_driver->getBoundingBoxPos(this, &winX1, &winY1, &winX2, &winY2);
|
g_driver->getScreenBoundingBox(this, &winX1, &winY1, &winX2, &winY2);
|
||||||
if (winX1 != -1 && winY1 != -1 && winX2 != -1 && winY2 != -1) {
|
if (winX1 != -1 && winY1 != -1 && winX2 != -1 && winY2 != -1) {
|
||||||
*x1 = MIN(*x1, winX1);
|
*x1 = MIN(*x1, winX1);
|
||||||
*y1 = MIN(*y1, winY1);
|
*y1 = MIN(*y1, winY1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue