Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
internal.h
Go to the documentation of this file.
1/*
2** Command & Conquer Generals Zero Hour(tm)
3** Copyright 2025 Electronic Arts Inc.
4**
5** This program is free software: you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation, either version 3 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
20// $File: //depot/GeneralsMD/Staging/code/Libraries/Source/debug/internal.h $
21// $Author: mhoffe $
22// $Revision: #1 $
23// $DateTime: 2003/07/03 11:55:26 $
24//
25// ©2003 Electronic Arts
26//
27// Internal header
29#ifdef _MSC_VER
30# pragma once
31#endif
32#ifndef INTERNAL_H // Include guard
33#define INTERNAL_H
34
35// make sure we're not omitting the frame pointer
36#pragma optimize("y",off)
37
38// We're doing our own little internal asserts for full debug
39// builds (until this library is proven & stable)
40#ifdef _DEBUG
41# define __ASSERT(x) do { if (!(x)) DebugInternalAssert(__FILE__,__LINE__,#x); } while (0)
42#else
43# define __ASSERT(x) do { } while(0)
44#endif
45
54void DebugInternalAssert(const char *file, int line, const char *expr);
55
64void *DebugAllocMemory(unsigned numBytes);
65
76void *DebugReAllocMemory(void *oldPtr, unsigned newSize);
77
85void DebugFreeMemory(void *ptr);
86
88class DebugCmdInterfaceDebug: public DebugCmdInterface
89{
90public:
91 virtual bool Execute(class Debug& dbg, const char *cmd, CommandMode cmdmode,
92 unsigned argn, const char * const * argv);
93
94 virtual void Delete(void)
95 {
97 DebugFreeMemory(this);
98 }
99};
100
101#endif // INTERNAL_H
virtual void Delete(void)
Destroys the current command interface.
Definition internal.h:94
virtual bool Execute(class Debug &dbg, const char *cmd, CommandMode cmdmode, unsigned argn, const char *const *argv)
Execute the given command.
Definition debug_cmd.cpp:32
CommandMode
possible command modes
Definition debug_cmd.h:67
Debug module main class (singleton).
Definition debug_debug.h:45
void DebugInternalAssert(const char *file, int line, const char *expr)
void * DebugReAllocMemory(void *oldPtr, unsigned newSize)
void * DebugAllocMemory(unsigned numBytes)
void DebugFreeMemory(void *ptr)