mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 22:58:09 +00:00
f7ce39763e
block surfaces. (A block surface is a 64x64 tile of a parallax layer.) I've also done a few things to try and optimize the drawing: * The back buffer is no longer cleared between frames. This may cause regressions, but I do believe that the entire picture area is always completely re-rendered for each frame. As a result of this, the menu code is now responsible for clearing the icon areas itself. * A few unnecessary copy_rect() calls were commented out in favor of one big copy_rect() in ServiceWindows(). * Completely opaque block surfaces are copied with memcpy(), one line at a time. Unless we manage to add intelligent screen redrawing, I don't think it will get that much faster than this, though there is some unnecessary data copying in DrawSprite() that could be removed. And the game is still a terrible CPU hog. I believe the animation runs at approximately 12 fps. If there's still time left, it will pump out further frames to get smooth scrolling. We ought to put a cap on that, and if it has already reached the scroll target it should sleep for the rest of the render cycle. svn-id: r9886
97 lines
3.2 KiB
C
97 lines
3.2 KiB
C
/* Copyright (C) 1994-2003 Revolution Software Ltd
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* as published by the Free Software Foundation; either version 2
|
|
* of the License, or (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*
|
|
* $Header$
|
|
*/
|
|
|
|
//=============================================================================
|
|
//
|
|
// Filename : d_draw.h
|
|
// Created : 22nd August 1996
|
|
// By : P.R.Porter
|
|
//
|
|
// Version Date By Description
|
|
// ------- --------- --- -----------------------------------------------
|
|
// 1.0 16-Sep-96 PRP Interface to the DirectDraw driver functions
|
|
// and data.
|
|
//
|
|
// 1.1 19-Sep-96 PRP Increased scope of directDraw data, such as
|
|
// the back buffer object, so that mouse.c can
|
|
// have access to the screen.
|
|
//
|
|
// 1.2 25-Sep-96 PRP Made scrollx and scrolly available to all
|
|
// driver code.
|
|
//
|
|
// 1.3 26-Sep-96 PRP Moved scroll stuff to render.h for clarity.
|
|
//
|
|
// 1.4 07-Nov-96 PRP Made bFullScreen available to all driver code.
|
|
//
|
|
// 1.5 18-Nov-96 PRP Added reference to lpDD2 object.
|
|
//
|
|
// 1.6 24-Jan-97 PRP Added hardware capability bits and defines.
|
|
//
|
|
// 1.7 06-Mar-97 PRP Changed capability bits, and changed the
|
|
// direct draw error reporting call. Added
|
|
// function to grab screen shot.
|
|
//
|
|
// 1.8 16-Jun-97 PSJ Made globall externable to c++.
|
|
//
|
|
// 1.9 27-Jun-97 PRP Moving the definition of GrabScreenShot to
|
|
// driver96.h for external access.
|
|
//
|
|
//
|
|
// Summary : This include file defines links to all data which is
|
|
// defined in the d_draw.c module, but can be accessed by
|
|
// other parts of the driver96 library.
|
|
//
|
|
//
|
|
//=============================================================================
|
|
|
|
|
|
#ifndef D_DRAW_H
|
|
#define D_DRAW_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
//#include "ddraw.h"
|
|
#include "driver96.h"
|
|
|
|
// Bits defining hardware and emulation capabilities.
|
|
#define RDCAPS_BLTSTRETCH 1
|
|
#define RDCAPS_SRCBLTCKEY 2
|
|
#define DirectDrawError(f, g) FatalDirectDrawError(f, g, __FILE__, __LINE__)
|
|
|
|
|
|
extern uint8 *lpPalette; // palette
|
|
extern byte *lpBackBuffer; // back surface
|
|
// extern Surface *lpPrimarySurface; // DirectDraw front buffer.
|
|
extern uint8 *lpDD2; // DirectDraw2 object
|
|
extern BOOL bFullScreen; // Defines whether the app is running in full screen mode or not.
|
|
//extern DDCOLORKEY blackColorKey; // transparent pixel for color key blitting.
|
|
extern uint8 blackColorKey; // transparent pixel for color key blitting.
|
|
extern int32 dxHalCaps; // Hardware capabilities.
|
|
extern int32 dxHelCaps; // Emulation capabilities.
|
|
|
|
extern void FatalDirectDrawError(char *str, int32 dderr, char *file, int32 line);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|