Complete disaster-recovery snapshot: engine/game source, game data assets, VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive. Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false, no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
268 lines
5.3 KiB
C++
268 lines
5.3 KiB
C++
//===========================================================================//
|
|
// File: storage.hpp
|
|
// Project: LabRat
|
|
// Contents:
|
|
//---------------------------------------------------------------------------//
|
|
// Date Who Modification //
|
|
// -------- --- ---------------------------------------------------------- //
|
|
// 03/20/96 JSE Initial coding.
|
|
//---------------------------------------------------------------------------//
|
|
// Copyright (C) 1996, Virtual World Entertainment, Inc. //
|
|
// All Rights reserved worldwide //
|
|
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL //
|
|
//===========================================================================//
|
|
|
|
|
|
#if !defined (STORAGE_HPP)
|
|
# define STORAGE_HPP
|
|
|
|
#include "memory.h"
|
|
|
|
# if !defined (STYLE_HPP)
|
|
# include "style.hpp"
|
|
# endif
|
|
|
|
class TraceStorage;
|
|
|
|
|
|
#include "LabRat.h"
|
|
|
|
#include "resource.h"
|
|
#include "traceline.hpp"
|
|
#include "LabRatDoc.h"
|
|
|
|
|
|
|
|
|
|
//##########################################################################
|
|
//####################### TraceStorage
|
|
//##########################################################################
|
|
|
|
class TraceStorage
|
|
{
|
|
|
|
|
|
private:
|
|
Time traceTime;
|
|
Byte selectionColor; // 0 is not selected and 1-254 is pallette color
|
|
|
|
public:
|
|
|
|
|
|
|
|
TraceStorage()
|
|
{
|
|
traceTime = 0.0f;
|
|
selectionColor = 0;
|
|
}
|
|
|
|
TraceStorage(Time time)
|
|
{
|
|
traceTime = time;
|
|
}
|
|
|
|
virtual ~TraceStorage()
|
|
{;}
|
|
|
|
|
|
TraceStorage *
|
|
GetAddress()
|
|
{
|
|
return this;
|
|
}
|
|
|
|
|
|
void SetTraceTime(Time time)
|
|
{
|
|
traceTime = time;
|
|
}
|
|
|
|
void SetSelection(Byte color)
|
|
{
|
|
selectionColor = color;
|
|
}
|
|
|
|
void ClearSelection(void)
|
|
{
|
|
selectionColor = 0;
|
|
}
|
|
|
|
Time GetTraceTime(void)
|
|
{
|
|
return traceTime;
|
|
}
|
|
|
|
virtual void
|
|
LoadData(CArchive& ar, CObarrayHolder *data_holder, BYTE edge_flag);
|
|
|
|
|
|
static
|
|
TraceStorage *
|
|
FindElement(CObarrayHolder *data_holder, int element);
|
|
|
|
static
|
|
TraceLine *
|
|
CreateTraceLine(int trace_type);
|
|
|
|
static
|
|
void
|
|
AllocateStorage(CObarrayHolder *data_holder);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
//##########################################################################
|
|
//####################### ToggleTraceStorage
|
|
//##########################################################################
|
|
|
|
|
|
|
|
class ToggleTraceStorage :
|
|
public TraceStorage
|
|
{
|
|
|
|
private:
|
|
Logical
|
|
position;
|
|
|
|
public:
|
|
ToggleTraceStorage():
|
|
TraceStorage()
|
|
{position = 0;}
|
|
|
|
ToggleTraceStorage(Scalar time, Logical value):
|
|
TraceStorage(time)
|
|
{position = value;}
|
|
|
|
|
|
void
|
|
SetPosition(Logical value)
|
|
{position = value;}
|
|
|
|
Logical
|
|
GetPosition(void)
|
|
{return position;}
|
|
|
|
void
|
|
LoadData(
|
|
CArchive& ar, CObarrayHolder *data_holder, BYTE edge_flag);
|
|
|
|
|
|
};
|
|
|
|
//##########################################################################
|
|
//####################### MarkerTraceStorage
|
|
//##########################################################################
|
|
|
|
class MarkerTraceStorage :
|
|
public TraceStorage
|
|
{
|
|
|
|
};
|
|
|
|
|
|
|
|
//##########################################################################
|
|
//####################### IntegerTraceStorage
|
|
//##########################################################################
|
|
|
|
|
|
|
|
class IntegerTraceStorage :
|
|
public TraceStorage
|
|
{
|
|
|
|
private:
|
|
int position;
|
|
|
|
public:
|
|
IntegerTraceStorage():
|
|
TraceStorage()
|
|
{position = 0;}
|
|
|
|
IntegerTraceStorage(Scalar time, int value):
|
|
TraceStorage(time)
|
|
{position = value;}
|
|
|
|
void SetPosition(int value)
|
|
{position = value;}
|
|
|
|
int GetPosition(void)
|
|
{return position;}
|
|
|
|
|
|
void
|
|
LoadData(
|
|
CArchive& ar, CObarrayHolder *data_holder, BYTE edge_flag);
|
|
|
|
};
|
|
|
|
//##########################################################################
|
|
//####################### ScalarTraceStorage
|
|
//##########################################################################
|
|
|
|
|
|
|
|
class ScalarTraceStorage :
|
|
public TraceStorage
|
|
{
|
|
|
|
private:
|
|
Scalar position;
|
|
|
|
public:
|
|
ScalarTraceStorage():
|
|
TraceStorage()
|
|
{position = (float)0.0f;}
|
|
|
|
ScalarTraceStorage(Scalar time, Scalar value):
|
|
TraceStorage(time)
|
|
{position = value;}
|
|
|
|
void SetPosition(Scalar value)
|
|
{position = value;}
|
|
|
|
Scalar GetPosition(void)
|
|
{return position;}
|
|
|
|
void
|
|
LoadData(
|
|
CArchive& ar, CObarrayHolder *data_holder, BYTE edge_flag);
|
|
|
|
|
|
};
|
|
|
|
|
|
//##########################################################################
|
|
//####################### ReceiverMessageTraceStorage
|
|
//##########################################################################
|
|
|
|
class ReceiverMessageTraceStorage :
|
|
public ScalarTraceStorage
|
|
{
|
|
|
|
public:
|
|
|
|
enum {
|
|
messageQue = 1,
|
|
messageDispatch = 2
|
|
};
|
|
|
|
Logical
|
|
edgeFlag;
|
|
|
|
int
|
|
messagePriority,
|
|
classID,
|
|
messageID;
|
|
|
|
void
|
|
LoadData(
|
|
CArchive& ar, CObarrayHolder *data_holder, BYTE edge_flag);
|
|
|
|
|
|
};
|
|
#endif
|