Initial commit

This commit is contained in:
2026-02-02 04:50:13 +01:00
commit 5b11698731
22592 changed files with 7677434 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,279 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* 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 3 of the License, or
* 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, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_AGS_PAL_RENDER_AGS_PAL_RENDER_H
#define AGS_PLUGINS_AGS_PAL_RENDER_AGS_PAL_RENDER_H
#include "ags/plugins/ags_plugin.h"
#include "ags/plugins/serializer.h"
namespace AGS3 {
namespace Plugins {
namespace AGSPalRender {
class AGSPalRender : public PluginBase {
SCRIPT_HASH(AGSPalRender)
private:
void syncGame(Serializer &s);
public:
AGSPalRender() : PluginBase() {}
virtual ~AGSPalRender() {}
const char *AGS_GetPluginName() override;
void AGS_EngineStartup(IAGSEngine *lpEngine) override;
void AGS_EngineShutdown() override;
int64 AGS_EngineOnEvent(int event, NumberPtr data) override;
/**
* @defgroup PALInternal
* @{
*/
void LoadCLUT(ScriptMethodParams &params);
void CycleRemap(ScriptMethodParams &params);
void GetColor565(ScriptMethodParams &params);
void GetLuminosityFromPalette(ScriptMethodParams &params);
void AGSFastSin(ScriptMethodParams &params);
void AGSFastCos(ScriptMethodParams &params);
void AGSFastRoot(ScriptMethodParams &params);
void GetRemappedSlot(ScriptMethodParams &params);
void ResetRemapping(ScriptMethodParams &params);
void GetModifiedBackgroundImage(ScriptMethodParams &params);
void WriteObjectivePalette(ScriptMethodParams &params);
void ReadObjectivePaletteR(ScriptMethodParams &params);
void ReadObjectivePaletteB(ScriptMethodParams &params);
void ReadObjectivePaletteG(ScriptMethodParams &params);
/**@}*/
/**
* @defgroup LensDistort
* @{
*/
void SetLensPos(ScriptMethodParams &params);
void GetLensX(ScriptMethodParams &params);
void GetLensY(ScriptMethodParams &params);
void SetLensDrawn(ScriptMethodParams &params);
void GetLensDrawn(ScriptMethodParams &params);
void SetLensOffsetClamp(ScriptMethodParams &params);
void GetLensOffsetClamp(ScriptMethodParams &params);
void GetLensLevel(ScriptMethodParams &params);
void SetLensLevel(ScriptMethodParams &params);
void LensInitialize(ScriptMethodParams &params);
/**@}*/
/**
* @defgroup Translucence
* @{
*/
void CreateTranslucentOverlay(ScriptMethodParams &params);
void DeleteTranslucentOverlay(ScriptMethodParams &params);
void MoveTranslucentOverlay(ScriptMethodParams &params);
void GetTranslucentOverlayX(ScriptMethodParams &params);
void GetTranslucentOverlayY(ScriptMethodParams &params);
void GetTranslucentOverlaySprite(ScriptMethodParams &params);
void GetTranslucentOverlayLevel(ScriptMethodParams &params);
void GetTranslucentOverlayEnabled(ScriptMethodParams &params);
void GetTranslucentOverlayAlpha(ScriptMethodParams &params);
void SetTranslucentOverlayAlpha(ScriptMethodParams &params);
void SetTranslucentOverlayEnabled(ScriptMethodParams &params);
void DrawTransSprite(ScriptMethodParams &params);
/**@}*/
/**
* @defgroup Starfield
* @{
*/
void GetStarfieldOverscan(ScriptMethodParams &params);
void SetStarfieldOverscan(ScriptMethodParams &params);
void GetStarfieldOriginX(ScriptMethodParams &params);
void GetStarfieldOriginY(ScriptMethodParams &params);
void SetStarfieldDepthMultiplier(ScriptMethodParams &params);
void GetStarfieldDepthMultiplier(ScriptMethodParams &params);
void GetStarfieldMaxStars(ScriptMethodParams &params);
void SetStarSpriteScaleBoost(ScriptMethodParams &params);
void GetStarSpriteScaleBoost(ScriptMethodParams &params);
void SetStarMaxRadius(ScriptMethodParams &params);
void GetStarMaxRadius(ScriptMethodParams &params);
void GetStarX(ScriptMethodParams &params);
void GetStarY(ScriptMethodParams &params);
void GetStarZ(ScriptMethodParams &params);
void SetStarPosition(ScriptMethodParams &params);
void RotateStar(ScriptMethodParams &params);
void SetStarColor(ScriptMethodParams &params);
void GetStarColor(ScriptMethodParams &params);
void SetStarSprite(ScriptMethodParams &params);
void GetStarSprite(ScriptMethodParams &params);
void SetStarSpriteRange(ScriptMethodParams &params);
void InitializeStars(ScriptMethodParams &params);
void IterateStars(ScriptMethodParams &params);
void DrawStars(ScriptMethodParams &params);
void SetStarsOriginPoint(ScriptMethodParams &params);
/**@}*/
/**
* @defgroup Plasma
* @{
*/
void DoFire(ScriptMethodParams &params);
void SetPlasmaType(ScriptMethodParams &params);
void ResetPlasmaSettings(ScriptMethodParams &params);
void DrawPlasma(ScriptMethodParams &params);
void SetPlasmaRootType(ScriptMethodParams &params);
void GetPlasmaRootType(ScriptMethodParams &params);
/**@}*/
/**
* @defgroup Reflections
* @{
*/
void SetReflections(ScriptMethodParams &params);
void IsReflectionsOn(ScriptMethodParams &params);
void SetCharacterReflected(ScriptMethodParams &params);
void GetCharacterReflected(ScriptMethodParams &params);
void SetObjectReflected(ScriptMethodParams &params);
void GetObjectReflected(ScriptMethodParams &params);
void ReplaceCharacterReflectionView(ScriptMethodParams &params);
void SetObjectReflectionIgnoreScaling(ScriptMethodParams &params);
/**@}*/
/**
* @defgroup raycast
* @{
*/
void MakeTextures(ScriptMethodParams &params);
void Raycast_Render(ScriptMethodParams &params);
void MoveForward(ScriptMethodParams &params);
void MoveBackward(ScriptMethodParams &params);
void RotateLeft(ScriptMethodParams &params);
void RotateRight(ScriptMethodParams &params);
void Init_Raycaster(ScriptMethodParams &params);
void QuitCleanup(ScriptMethodParams &params);
void LoadMap(ScriptMethodParams &params);
void Ray_InitSprite(ScriptMethodParams &params);
void Ray_SetPlayerPosition(ScriptMethodParams &params);
void Ray_GetPlayerX(ScriptMethodParams &params);
void Ray_GetPlayerY(ScriptMethodParams &params);
void Ray_GetPlayerAngle(ScriptMethodParams &params);
void Ray_SetPlayerAngle(ScriptMethodParams &params);
void Ray_GetWallHotspot(ScriptMethodParams &params);
void Ray_GetWallTexture(ScriptMethodParams &params);
void Ray_GetWallSolid(ScriptMethodParams &params);
void Ray_GetWallIgnoreLighting(ScriptMethodParams &params);
void Ray_GetWallAlpha(ScriptMethodParams &params);
void Ray_GetWallBlendType(ScriptMethodParams &params);
void Ray_SelectTile(ScriptMethodParams &params);
void Ray_GetHotspotAt(ScriptMethodParams &params);
void Ray_GetObjectAt(ScriptMethodParams &params);
void Ray_DrawTile(ScriptMethodParams &params);
void Ray_DrawOntoTile(ScriptMethodParams &params);
void Ray_SetNoClip(ScriptMethodParams &params);
void Ray_GetNoClip(ScriptMethodParams &params);
void Ray_SetSpriteInteractObj(ScriptMethodParams &params);
void Ray_GetSpriteInteractObj(ScriptMethodParams &params);
void Ray_SetSpritePosition(ScriptMethodParams &params);
void Ray_SetSpriteVertOffset(ScriptMethodParams &params);
void Ray_GetSpriteVertOffset(ScriptMethodParams &params);
void Ray_GetSpriteX(ScriptMethodParams &params);
void Ray_GetSpriteY(ScriptMethodParams &params);
void Ray_SetWallHotspot(ScriptMethodParams &params);
void Ray_SetWallTextures(ScriptMethodParams &params);
void Ray_SetWallSolid(ScriptMethodParams &params);
void Ray_SetWallIgnoreLighting(ScriptMethodParams &params);
void Ray_SetWallAlpha(ScriptMethodParams &params);
void Ray_SetWallBlendType(ScriptMethodParams &params);
void Ray_GetMoveSpeed(ScriptMethodParams &params);
void Ray_SetMoveSpeed(ScriptMethodParams &params);
void Ray_GetRotSpeed(ScriptMethodParams &params);
void Ray_SetRotSpeed(ScriptMethodParams &params);
void Ray_GetWallAt(ScriptMethodParams &params);
void Ray_GetLightAt(ScriptMethodParams &params);
void Ray_SetLightAt(ScriptMethodParams &params);
void Ray_SetWallAt(ScriptMethodParams &params);
void Ray_GetPlaneY(ScriptMethodParams &params);
void Ray_SetPlaneY(ScriptMethodParams &params);
void Ray_GetDistanceAt(ScriptMethodParams &params);
void Ray_GetSpriteAngle(ScriptMethodParams &params);
void Ray_SetSpriteAngle(ScriptMethodParams &params);
void Ray_SetSpriteView(ScriptMethodParams &params);
void Ray_GetSpriteView(ScriptMethodParams &params);
void Ray_SetSpriteFrame(ScriptMethodParams &params);
void Ray_GetSpriteFrame(ScriptMethodParams &params);
void Ray_GetTileX_At(ScriptMethodParams &params);
void Ray_GetTileY_At(ScriptMethodParams &params);
void Ray_SetSkyBox(ScriptMethodParams &params);
void Ray_GetSkyBox(ScriptMethodParams &params);
void Ray_SetAmbientLight(ScriptMethodParams &params);
void Ray_GetAmbientLight(ScriptMethodParams &params);
void Ray_SetAmbientColor(ScriptMethodParams &params);
void Ray_GetSpriteAlpha(ScriptMethodParams &params);
void Ray_SetSpriteAlpha(ScriptMethodParams &params);
void Ray_GetSpritePic(ScriptMethodParams &params);
void Ray_SetSpritePic(ScriptMethodParams &params);
void Ray_GetSpriteScaleX(ScriptMethodParams &params);
void Ray_SetSpriteScaleX(ScriptMethodParams &params);
void Ray_GetSpriteScaleY(ScriptMethodParams &params);
void Ray_SetSpriteScaleY(ScriptMethodParams &params);
void Ray_SetSpriteBlendType(ScriptMethodParams &params);
void Ray_GetSpriteBlendType(ScriptMethodParams &params);
void Ray_SetFloorAt(ScriptMethodParams &params);
void Ray_SetCeilingAt(ScriptMethodParams &params);
void Ray_GetCeilingAt(ScriptMethodParams &params);
void Ray_GetFloorAt(ScriptMethodParams &params);
void Ray_GetLightingAt(ScriptMethodParams &params);
void Ray_SetLightingAt(ScriptMethodParams &params);
void Ray_GetAmbientWeight(ScriptMethodParams &params);
void Ray_HasSeenTile(ScriptMethodParams &params);
/**@}*/
};
} // namespace AGSPalRender
} // namespace Plugins
} // namespace AGS3
#endif

