Files
TeslaRel410/restoration/source410/override/FILESTRM.HPP
T
CydandClaude Fable 5 af80d52e22 source410: engine COMPLETE (165/165) - link reaches PE emission; deep ledger cut
The tlink32 campaign after the checkpoint: eleven engine bodies back-dated
from BT412 (rotation player team explode dropzone terrain cultural receiver
subsystm app l4gauge - the Application core included), the WinTesla-ectomy
handled by backdate.py's new unwrap rules (accessor-fn statics -> 1995 static
objects, decl rewrites, pointer->reference Derivation ctor, 2007 windowed-
gauge/console-marshal/idle-pump excisions), staged statics TUs opened for the
game classes (MECH/BTPLAYER/BTDIRECT/PROJTILE/MISSILE/BTL4MPPR .CPP + L4APP/
NETWORK engine statics).

State: every compiled symbol short of the shallow graph RESOLVED (the 52- and
17-symbol ledgers burned to zero); with 32stub.exe in place the linker reaches
full vtable closure and emits the deep ledger (~210 symbols, UNRESOLVED-
LEDGER.txt): remaining engine bodies (objstrm cstr gauge/gaugrend graphics
pixelmap palette resfile ray scnrole explosion-table), the DOS driver extern
layer (_SVGA*/_PCSerial*/_PCSPAK*/joystick/netnub/sosMIDI), the full L4App
body, and the real game-TU frontier (Mech::Make et al.). Recipe proven for
every category.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 11:25:49 -05:00

50 lines
1.4 KiB
C++

#if !defined(FILESTRM_HPP)
# define FILESTRM_HPP
# if !defined(MEMSTRM_HPP)
# include <memstrm.hpp>
# endif
class FileStream : public MemoryStream
{
public:
FileStream(const char* file_name = NULL, Logical writable = False);
~FileStream() { Close(); }
public:
void* GetPointer() const
{
Fail("No implementation possible for FileStream::GetPointer()");
return NULL;
}
void SetPointer(void *new_pointer) { Fail("No implementation possible for FileStream::SetPointer(void*)"); }
void SetPointer(size_t index);
MemoryStream& AdvancePointer(size_t count);
MemoryStream& RewindPointer(size_t count);
MemoryStream& ReadBytes(void *ptr, size_t number_of_bytes);
MemoryStream& WriteBytes(const void *ptr, size_t number_of_bytes);
void Open(const char* file_name = NULL, Logical writable = False);
void Close();
Logical IsFileOpened() { return fileHandle != -1; }
Logical TestInstance() const;
public:
int fileHandle;
Logical readOnly;
static int OpenImplementation(const char* file_name, Logical read_only);
static void FlushImplementation(int file_handle);
static void CloseImplementation(int file_handle);
static size_t SeekImplementation(int file_handle, size_t where, Logical from_end = False);
static size_t ReadImplementation(int file_handle, void *buffer, size_t length);
static size_t WriteImplementation(int file_handle, const void* buffer, size_t length);
};
#endif