mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-09 19:32:11 +00:00
SAGA2: Remove test-purposes code
This commit is contained in:
parent
725f11ca60
commit
dab42f94f2
@ -57,7 +57,6 @@ namespace Saga2 {
|
||||
// enable the following to display event loop processing
|
||||
#define DEBUG_LOOP 0
|
||||
|
||||
extern WindowDecoration autoMapDecorations[];
|
||||
extern gToolBase G_BASE;
|
||||
extern char *gameTimeStr;
|
||||
extern bool underground;
|
||||
@ -183,8 +182,6 @@ int16 OptionsDialog(bool disableSaveResume = false);
|
||||
static void mainLoop(bool &cleanExit, int argc, char *argv[]);
|
||||
void displayUpdate(void);
|
||||
|
||||
void testTiles();
|
||||
|
||||
bool initResourceHandles();
|
||||
bool initDisplayPort();
|
||||
bool initPanelSystem();
|
||||
@ -594,42 +591,6 @@ bool openResources(void) {
|
||||
|
||||
}
|
||||
|
||||
void testOpenImage() {
|
||||
hResContext *decRes;
|
||||
|
||||
decRes = resFile->newContext(MKTAG('A', 'M', 'A', 'P'), "Automap Resources");
|
||||
//checkAlloc(summaryData = LoadResource(decRes,
|
||||
// MKTAG('S', 'U', 'M', currentMapNum),
|
||||
// "summary data"));
|
||||
|
||||
WindowDecoration *dec = &autoMapDecorations[0];
|
||||
dec->image = LoadResource(decRes, MKTAG('M', 'A', 'P', 0), "MAP0");
|
||||
//dec->image = ImageCache.requestImage(decRes, MKTAG('M', 'A', 'P', 0) | MKTAG('B', 'R', 'D', dec->imageNumber));
|
||||
Point16 pos(0, 0);
|
||||
drawCompressedImage(mainPort, pos, dec->image);
|
||||
}
|
||||
|
||||
void testScripts() {
|
||||
scriptCallFrame scf;
|
||||
//for (int i = 1; i < 100; ++i)
|
||||
// runScript(i, scf);
|
||||
runScript(1, scf);
|
||||
}
|
||||
|
||||
void testTileRendering() {
|
||||
tileRes = resFile->newContext(MKTAG('T', 'I', 'L', 'E'), "tile resources");
|
||||
listRes = objResFile->newContext(MKTAG('L', 'I', 'S', 'T'), "list resources");
|
||||
resImports = (ResImportTable *)LoadResource(listRes, MKTAG('I', 'M', 'P', 'O'), "res imports");
|
||||
|
||||
initResourceHandles();
|
||||
mainPort.setDisplayPage(&protoPage);
|
||||
initPanelSystem();
|
||||
initDisplayPort();
|
||||
initDisplay();
|
||||
initGameMaps();
|
||||
testTiles();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// Routine to cleanup all the resource files
|
||||
|
||||
|
@ -39,11 +39,6 @@
|
||||
|
||||
namespace Saga2 {
|
||||
|
||||
void testTileRendering();
|
||||
void testScripts();
|
||||
void initScripts();
|
||||
void testOpenImage();
|
||||
bool openResources();
|
||||
void main_saga2();
|
||||
|
||||
Saga2Engine *g_vm;
|
||||
@ -86,24 +81,6 @@ Common::Error Saga2Engine::run() {
|
||||
|
||||
main_saga2();
|
||||
|
||||
#if 0
|
||||
if (openResources()) {
|
||||
testOpenImage();
|
||||
initScripts();
|
||||
testScripts();
|
||||
testTileRendering();
|
||||
}
|
||||
|
||||
// Simple main event loop
|
||||
Common::Event evt;
|
||||
while (!shouldQuit()) {
|
||||
g_system->getEventManager()->pollEvent(evt);
|
||||
|
||||
g_system->updateScreen();
|
||||
g_system->delayMillis(10);
|
||||
}
|
||||
#endif
|
||||
|
||||
return Common::kNoError;
|
||||
}
|
||||
|
||||
|
@ -4683,51 +4683,6 @@ void updateMainDisplay(void) {
|
||||
cycleTiles(deltaTime);
|
||||
}
|
||||
|
||||
void testTiles() {
|
||||
//initBackPanel();
|
||||
//initMaps();
|
||||
initTileCyclingStates();
|
||||
|
||||
setCurrentMap(0);
|
||||
PlayModeSetup();
|
||||
|
||||
//buildRoofTable();
|
||||
//buildDisplayList();
|
||||
|
||||
// draws tiles to tileDrawMap.data
|
||||
drawMetaTiles();
|
||||
|
||||
//uint8 *img = (uint8*)mapList[0].map->mapData;
|
||||
//int16 size = mapList[0].map->size;
|
||||
uint8 *img = tileDrawMap.data;
|
||||
Point16 size = tileDrawMap.size;
|
||||
debugC(3, kDebugTiles, "img = %p, size = %d,%d", (void *)img, size.x, size.y);
|
||||
//Common::hexdump(img, size*size);
|
||||
|
||||
Graphics::Surface sur;
|
||||
sur.create(size.x, size.y, Graphics::PixelFormat::createFormatCLUT8());
|
||||
sur.setPixels(img);
|
||||
sur.debugPrint();
|
||||
g_system->copyRectToScreen(sur.getPixels(), sur.pitch, 0, 0, sur.w, sur.h);
|
||||
|
||||
// Draw sprites onto back buffer
|
||||
//drawDisplayList();
|
||||
|
||||
// Render the image of the mouse pointer on everything else
|
||||
//drawTileMousePointer();
|
||||
|
||||
// Blit it all onto the screen
|
||||
//drawPage->writePixels(
|
||||
// tileRect,
|
||||
// tileDrawMap.data
|
||||
// + fineScroll.x
|
||||
// + fineScroll.y * tileDrawMap.size.x,
|
||||
// tileDrawMap.size.x);
|
||||
|
||||
cleanupTileCyclingStates();
|
||||
cleanupMaps();
|
||||
}
|
||||
|
||||
void drawMainDisplay(void) {
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user