mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 06:53:43 +00:00
Switch to zip archive format for resource data, prep work for moving from PICT/snd to BMP/WAV
This commit is contained in:
@@ -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);
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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))
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user