Files
CydandClaude Fable 5 fdd9ac9d97 Initial import: Tesla Release 4.10 (Tesla:BattleTech & Tesla:Red Planet)
Archival snapshot of the Virtual World Entertainment Tesla cockpit
software, 1994-1996: MUNGA engine and L4 pod layer source (Borland
C++ 5.0), BT/RP game code, and game content (models, audio, maps,
gauges, Division renderer data). Includes third-party libraries:
Division dVS/DPL graphics, HMI SOS audio, WATTCP networking.

Files are preserved byte-for-byte (.gitattributes disables all
line-ending conversion). README.md documents the layout, target
hardware, and toolchain.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 13:21:58 -05:00

178 lines
4.4 KiB
C++

//===========================================================================//
// File: fileutil.hh //
// Title: General File Utilities //
// Project: Tool Architecture II //
// Author: Jerry Edsall //
// Purpose: Provide mechanism for keeping work directories //
//---------------------------------------------------------------------------//
// Date Who Modification //
// -------- --- ---------------------------------------------------------- //
// 02/23/95 JSE Initial Coding //
// 03/01/95 KEO Cleanup and enhancements. //
//---------------------------------------------------------------------------//
// Copyright (c) 1995 Virtual World Entertainment, Inc. //
// All rights reserved worldwide. //
// This unpublished source code is PROPRIETARY and CONFIDENTIAL. //
//===========================================================================//
#if !defined(FILEUTIL_HPP)
#define FILEUTIL_HPP
//---------------
// munga headers
//---------------
#if !defined(STYLE_HPP)
#include <style.hpp>
#endif
#if !defined(SCALAR_HPP)
#include <scalar.hpp>
#endif
class NotationFile;
extern char *WorkingDirectory;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
extern const char *White_Space;
inline char*
NextToken()
{ return strtok(NULL, White_Space); }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
void
SetSourceDirectory(const char *input_file);
void
SetOutputDirectory(const char *directory);
const char*
GetSourceDirectory();
const char*
GetConfigDirectory();
const char*
GetMaterialDirectory();
const char*
GetTextureDirectory();
const char*
GetAnimationDirectory();
const char*
GetProductionDirectory();
const char*
GetOutputDirectory();
void
ClearDirectories();
const char*
SourceFile(
const char *filename,
const char *extension = NULL
);
const char*
ConfigFile(
const char *filename,
const char *extension = NULL
);
const char*
MaterialFile(
const char *filename,
const char *extension = NULL
);
const char*
TextureFile(
const char *filename,
const char *extension = NULL
);
const char*
AnimationFile(
const char *filename,
const char *extension = NULL
);
const char*
OutputFile(
const char *filename,
const char *extension = NULL
);
const char*
StripDirectory(const char *filename);
const char*
StripExtension(const char *filename);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
char*
Ind(int level = 1);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Logical
GetLine(
istream &stream,
char *buffer,
int size_of_buffer
);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#if 0
char*
stripname(char filename[]);
#endif
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Scalar
D2R(float degrees);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
char*
MakeWorkingDirectory(
const char *file
);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Logical
DirectoryIsSpecified(
const char *file
);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
char*
MakePathedFilename(
const char *directory,
const char *name
);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
void
OpenOutput(
ofstream &stream,
const char *directory,
const char *filename
);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
void
OpenInput(
ifstream &stream,
char *directory,
const char *filename
);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Logical
DoesNotationFileExist(
NotationFile
*notation_file
);
#endif
//=============================================================================