View File

@@ -0,0 +1,187 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* 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 3 of the License, or
* 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, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_AGS_PAL_RENDER_PAL_RENDER_H
#define AGS_PLUGINS_AGS_PAL_RENDER_PAL_RENDER_H
#include "ags/lib/allegro.h"
#include "ags/plugins/ags_plugin.h"
#include "ags/plugins/plugin_base.h"
#include "common/algorithm.h"
namespace AGS3 {
namespace Plugins {
namespace AGSPalRender {
struct PALSTRUCT {
byte r;
byte b;
byte g;
};
extern IAGSEngine *engine;
extern unsigned char clut[65536];
extern unsigned char cycle_remap [256];
extern const int alphamultiply [4096];
extern PALSTRUCT objectivepal[256];
// this class exists solely to take advantage of g++'s
// -fvisibility-inlines-hidden option, so that these
// methods can be inlined without any trace or complaint
class Mix {
public:
//unsigned char MixColorAlpha (unsigned char fg,unsigned char bg,unsigned char alpha);
//unsigned char MixColorAdditive (unsigned char fg,unsigned char bg,unsigned char alpha);
static unsigned char MixColorAlpha(unsigned char fg, unsigned char bg, unsigned char alpha, int use_objpal = 0) {
unsigned char rfg = cycle_remap[fg]; //Automatic remapping of palette slots.
//unsigned char rbg = cycle_remap [bg]; //Saves on typing elsewhere.
AGSColor *palette = engine->GetPalette();
int i = 0;
//int out_r = (palette[fg].r>>1) * alpha + (palette[bg].r>>1) * (255 - alpha);
//int out_g = palette[fg].g * alpha + palette[bg].g * (255 - alpha);
//int out_b = (palette[fg].b>>1) * alpha + (palette[bg].b>>1) * (255 - alpha);
int out_r, out_g, out_b;
if (use_objpal == 0) {
out_r = (objectivepal[rfg].r >> 1) *alpha + (palette[bg].r >> 1) *(255 - alpha);
out_g = objectivepal[rfg].g * alpha + palette[bg].g * (255 - alpha);
out_b = (objectivepal[rfg].b >> 1) *alpha + (palette[bg].b >> 1) *(255 - alpha);
} else {
out_r = (objectivepal[rfg].r >> 1) *alpha + (objectivepal[bg].r >> 1) *(255 - alpha);
out_g = objectivepal[rfg].g * alpha + objectivepal[bg].g * (255 - alpha);
out_b = (objectivepal[rfg].b >> 1) *alpha + (objectivepal[bg].b >> 1) *(255 - alpha);
}
//char ralpha = MAX(0,MIN(63,alpha>>2));
//unsigned char invralpha = 64-ralpha;
//if (ralpha > alpha) engine->AbortGame ("oops");
//int out_r = alphamultiply[((palette[fg].r>>1)<<6) +ralpha] + alphamultiply[((palette[bg].r>>1)<<6) +(invralpha)];
//int out_g = alphamultiply[((palette[fg].g) <<6) +ralpha] + alphamultiply[((palette[bg].g) <<6) +(invralpha)];
//int out_b = alphamultiply[((palette[fg].b>>1)<<6) +ralpha] + alphamultiply[((palette[bg].b>>1)<<6) +(invralpha)];
out_r = (out_r + 1 + (out_r >> 8)) >> 8;
out_g = (out_g + 1 + (out_g >> 8)) >> 8;
out_b = (out_b + 1 + (out_b >> 8)) >> 8;
//out_r = (out_r + 1 + (out_r >> 6)) >> 6;
//out_g = (out_g + 1 + (out_g >> 6)) >> 6;
//out_b = (out_b + 1 + (out_b >> 6)) >> 6;
i = ((out_r << 11) | (out_g << 5) | out_b);
unsigned char *clutp = clut;
//unsigned char result = cycle_remap [clut[i>>8][i%256]]; //Once again, to make sure that the palette slot used is the right one.
return cycle_remap[*(clutp + i)]; //Once again, to make sure that the palette slot used is the right one.
//engine->ReleaseBitmapSurface (clutspr);
}
static unsigned char MixColorLightLevel(unsigned char fg, unsigned char intensity) {
unsigned char rfg = cycle_remap [fg]; //Automatic remapping of palette slots.
int i = 0;
//int dark_r = (((palette[fg].r>>1) * (intensity))>>8);
//int dark_b = (((palette[fg].b>>1) * (intensity))>>8);
//int dark_g = (((palette[fg].g) * (intensity))>>8);
int dark_r = (((objectivepal[rfg].r >> 1) * (intensity)) >> 8);
int dark_b = (((objectivepal[rfg].b >> 1) * (intensity)) >> 8);
int dark_g = (((objectivepal[rfg].g) * (intensity)) >> 8);
i = ((dark_r << 11) | (dark_g << 5) | dark_b);
unsigned char *clutp = clut;
return cycle_remap [*(clutp + i)]; //Once again, to make sure that the palette slot used is the right one.
}
static unsigned char MixColorAdditive(unsigned char fg, unsigned char bg, unsigned char alpha, int use_objpal = 0) {
unsigned char rfg = cycle_remap[fg]; //Automatic remapping of palette slots.
//unsigned char rbg = cycle_remap[bg]; //Saves on typing elsewhere.
//BITMAP *clutspr = engine->GetSpriteGraphic (clutslot);
//if (!clutspr) engine->AbortGame ("MixColorAlpha: Can't load CLUT sprite into memory.");
//uint8 *clutarray = engine->GetRawBitmapSurface (clutspr);
AGSColor *palette = engine->GetPalette();
int i = 0;
int add_r, add_b, add_g = 0;
//char ralpha = MAX(0,MIN(63,alpha>>2));
//add_r = (((palette[fg].r>>1) * (alpha))>>8);
//add_b = (((palette[fg].b>>1) * (alpha))>>8);
//add_g = (((palette[fg].g) * (alpha))>>8);
add_r = (((objectivepal[rfg].r >> 1) * (alpha)) >> 8);
add_b = (((objectivepal[rfg].b >> 1) * (alpha)) >> 8);
add_g = (((objectivepal[rfg].g) * (alpha)) >> 8);
//int a_g = MAX(0,MIN(63,alpha>>2));
//add_r = ((alphamultiply[(palette[fg].r>>1)<<6)+ralpha])>>6);
//add_b = ((alphamultiply[(palette[fg].b>>1)<<6)+ralpha])>>6);
//add_g = ((alphamultiply[(palette[fg].g) <<6)+ralpha])>>6);
//int out_r = MIN(31,(palette[bg].r>>1) + add_r);
//int out_g = MIN(63, palette[bg].g + add_g);
//int out_b = MIN(31,(palette[bg].b>>1) + add_b);
int out_r, out_g, out_b;
if (use_objpal == 0) {
out_r = MIN(31, (palette[bg].r >> 1) + add_r);
out_g = MIN(63, palette[bg].g + add_g);
out_b = MIN(31, (palette[bg].b >> 1) + add_b);
} else {
out_r = MIN(31, (objectivepal [bg].r >> 1) + add_r);
out_g = MIN(63, objectivepal [bg].g + add_g);
out_b = MIN(31, (objectivepal [bg].b >> 1) + add_b);
}
i = ((out_r << 11) | (out_g << 5) | out_b);
unsigned char *clutp = clut;
unsigned char result = cycle_remap [*(clutp + i)]; //Once again, to make sure that the palette slot used is the right one.
//unsigned char result = cycle_remap [clut[i>>8][i%256]]; //Once again, to make sure that the palette slot used is the right one.
//engine->ReleaseBitmapSurface (clutspr);
return result;
}
static unsigned char MixColorMultiply(unsigned char fg, unsigned char bg, unsigned char alpha, int use_objpal = 0) {
unsigned char rfg = cycle_remap [fg]; //Automatic remapping of palette slots.
unsigned char rbg = cycle_remap [bg]; //Saves on typing elsewhere.
AGSColor *palette = engine->GetPalette();
int i = 0;
int mul_r, mul_b, mul_g = 0;
int out_r, out_g, out_b = 0;
if (use_objpal == 0) {
mul_r = ((objectivepal[rfg].r >> 1) * (palette[rbg].r >> 1)) / 64;
mul_b = ((objectivepal[rfg].b >> 1) * (palette[rbg].b >> 1)) / 64;
mul_g = ((objectivepal[rfg].g * palette[rbg].g) / 64);
out_r = ((palette[rbg].r >> 1) * (63 - (alpha / 4)) + (mul_r * (alpha / 4))) / 63;
out_g = (palette[rbg].g * (63 - (alpha / 4)) + (mul_g * (alpha / 4))) / 63;
out_b = ((palette[rbg].b >> 1) * (63 - (alpha / 4)) + (mul_b * (alpha / 4))) / 63;
} else {
mul_r = ((objectivepal[rfg].r >> 1) * (objectivepal[rbg].r >> 1)) / 64;
mul_b = ((objectivepal[rfg].b >> 1) * (objectivepal[rbg].b >> 1)) / 64;
mul_g = ((objectivepal[rfg].g * objectivepal[rbg].g) / 64);
out_r = ((objectivepal[rbg].r >> 1) * (63 - (alpha / 4)) + (mul_r * (alpha / 4))) / 63;
out_g = (objectivepal[rbg].g * (63 - (alpha / 4)) + (mul_g * (alpha / 4))) / 63;
out_b = ((objectivepal[rbg].b >> 1) * (63 - (alpha / 4)) + (mul_b * (alpha / 4))) / 63;
}
i = ((out_r << 11) | (out_g << 5) | out_b);
unsigned char *clutp = clut;
unsigned char result = cycle_remap [*(clutp + i)]; //Once again, to make sure that the palette slot used is the right one.
//unsigned char result = cycle_remap [clut[i>>8][i%256]]; //Once again, to make sure that the palette slot used is the right one.
//engine->ReleaseBitmapSurface (clutspr);
return result;
}
};
void GetColor565(ScriptMethodParams &params);
unsigned short root(unsigned short x);
float FastSin(float x);
float FastCos(float x);
} // namespace AGSPalRender
} // namespace Plugins
} // namespace AGS3
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,108 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* 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 3 of the License, or
* 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, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_AGS_PAL_RENDER_RAYCAST_H
#define AGS_PLUGINS_AGS_PAL_RENDER_RAYCAST_H
#include "ags/plugins/ags_pal_render/pal_render.h"
namespace AGS3 {
namespace Plugins {
namespace AGSPalRender {
#define MAP_WIDTH 64
#define MAP_HEIGHT 64
struct Sprite {
double x;
double y;
int texture;
byte alpha;
int blendmode;
double uDivW;
double uDivH;
double vMove;
double hMove;
int8 objectinteract;
int view;
int frame;
int angle;
};
struct wallType {
int texture[4];
int solid[4];
int ignorelighting[4];
int alpha[4];
int blendtype[4];
int mask[4];
byte hotspotinteract;
};
extern bool raycastOn;
extern double posX;
extern double posY; //x and y start position
extern double dirX;
extern double dirY; //initial direction vector
extern double planeX;
extern double planeY; //the 2d raycaster version of camera plane
extern double moveSpeed; //the constant value is in squares/second
extern double rotSpeed; //the constant value is in radians/second
extern unsigned char worldMap[MAP_WIDTH][MAP_HEIGHT];
extern unsigned char lightMap[MAP_WIDTH][MAP_HEIGHT];
extern int ceilingMap[MAP_WIDTH][MAP_HEIGHT];
extern int floorMap[MAP_WIDTH][MAP_HEIGHT];
extern int heightMap[MAP_WIDTH][MAP_HEIGHT];
extern unsigned char seenMap[MAP_WIDTH][MAP_HEIGHT];
extern int textureSlot;
extern int ambientlight;
#define numSprites 256
extern Sprite sprite[numSprites];
#define texWidth 64
#define texHeight 64
#define MAX_TEXTURES 512
extern unsigned char texture[][texWidth * texHeight];
extern bool heightmapOn;
extern wallType wallData[256];
//arrays used to sort the sprites
extern unsigned char **transcolorbuffer;
extern unsigned char **transalphabuffer;
extern double **transzbuffer;
extern bool *transslicedrawn;
extern int *transwallblendmode;
extern double **ZBuffer;
extern double *distTable;
extern short *interactionmap;
extern int skybox;
} // namespace AGSPalRender
} // namespace Plugins
} // namespace AGS3
#endif