Removed blit code from gbuffer class. Fixed cmakelists for linux.

This commit is contained in:
Justin Marshall
2020-06-25 14:35:47 -07:00
parent 6bfdd6e0ce
commit c7e4870048
13 changed files with 125 additions and 214 deletions
+3 -109
View File
@@ -288,15 +288,7 @@ class GraphicViewPortClass {
long To_Buffer(int x, int y, int w, int h, void *buff, long size);
long To_Buffer(int x, int y, int w, int h, BufferClass *buff);
long To_Buffer(BufferClass *buff);
HRESULT Blit( GraphicViewPortClass& dest, int x_pixel, int y_pixel, int dx_pixel,
int dy_pixel, int pixel_width, int pixel_height, BOOL trans = FALSE);
HRESULT Blit( GraphicViewPortClass& dest, int dx, int dy, BOOL trans = FALSE);
HRESULT Blit( GraphicViewPortClass& dest, BOOL trans = FALSE);
HRESULT BlitLegacy(GraphicViewPortClass& dest, BOOL trans = FALSE);
HRESULT Blit( VideoViewPortClass& dest, int x_pixel, int y_pixel, int dx_pixel,
int dy_pixel, int pixel_width, int pixel_height, BOOL trans = FALSE);
HRESULT Blit( VideoViewPortClass& dest, int dx, int dy, BOOL trans = FALSE);
HRESULT Blit( VideoViewPortClass& dest, BOOL trans = FALSE);
void BlitLegacy(GraphicViewPortClass& dest, BOOL trans = FALSE);
BOOL Scale( GraphicViewPortClass &dest, int src_x, int src_y, int dst_x,
int dst_y, int src_w, int src_h, int dst_w, int dst_h, BOOL trans = FALSE, char *remap = NULL);
BOOL Scale( GraphicViewPortClass &dest, int src_x, int src_y, int dst_x,
@@ -760,66 +752,6 @@ inline long GraphicViewPortClass::To_Buffer(BufferClass *buff)
return ( return_code );
}
/***************************************************************************
* GVPC::BLIT -- stub 1 to call curr graphic mode Blit to GVPC *
* *
* INPUT: *
* *
* OUTPUT: *
* *
* WARNINGS: *
* *
* HISTORY: *
* 01/06/1995 PWG : Created. *
*=========================================================================*/
inline HRESULT GraphicViewPortClass::Blit( GraphicViewPortClass& dest, int x_pixel, int y_pixel, int dx_pixel,
int dy_pixel, int pixel_width, int pixel_height, BOOL trans)
{
HRESULT return_code=0;
if (Lock()) {
if (dest.Lock()) {
return_code = (Linear_Blit_To_Linear(this, &dest, x_pixel, y_pixel
, dx_pixel, dy_pixel
, pixel_width, pixel_height, trans));
}
dest.Unlock();
}
Unlock();
return ( return_code );
}
/***************************************************************************
* GVPC::BLIT -- Stub 2 to call curr graphic mode Blit to GVPC *
* *
* INPUT: *
* *
* OUTPUT: *
* *
* WARNINGS: *
* *
* HISTORY: *
* 01/06/1995 PWG : Created. *
*=========================================================================*/
inline HRESULT GraphicViewPortClass::Blit( GraphicViewPortClass& dest, int dx, int dy, BOOL trans)
{
HRESULT return_code=0;
if (Lock()) {
if (dest.Lock()) {
return_code = (Linear_Blit_To_Linear(this, &dest, 0, 0
, dx, dy
, Width, Height, trans));
}
dest.Unlock();
}
Unlock();
return (return_code);
}
/***************************************************************************
* GVPC::BLIT -- stub 3 to call curr graphic mode Blit to GVPC *
@@ -833,15 +765,12 @@ inline HRESULT GraphicViewPortClass::Blit( GraphicViewPortClass& dest, int dx, i
* HISTORY: *
* 01/06/1995 PWG : Created. *
*=========================================================================*/
inline HRESULT GraphicViewPortClass::BlitLegacy(GraphicViewPortClass& dest, BOOL trans)
inline void GraphicViewPortClass::BlitLegacy(GraphicViewPortClass& dest, BOOL trans)
{
HRESULT return_code = 0;
if (Lock()) {
if (dest.Lock()) {
return_code = (Linear_Blit_To_Linear_Pal(this, &dest, 0, 0
(Linear_Blit_To_Linear_Pal(this, &dest, 0, 0
, 0, 0
, Width, Height, trans));
@@ -849,41 +778,6 @@ inline HRESULT GraphicViewPortClass::BlitLegacy(GraphicViewPortClass& dest, BOOL
dest.Unlock();
}
Unlock();
return (return_code);
}
/***************************************************************************
* GVPC::BLIT -- stub 3 to call curr graphic mode Blit to GVPC *
* *
* INPUT: *
* *
* OUTPUT: *
* *
* WARNINGS: *
* *
* HISTORY: *
* 01/06/1995 PWG : Created. *
*=========================================================================*/
inline HRESULT GraphicViewPortClass::Blit( GraphicViewPortClass& dest, BOOL trans)
{
HRESULT return_code = 0;
if (Lock()) {
if (dest.Lock()) {
return_code = (Linear_Blit_To_Linear(this, &dest, 0, 0
, 0, 0
, Width, Height, trans));
}
dest.Unlock();
}
Unlock();
return (return_code);
}
+25 -25
View File
@@ -702,31 +702,31 @@ void Window_Print(char const string[], ...)
*=========================================================================*/
PRIVATE void Scroll_Window(void)
{
int y; // Top pixel row of bottom line of window.
/*
** Possibly prompt for more text.
*/
if (ScrollCounter >= WindowLines-1 && MoreOn) {
ScrollCounter = 0;
if (Window_More_Ptr) {
//BG if (LogicPage == SEENPAGE) Window_Show_Mouse();
Window_More_Ptr(TXT_MoreText, MoreSpace, MoreFColor, MoreBColor);
//BG if (LogicPage == SEENPAGE) Window_Hide_Mouse(Window);
}
}
/*
** Scroll the window up one line.
*/
y = ((WinH / (FontHeight+FontYSpacing)) - 1) * (FontHeight+FontYSpacing);
LogicPage->Blit(*LogicPage,WinX<<3, WinY + (FontHeight+FontYSpacing), WinX<<3, WinY, WinW<<3, WinH - (FontHeight+FontYSpacing) );
LogicPage->Fill_Rect(WinX<<3,
WinY + y,
((WinX+WinW)<<3) - 1,
WinY + WinH - 1,
(unsigned char)WinB);
// int y; // Top pixel row of bottom line of window.
//
// /*
// ** Possibly prompt for more text.
// */
// if (ScrollCounter >= WindowLines-1 && MoreOn) {
// ScrollCounter = 0;
//
// if (Window_More_Ptr) {
////BG if (LogicPage == SEENPAGE) Window_Show_Mouse();
// Window_More_Ptr(TXT_MoreText, MoreSpace, MoreFColor, MoreBColor);
////BG if (LogicPage == SEENPAGE) Window_Hide_Mouse(Window);
// }
// }
//
// /*
// ** Scroll the window up one line.
// */
// y = ((WinH / (FontHeight+FontYSpacing)) - 1) * (FontHeight+FontYSpacing);
// LogicPage->Blit(*LogicPage,WinX<<3, WinY + (FontHeight+FontYSpacing), WinX<<3, WinY, WinW<<3, WinH - (FontHeight+FontYSpacing) );
// LogicPage->Fill_Rect(WinX<<3,
// WinY + y,
// ((WinX+WinW)<<3) - 1,
// WinY + WinH - 1,
// (unsigned char)WinB);
}