- Changed true color texture creation to use a newly defined Bitmap class

instead of having the copy functions in the frame buffer class.
- Fixed: The WolfSS didn't have its obituary defined.


SVN r915 (trunk)
This commit is contained in:
Christoph Oelckers 2008-04-15 18:05:39 +00:00
parent 99b2fab410
commit ce5d4dba02
17 changed files with 729 additions and 586 deletions

View File

@ -1,4 +1,7 @@
April 15, 2008 (Changes by Graf Zahl)
- Changed true color texture creation to use a newly defined Bitmap class
instead of having the copy functions in the frame buffer class.
- Fixed: The WolfSS didn't have its obituary defined.
- Added submission for ACS CheckPlayerCamera ACS function.
- Removed FRadiusThingsIterator after discovering that VC++ misoptimized
it in P_CheckPosition. Now FBlockThingsIterator is used with the distance

View File

@ -211,7 +211,7 @@ private:
void Unload ();
~FDoomStatusBarTexture ();
void SetPlayerRemap(FRemapTable *remap);
int CopyTrueColorPixels(BYTE *buffer, int buf_pitch, int buf_height, int x, int y, int rotate);
int CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rotate);
FTextureFormat GetFormat()
{
@ -1093,33 +1093,33 @@ void DDoomStatusBar::FDoomStatusBarTexture::MakeTexture ()
if (multiplayer) DrawToBar("STFBANY", 143, 1, STBFremap? STBFremap->Remap : NULL);
}
int DDoomStatusBar::FDoomStatusBarTexture::CopyTrueColorPixels(BYTE *buffer, int buf_pitch, int buf_height, int x, int y, int rotate)
int DDoomStatusBar::FDoomStatusBarTexture::CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rotate)
{
FTexture *tex;
// rotate is never used here
BaseTexture->CopyTrueColorPixels(buffer, buf_pitch, buf_height, x, y);
BaseTexture->CopyTrueColorPixels(bmp, x, y);
if (!deathmatch)
{
tex = TexMan["STARMS"];
if (tex != NULL)
{
tex->CopyTrueColorPixels(buffer, buf_pitch, buf_height, x+104, y);
tex->CopyTrueColorPixels(bmp, x+104, y);
}
}
tex = TexMan["STTPRCNT"];
if (tex != NULL)
{
tex->CopyTrueColorPixels(buffer, buf_pitch, buf_height, x+90, y+3);
tex->CopyTrueColorPixels(buffer, buf_pitch, buf_height, x+221, y+3);
tex->CopyTrueColorPixels(bmp, x+90, y+3);
tex->CopyTrueColorPixels(bmp, x+221, y+3);
}
if (multiplayer)
{
tex = TexMan["STFBANY"];
if (tex != NULL)
{
tex->CopyTrueColorTranslated(buffer, buf_pitch, buf_height, x+143, y+1, STBFremap);
tex->CopyTrueColorTranslated(bmp, x+143, y+1, STBFremap);
}
}
return -1;

View File

@ -94,7 +94,7 @@ public:
void Unload ();
virtual void SetFrontSkyLayer ();
int CopyTrueColorPixels(BYTE *buffer, int buf_pitch, int buf_height, int x, int y, int rotate);
int CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rotate);
int GetSourceLump() { return DefinitionLump; }
protected:
@ -261,7 +261,7 @@ public:
const BYTE *GetPixels ();
void Unload ();
FTextureFormat GetFormat ();
int CopyTrueColorPixels(BYTE *buffer, int buf_pitch, int buf_height, int x, int y, int rotate);
int CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rotate);
bool UseBasePalette();
int GetSourceLump() { return SourceLump; }
@ -329,7 +329,7 @@ protected:
void DecompressDXT3 (FWadLump &lump, bool premultiplied, BYTE *tcbuf = NULL);
void DecompressDXT5 (FWadLump &lump, bool premultiplied, BYTE *tcbuf = NULL);
int CopyTrueColorPixels(BYTE *buffer, int buf_pitch, int buf_height, int x, int y, int rotate);
int CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rotate);
bool UseBasePalette();
friend class FTexture;
@ -345,7 +345,7 @@ public:
const BYTE *GetPixels ();
void Unload ();
FTextureFormat GetFormat ();
int CopyTrueColorPixels(BYTE *buffer, int buf_pitch, int buf_height, int x, int y, int rotate);
int CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rotate);
bool UseBasePalette();
int GetSourceLump() { return SourceLump; }
@ -397,7 +397,7 @@ public:
void Unload ();
FTextureFormat GetFormat ();
int CopyTrueColorPixels(BYTE *buffer, int buf_pitch, int buf_height, int x, int y, int rotate);
int CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rotate);
bool UseBasePalette();
int GetSourceLump() { return SourceLump; }
@ -454,7 +454,7 @@ public:
void Unload ();
FTextureFormat GetFormat ();
int CopyTrueColorPixels(BYTE *buffer, int buf_pitch, int buf_height, int x, int y, int rotate);
int CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rotate);
bool UseBasePalette();
int GetSourceLump() { return SourceLump; }

View File

@ -86,6 +86,7 @@ struct line_t;
class player_s;
class FScanner;
class FBitmap;
//
// The SECTORS record, at runtime.
@ -794,8 +795,8 @@ public:
// Returns the whole texture, stored in column-major order
virtual const BYTE *GetPixels () = 0;
virtual int CopyTrueColorPixels(BYTE *buffer, int buf_pitch, int buf_height, int x, int y, int rotate=0);
int CopyTrueColorTranslated(BYTE *buffer, int buf_pitch, int buf_height, int x, int y, FRemapTable *remap);
virtual int CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rotate=0);
int CopyTrueColorTranslated(FBitmap *bmp, int x, int y, FRemapTable *remap);
virtual bool UseBasePalette();
virtual int GetSourceLump() { return -1; }

246
src/textures/bitmap.cpp Normal file
View File

