[Scummvm-git-logs] scummvm master -> f14b591b1293e1def71043b6515f10d87db9c547
aquadran
noreply at scummvm.org
Tue Oct 15 18:05:35 UTC 2024
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f14b591b12 WINTERMUTE: Restored methods names in base 3d renderer to work on it later.
Commit: f14b591b1293e1def71043b6515f10d87db9c547
https://github.com/scummvm/scummvm/commit/f14b591b1293e1def71043b6515f10d87db9c547
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2024-10-15T20:05:29+02:00
Commit Message:
WINTERMUTE: Restored methods names in base 3d renderer to work on it later.
Changed paths:
engines/wintermute/base/base_game.cpp
engines/wintermute/base/gfx/base_renderer3d.h
engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp
engines/wintermute/base/gfx/opengl/base_render_opengl3d.h
engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.cpp
engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.h
diff --git a/engines/wintermute/base/base_game.cpp b/engines/wintermute/base/base_game.cpp
index 89ee1e36a24..cb697645864 100644
--- a/engines/wintermute/base/base_game.cpp
+++ b/engines/wintermute/base/base_game.cpp
@@ -2068,7 +2068,7 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
break;
case SHADOW_STENCIL:
- stack->pushBool(_gameRef->_renderer3D->stencilSupported());
+ stack->pushBool(_gameRef->_renderer3D->usingStencilBuffer());
break;
default:
diff --git a/engines/wintermute/base/gfx/base_renderer3d.h b/engines/wintermute/base/gfx/base_renderer3d.h
index 8ccfe6a319a..032a1ca374a 100644
--- a/engines/wintermute/base/gfx/base_renderer3d.h
+++ b/engines/wintermute/base/gfx/base_renderer3d.h
@@ -62,29 +62,58 @@ public:
bool getProjectionParams(float *resWidth, float *resHeight, float *layerWidth, float *layerHeight,
float *modWidth, float *modHeight, bool *customViewport);
virtual int getMaxActiveLights() = 0;
+
bool setAmbientLightColor(uint32 color);
bool setDefaultAmbientLightColor();
uint32 _ambientLightColor;
bool _ambientLightOverride;
+ //virtual void DumpData(char* Filename);
virtual bool enableShadows() = 0;
virtual bool disableShadows() = 0;
- virtual bool stencilSupported() = 0;
+ virtual bool usingStencilBuffer() = 0;
virtual void displayShadow(BaseObject *object, const Math::Vector3d &light, bool lightPosRelative) = 0;
+ //HRESULT InvalidateTexture(LPDIRECT3DTEXTURE Texture);
virtual void setSpriteBlendMode(Graphics::TSpriteBlendMode blendMode) = 0;
+ // declared in sub class: virtual const char* GetName();
+ // declared in sub class: virtual HRESULT DisplayDebugInfo();
+ // declared in sub class: virtual CBImage* TakeScreenshot();
+ // declared in sub class: virtual HRESULT SetViewport(int left, int top, int right, int bottom);
+ // NOT declared in sub class: HRESULT InvalidateDeviceObjects();
+ // NOT declared in sub class: HRESULT RestoreDeviceObjects();
void fade(uint16 alpha) override;
+ // declared in sub class: virtual HRESULT FadeToColor(DWORD Color, RECT* rect=NULL);
+ // declared in sub class: virtual HRESULT DrawLine(int X1, int Y1, int X2, int Y2, DWORD Color);
+ // declared in sub class: virtual HRESULT SetProjection();
bool drawSprite(BaseSurfaceOpenGL3D &tex, const Rect32 &rect, float zoomX, float zoomY, const Vector2 &pos,
uint32 color, bool alphaDisable, Graphics::TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY);
virtual bool drawSpriteEx(BaseSurfaceOpenGL3D &tex, const Rect32 &rect, const Vector2 &pos, const Vector2 &rot, const Vector2 &scale,
float angle, uint32 color, bool alphaDisable, Graphics::TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY) = 0;
+ // declared in sub class: virtual HRESULT Setup3D(C3DCamera* Camera=NULL, bool Force=false);
+ // NOT declared in sub class: virtual HRESULT Setup3DCustom(D3DXMATRIX* ViewMat, D3DXMATRIX* ProjMat);
+ // declared in sub class: virtual HRESULT Setup2D(bool Force=false);
+ // declared in sub class: virtual HRESULT SetupLines();
+ // declared in sub class: HRESULT ResetDevice();
void initLoop() override;
+ // declared in sub class: virtual HRESULT Fill(BYTE r, BYTE g, BYTE b, RECT* rect=NULL);
+ // declared in sub class: virtual HRESULT Flip();
+ // declared in sub class: virtual HRESULT InitRenderer(CHWManager* hwManager);
+ // NOT declared in sub class: virtual HRESULT SwitchFullscreen();
+ // declared in sub class: virtual HRESULT WindowedBlt();
+
+ // declared in sub class: virtual bool UsingStencilBuffer();
+
+ // declared in sub class: virtual HRESULT StartSpriteBatch();
+ // declared in sub class: virtual HRESULT EndSpriteBatch();
+ // NOT declared in sub class: HRESULT CommitSpriteBatch();
+ // declared in sub class: virtual HRESULT DrawShaderQuad();
- // ScummVM specific methods:
+ // ScummVM specific methods -->
virtual void enableLight(int index) = 0;
virtual void disableLight(int index) = 0;
@@ -94,7 +123,6 @@ public:
virtual void enableCulling() = 0;
virtual void disableCulling() = 0;
-
Rect32 getViewPort() override;
Graphics::PixelFormat getPixelFormat() const override;
@@ -142,6 +170,8 @@ public:
Math::Matrix3 build2dTransformation(const Vector2 ¢er, float angle);
+ // ScummVM specific methods <--
+
protected:
Math::Matrix4 _lastViewMatrix;
Rect32 _viewport3dRect;
@@ -155,7 +185,10 @@ protected:
TRendererState _state;
bool _spriteBatchMode;
+ // NOT declared in sub class: HRESULT CreateShaderQuad();
virtual void setAmbientLightRenderState() = 0;
+ // NOT declared in sub class: D3DMATRIX* BuildMatrix(D3DMATRIX* pOut, const D3DXVECTOR2* centre, const D3DXVECTOR2* scaling, float angle);
+ // NOT declared in sub class: void TransformVertices(struct SPRITEVERTEX* vertices, const D3DXVECTOR2* pCentre, const D3DXVECTOR2* pScaling, float angle);
// ScummVM specific methods:
void flipVertical(Graphics::Surface *s);
diff --git a/engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp b/engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp
index 7f74c3c5fc7..04c3cd8f14c 100644
--- a/engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp
+++ b/engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp
@@ -217,7 +217,7 @@ void BaseRenderOpenGL3D::displayShadow(BaseObject *object, const Math::Vector3d
glLoadMatrixf(_lastViewMatrix.getData());
}
-bool BaseRenderOpenGL3D::stencilSupported() {
+bool BaseRenderOpenGL3D::usingStencilBuffer() {
// assume that we have a stencil buffer
return true;
}
diff --git a/engines/wintermute/base/gfx/opengl/base_render_opengl3d.h b/engines/wintermute/base/gfx/opengl/base_render_opengl3d.h
index 8c312594adc..e1562e285ef 100644
--- a/engines/wintermute/base/gfx/opengl/base_render_opengl3d.h
+++ b/engines/wintermute/base/gfx/opengl/base_render_opengl3d.h
@@ -71,7 +71,7 @@ public:
bool enableShadows() override;
bool disableShadows() override;
void displayShadow(BaseObject *object, const Math::Vector3d &lightPos, bool lightPosRelative) override;
- bool stencilSupported() override;
+ bool usingStencilBuffer() override;
void dumpData(const char *filename) override {}
BaseImage *takeScreenshot() override;
diff --git a/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.cpp b/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.cpp
index ae1c96d4e8d..6d2af1ce3d1 100644
--- a/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.cpp
+++ b/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.cpp
@@ -329,7 +329,7 @@ void BaseRenderOpenGL3DShader::displayShadow(BaseObject *object, const Math::Vec
}
}
-bool BaseRenderOpenGL3DShader::stencilSupported() {
+bool BaseRenderOpenGL3DShader::usingStencilBuffer() {
// assume that we have a stencil buffer
return true;
}
diff --git a/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.h b/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.h
index aa51e71ae17..e0488cdcd91 100644
--- a/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.h
+++ b/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.h
@@ -61,7 +61,7 @@ public:
bool enableShadows() override;
bool disableShadows() override;
void displayShadow(BaseObject *object, const Math::Vector3d &lightPos, bool lightPosRelative) override;
- bool stencilSupported() override;
+ bool usingStencilBuffer() override;
void dumpData(const char *filename) override {}
BaseImage *takeScreenshot() override;
More information about the Scummvm-git-logs
mailing list