- connecting the dots for Blood's special tile features.

This commit is contained in:
Christoph Oelckers 2020-09-15 01:27:24 +02:00
parent bc5d3eea88
commit d1293da8dc
4 changed files with 11 additions and 9 deletions

View File

@ -98,6 +98,7 @@ struct GameInterface : ::GameInterface
void NextLevel(MapRecord* map, int skill) override;
void LevelCompleted(MapRecord* map, int skill) override;
bool DrawAutomapPlayer(int x, int y, int z, int a) override;
void SetTileProps(int til, int surf, int vox, int shade) override;
GameStats getStats() override;
};

View File

@ -128,4 +128,11 @@ char tileGetSurfType(int hit)
return 0;
}
void GameInterface::SetTileProps(int tile, int surf, int vox, int shade)
{
if (surf != INT_MAX) surfType[tile] = surf;
if (vox != INT_MAX) voxelIndex[tile] = vox;
if (shade != INT_MAX) tileShade[tile] = shade;
}
END_BLD_NS

View File

@ -107,6 +107,7 @@ struct GameInterface
virtual void NewGame(MapRecord* map, int skill) {}
virtual void LevelCompleted(MapRecord* map, int skill) {}
virtual bool DrawAutomapPlayer(int x, int y, int z, int a) { return false; }
virtual void SetTileProps(int tile, int surf, int vox, int shade) {}
virtual FString statFPS()
{

View File

@ -46,6 +46,7 @@
#include "texturemanager.h"
#include "c_dispatch.h"
#include "sc_man.h"
#include "gamestruct.h"
enum
{
@ -1099,15 +1100,7 @@ void tileImport(FScriptPosition& pos, TileImport& imp)
pos.Message(MSG_DEBUGMSG, "Size mismatch for tile %d", imp.tile);
return;
}
#if 0
// fixme - forward to the game code. These are Blood specific.
if (imp.havesurface)
;// gi->SetSurfType(tile, surface);
if (imp.havevox)
;// gi->SetVoxel(tile, vox);
if (imp.haveshade)
;// gi->SetShade(tile, shade);
#endif
gi->SetTileProps(imp.tile, imp.surface, imp.vox, imp.shade);
if (imp.fn.IsNotEmpty() && tileImportFromTexture(imp.fn, imp.tile, imp.alphacut, imp.istexture) < 0) return;