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.
58 lines
2.0 KiB
C++
58 lines
2.0 KiB
C++
//===========================================================================//
|
|
// File: style.hpp
|
|
// Project: LabRat
|
|
// Contents:
|
|
//---------------------------------------------------------------------------//
|
|
// Date Who Modification //
|
|
// -------- --- ---------------------------------------------------------- //
|
|
// 03/20/96 JSE Initial coding. Based off MUNGA Style
|
|
//---------------------------------------------------------------------------//
|
|
// Copyright (C) 1996, Virtual World Entertainment, Inc. //
|
|
// All Rights reserved worldwide //
|
|
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL //
|
|
//===========================================================================//
|
|
|
|
#if !defined (STYLE_HPP)
|
|
# define STYLE_HPP
|
|
|
|
|
|
#define SECONDS(edge_tick, edge_fraction)\
|
|
((65536.0f/1193180.0f)*(edge_tick + edge_fraction))
|
|
|
|
#define BREAKABLE_LINE if(1 != 1){;}
|
|
|
|
#define endl "\n"
|
|
|
|
typedef double Time;
|
|
typedef float Scalar;
|
|
typedef unsigned char Logical; // machine dependant zero/not-zero
|
|
typedef unsigned char Byte; // 8 bits unsigned
|
|
typedef unsigned short Word; // 16 bits unsigned
|
|
typedef unsigned long LWord; // 32 bits unsigned
|
|
|
|
struct MY_RGB
|
|
{
|
|
int
|
|
red,
|
|
green,
|
|
blue;
|
|
};
|
|
|
|
enum {
|
|
False = 0,
|
|
True = 1
|
|
};
|
|
|
|
# define SMALL (1e-4f)
|
|
# define Abs(value) ((value>0) ? value : -value)
|
|
# define Clamp(v,f,c) (v = ((v<f) ? f : ((v>c) ? c : v)))
|
|
# define Max_Clamp(v,c) (v = ((v>c) ? c : v))
|
|
# define Is_Many_Bits(value) (Lowbit(value)^value)
|
|
# define Low_Bit(value) (value & (-value))
|
|
# define Min_Clamp(v,f) (v = ((v<f) ? f : v))
|
|
# define Max(a,b) ((a>b) ? a : b)
|
|
# define Min(a,b) ((a<b) ? a : b)
|
|
# define Sgn(value) ((value<-SMALL) ? -1 : value>SMALL)
|
|
|
|
#endif
|