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.
59 lines
1.8 KiB
C++
59 lines
1.8 KiB
C++
//===========================================================================//
|
|
// File: GlobalPointerManager.hpp
|
|
// Project: Adept
|
|
// Contents: GlobalPointers
|
|
//---------------------------------------------------------------------------//
|
|
// Date Who Modification
|
|
// -------- --- -----------------------------------------------------------//
|
|
// 07/08/00 JSE Initial Coding
|
|
//---------------------------------------------------------------------------//
|
|
// Copyright (C) 2000, Microsoft Corp.
|
|
// All Rights reserved worldwide
|
|
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL
|
|
//===========================================================================//
|
|
|
|
#pragma once
|
|
|
|
#include "Adept.hpp"
|
|
|
|
#if 0
|
|
#define GLOBAL_POINTER(string) LOGIC("GlobalPointer::" string)
|
|
#else
|
|
#define GLOBAL_POINTER(string)
|
|
#endif
|
|
|
|
namespace Adept
|
|
{
|
|
|
|
|
|
void AdeptGlobalPointerSecurityCheckStart();
|
|
void AdeptGlobalPointerSecurityCheckStop();
|
|
|
|
|
|
class GlobalPointers
|
|
{
|
|
public:
|
|
|
|
static void InitializeClass();
|
|
static void TerminateClass();
|
|
|
|
static GlobalPointers *globalPointer;
|
|
static int *globalKey;
|
|
|
|
static void ClearPointer(int pointer_index);
|
|
static void AddGlobalPointer(void *pointer, int pointer_index);
|
|
static void MoveGlobals();
|
|
|
|
void *m_pointerArray[30];
|
|
|
|
static void *GlobalPointers::GetGlobalPointer(int pointer_number)
|
|
{
|
|
GLOBAL_POINTER("Get");
|
|
//GlobalPointers *pointer = globalPointer ^ *globalKey;
|
|
GlobalPointers *pointer = Cast_Pointer(GlobalPointers *, ((int)globalPointer ^ *globalKey));
|
|
return reinterpret_cast<void*>( ((int)pointer->m_pointerArray[pointer_number] ^ 0x85739531));
|
|
}
|
|
|
|
};
|
|
|
|
} |