Switch to zip archive format for resource data, prep work for moving from PICT/snd to BMP/WAV

This commit is contained in:
elasota
2020-01-18 08:37:57 -05:00
parent e01cd4ef2e
commit d8331eaeb7
298 changed files with 79115 additions and 231 deletions

View File

@@ -13,7 +13,7 @@
namespace PortabilityLayer
{
class ResourceFile;
class ResourceArchive;
class ScanlineMask;
}
@@ -195,7 +195,7 @@ long RandomLong (long);
void RedAlert (short);
void LoadGraphic (DrawSurface *, short);
void LoadScaledGraphic (DrawSurface *, short, Rect *);
bool LargeIconPlot (DrawSurface *, PortabilityLayer::ResourceFile *, short, const Rect &);
bool LargeIconPlot (DrawSurface *, PortabilityLayer::ResourceArchive *, short, const Rect &);
void DrawCIcon (DrawSurface *surface, short, short, short);
char KeyMapOffsetFromRawKey (char);
long LongSquareRoot (long);

View File

@@ -911,7 +911,7 @@ short GetFirstPICT (void)
resHandle = Get1IndResource('PICT', 1);
if (resHandle != nil)
{
const PortabilityLayer::ResourceCompiledRef *resRef = PortabilityLayer::ResourceManager::GetInstance()->ResourceForHandle(resHandle.MMBlock());
const PortabilityLayer::ResourceArchiveRef *resRef = PortabilityLayer::ResourceManager::GetInstance()->ResourceForHandle(resHandle.MMBlock());
resHandle.Dispose();
return resRef->m_resID;
}

View File

@@ -105,7 +105,7 @@ void UpdateLoadDialog (Dialog *theDialog)
if (SectRect(&dialogRect, &tempRect, &dummyRect))
{
PortabilityLayer::ResourceFile *resFile = PortabilityLayer::ResourceManager::GetInstance()->LoadResFile(theHousesSpecs[i].m_dir, theHousesSpecs[i].m_name);
PortabilityLayer::ResourceArchive *resFile = PortabilityLayer::ResourceManager::GetInstance()->LoadResFile(theHousesSpecs[i].m_dir, theHousesSpecs[i].m_name);
if (resFile != nullptr)
{
if (!LargeIconPlot(surface, resFile, -16455, tempRect))

View File

@@ -15,7 +15,7 @@
#include "Externs.h"
#include "IconLoader.h"
#include "InputManager.h"
#include "ResourceFile.h"
#include "ResourceManager.h"
#include "Utilities.h"
@@ -284,7 +284,7 @@ void LoadScaledGraphic (DrawSurface *surface, short resID, Rect *theRect)
//-------------------------------------------------------------- LargeIconPlot
// Draws a standard b&w icon (32 x 32) - resource is an 'ICON'.
bool LargeIconPlot (DrawSurface *surface, PortabilityLayer::ResourceFile *resFile, short resID, const Rect &theRect)
bool LargeIconPlot (DrawSurface *surface, PortabilityLayer::ResourceArchive *resFile, short resID, const Rect &theRect)
{
Handle hdl = resFile->GetResource('icl8', resID, true);
if (hdl)