Update to Master

This commit is contained in:
Asdow
2025-08-08 18:00:31 +03:00
338 changed files with 110651 additions and 115875 deletions
+1 -1
View File
@@ -180,4 +180,4 @@ void PlayButtonSound( INT32 iButtonID, INT32 iSoundType )
}
}
}
+35 -120
View File
@@ -794,10 +794,7 @@ BOOLEAN InitializeButtonImageManager(INT32 DefaultBuffer, INT32 DefaultPitch, IN
return(FALSE);
}
if(GETPIXELDEPTH()==16)
GenericButtonFillColors[0]=GenericButtonOffNormal[0]->p16BPPPalette[Pix];
else if(GETPIXELDEPTH()==8)
GenericButtonFillColors[0]=COLOR_DKGREY;
GenericButtonFillColors[0]=GenericButtonOffNormal[0]->p16BPPPalette[Pix];
return(TRUE);
}
@@ -3689,145 +3686,63 @@ void DrawGenericButton(GUI_BUTTON *b)
else
ImgNum=1;
if(gbPixelDepth==16)
{
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
(INT32)(b->XLoc + (q*iBorderWidth)),
(INT32)b->YLoc,
(UINT16)ImgNum, &ClipRect );
}
else if(gbPixelDepth==8)
{
Blt8BPPDataTo8BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
(INT32)(b->XLoc + (q*iBorderWidth)),
(INT32)b->YLoc,
(UINT16)ImgNum, &ClipRect );
}
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
(INT32)(b->XLoc + (q*iBorderWidth)),
(INT32)b->YLoc,
(UINT16)ImgNum, &ClipRect );
if(q==0)
ImgNum=5;
else
ImgNum=6;
if(gbPixelDepth==16)
{
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
(INT32)(b->XLoc + (q*iBorderWidth)),
cy, (UINT16)ImgNum, &ClipRect );
}
else if(gbPixelDepth==8)
{
Blt8BPPDataTo8BPPBufferTransparentClip((UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
(INT32)(b->XLoc + (q*iBorderWidth)),
cy, (UINT16)ImgNum, &ClipRect );
}
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
(INT32)(b->XLoc + (q*iBorderWidth)),
cy, (UINT16)ImgNum, &ClipRect );
}
// Blit the right side corners
if(gbPixelDepth==16)
{
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
cx, (INT32)b->YLoc,
2, &ClipRect );
}
else if(gbPixelDepth==8)
{
Blt8BPPDataTo8BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
cx, (INT32)b->YLoc,
2, &ClipRect );
}
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
cx, (INT32)b->YLoc,
2, &ClipRect );
if(gbPixelDepth==16)
{
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
cx, cy, 7, &ClipRect );
}
else if(gbPixelDepth==8)
{
Blt8BPPDataTo8BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
cx, cy, 7, &ClipRect );
}
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
cx, cy, 7, &ClipRect );
// Draw the vertical members of the button's borders
NumChunksHigh--;
if(hremain!=0)
{
q=NumChunksHigh;
if(gbPixelDepth==16)
{
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
(INT32)b->XLoc,
(INT32)(b->YLoc + (q*iBorderHeight) - (iBorderHeight-hremain)),
3, &ClipRect );
}
else if(gbPixelDepth==8)
{
Blt8BPPDataTo8BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
(INT32)b->XLoc,
(INT32)(b->YLoc + (q*iBorderHeight) - (iBorderHeight-hremain)),
3, &ClipRect );
}
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
(INT32)b->XLoc,
(INT32)(b->YLoc + (q*iBorderHeight) - (iBorderHeight-hremain)),
3, &ClipRect );
if(gbPixelDepth==16)
{
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
cx, (INT32)(b->YLoc + (q*iBorderHeight) - (iBorderHeight-hremain)),
4, &ClipRect );
}
else if(gbPixelDepth==8)
{
Blt8BPPDataTo8BPPBufferTransparentClip((UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
cx, (INT32)(b->YLoc + (q*iBorderHeight) - (iBorderHeight-hremain)),
4, &ClipRect );
}
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
cx, (INT32)(b->YLoc + (q*iBorderHeight) - (iBorderHeight-hremain)),
4, &ClipRect );
}
for(q=1;q<NumChunksHigh;q++)
{
if(gbPixelDepth==16)
{
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
(INT32)b->XLoc,
(INT32)(b->YLoc + (q*iBorderHeight)),
3, &ClipRect );
}
else if(gbPixelDepth==8)
{
Blt8BPPDataTo8BPPBufferTransparentClip((UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
(INT32)b->XLoc,
(INT32)(b->YLoc + (q*iBorderHeight)),
3, &ClipRect );
}
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
(INT32)b->XLoc,
(INT32)(b->YLoc + (q*iBorderHeight)),
3, &ClipRect );
if(gbPixelDepth==16)
{
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
cx, (INT32)(b->YLoc + (q*iBorderHeight)),
4, &ClipRect );
}
else if(gbPixelDepth==8)
{
Blt8BPPDataTo8BPPBufferTransparentClip((UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
cx, (INT32)(b->YLoc + (q*iBorderHeight)),
4, &ClipRect );
}
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
cx, (INT32)(b->YLoc + (q*iBorderHeight)),
4, &ClipRect );
}
// Unlock buffer
-2
View File
@@ -14,7 +14,6 @@ set(sgpSrc
"${CMAKE_CURRENT_SOURCE_DIR}/himage.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/impTGA.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/input.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Ja2 Libs.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/LibraryDataBase.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/line.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/MemMan.cpp"
@@ -22,7 +21,6 @@ set(sgpSrc
"${CMAKE_CURRENT_SOURCE_DIR}/PCX.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/PngLoader.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Random.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/sgp.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/sgp_logger.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/shading.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/soundman.cpp"
+1 -1
View File
@@ -49,4 +49,4 @@ PTR CompressInit( BYTE * pUncompressedData, UINT32 uiDataSize );
UINT32 Compress( PTR pCompPtr, BYTE * pBuffer, UINT32 uiBufferLen );
void CompressFini( PTR pCompPtr );
#endif
#endif
+1 -1
View File
@@ -95,4 +95,4 @@ HRESULT BltDDSurfaceUsingSoftware( LPDIRECTDRAWSURFACE2 pDestSurface, LPRECT pDe
#endif
#endif // __DirectDraw_Calls_H__
#endif // __DirectDraw_Calls_H__
+1 -1
View File
@@ -26,4 +26,4 @@ extern "C" {
}
#endif
#endif
#endif
+7 -63
View File
@@ -1042,15 +1042,7 @@ UINT8 *pDestBuf;
desty+=GetHeight(FontObjs[FontDefault], transletter);
}
// Blit directly
if ( gbPixelDepth == 8 )
{
Blt8BPPDataTo8BPPBufferMonoShadowClip(pDestBuf, uiDestPitchBYTES, FontObjs[FontDefault], destx, desty, transletter, &FontDestRegion, FontForeground8, FontBackground8);
}
else
{
Blt8BPPDataTo16BPPBufferMonoShadowClip((UINT16*)pDestBuf, uiDestPitchBYTES, FontObjs[FontDefault], destx, desty, transletter, &FontDestRegion, FontForeground16, FontBackground16, FontShadow16 );
}
Blt8BPPDataTo16BPPBufferMonoShadowClip((UINT16*)pDestBuf, uiDestPitchBYTES, FontObjs[FontDefault], destx, desty, transletter, &FontDestRegion, FontForeground16, FontBackground16, FontShadow16 );
destx+=GetWidth(FontObjs[FontDefault], transletter);
}
@@ -1156,15 +1148,7 @@ UINT8 *pDestBuf;
desty+=GetHeight(FontObjs[FontDefault], transletter);
}
// Blit directly
if ( gbPixelDepth == 8 )
{
Blt8BPPDataTo8BPPBufferTransparentClip( (UINT16*)pDestBuf, uiDestPitchBYTES, FontObjs[FontDefault], destx, desty, transletter, &FontDestRegion );
}
else
{
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf, uiDestPitchBYTES, FontObjs[FontDefault], destx, desty, transletter, &FontDestRegion );
}
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf, uiDestPitchBYTES, FontObjs[FontDefault], destx, desty, transletter, &FontDestRegion );
destx+=GetWidth(FontObjs[FontDefault], transletter);
}
@@ -1214,15 +1198,7 @@ UINT8 *pDestBuf;
desty+=GetHeight(FontObjs[FontDefault], transletter);
}
// Blit directly
if ( gbPixelDepth == 8 )
{
Blt8BPPDataTo8BPPBufferTransparentClip( (UINT16*)pDestBuf, uiDestPitchBYTES, FontObjs[FontDefault], destx, desty, transletter, &FontDestRegion );
}
else
{
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf, uiDestPitchBYTES, FontObjs[FontDefault], destx, desty, transletter, &FontDestRegion );
}
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf, uiDestPitchBYTES, FontObjs[FontDefault], destx, desty, transletter, &FontDestRegion );
destx+=GetWidth(FontObjs[FontDefault], transletter);
}
@@ -1271,15 +1247,7 @@ CHAR16 string[512];
desty+=GetHeight(FontObjs[FontType], transletter);
}
// Blit directly
if ( gbPixelDepth == 8 )
{
Blt8BPPDataTo8BPPBufferTransparentClip( (UINT16*)pDestBuf, uiDestPitchBYTES, FontObjs[FontDefault], destx, desty, transletter, &FontDestRegion );
}
else
{
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf, uiDestPitchBYTES, FontObjs[FontDefault], destx, desty, transletter, &FontDestRegion );
}
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf, uiDestPitchBYTES, FontObjs[FontDefault], destx, desty, transletter, &FontDestRegion );
destx+=GetWidth(FontObjs[FontType], transletter);
}
@@ -1323,15 +1291,7 @@ CHAR16 string[512];
desty+=GetHeight(FontObjs[FontDefault], transletter);
}
// Blit directly
if ( gbPixelDepth == 8 )
{
Blt8BPPDataTo8BPPBufferMonoShadowClip(pDestBuf, uiDestPitchBYTES, FontObjs[FontDefault], destx, desty, transletter, &FontDestRegion, FontForeground8, FontBackground8);
}
else
{
Blt8BPPDataTo16BPPBufferMonoShadowClip((UINT16*)pDestBuf, uiDestPitchBYTES, FontObjs[FontDefault], destx, desty, transletter, &FontDestRegion, FontForeground16, FontBackground16, FontShadow16 );
}
Blt8BPPDataTo16BPPBufferMonoShadowClip((UINT16*)pDestBuf, uiDestPitchBYTES, FontObjs[FontDefault], destx, desty, transletter, &FontDestRegion, FontForeground16, FontBackground16, FontShadow16 );
destx+=GetWidth(FontObjs[FontDefault], transletter);
}
@@ -1390,15 +1350,7 @@ UINT16 usOldForeColor;
desty+=GetHeight(FontObjs[FontDefault], transletter);
}
// Blit directly
if ( gbPixelDepth == 8 )
{
Blt8BPPDataTo8BPPBufferMonoShadowClip(pDestBuf, uiDestPitchBYTES, FontObjs[FontDefault], destx, desty, transletter, &FontDestRegion, FontForeground8, FontBackground8);
}
else
{
Blt8BPPDataTo16BPPBufferMonoShadowClip((UINT16*)pDestBuf, uiDestPitchBYTES, FontObjs[FontDefault], destx, desty, transletter, &FontDestRegion, FontForeground16, FontBackground16, FontShadow16 );
}
Blt8BPPDataTo16BPPBufferMonoShadowClip((UINT16*)pDestBuf, uiDestPitchBYTES, FontObjs[FontDefault], destx, desty, transletter, &FontDestRegion, FontForeground16, FontBackground16, FontShadow16 );
destx+=GetWidth(FontObjs[FontDefault], transletter);
}
@@ -1469,15 +1421,7 @@ UINT8 *pDestBuf;
return 0;
}
// Blit directly
if ( gbPixelDepth == 8 )
{
Blt8BPPDataTo8BPPBufferMonoShadowClip(pDestBuf, uiDestPitchBYTES, FontObjs[FontDefault], destx, desty, transletter, &FontDestRegion, FontForeground8, FontBackground8);
}
else
{
Blt8BPPDataTo16BPPBufferMonoShadowClip((UINT16*)pDestBuf, uiDestPitchBYTES, FontObjs[FontDefault], destx, desty, transletter, &FontDestRegion, FontForeground16, FontBackground16, FontShadow16 );
}
Blt8BPPDataTo16BPPBufferMonoShadowClip((UINT16*)pDestBuf, uiDestPitchBYTES, FontObjs[FontDefault], destx, desty, transletter, &FontDestRegion, FontForeground16, FontBackground16, FontShadow16 );
destx+=GetWidth(FontObjs[FontDefault], transletter);
}
-60
View File
@@ -1,60 +0,0 @@
#include "LibraryDataBase.h"
LibraryInitHeader gGameLibaries[ ] =
{
//Library Name Can be Init at start
// on cd
{ "Data.slf", FALSE, TRUE },
{ "Editor.slf", FALSE, FALSE },
{ "Ambient.slf", FALSE, TRUE },
{ "Anims.slf", FALSE, TRUE },
{ "BattleSnds.slf", FALSE, TRUE },
{ "BigItems.slf", FALSE, TRUE },
{ "BinaryData.slf", FALSE, TRUE },
{ "Cursors.slf", FALSE, TRUE },
{ "Faces.slf", FALSE, TRUE },
{ "Fonts.slf", FALSE, TRUE },
{ "Interface.slf", FALSE, TRUE },
{ "Laptop.slf", FALSE, TRUE },
{ "Maps.slf", TRUE, TRUE },
{ "MercEdt.slf", FALSE, TRUE },
{ "Music.slf", TRUE, TRUE },
{ "Npc_Speech.slf", TRUE, TRUE },
{ "NpcData.slf", FALSE, TRUE },
{ "RadarMaps.slf", FALSE, TRUE },
{ "Sounds.slf", FALSE, TRUE },
{ "Speech.slf", TRUE, TRUE },
// { "TileCache.slf", FALSE, TRUE },
{ "TileSets.slf", TRUE, TRUE },
{ "LoadScreens.slf", TRUE, TRUE },
{ "Intro.slf", TRUE, TRUE },
#ifdef GERMAN
{ "German.slf", FALSE, TRUE },
#endif
#ifdef POLISH
{ "Polish.slf", FALSE, TRUE },
#endif
#ifdef DUTCH
{ "Dutch.slf", FALSE, TRUE },
#endif
#ifdef ITALIAN
{ "Italian.slf", FALSE, TRUE },
#endif
#ifdef RUSSIAN
{ "Russian.slf", FALSE, TRUE },
#endif
#ifdef FRENCH
{ "French.slf", FALSE, TRUE },
#endif
#ifdef CHINESE
{ "Chinese.slf", FALSE, TRUE },
#endif
};
-61
View File
@@ -1,61 +0,0 @@
#ifndef _JA2_LIBS_H_
#define _JA2_LIBS_H_
//enums used for accessing the libraries
enum
{
LIBRARY_DATA,
LIBRARY_EDITOR,
LIBRARY_AMBIENT,
LIBRARY_ANIMS,
LIBRARY_BATTLESNDS,
LIBRARY_BIGITEMS,
LIBRARY_BINARY_DATA,
LIBRARY_CURSORS,
LIBRARY_FACES,
LIBRARY_FONTS,
LIBRARY_INTERFACE,
LIBRARY_LAPTOP,
LIBRARY_MAPS,
LIBRARY_MERCEDT,
LIBRARY_MUSIC,
LIBRARY_NPC_SPEECH,
LIBRARY_NPC_DATA,
LIBRARY_RADAR_MAPS,
LIBRARY_SOUNDS,
LIBRARY_SPEECH,
// LIBRARY_TILE_CACHE,
LIBRARY_TILESETS,
LIBRARY_LOADSCREENS,
LIBRARY_INTRO,
#ifdef GERMAN
LIBRARY_GERMAN_DATA,
#endif
#ifdef DUTCH
LIBRARY_DUTCH_DATA,
#endif
#ifdef POLISH
LIBRARY_POLISH_DATA,
#endif
#ifdef ITALIAN
LIBRARY_ITALIAN_DATA,
#endif
#ifdef RUSSIAN
LIBRARY_RUSSIAN_DATA,
#endif
#ifdef FRENCH
LIBRARY_FRENCH_DATA,
#endif
NUMBER_OF_LIBRARIES
};
#endif
+8 -9
View File
@@ -22,6 +22,7 @@
#include "font.h"
#include "Font Control.h"
#include "GameSettings.h"
#include <language.hpp>
#include <vfs/Tools/vfs_property_container.h>
@@ -37,9 +38,7 @@ typedef struct
COLORVAL BackColor;
UINT8 Height;
UINT8 InternalLeading;
#ifdef CHINESE
UINT8 Width[0x80];
#endif
} HWINFONT;
LONG gWinFontAdjust;
@@ -355,7 +354,7 @@ INT32 CreateWinFont( LOGFONT &logfont )
HDC hdc = GetDC(NULL);
SelectObject(hdc, hFont);
#ifdef CHINESE
if(g_lang == i18n::Lang::zh) {
SIZE RectSize;
wchar_t str[2]=L"\1";
for (int i = 1; i<0x80; i++)
@@ -367,7 +366,7 @@ INT32 CreateWinFont( LOGFONT &logfont )
str[0] = L'';
GetTextExtentPoint32W( hdc, str, 1, &RectSize );
WinFonts[iFont].Width[0] = (UINT8)RectSize.cx;
#endif
}
TEXTMETRIC tm;
GetTextMetrics(hdc, &tm);
@@ -469,7 +468,7 @@ INT16 WinFontStringPixLength( STR16 string2, INT32 iFont )
if (pWinFont == NULL) return(0);
#ifdef CHINESE
if(g_lang == i18n::Lang::zh) {
wchar_t *p=string2;
UINT32 size = 0;
while (*p!=0)
@@ -484,7 +483,7 @@ INT16 WinFontStringPixLength( STR16 string2, INT32 iFont )
p++;
}
return size;
#else
} else {
SIZE RectSize;
HDC hdc = GetDC(NULL);
@@ -493,7 +492,7 @@ INT16 WinFontStringPixLength( STR16 string2, INT32 iFont )
ReleaseDC(NULL, hdc);
return( (INT16)RectSize.cx );
#endif
}
}
@@ -504,11 +503,11 @@ INT16 GetWinFontHeight(INT32 iFont)
pWinFont = GetWinFont(iFont);
if (pWinFont == NULL) return(0);
#ifdef CHINESE //zwwooooo: Correct tactical interface font height to fixed Chinese characters smearing bug
if(g_lang == i18n::Lang::zh) { //zwwooooo: Correct tactical interface font height to fixed Chinese characters smearing bug
if (iFont == WinFontMap[TINYFONT1] || iFont == WinFontMap[SMALLFONT1] || iFont == WinFontMap[FONT14ARIAL])
{
return pWinFont->Height + 2;
}
#endif
}
return pWinFont->Height;
}
+1 -1
View File
@@ -128,4 +128,4 @@
#define COMMA 188
#define FULLSTOP 190
#endif
#endif
+1 -1
View File
@@ -89,4 +89,4 @@ typedef struct
#define STCI_PALETTE_ELEMENT_SIZE 3
#define STCI_8BIT_PALETTE_SIZE 768
#endif
#endif
+1 -1
View File
@@ -151,4 +151,4 @@ extern BOOLEAN gfSGPInputReceived;
}
#endif
#endif
#endif
-260
View File
@@ -30,11 +30,6 @@ void DrawHorizontalRun(UINT8 **ScreenPtr, int XAdvance, int RunLength,
void DrawVerticalRun(UINT8 **ScreenPtr, int XAdvance, int RunLength,
int Color, int ScreenWidth);
void DrawHorizontalRun8(UINT8 **ScreenPtr, int XAdvance,
int RunLength, int Color, int ScreenWidth);
void DrawVerticalRun8(UINT8 **ScreenPtr, int XAdvance,
int RunLength, int Color, int ScreenWidth);
void SetClippingRegionAndImageWidth(
int iImageWidth,
@@ -426,258 +421,3 @@ void RectangleDraw( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, shor
LineDraw( fClip, XStart, YStart, XStart, YEnd, Color, ScreenPtr);
LineDraw( fClip, XEnd, YStart, XEnd, YEnd, Color, ScreenPtr);
}
/***********************************************************************************
* 8-Bit Versions
*
*
*
* Added by Derek Beland
***********************************************************************************/
/* Draws a rectangle between the specified endpoints in color Color. */
void RectangleDraw8( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, UINT8 *ScreenPtr)
{
LineDraw8( fClip, XStart, YStart, XEnd, YStart, Color, ScreenPtr);
LineDraw8( fClip, XStart, YEnd, XEnd, YEnd, Color, ScreenPtr);
LineDraw8( fClip, XStart, YStart, XStart, YEnd, Color, ScreenPtr);
LineDraw8( fClip, XEnd, YStart, XEnd, YEnd, Color, ScreenPtr);
}
/* Draws a line between the specified endpoints in color Color. */
void LineDraw8( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, UINT8 *ScreenPtr)
{
int Temp, AdjUp, AdjDown, ErrorTerm, XAdvance, XDelta, YDelta;
int WholeStep, InitialPixelCount, FinalPixelCount, i, RunLength;
int ScreenWidth = giImageWidth;
UINT8 col1 = Color & 0x00FF;
if ( fClip )
{
if ( !Clip2D( &XStart, &YStart, &XEnd, &YEnd ) )
return;
}
/* We'll always draw top to bottom, to reduce the number of cases we have to
handle, and to make lines between the same endpoints draw the same pixels */
if (YStart > YEnd) {
Temp = YStart;
YStart = YEnd;
YEnd = Temp;
Temp = XStart;
XStart = XEnd;
XEnd = Temp;
}
// point to the bitmap address first pixel to draw
ScreenPtr = ScreenPtr + YStart*giImageWidth + XStart;
/* Figure out whether we're going left or right, and how far we're
going horizontally */
if ((XDelta = XEnd - XStart) < 0)
{
XAdvance = -1;
XDelta = -XDelta;
}
else
{
XAdvance = 1;
}
/* Figure out how far we're going vertically */
YDelta = YEnd - YStart;
/* Special-case horizontal, vertical, and diagonal lines, for speed
and to avoid nasty boundary conditions and division by 0 */
if (XDelta == 0)
{
/* Vertical line */
for (i=0; i<=YDelta; i++)
{
*ScreenPtr = col1;
ScreenPtr += giImageWidth;
}
return;
}
if (YDelta == 0)
{
/* Horizontal line */
for (i=0; i<=XDelta; i++)
{
*ScreenPtr = col1;
ScreenPtr += XAdvance;
}
return;
}
if (XDelta == YDelta)
{
/* Diagonal line */
for (i=0; i<=XDelta; i++)
{
*ScreenPtr = col1;
ScreenPtr += (XAdvance + giImageWidth);
}
return;
}
/* Determine whether the line is X or Y major, and handle accordingly */
if (XDelta >= YDelta)
{
/* X major line */
/* Minimum # of pixels in a run in this line */
WholeStep = XDelta / YDelta;
/* Error term adjust each time Y steps by 1; used to tell when one
extra pixel should be drawn as part of a run, to account for
fractional steps along the X axis per 1-pixel steps along Y */
AdjUp = (XDelta % YDelta) * 2;
/* Error term adjust when the error term turns over, used to factor
out the X step made at that time */
AdjDown = YDelta * 2;
/* Initial error term; reflects an initial step of 0.5 along the Y
axis */
ErrorTerm = (XDelta % YDelta) - (YDelta * 2);
/* The initial and last runs are partial, because Y advances only 0.5
for these runs, rather than 1. Divide one full run, plus the
initial pixel, between the initial and last runs */
InitialPixelCount = (WholeStep / 2) + 1;
FinalPixelCount = InitialPixelCount;
/* If the basic run length is even and there's no fractional
advance, we have one pixel that could go to either the initial
or last partial run, which we'll arbitrarily allocate to the
last run */
if ((AdjUp == 0) && ((WholeStep & 0x01) == 0))
{
InitialPixelCount--;
}
/* If there're an odd number of pixels per run, we have 1 pixel that can't
be allocated to either the initial or last partial run, so we'll add 0.5
to error term so this pixel will be handled by the normal full-run loop */
if ((WholeStep & 0x01) != 0)
{
ErrorTerm += YDelta;
}
/* Draw the first, partial run of pixels */
DrawHorizontalRun8(&ScreenPtr, XAdvance, InitialPixelCount, Color, ScreenWidth);
/* Draw all full runs */
for (i=0; i<(YDelta-1); i++)
{
RunLength = WholeStep; /* run is at least this long */
/* Advance the error term and add an extra pixel if the error
term so indicates */
if ((ErrorTerm += AdjUp) > 0)
{
RunLength++;
ErrorTerm -= AdjDown; /* reset the error term */
}
/* Draw this scan line's run */
DrawHorizontalRun8(&ScreenPtr, XAdvance, RunLength, Color, ScreenWidth);
}
/* Draw the final run of pixels */
DrawHorizontalRun8(&ScreenPtr, XAdvance, FinalPixelCount, Color, ScreenWidth);
return;
}
else
{
/* Y major line */
/* Minimum # of pixels in a run in this line */
WholeStep = YDelta / XDelta;
/* Error term adjust each time X steps by 1; used to tell when 1 extra
pixel should be drawn as part of a run, to account for
fractional steps along the Y axis per 1-pixel steps along X */
AdjUp = (YDelta % XDelta) * 2;
/* Error term adjust when the error term turns over, used to factor
out the Y step made at that time */
AdjDown = XDelta * 2;
/* Initial error term; reflects initial step of 0.5 along the X axis */
ErrorTerm = (YDelta % XDelta) - (XDelta * 2);
/* The initial and last runs are partial, because X advances only 0.5
for these runs, rather than 1. Divide one full run, plus the
initial pixel, between the initial and last runs */
InitialPixelCount = (WholeStep / 2) + 1;
FinalPixelCount = InitialPixelCount;
/* If the basic run length is even and there's no fractional advance, we
have 1 pixel that could go to either the initial or last partial run,
which we'll arbitrarily allocate to the last run */
if ((AdjUp == 0) && ((WholeStep & 0x01) == 0))
{
InitialPixelCount--;
}
/* If there are an odd number of pixels per run, we have one pixel
that can't be allocated to either the initial or last partial
run, so we'll add 0.5 to the error term so this pixel will be
handled by the normal full-run loop */
if ((WholeStep & 0x01) != 0)
{
ErrorTerm += XDelta;
}
/* Draw the first, partial run of pixels */
DrawVerticalRun8(&ScreenPtr, XAdvance, InitialPixelCount, Color, ScreenWidth);
/* Draw all full runs */
for (i=0; i<(XDelta-1); i++)
{
RunLength = WholeStep; /* run is at least this long */
/* Advance the error term and add an extra pixel if the error
term so indicates */
if ((ErrorTerm += AdjUp) > 0)
{
RunLength++;
ErrorTerm -= AdjDown; /* reset the error term */
}
/* Draw this scan line's run */
DrawVerticalRun8(&ScreenPtr, XAdvance, RunLength, Color, ScreenWidth);
}
/* Draw the final run of pixels */
DrawVerticalRun8(&ScreenPtr, XAdvance, FinalPixelCount, Color, ScreenWidth);
return;
}
}
/* Draws a horizontal run of pixels, then advances the bitmap pointer to
the first pixel of the next run. */
void DrawHorizontalRun8(UINT8 **ScreenPtr, int XAdvance,
int RunLength, int Color, int ScreenWidth)
{
int i;
UINT8 *WorkingScreenPtr = *ScreenPtr;
UINT8 col1 = Color & 0x00FF;
for (i=0; i<RunLength; i++)
{
*WorkingScreenPtr = col1;
WorkingScreenPtr += XAdvance;
}
/* Advance to the next scan line */
WorkingScreenPtr += giImageWidth;
*ScreenPtr = WorkingScreenPtr;
}
/* Draws a vertical run of pixels, then advances the bitmap pointer to
the first pixel of the next run. */
void DrawVerticalRun8(UINT8 **ScreenPtr, int XAdvance,
int RunLength, int Color, int ScreenWidth)
{
int i;
UINT8 *WorkingScreenPtr = *ScreenPtr;
UINT8 col1 = Color & 0x00FF;
for (i=0; i<RunLength; i++)
{
*WorkingScreenPtr = col1;
WorkingScreenPtr += giImageWidth;
}
/* Advance to the next column */
WorkingScreenPtr += XAdvance;
*ScreenPtr = WorkingScreenPtr;
}
-2
View File
@@ -63,9 +63,7 @@ void PixelAlterColour( BOOLEAN fClip, INT32 xp, INT32 yp, INT16 sColor, UINT8 *p
void LineDraw( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, UINT8 *ScreenPtr);
void LineDraw( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, UINT8 *ScreenPtr);
void LineDraw8( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, UINT8 *ScreenPtr);
void RectangleDraw( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, UINT8 *ScreenPtr);
void RectangleDraw8( BOOL fClip, int XStart, int YStart, int XEnd, int YEnd, short Color, UINT8 *ScreenPtr);
// *****************************************************************************
+1 -1
View File
@@ -37,4 +37,4 @@ extern void MSYS_SGP_Mouse_Handler_Hook(UINT16 Type, UINT16 Xcoord, UINT16 Ycoor
}
#endif
#endif
#endif
+1 -1
View File
@@ -37,4 +37,4 @@ BOOLEAN LoadPCXFileToImage( HIMAGE hImage, UINT16 fContents );
PcxObject *LoadPcx(STR8 pFilename);
BOOLEAN BlitPcxToBuffer( PcxObject *pCurrentPcxObject, UINT8 *pBuffer, UINT16 usBufferWidth, UINT16 usBufferHeight, UINT16 usX, UINT16 usY, BOOLEAN fTransp);
#endif
#endif
+13 -37
View File
@@ -49,6 +49,7 @@
#include "Lua Interpreter.h"
#include "connect.h"
#include "english.h"
#include "wine.h"
#include "BuildDefines.h"
#include "Intro.h"
@@ -58,6 +59,7 @@
#endif
#include <Music Control.h>
#include <language.hpp>
static void MAGIC(std::string const& aarrrrgggh = "")
{}
@@ -173,9 +175,6 @@ CHAR8 gzCommandLine[100]; // Command line given
CHAR8 gzErrorMsg[2048]="";
BOOLEAN gfIgnoreMessages=FALSE;
// GLOBAL VARIBLE, SET TO DEFAULT BUT CAN BE CHANGED BY THE GAME IF INIT FILE READ
UINT8 gbPixelDepth = PIXEL_DEPTH;
INT32 FAR PASCAL SyncWindowProcedure(HWND hWindow, UINT16 Message, WPARAM wParam, LPARAM lParam)
{
@@ -367,14 +366,6 @@ INT32 FAR PASCAL WindowProcedure(HWND hWindow, UINT16 Message, WPARAM wParam, LP
case WM_SYSKEYDOWN:
case WM_KEYDOWN:
#ifdef USE_CODE_PAGE
if(s_DebugKeyboardInput)
{
static vfs::Log& debugKeys = *vfs::Log::Create(L"DebugKeys.txt");
static int input_counter = 1;
debugKeys << (input_counter++) << " : " << (int)wParam << vfs::Log::endl;
}
#endif // USE_CODE_PAGE
KeyDown(wParam, lParam);
gfSGPInputReceived = TRUE;
break;
@@ -514,24 +505,6 @@ BOOLEAN InitializeStandardGamingPlatform(HINSTANCE hInstance, int sCommandShow)
}
}
#ifdef USE_CODE_PAGE
charSet::InitializeCharSets();
if(!s_CodePage.empty())
{
try
{
CodePageReader cpr;
cpr.ReadCodePage(s_CodePage);
}
catch(std::exception& ex)
{
std::wstringstream wss;
wss << L"Could not process codepage file \"" << s_CodePage() << L"\"";
SGP_RETHROW(wss.str().c_str(), ex);
}
}
#endif // USE_CODE_PAGE
if(g_bUseXML_Strings)
{
@@ -791,7 +764,16 @@ int PASCAL HandledWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR pC
HWND hPrevInstanceWindow;
UINT32 uiTimer = 0;
// Make sure the game works out of the box on Linux/macOS/Android (WINE)
if (wine_add_dll_overrides())
{
/* newly added dll overrides only work after a restart */
char exe_path[MAX_PATH] = { 0 };
GetModuleFileNameA(NULL, exe_path, _countof(exe_path));
ShellExecuteA(NULL, "open", exe_path, pCommandLine, NULL, sCommandShow);
return 0;
}
vfs::Log::setSharedString( getGameID() );
//if(!vfs::Aspects::getMutexFactory())
@@ -884,13 +866,13 @@ int PASCAL HandledWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR pC
}
#endif
# ifdef ENGLISH
if( g_lang == i18n::Lang::en ) {
try
{
SetIntroType( INTRO_SPLASH );
}
HANDLE_FATAL_ERROR;
# endif
}
gfApplicationActive = TRUE;
gfProgramIsRunning = TRUE;
@@ -1210,8 +1192,6 @@ void GetRuntimeSettings( )
iResY = iResY - 70;
}
// Adjust again
gbPixelDepth = PIXEL_DEPTH;
SCREEN_WIDTH = iResX;
SCREEN_HEIGHT = iResY;
@@ -1255,10 +1235,6 @@ void GetRuntimeSettings( )
// haydent: mouse scrolling
iDisableMouseScrolling = (int)oProps.getIntProperty("Ja2 Settings","DISABLE_MOUSE_SCROLLING", iDisableMouseScrolling);
#ifdef USE_CODE_PAGE
s_DebugKeyboardInput = oProps.getBoolProperty(L"Ja2 Settings", L"DEBUG_KEYS", false);
s_CodePage = oProps.getStringProperty(L"Ja2 Settings", L"CODE_PAGE");
#endif // USE_CODE_PAGE
// WANNE: Highspeed Timer always ON (no more optional in the ja2.ini)
// get timer/clock initialization state
-1
View File
@@ -15,7 +15,6 @@ extern "C" {
extern BOOLEAN gfProgramIsRunning; // Turn this to FALSE to exit program
extern CHAR8 gzCommandLine[100]; // Command line given
extern UINT8 gbPixelDepth; // GLOBAL RUN-TIME SETTINGS
extern BOOLEAN gfDontUseDDBlits; // GLOBAL FOR USE OF DD BLITTING
+1 -1
View File
@@ -105,4 +105,4 @@ extern void SoundLog(CHAR8 *strMessage);
#endif
*/
#endif
#endif
+1 -1
View File
@@ -27,4 +27,4 @@ UINT32 ClockIsTicking(TIMER uiTimer);
}
#endif
#endif
#endif
+2 -7
View File
@@ -356,7 +356,7 @@ BOOLEAN InitializeVideoManager(HINSTANCE hInstance, UINT16 usCommandShow, void *
//
if( 0==iScreenMode ) /* Fullscreen mode */
{
ReturnCode = IDirectDraw2_SetDisplayMode( gpDirectDrawObject, SCREEN_WIDTH, SCREEN_HEIGHT, gbPixelDepth, 0, 0 );
ReturnCode = IDirectDraw2_SetDisplayMode( gpDirectDrawObject, SCREEN_WIDTH, SCREEN_HEIGHT, PIXEL_DEPTH, 0, 0 );
if (ReturnCode != DD_OK)
{
IDirectDraw2_SetCooperativeLevel(gpDirectDrawObject, ghWindow, DDSCL_NORMAL);
@@ -372,7 +372,7 @@ BOOLEAN InitializeVideoManager(HINSTANCE hInstance, UINT16 usCommandShow, void *
gusScreenWidth = SCREEN_WIDTH;
gusScreenHeight = SCREEN_HEIGHT;
gubScreenPixelDepth = gbPixelDepth;
gubScreenPixelDepth = PIXEL_DEPTH;
/////////////////////////////////////////////////////////////////////////////////////////////////
//
@@ -2756,11 +2756,6 @@ BOOLEAN GetRGBDistribution(void)
Assert ( gpPrimarySurface != NULL );
// ONLY DO IF WE ARE IN 16BIT MODE
if ( gbPixelDepth == 8 )
{
return( TRUE );
}
ZEROMEM(SurfaceDescription);
SurfaceDescription.dwSize = sizeof (DDSURFACEDESC);
+15 -37
View File
@@ -959,45 +959,23 @@ BOOLEAN BltVideoObjectToBuffer( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, HVOBJE
// Switch based on flags given
do
{
if(gbPixelDepth==16)
if ( fBltFlags & VO_BLT_SRCTRANSPARENCY )
{
if ( fBltFlags & VO_BLT_SRCTRANSPARENCY )
{
if(BltIsClipped(hSrcVObject, iDestX, iDestY, usIndex, &ClippingRect))
Blt8BPPDataTo16BPPBufferTransparentClip( pBuffer, uiDestPitchBYTES, hSrcVObject, iDestX, iDestY, usIndex, &ClippingRect);
else
Blt8BPPDataTo16BPPBufferTransparent( pBuffer, uiDestPitchBYTES, hSrcVObject, iDestX, iDestY, usIndex );
break;
}
else if ( fBltFlags & VO_BLT_SHADOW )
{
if(BltIsClipped(hSrcVObject, iDestX, iDestY, usIndex, &ClippingRect))
Blt8BPPDataTo16BPPBufferShadowClip( pBuffer, uiDestPitchBYTES, hSrcVObject, iDestX, iDestY, usIndex, &ClippingRect);
else
Blt8BPPDataTo16BPPBufferShadow( pBuffer, uiDestPitchBYTES, hSrcVObject, iDestX, iDestY, usIndex );
break;
}
if(BltIsClipped(hSrcVObject, iDestX, iDestY, usIndex, &ClippingRect))
Blt8BPPDataTo16BPPBufferTransparentClip( pBuffer, uiDestPitchBYTES, hSrcVObject, iDestX, iDestY, usIndex, &ClippingRect);
else
Blt8BPPDataTo16BPPBufferTransparent( pBuffer, uiDestPitchBYTES, hSrcVObject, iDestX, iDestY, usIndex );
break;
}
else if ( fBltFlags & VO_BLT_SHADOW )
{
if(BltIsClipped(hSrcVObject, iDestX, iDestY, usIndex, &ClippingRect))
Blt8BPPDataTo16BPPBufferShadowClip( pBuffer, uiDestPitchBYTES, hSrcVObject, iDestX, iDestY, usIndex, &ClippingRect);
else
Blt8BPPDataTo16BPPBufferShadow( pBuffer, uiDestPitchBYTES, hSrcVObject, iDestX, iDestY, usIndex );
break;
}
}
else if(gbPixelDepth==8)
{
if ( fBltFlags & VO_BLT_SRCTRANSPARENCY )
{
if(BltIsClipped(hSrcVObject, iDestX, iDestY, usIndex, &ClippingRect))
Blt8BPPDataTo8BPPBufferTransparentClip( pBuffer, uiDestPitchBYTES, hSrcVObject, iDestX, iDestY, usIndex, &ClippingRect);
else
Blt8BPPDataTo8BPPBufferTransparent( pBuffer, uiDestPitchBYTES, hSrcVObject, iDestX, iDestY, usIndex );
break;
}
else if ( fBltFlags & VO_BLT_SHADOW )
{
if(BltIsClipped(hSrcVObject, iDestX, iDestY, usIndex, &ClippingRect))
Blt8BPPDataTo8BPPBufferShadowClip( pBuffer, uiDestPitchBYTES, hSrcVObject, iDestX, iDestY, usIndex, &ClippingRect);
else
Blt8BPPDataTo8BPPBufferShadow( pBuffer, uiDestPitchBYTES, hSrcVObject, iDestX, iDestY, usIndex );
break;
}
}
// Use default blitter here
//Blt8BPPDataTo16BPPBuffer( hDestVObject, hSrcVObject, (UINT16)iDestX, (UINT16)iDestY, (SGPRect*)&SrcRect );
File diff suppressed because it is too large Load Diff
+1 -56
View File
@@ -53,50 +53,9 @@ CHAR8 BltIsClippedOrOffScreen( HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16
UINT16 *InitZBuffer(UINT32 uiPitch, UINT32 uiHeight);
BOOLEAN ShutdownZBuffer(UINT16 *pBuffer);
// 8-Bit to 8-Bit Blitters
//BOOLEAN Blt8BPPDataTo8BPPBufferTransZIncClip( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, UINT16 *pZBuffer, UINT16 usZValue, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex, SGPRect *clipregion);
BOOLEAN Blt8BPPDataTo8BPPBufferTransZNBColor( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, UINT16 *pZBuffer, UINT16 usZValue, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex, UINT8 ubColor);
BOOLEAN Blt8BPPDataTo8BPPBufferTransZNBClipColor( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, UINT16 *pZBuffer, UINT16 usZValue, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex, SGPRect *clipregion, UINT8 ubColor);
// pixelation blitters
BOOLEAN Blt8BPPDataTo8BPPBufferTransZPixelate( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, UINT16 *pZBuffer, UINT16 usZValue, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex );
BOOLEAN Blt8BPPDataTo8BPPBufferTransZClipPixelate( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, UINT16 *pZBuffer, UINT16 usZValue, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex, SGPRect *clipregion);
BOOLEAN Blt8BPPDataTo8BPPBufferTransZNBPixelate( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, UINT16 *pZBuffer, UINT16 usZValue, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex );
BOOLEAN Blt8BPPDataTo8BPPBufferTransZNBClipPixelate( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, UINT16 *pZBuffer, UINT16 usZValue, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex, SGPRect *clipregion);
BOOLEAN Blt8BPPDataTo8BPPBufferMonoShadowClip( UINT8 *pBuffer, UINT32 uiDestPitchBYTES, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex, SGPRect *clipregion, UINT8 ubForeground, UINT8 ubBackground);
BOOLEAN Blt8BPPDataTo8BPPBufferTransparent( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex );
BOOLEAN Blt8BPPDataTo8BPPBufferTransparentClip( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex, SGPRect *clipregion);
BOOLEAN Blt8BPPDataTo16BPPBufferTransMirror( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex );
BOOLEAN Blt8BPPDataTo8BPPBufferTransZ( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, UINT16 *pZBuffer, UINT16 usZValue, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex );
BOOLEAN Blt8BPPDataTo8BPPBufferTransZNB( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, UINT16 *pZBuffer, UINT16 usZValue, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex );
BOOLEAN Blt8BPPDataTo8BPPBufferTransZClip( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, UINT16 *pZBuffer, UINT16 usZValue, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex, SGPRect *clipregion);
BOOLEAN Blt8BPPDataTo8BPPBufferTransZNBClip( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, UINT16 *pZBuffer, UINT16 usZValue, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex, SGPRect *clipregion);
BOOLEAN Blt8BPPDataTo8BPPBufferShadowZ( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, UINT16 *pZBuffer, UINT16 usZValue, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex );
BOOLEAN Blt8BPPDataTo8BPPBufferShadowZNB( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, UINT16 *pZBuffer, UINT16 usZValue, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex );
BOOLEAN Blt8BPPDataTo8BPPBufferShadowZClip( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, UINT16 *pZBuffer, UINT16 usZValue, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex, SGPRect *clipregion);
BOOLEAN Blt8BPPDataTo8BPPBufferShadowZNBClip( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, UINT16 *pZBuffer, UINT16 usZValue, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex, SGPRect *clipregion);
BOOLEAN Blt8BPPDataTo8BPPBufferTransShadowZ( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, UINT16 *pZBuffer, UINT16 usZValue, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex, UINT16 *p16BPPPalette );
BOOLEAN Blt8BPPDataTo8BPPBufferTransShadowZNB( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, UINT16 *pZBuffer, UINT16 usZValue, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex, UINT16 *p16BPPPalette );
BOOLEAN Blt8BPPDataTo8BPPBufferTransShadowZClip( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, UINT16 *pZBuffer, UINT16 usZValue, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex, SGPRect *clipregion, UINT16 *p16BPPPalette );
BOOLEAN Blt8BPPDataTo8BPPBufferTransShadowZNBClip( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, UINT16 *pZBuffer, UINT16 usZValue, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex, SGPRect *clipregion, UINT16 *p16BPPPalette );
BOOLEAN Blt8BPPDataTo8BPPBufferShadowClip( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex, SGPRect *clipregion);
BOOLEAN Blt8BPPDataTo8BPPBufferShadow( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex );
BOOLEAN Blt8BPPDataTo8BPPBuffer( UINT8 *pBuffer, UINT32 uiDestPitchBYTES, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex );
// 8-Bit to 16-Bit Blitters
BOOLEAN Blt8BPPDataTo16BPPBufferTransMirror( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex );
BOOLEAN Blt8BPPDataTo16BPPBufferTransZNBColor( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, UINT16 *pZBuffer, UINT16 usZValue, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex, UINT16 usColor);
BOOLEAN Blt8BPPDataTo16BPPBufferTransZNBClipColor( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, UINT16 *pZBuffer, UINT16 usZValue, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex, SGPRect *clipregion, UINT16 usColor);
@@ -152,19 +111,13 @@ BOOLEAN Blt8BPPDataTo16BPPBufferTransShadow(UINT16 *pBuffer, UINT32 uiDestPitchB
BOOLEAN Blt8BPPDataTo16BPPBufferTransShadowAlpha(UINT16 *pBuffer, UINT32 uiDestPitchBYTES, HVOBJECT hSrcVObject, HVOBJECT hAlphaVObject, INT32 iX, INT32 iY, UINT16 usIndex, UINT16 *p16BPPPalette, BOOLEAN fIgnoreShadows);
BOOLEAN Blt8BPPDataTo16BPPBufferShadowClip( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex, SGPRect *clipregion);
BOOLEAN DDBlt8BPPDataTo16BPPBufferShadow( HVOBJECT hDestVObject, HVOBJECT hSrcVObject, UINT8 level, COLORVAL maskrgb, UINT16 usX, UINT16 usY, SGPRect *srcRect);
BOOLEAN Blt8BPPTo8BPP(UINT8 *pDest, UINT32 uiDestPitch, UINT8 *pSrc, UINT32 uiSrcPitch, INT32 iDestXPos, INT32 iDestYPos, INT32 iSrcXPos, INT32 iSrcYPos, UINT32 uiWidth, UINT32 uiHeight);
BOOLEAN Blt16BPPTo16BPP(UINT16 *pDest, UINT32 uiDestPitch, UINT16 *pSrc, UINT32 uiSrcPitch, INT32 iDestXPos, INT32 iDestYPos, INT32 iSrcXPos, INT32 iSrcYPos, UINT32 uiWidth, UINT32 uiHeight);
BOOLEAN Blt16BPPTo16BPPTrans(UINT16 *pDest, UINT32 uiDestPitch, UINT16 *pSrc, UINT32 uiSrcPitch, INT32 iDestXPos, INT32 iDestYPos, INT32 iSrcXPos, INT32 iSrcYPos, UINT32 uiWidth, UINT32 uiHeight, UINT16 usTrans);
BOOLEAN Blt16BPPTo16BPPTransShadow(UINT16 *pDest, UINT32 uiDestPitch, UINT16 *pSrc, UINT32 uiSrcPitch, INT32 iDestXPos, INT32 iDestYPos, INT32 iSrcXPos, INT32 iSrcYPos, UINT32 uiWidth, UINT32 uiHeight, UINT16 usTrans);
BOOLEAN Blt16BPPTo16BPPFog(UINT16 *pDest, UINT32 uiDestPitch, UINT16 *pSrc, UINT32 uiSrcPitch, INT32 iDestXPos, INT32 iDestYPos, INT32 iSrcXPos, INT32 iSrcYPos, UINT32 uiWidth, UINT32 uiHeight, UINT8 *pFog, UINT16 usFogPitch);
BOOLEAN Blt16BPPTo16BPPMirror(UINT16 *pDest, UINT32 uiDestPitch, UINT16 *pSrc, UINT32 uiSrcPitch, INT32 iDestXPos, INT32 iDestYPos, INT32 iSrcXPos, INT32 iSrcYPos, UINT32 uiWidth, UINT32 uiHeight);
BOOLEAN Blt8BPPDataTo16BPPBufferFogZ( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, UINT16 *pZBuffer, UINT16 usZValue, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex );
BOOLEAN Blt8BPPDataTo16BPPBufferFogZClip( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, UINT16 *pZBuffer, UINT16 usZValue, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex, SGPRect *clipregion);
BOOLEAN Blt8BPPDataTo16BPPBufferFogZNB( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, UINT16 *pZBuffer, UINT16 usZValue, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex );
BOOLEAN Blt8BPPDataTo16BPPBufferFogZNBClip( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, UINT16 *pZBuffer, UINT16 usZValue, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex, SGPRect *clipregion);
BOOLEAN Blt16BPPBufferPixelateRectWithColor( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, SGPRect *area, UINT8 Pattern[8][8], UINT16 usColor );
BOOLEAN Blt16BPPBufferPixelateRect(UINT16 *pBuffer, UINT32 uiDestPitchBYTES, SGPRect *area, UINT8 Pattern[8][8]);
@@ -186,12 +139,6 @@ BOOLEAN Blt8BPPDataSubTo16BPPBuffer( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, H
BOOLEAN Blt8BPPDataTo16BPPBufferHalf( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, HVSURFACE hSrcVSurface, UINT8 *pSrcBuffer, UINT32 uiSrcPitch, INT32 iX, INT32 iY);
BOOLEAN Blt8BPPDataTo16BPPBufferHalfRect( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, HVSURFACE hSrcVSurface, UINT8 *pSrcBuffer, UINT32 uiSrcPitch, INT32 iX, INT32 iY, SGPRect *pRect);
BOOLEAN DDBlt8BPPDataTo16BPPBuffer( HVOBJECT hDestVObject, HVOBJECT hSrcVObject, UINT16 usX, UINT16 usY, SGPRect *srcRect );
BOOLEAN DDBlt8BPPDataTo16BPPBufferFullTransparent( HVOBJECT hDestVObject, HVOBJECT hSrcVObject, UINT16 usX, UINT16 usY, SGPRect *srcRect );
BOOLEAN DDFillSurface( HVOBJECT hDestVObject, blt_fx *pBltFx );
BOOLEAN DDFillSurfaceRect( HVOBJECT hDestVObject, blt_fx *pBltFx );
BOOLEAN BltVObjectUsingDD( HVOBJECT hDestVObject, HVOBJECT hSrcVObject, UINT32 fBltFlags, INT32 iDestX, INT32 iDestY, RECT *SrcRect );
BOOLEAN BlitZRect(UINT16 *pZBuffer, UINT32 uiPitch, INT16 sLeft, INT16 sTop, INT16 sRight, INT16 sBottom, UINT16 usZValue);
@@ -202,7 +149,6 @@ BOOLEAN Blt32BPPTo16BPPTransShadow(UINT16 *pDest, UINT32 uiDestPitch, UINT32 *pS
BOOLEAN Blt16BPPDataTo16BPPBufferTransparentClip( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex, SGPRect *clipregion);
BOOLEAN Blt16BPPDataTo16BPPBufferTransZClip( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, UINT16 *pZBuffer, UINT16 usZValue, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex, SGPRect *clipregion);
BOOLEAN Blt16BPPDataTo16BPPBufferTransparent( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex );
// ATE: New blitters for showing an outline at color 254
BOOLEAN Blt8BPPDataTo16BPPBufferOutline( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex, INT16 s16BPPColor, BOOLEAN fDoOutline );
@@ -226,7 +172,6 @@ BOOLEAN Blt8BPPDataTo16BPPBufferTransShadowZNBObscuredClipAlpha(UINT16 *pBuffer,
BOOLEAN Blt8BPPDataTo16BPPBufferTransZClipPixelateObscured( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, UINT16 *pZBuffer, UINT16 usZValue, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex, SGPRect *clipregion);
BOOLEAN Blt8BPPDataTo16BPPBufferTransZPixelateObscured( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, UINT16 *pZBuffer, UINT16 usZValue, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex );
BOOLEAN FillRect8BPP(UINT8 *pBuffer, UINT32 uiDestPitchBYTES, INT32 x1, INT32 y1, INT32 x2, INT32 y2, UINT8 color);
BOOLEAN FillRect16BPP(UINT16 *pBuffer, UINT32 uiDestPitchBYTES, INT32 x1, INT32 y1, INT32 x2, INT32 y2, UINT16 color);
/*
+1 -1
View File
@@ -15,4 +15,4 @@ LPDIRECTDRAWPALETTE GetVideoSurfaceDDPalette( HVSURFACE hVSurface );
HVSURFACE CreateVideoSurfaceFromDDSurface( LPDIRECTDRAWSURFACE2 lpDDSurface );
#endif
#endif