- stripped out most of the software renderer.

Now that the camera textures can be handled through the hardware renderer this isn't needed anymore.
This commit is contained in:
Christoph Oelckers 2020-03-29 14:55:09 +02:00
parent 621a9338e5
commit 0de4b134da
15 changed files with 18 additions and 4686 deletions

View file

@ -664,7 +664,6 @@ set (PCH_SOURCES
#thirdparty/imgui/imgui_widgets.cpp
# Todo: Split out the license-safe code from this.
build/src/a-c.cpp
build/src/animvpx.cpp
build/src/clip.cpp
build/src/common.cpp

View file

@ -23,7 +23,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "ns.h" // Must come before everything else!
#include <string.h>
#include "a.h"
#include "build.h"
#include "common_game.h"

View file

@ -26,7 +26,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <string.h>
#include "compat.h"
#include "a.h"
#include "build.h"
#include "pragmas.h"
#include "mmulti.h"

View file

@ -30,8 +30,6 @@ extern int32_t xres, yres, bpp, bytesperline, refreshfreq;
extern intptr_t frameplace;
extern char offscreenrendering;
void calc_ylookup(int32_t bpl, int32_t lastyidx);
int32_t videoCheckMode(int32_t *x, int32_t *y, int32_t c, int32_t fs, int32_t forced);
int32_t videoSetMode(int32_t x, int32_t y, int32_t c, int32_t fs);
void videoGetModes(void);

View file

@ -29,6 +29,8 @@ static_assert('\xff' == 255, "Char must be unsigned!");
#include "textures.h"
#include "c_cvars.h"
typedef int64_t coord_t;
enum rendmode_t {
REND_CLASSIC,
REND_POLYMOST = 3,
@ -494,7 +496,6 @@ EXTERN tspriteptr_t tspriteptr[MAXSPRITESONSCREEN + 1];
EXTERN int32_t wx1, wy1, wx2, wy2;
EXTERN int32_t xdim, ydim, numpages, upscalefactor;
EXTERN int32_t yxaspect, viewingrange;
EXTERN TArray<intptr_t> ylookup;
EXTERN int32_t rotatesprite_y_offset;
EXTERN int32_t rotatesprite_yxaspect;

View file

@ -90,7 +90,6 @@ extern uint32_t g_lastpalettesum;
extern palette_t paletteGetColor(int32_t col);
extern void paletteLoadFromDisk(void);
extern void palettePostLoadTables(void);
extern void setup_blend(int32_t blend, int32_t doreverse);
extern uint8_t basepalreset;
extern int32_t curbrightness;

View file

@ -10,7 +10,6 @@
// by Jonathon Fowler (jf@jonof.id.au)
// by the EDuke32 team (development@voidpoint.com)
#include "a.h"
#include "pragmas.h"
#ifdef ENGINE_USING_A_C

View file

@ -6,7 +6,6 @@
// by Jonathon Fowler (jf@jonof.id.au)
// by the EDuke32 team (development@voidpoint.com)
#include "a.h"
#include "build.h"
#include "baselayer.h"
#include "clip.h"

File diff suppressed because it is too large Load diff

View file

@ -13,7 +13,6 @@
#include "imagehelpers.h"
#include "palette.h"
#include "a.h"
#include "superfasthash.h"
#include "common.h"
#include "../../glbackend/glbackend.h"
@ -72,23 +71,6 @@ int DetermineTranslucency(const uint8_t *table)
void fullscreen_tint_gl(PalEntry pe);
void setup_blend(int32_t blend, int32_t doreverse)
{
if (blendtable[blend] == NULL)
blend = 0;
if (globalblend != blend)
{
globalblend = blend;
fixtransluscence(FP_OFF(paletteGetBlendTable(blend)));
}
if (doreverse)
settransreverse();
else
settransnormal();
}
static void alloc_palookup(int32_t pal)
{
// The asm functions vlineasm1, mvlineasm1 (maybe others?) access the next
@ -286,9 +268,9 @@ void palettePostLoadTables(void)
globalpal = 0;
globalpalwritten = palookup[0];
setpalookupaddress(globalpalwritten);
fixtransluscence(FP_OFF(blendtable[0]));
// Do we still need these?
//setpalookupaddress(globalpalwritten);
//fixtransluscence(FP_OFF(blendtable[0]));
char const * const palookup0 = palookup[0];

View file

@ -1,7 +1,6 @@
// SDL interface layer for the Build Engine
// Use SDL 1.2 or 2.0 from http://www.libsdl.org
#include "a.h"
#include "build.h"
#include "common.h"
@ -38,40 +37,6 @@ char modechange=1;
char offscreenrendering=0;
// Calculate ylookup[] and call setvlinebpl()
void calc_ylookup(int32_t bpl, int32_t lastyidx)
{
int32_t i, j = 0;
static int32_t ylookupsiz;
Bassert(lastyidx <= MAXYDIM);
lastyidx++;
if (lastyidx > ylookupsiz)
{
ylookup.Resize(lastyidx);
ylookupsiz = lastyidx;
}
for (i = 0; i <= lastyidx - 4; i += 4)
{
ylookup[i] = j;
ylookup[i + 1] = j + bpl;
ylookup[i + 2] = j + (bpl << 1);
ylookup[i + 3] = j + (bpl * 3);
j += (bpl << 2);
}
for (; i < lastyidx; i++)
{
ylookup[i] = j;
j += bpl;
}
setvlinebpl(bpl);
}
//
// begindrawing() -- locks the framebuffer for drawing
//
@ -129,7 +94,6 @@ void videoBeginDrawing(void)
if (modechange)
{
bytesperline = xdim;
calc_ylookup(bytesperline, ydim);
modechange=0;
}
}

View file

@ -216,13 +216,11 @@ void FGLRenderer::WriteSavePic ( FileWriter *file, int width, int height)
ydim = height;
videoSetViewableArea(0, 0, width - 1, height - 1);
renderSetAspect(65536, 65536);
calc_ylookup(width, height);
bool didit = gi->GenerateSavePic();
xdim = oldx;
ydim = oldy;
videoSetViewableArea(oldwindowxy1.x, oldwindowxy1.y, oldwindowxy2.x, oldwindowxy2.y);
calc_ylookup(bytesperline, ydim);
modechange = 1;
// The 2D drawers can contain some garbage from the dirty render setup. Get rid of that first.

View file

@ -141,18 +141,6 @@ static int SaveScreenshot()
memcpy(imgBuf.Data() + (ydim - i - 1) * bytesPerLine, rowBuf.Data(), bytesPerLine);
}
}
else
{
for (int i = 0; i < 256; ++i)
{
Palette[i].r = curpalettefaded[i].r;
Palette[i].g = curpalettefaded[i].g;
Palette[i].b = curpalettefaded[i].b;
}
for (int i = 0; i < ydim; ++i)
memcpy(imgBuf.Data() + i * xdim, (uint8_t *)frameplace + ylookup[i], xdim);
}
videoEndDrawing();

View file

@ -24,7 +24,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#define duke3d_h_
// JBF
#include "a.h"
#include "baselayer.h"
#include "build.h"

View file

@ -24,7 +24,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#define duke3d_h_
// JBF
#include "a.h"
#include "baselayer.h"
#include "build.h"