@ -0,0 +1,246 @@
/*
** bitmap.cpp
**
**---------------------------------------------------------------------------
** Copyright 2008 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 "bitmap.h"
#include "templates.h"
//===========================================================================
//
// multi-format pixel copy with colormap application
// requires one of the previously defined conversion classes to work
//
//===========================================================================
template<class T>
void iCopyColors(BYTE *pout, const BYTE *pin, int count, int step)
{
for(int i=0;i<count;i++)
{
pout[0]=T::B(pin);
pout[1]=T::G(pin);
pout[2]=T::R(pin);
pout[3]=T::A(pin);
pout+=4;
pin+=step;
}
}
typedef void (*CopyFunc)(BYTE *pout, const BYTE *pin, int count, int step);
static CopyFunc copyfuncs[]={
iCopyColors<cRGB>,
iCopyColors<cRGBA>,
iCopyColors<cIA>,
iCopyColors<cCMYK>,
iCopyColors<cBGR>,
iCopyColors<cBGRA>,
iCopyColors<cI16>,
iCopyColors<cRGB555>,
iCopyColors<cPalEntry>
};
//===========================================================================
//
// Clips the copy area for CopyPixelData functions
//
//===========================================================================
bool ClipCopyPixelRect(int texwidth, int texheight, int &originx, int &originy,
const BYTE *&patch, int &srcwidth, int &srcheight,
int &pstep_x, int &pstep_y, int rotate)
{
int pixxoffset;
int pixyoffset;
int step_x;
int step_y;
// First adjust the settings for the intended rotation
switch (rotate)
{
default:
case 0: // normal
pixxoffset = 0;
pixyoffset = 0;
step_x = pstep_x;
step_y = pstep_y;
break;
case 1: // rotate 90° right
pixxoffset = 0;
pixyoffset = srcheight - 1;
step_x = -pstep_y;
step_y = pstep_x;
break;
case 2: // rotate 180°
pixxoffset = srcwidth - 1;
pixyoffset = srcheight - 1;
step_x = -pstep_x;
step_y = -pstep_y;
break;
case 3: // rotate 90° left
pixxoffset = srcwidth - 1;
pixyoffset = 0;
step_x = pstep_y;
step_y = -pstep_x;
break;
case 4: // flip horizontally
pixxoffset = srcwidth - 1;
pixyoffset = 0;
step_x = -pstep_x;
step_y = pstep_y;
break;
case 5: // flip horizontally and rotate 90° right
pixxoffset = srcwidth - 1;
pixyoffset = srcheight - 1;
step_x = -pstep_y;
step_y = -pstep_x;
break;
case 6: // flip vertically
pixxoffset = 0;
pixyoffset = srcheight - 1;
step_x = pstep_x;
step_y = -pstep_y;
break;
case 7: // flip horizontally and rotate 90° left
pixxoffset = 0;
pixyoffset = 0;
step_x = pstep_y;
step_y = pstep_x;
break;
}
if (rotate&1)
{
int v = srcwidth;
srcwidth = srcheight;
srcheight = v;
}
patch += pixxoffset * pstep_x + pixyoffset * pstep_y;
pstep_x = step_x;
pstep_y = step_y;
// clip source rectangle to destination
if (originx<0)
{
srcwidth+=originx;
patch-=originx*step_x;
originx=0;
if (srcwidth<=0) return false;
}
if (originx+srcwidth>texwidth)
{
srcwidth=texwidth-originx;
if (srcwidth<=0) return false;
}
if (originy<0)
{
srcheight+=originy;
patch-=originy*step_y;
originy=0;
if (srcheight<=0) return false;
}
if (originy+srcheight>texheight)
{
srcheight=texheight-originy;
if (srcheight<=0) return false;
}
return true;
}
//===========================================================================
//
// True Color texture copy function
//
//===========================================================================
void FBitmap::CopyPixelDataRGB(int originx, int originy, const BYTE *patch, int srcwidth,
int srcheight, int step_x, int step_y, int rotate, int ct)
{
if (ClipCopyPixelRect(Width, Height, originx, originy, patch, srcwidth, srcheight, step_x, step_y, rotate))
{
BYTE *buffer = data + 4 * originx + Pitch * originy;
for (int y=0;y<srcheight;y++)
{
copyfuncs[ct](&buffer[y*Pitch], &patch[y*step_y], srcwidth, step_x);
}
}
}
//===========================================================================
//
// Paletted to True Color texture copy function
//
//===========================================================================
void FBitmap::CopyPixelData(int originx, int originy, const BYTE * patch, int srcwidth, int srcheight,
int step_x, int step_y, int rotate, PalEntry * palette)
{
int x,y,pos;
if (ClipCopyPixelRect(Width, Height, originx, originy, patch, srcwidth, srcheight, step_x, step_y, rotate))
{
BYTE *buffer = data + 4*originx + Pitch*originy;
for (y=0;y<srcheight;y++)
{
pos = y*Pitch;
for (x=0;x<srcwidth;x++,pos+=4)
{
int v=(unsigned char)patch[y*step_y+x*step_x];
if (palette[v].a==0)
{
buffer[pos]=palette[v].b;
buffer[pos+1]=palette[v].g;
buffer[pos+2]=palette[v].r;
buffer[pos+3]=255;
}
else if (palette[v].a!=255)
{
// [RH] Err... This can't be right, can it?
buffer[pos ] = (buffer[pos ] * palette[v].a + palette[v].b * (1-palette[v].a)) / 255;
buffer[pos+1] = (buffer[pos+1] * palette[v].a + palette[v].g * (1-palette[v].a)) / 255;
buffer[pos+2] = (buffer[pos+2] * palette[v].a + palette[v].r * (1-palette[v].a)) / 255;
buffer[pos+3] = clamp<int>(buffer[pos+3] + (( 255-buffer[pos+3]) * (255-palette[v].a))/255, 0, 255);
}
}
}
}
}

204
src/textures/bitmap.h Normal file
View File

@ -0,0 +1,204 @@
/*
** bitmap.h
**
**---------------------------------------------------------------------------
** Copyright 2008 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.
**---------------------------------------------------------------------------
**
**
*/
#ifndef __BITMAP_H__
#define __BITMAP_H__
#include "doomtype.h"
class FBitmap
{
BYTE *data;
int Width;
int Height;
int Pitch;
bool FreeBuffer;
public:
FBitmap()
{
data = NULL;
Width = Height = 0;
Pitch = 0;
FreeBuffer = false;
}
FBitmap(BYTE *buffer, int pitch, int width, int height)
{
data = buffer;
Pitch = pitch;
Width = width;
Height = height;
FreeBuffer = false;
}
~FBitmap()
{
Destroy();
}
void Destroy()
{
if (data != NULL && FreeBuffer) delete [] data;
data = NULL;
FreeBuffer = false;
}
bool Create (int w, int h)
{
Pitch = w*4;
Width = w;
Height = h;
data = new BYTE[4*w*h];
FreeBuffer = true;
return data != NULL;
}
virtual void CopyPixelDataRGB(int originx, int originy, const BYTE *patch, int srcwidth,
int srcheight, int step_x, int step_y, int rotate, int ct);
virtual void CopyPixelData(int originx, int originy, const BYTE * patch, int srcwidth, int srcheight,
int step_x, int step_y, int rotate, PalEntry * palette);
};
bool ClipCopyPixelRect(int texwidth, int texheight, int &originx, int &originy,
const BYTE *&patch, int &srcwidth, int &srcheight,
int &step_x, int &step_y, int rotate);
//===========================================================================
//
// True color conversion classes for the different pixel formats
// used by the supported texture formats
//
//===========================================================================
struct cRGB
{
static unsigned char R(const unsigned char * p) { return p[0]; }
static unsigned char G(const unsigned char * p) { return p[1]; }
static unsigned char B(const unsigned char * p) { return p[2]; }
static unsigned char A(const unsigned char * p) { return 255; }
static int Gray(const unsigned char * p) { return (p[0]*77 + p[1]*143 + p[2]*36)>>8; }
};
struct cRGBA
{
static unsigned char R(const unsigned char * p) { return p[0]; }
static unsigned char G(const unsigned char * p) { return p[1]; }
static unsigned char B(const unsigned char * p) { return p[2]; }
static unsigned char A(const unsigned char * p) { return p[3]; }
static int Gray(const unsigned char * p) { return (p[0]*77 + p[1]*143 + p[2]*36)>>8; }
};
struct cIA
{
static unsigned char R(const unsigned char * p) { return p[0]; }
static unsigned char G(const unsigned char * p) { return p[0]; }
static unsigned char B(const unsigned char * p) { return p[0]; }
static unsigned char A(const unsigned char * p) { return p[1]; }
static int Gray(const unsigned char * p) { return p[0]; }
};
struct cCMYK
{
static unsigned char R(const unsigned char * p) { return p[3] - (((256-p[0])*p[3]) >> 8); }
static unsigned char G(const unsigned char * p) { return p[3] - (((256-p[1])*p[3]) >> 8); }
static unsigned char B(const unsigned char * p) { return p[3] - (((256-p[2])*p[3]) >> 8); }
static unsigned char A(const unsigned char * p) { return 255; }
static int Gray(const unsigned char * p) { return (R(p)*77 + G(p)*143 + B(p)*36)>>8; }
};
struct cBGR
{
static unsigned char R(const unsigned char * p) { return p[2]; }
static unsigned char G(const unsigned char * p) { return p[1]; }
static unsigned char B(const unsigned char * p) { return p[0]; }
static unsigned char A(const unsigned char * p) { return 255; }
static int Gray(const unsigned char * p) { return (p[2]*77 + p[1]*143 + p[0]*36)>>8; }
};
struct cBGRA
{
static unsigned char R(const unsigned char * p) { return p[2]; }
static unsigned char G(const unsigned char * p) { return p[1]; }
static unsigned char B(const unsigned char * p) { return p[0]; }
static unsigned char A(const unsigned char * p) { return p[3]; }
static int Gray(const unsigned char * p) { return (p[2]*77 + p[1]*143 + p[0]*36)>>8; }
};
struct cI16
{
static unsigned char R(const unsigned char * p) { return p[1]; }
static unsigned char G(const unsigned char * p) { return p[1]; }
static unsigned char B(const unsigned char * p) { return p[1]; }
static unsigned char A(const unsigned char * p) { return 255; }
static int Gray(const unsigned char * p) { return p[1]; }
};
struct cRGB555
{
static unsigned char R(const unsigned char * p) { return (((*(WORD*)p)&0x1f)<<3); }
static unsigned char G(const unsigned char * p) { return (((*(WORD*)p)&0x3e0)>>2); }
static unsigned char B(const unsigned char * p) { return (((*(WORD*)p)&0x7c00)>>7); }
static unsigned char A(const unsigned char * p) { return p[1]; }
static int Gray(const unsigned char * p) { return (R(p)*77 + G(p)*143 + B(p)*36)>>8; }
};
struct cPalEntry
{
static unsigned char R(const unsigned char * p) { return ((PalEntry*)p)->r; }
static unsigned char G(const unsigned char * p) { return ((PalEntry*)p)->g; }
static unsigned char B(const unsigned char * p) { return ((PalEntry*)p)->b; }
static unsigned char A(const unsigned char * p) { return ((PalEntry*)p)->a; }
static int Gray(const unsigned char * p) { return (R(p)*77 + G(p)*143 + B(p)*36)>>8; }
};
enum ColorType
{
CF_RGB,
CF_RGBA,
CF_IA,
CF_CMYK,
CF_BGR,
CF_BGRA,
CF_I16,
CF_RGB555,
CF_PalEntry
};
#endif

View File

@ -53,6 +53,7 @@
#include "r_local.h"
#include "w_wad.h"
#include "templates.h"
#include "bitmap.h"
// Since we want this to compile under Linux too, we need to define this
// stuff ourselves instead of including a DirectX header.
@ -742,7 +743,7 @@ void FDDSTexture::DecompressDXT5 (FWadLump &lump, bool premultiplied, BYTE *tcbu
//
//===========================================================================
int FDDSTexture::CopyTrueColorPixels(BYTE *buffer, int buf_pitch, int buf_height, int x, int y, int rotate)
int FDDSTexture::CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rotate)
{
FWadLump lump = Wads.OpenLumpNum (SourceLump);
@ -768,7 +769,7 @@ int FDDSTexture::CopyTrueColorPixels(BYTE *buffer, int buf_pitch, int buf_height
}
// All formats decompress to RGBA.
screen->CopyPixelDataRGB(buffer, buf_pitch, buf_height, x, y, TexBuffer, Width, Height, 4, Width*4, rotate, CF_RGBA);
bmp->CopyPixelDataRGB(x, y, TexBuffer, Width, Height, 4, Width*4, rotate, CF_RGBA);
delete [] TexBuffer;
return -1;
}

View File

@ -39,6 +39,7 @@
#include "r_jpeg.h"
#include "w_wad.h"
#include "v_text.h"
#include "bitmap.h"
void FLumpSourceMgr::InitSource (j_decompress_ptr cinfo)
{
@ -332,7 +333,7 @@ void FJPEGTexture::MakeTexture ()
//
//===========================================================================
int FJPEGTexture::CopyTrueColorPixels(BYTE *buffer, int buf_pitch, int buf_height, int x, int y, int rotate)
int FJPEGTexture::CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rotate)
{
PalEntry pe[256];
@ -375,18 +376,18 @@ int FJPEGTexture::CopyTrueColorPixels(BYTE *buffer, int buf_pitch, int buf_heigh
switch (cinfo.out_color_space)
{
case JCS_RGB:
screen->CopyPixelDataRGB(buffer, buf_pitch, buf_height, x, y, buff, cinfo.output_width, cinfo.output_height,
bmp->CopyPixelDataRGB(x, y, buff, cinfo.output_width, cinfo.output_height,
3, cinfo.output_width * cinfo.output_components, rotate, CF_RGB);
break;
case JCS_GRAYSCALE:
for(int i=0;i<256;i++) pe[i]=PalEntry(0,i,i,i); // default to a gray map
screen->CopyPixelData(buffer, buf_pitch, buf_height, x, y, buff, cinfo.output_width, cinfo.output_height,
bmp->CopyPixelData(x, y, buff, cinfo.output_width, cinfo.output_height,
1, cinfo.output_width, rotate, pe);
break;
case JCS_CMYK:
screen->CopyPixelDataRGB(buffer, buf_pitch, buf_height, x, y, buff, cinfo.output_width, cinfo.output_height,
bmp->CopyPixelDataRGB(x, y, buff, cinfo.output_width, cinfo.output_height,
4, cinfo.output_width * cinfo.output_components, rotate, CF_CMYK);
break;

View File

@ -304,14 +304,13 @@ void FMultiPatchTexture::MakeTexture ()
//
//===========================================================================
int FMultiPatchTexture::CopyTrueColorPixels(BYTE *buffer, int buf_pitch, int buf_height, int x, int y, int rotate)
int FMultiPatchTexture::CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rotate)
{
int retv = -1;
for(int i=0;i<NumParts;i++)
{
int ret = Parts[i].Texture->CopyTrueColorPixels(buffer, buf_pitch, buf_height,
x+Parts[i].OriginX, y+Parts[i].OriginY, Parts[i].Rotate);
int ret = Parts[i].Texture->CopyTrueColorPixels(bmp, x+Parts[i].OriginX, y+Parts[i].OriginY, Parts[i].Rotate);
if (ret > retv) retv = ret;
}

View File

@ -39,6 +39,7 @@
#include "r_local.h"
#include "w_wad.h"
#include "templates.h"
#include "bitmap.h"
bool FPCXTexture::Check(FileReader & file)
@ -418,7 +419,7 @@ void FPCXTexture::MakeTexture()
//
//===========================================================================
int FPCXTexture::CopyTrueColorPixels(BYTE *buffer, int buf_pitch, int buf_height, int x, int y, int rotate)
int FPCXTexture::CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rotate)
{
PalEntry pe[256];
PCXHeader header;
@ -472,14 +473,13 @@ int FPCXTexture::CopyTrueColorPixels(BYTE *buffer, int buf_pitch, int buf_height
lump.Seek(sizeof(header), SEEK_SET);
ReadPCX8bits (Pixels, lump, &header);
}
screen->CopyPixelData(buffer, buf_pitch, buf_height, x, y, Pixels, Width, Height, 1, Width, rotate, pe);
bmp->CopyPixelData(x, y, Pixels, Width, Height, 1, Width, rotate, pe);
}
else
{
Pixels = new BYTE[Width*Height * 3];
BYTE * row = buffer;
ReadPCX24bits (Pixels, lump, &header, 3);
screen->CopyPixelDataRGB(buffer, buf_pitch, buf_height, x, y, Pixels, Width, Height, 3, Width*3, rotate, CF_RGB);
bmp->CopyPixelDataRGB(x, y, Pixels, Width, Height, 3, Width*3, rotate, CF_RGB);
}
delete [] Pixels;
return 0;

View File

@ -39,6 +39,7 @@
#include "w_wad.h"
#include "templates.h"
#include "m_png.h"
#include "bitmap.h"
bool FPNGTexture::Check(FileReader & file)
@ -490,7 +491,7 @@ void FPNGTexture::MakeTexture ()
//
//===========================================================================
int FPNGTexture::CopyTrueColorPixels(BYTE *buffer, int buf_pitch, int buf_height, int x, int y, int rotate)
int FPNGTexture::CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rotate)
{
// Parse pre-IDAT chunks. I skip the CRCs. Is that bad?
PalEntry pe[256];
@ -554,20 +555,20 @@ int FPNGTexture::CopyTrueColorPixels(BYTE *buffer, int buf_pitch, int buf_height
{
case 0:
case 3:
screen->CopyPixelData(buffer, buf_pitch, buf_height, x, y, Pixels, Width, Height, 1, Width, rotate, pe);
bmp->CopyPixelData(x, y, Pixels, Width, Height, 1, Width, rotate, pe);
break;
case 2:
screen->CopyPixelDataRGB(buffer, buf_pitch, buf_height, x, y, Pixels, Width, Height, 3, pixwidth, rotate, CF_RGB);
bmp->CopyPixelDataRGB(x, y, Pixels, Width, Height, 3, pixwidth, rotate, CF_RGB);
break;
case 4:
screen->CopyPixelDataRGB(buffer, buf_pitch, buf_height, x, y, Pixels, Width, Height, 2, pixwidth, rotate, CF_IA);
bmp->CopyPixelDataRGB(x, y, Pixels, Width, Height, 2, pixwidth, rotate, CF_IA);
transpal = -1;
break;
case 6:
screen->CopyPixelDataRGB(buffer, buf_pitch, buf_height, x, y, Pixels, Width, Height, 4, pixwidth, rotate, CF_RGBA);
bmp->CopyPixelDataRGB(x, y, Pixels, Width, Height, 4, pixwidth, rotate, CF_RGBA);
transpal = -1;
break;

View File

@ -40,6 +40,7 @@
#include "templates.h"
#include "i_system.h"
#include "r_translate.h"
#include "bitmap.h"
typedef bool (*CheckFunc)(FileReader & file);
typedef FTexture * (*CreateFunc)(FileReader & file, int lumpnum);
@ -456,8 +457,11 @@ void FTexture::FillBuffer(BYTE *buff, int pitch, int height, FTextureFormat fmt)
break;
case TEX_RGB:
CopyTrueColorPixels(buff, pitch, height, 0, 0);
{
FBitmap bmp(buff, pitch, pitch, height);
CopyTrueColorPixels(&bmp, 0, 0);
break;
}
default:
I_Error("FTexture::FillBuffer: Unsupported format %d", fmt);
@ -476,25 +480,21 @@ void FTexture::FillBuffer(BYTE *buff, int pitch, int height, FTextureFormat fmt)
//
//===========================================================================
int FTexture::CopyTrueColorPixels(BYTE *buffer, int buf_pitch, int buf_height, int x, int y, int rotate)
int FTexture::CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rotate)
{
PalEntry *palette = screen->GetPalette();
palette[0].a=255; // temporarily modify the first color's alpha
screen->CopyPixelData(buffer, buf_pitch, buf_height, x, y,
GetPixels(), Width, Height, Height, 1,
rotate, palette);
bmp->CopyPixelData(x, y, GetPixels(), Width, Height, Height, 1, rotate, palette);
palette[0].a=0;
return 0;
}
int FTexture::CopyTrueColorTranslated(BYTE *buffer, int buf_pitch, int buf_height, int x, int y, FRemapTable *remap)
int FTexture::CopyTrueColorTranslated(FBitmap *bmp, int x, int y, FRemapTable *remap)
{
PalEntry *palette = remap->Palette;
palette[0].a=255; // temporarily modify the first color's alpha
screen->CopyPixelData(buffer, buf_pitch, buf_height, x, y,
GetPixels(), Width, Height, Height, 1,
0, palette);
bmp->CopyPixelData(x, y, GetPixels(), Width, Height, Height, 1, 0, palette);
palette[0].a=0;
return 0;

View File

@ -38,6 +38,7 @@
#include "r_local.h"
#include "w_wad.h"
#include "templates.h"
#include "bitmap.h"
bool FTGATexture::Check(FileReader & data)
@ -384,7 +385,7 @@ void FTGATexture::MakeTexture ()
//
//===========================================================================
int FTGATexture::CopyTrueColorPixels(BYTE *buffer, int buf_pitch, int buf_height, int x, int y, int rotate)
int FTGATexture::CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rotate)
{
PalEntry pe[256];
FWadLump lump = Wads.OpenLumpNum (SourceLump);
@ -469,7 +470,7 @@ int FTGATexture::CopyTrueColorPixels(BYTE *buffer, int buf_pitch, int buf_height
switch (hdr.img_type & 7)
{
case 1: // paletted
screen->CopyPixelData(buffer, buf_pitch, buf_height, x, y, ptr, Width, Height, step_x, Pitch, rotate, pe);
bmp->CopyPixelData(x, y, ptr, Width, Height, step_x, Pitch, rotate, pe);
break;
case 2: // RGB
@ -477,21 +478,21 @@ int FTGATexture::CopyTrueColorPixels(BYTE *buffer, int buf_pitch, int buf_height
{
case 15:
case 16:
screen->CopyPixelDataRGB(buffer, buf_pitch, buf_height, x, y, ptr, Width, Height, step_x, Pitch, rotate, CF_RGB555);
bmp->CopyPixelDataRGB(x, y, ptr, Width, Height, step_x, Pitch, rotate, CF_RGB555);
break;
case 24:
screen->CopyPixelDataRGB(buffer, buf_pitch, buf_height, x, y, ptr, Width, Height, step_x, Pitch, rotate, CF_BGR);
bmp->CopyPixelDataRGB(x, y, ptr, Width, Height, step_x, Pitch, rotate, CF_BGR);
break;
case 32:
if ((hdr.img_desc&15)!=8) // 32 bits without a valid alpha channel
{
screen->CopyPixelDataRGB(buffer, buf_pitch, buf_height, x, y, ptr, Width, Height, step_x, Pitch, rotate, CF_BGR);
bmp->CopyPixelDataRGB(x, y, ptr, Width, Height, step_x, Pitch, rotate, CF_BGR);
}
else
{
screen->CopyPixelDataRGB(buffer, buf_pitch, buf_height, x, y, ptr, Width, Height, step_x, Pitch, rotate, CF_BGRA);
bmp->CopyPixelDataRGB(x, y, ptr, Width, Height, step_x, Pitch, rotate, CF_BGRA);
transval = -1;
}
break;
@ -506,11 +507,11 @@ int FTGATexture::CopyTrueColorPixels(BYTE *buffer, int buf_pitch, int buf_height
{
case 8:
for(int i=0;i<256;i++) pe[i]=PalEntry(0,i,i,i); // gray map
screen->CopyPixelData(buffer, buf_pitch, buf_height, x, y, ptr, Width, Height, step_x, Pitch, rotate, pe);
bmp->CopyPixelData(x, y, ptr, Width, Height, step_x, Pitch, rotate, pe);
break;
case 16:
screen->CopyPixelDataRGB(buffer, buf_pitch, buf_height, x, y, ptr, Width, Height, step_x, Pitch, rotate, CF_I16);
bmp->CopyPixelDataRGB(x, y, ptr, Width, Height, step_x, Pitch, rotate, CF_I16);
break;
default:

View File

@ -1157,216 +1157,6 @@ void DFrameBuffer::WipeCleanup()
wipe_Cleanup();
}
//===========================================================================
//
// multi-format pixel copy with colormap application
// requires one of the previously defined conversion classes to work
//
//===========================================================================
template<class T>
void iCopyColors(BYTE *pout, const BYTE *pin, int count, int step)
{
for(int i=0;i<count;i++)
{
pout[0]=T::B(pin);
pout[1]=T::G(pin);
pout[2]=T::R(pin);
pout[3]=T::A(pin);
pout+=4;
pin+=step;
}
}
typedef void (*CopyFunc)(BYTE *pout, const BYTE *pin, int count, int step);
static CopyFunc copyfuncs[]={
iCopyColors<cRGB>,
iCopyColors<cRGBA>,
iCopyColors<cIA>,
iCopyColors<cCMYK>,
iCopyColors<cBGR>,
iCopyColors<cBGRA>,
iCopyColors<cI16>,
iCopyColors<cRGB555>,
iCopyColors<cPalEntry>
};
//===========================================================================
//
// Clips the copy area for CopyPixelData functions
//
//===========================================================================
bool ClipCopyPixelRect(int texwidth, int texheight, int &originx, int &originy,
const BYTE *&patch, int &srcwidth, int &srcheight,
int &pstep_x, int &pstep_y, int rotate)
{
int pixxoffset;
int pixyoffset;
int step_x;
int step_y;
// First adjust the settings for the intended rotation
switch (rotate)
{
default:
case 0: // normal
pixxoffset = 0;
pixyoffset = 0;
step_x = pstep_x;
step_y = pstep_y;
break;
case 1: // rotate 90° right
pixxoffset = 0;
pixyoffset = srcheight - 1;
step_x = -pstep_y;
step_y = pstep_x;
break;
case 2: // rotate 180°
pixxoffset = srcwidth - 1;
pixyoffset = srcheight - 1;
step_x = -pstep_x;
step_y = -pstep_y;
break;
case 3: // rotate 90° left
pixxoffset = srcwidth - 1;
pixyoffset = 0;
step_x = pstep_y;
step_y = -pstep_x;
break;
case 4: // flip horizontally
pixxoffset = srcwidth - 1;
pixyoffset = 0;
step_x = -pstep_x;
step_y = pstep_y;
break;
case 5: // flip horizontally and rotate 90° right
pixxoffset = srcwidth - 1;
pixyoffset = srcheight - 1;
step_x = -pstep_y;
step_y = -pstep_x;
break;
case 6: // flip vertically
pixxoffset = 0;
pixyoffset = srcheight - 1;
step_x = pstep_x;
step_y = -pstep_y;
break;
case 7: // flip horizontally and rotate 90° left
pixxoffset = 0;
pixyoffset = 0;
step_x = pstep_y;
step_y = pstep_x;
break;
}
if (rotate&1)
{
int v = srcwidth;
srcwidth = srcheight;
srcheight = v;
}
patch += pixxoffset * pstep_x + pixyoffset * pstep_y;
pstep_x = step_x;
pstep_y = step_y;
// clip source rectangle to destination
if (originx<0)
{
srcwidth+=originx;
patch-=originx*step_x;
originx=0;
if (srcwidth<=0) return false;
}
if (originx+srcwidth>texwidth)
{
srcwidth=texwidth-originx;
if (srcwidth<=0) return false;
}
if (originy<0)
{
srcheight+=originy;
patch-=originy*step_y;
originy=0;
if (srcheight<=0) return false;
}
if (originy+srcheight>texheight)
{
srcheight=texheight-originy;
if (srcheight<=0) return false;
}
return true;
}
//===========================================================================
//
// True Color texture copy function
//
//===========================================================================
void DFrameBuffer::CopyPixelDataRGB(BYTE *buffer, int texpitch, int texheight, int originx, int originy,
const BYTE *patch, int srcwidth, int srcheight, int step_x, int step_y,
int rotate, int ct)
{
if (ClipCopyPixelRect(texpitch/4, texheight, originx, originy, patch, srcwidth, srcheight, step_x, step_y, rotate))
{
buffer+=4*originx + texpitch*originy;
for (int y=0;y<srcheight;y++)
{
copyfuncs[ct](&buffer[y*texpitch], &patch[y*step_y], srcwidth, step_x);
}
}
}
//===========================================================================
//
// Paletted to True Color texture copy function
//
//===========================================================================
void DFrameBuffer::CopyPixelData(BYTE * buffer, int texpitch, int texheight, int originx, int originy,
const BYTE * patch, int srcwidth, int srcheight,
int step_x, int step_y, int rotate, PalEntry * palette)
{
int x,y,pos;
if (ClipCopyPixelRect(texpitch/4, texheight, originx, originy, patch, srcwidth, srcheight, step_x, step_y, rotate))
{
buffer+=4*originx + texpitch*originy;
for (y=0;y<srcheight;y++)
{
pos=y*texpitch;
for (x=0;x<srcwidth;x++,pos+=4)
{
int v=(unsigned char)patch[y*step_y+x*step_x];
if (palette[v].a==0)
{
buffer[pos]=palette[v].b;
buffer[pos+1]=palette[v].g;
buffer[pos+2]=palette[v].r;
buffer[pos+3]=255;
}
else if (palette[v].a!=255)
{
// [RH] Err... This can't be right, can it?
buffer[pos ] = (buffer[pos ] * palette[v].a + palette[v].b * (1-palette[v].a)) / 255;
buffer[pos+1] = (buffer[pos+1] * palette[v].a + palette[v].g * (1-palette[v].a)) / 255;
buffer[pos+2] = (buffer[pos+2] * palette[v].a + palette[v].r * (1-palette[v].a)) / 255;
buffer[pos+3] = clamp<int>(buffer[pos+3] + (( 255-buffer[pos+3]) * (255-palette[v].a))/255, 0, 255);
}
}
}
}
}
//===========================================================================
//
// Texture precaching

View File

@ -372,15 +372,6 @@ public:
// Create a palette texture from a remap/palette table.
virtual FNativePalette *CreatePalette(FRemapTable *remap);
// texture copy functions
virtual void CopyPixelDataRGB(BYTE *buffer, int texpitch, int texheight, int originx, int originy,
const BYTE *patch, int pix_width, int pix_height, int step_x, int step_y,
int rotate, int ct);
virtual void CopyPixelData(BYTE *buffer, int texpitch, int texheight, int originx, int originy,
const BYTE *patch, int pix_width, int pix_height,
int step_x, int step_y, int rotate, PalEntry * palette);
// Precaches or unloads a texture
virtual void PrecacheTexture(FTexture *tex, int cache);
@ -405,9 +396,6 @@ private:
DWORD LastMS, LastSec, FrameCount, LastCount, LastTic;
};
bool ClipCopyPixelRect(int texwidth, int texheight, int &originx, int &originy,
const BYTE *&patch, int &srcwidth, int &srcheight,
int &step_x, int &step_y, int rotate);
extern FColorMatcher ColorMatcher;
@ -478,106 +466,5 @@ int CheckRatio (int width, int height);
extern const int BaseRatioSizes[5][4];
//===========================================================================
//
// True color conversion classes for the different pixel formats
// used by the supported texture formats
//
//===========================================================================
struct cRGB
{
static unsigned char R(const unsigned char * p) { return p[0]; }
static unsigned char G(const unsigned char * p) { return p[1]; }
static unsigned char B(const unsigned char * p) { return p[2]; }
static unsigned char A(const unsigned char * p) { return 255; }
static int Gray(const unsigned char * p) { return (p[0]*77 + p[1]*143 + p[2]*36)>>8; }
};
struct cRGBA
{
static unsigned char R(const unsigned char * p) { return p[0]; }
static unsigned char G(const unsigned char * p) { return p[1]; }
static unsigned char B(const unsigned char * p) { return p[2]; }
static unsigned char A(const unsigned char * p) { return p[3]; }
static int Gray(const unsigned char * p) { return (p[0]*77 + p[1]*143 + p[2]*36)>>8; }
};
struct cIA
{
static unsigned char R(const unsigned char * p) { return p[0]; }
static unsigned char G(const unsigned char * p) { return p[0]; }
static unsigned char B(const unsigned char * p) { return p[0]; }
static unsigned char A(const unsigned char * p) { return p[1]; }
static int Gray(const unsigned char * p) { return p[0]; }
};
struct cCMYK
{
static unsigned char R(const unsigned char * p) { return p[3] - (((256-p[0])*p[3]) >> 8); }
static unsigned char G(const unsigned char * p) { return p[3] - (((256-p[1])*p[3]) >> 8); }
static unsigned char B(const unsigned char * p) { return p[3] - (((256-p[2])*p[3]) >> 8); }
static unsigned char A(const unsigned char * p) { return 255; }
static int Gray(const unsigned char * p) { return (R(p)*77 + G(p)*143 + B(p)*36)>>8; }
};
struct cBGR
{
static unsigned char R(const unsigned char * p) { return p[2]; }
static unsigned char G(const unsigned char * p) { return p[1]; }
static unsigned char B(const unsigned char * p) { return p[0]; }
static unsigned char A(const unsigned char * p) { return 255; }
static int Gray(const unsigned char * p) { return (p[2]*77 + p[1]*143 + p[0]*36)>>8; }
};
struct cBGRA
{
static unsigned char R(const unsigned char * p) { return p[2]; }
static unsigned char G(const unsigned char * p) { return p[1]; }
static unsigned char B(const unsigned char * p) { return p[0]; }
static unsigned char A(const unsigned char * p) { return p[3]; }
static int Gray(const unsigned char * p) { return (p[2]*77 + p[1]*143 + p[0]*36)>>8; }
};
struct cI16
{
static unsigned char R(const unsigned char * p) { return p[1]; }
static unsigned char G(const unsigned char * p) { return p[1]; }
static unsigned char B(const unsigned char * p) { return p[1]; }
static unsigned char A(const unsigned char * p) { return 255; }
static int Gray(const unsigned char * p) { return p[1]; }
};
struct cRGB555
{
static unsigned char R(const unsigned char * p) { return (((*(WORD*)p)&0x1f)<<3); }
static unsigned char G(const unsigned char * p) { return (((*(WORD*)p)&0x3e0)>>2); }
static unsigned char B(const unsigned char * p) { return (((*(WORD*)p)&0x7c00)>>7); }
static unsigned char A(const unsigned char * p) { return p[1]; }
static int Gray(const unsigned char * p) { return (R(p)*77 + G(p)*143 + B(p)*36)>>8; }
};
struct cPalEntry
{
static unsigned char R(const unsigned char * p) { return ((PalEntry*)p)->r; }
static unsigned char G(const unsigned char * p) { return ((PalEntry*)p)->g; }
static unsigned char B(const unsigned char * p) { return ((PalEntry*)p)->b; }
static unsigned char A(const unsigned char * p) { return ((PalEntry*)p)->a; }
static int Gray(const unsigned char * p) { return (R(p)*77 + G(p)*143 + B(p)*36)>>8; }
};
enum ColorType
{
CF_RGB,
CF_RGBA,
CF_IA,
CF_CMYK,
CF_BGR,
CF_BGRA,
CF_I16,
CF_RGB555,
CF_PalEntry
};
#endif // __V_VIDEO_H__

View File

@ -205,6 +205,7 @@ ACTOR WolfensteinSS 84
DeathSound "wolfss/death"
ActiveSound "wolfss/active"
AttackSound "wolfss/attack"
Obituary "$OB_WOLFSS"
Dropitem "Clip"
States
{

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Version="8,00"
Name="zdoom"
ProjectGUID="{8049475B-5C87-46F9-9358-635218A4EF18}"
RootNamespace=" zdoom"
@ -135,6 +135,112 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
>
<Tool
Name="VCPreBuildEventTool"
Description="Checking svnrevision.h..."
CommandLine="$(OutDir)\updaterevision.exe src src/svnrevision.h"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Debug/zdoom.tlb"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="src\win32;src\sound;src;zlib;src\g_shared;src\g_doom;src\g_raven;src\g_heretic;src\g_hexen;src\g_strife;jpeg-6b;snes_spc\snes_spc"
PreprocessorDefinitions="WIN32,_DEBUG,_WIN32,_WINDOWS,USEASM,_CRTDBG_MAP_ALLOC,HAVE_STRUPR,HAVE_FILELENGTH"
MinimalRebuild="true"
RuntimeLibrary="1"
EnableFunctionLevelLinking="true"
ForceConformanceInForLoopScope="true"
PrecompiledHeaderFile=""
AssemblerOutput="4"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="true"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
CompileAs="0"
DisableSpecificWarnings="4996"
ForcedIncludeFiles=""
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="gdi32.lib user32.lib comctl32.lib shell32.lib advapi32.lib comdlg32.lib ole32.lib dxguid.lib dsound.lib dinput8.lib strmiids.lib wsock32.lib winmm.lib fmodex_vc.lib setupapi.lib ws2_32.lib"
OutputFile="../zdoomd.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
AdditionalLibraryDirectories=""
IgnoreDefaultLibraryNames="libcmt;msvcrtd;msvcrt"
GenerateDebugInformation="true"
ProgramDatabaseFile=".\Debug/zdoomd.pdb"
SubSystem="2"
StackReserveSize="0"
TerminalServerAware="2"
SetChecksum="false"
TargetMachine="0"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
@ -249,112 +355,6 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
>
<Tool
Name="VCPreBuildEventTool"
Description="Checking svnrevision.h..."
CommandLine="$(OutDir)\updaterevision.exe src src/svnrevision.h"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Debug/zdoom.tlb"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="src\win32;src\sound;src;zlib;src\g_shared;src\g_doom;src\g_raven;src\g_heretic;src\g_hexen;src\g_strife;jpeg-6b;snes_spc\snes_spc"
PreprocessorDefinitions="WIN32,_DEBUG,_WIN32,_WINDOWS,USEASM,_CRTDBG_MAP_ALLOC,HAVE_STRUPR,HAVE_FILELENGTH"
MinimalRebuild="true"
RuntimeLibrary="1"
EnableFunctionLevelLinking="true"
ForceConformanceInForLoopScope="true"
PrecompiledHeaderFile=""
AssemblerOutput="4"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="true"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
CompileAs="0"
DisableSpecificWarnings="4996"
ForcedIncludeFiles=""
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="gdi32.lib user32.lib comctl32.lib shell32.lib advapi32.lib comdlg32.lib ole32.lib dxguid.lib dsound.lib dinput8.lib strmiids.lib wsock32.lib winmm.lib fmodex_vc.lib setupapi.lib ws2_32.lib"
OutputFile="../zdoomd.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
AdditionalLibraryDirectories=""
IgnoreDefaultLibraryNames="libcmt;msvcrtd;msvcrt"
GenerateDebugInformation="true"
ProgramDatabaseFile=".\Debug/zdoomd.pdb"
SubSystem="2"
StackReserveSize="0"
TerminalServerAware="2"
SetChecksum="false"
TargetMachine="0"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
@ -924,16 +924,6 @@
Outputs="&quot;src/$(InputName).h&quot;"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCustomBuildTool"
Description="Creating $(InputName).h from src/$(InputFileName)"
CommandLine="tools\re2c\re2c -s -o &quot;src/$(InputName).h&quot; &quot;src/$(InputFileName)&quot;&#x0D;&#x0A;"
Outputs="&quot;src/$(InputName).h&quot;"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
@ -944,6 +934,16 @@
Outputs="&quot;src/$(InputName).h&quot;"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCustomBuildTool"
Description="Creating $(InputName).h from src/$(InputFileName)"
CommandLine="tools\re2c\re2c -s -o &quot;src/$(InputName).h&quot; &quot;src/$(InputFileName)&quot;&#x0D;&#x0A;"
Outputs="&quot;src/$(InputName).h&quot;"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
@ -1538,16 +1538,6 @@
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCustomBuildTool"
Description="Assembling $(InputPath)..."
CommandLine="nasm -o $(IntDir)\$(InputName).obj -f win32 $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)/$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
@ -1558,6 +1548,16 @@
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCustomBuildTool"
Description="Assembling $(InputPath)..."
CommandLine="nasm -o $(IntDir)\$(InputName).obj -f win32 $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)/$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
@ -1582,16 +1582,6 @@
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCustomBuildTool"
Description="Assembling $(InputPath)..."
CommandLine="nasm -o $(IntDir)\$(InputName).obj -f win32 $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)/$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
@ -1602,6 +1592,16 @@
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCustomBuildTool"
Description="Assembling $(InputPath)..."
CommandLine="nasm -o $(IntDir)\$(InputName).obj -f win32 $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)/$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
@ -1626,16 +1626,6 @@
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCustomBuildTool"
Description="Assembling $(InputPath)..."
CommandLine="nasm -o $(IntDir)\$(InputName).obj -f win32 $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
@ -1646,6 +1636,16 @@
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCustomBuildTool"
Description="Assembling $(InputPath)..."
CommandLine="nasm -o $(IntDir)\$(InputName).obj -f win32 $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
@ -1670,16 +1670,6 @@
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCustomBuildTool"
Description="Assembling $(InputPath)..."
CommandLine="nasm -o $(IntDir)\$(InputName).obj -f win32 $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
@ -1690,6 +1680,16 @@
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCustomBuildTool"
Description="Assembling $(InputPath)..."
CommandLine="nasm -o $(IntDir)\$(InputName).obj -f win32 $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
@ -1714,16 +1714,6 @@
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCustomBuildTool"
Description="Assembling $(InputPath)..."
CommandLine="nasm -o $(IntDir)\$(InputName).obj -f win32 $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
@ -1734,6 +1724,16 @@
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCustomBuildTool"
Description="Assembling $(InputPath)..."
CommandLine="nasm -o $(IntDir)\$(InputName).obj -f win32 $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
@ -1898,14 +1898,6 @@
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
@ -1916,6 +1908,14 @@
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
ExcludedFromBuild="true"
@ -2636,6 +2636,14 @@
RelativePath=".\src\textures\automaptexture.cpp"
>
</File>
<File
RelativePath=".\src\textures\bitmap.cpp"
>
</File>
<File
RelativePath=".\src\textures\bitmap.h"
>
</File>
<File
RelativePath=".\src\textures\buildtexture.cpp"
>
@ -2765,14 +2773,6 @@
AdditionalIncludeDirectories="src\win32;$(NoInherit)"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="src\win32;$(NoInherit)"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
@ -2782,6 +2782,14 @@
AdditionalIncludeDirectories="src\win32;$(NoInherit)"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="src\win32;$(NoInherit)"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
@ -3024,7 +3032,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
@ -3032,7 +3040,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
Name="Release|x64"
ExcludedFromBuild="true"
>
<Tool
@ -3064,7 +3072,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
@ -3072,7 +3080,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
Name="Release|x64"
ExcludedFromBuild="true"
>
<Tool
@ -3101,7 +3109,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
@ -3110,7 +3118,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
Name="Release|x64"
ExcludedFromBuild="true"
>
<Tool
@ -3140,7 +3148,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
@ -3148,7 +3156,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
Name="Release|x64"
ExcludedFromBuild="true"
>
<Tool
@ -3177,7 +3185,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
@ -3186,7 +3194,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
Name="Release|x64"
ExcludedFromBuild="true"
>
<Tool
@ -3217,7 +3225,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
@ -3226,7 +3234,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
Name="Release|x64"
ExcludedFromBuild="true"
>
<Tool
@ -3256,7 +3264,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
@ -3264,7 +3272,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
Name="Release|x64"
ExcludedFromBuild="true"
>
<Tool
@ -3293,7 +3301,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
@ -3302,7 +3310,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
Name="Release|x64"
ExcludedFromBuild="true"
>
<Tool
@ -3333,7 +3341,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
@ -3342,7 +3350,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
Name="Release|x64"
ExcludedFromBuild="true"
>
<Tool
@ -3373,7 +3381,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
@ -3382,7 +3390,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
Name="Release|x64"
ExcludedFromBuild="true"
>
<Tool
@ -3412,7 +3420,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
@ -3420,7 +3428,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
Name="Release|x64"
ExcludedFromBuild="true"
>
<Tool
@ -3448,7 +3456,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
@ -3456,7 +3464,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
Name="Release|x64"
ExcludedFromBuild="true"
>
<Tool
@ -3484,7 +3492,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
@ -3492,7 +3500,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
Name="Release|x64"
ExcludedFromBuild="true"
>
<Tool
@ -3520,7 +3528,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
@ -3528,7 +3536,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
Name="Release|x64"
ExcludedFromBuild="true"
>
<Tool
@ -3558,7 +3566,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
@ -3568,7 +3576,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
Name="Release|x64"
ExcludedFromBuild="true"
>
<Tool