mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- cleaned up a few copyright notices and unified licenses
This commit is contained in:
parent
6d7458fe42
commit
4f8e0dd936
12 changed files with 97 additions and 49 deletions
|
@ -961,11 +961,6 @@ Coding example #2:
|
|||
|
||||
TILE VARIABLES:
|
||||
NUMTILES - the number of tiles found TILES.DAT.
|
||||
TILESIZX[MAXTILES] - simply the x-dimension of the tile number.
|
||||
TILESIZY[MAXTILES] - simply the y-dimension of the tile number.
|
||||
WALOFF[MAXTILES] - the actual address pointing to the top-left
|
||||
corner of the tile.
|
||||
PICANM[MAXTILES] - flags for animating the tile.
|
||||
|
||||
TIMING VARIABLES:
|
||||
TOTALCLOCK - When the engine is initialized, TOTALCLOCK is set to zero.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
** bitmap.cpp
|
||||
**
|
||||
**---------------------------------------------------------------------------
|
||||
** Copyright 2008 Christoph Oelckers
|
||||
** Copyright 2008-2019 Christoph Oelckers
|
||||
** All rights reserved.
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
** bitmap.h
|
||||
**
|
||||
**---------------------------------------------------------------------------
|
||||
** Copyright 2008 Christoph Oelckers
|
||||
** Copyright 2008-2019 Christoph Oelckers
|
||||
** All rights reserved.
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -59,15 +59,15 @@ BuildFiles TileFiles;
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
picanm_t tileConvertAnimFormat(int32_t const picanmdisk)
|
||||
picanm_t tileConvertAnimFormat(int32_t const picanimraw)
|
||||
{
|
||||
// Unpack a 4 byte packed anim descriptor into the internal 5 byte format.
|
||||
picanm_t anm;
|
||||
anm.num = picanmdisk & 63;
|
||||
anm.xofs = (picanmdisk >> 8) & 255;
|
||||
anm.yofs = (picanmdisk >> 16) & 255;
|
||||
anm.sf = ((picanmdisk >> 24) & 15) | (picanmdisk & 192);
|
||||
anm.extra = (picanmdisk >> 28) & 15;
|
||||
anm.num = picanimraw & 63;
|
||||
anm.xofs = (picanimraw >> 8) & 255;
|
||||
anm.yofs = (picanimraw >> 16) & 255;
|
||||
anm.sf = ((picanimraw >> 24) & 15) | (picanimraw & 192);
|
||||
anm.extra = (picanimraw >> 28) & 15;
|
||||
return anm;
|
||||
}
|
||||
|
||||
|
@ -228,11 +228,10 @@ void BuildFiles::CloseAllMapArt()
|
|||
//
|
||||
// LoadArtFile
|
||||
//
|
||||
// Returns the number of tiles found. Also loads all the data for
|
||||
// R_InitBuildTiles() to process later.
|
||||
// Returns the number of tiles found.
|
||||
//
|
||||
// let's load everything into memory on startup.
|
||||
// Even for Ion Fury this will merely add 60 MB, because the engine already needs to cache the data, albeit in a compressed-per-lump form,
|
||||
// Even for Ion Fury this will merely add 80 MB, because the engine already needs to cache the data, albeit in a compressed-per-lump form,
|
||||
// so its 100MB art file will only have a partial impact on memory.
|
||||
//
|
||||
//===========================================================================
|
||||
|
@ -300,6 +299,8 @@ void BuildFiles::LoadArtSet(const char* filename)
|
|||
// For each tile index there may only be one replacement and its
|
||||
// type may never change!
|
||||
//
|
||||
// All these uses will need some review further down the line so that the texture manager's content is immutable.
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
FTexture* BuildFiles::ValidateCustomTile(int tilenum, int type)
|
||||
|
@ -312,6 +313,13 @@ FTexture* BuildFiles::ValidateCustomTile(int tilenum, int type)
|
|||
FTexture* replacement = nullptr;
|
||||
if (type == FTexture::Writable)
|
||||
{
|
||||
// Creates an empty writable tile.
|
||||
// Current use cases are:
|
||||
// Camera textures (should be made to be creatable by the hardware renderer instead of falling back on the software renderer.)
|
||||
// thumbnails for savegame and loadgame (should bypass the texture manager entirely.)
|
||||
// view tilting in the software renderer (this should just use a local buffer instead of relying on the texture manager.)
|
||||
// Movie playback (like thumbnails this should bypass the texture manager entirely.)
|
||||
// Blood's 'lens' effect (apparently MP only) - combination of a camera texture with a distortion map - should be made a shader effect to be applied to the camera texture.
|
||||
replacement = new FWritableTile;
|
||||
}
|
||||
else if (type == FTexture::Restorable)
|
||||
|
@ -320,6 +328,7 @@ FTexture* BuildFiles::ValidateCustomTile(int tilenum, int type)
|
|||
// It only gets used for the crosshair and two specific effects:
|
||||
// A) the fire in Blood.
|
||||
// B) the pin display in Redneck Rampage's bowling lanes.
|
||||
// All of these effects should probably be redone without actual texture hacking...
|
||||
if (tile->GetWidth() == 0 || tile->GetHeight() == 0) return nullptr; // The base must have a size for this to work.
|
||||
// todo: invalidate hardware textures for tile.
|
||||
replacement = new FRestorableTile(tile);
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
/*
|
||||
** pngtexture.cpp
|
||||
** ddstexture.cpp
|
||||
** Texture class for DDS images
|
||||
**
|
||||
**---------------------------------------------------------------------------
|
||||
** Copyright 2006-2007 Randy Heit
|
||||
** Copyright 2006-2016 Randy Heit
|
||||
** Copyright 2006-2019 Christoph Oelckers
|
||||
** All rights reserved.
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
** Texture class for JPEG images
|
||||
**
|
||||
**---------------------------------------------------------------------------
|
||||
** Copyright 2006-2007 Randy Heit
|
||||
** Copyright 2005-2016 Randy Heit
|
||||
** Copyright 2005-2019 Christoph Oelckers
|
||||
** All rights reserved.
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
**
|
||||
**---------------------------------------------------------------------------
|
||||
** Copyright 2005 David HENRY
|
||||
** Copyright 2006 Christoph Oelckers
|
||||
** Copyright 2006-2019 Christoph Oelckers
|
||||
** All rights reserved.
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
**
|
||||
**---------------------------------------------------------------------------
|
||||
** Copyright 2004-2007 Randy Heit
|
||||
** Copyright 2005-2019 Christoph Oelckers
|
||||
** All rights reserved.
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
** Texture class for TGA images
|
||||
**
|
||||
**---------------------------------------------------------------------------
|
||||
** Copyright 2006 Christoph Oelckers
|
||||
** Copyright 2006-2019 Christoph Oelckers
|
||||
** All rights reserved.
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -1,24 +1,37 @@
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright(C) 2014-2016 Christoph Oelckers
|
||||
// All rights reserved.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 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 Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with this program. If not, see http://www.gnu.org/licenses/
|
||||
//
|
||||
//--------------------------------------------------------------------------
|
||||
//
|
||||
/*
|
||||
** gl_samplers.cpp
|
||||
**
|
||||
** Texture sampler handling
|
||||
**
|
||||
**---------------------------------------------------------------------------
|
||||
** Copyright 2015-2019 Christoph Oelckers
|
||||
** All rights reserved.
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions
|
||||
** are met:
|
||||
**
|
||||
** 1. Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** 2. Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in the
|
||||
** documentation and/or other materials provided with the distribution.
|
||||
** 3. The name of the author may not be used to endorse or promote products
|
||||
** derived from this software without specific prior written permission.
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
**---------------------------------------------------------------------------
|
||||
**
|
||||
*/
|
||||
|
||||
#include "glad/glad.h"
|
||||
#include "glbackend.h"
|
||||
|
|
|
@ -18,12 +18,6 @@
|
|||
** documentation and/or other materials provided with the distribution.
|
||||
** 3. The name of the author may not be used to endorse or promote products
|
||||
** derived from this software without specific prior written permission.
|
||||
** 4. When not used as part of GZDoom or a GZDoom derivative, this code will be
|
||||
** covered by the terms of the GNU Lesser General Public License as published
|
||||
** by the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
** your option) any later version.
|
||||
** 5. Full disclosure of the entire project's source code, except for third
|
||||
** party libraries is mandatory. (NOTE: This clause is non-negotiable!)
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
|
|
|
@ -1,3 +1,37 @@
|
|||
/*
|
||||
** glbackend.cpp
|
||||
**
|
||||
** OpenGL API abstraction
|
||||
**
|
||||
**---------------------------------------------------------------------------
|
||||
** Copyright 2019 Christoph Oelckers
|
||||
** All rights reserved.
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions
|
||||
** are met:
|
||||
**
|
||||
** 1. Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** 2. Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in the
|
||||
** documentation and/or other materials provided with the distribution.
|
||||
** 3. The name of the author may not be used to endorse or promote products
|
||||
** derived from this software without specific prior written permission.
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
**---------------------------------------------------------------------------
|
||||
**
|
||||
*/
|
||||
#include <memory>
|
||||
#include "glad/glad.h"
|
||||
#include "glbackend.h"
|
||||
|
@ -77,7 +111,7 @@ void GLInstance::Init()
|
|||
catch (const std::runtime_error& err)
|
||||
{
|
||||
// This is far from an optimal solution but at this point the only way to get the error out.
|
||||
wm_msgbox("Shader compilation failed", err.what());
|
||||
wm_msgbox(nullptr, "Shader compilation failed: %s", err.what());
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue