Files
RP412/RP_L4/RPL4TOOL.cpp
T
CydandClaude Opus 4.8 4abbf8879f Initial import of Red Planet v4.10 Win32 source
Imports the current Win32 source for the pod-racing game 'Red Planet',
built on the MUNGA engine and its L4 (Win32/DirectX) platform layer:

- MUNGA / MUNGA_L4: cross-platform engine core and Win32 backend
- RP / RP_L4: Red Planet game logic and Win32 application
- DivLoader, Setup1: asset loader and installer project
- lib, MUNGA_L4/openal, MUNGA_L4/sos: third-party audio dependencies

Removed stale Subversion metadata and added .gitignore/.gitattributes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 07:59:51 -05:00

79 lines
1.7 KiB
C++

#include "rpl4.h"
#pragma hdrstop
#include <conio.h>
#include "..\rp\rptool.h"
#include "rpl4mode.h"
#include "..\munga_l4\l4tool.h"
#include "rpl4ver.h"
class RPL4Tool :
public L4Tool
{
public:
RPL4Tool() : L4Tool()
{
modeManager = new RPL4ModeManager(RPL4ModeManager::ModeInitial);
}
~RPL4Tool()
{
delete modeManager;
modeManager = NULL;
}
Logical ConvertStringToModeMask(const char *name, ModeMask *returned_value_ptr)
{
return modeManager->ModeStringLookup(name, returned_value_ptr);
}
protected:
RPL4ModeManager *modeManager;
};
//##########################################################################
//################## RP4L4Application Globals ########################
//##########################################################################
extern const char* const ProgName;
const char* const ProgName = "rpl4tool";
//
//#############################################################################
// main
//#############################################################################
//
int main(int argc, char *argv[])
{
int status;
if (argc < 3)
{
Usage:
DEBUG_STREAM << "Building Usage: rpl4tool -b rpl4.bld [res2.bld]\n" << " Listing Usage: rpl4tool -l rpl4.res [res2.res ...]\n" << std::flush;
status = 1;
}
else
{
RPL4Tool rpl4_tool;
RPTool rp_l4_tool(&rpl4_tool);
L4AudioCreateSymbols create_symbols;
if (!strcmp(argv[1], "-b"))
{
status = rp_l4_tool.BuildResources(argc-1, &argv[1], create_symbols, MINOR_DATA_VERSION);
}
else if (!strcmp(argv[1], "-l"))
{
status = rp_l4_tool.ListResources(argc-1, &argv[1]);
}
else
{
DEBUG_STREAM << "Error: Unknown tool switch!\n" << std::flush;
goto Usage;
}
}
_getch();
return status;
}