scummvm/screen.h

52 lines
1.8 KiB
C
Raw Normal View History

// Residual - Virtual machine to run LucasArts' 3D adventure games
// Copyright (C) 2003-2004 The ScummVM-Residual Team (www.scummvm.org)
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library 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
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2003-08-30 17:58:33 +00:00
#ifndef _SCREEN_H_
#define _SCREEN_H_
#include <SDL_opengl.h>
#define SCREEN_WIDTH 640
#define SCREEN_HEIGHT 480
#define SCREEN_BLOCK_WIDTH 16
#define SCREEN_BLOCK_HEIGHT 16
2004-12-09 23:55:43 +00:00
#define SCREEN_BLOCK_SIZE (SCREEN_BLOCK_WIDTH * SCREEN_BLOCK_HEIGHT)
2003-08-30 17:58:33 +00:00
// Yaz: warning, SCREEN_WIDTH must be divisible by SCREEN_BLOCK_WIDTH and SCREEN_HEIGHT by SCREEN_BLOCK_HEIGH
// maybe we should check it with the precompiler...
#define NUM_SCREEN_BLOCK_WIDTH (SCREEN_WIDTH / SCREEN_BLOCK_WIDTH)
#define NUM_SCREEN_BLOCK_HEIGHT (SCREEN_HEIGHT / SCREEN_BLOCK_HEIGHT)
#define NUM_SCREEN_BLOCKS (NUM_SCREEN_BLOCK_WIDTH * NUM_SCREEN_BLOCK_HEIGHT)
struct screenBlockDataStruct {
2003-08-30 17:58:33 +00:00
bool isDirty;
float depth;
};
void screenBlocksReset();
2004-12-09 23:55:43 +00:00
void screenBlocksInit(char *zbuffer);
2003-08-30 17:58:33 +00:00
void screenBlocksInitEmpty();
2004-12-09 23:55:43 +00:00
void screenBlocksAddRectangle(int top, int right, int left, int bottom, float depth);
2003-08-30 17:58:33 +00:00
void screenBlocksDrawDebug();
void screenBlocksBlitDirtyBlocks();
#endif // _SCREEN_H_