WINTERMUTE: Fix formatting, add license headers
This commit is contained in:
parent
2e77063c7c
commit
cbc313020a
5 changed files with 158 additions and 77 deletions
|
@ -231,8 +231,10 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
BaseRenderer *makeOSystemRenderer(BaseGame *inGame); // Implemented in BRenderSDL.cpp
|
BaseRenderer *makeOSystemRenderer(BaseGame *inGame); // Implemented in BRenderSDL.cpp
|
||||||
|
#ifdef ENABLE_WME3D
|
||||||
BaseRenderer *makeOpenGLTextureRenderer(BaseGame *inGame);
|
BaseRenderer *makeOpenGLTextureRenderer(BaseGame *inGame);
|
||||||
BaseRenderer *makeOpenGL3DRenderer(BaseGame* inGame);
|
BaseRenderer *makeOpenGL3DRenderer(BaseGame* inGame);
|
||||||
|
#endif
|
||||||
|
|
||||||
} // End of namespace Wintermute
|
} // End of namespace Wintermute
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,25 @@
|
||||||
|
/* ResidualVM - A 3D game interpreter
|
||||||
|
*
|
||||||
|
* ResidualVM is the legal property of its developers, whose names
|
||||||
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||||
|
* file distributed with this source distribution.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
#include "base_render_opengl3d.h"
|
#include "base_render_opengl3d.h"
|
||||||
|
|
||||||
#include "../../../../../graphics/opengl/system_headers.h"
|
#include "../../../../../graphics/opengl/system_headers.h"
|
||||||
|
@ -9,15 +31,13 @@ BaseRenderer *makeOpenGL3DRenderer(BaseGame* inGame) {
|
||||||
return new BaseRenderOpenGL3D(inGame);
|
return new BaseRenderOpenGL3D(inGame);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
} // namespace Wintermute
|
||||||
|
|
||||||
Wintermute::BaseRenderOpenGL3D::BaseRenderOpenGL3D(Wintermute::BaseGame *inGame)
|
Wintermute::BaseRenderOpenGL3D::BaseRenderOpenGL3D(Wintermute::BaseGame *inGame)
|
||||||
: _spriteBatchMode(false) {
|
: _spriteBatchMode(false) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Wintermute::BaseRenderOpenGL3D::~BaseRenderOpenGL3D() {
|
Wintermute::BaseRenderOpenGL3D::~BaseRenderOpenGL3D() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Wintermute::BaseImage *Wintermute::BaseRenderOpenGL3D::takeScreenshot() {
|
Wintermute::BaseImage *Wintermute::BaseRenderOpenGL3D::takeScreenshot() {
|
||||||
|
@ -43,7 +63,6 @@ Wintermute::Rect32 Wintermute::BaseRenderOpenGL3D::getViewPort() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Wintermute::BaseRenderOpenGL3D::setWindowed(bool windowed) {
|
void Wintermute::BaseRenderOpenGL3D::setWindowed(bool windowed) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Graphics::PixelFormat Wintermute::BaseRenderOpenGL3D::getPixelFormat() const {
|
Graphics::PixelFormat Wintermute::BaseRenderOpenGL3D::getPixelFormat() const {
|
||||||
|
@ -155,7 +174,6 @@ bool Wintermute::BaseRenderOpenGL3D::fill(byte r, byte g, byte b, Common::Rect*
|
||||||
}
|
}
|
||||||
|
|
||||||
void Wintermute::BaseRenderOpenGL3D::onWindowChange() {
|
void Wintermute::BaseRenderOpenGL3D::onWindowChange() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Wintermute::BaseRenderOpenGL3D::initRenderer(int width, int height, bool windowed) {
|
bool Wintermute::BaseRenderOpenGL3D::initRenderer(int width, int height, bool windowed) {
|
||||||
|
@ -197,7 +215,7 @@ bool Wintermute::BaseRenderOpenGL3D::setup2D(bool force) {
|
||||||
|
|
||||||
glDisable(GL_LIGHTING);
|
glDisable(GL_LIGHTING);
|
||||||
glDisable(GL_DEPTH_TEST);
|
glDisable(GL_DEPTH_TEST);
|
||||||
glDepthMask(false);
|
glDepthMask(GL_FALSE);
|
||||||
glDisable(GL_STENCIL);
|
glDisable(GL_STENCIL);
|
||||||
glDisable(GL_CLIP_PLANE0);
|
glDisable(GL_CLIP_PLANE0);
|
||||||
glDisable(GL_FOG);
|
glDisable(GL_FOG);
|
||||||
|
@ -207,7 +225,7 @@ bool Wintermute::BaseRenderOpenGL3D::setup2D(bool force) {
|
||||||
glCullFace(GL_CCW);
|
glCullFace(GL_CCW);
|
||||||
glEnable(GL_ALPHA_TEST);
|
glEnable(GL_ALPHA_TEST);
|
||||||
glEnable(GL_BLEND);
|
glEnable(GL_BLEND);
|
||||||
glAlphaFunc(GL_GEQUAL, 0x00);
|
glAlphaFunc(GL_GEQUAL, 0.0f);
|
||||||
glPolygonMode(GL_FRONT, GL_FILL);
|
glPolygonMode(GL_FRONT, GL_FILL);
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
|
|
||||||
|
@ -243,7 +261,6 @@ Wintermute::BaseSurface* Wintermute::BaseRenderOpenGL3D::createSurface() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Wintermute::BaseRenderOpenGL3D::endSaveLoad() {
|
void Wintermute::BaseRenderOpenGL3D::endSaveLoad() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Wintermute::BaseRenderOpenGL3D::drawSprite(const OpenGL::Texture &tex, const Wintermute::Rect32 &rect,
|
bool Wintermute::BaseRenderOpenGL3D::drawSprite(const OpenGL::Texture &tex, const Wintermute::Rect32 &rect,
|
||||||
|
@ -276,11 +293,9 @@ bool Wintermute::BaseRenderOpenGL3D::drawSpriteEx(const OpenGL::Texture& tex, co
|
||||||
|
|
||||||
// to be implemented
|
// to be implemented
|
||||||
if (mirrorX) {
|
if (mirrorX) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mirrorY) {
|
if (mirrorY) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// provide space for 3d position coords, 2d texture coords and a 32 bit colot value
|
// provide space for 3d position coords, 2d texture coords and a 32 bit colot value
|
||||||
|
|
|
@ -1,3 +1,25 @@
|
||||||
|
/* ResidualVM - A 3D game interpreter
|
||||||
|
*
|
||||||
|
* ResidualVM is the legal property of its developers, whose names
|
||||||
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||||
|
* file distributed with this source distribution.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef WINTERMUTE_BASE_RENDER_OPENGL3D_H
|
#ifndef WINTERMUTE_BASE_RENDER_OPENGL3D_H
|
||||||
#define WINTERMUTE_BASE_RENDER_OPENGL3D_H
|
#define WINTERMUTE_BASE_RENDER_OPENGL3D_H
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,25 @@
|
||||||
|
/* ResidualVM - A 3D game interpreter
|
||||||
|
*
|
||||||
|
* ResidualVM is the legal property of its developers, whose names
|
||||||
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||||
|
* file distributed with this source distribution.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
#include "base_surface_opengl3d.h"
|
#include "base_surface_opengl3d.h"
|
||||||
|
|
||||||
#include "../base_image.h"
|
#include "../base_image.h"
|
||||||
|
@ -5,9 +27,7 @@
|
||||||
#include "graphics/transparent_surface.h"
|
#include "graphics/transparent_surface.h"
|
||||||
|
|
||||||
Wintermute::BaseSurfaceOpenGL3D::BaseSurfaceOpenGL3D(Wintermute::BaseGame *game, BaseRenderOpenGL3D *renderer)
|
Wintermute::BaseSurfaceOpenGL3D::BaseSurfaceOpenGL3D(Wintermute::BaseGame *game, BaseRenderOpenGL3D *renderer)
|
||||||
: BaseSurface(game), tex(nullptr), renderer(renderer), pixelOpReady(false)
|
: BaseSurface(game), tex(nullptr), renderer(renderer), pixelOpReady(false) {
|
||||||
{
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Wintermute::BaseSurfaceOpenGL3D::invalidate() {
|
bool Wintermute::BaseSurfaceOpenGL3D::invalidate() {
|
||||||
|
|
|
@ -1,3 +1,25 @@
|
||||||
|
/* ResidualVM - A 3D game interpreter
|
||||||
|
*
|
||||||
|
* ResidualVM is the legal property of its developers, whose names
|
||||||
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||||
|
* file distributed with this source distribution.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef WINTERMUTE_BASE_SURFACE_OPENGL3D_H
|
#ifndef WINTERMUTE_BASE_SURFACE_OPENGL3D_H
|
||||||
#define WINTERMUTE_BASE_SURFACE_OPENGL3D_H
|
#define WINTERMUTE_BASE_SURFACE_OPENGL3D_H
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue