#include <stdio.h>#include <stdlib.h>#include <memory.h>#include <malloc.h>#include <string.h>#include "OutWnd.h"#include "fix.h"#include "floating.h"Go to the source code of this file.
Compounds | |
| struct | bitmap |
| struct | bitmap_section_info |
| class | debug_command |
| struct | angles |
| struct | matrix |
| class | monitor |
| struct | uv_pair |
| struct | vec2d |
| struct | ccodes |
| struct | vector |
| struct | vectora |
| struct | vert2df |
| struct | vertex |
Defines | |
| #define | RELEASE_REAL |
| #define | GAME_CD_CHECK |
| #define | UNINITIALIZED 0x7f8e6d9c |
| #define | MAX_PLAYERS 12 |
| #define | MAX_TEAMS 3 |
| #define | USE_INLINE_ASM 1 |
| #define | STRUCT_CMP(a, b) memcmp((void *) &a, (void *) &b, sizeof(a)) |
| #define | LOCAL static |
| #define | HARDWARE_ONLY |
| #define | BMP_AABITMAP (1<<0) |
| #define | BMP_TEX_XPARENT (1<<1) |
| #define | BMP_TEX_NONDARK (1<<2) |
| #define | BMP_TEX_OTHER (1<<3) |
| #define | BMP_TEX_ANY ( BMP_TEX_XPARENT | BMP_TEX_NONDARK | BMP_TEX_OTHER ) |
| #define | MAX_BMAP_SECTIONS_X 4 |
| #define | MAX_BMAP_SECTIONS_Y 3 |
| #define | MAX_BMAP_SECTION_SIZE 256 |
| #define | mprintf(args) outwnd_printf2 args |
| #define | nprintf(args) outwnd_printf args |
| #define | LOCATION __FILE__,__LINE__ |
| #define | Assert(x) do { if (!(x)){ gr_activate(0); WinAssert(#x,__FILE__,__LINE__); gr_activate(1); } } while (0) |
| #define | Int3() debug_int3() |
| #define | min(a, b) (((a) < (b)) ? (a) : (b)) |
| #define | max(a, b) (((a) > (b)) ? (a) : (b)) |
| #define | PI 3.141592654f |
| #define | PI2 (3.141592654f*2.0f) |
| #define | ANG_TO_RAD(x) ((x)*PI/180) |
| #define | DCF(function_name, help_text) |
| #define | ARG_NONE (1<<0) |
| #define | ARG_ANY 0xFFFFFFFF |
| #define | ARG_STRING (1<<1) |
| #define | ARG_QUOTE (1<<2) |
| #define | ARG_INT (1<<3) |
| #define | ARG_FLOAT (1<<4) |
| #define | ARG_HEX (1<<5) |
| #define | ARG_TRUE (1<<6) |
| #define | ARG_FALSE (1<<7) |
| #define | ARG_PLUS (1<<8) |
| #define | ARG_MINUS (1<<9) |
| #define | ARG_COMMA (1<<10) |
| #define | DCF_BOOL(function_name, bool_variable) |
| #define | MAX_FILENAME_LEN 32 |
| #define | MAX_PATH_LEN 128 |
| #define | SWAPSHORT(x) |
| #define | SWAPINT(x) |
| #define | INTEL_INT(x) x |
| #define | INTEL_SHORT(x) x |
| #define | TRUE 1 |
| #define | FALSE 0 |
| #define | MONITOR(function_name) monitor mon_##function_name(#function_name) |
| #define | MONITOR_INC(function_name, inc) do { mon_##function_name.value+=(inc); } while(0) |
| #define | NOX(s) s |
| #define | STAMP_STRING "\001\001\001\001\002\002\002\002Read the Foundation Novels from Asimov. I liked them." |
| #define | STAMP_STRING_LENGTH 80 |
| #define | DEFAULT_CHECKSUM_STRING "\001\001\001\001" |
| #define | DEFAULT_TIME_STRING "\002\002\002\002" |
| #define | CALCULATE_STAMP_CHECKSUM() |
| #define | VM_MALLOC(size) vm_malloc((size),__FILE__,__LINE__) |
| #define | VM_FREE(ptr) vm_free((ptr),__FILE__,__LINE__) |
| #define | malloc(size) vm_malloc((size),__FILE__,__LINE__) |
| #define | free(ptr) vm_free((ptr),__FILE__,__LINE__) |
| #define | strdup(ptr) vm_strdup((ptr),__FILE__,__LINE__) |
Typedefs | |
| typedef __int64 | longlong |
| typedef long | fix |
| typedef unsigned char | ubyte |
| typedef unsigned short | ushort |
| typedef unsigned int | uint |
| typedef ccodes | ccodes |
| typedef vector | vector |
| typedef vectora | vectora |
| typedef vec2d | vec2d |
| typedef vert2df | vert2df |
| typedef angles | angles |
| typedef matrix | matrix |
| typedef uv_pair | uv_pair |
| typedef vertex | vertex |
| typedef bitmap_section_info | bitmap_section_info |
| typedef bitmap | bitmap |
Functions | |
| void _cdecl | WinAssert (char *text, char *filename, int line) |
| void _cdecl | Error (char *filename, int line, char *format,...) |
| void _cdecl | Warning (char *filename, int line, char *format,...) |
| void | gr_activate (int) |
| void | debug_int3 () |
| void | debug_console (void(*func)()=NULL) |
| void | dc_get_arg (uint flags) |
| void | dc_printf (char *format,...) |
| int | myrand () |
| int | game_busy_callback (void(*callback)(int count), int delta_step=-1) |
| void | game_busy () |
| void | monitor_update () |
| char * | XSTR (char *str, int index) |
| template<class T> void | CAP (T &v, T mn, T mx) |
| int | vm_init (int min_heap_size) |
| void * | vm_malloc (int size, char *filename=NULL, int line=-1) |
| char * | vm_strdup (const char *ptr, char *filename, int line) |
| void | vm_free (void *ptr, char *filename=NULL, int line=-1) |
| void | vm_free_all () |
Variables | |
| int | Fred_running |
| int | Pofview_running |
| int | Nebedit_running |
| int | Dc_command |
| int | Dc_help |
| int | Dc_status |
| char * | Dc_arg |
| char * | Dc_arg_org |
| uint | Dc_arg_type |
| char * | Dc_command_line |
| int | Dc_arg_int |
| float | Dc_arg_float |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Value: do { \
int i, found; \
\
checksum = 0; \
for ( i = 0; i < (int)strlen(ptr); i++ ) { \
found = 0; \
checksum += ptr[i]; \
if ( checksum & 0x01 ) \
found = 1; \
checksum = checksum >> 1; \
if (found) \
checksum |= 0x80000000; \
} \
checksum |= 0x80000000; \
} while (0) ; |
|
|
Value: void dcf_##function_name(); \
debug_command dc_##function_name(#function_name,help_text,dcf_##function_name); \
void dcf_##function_name() |
|
|
Value: void dcf_##function_name(); \
debug_command dc_##function_name(#function_name,"Toggles "#bool_variable,dcf_##function_name ); \
void dcf_##function_name() { \
if ( Dc_command ) { \
dc_get_arg(ARG_TRUE|ARG_FALSE|ARG_NONE); \
if ( Dc_arg_type & ARG_TRUE ) bool_variable = 1; \
else if ( Dc_arg_type & ARG_FALSE ) bool_variable = 0; \
else if ( Dc_arg_type & ARG_NONE ) bool_variable ^= 1; \
} \
if ( Dc_help ) dc_printf( "Usage: %s [bool]\nSets %s to true or false. If nothing passed, then toggles it.\n", #function_name, #bool_variable ); \
if ( Dc_status ) dc_printf( "%s is %s\n", #function_name, (bool_variable?"TRUE":"FALSE") ); \
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Value: ( \
(x << 24) | \
(((ulong)x) >> 24) | \
((x & 0x0000ff00) << 8) | \
((x & 0x00ff0000) >> 8) \
) |
|
|
Value: ( \
((ubyte)x << 8) | \
(((ushort)x) >> 8) \
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||||||||||
|
|
|
|
|
|
||||||||||||
|
|
|
|
|
|
|
|
|
||||||||||||||||||||
|
|
|
|
|
|
||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||||||
|
|
|
|
|
|
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.2.16