mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-10 04:43:26 +00:00
DM: Fix file loading dependancy
This commit is contained in:
parent
73a7cba589
commit
f21a9197a6
@ -56,11 +56,12 @@ Common::Error DMEngine::run() {
|
||||
|
||||
_displayMan->setUpScreens(320, 200);
|
||||
|
||||
_displayMan->loadGraphics();
|
||||
|
||||
_dungeonMan->loadDungeonFile();
|
||||
_dungeonMan->setCurrentMapAndPartyMap(0);
|
||||
|
||||
|
||||
_displayMan->loadGraphics();
|
||||
|
||||
|
||||
_displayMan->loadCurrentMapGraphics();
|
||||
|
@ -421,7 +421,7 @@ int16 DungeonMan::getSquareFirstThingIndex(int16 mapX, int16 mapY) {
|
||||
if (mapX < 0 || mapX >= _currMap.width || mapY < 0 || mapY >= _currMap.height || !Square(_currMap.data[mapX][mapY]).get(kThingListPresent))
|
||||
return -1;
|
||||
|
||||
int16 y;
|
||||
int16 y = 0;
|
||||
uint16 index = _currMap.colCumulativeSquareFirstThingCount[mapX];
|
||||
byte* square = _currMap.data[mapX];
|
||||
while (y++ != mapY)
|
||||
|
@ -402,11 +402,11 @@ struct CurrMapData {
|
||||
uint8 currPartyMapIndex; // @ G0309_i_PartyMapIndex
|
||||
|
||||
uint8 index; // @ G0272_i_CurrentMapIndex
|
||||
byte **data; // @ G0271_ppuc_CurrentMapData
|
||||
Map *map; // @ G0269_ps_CurrentMap
|
||||
byte **data = NULL; // @ G0271_ppuc_CurrentMapData
|
||||
Map *map = NULL; // @ G0269_ps_CurrentMap
|
||||
uint16 width; // @ G0273_i_CurrentMapWidth
|
||||
uint16 height; // @ G0274_i_CurrentMapHeight
|
||||
uint16 *colCumulativeSquareFirstThingCount; // @G0270_pui_CurrentMapColumnsCumulativeSquareFirstThingCount
|
||||
uint16 *colCumulativeSquareFirstThingCount = NULL; // @G0270_pui_CurrentMapColumnsCumulativeSquareFirstThingCount
|
||||
}; // @ AGGREGATE
|
||||
|
||||
struct Messages {
|
||||
@ -454,15 +454,15 @@ public:
|
||||
} // @ F0153_DUNGEON_GetRelativeSquareType
|
||||
void setSquareAspect(uint16 *aspectArray, direction dir, int16 mapX, int16 mapY); // @ F0172_DUNGEON_SetSquareAspect
|
||||
|
||||
uint32 _rawDunFileDataSize; // @ probably NONE
|
||||
byte *_rawDunFileData; // @ ???
|
||||
uint32 _rawDunFileDataSize = 0; // @ probably NONE
|
||||
byte *_rawDunFileData = NULL; // @ ???
|
||||
DungeonFileHeader _fileHeader; // @ G0278_ps_DungeonHeader
|
||||
|
||||
DungeonData _dunData; // @ NONE
|
||||
CurrMapData _currMap; // @ NONE
|
||||
Map *_maps; // @ G0277_ps_DungeonMaps
|
||||
Map *_maps = NULL; // @ G0277_ps_DungeonMaps
|
||||
// does not have to be freed
|
||||
byte *_rawMapData; // @ G0276_puc_DungeonRawMapData
|
||||
byte *_rawMapData = NULL; // @ G0276_puc_DungeonRawMapData
|
||||
Messages _messages; // @ NONE;
|
||||
|
||||
int16 _currMapInscriptionWallOrnIndex; // @ G0265_i_CurrentMapInscriptionWallOrnamentIndex
|
||||
|
@ -77,28 +77,28 @@ extern Viewport gDungeonViewport;
|
||||
|
||||
|
||||
class DisplayMan {
|
||||
DMEngine *_vm;
|
||||
DMEngine *_vm = NULL;
|
||||
uint16 _screenWidth;
|
||||
uint16 _screenHeight;
|
||||
byte *_vgaBuffer;
|
||||
uint16 _screenHeight = 0;
|
||||
byte *_vgaBuffer = NULL;
|
||||
|
||||
|
||||
/// Related to graphics.dat file
|
||||
uint16 grapItemCount; // @ G0632_ui_GraphicCount
|
||||
uint32 *_packedItemPos;
|
||||
byte *_packedBitmaps;
|
||||
byte **_bitmaps;
|
||||
uint16 grapItemCount = 0; // @ G0632_ui_GraphicCount
|
||||
uint32 *_packedItemPos = NULL;
|
||||
byte *_packedBitmaps = NULL;
|
||||
byte **_bitmaps = NULL;
|
||||
|
||||
|
||||
// the last two pointers are owned by this array
|
||||
byte *_wallSetBitMaps[15] = {NULL}; // @G[0696..0710]_puc_Bitmap_WallSet_...
|
||||
|
||||
// pointers are not owned by these fields
|
||||
byte *_floorBitmap;
|
||||
byte *_ceilingBitmap;
|
||||
byte *_floorBitmap = NULL;
|
||||
byte *_ceilingBitmap = NULL;
|
||||
|
||||
|
||||
byte *_palChangesProjectile[4]; // @G0075_apuc_PaletteChanges_Projectile
|
||||
byte *_palChangesProjectile[4] = {NULL}; // @G0075_apuc_PaletteChanges_Projectile
|
||||
|
||||
|
||||
DisplayMan(const DisplayMan &other); // no implementation on purpose
|
||||
@ -152,17 +152,17 @@ public:
|
||||
|
||||
|
||||
int16 _championPortraitOrdinal = 0; // @ G0289_i_DungeonView_ChampionPortraitOrdinal
|
||||
int16 _currMapAlcoveOrnIndices[kAlcoveOrnCount]; // @ G0267_ai_CurrentMapAlcoveOrnamentIndices
|
||||
int16 _currMapFountainOrnIndices[kFountainOrnCount]; // @ G0268_ai_CurrentMapFountainOrnamentIndices
|
||||
int16 _currMapWallOrnInfo[16][2]; // @ G0101_aai_CurrentMapWallOrnamentsInf
|
||||
int16 _currMapFloorOrnInfo[16][2]; // @ G0102_aai_CurrentMapFloorOrnamentsInfo
|
||||
int16 _currMapDoorOrnInfo[17][2]; // @ G0103_aai_CurrentMapDoorOrnamentsInfo
|
||||
byte *_currMapAllowedCreatureTypes; // @ G0264_puc_CurrentMapAllowedCreatureTypes
|
||||
byte _currMapWallOrnIndices[16]; // @ G0261_auc_CurrentMapWallOrnamentIndices
|
||||
byte _currMapFloorOrnIndices[16]; // @ G0262_auc_CurrentMapFloorOrnamentIndices
|
||||
byte _currMapDoorOrnIndices[18]; // @ G0263_auc_CurrentMapDoorOrnamentIndices
|
||||
int16 _currMapAlcoveOrnIndices[kAlcoveOrnCount] = {0}; // @ G0267_ai_CurrentMapAlcoveOrnamentIndices
|
||||
int16 _currMapFountainOrnIndices[kFountainOrnCount] = {0}; // @ G0268_ai_CurrentMapFountainOrnamentIndices
|
||||
int16 _currMapWallOrnInfo[16][2] = {0}; // @ G0101_aai_CurrentMapWallOrnamentsInf
|
||||
int16 _currMapFloorOrnInfo[16][2] = {0}; // @ G0102_aai_CurrentMapFloorOrnamentsInfo
|
||||
int16 _currMapDoorOrnInfo[17][2] = {0}; // @ G0103_aai_CurrentMapDoorOrnamentsInfo
|
||||
byte *_currMapAllowedCreatureTypes = NULL; // @ G0264_puc_CurrentMapAllowedCreatureTypes
|
||||
byte _currMapWallOrnIndices[16] = {0}; // @ G0261_auc_CurrentMapWallOrnamentIndices
|
||||
byte _currMapFloorOrnIndices[16] = {0}; // @ G0262_auc_CurrentMapFloorOrnamentIndices
|
||||
byte _currMapDoorOrnIndices[18] = {0}; // @ G0263_auc_CurrentMapDoorOrnamentIndices
|
||||
|
||||
int16 _currMapViAltarIndex; // @ G0266_i_CurrentMapViAltarWallOrnamentIndex
|
||||
int16 _currMapViAltarIndex = 0; // @ G0266_i_CurrentMapViAltarWallOrnamentIndex
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user