From f33f28248758c0a7fc5de393ca1162133d297036 Mon Sep 17 00:00:00 2001 From: xezon <4720891+xezon@users.noreply.github.com> Date: Mon, 16 Nov 2026 21:35:08 +0100 Subject: [PATCH 1/7] refactor(wwlib): Replace function comment blocks with slim comments The Westwood comment blocks above the functions in WWLib and WWDebug are replaced by slim // comments. Descriptions are kept where they add to the function name. INPUT and OUTPUT entries are dropped unless they say something the signature does not, such as a nullptr return. History entries are dropped, except for notes on how a function behaves today. The Functions lists in the file headers are removed as well, since they repeat the function descriptions. --- .../Source/WWVegas/WWDebug/wwdebug.cpp | 185 +-- .../Source/WWVegas/WWDebug/wwdebug.h | 2 - .../Libraries/Source/WWVegas/WWDebug/wwhack.h | 2 - .../Source/WWVegas/WWDebug/wwmemlog.cpp | 59 +- .../Source/WWVegas/WWDebug/wwmemlog.h | 2 - .../Source/WWVegas/WWDebug/wwprofile.cpp | 256 +--- .../Source/WWVegas/WWDebug/wwprofile.h | 2 - Core/Libraries/Source/WWVegas/WWLib/BUFF.h | 2 - Core/Libraries/Source/WWVegas/WWLib/CRC.h | 2 - .../Libraries/Source/WWVegas/WWLib/Except.cpp | 227 +--- Core/Libraries/Source/WWVegas/WWLib/Except.h | 2 - .../Libraries/Source/WWVegas/WWLib/HASHLIST.h | 88 +- Core/Libraries/Source/WWVegas/WWLib/INDEX.h | 264 +---- Core/Libraries/Source/WWVegas/WWLib/INI.h | 2 - .../Libraries/Source/WWVegas/WWLib/LISTNODE.h | 2 - Core/Libraries/Source/WWVegas/WWLib/MPU.h | 2 - Core/Libraries/Source/WWVegas/WWLib/PIPE.h | 2 - Core/Libraries/Source/WWVegas/WWLib/Point.h | 2 - Core/Libraries/Source/WWVegas/WWLib/RAMFILE.h | 2 - Core/Libraries/Source/WWVegas/WWLib/RANDOM.h | 27 +- Core/Libraries/Source/WWVegas/WWLib/RAWFILE.h | 6 - Core/Libraries/Source/WWVegas/WWLib/SLIST.h | 212 +--- Core/Libraries/Source/WWVegas/WWLib/SLNODE.h | 2 - Core/Libraries/Source/WWVegas/WWLib/STRAW.h | 2 - Core/Libraries/Source/WWVegas/WWLib/Vector.h | 366 +----- Core/Libraries/Source/WWVegas/WWLib/WWFILE.h | 2 - Core/Libraries/Source/WWVegas/WWLib/XPIPE.h | 2 - Core/Libraries/Source/WWVegas/WWLib/XSTRAW.h | 2 - Core/Libraries/Source/WWVegas/WWLib/always.h | 2 - Core/Libraries/Source/WWVegas/WWLib/argv.cpp | 165 +-- Core/Libraries/Source/WWVegas/WWLib/argv.h | 2 - .../Source/WWVegas/WWLib/b64pipe.cpp | 45 +- Core/Libraries/Source/WWVegas/WWLib/b64pipe.h | 2 - .../Source/WWVegas/WWLib/b64straw.cpp | 24 +- .../Libraries/Source/WWVegas/WWLib/b64straw.h | 2 - .../Libraries/Source/WWVegas/WWLib/base64.cpp | 60 +- Core/Libraries/Source/WWVegas/WWLib/base64.h | 2 - .../Source/WWVegas/WWLib/bfiofile.cpp | 300 +---- .../Libraries/Source/WWVegas/WWLib/bfiofile.h | 2 - Core/Libraries/Source/WWVegas/WWLib/binheap.h | 2 - Core/Libraries/Source/WWVegas/WWLib/bittype.h | 2 - Core/Libraries/Source/WWVegas/WWLib/bound.h | 2 - Core/Libraries/Source/WWVegas/WWLib/buff.cpp | 118 +- .../Source/WWVegas/WWLib/bufffile.cpp | 84 +- .../Libraries/Source/WWVegas/WWLib/bufffile.h | 6 - .../Source/WWVegas/WWLib/chunkio.cpp | 379 +----- Core/Libraries/Source/WWVegas/WWLib/chunkio.h | 2 - .../Source/WWVegas/WWLib/cpudetect.h | 2 - Core/Libraries/Source/WWVegas/WWLib/crandom.h | 2 - Core/Libraries/Source/WWVegas/WWLib/crc.cpp | 46 +- .../Source/WWVegas/WWLib/crcpipe.cpp | 42 +- Core/Libraries/Source/WWVegas/WWLib/crcpipe.h | 2 - .../Source/WWVegas/WWLib/crcstraw.cpp | 43 +- .../Libraries/Source/WWVegas/WWLib/crcstraw.h | 2 - .../Libraries/Source/WWVegas/WWLib/cstraw.cpp | 27 +- Core/Libraries/Source/WWVegas/WWLib/cstraw.h | 2 - .../Libraries/Source/WWVegas/WWLib/ffactory.h | 2 - .../Source/WWVegas/WWLib/gcd_lcm.cpp | 2 - Core/Libraries/Source/WWVegas/WWLib/gcd_lcm.h | 2 - Core/Libraries/Source/WWVegas/WWLib/hash.cpp | 2 - Core/Libraries/Source/WWVegas/WWLib/hash.h | 2 - .../Libraries/Source/WWVegas/WWLib/hashcalc.h | 2 - Core/Libraries/Source/WWVegas/WWLib/hashtab.h | 2 - .../Source/WWVegas/WWLib/hashtemplate.h | 2 - Core/Libraries/Source/WWVegas/WWLib/incdec.h | 2 - Core/Libraries/Source/WWVegas/WWLib/ini.cpp | 1053 ++--------------- Core/Libraries/Source/WWVegas/WWLib/inisup.h | 2 - .../Libraries/Source/WWVegas/WWLib/iostruct.h | 2 - .../Libraries/Source/WWVegas/WWLib/jshell.cpp | 86 +- Core/Libraries/Source/WWVegas/WWLib/lzo.cpp | 30 +- Core/Libraries/Source/WWVegas/WWLib/lzo.h | 2 - Core/Libraries/Source/WWVegas/WWLib/lzo1x.h | 2 - .../Source/WWVegas/WWLib/lzo1x_c.cpp | 2 - .../Source/WWVegas/WWLib/lzo1x_d.cpp | 2 - .../Libraries/Source/WWVegas/WWLib/lzo_conf.h | 2 - Core/Libraries/Source/WWVegas/WWLib/lzoconf.h | 2 - .../Source/WWVegas/WWLib/lzopipe.cpp | 85 +- Core/Libraries/Source/WWVegas/WWLib/lzopipe.h | 2 - .../Source/WWVegas/WWLib/lzostraw.cpp | 67 +- .../Libraries/Source/WWVegas/WWLib/lzostraw.h | 2 - Core/Libraries/Source/WWVegas/WWLib/mempool.h | 118 +- Core/Libraries/Source/WWVegas/WWLib/mmsys.h | 2 - Core/Libraries/Source/WWVegas/WWLib/mpu.cpp | 19 +- .../Source/WWVegas/WWLib/multilist.cpp | 2 - .../Source/WWVegas/WWLib/multilist.h | 2 - Core/Libraries/Source/WWVegas/WWLib/noinit.h | 2 - .../Source/WWVegas/WWLib/nstrdup.cpp | 16 +- Core/Libraries/Source/WWVegas/WWLib/nstrdup.h | 2 - Core/Libraries/Source/WWVegas/WWLib/ntree.h | 2 - Core/Libraries/Source/WWVegas/WWLib/pipe.cpp | 80 +- .../Source/WWVegas/WWLib/ramfile.cpp | 280 +---- .../Libraries/Source/WWVegas/WWLib/random.cpp | 189 +-- .../Source/WWVegas/WWLib/rawfile.cpp | 503 +------- .../Libraries/Source/WWVegas/WWLib/rcfile.cpp | 2 - Core/Libraries/Source/WWVegas/WWLib/rcfile.h | 2 - .../Source/WWVegas/WWLib/readline.cpp | 51 +- .../Libraries/Source/WWVegas/WWLib/readline.h | 2 - .../Source/WWVegas/WWLib/realcrc.cpp | 40 +- Core/Libraries/Source/WWVegas/WWLib/realcrc.h | 2 - Core/Libraries/Source/WWVegas/WWLib/ref_ptr.h | 2 - .../Source/WWVegas/WWLib/refcount.cpp | 82 +- .../Libraries/Source/WWVegas/WWLib/refcount.h | 2 - .../Source/WWVegas/WWLib/registry.cpp | 93 +- Core/Libraries/Source/WWVegas/WWLib/search.h | 264 +---- .../Libraries/Source/WWVegas/WWLib/sharebuf.h | 2 - .../Source/WWVegas/WWLib/simplevec.h | 250 +--- .../Libraries/Source/WWVegas/WWLib/slnode.cpp | 2 - .../Libraries/Source/WWVegas/WWLib/stimer.cpp | 2 - Core/Libraries/Source/WWVegas/WWLib/stimer.h | 2 - Core/Libraries/Source/WWVegas/WWLib/straw.cpp | 66 +- .../Source/WWVegas/WWLib/strtok_r.cpp | 3 - .../Libraries/Source/WWVegas/WWLib/strtok_r.h | 2 - Core/Libraries/Source/WWVegas/WWLib/swap.h | 2 - .../Source/WWVegas/WWLib/systimer.cpp | 62 +- .../Libraries/Source/WWVegas/WWLib/systimer.h | 17 +- .../Source/WWVegas/WWLib/tgatodxt.cpp | 2 - .../Libraries/Source/WWVegas/WWLib/tgatodxt.h | 2 - Core/Libraries/Source/WWVegas/WWLib/trect.h | 2 - Core/Libraries/Source/WWVegas/WWLib/trim.cpp | 18 +- Core/Libraries/Source/WWVegas/WWLib/trim.h | 2 - Core/Libraries/Source/WWVegas/WWLib/uarray.h | 46 +- .../Libraries/Source/WWVegas/WWLib/vector.cpp | 215 +--- .../Libraries/Source/WWVegas/WWLib/verchk.cpp | 2 - Core/Libraries/Source/WWVegas/WWLib/verchk.h | 2 - .../Source/WWVegas/WWLib/widestring.cpp | 2 - .../Source/WWVegas/WWLib/widestring.h | 2 - Core/Libraries/Source/WWVegas/WWLib/win.h | 2 - .../Libraries/Source/WWVegas/WWLib/wwfile.cpp | 2 - .../Source/WWVegas/WWLib/wwstring.cpp | 2 - .../Libraries/Source/WWVegas/WWLib/wwstring.h | 2 - Core/Libraries/Source/WWVegas/WWLib/xpipe.cpp | 70 +- .../Libraries/Source/WWVegas/WWLib/xstraw.cpp | 60 +- 132 files changed, 615 insertions(+), 6441 deletions(-) diff --git a/Core/Libraries/Source/WWVegas/WWDebug/wwdebug.cpp b/Core/Libraries/Source/WWVegas/WWDebug/wwdebug.cpp index 12d091d44fd..100a8b32b12 100644 --- a/Core/Libraries/Source/WWVegas/WWDebug/wwdebug.cpp +++ b/Core/Libraries/Source/WWVegas/WWDebug/wwdebug.cpp @@ -30,15 +30,6 @@ * * * $Revision:: 16 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * WWDebug_Install_Message_Handler -- install function for handling the debug messages * - * WWDebug_Install_Assert_Handler -- Install a function for handling the assert messages * - * WWDebug_Install_Trigger_Handler -- install a trigger handler function * - * WWDebug_Printf -- Internal function for passing messages to installed handler * - * WWDebug_Assert_Fail -- Internal function for passing assert messages to installed handler * - * WWDebug_Assert_Fail_Print -- Internal function, passes assert message to handler * - * WWDebug_Check_Trigger -- calls the user-installed debug trigger handler * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -89,18 +80,6 @@ int Get_Last_System_Error() #endif } -/*********************************************************************************************** - * WWDebug_Install_Message_Handler -- install function for handling the debug messages * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/19/98 GTH : Created. * - *=============================================================================================*/ PrintFunc WWDebug_Install_Message_Handler(PrintFunc func) { PrintFunc tmp = _CurMessageHandler; @@ -109,18 +88,6 @@ PrintFunc WWDebug_Install_Message_Handler(PrintFunc func) } -/*********************************************************************************************** - * WWDebug_Install_Assert_Handler -- Install a function for handling the assert messages * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/19/98 GTH : Created. * - *=============================================================================================*/ AssertPrintFunc WWDebug_Install_Assert_Handler(AssertPrintFunc func) { AssertPrintFunc tmp = _CurAssertHandler; @@ -129,18 +96,6 @@ AssertPrintFunc WWDebug_Install_Assert_Handler(AssertPrintFunc func) } -/*********************************************************************************************** - * WWDebug_Install_Trigger_Handler -- install a trigger handler function * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/24/98 GTH : Created. * - *=============================================================================================*/ TriggerFunc WWDebug_Install_Trigger_Handler(TriggerFunc func) { TriggerFunc tmp = _CurTriggerHandler; @@ -149,18 +104,6 @@ TriggerFunc WWDebug_Install_Trigger_Handler(TriggerFunc func) } -/*********************************************************************************************** - * WWDebug_Install_Profile_Start_Handler -- install a profile handler function * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/24/98 GTH : Created. * - *=============================================================================================*/ ProfileFunc WWDebug_Install_Profile_Start_Handler(ProfileFunc func) { ProfileFunc tmp = _CurProfileStartHandler; @@ -169,18 +112,6 @@ ProfileFunc WWDebug_Install_Profile_Start_Handler(ProfileFunc func) } -/*********************************************************************************************** - * WWDebug_Install_Profile_Stop_Handler -- install a profile handler function * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/24/98 GTH : Created. * - *=============================================================================================*/ ProfileFunc WWDebug_Install_Profile_Stop_Handler(ProfileFunc func) { ProfileFunc tmp = _CurProfileStopHandler; @@ -189,18 +120,7 @@ ProfileFunc WWDebug_Install_Profile_Stop_Handler(ProfileFunc func) } -/*********************************************************************************************** - * WWDebug_Printf -- Internal function for passing messages to installed handler * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/19/98 GTH : Created. * - *=============================================================================================*/ +// Internal function for passing messages to installed handler. void WWDebug_Printf(const char * format,...) { @@ -219,18 +139,7 @@ void WWDebug_Printf(const char * format,...) } } -/*********************************************************************************************** - * WWDebug_Printf_Warning -- Internal function for passing messages to installed handler * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/19/98 GTH : Created. * - *=============================================================================================*/ +// Internal function for passing messages to installed handler. void WWDebug_Printf_Warning(const char * format,...) { @@ -249,18 +158,7 @@ void WWDebug_Printf_Warning(const char * format,...) } } -/*********************************************************************************************** - * WWDebug_Printf_Error -- Internal function for passing messages to installed handler * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/19/98 GTH : Created. * - *=============================================================================================*/ +// Internal function for passing messages to installed handler. void WWDebug_Printf_Error(const char * format,...) { @@ -279,18 +177,7 @@ void WWDebug_Printf_Error(const char * format,...) } } -/*********************************************************************************************** - * WWDebug_Assert_Fail -- Internal function for passing assert messages to installed handler * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/19/98 GTH : Created. * - *=============================================================================================*/ +// Internal function for passing assert messages to installed handler. #ifdef WWDEBUG void WWDebug_Assert_Fail(const char * expr,const char * file, int line) { @@ -329,18 +216,7 @@ void WWDebug_Assert_Fail(const char * expr,const char * file, int line) -/*********************************************************************************************** - * WWDebug_Assert_Fail_Print -- Internal function, passes assert message to handler * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/19/98 GTH : Created. * - *=============================================================================================*/ +// Internal function, passes assert message to handler. #ifdef WWDEBUG void WWDebug_Assert_Fail_Print(const char * expr,const char * file, int line,const char * string) { @@ -359,18 +235,7 @@ void WWDebug_Assert_Fail_Print(const char * expr,const char * file, int line,con #endif -/*********************************************************************************************** - * WWDebug_Check_Trigger -- calls the user-installed debug trigger handler * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/24/98 GTH : Created. * - *=============================================================================================*/ +// Calls the user-installed debug trigger handler. bool WWDebug_Check_Trigger(int trigger_num) { if (_CurTriggerHandler != nullptr) { @@ -381,18 +246,7 @@ bool WWDebug_Check_Trigger(int trigger_num) } -/*********************************************************************************************** - * WWDebug_Profile_Start -- calls the user-installed profile start handler * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/24/98 GTH : Created. * - *=============================================================================================*/ +// Calls the user-installed profile start handler. void WWDebug_Profile_Start( const char * title) { if (_CurProfileStartHandler != nullptr) { @@ -401,18 +255,7 @@ void WWDebug_Profile_Start( const char * title) } -/*********************************************************************************************** - * WWDebug_Profile_Stop -- calls the user-installed profile start handler * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/24/98 GTH : Created. * - *=============================================================================================*/ +// Calls the user-installed profile stop handler. void WWDebug_Profile_Stop( const char * title) { if (_CurProfileStopHandler != nullptr) { @@ -423,18 +266,6 @@ void WWDebug_Profile_Stop( const char * title) #ifdef WWDEBUG -/*********************************************************************************************** - * WWDebug_DBWin32_Message_Handler -- * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 10/30/98 BMG : Created. * - *=============================================================================================*/ void WWDebug_DBWin32_Message_Handler( const char * str ) { diff --git a/Core/Libraries/Source/WWVegas/WWDebug/wwdebug.h b/Core/Libraries/Source/WWVegas/WWDebug/wwdebug.h index f538b645136..681e4378b19 100644 --- a/Core/Libraries/Source/WWVegas/WWDebug/wwdebug.h +++ b/Core/Libraries/Source/WWVegas/WWDebug/wwdebug.h @@ -30,8 +30,6 @@ * * * $Revision:: 18 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWDebug/wwhack.h b/Core/Libraries/Source/WWVegas/WWDebug/wwhack.h index 29d52c30241..d818651ee42 100644 --- a/Core/Libraries/Source/WWVegas/WWDebug/wwhack.h +++ b/Core/Libraries/Source/WWVegas/WWDebug/wwhack.h @@ -30,8 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWDebug/wwmemlog.cpp b/Core/Libraries/Source/WWVegas/WWDebug/wwmemlog.cpp index ea7aa211a0e..cec5b79e533 100644 --- a/Core/Libraries/Source/WWVegas/WWDebug/wwmemlog.cpp +++ b/Core/Libraries/Source/WWVegas/WWDebug/wwmemlog.cpp @@ -32,10 +32,6 @@ * * * $Revision:: 27 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * WWMemoryLogClass::Allocate_Memory -- allocates memory * - * WWMemoryLogClass::Release_Memory -- frees memory * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "WWLib/always.h" @@ -557,23 +553,8 @@ MemLogClass * WWMemoryLogClass::Get_Log() } -/*********************************************************************************************** - * WWMemoryLogClass::Release_Log -- Free the memory used by WWMemoryLogClass so it doesn't leak* - * * - * * - * * - * INPUT: Nothing * - * * - * OUTPUT: Nothing * - * * - * WARNINGS: Called as part of _onexit processing * - * * - * It's messy, but I assume there's a reason it's not statically allocated... * - * OK, now I get it * - * * - * HISTORY: * - * 6/13/2001 8:55PM ST : Created * - *=============================================================================================*/ +// Free the memory used by WWMemoryLogClass so it doesn't leak. +// WARNING: Called as part of _onexit processing. void WWMemoryLogClass::Release_Log() { MemLogMutexLockClass lock; @@ -625,22 +606,9 @@ struct MemoryLogStruct -/*********************************************************************************************** - * WWMemoryLogClass::Allocate_Memory -- allocates memory * - * * - * This function adds a header to the memory allocated so that when the memory is freed * - * the proper memory category size can be decremented. The application using this logging * - * system should call this function from inside its overloaded 'new' operator. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/29/2001 gth : Created. * - *=============================================================================================*/ +// This function adds a header to the memory allocated so that when the memory is freed the proper +// memory category size can be decremented. The application using this logging system should call +// this function from inside its overloaded 'new' operator. void * WWMemoryLogClass::Allocate_Memory(size_t size) { AllocateCount++; @@ -689,21 +657,8 @@ void * WWMemoryLogClass::Allocate_Memory(size_t size) } -/*********************************************************************************************** - * WWMemoryLogClass::Release_Memory -- frees memory * - * * - * This function checks for a wwmemlog header and decrements the relevant memory category. * - * It should be called in the application's custom delete operator. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/29/2001 gth : Created. * - *=============================================================================================*/ +// This function checks for a wwmemlog header and decrements the relevant memory category. It should +// be called in the application's custom delete operator. void WWMemoryLogClass::Release_Memory(void *ptr) { FreeCount++; diff --git a/Core/Libraries/Source/WWVegas/WWDebug/wwmemlog.h b/Core/Libraries/Source/WWVegas/WWDebug/wwmemlog.h index 1a5d11e99b4..231b8396c08 100644 --- a/Core/Libraries/Source/WWVegas/WWDebug/wwmemlog.h +++ b/Core/Libraries/Source/WWVegas/WWDebug/wwmemlog.h @@ -32,8 +32,6 @@ * * * $Revision:: 8 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWDebug/wwprofile.cpp b/Core/Libraries/Source/WWVegas/WWDebug/wwprofile.cpp index 3382d0e765b..01ff7ad3da1 100644 --- a/Core/Libraries/Source/WWVegas/WWDebug/wwprofile.cpp +++ b/Core/Libraries/Source/WWVegas/WWDebug/wwprofile.cpp @@ -83,18 +83,7 @@ WWINLINE double WWProfile_Get_Inv_Processor_Ticks_Per_Second() #endif } -/*********************************************************************************************** - * WWProfile_Get_Ticks -- Retrieves the cpu performance counter * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 9/24/2000 gth : Created. * - *=============================================================================================*/ +// Retrieves the cpu performance counter. static inline void WWProfile_Get_Ticks(_int64 * ticks) { #ifdef _UNIX @@ -105,23 +94,8 @@ static inline void WWProfile_Get_Ticks(_int64 * ticks) } -/*********************************************************************************************** - * WWProfileHierarchyNodeClass::WWProfileHierarchyNodeClass -- Constructor * - * * - * * - * INPUT: * - * name - pointer to a static string which is the name of this profile node * - * parent - parent pointer * - * * - * OUTPUT: * - * * - * WARNINGS: * - * The name is assumed to be a static pointer, only the pointer is stored and compared for * - * efficiency reasons. * - * * - * HISTORY: * - * 9/24/2000 gth : Created. * - *=============================================================================================*/ +// WARNING: The name is assumed to be a static pointer, only the pointer is stored and compared for +// efficiency reasons. WWProfileHierarchyNodeClass::WWProfileHierarchyNodeClass( const char * name, WWProfileHierarchyNodeClass * parent ) : Name( name ), TotalCalls( 0 ), @@ -155,18 +129,6 @@ WWProfileHierarchyNodeClass::WWProfileHierarchyNodeClass( unsigned id, WWProfile } -/*********************************************************************************************** - * WWProfileHierarchyNodeClass::~WWProfileHierarchyNodeClass -- Destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 9/24/2000 gth : Created. * - *=============================================================================================*/ WWProfileHierarchyNodeClass::~WWProfileHierarchyNodeClass() { delete Child; @@ -232,21 +194,9 @@ void WWProfileHierarchyNodeClass::Add_To_String_Compact(StringClass& string,int } } -/*********************************************************************************************** - * WWProfileHierarchyNodeClass::Get_Sub_Node -- Searches for a child node by name (pointer) * - * * - * INPUT: * - * name - static string pointer to the name of the node we are searching for * - * * - * OUTPUT: * - * * - * WARNINGS: * - * All profile names are assumed to be static strings so this function uses pointer compares * - * to find the named node. * - * * - * HISTORY: * - * 9/24/2000 gth : Created. * - *=============================================================================================*/ +// Searches for a child node by name (pointer). +// WARNING: All profile names are assumed to be static strings so this function uses pointer +// compares to find the named node. WWProfileHierarchyNodeClass * WWProfileHierarchyNodeClass::Get_Sub_Node( const char * name ) { // Try to find this sub node @@ -266,18 +216,7 @@ WWProfileHierarchyNodeClass * WWProfileHierarchyNodeClass::Get_Sub_Node( const c } -/*********************************************************************************************** - * WWProfileHierarchyNodeClass::Reset -- Reset all profiling data in the tree * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 9/24/2000 gth : Created. * - *=============================================================================================*/ +// Reset all profiling data in the tree. void WWProfileHierarchyNodeClass::Reset() { TotalCalls = 0; @@ -292,18 +231,7 @@ void WWProfileHierarchyNodeClass::Reset() } -/*********************************************************************************************** - * WWProfileHierarchyNodeClass::Call -- Start timing * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 9/24/2000 gth : Created. * - *=============================================================================================*/ +// Start timing. void WWProfileHierarchyNodeClass::Call() { TotalCalls++; @@ -313,18 +241,7 @@ void WWProfileHierarchyNodeClass::Call() } -/*********************************************************************************************** - * WWProfileHierarchyNodeClass::Return -- Stop timing, record results * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 9/24/2000 gth : Created. * - *=============================================================================================*/ +// Stop timing, record results. bool WWProfileHierarchyNodeClass::Return() { if (--RecursionCounter == 0) { @@ -355,24 +272,11 @@ __int64 WWProfileManager::ResetTime = 0; static unsigned int ThreadID = static_cast(-1); -/*********************************************************************************************** - * WWProfileManager::Start_Profile -- Begin a named profile * - * * - * Steps one level deeper into the tree, if a child already exists with the specified name * - * then it accumulates the profiling; otherwise a new child node is added to the profile tree. * - * * - * INPUT: * - * name - name of this profiling record * - * * - * OUTPUT: * - * * - * WARNINGS: * - * The string used is assumed to be a static string; pointer compares are used throughout * - * the profiling code for efficiency. * - * * - * HISTORY: * - * 9/24/2000 gth : Created. * - *=============================================================================================*/ +// Begin a named profile. Steps one level deeper into the tree, if a child already exists with the +// specified name then it accumulates the profiling; otherwise a new child node is added to the +// profile tree. +// WARNING: The string used is assumed to be a static string; pointer compares are used throughout +// the profiling code for efficiency. void WWProfileManager::Start_Profile( const char * name ) { if (::GetCurrentThreadId() != ThreadID) { @@ -401,18 +305,7 @@ void WWProfileManager::Start_Root_Profile( const char * name ) } -/*********************************************************************************************** - * WWProfileManager::Stop_Profile -- Stop timing and record the results. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 9/24/2000 gth : Created. * - *=============================================================================================*/ +// Stop timing and record the results. void WWProfileManager::Stop_Profile() { if (::GetCurrentThreadId() != ThreadID) { @@ -440,21 +333,8 @@ void WWProfileManager::Stop_Root_Profile() } -/*********************************************************************************************** - * WWProfileManager::Reset -- Reset the contents of the profiling system * - * * - * This resets everything except for the tree structure. All of the timing data is reset. * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 9/24/2000 gth : Created. * - *=============================================================================================*/ +// Reset the contents of the profiling system. This resets everything except for the tree structure. +// All of the timing data is reset. void WWProfileManager::Reset() { ThreadID = ::GetCurrentThreadId(); @@ -465,18 +345,6 @@ void WWProfileManager::Reset() } -/*********************************************************************************************** - * WWProfileManager::Increment_Frame_Counter -- Increment the frame counter * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 9/24/2000 gth : Created. * - *=============================================================================================*/ void WWProfileManager::Increment_Frame_Counter() { if (ProfileCollecting) { @@ -494,18 +362,7 @@ void WWProfileManager::Increment_Frame_Counter() } -/*********************************************************************************************** - * WWProfileManager::Get_Time_Since_Reset -- returns the elapsed time since last reset * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 9/24/2000 gth : Created. * - *=============================================================================================*/ +// Returns the elapsed time since last reset. float WWProfileManager::Get_Time_Since_Reset() { __int64 time; @@ -516,36 +373,14 @@ float WWProfileManager::Get_Time_Since_Reset() } -/*********************************************************************************************** - * WWProfileManager::Get_Iterator -- Creates an iterator for the profile tree * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 9/24/2000 gth : Created. * - *=============================================================================================*/ +// Creates an iterator for the profile tree. WWProfileIterator * WWProfileManager::Get_Iterator() { return W3DNEW WWProfileIterator( &Root ); } -/*********************************************************************************************** - * WWProfileManager::Release_Iterator -- Return an iterator for the profile tree * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 9/24/2000 gth : Created. * - *=============================================================================================*/ +// Releases an iterator for the profile tree. void WWProfileManager::Release_Iterator( WWProfileIterator * iterator ) { delete iterator; @@ -842,36 +677,13 @@ void WWProfileManager::Load_Profile_Log(const char* filename, WWProfileHierarchy } -/*********************************************************************************************** - * WWProfileManager::Get_In_Order_Iterator -- Creates an "in-order" iterator for the profile t * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 9/24/2000 gth : Created. * - *=============================================================================================*/ +// Creates an "in-order" iterator for the profile tree. WWProfileInOrderIterator * WWProfileManager::Get_In_Order_Iterator() { return W3DNEW WWProfileInOrderIterator; } -/*********************************************************************************************** - * WWProfileManager::Release_In_Order_Iterator -- Return an "in-order" iterator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 9/24/2000 gth : Created. * - *=============================================================================================*/ void WWProfileManager::Release_In_Order_Iterator( WWProfileInOrderIterator * iterator ) { delete iterator; @@ -1080,20 +892,6 @@ void WWMemoryAndTimeLog::Log_Intermediate(const char* text) IntermediateAllocSizeStart=current_alloc_size; } -/*********************************************************************************************** - * WWProfileHierarchyInfoClass::WWProfileHierarchyInfoClass -- Constructor * - * * - * * - * INPUT: * - * name - pointer to a static string which is the name of this profile node * - * parent - parent pointer * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *=============================================================================================*/ WWProfileHierarchyInfoClass::WWProfileHierarchyInfoClass( const char * name, WWProfileHierarchyInfoClass * parent ) : Name( name ), TotalCalls( 0 ), @@ -1104,18 +902,6 @@ WWProfileHierarchyInfoClass::WWProfileHierarchyInfoClass( const char * name, WWP { } -/*********************************************************************************************** - * WWProfileHierarchyNodeClass::~WWProfileHierarchyNodeClass -- Destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 9/24/2000 gth : Created. * - *=============================================================================================*/ WWProfileHierarchyInfoClass::~WWProfileHierarchyInfoClass() { delete Child; diff --git a/Core/Libraries/Source/WWVegas/WWDebug/wwprofile.h b/Core/Libraries/Source/WWVegas/WWDebug/wwprofile.h index 44aea85c0ce..ac04489415e 100644 --- a/Core/Libraries/Source/WWVegas/WWDebug/wwprofile.h +++ b/Core/Libraries/Source/WWVegas/WWDebug/wwprofile.h @@ -30,8 +30,6 @@ * * * $Revision:: 14 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/BUFF.h b/Core/Libraries/Source/WWVegas/WWLib/BUFF.h index 5d878fee455..214dc5b10b8 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/BUFF.h +++ b/Core/Libraries/Source/WWVegas/WWLib/BUFF.h @@ -30,8 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/CRC.h b/Core/Libraries/Source/WWVegas/WWLib/CRC.h index 1d91720ad6b..2827f81a1d8 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/CRC.h +++ b/Core/Libraries/Source/WWVegas/WWLib/CRC.h @@ -30,8 +30,6 @@ * * * $Revision:: 4 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/Except.cpp b/Core/Libraries/Source/WWVegas/WWLib/Except.cpp index 3ab15c57f94..cc8e41295a6 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/Except.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/Except.cpp @@ -37,14 +37,6 @@ * * * * * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * * - * Exception_Proc -- Windows dialog callback for the exception dialog * - * Exception_Dialog -- Brings up the exception options dialog. * - * Add_Txt -- Add the given text to the machine state dump buffer. * - * Dump_Exception_Info -- Dump machine state information into a buffer * - * Exception_Handler -- Exception handler filter function * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #if defined(_WIN32) @@ -153,20 +145,7 @@ static char const *const ImagehelpFunctionNames[] = -/*********************************************************************************************** - * _purecall -- This function overrides the C library Pure Virtual Function Call error * - * * - * * - * * - * INPUT: Nothing * - * * - * OUTPUT: 0 = no error * - * * - * WARNINGS: None * - * * - * HISTORY: * - * 8/22/00 11:42AM ST : Created * - *=============================================================================================*/ +// This function overrides the C library Pure Virtual Function Call error. int __cdecl _purecall() { int return_code = 0; @@ -184,20 +163,7 @@ int __cdecl _purecall() -/*********************************************************************************************** - * Last_Error_Text -- Get the system error text for GetLastError * - * * - * * - * * - * INPUT: Nothing * - * * - * OUTPUT: Ptr to error string * - * * - * WARNINGS: None * - * * - * HISTORY: * - * 8/14/98 11:11AM ST : Created * - *=============================================================================================*/ +// Get the system error text for GetLastError. char const * Last_Error_Text() { static char message_buffer[256]; @@ -207,20 +173,7 @@ char const * Last_Error_Text() -/*********************************************************************************************** - * Add_Txt -- Add the given text to the machine state dump buffer. * - * * - * * - * * - * INPUT: Text * - * * - * OUTPUT: Nothing * - * * - * WARNINGS: None * - * * - * HISTORY: * - * 7/22/97 12:21PM ST : Created * - *=============================================================================================*/ +// Add the given text to the machine state dump buffer. static void Add_Txt (char const *txt) { if (strlen(ExceptionText) + strlen(txt) < ARRAY_SIZE(ExceptionText) - 1) { @@ -264,20 +217,7 @@ static void Add_Txt (char const *txt) -/*********************************************************************************************** - * Dump_Exception_Info -- Dump machine state information into a buffer * - * * - * * - * * - * INPUT: ptr to exception information * - * * - * OUTPUT: Nothing * - * * - * WARNINGS: None * - * * - * HISTORY: * - * 7/22/97 12:21PM ST : Created * - *=============================================================================================*/ +// Dump machine state information into a buffer. void Dump_Exception_Info(EXCEPTION_POINTERS *e_info) { /* @@ -734,23 +674,7 @@ void Dump_Exception_Info(EXCEPTION_POINTERS *e_info) -/*********************************************************************************************** - * Exception_Handler -- Exception handler filter function * - * * - * * - * * - * INPUT: exception code * - * pointer to exception information pointers * - * * - * OUTPUT: EXCEPTION_EXECUTE_HANDLER -- Excecute the body of the __except construct * - * or EXCEPTION_CONTINUE_SEARCH -- Pass this exception down to the debugger * - * or EXCEPTION_CONTINUE_EXECUTION -- Continue to execute at the fault address * - * * - * WARNINGS: None * - * * - * HISTORY: * - * 7/22/97 12:29PM ST : Created * - *=============================================================================================*/ +// Exception handler filter function. int Exception_Handler(int exception_code, EXCEPTION_POINTERS *e_info) { DebugString("Exception!\n"); @@ -870,21 +794,7 @@ int Exception_Handler(int exception_code, EXCEPTION_POINTERS *e_info) -/*********************************************************************************************** - * Register_Thread_ID -- Let the exception handler know about a thread * - * * - * * - * * - * INPUT: Thread ID * - * Thread name * - * * - * OUTPUT: Nothing * - * * - * WARNINGS: None * - * * - * HISTORY: * - * 8/30/2001 3:04PM ST : Created * - *=============================================================================================*/ +// Let the exception handler know about a thread. void Register_Thread_ID(unsigned long thread_id, char *thread_name, bool main_thread) { WWMEMLOG(MEM_GAMEDATA); @@ -911,21 +821,7 @@ void Register_Thread_ID(unsigned long thread_id, char *thread_name, bool main_th #if (0) -/*********************************************************************************************** - * Register_Thread_Handle -- Keep a copy of the thread handle that matches this thread ID * - * * - * * - * * - * INPUT: Thread ID * - * Thread handle * - * * - * OUTPUT: True if thread ID was matched * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/6/2002 9:40PM ST : Created * - *=============================================================================================*/ +// Keep a copy of the thread handle that matches this thread ID. bool Register_Thread_Handle(unsigned long thread_id, HANDLE thread_handle) { for (int i=0 ; i //////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////// -/*********************************************************************************************** - * HashListClass::Add -- Add record to hash list. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 05/26/1999 SKB : Created. * - *=============================================================================================*/ template HashNodeClass *HashListClass::Add(HashNodeClass *node) { @@ -431,18 +412,7 @@ HashNodeClass *HashListClass::Add(HashNodeClass * } -/*********************************************************************************************** - * HashListClass::Add -- Add record to list, list creates node for user. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/03/1999 SKB : Created. * - *=============================================================================================*/ +// Add record to list, list creates node for user. template HashNodeClass *HashListClass::Add(T record, unsigned key) { @@ -455,18 +425,7 @@ HashNodeClass *HashListClass::Add(T record, unsigned k return (node); } -/*********************************************************************************************** - * HashListClass::Find -- Find record in hash table. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 05/26/1999 SKB : Created. * - *=============================================================================================*/ +// Find record in hash table. template HashNodeClass *HashListClass::Find(unsigned key) { @@ -496,21 +455,7 @@ HashNodeClass *HashListClass::Find(unsigned key) } -/*********************************************************************************************** - * HashListClass::Remove_Node -- Remove node from hash table. * - * Protected function for usage by Remove() routines. * - * * - * INPUT: * - * HashNodeClass *node - node to remove. * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/02/1999 SKB : Created. * - * 01/19/2000 SKB : Remove the node with Unlink. * - *=============================================================================================*/ +// Remove node from hash table. Protected function for usage by Remove() routines. template void HashListClass::Remove(HashNodeClass *node) { @@ -559,19 +504,7 @@ void HashListClass::Remove(HashNodeClass *node) NumRecords--; } -/*********************************************************************************************** - * HashListClass::Remove -- Remove record from hash table. * - * * - * INPUT: * - * unsigned key - key to find node by. * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 05/26/1999 SKB : Created. * - *=============================================================================================*/ +// Remove record from hash table. template bool HashListClass::Remove(unsigned key) { @@ -586,18 +519,7 @@ bool HashListClass::Remove(unsigned key) return(false); } -/*********************************************************************************************** - * HashListClass::Move_To -- Move nodes from one list to another. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/04/1999 SKB : Created. * - *=============================================================================================*/ +// Move nodes from one list to another. template void HashListClass::Move_To(HashListClass *newlist) { diff --git a/Core/Libraries/Source/WWVegas/WWLib/INDEX.h b/Core/Libraries/Source/WWVegas/WWLib/INDEX.h index 3ac2ad2bbdf..cbbe127b8fa 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/INDEX.h +++ b/Core/Libraries/Source/WWVegas/WWLib/INDEX.h @@ -30,23 +30,6 @@ * * * $Revision:: 4 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * IndexClass::Add_Index -- Add element to index tracking system. * - * IndexClass::Clear -- Clear index handler to empty state. * - * IndexClass::Count -- Fetch the number of index entries recorded. * - * IndexClass::Fetch_Index -- Fetch data from specified index. * - * IndexClass::Increase_Table_Size -- Increase the internal index table capacity. * - * IndexClass::IndexClass -- Constructor for index handler. * - * IndexClass::Invalidate_Archive -- Invalidate the archive pointer. * - * IndexClass::Is_Archive_Same -- Checks to see if archive pointer is same as index. * - * IndexClass::Is_Present -- Checks for presence of index entry. * - * IndexClass::Remove_Index -- Find matching index and remove it from system. * - * IndexClass::Search_For_Node -- Perform a search for the specified node ID * - * IndexClass::Set_Archive -- Records the node pointer into the archive. * - * IndexClass::Sort_Nodes -- Sorts nodes in preparation for a binary search. * - * IndexClass::~IndexClass -- Destructor for index handler object. * - * compfunc -- Support function for bsearch and bsort. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once @@ -194,20 +177,7 @@ class IndexClass }; -/*********************************************************************************************** - * IndexClass::IndexClass -- Constructor for index handler. * - * * - * This constructs an empty index handler. * - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/02/1996 JLB : Created. * - *=============================================================================================*/ +// Constructs an empty index handler. template IndexClass::IndexClass() : IndexTable(0), @@ -220,20 +190,7 @@ IndexClass::IndexClass() : } -/*********************************************************************************************** - * IndexClass::~IndexClass -- Destructor for index handler object. * - * * - * This will destruct and free any resources managed by this index handler. * - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/02/1996 JLB : Created. * - *=============================================================================================*/ +// Frees any resources managed by this index handler. template IndexClass::~IndexClass() { @@ -241,21 +198,8 @@ IndexClass::~IndexClass() } -/*********************************************************************************************** - * IndexClass::Clear -- Clear index handler to empty state. * - * * - * This routine will free all internal resources and bring the index handler into a * - * known empty state. After this routine, the index handler is free to be reused. * - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/02/1996 JLB : Created. * - *=============================================================================================*/ +// Frees all internal resources and brings the index handler into a known empty state. After this +// routine, the index handler is free to be reused. template void IndexClass::Clear() { @@ -268,22 +212,9 @@ void IndexClass::Clear() } -/*********************************************************************************************** - * IndexClass::Increase_Table_Size -- Increase the internal index table capacity. * - * * - * This helper function will increase the capacity of the internal index table without * - * performing any alterations to the index data. Use this routine prior to adding a new * - * element if the existing capacity is insufficient. * - * * - * INPUT: amount -- The number of index element spaces to add to its capacity. * - * * - * OUTPUT: bool; Was the internal capacity increased without error? * - * * - * WARNINGS: If there is insufficient RAM, then this routine will fail. * - * * - * HISTORY: * - * 11/02/1996 JLB : Created. * - *=============================================================================================*/ +// Increases the capacity of the internal index table without altering the index data. Use this +// routine prior to adding a new element if the existing capacity is insufficient. +// WARNING: If there is insufficient RAM, then this routine will fail. template bool IndexClass::Increase_Table_Size(int amount) { @@ -324,21 +255,7 @@ bool IndexClass::Increase_Table_Size(int amount) } -/*********************************************************************************************** - * IndexClass::Count -- Fetch the number of index entries recorded. * - * * - * This will return the quantity of index entries that have been recorded by this index * - * handler. * - * * - * INPUT: none * - * * - * OUTPUT: Returns with number of recorded indices present. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/02/1996 JLB : Created. * - *=============================================================================================*/ +// Returns the number of index entries recorded by this index handler. template int IndexClass::Count() const { @@ -346,21 +263,7 @@ int IndexClass::Count() const } -/*********************************************************************************************** - * IndexClass::Is_Present -- Checks for presence of index entry. * - * * - * This routine will scan for the specified index entry. If it was found, then 'true' is * - * returned. * - * * - * INPUT: id -- The index ID to search for. * - * * - * OUTPUT: bool; Was the index entry found in this index handler object? * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/02/1996 JLB : Created. * - *=============================================================================================*/ +// Checks for presence of index entry. template bool IndexClass::Is_Present(INDEX const & id) const { @@ -403,22 +306,10 @@ bool IndexClass::Is_Present(INDEX const & id) const } -/*********************************************************************************************** - * IndexClass::Fetch_By_Index -- Fetch data from specified index. * - * * - * This routine will find the specified index and return the data value associated with it. * - * * - * INPUT: id -- The index ID to search for. * - * * - * OUTPUT: Returns with the data value associated with the index value. * - * * - * WARNINGS: This routine presumes that the index exists. If it doesn't exist, then the * - * default constructed object "T" is returned instead. To avoid this problem, * - * always verfiy the existence of the index by calling Is_Present() first. * - * * - * HISTORY: * - * 11/02/1996 JLB : Created. * - *=============================================================================================*/ +// Fetch data from specified index. +// WARNING: This routine presumes that the index exists. If it doesn't exist, then the default +// constructed object "T" is returned instead. To avoid this problem, always verify the existence of +// the index by calling Is_Present() first. template T const & IndexClass::operator [] (INDEX const & id) const { @@ -444,21 +335,7 @@ T const & IndexClass::Fetch_By_Position(int pos) const } -/*********************************************************************************************** - * IndexClass::Is_Archive_Same -- Checks to see if archive pointer is same as index. * - * * - * This routine compares the specified index ID with the previously recorded index archive * - * pointer in order to determine if they match. * - * * - * INPUT: id -- The index ID to compare to the archive index object pointer. * - * * - * OUTPUT: bool; Does the specified index match the archive pointer? * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/02/1996 JLB : Created. * - *=============================================================================================*/ +// Checks if the index ID matches the previously recorded index archive pointer. template bool IndexClass::Is_Archive_Same(INDEX const & id) const { @@ -469,22 +346,8 @@ bool IndexClass::Is_Archive_Same(INDEX const & id) const } -/*********************************************************************************************** - * IndexClass::Invalidate_Archive -- Invalidate the archive pointer. * - * * - * This routine will set the archive pointer to an invalid state. This must be performed * - * if ever the archive pointer would become illegal (such as when the element it refers to * - * is deleted). * - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/02/1996 JLB : Created. * - *=============================================================================================*/ +// This routine will set the archive pointer to an invalid state. This must be performed if ever the +// archive pointer would become illegal (such as when the element it refers to is deleted). template void IndexClass::Invalidate_Archive() const { @@ -492,21 +355,8 @@ void IndexClass::Invalidate_Archive() const } -/*********************************************************************************************** - * IndexClass::Set_Archive -- Records the node pointer into the archive. * - * * - * This routine records the specified node pointer. Use this routine when there is a * - * good chance that the specified node will be requested in the immediate future. * - * * - * INPUT: node -- Pointer to the node to assign to the archive. * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/02/1996 JLB : Created. * - *=============================================================================================*/ +// Records the node pointer into the archive. Use this routine when there is a good chance that the +// specified node will be requested in the immediate future. template void IndexClass::Set_Archive(NodeElement const * node) const { @@ -514,26 +364,9 @@ void IndexClass::Set_Archive(NodeElement const * node) const } -/*********************************************************************************************** - * IndexClass::Add_Index -- Add element to index tracking system. * - * * - * This routine will record the index information into this index manager object. It * - * associates the index number with the data specified. The data is copied to an internal * - * storage location. * - * * - * INPUT: id -- The ID number to associate with the data. * - * * - * data -- The data to store. * - * * - * OUTPUT: bool; Was the element added without error? Failure indicates that RAM has been * - * exhausted. * - * * - * WARNINGS: The data is COPIED to internal storage. This means that the data object must * - * have a functional and efficient copy constructor and assignment operator. * - * * - * HISTORY: * - * 11/02/1996 JLB : Created. * - *=============================================================================================*/ +// Associates the index number with the data specified. Returns false if RAM has been exhausted. +// WARNING: The data is COPIED to internal storage. This means that the data object must have a +// functional and efficient copy constructor and assignment operator. template bool IndexClass::Add_Index(INDEX const & id, T const & data) { @@ -574,21 +407,7 @@ bool IndexClass::Add_Index(INDEX const & id, T const & data) } -/*********************************************************************************************** - * IndexClass::Remove_Index -- Find matching index and remove it from system. * - * * - * This will scan through the previously added index elements and if a match was found, it * - * will be removed. * - * * - * INPUT: id -- The index ID to search for and remove. * - * * - * OUTPUT: bool; Was the index element found and removed? * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/02/1996 JLB : Created. * - *=============================================================================================*/ +// Find matching index and remove it from system. template bool IndexClass::Remove_Index(INDEX const & id) { @@ -635,23 +454,10 @@ bool IndexClass::Remove_Index(INDEX const & id) } -/*********************************************************************************************** - * compfunc -- Support function for bsearch and bsort. * - * * - * This compare function presumes that its parameters are pointing to NodeElements and that * - * the first "int" in the node is the index ID number to be used for comparison. * - * * - * INPUT: ptr1 -- Pointer to first node. * - * * - * ptr2 -- Pointer to second node. * - * * - * OUTPUT: Returns with the comparision value between the two nodes. * - * * - * WARNINGS: This is highly dependent upon the layout of the NodeElement structure. * - * * - * HISTORY: * - * 11/02/1996 JLB : Created. * - *=============================================================================================*/ +// Support function for bsearch and bsort. This compare function presumes that its parameters are +// pointing to NodeElements and that the first "int" in the node is the index ID number to be used +// for comparison. +// WARNING: This is highly dependent upon the layout of the NodeElement structure. template int _USERENTRY IndexClass::search_compfunc(void const * ptr1, void const * ptr2) { @@ -665,22 +471,8 @@ int _USERENTRY IndexClass::search_compfunc(void const * ptr1, void con } -/*********************************************************************************************** - * IndexClass::Search_For_Node -- Perform a search for the specified node ID * - * * - * This routine will perform a binary search on the previously recorded index values and * - * if a match was found, it will return a pointer to the NodeElement. * - * * - * INPUT: id -- The index ID to search for. * - * * - * OUTPUT: Returns with a pointer to the NodeElement that matches the index ID specified. If * - * no matching index could be found, then nullptr is returned. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/02/1996 JLB : Created. * - *=============================================================================================*/ +// Performs a binary search on the previously recorded index values. Returns nullptr if no matching +// index could be found. template typename IndexClass::NodeElement const * IndexClass::Search_For_Node(INDEX const & id) const { diff --git a/Core/Libraries/Source/WWVegas/WWLib/INI.h b/Core/Libraries/Source/WWVegas/WWLib/INI.h index 12128733b56..7cf69c9e541 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/INI.h +++ b/Core/Libraries/Source/WWVegas/WWLib/INI.h @@ -30,8 +30,6 @@ * * * $Revision:: 16 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/LISTNODE.h b/Core/Libraries/Source/WWVegas/WWLib/LISTNODE.h index 533f106e209..5b831c0cdd3 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/LISTNODE.h +++ b/Core/Libraries/Source/WWVegas/WWLib/LISTNODE.h @@ -30,8 +30,6 @@ * * * $Revision:: 4 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/MPU.h b/Core/Libraries/Source/WWVegas/WWLib/MPU.h index 9f5b660bdb0..893e8c3f8a5 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/MPU.h +++ b/Core/Libraries/Source/WWVegas/WWLib/MPU.h @@ -30,8 +30,6 @@ * * * $Revision:: 3 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/PIPE.h b/Core/Libraries/Source/WWVegas/WWLib/PIPE.h index 729360d0947..847330e4446 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/PIPE.h +++ b/Core/Libraries/Source/WWVegas/WWLib/PIPE.h @@ -30,8 +30,6 @@ * * * $Revision:: 3 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/Point.h b/Core/Libraries/Source/WWVegas/WWLib/Point.h index 78a9f8c7ea9..482083c7cda 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/Point.h +++ b/Core/Libraries/Source/WWVegas/WWLib/Point.h @@ -30,8 +30,6 @@ * * * $Revision:: 5 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/RAMFILE.h b/Core/Libraries/Source/WWVegas/WWLib/RAMFILE.h index 8b5d6288a8c..58143e93b91 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/RAMFILE.h +++ b/Core/Libraries/Source/WWVegas/WWLib/RAMFILE.h @@ -30,8 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/RANDOM.h b/Core/Libraries/Source/WWVegas/WWLib/RANDOM.h index 04cf183802d..37fa6da5c44 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/RANDOM.h +++ b/Core/Libraries/Source/WWVegas/WWLib/RANDOM.h @@ -30,9 +30,6 @@ * * * $Revision:: 3 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * Pick_Random_Number -- Picks a random number between two values (inclusive). * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once @@ -187,28 +184,8 @@ class Random4Class { }; -/*********************************************************************************************** - * Pick_Random_Number -- Picks a random number between two values (inclusive). * - * * - * This is a utility template that works with one of the random number classes. Given a * - * random number generator, this routine will return with a value that lies between the * - * minimum and maximum values specified (subject to the bit precision limitations of the * - * random number generator itself). * - * * - * INPUT: generator -- Reference to the random number generator to use for the pick * - * process. * - * * - * minval -- The minimum legal return value (inclusive). * - * * - * maxval -- The maximum legal return value (inclusive). * - * * - * OUTPUT: Returns with a random number between the minval and maxval (inclusive). * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 05/23/1997 JLB : Created. * - *=============================================================================================*/ +// Picks a random number between two values (inclusive), subject to the bit precision limitations of +// the random number generator itself. template int Pick_Random_Number(T & generator, int minval, int maxval) { diff --git a/Core/Libraries/Source/WWVegas/WWLib/RAWFILE.h b/Core/Libraries/Source/WWVegas/WWLib/RAWFILE.h index 173f547ef7f..ce10242faa4 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/RAWFILE.h +++ b/Core/Libraries/Source/WWVegas/WWLib/RAWFILE.h @@ -30,12 +30,6 @@ * * * $Revision:: 10 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * RawFileClass::File_Name -- Returns with the filename associate with the file object. * - * RawFileClass::RawFileClass -- Default constructor for a file object. * - * RawFileClass::~RawFileClass -- Default deconstructor for a file object. * - * RawFileClass::Is_Open -- Checks to see if the file is open or not. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/SLIST.h b/Core/Libraries/Source/WWVegas/WWLib/SLIST.h index 7de92692478..1bfeec30b17 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/SLIST.h +++ b/Core/Libraries/Source/WWVegas/WWLib/SLIST.h @@ -36,19 +36,6 @@ * pointers to the actual data being stored in the nodes are kept. The * * users is responsible for creating the objects to be added and deleting * * the objects once they are removed from the list if they need to be. * - *-------------------------------------------------------------------------* - * Functions: * - * *SList::Remove_Head -- Removes the head of the list * - * *SList::Remove_Tail -- Removes the tail element from the list * - * SList::Get_Count -- Returns a count of the entries in the list * - * *SList::Head -- Returns the head node of the list * - * *SList::Tail -- Returns the tail node of the list * - * SList::Is_Empty -- Returns true if the list is empty * - * SList::Add_Head -- Adds a node to the head of the list * - * SList::Add_Head -- Adds a list to to the head of the list * - * SList::Add_Tail -- Adds a node to the tail of the list * - * SList::Add_Tail -- Adds a list to the tail of the list * - * *SList::Find_Node -- returns first node in list matching the input * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once @@ -107,22 +94,8 @@ class SList { }; -/************************************************************************** - * SList::Insert_Before -- Inserts entry prior to specified entry * - * * - * Inserts an entry prior to the specified entry in the list. If the * - * specified entry is null, it will add it prior to the head of the * - * list. Returns true if sucessfully added, false otherwise. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 03/11/1997 PWG : Created. * - *========================================================================*/ +// Inserts an entry prior to the specified entry in the list. If the specified entry is null, it +// will add it prior to the head of the list. template bool SList::Insert_Before(T *newnode, T *oldnode) { @@ -154,22 +127,8 @@ bool SList::Insert_Before(T *newnode, T *oldnode) } -/************************************************************************** - * SList::Insert_After -- Inserts an entry after specified entry * - * * - * Inserts an entry after to the specified entry in the list. If the * - * specified entry is null, it will add it prior to the head of the list. * - * Returns true if sucessfully added, false otherwise. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 03/11/1997 PWG : Created. * - *========================================================================*/ +// Inserts an entry after the specified entry in the list. If the specified entry is null, it will +// add it prior to the head of the list. template bool SList::Insert_After(T *newnode, T *oldnode) { @@ -198,18 +157,6 @@ bool SList::Insert_After(T *newnode, T *oldnode) } return false; } -/************************************************************************** - * SList::Remove_All -- Removes all of the entries in the current list * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 03/11/1997 PWG : Created. * - *========================================================================*/ template void SList::Remove_All() { @@ -221,18 +168,7 @@ void SList::Remove_All() HeadNode = TailNode = nullptr; } -/************************************************************************** - * SList::Remove -- Removes an element in the list. * - * * - * INPUT: * - * * - * OUTPUT: true if element could be removed, false if it could not be * - * * - * WARNINGS: * - * * - * HISTORY: * - * 03/11/1997 PWG : Created. * - *========================================================================*/ +// Removes an element in the list. template bool SList::Remove(T *element) { @@ -264,18 +200,6 @@ bool SList::Remove(T *element) return(false); } -/************************************************************************** - * *SList::Remove_Head -- Removes the head of the list * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 03/11/1997 PWG : Created. * - *========================================================================*/ template T *SList::Remove_Head() { @@ -300,20 +224,9 @@ T *SList::Remove_Head() // tails, then you should consider a doubly linked list. // -/************************************************************************** - * *SList::Remove_Tail -- Removes the tail element from the list * - * * - * INPUT: none * - * * - * OUTPUT: returns a pointer to the element removed * - * * - * WARNINGS: On a singlely linked list it is slow as hell to remove a * - * tail! If you need to frequently remove tails, then you * - * should consider a doubly linked list. * - * * - * HISTORY: * - * 03/11/1997 PWG : Created. * - *========================================================================*/ +// Removes the tail element from the list. +// WARNING: On a singly linked list it is slow as hell to remove a tail! If you need to frequently +// remove tails, then you should consider a doubly linked list. template T *SList::Remove_Tail() { @@ -325,18 +238,6 @@ T *SList::Remove_Tail() } -/************************************************************************** - * SList::Get_Count -- Returns a count of the entries in the list * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 03/11/1997 PWG : Created. * - *========================================================================*/ template inline long SList::Get_Count() const { @@ -347,54 +248,18 @@ inline long SList::Get_Count() const } -/************************************************************************** - * *SList::Head -- Returns the head node of the list * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 03/11/1997 PWG : Created. * - *========================================================================*/ template inline SLNode *SList::Head() const { return(HeadNode); } -/************************************************************************** - * *SList::Tail -- Returns the tail node of the list * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 03/11/1997 PWG : Created. * - *========================================================================*/ template inline SLNode *SList::Tail() const { return(TailNode); } -/************************************************************************** - * SList::Is_Empty -- Returns true if the list is empty * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 03/11/1997 PWG : Created. * - *========================================================================*/ template inline bool SList::Is_Empty() const { @@ -402,18 +267,6 @@ inline bool SList::Is_Empty() const } -/************************************************************************** - * SList::Add_Head -- Adds a node to the head of the list * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 03/11/1997 PWG : Created. * - *========================================================================*/ template bool SList::Add_Head(T *data) { @@ -428,18 +281,6 @@ bool SList::Add_Head(T *data) } -/************************************************************************** - * SList::Add_Head -- Adds a list to to the head of the list * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 03/11/1997 PWG : Created. * - *========================================================================*/ template bool SList::Add_Head(SList& list) { @@ -462,18 +303,6 @@ bool SList::Add_Head(SList& list) return true; } -/************************************************************************** - * SList::Add_Tail -- Adds a node to the tail of the list * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 03/11/1997 PWG : Created. * - *========================================================================*/ template bool SList::Add_Tail(T *data) { @@ -492,18 +321,6 @@ bool SList::Add_Tail(T *data) return true; } -/************************************************************************** - * SList::Add_Tail -- Adds a list to the tail of the list * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 03/11/1997 PWG : Created. * - *========================================================================*/ template bool SList::Add_Tail(SList& list) { @@ -515,18 +332,7 @@ bool SList::Add_Tail(SList& list) } -/************************************************************************** - * *SList::Find_Node -- returns first node in list matching the input * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/22/1997 GH : Created. * - *========================================================================*/ +// Returns first node in list matching the input. template inline SLNode *SList::Find_Node(T * data) const { diff --git a/Core/Libraries/Source/WWVegas/WWLib/SLNODE.h b/Core/Libraries/Source/WWVegas/WWLib/SLNODE.h index 88ee2c78f7d..2748037714d 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/SLNODE.h +++ b/Core/Libraries/Source/WWVegas/WWLib/SLNODE.h @@ -28,8 +28,6 @@ * * * Last Update : March 11, 1997 [PWG] * * * - *-------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/STRAW.h b/Core/Libraries/Source/WWVegas/WWLib/STRAW.h index 4a83151192f..c4aebcde292 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/STRAW.h +++ b/Core/Libraries/Source/WWVegas/WWLib/STRAW.h @@ -30,8 +30,6 @@ * * * $Revision:: 3 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/Vector.h b/Core/Libraries/Source/WWVegas/WWLib/Vector.h index 0843cc54f04..0fc6d20e220 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/Vector.h +++ b/Core/Libraries/Source/WWVegas/WWLib/Vector.h @@ -30,25 +30,6 @@ * * * $Revision:: 49 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * VectorClass::VectorClass -- Constructor for vector class. * - * VectorClass::~VectorClass -- Default destructor for vector class. * - * VectorClass::VectorClass -- Copy constructor for vector object. * - * VectorClass::operator = -- The assignment operator. * - * VectorClass::operator == -- Equality operator for vector objects. * - * VectorClass::Clear -- Frees and clears the vector. * - * VectorClass::Resize -- Changes the size of the vector. * - * DynamicVectorClass::DynamicVectorClass -- Constructor for dynamic vector. * - * DynamicVectorClass::Resize -- Changes the size of a dynamic vector. * - * DynamicVectorClass::Add -- Add an element to the vector. * - * DynamicVectorClass::Delete -- Remove the specified object from the vector. * - * DynamicVectorClass::Delete -- Deletes the specified index from the vector. * - * VectorClass::ID -- Pointer based conversion to index number. * - * VectorClass::ID -- Finds object ID based on value. * - * DynamicVectorClass::ID -- Find matching value in the dynamic vector. * - * DynamicVectorClass::Uninitialized_Add -- Add an empty place to the vector. * - * DynamicVectorClass::Insert -- insert an object at the desired index * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once @@ -131,26 +112,8 @@ class VectorClass }; -/*********************************************************************************************** - * VectorClass::VectorClass -- Constructor for vector class. * - * * - * This constructor for the vector class is passed the initial size of the vector and an * - * optional pointer to a preallocated block of memory that the vector will be placed in. * - * If this optional pointer is nullptr (or not provided), then the vector is allocated out * - * of free store (with the "new" operator). * - * * - * INPUT: size -- The number of elements to initialize this vector to. * - * * - * array -- Optional pointer to a previously allocated memory block to hold the * - * vector. * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 03/10/1995 JLB : Created. * - *=============================================================================================*/ +// The vector is placed in the optional preallocated memory block. If this pointer is nullptr (or not +// provided), then the vector is allocated out of free store (with the "new" operator). template VectorClass::VectorClass(int size, T const * array) : Vector(nullptr), @@ -173,21 +136,7 @@ VectorClass::VectorClass(int size, T const * array) : } -/*********************************************************************************************** - * VectorClass::~VectorClass -- Default destructor for vector class. * - * * - * This is the default destructor for the vector class. It will deallocate any memory * - * that it may have allocated. * - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 03/10/1995 JLB : Created. * - *=============================================================================================*/ +// Deallocates any memory that the vector may have allocated. template VectorClass::~VectorClass() { @@ -195,21 +144,6 @@ VectorClass::~VectorClass() } -/*********************************************************************************************** - * VectorClass::VectorClass -- Copy constructor for vector object. * - * * - * This is the copy constructor for the vector class. It will duplicate the provided * - * vector into the new vector being created. * - * * - * INPUT: vector -- Reference to the vector to use as a copy. * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 03/10/1995 JLB : Created. * - *=============================================================================================*/ template VectorClass::VectorClass(VectorClass const & vec) : Vector(0), @@ -221,21 +155,6 @@ VectorClass::VectorClass(VectorClass const & vec) : } -/*********************************************************************************************** - * VectorClass::operator = -- The assignment operator. * - * * - * This the the assignment operator for vector objects. It will alter the existing lvalue * - * vector to duplicate the rvalue one. * - * * - * INPUT: vec -- The rvalue vector to copy into the lvalue one. * - * * - * OUTPUT: Returns with reference to the newly copied vector. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 03/10/1995 JLB : Created. * - *=============================================================================================*/ template VectorClass & VectorClass::operator =(VectorClass const & vec) { @@ -259,22 +178,8 @@ VectorClass & VectorClass::operator =(VectorClass const & vec) } -/*********************************************************************************************** - * VectorClass::operator == -- Equality operator for vector objects. * - * * - * This operator compares two vectors for equality. It does this by performing an object * - * by object comparison between the two vectors. * - * * - * INPUT: vector -- The right vector expression. * - * * - * OUTPUT: bool; Are the two vectors essentially equal? (do they contain comparable elements * - * in the same order?) * - * * - * WARNINGS: The equality operator must exist for the objects that this vector contains. * - * * - * HISTORY: * - * 03/10/1995 JLB : Created. * - *=============================================================================================*/ +// Performs an object by object comparison between the two vectors. +// WARNING: The equality operator must exist for the objects that this vector contains. template bool VectorClass::operator == (VectorClass const & vec) const { @@ -290,24 +195,11 @@ bool VectorClass::operator == (VectorClass const & vec) const } -/*********************************************************************************************** - * VectorClass::ID -- Pointer based conversion to index number. * - * * - * Use this routine to convert a pointer to an element in the vector back into the index * - * number of that object. This routine ONLY works with actual pointers to object within * - * the vector. For "equivalent" object index number (such as with similar integral values) * - * then use the "by value" index number ID function. * - * * - * INPUT: pointer -- Pointer to an actual object in the vector. * - * * - * OUTPUT: Returns with the index number for the object pointed to by the parameter. * - * * - * WARNINGS: This routine is only valid for actual pointers to object that exist within * - * the vector. All other object pointers will yield undefined results. * - * * - * HISTORY: * - * 03/13/1995 JLB : Created. * - *=============================================================================================*/ +// Converts a pointer to an element in the vector back into the index number of that object. For +// "equivalent" object index number (such as with similar integral values) then use the "by value" +// index number ID function. +// WARNING: This routine is only valid for actual pointers to object that exist within the vector. +// All other object pointers will yield undefined results. template inline int VectorClass::ID(T const * ptr) { @@ -316,22 +208,8 @@ inline int VectorClass::ID(T const * ptr) } -/*********************************************************************************************** - * VectorClass::ID -- Finds object ID based on value. * - * * - * Use this routine to find the index value of an object with equivalent value in the * - * vector. Typical use of this would be for integral types. * - * * - * INPUT: object -- Reference to the object that is to be looked up in the vector. * - * * - * OUTPUT: Returns with the index number of the object that is equivalent to the one * - * specified. If no matching value could be found then -1 is returned. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 03/13/1995 JLB : Created. * - *=============================================================================================*/ +// Finds the index value of an object with equivalent value in the vector. Typical use of this would +// be for integral types. Returns -1 if no matching value could be found. template int VectorClass::ID(T const & object) { @@ -346,22 +224,8 @@ int VectorClass::ID(T const & object) } -/*********************************************************************************************** - * VectorClass::Clear -- Frees and clears the vector. * - * * - * Use this routine to reset the vector to an empty (non-allocated) state. A vector will * - * free all allocated memory when this routine is called. In order for the vector to be * - * useful after this point, the Resize function must be called to give it element space. * - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 03/10/1995 JLB : Created. * - *=============================================================================================*/ +// Frees all allocated memory and resets the vector to an empty state. In order for the vector to be +// useful after this point, the Resize function must be called to give it element space. template void VectorClass::Clear() { @@ -374,25 +238,10 @@ void VectorClass::Clear() } -/*********************************************************************************************** - * VectorClass::Resize -- Changes the size of the vector. * - * * - * This routine is used to change the size (usually to increase) the size of a vector. This * - * is the only way to increase the vector's working room (number of elements). * - * * - * INPUT: newsize -- The desired size of the vector. * - * * - * array -- Optional pointer to a previously allocated memory block that the * - * array will be located in. If this parameter is not supplied, then * - * the array will be allocated from free store. * - * * - * OUTPUT: bool; Was the array resized successfully? * - * * - * WARNINGS: Failure to succeed could be the result of running out of memory. * - * * - * HISTORY: * - * 03/10/1995 JLB : Created. * - *=============================================================================================*/ +// Changes the size of the vector. This is the only way to increase the vector's working room +// (number of elements). The vector is placed in the optional preallocated memory block, or else +// allocated from free store. +// WARNING: Failure to succeed could be the result of running out of memory. template bool VectorClass::Resize(int newsize, T const * array) { @@ -565,26 +414,9 @@ class DynamicVectorClass : public VectorClass }; -/*********************************************************************************************** - * DynamicVectorClass::DynamicVectorClass -- Constructor for dynamic vector. * - * * - * This is the normal constructor for the dynamic vector class. It is similar to the normal * - * vector class constructor. The vector is initialized to contain the number of elements * - * specified in the "size" parameter. The memory is allocated from free store unless the * - * optional array parameter is provided. In this case it will place the vector at the * - * memory location specified. * - * * - * INPUT: size -- The maximum number of objects allowed in this vector. * - * * - * array -- Optional pointer to the memory area to place the vector at. * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 03/10/1995 JLB : Created. * - *=============================================================================================*/ +// The vector is initialized to contain the number of elements specified in the "size" parameter. +// The memory is allocated from free store unless the optional array parameter is provided. In this +// case it will place the vector at the memory location specified. template DynamicVectorClass::DynamicVectorClass(unsigned size, T const * array) : VectorClass(size, array) @@ -594,25 +426,10 @@ DynamicVectorClass::DynamicVectorClass(unsigned size, T const * array) } -/*********************************************************************************************** - * DynamicVectorClass::Resize -- Changes the size of a dynamic vector. * - * * - * Use this routine to change the size of the vector. The size changed is the maximum * - * number of allocated objects within this vector. If a memory buffer is provided, then * - * the vector will be located there. Otherwise, the memory will be allocated out of free * - * store. * - * * - * INPUT: newsize -- The desired maximum size of this vector. * - * * - * array -- Optional pointer to a previously allocated memory array. * - * * - * OUTPUT: bool; Was vector successfully resized according to specifications? * - * * - * WARNINGS: Failure to resize the vector could be the result of lack of free store. * - * * - * HISTORY: * - * 03/10/1995 JLB : Created. * - *=============================================================================================*/ +// Changes the maximum number of allocated objects within this vector. If a memory buffer is +// provided, then the vector will be located there. Otherwise, the memory will be allocated out of +// free store. +// WARNING: Failure to resize the vector could be the result of lack of free store. template bool DynamicVectorClass::Resize(int newsize, T const * array) { @@ -624,24 +441,9 @@ bool DynamicVectorClass::Resize(int newsize, T const * array) } -/*********************************************************************************************** - * DynamicVectorClass::ID -- Find matching value in the dynamic vector. * - * * - * Use this routine to find a matching object (by value) in the vector. Unlike the base * - * class ID function of similar name, this one restricts the scan to the current number * - * of valid objects. * - * * - * INPUT: object -- A reference to the object that a match is to be found in the * - * vector. * - * * - * OUTPUT: Returns with the index number of the object that is equivalent to the one * - * specified. If no equivalent object could be found then -1 is returned. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 03/13/1995 JLB : Created. * - *=============================================================================================*/ +// Finds a matching object (by value) in the vector. Unlike the base class ID function of similar +// name, this one restricts the scan to the current number of valid objects. Returns -1 if no +// equivalent object could be found. template int DynamicVectorClass::ID(T const & object) { @@ -652,23 +454,9 @@ int DynamicVectorClass::ID(T const & object) } -/*********************************************************************************************** - * DynamicVectorClass::Add -- Add an element to the vector. * - * * - * Use this routine to add an element to the vector. The vector will automatically be * - * resized to accommodate the new element IF the vector was allocated previously and the * - * growth rate is not zero. * - * * - * INPUT: object -- Reference to the object that will be added to the vector. * - * * - * OUTPUT: bool; Was the object added successfully? If so, the object is added to the end * - * of the vector. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 03/10/1995 JLB : Created. * - *=============================================================================================*/ +// Adds an element to the end of the vector. The vector will automatically be resized to +// accommodate the new element IF the vector was allocated previously and the growth rate is not +// zero. template bool DynamicVectorClass::Add(T const & object) { @@ -700,21 +488,7 @@ bool DynamicVectorClass::Add(T const & object) } -/*********************************************************************************************** - * DynamicVectorClass::Add_Head -- Adds element to head of the list. * - * * - * This routine will add the specified element to the head of the vector. If necessary, * - * the vector will be expanded accordingly. * - * * - * INPUT: object -- Reference to the object to add to the head of this vector. * - * * - * OUTPUT: bool; Was the object added without error? * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 09/21/1995 JLB : Created. * - *=============================================================================================*/ +// Adds element to head of the list. If necessary, the vector will be expanded accordingly. template bool DynamicVectorClass::Add_Head(T const & object) { @@ -752,18 +526,6 @@ bool DynamicVectorClass::Add_Head(T const & object) -/*********************************************************************************************** - * DynamicVectorClass::Insert -- insert an object at the desired index * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/27/99 GTH : Created. * - *=============================================================================================*/ template bool DynamicVectorClass::Insert(int index,T const & object) { @@ -802,22 +564,10 @@ bool DynamicVectorClass::Insert(int index,T const & object) } -/*********************************************************************************************** - * DynamicVectorClass::Delete -- Remove the specified object from the vector. * - * * - * This routine will delete the object referenced from the vector. All objects in the * - * vector that follow the one deleted will be moved "down" to fill the hole. * - * * - * INPUT: object -- Reference to the object in this vector that is to be deleted. * - * * - * OUTPUT: bool; Was the object deleted successfully? This should always be true. * - * * - * WARNINGS: Do no pass a reference to an object that is NOT part of this vector. The * - * results of this are undefined and probably catastrophic. * - * * - * HISTORY: * - * 03/10/1995 JLB : Created. * - *=============================================================================================*/ +// Removes the specified object from the vector. All objects in the vector that follow the one +// deleted will be moved "down" to fill the hole. +// WARNING: Do not pass a reference to an object that is NOT part of this vector. The results of +// this are undefined and probably catastrophic. template bool DynamicVectorClass::Delete(T const & object) { @@ -829,23 +579,8 @@ bool DynamicVectorClass::Delete(T const & object) } -/*********************************************************************************************** - * DynamicVectorClass::Delete -- Deletes the specified index from the vector. * - * * - * Use this routine to delete the object at the specified index from the objects in the * - * vector. This routine will move all the remaining objects "down" in order to fill the * - * hole. * - * * - * INPUT: index -- The index number of the object in the vector that is to be deleted. * - * * - * OUTPUT: bool; Was the object index deleted successfully? Failure might mean that the index * - * specified was out of bounds. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 03/10/1995 JLB : Created. * - *=============================================================================================*/ +// Deletes the object at the specified index from the vector. All the remaining objects are moved +// "down" in order to fill the hole. Returns false if the index is out of bounds. template bool DynamicVectorClass::Delete(int index) { @@ -899,25 +634,12 @@ void DynamicVectorClass::Delete_All() } -/*********************************************************************************************** - * DynamicVectorClass::Uninitialized_Add -- Add an empty place to the vector. * - * * - * To avoid copying when creating an object and adding it to the vector, use this and * - * immediately fill the area that the return value points to with a valid object (by hand * - * for a struct or by using placement new for a class object). * - * This function does everything Add does except copying an object into the new space, * - * thus leaving an uninitialized area of memory. * - * * - * INPUT: none. * - * * - * OUTPUT: T *; Points to the empty space where the new object is to be created. (If the * - * space was not added successfully, returns nullptr). * - * * - * WARNINGS: If memory area is left uninitialized, Very Bad Things will happen. * - * * - * HISTORY: * - * 03/04/1998 NH : Created. * - *=============================================================================================*/ +// Adds an empty place to the vector. To avoid copying when creating an object and adding it to the +// vector, use this and immediately fill the area that the return value points to with a valid +// object (by hand for a struct or by using placement new for a class object). This function does +// everything Add does except copying an object into the new space, thus leaving an uninitialized +// area of memory. Returns nullptr if the space could not be added. +// WARNING: If memory area is left uninitialized, Very Bad Things will happen. template T * DynamicVectorClass::Uninitialized_Add() { diff --git a/Core/Libraries/Source/WWVegas/WWLib/WWFILE.h b/Core/Libraries/Source/WWVegas/WWLib/WWFILE.h index 9cc1a534507..3a3550fe499 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/WWFILE.h +++ b/Core/Libraries/Source/WWVegas/WWLib/WWFILE.h @@ -30,8 +30,6 @@ * * * $Revision:: 9 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/XPIPE.h b/Core/Libraries/Source/WWVegas/WWLib/XPIPE.h index 28b775e30d2..ff8751ec9fb 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/XPIPE.h +++ b/Core/Libraries/Source/WWVegas/WWLib/XPIPE.h @@ -30,8 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/XSTRAW.h b/Core/Libraries/Source/WWVegas/WWLib/XSTRAW.h index f5f86f51138..85494b0c1be 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/XSTRAW.h +++ b/Core/Libraries/Source/WWVegas/WWLib/XSTRAW.h @@ -30,8 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/always.h b/Core/Libraries/Source/WWVegas/WWLib/always.h index 836dca90c05..48129a2040a 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/always.h +++ b/Core/Libraries/Source/WWVegas/WWLib/always.h @@ -30,8 +30,6 @@ * * * $Revision:: 13 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/argv.cpp b/Core/Libraries/Source/WWVegas/WWLib/argv.cpp index 58f33c1ba7f..554f9110076 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/argv.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/argv.cpp @@ -31,13 +31,6 @@ * * * $Revision:: 11 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * CurrentPos -- Create an instance to parse argv with. * - * ArgvClass::Free -- Release data allocated. * - * ArgvClass::Load_File -- Load args from a file. * - * *ArgvClass::Find_Value -- Find value of argument given prefix. * - * *ArgvClass::Get_Cur_Value -- Get value of current argugment. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "argv.h" @@ -49,20 +42,7 @@ int ArgvClass::Argc = 0; char *ArgvClass::Argv[MAX_ARGC]; -/*********************************************************************************************** - * CurrentPos -- Create an instance to parse argv with. * - * * - * INPUT: * - * bool case_sensitive - Do you want to perform a case sensitive search (stricmp)? * - * bool exact_size - Do you want string of same length (strncmp) ? * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/18/1999 SKB : Created. * - *=============================================================================================*/ +// Create an instance to parse argv with. ArgvClass::ArgvClass(bool case_sensitive, bool exact_size): Flags(0), LastArg(nullptr), @@ -72,20 +52,8 @@ ArgvClass::ArgvClass(bool case_sensitive, bool exact_size): Exact_Size(exact_size); } -/*********************************************************************************************** - * *ArgvClass::Find_Again -- Search for a string given the flags. * - * * - * INPUT: * - * const char *arg - String to search for. If nullptr, LastArg will be used. * - * * - * OUTPUT: * - * const char *string found (null if not found) * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/17/1999 SKB : Created. * - *=============================================================================================*/ +// Search for a string given the flags. If arg is nullptr, LastArg will be used. Returns null if not +// found. const char *ArgvClass::Find_Again(const char *arg) { if (arg) { @@ -138,25 +106,10 @@ const char *ArgvClass::Find_Again(const char *arg) return nullptr; } -/*********************************************************************************************** - * ArgvClass::Init -- Setup the command line. * - * * - * INPUT: * - * LPSTR lpCmdLine - A string of white space separated strings. Quotes force spaces to * - * be ignored. * - * char *fileprefix - A prefix on an arguement telling system to load postfix file name * - * as command line params. * - * * - * OUTPUT: * - * * - * WARNINGS: * - * This may be called multible times with different strings. * - * Once Argc reaches MAX_ARGC, no more will be added. * - * * - * HISTORY: * - * 06/17/1999 SKB : Created. * - * 07/15/2001 SKB : Put file arguements in the correct order they were included. * - *=============================================================================================*/ +// Setup the command line. Quotes force spaces to be ignored. An argument with the file prefix tells +// the system to load the postfixed file name as command line params. +// WARNING: This may be called multiple times with different strings. Once Argc reaches MAX_ARGC, no +// more will be added. int ArgvClass::Init(char *lpCmdLine, const char *fileprefix) { // Get pointer to command line. @@ -227,19 +180,6 @@ int ArgvClass::Init(char *lpCmdLine, const char *fileprefix) return(Argc - origargc); } -/*********************************************************************************************** - * ArgvClass::Load_File -- Load args from a file. * - * * - * INPUT: * - * const char *fname - file to load. * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/18/1999 SKB : Created. * - *=============================================================================================*/ bool ArgvClass::Load_File(const char *fname) { FILE *fp = fopen(fname, "r"); @@ -283,18 +223,7 @@ bool ArgvClass::Load_File(const char *fname) return(false); } -/*********************************************************************************************** - * ArgvClass::Free -- Release data allocated. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/18/1999 SKB : Created. * - *=============================================================================================*/ +// Release data allocated. void ArgvClass::Free() { for (int lp = 0; lp < Argc; lp++) { @@ -305,18 +234,7 @@ void ArgvClass::Free() } -/*********************************************************************************************** - * *ArgvClass::Find_Value -- Find value of argument given prefix. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/23/1999 SKB : Created. * - *=============================================================================================*/ +// Find value of argument given prefix. const char *ArgvClass::Find_Value(const char *arg) { if (arg && *arg) { @@ -328,19 +246,7 @@ const char *ArgvClass::Find_Value(const char *arg) return(nullptr); } -/*********************************************************************************************** - * *ArgvClass::Get_Cur_Value -- Get value of current argugment. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/23/1999 SKB : Created. * - * 06/25/2001 SKB : add flag user can check to see if value was extracted from next location.* - *=============================================================================================*/ +// Get value of current argument. const char *ArgvClass::Get_Cur_Value(unsigned prefixlen, bool * val_in_next) { if (val_in_next) *val_in_next = false; @@ -382,20 +288,8 @@ const char *ArgvClass::Get_Cur_Value(unsigned prefixlen, bool * val_in_next) -/*********************************************************************************************** - * void ArgvClass::Update_Value -- Add/Replace a value * - * * - * INPUT: * - * attrib = cmd line attrib to add/replace * - * value = new value for attrib * - * * - * OUTPUT: * - * * - * WARNINGS: Not Tested! * - * * - * HISTORY: * - * 12/13/1999 NAK : Created. * - *=============================================================================================*/ +// Add/Replace a value. +// WARNING: Not Tested! void ArgvClass::Update_Value(const char *attrib, const char *value) { if ((Find_Value(attrib))!=nullptr) @@ -418,20 +312,6 @@ void ArgvClass::Update_Value(const char *attrib, const char *value) } -/*********************************************************************************************** - * void ArgvClass::Add_Value -- Add a value * - * * - * INPUT: * - * attrib = thing to add * - * value = new optional value * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/13/1999 NAK : Created. * - *=============================================================================================*/ void ArgvClass::Add_Value(const char *attrib, const char *value) { if (attrib) @@ -448,24 +328,9 @@ void ArgvClass::Add_Value(const char *attrib, const char *value) } -/*********************************************************************************************** - * bool ArgvClass::Remove_Value -- Remove a value * - * * - * INPUT: * - * attrib = thing to remove * - * * - * OUTPUT: * - * * - * WARNINGS: * - * THIS CONTAINS A POTENTIAL BUG - I don't want to fix it because it might be a desired * - * behavior. Given: * - * Argv[0] = "-i test" "*.txt" as values in Argv, * - * calling Remove_Value("-i") will remove *.txt as well. * - * * - * HISTORY: * - * 12/13/1999 NAK : Created. * - * 06/25/2001 SKB : WARNINGS message * - *=============================================================================================*/ +// WARNING: THIS CONTAINS A POTENTIAL BUG - I don't want to fix it because it might be a desired +// behavior. Given: Argv[0] = "-i test" "*.txt" as values in Argv, calling Remove_Value("-i") will +// remove *.txt as well. bool ArgvClass::Remove_Value(const char *attrib) { int removeCount=1; diff --git a/Core/Libraries/Source/WWVegas/WWLib/argv.h b/Core/Libraries/Source/WWVegas/WWLib/argv.h index 15cae760e18..bdaa28647f5 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/argv.h +++ b/Core/Libraries/Source/WWVegas/WWLib/argv.h @@ -31,8 +31,6 @@ * * * $Revision:: 7 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/b64pipe.cpp b/Core/Libraries/Source/WWVegas/WWLib/b64pipe.cpp index e6f61d2a639..d1f23d734ce 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/b64pipe.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/b64pipe.cpp @@ -30,10 +30,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * Base64Pipe::Flush -- Flushes the final pending data through the pipe. * - * Base64Pipe::Put -- Processes a block of data through the pipe. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "always.h" @@ -41,25 +37,9 @@ #include "base64.h" -/*********************************************************************************************** - * Base64Pipe::Put -- Processes a block of data through the pipe. * - * * - * This will take the data submitted and either Base64 encode or decode it (as specified * - * in the pipe's constructor). The nature of Base64 encoding means that the data will * - * grow 30% in size when encoding and decrease by a like amount when decoding. * - * * - * INPUT: source -- Pointer to the data to be translated. * - * * - * length -- The number of bytes to translate. * - * * - * OUTPUT: Returns with the actual number of bytes output at the far distant final end of * - * the pipe chain. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// Base64 encodes or decodes the data (as specified in the pipe's constructor). The nature of Base64 +// encoding means that the data will grow 30% in size when encoding and decrease by a like amount +// when decoding. int Base64Pipe::Put(void const * source, int slen) { if (source == nullptr || slen < 1) { @@ -125,22 +105,9 @@ int Base64Pipe::Put(void const * source, int slen) } -/*********************************************************************************************** - * Base64Pipe::Flush -- Flushes the final pending data through the pipe. * - * * - * If there is any non-processed data accumulated in the holding buffer (quite likely when * - * encoding), then it will be processed and flushed out the end of the pipe. * - * * - * INPUT: none * - * * - * OUTPUT: Returns with the number of bytes output at the far distant final end of the pipe * - * chain. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// Flushes the final pending data through the pipe. If there is any non-processed data accumulated +// in the holding buffer (quite likely when encoding), then it will be processed and flushed out the +// end of the pipe. int Base64Pipe::Flush() { int len = 0; diff --git a/Core/Libraries/Source/WWVegas/WWLib/b64pipe.h b/Core/Libraries/Source/WWVegas/WWLib/b64pipe.h index a3826485543..7baf066bf34 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/b64pipe.h +++ b/Core/Libraries/Source/WWVegas/WWLib/b64pipe.h @@ -30,8 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/b64straw.cpp b/Core/Libraries/Source/WWVegas/WWLib/b64straw.cpp index fde1aaadfff..a1b8035160d 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/b64straw.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/b64straw.cpp @@ -30,9 +30,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * Base64Straw::Get -- Fetch data and convert it to/from base 64 encoding. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "always.h" @@ -40,25 +37,8 @@ #include "base64.h" -/*********************************************************************************************** - * Base64Straw::Get -- Fetch data and convert it to/from base 64 encoding. * - * * - * This routine will fetch the number of bytes requested and perform any conversion as * - * necessary upon the data. The nature of Base 64 encoding means that the data will * - * increase in size by 30% when encoding and decrease in like manner when decoding. * - * * - * INPUT: source -- The buffer to hold the processed data. * - * * - * length -- The number of bytes requested. * - * * - * OUTPUT: Returns with the number of bytes stored into the buffer. If the number is less * - * than requested, then this indicates that the data stream has been exhausted. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// Fetch data and convert it to/from base 64 encoding. The nature of Base 64 encoding means that the +// data will increase in size by 30% when encoding and decrease in like manner when decoding. int Base64Straw::Get(void * source, int slen) { int total = 0; diff --git a/Core/Libraries/Source/WWVegas/WWLib/b64straw.h b/Core/Libraries/Source/WWVegas/WWLib/b64straw.h index 584b592afb0..147bebe2ce8 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/b64straw.h +++ b/Core/Libraries/Source/WWVegas/WWLib/b64straw.h @@ -30,8 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/base64.cpp b/Core/Libraries/Source/WWVegas/WWLib/base64.cpp index 3cc8ae9d686..71b34ee750a 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/base64.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/base64.cpp @@ -30,10 +30,6 @@ * * * $Revision:: 3 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * Base64_Decode -- Decodes Base 64 data into its original data form. * - * Base64_Encode -- Encode data into Base 64 format. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "always.h" @@ -116,29 +112,10 @@ typedef union { } PacketType; -/*********************************************************************************************** - * Base64_Encode -- Encode data into Base 64 format. * - * * - * This will take an arbitrary length of source data and transform it into base 64 format * - * data. Base 64 format has the property of being very portable across text editors and * - * country character encoding schemes. As such it is ideal for e-mail. Note that the output * - * data will be about 33% larger than the source. * - * * - * INPUT: source -- Pointer to the source data to convert. * - * * - * slen -- The number of bytes to encode. * - * * - * dest -- Pointer to the destination buffer that will hold the encoded data. * - * * - * dlen -- The size of the destination buffer. * - * * - * OUTPUT: Returns with the number of bytes stored into the destination buffer. * - * * - * WARNINGS: Be sure that the destination buffer is big enough to hold the encoded output. * - * * - * HISTORY: * - * 07/06/1996 JLB : Created. * - *=============================================================================================*/ +// Encode data into Base 64 format. Base 64 format has the property of being very portable across +// text editors and country character encoding schemes. As such it is ideal for e-mail. Note that +// the output data will be about 33% larger than the source. +// WARNING: Be sure that the destination buffer is big enough to hold the encoded output. int Base64_Encode(void const * source, int slen, void * dest, int dlen) { /* @@ -215,31 +192,10 @@ int Base64_Encode(void const * source, int slen, void * dest, int dlen) } -/*********************************************************************************************** - * Base64_Decode -- Decodes Base 64 data into its original data form. * - * * - * Use this routine to decode base 64 data back into the original data. A property of this * - * decode process is that unrecognized input characters are ignored. This allows mangled * - * source (filled with line breaks or spaces) to be correctly decoded. The decode process * - * terminates when the end of the source data has been reached or the special end of data * - * marker is encountered. * - * * - * INPUT: source -- Pointer to the source data to decode. * - * * - * slen -- The number of bytes in the source data buffer. * - * * - * dest -- Pointer to the destination buffer to be filled with the decoded data. * - * * - * dlen -- The maximum size of the destination buffer. * - * * - * OUTPUT: Returns with the number of bytes stored into the destination buffer. This will * - * always be less than the number of source bytes (usually by about 33%). * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/06/1996 JLB : Created. * - *=============================================================================================*/ +// Decodes Base 64 data into its original data form. Unrecognized input characters are ignored. This +// allows mangled source (filled with line breaks or spaces) to be correctly decoded. The decode +// process terminates when the end of the source data has been reached or the special end of data +// marker is encountered. int Base64_Decode(void const * source, int slen, void * dest, int dlen) { /* diff --git a/Core/Libraries/Source/WWVegas/WWLib/base64.h b/Core/Libraries/Source/WWVegas/WWLib/base64.h index 301249cd199..ea5c7193825 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/base64.h +++ b/Core/Libraries/Source/WWVegas/WWLib/base64.h @@ -30,8 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/bfiofile.cpp b/Core/Libraries/Source/WWVegas/WWLib/bfiofile.cpp index 78728093acc..27ecd5788b5 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/bfiofile.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/bfiofile.cpp @@ -30,24 +30,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * BufferIOFileClass::BufferIOFileClass -- Filename based constructor for a file object. * - * BufferIOFileClass::BufferIOFileClass -- default constructor for a file object. * - * BufferIOFileClass::Cache -- Load part or all of a file data into RAM. * - * BufferIOFileClass::Close -- Perform a closure of the file. * - * BufferIOFileClass::Commit -- Writes the cache to the file if it has changed. * - * BufferIOFileClass::Free -- Frees the allocated buffer. * - * BufferIOFileClass::Is_Available -- Checks for existence of file cached or on disk. * - * BufferIOFileClass::Is_Open -- Determines if the file is open. * - * BufferIOFileClass::Open -- Assigns name and opens file in one operation. * - * BufferIOFileClass::Open -- Opens the file object with the rights specified. * - * BufferIOFileClass::Read -- Reads data from the file cache. * - * BufferIOFileClass::Seek -- Moves the current file pointer in the file. * - * BufferIOFileClass::Set_Name -- Checks for name changed for a cached file. * - * BufferIOFileClass::Size -- Determines size of file (in bytes). * - * BufferIOFileClass::Write -- Writes data to the file cache. * - * BufferIOFileClass::~BufferIOFileClass -- Destructor for the file object. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "always.h" @@ -55,23 +37,9 @@ #include -/*********************************************************************************************** - * BufferIOFileClass::BufferIOFileClass -- Filename based constructor for a file object. * - * * - * This constructor is called when a file object is created with a supplied filename, but * - * not opened at the same time. In this case, an assumption is made that the supplied * - * filename is a constant string. A duplicate of the filename string is not created since * - * it would be wasteful in that case. * - * * - * INPUT: filename -- The filename to assign to this file object. * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/10/1995 DRD : Created. * - *=============================================================================================*/ +// Filename based constructor for a file object. The file is not opened. An assumption is made that +// the supplied filename is a constant string. A duplicate of the filename string is not created +// since it would be wasteful in that case. BufferIOFileClass::BufferIOFileClass(char const * filename) : IsAllocated(false), IsOpen(false), @@ -94,20 +62,6 @@ BufferIOFileClass::BufferIOFileClass(char const * filename) : } -/*********************************************************************************************** - * BufferIOFileClass::BufferIOFileClass -- default constructor for a file object. * - * * - * This is the default constructor for a file object. * - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/10/1995 DRD : Created. * - *=============================================================================================*/ BufferIOFileClass::BufferIOFileClass() : IsAllocated(false), IsOpen(false), @@ -129,39 +83,16 @@ BufferIOFileClass::BufferIOFileClass() : } -/*********************************************************************************************** - * BufferIOFileClass::~BufferIOFileClass -- Destructor for the file object. * - * * - * This destructor will free all memory allocated thru using Cache routines. * - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/10/1995 DRD : Created. * - *=============================================================================================*/ +// Frees all memory allocated thru using Cache routines. BufferIOFileClass::~BufferIOFileClass() { Free(); } -/*********************************************************************************************** - * BufferIOFileClass::Cache -- Load part or all of a file data into RAM. * - * * - * INPUT: none * - * * - * OUTPUT: bool; Was the file load successful? It could fail if there wasn't enough room * - * to allocate the raw data block. * - * * - * WARNINGS: This routine goes to disk for a potentially very long time. * - * * - * HISTORY: * - * 11/10/1995 DRD : Created. * - *=============================================================================================*/ +// Load part or all of a file data into RAM. It could fail if there wasn't enough room to allocate the +// raw data block. +// WARNING: This routine goes to disk for a potentially very long time. bool BufferIOFileClass::Cache( long size, void * ptr ) { if (Buffer) { @@ -310,21 +241,8 @@ bool BufferIOFileClass::Cache( long size, void * ptr ) } -/*********************************************************************************************** - * BufferIOFileClass::Free -- Frees the allocated buffer. * - * * - * This routine will free the buffer. By using this in conjunction with the * - * Cache() function, one can maintain tight control of memory usage. * - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/10/1995 DRD : Created. * - *=============================================================================================*/ +// By using this in conjunction with the Cache() function, one can maintain tight control of memory +// usage. void BufferIOFileClass::Free() { if (Buffer) { @@ -344,20 +262,7 @@ void BufferIOFileClass::Free() } -/*********************************************************************************************** - * BufferIOFileClass::Commit -- Writes the cache to the file if it has changed. * - * * - * * - * INPUT: none * - * * - * OUTPUT: false, did not need to write the buffer. * - * true, wrote the buffer. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/15/1995 DRD : Created. * - *=============================================================================================*/ +// Writes the cache to the file if it has changed. bool BufferIOFileClass::Commit() { long size; @@ -389,24 +294,9 @@ bool BufferIOFileClass::Commit() } -/*********************************************************************************************** - * BufferIOFileClass::Set_Name -- Checks for name changed for a cached file. * - * * - * Checks for a previous filename and that it is cached. If so, then check the * - * new filename against the old. If they are the same then return that filename. * - * Otherwise, the file object's name is set with just the raw filename as passed * - * to this routine. * - * * - * INPUT: filename -- Pointer to the filename to set as the name of this file object. * - * * - * OUTPUT: Returns a pointer to the final and complete filename of this file object. This * - * may have a path attached to the file. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/15/1995 DRD : Created. * - *=============================================================================================*/ +// Checks for a previous filename and that it is cached. If so, then check the new filename against +// the old. If they are the same then return that filename. Otherwise, the file object's name is set +// with just the raw filename as passed to this routine. char const * BufferIOFileClass::Set_Name(char const * filename) { if (File_Name() && UseBuffer) { @@ -423,19 +313,7 @@ char const * BufferIOFileClass::Set_Name(char const * filename) } -/*********************************************************************************************** - * BufferIOFileClass::Is_Available -- Checks for existence of file cached or on disk. * - * * - * * - * INPUT: none * - * * - * OUTPUT: bool; Is the file available for opening? * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/16/1995 DRD : Created. * - *=============================================================================================*/ +// Checks for existence of file cached or on disk. bool BufferIOFileClass::Is_Available(int ) { if (UseBuffer) { @@ -446,21 +324,7 @@ bool BufferIOFileClass::Is_Available(int ) } -/*********************************************************************************************** - * BufferIOFileClass::Is_Open -- Determines if the file is open. * - * * - * If part or all of the file is cached, then return that it is opened. A closed file * - * doesn't have a valid pointer. * - * * - * INPUT: none * - * * - * OUTPUT: bool; Is the file open? * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/14/1995 DRD : Created. * - *=============================================================================================*/ +// If part or all of the file is cached, then return that it is opened. bool BufferIOFileClass::Is_Open() const { if (IsOpen && UseBuffer) { @@ -471,27 +335,9 @@ bool BufferIOFileClass::Is_Open() const } -/*********************************************************************************************** - * BufferIOFileClass::Open -- Assigns name and opens file in one operation. * - * * - * This routine will assign the specified filename to the file object and open it at the * - * same time. If the file object was already open, then it will be closed first. If the * - * file object was previously assigned a filename, then it will be replaced with the new * - * name. Typically, this routine is used when an anonymous file object has been crated and * - * now it needs to be assigned a name and opened. * - * * - * INPUT: filename -- The filename to assign to this file object. * - * * - * rights -- The open file access rights to use. * - * * - * OUTPUT: bool; Was the file opened? The return value of this is moot, since the open file * - * is designed to never return unless it succeeded. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/14/1995 DRD : Created. * - *=============================================================================================*/ +// Assigns name and opens file in one operation. If the file object was already open, then it will +// be closed first. If the file object was previously assigned a filename, then it will be replaced +// with the new name. The open is designed to never return unless it succeeded. int BufferIOFileClass::Open(char const * filename, int rights) { Set_Name(filename); @@ -499,24 +345,9 @@ int BufferIOFileClass::Open(char const * filename, int rights) } -/*********************************************************************************************** - * BufferIOFileClass::Open -- Opens the file object with the rights specified. * - * * - * This routine is used to open the specified file object with the access rights indicated. * - * This only works if the file has already been assigned a filename. It is guaranteed, by * - * the error handler, that this routine will always return with success. * - * * - * INPUT: rights -- The file access rights to use when opening this file. This is a * - * combination of READ and/or WRITE bit flags. * - * * - * OUTPUT: bool; Was the file opened successfully? This will always return true by reason of * - * the error handler. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/14/1995 DRD : Created. * - *=============================================================================================*/ +// Opens the file object with the rights specified. This only works if the file has already been +// assigned a filename. It is guaranteed, by the error handler, that this routine will always return +// with success. int BufferIOFileClass::Open(int rights) { BufferIOFileClass::Close(); @@ -567,21 +398,7 @@ int BufferIOFileClass::Open(int rights) } -/*********************************************************************************************** - * BufferIOFileClass::Write -- Writes data to the file cache. * - * * - * * - * INPUT: buffer -- Pointer to the buffer that holds the data to be written. * - * * - * size -- The number of bytes to write. * - * * - * OUTPUT: Returns the number of bytes actually written. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/15/1995 DRD : Created. * - *=============================================================================================*/ +// Writes data to the file cache. int BufferIOFileClass::Write(void const * buffer, int size) { int opened = false; @@ -710,21 +527,7 @@ int BufferIOFileClass::Write(void const * buffer, int size) } -/*********************************************************************************************** - * BufferIOFileClass::Read -- Reads data from the file cache. * - * * - * * - * INPUT: buffer -- Pointer to the buffer to place the read data. * - * * - * size -- The number of bytes to read. * - * * - * OUTPUT: Returns the actual number of bytes read (this could be less than requested). * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/15/1995 DRD : Created. * - *=============================================================================================*/ +// Reads data from the file cache. int BufferIOFileClass::Read(void * buffer, int size) { int opened = false; @@ -829,26 +632,8 @@ int BufferIOFileClass::Read(void * buffer, int size) } -/*********************************************************************************************** - * BufferIOFileClass::Seek -- Moves the current file pointer in the file. * - * * - * This routine will change the current file pointer to the position specified. It follows * - * the same rules the a normal Seek() does, but if the file is part of the mixfile system, * - * then only the position value needs to be updated. * - * * - * INPUT: pos -- The position to move the file to relative to the position indicated * - * by the "dir" parameter. * - * * - * dir -- The direction to affect the position change against. This can be * - * either SEEK_CUR, SEEK_END, or SEEK_SET. * - * * - * OUTPUT: Returns with the position of the new location. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/15/1995 DRD : Created. * - *=============================================================================================*/ +// Moves the current file pointer in the file. It follows the same rules as a normal Seek() does, +// but if the file is part of the mixfile system, then only the position value needs to be updated. int BufferIOFileClass::Seek(int pos, int dir) { if (UseBuffer) { @@ -917,22 +702,8 @@ int BufferIOFileClass::Seek(int pos, int dir) } -/*********************************************************************************************** - * BufferIOFileClass::Size -- Determines size of file (in bytes). * - * * - * If part or all of the file is cached, then the size of the file is already * - * determined and available. Otherwise, go to the low level system to find the file * - * size. * - * * - * INPUT: none * - * * - * OUTPUT: Returns with the number of bytes in the file. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/14/1995 DRD : Created. * - *=============================================================================================*/ +// If part or all of the file is cached, then the size of the file is already determined and +// available. Otherwise, go to the low level system to find the file size. int BufferIOFileClass::Size() { if (IsOpen && UseBuffer) { @@ -943,21 +714,8 @@ int BufferIOFileClass::Size() } -/*********************************************************************************************** - * BufferIOFileClass::Close -- Perform a closure of the file. * - * * - * Call Commit() to write the buffer if the file is cached and the buffer has changed, * - * then call lower level Close(). * - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/14/1995 DRD : Created. * - *=============================================================================================*/ +// Calls Commit() to write the buffer if the file is cached and the buffer has changed, then calls +// lower level Close(). void BufferIOFileClass::Close() { if (UseBuffer) { diff --git a/Core/Libraries/Source/WWVegas/WWLib/bfiofile.h b/Core/Libraries/Source/WWVegas/WWLib/bfiofile.h index ee7bdbf9169..2ee535cc406 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/bfiofile.h +++ b/Core/Libraries/Source/WWVegas/WWLib/bfiofile.h @@ -30,8 +30,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/binheap.h b/Core/Libraries/Source/WWVegas/WWLib/binheap.h index cd61c154785..b8871d1335a 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/binheap.h +++ b/Core/Libraries/Source/WWVegas/WWLib/binheap.h @@ -30,8 +30,6 @@ * * * Last update : 6/25/99 * * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/bittype.h b/Core/Libraries/Source/WWVegas/WWLib/bittype.h index d5d0cf43dba..6f2ec7d0ee6 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/bittype.h +++ b/Core/Libraries/Source/WWVegas/WWLib/bittype.h @@ -31,8 +31,6 @@ * * * Last Update : February 24, 1997 [GH] * * * - *-------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/bound.h b/Core/Libraries/Source/WWVegas/WWLib/bound.h index 8019b29f9ee..e82a0a78b40 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/bound.h +++ b/Core/Libraries/Source/WWVegas/WWLib/bound.h @@ -30,8 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/buff.cpp b/Core/Libraries/Source/WWVegas/WWLib/buff.cpp index 025b6622a10..1c402aba961 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/buff.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/buff.cpp @@ -30,14 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * Buffer::Buffer -- Constructor for buffer object. * - * Buffer::Buffer -- Copy constructor for buffer object. * - * Buffer::Buffer -- Self-allocating constructor for buffer object. * - * Buffer::Reset -- Clears the buffer object to null state. * - * Buffer::operator = -- Assignment operator for the buffer object. * - * Buffer::~Buffer -- Destructor for buffer object. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "always.h" @@ -45,25 +37,9 @@ //#include -/*********************************************************************************************** - * Buffer::Buffer -- Constructor for buffer object. * - * * - * This is the normal constructor for a buffer object. The buffer pointer and size are * - * specified as parameters. * - * * - * INPUT: buffer -- Pointer to the buffer. * - * * - * size -- The size of the buffer. * - * * - * OUTPUT: none * - * * - * WARNINGS: It is possible to construct a Buffer object that has a pointer but a size * - * value of zero. The Buffer object can still be used for its pointer, but it * - * any function that requires a size will fail. * - * * - * HISTORY: * - * 07/29/1996 JLB : Created. * - *=============================================================================================*/ +// WARNING: It is possible to construct a Buffer object that has a pointer but a size value of zero. +// The Buffer object can still be used for its pointer, but any function that requires a size will +// fail. Buffer::Buffer(void * buffer, long size) : BufferPtr(buffer), Size(size), @@ -102,23 +78,10 @@ Buffer::Buffer(void const * buffer, long size) : } -/*********************************************************************************************** - * Buffer::Buffer -- Self-allocating constructor for buffer object. * - * * - * This construtor for a buffer object will automatically allocate the bytes necessary * - * to fulfill the size requested. This object is also responsible for deleting the buffer * - * it allocated. * - * * - * INPUT: size -- The size of the buffer to allocated. * - * * - * OUTPUT: none * - * * - * WARNINGS: There is no way to tell if the allocation failed. To verify, call Get_Buffer * - * and compare with nullptr. * - * * - * HISTORY: * - * 07/29/1996 JLB : Created. * - *=============================================================================================*/ +// Self-allocating constructor for buffer object. This object is responsible for deleting the buffer +// it allocated. +// WARNING: There is no way to tell if the allocation failed. To verify, call Get_Buffer and compare +// with nullptr. Buffer::Buffer(long size) : BufferPtr(nullptr), Size(size), @@ -131,21 +94,8 @@ Buffer::Buffer(long size) : } -/*********************************************************************************************** - * Buffer::Buffer -- Copy constructor for buffer object. * - * * - * This will make a duplicate of the specified buffer object. The ownership of the pointer * - * remains with the original object. This prevents multiple deletion of the same pointer. * - * * - * INPUT: buffer -- Reference to the buffer object to be dupilcated. * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 08/02/1996 JLB : Created. * - *=============================================================================================*/ +// The ownership of the pointer remains with the original object. This prevents multiple deletion of +// the same pointer. Buffer::Buffer(Buffer const & buffer) : IsAllocated(false) { @@ -154,21 +104,7 @@ Buffer::Buffer(Buffer const & buffer) : } -/*********************************************************************************************** - * Buffer::operator = -- Assignment operator for the buffer object. * - * * - * This will make a duplicate of the buffer object specified. Any buffer pointed to by the * - * left hand buffer will be lost (possibley freed as a result). * - * * - * INPUT: buffer -- Reference to the right hand buffer object. * - * * - * OUTPUT: Returns with a reference to the copied buffer object. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 08/02/1996 JLB : Created. * - *=============================================================================================*/ +// Any buffer pointed to by the left hand buffer will be lost (possibly freed as a result). Buffer & Buffer::operator = (Buffer const & buffer) { if (&buffer != this) { @@ -183,43 +119,15 @@ Buffer & Buffer::operator = (Buffer const & buffer) } -/*********************************************************************************************** - * Buffer::~Buffer -- Destructor for buffer object. * - * * - * This destructor will free any buffer it is responsible for. * - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/29/1996 JLB : Created. * - *=============================================================================================*/ +// Frees any buffer it is responsible for. Buffer::~Buffer() { Reset(); } -/*********************************************************************************************** - * Buffer::Reset -- Clears the buffer object to null state. * - * * - * This routine will bring the buffer object into a null (newly constructed) state. If * - * there was any buffer allocated or referred to by this object, it will be freed or * - * dereferenced as necessary. * - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: This routine will free the buffer if it is responsible for doing so when * - * it is no longer referenced. * - * * - * HISTORY: * - * 09/07/1996 JLB : Created. * - *=============================================================================================*/ +// Clears the buffer object to null (newly constructed) state. If there was any buffer allocated or +// referred to by this object, it will be freed or dereferenced as necessary. void Buffer::Reset() { if (IsAllocated) { diff --git a/Core/Libraries/Source/WWVegas/WWLib/bufffile.cpp b/Core/Libraries/Source/WWVegas/WWLib/bufffile.cpp index d4128f6ecd6..78abc721afe 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/bufffile.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/bufffile.cpp @@ -40,9 +40,6 @@ int BufferedFileClass::_DesiredBufferSize = 1024*16; -/*********************************************************************************************** - * BufferedFileClass::BufferedFileClass -- Default constructor for a file object. * - *=============================================================================================*/ BufferedFileClass::BufferedFileClass() : RawFileClass(), Buffer( nullptr ), @@ -52,9 +49,6 @@ BufferedFileClass::BufferedFileClass() : { } -/*********************************************************************************************** - * BufferedFileClass::BufferedFileClass -- Simple constructor for a file object. * - *=============================================================================================*/ BufferedFileClass::BufferedFileClass(char const * filename) : RawFileClass( filename ), Buffer( nullptr ), @@ -64,17 +58,11 @@ BufferedFileClass::BufferedFileClass(char const * filename) : { } -/*********************************************************************************************** - * BufferedFileClass::~BufferedFileClass -- Default deconstructor for a file object. * - *=============================================================================================*/ BufferedFileClass::~BufferedFileClass() { Reset_Buffer(); } -/*********************************************************************************************** - * BufferedFileClass::Close -- Perform a closure of the file. * - *=============================================================================================*/ void BufferedFileClass::Close() { BASECLASS::Close(); @@ -83,28 +71,10 @@ void BufferedFileClass::Close() } -/*********************************************************************************************** - * BufferedFileClass::Read -- Reads the specified number of bytes into a memory buffer. * - * * - * This routine will read the specified number of bytes and place the data into the buffer * - * indicated. It is legal to call this routine with a request for more bytes than are in * - * the file. This condition can result in fewer bytes being read than requested. Determine * - * this by examining the return value. * - * * - * INPUT: buffer -- Pointer to the buffer to read data into. If nullptr is passed, no read * - * is performed. * - * * - * size -- The number of bytes to read. If nullptr is passed, then no read is * - * performed. * - * * - * OUTPUT: Returns with the number of bytes read into the buffer. If this number is less * - * than requested, it indicates that the file has been exhausted. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 10/18/1994 JLB : Created. * - *=============================================================================================*/ +// Reads the specified number of bytes into a memory buffer. If buffer or size is null, no read is +// performed. It is legal to call this routine with a request for more bytes than are in the file. +// This condition can result in fewer bytes being read than requested. Determine this by examining +// the return value. int BufferedFileClass::Read(void * buffer, int size) { int read = 0; @@ -167,24 +137,9 @@ int BufferedFileClass::Read(void * buffer, int size) } -/*********************************************************************************************** - * BufferedFileClass::Write -- Writes the specified data to the buffer specified. * - * * - * This routine will write the data specified to the file. * - * * - * INPUT: buffer -- The buffer that holds the data to write. * - * * - * size -- The number of bytes to write to the file. * - * * - * OUTPUT: Returns with the number of bytes written to the file. This routine catches the * - * case of a disk full condition, so this routine will always return with the number * - * matching the size request. * - * * - * WARNINGS: A fatal file condition could cause this routine to never return. * - * * - * HISTORY: * - * 10/18/1994 JLB : Created. * - *=============================================================================================*/ +// Writes the specified data to the file. A disk full condition is caught, so this routine will +// always return with the number matching the size request. +// WARNING: A fatal file condition could cause this routine to never return. int BufferedFileClass::Write(void const * buffer, int size) { if ( BufferSize != 0 ) { @@ -195,27 +150,10 @@ int BufferedFileClass::Write(void const * buffer, int size) } -/*********************************************************************************************** - * BufferedFileClass::Seek -- Reposition the file pointer as indicated. * - * * - * Use this routine to move the filepointer to the position indicated. It can move either * - * relative to current position or absolute from the beginning or ending of the file. This * - * routine will only return if it successfully performed the seek. * - * * - * INPUT: pos -- The position to seek to. This is interpreted as relative to the position * - * indicated by the "dir" parameter. * - * * - * dir -- The relative position to relate the seek to. This can be either SEEK_SET * - * for the beginning of the file, SEEK_CUR for the current position, or * - * SEEK_END for the end of the file. * - * * - * OUTPUT: This routine returns the position that the seek ended up at. * - * * - * WARNINGS: If there was a file error, then this routine might never return. * - * * - * HISTORY: * - * 10/18/1994 JLB : Created. * - *=============================================================================================*/ +// Reposition the file pointer as indicated. It can move either relative to current position or +// absolute from the beginning or ending of the file. This routine will only return if it +// successfully performed the seek. +// WARNING: If there was a file error, then this routine might never return. int BufferedFileClass::Seek(int pos, int dir) { if ( (dir != SEEK_CUR) || (pos < 0) ) { diff --git a/Core/Libraries/Source/WWVegas/WWLib/bufffile.h b/Core/Libraries/Source/WWVegas/WWLib/bufffile.h index db1a41ba19d..645f5a4c32c 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/bufffile.h +++ b/Core/Libraries/Source/WWVegas/WWLib/bufffile.h @@ -30,12 +30,6 @@ * * * $Revision:: 3 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * RawFileClass::File_Name -- Returns with the filename associate with the file object. * - * RawFileClass::RawFileClass -- Default constructor for a file object. * - * RawFileClass::~RawFileClass -- Default deconstructor for a file object. * - * RawFileClass::Is_Open -- Checks to see if the file is open or not. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/chunkio.cpp b/Core/Libraries/Source/WWVegas/WWLib/chunkio.cpp index aca7540c0de..a5dcb0dff61 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/chunkio.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/chunkio.cpp @@ -31,54 +31,12 @@ * * * $Revision:: 11 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * ChunkSaveClass::ChunkSaveClass -- Constructor * - * ChunkSaveClass::Begin_Chunk -- Begin a new chunk in the file * - * ChunkSaveClass::End_Chunk -- Close a chunk, computes the size and adds to the header * - * ChunkSaveClass::Begin_Micro_Chunk -- begins a new "micro-chunk" * - * ChunkSaveClass::End_Micro_Chunk -- close a micro-chunk * - * ChunkSaveClass::Write -- Write data into the current chunk * - * ChunkSaveClass::Write -- write an IOVector2Struct * - * ChunkSaveClass::Write -- write an IOVector3Struct * - * ChunkSaveClass::Write -- write an IOVector4Struct * - * ChunkSaveClass::Write -- write an IOQuaternionStruct * - * ChunkSaveClass::Cur_Chunk_Depth -- returns the current chunk recursion depth (debugging) * - * ChunkLoadClass::ChunkLoadClass -- Constructor * - * ChunkLoadClass::Open_Chunk -- Open a chunk in the file, reads in the chunk header * - * ChunkLoadClass::Close_Chunk -- Close a chunk, seeks to the end if needed * - * ChunkLoadClass::Cur_Chunk_ID -- Returns the ID of the current chunk * - * ChunkLoadClass::Cur_Chunk_Length -- Returns the current length of the current chunk * - * ChunkLoadClass::Cur_Chunk_Depth -- returns the current chunk recursion depth * - * ChunkLoadClass::Contains_Chunks -- Test whether the current chunk contains chunks (or dat * - * ChunkLoadClass::Open_Micro_Chunk -- reads in a micro-chunk header * - * ChunkLoadClass::Close_Micro_Chunk -- closes a micro-chunk * - * ChunkLoadClass::Cur_Micro_Chunk_ID -- returns the ID of the current micro-chunk (asserts * - * ChunkLoadClass::Cur_Micro_Chunk_Length -- returns the size of the current micro chunk * - * ChunkLoadClass::Read -- Read data from the file * - * ChunkLoadClass::Read -- read an IOVector2Struct * - * ChunkLoadClass::Read -- read an IOVector3Struct * - * ChunkLoadClass::Read -- read an IOVector4Struct * - * ChunkLoadClass::Read -- read an IOQuaternionStruct * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "chunkio.h" #include -/*********************************************************************************************** - * ChunkSaveClass::ChunkSaveClass -- Constructor * - * * - * INPUT: * - * file - pointer to a FileClass object to write to * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 07/17/1997 GH : Created. * - *=============================================================================================*/ ChunkSaveClass::ChunkSaveClass(FileClass * file) : File(file), StackIndex(0), @@ -91,19 +49,6 @@ ChunkSaveClass::ChunkSaveClass(FileClass * file) : } -/*********************************************************************************************** - * ChunkSaveClass::Begin_Chunk -- Begin a new chunk in the file * - * * - * INPUT: * - * id - id of the chunk * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 07/17/1997 GH : Created. * - *=============================================================================================*/ bool ChunkSaveClass::Begin_Chunk(uint32 id) { ChunkHeader chunkh; @@ -132,18 +77,7 @@ bool ChunkSaveClass::Begin_Chunk(uint32 id) } -/*********************************************************************************************** - * ChunkSaveClass::End_Chunk -- Close a chunk, computes the size and adds to the header * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 07/17/1997 GH : Created. * - *=============================================================================================*/ +// Close a chunk, computes the size and adds to the header. bool ChunkSaveClass::End_Chunk() { // If the user didn't close his micro chunks bad things are gonna happen @@ -175,24 +109,9 @@ bool ChunkSaveClass::End_Chunk() } -/*********************************************************************************************** - * ChunkSaveClass::Begin_Micro_Chunk -- begins a new "micro-chunk" * - * * - * Micro chunks are used to wrap individual variables. They aren't hierarchical so if you * - * attempt to open a micro chunk while already in one, an assert will occur. * - * * - * INPUT: * - * id - 8bit id * - * * - * OUTPUT: * - * * - * WARNINGS: * - * id is asserted to be between 0 and 255 * - * cannot nest micro chunks so it asserts that you are currently not in another micro-chunk * - * * - * HISTORY: * - * 9/3/99 GTH : Created. * - *=============================================================================================*/ +// Micro chunks are used to wrap individual variables. They aren't hierarchical so if you attempt to +// open a micro chunk while already in one, an assert will occur. +// WARNING: Id is asserted to be between 0 and 255. bool ChunkSaveClass::Begin_Micro_Chunk(uint32 id) { assert(id < 256); @@ -217,18 +136,6 @@ bool ChunkSaveClass::Begin_Micro_Chunk(uint32 id) } -/*********************************************************************************************** - * ChunkSaveClass::End_Micro_Chunk -- close a micro-chunk * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 9/3/99 GTH : Created. * - *=============================================================================================*/ bool ChunkSaveClass::End_Micro_Chunk() { assert(InMicroChunk); @@ -248,18 +155,6 @@ bool ChunkSaveClass::End_Micro_Chunk() return true; } -/*********************************************************************************************** - * ChunkSaveClass::Write -- Write data into the current chunk * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 07/17/1997 GH : Created. * - *=============================================================================================*/ uint32 ChunkSaveClass::Write(const void * buf, uint32 nbytes) { // If this assert hits, you mixed data and chunks within the same chunk NO NO! @@ -284,106 +179,35 @@ uint32 ChunkSaveClass::Write(const void * buf, uint32 nbytes) } -/*********************************************************************************************** - * ChunkSaveClass::Write -- write an IOVector2Struct * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/4/99 GTH : Created. * - *=============================================================================================*/ uint32 ChunkSaveClass::Write(const IOVector2Struct & v) { return Write(&v,sizeof(v)); } -/*********************************************************************************************** - * ChunkSaveClass::Write -- write an IOVector3Struct * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/4/99 GTH : Created. * - *=============================================================================================*/ uint32 ChunkSaveClass::Write(const IOVector3Struct & v) { return Write(&v,sizeof(v)); } -/*********************************************************************************************** - * ChunkSaveClass::Write -- write an IOVector4Struct * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/4/99 GTH : Created. * - *=============================================================================================*/ uint32 ChunkSaveClass::Write(const IOVector4Struct & v) { return Write(&v,sizeof(v)); } -/*********************************************************************************************** - * ChunkSaveClass::Write -- write an IOQuaternionStruct * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/4/99 GTH : Created. * - *=============================================================================================*/ uint32 ChunkSaveClass::Write(const IOQuaternionStruct & q) { return Write(&q,sizeof(q)); } -/*********************************************************************************************** - * ChunkSaveClass::Cur_Chunk_Depth -- returns the current chunk recursion depth (debugging) * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 07/17/1997 GH : Created. * - *=============================================================================================*/ +// Returns the current chunk recursion depth (debugging). int ChunkSaveClass::Cur_Chunk_Depth() { return StackIndex; } -/*********************************************************************************************** - * ChunkLoadClass::ChunkLoadClass -- Constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 07/17/1997 GH : Created. * - *=============================================================================================*/ ChunkLoadClass::ChunkLoadClass(FileClass * file) : File(file), StackIndex(0), @@ -396,18 +220,7 @@ ChunkLoadClass::ChunkLoadClass(FileClass * file) : } -/*********************************************************************************************** - * ChunkLoadClass::Open_Chunk -- Open a chunk in the file, reads in the chunk header * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 07/17/1997 GH : Created. * - *=============================================================================================*/ +// Open a chunk in the file, reads in the chunk header. bool ChunkLoadClass::Open_Chunk() { // if user didn't close any micro chunks that he opened, bad things could happen @@ -432,18 +245,7 @@ bool ChunkLoadClass::Open_Chunk() } -/*********************************************************************************************** - * ChunkLoadClass::Close_Chunk -- Close a chunk, seeks to the end if needed * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 07/17/1997 GH : Created. * - *=============================================================================================*/ +// Close a chunk, seeks to the end if needed. bool ChunkLoadClass::Close_Chunk() { // if user didn't close any micro chunks that he opened, bad things could happen @@ -468,18 +270,6 @@ bool ChunkLoadClass::Close_Chunk() } -/*********************************************************************************************** - * ChunkLoadClass::Cur_Chunk_ID -- Returns the ID of the current chunk * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 07/17/1997 GH : Created. * - *=============================================================================================*/ uint32 ChunkLoadClass::Cur_Chunk_ID() { assert(StackIndex >= 1); @@ -487,18 +277,6 @@ uint32 ChunkLoadClass::Cur_Chunk_ID() } -/*********************************************************************************************** - * ChunkLoadClass::Cur_Chunk_Length -- Returns the current length of the current chunk * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 07/17/1997 GH : Created. * - *=============================================================================================*/ uint32 ChunkLoadClass::Cur_Chunk_Length() { assert(StackIndex >= 1); @@ -506,53 +284,19 @@ uint32 ChunkLoadClass::Cur_Chunk_Length() } -/*********************************************************************************************** - * ChunkLoadClass::Cur_Chunk_Depth -- returns the current chunk recursion depth * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 07/17/1997 GH : Created. * - *=============================================================================================*/ int ChunkLoadClass::Cur_Chunk_Depth() { return StackIndex; } -/*********************************************************************************************** - * ChunkLoadClass::Contains_Chunks -- Test whether the current chunk contains chunks (or data) * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 9/24/99 GTH : Created. * - *=============================================================================================*/ +// Test whether the current chunk contains chunks (or data). int ChunkLoadClass::Contains_Chunks() { return HeaderStack[StackIndex-1].Get_Sub_Chunk_Flag(); } -/*********************************************************************************************** - * ChunkLoadClass::Open_Micro_Chunk -- reads in a micro-chunk header * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 9/3/99 GTH : Created. * - *=============================================================================================*/ +// Reads in a micro-chunk header. bool ChunkLoadClass::Open_Micro_Chunk() { assert(!InMicroChunk); @@ -569,18 +313,7 @@ bool ChunkLoadClass::Open_Micro_Chunk() } -/*********************************************************************************************** - * ChunkLoadClass::Close_Micro_Chunk -- closes a micro-chunk (seeks to end) * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 9/3/99 GTH : Created. * - *=============================================================================================*/ +// Closes a micro-chunk (seeks to end). bool ChunkLoadClass::Close_Micro_Chunk() { assert(InMicroChunk); @@ -604,20 +337,8 @@ bool ChunkLoadClass::Close_Micro_Chunk() } -/*********************************************************************************************** - * ChunkLoadClass::Cur_Micro_Chunk_ID -- returns the ID of the current micro-chunk (asserts if * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * Asserts if you are not currently inside a micro-chunk * - * Micro chunks have an id between 0 and 255 * - * * - * HISTORY: * - * 9/3/99 GTH : Created. * - *=============================================================================================*/ +// Micro chunks have an id between 0 and 255. +// WARNING: Asserts if you are not currently inside a micro-chunk. uint32 ChunkLoadClass::Cur_Micro_Chunk_ID() { assert(InMicroChunk); @@ -625,20 +346,8 @@ uint32 ChunkLoadClass::Cur_Micro_Chunk_ID() } -/*********************************************************************************************** - * ChunkLoadClass::Cur_Micro_Chunk_Length -- returns the size of the current micro chunk * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * Asserts if you are not currently inside a micro-chunk * - * Micro chunks have a maximum size of 255 bytes * - * * - * HISTORY: * - * 9/3/99 GTH : Created. * - *=============================================================================================*/ +// Micro chunks have a maximum size of 255 bytes. +// WARNING: Asserts if you are not currently inside a micro-chunk. uint32 ChunkLoadClass::Cur_Micro_Chunk_Length() { assert(InMicroChunk); @@ -676,18 +385,6 @@ uint32 ChunkLoadClass::Seek(uint32 nbytes) return nbytes; } -/*********************************************************************************************** - * ChunkLoadClass::Read -- Read data from the file * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 07/17/1997 GH : Created. * - *=============================================================================================*/ uint32 ChunkLoadClass::Read(void * buf,uint32 nbytes) { assert(StackIndex >= 1); @@ -718,18 +415,6 @@ uint32 ChunkLoadClass::Read(void * buf,uint32 nbytes) } -/*********************************************************************************************** - * ChunkLoadClass::Read -- read an IOVector2Struct * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/4/99 GTH : Created. * - *=============================================================================================*/ uint32 ChunkLoadClass::Read(IOVector2Struct * v) { assert(v != nullptr); @@ -737,18 +422,6 @@ uint32 ChunkLoadClass::Read(IOVector2Struct * v) } -/*********************************************************************************************** - * ChunkLoadClass::Read -- read an IOVector3Struct * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/4/99 GTH : Created. * - *=============================================================================================*/ uint32 ChunkLoadClass::Read(IOVector3Struct * v) { assert(v != nullptr); @@ -756,18 +429,6 @@ uint32 ChunkLoadClass::Read(IOVector3Struct * v) } -/*********************************************************************************************** - * ChunkLoadClass::Read -- read an IOVector4Struct * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/4/99 GTH : Created. * - *=============================================================================================*/ uint32 ChunkLoadClass::Read(IOVector4Struct * v) { assert(v != nullptr); @@ -775,18 +436,6 @@ uint32 ChunkLoadClass::Read(IOVector4Struct * v) } -/*********************************************************************************************** - * ChunkLoadClass::Read -- read an IOQuaternionStruct * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/4/99 GTH : Created. * - *=============================================================================================*/ uint32 ChunkLoadClass::Read(IOQuaternionStruct * q) { assert(q != nullptr); diff --git a/Core/Libraries/Source/WWVegas/WWLib/chunkio.h b/Core/Libraries/Source/WWVegas/WWLib/chunkio.h index abd0729e475..fc603d078c9 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/chunkio.h +++ b/Core/Libraries/Source/WWVegas/WWLib/chunkio.h @@ -31,8 +31,6 @@ * * * $Revision:: 22 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/cpudetect.h b/Core/Libraries/Source/WWVegas/WWLib/cpudetect.h index 4cba11de117..288e67e0c25 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/cpudetect.h +++ b/Core/Libraries/Source/WWVegas/WWLib/cpudetect.h @@ -32,8 +32,6 @@ * * * $Revision:: 11 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/crandom.h b/Core/Libraries/Source/WWVegas/WWLib/crandom.h index 1b56babf281..7802cb3e1b1 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/crandom.h +++ b/Core/Libraries/Source/WWVegas/WWLib/crandom.h @@ -30,8 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/crc.cpp b/Core/Libraries/Source/WWVegas/WWLib/crc.cpp index 8577f284d01..4c5f33721fc 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/crc.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/crc.cpp @@ -30,34 +30,17 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * CRCEngine::operator() -- Submits one byte of data to the CRC engine. * - * CRCEngine::operator() -- Submits an arbitrary data block to the CRC engine. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "always.h" #include "CRC.h" -/*********************************************************************************************** - * CRCEngine::operator() -- Submits one byte of data to the CRC engine. * - * * - * This routine will take the specified byte of data and submit it to the CRC engine * - * for processing. This routine is designed to be as fast as possible since the typical * - * use of this routine is to feed one of presumably many byte sized chunks of data to the * - * CRC engine. * - * * - * INPUT: datum -- One byte of data to submit to the CRC engine. * - * * - * OUTPUT: none * - * * - * WARNINGS: If possible, use the buffer/size operator to submit data rather than repeated * - * calls to this routine. * - * * - * HISTORY: * - * 03/02/1996 JLB : Created. * - *=============================================================================================*/ +// Submits one byte of data to the CRC engine. This routine is designed to be as fast as possible +// since the typical use of this routine is to feed one of presumably many byte sized chunks of data +// to the CRC engine. +// WARNING: If possible, use the buffer/size operator to submit data rather than repeated calls to +// this routine. void CRCEngine::operator() (char datum) { StagingBuffer.Buffer[Index++] = datum; @@ -70,24 +53,7 @@ void CRCEngine::operator() (char datum) } -/*********************************************************************************************** - * CRCEngine::operator() -- Submits an arbitrary data block to the CRC engine. * - * * - * This routine will submit the specified block to the CRC engine. The block can be of * - * arbitrary length. * - * * - * INPUT: buffer -- Pointer to the buffer that contains the data. The buffer will not * - * be modified. * - * * - * length -- The length of the buffer (in bytes). * - * * - * OUTPUT: Returns with the current CRC value accumulated so far. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 03/02/1996 JLB : Created. * - *=============================================================================================*/ +// Submits an arbitrary data block to the CRC engine. The buffer will not be modified. long CRCEngine::operator() (void const * buffer, int length) { if (buffer != nullptr && length > 0) { diff --git a/Core/Libraries/Source/WWVegas/WWLib/crcpipe.cpp b/Core/Libraries/Source/WWVegas/WWLib/crcpipe.cpp index 75c4b9ebcc3..6efe9da3dfe 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/crcpipe.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/crcpipe.cpp @@ -30,36 +30,14 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * CRCPipe::Result -- Fetches the current CRC of the data. * - * CRCPipe::Put -- Retrieves the data bytes specified and calculates CRC on it. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "always.h" #include "crcpipe.h" -/*********************************************************************************************** - * CRCPipe::Put -- Retrieves the data bytes specified and calculates CRC on it. * - * * - * This routine will fetch the number of bytes requested from the straw. The data is * - * not modified by this straw segment, but it is examined by the CRC engine in order to * - * keep an accurate CRC of the data that passes through this routine. * - * * - * INPUT: source -- Pointer to the buffer that will hold the data requested. * - * * - * length -- The number of bytes requested. * - * * - * OUTPUT: Returns with the actual number of bytes stored into the buffer. If this number is * - * less than the number requested, then this indicates that the data stream has been * - * exhausted. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// The data is not modified by this pipe segment, but it is examined by the CRC engine in order to +// keep an accurate CRC of the data that passes through this routine. int CRCPipe::Put(void const * source, int slen) { CRC(source, slen); @@ -67,21 +45,7 @@ int CRCPipe::Put(void const * source, int slen) } -/*********************************************************************************************** - * CRCPipe::Result -- Fetches the current CRC of the data. * - * * - * This routine will return the CRC of the data that has passed through the pipe up to * - * this time. * - * * - * INPUT: none * - * * - * OUTPUT: Returns with the CRC value. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// Fetches the CRC of the data that has passed through the pipe up to this time. long CRCPipe::Result() const { return(CRC()); diff --git a/Core/Libraries/Source/WWVegas/WWLib/crcpipe.h b/Core/Libraries/Source/WWVegas/WWLib/crcpipe.h index 022be45e21b..30d23193eb9 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/crcpipe.h +++ b/Core/Libraries/Source/WWVegas/WWLib/crcpipe.h @@ -30,8 +30,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/crcstraw.cpp b/Core/Libraries/Source/WWVegas/WWLib/crcstraw.cpp index 16bf34d0df6..ec27b146c6a 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/crcstraw.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/crcstraw.cpp @@ -30,36 +30,15 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * CRCStraw::Get -- Fetch the data requested and calculate CRC on it. * - * CRCStraw::Result -- Returns with the CRC of all data passed through the straw. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "always.h" #include "crcstraw.h" -/*********************************************************************************************** - * CRCStraw::Get -- Fetch the data requested and calculate CRC on it. * - * * - * This routine will fetch the number of bytes requested. The data will not be modified * - * by this straw segment, but the CRC engine will examine the data so as to keep an * - * accurate CRC value. * - * * - * INPUT: source -- Pointer to the buffer to hold the data requested. * - * * - * length -- The number of bytes requested. * - * * - * OUTPUT: Returns with the actual number of bytes stored in the buffer. If this number is * - * less than that requested, then this indicates that the data stream has been * - * exhausted. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// The data will not be modified by this straw segment, but the CRC engine will examine the data so +// as to keep an accurate CRC value. Returns fewer bytes than requested when the data stream has +// been exhausted. int CRCStraw::Get(void * source, int slen) { if (source == nullptr || slen < 1) { @@ -72,21 +51,7 @@ int CRCStraw::Get(void * source, int slen) } -/*********************************************************************************************** - * CRCStraw::Result -- Returns with the CRC of all data passed through the straw. * - * * - * This routine will return the CRC value of the data that has passed through this straw * - * segment. * - * * - * INPUT: none * - * * - * OUTPUT: Returns with the CRC value of the data this straw segment has seen. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// Returns with the CRC of all data passed through the straw. long CRCStraw::Result() const { return(CRC()); diff --git a/Core/Libraries/Source/WWVegas/WWLib/crcstraw.h b/Core/Libraries/Source/WWVegas/WWLib/crcstraw.h index 2a7f7f57d7d..8ddc20333a5 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/crcstraw.h +++ b/Core/Libraries/Source/WWVegas/WWLib/crcstraw.h @@ -30,8 +30,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/cstraw.cpp b/Core/Libraries/Source/WWVegas/WWLib/cstraw.cpp index af3b0417415..c180c265319 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/cstraw.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/cstraw.cpp @@ -30,36 +30,15 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * CacheStraw::Get -- Fetch data from the data source. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "always.h" #include "cstraw.h" -/*********************************************************************************************** - * CacheStraw::Get -- Fetch data from the data source. * - * * - * This will supply the data quantity requested. It performs a regulating influence on the * - * data requests passed through it. The data is requested from the next straw in the * - * chain such that the data stream is requested in chunks. This serves to lessen the * - * impact of multiple small data requests. * - * * - * INPUT: source -- Pointer to the buffer to hold the data. * - * * - * slen -- The number of data bytes requested. * - * * - * OUTPUT: Returns with the number of data bytes stored into the buffer specified. If this * - * number is less than that requested, it indicates that the data source has been * - * exhausted. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/10/1996 JLB : Created. * - *=============================================================================================*/ +// Fetch data from the data source. The data is requested from the next straw in the chain such that +// the data stream is requested in chunks. This serves to lessen the impact of multiple small data +// requests. Returns fewer bytes than requested when the data source has been exhausted. int CacheStraw::Get(void * source, int slen) { int total = 0; diff --git a/Core/Libraries/Source/WWVegas/WWLib/cstraw.h b/Core/Libraries/Source/WWVegas/WWLib/cstraw.h index f39ec863d38..9335efb340e 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/cstraw.h +++ b/Core/Libraries/Source/WWVegas/WWLib/cstraw.h @@ -30,8 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/ffactory.h b/Core/Libraries/Source/WWVegas/WWLib/ffactory.h index 6c031039744..9d754562388 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/ffactory.h +++ b/Core/Libraries/Source/WWVegas/WWLib/ffactory.h @@ -30,8 +30,6 @@ * * * $Revision:: 14 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/gcd_lcm.cpp b/Core/Libraries/Source/WWVegas/WWLib/gcd_lcm.cpp index 6ef0f751078..d47c2bc253f 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/gcd_lcm.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/gcd_lcm.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "gcd_lcm.h" diff --git a/Core/Libraries/Source/WWVegas/WWLib/gcd_lcm.h b/Core/Libraries/Source/WWVegas/WWLib/gcd_lcm.h index e5ce3b02254..68bf5c59265 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/gcd_lcm.h +++ b/Core/Libraries/Source/WWVegas/WWLib/gcd_lcm.h @@ -30,8 +30,6 @@ * * * $Revision:: 3 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/hash.cpp b/Core/Libraries/Source/WWVegas/WWLib/hash.cpp index 1cee44f208f..a1d5c4297db 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/hash.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/hash.cpp @@ -31,8 +31,6 @@ * * * $Revision:: 3 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "hash.h" diff --git a/Core/Libraries/Source/WWVegas/WWLib/hash.h b/Core/Libraries/Source/WWVegas/WWLib/hash.h index ee9c0690b8c..e19e4e62e68 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/hash.h +++ b/Core/Libraries/Source/WWVegas/WWLib/hash.h @@ -31,8 +31,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/hashcalc.h b/Core/Libraries/Source/WWVegas/WWLib/hashcalc.h index a95b9947ba6..4e8f109245a 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/hashcalc.h +++ b/Core/Libraries/Source/WWVegas/WWLib/hashcalc.h @@ -30,8 +30,6 @@ * * * $Revision:: 3 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/hashtab.h b/Core/Libraries/Source/WWVegas/WWLib/hashtab.h index 8360128e6c8..0e6f1648b46 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/hashtab.h +++ b/Core/Libraries/Source/WWVegas/WWLib/hashtab.h @@ -30,8 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/hashtemplate.h b/Core/Libraries/Source/WWVegas/WWLib/hashtemplate.h index 67490fc3e40..20cd06c986d 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/hashtemplate.h +++ b/Core/Libraries/Source/WWVegas/WWLib/hashtemplate.h @@ -30,8 +30,6 @@ * * * $Revision:: 7 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/incdec.h b/Core/Libraries/Source/WWVegas/WWLib/incdec.h index e8e8ae76ed8..d98a7317484 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/incdec.h +++ b/Core/Libraries/Source/WWVegas/WWLib/incdec.h @@ -30,8 +30,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/ini.cpp b/Core/Libraries/Source/WWVegas/WWLib/ini.cpp index 2e9871dbf28..3eac1726c2f 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/ini.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/ini.cpp @@ -40,48 +40,6 @@ * * * $Revision:: 22 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * INIClass::Clear -- Clears out a section (or all sections) of the INI data. * - * INIClass::Get_Filename -- Returns the name of the INI file (if available - "" otherwise) * - * INIClass::Entry_Count -- Fetches the number of entries in a specified section. * - * INIClass::Find_Entry -- Find specified entry within section. * - * INIClass::Find_Section -- Find the specified section within the INI data. * - * INIClass::Get_Bool -- Fetch a boolean value for the section and entry specified. * - * INIClass::Get_Entry -- Get the entry identifier name given ordinal number and section name* - * INIClass::Get_Float -- Fetch a floating point number from the database. * - * INIClass::Get_Hex -- Fetches integer [hex format] from the section and entry specified. * - * INIClass::Get_Int -- Fetch an integer entry from the specified section. * - * INIClass::Get_PKey -- Fetch a key from the ini database. * - * INIClass::Get_String -- Fetch the value of a particular entry in a specified section. * - * INIClass::Get_TextBlock -- Fetch a block of normal text. * - * INIClass::Get_UUBlock -- Fetch an encoded block from the section specified. * - * INIClass::INISection::Find_Entry -- Finds a specified entry and returns pointer to it. * - * INIClass::Load -- Load INI data from the file specified. * - * INIClass::Load -- Load the INI data from the data stream (straw). * - * INIClass::Put_Bool -- Store a boolean value into the INI database. * - * INIClass::Put_Float -- Store a floating point number to the database. * - * INIClass::Put_Hex -- Store an integer into the INI database, but use a hex format. * - * INIClass::Put_Int -- Stores a signed integer into the INI data base. * - * INIClass::Put_PKey -- Stores the key to the INI database. * - * INIClass::Put_String -- Output a string to the section and entry specified. * - * INIClass::Put_TextBlock -- Stores a block of text into an INI section. * - * INIClass::Put_UUBlock -- Store a binary encoded data block into the INI database. * - * INIClass::Save -- Save the ini data to the file specified. * - * INIClass::Save -- Saves the INI data to a pipe stream. * - * INIClass::Section_Count -- Counts the number of sections in the INI data. * - * INIClass::Strip_Comments -- Strips comments of the specified text line. * - * INIClass::~INIClass -- Destructor for INI handler. * - * INIClass::Put_Rect -- Store a rectangle into the INI database. * - * INIClass::Get_Rect -- Retrieve a rectangle data from the database. * - * INIClass::Put_Point -- Store a point value to the database. * - * INIClass::Get_Point -- Fetch a point value from the INI database. * - * INIClass::Put_Point -- Stores a 3D point to the database. * - * INIClass::Get_Point -- Fetch a 3D point from the database. * - * INIClass::Get_Point -- Fetch a 2D point from the INI database. * - * INIClass::CRC - returns a (hopefully) unique 32-bit value for a string * - * -- Displays debug information when a duplicate entry is found in an INI file * - * INIClass::Enumerate_Entries -- Count how many entries begin with a certain prefix followed by a range * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "always.h" @@ -150,37 +108,12 @@ void INIClass::Shutdown() delete[] Filename; } -/*********************************************************************************************** - * INIClass::INIClass -- Constructor for INI handler. * - * * - * * - * INPUT: FileClass object * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - *=============================================================================================*/ INIClass::INIClass() : Filename(nullptr) { Initialize(); } -/*********************************************************************************************** - * INIClass::INIClass -- Constructor for INI handler. * - * * - * * - * INPUT: FileClass object * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - *=============================================================================================*/ - INIClass::INIClass(FileClass & file) : Filename(nullptr) { @@ -190,19 +123,6 @@ INIClass::INIClass(FileClass & file) -/*********************************************************************************************** - * INIClass::INIClass -- Constructor for INI handler. * - * * - * * - * INPUT: filename string * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - *=============================================================================================*/ - INIClass::INIClass(const char *filename) : Filename(nullptr) { @@ -216,21 +136,7 @@ INIClass::INIClass(const char *filename) -/*********************************************************************************************** - * INIClass::~INIClass -- Destructor for INI handler. * - * * - * This is the destructor for the INI class. It handles deleting all of the allocations * - * it might have done. * - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/02/1996 JLB : Created. * - *=============================================================================================*/ +// Deletes all of the allocations it might have done. INIClass::~INIClass() { Clear(); @@ -238,28 +144,9 @@ INIClass::~INIClass() } -/*********************************************************************************************** - * INIClass::Clear -- Clears out a section (or all sections) of the INI data. * - * * - * This routine is used to clear out the section specified. If no section is specified, * - * then the entire INI data is cleared out. Optionally, this routine can be used to clear * - * out just an individual entry in the specified section. * - * * - * INPUT: section -- Pointer to the section to clear out [pass nullptr to clear all]. * - * * - * entry -- Pointer to optional entry specifier. If this parameter is specified, * - * then only this specific entry (if found) will be cleared. Otherwise, * - * the entire section specified will be cleared. * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/02/1996 JLB : Created. * - * 08/21/1996 JLB : Optionally clears section too. * - * 11/02/1996 JLB : Updates the index list. * - *=============================================================================================*/ +// Clears out a section (or all sections) of the INI data. If no section is specified, then the +// entire INI data is cleared out. If an entry is specified, then only this specific entry (if found) +// will be cleared. bool INIClass::Clear(char const * section, char const * entry) { if (section == nullptr) { @@ -296,39 +183,14 @@ bool INIClass::Clear(char const * section, char const * entry) } -/*********************************************************************************************** - * INIClass::Get_Filename -- Returns the name of the INI file (if available - "" * - * otherwise) * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 9/7/2001 AJA: Created. * - *=============================================================================================*/ +// Returns the name of the INI file (if available - "" otherwise). const char * INIClass::Get_Filename () const { return Filename; } -/*********************************************************************************************** - * INIClass::Load -- Load INI data from the file specified. * - * * - * Use this routine to load the INI class with the data from the specified file. * - * * - * INPUT: file -- Reference to the file that will be used to fill up this INI manager. * - * * - * OUTPUT: bool; Was the file loaded successfully? * - * * - * WARNINGS: This routine allocates memory. * - * * - * HISTORY: * - * 07/02/1996 JLB : Created. * - *=============================================================================================*/ +// WARNING: This routine allocates memory. int INIClass::Load(FileClass & file) { FileStraw fs(file); @@ -339,20 +201,7 @@ int INIClass::Load(FileClass & file) -/*********************************************************************************************** - * INIClass::Load -- Load INI data from the file specified. * - * * - * Use this routine to load the INI class with the data from the specified file. * - * * - * INPUT: filename -- Path for the file to open, factory - thing to make file * - * * - * OUTPUT: bool; Was the file loaded successfully? * - * * - * WARNINGS: This routine allocates memory. * - * * - * HISTORY: * - * 08/01/2000 NAK : Created. * - *=============================================================================================*/ +// WARNING: This routine allocates memory. int INIClass::Load(const char *filename) { file_auto_ptr file(_TheFileFactory, filename); @@ -365,24 +214,8 @@ int INIClass::Load(const char *filename) -/*********************************************************************************************** - * INIClass::Load -- Load the INI data from the data stream (straw). * - * * - * This will fetch data from the straw and build an INI database from it. * - * * - * INPUT: straw -- The straw that the data will be provided from. * - * * - * OUTPUT: bool; Was the database loaded ok? * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/10/1996 JLB : Created. * - * 09/29/1997 JLB : Handles the merging case. * - * 12/09/1997 EHC : Detects duplicate entry CRCs and fails in that case * - * 03/22/2001 AJA : Treat "foobar=" as a valid entry with value " ". * - * 08/23/2001 AJA : Make the loading of "foobar=" dependent on the KeepBlankEntries flag. * - *=============================================================================================*/ +// Load the INI data from the data stream (straw). Merges with any existing INI data. Fails on +// duplicate entry CRCs. Treats "foobar=" as a valid entry with value " " if KeepBlankEntries is set. int INIClass::Load(Straw & ffile) { bool end_of_file = false; @@ -574,21 +407,7 @@ int INIClass::Load(Straw & ffile) } -/*********************************************************************************************** - * INIClass::Save -- Save the ini data to the file specified. * - * * - * Use this routine to save the ini data to the file specified. All existing data in the * - * file, if it was present, is replaced. * - * * - * INPUT: file -- Reference to the file to write the INI data to. * - * * - * OUTPUT: bool; Was the data written to the file? * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/02/1996 JLB : Created. * - *=============================================================================================*/ +// All existing data in the file, if it was present, is replaced. int INIClass::Save(FileClass & file) const { FilePipe fp(file); @@ -598,21 +417,7 @@ int INIClass::Save(FileClass & file) const } -/*********************************************************************************************** - * INIClass::Save -- Save the ini data to the file specified. * - * * - * Use this routine to save the ini data to the file specified. All existing data in the * - * file, if it was present, is replaced. * - * * - * INPUT: filename -- Filename to save to. * - * * - * OUTPUT: bool; Was the data written to the file? * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 01/22/2001 NAK : Created. * - *=============================================================================================*/ +// All existing data in the file, if it was present, is replaced. int INIClass::Save(const char *filename) const { FileClass *file=_TheWritingFileFactory->Get_File(filename); @@ -631,20 +436,7 @@ int INIClass::Save(const char *filename) const -/*********************************************************************************************** - * INIClass::Save -- Saves the INI data to a pipe stream. * - * * - * This routine will output the data of the INI file to a pipe stream. * - * * - * INPUT: pipe -- Reference to the pipe stream to pump the INI image to. * - * * - * OUTPUT: Returns with the number of bytes output to the pipe. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/02/1996 JLB : Created. * - *=============================================================================================*/ +// Saves the INI data to a pipe stream. int INIClass::Save(Pipe & pipe) const { int total = 0; @@ -693,25 +485,7 @@ int INIClass::Save(Pipe & pipe) const } -/*********************************************************************************************** - * INIClass::Find_Section -- Find the specified section within the INI data. * - * * - * This routine will scan through the INI data looking for the section specified. If the * - * section could be found, then a pointer to the section control data is returned. * - * * - * INPUT: section -- The name of the section to search for. Don't enclose the name in * - * brackets. Case is NOT sensitive in the search. * - * * - * OUTPUT: Returns with a pointer to the INI section control structure if the section was * - * found. Otherwise, nullptr is returned. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/02/1996 JLB : Created. * - * 11/02/1996 JLB : Uses index manager. * - * 12/08/1996 EHC : Uses member CRC function * - *=============================================================================================*/ +// Find the specified section within the INI data. Returns nullptr if the section was not found. INISection * INIClass::Find_Section(char const * section) const { if (section != nullptr) { @@ -726,44 +500,14 @@ INISection * INIClass::Find_Section(char const * section) const } -/*********************************************************************************************** - * INIClass::Section_Count -- Counts the number of sections in the INI data. * - * * - * This routine will scan through all the sections in the INI data and return a count * - * of the number it found. * - * * - * INPUT: none * - * * - * OUTPUT: Returns with the number of sections recorded in the INI data. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/02/1996 JLB : Created. * - * 11/02/1996 JLB : Uses index manager. * - *=============================================================================================*/ +// Counts the number of sections in the INI data. int INIClass::Section_Count() const { return(SectionIndex->Count()); } -/*********************************************************************************************** - * INIClass::Entry_Count -- Fetches the number of entries in a specified section. * - * * - * This routine will examine the section specified and return with the number of entries * - * associated with it. * - * * - * INPUT: section -- Pointer to the section that will be examined. * - * * - * OUTPUT: Returns with the number entries in the specified section. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/02/1996 JLB : Created. * - * 11/02/1996 JLB : Uses index manager. * - *=============================================================================================*/ +// Fetches the number of entries in a specified section. int INIClass::Entry_Count(char const * section) const { INISection * secptr = Find_Section(section); @@ -774,24 +518,7 @@ int INIClass::Entry_Count(char const * section) const } -/*********************************************************************************************** - * INIClass::Find_Entry -- Find specified entry within section. * - * * - * This support routine will find the specified entry in the specified section. If found, * - * a pointer to the entry control structure will be returned. * - * * - * INPUT: section -- Pointer to the section name to search under. * - * * - * entry -- Pointer to the entry name to search for. * - * * - * OUTPUT: If the entry was found, then a pointer to the entry control structure will be * - * returned. Otherwise, nullptr will be returned. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/02/1996 JLB : Created. * - *=============================================================================================*/ +// Find specified entry within section. Returns nullptr if the entry was not found. INIEntry * INIClass::Find_Entry(char const * section, char const * entry) const { INISection * secptr = Find_Section(section); @@ -802,24 +529,8 @@ INIEntry * INIClass::Find_Entry(char const * section, char const * entry) const } -/*********************************************************************************************** - * INIClass::Get_Entry -- Get the entry identifier name given ordinal number and section name. * - * * - * This will return the identifier name for the entry under the section specified. The * - * ordinal number specified is used to determine which entry to retrieve. The entry * - * identifier is the text that appears to the left of the "=" character. * - * * - * INPUT: section -- The section to use. * - * * - * index -- The ordinal number to use when fetching an entry name. * - * * - * OUTPUT: Returns with a pointer to the entry name. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/02/1996 JLB : Created. * - *=============================================================================================*/ +// Get the entry identifier name given ordinal number and section name. The entry identifier is the +// text that appears to the left of the "=" character. char const * INIClass::Get_Entry(char const * section, int index) const { INISection * secptr = Find_Section(section); @@ -838,22 +549,7 @@ char const * INIClass::Get_Entry(char const * section, int index) const -/*********************************************************************************************** - * Enumerate_Entries -- Count how many entries begin with a certain prefix followed by a range * - * of numbers. * - * * - * * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 9/29/99 EHC : Created. * - *=============================================================================================*/ +// Count how many entries begin with a certain prefix followed by a range of numbers. unsigned INIClass::Enumerate_Entries(const char *Section, const char * Entry_Prefix, unsigned StartNumber, unsigned EndNumber) { unsigned count = StartNumber; @@ -872,27 +568,9 @@ unsigned INIClass::Enumerate_Entries(const char *Section, const char * Entry_Pre -/*********************************************************************************************** - * INIClass::Put_UUBlock -- Store a binary encoded data block into the INI database. * - * * - * Use this routine to store an arbitrary length binary block of data into the INI database.* - * This routine will covert the data into displayable form and then break it into lines * - * that are stored in sequence to the section. A section used to store data in this * - * fashion can not be used for any other entries. * - * * - * INPUT: section -- The section identifier to place the data into. * - * * - * block -- Pointer to the block of binary data to store. * - * * - * len -- The length of the binary data. * - * * - * OUTPUT: bool; Was the data stored to the database? * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// Store a binary encoded data block into the INI database. The data is converted into displayable +// form and then broken into lines that are stored in sequence to the section. A section used to +// store data in this fashion can not be used for any other entries. bool INIClass::Put_UUBlock(char const * section, void const * block, int len) { if (section == nullptr || block == nullptr || len < 1) return(false); @@ -921,30 +599,11 @@ bool INIClass::Put_UUBlock(char const * section, void const * block, int len) } -/*********************************************************************************************** - * INIClass::Get_UUBlock -- Fetch an encoded block from the section specified. * - * * - * This routine will take all the entries in the specified section and decompose them into * - * a binary block of data that will be stored into the buffer specified. By using this * - * routine [and the Put_UUBLock counterpart], arbitrary blocks of binary data may be * - * stored in the INI file. A section processed by this routine can contain no other * - * entries than those put there by a previous call to Put_UUBlock. * - * * - * INPUT: section -- The section name to process. * - * * - * block -- Pointer to the buffer that will hold the retrieved data. * - * * - * len -- The length of the buffer. The retrieved data will not fill past this * - * limit. * - * * - * OUTPUT: Returns with the number of bytes decoded into the buffer specified. * - * * - * WARNINGS: If the number of bytes retrieved exactly matches the length of the buffer * - * specified, then you might have a condition of buffer "overflow". * - * * - * HISTORY: * - * 07/02/1996 JLB : Created. * - *=============================================================================================*/ +// Decomposes all the entries in the specified section into a binary block of data. A section +// processed by this routine can contain no other entries than those put there by a previous call to +// Put_UUBlock. Returns the number of bytes decoded into the buffer. +// WARNING: If the number of bytes retrieved exactly matches the length of the buffer specified, +// then you might have a condition of buffer "overflow". int INIClass::Get_UUBlock(char const * section, void * block, int len) const { if (section == nullptr) return(0); @@ -971,23 +630,6 @@ int INIClass::Get_UUBlock(char const * section, void * block, int len) const -/*********************************************************************************************** - * INIClass::Get_Wide_String -- Get a wide string from an .INI * - * * - * * - * * - * INPUT: Reference to new string to return * - * Section to find string * - * Entry name of string * - * Default value to use when string is not present * - * * - * OUTPUT: Reference to input string * - * * - * WARNINGS: None * - * * - * HISTORY: * - * 11/6/2001 4:27PM ST : Created * - *=============================================================================================*/ const WideStringClass& INIClass::Get_Wide_String(WideStringClass& new_string, char const * section, char const * entry, unichar const * defvalue) const { unichar out[1024]; @@ -1011,22 +653,6 @@ const WideStringClass& INIClass::Get_Wide_String(WideStringClass& new_string, ch -/*********************************************************************************************** - * INIClass::Put_Wide_String -- Put a wide string into an INI database. * - * * - * * - * * - * INPUT: Section name to store entry under * - * Entry name * - * Ptr to wide string data * - * * - * OUTPUT: True if put OK * - * * - * WARNINGS: None * - * * - * HISTORY: * - * 11/6/2001 4:29PM ST : Created * - *=============================================================================================*/ bool INIClass::Put_Wide_String(char const * section, char const * entry, unichar const * string) { if (section == nullptr || entry == nullptr || string == nullptr) { @@ -1112,27 +738,10 @@ int INIClass::Get_UUBlock(char const * section, char const *entry, void * block, -/*********************************************************************************************** - * INIClass::Put_TextBlock -- Stores a block of text into an INI section. * - * * - * This routine will take an arbitrarily long block of text and store it into the INI * - * database. The text is broken up into lines and each line is then stored as a numbered * - * entry in the specified section. A section used to store text in this way can not be used * - * to hold any other entries. The text is presumed to contain space characters scattered * - * throughout it and that one space between words and sentences is natural. * - * * - * INPUT: section -- The section to place the text block into. * - * * - * text -- Pointer to a null terminated text string that holds the block of * - * text. The length can be arbitrary. * - * * - * OUTPUT: bool; Was the text block placed into the database? * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// Stores a block of text into an INI section. The text is broken up into lines and each line is then +// stored as a numbered entry in the specified section. A section used to store text in this way can +// not be used to hold any other entries. The text is presumed to contain space characters scattered +// throughout it and that one space between words and sentences is natural. bool INIClass::Put_TextBlock(char const * section, char const * text) { if (section == nullptr) return(false); @@ -1181,29 +790,11 @@ bool INIClass::Put_TextBlock(char const * section, char const * text) } -/*********************************************************************************************** - * INIClass::Get_TextBlock -- Fetch a block of normal text. * - * * - * This will take all entries in the specified section and format them into a block of * - * normalized text. That is, text with single spaces between each concatenated line. All * - * entries in the specified section are processed by this routine. Use Put_TextBlock to * - * build the entries in the section. * - * * - * INPUT: section -- The section name to process. * - * * - * buffer -- Pointer to the buffer that will hold the complete text. * - * * - * len -- The length of the buffer specified. The text will, at most, fill this * - * buffer with the last character being forced to null. * - * * - * OUTPUT: Returns with the number of characters placed into the buffer. The trailing null * - * is not counted. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/02/1996 JLB : Created. * - *=============================================================================================*/ +// Fetch a block of normal text. This will take all entries in the specified section and format them +// into a block of normalized text. That is, text with single spaces between each concatenated line. +// Use Put_TextBlock to build the entries in the section. The text will, at most, fill the buffer +// with the last character being forced to null. Returns the number of characters placed into the +// buffer, not counting the trailing null. int INIClass::Get_TextBlock(char const * section, char * buffer, int len) const { if (len <= 0) return(0); @@ -1236,33 +827,9 @@ int INIClass::Get_TextBlock(char const * section, char * buffer, int len) const } -/*********************************************************************************************** - * INIClass::Put_Int -- Stores a signed integer into the INI data base. * - * * - * Use this routine to store an integer value into the section and entry specified. * - * * - * INPUT: section -- The identifier for the section that the entry will be placed in. * - * * - * entry -- The entry identifier used for the integer number. * - * * - * number -- The integer number to store in the database. * - * * - * format -- The format to store the integer. The format is generally only a * - * cosmetic affect. The Get_Int operation will interpret the value the * - * same regardless of what format was used to store the integer. * - * * - * 0 : plain decimal digit * - * 1 : hexadecimal digit (trailing "h") * - * 2 : hexadecimal digit (leading "$") * - * * - * OUTPUT: bool; Was the number stored? * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - * 07/10/1996 JLB : Handles multiple integer formats. * - *=============================================================================================*/ +// Stores a signed integer into the INI data base. The format is generally only a cosmetic effect: +// 0 is plain decimal, 1 is hexadecimal with trailing "h", 2 is hexadecimal with leading "$". The +// Get_Int operation will interpret the value the same regardless of what format was used. bool INIClass::Put_Int(char const * section, char const * entry, int number, int format) { char buffer[64]; @@ -1285,27 +852,8 @@ bool INIClass::Put_Int(char const * section, char const * entry, int number, int } -/*********************************************************************************************** - * INIClass::Get_Int -- Fetch an integer entry from the specified section. * - * * - * This routine will fetch an integer value from the entry and section specified. If no * - * entry could be found, then the default value will be returned instead. * - * * - * INPUT: section -- The section name to search under. * - * * - * entry -- The entry name to search for. * - * * - * defvalue -- The default value to use if the specified entry could not be found. * - * * - * OUTPUT: Returns with the integer value specified in the INI database or else returns the * - * default value. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/02/1996 JLB : Created. * - * 07/10/1996 JLB : Handles multiple integer formats. * - *=============================================================================================*/ +// Fetch an integer entry from the specified section. If no entry could be found, then the default +// value will be returned instead. All the formats written by Put_Int are understood. int INIClass::Get_Int(char const * section, char const * entry, int defvalue) const { /* @@ -1331,25 +879,7 @@ int INIClass::Get_Int(char const * section, char const * entry, int defvalue) co -/*********************************************************************************************** - * INIClass::Put_Rect -- Store a rectangle into the INI database. * - * * - * This routine will store the four values that constitute the specified rectangle into * - * the database under the section and entry specified. * - * * - * INPUT: section -- Name of the section to place the entry under. * - * * - * entry -- Name of the entry that the rectangle data will be stored to. * - * * - * value -- The rectangle value to store. * - * * - * OUTPUT: bool; Was the rectangle data written to the database? * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 09/19/1997 JLB : Created. * - *=============================================================================================*/ +// Stores the four values that constitute the specified rectangle. bool INIClass::Put_Rect(char const * section, char const * entry, Rect const & value) { char buffer[64]; @@ -1359,27 +889,7 @@ bool INIClass::Put_Rect(char const * section, char const * entry, Rect const & v } -/*********************************************************************************************** - * INIClass::Get_Rect -- Retrieve a rectangle data from the database. * - * * - * This routine will retrieve the rectangle data from the database at the section and entry * - * specified. * - * * - * INPUT: section -- The name of the section that the entry will be scanned for. * - * * - * entry -- The entry that the rectangle data will be lifted from. * - * * - * defvalue -- The rectangle value to return if the specified section and entry could * - * not be found. * - * * - * OUTPUT: Returns with the rectangle data from the database or the default value if not * - * found. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 09/19/1997 JLB : Created. * - *=============================================================================================*/ +// Retrieve a rectangle data from the database. Returns the default value if not found. Rect const INIClass::Get_Rect(char const * section, char const * entry, Rect const & defvalue) const { char buffer[64]; @@ -1393,26 +903,7 @@ Rect const INIClass::Get_Rect(char const * section, char const * entry, Rect con } -/*********************************************************************************************** - * INIClass::Put_Hex -- Store an integer into the INI database, but use a hex format. * - * * - * This routine is similar to the Put_Int routine, but the number is stored as a hexadecimal* - * number. * - * * - * INPUT: section -- The identifier for the section that the entry will be placed in. * - * * - * entry -- The entry identifier to tag to the integer number specified. * - * * - * number -- The number to assign the the specified entry and placed in the * - * specified section. * - * * - * OUTPUT: bool; Was the number placed into the INI database? * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// Store an integer into the INI database, but use a hex format. bool INIClass::Put_Hex(char const * section, char const * entry, int number) { char buffer[64]; @@ -1422,27 +913,8 @@ bool INIClass::Put_Hex(char const * section, char const * entry, int number) } -/*********************************************************************************************** - * INIClass::Get_Hex -- Fetches integer [hex format] from the section and entry specified. * - * * - * This routine will search under the section specified, looking for a matching entry. The * - * value is interpreted as a hexadecimal number and then returned. If no entry could be * - * found, then the default value is returned instead. * - * * - * INPUT: section -- The section identifier to search under. * - * * - * entry -- The entry identifier to search for. * - * * - * defvalue -- The default value to use if the entry could not be located. * - * * - * OUTPUT: Returns with the integer value from the specified section and entry. If no entry * - * could be found, then the default value will be returned instead. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/02/1996 JLB : Created. * - *=============================================================================================*/ +// Fetches integer [hex format] from the section and entry specified. If no entry could be found, +// then the default value is returned instead. int INIClass::Get_Hex(char const * section, char const * entry, int defvalue) const { /* @@ -1458,25 +930,7 @@ int INIClass::Get_Hex(char const * section, char const * entry, int defvalue) co } -/*********************************************************************************************** - * INIClass::Get_Float -- Fetch a floating point number from the database. * - * * - * This routine will retrieve a floating point number from the database. * - * * - * INPUT: section -- The section name to find the entry under. * - * * - * entry -- The entry name to fetch the float value from. * - * * - * defvalue -- Return value to use if the section and entry could not be found. * - * * - * OUTPUT: Returns with the float value from the section and entry specified. If not found, * - * then the default value is returned. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 05/31/1997 JLB : Created. * - *=============================================================================================*/ +// Fetch a floating point number from the database. Returns the default value if not found. float INIClass::Get_Float(char const * section, char const * entry, float defvalue) const { /* @@ -1497,25 +951,7 @@ float INIClass::Get_Float(char const * section, char const * entry, float defval } -/*********************************************************************************************** - * INIClass::Put_Float -- Store a floating point number to the database. * - * * - * This routine will store a flaoting point number to the section and entry of the * - * database. * - * * - * INPUT: section -- The section to store the entry under. * - * * - * entry -- The entry to store the floating point number to. * - * * - * number -- The floating point number to store. * - * * - * OUTPUT: bool; Was the floating point number stored without error? * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 05/31/1997 JLB : Created. * - *=============================================================================================*/ +// Store a floating point number to the database. bool INIClass::Put_Float(char const * section, char const * entry, float number) { char buffer[64]; @@ -1525,25 +961,8 @@ bool INIClass::Put_Float(char const * section, char const * entry, float number) } -/*********************************************************************************************** - * INIClass::Get_Double -- Fetch a double-precision floating point number from the database. * - * * - * This routine will retrieve a floating point number from the database. * - * * - * INPUT: section -- The section name to find the entry under. * - * * - * entry -- The entry name to fetch the float value from. * - * * - * defvalue -- Return value to use if the section and entry could not be found. * - * * - * OUTPUT: Returns with the float value from the section and entry specified. If not found, * - * then the default value is returned. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 8/27/2001 AJA : Created. * - *=============================================================================================*/ +// Fetch a double-precision floating point number from the database. Returns the default value if +// not found. double INIClass::Get_Double(char const * section, char const * entry, double defvalue) const { /* @@ -1564,25 +983,7 @@ double INIClass::Get_Double(char const * section, char const * entry, double def } -/*********************************************************************************************** - * INIClass::Put_Double -- Store a double-precision floating point number to the database. * - * * - * This routine will store a flaoting point number to the section and entry of the * - * database. * - * * - * INPUT: section -- The section to store the entry under. * - * * - * entry -- The entry to store the floating point number to. * - * * - * number -- The floating point number to store. * - * * - * OUTPUT: bool; Was the floating point number stored without error? * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 8/27/2001 AJA : Created. * - *=============================================================================================*/ +// Store a double-precision floating point number to the database. bool INIClass::Put_Double(char const * section, char const * entry, double number) { char buffer[64]; @@ -1592,28 +993,8 @@ bool INIClass::Put_Double(char const * section, char const * entry, double numbe } -/*********************************************************************************************** - * INIClass::Put_String -- Output a string to the section and entry specified. * - * * - * This routine will put an arbitrary string to the section and entry specified. Any * - * previous matching entry will be replaced. * - * * - * INPUT: section -- The section identifier to place the string under. * - * * - * entry -- The entry identifier to identify this string [placed under the section]* - * * - * string -- Pointer to the string to assign to this entry. * - * * - * OUTPUT: bool; Was the entry assigned without error? * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/02/1996 JLB : Created. * - * 11/02/1996 JLB : Uses index handler. * - * 12/08/1997 EHC : Debug message for duplicate entries * - * 03/13/1998 NH : On duplicate CRC, check if strings identical. * - *=============================================================================================*/ +// Output a string to the section and entry specified. Any previous matching entry will be replaced. +// On a duplicate entry CRC, the strings are checked for being identical. bool INIClass::Put_String(char const * section, char const * entry, char const * string) { if (section == nullptr || entry == nullptr) return(false); @@ -1665,32 +1046,10 @@ bool INIClass::Put_String(char const * section, char const * entry, char const * } -/*********************************************************************************************** - * INIClass::Get_String -- Fetch the value of a particular entry in a specified section. * - * * - * This will retrieve the entire text to the right of the "=" character. The text is * - * found by finding a matching entry in the section specified. If no matching entry could * - * be found, then the default value will be stored in the output string buffer. * - * * - * INPUT: section -- Pointer to the section name to search under. * - * * - * entry -- The entry identifier to search for. * - * * - * defvalue -- If no entry could be found, then this text will be returned. * - * * - * buffer -- Output buffer to store the retrieved string into. * - * * - * size -- The size of the output buffer. The maximum string length that could * - * be retrieved will be one less than this length. This is due to the * - * forced trailing zero added to the end of the string. * - * * - * OUTPUT: Returns with the length of the string retrieved. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/02/1996 JLB : Created. * - *=============================================================================================*/ +// Fetch the value of a particular entry in a specified section. This will retrieve the entire text +// to the right of the "=" character. If no matching entry could be found, then the default value +// will be stored in the output string buffer. The maximum string length that could be retrieved +// will be one less than the buffer size, due to the forced trailing zero. int INIClass::Get_String(char const * section, char const * entry, char const * defvalue, char * buffer, int size) const { /* @@ -1753,32 +1112,10 @@ const StringClass& INIClass::Get_String(StringClass& new_string, char const * se -/*********************************************************************************************** - * INIClass::Get_String -- Fetch the value of a particular entry in a specified section. * - * * - * This will retrieve the entire text to the right of the "=" character. The text is * - * found by finding a matching entry in the section specified. If no matching entry could * - * be found, then the default value will be stored in the output string buffer. * - * * - * INPUT: section -- Pointer to the section name to search under. * - * * - * entry -- The entry identifier to search for. * - * * - * defvalue -- If no entry could be found, then this text will be returned. * - * * - * buffer -- Output buffer to store the retrieved string into. * - * * - * size -- The size of the output buffer. The maximum string length that could * - * be retrieved will be one less than this length. This is due to the * - * forced trailing zero added to the end of the string. * - * * - * OUTPUT: Returns with the length of the string retrieved. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/02/1996 JLB : Created. * - *=============================================================================================*/ +// Fetch the value of a particular entry in a specified section. This will retrieve the entire text +// to the right of the "=" character. If no matching entry could be found, then the default value +// will be stored in the output string buffer. The maximum string length that could be retrieved +// will be one less than the buffer size, due to the forced trailing zero. char *INIClass::Get_Alloc_String(char const * section, char const * entry, char const * defvalue) const { if (section == nullptr || entry == nullptr) return(nullptr); @@ -1886,25 +1223,7 @@ int * INIClass::Get_Alloc_Int_Array(char const * section, char const * entry, in return retval; } -/*********************************************************************************************** - * INIClass::Put_Bool -- Store a boolean value into the INI database. * - * * - * Use this routine to place a boolean value into the INI database. The boolean value will * - * be stored as "yes" or "no". * - * * - * INPUT: section -- The section to place the entry and boolean value into. * - * * - * entry -- The entry identifier to tag to the boolean value. * - * * - * value -- The boolean value to place into the database. * - * * - * OUTPUT: bool; Was the boolean value placed into the database? * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// Store a boolean value into the INI database. The boolean value will be stored as "yes" or "no". bool INIClass::Put_Bool(char const * section, char const * entry, bool value) { if (value) { @@ -1915,29 +1234,10 @@ bool INIClass::Put_Bool(char const * section, char const * entry, bool value) } -/*********************************************************************************************** - * INIClass::Get_Bool -- Fetch a boolean value for the section and entry specified. * - * * - * This routine will search under the section specified, looking for a matching entry. If * - * one is found, the value is interpreted as a boolean value and then returned. In the case * - * of no matching entry, the default value will be returned instead. The boolean value * - * is interpreted using the standard boolean conventions. e.g., "Yes", "Y", "1", "True", * - * "T" are all consider to be a TRUE boolean value. * - * * - * INPUT: section -- The section to search under. * - * * - * entry -- The entry to search for. * - * * - * defvalue -- The default value to use if no matching entry could be located. * - * * - * OUTPUT: Returns with the boolean value of the specified section and entry. If no match * - * then the default boolean value is returned. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/02/1996 JLB : Created. * - *=============================================================================================*/ +// Fetch a boolean value for the section and entry specified. In the case of no matching entry, the +// default value will be returned instead. The boolean value is interpreted using the standard +// boolean conventions. e.g., "Yes", "Y", "1", "True", "T" are all considered to be a TRUE boolean +// value. bool INIClass::Get_Bool(char const * section, char const * entry, bool defvalue) const { /* @@ -1963,25 +1263,7 @@ bool INIClass::Get_Bool(char const * section, char const * entry, bool defvalue) } -/*********************************************************************************************** - * INIClass::Put_Point -- Store a point value to the database. * - * * - * This routine will store the point value to the INI database under the section and entry * - * specified. * - * * - * INPUT: section -- The name of the section to store the entry under. * - * * - * entry -- The entry to store the point data to. * - * * - * value -- The point value to store. * - * * - * OUTPUT: bool; Was the point value stored to the database? * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 09/19/1997 JLB : Created. * - *=============================================================================================*/ +// Store a point value to the database. bool INIClass::Put_Point(char const * section, char const * entry, TPoint2D const & value) { char buffer[54]; @@ -1990,26 +1272,8 @@ bool INIClass::Put_Point(char const * section, char const * entry, TPoint2D } -/*********************************************************************************************** - * INIClass::Get_Point -- Fetch a point value from the INI database. * - * * - * This routine will retrieve a point value from the database by looking in the section and * - * entry specified. * - * * - * INPUT: section -- The name of the section to search for the entry under. * - * * - * entry -- The entry to search for. * - * * - * defvalue -- The default value to return if the section and entry were not found. * - * * - * OUTPUT: Returns with the point value retrieved from the database or the default value if * - * the section and entry were not found. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 09/19/1997 JLB : Created. * - *=============================================================================================*/ +// Fetch a point value from the INI database. Returns the default value if the section and entry +// were not found. TPoint2D const INIClass::Get_Point(char const * section, char const * entry, TPoint2D const & defvalue) const { char buffer[64]; @@ -2022,25 +1286,7 @@ TPoint2D const INIClass::Get_Point(char const * section, char const * entry } -/*********************************************************************************************** - * INIClass::Put_Point -- Stores a 3D point to the database. * - * * - * This routine will store the 3D point value to the database under the section and entry * - * specified. * - * * - * INPUT: section -- The name of the section that the entry will be stored under. * - * * - * entry -- The name of the entry that the point will be stored to. * - * * - * value -- The 3D point value to store. * - * * - * OUTPUT: bool; Was the point stored to the database? * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 09/19/1997 JLB : Created. * - *=============================================================================================*/ +// Stores a 3D point to the database. bool INIClass::Put_Point(char const * section, char const * entry, TPoint3D const & value) { char buffer[54]; @@ -2049,27 +1295,8 @@ bool INIClass::Put_Point(char const * section, char const * entry, TPoint3D } -/*********************************************************************************************** - * INIClass::Get_Point -- Fetch a 3D point from the database. * - * * - * This routine will retrieve a 3D point from the database from the section and entry * - * specified. * - * * - * INPUT: section -- The name of the section to search for th entry under. * - * * - * entry -- The name of the entry to search for. * - * * - * defvaule -- The default value to return if the section and entry could not be * - * found. * - * * - * OUTPUT: Returns with the 3D point from the database or the default value if the section * - * and entry could not be found. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 09/19/1997 JLB : Created. * - *=============================================================================================*/ +// Fetch a 3D point from the database. Returns the default value if the section and entry could not +// be found. TPoint3D const INIClass::Get_Point(char const * section, char const * entry, TPoint3D const & defvalue) const { char buffer[64]; @@ -2082,25 +1309,7 @@ TPoint3D const INIClass::Get_Point(char const * section, char const * entry } -/*********************************************************************************************** - * INIClass::Put_Point -- Stores a 3D point to the database. * - * * - * This routine will store the 3D point value to the database under the section and entry * - * specified. * - * * - * INPUT: section -- The name of the section that the entry will be stored under. * - * * - * entry -- The name of the entry that the point will be stored to. * - * * - * value -- The 3D point value to store. * - * * - * OUTPUT: bool; Was the point stored to the database? * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 09/19/1997 JLB : Created. * - *=============================================================================================*/ +// Stores a 3D point to the database. bool INIClass::Put_Point(char const * section, char const * entry, TPoint3D const & value) { char buffer[54]; @@ -2109,27 +1318,8 @@ bool INIClass::Put_Point(char const * section, char const * entry, TPoint3D const INIClass::Get_Point(char const * section, char const * entry, TPoint3D const & defvalue) const { char buffer[64]; @@ -2142,26 +1332,8 @@ TPoint3D const INIClass::Get_Point(char const * section, char const * ent } -/*********************************************************************************************** - * INIClass::Get_Point -- Fetch a point value from the INI database. * - * * - * This routine will retrieve a point value from the database by looking in the section and * - * entry specified. * - * * - * INPUT: section -- The name of the section to search for the entry under. * - * * - * entry -- The entry to search for. * - * * - * defvalue -- The default value to return if the section and entry were not found. * - * * - * OUTPUT: Returns with the point value retrieved from the database or the default value if * - * the section and entry were not found. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/14/1999 NH : Created. * - *=============================================================================================*/ +// Fetch a point value from the INI database. Returns the default value if the section and entry +// were not found. TPoint2D const INIClass::Get_Point(char const * section, char const * entry, TPoint2D const & defvalue) const { char buffer[64]; @@ -2174,24 +1346,8 @@ TPoint2D const INIClass::Get_Point(char const * section, char const * ent } -/*********************************************************************************************** - * INISection::Find_Entry -- Finds a specified entry and returns pointer to it. * - * * - * This routine scans the supplied entry for the section specified. This is used for * - * internal database maintenance. * - * * - * INPUT: entry -- The entry to scan for. * - * * - * OUTPUT: Returns with a pointer to the entry control structure if the entry was found. * - * Otherwise it returns nullptr. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - * 11/02/1996 JLB : Uses index handler. * - * 12/08/1997 EHC : Uses member CRC function - *=============================================================================================*/ +// This routine scans the supplied entry for the section specified. This is used for internal +// database maintenance. Returns nullptr if the entry was not found. INIEntry * INISection::Find_Entry(char const * entry) const { if (entry != nullptr) { @@ -2205,21 +1361,7 @@ INIEntry * INISection::Find_Entry(char const * entry) const } -/*********************************************************************************************** - * INIClass::Strip_Comments -- Strips comments of the specified text line. * - * * - * This routine will scan the string (text line) supplied and if any comment portions are * - * found, they will be trimmed off. Leading and trailing blanks are also removed. * - * * - * INPUT: buffer -- Pointer to the null terminate string to be processed. * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// Strips comments of the specified text line. Leading and trailing blanks are also removed. void INIClass::Strip_Comments(char * buffer) { if (buffer != nullptr) { @@ -2232,21 +1374,7 @@ void INIClass::Strip_Comments(char * buffer) } -/*********************************************************************************************** - * INIClass::CRC - returns a (hopefully) unique 32-bit value for a string * - * * - * * - * * - * * - * INPUT: pointer to null terminated string * - * * - * OUTPUT: integer that is highly likely to be unique for a given INI file. * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/8/97 EHC : Created. * - *=============================================================================================*/ +// Returns a (hopefully) unique 32-bit value for a string. int INIClass::CRC(const char *string) { // simply call the CRC class string evaluator. @@ -2254,22 +1382,9 @@ int INIClass::CRC(const char *string) } -/*********************************************************************************************** - * -- Displays debug information when a duplicate entry is found in an INI file * - * * - * * - * * - * * - * INPUT: message - text description of function with problem * - * entry - text buffer for duplicate entry name * - * OUTPUT: * - * * - * WARNINGS: will assert(0) and exit program. INI errors are considered fatal at this time. * - * * - * HISTORY: * - * 12/9/97 EHC : Created. * - * 8/27/2001 AJA : In Release mode under Windows, a message box will be displayed. * - *=============================================================================================*/ +// Displays debug information when a duplicate entry is found in an INI file. In Release mode under +// Windows, a message box will be displayed. +// WARNING: Will assert(0) and exit program. INI errors are considered fatal at this time. void INIClass::DuplicateCRCError(const char *message, const char *section, const char *entry) { char buffer[512]; diff --git a/Core/Libraries/Source/WWVegas/WWLib/inisup.h b/Core/Libraries/Source/WWVegas/WWLib/inisup.h index 13e852d22f8..494f6b9397e 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/inisup.h +++ b/Core/Libraries/Source/WWVegas/WWLib/inisup.h @@ -30,8 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/iostruct.h b/Core/Libraries/Source/WWVegas/WWLib/iostruct.h index ada2fc3395b..0f5cc0c3ea6 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/iostruct.h +++ b/Core/Libraries/Source/WWVegas/WWLib/iostruct.h @@ -30,8 +30,6 @@ * * * $Revision:: 3 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/jshell.cpp b/Core/Libraries/Source/WWVegas/WWLib/jshell.cpp index ac997c6193c..70b3fd3a2d8 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/jshell.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/jshell.cpp @@ -30,37 +30,14 @@ * * * $Revision:: 28 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * Fatal -- General purpose fatal error handler. * - * Set_Bit -- Set bit in a bit array. * - * Get_Bit -- Fetch the bit value from a bit array. * - * First_True_Bit -- Return with the first true bit index. * - * First_False_Bit -- Find the first false bit in the bit array. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "always.h" -/*********************************************************************************************** - * Set_Bit -- Set bit in a bit array. * - * * - * This routine is used to set (or clear) a bit in a bit array. * - * * - * INPUT: array -- Pointer to the bit array. * - * * - * bit -- The bit number to set. I.e., bit 32 is the first bit in the second * - * long word of memory. * - * * - * value -- The value to set the bit. The only values supported are 0 and 1. * - * * - * OUTPUT: none * - * * - * WARNINGS: Be sure that the array is big enough to set the specified bit. * - * * - * HISTORY: * - * 10/06/1997 JLB : Created. * - *=============================================================================================*/ +// Set (or clear) a bit in a bit array. Bit 32 is the first bit in the second long word of memory. +// The only values supported are 0 and 1. +// WARNING: Be sure that the array is big enough to set the specified bit. void Set_Bit(void * array, int bit, int value) { unsigned char mask = (unsigned char)(1 << (bit % 8)); @@ -73,23 +50,7 @@ void Set_Bit(void * array, int bit, int value) } -/*********************************************************************************************** - * Get_Bit -- Fetch the bit value from a bit array. * - * * - * This routine will fetch the specified bit value from the bit array. This is the * - * counterpart function to the Set_Bit() function. * - * * - * INPUT: array -- Pointer to the bit array to fetch the bit value from. * - * * - * bit -- The bit number to fetch. * - * * - * OUTPUT: Returns with the value of the bit. This return value will be either 1 or 0. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 10/06/1997 JLB : Created. * - *=============================================================================================*/ +// Fetch the bit value from a bit array. This is the counterpart function to the Set_Bit() function. int Get_Bit(void const * array, int bit) { unsigned char mask = (unsigned char)(1 << (bit % 8)); @@ -97,23 +58,9 @@ int Get_Bit(void const * array, int bit) } -/*********************************************************************************************** - * First_True_Bit -- Return with the first true bit index. * - * * - * This routine will scan the bit array and return with the index for the first true bit * - * in the array. * - * * - * INPUT: array -- Pointer to the bit array to scan. * - * * - * OUTPUT: Returns with the index of the first true (set to 1) bit in the array. * - * * - * WARNINGS: This routine does not stop at the end of the array (it doesn't know where the * - * end is) so there must be at least one true bit in the array or else it will * - * end up scanning past the end (undefined results in that case). * - * * - * HISTORY: * - * 10/06/1997 JLB : Created. * - *=============================================================================================*/ +// WARNING: This routine does not stop at the end of the array (it doesn't know where the end is) so +// there must be at least one true bit in the array or else it will end up scanning past the end +// (undefined results in that case). int First_True_Bit(void const * array) { int index = 0; @@ -129,23 +76,8 @@ int First_True_Bit(void const * array) } -/*********************************************************************************************** - * First_False_Bit -- Find the first false bit in the bit array. * - * * - * This routine will scan the bit array and return with the index of the first false (set * - * to 0) bit found. * - * * - * INPUT: array -- Pointer to the bit array to scan. * - * * - * OUTPUT: Returns with the index of the first false bit found in the array. * - * * - * WARNINGS: This routine will not stop scanning until a false bit was found. This means * - * that there must be at least one false bit in the array or else it will scan * - * past the end of the array. * - * * - * HISTORY: * - * 10/06/1997 JLB : Created. * - *=============================================================================================*/ +// WARNING: This routine will not stop scanning until a false bit was found. This means that there +// must be at least one false bit in the array or else it will scan past the end of the array. int First_False_Bit(void const * array) { int index = 0; diff --git a/Core/Libraries/Source/WWVegas/WWLib/lzo.cpp b/Core/Libraries/Source/WWVegas/WWLib/lzo.cpp index 5c54dd0ec52..46c324c08a3 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/lzo.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/lzo.cpp @@ -30,10 +30,6 @@ * * * $Revision:: 7 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * LZOCompressor::Compress -- compress a buffer using LZO * - * LZOCompressor::Decompress -- decompress a buffer using LZO * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "lzo.h" @@ -52,18 +48,7 @@ static CriticalSectionClass mutex; #define BUFFER_OVERRUN_TEST_VALUE ((char)0x7d) -/*********************************************************************************************** - * LZOCompressor::Compress -- compress a buffer using LZO * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/19/99 GTH : Created. * - *=============================================================================================*/ +// Compress a buffer using LZO. int LZOCompressor::Compress ( const lzo_byte * in, @@ -89,18 +74,7 @@ int LZOCompressor::Compress } -/*********************************************************************************************** - * LZOCompressor::Decompress -- decompress a buffer using LZO * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/19/99 GTH : Created. * - *=============================================================================================*/ +// Decompress a buffer using LZO. int LZOCompressor::Decompress ( const lzo_byte * in, diff --git a/Core/Libraries/Source/WWVegas/WWLib/lzo.h b/Core/Libraries/Source/WWVegas/WWLib/lzo.h index afecc227910..19e2b2182cf 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/lzo.h +++ b/Core/Libraries/Source/WWVegas/WWLib/lzo.h @@ -30,8 +30,6 @@ * * * $Revision:: 3 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/lzo1x.h b/Core/Libraries/Source/WWVegas/WWLib/lzo1x.h index e880d47b73c..8abde5d4d37 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/lzo1x.h +++ b/Core/Libraries/Source/WWVegas/WWLib/lzo1x.h @@ -30,8 +30,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* lzo1x.h -- public interface of the LZO1X compression algorithm diff --git a/Core/Libraries/Source/WWVegas/WWLib/lzo1x_c.cpp b/Core/Libraries/Source/WWVegas/WWLib/lzo1x_c.cpp index 3e1085495db..6c80865445e 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/lzo1x_c.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/lzo1x_c.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* $Header: /Commando/Code/wwlib/lzo1x_c.cpp 2 7/05/00 6:26p Jani_p $ */ diff --git a/Core/Libraries/Source/WWVegas/WWLib/lzo1x_d.cpp b/Core/Libraries/Source/WWVegas/WWLib/lzo1x_d.cpp index 396bbc743fd..ac1512f9433 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/lzo1x_d.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/lzo1x_d.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* $Header: /Commando/Library/LZO1X_D.cpp 1 7/22/97 12:00p Greg_h $ */ diff --git a/Core/Libraries/Source/WWVegas/WWLib/lzo_conf.h b/Core/Libraries/Source/WWVegas/WWLib/lzo_conf.h index 597c4e2b50c..3034e0dbc3a 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/lzo_conf.h +++ b/Core/Libraries/Source/WWVegas/WWLib/lzo_conf.h @@ -30,8 +30,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* lzo_conf.h -- main internal configuration file for the the LZO library diff --git a/Core/Libraries/Source/WWVegas/WWLib/lzoconf.h b/Core/Libraries/Source/WWVegas/WWLib/lzoconf.h index 2b93ef4c7ce..3a5e80161ad 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/lzoconf.h +++ b/Core/Libraries/Source/WWVegas/WWLib/lzoconf.h @@ -30,8 +30,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* lzoconf.h -- configuration for the LZO real-time data compression library diff --git a/Core/Libraries/Source/WWVegas/WWLib/lzopipe.cpp b/Core/Libraries/Source/WWVegas/WWLib/lzopipe.cpp index b672411c8fa..a28af5f2e96 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/lzopipe.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/lzopipe.cpp @@ -30,12 +30,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * LZWPipe::Flush -- Flushes any partially accumulated block. * - * LZWPipe::LZWPipe -- Constructor for the LZO processor pipe. * - * LZWPipe::Put -- Send some data through the LZO processor pipe. * - * LZWPipe::~LZWPipe -- Deconstructor for the LZO pipe object. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -47,23 +41,7 @@ #include -/*********************************************************************************************** - * LZOPipe::LZOPipe -- Constructor for the LZO processor pipe. * - * * - * This will initialize the LZOPipe object so that it is prepared for compression or * - * decompression as indicated. * - * * - * INPUT: decrypt -- Should decompression be performed? * - * * - * blocksize-- The size of the data blocks to process. * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/04/1996 JLB : Created. * - *=============================================================================================*/ +// Prepares the LZOPipe object for compression or decompression as indicated. LZOPipe::LZOPipe(CompControl control, int blocksize) : Control(control), Counter(0), @@ -78,20 +56,7 @@ LZOPipe::LZOPipe(CompControl control, int blocksize) : } -/*********************************************************************************************** - * LZOPipe::~LZOPipe -- Deconstructor for the LZO pipe object. * - * * - * This will free any buffers it may have allocated. * - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/04/1996 JLB : Created. * - *=============================================================================================*/ +// Frees any buffers it may have allocated. LZOPipe::~LZOPipe() { delete [] Buffer; @@ -102,25 +67,10 @@ LZOPipe::~LZOPipe() } -/*********************************************************************************************** - * LZOPipe::Put -- Send some data through the LZO processor pipe. * - * * - * This routine will take the data requested and process it (decompression or compression). * - * It does this by accumulating the necessary bytes to make a whole block. Then the block * - * is processed and the entire contents are flushed to the next pipe segment in the chain. * - * * - * INPUT: source -- Pointer to the data to be fed to this LZO processor. * - * * - * length -- The number of bytes received. * - * * - * OUTPUT: Returns with the actual number of bytes output at the far distant final link in * - * the pipe chain. * - * * - * WARNINGS: The compression process may be slow as well as consuming two buffers. * - * * - * HISTORY: * - * 07/04/1996 JLB : Created. * - *=============================================================================================*/ +// Send some data through the LZO processor pipe (decompression or compression). It does this by +// accumulating the necessary bytes to make a whole block. Then the block is processed and the +// entire contents are flushed to the next pipe segment in the chain. +// WARNING: The compression process may be slow as well as consuming two buffers. int LZOPipe::Put(void const * source, int slen) { if (source == nullptr || slen < 1) { @@ -243,25 +193,10 @@ int LZOPipe::Put(void const * source, int slen) } -/*********************************************************************************************** - * LZOPipe::Flush -- Flushes any partially accumulated block. * - * * - * This routine is called when any buffered data must be flushed out the pipe. For the * - * compression process, this will generate the sub-sized compressed block. For * - * decompression, this routine should not have any data in the buffer. In such a case, it * - * means that the data source was prematurely truncated. In such a case, just dump the * - * accumulated data through the pipe. * - * * - * INPUT: none * - * * - * OUTPUT: Returns with the actual number of data bytes output to the distant final link in * - * the pipe chain. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/04/1996 JLB : Created. * - *=============================================================================================*/ +// Flushes any partially accumulated block. For the compression process, this will generate the +// sub-sized compressed block. For decompression, this routine should not have any data in the +// buffer. In such a case, it means that the data source was prematurely truncated, and the +// accumulated data is just dumped through the pipe. int LZOPipe::Flush() { assert(Buffer != nullptr); diff --git a/Core/Libraries/Source/WWVegas/WWLib/lzopipe.h b/Core/Libraries/Source/WWVegas/WWLib/lzopipe.h index 406e7e01985..3586216fac0 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/lzopipe.h +++ b/Core/Libraries/Source/WWVegas/WWLib/lzopipe.h @@ -30,8 +30,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/lzostraw.cpp b/Core/Libraries/Source/WWVegas/WWLib/lzostraw.cpp index 5e36ef72044..2bb2f681839 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/lzostraw.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/lzostraw.cpp @@ -30,11 +30,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * LZOStraw::Get -- Fetch data through the LZO processor. * - * LZOStraw::LZOStraw -- Constructor for LZO straw object. * - * LZOStraw::~LZOStraw -- Destructor for the LZO straw. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "always.h" @@ -44,25 +39,10 @@ #include -/*********************************************************************************************** - * LZOStraw::LZOStraw -- Constructor for LZO straw object. * - * * - * This will initialize the LZO straw object. Whether the object is to compress or * - * decompress and the block size to use is specified. The data is compressed in blocks * - * that are sized to be quick to compress and yet still yield good compression ratios. * - * * - * INPUT: decrypt -- Should the data be decompressed? * - * * - * blocksize-- The size of the blocks to process. * - * * - * OUTPUT: none * - * * - * WARNINGS: It takes two buffers of the blocksize specified if compression is to be * - * performed. * - * * - * HISTORY: * - * 07/04/1996 JLB : Created. * - *=============================================================================================*/ +// Whether the object is to compress or decompress and the block size to use is specified. The data +// is compressed in blocks that are sized to be quick to compress and yet still yield good +// compression ratios. +// WARNING: It takes two buffers of the blocksize specified if compression is to be performed. LZOStraw::LZOStraw(CompControl control, int blocksize) : Control(control), Counter(0), @@ -78,20 +58,7 @@ LZOStraw::LZOStraw(CompControl control, int blocksize) : } -/*********************************************************************************************** - * LZOStraw::~LZOStraw -- Destructor for the LZO straw. * - * * - * The destructor will free up the allocated buffers that it allocated in the constructor. * - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/04/1996 JLB : Created. * - *=============================================================================================*/ +// Frees up the buffers that were allocated in the constructor. LZOStraw::~LZOStraw() { delete [] Buffer; @@ -102,27 +69,9 @@ LZOStraw::~LZOStraw() } -/*********************************************************************************************** - * LZOStraw::Get -- Fetch data through the LZO processor. * - * * - * This routine will fetch the data bytes specified. It does this by first accumulating * - * a full block of data and then compressing or decompressing it as indicated. Subsequent * - * requests for data will draw from this buffer of processed data until it is exhausted * - * and another block must be fetched. * - * * - * INPUT: destbuf -- Pointer to the buffer to hold the data requested. * - * * - * length -- The number of data bytes requested. * - * * - * OUTPUT: Returns with the actual number of bytes stored into the buffer. If this number * - * is less than that requested, then this indicates that the data source has been * - * exhausted. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/04/1996 JLB : Created. * - *=============================================================================================*/ +// Fetch data through the LZO processor. It does this by first accumulating a full block of data and +// then compressing or decompressing it as indicated. Subsequent requests for data will draw from +// this buffer of processed data until it is exhausted and another block must be fetched. int LZOStraw::Get(void * destbuf, int slen) { assert(Buffer != nullptr); diff --git a/Core/Libraries/Source/WWVegas/WWLib/lzostraw.h b/Core/Libraries/Source/WWVegas/WWLib/lzostraw.h index fd382c12596..af303495535 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/lzostraw.h +++ b/Core/Libraries/Source/WWVegas/WWLib/lzostraw.h @@ -30,8 +30,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/mempool.h b/Core/Libraries/Source/WWVegas/WWLib/mempool.h index 1670d81913c..423a6942041 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/mempool.h +++ b/Core/Libraries/Source/WWVegas/WWLib/mempool.h @@ -30,16 +30,6 @@ * * * $Revision:: 9 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * ObjectPoolClass::ObjectPoolClass -- constructor for ObjectPoolClass * - * ObjectPoolClass::~ObjectPoolClass -- destructor for ObjectPoolClass * - * ObjectPoolClass::Allocate_Object -- allocates an object for the user * - * ObjectPoolClass::Free_Object -- releases obj back into the pool * - * ObjectPoolClass::Allocate_Object_Memory -- internal function which returns memory for an * - * ObjectPoolClass::Free_Object_Memory -- internal function, returns object's memory to the * - * AutoPoolClass::operator new -- overridden new which calls the internal ObjectPool * - * AutoPoolClass::operator delete -- overridden delete which calls the internal ObjectPool * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once @@ -161,19 +151,7 @@ ObjectPoolClass AutoPoolClass::Allocator = {} #endif -/*********************************************************************************************** - * ObjectPoolClass::ObjectPoolClass -- constructor for ObjectPoolClass * - * * - * Initializes the object pool to the empty state * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *=============================================================================================*/ +// Initializes the object pool to the empty state. template ObjectPoolClass::ObjectPoolClass() : FreeListHead(nullptr), @@ -183,19 +161,7 @@ ObjectPoolClass::ObjectPoolClass() : { } -/*********************************************************************************************** - * ObjectPoolClass::~ObjectPoolClass -- destructor for ObjectPoolClass * - * * - * deletes the blocks of memory in use by the object pool. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *=============================================================================================*/ +// Deletes the blocks of memory in use by the object pool. template ObjectPoolClass::~ObjectPoolClass() { @@ -215,20 +181,7 @@ ObjectPoolClass::~ObjectPoolClass() -/*********************************************************************************************** - * ObjectPoolClass::Allocate_Object -- allocates an object for the user * - * * - * If there are no free objects, another block of objects will be allocated. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/29/99 GTH : Created. * - *=============================================================================================*/ +// If there are no free objects, another block of objects will be allocated. template T * ObjectPoolClass::Allocate_Object() { @@ -239,18 +192,7 @@ T * ObjectPoolClass::Allocate_Object() return new (obj) T; } -/*********************************************************************************************** - * ObjectPoolClass::Free_Object -- releases obj back into the pool * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/29/99 GTH : Created. * - *=============================================================================================*/ +// Releases obj back into the pool. template void ObjectPoolClass::Free_Object(T * obj) { @@ -261,18 +203,7 @@ void ObjectPoolClass::Free_Object(T * obj) Free_Object_Memory(obj); } -/*********************************************************************************************** - * ObjectPoolClass::Allocate_Object_Memory -- internal function which returns memory for an in * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/29/99 GTH : Created. * - *=============================================================================================*/ +// Internal function which returns memory for an instance. template T * ObjectPoolClass::Allocate_Object_Memory() { @@ -305,18 +236,7 @@ T * ObjectPoolClass::Allocate_Object_Memory() } -/*********************************************************************************************** - * ObjectPoolClass::Free_Object_Memory -- internal function, returns object's memory to the po * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/29/99 GTH : Created. * - *=============================================================================================*/ +// Internal function, returns object's memory to the pool. template void ObjectPoolClass::Free_Object_Memory(T * obj) { @@ -329,18 +249,7 @@ void ObjectPoolClass::Free_Object_Memory(T * obj) } -/*********************************************************************************************** - * AutoPoolClass::operator new -- overridden new which calls the internal ObjectPool * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/29/99 GTH : Created. * - *=============================================================================================*/ +// Overridden new which calls the internal ObjectPool. template void * AutoPoolClass::operator new( size_t size ) { @@ -349,18 +258,7 @@ void * AutoPoolClass::operator new( size_t size ) } -/*********************************************************************************************** - * AutoPoolClass::operator delete -- overridden delete which calls the internal ObjectPool * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/29/99 GTH : Created. * - *=============================================================================================*/ +// Overridden delete which calls the internal ObjectPool. template void AutoPoolClass::operator delete( void * memory ) { diff --git a/Core/Libraries/Source/WWVegas/WWLib/mmsys.h b/Core/Libraries/Source/WWVegas/WWLib/mmsys.h index caf5335dc0c..b74749bc4a7 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/mmsys.h +++ b/Core/Libraries/Source/WWVegas/WWLib/mmsys.h @@ -30,8 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/mpu.cpp b/Core/Libraries/Source/WWVegas/WWLib/mpu.cpp index c1711d25dfd..1cde49a29a0 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/mpu.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/mpu.cpp @@ -30,9 +30,6 @@ * * * $Revision:: 4 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * Get_CPU_Rate -- Fetch the rate of CPU ticks per second. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "always.h" @@ -51,21 +48,7 @@ typedef union { } QuadValue; -/*********************************************************************************************** - * Get_CPU_Rate -- Fetch the rate of CPU ticks per second. * - * * - * This routine will query the CPU to determine how many clock per second it is. * - * * - * INPUT: high -- Reference to the location that will be filled with the upper 32 bits * - * of the result. * - * * - * OUTPUT: Returns with the lower 32 bits of the result. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 05/20/1997 JLB : Created. * - *=============================================================================================*/ +// Fetch the rate of CPU ticks per second. unsigned long Get_CPU_Rate(unsigned long & high) { union { diff --git a/Core/Libraries/Source/WWVegas/WWLib/multilist.cpp b/Core/Libraries/Source/WWVegas/WWLib/multilist.cpp index f3464fb7d2e..f40790004aa 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/multilist.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/multilist.cpp @@ -32,8 +32,6 @@ * * * $Revision:: 9 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "multilist.h" diff --git a/Core/Libraries/Source/WWVegas/WWLib/multilist.h b/Core/Libraries/Source/WWVegas/WWLib/multilist.h index e2085838676..63b0267be88 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/multilist.h +++ b/Core/Libraries/Source/WWVegas/WWLib/multilist.h @@ -32,8 +32,6 @@ * * * $Revision:: 16 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/noinit.h b/Core/Libraries/Source/WWVegas/WWLib/noinit.h index ea6baea5aa9..56f4f31876c 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/noinit.h +++ b/Core/Libraries/Source/WWVegas/WWLib/noinit.h @@ -30,8 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/nstrdup.cpp b/Core/Libraries/Source/WWVegas/WWLib/nstrdup.cpp index 81b1d29802c..c1e3311a120 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/nstrdup.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/nstrdup.cpp @@ -30,9 +30,6 @@ * * * $Revision:: 6 $* * * - *-------------------------------------------------------------------------* - * Functions: * - * nstrdup -- duplicates a string using new[] * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -40,18 +37,7 @@ #include "nstrdup.h" //#include "../app/main/gnew.h" -/************************************************************************** - * nstrdup -- duplicates a string using new[] * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/03/1998 PWG : Created. * - *========================================================================*/ +// Duplicates a string using new[]. char * nstrdup(const char *str) { if(str == nullptr) return nullptr; diff --git a/Core/Libraries/Source/WWVegas/WWLib/nstrdup.h b/Core/Libraries/Source/WWVegas/WWLib/nstrdup.h index 5419dc21776..337169f2e74 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/nstrdup.h +++ b/Core/Libraries/Source/WWVegas/WWLib/nstrdup.h @@ -30,8 +30,6 @@ * * * $Revision:: 2 $* * * - *-------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/ntree.h b/Core/Libraries/Source/WWVegas/WWLib/ntree.h index 6d47733cd8e..70162094720 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/ntree.h +++ b/Core/Libraries/Source/WWVegas/WWLib/ntree.h @@ -30,8 +30,6 @@ * * * $Revision:: 3 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/pipe.cpp b/Core/Libraries/Source/WWVegas/WWLib/pipe.cpp index f8983bf2ada..c56e1656b5b 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/pipe.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/pipe.cpp @@ -30,12 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * Pipe::Put_To -- Connect a pipe to flow data into from this pipe. * - * Pipe::Flush -- Flush all pending data out the pipe. * - * Pipe::Put -- Feed some data through the pipe. * - * Pipe::~Pipe -- Destructor for pipe class object. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -44,21 +38,8 @@ #include -/*********************************************************************************************** - * Pipe::~Pipe -- Destructor for pipe class object. * - * * - * This destructor will unlink itself from any other pipes that it may be chained to. In * - * the process, it will flush any output it may have pending. * - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// Unlinks itself from any other pipes that it may be chained to. In the process, it will flush any +// output it may have pending. Pipe::~Pipe() { if (ChainTo != nullptr) { @@ -73,21 +54,8 @@ Pipe::~Pipe() } -/*********************************************************************************************** - * Pipe::Put_To -- Connect a pipe to flow data into from this pipe. * - * * - * This routine will link two pipes together. The specified pipe will be fed data from * - * this pipe. * - * * - * INPUT: pipe -- Pointer to the pipe that data will flow to. * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// Connect a pipe to flow data into from this pipe. The specified pipe will be fed data from this +// pipe. void Pipe::Put_To(Pipe * pipe) { if (ChainTo != pipe) { @@ -109,24 +77,7 @@ void Pipe::Put_To(Pipe * pipe) } -/*********************************************************************************************** - * Pipe::Put -- Feed some data through the pipe. * - * * - * Use this to force feed data through the pipe. It is guaranteed to accept data as fast * - * as you can supply it. * - * * - * INPUT: source -- Pointer to the data to feed to this routine. * - * * - * length -- The number of bytes of data to submit. * - * * - * OUTPUT: Returns with the number of bytes actually output at the other far distant final * - * end of the pipe. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// Feed some data through the pipe. It is guaranteed to accept data as fast as you can supply it. int Pipe::Put(void const * source, int length) { if (ChainTo != nullptr) { @@ -136,24 +87,9 @@ int Pipe::Put(void const * source, int length) } -/*********************************************************************************************** - * Pipe::Flush -- Flush all pending data out the pipe. * - * * - * Then the pipe needs to be flushed, this routine will be called. Since pipe segments * - * might have internal staging buffer for the data, this routine is necessary to force * - * all staging buffers to be clear. This routine is called when the pipe is being * - * destroyed. * - * * - * INPUT: none * - * * - * OUTPUT: Returns with the number of bytes output at the far distant final end of the pipe * - * chain. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// Flush all pending data out the pipe. Since pipe segments might have internal staging buffer for +// the data, this routine is necessary to force all staging buffers to be clear. This routine is +// called when the pipe is being destroyed. int Pipe::Flush() { if (ChainTo != nullptr) { diff --git a/Core/Libraries/Source/WWVegas/WWLib/ramfile.cpp b/Core/Libraries/Source/WWVegas/WWLib/ramfile.cpp index fb84e9bc485..cb086646e12 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/ramfile.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/ramfile.cpp @@ -30,52 +30,19 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * RAMFileClass::Close -- This will 'close' the ram file. * - * RAMFileClass::Create -- Effectively clears the buffer of data. * - * RAMFileClass::Delete -- Effectively clears the buffer of data. * - * RAMFileClass::Is_Available -- Determines if the "file" is available. * - * RAMFileClass::Is_Open -- Is the file open? * - * RAMFileClass::Open -- Opens a RAM based file for read or write. * - * RAMFileClass::Open -- Opens the RAM based file. * - * RAMFileClass::RAMFileClass -- Construct a RAM buffer based "file" object. * - * RAMFileClass::Read -- Read data from the file. * - * RAMFileClass::Seek -- Controls the ram file virtual read position. * - * RAMFileClass::Size -- Returns with the size of the ram file. * - * RAMFileClass::Write -- Copies data to the ram file. * - * RAMFileClass::~RAMFileClass -- Destructor for the RAM file class. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "always.h" #include "RAMFILE.h" -/*********************************************************************************************** - * RAMFileClass::RAMFileClass -- Construct a RAM buffer based "file" object. * - * * - * This routine will construct a "file" object that actually is just a front end processor * - * for a buffer. Access to the buffer will appear as if it was accessing a file. This * - * is different from the caching ability of the buffered file class in that this file * - * class has no real file counterpart. Typical use of this is for algorithms that were * - * originally designed for file processing, but are now desired to work with a buffer. * - * * - * INPUT: buffer -- Pointer to the buffer to use for this file. The buffer will already * - * contain data if the file is opened for READ. It will be considered * - * a scratch buffer if opened for WRITE. If the buffer pointer is nullptr * - * but the length parameter is not, then a buffer will be allocated * - * of the specified length. This case is only useful for opening the * - * file for WRITE. * - * * - * length -- The length of the buffer submitted to this routine. * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// Construct a RAM buffer based "file" object. Access to the buffer will appear as if it was +// accessing a file. This is different from the caching ability of the buffered file class in that +// this file class has no real file counterpart. Typical use of this is for algorithms that were +// originally designed for file processing, but are now desired to work with a buffer. The buffer +// will already contain data if the file is opened for READ. It will be considered a scratch buffer +// if opened for WRITE. If the buffer pointer is nullptr but the length is not, then a buffer will +// be allocated of the specified length. This case is only useful for opening the file for WRITE. RAMFileClass::RAMFileClass(void * buffer, int len) : Buffer((char *)buffer), MaxLength(len), @@ -92,20 +59,7 @@ RAMFileClass::RAMFileClass(void * buffer, int len) : } -/*********************************************************************************************** - * RAMFileClass::~RAMFileClass -- Destructor for the RAM file class. * - * * - * The destructor will deallocate any buffer that it allocated. Otherwise it does nothing. * - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// Deallocates any buffer that it allocated. Otherwise it does nothing. RAMFileClass::~RAMFileClass() { Close(); @@ -117,21 +71,9 @@ RAMFileClass::~RAMFileClass() } -/*********************************************************************************************** - * RAMFileClass::Create -- Effectively clears the buffer of data. * - * * - * This routine "clears" the buffer of data. It only makes the buffer appear empty by * - * resetting the internal length to zero. * - * * - * INPUT: none * - * * - * OUTPUT: Was the file reset in this fashion? * - * * - * WARNINGS: If the file was open, then resetting by this routine is not allowed. * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// Effectively clears the buffer of data. It only makes the buffer appear empty by resetting the +// internal length to zero. +// WARNING: If the file was open, then resetting by this routine is not allowed. int RAMFileClass::Create() { if (!Is_Open()) { @@ -142,21 +84,9 @@ int RAMFileClass::Create() } -/*********************************************************************************************** - * RAMFileClass::Delete -- Effectively clears the buffer of data. * - * * - * This routine "clears" the buffer of data. It only makes the buffer appear empty by * - * resetting the internal length to zero. * - * * - * INPUT: none * - * * - * OUTPUT: Was the file reset in this fashion? * - * * - * WARNINGS: If the file was open, then resetting by this routine is not allowed. * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// Effectively clears the buffer of data. It only makes the buffer appear empty by resetting the +// internal length to zero. +// WARNING: If the file was open, then resetting by this routine is not allowed. int RAMFileClass::Delete() { if (!Is_Open()) { @@ -167,87 +97,31 @@ int RAMFileClass::Delete() } -/*********************************************************************************************** - * RAMFileClass::Is_Available -- Determines if the "file" is available. * - * * - * RAM files are always available. * - * * - * INPUT: none * - * * - * OUTPUT: TRUE * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// RAM files are always available. bool RAMFileClass::Is_Available(int ) { return(true); } -/*********************************************************************************************** - * RAMFileClass::Is_Open -- Is the file open? * - * * - * This answers the question whether the file is open or not. * - * * - * INPUT: none * - * * - * OUTPUT: bool; Is the file open? * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ bool RAMFileClass::Is_Open() const { return(IsOpen); } -/*********************************************************************************************** - * RAMFileClass::Open -- Opens a RAM based file for read or write. * - * * - * This routine will open the ram file. The name is meaningless so that parameter is * - * ignored. If the access mode is for write, then the pseudo-file can be written until the * - * buffer is full. If the file is opened for read, then the buffer is presumed to be full * - * of the data to be read. * - * * - * INPUT: name -- ignored. * - * * - * access-- The access method to use for the data buffer -- either READ or WRITE. * - * * - * OUTPUT: bool; Was the open successful? * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// Opens a RAM based file for read or write. The name is meaningless so that parameter is ignored. +// If the access mode is for write, then the pseudo-file can be written until the buffer is full. If +// the file is opened for read, then the buffer is presumed to be full of the data to be read. int RAMFileClass::Open(char const *, int access) { return(Open(access)); } -/*********************************************************************************************** - * RAMFileClass::Open -- Opens the RAM based file. * - * * - * This will open the ram based file for read or write. If the file is opened for write, * - * the the 'file' can be written up to the limit of the buffer's size. If the file is * - * opened for read, then the buffer is presumed to hold the data to be read. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// Opens the RAM based file for read or write. If the file is opened for write, the 'file' can be +// written up to the limit of the buffer's size. If the file is opened for read, then the buffer is +// presumed to hold the data to be read. int RAMFileClass::Open(int access) { if (Buffer == nullptr || Is_Open()) { @@ -275,26 +149,9 @@ int RAMFileClass::Open(int access) } -/*********************************************************************************************** - * RAMFileClass::Read -- Read data from the file. * - * * - * Use this routine just like a normal file read. It will copy the bytes from the ram * - * buffer to the destination specified. When the ram buffer is exhausted, less bytes than * - * requested will be read. * - * * - * INPUT: buffer -- Pointer to the buffer to store the data to. * - * * - * size -- The number of bytes to 'read' into the specified buffer. * - * * - * OUTPUT: Returns with the number of bytes copied to the destination buffer. If the number * - * of bytes returned is less than requested, then this indicates that the source * - * buffer is exhausted. * - * * - * WARNINGS: The read function only applies to ram 'files' opened for read access. * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// Read data from the file. Use this routine just like a normal file read. When the ram buffer is +// exhausted, less bytes than requested will be read. +// WARNING: The read function only applies to ram 'files' opened for read access. int RAMFileClass::Read(void * buffer, int size) { if (Buffer == nullptr || buffer == nullptr || size == 0) { @@ -323,27 +180,8 @@ int RAMFileClass::Read(void * buffer, int size) } -/*********************************************************************************************** - * RAMFileClass::Seek -- Controls the ram file virtual read position. * - * * - * This routine will move the read/write position of the ram file to the location specified * - * by the offset and direction parameters. It functions similarly to the regular file * - * seek method. * - * * - * INPUT: pos -- The signed offset from the home position specified by the "dir" * - * parameter. * - * * - * dir -- The home position to base the position offset on. This will either be * - * the start of the file, the end of the file, or the current read/write * - * position. * - * * - * OUTPUT: Returns with the new file position. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// Controls the ram file virtual read/write position. It functions similarly to the regular file seek +// method. int RAMFileClass::Seek(int pos, int dir) { if (Buffer == nullptr || !Is_Open()) { @@ -380,46 +218,16 @@ int RAMFileClass::Seek(int pos, int dir) } -/*********************************************************************************************** - * RAMFileClass::Size -- Returns with the size of the ram file. * - * * - * This will return the size of the 'real' data in the ram file. The real data is either * - * the entire buffer, if opened for READ, or just the written data if opened for WRITE. * - * * - * INPUT: none * - * * - * OUTPUT: Returns with the number of bytes that the ram file system considers to be valid * - * data of the 'file'. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// The real data is either the entire buffer, if opened for READ, or just the written data if +// opened for WRITE. int RAMFileClass::Size() { return(Length); } -/*********************************************************************************************** - * RAMFileClass::Write -- Copies data to the ram file. * - * * - * This function similarly to the regular write operation supported for files. It copies * - * the data specified to the current write position in the ram file. * - * * - * INPUT: buffer -- Pointer to the data to be written. * - * * - * size -- The number of bytes to write to the file. * - * * - * OUTPUT: Returns with the actual number of bytes written. This will be less than requested * - * if the buffer is exhausted of space prematurely. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// Copies data to the current write position in the ram file. Returns less than requested if the +// buffer is exhausted of space prematurely. int RAMFileClass::Write(void const * buffer, int size) { if (Buffer == nullptr || buffer == nullptr || size == 0) { @@ -453,39 +261,13 @@ int RAMFileClass::Write(void const * buffer, int size) } -/*********************************************************************************************** - * RAMFileClass::Close -- This will 'close' the ram file. * - * * - * Closing a ram file actually does nothing but record that it is now closed. * - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// Closing a ram file actually does nothing but record that it is now closed. void RAMFileClass::Close() { IsOpen = false; } -/*********************************************************************************************** - * RAMFileClass::Bias -- * - * * - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 10/31/2001 IML : Created. * - *=============================================================================================*/ void RAMFileClass::Bias (int start, int length) { Buffer = Buffer + start; diff --git a/Core/Libraries/Source/WWVegas/WWLib/random.cpp b/Core/Libraries/Source/WWVegas/WWLib/random.cpp index 0adadac1b7f..8305647e2ec 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/random.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/random.cpp @@ -30,17 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * RandomClass::RandomClass -- Constructor for the random number class. * - * RandomClass::operator() -- Fetches the next random number in the sequence. * - * RandomClass::operator() -- Ranged random number generator. * - * Random2Class::Random2Class -- Constructor for the random class. * - * Random2Class::operator -- Generates a random number between two values. * - * Random2Class::operator -- Randomizer function that returns value. * - * Random3Class::Random3Class -- Initializer for the random number generator. * - * Random3Class::operator -- Generates a random number between two values. * - * Random3Class::operator -- Random number generator function. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "always.h" @@ -71,44 +60,18 @@ Rand() - starts breaking in 24 dimensions */ -/*********************************************************************************************** - * RandomClass::RandomClass -- Constructor for the random number class. * - * * - * This constructor can take an integer as a parameter. This allows the class to be * - * constructed by assigning an integer to an existing object. The compiler creates a * - * temporary with the constructor and then performs a copy constructor operation. * - * * - * INPUT: seed -- The optional starting seed value to use. * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 02/27/1996 JLB : Created. * - *=============================================================================================*/ +// This constructor can take an integer as a parameter. This allows the class to be constructed by +// assigning an integer to an existing object. The compiler creates a temporary with the constructor +// and then performs a copy constructor operation. RandomClass::RandomClass(unsigned seed) : Seed(seed) { } -/*********************************************************************************************** - * RandomClass::operator() -- Fetches the next random number in the sequence. * - * * - * This routine will fetch the next random number in the sequence. * - * * - * INPUT: none * - * * - * OUTPUT: Returns with the next random number. * - * * - * WARNINGS: This routine modifies the seed value so that subsequent calls will not return * - * the same value. Take note that this routine only returns 15 bits of * - * random number. * - * * - * HISTORY: * - * 02/27/1996 JLB : Created. * - *=============================================================================================*/ +// Fetches the next random number in the sequence. +// WARNING: This routine modifies the seed value so that subsequent calls will not return the same +// value. Take note that this routine only returns 15 bits of random number. int RandomClass::operator ()() { /* @@ -124,45 +87,17 @@ int RandomClass::operator ()() } -/*********************************************************************************************** - * RandomClass::operator() -- Ranged random number generator. * - * * - * This function will return with a random number within the range specified. This replaces * - * the functionality of IRandom() in the old library. * - * * - * INPUT: minval -- The minimum value to return from the function. * - * * - * maxval -- The maximum value to return from the function. * - * * - * OUTPUT: Returns with a random number that falls between the minval and maxval (inclusive). * - * * - * WARNINGS: The range specified must fall within the maximum bit significance of the * - * random number algorithm (15 bits), otherwise the value returned will be * - * decidedly non-random. * - * * - * HISTORY: * - * 02/27/1996 JLB : Created. * - *=============================================================================================*/ +// Returns a random number within the range specified (inclusive). This replaces the functionality +// of IRandom() in the old library. +// WARNING: The range specified must fall within the maximum bit significance of the random number +// algorithm (15 bits), otherwise the value returned will be decidedly non-random. int RandomClass::operator() (int minval, int maxval) { return(Pick_Random_Number(*this, minval, maxval)); } -/*********************************************************************************************** - * Random2Class::Random2Class -- Constructor for the random class. * - * * - * This will initialize the random class object with the seed value specified. * - * * - * INPUT: seed -- The seed value used to scramble the random number generator. * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 05/14/1997 JLB : Created. * - *=============================================================================================*/ +// Initializes the random class object with the seed value specified. Random2Class::Random2Class(unsigned seed) : Index1(0), Index2(103) @@ -175,21 +110,7 @@ Random2Class::Random2Class(unsigned seed) : } -/*********************************************************************************************** - * Random2Class::operator -- Randomizer function that returns value. * - * * - * This is the random number generator function. It will generate a random number and * - * return the value. * - * * - * INPUT: none * - * * - * OUTPUT: Returns with a random number. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 05/20/1997 JLB : Created. * - *=============================================================================================*/ +// Generates a random number and returns the value. int Random2Class::operator() () { Table[Index1] ^= Table[Index2]; @@ -205,23 +126,8 @@ int Random2Class::operator() () } -/*********************************************************************************************** - * Random2Class::operator -- Generates a random number between two values. * - * * - * This routine will generate a random number between the two values specified. It uses * - * a method that will not bias the values in any way. * - * * - * INPUT: minval -- The minimum return value (inclusive). * - * * - * maxval -- The maximum return value (inclusive). * - * * - * OUTPUT: Returns with a random number that falls between the two values (inclusive). * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 05/20/1997 JLB : Created. * - *=============================================================================================*/ +// Generates a random number between the two values specified (inclusive). It uses a method that will +// not bias the values in any way. int Random2Class::operator() (int minval, int maxval) { return(Pick_Random_Number(*this, minval, maxval)); @@ -250,30 +156,13 @@ int Random3Class::Mix2[20] = { }; -/*********************************************************************************************** - * Random3Class::Random3Class -- Initializer for the random number generator. * - * * - * This initializes the random number generator with the seed values specified. Due to a * - * peculiarity of the random number design, the second seed value can be used to find the * - * Nth random number generated by this algorithm. The second seed is used as the Nth index * - * value. * - * * - * INPUT: seed1 -- The seed value to inialize the generator with. It is suggest that some * - * random value based on user input seed this value. * - * * - * seed2 -- The auxiliary seed value. This adds randomness and thus allows this * - * algorithm to use a 64 bit seed. This second seed also serves as an index * - * into the algorithm such that the value passed as 'seed2' is will prime * - * the generator to return that Nth random number when it is called. * - * * - * OUTPUT: none * - * * - * WARNINGS: As with all random number generators. Randomness is only as strong as the * - * initial seed value. * - * * - * HISTORY: * - * 05/20/1997 JLB : Created. * - *=============================================================================================*/ +// Initializes the random number generator with the seed values specified. It is suggested that some +// random value based on user input seed the first value. The second seed adds randomness and thus +// allows this algorithm to use a 64 bit seed. Due to a peculiarity of the random number design, the +// second seed value can be used to find the Nth random number generated by this algorithm. The +// second seed is used as the Nth index value. +// WARNING: As with all random number generators. Randomness is only as strong as the initial seed +// value. Random3Class::Random3Class(unsigned seed1, unsigned seed2) : Seed(seed1), Index(seed2) @@ -281,21 +170,8 @@ Random3Class::Random3Class(unsigned seed1, unsigned seed2) : } -/*********************************************************************************************** - * Random3Class::operator -- Random number generator function. * - * * - * This routine generates a random number. The number returned is strongly random and is * - * nearly good enough for cryptography. * - * * - * INPUT: none * - * * - * OUTPUT: Returns with a 32bit random number. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 05/20/1997 JLB : Created. * - *=============================================================================================*/ +// Generates a random number. The number returned is strongly random and is nearly good enough for +// cryptography. int Random3Class::operator() () { int loword = Seed; @@ -314,23 +190,8 @@ int Random3Class::operator() () } -/*********************************************************************************************** - * Random3Class::operator -- Generates a random number between two values. * - * * - * This routine will generate a random number between the two values specified. It uses * - * a method that will not bias the values in any way. * - * * - * INPUT: minval -- The minimum return value (inclusive). * - * * - * maxval -- The maximum return value (inclusive). * - * * - * OUTPUT: Returns with a random number that falls between the two values (inclusive). * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 05/20/1997 JLB : Created. * - *=============================================================================================*/ +// Generates a random number between the two values specified (inclusive). It uses a method that will +// not bias the values in any way. int Random3Class::operator() (int minval, int maxval) { return(Pick_Random_Number(*this, minval, maxval)); diff --git a/Core/Libraries/Source/WWVegas/WWLib/rawfile.cpp b/Core/Libraries/Source/WWVegas/WWLib/rawfile.cpp index 403f5985871..8e670b00e10 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/rawfile.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/rawfile.cpp @@ -30,25 +30,6 @@ * * * $Revision:: 13 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * RawFileClass::Bias -- Bias a file with a specific starting position and length. * - * RawFileClass::Close -- Perform a closure of the file. * - * RawFileClass::Create -- Creates an empty file. * - * RawFileClass::Delete -- Deletes the file object from the disk. * - * RawFileClass::Error -- Handles displaying a file error message. * - * RawFileClass::Get_Date_Time -- Gets the date and time the file was last modified. * - * RawFileClass::Is_Available -- Checks to see if the specified file is available to open. * - * RawFileClass::Open -- Assigns name and opens file in one operation. * - * RawFileClass::Open -- Opens the file object with the rights specified. * - * RawFileClass::RawFileClass -- Simple constructor for a file object. * - * RawFileClass::Raw_Seek -- Performs a seek on the unbiased file * - * RawFileClass::Read -- Reads the specified number of bytes into a memory buffer. * - * RawFileClass::Seek -- Reposition the file pointer as indicated. * - * RawFileClass::Set_Date_Time -- Sets the date and time the file was last modified. * - * RawFileClass::Set_Name -- Manually sets the name for a file object. * - * RawFileClass::Size -- Determines size of file (in bytes). * - * RawFileClass::Write -- Writes the specified data to the buffer specified. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ // TheSuperHackers @build feliwir 11/04/2025 We removed Win32 API here and use plain C @@ -122,22 +103,9 @@ #endif -/*********************************************************************************************** - * RawFileClass::RawFileClass -- Default constructor for a file object. * - * * - * This constructs a null file object. A null file object has no file handle or filename * - * associated with it. In order to use a file object created in this fashion it must be * - * assigned a name and then opened. * - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 10/18/1994 JLB : Created. * - *=============================================================================================*/ +// This constructs a null file object. A null file object has no file handle or filename associated +// with it. In order to use a file object created in this fashion it must be assigned a name and +// then opened. RawFileClass::RawFileClass() : Rights(READ), BiasStart(0), @@ -151,91 +119,31 @@ RawFileClass::RawFileClass() : -/*********************************************************************************************** - * RawFileClass::Is_Open -- Checks to see if the file is open or not. * - * * - * Use this routine to determine if the file is open. It returns true if it is. * - * * - * INPUT: none * - * * - * OUTPUT: bool; Is the file open? * - * * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 10/18/1994 JLB : Created. * - *=============================================================================================*/ +// Checks to see if the file is open or not. bool RawFileClass::Is_Open() const { return(Handle != NULL_HANDLE); } -/*********************************************************************************************** - * RawFileClass::Error -- Handles displaying a file error message. * - * * - * Display an error message as indicated. If it is allowed to retry, then pressing a key * - * will return from this function. Otherwise, it will exit the program with "exit()". * - * * - * INPUT: error -- The error number (same as the DOSERR.h error numbers). * - * * - * canretry -- Can this routine exit normally so that retrying can occur? If this is * - * false, then the program WILL exit in this routine. * - * * - * filename -- Optional filename to report with this error. If no filename is * - * supplied, then no filename is listed in the error message. * - * * - * OUTPUT: none, but this routine might not return at all if the "canretry" parameter is * - * false or the player pressed ESC. * - * * - * WARNINGS: This routine may not return at all. It handles being in text mode as well as * - * if in a graphic mode. * - * * - * HISTORY: * - * 10/17/1994 JLB : Created. * - *=============================================================================================*/ +// Handles displaying a file error message. The error number is the same as the DOSERR.h error +// numbers. If it is allowed to retry, then pressing a key will return from this function. +// Otherwise, it will exit the program with "exit()". +// WARNING: This routine may not return at all. It handles being in text mode as well as if in a +// graphic mode. void RawFileClass::Error(int, int, char const * ) { } -/*********************************************************************************************** - * RawFileClass::Transfer_Block_Size * - * * - * This function returns the largest size a low level DOS read or write may * - * perform. Larger file transfers are performed in chunks of this size or less. * - * * - * INPUT: none * - * * - * OUTPUT: * - * * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 10/18/1994 JLB : Created. * - *=============================================================================================*/ +// Returns the largest size a low level DOS read or write may perform. Larger file transfers are +// performed in chunks of this size or less. int RawFileClass::Transfer_Block_Size() { return (int)((unsigned)UINT_MAX)-16L; } -/*********************************************************************************************** - * RawFileClass::RawFileClass -- Simple constructor for a file object. * - * * - * This constructor is called when a file object is created with a supplied filename, but * - * not opened at the same time. In this case, an assumption is made that the supplied * - * filename is a constant string. A duplicate of the filename string is not created since * - * it would be wasteful in that case. * - * * - * INPUT: filename -- The filename to assign to this file object. * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 10/17/1994 JLB : Created. * - *=============================================================================================*/ +// The file object is created with a supplied filename, but not opened at the same time. In this +// case, an assumption is made that the supplied filename is a constant string. A duplicate of the +// filename string is not created since it would be wasteful in that case. RawFileClass::RawFileClass(char const * filename) : Rights(0), BiasStart(0), @@ -247,85 +155,27 @@ RawFileClass::RawFileClass(char const * filename) : { } -/*********************************************************************************************** - * RawFileClass::~RawFileClass -- Default deconstructor for a file object. * - * * - * This constructs a null file object. A null file object has no file handle or filename * - * associated with it. In order to use a file object created in this fashion it must be * - * assigned a name and then opened. * - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 10/18/1994 JLB : Created. * - *=============================================================================================*/ RawFileClass::~RawFileClass() { Reset (); } -/*********************************************************************************************** - * RawFileClass::Reset -- Closes the file handle and resets the object's state. - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 06/10/1999 PDS : Created. * - *=============================================================================================*/ +// Closes the file handle and resets the object's state. void RawFileClass::Reset() { Close(); Filename = ""; } -/*********************************************************************************************** - * RawFileClass::File_Name -- Returns with the filename associate with the file object. * - * * - * Use this routine to determine what filename is associated with this file object. If no * - * filename has yet been assigned, then this routing will return null. * - * * - * INPUT: none * - * * - * OUTPUT: Returns with a pointer to the file name associated with this file object or nullptr * - * if one doesn't exist. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 10/18/1994 JLB : Created. * - * 11/25/2001 Jani: Note that this is virtual function and thus can't be inlined. Is there a * - * reason for it to be virtual? * - *=============================================================================================*/ +// Returns nullptr if no filename has yet been assigned. This is a virtual function and thus can't be +// inlined. char const * RawFileClass::File_Name() const { return(Filename); } -/*********************************************************************************************** - * RawFileClass::Set_Name -- Manually sets the name for a file object. * - * * - * This routine will set the name for the file object to the name specified. Setting the * - * name in this fashion doesn't affect the closed or opened state * - * of the file. * - * * - * INPUT: filename -- The filename to assign to this file object. * - * * - * OUTPUT: pointer to filename. * - * * - * * - * HISTORY: * - * 10/17/1994 JLB : Created. * - * 11/25/2001 Jani : Changed the name storage from strdup to StringClass to benefit from our * - * Fast memory allocation system. - *=============================================================================================*/ +// Manually sets the name for a file object. Setting the name in this fashion doesn't affect the +// closed or opened state of the file. char const * RawFileClass::Set_Name(char const * filename) { Bias(0); @@ -348,27 +198,9 @@ char const * RawFileClass::Set_Name(char const * filename) } -/*********************************************************************************************** - * RawFileClass::Open -- Assigns name and opens file in one operation. * - * * - * This routine will assign the specified filename to the file object and open it at the * - * same time. If the file object was already open, then it will be closed first. If the * - * file object was previously assigned a filename, then it will be replaced with the new * - * name. Typically, this routine is used when an anonymous file object has been crated and * - * now it needs to be assigned a name and opened. * - * * - * INPUT: filename -- The filename to assign to this file object. * - * * - * rights -- The open file access rights to use. * - * * - * OUTPUT: bool; Was the file opened? The return value of this is moot, since the open file * - * is designed to never return unless it succeeded. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 10/17/1994 JLB : Created. * - *=============================================================================================*/ +// Assigns name and opens file in one operation. If the file object was already open, then it will +// be closed first. If the file object was previously assigned a filename, then it will be replaced +// with the new name. The open is designed to never return unless it succeeded. int RawFileClass::Open(char const * filename, int rights) { Set_Name(filename); @@ -376,24 +208,9 @@ int RawFileClass::Open(char const * filename, int rights) } -/*********************************************************************************************** - * RawFileClass::Open -- Opens the file object with the rights specified. * - * * - * This routine is used to open the specified file object with the access rights indicated. * - * This only works if the file has already been assigned a filename. It is guaranteed, by * - * the error handler, that this routine will always return with success. * - * * - * INPUT: rights -- The file access rights to use when opening this file. This is a * - * combination of READ and/or WRITE bit flags. * - * * - * OUTPUT: bool; Was the file opened successfully? This will always return true by reason of * - * the error handler. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 10/17/1994 JLB : Created. * - *=============================================================================================*/ +// Opens the file object with the rights specified. This only works if the file has already been +// assigned a filename. It is guaranteed, by the error handler, that this routine will always return +// with success. int RawFileClass::Open(int rights) { Close(); @@ -473,23 +290,10 @@ int RawFileClass::Open(int rights) } -/*********************************************************************************************** - * RawFileClass::Is_Available -- Checks to see if the specified file is available to open. * - * * - * This routine will examine the disk system to see if the specified file can be opened * - * or not. Use this routine before opening a file in order to make sure that is available * - * or to perform other necessary actions. * - * * - * INPUT: force -- Should this routine keep retrying until the file becomes available? If * - * in this case it doesn't become available, then the program will abort. * - * * - * OUTPUT: bool; Is the file available to be opened? * - * * - * WARNINGS: Depending on the parameter passed in, this routine may never return. * - * * - * HISTORY: * - * 10/18/1994 JLB : Created. * - *=============================================================================================*/ +// Checks to see if the specified file is available to open. Use this routine before opening a file +// in order to make sure that it is available or to perform other necessary actions. +// WARNING: If force is true, this routine keeps retrying until the file becomes available, and it +// may never return. If it doesn't become available, then the program will abort. bool RawFileClass::Is_Available(int forced) { if (Filename.Is_Empty()) return(false); @@ -539,20 +343,8 @@ bool RawFileClass::Is_Available(int forced) } -/*********************************************************************************************** - * RawFileClass::Close -- Perform a closure of the file. * - * * - * Close the file object. In the rare case of an error, handle it as appropriate. * - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: Some rare error conditions may cause this routine to abort the program. * - * * - * HISTORY: * - * 10/18/1994 JLB : Created. * - *=============================================================================================*/ +// Perform a closure of the file. In the rare case of an error, handle it as appropriate. +// WARNING: Some rare error conditions may cause this routine to abort the program. void RawFileClass::Close() { /* @@ -579,28 +371,10 @@ void RawFileClass::Close() } -/*********************************************************************************************** - * RawFileClass::Read -- Reads the specified number of bytes into a memory buffer. * - * * - * This routine will read the specified number of bytes and place the data into the buffer * - * indicated. It is legal to call this routine with a request for more bytes than are in * - * the file. This condition can result in fewer bytes being read than requested. Determine * - * this by examining the return value. * - * * - * INPUT: buffer -- Pointer to the buffer to read data into. If nullptr is passed, no read * - * is performed. * - * * - * size -- The number of bytes to read. If nullptr is passed, then no read is * - * performed. * - * * - * OUTPUT: Returns with the number of bytes read into the buffer. If this number is less * - * than requested, it indicates that the file has been exhausted. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 10/18/1994 JLB : Created. * - *=============================================================================================*/ +// Reads the specified number of bytes into a memory buffer. If buffer or size is null, no read is +// performed. It is legal to call this routine with a request for more bytes than are in the file. +// This condition can result in fewer bytes being read than requested. Determine this by examining +// the return value. int RawFileClass::Read(void * buffer, int size) { long bytesread = 0; // Running count of the number of bytes read into the buffer. @@ -660,24 +434,9 @@ int RawFileClass::Read(void * buffer, int size) } -/*********************************************************************************************** - * RawFileClass::Write -- Writes the specified data to the buffer specified. * - * * - * This routine will write the data specified to the file. * - * * - * INPUT: buffer -- The buffer that holds the data to write. * - * * - * size -- The number of bytes to write to the file. * - * * - * OUTPUT: Returns with the number of bytes written to the file. This routine catches the * - * case of a disk full condition, so this routine will always return with the number * - * matching the size request. * - * * - * WARNINGS: A fatal file condition could cause this routine to never return. * - * * - * HISTORY: * - * 10/18/1994 JLB : Created. * - *=============================================================================================*/ +// Writes the specified data to the file. A disk full condition is caught, so this routine will +// always return with the number matching the size request. +// WARNING: A fatal file condition could cause this routine to never return. int RawFileClass::Write(void const * buffer, int size) { long byteswritten = 0; @@ -728,27 +487,10 @@ int RawFileClass::Write(void const * buffer, int size) } -/*********************************************************************************************** - * RawFileClass::Seek -- Reposition the file pointer as indicated. * - * * - * Use this routine to move the filepointer to the position indicated. It can move either * - * relative to current position or absolute from the beginning or ending of the file. This * - * routine will only return if it successfully performed the seek. * - * * - * INPUT: pos -- The position to seek to. This is interpreted as relative to the position * - * indicated by the "dir" parameter. * - * * - * dir -- The relative position to relate the seek to. This can be either SEEK_SET * - * for the beginning of the file, SEEK_CUR for the current position, or * - * SEEK_END for the end of the file. * - * * - * OUTPUT: This routine returns the position that the seek ended up at. * - * * - * WARNINGS: If there was a file error, then this routine might never return. * - * * - * HISTORY: * - * 10/18/1994 JLB : Created. * - *=============================================================================================*/ +// Reposition the file pointer as indicated. It can move either relative to current position or +// absolute from the beginning or ending of the file. This routine will only return if it +// successfully performed the seek. +// WARNING: If there was a file error, then this routine might never return. int RawFileClass::Seek(int pos, int dir) { @@ -802,22 +544,9 @@ int RawFileClass::Seek(int pos, int dir) } -/*********************************************************************************************** - * RawFileClass::Size -- Determines size of file (in bytes). * - * * - * Use this routine to determine the size of the file. The file must exist or this is an * - * error condition. * - * * - * INPUT: none * - * * - * OUTPUT: Returns with the number of bytes in the file. * - * * - * WARNINGS: This routine handles error conditions and will not return unless the file * - * exists and can successfully be queried for file length. * - * * - * HISTORY: * - * 10/18/1994 JLB : Created. * - *=============================================================================================*/ +// The file must exist or this is an error condition. +// WARNING: This routine handles error conditions and will not return unless the file exists and can +// successfully be queried for file length. int RawFileClass::Size() { int size = 0; @@ -871,22 +600,10 @@ int RawFileClass::Size() } -/*********************************************************************************************** - * RawFileClass::Create -- Creates an empty file. * - * * - * This routine will create an empty file from the file object. The file object's filename * - * must already have been assigned before this routine will function. * - * * - * INPUT: none * - * * - * OUTPUT: bool; Was the file successfully created? This routine will always return true. * - * * - * WARNINGS: A fatal error condition could occur with this routine. Especially if the disk * - * is full or a read-only media was selected. * - * * - * HISTORY: * - * 10/18/1994 JLB : Created. * - *=============================================================================================*/ +// Creates an empty file. The file object's filename must already have been assigned before this +// routine will function. +// WARNING: A fatal error condition could occur with this routine. Especially if the disk is full or +// a read-only media was selected. int RawFileClass::Create() { Close(); @@ -908,23 +625,7 @@ int RawFileClass::Create() } -/*********************************************************************************************** - * RawFileClass::Delete -- Deletes the file object from the disk. * - * * - * This routine will delete the file object from the disk. If the file object doesn't * - * exist, then this routine will return as if it had succeeded (since the effect is the * - * same). * - * * - * INPUT: none * - * * - * OUTPUT: bool; Was the file deleted? If the file was already missing, the this value will * - * be false. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 10/18/1994 JLB : Created. * - *=============================================================================================*/ +// Deletes the file object from the disk. Returns false if the file was already missing. int RawFileClass::Delete() { /* @@ -971,22 +672,7 @@ int RawFileClass::Delete() return(true); } -/*********************************************************************************************** - * RawFileClass::Get_Date_Time -- Gets the date and time the file was last modified. * - * * - * Use this routine to get the date and time of the file. * - * * - * INPUT: none * - * * - * OUTPUT: Returns with the file date and time as a long. * - * Use the YEAR(long), MONTH(),.... * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/14/1995 DRD : Created. * - * 07/13/1996 JLB : Handles win32 method. * - *=============================================================================================*/ +// Gets the date and time the file was last modified. unsigned long RawFileClass::Get_Date_Time() { // Return value @@ -1014,21 +700,7 @@ unsigned long RawFileClass::Get_Date_Time() } -/*********************************************************************************************** - * RawFileClass::Set_Date_Time -- Sets the date and time the file was last modified. * - * * - * Use this routine to set the date and time of the file. * - * * - * INPUT: the file date and time as a long * - * * - * OUTPUT: successful or not if the file date and time was changed. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/14/1995 DRD : Created. * - * 07/13/1996 JLB : Handles win 32 method * - *=============================================================================================*/ +// Sets the date and time the file was last modified. bool RawFileClass::Set_Date_Time(unsigned long datetime) { DEBUG_ASSERTLOG(false, ("Set_Date_Time is not implemented")); @@ -1036,27 +708,9 @@ bool RawFileClass::Set_Date_Time(unsigned long datetime) } -/*********************************************************************************************** - * RawFileClass::Bias -- Bias a file with a specific starting position and length. * - * * - * This will bias a file by giving it an artificial starting position and length. By * - * using this routine, it is possible to 'fool' the file into ignoring a header and * - * trailing extra data. An example of this would be a file inside of a mixfile. * - * * - * INPUT: start -- The starting offset that will now be considered the start of the * - * file. * - * * - * length -- The forced length of the file. For files that are opened for write, * - * this serves as the artificial constraint on the file's length. For * - * files opened for read, this limits the usable file size. * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 06/02/1996 JLB : Created. * - *=============================================================================================*/ +// Bias a file with a specific starting position and length. By using this routine, it is possible +// to 'fool' the file into ignoring a header and trailing extra data. An example of this would be a +// file inside of a mixfile. void RawFileClass::Bias(int start, int length) { if (start == 0) { @@ -1082,24 +736,9 @@ void RawFileClass::Bias(int start, int length) } -/*********************************************************************************************** - * RawFileClass::Raw_Seek -- Performs a seek on the unbiased file * - * * - * This will perform a seek on the file as if it were unbiased. This is in spite of any * - * bias setting the file may have. The ability to perform a raw seek in this fasion is * - * necessary to maintain the bias ability. * - * * - * INPUT: pos -- The position to seek the file relative to the "dir" parameter. * - * * - * dir -- The origin of the seek operation. * - * * - * OUTPUT: Returns with the new position of the seek operation. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 08/04/1996 JLB : Created. * - *=============================================================================================*/ +// Performs a seek on the file as if it were unbiased. This is in spite of any bias setting the file +// may have. The ability to perform a raw seek in this fashion is necessary to maintain the bias +// ability. int RawFileClass::Raw_Seek(int pos, int dir) { /* @@ -1129,18 +768,7 @@ int RawFileClass::Raw_Seek(int pos, int dir) return(pos); } -/*********************************************************************************************** - * RawFileClass::Attach -- Provides a file handle for the class to use. - * * - * INPUT: handle -- the Win32 file handle. - * * - * OUTPUT: - * * - * WARNINGS: none * - * * - * HISTORY: * - * 06/10/1999 PDS : Created. * - *=============================================================================================*/ +// Provides a file handle for the class to use. void RawFileClass::Attach (void *handle, int rights) { Reset (); @@ -1154,18 +782,7 @@ void RawFileClass::Attach (void *handle, int rights) Handle = (FILE *)handle; } -/*********************************************************************************************** - * RawFileClass::Detach -- Removes the file handle from the object without closing the handle. - * * - * INPUT - * * - * OUTPUT: - * * - * WARNINGS: none * - * * - * HISTORY: * - * 06/10/1999 PDS : Created. * - *=============================================================================================*/ +// Removes the file handle from the object without closing the handle. void RawFileClass::Detach () { Rights = 0; diff --git a/Core/Libraries/Source/WWVegas/WWLib/rcfile.cpp b/Core/Libraries/Source/WWVegas/WWLib/rcfile.cpp index 446d9ac1ecd..164a3d82c83 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/rcfile.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/rcfile.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 5 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ diff --git a/Core/Libraries/Source/WWVegas/WWLib/rcfile.h b/Core/Libraries/Source/WWVegas/WWLib/rcfile.h index 640a16d29be..319cd385f21 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/rcfile.h +++ b/Core/Libraries/Source/WWVegas/WWLib/rcfile.h @@ -30,8 +30,6 @@ * * * $Revision:: 8 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/readline.cpp b/Core/Libraries/Source/WWVegas/WWLib/readline.cpp index c306f37719b..0c4caf3722d 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/readline.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/readline.cpp @@ -30,11 +30,6 @@ * * * $Revision:: 4 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * strtrim -- Trim leading and trailing white space off of string. * - * Read_Line -- Read a text line from the file. * - * Read_Line -- Reads a text line from the straw object specified. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "always.h" @@ -44,27 +39,8 @@ #include "XSTRAW.h" -/*********************************************************************************************** - * Read_Line -- Read a text line from the file. * - * * - * This will read a line of text from the file specified. * - * * - * INPUT: file -- Reference to the file to read the line from. * - * * - * buffer -- Pointer to the location to store the line of text. * - * * - * len -- The length of the buffer to store the line. * - * * - * eof -- Reference to the EOF flag that will be set to true if the source * - * file has been exhausted. * - * * - * OUTPUT: Returns with the number of characters stored into the buffer. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 02/06/1997 JLB : Created. * - *=============================================================================================*/ +// Read a text line from the file. The EOF flag is set to true if the source file has been +// exhausted. int Read_Line(FileClass & file, char * buffer, int len, bool & eof) { FileStraw fs(file); @@ -72,27 +48,8 @@ int Read_Line(FileClass & file, char * buffer, int len, bool & eof) } -/*********************************************************************************************** - * Read_Line -- Reads a text line from the straw object specified. * - * * - * This reads a line of text from the straw object. * - * * - * INPUT: file -- Reference to the straw object to fetch the line of text from. * - * * - * buffer -- Pointer to the buffer that will hold the line of text. * - * * - * len -- The size of the buffer. * - * * - * eof -- Reference to the EOF flag that will be set to true if the source * - * straw data has been exhausted. * - * * - * OUTPUT: Returns with the number of characters stored into the buffer. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 02/06/1997 JLB : Created. * - *=============================================================================================*/ +// Reads a text line from the straw object specified. The EOF flag is set to true if the source straw +// data has been exhausted. int Read_Line(Straw & file, char * buffer, int len, bool & eof) { if (len == 0 || buffer == nullptr) return(0); diff --git a/Core/Libraries/Source/WWVegas/WWLib/readline.h b/Core/Libraries/Source/WWVegas/WWLib/readline.h index 5e1ce4a4155..18c45546735 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/readline.h +++ b/Core/Libraries/Source/WWVegas/WWLib/readline.h @@ -30,8 +30,6 @@ * * * $Revision:: 3 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/realcrc.cpp b/Core/Libraries/Source/WWVegas/WWLib/realcrc.cpp index d4ff35607fa..873127e002d 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/realcrc.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/realcrc.cpp @@ -30,11 +30,6 @@ * * * $Revision:: 3 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * CRC_Memory -- calculates a CRC for a block of memory * - * CRC_String -- Calculates a CRC for a null-terminated string * - * CRC_Stringi -- Calculates a CRC for a string, case-insensitive * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "realcrc.h" @@ -112,17 +107,6 @@ unsigned long CRC32_Table[ 256 ] = #define CRC32(c,crc) (CRC32_Table[((unsigned long)(crc) ^ (c)) & 0xFFL] ^ (((crc) >> 8) & 0x00FFFFFFL)) -/*********************************************************************************************** - * CRC_Memory -- calculates a CRC for a block of memory * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *=============================================================================================*/ unsigned long CRC_Memory( const unsigned char *data, unsigned long length, unsigned long crc ) { crc ^= 0xFFFFFFFF; // invert previous CRC @@ -133,17 +117,7 @@ unsigned long CRC_Memory( const unsigned char *data, unsigned long length, unsig } -/*********************************************************************************************** - * CRC_String -- Calculates a CRC for a null-terminated string * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *=============================================================================================*/ +// Calculates a CRC for a null-terminated string. unsigned long CRC_String( const char *string, unsigned long crc ) { crc ^= 0xFFFFFFFF; // invert previous CRC @@ -154,17 +128,7 @@ unsigned long CRC_String( const char *string, unsigned long crc ) } -/*********************************************************************************************** - * CRC_Stringi -- Calculates a CRC for a string, case-insensitive * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *=============================================================================================*/ +// Calculates a CRC for a string, case-insensitive. unsigned long CRC_Stringi( const char *string, unsigned long crc ) { crc ^= 0xFFFFFFFF; // invert previous CRC diff --git a/Core/Libraries/Source/WWVegas/WWLib/realcrc.h b/Core/Libraries/Source/WWVegas/WWLib/realcrc.h index c858e5f5836..611e6543ef7 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/realcrc.h +++ b/Core/Libraries/Source/WWVegas/WWLib/realcrc.h @@ -30,8 +30,6 @@ * * * $Revision:: 3 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/ref_ptr.h b/Core/Libraries/Source/WWVegas/WWLib/ref_ptr.h index 2da5be0026b..c7051649929 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/ref_ptr.h +++ b/Core/Libraries/Source/WWVegas/WWLib/ref_ptr.h @@ -30,8 +30,6 @@ * * * $Revision:: 3 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/refcount.cpp b/Core/Libraries/Source/WWVegas/WWLib/refcount.cpp index 9801ba4f402..8fbb8c0a38a 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/refcount.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/refcount.cpp @@ -30,12 +30,6 @@ * * * $Revision:: 17 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * RefCountClass::Add_Active_Ref -- add a new referenced object to the list * - * RefCountClass::Set_Ref_Owner -- update the owner file/line for the given object * - * RefCountClass::Remove_Active_Ref -- remove an object from the active refs list * - * RefCountClass::Validate_Active_Ref -- Confirm a pointer has a node in the active ref list * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -56,18 +50,7 @@ RefCountListClass RefCountClass::ActiveRefList; -/*********************************************************************************************** - * RefCountClass::Add_Active_Ref -- add a new referenced object to the list * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/16/98 GTH : Created. * - *=============================================================================================*/ +// Add a new referenced object to the list. RefCountClass * RefCountClass::Add_Active_Ref(RefCountClass *obj) { ActiveRefList.Add_Head(&(obj->ActiveRefNode)); @@ -76,18 +59,7 @@ RefCountClass * RefCountClass::Add_Active_Ref(RefCountClass *obj) return obj; } -/*********************************************************************************************** - * RefCountClass::Set_Ref_Owner -- update the owner file/line for the given object * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/16/98 GTH : Created. * - *=============================================================================================*/ +// Update the owner file/line for the given object. RefCountClass * RefCountClass::Set_Ref_Owner(RefCountClass *obj,const char * file,int line) { // static RefCountClass *hunt = (RefCountClass *)0x06558890; @@ -101,18 +73,6 @@ RefCountClass * RefCountClass::Set_Ref_Owner(RefCountClass *obj,const char * fil } -/*********************************************************************************************** - * RefCountClass::Remove_Active_Ref -- remove an object from the active refs list * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/16/98 GTH : Created. * - *=============================================================================================*/ void RefCountClass::Remove_Active_Ref(RefCountClass * obj) { #ifdef PARANOID_REFCOUNTS @@ -121,18 +81,7 @@ void RefCountClass::Remove_Active_Ref(RefCountClass * obj) obj->ActiveRefNode.Unlink(); } -/*********************************************************************************************** - * RefCountClass::Validate_Active_Ref -- Confirm a pointer has a node in the active ref list * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/06/99 EHC: Created. * - *=============================================================================================*/ +// Confirm a pointer has a node in the active ref list. bool RefCountClass::Validate_Active_Ref(RefCountClass * obj) { RefCountNodeClass *node = ActiveRefList.First(); @@ -143,18 +92,6 @@ bool RefCountClass::Validate_Active_Ref(RefCountClass * obj) return false; } -/*********************************************************************************************** - * RefCountClass::Inc_Total_Refs -- increments the total reference count * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/06/99 EHC: Created. * - *=============================================================================================*/ void RefCountClass::Inc_Total_Refs(const RefCountClass * obj) { #ifdef PARANOID_REFCOUNTS @@ -178,18 +115,7 @@ void RefCountClass::Add_Ref() const Inc_Total_Refs(this); } -/*********************************************************************************************** - * RefCountClass::Validate_Active_Ref -- decrements the total reference count * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/06/99 EHC: Created. * - *=============================================================================================*/ +// Decrements the total reference count. void RefCountClass::Dec_Total_Refs(const RefCountClass * obj) { #ifdef PARANOID_REFCOUNTS diff --git a/Core/Libraries/Source/WWVegas/WWLib/refcount.h b/Core/Libraries/Source/WWVegas/WWLib/refcount.h index d1522853043..346492b7bd8 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/refcount.h +++ b/Core/Libraries/Source/WWVegas/WWLib/refcount.h @@ -30,8 +30,6 @@ * * * $Revision:: 24 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/registry.cpp b/Core/Libraries/Source/WWVegas/WWLib/registry.cpp index 82e4259031e..1b52c5e4f0b 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/registry.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/registry.cpp @@ -336,22 +336,7 @@ void RegistryClass::Set_String( const WCHAR * name, const WCHAR *value ) -/*********************************************************************************************** - * RegistryClass::Save_Registry_Values -- Save values in a key to an .ini file * - * * - * * - * * - * INPUT: Handle to key * - * Path to key * - * INI * - * * - * OUTPUT: Nothing * - * * - * WARNINGS: None * - * * - * HISTORY: * - * 11/21/2001 3:32PM ST : Created * - *=============================================================================================*/ +// Save values in a key to an .ini file. void RegistryClass::Save_Registry_Values(HKEY key, char *path, INIClass *ini) { int index = 0; @@ -413,21 +398,7 @@ void RegistryClass::Save_Registry_Values(HKEY key, char *path, INIClass *ini) -/*********************************************************************************************** - * RegistryClass::Save_Registry_Tree -- Save out a whole chunk or registry as an .INI * - * * - * * - * * - * INPUT: Registry path * - * INI to write to * - * * - * OUTPUT: Nothing * - * * - * WARNINGS: None * - * * - * HISTORY: * - * 11/21/2001 3:33PM ST : Created * - *=============================================================================================*/ +// Save out a whole chunk or registry as an .INI. void RegistryClass::Save_Registry_Tree(char *path, INIClass *ini) { HKEY base_key; @@ -493,21 +464,6 @@ void RegistryClass::Save_Registry_Tree(char *path, INIClass *ini) -/*********************************************************************************************** - * RegistryClass::Save_Registry -- Save a chunk of registry to an .ini file. * - * * - * * - * * - * INPUT: File name * - * Registry path * - * * - * OUTPUT: Nothing * - * * - * WARNINGS: None * - * * - * HISTORY: * - * 11/21/2001 3:36PM ST : Created * - *=============================================================================================*/ void RegistryClass::Save_Registry(const char *filename, char *path) { RawFileClass file(filename); @@ -518,20 +474,6 @@ void RegistryClass::Save_Registry(const char *filename, char *path) -/*********************************************************************************************** - * RegistryClass::Load_Registry -- Load a chunk of registry from an .INI file * - * * - * * - * * - * INPUT: Nothing * - * * - * OUTPUT: Nothing * - * * - * WARNINGS: None * - * * - * HISTORY: * - * 11/21/2001 3:35PM ST : Created * - *=============================================================================================*/ void RegistryClass::Load_Registry(const char *filename, char *old_path, char *new_path) { if (!IsLocked) { @@ -600,20 +542,7 @@ void RegistryClass::Load_Registry(const char *filename, char *old_path, char *ne -/*********************************************************************************************** - * RegistryClass::Delete_Registry_Values -- Delete all values under the given key * - * * - * * - * * - * INPUT: Key handle * - * * - * OUTPUT: Nothing * - * * - * WARNINGS: None * - * * - * HISTORY: * - * 11/21/2001 3:37PM ST : Created * - *=============================================================================================*/ +// Delete all values under the given key. void RegistryClass::Delete_Registry_Values(HKEY key) { int index = 0; @@ -637,20 +566,8 @@ void RegistryClass::Delete_Registry_Values(HKEY key) -/*********************************************************************************************** - * RegistryClass::Delete_Registry_Tree -- Delete all values and sub keys of a registry key * - * * - * * - * * - * INPUT: Registry path to delete * - * * - * OUTPUT: Nothing * - * * - * WARNINGS: !!!!! DANGER DANGER !!!!! * - * * - * HISTORY: * - * 11/21/2001 3:38PM ST : Created * - *=============================================================================================*/ +// Delete all values and sub keys of a registry key. +// WARNING: !!!!! DANGER DANGER !!!!! void RegistryClass::Delete_Registry_Tree(char *path) { if (!IsLocked) { diff --git a/Core/Libraries/Source/WWVegas/WWLib/search.h b/Core/Libraries/Source/WWVegas/WWLib/search.h index 2cde59779b2..16953ab25f4 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/search.h +++ b/Core/Libraries/Source/WWVegas/WWLib/search.h @@ -30,23 +30,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * IndexClass::Add_Index -- Add element to index tracking system. * - * IndexClass::Clear -- Clear index handler to empty state. * - * IndexClass::Count -- Fetch the number of index entries recorded. * - * IndexClass::Fetch_Index -- Fetch data from specified index. * - * IndexClass::Increase_Table_Size -- Increase the internal index table capacity. * - * IndexClass::IndexClass -- Constructor for index handler. * - * IndexClass::Invalidate_Archive -- Invalidate the archive pointer. * - * IndexClass::Is_Archive_Same -- Checks to see if archive pointer is same as index. * - * IndexClass::Is_Present -- Checks for presence of index entry. * - * IndexClass::Remove_Index -- Find matching index and remove it from system. * - * IndexClass::Search_For_Node -- Perform a search for the specified node ID * - * IndexClass::Set_Archive -- Records the node pointer into the archive. * - * IndexClass::Sort_Nodes -- Sorts nodes in preparation for a binary search. * - * IndexClass::~IndexClass -- Destructor for index handler object. * - * compfunc -- Support function for bsearch and bsort. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once @@ -184,20 +167,7 @@ class IndexClass }; -/*********************************************************************************************** - * IndexClass::IndexClass -- Constructor for index handler. * - * * - * This constructs an empty index handler. * - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/02/1996 JLB : Created. * - *=============================================================================================*/ +// Constructs an empty index handler. template IndexClass::IndexClass() : IndexTable(0), @@ -210,20 +180,7 @@ IndexClass::IndexClass() : } -/*********************************************************************************************** - * IndexClass::~IndexClass -- Destructor for index handler object. * - * * - * This will destruct and free any resources managed by this index handler. * - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/02/1996 JLB : Created. * - *=============================================================================================*/ +// Frees any resources managed by this index handler. template IndexClass::~IndexClass() { @@ -231,21 +188,8 @@ IndexClass::~IndexClass() } -/*********************************************************************************************** - * IndexClass::Clear -- Clear index handler to empty state. * - * * - * This routine will free all internal resources and bring the index handler into a * - * known empty state. After this routine, the index handler is free to be reused. * - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/02/1996 JLB : Created. * - *=============================================================================================*/ +// Frees all internal resources and brings the index handler into a known empty state. After this +// routine, the index handler is free to be reused. template void IndexClass::Clear() { @@ -258,22 +202,9 @@ void IndexClass::Clear() } -/*********************************************************************************************** - * IndexClass::Increase_Table_Size -- Increase the internal index table capacity. * - * * - * This helper function will increase the capacity of the internal index table without * - * performing any alterations to the index data. Use this routine prior to adding a new * - * element if the existing capacity is insufficient. * - * * - * INPUT: amount -- The number of index element spaces to add to its capacity. * - * * - * OUTPUT: bool; Was the internal capacity increased without error? * - * * - * WARNINGS: If there is insufficient RAM, then this routine will fail. * - * * - * HISTORY: * - * 11/02/1996 JLB : Created. * - *=============================================================================================*/ +// Increases the capacity of the internal index table without altering the index data. Use this +// routine prior to adding a new element if the existing capacity is insufficient. +// WARNING: If there is insufficient RAM, then this routine will fail. template bool IndexClass::Increase_Table_Size(int amount) { @@ -314,21 +245,7 @@ bool IndexClass::Increase_Table_Size(int amount) } -/*********************************************************************************************** - * IndexClass::Count -- Fetch the number of index entries recorded. * - * * - * This will return the quantity of index entries that have been recorded by this index * - * handler. * - * * - * INPUT: none * - * * - * OUTPUT: Returns with number of recorded indices present. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/02/1996 JLB : Created. * - *=============================================================================================*/ +// Returns the number of index entries recorded by this index handler. template int IndexClass::Count() const { @@ -336,21 +253,7 @@ int IndexClass::Count() const } -/*********************************************************************************************** - * IndexClass::Is_Present -- Checks for presence of index entry. * - * * - * This routine will scan for the specified index entry. If it was found, then 'true' is * - * returned. * - * * - * INPUT: id -- The index ID to search for. * - * * - * OUTPUT: bool; Was the index entry found in this index handler object? * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/02/1996 JLB : Created. * - *=============================================================================================*/ +// Checks for presence of index entry. template bool IndexClass::Is_Present(int id) const { @@ -393,22 +296,10 @@ bool IndexClass::Is_Present(int id) const } -/*********************************************************************************************** - * IndexClass::Fetch_Index -- Fetch data from specified index. * - * * - * This routine will find the specified index and return the data value associated with it. * - * * - * INPUT: id -- The index ID to search for. * - * * - * OUTPUT: Returns with the data value associated with the index value. * - * * - * WARNINGS: This routine presumes that the index exists. If it doesn't exist, then the * - * default constructed object "T" is returned instead. To avoid this problem, * - * always verfiy the existence of the index by calling Is_Present() first. * - * * - * HISTORY: * - * 11/02/1996 JLB : Created. * - *=============================================================================================*/ +// Fetch data from specified index. +// WARNING: This routine presumes that the index exists. If it doesn't exist, then the default +// constructed object "T" is returned instead. To avoid this problem, always verify the existence of +// the index by calling Is_Present() first. template T IndexClass::Fetch_Index(int id) const { @@ -425,21 +316,7 @@ T IndexClass::Fetch_Index(int id) const } -/*********************************************************************************************** - * IndexClass::Is_Archive_Same -- Checks to see if archive pointer is same as index. * - * * - * This routine compares the specified index ID with the previously recorded index archive * - * pointer in order to determine if they match. * - * * - * INPUT: id -- The index ID to compare to the archive index object pointer. * - * * - * OUTPUT: bool; Does the specified index match the archive pointer? * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/02/1996 JLB : Created. * - *=============================================================================================*/ +// Checks if the index ID matches the previously recorded index archive pointer. template bool IndexClass::Is_Archive_Same(int id) const { @@ -450,22 +327,8 @@ bool IndexClass::Is_Archive_Same(int id) const } -/*********************************************************************************************** - * IndexClass::Invalidate_Archive -- Invalidate the archive pointer. * - * * - * This routine will set the archive pointer to an invalid state. This must be performed * - * if ever the archive pointer would become illegal (such as when the element it refers to * - * is deleted). * - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/02/1996 JLB : Created. * - *=============================================================================================*/ +// This routine will set the archive pointer to an invalid state. This must be performed if ever the +// archive pointer would become illegal (such as when the element it refers to is deleted). template void IndexClass::Invalidate_Archive() { @@ -473,21 +336,8 @@ void IndexClass::Invalidate_Archive() } -/*********************************************************************************************** - * IndexClass::Set_Archive -- Records the node pointer into the archive. * - * * - * This routine records the specified node pointer. Use this routine when there is a * - * good chance that the specified node will be requested in the immediate future. * - * * - * INPUT: node -- Pointer to the node to assign to the archive. * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/02/1996 JLB : Created. * - *=============================================================================================*/ +// Records the node pointer into the archive. Use this routine when there is a good chance that the +// specified node will be requested in the immediate future. template void IndexClass::Set_Archive(NodeElement const * node) { @@ -495,26 +345,9 @@ void IndexClass::Set_Archive(NodeElement const * node) } -/*********************************************************************************************** - * IndexClass::Add_Index -- Add element to index tracking system. * - * * - * This routine will record the index information into this index manager object. It * - * associates the index number with the data specified. The data is copied to an internal * - * storage location. * - * * - * INPUT: id -- The ID number to associate with the data. * - * * - * data -- The data to store. * - * * - * OUTPUT: bool; Was the element added without error? Failure indicates that RAM has been * - * exhausted. * - * * - * WARNINGS: The data is COPIED to internal storage. This means that the data object must * - * have a functional and efficient copy constructor and assignment operator. * - * * - * HISTORY: * - * 11/02/1996 JLB : Created. * - *=============================================================================================*/ +// Associates the index number with the data specified. Returns false if RAM has been exhausted. +// WARNING: The data is COPIED to internal storage. This means that the data object must have a +// functional and efficient copy constructor and assignment operator. template bool IndexClass::Add_Index(int id, T data) { @@ -545,21 +378,7 @@ bool IndexClass::Add_Index(int id, T data) } -/*********************************************************************************************** - * IndexClass::Remove_Index -- Find matching index and remove it from system. * - * * - * This will scan through the previously added index elements and if a match was found, it * - * will be removed. * - * * - * INPUT: id -- The index ID to search for and remove. * - * * - * OUTPUT: bool; Was the index element found and removed? * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/02/1996 JLB : Created. * - *=============================================================================================*/ +// Find matching index and remove it from system. template bool IndexClass::Remove_Index(int id) { @@ -600,23 +419,10 @@ bool IndexClass::Remove_Index(int id) } -/*********************************************************************************************** - * compfunc -- Support function for bsearch and bsort. * - * * - * This compare function presumes that its parameters are pointing to NodeElements and that * - * the first "int" in the node is the index ID number to be used for comparison. * - * * - * INPUT: ptr1 -- Pointer to first node. * - * * - * ptr2 -- Pointer to second node. * - * * - * OUTPUT: Returns with the comparision value between the two nodes. * - * * - * WARNINGS: This is highly dependent upon the layout of the NodeElement structure. * - * * - * HISTORY: * - * 11/02/1996 JLB : Created. * - *=============================================================================================*/ +// Support function for bsearch and bsort. This compare function presumes that its parameters are +// pointing to NodeElements and that the first "int" in the node is the index ID number to be used +// for comparison. +// WARNING: This is highly dependent upon the layout of the NodeElement structure. template int _USERENTRY IndexClass::search_compfunc(void const * ptr1, void const * ptr2) { @@ -630,22 +436,8 @@ int _USERENTRY IndexClass::search_compfunc(void const * ptr1, void const * pt } -/*********************************************************************************************** - * IndexClass::Search_For_Node -- Perform a search for the specified node ID * - * * - * This routine will perform a binary search on the previously recorded index values and * - * if a match was found, it will return a pointer to the NodeElement. * - * * - * INPUT: id -- The index ID to search for. * - * * - * OUTPUT: Returns with a pointer to the NodeElement that matches the index ID specified. If * - * no matching index could be found, then nullptr is returned. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 11/02/1996 JLB : Created. * - *=============================================================================================*/ +// Performs a binary search on the previously recorded index values. Returns nullptr if no matching +// index could be found. template IndexClass::NodeElement const * IndexClass::Search_For_Node(int id) const { diff --git a/Core/Libraries/Source/WWVegas/WWLib/sharebuf.h b/Core/Libraries/Source/WWVegas/WWLib/sharebuf.h index 6aa6d2d144d..7ad196f36c1 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/sharebuf.h +++ b/Core/Libraries/Source/WWVegas/WWLib/sharebuf.h @@ -30,8 +30,6 @@ * * * $Revision:: 8 $* * * - *-------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/simplevec.h b/Core/Libraries/Source/WWVegas/WWLib/simplevec.h index 1bf6dd01af7..280a451575b 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/simplevec.h +++ b/Core/Libraries/Source/WWVegas/WWLib/simplevec.h @@ -32,19 +32,6 @@ * * * $Revision:: 16 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * SimpleVecClass::SimpleVecClass -- Constructor * - * SimpleVecClass::~SimpleVecClass -- Destructor * - * SimpleVecClass::Resize -- resize the array * - * SimpleVecClass::Uninitialised_Grow -- upscale the array, don't copy contents * - * SimpleDynVecClass::~SimpleDynVecClass -- Destructor * - * SimpleDynVecClass::SimpleDynVecClass -- Constructor * - * SimpleDynVecClass::Resize -- Resize the array * - * SimpleDynVecClass::Add -- Add an item to the end of the array * - * SimpleDynVecClass::Delete -- Delete an item from the array * - * SimpleDynVecClass::Delete_Range -- delete several items from the array * - * SimpleDynVecClass::Delete_All -- delete all items from the array * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once @@ -86,19 +73,6 @@ template class SimpleVecClass }; -/*********************************************************************************************** - * SimpleVecClass::SimpleVecClass -- Constructor * - * * - * INPUT: * - * size - initial size of the vector * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/25/00 gth : Created. * - *=============================================================================================*/ template inline SimpleVecClass::SimpleVecClass(int size) : Vector(nullptr), @@ -109,18 +83,6 @@ inline SimpleVecClass::SimpleVecClass(int size) : } } -/*********************************************************************************************** - * SimpleVecClass::~SimpleVecClass -- Destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/25/00 gth : Created. * - *=============================================================================================*/ template inline SimpleVecClass::~SimpleVecClass() { @@ -129,18 +91,6 @@ inline SimpleVecClass::~SimpleVecClass() VectorMax = 0; } -/*********************************************************************************************** - * SimpleVecClass::Resize -- resize the array * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/25/00 gth : Created. * - *=============================================================================================*/ template inline bool SimpleVecClass::Resize(int newsize) { @@ -193,20 +143,8 @@ inline bool SimpleVecClass::Resize(int newsize) return true; } -/*********************************************************************************************** - * SimpleVecClass::Uninitialised_Grow -- resize the array if current array is too small. * - * Note that it the function doesn't copy the contents so if resising occurs (contents are * - * assumed uninitialised after the call). * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/6/00 jani : Created. * - *=============================================================================================*/ +// Resize the array if current array is too small. Note that the function doesn't copy the contents, +// so if resizing occurs, the contents are assumed uninitialised after the call. template inline bool SimpleVecClass::Uninitialised_Grow(int newsize) { @@ -285,19 +223,6 @@ template class SimpleDynVecClass : public SimpleVecClass }; -/*********************************************************************************************** - * SimpleDynVecClass::SimpleDynVecClass -- Constructor * - * * - * INPUT: * - * size - initial size of the allocated vector * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/25/00 gth : Created. * - *=============================================================================================*/ template inline SimpleDynVecClass::SimpleDynVecClass(int size) : SimpleVecClass(size), @@ -305,18 +230,6 @@ inline SimpleDynVecClass::SimpleDynVecClass(int size) : { } -/*********************************************************************************************** - * SimpleDynVecClass::~SimpleDynVecClass -- Destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/25/00 gth : Created. * - *=============================================================================================*/ template inline SimpleDynVecClass::~SimpleDynVecClass() { @@ -324,19 +237,6 @@ inline SimpleDynVecClass::~SimpleDynVecClass() Vector = nullptr; } -/*********************************************************************************************** - * SimpleDynVecClass::Resize -- Resize the array * - * * - * INPUT: * - * newsize - new desired size of the array * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/25/00 gth : Created. * - *=============================================================================================*/ template inline bool SimpleDynVecClass::Resize(int newsize) { @@ -347,19 +247,7 @@ inline bool SimpleDynVecClass::Resize(int newsize) return(false); } -/*********************************************************************************************** - * SimpleDynVecClass::Add -- Add an item to the end of the array * - * * - * INPUT: * - * object - object to add to the array * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/25/00 gth : Created. * - *=============================================================================================*/ +// Add an item to the end of the array. template inline bool SimpleDynVecClass::Add(T const & object,int new_size_hint) { @@ -381,18 +269,6 @@ inline bool SimpleDynVecClass::Add(T const & object,int new_size_hint) return true; } -/*********************************************************************************************** - * SimpleDynVecClass::Add_Multiple -- Add room for multiple object to vector. * - * * - * INPUT: number of object slots to add * - * * - * OUTPUT: pointer to first slot added is returned. * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/25/01 bmg : Created. * - *=============================================================================================*/ template inline T * SimpleDynVecClass::Add_Multiple( int number_to_add ) { @@ -411,22 +287,8 @@ inline T * SimpleDynVecClass::Add_Multiple( int number_to_add ) } -/*********************************************************************************************** - * SimpleDynVecClass::Delete -- Delete an item from the array * - * * - * This causes the items below the specified index to be mem-moved up. * - * * - * INPUT: * - * index - index of the entry to delete * - * allow_shrink - should the vector be allowed to resize * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/25/00 gth : Created. * - *=============================================================================================*/ +// Delete an item from the array. This causes the items below the specified index to be mem-moved +// up. template inline bool SimpleDynVecClass::Delete(int index,bool allow_shrink) { @@ -452,22 +314,8 @@ inline bool SimpleDynVecClass::Delete(int index,bool allow_shrink) return true; } -/*********************************************************************************************** - * SimpleDynVecClass::Delete -- Remove the specified object from the vector. * - * * - * This routine will delete the object referenced from the vector. All objects in the * - * vector that follow the one deleted will be moved "down" to fill the hole. * - * * - * INPUT: object -- Reference to the object in this vector that is to be deleted. * - * allow_shrink -- should the vector be allowed to shrink if it is wasting space? * - * * - * OUTPUT: bool; Was the object deleted successfully? * - * * - * WARNINGS: * - * * - * HISTORY: * - * 03/10/1995 JLB : Created. * - *=============================================================================================*/ +// Remove the specified object from the vector. All objects in the vector that follow the one +// deleted will be moved "down" to fill the hole. template inline bool SimpleDynVecClass::Delete(T const & object,bool allow_shrink) { @@ -478,23 +326,8 @@ inline bool SimpleDynVecClass::Delete(T const & object,bool allow_shrink) return(false); } -/*********************************************************************************************** - * SimpleDynVecClass::Delete_Range -- delete several items from the array * - * * - * This causes the items below the specified index range to be mem-moved up. * - * * - * INPUT: * - * start - starting index to delete * - * count - number of entries to delete * - * allow_shrink - should the vector be allowed to shrink * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/25/00 gth : Created. * - *=============================================================================================*/ +// Delete several items from the array. This causes the items below the specified index range to be +// mem-moved up. template inline bool SimpleDynVecClass::Delete_Range(int start,int count,bool allow_shrink) { @@ -522,20 +355,7 @@ inline bool SimpleDynVecClass::Delete_Range(int start,int count,bool allow_sh return true; } -/*********************************************************************************************** - * SimpleDynVecClass::Delete_All -- delete all items from the array * - * * - * Internally, this just resets the ActiveCount... * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/25/00 gth : Created. * - *=============================================================================================*/ +// Delete all items from the array. template inline void SimpleDynVecClass::Delete_All(bool allow_shrink) { @@ -549,20 +369,7 @@ inline void SimpleDynVecClass::Delete_All(bool allow_shrink) } } -/*********************************************************************************************** - * SimpleDynVecClass::Grow -- increase the size of the array * - * * - * Internally, this just resets the ActiveCount... * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/25/00 gth : Created. * - *=============================================================================================*/ +// Increase the size of the array. template inline bool SimpleDynVecClass::Grow(int new_size_hint) { @@ -576,20 +383,7 @@ inline bool SimpleDynVecClass::Grow(int new_size_hint) return Resize(new_size); } -/*********************************************************************************************** - * SimpleDynVecClass::Shrink -- reduce the size of the array * - * * - * Internally, this just resets the ActiveCount... * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/25/00 gth : Created. * - *=============================================================================================*/ +// Reduce the size of the array. template inline bool SimpleDynVecClass::Shrink() { @@ -603,24 +397,8 @@ inline bool SimpleDynVecClass::Shrink() } -/*********************************************************************************************** - * SimpleDynVecClass::Find_Index -- Find matching value in the dynamic vector. * - * * - * Use this routine to find a matching object (by value) in the vector. Unlike the base * - * class ID function of similar name, this one restricts the scan to the current number * - * of valid objects. * - * * - * INPUT: object -- A reference to the object that a match is to be found in the * - * vector. * - * * - * OUTPUT: Returns with the index number of the object that is equivalent to the one * - * specified. If no equivalent object could be found then -1 is returned. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 03/13/1995 JLB : Created. * - *=============================================================================================*/ +// Find matching value in the dynamic vector. This restricts the scan to the current number of valid +// objects. Returns -1 if no equivalent object could be found. template inline int SimpleDynVecClass::Find_Index(T const & object) { diff --git a/Core/Libraries/Source/WWVegas/WWLib/slnode.cpp b/Core/Libraries/Source/WWVegas/WWLib/slnode.cpp index 51240412d13..548fe697fb7 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/slnode.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/slnode.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "SLNODE.h" diff --git a/Core/Libraries/Source/WWVegas/WWLib/stimer.cpp b/Core/Libraries/Source/WWVegas/WWLib/stimer.cpp index 812bd14e34c..1390dfd2c0a 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/stimer.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/stimer.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 4 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "always.h" diff --git a/Core/Libraries/Source/WWVegas/WWLib/stimer.h b/Core/Libraries/Source/WWVegas/WWLib/stimer.h index 0400eba1ad4..d0265459b49 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/stimer.h +++ b/Core/Libraries/Source/WWVegas/WWLib/stimer.h @@ -30,8 +30,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/straw.cpp b/Core/Libraries/Source/WWVegas/WWLib/straw.cpp index 66879439718..108b848c500 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/straw.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/straw.cpp @@ -30,11 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * Straw::Get_From -- Connect one straw segment to another. * - * Straw::Get -- Fetch some data from the straw chain. * - * Straw::~Straw -- Destructor for a straw segment. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "always.h" @@ -42,22 +37,8 @@ #include -/*********************************************************************************************** - * Straw::~Straw -- Destructor for a straw segment. * - * * - * This destructor will remove this segment from the straw chain. If there were any * - * connected segments to either side, they will be joined so that the straw chain will * - * still remain linked. * - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// Removes this segment from the straw chain. If there were any connected segments to either side, +// they will be joined so that the straw chain will still remain linked. Straw::~Straw() { if (ChainTo != nullptr) { @@ -72,22 +53,9 @@ Straw::~Straw() } -/*********************************************************************************************** - * Straw::Get_From -- Connect one straw segment to another. * - * * - * Use this routine to connect straw segments together. The straw segment specified as the * - * parameter will be linked to the chain such that when data is requested, it will be * - * fetched from the specified link before being processed by this link. * - * * - * INPUT: straw -- Pointer to the straw segment that data will be fetched from. * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// Connect one straw segment to another. The straw segment specified as the parameter will be linked +// to the chain such that when data is requested, it will be fetched from the specified link before +// being processed by this link. void Straw::Get_From(Straw * straw) { if (ChainTo != straw) { @@ -108,26 +76,10 @@ void Straw::Get_From(Straw * straw) } -/*********************************************************************************************** - * Straw::Get -- Fetch some data from the straw chain. * - * * - * Use this routine to fetch some data from the straw. It is presumed that this routine * - * will be overridden to provide some useful functionality. At this level, the straw chain * - * merely passes the request on to the next straw in the chain. * - * * - * INPUT: source -- Pointer to the buffer to hold the requested data. * - * * - * length -- The number of bytes requested. * - * * - * OUTPUT: Returns with the number of bytes stored into the buffer. If the number returned * - * is less than the number requested, then this indicates that the straw data has * - * been exhausted. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// Fetch some data from the straw chain. It is presumed that this routine will be overridden to +// provide some useful functionality. At this level, the straw chain merely passes the request on to +// the next straw in the chain. Returns fewer bytes than requested when the straw data has been +// exhausted. int Straw::Get(void * source, int slen) { if (ChainTo != nullptr) { diff --git a/Core/Libraries/Source/WWVegas/WWLib/strtok_r.cpp b/Core/Libraries/Source/WWVegas/WWLib/strtok_r.cpp index 73e94116dc7..8372556b05f 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/strtok_r.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/strtok_r.cpp @@ -30,9 +30,6 @@ * * * $Revision:: 1 $* * * - *-------------------------------------------------------------------------* - * Functions: * - * strtok_r -- POSIX replacement for strtok (no internal static) * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "strtok_r.h" diff --git a/Core/Libraries/Source/WWVegas/WWLib/strtok_r.h b/Core/Libraries/Source/WWVegas/WWLib/strtok_r.h index 0d0d22d691b..d7cf1e9f1eb 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/strtok_r.h +++ b/Core/Libraries/Source/WWVegas/WWLib/strtok_r.h @@ -30,8 +30,6 @@ * * * $Revision:: 2 $* * * - *-------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/swap.h b/Core/Libraries/Source/WWVegas/WWLib/swap.h index b0a61e46c93..29658ec92fe 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/swap.h +++ b/Core/Libraries/Source/WWVegas/WWLib/swap.h @@ -30,8 +30,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/systimer.cpp b/Core/Libraries/Source/WWVegas/WWLib/systimer.cpp index 08d66e17e47..8932e4ceb9c 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/systimer.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/systimer.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "systimer.h" @@ -39,60 +37,21 @@ SysTimeClass SystemTime; -/*********************************************************************************************** - * SysTimeClass::SysTimeClass -- default constructor, sets resolution * - * * - * * - * * - * INPUT: Nothing * - * * - * OUTPUT: Nothing * - * * - * WARNINGS: None * - * * - * HISTORY: * - * 01/04/2003 : Created by Mark Wilczynski (EAP) * - *=============================================================================================*/ +// Sets the timer resolution. SysTimeClass::SysTimeClass() { //tell windows we need single ms precision. timeBeginPeriod(1); } -/*********************************************************************************************** - * SysTimeClass::~SysTimeClass -- default destructor, resets resolution * - * * - * * - * * - * INPUT: Nothing * - * * - * OUTPUT: Nothing * - * * - * WARNINGS: None * - * * - * HISTORY: * - * 01/04/2003 : Created by Mark Wilczynski (EAP) * - *=============================================================================================*/ +// Resets the timer resolution. SysTimeClass::~SysTimeClass() { //tell windows we need single ms precision. timeEndPeriod(1); } -/*********************************************************************************************** - * SysTimeClass::Reset -- Reset class to good state * - * * - * * - * * - * INPUT: Nothing * - * * - * OUTPUT: Nothing * - * * - * WARNINGS: None * - * * - * HISTORY: * - * 12/9/2001 5:51PM ST : Created * - *=============================================================================================*/ +// Reset class to good state. void SysTimeClass::Reset() { StartTime = timeGetTime(); @@ -101,20 +60,7 @@ void SysTimeClass::Reset() -/*********************************************************************************************** - * SysTimeClass::Is_Getting_Late -- Are we running out of timer time? * - * * - * * - * * - * INPUT: Nothing * - * * - * OUTPUT: Nothing * - * * - * WARNINGS: None * - * * - * HISTORY: * - * 12/9/2001 6:04PM ST : Created * - *=============================================================================================*/ +// Are we running out of timer time? bool SysTimeClass::Is_Getting_Late() { /* diff --git a/Core/Libraries/Source/WWVegas/WWLib/systimer.h b/Core/Libraries/Source/WWVegas/WWLib/systimer.h index 8313aa49de8..226cb3d1c6a 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/systimer.h +++ b/Core/Libraries/Source/WWVegas/WWLib/systimer.h @@ -30,8 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once @@ -106,20 +104,7 @@ class SysTimeClass extern SysTimeClass SystemTime; -/*********************************************************************************************** - * SysTimeClass::Get -- Wrapper around system timeGetTime() api call * - * * - * * - * * - * INPUT: Nothing * - * * - * OUTPUT: Current system time in ms * - * * - * WARNINGS: None * - * * - * HISTORY: * - * 10/25/2001 1:38PM ST : Created * - *=============================================================================================*/ +// Wrapper around system timeGetTime() api call. Returns the current system time in ms. WWINLINE unsigned long SysTimeClass::Get() { /* diff --git a/Core/Libraries/Source/WWVegas/WWLib/tgatodxt.cpp b/Core/Libraries/Source/WWVegas/WWLib/tgatodxt.cpp index 64d6f9620e8..fb2c80b8e16 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/tgatodxt.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/tgatodxt.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 4 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma message ("(gth) disabling TGAtoDXTClass temporarily so I can test the WW libs merge...") diff --git a/Core/Libraries/Source/WWVegas/WWLib/tgatodxt.h b/Core/Libraries/Source/WWVegas/WWLib/tgatodxt.h index 778b5934a31..200441da660 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/tgatodxt.h +++ b/Core/Libraries/Source/WWVegas/WWLib/tgatodxt.h @@ -30,8 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/trect.h b/Core/Libraries/Source/WWVegas/WWLib/trect.h index bddfe8487a7..b899729db72 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/trect.h +++ b/Core/Libraries/Source/WWVegas/WWLib/trect.h @@ -30,8 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/trim.cpp b/Core/Libraries/Source/WWVegas/WWLib/trim.cpp index 90fe1285e08..b98ee0b7ed0 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/trim.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/trim.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 4 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "always.h" @@ -41,21 +39,7 @@ #include #endif // _UNIX -/*********************************************************************************************** - * strtrim -- Trim leading and trailing white space off of string. * - * * - * This routine will remove the leading and trailing whitespace from the string specified. * - * The string is modified in place. * - * * - * INPUT: buffer -- Pointer to the string to be trimmed. * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 02/06/1997 JLB : Created. * - *=============================================================================================*/ +// Trim leading and trailing white space off of string. The string is modified in place. char* strtrim(char* buffer) { if (buffer) { diff --git a/Core/Libraries/Source/WWVegas/WWLib/trim.h b/Core/Libraries/Source/WWVegas/WWLib/trim.h index fe022f5a16c..478b928ee85 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/trim.h +++ b/Core/Libraries/Source/WWVegas/WWLib/trim.h @@ -30,8 +30,6 @@ * * * $Revision:: 3 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/uarray.h b/Core/Libraries/Source/WWVegas/WWLib/uarray.h index b4c7c65d1d5..02d1f998e0f 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/uarray.h +++ b/Core/Libraries/Source/WWVegas/WWLib/uarray.h @@ -30,11 +30,6 @@ * * * $Revision:: 7 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * UniqueArrayClass::UniqueArrayClass -- constructor * - * UniqueArrayClass::~UniqueArrayClass -- destructor * - * UniqueArrayClass::Add -- Add an item to the array * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once @@ -97,18 +92,6 @@ template class UniqueArrayClass -/*********************************************************************************************** - * UniqueArrayClass::UniqueArrayClass -- constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/29/98 GTH : Created. * - *=============================================================================================*/ template UniqueArrayClass::UniqueArrayClass(int initial_size,int growth_rate,HashCalculatorClass * hasher) : UniqueItems(initial_size), @@ -130,18 +113,6 @@ UniqueArrayClass::UniqueArrayClass(int initial_size,int growth_rate,HashCalcu } -/*********************************************************************************************** - * UniqueArrayClass::~UniqueArrayClass -- destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/29/98 GTH : Created. * - *=============================================================================================*/ template UniqueArrayClass::~UniqueArrayClass() { @@ -150,21 +121,8 @@ UniqueArrayClass::~UniqueArrayClass() } -/*********************************************************************************************** - * UniqueArrayClass::Add -- Add an item to the array * - * * - * Only adds the item to the end of the array if another duplicate item is not found. Returns * - * the array index of where the item is stored. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/29/98 GTH : Created. * - *=============================================================================================*/ +// Only adds the item to the end of the array if another duplicate item is not found. Returns the +// array index of where the item is stored. template inline int UniqueArrayClass::Add(const T & new_item) { diff --git a/Core/Libraries/Source/WWVegas/WWLib/vector.cpp b/Core/Libraries/Source/WWVegas/WWLib/vector.cpp index b39f7ae1129..a2e00e86e18 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/vector.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/vector.cpp @@ -30,26 +30,6 @@ * * * $Revision:: 20 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * BooleanVectorClass::BooleanVectorClass -- Copy constructor for boolean array. * - * BooleanVectorClass::BooleanVectorClass -- Explicit data buffer constructor. * - * BooleanVectorClass::Clear -- Resets boolean vector to empty state. * - * BooleanVectorClass::Fixup -- Updates the boolean vector to a known state. * - * BooleanVectorClass::Reset -- Clear all boolean values in array. * - * BooleanVectorClass::Resize -- Resizes a boolean vector object. * - * BooleanVectorClass::Set -- Forces all boolean elements to true. * - * BooleanVectorClass::operator = -- Assignment operator. * - * BooleanVectorClass::operator == -- Comparison operator for boolean vector. * - * VectorClass::Clear -- Frees and clears the vector. * - * VectorClass::ID -- Finds object ID based on value. * - * VectorClass::ID -- Pointer based conversion to index number. * - * VectorClass::Resize -- Changes the size of the vector. * - * VectorClass::VectorClass -- Constructor for vector class. * - * VectorClass::VectorClass -- Copy constructor for vector object. * - * VectorClass::operator = -- The assignment operator. * - * VectorClass::operator == -- Equality operator for vector objects. * - * VectorClass::~VectorClass -- Default destructor for vector class. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "always.h" @@ -63,24 +43,10 @@ //---------------------------------------------------------------------------------------------- -/*********************************************************************************************** - * BooleanVectorClass::BooleanVectorClass -- Explicit data buffer constructor. * - * * - * This is the constructor for a boolean array. This constructor takes the memory pointer * - * provided as assigns that as the array data pointer. * - * * - * INPUT: size -- The size of the array (in bits). * - * * - * array -- Pointer to the memory that the array is to use. * - * * - * OUTPUT: none * - * * - * WARNINGS: You must make sure that the memory specified is large enough to contain the * - * bits specified. * - * * - * HISTORY: * - * 07/18/1995 JLB : Created. * - *=============================================================================================*/ +// Explicit data buffer constructor. This constructor takes the memory pointer provided and assigns +// that as the array data pointer. +// WARNING: You must make sure that the memory specified is large enough to contain the bits +// specified. BooleanVectorClass::BooleanVectorClass(unsigned size, unsigned char * array) : BitCount(size), Copy(false), @@ -93,21 +59,6 @@ BooleanVectorClass::BooleanVectorClass(unsigned size, unsigned char * array) : } -/*********************************************************************************************** - * BooleanVectorClass::BooleanVectorClass -- Copy constructor of boolean array. * - * * - * This is the copy constructor for a boolean array. It is used to make a duplicate of the * - * boolean array. * - * * - * INPUT: vector -- Reference to the vector to be duplicated. * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/18/1995 JLB : Created. * - *=============================================================================================*/ BooleanVectorClass::BooleanVectorClass(BooleanVectorClass const & vector) { LastIndex = -1; @@ -115,22 +66,8 @@ BooleanVectorClass::BooleanVectorClass(BooleanVectorClass const & vector) } -/*********************************************************************************************** - * BooleanVectorClass::operator = -- Assignment operator. * - * * - * This routine will make a copy of the specified boolean vector array. The vector is * - * copied into an already constructed existing vector. The values from the existing vector * - * are destroyed by this copy. * - * * - * INPUT: vector -- Reference to the vector to make a copy of. * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/18/1995 JLB : Created. * - *=============================================================================================*/ +// The vector is copied into an already constructed existing vector. The values from the existing +// vector are destroyed by this copy. BooleanVectorClass & BooleanVectorClass::operator =(BooleanVectorClass const & vector) { Fixup(); @@ -142,21 +79,7 @@ BooleanVectorClass & BooleanVectorClass::operator =(BooleanVectorClass const & v } -/*********************************************************************************************** - * BooleanVectorClass::operator == -- Comparison operator for boolean vector. * - * * - * This is the comparison operator for a boolean vector class. Boolean vectors are equal * - * if the bit count and bit values are identical. * - * * - * INPUT: vector -- Reference to the vector to compare to. * - * * - * OUTPUT: Are the boolean vectors identical? * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/18/1995 JLB : Created. * - *=============================================================================================*/ +// Boolean vectors are equal if the bit count and bit values are identical. bool BooleanVectorClass::operator == (const BooleanVectorClass & vector) const { Fixup(LastIndex); @@ -164,21 +87,9 @@ bool BooleanVectorClass::operator == (const BooleanVectorClass & vector) const } -/*********************************************************************************************** - * BooleanVectorClass::Resize -- Resizes a boolean vector object. * - * * - * This routine will resize the boolean vector object. An index value used with a boolean * - * vector must be less than the value specified in as the new size. * - * * - * INPUT: size -- The new maximum size of this boolean vector. * - * * - * OUTPUT: Was the boolean vector sized successfully? * - * * - * WARNINGS: The boolean array might be reallocated or even deleted by this routine. * - * * - * HISTORY: * - * 07/18/1995 JLB : Created. * - *=============================================================================================*/ +// An index value used with a boolean vector must be less than the value specified in as the new +// size. +// WARNING: The boolean array might be reallocated or even deleted by this routine. int BooleanVectorClass::Resize(unsigned size) { Fixup(); @@ -221,22 +132,9 @@ int BooleanVectorClass::Resize(unsigned size) } -/*********************************************************************************************** - * BooleanVectorClass::Clear -- Resets boolean vector to empty state. * - * * - * This routine will clear out the boolean array. This will free any allocated memory and * - * result in the boolean vector being unusable until the Resize function is subsequently * - * called. * - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: The boolean vector cannot be used until it is resized to a non null condition. * - * * - * HISTORY: * - * 07/18/1995 JLB : Created. * - *=============================================================================================*/ +// Resets boolean vector to empty state. This will free any allocated memory and result in the +// boolean vector being unusable until the Resize function is subsequently called. +// WARNING: The boolean vector cannot be used until it is resized to a non null condition. void BooleanVectorClass::Clear() { Fixup(); @@ -245,20 +143,8 @@ void BooleanVectorClass::Clear() } -/*********************************************************************************************** - * BooleanVectorClass::Reset -- Clear all boolean values in array. * - * * - * This is the preferred (and quick) method to clear the boolean array to a false condition.* - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/18/1995 JLB : Created. * - *=============================================================================================*/ +// Clear all boolean values in array. This is the preferred (and quick) method to clear the boolean +// array to a false condition. void BooleanVectorClass::Reset() { LastIndex = -1; @@ -268,20 +154,8 @@ void BooleanVectorClass::Reset() } -/*********************************************************************************************** - * BooleanVectorClass::Set -- Forces all boolean elements to true. * - * * - * This is the preferred (and fast) way to set all boolean elements to true. * - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/18/1995 JLB : Created. * - *=============================================================================================*/ +// Forces all boolean elements to true. This is the preferred (and fast) way to set all boolean +// elements to true. void BooleanVectorClass::Set() { LastIndex = -1; @@ -291,27 +165,14 @@ void BooleanVectorClass::Set() } -/*********************************************************************************************** - * BooleanVectorClass::Fixup -- Updates the boolean vector to a known state. * - * * - * Use this routine to set the boolean value copy to match the appropriate bit in the * - * boolean array. The boolean array will be updated with any changes from the last time * - * a value was fetched from the boolean vector. By using this update method, the boolean * - * array can be treated as a normal array even though the elements are composed of * - * otherwise inaccessible bits. * - * * - * INPUT: index -- The index to set the new copy value to. If the index is -1, then the * - * previous value will be updated into the vector array, but no new value * - * will be fetched from it. * - * * - * OUTPUT: none * - * * - * WARNINGS: Always call this routine with "-1" if any direct manipulation of the bit * - * array is to occur. This ensures that the bit array is accurate. * - * * - * HISTORY: * - * 07/18/1995 JLB : Created. * - *=============================================================================================*/ +// Updates the boolean vector to a known state. Use this routine to set the boolean value copy to +// match the appropriate bit in the boolean array. The boolean array will be updated with any +// changes from the last time a value was fetched from the boolean vector. By using this update +// method, the boolean array can be treated as a normal array even though the elements are composed +// of otherwise inaccessible bits. If the index is -1, then the previous value will be updated into +// the vector array, but no new value will be fetched from it. +// WARNING: Always call this routine with "-1" if any direct manipulation of the bit array is to +// occur. This ensures that the bit array is accurate. void BooleanVectorClass::Fixup(int index) const { /* @@ -352,18 +213,7 @@ void BooleanVectorClass::Fixup(int index) const } -/*********************************************************************************************** - * BooleanVectorClass::Init -- Initializes the bit vector from an user array. * - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/18/1995 JLB : Created. * - *=============================================================================================*/ +// Initializes the bit vector from an user array. void BooleanVectorClass::Init(unsigned size, unsigned char * array) { Copy = false; @@ -373,18 +223,7 @@ void BooleanVectorClass::Init(unsigned size, unsigned char * array) } -/*********************************************************************************************** - * BooleanVectorClass::Init -- Initializes the bit vector from an user array. * - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/18/1995 JLB : Created. * - *=============================================================================================*/ +// Initializes the bit vector from an user array. void BooleanVectorClass::Init(unsigned size) { Copy = false; diff --git a/Core/Libraries/Source/WWVegas/WWLib/verchk.cpp b/Core/Libraries/Source/WWVegas/WWLib/verchk.cpp index 8f181028da3..8417ead3b5e 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/verchk.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/verchk.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 5 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ diff --git a/Core/Libraries/Source/WWVegas/WWLib/verchk.h b/Core/Libraries/Source/WWVegas/WWLib/verchk.h index ea21e66c2df..9f6e90fea85 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/verchk.h +++ b/Core/Libraries/Source/WWVegas/WWLib/verchk.h @@ -30,8 +30,6 @@ * * * $Revision:: 3 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/widestring.cpp b/Core/Libraries/Source/WWVegas/WWLib/widestring.cpp index ae62b23ac7c..91f2d96634d 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/widestring.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/widestring.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 13 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma warning(disable : 4514) diff --git a/Core/Libraries/Source/WWVegas/WWLib/widestring.h b/Core/Libraries/Source/WWVegas/WWLib/widestring.h index a6860c258f0..0438fff706c 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/widestring.h +++ b/Core/Libraries/Source/WWVegas/WWLib/widestring.h @@ -30,8 +30,6 @@ * * * $Revision:: 22 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/win.h b/Core/Libraries/Source/WWVegas/WWLib/win.h index 229d2ae03aa..0cd79d9555e 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/win.h +++ b/Core/Libraries/Source/WWVegas/WWLib/win.h @@ -30,8 +30,6 @@ * * * $Revision:: 11 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/wwfile.cpp b/Core/Libraries/Source/WWVegas/WWLib/wwfile.cpp index c59d2af1248..db6aba0af7d 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/wwfile.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/wwfile.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include diff --git a/Core/Libraries/Source/WWVegas/WWLib/wwstring.cpp b/Core/Libraries/Source/WWVegas/WWLib/wwstring.cpp index c63bac45575..c9bef494906 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/wwstring.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/wwstring.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 17 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "wwstring.h" diff --git a/Core/Libraries/Source/WWVegas/WWLib/wwstring.h b/Core/Libraries/Source/WWVegas/WWLib/wwstring.h index f742426efc1..176a7760df8 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/wwstring.h +++ b/Core/Libraries/Source/WWVegas/WWLib/wwstring.h @@ -30,8 +30,6 @@ * * * $Revision:: 37 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWLib/xpipe.cpp b/Core/Libraries/Source/WWVegas/WWLib/xpipe.cpp index b01d859b444..11800a2c076 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/xpipe.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/xpipe.cpp @@ -30,11 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * BufferPipe::Put -- Submit data to the buffered pipe segment. * - * FilePipe::Put -- Submit a block of data to the pipe. * - * FilePipe::End -- End the file pipe handler. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -48,24 +43,9 @@ //--------------------------------------------------------------------------------------------------------- -/*********************************************************************************************** - * BufferPipe::Put -- Submit data to the buffered pipe segment. * - * * - * The buffered pipe is a pipe terminator. That is, the data never flows onto subsequent * - * pipe chains. The data is stored into the buffer previously submitted to the pipe. * - * If the buffer is full, no more data is output to the buffer. * - * * - * INPUT: source -- Pointer to the data to submit. * - * * - * length -- The number of bytes to be submitted. * - * * - * OUTPUT: Returns with the number of bytes output to the destination buffer. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// Submit data to the buffered pipe segment. The buffered pipe is a pipe terminator. That is, the +// data never flows onto subsequent pipe chains. The data is stored into the buffer previously +// submitted to the pipe. If the buffer is full, no more data is output to the buffer. int BufferPipe::Put(void const * source, int slen) { int total = 0; @@ -104,25 +84,12 @@ FilePipe::~FilePipe() } -/*********************************************************************************************** - * FilePipe::End -- End the file pipe handler. * - * * - * This routine is called when there will be no more data sent through the pipe. It is * - * responsible for cleaning up anything it needs to. This is not handled by the * - * destructor, although it serves a similar purpose, because pipe are linked together and * - * the destructor order is not easily controlled. If the destructors for a pipe chain were * - * called out of order, the result might be less than pleasant. * - * * - * INPUT: none * - * * - * OUTPUT: Returns with the number of bytes flushed out the final end of the pipe as a * - * consequence of this routine. * - * * - * WARNINGS: Don't send any more data through the pipe after this routine is called. * - * * - * HISTORY: * - * 07/05/1996 JLB : Created. * - *=============================================================================================*/ +// End the file pipe handler. This routine is called when there will be no more data sent through +// the pipe. It is responsible for cleaning up anything it needs to. This is not handled by the +// destructor, although it serves a similar purpose, because pipes are linked together and the +// destructor order is not easily controlled. If the destructors for a pipe chain were called out of +// order, the result might be less than pleasant. +// WARNING: Don't send any more data through the pipe after this routine is called. int FilePipe::End() { int total = Pipe::End(); @@ -134,23 +101,8 @@ int FilePipe::End() } -/*********************************************************************************************** - * FilePipe::Put -- Submit a block of data to the pipe. * - * * - * Takes the data block submitted and writes it to the file. If the file was not already * - * open, this routine will open it for write. * - * * - * INPUT: source -- Pointer to the data to submit to the file. * - * * - * length -- The number of bytes to write to the file. * - * * - * OUTPUT: Returns with the number of bytes written to the file. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// Writes the data block to the file. If the file was not already open, this routine will open it for +// write. int FilePipe::Put(void const * source, int slen) { if (Valid_File() && source != nullptr && slen > 0) { diff --git a/Core/Libraries/Source/WWVegas/WWLib/xstraw.cpp b/Core/Libraries/Source/WWVegas/WWLib/xstraw.cpp index d78f2db87ef..5a1166f0cf8 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/xstraw.cpp +++ b/Core/Libraries/Source/WWVegas/WWLib/xstraw.cpp @@ -30,11 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * BufferStraw::Get -- Fetch data from the straw's buffer holding tank. * - * FileStraw::Get -- Fetch data from the file. * - * FileStraw::~FileStraw -- The destructor for the file straw. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "always.h" @@ -46,24 +41,8 @@ //--------------------------------------------------------------------------------------------------------- -/*********************************************************************************************** - * BufferStraw::Get -- Fetch data from the straw's buffer holding tank. * - * * - * This routine will copy the requested number of bytes from the buffer holding tank (as * - * set up by the straw's constructor) to the buffer specified. * - * * - * INPUT: source -- Pointer to the buffer to be filled with data. * - * * - * length -- The number of bytes requested. * - * * - * OUTPUT: Returns with the number of bytes copied to the buffer. If this is less than * - * requested, then it indicates that the data holding tank buffer is exhausted. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// Fetch data from the straw's buffer holding tank (as set up by the straw's constructor). Returns +// fewer bytes than requested when the holding tank is exhausted. int BufferStraw::Get(void * source, int slen) { int total = 0; @@ -93,24 +72,8 @@ int BufferStraw::Get(void * source, int slen) //--------------------------------------------------------------------------------------------------------- -/*********************************************************************************************** - * FileStraw::Get -- Fetch data from the file. * - * * - * This routine will read data from the file (as specified in the straw's constructor) into * - * the buffer indicated. * - * * - * INPUT: source -- Pointer to the buffer to hold the data. * - * * - * length -- The number of bytes requested. * - * * - * OUTPUT: Returns with the number of bytes stored into the buffer. If this number is less * - * than the number requested, then this indicates that the file is exhausted. * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// Fetch data from the file (as specified in the straw's constructor). Returns fewer bytes than +// requested when the file is exhausted. int FileStraw::Get(void * source, int slen) { if (Valid_File() && source != nullptr && slen > 0) { @@ -126,20 +89,7 @@ int FileStraw::Get(void * source, int slen) } -/*********************************************************************************************** - * FileStraw::~FileStraw -- The destructor for the file straw. * - * * - * This destructor only needs to close the file if it was the one to open it. * - * * - * INPUT: none * - * * - * OUTPUT: none * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 07/03/1996 JLB : Created. * - *=============================================================================================*/ +// This destructor only needs to close the file if it was the one to open it. FileStraw::~FileStraw() { if (Valid_File() && HasOpened) { From 39136a5fccddc8a87f06ff4a8fa9fd709ecc14fe Mon Sep 17 00:00:00 2001 From: xezon <4720891+xezon@users.noreply.github.com> Date: Mon, 16 Nov 2026 21:37:41 +0100 Subject: [PATCH 2/7] refactor(wwmath): Replace function comment blocks with slim comments The Westwood comment blocks above the functions are replaced by slim // comments. Descriptions are kept where they add to the function name. INPUT and OUTPUT entries are dropped unless they say something the signature does not, such as units or valid ranges. History entries are dropped, except for notes on how a function behaves today and the TheSuperHackers entries, which keep their keyword. The Functions lists in the file headers are removed as well, since they repeat the function descriptions. --- .../Source/WWVegas/WWMath/Vector3i.h | 2 - .../Libraries/Source/WWVegas/WWMath/aabox.cpp | 17 - Core/Libraries/Source/WWVegas/WWMath/aabox.h | 319 +--------- .../Source/WWVegas/WWMath/aabtreecull.cpp | 2 - .../Source/WWVegas/WWMath/aabtreecull.h | 2 - .../Libraries/Source/WWVegas/WWMath/aaplane.h | 2 - .../Source/WWVegas/WWMath/cardinalspline.cpp | 2 - .../Source/WWVegas/WWMath/cardinalspline.h | 2 - .../Libraries/Source/WWVegas/WWMath/castres.h | 2 - .../WWVegas/WWMath/catmullromspline.cpp | 30 +- .../Source/WWVegas/WWMath/catmullromspline.h | 2 - .../Source/WWVegas/WWMath/colmath.cpp | 2 - .../Libraries/Source/WWVegas/WWMath/colmath.h | 2 - .../Source/WWVegas/WWMath/colmathaabox.cpp | 144 +---- .../Source/WWVegas/WWMath/colmathaabox.h | 30 +- .../Source/WWVegas/WWMath/colmathaabtri.cpp | 200 +------ .../Source/WWVegas/WWMath/colmathfrustum.cpp | 2 - .../Source/WWVegas/WWMath/colmathfrustum.h | 16 +- .../Source/WWVegas/WWMath/colmathinlines.h | 2 - .../Source/WWVegas/WWMath/colmathline.cpp | 15 +- .../Source/WWVegas/WWMath/colmathline.h | 2 - .../Source/WWVegas/WWMath/colmathobbobb.cpp | 294 +-------- .../Source/WWVegas/WWMath/colmathobbox.cpp | 2 - .../Source/WWVegas/WWMath/colmathobbtri.cpp | 290 +-------- .../Source/WWVegas/WWMath/colmathplane.cpp | 2 - .../Source/WWVegas/WWMath/colmathplane.h | 44 +- .../Source/WWVegas/WWMath/colmathsphere.cpp | 114 +--- .../Source/WWVegas/WWMath/cullsys.cpp | 2 - .../Libraries/Source/WWVegas/WWMath/cullsys.h | 2 - .../Source/WWVegas/WWMath/culltype.h | 2 - .../Libraries/Source/WWVegas/WWMath/curve.cpp | 2 - Core/Libraries/Source/WWVegas/WWMath/curve.h | 2 - .../Libraries/Source/WWVegas/WWMath/euler.cpp | 54 -- Core/Libraries/Source/WWVegas/WWMath/euler.h | 2 - .../Source/WWVegas/WWMath/frustum.cpp | 28 +- .../Libraries/Source/WWVegas/WWMath/frustum.h | 2 - .../Source/WWVegas/WWMath/gridcull.cpp | 241 +------- .../Source/WWVegas/WWMath/gridcull.h | 232 +------- .../Source/WWVegas/WWMath/hermitespline.cpp | 2 - .../Source/WWVegas/WWMath/hermitespline.h | 2 - .../Source/WWVegas/WWMath/lineseg.cpp | 57 +- .../Libraries/Source/WWVegas/WWMath/lineseg.h | 2 - .../Source/WWVegas/WWMath/lookuptable.cpp | 2 - .../Source/WWVegas/WWMath/lookuptable.h | 2 - .../Source/WWVegas/WWMath/matrix3.cpp | 15 +- .../Libraries/Source/WWVegas/WWMath/matrix3.h | 271 +-------- .../Source/WWVegas/WWMath/matrix3d.cpp | 352 ++--------- .../Source/WWVegas/WWMath/matrix3d.h | 556 ++---------------- .../Source/WWVegas/WWMath/matrix4.cpp | 46 +- .../Libraries/Source/WWVegas/WWMath/matrix4.h | 327 ++-------- .../Source/WWVegas/WWMath/normalcone.h | 2 - .../Libraries/Source/WWVegas/WWMath/obbox.cpp | 125 +--- Core/Libraries/Source/WWVegas/WWMath/obbox.h | 88 +-- Core/Libraries/Source/WWVegas/WWMath/ode.cpp | 73 +-- Core/Libraries/Source/WWVegas/WWMath/ode.h | 2 - Core/Libraries/Source/WWVegas/WWMath/plane.h | 2 - Core/Libraries/Source/WWVegas/WWMath/quat.cpp | 156 +---- Core/Libraries/Source/WWVegas/WWMath/quat.h | 14 - Core/Libraries/Source/WWVegas/WWMath/rect.h | 2 - Core/Libraries/Source/WWVegas/WWMath/sphere.h | 208 +------ .../Source/WWVegas/WWMath/tcbspline.cpp | 2 - .../Source/WWVegas/WWMath/tcbspline.h | 2 - Core/Libraries/Source/WWVegas/WWMath/tri.cpp | 34 +- Core/Libraries/Source/WWVegas/WWMath/tri.h | 2 - .../Source/WWVegas/WWMath/v3_rnd.cpp | 2 - Core/Libraries/Source/WWVegas/WWMath/v3_rnd.h | 2 - .../Libraries/Source/WWVegas/WWMath/vector2.h | 318 +--------- .../Source/WWVegas/WWMath/vector2i.h | 2 - .../Libraries/Source/WWVegas/WWMath/vector3.h | 422 +------------ .../Libraries/Source/WWVegas/WWMath/vector4.h | 173 +----- .../Source/WWVegas/WWMath/vehiclecurve.cpp | 2 - .../Source/WWVegas/WWMath/vehiclecurve.h | 2 - Core/Libraries/Source/WWVegas/WWMath/vp.h | 10 - .../Source/WWVegas/WWMath/wwmath.cpp | 2 - Core/Libraries/Source/WWVegas/WWMath/wwmath.h | 2 - 75 files changed, 376 insertions(+), 5019 deletions(-) diff --git a/Core/Libraries/Source/WWVegas/WWMath/Vector3i.h b/Core/Libraries/Source/WWVegas/WWMath/Vector3i.h index 404e7e7ef8c..18f29357252 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/Vector3i.h +++ b/Core/Libraries/Source/WWVegas/WWMath/Vector3i.h @@ -30,8 +30,6 @@ * * * $Revision:: 5 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWMath/aabox.cpp b/Core/Libraries/Source/WWVegas/WWMath/aabox.cpp index 633213b5fa8..74f363b51a5 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/aabox.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/aabox.cpp @@ -30,11 +30,6 @@ * * * $Revision:: 18 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * AABoxClass::Init_Random -- initializes this box to a random state * - * AABoxClass::Contains -- test whether this box contains the given point * - * AABoxClass::Contains -- Test whether this box contains the given box * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "aabox.h" @@ -43,18 +38,6 @@ #include -/*********************************************************************************************** - * AABoxClass::Init_Random -- initializes this box to a random state * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/17/2000 gth : Created. * - *=============================================================================================*/ void AABoxClass::Init_Random(float min_center,float max_center,float min_extent,float max_extent) { Center.X = min_center + WWMath::Random_Float() * (max_center - min_center); diff --git a/Core/Libraries/Source/WWVegas/WWMath/aabox.h b/Core/Libraries/Source/WWVegas/WWMath/aabox.h index d2084eb7eb9..4b75b5ac8f6 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/aabox.h +++ b/Core/Libraries/Source/WWVegas/WWMath/aabox.h @@ -30,26 +30,6 @@ * * * $Revision:: 30 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * AABoxClass::Transform -- transform an aabox * - * AABoxClass::Translate -- transform an aabox * - * AABoxClass::Init -- create a box which bounds the given points * - * AABoxClass::Init -- initialize from a min-max form of a box * - * AABoxClass::Init_Min_Max -- init the box from a min and max vector * - * AABoxClass::Add_Point -- expand the box to contain the given point * - * AABoxClass::Project_To_Axis -- compute projection onto the given axis * - * AABoxClass::Intersects -- test for intersection with another static aabox * - * AABoxClass::Add_Box -- expand this box to enclose the passed box * - * AABoxClass::Add_Box -- Expand this box to enclose the passed box * - * MinMaxAABoxClass::Init -- init the box from an array of points * - * MinMaxAABoxClass::Init -- initializes this box from a center-extent box * - * MinMaxAABoxClass::Add_Point -- updates this box so it encloses the given point * - * MinMaxAABoxClass::Add_Box -- update this box to enclose the given box * - * MinMaxAABoxClass::Add_Box -- Updates this box to enclose the specified box * - * MinMaxAABoxClass::Transform -- Updates this box to enclose its transformed version * - * MinMaxAABoxClass::Translate -- translates the box * - * AABoxClass::Init -- Init from a line segment * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once @@ -163,20 +143,7 @@ class MinMaxAABoxClass -/*********************************************************************************************** - * AABoxClass::Transform -- transform an aabox * - * * - * Note that this function expands the box to enclose its transformed form. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/24/98 GTH : Created. * - *=============================================================================================*/ +// Note that this function expands the box to enclose its transformed form. WWINLINE void AABoxClass::Transform(const Matrix3D & tm) { Vector3 oldcenter = Center; @@ -185,72 +152,27 @@ WWINLINE void AABoxClass::Transform(const Matrix3D & tm) } -/*********************************************************************************************** - * AABoxClass::Translate -- translate an aabox * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/24/98 GTH : Created. * - *=============================================================================================*/ WWINLINE void AABoxClass::Translate(const Vector3 & trans) { Center += trans; } -/*********************************************************************************************** - * AABoxClass::operator== -- Comparison operator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/21/00 PDS : Created. * - *=============================================================================================*/ +// Comparison operator. WWINLINE bool AABoxClass::operator== (const AABoxClass &src) { return (Center == src.Center) && (Extent == src.Extent); } -/*********************************************************************************************** - * AABoxClass::operator!= -- Comparison operator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/21/00 PDS : Created. * - *=============================================================================================*/ +// Comparison operator. WWINLINE bool AABoxClass::operator!= (const AABoxClass &src) { return (Center != src.Center) || (Extent != src.Extent); } -/*********************************************************************************************** - * AABoxClass::Init -- create a box which bounds the given points * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/24/98 GTH : Created. * - *=============================================================================================*/ +// Create a box which bounds the given points. WWINLINE void AABoxClass::Init(Vector3 * points,int num) { Vector3 Min = points[0]; @@ -271,18 +193,7 @@ WWINLINE void AABoxClass::Init(Vector3 * points,int num) } -/*********************************************************************************************** - * AABoxClass::Init -- initialize from a min-max form of a box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/31/98 GTH : Created. * - *=============================================================================================*/ +// Initialize from a min-max form of a box. WWINLINE void AABoxClass::Init(const MinMaxAABoxClass & mmbox) { Center = (mmbox.MaxCorner + mmbox.MinCorner) * 0.5f; @@ -290,18 +201,7 @@ WWINLINE void AABoxClass::Init(const MinMaxAABoxClass & mmbox) } -/*********************************************************************************************** - * AABoxClass::Init -- Init from a line segment * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/27/2000 gth : Created. * - *=============================================================================================*/ +// Init from a line segment. WWINLINE void AABoxClass::Init(const LineSegClass & line) { Vector3 min_corner = line.Get_P0(); @@ -319,18 +219,6 @@ WWINLINE void AABoxClass::Init(const LineSegClass & line) Extent = (max_corner - min_corner) * 0.5f; } -/*********************************************************************************************** - * AABoxClass::Init_Min_Max -- init the box from a min and max vector * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/9/99 GTH : Created. * - *=============================================================================================*/ WWINLINE void AABoxClass::Init_Min_Max(const Vector3 & min,const Vector3 & max) { Center = (max + min) * 0.5f; @@ -338,18 +226,7 @@ WWINLINE void AABoxClass::Init_Min_Max(const Vector3 & min,const Vector3 & max) } -/*********************************************************************************************** - * AABoxClass::Add_Point -- expand the box to contain the given point * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/24/98 GTH : Created. * - *=============================================================================================*/ +// Expand the box to contain the given point. WWINLINE void AABoxClass::Add_Point(const Vector3 & point) { Vector3 Min = Center - Extent; @@ -368,19 +245,7 @@ WWINLINE void AABoxClass::Add_Point(const Vector3 & point) } -/*********************************************************************************************** - * AABoxClass::Add_Box -- expand this box to enclose the passed box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/31/98 GTH : Created. * - * 9/29/2000 gth : Ok to add boxes with zero extent * - *=============================================================================================*/ +// Expand this box to enclose the passed box. Boxes with zero extent are OK to add. WWINLINE void AABoxClass::Add_Box(const AABoxClass & b) { Vector3 newmin = Center - Extent; @@ -393,19 +258,7 @@ WWINLINE void AABoxClass::Add_Box(const AABoxClass & b) } -/*********************************************************************************************** - * AABoxClass::Add_Box -- Expand this box to enclose the passed box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/31/98 GTH : Created. * - * 9/29/2000 gth : Ok to add boxes with zero extent * - *=============================================================================================*/ +// Expand this box to enclose the passed box. Boxes with zero extent are OK to add. WWINLINE void AABoxClass::Add_Box(const MinMaxAABoxClass & b) { Vector3 newmin = Center - Extent; @@ -417,18 +270,6 @@ WWINLINE void AABoxClass::Add_Box(const MinMaxAABoxClass & b) Extent = (newmax - newmin) * 0.5f; } -/*********************************************************************************************** - * AABoxClass::Project_To_Axis -- compute projection onto the given axis * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/24/98 GTH : Created. * - *=============================================================================================*/ WWINLINE float AABoxClass::Project_To_Axis(const Vector3 & axis) const { float x = Extent[0] * axis[0]; @@ -439,35 +280,11 @@ WWINLINE float AABoxClass::Project_To_Axis(const Vector3 & axis) const return (WWMath::Fabsf_Legacy(x) + WWMath::Fabsf_Legacy(y) + WWMath::Fabsf_Legacy(z)); } -/*********************************************************************************************** - * AABoxClass::Contains -- Test whether this box contains the given box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 9/2/98 GTH : Created. * - *=============================================================================================*/ WWINLINE bool AABoxClass::Contains(const AABoxClass & other_box) const { return CollisionMath::Overlap_Test(*this,other_box) == CollisionMath::INSIDE; } -/*********************************************************************************************** - * AABoxClass::Contains -- Test whether this box contains the given box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 9/2/98 GTH : Created. * - *=============================================================================================*/ WWINLINE bool AABoxClass::Contains(const MinMaxAABoxClass & other_box) const { Vector3 bmin = Center - Extent; @@ -484,37 +301,13 @@ WWINLINE bool AABoxClass::Contains(const MinMaxAABoxClass & other_box) const return true; } -/*********************************************************************************************** - * AABoxClass::Contains -- test whether this box contains the given point * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 9/2/98 GTH : Created. * - *=============================================================================================*/ +// Test whether this box contains the given point. WWINLINE bool AABoxClass::Contains(const Vector3 & point) const { return CollisionMath::Overlap_Test(*this,point) == CollisionMath::INSIDE; } -/*********************************************************************************************** - * MinMaxAABoxClass::Init -- init the box from an array of points * - * * - * Makes a box which encloses the given array of points * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/31/98 GTH : Created. * - *=============================================================================================*/ +// Makes a box which encloses the given array of points. WWINLINE void MinMaxAABoxClass::Init(Vector3 * points,int num) { assert(num > 0); @@ -528,18 +321,7 @@ WWINLINE void MinMaxAABoxClass::Init(Vector3 * points,int num) } -/*********************************************************************************************** - * MinMaxAABoxClass::Init -- initializes this box from a center-extent box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/31/98 GTH : Created. * - *=============================================================================================*/ +// Initializes this box from a center-extent box. WWINLINE void MinMaxAABoxClass::Init(const AABoxClass & box) { MinCorner = box.Center - box.Extent; @@ -547,18 +329,7 @@ WWINLINE void MinMaxAABoxClass::Init(const AABoxClass & box) } -/*********************************************************************************************** - * MinMaxAABoxClass::Add_Point -- updates this box so it encloses the given point * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/31/98 GTH : Created. * - *=============================================================================================*/ +// Updates this box so it encloses the given point. WWINLINE void MinMaxAABoxClass::Add_Point(const Vector3 & point) { MinCorner.Update_Min(point); @@ -566,18 +337,7 @@ WWINLINE void MinMaxAABoxClass::Add_Point(const Vector3 & point) } -/*********************************************************************************************** - * MinMaxAABoxClass::Add_Box -- update this box to enclose the given box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/31/98 GTH : Created. * - *=============================================================================================*/ +// Update this box to enclose the given box. WWINLINE void MinMaxAABoxClass::Add_Box(const MinMaxAABoxClass & box) { if (box.MinCorner == box.MaxCorner) return; @@ -587,18 +347,7 @@ WWINLINE void MinMaxAABoxClass::Add_Box(const MinMaxAABoxClass & box) } -/*********************************************************************************************** - * MinMaxAABoxClass::Add_Box -- update this box to enclose the given box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/31/98 GTH : Created. * - *=============================================================================================*/ +// Update this box to enclose the given box. WWINLINE void MinMaxAABoxClass::Add_Box(const AABoxClass & box) { if (box.Extent == Vector3(0.0f, 0.0f, 0.0f)) return; @@ -607,18 +356,7 @@ WWINLINE void MinMaxAABoxClass::Add_Box(const AABoxClass & box) MaxCorner.Update_Max(box.Center + box.Extent); } -/*********************************************************************************************** - * MinMaxAABoxClass::Add_Box -- Updates this box to enclose the specified box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/31/98 GTH : Created. * - *=============================================================================================*/ +// Updates this box to enclose the specified box. WWINLINE void MinMaxAABoxClass::Add_Box(const Vector3 & min_corner,const Vector3 & max_corner) { assert(max_corner.X >= min_corner.X); @@ -632,18 +370,7 @@ WWINLINE void MinMaxAABoxClass::Add_Box(const Vector3 & min_corner,const Vector3 } -/*********************************************************************************************** - * MinMaxAABoxClass::Transform -- Updates this box to enclose its transformed version * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/31/98 GTH : Created. * - *=============================================================================================*/ +// Updates this box to enclose its transformed version. WWINLINE void MinMaxAABoxClass::Transform(const Matrix3D & tm) { Vector3 oldmin = MinCorner; @@ -652,18 +379,6 @@ WWINLINE void MinMaxAABoxClass::Transform(const Matrix3D & tm) } -/*********************************************************************************************** - * MinMaxAABoxClass::Translate -- translates the box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/31/98 GTH : Created. * - *=============================================================================================*/ WWINLINE void MinMaxAABoxClass::Translate(const Vector3 & pos) { MinCorner+=pos; diff --git a/Core/Libraries/Source/WWVegas/WWMath/aabtreecull.cpp b/Core/Libraries/Source/WWVegas/WWMath/aabtreecull.cpp index 7dab424a96b..6426000517d 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/aabtreecull.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/aabtreecull.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 25 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ diff --git a/Core/Libraries/Source/WWVegas/WWMath/aabtreecull.h b/Core/Libraries/Source/WWVegas/WWMath/aabtreecull.h index 7c5d09bb127..2bf23fd02b0 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/aabtreecull.h +++ b/Core/Libraries/Source/WWVegas/WWMath/aabtreecull.h @@ -30,8 +30,6 @@ * * * $Revision:: 15 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWMath/aaplane.h b/Core/Libraries/Source/WWVegas/WWMath/aaplane.h index 58e074de7b6..618d8a577fb 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/aaplane.h +++ b/Core/Libraries/Source/WWVegas/WWMath/aaplane.h @@ -30,8 +30,6 @@ * * * $Revision:: 8 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWMath/cardinalspline.cpp b/Core/Libraries/Source/WWVegas/WWMath/cardinalspline.cpp index ee8cb616f34..89ef1b95e0b 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/cardinalspline.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/cardinalspline.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 6 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ diff --git a/Core/Libraries/Source/WWVegas/WWMath/cardinalspline.h b/Core/Libraries/Source/WWVegas/WWMath/cardinalspline.h index bb3da6bf98c..a6f2dccf362 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/cardinalspline.h +++ b/Core/Libraries/Source/WWVegas/WWMath/cardinalspline.h @@ -30,8 +30,6 @@ * * * $Revision:: 4 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWMath/castres.h b/Core/Libraries/Source/WWVegas/WWMath/castres.h index fd132e01398..fccd2a23e3e 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/castres.h +++ b/Core/Libraries/Source/WWVegas/WWMath/castres.h @@ -30,8 +30,6 @@ * * * $Revision:: 10 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWMath/catmullromspline.cpp b/Core/Libraries/Source/WWVegas/WWMath/catmullromspline.cpp index 7e9856b06a7..1765be8d130 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/catmullromspline.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/catmullromspline.cpp @@ -30,10 +30,6 @@ * * * $Revision:: 6 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * CatmullRomSpline3DClass::Update_Tangents -- computes the tangents at each key * - * CatmullRomSpline1DClass::Update_Tangents -- Computes the tangents at each key * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -43,19 +39,7 @@ ** Catmull-Rom 3D spline implementation */ -/*********************************************************************************************** - * CatmullRomSpline3DClass::Update_Tangents -- computes the tangents at each key * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * I'm not sure about the tangents for the endpoints of the curve. * - * * - * HISTORY: * - * 3/7/2000 gth : Created. * - *=============================================================================================*/ +// WARNING: I'm not sure about the tangents for the endpoints of the curve. void CatmullRomSpline3DClass::Update_Tangents() { if (Keys.Count() < 2) { @@ -118,18 +102,6 @@ void CatmullRomSpline3DClass::Update_Tangents() */ -/*********************************************************************************************** - * CatmullRomSpline1DClass::Update_Tangents -- Computes the tangents at each key * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/7/2000 gth : Created. * - *=============================================================================================*/ void CatmullRomSpline1DClass::Update_Tangents() { if (Keys.Count() < 2) { diff --git a/Core/Libraries/Source/WWVegas/WWMath/catmullromspline.h b/Core/Libraries/Source/WWVegas/WWMath/catmullromspline.h index b8897537b98..84097eb8b2e 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/catmullromspline.h +++ b/Core/Libraries/Source/WWVegas/WWMath/catmullromspline.h @@ -30,8 +30,6 @@ * * * $Revision:: 6 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWMath/colmath.cpp b/Core/Libraries/Source/WWVegas/WWMath/colmath.cpp index 9110d78a021..7c01f9f0149 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/colmath.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/colmath.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 4 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ diff --git a/Core/Libraries/Source/WWVegas/WWMath/colmath.h b/Core/Libraries/Source/WWVegas/WWMath/colmath.h index a8cf0ab3206..58ded3b7376 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/colmath.h +++ b/Core/Libraries/Source/WWVegas/WWMath/colmath.h @@ -30,8 +30,6 @@ * * * $Revision:: 19 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWMath/colmathaabox.cpp b/Core/Libraries/Source/WWVegas/WWMath/colmathaabox.cpp index 00766417bea..6de4c921d0f 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/colmathaabox.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/colmathaabox.cpp @@ -30,15 +30,6 @@ * * * $Revision:: 22 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * CollisionMath::Intersection_Test -- Test intersection between two AABoxes * - * CollisionMath::Overlap_Test -- Tests overlap between an AABox and a sphere * - * CollisionMath::Overlap_Test -- Tests overlap between an AABox and a triangle * - * CollisionMath::Overlap_Test -- Tests overlap between an AABox and a line segment * - * CollisionMath::Collide -- Collision test for a moving AABox and a plane * - * aab_separation_test -- tests two AAB's for separation on an axis * - * CollisionMath::Collide -- Collision test for two moving AABoxes * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -54,18 +45,7 @@ #include "WWDebug/wwdebug.h" -/*********************************************************************************************** - * CollisionMath::Intersection_Test -- Test intersection between two AABoxes * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/19/99 gth : Created. * - *=============================================================================================*/ +// Test intersection between two AABoxes. bool CollisionMath::Intersection_Test(const AABoxClass & box,const AABoxClass & box2) { Vector3 dc = box2.Center - box.Center; @@ -76,18 +56,7 @@ bool CollisionMath::Intersection_Test(const AABoxClass & box,const AABoxClass & return true; } -/*********************************************************************************************** - * CollisionMath::Overlap_Test -- Tests overlap between an AABox and a sphere * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/19/99 gth : Created. * - *=============================================================================================*/ +// Tests overlap between an AABox and a sphere. CollisionMath::OverlapType CollisionMath::Overlap_Test(const AABoxClass & box,const SphereClass & sphere) { // TODO: this function seems incorrect. Not currently using it though @@ -110,37 +79,21 @@ CollisionMath::OverlapType CollisionMath::Overlap_Test(const AABoxClass & box,co -/*********************************************************************************************** - * CollisionMath::Overlap_Test -- Tests overlap between an AABox and a line segment * - * * - * This function uses separating axes to determine whether an AABox and a line segment overlap * - * I wrote it when we found that ray-casting was taking a huge amount of time in Renegade. * - * Here are some statistics comparing this function to the previous function which used the * - * same algorithm that Collide(box,ray) uses. * - * * - * collide algorithm (Gems) separating axis (this one) * - * ----------------------------------------------------------------------------------------- * - * number of tests 10000 10000 * - * avg cycles 641 464 * - * outside cycles 652 390 * - * overlap cycles 610 683 * - * * - * The idea for this test is that it will early-exit when it can while the old test can't. * - * When we are passing a ray down our culling trees, it is common to encounter boxes that * - * are not intersecting the ray. The faster we can reject these, the better! * - * * - * INPUT: * - * box - box to test * - * line - line to test * - * * - * OUTPUT: * - * overlap status of the line with respect to the box, either INSIDE, OUTSIDE, or OVERLAPPED * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/19/99 gth : Created. * - *=============================================================================================*/ +// This function uses separating axes to determine whether an AABox and a line segment overlap. +// I wrote it when we found that ray-casting was taking a huge amount of time in Renegade. +// Here are some statistics comparing this function to the previous function which used the +// same algorithm that Collide(box,ray) uses. +// +// collide algorithm (Gems) separating axis (this one) +// ----------------------------------------------------------------------------------------- +// number of tests 10000 10000 +// avg cycles 641 464 +// outside cycles 652 390 +// overlap cycles 610 683 +// +// The idea for this test is that it will early-exit when it can while the old test can't. +// When we are passing a ray down our culling trees, it is common to encounter boxes that +// are not intersecting the ray. The faster we can reject these, the better! CollisionMath::OverlapType CollisionMath::Overlap_Test(const AABoxClass & box,const LineSegClass & line) { // If both endpoints are in, return INSIDE @@ -342,18 +295,7 @@ CollisionMath::OverlapType CollisionMath::Overlap_Test(const AABoxClass & box,co #endif // Alternate Overlap Test for AABox-Ray -/*********************************************************************************************** - * CollisionMath::Overlap_Test -- Tests overlap between an AABox and a triangle * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/19/99 gth : Created. * - *=============================================================================================*/ +// Tests overlap between an AABox and a triangle. CollisionMath::OverlapType CollisionMath::Overlap_Test(const AABoxClass & box,const TriClass & tri) { CastResultStruct res; @@ -362,18 +304,7 @@ CollisionMath::OverlapType CollisionMath::Overlap_Test(const AABoxClass & box,co } -/*********************************************************************************************** - * CollisionMath::Collide -- Collision test for a moving AABox and a plane * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/19/99 gth : Created. * - *=============================================================================================*/ +// Collision test for a moving AABox and a plane. bool CollisionMath::Collide ( const AABoxClass & box, @@ -468,21 +399,8 @@ struct AABCollisionStruct }; -/*********************************************************************************************** - * aab_separation_test -- tests two AAB's for separation on an axis * - * * - * This function is very similar to the obb_separation_test. If a flaw is found in either, * - * we should update the other... * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/19/99 gth : Created. * - *=============================================================================================*/ +// Tests two AAB's for separation on an axis. This function is very similar to the +// obb_separation_test. If a flaw is found in either, we should update the other... static inline bool aab_separation_test ( AABCollisionStruct & context, @@ -532,22 +450,10 @@ static inline bool aab_separation_test } -/*********************************************************************************************** - * CollisionMath::Collide -- Collision test for two moving AABoxes * - * * - * this function sweeps two AABoxes and finds the first time of collision. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * currently there is no parateter for the movement of the second box. the internal code * - * can handle it though. * - * * - * HISTORY: * - * 11/19/99 gth : Created. * - *=============================================================================================*/ +// Collision test for two moving AABoxes. This function sweeps two AABoxes and finds the first time +// of collision. +// WARNING: Currently there is no parameter for the movement of the second box. The internal code +// can handle it though. bool CollisionMath::Collide(const AABoxClass & box,const Vector3 & move,const AABoxClass & box2,CastResultStruct * result) { /* diff --git a/Core/Libraries/Source/WWVegas/WWMath/colmathaabox.h b/Core/Libraries/Source/WWVegas/WWMath/colmathaabox.h index 316f9a4600f..ef9d77d7bde 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/colmathaabox.h +++ b/Core/Libraries/Source/WWVegas/WWMath/colmathaabox.h @@ -32,10 +32,6 @@ * * * $Revision:: 8 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * CollisionMath::Overlap_Test -- test overlap between an AABox and a point * - * CollisionMath::Overlap_Test -- Tests overlap between two AABoxes * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once @@ -46,18 +42,7 @@ #include "lineseg.h" -/*********************************************************************************************** - * CollisionMath::Overlap_Test -- test overlap between an AABox and a point * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/14/2000 gth : Created. * - *=============================================================================================*/ +// Test overlap between an AABox and a point. WWINLINE CollisionMath::OverlapType CollisionMath::Overlap_Test(const AABoxClass & box,const Vector3 & point) { if (WWMath::Fabsf_Legacy(point.X - box.Center.X) > box.Extent.X) return POS; @@ -67,18 +52,7 @@ WWINLINE CollisionMath::OverlapType CollisionMath::Overlap_Test(const AABoxClass return NEG; } -/*********************************************************************************************** - * CollisionMath::Overlap_Test -- Tests overlap between two AABoxes * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/19/99 gth : Created. * - *=============================================================================================*/ +// Tests overlap between two AABoxes. WWINLINE CollisionMath::OverlapType CollisionMath::Overlap_Test(const AABoxClass & box,const AABoxClass & box2) { Vector3 dc; diff --git a/Core/Libraries/Source/WWVegas/WWMath/colmathaabtri.cpp b/Core/Libraries/Source/WWVegas/WWMath/colmathaabtri.cpp index ba833fb20c4..4e52166a99d 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/colmathaabtri.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/colmathaabtri.cpp @@ -30,20 +30,6 @@ * * * $Revision:: 19 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * aabtri_separation_test -- test the projected extents for separation * - * aabtri_check_axis -- project the aab and tri onto an arbitrary axis * - * aabtri_check_cross_axis -- projects aab and tri onto a "cross" axis * - * aabtri_check_basis_axis -- projects the aab and tri onto a basis axis * - * aabtri_check_normal_axis -- project the box and tri onto the tri-normal * - * eval_side -- returns -1,0,+1 depending on the sign of val and side * - * aabtri_compute_contact_normal -- computes the normal of the collision * - * CollisionMath::Collide -- collide an aabox into a triangle * - * aabtri_intersect_cross_axis -- intersection check for a "cross-product" axis * - * aabtri_intersect_basis_axis -- intersection check for a basis axis * - * aabtri_intersect_normal_axis -- intersection check for the triangle normal * - * CollisionMath::Intersection_Test -- Intersection check for an AABox and a triangle * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -182,22 +168,8 @@ struct BTCollisionStruct static BTCollisionStruct CollisionContext; -/*********************************************************************************************** - * aabtri_separation_test -- test the projected extents for separation * - * * - * Once the extents are projected onto the axis, this function contains * - * the logic that determines the allowed fraction. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/8/99 GTH : Created. * - * 7/12/99 GTH : Converted original OBBox code to AABox * - *=============================================================================================*/ +// Test the projected extents for separation. Once the extents are projected onto the axis, this +// function contains the logic that determines the allowed fraction. static inline bool aabtri_separation_test ( float lp,float leb0,float leb1 @@ -249,22 +221,8 @@ static inline bool aabtri_separation_test } -/*********************************************************************************************** - * aabtri_check_axis -- project the aab and tri onto an arbitrary axis * - * * - * projects the box and the triangle onto the given axis and calls * - * obbtri_separation_test. return true if separation was detected * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/8/99 GTH : Created. * - * 7/12/99 GTH : converted to AABox * - *=============================================================================================*/ +// Project the aab and tri onto an arbitrary axis and call aabtri_separation_test. Returns true if +// separation was detected. static inline bool aabtri_check_axis() { float dist; // separation along the axis @@ -303,22 +261,9 @@ static inline bool aabtri_check_axis() } -/*********************************************************************************************** - * aabtri_check_cross_axis -- projects aab and tri onto a "cross" axis * - * * - * Assumes that the axis given is one generated from a cross product of one of the edge and * - * basis vectors. In this case, the box extent can be optimized and only two triangle verts * - * need to be checked. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/8/99 GTH : Created. * - *=============================================================================================*/ +// Projects aab and tri onto a "cross" axis. Assumes that the axis given is one generated from a +// cross product of one of the edge and basis vectors. In this case, the box extent can be optimized +// and only two triangle verts need to be checked. static inline bool aabtri_check_cross_axis ( float dp, @@ -357,22 +302,8 @@ static inline bool aabtri_check_cross_axis } -/*********************************************************************************************** - * aabtri_check_basis_axis -- projects the aab and tri onto a basis axis * - * * - * Projects the box and triangle onto an axis that is assumed to be a basis * - * vector from the box. In this case, we can skip a dot-product and use the * - * corresponding extent of the box (which is passed in as leb0). * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/8/99 GTH : Created. * - *=============================================================================================*/ +// Projects the aab and tri onto a basis axis from the box. In this case, we can skip a dot-product +// and use the corresponding extent of the box (which is passed in as leb0). static inline bool aabtri_check_basis_axis ( float leb0, @@ -413,21 +344,7 @@ static inline bool aabtri_check_basis_axis } -/*********************************************************************************************** - * aabtri_check_normal_axis -- project the box and tri onto the tri-normal * - * * - * Projects the box and triangle onto an axis that is assumed to be the normal * - * vector from the triangle. In this case, the triangle extents are zero. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/8/99 GTH : Created. * - *=============================================================================================*/ +// Project the box and tri onto the tri-normal. In this case, the triangle extents are zero. static inline bool aabtri_check_normal_axis() { float dist; // separation along the axis @@ -459,18 +376,7 @@ static inline bool aabtri_check_normal_axis() return aabtri_separation_test(/*CollisionContext,*/lp,leb0,leb1); } -/*********************************************************************************************** - * eval_side -- returns -1,0,+1 depending on the sign of val and side * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/8/99 GTH : Created. * - *=============================================================================================*/ +// Returns -1,0,+1 depending on the sign of val and side. static inline float eval_side(float val,int side) { if (val > 0.0f) { @@ -482,18 +388,6 @@ static inline float eval_side(float val,int side) } } -/*********************************************************************************************** - * aabtri_compute_contact_normal -- computes the normal of the collision * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/8/99 GTH : Created. * - *=============================================================================================*/ static inline void aabtri_compute_contact_normal ( Vector3 & set_norm @@ -578,18 +472,7 @@ inline void VERIFY_CROSS(const Vector3 & a, const Vector3 & b,const Vector3 & cr #endif } -/*********************************************************************************************** - * CollisionMath::Collide -- collide an aabox into a triangle * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/8/99 GTH : Created. * - *=============================================================================================*/ +// Collide an aabox into a triangle. bool CollisionMath::Collide ( const AABoxClass & box, @@ -899,20 +782,8 @@ struct AABTIntersectStruct static AABTIntersectStruct IntersectContext; -/*********************************************************************************************** - * aabtri_intersect_cross_axis -- intersection check for a "cross-product" axis * - * * - * axis being checked is a cross product between a triangle edge and a box basis vector * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/4/99 GTH : Created. * - *=============================================================================================*/ +// Intersection check for a "cross-product" axis. Axis being checked is a cross product between a +// triangle edge and a box basis vector. static inline bool aabtri_intersect_cross_axis ( Vector3 & axis, @@ -941,20 +812,7 @@ static inline bool aabtri_intersect_cross_axis } -/*********************************************************************************************** - * aabtri_intersect_basis_axis -- intersection check for a basis axis * - * * - * axis being checked is one of the basis vectors for the box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/4/99 GTH : Created. * - *=============================================================================================*/ +// Axis being checked is one of the basis vectors for the box. static inline bool aabtri_intersect_basis_axis ( Vector3 & axis, @@ -986,20 +844,7 @@ static inline bool aabtri_intersect_basis_axis } -/*********************************************************************************************** - * aabtri_intersect_normal_axis -- intersection check for the triangle normal * - * * - * axis being checked is the triangle's normal * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/4/99 GTH : Created. * - *=============================================================================================*/ +// Intersection check for the triangle normal. Axis being checked is the triangle's normal. static inline bool aabtri_intersect_normal_axis ( Vector3 & axis @@ -1026,18 +871,7 @@ static inline bool aabtri_intersect_normal_axis } -/*********************************************************************************************** - * CollisionMath::Intersection_Test -- Intersection check for an AABox and a triangle * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/20/00 gth : copied from OBBox version and removed some Dot-products * - *=============================================================================================*/ +// Intersection check for an AABox and a triangle. bool CollisionMath::Intersection_Test(const AABoxClass & box,const TriClass & tri) { Vector3 axis; diff --git a/Core/Libraries/Source/WWVegas/WWMath/colmathfrustum.cpp b/Core/Libraries/Source/WWVegas/WWMath/colmathfrustum.cpp index 24e80c36367..172483436f7 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/colmathfrustum.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/colmathfrustum.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 7 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ diff --git a/Core/Libraries/Source/WWVegas/WWMath/colmathfrustum.h b/Core/Libraries/Source/WWVegas/WWMath/colmathfrustum.h index fee4d428b6c..71dc6871fd0 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/colmathfrustum.h +++ b/Core/Libraries/Source/WWVegas/WWMath/colmathfrustum.h @@ -32,9 +32,6 @@ * * * $Revision:: 3 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * CollisionMath::Overlap_Test -- test a frustum and an AABox for overlap * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once @@ -49,18 +46,7 @@ ** Inline collision functions dealing with frustums */ -/*********************************************************************************************** - * CollisionMath::Overlap_Test -- test a frustum and an AABox for overlap * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/29/2000 gth : Created. * - *=============================================================================================*/ +// Test a frustum and an AABox for overlap. inline CollisionMath::OverlapType CollisionMath::Overlap_Test(const FrustumClass & frustum,const AABoxClass & box,int & planes_passed) diff --git a/Core/Libraries/Source/WWVegas/WWMath/colmathinlines.h b/Core/Libraries/Source/WWVegas/WWMath/colmathinlines.h index d06e715bea8..21e41880de1 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/colmathinlines.h +++ b/Core/Libraries/Source/WWVegas/WWMath/colmathinlines.h @@ -32,8 +32,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWMath/colmathline.cpp b/Core/Libraries/Source/WWVegas/WWMath/colmathline.cpp index fc71c84d887..098c90e7dd0 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/colmathline.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/colmathline.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 10 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -372,18 +370,7 @@ bool CollisionMath::Collide(const LineSegClass & line,const OBBoxClass & box,Cas -/*********************************************************************************************** - * Test_Aligned_Box -- used as the guts of the Box intersection tests * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/20/98 GTH : Created. * - *=============================================================================================*/ +// Used as the guts of the Box intersection tests. inline bool Test_Aligned_Box(BoxTestStruct * test) { int i; diff --git a/Core/Libraries/Source/WWVegas/WWMath/colmathline.h b/Core/Libraries/Source/WWVegas/WWMath/colmathline.h index 3dd52c2ebb3..db3d476de27 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/colmathline.h +++ b/Core/Libraries/Source/WWVegas/WWMath/colmathline.h @@ -32,8 +32,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWMath/colmathobbobb.cpp b/Core/Libraries/Source/WWVegas/WWMath/colmathobbobb.cpp index 1fd97ad323b..9cd34121980 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/colmathobbobb.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/colmathobbobb.cpp @@ -30,27 +30,6 @@ * * * $Revision:: 15 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * obb_intersect_box0_basis -- intersection test for a basis vector from box0 * - * obb_intersect_box1_basis -- intersection test for a basis vector from box1 * - * obb_intersect_axis -- intersection test for a axis * - * intersect_obb_obb -- test two OBBoxes for intersection * - * CollisionMath::Intersection_Test -- test two obb's for intersection * - * CollisionMath::Intersection_Test -- test an OBB for intersection with an AAB * - * CollisionMath::Intersection_Test -- Test an AAB for intersection with an OBB * - * obb_separation_test -- test the projections of two obb's for separation * - * obb_check_box0_basis -- projects the boxes onto a basis vector from box0 * - * obb_check_box1_basis -- projects the two obbs onto a basis vector from box1 * - * obb_check_axis -- projects the obbs onto an arbitrary axis * - * obb_compute_projections -- computes projections of two boxes onto an arbitrary axis * - * compute_contact_normal -- computes the contact normal (after contact is detected) * - * eval_side -- returns -1,0,1 depending on ab and side * - * compute_contact_point -- computes the contact point (after contact is detected) * - * collide_obb_obb -- test two obb's for collision * - * CollisionMath::Collide -- collide two OBB's * - * CollisionMath::Collide -- collide an OBB with an AAB * - * CollisionMath::Collide -- collide an AAB with an OBB * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "colmath.h" @@ -153,21 +132,8 @@ struct ObbIntersectionStruct -/*********************************************************************************************** - * obb_intersect_box0_basis -- intersection test for a basis vector from box0 * - * * - * The optimization here is that the projection of the first box is known since the axis is * - * one of its basis vectors. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/4/99 GTH : Created. * - *=============================================================================================*/ +// Intersection test for a basis vector from box0. The optimization here is that the projection of +// the first box is known since the axis is one of its basis vectors. static bool obb_intersect_box0_basis ( ObbIntersectionStruct & context, @@ -191,21 +157,8 @@ static bool obb_intersect_box0_basis } -/*********************************************************************************************** - * obb_intersect_box1_basis -- intersection test for a basis vector from box1 * - * * - * The "optimization" here is that the extent for the second box is known since the axis is * - * one of its basis vectors. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/4/99 GTH : Created. * - *=============================================================================================*/ +// Intersection test for a basis vector from box1. The "optimization" here is that the extent for +// the second box is known since the axis is one of its basis vectors. static bool obb_intersect_box1_basis ( ObbIntersectionStruct & context, @@ -229,22 +182,10 @@ static bool obb_intersect_box1_basis } -/*********************************************************************************************** - * obb_intersect_axis -- intersection test for a axis * - * * - * Checks intersection on an arbitrary axis where you've already computed the projectsions. * - * Many of the later tests in the OBB-OBB algorigthm fall into here since there are * - * optimizations in computing the projections but they are all specific to the axis being used * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/4/99 GTH : Created. * - *=============================================================================================*/ +// Intersection test for an axis. Checks intersection on an arbitrary axis where you've already +// computed the projections. Many of the later tests in the OBB-OBB algorithm fall into here since +// there are optimizations in computing the projections but they are all specific to the axis being +// used. static inline bool obb_intersect_axis ( ObbIntersectionStruct & context, @@ -262,24 +203,10 @@ static inline bool obb_intersect_axis } -/*********************************************************************************************** - * intersect_obb_obb -- test two OBBoxes for intersection * - * * - * This function works in a very similar (but simplified) way as the Collide function. See * - * the comments in that function for more clues regarding the math involved... * - * * - * Due to the re-usage of intermediate calculations, this function is ~2x faster than the * - * equivalent Oriented_Boxes_Intersect. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/4/99 GTH : Created. * - *=============================================================================================*/ +// Test two OBBoxes for intersection. This function works in a very similar (but simplified) way as +// the Collide function. See the comments in that function for more clues regarding the math +// involved... Due to the re-usage of intermediate calculations, this function is ~2x faster than +// the equivalent Oriented_Boxes_Intersect. bool intersect_obb_obb ( ObbIntersectionStruct & context @@ -429,20 +356,7 @@ bool intersect_obb_obb } -/*********************************************************************************************** - * CollisionMath::Intersection_Test -- test two obb's for intersection * - * * - * Simply sets up the context and calls intersect_obb_obb * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/25/99 GTH : Created. * - *=============================================================================================*/ +// Test two obb's for intersection. Simply sets up the context and calls intersect_obb_obb. bool CollisionMath::Intersection_Test(const OBBoxClass & box0,const OBBoxClass & box1) { ObbIntersectionStruct context(box0,box1); @@ -450,18 +364,7 @@ bool CollisionMath::Intersection_Test(const OBBoxClass & box0,const OBBoxClass & } -/*********************************************************************************************** - * CollisionMath::Intersection_Test -- test an OBB for intersection with an AAB * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/25/99 GTH : Created. * - *=============================================================================================*/ +// Test an OBB for intersection with an AAB. bool CollisionMath::Intersection_Test(const OBBoxClass & box0,const AABoxClass & box1) { OBBoxClass obbox1(box1.Center,box1.Extent); @@ -470,18 +373,7 @@ bool CollisionMath::Intersection_Test(const OBBoxClass & box0,const AABoxClass & } -/*********************************************************************************************** - * CollisionMath::Intersection_Test -- Test an AAB for intersection with an OBB * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/25/99 GTH : Created. * - *=============================================================================================*/ +// Test an AAB for intersection with an OBB. bool CollisionMath::Intersection_Test(const AABoxClass & box0,const OBBoxClass & box1) { OBBoxClass obbox0(box0.Center,box0.Extent); @@ -564,18 +456,7 @@ struct ObbCollisionStruct -/*********************************************************************************************** - * obb_separation_test -- test the projections of two obb's for separation * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/8/99 GTH : Created. * - *=============================================================================================*/ +// Test the projections of two obb's for separation. static inline bool obb_separation_test ( ObbCollisionStruct & context, @@ -619,18 +500,7 @@ static inline bool obb_separation_test } -/*********************************************************************************************** - * obb_check_box0_basis -- projects the boxes onto a basis vector from box0 * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/8/99 GTH : Created. * - *=============================================================================================*/ +// Projects the boxes onto a basis vector from box0. static bool obb_check_box0_basis ( ObbCollisionStruct & context, @@ -653,18 +523,7 @@ static bool obb_check_box0_basis } -/*********************************************************************************************** - * obb_check_box1_basis -- projects the two obbs onto a basis vector from box1 * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/8/99 GTH : Created. * - *=============================================================================================*/ +// Projects the two obbs onto a basis vector from box1. static bool obb_check_box1_basis ( ObbCollisionStruct & context, @@ -686,18 +545,7 @@ static bool obb_check_box1_basis } -/*********************************************************************************************** - * obb_check_axis -- projects the obbs onto an arbitrary axis * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/8/99 GTH : Created. * - *=============================================================================================*/ +// Projects the obbs onto an arbitrary axis. static inline bool obb_check_axis ( ObbCollisionStruct & context, @@ -711,18 +559,7 @@ static inline bool obb_check_axis } -/*********************************************************************************************** - * obb_compute_projections -- computes projections of two boxes onto an arbitrary axis * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/8/99 GTH : Created. * - *=============================================================================================*/ +// Computes projections of two boxes onto an arbitrary axis. static inline void obb_compute_projections ( const ObbCollisionStruct & context, @@ -740,18 +577,7 @@ static inline void obb_compute_projections } -/*********************************************************************************************** - * compute_contact_normal -- computes the contact normal (after contact is detected) * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/8/99 GTH : Created. * - *=============================================================================================*/ +// Computes the contact normal (after contact is detected). static inline void compute_contact_normal(ObbCollisionStruct & context,CastResultStruct * result) { switch(context.AxisId) @@ -835,18 +661,7 @@ static inline void compute_contact_normal(ObbCollisionStruct & context,CastResul } -/*********************************************************************************************** - * eval_side -- returns -1,0,1 depending on ab and side * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/8/99 GTH : Created. * - *=============================================================================================*/ +// Returns -1,0,1 depending on ab and side. static inline float eval_side(float ab,float side) { if (ab > 0.0f) { @@ -859,18 +674,7 @@ static inline float eval_side(float ab,float side) } -/*********************************************************************************************** - * compute_contact_point -- computes the contact point (after contact is detected) * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/8/99 GTH : Created. * - *=============================================================================================*/ +// Computes the contact point (after contact is detected). static inline void compute_contact_point(ObbCollisionStruct & context,CastResultStruct * result) { int i,j; @@ -1091,18 +895,7 @@ static inline void compute_contact_point(ObbCollisionStruct & context,CastResult } -/*********************************************************************************************** - * collide_obb_obb -- test two obb's for collision * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/25/99 GTH : Created. * - *=============================================================================================*/ +// Test two obb's for collision. bool collide_obb_obb ( ObbCollisionStruct & context, @@ -1329,18 +1122,7 @@ bool collide_obb_obb return false; } -/*********************************************************************************************** - * CollisionMath::Collide -- collide two obb's * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/8/99 GTH : Created. * - *=============================================================================================*/ +// Collide two obb's. bool CollisionMath::Collide ( const OBBoxClass & box0, @@ -1355,18 +1137,7 @@ bool CollisionMath::Collide } -/*********************************************************************************************** - * CollisionMath::Collide -- collide an OBB with an AAB * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/25/99 GTH : Created. * - *=============================================================================================*/ +// Collide an OBB with an AAB. bool CollisionMath::Collide ( const OBBoxClass & box0, @@ -1382,18 +1153,7 @@ bool CollisionMath::Collide } -/*********************************************************************************************** - * CollisionMath::Collide -- collide an AAB with an OBB * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/25/99 GTH : Created. * - *=============================================================================================*/ +// Collide an AAB with an OBB. bool CollisionMath::Collide ( const AABoxClass & box0, diff --git a/Core/Libraries/Source/WWVegas/WWMath/colmathobbox.cpp b/Core/Libraries/Source/WWVegas/WWMath/colmathobbox.cpp index 2368738e4ce..5c8f40f690b 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/colmathobbox.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/colmathobbox.cpp @@ -33,8 +33,6 @@ * $Revision:: 9 $* * * * 06/26/02 KM Matrix name change to avoid MAX conflicts * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ diff --git a/Core/Libraries/Source/WWVegas/WWMath/colmathobbtri.cpp b/Core/Libraries/Source/WWVegas/WWMath/colmathobbtri.cpp index 4cdab9251be..3ba0415c75b 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/colmathobbtri.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/colmathobbtri.cpp @@ -30,25 +30,6 @@ * * * $Revision:: 16 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * obbtri_collision_separation_test -- test the projected extents for separation * - * obbtri_check_collision_axis -- project the obb and tri onto an arbitrary axis * - * obbtri_check_collision_cross_axis -- intersection check for a "cross-product" axis * - * obbtri_check_collision_basis_axis -- intersection check for a basis axis * - * obbtri_check_collision_normal_axis -- intersection check for the triangle normal * - * eval_side -- returns -1,0,+1 depending on the signe of val and side * - * obbtri_compute_contact_normal -- computes the normal of the collision * - * eval_A0_point -- contact point parameters for A0xEx * - * eval_A1_point -- contact point parameters for A1xEx * - * eval_A2_point -- contact point parameters for A2xEx * - * obbtri_compute_contact_point -- compute the contact point * - * CollisionMath::Collide -- collide an obbox into a triangle * - * obbtri_intersection_separation_test -- test the projected extents for intersection * - * obbtri_check_intersection_cross_axis -- intersection check for a "cross-product" axis * - * obbtri_check_intersection_basis_axis -- intersection check for a basis axis * - * obbtri_check_intersection_normal_axis -- intersection check for the triangle normal * - * CollisionMath::Intersection_Test -- Intersection check for an OBBox and a triangle * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "colmath.h" @@ -205,22 +186,8 @@ struct BTCollisionStruct -/*********************************************************************************************** - * obbtri_collision_separation_test -- test the projected extents for separation * - * * - * Once the extents are projected onto the axis, this function contains * - * the logic that determines the allowed fraction. * - * * - * INPUT: * - * * - * OUTPUT: * - * true = objects are SEPARATED * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/8/99 GTH : Created. * - *=============================================================================================*/ +// Test the projected extents for separation. Once the extents are projected onto the axis, this +// function contains the logic that determines the allowed fraction. static inline bool obbtri_collision_separation_test ( BTCollisionStruct & context, @@ -274,22 +241,8 @@ static inline bool obbtri_collision_separation_test } -/*********************************************************************************************** - * obbtri_check_collision_axis -- project the obb and tri onto an arbitrary axis * - * * - * projects the box and the triangle onto the given axis and calls * - * obbtri_separation_test. return true if separation was detected * - * * - * INPUT: * - * * - * OUTPUT: * - * true = objects are SEPARATED * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/8/99 GTH : Created. * - *=============================================================================================*/ +// Project the obb and tri onto an arbitrary axis and call obbtri_collision_separation_test. Returns +// true if separation was detected. static inline bool obbtri_check_collision_axis(BTCollisionStruct & context) { float dist; // separation along the axis @@ -328,23 +281,9 @@ static inline bool obbtri_check_collision_axis(BTCollisionStruct & context) } -/*********************************************************************************************** - * obbtri_check_collision_cross_axis -- projects obb and tri onto a "cross" axis * - * * - * Assumes that the axis given is one generated from a cross product of one of the edge and * - * basis vectors. In this case, the box extent can be optimized and only two triangle verts * - * need to be checked. * - * * - * INPUT: * - * * - * OUTPUT: * - * true = objects are SEPARATED * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/8/99 GTH : Created. * - *=============================================================================================*/ +// Projects obb and tri onto a "cross" axis. Assumes that the axis given is one generated from a +// cross product of one of the edge and basis vectors. In this case, the box extent can be optimized +// and only two triangle verts need to be checked. static inline bool obbtri_check_collision_cross_axis ( BTCollisionStruct & context, @@ -384,23 +323,8 @@ static inline bool obbtri_check_collision_cross_axis } -/*********************************************************************************************** - * obbtri_check_collision_basis_axis -- projects the obb and tri onto a basis axis * - * * - * Projects the box and triangle onto an axis that is assumed to be a basis * - * vector from the box. In this case, we can skip a dot-product and use the * - * corresponding extent of the box (which is passed in as leb0). * - * * - * INPUT: * - * * - * OUTPUT: * - * true = objects are SEPARATED * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/8/99 GTH : Created. * - *=============================================================================================*/ +// Projects the obb and tri onto a basis axis from the box. In this case, we can skip a dot-product +// and use the corresponding extent of the box (which is passed in as leb0). static inline bool obbtri_check_collision_basis_axis ( BTCollisionStruct & context, @@ -442,22 +366,7 @@ static inline bool obbtri_check_collision_basis_axis } -/*********************************************************************************************** - * obbtri_check_collision_normal_axis -- project the box and tri onto the tri-normal * - * * - * Projects the box and triangle onto an axis that is assumed to be the normal * - * vector from the triangle. In this case, the triangle extents are zero. * - * * - * INPUT: * - * * - * OUTPUT: * - * true = objects are SEPARATED * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/8/99 GTH : Created. * - *=============================================================================================*/ +// Project the box and tri onto the tri-normal. In this case, the triangle extents are zero. static inline bool obbtri_check_collision_normal_axis(BTCollisionStruct & context) { float dist; // separation along the axis @@ -489,18 +398,7 @@ static inline bool obbtri_check_collision_normal_axis(BTCollisionStruct & contex return obbtri_collision_separation_test(context,lp,leb0,leb1); } -/*********************************************************************************************** - * eval_side -- returns -1,0,+1 depending on the sign of val and side * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/8/99 GTH : Created. * - *=============================================================================================*/ +// Returns -1,0,+1 depending on the sign of val and side. static inline float eval_side(float val,int side) { if (val > 0.0f) { @@ -512,18 +410,6 @@ static inline float eval_side(float val,int side) } } -/*********************************************************************************************** - * obbtri_compute_contact_normal -- computes the normal of the collision * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/8/99 GTH : Created. * - *=============================================================================================*/ static inline void obbtri_compute_contact_normal ( const BTCollisionStruct & context, @@ -588,18 +474,7 @@ static inline void obbtri_compute_contact_normal } -/*********************************************************************************************** - * eval_A0_point -- contact point parameters for A0xEx * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/8/99 GTH : Created. * - *=============================================================================================*/ +// Contact point parameters for A0xEx. static inline void eval_A0_point(const BTCollisionStruct & context,float * x,int edge) { float yval,den; @@ -631,18 +506,7 @@ static inline void eval_A0_point(const BTCollisionStruct & context,float * x,int } -/*********************************************************************************************** - * eval_A1_point -- contact point parameters for A1xEx * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/8/99 GTH : Created. * - *=============================================================================================*/ +// Contact point parameters for A1xEx. static inline void eval_A1_point(const BTCollisionStruct & context,float * x,int edge) { float yval,den; @@ -673,18 +537,7 @@ static inline void eval_A1_point(const BTCollisionStruct & context,float * x,int } } -/*********************************************************************************************** - * eval_A2_point -- contact point parameters for A2xEx * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/8/99 GTH : Created. * - *=============================================================================================*/ +// Contact point parameters for A2xEx. static inline void eval_A2_point(const BTCollisionStruct & context,float * x,int edge) { float yval,den; @@ -716,18 +569,6 @@ static inline void eval_A2_point(const BTCollisionStruct & context,float * x,int } -/*********************************************************************************************** - * obbtri_compute_contact_point -- compute the contact point * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/8/99 GTH : Created. * - *=============================================================================================*/ static inline void obbtri_compute_contact_point ( BTCollisionStruct & context, @@ -867,18 +708,7 @@ static inline void obbtri_compute_contact_point -/*********************************************************************************************** - * CollisionMath::Collide -- collide an obbox into a triangle * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/8/99 GTH : Created. * - *=============================================================================================*/ +// Collide an obbox into a triangle. bool CollisionMath::Collide ( const OBBoxClass & box, @@ -1176,25 +1006,8 @@ struct BTIntersectStruct }; -/*********************************************************************************************** - * obbtri_intersection_separation_test -- test the projected extents for intersection * - * * - * Once the extents are projected onto the axis, this function contains * - * the logic that determines whether the box and triangle intersect. * - * * - * INPUT: * - * context - the BTIntersectStruct containing the data for this intersection test * - * lp - the leading edge of the polygon projected onto the axis * - * leb0 - the leading edge of the box projected onto the axis * - * * - * OUTPUT: * - * true = objects are separated * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/3/2000 gth : Created. * - *=============================================================================================*/ +// Test the projected extents for intersection. Once the extents are projected onto the axis, this +// function contains the logic that determines whether the box and triangle intersect. static inline bool obbtri_intersection_separation_test ( BTIntersectStruct & context, @@ -1216,21 +1029,8 @@ static inline bool obbtri_intersection_separation_test } -/*********************************************************************************************** - * obbtri_check_intersection_cross_axis -- intersection check for a "cross-product" axis * - * * - * axis being checked is a cross product between a triangle edge and a box basis vector * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * true = the objects are SEPARATED * - * * - * HISTORY: * - * 5/4/99 GTH : Created. * - *=============================================================================================*/ +// Axis being checked is a cross product between a triangle edge and a box basis vector. +// WARNING: True = the objects are SEPARATED. static inline bool obbtri_check_intersection_cross_axis ( BTIntersectStruct & context, @@ -1259,21 +1059,7 @@ static inline bool obbtri_check_intersection_cross_axis } -/*********************************************************************************************** - * obbtri_check_intersection_basis_axis -- intersection check for a basis axis * - * * - * axis being checked is one of the basis vectors for the box * - * * - * INPUT: * - * * - * OUTPUT: * - * true = the objects are SEPARATED * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/4/99 GTH : Created. * - *=============================================================================================*/ +// Axis being checked is one of the basis vectors for the box. static inline bool obbtri_check_intersection_basis_axis ( BTIntersectStruct & context, @@ -1305,21 +1091,7 @@ static inline bool obbtri_check_intersection_basis_axis } -/*********************************************************************************************** - * obbtri_check_intersection_normal_axis -- intersection check for the triangle normal * - * * - * axis being checked is the triangle's normal * - * * - * INPUT: * - * * - * OUTPUT: * - * true = the objects are SEPARATED * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/4/99 GTH : Created. * - *=============================================================================================*/ +// Axis being checked is the triangle's normal. static inline bool obbtri_check_intersection_normal_axis ( BTIntersectStruct & context @@ -1346,23 +1118,9 @@ static inline bool obbtri_check_intersection_normal_axis } -/*********************************************************************************************** - * CollisionMath::Intersection_Test -- Intersection check for an OBBox and a triangle * - * * - * INPUT: * - * box - obbox to be tested * - * tri - triangle to be tested * - * * - * OUTPUT: * - * true = objects INTERSECT * - * * - * WARNINGS: * - * note that the other inline functions are "quick-reject" functions which return true when * - * the objects are separated. * - * * - * HISTORY: * - * 5/4/99 GTH : Created. * - *=============================================================================================*/ +// Intersection check for an OBBox and a triangle. +// WARNING: Note that the other inline functions are "quick-reject" functions which return true when +// the objects are separated. bool CollisionMath::Intersection_Test(const OBBoxClass & box,const TriClass & tri) { float dp,leb0; diff --git a/Core/Libraries/Source/WWVegas/WWMath/colmathplane.cpp b/Core/Libraries/Source/WWVegas/WWMath/colmathplane.cpp index 48e3db7e954..5b8fd5b4acf 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/colmathplane.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/colmathplane.cpp @@ -33,8 +33,6 @@ * $Revision:: 10 $* * * * 06/26/02 KM Matrix name change to avoid MAX conflicts * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ diff --git a/Core/Libraries/Source/WWVegas/WWMath/colmathplane.h b/Core/Libraries/Source/WWVegas/WWMath/colmathplane.h index f49169e3ee8..f784c8755ed 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/colmathplane.h +++ b/Core/Libraries/Source/WWVegas/WWMath/colmathplane.h @@ -32,11 +32,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * get_far_extent -- gets extents of a box projected onto an axis * - * CollisionMath::Overlap_Test -- Tests overlap between a plane and a point * - * CollisionMath::Overlap_Test -- Tests overlap between a plane and an AABox * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once @@ -51,18 +46,7 @@ ** It is not automatically included in order to reduce file dependencies... */ -/*********************************************************************************************** - * get_far_extent -- gets extents of a box projected onto an axis * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/29/2000 gth : Created. * - *=============================================================================================*/ +// Gets extents of a box projected onto an axis. inline void get_far_extent(const Vector3 & normal,const Vector3 & extent,Vector3 * posfarpt) { if (WWMath::Fast_Is_Float_Positive(normal.X)) { @@ -85,18 +69,7 @@ inline void get_far_extent(const Vector3 & normal,const Vector3 & extent,Vector3 } -/*********************************************************************************************** - * CollisionMath::Overlap_Test -- Tests overlap between a plane and a point * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/29/2000 gth : Created. * - *=============================================================================================*/ +// Tests overlap between a plane and a point. inline CollisionMath::OverlapType CollisionMath::Overlap_Test(const PlaneClass & plane,const Vector3 & point) @@ -112,18 +85,7 @@ CollisionMath::Overlap_Test(const PlaneClass & plane,const Vector3 & point) } -/*********************************************************************************************** - * CollisionMath::Overlap_Test -- Tests overlap between a plane and an AABox * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/29/2000 gth : Created. * - *=============================================================================================*/ +// Tests overlap between a plane and an AABox. inline CollisionMath::OverlapType CollisionMath::Overlap_Test(const PlaneClass & plane,const AABoxClass & box) diff --git a/Core/Libraries/Source/WWVegas/WWMath/colmathsphere.cpp b/Core/Libraries/Source/WWVegas/WWMath/colmathsphere.cpp index 84e8cf1e4af..2ec890b1370 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/colmathsphere.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/colmathsphere.cpp @@ -30,16 +30,6 @@ * * * $Revision:: 6 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * CollisionMath::Intersection_Test -- Sphere - AAbox intersection * - * CollisionMath::Intersection_Test -- Sphere - OBBox intersection * - * CollisionMath::Overlap_Test -- Sphere - Point overlap test * - * CollisionMath::Overlap_Test -- sphere line overlap test * - * CollisionMath::Overlap_Test -- sphere triangle overlap test * - * CollisionMath::Overlap_Test -- Sphere - Sphere overlap test * - * CollisionMath::Overlap_Test -- Sphere - AABox overlap test * - * CollisionMath::Overlap_Test -- Sphere - OBBox overlap test * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -55,18 +45,7 @@ // Sphere Intersection functions. Does the sphere intersect the passed in object -/*********************************************************************************************** - * CollisionMath::Intersection_Test -- Sphere - AAbox intersection * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/25/2001 gth : Created. * - *=============================================================================================*/ +// Sphere - AAbox intersection. bool CollisionMath::Intersection_Test(const SphereClass & sphere,const AABoxClass & box) { /* @@ -82,18 +61,7 @@ bool CollisionMath::Intersection_Test(const SphereClass & sphere,const AABoxClas } -/*********************************************************************************************** - * CollisionMath::Intersection_Test -- Sphere - OBBox intersection * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/25/2001 gth : Created. * - *=============================================================================================*/ +// Sphere - OBBox intersection. bool CollisionMath::Intersection_Test(const SphereClass & sphere,const OBBoxClass & box) { /* @@ -111,18 +79,7 @@ bool CollisionMath::Intersection_Test(const SphereClass & sphere,const OBBoxClas } // Sphere Overlap functions. Where is operand B with respect to the sphere -/*********************************************************************************************** - * CollisionMath::Overlap_Test -- Sphere - Point overlap test * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/25/2001 gth : Created. * - *=============================================================================================*/ +// Sphere - Point overlap test. CollisionMath::OverlapType CollisionMath::Overlap_Test(const SphereClass & sphere,const Vector3 & point) { @@ -137,18 +94,7 @@ CollisionMath::Overlap_Test(const SphereClass & sphere,const Vector3 & point) } -/*********************************************************************************************** - * CollisionMath::Overlap_Test -- sphere line overlap test * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/25/2001 gth : Created. * - *=============================================================================================*/ +// Sphere line overlap test. CollisionMath::OverlapType CollisionMath::Overlap_Test(const SphereClass & /*sphere*/,const LineSegClass & /*line*/) { @@ -157,18 +103,7 @@ CollisionMath::Overlap_Test(const SphereClass & /*sphere*/,const LineSegClass & } -/*********************************************************************************************** - * CollisionMath::Overlap_Test -- sphere triangle overlap test * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/25/2001 gth : Created. * - *=============================================================================================*/ +// Sphere triangle overlap test. CollisionMath::OverlapType CollisionMath::Overlap_Test(const SphereClass & /*sphere*/,const TriClass & /*tri*/) { @@ -177,18 +112,7 @@ CollisionMath::Overlap_Test(const SphereClass & /*sphere*/,const TriClass & /*tr } -/*********************************************************************************************** - * CollisionMath::Overlap_Test -- Sphere - Sphere overlap test * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/25/2001 gth : Created. * - *=============================================================================================*/ +// Sphere - Sphere overlap test. CollisionMath::OverlapType CollisionMath::Overlap_Test(const SphereClass & sphere,const SphereClass & sphere2) { @@ -207,18 +131,7 @@ CollisionMath::Overlap_Test(const SphereClass & sphere,const SphereClass & spher } -/*********************************************************************************************** - * CollisionMath::Overlap_Test -- Sphere - AABox overlap test * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/25/2001 gth : Created. * - *=============================================================================================*/ +// Sphere - AABox overlap test. CollisionMath::OverlapType CollisionMath::Overlap_Test(const SphereClass & sphere,const AABoxClass & aabox) { @@ -227,18 +140,7 @@ CollisionMath::Overlap_Test(const SphereClass & sphere,const AABoxClass & aabox) } -/*********************************************************************************************** - * CollisionMath::Overlap_Test -- Sphere - OBBox overlap test * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/25/2001 gth : Created. * - *=============================================================================================*/ +// Sphere - OBBox overlap test. CollisionMath::OverlapType CollisionMath::Overlap_Test(const SphereClass & sphere,const OBBoxClass & obbox) { diff --git a/Core/Libraries/Source/WWVegas/WWMath/cullsys.cpp b/Core/Libraries/Source/WWVegas/WWMath/cullsys.cpp index 8872828d1a9..8f9302caa67 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/cullsys.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/cullsys.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 5 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "cullsys.h" diff --git a/Core/Libraries/Source/WWVegas/WWMath/cullsys.h b/Core/Libraries/Source/WWVegas/WWMath/cullsys.h index c3c8fba36a0..6263ba8fc14 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/cullsys.h +++ b/Core/Libraries/Source/WWVegas/WWMath/cullsys.h @@ -30,8 +30,6 @@ * * * $Revision:: 5 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWMath/culltype.h b/Core/Libraries/Source/WWVegas/WWMath/culltype.h index e4c19ca984a..e6fb99e4df9 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/culltype.h +++ b/Core/Libraries/Source/WWVegas/WWMath/culltype.h @@ -30,8 +30,6 @@ * * * $Revision:: 3 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWMath/curve.cpp b/Core/Libraries/Source/WWVegas/WWMath/curve.cpp index 44b228a4eaa..a1f49077cd1 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/curve.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/curve.cpp @@ -32,8 +32,6 @@ * * * $Revision:: 9 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ diff --git a/Core/Libraries/Source/WWVegas/WWMath/curve.h b/Core/Libraries/Source/WWVegas/WWMath/curve.h index 2b482c56718..139de1898c0 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/curve.h +++ b/Core/Libraries/Source/WWVegas/WWMath/curve.h @@ -30,8 +30,6 @@ * * * $Revision:: 8 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWMath/euler.cpp b/Core/Libraries/Source/WWVegas/WWMath/euler.cpp index d03dc15826e..6549d7d9d4b 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/euler.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/euler.cpp @@ -31,12 +31,6 @@ * * * $Revision:: 5 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * EulerAnglesClass::EulerAnglesClass -- constructor * - * EulerAnglesClass::Get_Angle -- returns angle 'i' of the euler angles * - * EulerAnglesClass::From_Matrix -- computes the equivalent euler angles for the given matrix* - * EulerAnglesClass::To_Matrix -- Builds a matrix from the given euler angles * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -126,52 +120,16 @@ static int _euler_axis_k(int order); static int _euler_axis_h(int order); -/*********************************************************************************************** - * EulerAnglesClass::EulerAnglesClass -- constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ EulerAnglesClass::EulerAnglesClass(const Matrix3D & M,int order) { this->From_Matrix(M,order); } -/*********************************************************************************************** - * EulerAnglesClass::Get_Angle -- returns angle 'i' of the euler angles * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ double EulerAnglesClass::Get_Angle(int i) { return Angle[i]; } -/*********************************************************************************************** - * EulerAnglesClass::From_Matrix -- computes the equivalent euler angles for the given matrix * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ void EulerAnglesClass::From_Matrix(const Matrix3D & M, int order) { int i,j,k,h,n,s,f; @@ -250,18 +208,6 @@ void EulerAnglesClass::From_Matrix(const Matrix3D & M, int order) -/*********************************************************************************************** - * EulerAnglesClass::To_Matrix -- Builds a matrix from the given euler angles * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ void EulerAnglesClass::To_Matrix(Matrix3D & M) { M.Make_Identity(); diff --git a/Core/Libraries/Source/WWVegas/WWMath/euler.h b/Core/Libraries/Source/WWVegas/WWMath/euler.h index 1de94097fc5..dbd924f4ab6 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/euler.h +++ b/Core/Libraries/Source/WWVegas/WWMath/euler.h @@ -31,8 +31,6 @@ * * * $Revision:: 5 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWMath/frustum.cpp b/Core/Libraries/Source/WWVegas/WWMath/frustum.cpp index 4235052744a..72078df59d1 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/frustum.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/frustum.cpp @@ -30,35 +30,15 @@ * * * $Revision:: 5 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * FrustumClass::Init -- Initialize a frustum object * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "frustum.h" -/*********************************************************************************************** - * FrustumClass::Init -- Initialize a frustum object * - * * - * This function initializes a frustum from the description of a camera * - * * - * INPUT: * - * camera - camera transform, note that the camera looks down the -Z axis * - * vpmin - min corner of the z=-1.0 view plane (not necessarily the near clip plane) * - * vpmax - max corner of the z=-1.0 view plane (not necessarily the near clip plane) * - * znear - near clip plane (should be negative, negated if it is not) * - * zfar - far clip plane (should be negative, negated if it is not) * - * * - * OUTPUT: * - * * - * WARNINGS: * - * The vpmin and vpmax variables are the min and max of a view-plane at z=-1.0 * - * * - * * - * HISTORY: * - * 2/17/2000 gth : Created. * - *=============================================================================================*/ +// Initializes a frustum from the description of a camera. Note that the camera looks down the -Z +// axis. The near and far clip planes should be negative, they are negated if they are not. +// WARNING: The vpmin and vpmax variables are the min and max of a view-plane at z=-1.0 (not +// necessarily the near clip plane). void FrustumClass::Init ( const Matrix3D & camera, diff --git a/Core/Libraries/Source/WWVegas/WWMath/frustum.h b/Core/Libraries/Source/WWVegas/WWMath/frustum.h index 4658ffebe27..adc6588e5c7 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/frustum.h +++ b/Core/Libraries/Source/WWVegas/WWMath/frustum.h @@ -30,8 +30,6 @@ * * * $Revision:: 3 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWMath/gridcull.cpp b/Core/Libraries/Source/WWVegas/WWMath/gridcull.cpp index 1f11e30e81c..eacd55c81e3 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/gridcull.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/gridcull.cpp @@ -30,25 +30,6 @@ * * * $Revision:: 18 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * GridCullSystemClass::GridCullSystemClass -- Constructor * - * GridCullSystemClass::~GridCullSystemClass -- Destructor * - * GridCullSystemClass::Collect_Objects -- Collect all objects touching the given point * - * GridCullSystemClass::Collect_Objects -- Collect all objects touching the given AABox * - * GridCullSystemClass::Collect_Objects -- Collect all objects touching the given OBBox * - * GridCullSystemClass::Collect_Objects -- Collect all objects touching the given Frustum * - * GridCullSystemClass::Re_Partition -- re-compute grid parameters for the given volume * - * GridCullSystemClass::Collect_And_Unlink_All -- collects all objects and removes them from * - * GridCullSystemClass::Update_Culling -- updates an objects position in the grid * - * GridCullSystemClass::Reset_Statistics -- reset debugging stats * - * GridCullSystemClass::Get_Statistics -- returns reference to the statistics structure * - * GridCullSystemClass::Add_Object_Internal -- links an object into the system * - * GridCullSystemClass::Remove_Object_Internal -- unlinks an object from the system * - * GridCullSystemClass::link_object -- figures out which cell the object is in and links it * - * GridCullSystemClass::unlink_object -- unlinks the object from the cell it is in * - * GridCullSystemClass::link_object_to_list -- grid list link function * - * GridCullSystemClass::unlink_object_from_list -- grid list unlink function * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -102,18 +83,6 @@ GridLinkClass::~GridLinkClass() *************************************************************************/ -/*********************************************************************************************** - * GridCullSystemClass::GridCullSystemClass -- Constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/27/2000 gth : Created. * - *=============================================================================================*/ GridCullSystemClass::GridCullSystemClass() : MinCellSize(10,10,10), MaxObjExtent(15), @@ -130,18 +99,6 @@ GridCullSystemClass::GridCullSystemClass() : } -/*********************************************************************************************** - * GridCullSystemClass::~GridCullSystemClass -- Destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/27/2000 gth : Created. * - *=============================================================================================*/ GridCullSystemClass::~GridCullSystemClass() { delete Cells; @@ -149,18 +106,7 @@ GridCullSystemClass::~GridCullSystemClass() } -/*********************************************************************************************** - * GridCullSystemClass::Collect_Objects -- Collect all objects touching the given point * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/27/2000 gth : Created. * - *=============================================================================================*/ +// Collect all objects touching the given point. void GridCullSystemClass::Collect_Objects(const Vector3 & point) { /* @@ -195,18 +141,7 @@ void GridCullSystemClass::Collect_Objects(const Vector3 & point) } -/*********************************************************************************************** - * GridCullSystemClass::Collect_Objects -- Collect all objects touching the given AABox * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/27/2000 gth : Created. * - *=============================================================================================*/ +// Collect all objects touching the given AABox. void GridCullSystemClass::Collect_Objects(const AABoxClass & box) { /* @@ -242,18 +177,7 @@ void GridCullSystemClass::Collect_Objects(const AABoxClass & box) } -/*********************************************************************************************** - * GridCullSystemClass::Collect_Objects -- Collect all objects touching the given OBBox * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/27/2000 gth : Created. * - *=============================================================================================*/ +// Collect all objects touching the given OBBox. void GridCullSystemClass::Collect_Objects(const OBBoxClass & box) { /* @@ -289,18 +213,7 @@ void GridCullSystemClass::Collect_Objects(const OBBoxClass & box) } -/*********************************************************************************************** - * GridCullSystemClass::Collect_Objects -- Collect all objects touching the given Frustum * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/27/2000 gth : Created. * - *=============================================================================================*/ +// Collect all objects touching the given Frustum. void GridCullSystemClass::Collect_Objects(const FrustumClass & frustum) { /* @@ -336,24 +249,7 @@ void GridCullSystemClass::Collect_Objects(const FrustumClass & frustum) } -/*********************************************************************************************** - * GridCullSystemClass::Re_Partition -- re-compute grid parameters for the given volume * - * * - * * - * * - * * - * INPUT: * - * input_min - 'min' corner of the world * - * input_max - 'max' corner of the world * - * objdim - largest object dimesion that will be allowed in the grid * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/27/2000 gth : Created. * - *=============================================================================================*/ +// Re-compute grid parameters for the given volume. void GridCullSystemClass::Re_Partition(const Vector3 & input_min,const Vector3 & input_max,float objdim) { /* @@ -451,21 +347,9 @@ void GridCullSystemClass::Re_Partition(const Vector3 & input_min,const Vector3 & } -/*********************************************************************************************** - * GridCullSystemClass::Collect_And_Unlink_All -- collects all objects and removes them from t * - * * - * This is used when re-partitioning the grid. All objects are pulled out and linked into * - * the collection list. When the grid has been re-initialized, the objects are put back in. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/27/2000 gth : Created. * - *=============================================================================================*/ +// Collects all objects and removes them from the grid. This is used when re-partitioning the grid. +// All objects are pulled out and linked into the collection list. When the grid has been +// re-initialized, the objects are put back in. void GridCullSystemClass::Collect_And_Unlink_All() { Reset_Collection(); @@ -509,18 +393,6 @@ void GridCullSystemClass::Collect_And_Unlink_All() } -/*********************************************************************************************** - * GridCullSystemClass::Update_Culling -- updates an objects position in the grid * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/27/2000 gth : Created. * - *=============================================================================================*/ void GridCullSystemClass::Update_Culling(CullableClass * obj) { WWASSERT(obj); @@ -537,18 +409,6 @@ void GridCullSystemClass::Update_Culling(CullableClass * obj) } -/*********************************************************************************************** - * GridCullSystemClass::Reset_Statistics -- reset debugging stats * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/27/2000 gth : Created. * - *=============================================================================================*/ void GridCullSystemClass::Reset_Statistics() { // number of (virtual) nodes = 2n-1 @@ -559,36 +419,12 @@ void GridCullSystemClass::Reset_Statistics() } -/*********************************************************************************************** - * GridCullSystemClass::Get_Statistics -- returns reference to the statistics structure * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/27/2000 gth : Created. * - *=============================================================================================*/ const GridCullSystemClass::StatsStruct & GridCullSystemClass::Get_Statistics() { return Stats; } -/*********************************************************************************************** - * GridCullSystemClass::Add_Object_Internal -- links an object into the system * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/27/2000 gth : Created. * - *=============================================================================================*/ void GridCullSystemClass::Add_Object_Internal(CullableClass * obj) { WWASSERT(obj); @@ -603,18 +439,6 @@ void GridCullSystemClass::Add_Object_Internal(CullableClass * obj) } -/*********************************************************************************************** - * GridCullSystemClass::Remove_Object_Internal -- unlinks an object from the system * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/27/2000 gth : Created. * - *=============================================================================================*/ void GridCullSystemClass::Remove_Object_Internal(CullableClass * obj) { WWASSERT(obj); @@ -631,18 +455,7 @@ void GridCullSystemClass::Remove_Object_Internal(CullableClass * obj) } -/*********************************************************************************************** - * GridCullSystemClass::link_object -- figures out which cell the object is in and links it * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/27/2000 gth : Created. * - *=============================================================================================*/ +// Figures out which cell the object is in and links it. void GridCullSystemClass::link_object(CullableClass * obj) { WWASSERT(obj); @@ -681,18 +494,6 @@ void GridCullSystemClass::link_object(CullableClass * obj,int address) } } -/*********************************************************************************************** - * GridCullSystemClass::unlink_object -- unlinks the object from the cell it is in * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/27/2000 gth : Created. * - *=============================================================================================*/ void GridCullSystemClass::unlink_object(CullableClass * obj) { WWASSERT(obj); @@ -707,18 +508,6 @@ void GridCullSystemClass::unlink_object(CullableClass * obj) } -/*********************************************************************************************** - * GridCullSystemClass::link_object_to_list -- grid list link function * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/27/2000 gth : Created. * - *=============================================================================================*/ void GridCullSystemClass::link_object_to_list(CullableClass ** head,CullableClass * obj) { WWASSERT(obj); @@ -741,18 +530,6 @@ void GridCullSystemClass::link_object_to_list(CullableClass ** head,CullableClas } -/*********************************************************************************************** - * GridCullSystemClass::unlink_object_from_list -- grid list unlink function * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/27/2000 gth : Created. * - *=============================================================================================*/ void GridCullSystemClass::unlink_object_from_list(CullableClass ** head,CullableClass * obj) { WWASSERT(obj); diff --git a/Core/Libraries/Source/WWVegas/WWMath/gridcull.h b/Core/Libraries/Source/WWVegas/WWMath/gridcull.h index ed28fcdaf04..75fd9983cfe 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/gridcull.h +++ b/Core/Libraries/Source/WWVegas/WWMath/gridcull.h @@ -30,25 +30,6 @@ * * * $Revision:: 14 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * GridCullSystemClass::clamp_indices_to_grid -- constrains indices to be a valid location * - * GridCullSystemClass::map_point_to_cell -- determines which cell the point is in * - * GridCullSystemClass::map_point_to_address -- determines the address of a point in the gri * - * GridCullSystemClass::map_indices_to_address -- computes the address for given index tripl * - * GridCullSystemClass::total_cell_count -- returns the total number of cells in the grid * - * GridCullSystemClass::compute_box -- computes the bounding box for a grid cell * - * GridCullSystemClass::compute_box -- computes bounding box for a range of grid cells * - * GridCullSystemClass::init_volume -- inits volume to contain the given range * - * GridCullSystemClass::init_volume -- inits volume to contain the given line segment * - * GridCullSystemClass::init_volume -- inits volume to contain the given box * - * GridCullSystemClass::init_volume -- inits volume to contain the given oriented box * - * GridCullSystemClass::init_volume -- inits volume to contain the given frustum * - * GridCullSystemClass::VolumeStruct::VolumeStruct -- constructor * - * GridCullSystemClass::VolumeStruct::VolumeStruct -- constructor * - * GridCullSystemClass::VolumeStruct::Is_Leaf -- check if volume is a leaf * - * GridCullSystemClass::VolumeStruct::Is_Empty -- check if volume is empty (or invalid) * - * GridCullSystemClass::VolumeStruct::Split -- split this volume * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once @@ -278,18 +259,7 @@ class GridListIterator -/*********************************************************************************************** - * GridCullSystemClass::clamp_indices_to_grid -- constrains indices to be a valid location * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/30/2000 gth : Created. * - *=============================================================================================*/ +// Constrains indices to be a valid location. WWINLINE void GridCullSystemClass::clamp_indices_to_grid(int * i,int * j,int * k) { if (*i < 0) *i = 0; @@ -301,18 +271,6 @@ WWINLINE void GridCullSystemClass::clamp_indices_to_grid(int * i,int * j,int * k } -/*********************************************************************************************** - * GridCullSystemClass::map_point_to_cell -- determines which cell the point is in * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/30/2000 gth : Created. * - *=============================================================================================*/ WWINLINE bool GridCullSystemClass::map_point_to_cell(const Vector3 & pt,int & set_i,int & set_j,int & set_k) { Vector3 dp = pt - Origin; @@ -329,18 +287,6 @@ WWINLINE bool GridCullSystemClass::map_point_to_cell(const Vector3 & pt,int & se } -/*********************************************************************************************** - * GridCullSystemClass::map_point_to_address -- determines the address of a point in the grid * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/30/2000 gth : Created. * - *=============================================================================================*/ WWINLINE bool GridCullSystemClass::map_point_to_address(const Vector3 & pt,int &set_address) { int i,j,k; @@ -356,54 +302,20 @@ WWINLINE bool GridCullSystemClass::map_point_to_address(const Vector3 & pt,int & } -/*********************************************************************************************** - * GridCullSystemClass::map_indices_to_address -- computes the address for given index triplet * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/30/2000 gth : Created. * - *=============================================================================================*/ +// Computes the address for given index triplet. WWINLINE int GridCullSystemClass::map_indices_to_address(int i,int j,int k) { return i + j*CellCount[0] + k*CellCount[0]*CellCount[1]; } -/*********************************************************************************************** - * GridCullSystemClass::total_cell_count -- returns the total number of cells in the grid * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/30/2000 gth : Created. * - *=============================================================================================*/ WWINLINE int GridCullSystemClass::total_cell_count() { return CellCount[0] * CellCount[1] * CellCount[2]; } -/*********************************************************************************************** - * GridCullSystemClass::compute_box -- computes the bounding box for a grid cell * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/30/2000 gth : Created. * - *=============================================================================================*/ +// Computes the bounding box for a grid cell. WWINLINE void GridCullSystemClass::compute_box(int i,int j,int k,AABoxClass * set_box) { WWASSERT(set_box != nullptr); @@ -424,18 +336,7 @@ WWINLINE void GridCullSystemClass::compute_box(int i,int j,int k,AABoxClass * se } -/*********************************************************************************************** - * GridCullSystemClass::compute_box -- computes bounding box for a range of grid cells * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/30/2000 gth : Created. * - *=============================================================================================*/ +// Computes bounding box for a range of grid cells. WWINLINE void GridCullSystemClass::compute_box(const GridCullSystemClass::VolumeStruct & vol, AABoxClass * set_box) { WWASSERT(set_box != nullptr); @@ -458,18 +359,7 @@ WWINLINE void GridCullSystemClass::compute_box(const GridCullSystemClass::Volume } -/*********************************************************************************************** - * GridCullSystemClass::init_volume -- inits volume to contain the given range * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/30/2000 gth : Created. * - *=============================================================================================*/ +// Inits volume to contain the given range. WWINLINE void GridCullSystemClass::init_volume ( const Vector3 & bound_min, @@ -503,18 +393,7 @@ WWINLINE void GridCullSystemClass::init_volume } -/*********************************************************************************************** - * GridCullSystemClass::init_volume -- inits volume to contain the given line segment * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/30/2000 gth : Created. * - *=============================================================================================*/ +// Inits volume to contain the given line segment. WWINLINE void GridCullSystemClass::init_volume(const LineSegClass & line,VolumeStruct * set_volume) { Vector3 min_pt,max_pt; @@ -528,36 +407,14 @@ WWINLINE void GridCullSystemClass::init_volume(const LineSegClass & line,VolumeS } -/*********************************************************************************************** - * GridCullSystemClass::init_volume -- inits volume to contain the given box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/30/2000 gth : Created. * - *=============================================================================================*/ +// Inits volume to contain the given box. WWINLINE void GridCullSystemClass::init_volume(const AABoxClass & box,VolumeStruct * set_volume) { init_volume(box.Center - box.Extent,box.Center + box.Extent,set_volume); } -/*********************************************************************************************** - * GridCullSystemClass::init_volume -- inits volume to contain the given oriented box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/30/2000 gth : Created. * - *=============================================================================================*/ +// Inits volume to contain the given oriented box. WWINLINE void GridCullSystemClass::init_volume(const OBBoxClass & box,VolumeStruct * set_volume) { Vector3 aaextent; @@ -566,52 +423,18 @@ WWINLINE void GridCullSystemClass::init_volume(const OBBoxClass & box,VolumeStru } -/*********************************************************************************************** - * GridCullSystemClass::init_volume -- inits volume to contain the given frustum * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/30/2000 gth : Created. * - *=============================================================================================*/ +// Inits volume to contain the given frustum. WWINLINE void GridCullSystemClass::init_volume(const FrustumClass & frustum,VolumeStruct * set_volume) { init_volume(frustum.Get_Bound_Min(),frustum.Get_Bound_Max(),set_volume); } -/*********************************************************************************************** - * GridCullSystemClass::VolumeStruct::VolumeStruct -- constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *=============================================================================================*/ WWINLINE GridCullSystemClass::VolumeStruct::VolumeStruct() { } -/*********************************************************************************************** - * GridCullSystemClass::VolumeStruct::VolumeStruct -- constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/30/2000 gth : Created. * - *=============================================================================================*/ WWINLINE GridCullSystemClass::VolumeStruct::VolumeStruct(int i0,int j0,int k0,int i1,int j1,int k1) { Min[0] = i0; @@ -626,54 +449,19 @@ WWINLINE GridCullSystemClass::VolumeStruct::VolumeStruct(int i0,int j0,int k0,in } -/*********************************************************************************************** - * GridCullSystemClass::VolumeStruct::Is_Leaf -- check if volume is a leaf * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/30/2000 gth : Created. * - *=============================================================================================*/ WWINLINE bool GridCullSystemClass::VolumeStruct::Is_Leaf() const { return ((Max[0]-Min[0] == 1) && (Max[1]-Min[1] == 1) && (Max[2]-Min[2] == 1)); } -/*********************************************************************************************** - * GridCullSystemClass::VolumeStruct::Is_Empty -- check if volume is empty (or invalid) * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/30/2000 gth : Created. * - *=============================================================================================*/ +// Check if volume is empty (or invalid). WWINLINE bool GridCullSystemClass::VolumeStruct::Is_Empty() const { return ((Max[0]-Min[0] <= 0) || (Max[1]-Min[1] <= 0) || (Max[2]-Min[2] <= 0)); } -/*********************************************************************************************** - * GridCullSystemClass::VolumeStruct::Split -- split this volume * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/30/2000 gth : Created. * - *=============================================================================================*/ WWINLINE void GridCullSystemClass::VolumeStruct::Split(VolumeStruct & v0,VolumeStruct & v1) const { // find the longest dimension diff --git a/Core/Libraries/Source/WWVegas/WWMath/hermitespline.cpp b/Core/Libraries/Source/WWVegas/WWMath/hermitespline.cpp index 43061d97711..c3d8b28fdf0 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/hermitespline.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/hermitespline.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 11 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ diff --git a/Core/Libraries/Source/WWVegas/WWMath/hermitespline.h b/Core/Libraries/Source/WWVegas/WWMath/hermitespline.h index 9bdce9f8c8e..3d00b1dcf63 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/hermitespline.h +++ b/Core/Libraries/Source/WWVegas/WWMath/hermitespline.h @@ -30,8 +30,6 @@ * * * $Revision:: 7 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWMath/lineseg.cpp b/Core/Libraries/Source/WWVegas/WWMath/lineseg.cpp index 13ad6c35e17..9b857d78e37 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/lineseg.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/lineseg.cpp @@ -30,12 +30,6 @@ * * * $Revision:: 25 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * LineSegClass::Set -- Initialize this 'lineseg' by transforming another 'lineseg' * - * LineSegClass::Set_Random -- create a random linesegment within the given space * - * LineSegClass::Find_Point_Closest_To -- Finds point on line closest to point supplied. * - * LineSegClass::Find_Intersection -- Finds the closest points on the two lines * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "lineseg.h" @@ -43,18 +37,7 @@ #include "matrix3d.h" -/*********************************************************************************************** - * LineSegClass::Set -- Initialize this 'lineseg' by transforming another 'lineseg' * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/17/98 GTH : Created. * - *=============================================================================================*/ +// Initialize this 'lineseg' by transforming another 'lineseg'. void LineSegClass::Set(const LineSegClass & that,const Matrix3D & tm) { /* @@ -79,18 +62,7 @@ void LineSegClass::Set(const LineSegClass & that,const Matrix3D & tm) Length = that.Length; } -/*********************************************************************************************** - * LineSegClass::Set_Random -- create a random linesegment within the given space * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/21/98 GTH : Created. * - *=============================================================================================*/ +// Create a random linesegment within the given space. void LineSegClass::Set_Random(const Vector3 & min,const Vector3 & max) { float frac; @@ -118,18 +90,6 @@ void LineSegClass::Set_Random(const Vector3 & min,const Vector3 & max) -/*********************************************************************************************** - * LineSegClass::Find_Point_Closest_To -- Finds point on line closest to point supplied. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 07/26/1999 SKB : Created. * - *=============================================================================================*/ Vector3 LineSegClass::Find_Point_Closest_To(const Vector3 &pos) const { // Get a vector from one line endpoint to point in question. @@ -150,18 +110,7 @@ Vector3 LineSegClass::Find_Point_Closest_To(const Vector3 &pos) const } -/*********************************************************************************************** - * LineSegClass::Find_Intersection -- Finds the closest points on the two lines.. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 03/03/2000 PDS : Created. * - *=============================================================================================*/ +// Finds the closest points on the two lines. bool LineSegClass::Find_Intersection ( diff --git a/Core/Libraries/Source/WWVegas/WWMath/lineseg.h b/Core/Libraries/Source/WWVegas/WWMath/lineseg.h index 9c1d5910ab6..9a61a64e6b3 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/lineseg.h +++ b/Core/Libraries/Source/WWVegas/WWMath/lineseg.h @@ -30,8 +30,6 @@ * * * $Revision:: 21 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWMath/lookuptable.cpp b/Core/Libraries/Source/WWVegas/WWMath/lookuptable.cpp index 286db57021e..affbb16f118 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/lookuptable.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/lookuptable.cpp @@ -32,8 +32,6 @@ * * * $Revision:: 5 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "lookuptable.h" diff --git a/Core/Libraries/Source/WWVegas/WWMath/lookuptable.h b/Core/Libraries/Source/WWVegas/WWMath/lookuptable.h index 14de4d28720..9024049316a 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/lookuptable.h +++ b/Core/Libraries/Source/WWVegas/WWMath/lookuptable.h @@ -32,8 +32,6 @@ * * * $Revision:: 6 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWMath/matrix3.cpp b/Core/Libraries/Source/WWVegas/WWMath/matrix3.cpp index c0b15e44186..37f82d944a0 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/matrix3.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/matrix3.cpp @@ -33,8 +33,6 @@ * $Revision:: 17 $* * * * 06/26/02 KM Matrix name change to avoid MAX conflicts * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -119,18 +117,7 @@ const Matrix3x3 Matrix3x3::RotateZ270 -/*********************************************************************************************** - * Matrix3x3::Matrix3x3 -- Convert a Matrix3D (fake 4x4) to a Matrix3x3 * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/02/1997 GH : Created. * - *=============================================================================================*/ +// Convert a Matrix3D (fake 4x4) to a Matrix3x3. Matrix3x3::Matrix3x3(const Matrix3D & m) { Row[0].Set(m[0][0],m[0][1],m[0][2]); diff --git a/Core/Libraries/Source/WWVegas/WWMath/matrix3.h b/Core/Libraries/Source/WWVegas/WWMath/matrix3.h index 379053fb5e9..b75028bb022 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/matrix3.h +++ b/Core/Libraries/Source/WWVegas/WWMath/matrix3.h @@ -34,26 +34,6 @@ * Last Update : June 6, 2002 [KM] * * * * 06/26/02 KM Matrix name change to avoid MAX conflicts * - *---------------------------------------------------------------------------------------------* - * Functions: * - * Matrix3x3::Matrix3x3 -- Constructor, optionally initialize to Identitiy matrix * - * Matrix3x3::Matrix3x3 -- Copy Constructor * - * Matrix3x3::Matrix3x3 -- Convert a Matrix3D (fake 4x4) to a Matrix3x3 * - * Matrix3x3::Matrix3x3 -- Constructor * - * Matrix3x3::Transpose -- Returns transpose of the matrix * - * Matrix3x3::Inverse -- returns the inverse of the matrix * - * Matrix3x3::Determinant -- returns the determinant of the matrix * - * Matrix3x3::operator = -- assignment operator * - * Matrix3x3::operator += -- "plus equals" operator * - * Matrix3x3::operator-= -- "minus equals" operator * - * Matrix3x3::operator *= -- "times equals" operator * - * Matrix3x3::operator /= -- "divide equals" operator * - * Create_X_Rotation_Matrix3 -- creates a matrix3 which is a rotation about X * - * Create_Y_Rotation_Matrix3 -- Creates a Matrix3x3 which is a rotation about Y * - * Create_Z_Rotation_Matrix3 -- Creates a matrix3 which is a rotation about Z * - * Matrix3x3::Rotate_X -- Post-mutiplies an x rotation onto the current matrix * - * Matrix3x3::Rotate_Y -- Post-multiplies the matrix with a rotation about Y * - * Matrix3x3::Rotate_Z -- Post-multiplies the matrix with a rotation about Z * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once @@ -253,18 +233,7 @@ class Matrix3x3 }; -/*********************************************************************************************** - * Matrix3x3::Matrix3x3 -- Constructor, optionally initialize to Identitiy matrix * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/02/1997 GH : Created. * - *=============================================================================================*/ +// Constructor, optionally initialize to Identity matrix. WWINLINE Matrix3x3::Matrix3x3(bool identity) { if (identity) { @@ -274,35 +243,11 @@ WWINLINE Matrix3x3::Matrix3x3(bool identity) } } -/*********************************************************************************************** - * Matrix3x3::Matrix3x3 -- Copy Constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/02/1997 GH : Created. * - *=============================================================================================*/ WWINLINE Matrix3x3::Matrix3x3(const Matrix3x3 & m) { Row[0] = m.Row[0]; Row[1] = m.Row[1]; Row[2] = m.Row[2]; } -/*********************************************************************************************** - * Matrix3x3::Matrix3x3 -- Constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/02/1997 GH : Created. * - *=============================================================================================*/ WWINLINE Matrix3x3::Matrix3x3(const Vector3 & r0, const Vector3 & r1, const Vector3 & r2) { Row[0] = r0; @@ -392,18 +337,6 @@ WWINLINE Matrix3x3::Matrix3x3(const Quaternion & q) this->Set(q); } -/*********************************************************************************************** - * Matrix3x3::Transpose -- Returns transpose of the matrix * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/02/1997 GH : Created. * - *=============================================================================================*/ WWINLINE Matrix3x3 Matrix3x3::Transpose() const { return Matrix3x3( @@ -413,18 +346,6 @@ WWINLINE Matrix3x3 Matrix3x3::Transpose() const ); } -/*********************************************************************************************** - * Matrix3x3::Inverse -- returns the inverse of the matrix * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/02/1997 GH : Created. * - *=============================================================================================*/ WWINLINE Matrix3x3 Matrix3x3::Inverse() const // Gauss-Jordan elimination with partial pivoting { Matrix3x3 a(*this); // As a evolves from original mat into identity @@ -465,18 +386,6 @@ WWINLINE Matrix3x3 Matrix3x3::Inverse() const // Gauss-Jordan elimination wit } -/*********************************************************************************************** - * Matrix3x3::Determinant -- returns the determinant of the matrix * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/7/20 DRM : Created. * - *=============================================================================================*/ WWINLINE float Matrix3x3::Determinant() const { return Row[0][0] * (Row[1][1] * Row[2][2] - Row[1][2] * Row[2][1]) @@ -484,144 +393,55 @@ WWINLINE float Matrix3x3::Determinant() const - Row[0][2] * (Row[1][0] * Row[2][1] - Row[1][1] * Row[2][0]); } -/*********************************************************************************************** - * Matrix3x3::operator = -- assignment operator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/02/1997 GH : Created. * - *=============================================================================================*/ WWINLINE Matrix3x3 & Matrix3x3::operator = (const Matrix3x3 & m) { Row[0] = m.Row[0]; Row[1] = m.Row[1]; Row[2] = m.Row[2]; return *this; } -/*********************************************************************************************** - * Matrix3x3::operator += -- "plus equals" operator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/02/1997 GH : Created. * - *=============================================================================================*/ +// "plus equals" operator. WWINLINE Matrix3x3& Matrix3x3::operator += (const Matrix3x3 & m) { Row[0] += m.Row[0]; Row[1] += m.Row[1]; Row[2] += m.Row[2]; return *this; } -/*********************************************************************************************** - * Matrix3x3::operator-= -- "minus equals" operator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/02/1997 GH : Created. * - *=============================================================================================*/ +// "minus equals" operator. WWINLINE Matrix3x3& Matrix3x3::operator -= (const Matrix3x3 & m) { Row[0] -= m.Row[0]; Row[1] -= m.Row[1]; Row[2] -= m.Row[2]; return *this; } -/*********************************************************************************************** - * Matrix3x3::operator *= -- "times equals" operator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/02/1997 GH : Created. * - *=============================================================================================*/ +// "times equals" operator. WWINLINE Matrix3x3& Matrix3x3::operator *= (float d) { Row[0] *= d; Row[1] *= d; Row[2] *= d; return *this; } -/*********************************************************************************************** - * Matrix3x3::operator /= -- "divide equals" operator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/02/1997 GH : Created. * - *=============================================================================================*/ +// "divide equals" operator. WWINLINE Matrix3x3& Matrix3x3::operator /= (float d) { Row[0] /= d; Row[1] /= d; Row[2] /= d; return *this; } -/*********************************************************************************************** - * Matrix3x3::Get_X_Rotation -- approximates the rotation about the X axis * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ +// Approximates the rotation about the X axis. WWINLINE float Matrix3x3::Get_X_Rotation() const { Vector3 v = (*this) * Vector3(0.0,1.0,0.0); return WWMath::Atan2(v[2], v[1]); } -/*********************************************************************************************** - * Matrix3x3::Get_Y_Rotation -- approximates the rotation about the Y axis * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ +// Approximates the rotation about the Y axis. WWINLINE float Matrix3x3::Get_Y_Rotation() const { Vector3 v = (*this) * Vector3(0.0,0.0,1.0); return WWMath::Atan2(v[0],v[2]); } -/*********************************************************************************************** - * Matrix3x3::Get_Z_Rotation -- approximates the rotation about the Z axis * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ +// Approximates the rotation about the Z axis. WWINLINE float Matrix3x3::Get_Z_Rotation() const { Vector3 v = (*this) * Vector3(1.0,0.0,0.0); @@ -761,18 +581,7 @@ WWINLINE int operator != (const Matrix3x3 & a, const Matrix3x3 & b) } -/*********************************************************************************************** - * Matrix3x3::Rotate_X -- Post-mutiplies an x rotation onto the current matrix * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/26/1997 GH : Created. * - *=============================================================================================*/ +// Post-multiplies an x rotation onto the current matrix. WWINLINE void Matrix3x3::Rotate_X(float theta) { Rotate_X(WWMath::Sinf(theta),WWMath::Cosf(theta)); @@ -795,18 +604,7 @@ WWINLINE void Matrix3x3::Rotate_X(float s,float c) Row[2][2] = (float)(-s*tmp1 + c*tmp2); } -/*********************************************************************************************** - * Matrix3x3::Rotate_Y -- Post-multiplies the matrix with a rotation about Y * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/26/1997 GH : Created. * - *=============================================================================================*/ +// Post-multiplies the matrix with a rotation about Y. WWINLINE void Matrix3x3::Rotate_Y(float theta) { Rotate_Y(WWMath::Sinf(theta),WWMath::Cosf(theta)); @@ -830,18 +628,7 @@ WWINLINE void Matrix3x3::Rotate_Y(float s,float c) } -/*********************************************************************************************** - * Matrix3x3::Rotate_Z -- Post-multiplies the matrix with a rotation about Z * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/26/1997 GH : Created. * - *=============================================================================================*/ +// Post-multiplies the matrix with a rotation about Z. WWINLINE void Matrix3x3::Rotate_Z(float theta) { Rotate_Z(WWMath::Sinf(theta),WWMath::Cosf(theta)); @@ -865,18 +652,6 @@ WWINLINE void Matrix3x3::Rotate_Z(float s,float c) } -/*********************************************************************************************** - * Create_X_Rotation_Matrix3 -- creates a matrix3 which is a rotation about X * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/26/1997 GH : Created. * - *=============================================================================================*/ WWINLINE Matrix3x3 Create_X_Rotation_Matrix3(float s,float c) { Matrix3x3 mat; @@ -901,18 +676,6 @@ WWINLINE Matrix3x3 Create_X_Rotation_Matrix3(float rad) return Create_X_Rotation_Matrix3(WWMath::Sinf(rad),WWMath::Cosf(rad)); } -/*********************************************************************************************** - * Create_Y_Rotation_Matrix3 -- Creates a Matrix3x3 which is a rotation about Y * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/26/1997 GH : Created. * - *=============================================================================================*/ WWINLINE Matrix3x3 Create_Y_Rotation_Matrix3(float s,float c) { Matrix3x3 mat; @@ -937,18 +700,6 @@ WWINLINE Matrix3x3 Create_Y_Rotation_Matrix3(float rad) return Create_Y_Rotation_Matrix3(WWMath::Sinf(rad),WWMath::Cosf(rad)); } -/*********************************************************************************************** - * Create_Z_Rotation_Matrix3 -- Creates a matrix3 which is a rotation about Z * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/26/1997 GH : Created. * - *=============================================================================================*/ WWINLINE Matrix3x3 Create_Z_Rotation_Matrix3(float s,float c) { Matrix3x3 mat; diff --git a/Core/Libraries/Source/WWVegas/WWMath/matrix3d.cpp b/Core/Libraries/Source/WWVegas/WWMath/matrix3d.cpp index 517ab181522..95b4755e2f7 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/matrix3d.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/matrix3d.cpp @@ -34,25 +34,6 @@ * Last Update : June 6, 2002 [KM] * * * * 06/26/02 KM Matrix name change to avoid MAX conflicts * - *---------------------------------------------------------------------------------------------* - * Functions: * - * Matrix3D::Set_Rotation -- Sets the rotation part of the matrix * - * Matrix3D::Set_Rotation -- Sets the rotation part of the matrix * - * Matrix3D::Set -- Init a matrix3D from a matrix3 and a position * - * Matrix3D::Set -- Init a matrix3D from a quaternion and a position * - * Matrix3D::Get_X_Rotation -- approximates the rotation about the X axis * - * Matrix3D::Get_Y_Rotation -- approximates the rotation about the Y axis * - * Matrix3D::Get_Z_Rotation -- approximates the rotation about the Z axis * - * Matrix3D::Multiply -- matrix multiplication without temporaries. * - * Matrix3D::Inverse_Rotate_Vector -- rotates a vector by the inverse of the 3x3 sub-matrix * - * Matrix3D::Transform_Min_Max_AABox -- compute transformed axis-aligned box * - * Matrix3D::Transform_Center_Extent_AABox -- compute transformed axis-aligned box * - * Matrix3D::Get_Inverse -- calculate the inverse of this matrix * - * Matrix3D::Get_Orthogonal_Inverse -- Returns the inverse of the matrix * - * Matrix3D::Re_Orthogonalize -- makes this matrix orthogonal. * - * Matrix3D::Is_Orthogonal -- checks whether this matrix is orthogonal * - * Lerp - linearly interpolate matrices (orientation is slerped) * - * Matrix3D::Solve_Linear_System -- 3x3 Gauss-Jordan elimination * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "matrix3d.h" @@ -141,17 +122,7 @@ const Matrix3D Matrix3D::RotateZ270 ); -/*********************************************************************************************** - * Matrix3D::Set -- Init a matrix3D from a matrix3 and a position * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *=============================================================================================*/ +// Init a matrix3D from a matrix3 and a position. void Matrix3D::Set(const Matrix3x3 & rot,const Vector3 & pos) { Row[0].Set( rot[0][0], rot[0][1], rot[0][2], pos[0]); @@ -160,17 +131,7 @@ void Matrix3D::Set(const Matrix3x3 & rot,const Vector3 & pos) } -/*********************************************************************************************** - * Matrix3D::Set -- Init a matrix3D from a quaternion and a position * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *=============================================================================================*/ +// Init a matrix3D from a quaternion and a position. void Matrix3D::Set(const Quaternion & rot,const Vector3 & pos) { Set_Rotation(rot); @@ -178,18 +139,6 @@ void Matrix3D::Set(const Quaternion & rot,const Vector3 & pos) } -/*********************************************************************************************** - * Matrix3D::Set_Rotation -- Sets the rotation part of the matrix * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/11/98 GTH : Created. * - *=============================================================================================*/ void Matrix3D::Set_Rotation(const Matrix3x3 & m) { Row[0][0] = m[0][0]; @@ -206,18 +155,6 @@ void Matrix3D::Set_Rotation(const Matrix3x3 & m) } -/*********************************************************************************************** - * Matrix3D::Set_Rotation -- Sets the rotation part of the matrix * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/11/98 GTH : Created. * - *=============================================================================================*/ void Matrix3D::Set_Rotation(const Quaternion & q) { Row[0][0] = (float)(1.0 - 2.0 * (q[1] * q[1] + q[2] * q[2])); @@ -234,71 +171,28 @@ void Matrix3D::Set_Rotation(const Quaternion & q) } -/*********************************************************************************************** - * Matrix3D::Get_X_Rotation -- approximates the rotation about the X axis * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ +// Approximates the rotation about the X axis. float Matrix3D::Get_X_Rotation() const { return WWMath::Atan2(Row[2][1], Row[1][1]); } -/*********************************************************************************************** - * Matrix3D::Get_Y_Rotation -- approximates the rotation about the Y axis * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ +// Approximates the rotation about the Y axis. float Matrix3D::Get_Y_Rotation() const { return WWMath::Atan2(Row[0][2], Row[2][2]); } -/*********************************************************************************************** - * Matrix3D::Get_Z_Rotation -- approximates the rotation about the Z axis * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ +// Approximates the rotation about the Z axis. float Matrix3D::Get_Z_Rotation() const { return WWMath::Atan2(Row[1][0], Row[0][0]); } -/*********************************************************************************************** - * M3DC::Rotate_Vector -- Uses the 3x3 sub-matrix to rotate a vector * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *=============================================================================================*/ +// Uses the 3x3 sub-matrix to rotate a vector. Vector3 Matrix3D::Rotate_Vector(const Vector3 &vect) const { return Vector3( @@ -309,18 +203,7 @@ Vector3 Matrix3D::Rotate_Vector(const Vector3 &vect) const } -/*********************************************************************************************** - * Matrix3D::Inverse_Rotate_Vector -- rotates a vector by the inverse of the 3x3 sub-matrix * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/27/98 GTH : Created. * - *=============================================================================================*/ +// Rotates a vector by the inverse of the 3x3 sub-matrix. Vector3 Matrix3D::Inverse_Rotate_Vector(const Vector3 &vect) const { return Vector3( @@ -330,29 +213,12 @@ Vector3 Matrix3D::Inverse_Rotate_Vector(const Vector3 &vect) const ); } -/*********************************************************************************************** - * M3DC::Look_At -- Creates a "look at" transformation. * - * * - * Builds a transformation matrix which positions the origin at p, * - * points the negative z-axis towards a target t, and rolls about the z-axis * - * by the angle specified by roll. * - * * - * This can be useful for creating a camera matrix, just invert * - * the matrix after initializing it with this function... * - * * - * INPUT: * - * p - position of the coordinate system * - * t - target of the coordinate system * - * roll - roll angle (in radians) * - * * - * OUTPUT: * - * * - * WARNINGS: * - * This function is written assuming the convention that the "ground" is the X-Y plane and * - * Z is altitude. * - * * - * HISTORY: * - *=============================================================================================*/ +// Creates a "look at" transformation. Builds a transformation matrix which positions the origin at +// p, points the negative z-axis towards a target t, and rolls about the z-axis by the angle +// specified by roll (in radians). This can be useful for creating a camera matrix, just invert the +// matrix after initializing it with this function. +// WARNING: This function is written assuming the convention that the "ground" is the X-Y plane and +// Z is altitude. void Matrix3D::Look_At(const Vector3 &p,const Vector3 &t,float roll) { Vector3 dir(t - p); @@ -440,27 +306,11 @@ void Matrix3D::buildTransformMatrix( const Vector3 &pos, const Vector3 &dir ) Rotate_Y( -sinp, cosp ); } -/*********************************************************************************************** - * M3DC::Obj_Look_At -- Commando Object "look at" transformation. * - * * - * Builds a transformation matrix which positions the origin at p, * - * points the positive X axis towards a target t, and rolls about the X axis * - * by the angle specified by roll. * - * * - * The object convention used by Commando and G is Forward = +X, Left = +Y, Up = +Z. The * - * world is basically the x-y plane with z as altitude and +x is the default "forward". * - * * - * INPUT: * - * p - position of the coordinate system * - * t - target of the coordinate system * - * roll - roll angle (in radians) * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *=============================================================================================*/ +// Commando Object "look at" transformation. Builds a transformation matrix which positions the +// origin at p, points the positive X axis towards a target t, and rolls about the X axis by the +// angle specified by roll (in radians). The object convention used by Commando and G is +// Forward = +X, Left = +Y, Up = +Z. The world is basically the x-y plane with z as altitude and +x +// is the default "forward". void Matrix3D::Obj_Look_At(const Vector3 &p,const Vector3 &t,float roll) { float dx,dy,dz; //vector from p to t @@ -505,19 +355,7 @@ void Matrix3D::Obj_Look_At(const Vector3 &p,const Vector3 &t,float roll) } -/*********************************************************************************************** - * Matrix3D::Get_Inverse -- calculate the inverse of this matrix * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 8/7/98 GTH : Created. * - * 01/03/2026 TheSuperHackers : Implemented. * - *=============================================================================================*/ +// TheSuperHackers @feature Implemented the general inverse. Matrix3D * Matrix3D::Get_Inverse(Matrix3D * out, float * detOut, const Matrix3D * m) { // Read linear + translation elements @@ -588,35 +426,18 @@ void Matrix3D::Get_Inverse(Matrix3D & inv) const Get_Inverse(&inv, NULL, this); } -/*********************************************************************************************** - * Matrix3D::Get_Orthogonal_Inverse -- Returns the inverse of the matrix * - * * - * NOTE!!! This only works if the matrix is really ORTHOGONAL!!! * - * * - *********************************************************************************************** - * Inverting an orthogonal Matrix3D * - * * - * M is the original transform, * - * R is rotation submatrix, * - * T is translation vector in M. * - * * - * To build MINV * - * * - * R' = transpose of R (inverse of orthogonal 3x3 matrix is transpose) * - * T' = -R'T * - * * - * Build MINV with R'and T' * - * MINV is the inverse of M * - * * - *********************************************************************************************** - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *=============================================================================================*/ +// NOTE: This only works if the matrix is really ORTHOGONAL! +// +// Inverting an orthogonal Matrix3D: +// M is the original transform, +// R is rotation submatrix, +// T is translation vector in M. +// +// To build MINV: +// R' = transpose of R (inverse of orthogonal 3x3 matrix is transpose) +// T' = -R'T +// +// Build MINV with R' and T'. MINV is the inverse of M. void Matrix3D::Get_Orthogonal_Inverse(Matrix3D & inv) const { // Transposing the rotation submatrix @@ -643,18 +464,7 @@ void Matrix3D::Get_Orthogonal_Inverse(Matrix3D & inv) const inv.Row[2][3] = trans[2]; } -/*********************************************************************************************** - * Copy_3x3_Matrix(float *matrix) -- Copies a 3x3 (float[9]) matrix into this matrix * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/16/98 EHC : Created. * - *=============================================================================================*/ +// Copies a 3x3 (float[9]) matrix into this matrix. void Matrix3D::Copy_3x3_Matrix(float matrix[3][3]) { Row[0][0] = matrix[0][0]; @@ -673,18 +483,7 @@ void Matrix3D::Copy_3x3_Matrix(float matrix[3][3]) -/*********************************************************************************************** - * Matrix3D::Multiply -- matrix multiplication without temporaries. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/22/98 GTH : Created. * - *=============================================================================================*/ +// Matrix multiplication without temporaries. //void print_matrix(const Matrix3D & m); void Matrix3D::Multiply(const Matrix3D & A,const Matrix3D & B,Matrix3D * set_res) @@ -1033,18 +832,7 @@ void Matrix3D::Multiply(const Matrix3D & A,const Matrix3D & B,Matrix3D * set_res } #endif -/*********************************************************************************************** - * Matrix3D::Transform_Min_Max_AABox -- compute transformed axis-aligned box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/17/98 GTH : Created. * - *=============================================================================================*/ +// Compute transformed axis-aligned box. void Matrix3D::Transform_Min_Max_AABox ( const Vector3 & min, @@ -1087,18 +875,7 @@ void Matrix3D::Transform_Min_Max_AABox } -/*********************************************************************************************** - * Matrix3D::Transform_Center_Extent_AABox -- compute transformed axis-aligned box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/17/98 GTH : Created. * - *=============================================================================================*/ +// Compute transformed axis-aligned box. void Matrix3D::Transform_Center_Extent_AABox ( const Vector3 & center, @@ -1128,18 +905,6 @@ void Matrix3D::Transform_Center_Extent_AABox } -/*********************************************************************************************** - * Matrix3D::Is_Orthogonal -- checks whether this matrix is orthogonal * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 9/16/98 GTH : Created. * - *=============================================================================================*/ int Matrix3D::Is_Orthogonal() const { Vector3 x(Row[0].X,Row[0].Y,Row[0].Z); @@ -1157,20 +922,8 @@ int Matrix3D::Is_Orthogonal() const return 1; } -/*********************************************************************************************** - * Matrix3D::Re_Orthogonalize -- makes this matrix orthogonal. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * This function is rather expensive, should only be used if you *know* numerical error is * - * killing you. * - * * - * HISTORY: * - * 9/16/98 GTH : Created. * - *=============================================================================================*/ +// WARNING: This function is rather expensive, should only be used if you *know* numerical error is +// killing you. void Matrix3D::Re_Orthogonalize() { Vector3 x(Row[0][0],Row[0][1],Row[0][2]); @@ -1218,18 +971,7 @@ void Matrix3D::Re_Orthogonalize() } -/*********************************************************************************************** - * Lerp - linearly interpolate matrices (orientation is slerped) * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 10/05/1998 NH : Created. * - *=============================================================================================*/ +// Linearly interpolate matrices (orientation is slerped). void Matrix3D::Lerp(const Matrix3D &A, const Matrix3D &B, float factor, Matrix3D& result) { assert(factor >= 0.0f); @@ -1248,21 +990,9 @@ void Matrix3D::Lerp(const Matrix3D &A, const Matrix3D &B, float factor, Matrix3D } -/*********************************************************************************************** - * Matrix3D::Solve_Linear_System -- 3x3 Gauss-Jordan elimination * - * * - * The result of this function will be that the 3x3 sub-matrix is inverted and the * - * final column will contain the result. False is returned if the system cannot be solved. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/18/2001 gth : Created. * - *=============================================================================================*/ +// 3x3 Gauss-Jordan elimination. The result of this function will be that the 3x3 sub-matrix is +// inverted and the final column will contain the result. False is returned if the system cannot be +// solved. bool Matrix3D::Solve_Linear_System(Matrix3D & system) { /* diff --git a/Core/Libraries/Source/WWVegas/WWMath/matrix3d.h b/Core/Libraries/Source/WWVegas/WWMath/matrix3d.h index 3fec2bd76c4..9fdb67cdbec 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/matrix3d.h +++ b/Core/Libraries/Source/WWVegas/WWMath/matrix3d.h @@ -34,46 +34,6 @@ * Last Update : June 6, 2002 [KM] * * * * 06/26/02 KM Matrix name change to avoid MAX conflicts * - *---------------------------------------------------------------------------------------------* - * Functions: * - * Matrix3D::Matrix3D -- Constructors for Matrix3D * - * Matrix3D::Set -- init a Matrix3D from an arrray of 12 floats * - * Matrix3D::Set -- Init a Matrix3D from 12 individual floats * - * Matrix3D::Set -- Init a matrix from 3 axis vectors and a position * - * Matrix3D::Set -- init a matrix to be a rotation about the given axis * - * Matrix3D::Set -- init a matrix to be a rotation about the given axis * - * Matrix3D::Set -- Init a matrix to be a pure translation * - * Matrix3D::Make_Identity -- Initializes the matrix to be the identity matrix * - * Matrix3D::Translate -- Post-Multiplies by a Translation Matrix * - * Matrix3D::Translate -- Post-Multiplies the matrix by a translation matrix * - * M3DC::Translate_X -- Post-Multiplies the matrix by a translation matrix with X only * - * M3DC::Translate_Y -- Post-Multiplies the matrix by a translation matrix with Y only * - * M3DC::Translate_Z -- Post-Multiplies the matrix by a translation matrix with Z only * - * Matrix3D::Rotate_X -- Post-Multiplies the matrix by a rotation about the X axis * - * Matrix3D::Rotate_X -- Post-Multiplies the matrix by a rotation about the X axis * - * Matrix3D::Rotate_Y -- Post-multiplies the matrix by a rotation about the Y axis * - * Matrix3D::Rotate_Y -- Post-Multiplies the matrix by a rotation about Y * - * Matrix3D::Rotate_Z -- Post-multiplies the matrix by a rotation about Z * - * Matrix3D::Rotate_Z -- Post-multiplies the matrix by a rotation about Z * - * Matrix3D::Scale -- Scales Matrix !!! WARNING DO NOT USE, INV FUNCTION WILL FAIL * - * Matrix3D::Scale -- Scales Matrix !!! WARNING DO NOT USE, INV FUNCTION WILL FAIL * - * Matrix3D::Scale -- Scales Matrix !!! WARNING DO NOT USE, INV FUNCTION WILL FAIL * - * M3DC::Pre_Rotate_X -- Pre-multiplies the matrix by a rotation about X * - * M3DC::Pre_Rotate_Y -- Pre-multiplies the matrix by a rotation about Y * - * M3DC::Pre_Rotate_Z -- Pre-multiplies the matrix by a rotation about Z * - * M3DC::Pre_Rotate_X -- Pre-multiplies the matrix by a rotation about X * - * M3DC::Pre_Rotate_Y -- Pre-multiplies the matrix by a rotation about Y * - * M3DC::Pre_Rotate_Z -- Pre-multiplies the matrix by a rotation about Z * - * M3DC::In_Place_Pre_Rotate_X -- Pre-multiplies rotation part of matrix by rotation about X * - * M3DC::In_Place_Pre_Rotate_Y -- Pre-multiplies rotation part of matrix by rotation about Y * - * M3DC::In_Place_Pre_Rotate_Z -- Pre-multiplies rotation part of matrix by rotation about Z * - * M3DC::In_Place_Pre_Rotate_X -- Pre-multiplies rotation part of matrix by rotation about X * - * M3DC::In_Place_Pre_Rotate_Y -- Pre-multiplies rotation part of matrix by rotation about Y * - * M3DC::In_Place_Pre_Rotate_Z -- Pre-multiplies rotation part of matrix by rotation about Z * - * operator * -- Matrix multiplication * - * operator * -- Matrix - vector multiplication * - * operator == -- Matrix equality operator * - * operator != -- Matrix inequality operator * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #define NO_ALLOW_TEMPORARIES @@ -402,18 +362,6 @@ bool operator == (const Matrix3D &A, const Matrix3D &B); bool operator != (const Matrix3D &A, const Matrix3D &B); -/*********************************************************************************************** - * M3DC::Matrix3D -- Constructors for Matrix3D * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/24/1997 GH : Created. * - *=============================================================================================*/ WWINLINE Matrix3D::Matrix3D(float m[12]) { Row[0].Set(m[0],m[1],m[2],m[3]); @@ -487,18 +435,7 @@ WWINLINE Matrix3D & Matrix3D::operator = (const Matrix3D & m) } -/*********************************************************************************************** - * Matrix3D::Set -- init a Matrix3D from an arrray of 12 floats * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/24/98 GTH : Created. * - *=============================================================================================*/ +// Init a Matrix3D from an array of 12 floats. WWINLINE void Matrix3D::Set(float m[12]) { Row[0].Set(m[0],m[1],m[2],m[3]); @@ -507,18 +444,7 @@ WWINLINE void Matrix3D::Set(float m[12]) } -/*********************************************************************************************** - * Matrix3D::Set -- Init a Matrix3D from 12 individual floats * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/24/98 GTH : Created. * - *=============================================================================================*/ +// Init a Matrix3D from 12 individual floats. WWINLINE void Matrix3D::Set( float m11,float m12,float m13,float m14, float m21,float m22,float m23,float m24, float m31,float m32,float m33,float m34) @@ -529,18 +455,7 @@ WWINLINE void Matrix3D::Set( float m11,float m12,float m13,float m14, } -/*********************************************************************************************** - * Matrix3D::Set -- Init a matrix from 3 axis vectors and a position * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/24/98 GTH : Created. * - *=============================================================================================*/ +// Init a matrix from 3 axis vectors and a position. WWINLINE void Matrix3D::Set( const Vector3 &x, // x-axis unit vector const Vector3 &y, // y-axis unit vector const Vector3 &z, // z-axis unit vector @@ -552,18 +467,7 @@ WWINLINE void Matrix3D::Set( const Vector3 &x, // x-axis unit vector } -/*********************************************************************************************** - * Matrix3D::Set -- init a matrix to be a rotation about the given axis * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/24/98 GTH : Created. * - *=============================================================================================*/ +// Init a matrix to be a rotation about the given axis. WWINLINE void Matrix3D::Set(const Vector3 & axis,float angle) { float c = WWMath::Cosf(angle); @@ -572,18 +476,7 @@ WWINLINE void Matrix3D::Set(const Vector3 & axis,float angle) Set(axis,s,c); } -/*********************************************************************************************** - * Matrix3D::Set -- init a matrix to be a rotation about the given axis * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/24/98 GTH : Created. * - *=============================================================================================*/ +// Init a matrix to be a rotation about the given axis. WWINLINE void Matrix3D::Set(const Vector3 & axis,float s,float c) { assert(WWMath::Fabsf_Legacy(axis.Length2() - 1.0f) < 0.001f); @@ -611,18 +504,7 @@ WWINLINE void Matrix3D::Set(const Vector3 & axis,float s,float c) } -/*********************************************************************************************** - * Matrix3D::Set -- Init a matrix to be a pure translation * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/24/98 GTH : Created. * - *=============================================================================================*/ +// Init a matrix to be a pure translation. WWINLINE void Matrix3D::Set(const Vector3 & position) { Row[0].Set(1.0f,0.0f,0.0f,position[0]); @@ -631,18 +513,7 @@ WWINLINE void Matrix3D::Set(const Vector3 & position) } -/*********************************************************************************************** - * M3DC::Make_Identity -- Initializes the matrix to be the identity matrix * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/24/1997 GH : Created. * - *=============================================================================================*/ +// Initializes the matrix to be the identity matrix. WWINLINE void Matrix3D::Make_Identity() { Row[0].Set(1.0f,0.0f,0.0f,0.0f); @@ -651,18 +522,7 @@ WWINLINE void Matrix3D::Make_Identity() } -/*********************************************************************************************** - * M3DC::Translate -- Post-Multiplies by a Translation Matrix * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/24/1997 GH : Created. * - *=============================================================================================*/ +// Post-Multiplies by a Translation Matrix. WWINLINE void Matrix3D::Translate(float x,float y,float z) { Row[0][3] += (float)(Row[0][0]*x + Row[0][1]*y + Row[0][2]*z); @@ -671,18 +531,7 @@ WWINLINE void Matrix3D::Translate(float x,float y,float z) } -/*********************************************************************************************** - * M3DC::Translate -- Post-Multiplies the matrix by a translation matrix * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/24/1997 GH : Created. * - *=============================================================================================*/ +// Post-Multiplies the matrix by a translation matrix. WWINLINE void Matrix3D::Translate(const Vector3 &t) { Row[0][3] += Row[0][0]*t[0] + Row[0][1]*t[1] + Row[0][2]*t[2]; @@ -691,18 +540,7 @@ WWINLINE void Matrix3D::Translate(const Vector3 &t) } -/*********************************************************************************************** - * M3DC::Translate_X -- Post-Multiplies the matrix by a translation matrix with X only * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 07/06/1998 NH : Created. * - *=============================================================================================*/ +// Post-Multiplies the matrix by a translation matrix with X only. WWINLINE void Matrix3D::Translate_X(float x) { Row[0][3] += (float)(Row[0][0]*x); @@ -711,18 +549,7 @@ WWINLINE void Matrix3D::Translate_X(float x) } -/*********************************************************************************************** - * M3DC::Translate_Y -- Post-Multiplies the matrix by a translation matrix with Y only * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 07/06/1998 NH : Created. * - *=============================================================================================*/ +// Post-Multiplies the matrix by a translation matrix with Y only. WWINLINE void Matrix3D::Translate_Y(float y) { Row[0][3] += (float)(Row[0][1]*y); @@ -731,18 +558,7 @@ WWINLINE void Matrix3D::Translate_Y(float y) } -/*********************************************************************************************** - * M3DC::Translate_Z -- Post-Multiplies the matrix by a translation matrix with Z only * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 07/06/1998 NH : Created. * - *=============================================================================================*/ +// Post-Multiplies the matrix by a translation matrix with Z only. WWINLINE void Matrix3D::Translate_Z(float z) { Row[0][3] += (float)(Row[0][2]*z); @@ -751,18 +567,7 @@ WWINLINE void Matrix3D::Translate_Z(float z) } -/*********************************************************************************************** - * M3DC::Rotate_X -- Post-Multiplies the matrix by a rotation about the X axis * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/24/1997 GH : Created. * - *=============================================================================================*/ +// Post-Multiplies the matrix by a rotation about the X axis. WWINLINE void Matrix3D::Rotate_X(float theta) { float tmp1,tmp2; @@ -786,20 +591,7 @@ WWINLINE void Matrix3D::Rotate_X(float theta) } -/*********************************************************************************************** - * M3DC::Rotate_X -- Post-Multiplies the matrix by a rotation about the X axis * - * * - * INPUT: * - * s - sine of the angle * - * c - cosine of the angle * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/24/1997 GH : Created. * - *=============================================================================================*/ +// Post-Multiplies the matrix by a rotation about the X axis. WWINLINE void Matrix3D::Rotate_X(float s,float c) { float tmp1,tmp2; @@ -818,19 +610,7 @@ WWINLINE void Matrix3D::Rotate_X(float s,float c) } -/*********************************************************************************************** - * M3DC::Rotate_Y -- Post-multiplies the matrix by a rotation about the Y axis * - * * - * INPUT: * - * theta - angle (in radians) to rotate * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/24/1997 GH : Created. * - *=============================================================================================*/ +// Post-multiplies the matrix by a rotation about the Y axis. WWINLINE void Matrix3D::Rotate_Y(float theta) { float tmp1,tmp2; @@ -853,20 +633,7 @@ WWINLINE void Matrix3D::Rotate_Y(float theta) } -/*********************************************************************************************** - * M3DC::Rotate_Y -- Post-Multiplies the matrix by a rotation about Y * - * * - * INPUT: * - * s - sine of the angle * - * c - cosine of the angle * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/24/1997 GH : Created. * - *=============================================================================================*/ +// Post-Multiplies the matrix by a rotation about Y. WWINLINE void Matrix3D::Rotate_Y(float s,float c) { float tmp1,tmp2; @@ -885,19 +652,7 @@ WWINLINE void Matrix3D::Rotate_Y(float s,float c) } -/*********************************************************************************************** - * M3DC::Rotate_Z -- Post-multiplies the matrix by a rotation about Z * - * * - * INPUT: * - * theta - angle (in radians) to rotate * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/24/1997 GH : Created. * - *=============================================================================================*/ +// Post-multiplies the matrix by a rotation about Z. WWINLINE void Matrix3D::Rotate_Z(float theta) { float tmp1,tmp2; @@ -920,20 +675,7 @@ WWINLINE void Matrix3D::Rotate_Z(float theta) } -/*********************************************************************************************** - * M3DC::Rotate_Z -- Post-multiplies the matrix by a rotation about Z * - * * - * INPUT: * - * s - sine of the angle to rotate * - * c - cosine of the angle to rotate * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/24/1997 GH : Created. * - *=============================================================================================*/ +// Post-multiplies the matrix by a rotation about Z. WWINLINE void Matrix3D::Rotate_Z(float s,float c) { float tmp1,tmp2; @@ -951,18 +693,6 @@ WWINLINE void Matrix3D::Rotate_Z(float s,float c) Row[2][1] = (float)(-s*tmp1 + c*tmp2); } -/*********************************************************************************************** - * Matrix3D::Scale -- Scales each Axis * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 03/07/2000 jga : Created. * - *=============================================================================================*/ // !! // !! Use Scale methods with Extreme Caution // !! The Matrix Inverse function, only works @@ -984,18 +714,6 @@ WWINLINE void Matrix3D::Scale(float scale) Row[1][2] *= scale; Row[2][2] *= scale; } -/*********************************************************************************************** - * Matrix3D::Scale -- Scales each Axis * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 03/07/2000 jga : Created. * - *=============================================================================================*/ // !! // !! Use Scale methods with Extreme Caution // !! The Matrix Inverse function, only works @@ -1017,18 +735,6 @@ WWINLINE void Matrix3D::Scale(float x, float y, float z) Row[1][2] *= z; Row[2][2] *= z; } -/*********************************************************************************************** - * Matrix3D::Scale -- Scales each Axis * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 03/07/2000 jga : Created. * - *=============================================================================================*/ // !! // !! Use Scale methods with Extreme Caution // !! The Matrix Inverse function, only works @@ -1040,19 +746,7 @@ WWINLINE void Matrix3D::Scale(Vector3 &scale) Scale(scale.X, scale.Y, scale.Z); } -/*********************************************************************************************** - * M3DC::Pre_Rotate_X -- Pre-multiplies the matrix by a rotation about X * - * * - * INPUT: * - * theta - angle (in radians) to rotate * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 07/1/1999 NH : Created. * - *=============================================================================================*/ +// Pre-multiplies the matrix by a rotation about X. WWINLINE void Matrix3D::Pre_Rotate_X(float theta) { float tmp1,tmp2; @@ -1078,19 +772,7 @@ WWINLINE void Matrix3D::Pre_Rotate_X(float theta) Row[2][3] = (float)(s*tmp1 + c*tmp2); } -/*********************************************************************************************** - * M3DC::Pre_Rotate_Y -- Pre-multiplies the matrix by a rotation about Y * - * * - * INPUT: * - * theta - angle (in radians) to rotate * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 07/1/1999 NH : Created. * - *=============================================================================================*/ +// Pre-multiplies the matrix by a rotation about Y. WWINLINE void Matrix3D::Pre_Rotate_Y(float theta) { float tmp1,tmp2; @@ -1116,19 +798,7 @@ WWINLINE void Matrix3D::Pre_Rotate_Y(float theta) Row[2][3] = (float)(-s*tmp1 + c*tmp2); } -/*********************************************************************************************** - * M3DC::Pre_Rotate_Z -- Pre-multiplies the matrix by a rotation about Z * - * * - * INPUT: * - * theta - angle (in radians) to rotate * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 07/1/1999 NH : Created. * - *=============================================================================================*/ +// Pre-multiplies the matrix by a rotation about Z. WWINLINE void Matrix3D::Pre_Rotate_Z(float theta) { float tmp1,tmp2; @@ -1154,20 +824,7 @@ WWINLINE void Matrix3D::Pre_Rotate_Z(float theta) Row[1][3] = (float)(s*tmp1 + c*tmp2); } -/*********************************************************************************************** - * M3DC::Pre_Rotate_X -- Pre-multiplies the matrix by a rotation about X * - * * - * INPUT: * - * s - sine of the angle to rotate * - * c - cosine of the angle to rotate * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 07/1/1999 NH : Created. * - *=============================================================================================*/ +// Pre-multiplies the matrix by a rotation about X. WWINLINE void Matrix3D::Pre_Rotate_X(float s,float c) { float tmp1,tmp2; @@ -1189,20 +846,7 @@ WWINLINE void Matrix3D::Pre_Rotate_X(float s,float c) Row[2][3] = (float)(s*tmp1 + c*tmp2); } -/*********************************************************************************************** - * M3DC::Pre_Rotate_Y -- Pre-multiplies the matrix by a rotation about Y * - * * - * INPUT: * - * s - sine of the angle to rotate * - * c - cosine of the angle to rotate * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 07/1/1999 NH : Created. * - *=============================================================================================*/ +// Pre-multiplies the matrix by a rotation about Y. WWINLINE void Matrix3D::Pre_Rotate_Y(float s,float c) { float tmp1,tmp2; @@ -1224,20 +868,7 @@ WWINLINE void Matrix3D::Pre_Rotate_Y(float s,float c) Row[2][3] = (float)(-s*tmp1 + c*tmp2); } -/*********************************************************************************************** - * M3DC::Pre_Rotate_Z -- Pre-multiplies the matrix by a rotation about Z * - * * - * INPUT: * - * s - sine of the angle to rotate * - * c - cosine of the angle to rotate * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 07/1/1999 NH : Created. * - *=============================================================================================*/ +// Pre-multiplies the matrix by a rotation about Z. WWINLINE void Matrix3D::Pre_Rotate_Z(float s,float c) { float tmp1,tmp2; @@ -1259,19 +890,7 @@ WWINLINE void Matrix3D::Pre_Rotate_Z(float s,float c) Row[1][3] = (float)(s*tmp1 + c*tmp2); } -/*********************************************************************************************** - * M3DC::In_Place_Pre_Rotate_X -- Pre-multiplies rotation part of matrix by a rotation about X * - * * - * INPUT: * - * theta - angle (in radians) to rotate * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 07/1/1999 NH : Created. * - *=============================================================================================*/ +// Pre-multiplies rotation part of matrix by a rotation about X. WWINLINE void Matrix3D::In_Place_Pre_Rotate_X(float theta) { float tmp1,tmp2; @@ -1293,19 +912,7 @@ WWINLINE void Matrix3D::In_Place_Pre_Rotate_X(float theta) Row[2][2] = (float)(s*tmp1 + c*tmp2); } -/*********************************************************************************************** - * M3DC::In_Place_Pre_Rotate_Y -- Pre-multiplies rotation part of matrix by a rotation about Y * - * * - * INPUT: * - * theta - angle (in radians) to rotate * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 07/1/1999 NH : Created. * - *=============================================================================================*/ +// Pre-multiplies rotation part of matrix by a rotation about Y. WWINLINE void Matrix3D::In_Place_Pre_Rotate_Y(float theta) { float tmp1,tmp2; @@ -1327,19 +934,7 @@ WWINLINE void Matrix3D::In_Place_Pre_Rotate_Y(float theta) Row[2][2] = (float)(-s*tmp1 + c*tmp2); } -/*********************************************************************************************** - * M3DC::In_Place_Pre_Rotate_Z -- Pre-multiplies rotation part of matrix by a rotation about Z * - * * - * INPUT: * - * theta - angle (in radians) to rotate * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 07/1/1999 NH : Created. * - *=============================================================================================*/ +// Pre-multiplies rotation part of matrix by a rotation about Z. WWINLINE void Matrix3D::In_Place_Pre_Rotate_Z(float theta) { float tmp1,tmp2; @@ -1361,20 +956,7 @@ WWINLINE void Matrix3D::In_Place_Pre_Rotate_Z(float theta) Row[1][2] = (float)(s*tmp1 + c*tmp2); } -/*********************************************************************************************** - * M3DC::In_Place_Pre_Rotate_X -- Pre-multiplies rotation part of matrix by a rotation about X * - * * - * INPUT: * - * s - sine of the angle to rotate * - * c - cosine of the angle to rotate * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 07/1/1999 NH : Created. * - *=============================================================================================*/ +// Pre-multiplies rotation part of matrix by a rotation about X. WWINLINE void Matrix3D::In_Place_Pre_Rotate_X(float s,float c) { float tmp1,tmp2; @@ -1392,20 +974,7 @@ WWINLINE void Matrix3D::In_Place_Pre_Rotate_X(float s,float c) Row[2][2] = (float)(s*tmp1 + c*tmp2); } -/*********************************************************************************************** - * M3DC::In_Place_Pre_Rotate_Y -- Pre-multiplies rotation part of matrix by a rotation about Y * - * * - * INPUT: * - * s - sine of the angle to rotate * - * c - cosine of the angle to rotate * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 07/1/1999 NH : Created. * - *=============================================================================================*/ +// Pre-multiplies rotation part of matrix by a rotation about Y. WWINLINE void Matrix3D::In_Place_Pre_Rotate_Y(float s,float c) { float tmp1,tmp2; @@ -1423,20 +992,7 @@ WWINLINE void Matrix3D::In_Place_Pre_Rotate_Y(float s,float c) Row[2][2] = (float)(-s*tmp1 + c*tmp2); } -/*********************************************************************************************** - * M3DC::In_Place_Pre_Rotate_Z -- Pre-multiplies rotation part of matrix by a rotation about Z * - * * - * INPUT: * - * s - sine of the angle to rotate * - * c - cosine of the angle to rotate * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 07/1/1999 NH : Created. * - *=============================================================================================*/ +// Pre-multiplies rotation part of matrix by a rotation about Z. WWINLINE void Matrix3D::In_Place_Pre_Rotate_Z(float s,float c) { float tmp1,tmp2; @@ -1455,18 +1011,7 @@ WWINLINE void Matrix3D::In_Place_Pre_Rotate_Z(float s,float c) } #ifdef ALLOW_TEMPORARIES -/*********************************************************************************************** - * operator * -- Matrix multiplication * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/24/1997 GH : Created. * - *=============================================================================================*/ +// Matrix multiplication. WWINLINE Matrix3D operator * (const Matrix3D &A,const Matrix3D &B) { Matrix3D C; @@ -1613,18 +1158,7 @@ WWINLINE void Matrix3D::mul(const Matrix3D& A, const Matrix3D& B) #endif #ifdef ALLOW_TEMPORARIES -/*********************************************************************************************** - * operator * -- Matrix - vector multiplication * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/24/1997 GH : Created. * - *=============================================================================================*/ +// Matrix - vector multiplication. WWINLINE Vector3 operator * (const Matrix3D &A,const Vector3 &a) { #if 0 @@ -1697,18 +1231,7 @@ WWINLINE void Matrix3D::mulVector3Array(Vector3* inout, int count) const #endif } -/*********************************************************************************************** - * operator == -- Matrix equality operator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 04/29/1998 NH : Created. * - *=============================================================================================*/ +// Matrix equality operator. WWINLINE bool operator == (const Matrix3D &A, const Matrix3D &B) { for (int i = 0; i < 3; i++) { @@ -1720,18 +1243,7 @@ WWINLINE bool operator == (const Matrix3D &A, const Matrix3D &B) } -/*********************************************************************************************** - * operator != -- Matrix inequality operator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 04/29/1998 NH : Created. * - *=============================================================================================*/ +// Matrix inequality operator. WWINLINE bool operator != (const Matrix3D &A, const Matrix3D &B) { return !(A == B); diff --git a/Core/Libraries/Source/WWVegas/WWMath/matrix4.cpp b/Core/Libraries/Source/WWVegas/WWMath/matrix4.cpp index 318fefdd81a..d95b55ea9ed 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/matrix4.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/matrix4.cpp @@ -33,11 +33,6 @@ * $Revision:: 6 $* * * * 06/26/02 KM Matrix name change to avoid MAX conflicts * - *---------------------------------------------------------------------------------------------* - * Functions: * - * Matrix4x4::Multiply -- Multiply two Matrix4x4's together * - * Matrix4x4::Multiply -- Multiply a Matrix3D * Matrix4x4 * - * Matrix4x4::Multiply -- Multiply a Matrix4x4 * Matrix3D * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "matrix4.h" @@ -47,21 +42,7 @@ #include #include -/*********************************************************************************************** - * Matrix4x4::Multiply -- Multiply two Matrix4x4's together * - * * - * INPUT: * - * a - first operand * - * b - second operand * - * res - pointer to matrix to store the result in (must not point to a or b) * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/13/99 gth : Created. * - *=============================================================================================*/ +// Multiply two Matrix4x4's together. The result must not point to a or b. void Matrix4x4::Multiply(const Matrix4x4 &a,const Matrix4x4 &b,Matrix4x4 * res) { assert(res != &a); @@ -93,18 +74,7 @@ void Matrix4x4::Multiply(const Matrix4x4 &a,const Matrix4x4 &b,Matrix4x4 * res) } -/*********************************************************************************************** - * Matrix4x4::Multiply -- Multiply a Matrix3D * Matrix4x4 * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/13/99 gth : Created. * - *=============================================================================================*/ +// Multiply a Matrix3D * Matrix4x4. void Matrix4x4::Multiply(const Matrix3D &a,const Matrix4x4 &b,Matrix4x4 * res) { assert(res != &b); @@ -135,17 +105,7 @@ void Matrix4x4::Multiply(const Matrix3D &a,const Matrix4x4 &b,Matrix4x4 * res) } -/*********************************************************************************************** - * Matrix4x4::Multiply -- Multiply a Matrix4x4 * Matrix3D * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *=============================================================================================*/ +// Multiply a Matrix4x4 * Matrix3D. void Matrix4x4::Multiply(const Matrix4x4 & a,const Matrix3D & b,Matrix4x4 * res) { assert(res != &a); diff --git a/Core/Libraries/Source/WWVegas/WWMath/matrix4.h b/Core/Libraries/Source/WWVegas/WWMath/matrix4.h index 834c1341a5b..a99fab4ba26 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/matrix4.h +++ b/Core/Libraries/Source/WWVegas/WWMath/matrix4.h @@ -34,26 +34,6 @@ * Last Update : June 6, 2002 [KM] * * * * 06/26/02 KM Matrix name change to avoid MAX conflicts * - *---------------------------------------------------------------------------------------------* - * Functions: * - * Matrix4x4::Matrix4x4 -- Constructor, optionally initialize to Identitiy matrix * - * Matrix4x4::Matrix4x4 -- Copy Constructor * - * Matrix4x4::Matrix4x4 -- Convert a Matrix3D (fake 4x4) to a Matrix4x4 * - * Matrix4x4::Matrix4x4 -- Constructor * - * Matrix4x4::Make_Identity -- Initializes the matrix to Identity * - * Matrix4x4::Init -- Initializes from the contents of the give Matrix3D * - * Matrix4x4::Init -- Initializes the rows from the given Vector4s * - * Matrix4x4::Init -- Initializes the rows from the given 16 floats * - * Matrix4x4::Init_Ortho -- Initialize to an orthographic projection matrix * - * Matrix4x4::Init_Perspective -- Initialize to a perspective projection matrix * - * Matrix4x4::Init_Perspective -- Initialize to a perspective projection matrix * - * Matrix4x4::Transpose -- Returns transpose of the matrix * - * Matrix4x4::Inverse -- returns the inverse of the matrix * - * Matrix4x4::operator = -- assignment operator * - * Matrix4x4::operator += -- "plus equals" operator * - * Matrix4x4::operator -= -- "minus equals" operator * - * Matrix4x4::operator *= -- "times equals" operator * - * Matrix4x4::operator /= -- "divide equals" operator * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once @@ -189,18 +169,7 @@ class Matrix4x4 }; -/*********************************************************************************************** - * Matrix4x4::Matrix4x4 -- Constructor, optionally initialize to Identitiy matrix * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/02/1997 GH : Created. * - *=============================================================================================*/ +// Constructor, optionally initialize to Identity matrix. WWINLINE Matrix4x4::Matrix4x4(bool identity) { if (identity) { @@ -208,87 +177,28 @@ WWINLINE Matrix4x4::Matrix4x4(bool identity) } } -/*********************************************************************************************** - * Matrix4x4::Matrix4x4 -- Copy Constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/02/1997 GH : Created. * - *=============================================================================================*/ WWINLINE Matrix4x4::Matrix4x4(const Matrix4x4 & m) { Row[0] = m.Row[0]; Row[1] = m.Row[1]; Row[2] = m.Row[2]; Row[3] = m.Row[3]; } -/*********************************************************************************************** - * Matrix4x4::Matrix4x4 -- Convert a Matrix3D (fake 4x4) to a Matrix4x4 * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/02/1997 GH : Created. * - *=============================================================================================*/ +// Convert a Matrix3D (fake 4x4) to a Matrix4x4. WWINLINE Matrix4x4::Matrix4x4(const Matrix3D & m) { Init(m); } -/*********************************************************************************************** - * Matrix4x4::Matrix4x4 -- Constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/02/1997 GH : Created. * - *=============================================================================================*/ WWINLINE Matrix4x4::Matrix4x4(const Vector4 & r0, const Vector4 & r1, const Vector4 & r2, const Vector4 & r3) { Init(r0,r1,r2,r3); } -/*********************************************************************************************** - * Matrix4x4::Matrix4x4 -- Constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/06/2001 NH : Created. * - *=============================================================================================*/ WWINLINE Matrix4x4::Matrix4x4(float m11,float m12,float m13,float m14, float m21,float m22,float m23,float m24, float m31,float m32,float m33,float m34, float m41,float m42,float m43,float m44 ) { Init(m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44); } -/*********************************************************************************************** - * Matrix4x4::Make_Identity -- Initializes the matrix to Identity * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/5/99 gth : Created. * - *=============================================================================================*/ WWINLINE void Matrix4x4::Make_Identity() { Row[0].Set(1.0,0.0,0.0,0.0); @@ -298,54 +208,21 @@ WWINLINE void Matrix4x4::Make_Identity() } -/*********************************************************************************************** - * Matrix4x4::Init -- Initializes from the contents of the give Matrix3D * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/5/99 gth : Created. * - *=============================================================================================*/ +// Initializes from the contents of the given Matrix3D. WWINLINE void Matrix4x4::Init(const Matrix3D & m) { Row[0] = m[0]; Row[1] = m[1]; Row[2] = m[2]; Row[3] = Vector4(0.0,0.0,0.0,1.0); } -/*********************************************************************************************** - * Matrix4x4::Init -- Initializes the rows from the given Vector4s * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/5/99 gth : Created. * - *=============================================================================================*/ +// Initializes the rows from the given Vector4s. WWINLINE void Matrix4x4::Init(const Vector4 & r0, const Vector4 & r1, const Vector4 & r2, const Vector4 & r3) { Row[0] = r0; Row[1] = r1; Row[2] = r2; Row[3] = r3; } -/*********************************************************************************************** - * Matrix4x4::Init -- Initializes the rows from the given 16 floats * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/6/01 NH : Created. * - *=============================================================================================*/ +// Initializes the rows from the given 16 floats. WWINLINE void Matrix4x4::Init(float m11,float m12,float m13,float m14, float m21,float m22,float m23,float m24, float m31,float m32,float m33,float m34, float m41,float m42,float m43,float m44) { @@ -356,29 +233,14 @@ WWINLINE void Matrix4x4::Init(float m11,float m12,float m13,float m14, float m21 } -/*********************************************************************************************** - * Matrix4x4::Init_Ortho -- Initialize to an orthographic projection matrix * - * * - * You can find the formulas for this in the appendix of the OpenGL programming guide. Also * - * this happens to be the same convention used by Surrender. * - * * - * The result of this projection will be that points inside the volume will have all coords * - * between -1 and +1. A point at znear will project to z=-1. A point at zfar will project * - * to z=+1... * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * Note that the znear and zfar parameters are positive distances to the clipping planes * - * even though in the camera coordinate system, the clipping planes are at negative z * - * coordinates. This holds for all of the projection initializations and is consistent * - * with OpenGL's convention. * - * * - * HISTORY: * - * 11/5/99 gth : Created. * - *=============================================================================================*/ +// Initialize to an orthographic projection matrix. You can find the formulas for this in the +// appendix of the OpenGL programming guide. Also this happens to be the same convention used by +// Surrender. The result of this projection will be that points inside the volume will have all +// coords between -1 and +1. A point at znear will project to z=-1. A point at zfar will project to +// z=+1. +// WARNING: Note that the znear and zfar parameters are positive distances to the clipping planes +// even though in the camera coordinate system, the clipping planes are at negative z coordinates. +// This holds for all of the projection initializations and is consistent with OpenGL's convention. WWINLINE void Matrix4x4::Init_Ortho ( float left, @@ -402,33 +264,14 @@ WWINLINE void Matrix4x4::Init_Ortho } -/*********************************************************************************************** - * Matrix4x4::Init_Perspective -- Initialize to a perspective projection matrix * - * * - * You can find the formulas for this matrix in the appendix of the OpenGL programming guide. * - * Also, this happens to be the same convention used by Surrender. * - * * - * The result of this projection will be that points inside the volume will have all coords * - * between -1 and +1. A point at znear will project to z=-1. A point at zfar will project * - * to z=+1... * - * * - * INPUT: * - * hfov - horizontal field of view (in radians) * - * vfov - vertical field of view (in radians) * - * znear - distance to near z clipping plane (positive) * - * zfar - distance to the far z clipping plane (positive) * - * * - * OUTPUT: * - * * - * WARNINGS: * - * Note that the znear and zfar parameters are positive distances to the clipping planes * - * even though in the camera coordinate system, the clipping planes are at negative z * - * coordinates. This holds for all of the projection initializations and is consistent * - * with OpenGL's convention. * - * * - * HISTORY: * - * 11/5/99 gth : Created. * - *=============================================================================================*/ +// Initialize to a perspective projection matrix. You can find the formulas for this matrix in the +// appendix of the OpenGL programming guide. Also, this happens to be the same convention used by +// Surrender. The result of this projection will be that points inside the volume will have all +// coords between -1 and +1. A point at znear will project to z=-1. A point at zfar will project to +// z=+1. The field of view angles are in radians. +// WARNING: Note that the znear and zfar parameters are positive distances to the clipping planes +// even though in the camera coordinate system, the clipping planes are at negative z coordinates. +// This holds for all of the projection initializations and is consistent with OpenGL's convention. WWINLINE void Matrix4x4::Init_Perspective(float hfov,float vfov,float znear,float zfar) { assert(znear > 0.0f); @@ -444,36 +287,14 @@ WWINLINE void Matrix4x4::Init_Perspective(float hfov,float vfov,float znear,floa } -/*********************************************************************************************** - * Matrix4x4::Init_Perspective -- Initialize to a perspective projection matrix * - * * - * You can find the formulas for this matrix in the appendix of the OpenGL programming guide. * - * Also, this happens to be the same convention used by Surrender. * - * * - * The result of this projection will be that points inside the volume will have all coords * - * between -1 and +1. A point at znear will project to z=-1. A point at zfar will project * - * to z=+1... * - * * - * INPUT: * - * * - * left - min x coordinate of near clip plane * - * right - max x coordinate of near clip plane * - * bottom - min y coordinate of near clip plane * - * top - max y coordinate of near clip plane * - * znear - distance to near Z clipping plane * - * zfar - distance to far Z clipping plane * - * * - * OUTPUT: * - * * - * WARNINGS: * - * Note that the znear and zfar parameters are positive distances to the clipping planes * - * even though in the camera coordinate system, the clipping planes are at negative z * - * coordinates. This holds for all of the projection initializations and is consistent * - * with OpenGL's convention. * - * * - * HISTORY: * - * 11/5/99 gth : Created. * - *=============================================================================================*/ +// Initialize to a perspective projection matrix. You can find the formulas for this matrix in the +// appendix of the OpenGL programming guide. Also, this happens to be the same convention used by +// Surrender. The result of this projection will be that points inside the volume will have all +// coords between -1 and +1. A point at znear will project to z=-1. A point at zfar will project to +// z=+1. +// WARNING: Note that the znear and zfar parameters are positive distances to the clipping planes +// even though in the camera coordinate system, the clipping planes are at negative z coordinates. +// This holds for all of the projection initializations and is consistent with OpenGL's convention. WWINLINE void Matrix4x4::Init_Perspective ( float left, @@ -498,18 +319,6 @@ WWINLINE void Matrix4x4::Init_Perspective Row[3][3] = 0.0f; } -/*********************************************************************************************** - * Matrix4x4::Transpose -- Returns transpose of the matrix * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/02/1997 GH : Created. * - *=============================================================================================*/ WWINLINE Matrix4x4 Matrix4x4::Transpose() const { return Matrix4x4( @@ -520,19 +329,7 @@ WWINLINE Matrix4x4 Matrix4x4::Transpose() const ); } -/*********************************************************************************************** - * Matrix4x4::Inverse -- returns the inverse of the matrix * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/02/1997 GH : Created. * - * 01/03/2026 TheSuperHackers : Implemented. * - *=============================================================================================*/ +// TheSuperHackers @fix Reimplemented the inverse. WWINLINE Matrix4x4* Matrix4x4::Inverse(Matrix4x4* out, float* detOut, const Matrix4x4* m) { // Read matrix elements @@ -614,90 +411,34 @@ WWINLINE Matrix4x4 Matrix4x4::Inverse() const return inv; } -/*********************************************************************************************** - * Matrix4x4::operator = -- assignment operator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/02/1997 GH : Created. * - *=============================================================================================*/ WWINLINE Matrix4x4 & Matrix4x4::operator = (const Matrix4x4 & m) { Row[0] = m.Row[0]; Row[1] = m.Row[1]; Row[2] = m.Row[2]; Row[3] = m.Row[3]; return *this; } -/*********************************************************************************************** - * Matrix4x4::operator += -- "plus equals" operator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/02/1997 GH : Created. * - *=============================================================================================*/ +// "plus equals" operator. WWINLINE Matrix4x4& Matrix4x4::operator += (const Matrix4x4 & m) { Row[0] += m.Row[0]; Row[1] += m.Row[1]; Row[2] += m.Row[2]; Row[3] += m.Row[3]; return *this; } -/*********************************************************************************************** - * Matrix4x4::operator-= -- "minus equals" operator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/02/1997 GH : Created. * - *=============================================================================================*/ +// "minus equals" operator. WWINLINE Matrix4x4& Matrix4x4::operator -= (const Matrix4x4 & m) { Row[0] -= m.Row[0]; Row[1] -= m.Row[1]; Row[2] -= m.Row[2]; Row[3] -= m.Row[3]; return *this; } -/*********************************************************************************************** - * Matrix4x4::operator *= -- "times equals" operator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/02/1997 GH : Created. * - *=============================================================================================*/ +// "times equals" operator. WWINLINE Matrix4x4& Matrix4x4::operator *= (float d) { Row[0] *= d; Row[1] *= d; Row[2] *= d; Row[3] *= d; return *this; } -/*********************************************************************************************** - * Matrix4x4::operator /= -- "divide equals" operator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/02/1997 GH : Created. * - *=============================================================================================*/ +// "divide equals" operator. WWINLINE Matrix4x4& Matrix4x4::operator /= (float d) { float ood = d; diff --git a/Core/Libraries/Source/WWVegas/WWMath/normalcone.h b/Core/Libraries/Source/WWVegas/WWMath/normalcone.h index d4cd659e52d..0d5ea672946 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/normalcone.h +++ b/Core/Libraries/Source/WWVegas/WWMath/normalcone.h @@ -30,8 +30,6 @@ * * * $Revision:: 8 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* diff --git a/Core/Libraries/Source/WWVegas/WWMath/obbox.cpp b/Core/Libraries/Source/WWVegas/WWMath/obbox.cpp index b6f82984c17..ea2b6101c72 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/obbox.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/obbox.cpp @@ -33,17 +33,6 @@ * $Revision:: 24 $* * * * 06/26/02 KM Matrix name change to avoid MAX conflicts * - *---------------------------------------------------------------------------------------------* - * Functions: * - * OBBoxClass::OBBoxClass -- Constructor that computes the box for a set of point * - * OBBoxClass::Init_From_Box_Points -- Create an OBBox from 8 corners of a box * - * OBBoxClass::Init_Random -- initialize a random oriented box * - * Oriented_Boxes_Intersect_On_Axis -- test if two boxes intersect on given axis * - * Oriented_Boxes_Intersect -- test if two oriented boxes intersect * - * Oriented_Boxes_Collide_On_Axis -- test if two boxes collide on the given axis * - * Oriented_Boxes_Collide -- test if two oriented boxes collide * - * Oriented_Box_Intersects_Tri_On_Axis -- tests if the box and tri intersect on the axis * - * Oriented_Box_Intersects_Tri -- tests if the given box and tri intersect * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -58,18 +47,7 @@ //#include -/*********************************************************************************************** - * OBBoxClass::OBBoxClass -- Constructor that computes the box for a set of points * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/4/98 GTH : Created. * - *=============================================================================================*/ +// Constructor that computes the box for a set of points. OBBoxClass::OBBoxClass(const Vector3 * /*points*/, int /*n*/) { // TODO: IMPLEMENT THIS!!! @@ -185,18 +163,7 @@ OBBoxClass::OBBoxClass(const Vector3 * /*points*/, int /*n*/) #endif } -/*********************************************************************************************** - * OBBoxClass::Init_From_Box_Points -- Create an OBBox from 8 corners of a box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/24/98 GTH : Created. * - *=============================================================================================*/ +// Create an OBBox from 8 corners of a box. void OBBoxClass::Init_From_Box_Points(Vector3 * points,int num) { int i,j; @@ -276,18 +243,6 @@ void OBBoxClass::Init_From_Box_Points(Vector3 * points,int num) } -/*********************************************************************************************** - * OBBoxClass::Init_Random -- initialize a random oriented box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/21/98 GTH : Created. * - *=============================================================================================*/ void OBBoxClass::Init_Random(float min_extent,float max_extent) { Center.Set(0,0,0); @@ -309,18 +264,7 @@ void OBBoxClass::Init_Random(float min_extent,float max_extent) -/*********************************************************************************************** - * Oriented_Boxes_Intersect_On_Axis -- test if two boxes intersect on given axis * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/7/99 GTH : Created. * - *=============================================================================================*/ +// Test if two boxes intersect on given axis. bool Oriented_Boxes_Intersect_On_Axis ( const OBBoxClass & box0, @@ -347,18 +291,7 @@ bool Oriented_Boxes_Intersect_On_Axis } -/*********************************************************************************************** - * Oriented_Boxes_Intersect -- test if two oriented boxes intersect * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/7/99 GTH : Created. * - *=============================================================================================*/ +// Test if two oriented boxes intersect. bool Oriented_Boxes_Intersect ( const OBBoxClass & box0, @@ -428,18 +361,7 @@ bool Oriented_Boxes_Intersect -/*********************************************************************************************** - * Oriented_Boxes_Collide_On_Axis -- test if two boxes collide on the given axis * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/7/99 GTH : Created. * - *=============================================================================================*/ +// Test if two boxes collide on the given axis. bool Oriented_Boxes_Collide_On_Axis ( const OBBoxClass & box0, @@ -472,18 +394,7 @@ bool Oriented_Boxes_Collide_On_Axis } -/*********************************************************************************************** - * Oriented_Boxes_Collide -- test if two oriented boxes collide * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/7/99 GTH : Created. * - *=============================================================================================*/ +// Test if two oriented boxes collide. bool Oriented_Boxes_Collide ( const OBBoxClass & box0, @@ -679,18 +590,6 @@ bool Oriented_Boxes_Collide -/*********************************************************************************************** - * Oriented_Box_Intersects_Tri_On_Axis -- tests if the box and tri intersect on the axis * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/7/99 GTH : Created. * - *=============================================================================================*/ bool Oriented_Box_Intersects_Tri_On_Axis(const OBBoxClass & box,const TriClass & tri,Vector3 & axis) { float leb; // leading edge of box (farthest point from center) @@ -728,18 +627,6 @@ bool Oriented_Box_Intersects_Tri_On_Axis(const OBBoxClass & box,const TriClass & } -/*********************************************************************************************** - * Oriented_Box_Intersects_Tri -- tests if the given box and tri intersect * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/7/99 GTH : Created. * - *=============================================================================================*/ bool Oriented_Box_Intersects_Tri(const OBBoxClass & box,const TriClass & tri) { Vector3 axis; diff --git a/Core/Libraries/Source/WWVegas/WWMath/obbox.h b/Core/Libraries/Source/WWVegas/WWMath/obbox.h index 5199059c14d..6903de7c201 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/obbox.h +++ b/Core/Libraries/Source/WWVegas/WWMath/obbox.h @@ -33,12 +33,6 @@ * $Revision:: 24 $* * * * 06/26/02 KM Matrix name change to avoid MAX conflicts * - *---------------------------------------------------------------------------------------------* - * Functions: * - * OBBoxClass::Transform -- transform an oriented box * - * OBBoxClass::Project_To_Axis -- compute projection onto the given axis * - * OBBoxClass::Compute_Point -- computes position of a parametricly defined point * - * OBBoxClass::Compute_Axis_Aligned_Extent -- computes extent of an AABox enclosing this box * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once @@ -117,18 +111,6 @@ bool Oriented_Boxes_Collide(const OBBoxClass & box0,const Vector3 & v0,const OBB bool Oriented_Box_Intersects_Tri(const OBBoxClass & box,const TriClass & tri); -/*********************************************************************************************** - * OBBoxClass::Project_To_Axis -- compute projection onto the given axis * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/24/98 GTH : Created. * - *=============================================================================================*/ inline float OBBoxClass::Project_To_Axis(const Vector3 & axis) const { float x = Extent[0] * Vector3::Dot_Product(axis,Vector3(Basis[0][0],Basis[1][0],Basis[2][0])); @@ -140,18 +122,6 @@ inline float OBBoxClass::Project_To_Axis(const Vector3 & axis) const } -/*********************************************************************************************** - * OBBoxClass::Transform -- transform an oriented box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/24/98 GTH : Created. * - *=============================================================================================*/ inline void OBBoxClass::Transform ( const Matrix3D & tm, @@ -168,22 +138,8 @@ inline void OBBoxClass::Transform } -/*********************************************************************************************** - * OBBoxClass::Compute_Point -- computes position of a parametricly defined point * - * * - * set_point = Center + params[0]*A0 + params[1]*A1 + params[2]*A2 * - * * - * INPUT: * - * params - parametric description of a point in the box. -1 < params[i] < 1 * - * set_point - pointer to a Vector3 to set. * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/2/99 GTH : Created. * - *=============================================================================================*/ +// Computes position of a parametrically defined point, with -1 < params[i] < 1: +// set_point = Center + params[0]*A0 + params[1]*A1 + params[2]*A2. inline void OBBoxClass::Compute_Point(float params[3],Vector3 * set_point) const { Vector3 point = Extent; @@ -196,19 +152,7 @@ inline void OBBoxClass::Compute_Point(float params[3],Vector3 * set_point) const } -/*********************************************************************************************** - * OBBoxClass::Compute_Axis_Aligned_Extent -- computes extent of an AABox enclosing this box * - * * - * INPUT: * - * set_extent - pointer to a Vector3 to put the result into * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/15/99 gth : Created. * - *=============================================================================================*/ +// Computes extent of an AABox enclosing this box. inline void OBBoxClass::Compute_Axis_Aligned_Extent(Vector3 * set_extent) const { WWASSERT(set_extent != nullptr); @@ -228,36 +172,14 @@ inline void OBBoxClass::Compute_Axis_Aligned_Extent(Vector3 * set_extent) const } -/*********************************************************************************************** - * OBBoxClass::operator== -- Comparison operator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/21/00 PDS : Created. * - *=============================================================================================*/ +// Comparison operator. inline bool OBBoxClass::operator== (const OBBoxClass &src) { return (Center == src.Center) && (Extent == src.Extent) && (Basis == src.Basis); } -/*********************************************************************************************** - * OBBoxClass::operator!= -- Comparison operator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/21/00 PDS : Created. * - *=============================================================================================*/ +// Comparison operator. inline bool OBBoxClass::operator!= (const OBBoxClass &src) { return (Center != src.Center) || (Extent != src.Extent) || (Basis != src.Basis); diff --git a/Core/Libraries/Source/WWVegas/WWMath/ode.cpp b/Core/Libraries/Source/WWVegas/WWMath/ode.cpp index 2d32f805c13..0bf68d73c37 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/ode.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/ode.cpp @@ -31,12 +31,6 @@ * * * $Revision:: 8 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * Euler_Integrate -- uses Eulers method to integrate a system of ODE's * - * Midpoint_Integrate -- midpoint method (Runge-Kutta 2) for integration * - * Runge_Kutta_Integrate -- Runge Kutta 4 method * - * Runge_Kutta5_Integrate -- 5th order Runge-Kutta * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "ode.h" @@ -53,22 +47,7 @@ static StateVectorClass _WorkVector5; static StateVectorClass _WorkVector6; static StateVectorClass _WorkVector7; -/*********************************************************************************************** - * Euler_Solve -- uses Eulers method to integrate a system of ODE's * - * * - * INPUT: * - * odesys - pointer to the ODE system to integrate * - * dt - size of the timestep * - * * - * OUTPUT: * - * state vector in odesys will be updated for the next timestep * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - * 6/25/99 GTH : Updated to the new integrator system * - *=============================================================================================*/ +// Uses Eulers method to integrate a system of ODE's. void IntegrationSystem::Euler_Integrate(ODESystemClass * sys, float dt) { WWASSERT(sys != nullptr); @@ -100,22 +79,7 @@ void IntegrationSystem::Euler_Integrate(ODESystemClass * sys, float dt) sys->Set_State(Y1); } -/*********************************************************************************************** - * Midpoint_Integrate -- midpoint method (Runge-Kutta 2) * - * * - * INPUT: * - * sys - pointer to the ODE system to integrate * - * dt - size of the timestep * - * * - * OUTPUT: * - * state vector in odesys will be updated for the next timestep * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - * 6/25/99 GTH : Updated to the new integrator system * - *=============================================================================================*/ +// Midpoint method (Runge-Kutta 2). void IntegrationSystem::Midpoint_Integrate(ODESystemClass * sys,float dt) { int i; @@ -165,21 +129,7 @@ void IntegrationSystem::Midpoint_Integrate(ODESystemClass * sys,float dt) } -/*********************************************************************************************** - * Runge_Kutta_Integrate -- Runge Kutta 4 method * - * * - * INPUT: * - * odesys - pointer to the ODE system to integrate * - * dt - size of the timestep * - * * - * OUTPUT: * - * state vector in odesys will be updated for the next timestep * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ +// Runge Kutta 4 method. void IntegrationSystem::Runge_Kutta_Integrate(ODESystemClass * sys,float dt) { int i; @@ -241,22 +191,7 @@ void IntegrationSystem::Runge_Kutta_Integrate(ODESystemClass * sys,float dt) sys->Set_State(Y1); } -/*********************************************************************************************** - * Runge_Kutta5_Integrate -- 5th order Runge-Kutta * - * * - * INPUT: * - * odesys - pointer to the ODE system to integrate * - * dt - size of the timestep * - * * - * OUTPUT: * - * state vector in odesys will be updated for the next timestep * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - * 6/25/99 GTH : Converted to the new Integrator system * - *=============================================================================================*/ +// 5th order Runge-Kutta. void IntegrationSystem::Runge_Kutta5_Integrate(ODESystemClass * odesys,float dt) { int i; diff --git a/Core/Libraries/Source/WWVegas/WWMath/ode.h b/Core/Libraries/Source/WWVegas/WWMath/ode.h index 6113ef9c074..57fbccbdacc 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/ode.h +++ b/Core/Libraries/Source/WWVegas/WWMath/ode.h @@ -31,8 +31,6 @@ * * * $Revision:: 9 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWMath/plane.h b/Core/Libraries/Source/WWVegas/WWMath/plane.h index e5eae9d0fd2..66af737a7ea 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/plane.h +++ b/Core/Libraries/Source/WWVegas/WWMath/plane.h @@ -31,8 +31,6 @@ * * * Last Update : March 17, 1997 [GH] * * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWMath/quat.cpp b/Core/Libraries/Source/WWVegas/WWMath/quat.cpp index 930a3ea9a2f..d74822c3e82 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/quat.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/quat.cpp @@ -31,21 +31,6 @@ * * * Last Update : February 28, 1997 [GH] * * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * Quaternion::Quaternion -- constructor * - * Quaternion::Set -- Set the quaternion * - * Quaternion::operator= -- Assignment operator * - * Quaternion::Make_Closest -- Use nearest representation to the given quaternion. * - * Trackball -- Computes a "trackball" quaternion given 2D mouse coordinates * - * Axis_To_Quat -- Creates a quaternion given an axis and angle of rotation * - * Slerp -- Spherical Linear interpolation! * - * Build_Quaternion -- Creates a quaternion from a Matrix * - * Build_Matrix -- Creates a Matrix from a Quaternion * - * Normalize -- normalizes a quaternion * - * Quaternion::Quaternion -- constructor * - * Slerp_Setup -- Get ready to call "Cached_Slerp" * - * Cached_Slerp -- Quaternion slerping, optimized with cached values * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -69,22 +54,7 @@ static int _nxt[3] = { 1 , 2 , 0 }; static float project_to_sphere(float,float,float); -/*********************************************************************************************** - * Quaternion::Quaternion -- constructor * - * * - * constructs a quaternion from the given axis and angle of rotation (in RADIANS of course) * - * * - * INPUT: * - * axis - axis of the rotation * - * angle - rotation angle * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/10/97 GTH : Created. * - *=============================================================================================*/ +// Constructs a quaternion from the given axis and angle of rotation (in RADIANS of course). Quaternion::Quaternion(const Vector3 & axis,float angle) { float s = WWMath::Sinf_Legacy(angle/2); @@ -96,18 +66,6 @@ Quaternion::Quaternion(const Vector3 & axis,float angle) } -/*********************************************************************************************** - * Quaternion::Normalize -- Normalize to a unit quaternion * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/24/1997 GH : Created. * - *=============================================================================================*/ void Quaternion::Normalize() { float len2=X * X + Y * Y + Z * Z + W * W; @@ -123,18 +81,7 @@ void Quaternion::Normalize() } } -/*********************************************************************************************** - * Q::Make_Closest -- Use nearest representation to the given quaternion. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/28/1997 GH : Created. * - *=============================================================================================*/ +// Use nearest representation to the given quaternion. Quaternion & Quaternion::Make_Closest(const Quaternion & qto) { float cos_t = qto.X * X + qto.Y * Y + qto.Z * Z + qto.W * W; @@ -150,21 +97,7 @@ Quaternion & Quaternion::Make_Closest(const Quaternion & qto) return *this; } -/*********************************************************************************************** - * Trackball -- Computes a "trackball" quaternion given 2D mouse coordinates * - * * - * INPUT: * - * x0,y0 - x1,y1 - "normalized" mouse coordinates for the mouse movement * - * sphsize - size of the trackball sphere * - * * - * OUTPUT: * - * a quaternion representing the rotation of a trackball * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/28/1997 GH : Created. * - *=============================================================================================*/ +// Computes a "trackball" quaternion given 2D mouse coordinates. Quaternion Trackball(float x0, float y0, float x1, float y1, float sphsize) { Vector3 a; @@ -206,18 +139,7 @@ Quaternion Trackball(float x0, float y0, float x1, float y1, float sphsize) } -/*********************************************************************************************** - * Axis_To_Quat -- Creates a quaternion given an axis and angle of rotation * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/28/1997 GH : Created. * - *=============================================================================================*/ +// Creates a quaternion given an axis and angle of rotation. Quaternion Axis_To_Quat(const Vector3 &a, float phi) { Quaternion q; @@ -234,21 +156,7 @@ Quaternion Axis_To_Quat(const Vector3 &a, float phi) return q; } -/*********************************************************************************************** - * Slerp -- Spherical Linear interpolation! * - * * - * INPUT: * - * p - start quaternion * - * q - end quaternion * - * alpha - interpolating parameter * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/28/1997 GH : Created. * - *=============================================================================================*/ +// Spherical Linear interpolation! #if 0 #pragma warning (disable : 4725) @@ -529,18 +437,7 @@ void Slerp(Quaternion& res, const Quaternion & p,const Quaternion & q,float alph res.W = beta*p.W + alpha*q.W; } -/*********************************************************************************************** - * Slerp_Setup -- Get ready to call "Cached_Slerp" * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/27/98 GTH : Created. * - *=============================================================================================*/ +// Get ready to call "Cached_Slerp". void Slerp_Setup(const Quaternion & p,const Quaternion & q,SlerpInfoStruct * slerpinfo) { float cos_t; @@ -573,18 +470,7 @@ void Slerp_Setup(const Quaternion & p,const Quaternion & q,SlerpInfoStruct * sle } } -/*********************************************************************************************** - * Cached_Slerp -- Quaternion slerping, optimized with cached values * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/27/98 GTH : Created. * - *=============================================================================================*/ +// Quaternion slerping, optimized with cached values. Quaternion Cached_Slerp(const Quaternion & p,const Quaternion & q,float alpha,SlerpInfoStruct * slerpinfo) { float beta; // complementary interploation parameter @@ -646,19 +532,8 @@ void Cached_Slerp(const Quaternion & p,const Quaternion & q,float alpha,SlerpInf set_q->W = beta*p.W + alpha*q.W; } -/*********************************************************************************************** - * Build_Quaternion -- Creates a quaternion from a Matrix * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * Matrix MUST NOT have scaling! * - * * - * HISTORY: * - * 02/28/1997 GH : Created. * - *=============================================================================================*/ +// Creates a quaternion from a Matrix. +// WARNING: Matrix MUST NOT have scaling! Quaternion Build_Quaternion(const Matrix3D & mat) { float tr,s; @@ -789,18 +664,7 @@ Quaternion Build_Quaternion(const Matrix4x4 & mat) } -/*********************************************************************************************** - * Build_Matrix -- Creates a Matrix from a Quaternion * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/28/1997 GH : Created. * - *=============================================================================================*/ +// Creates a Matrix from a Quaternion. Matrix3x3 Build_Matrix3(const Quaternion & q) { Matrix3x3 m; diff --git a/Core/Libraries/Source/WWVegas/WWMath/quat.h b/Core/Libraries/Source/WWVegas/WWMath/quat.h index a1c6d36f75d..33568baeca5 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/quat.h +++ b/Core/Libraries/Source/WWVegas/WWMath/quat.h @@ -31,8 +31,6 @@ * * * Last Update : February 24, 1997 [GH] * * * - *-------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once @@ -283,18 +281,6 @@ WWINLINE bool Equal_Within_Epsilon(const Quaternion &a, const Quaternion &b, flo (WWMath::Fabsf_Legacy(a.W - b.W) < epsilon) ); } -/*********************************************************************************************** - * Quaternion::operator= -- Assignment operator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/24/1997 GH : Created. * - *=============================================================================================*/ WWINLINE Quaternion & Quaternion::operator = (const Quaternion & source) { X = source[0]; diff --git a/Core/Libraries/Source/WWVegas/WWMath/rect.h b/Core/Libraries/Source/WWVegas/WWMath/rect.h index 38be108633e..ff881b7185c 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/rect.h +++ b/Core/Libraries/Source/WWVegas/WWMath/rect.h @@ -30,8 +30,6 @@ * * * $Revision:: 9 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWMath/sphere.h b/Core/Libraries/Source/WWVegas/WWMath/sphere.h index 3afec2888de..64e1bca7950 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/sphere.h +++ b/Core/Libraries/Source/WWVegas/WWMath/sphere.h @@ -30,22 +30,6 @@ * * * $Revision:: 18 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * SphereClass::SphereClass -- constructor * - * SphereClass::Init -- assign a new center and radius to this sphere * - * SphereClass::Re_Center -- move the center, update radius to enclose old sphere * - * SphereClass::Add_Sphere -- expands 'this' sphere to enclose the given sphere * - * SphereClass::Transform -- transforms this sphere * - * SphereClass::Volume -- returns the volume of this sphere * - * SphereClass::operator+= -- 'Add' a sphere to this one * - * SphereClass::operator *= -- transform this sphere by the given radius * - * Spheres_Intersect -- test whether two spheres intersect * - * Add_Spheres -- Add two spheres together, creating sphere which encloses both * - * operator + -- Add two spheres together, creating a sphere which encloses both * - * Transform Sphere -- transform a sphere * - * Transform_Sphere -- transform a sphere * - * operator * -- Transform a sphere * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once @@ -87,18 +71,6 @@ class SphereClass }; -/*********************************************************************************************** - * SphereClass::SphereClass -- constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 8/12/98 GTH : Created. * - *=============================================================================================*/ inline SphereClass::SphereClass(const Vector3 & center,const SphereClass & s0) { float dist = (s0.Center - center).Length(); @@ -228,36 +200,14 @@ inline SphereClass::SphereClass(const Vector3 *Position,const int VertCount) } -/*********************************************************************************************** - * SphereClass::Init -- assign a new center and radius to this sphere * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 8/12/98 GTH : Created. * - *=============================================================================================*/ +// Assign a new center and radius to this sphere. inline void SphereClass::Init(const Vector3 & pos,float radius) { Center = pos; Radius = radius; } -/*********************************************************************************************** - * SphereClass::Init -- assign a new center and radius to this sphere * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 8/12/98 GTH : Created. * - *=============================================================================================*/ +// Assign a new center and radius to this sphere. inline void SphereClass::Init(const Matrix3D& mtx, const Vector3 & pos,float radius) { #ifdef ALLOW_TEMPORARIES @@ -269,18 +219,7 @@ inline void SphereClass::Init(const Matrix3D& mtx, const Vector3 & pos,float rad } -/*********************************************************************************************** - * SphereClass::Re_Center -- move the center, update radius to enclose old sphere * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 8/12/98 GTH : Created. * - *=============================================================================================*/ +// Move the center, update radius to enclose old sphere. inline void SphereClass::Re_Center(const Vector3 & center) { float dist = (Center - center).Length(); @@ -289,18 +228,7 @@ inline void SphereClass::Re_Center(const Vector3 & center) } -/*********************************************************************************************** - * SphereClass::Add_Sphere -- expands 'this' sphere to enclose the given sphere * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 8/12/98 GTH : Created. * - *=============================================================================================*/ +// Expands 'this' sphere to enclose the given sphere. inline void SphereClass::Add_Sphere(const SphereClass & s) { if (!s.Is_Valid()) return; @@ -334,18 +262,6 @@ inline void SphereClass::Add_Sphere(const SphereClass & s) } } -/*********************************************************************************************** - * SphereClass::Transform -- transforms this sphere * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/12/99 GTH : Created. * - *=============================================================================================*/ inline void SphereClass::Transform(const Matrix3D & tm) { // warning, assumes Orthogonal matrix @@ -357,37 +273,12 @@ inline void SphereClass::Transform(const Matrix3D & tm) } -/*********************************************************************************************** - * SphereClass::Volume -- returns the volume of this sphere * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/22/99 GTH : Created. * - *=============================================================================================*/ inline float SphereClass::Volume() const { return (4.0 / 3.0) * WWMATH_PI * (Radius * Radius * Radius); } -/*********************************************************************************************** - * SphereClass::operator+= -- 'Add' a sphere to this one * - * * - * Expands 'this' sphere to also enclose the given sphere * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 8/12/98 GTH : Created. * - *=============================================================================================*/ +// Expands 'this' sphere to also enclose the given sphere. inline SphereClass & SphereClass::operator += (const SphereClass & s) { Add_Sphere(s); @@ -395,18 +286,7 @@ inline SphereClass & SphereClass::operator += (const SphereClass & s) } -/*********************************************************************************************** - * SphereClass::operator *= -- transform this sphere by the given radius * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 8/12/98 GTH : Created. * - *=============================================================================================*/ +// Transform this sphere by the given matrix. inline SphereClass & SphereClass::operator *= (const Matrix3D & m) { Init(m, Center, Radius); @@ -414,18 +294,7 @@ inline SphereClass & SphereClass::operator *= (const Matrix3D & m) } -/*********************************************************************************************** - * Spheres_Intersect -- test whether two spheres intersect * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 8/12/98 GTH : Created. * - *=============================================================================================*/ +// Test whether two spheres intersect. inline bool Spheres_Intersect(const SphereClass & s0,const SphereClass & s1) { Vector3 delta = s0.Center - s1.Center; @@ -439,18 +308,7 @@ inline bool Spheres_Intersect(const SphereClass & s0,const SphereClass & s1) } -/*********************************************************************************************** - * Add_Spheres -- Add two spheres together, creating sphere which encloses both * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 8/12/98 GTH : Created. * - *=============================================================================================*/ +// Add two spheres together, creating sphere which encloses both. inline SphereClass Add_Spheres(const SphereClass & s0, const SphereClass & s1) { if (s0.Is_Valid()) { @@ -463,36 +321,13 @@ inline SphereClass Add_Spheres(const SphereClass & s0, const SphereClass & s1) } -/*********************************************************************************************** - * operator + -- Add two spheres together, creating a sphere which encloses both * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 8/12/98 GTH : Created. * - *=============================================================================================*/ +// Add two spheres together, creating a sphere which encloses both. inline SphereClass operator + (const SphereClass & s0,const SphereClass & s1) { return Add_Spheres(s0,s1); } -/*********************************************************************************************** - * Transform Sphere -- transform a sphere * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 8/12/98 GTH : Created. * - *=============================================================================================*/ inline SphereClass Transform_Sphere(const Matrix3D & m, const SphereClass & s) { // Warning, assumes Orthogonal matrix @@ -500,18 +335,6 @@ inline SphereClass Transform_Sphere(const Matrix3D & m, const SphereClass & s) } -/*********************************************************************************************** - * Transform_Sphere -- transform a sphere * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 8/12/98 GTH : Created. * - *=============================================================================================*/ inline void Transform_Sphere(const Matrix3D & m, const SphereClass & s,SphereClass & res) { // warning, assumes Orthogonal matrix @@ -524,18 +347,7 @@ inline void Transform_Sphere(const Matrix3D & m, const SphereClass & s,SphereCla } -/*********************************************************************************************** - * operator * -- Transform a sphere * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 8/12/98 GTH : Created. * - *=============================================================================================*/ +// Transform a sphere. inline SphereClass operator * (const Matrix3D & m, const SphereClass & s) { return Transform_Sphere(m,s); diff --git a/Core/Libraries/Source/WWVegas/WWMath/tcbspline.cpp b/Core/Libraries/Source/WWVegas/WWMath/tcbspline.cpp index 65f045ee588..e062e6ed47f 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/tcbspline.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/tcbspline.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 6 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ diff --git a/Core/Libraries/Source/WWVegas/WWMath/tcbspline.h b/Core/Libraries/Source/WWVegas/WWMath/tcbspline.h index 8a3d7be043b..d97f30ed3c1 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/tcbspline.h +++ b/Core/Libraries/Source/WWVegas/WWMath/tcbspline.h @@ -30,8 +30,6 @@ * * * $Revision:: 4 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWMath/tri.cpp b/Core/Libraries/Source/WWVegas/WWMath/tri.cpp index 5f8d1449306..df3b0d206e7 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/tri.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/tri.cpp @@ -30,10 +30,6 @@ * * * $Revision:: 8 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * TriClass::Find_Dominant_Plane -- returns indices of the axes of the dominant plane * - * TriClass::Contains_Point -- performs 2D point-in-triangle test. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "tri.h" @@ -128,18 +124,7 @@ static inline void find_dominant_plane(const TriClass & tri, int * axis1,int * a -/*********************************************************************************************** - * TriClass::Find_Dominant_Plane -- returns indices of the axes of the dominant plane * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/24/99 GTH : Created. * - *=============================================================================================*/ +// Returns indices of the axes of the dominant plane. void TriClass::Find_Dominant_Plane(int * axis1,int * axis2) const { /* @@ -184,20 +169,9 @@ void TriClass::Find_Dominant_Plane(int * axis1,int * axis2) const } -/*********************************************************************************************** - * TriClass::Contains_Point -- performs 2D point-in-triangle test. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * Assumes that the point is in the plane of the triangle... use this after you've intersected * - * a ray with the plane of the triangle. * - * * - * HISTORY: * - * 3/24/99 GTH : Created. * - *=============================================================================================*/ +// Performs 2D point-in-triangle test. +// WARNING: Assumes that the point is in the plane of the triangle... use this after you've +// intersected a ray with the plane of the triangle. bool TriClass::Contains_Point(const Vector3 & ipoint) const { #if 0 diff --git a/Core/Libraries/Source/WWVegas/WWMath/tri.h b/Core/Libraries/Source/WWVegas/WWMath/tri.h index 0f233967eb4..087fcb5e3a6 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/tri.h +++ b/Core/Libraries/Source/WWVegas/WWMath/tri.h @@ -30,8 +30,6 @@ * * * $Revision:: 14 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWMath/v3_rnd.cpp b/Core/Libraries/Source/WWVegas/WWMath/v3_rnd.cpp index 3b8e235fdd1..aff3b4f58e2 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/v3_rnd.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/v3_rnd.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 4 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "v3_rnd.h" diff --git a/Core/Libraries/Source/WWVegas/WWMath/v3_rnd.h b/Core/Libraries/Source/WWVegas/WWMath/v3_rnd.h index 613582b56fa..41255cefc95 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/v3_rnd.h +++ b/Core/Libraries/Source/WWVegas/WWMath/v3_rnd.h @@ -30,8 +30,6 @@ * * * $Revision:: 4 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWMath/vector2.h b/Core/Libraries/Source/WWVegas/WWMath/vector2.h index 3db367dedb2..551d0f2fff0 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/vector2.h +++ b/Core/Libraries/Source/WWVegas/WWMath/vector2.h @@ -31,22 +31,6 @@ * * * Last Update : February 24, 1997 [GH] * * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * Scalar Division Operator -- Divide a vector by a scalar * - * Scalar Multiply Operator -- Multiply a vector by a scalar * - * Vector Addition Operator -- Add two vectors * - * Vector Subtraction Operator -- Subtract two vectors * - * Vector Inner Product Operator -- Compute the inner or dot product * - * Vector Equality Operator -- Detemine if two vectors are identical * - * Equal_Within_Epsilon -- Determine if two vectors are identical within * - * Vector Inequality Operator -- Detemine if two vectors are identical * - * Swap -- swap two Vector2's * - * Vector2::Is_Valid -- Verifies that all components are valid floats * - * Vector2::Update_Min -- sets each component of the vector to the min of this and a. * - * Vector2::Update_Max -- sets each component of the vector to the max of this and a. * - * Vector2::Scale -- multiply components of a vector by independent scaling factors. * - * Vector2::Lerp -- linearly interpolates two Vector2's * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once @@ -149,18 +133,6 @@ class Vector2 }; -/************************************************************************** - * Scalar Multiply Operator -- Multiply a vector by a scalar * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/24/1997 GH : Created. * - *========================================================================*/ WWINLINE Vector2 operator * (const Vector2 &a,float k) { float a0k(a[0] * k); @@ -175,17 +147,7 @@ WWINLINE Vector2 operator * (float k, const Vector2 &a) return Vector2(a0k,a1k); } -/************************************************************************** - * Scalar Division Operator -- Divide a vector by a scalar * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *========================================================================*/ +// Divide a vector by a scalar. WWINLINE Vector2 operator / (const Vector2 &a,float k) { float ook=1.0f/k; @@ -194,18 +156,7 @@ WWINLINE Vector2 operator / (const Vector2 &a,float k) return Vector2(a0ook,a1ook); } -/************************************************************************** - * Vector Addition Operator -- Add two vectors * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/24/1997 GH : Created. * - *========================================================================*/ +// Add two vectors. WWINLINE Vector2 operator + (const Vector2 &a,const Vector2 &b) { return Vector2( @@ -214,18 +165,6 @@ WWINLINE Vector2 operator + (const Vector2 &a,const Vector2 &b) ); } -/************************************************************************** - * Vector Subtraction Operator -- Subtract two vectors * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/24/1997 GH : Created. * - *========================================================================*/ WWINLINE Vector2 operator - (const Vector2 &a,const Vector2 &b) { return Vector2( @@ -234,17 +173,7 @@ WWINLINE Vector2 operator - (const Vector2 &a,const Vector2 &b) ); } -/************************************************************************** - * Vector Inner Product -- Compute the inner or dot product of two vector * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *========================================================================*/ +// Compute the inner or dot product of two vectors. WWINLINE float operator * (const Vector2 &a,const Vector2 &b) { return a.X*b.X + a.Y*b.Y; @@ -260,17 +189,7 @@ WWINLINE float Vector2::Perp_Dot_Product(const Vector2 &a,const Vector2 &b) return a.X * -b.Y + a.Y * b.X; } -/************************************************************************** - * Vector Equality Operator -- Detemine if two vectors are identical * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *========================================================================*/ +// Determine if two vectors are identical. WWINLINE bool operator == (const Vector2 &a,const Vector2 &b) { bool a0b0(a[0] == b[0]); @@ -278,17 +197,7 @@ WWINLINE bool operator == (const Vector2 &a,const Vector2 &b) return ( a0b0 & a1b1); } -/************************************************************************** - * Vector Inequality Operator -- Detemine if two vectors are identical * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *========================================================================*/ +// Determine if two vectors are not identical. WWINLINE bool operator != (const Vector2 &a,const Vector2 &b) { bool a0b0(a[0] != b[0]); @@ -296,33 +205,12 @@ WWINLINE bool operator != (const Vector2 &a,const Vector2 &b) return ( a0b0 | a1b1); } -/************************************************************************** - * Equal_Within_Epsilon -- Determine if two vectors are identical within e* - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *========================================================================*/ +// Determine if two vectors are identical within e. WWINLINE bool Equal_Within_Epsilon(const Vector2 &a,const Vector2 &b,float epsilon) { return( (WWMath::Fabsf_Legacy(a.X - b.X) < epsilon) && (WWMath::Fabsf_Legacy(a.Y - b.Y) < epsilon) ); } -/************************************************************************** - * Vector2::Normalize -- Normalizes the vector. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *========================================================================*/ WWINLINE void Vector2::Normalize() { float len2 = Length2(); @@ -343,68 +231,22 @@ WWINLINE Vector2 Normalize(const Vector2 & vec) return Vector2(0.0f,0.0f); } -/************************************************************************** - * Vector2::Length -- Returns the length of the vector * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *========================================================================*/ WWINLINE float Vector2::Length() const { return WWMath::Sqrt(Length2()); } -/************************************************************************** - * Vector2::Length -- Returns the square of the length of the vector * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *========================================================================*/ +// Returns the square of the length of the vector. WWINLINE float Vector2::Length2() const { return (X*X + Y*Y); } -/************************************************************************** - * Vector2::Rotate -- Rotate vector * - * * - * INPUT: * - * float theta - angle to rotate * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *========================================================================*/ WWINLINE void Vector2::Rotate(float theta) { Rotate(WWMath::Sinf_Legacy(theta), WWMath::Cosf_Legacy(theta)); } -/************************************************************************** - * Vector2::Rotate -- Rotate vector * - * * - * INPUT: * - * s - sine of the angle * - * c - cosine of the angle * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *========================================================================*/ WWINLINE void Vector2::Rotate(float s, float c) { float new_x = X * c + Y * -s; @@ -413,40 +255,17 @@ WWINLINE void Vector2::Rotate(float s, float c) Y = new_y; } -/************************************************************************** - * Vector2::Rotate -- Rotate towards given vector (stop on reaching it) * - * * - * INPUT: * - * float theta - angle to rotate * - * * - * OUTPUT: * - * bool - true if we have reached the desired vector * - * * - * WARNINGS: * - * This function assumes both vectors are normalized! * - * * - * HISTORY: * - *========================================================================*/ +// Rotate towards given vector (stop on reaching it). Returns true if we have reached the desired +// vector. +// WARNING: This function assumes both vectors are normalized! WWINLINE bool Vector2::Rotate_Towards_Vector(Vector2 &target, float max_theta, bool & positive_turn) { return Rotate_Towards_Vector(target, WWMath::Sinf_Legacy(max_theta), WWMath::Cosf_Legacy(max_theta), positive_turn); } -/************************************************************************** - * Vector2::Rotate -- Rotate towards given vector (stop on reaching it) * - * * - * INPUT: * - * s - sine of the angle * - * c - cosine of the angle * - * * - * OUTPUT: * - * bool - true if we have reached the desired vector * - * * - * WARNINGS: * - * This function assumes both vectors are normalized! * - * * - * HISTORY: * - *========================================================================*/ +// Rotate towards given vector (stop on reaching it). Returns true if we have reached the desired +// vector. +// WARNING: This function assumes both vectors are normalized! WWINLINE bool Vector2::Rotate_Towards_Vector(Vector2 &target, float max_s, float max_c, bool & positive_turn) { bool return_value = false; @@ -468,18 +287,7 @@ WWINLINE bool Vector2::Rotate_Towards_Vector(Vector2 &target, float max_s, float return return_value; } -/*********************************************************************************************** - * Swap -- swap two Vector2's * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ +// Swap two Vector2's. WWINLINE void Swap(Vector2 & a,Vector2 & b) { Vector2 tmp(a); @@ -488,36 +296,14 @@ WWINLINE void Swap(Vector2 & a,Vector2 & b) } -/*********************************************************************************************** - * Vector2::Is_Valid -- Verifies that all components are valid floats * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 10/18/99 gth : Created. * - *=============================================================================================*/ +// Verifies that all components are valid floats. WWINLINE bool Vector2::Is_Valid() const { return (WWMath::Is_Valid_Float(X) && WWMath::Is_Valid_Float(Y)); } -/*********************************************************************************************** - * Vector2::Update_Min -- Set each component of the vector to the min of this and a. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/12/00 IML : Created. * - *=============================================================================================*/ +// Set each component of the vector to the min of this and a. WWINLINE void Vector2::Update_Min (const Vector2 & a) { if (a.X < X) X = a.X; @@ -525,18 +311,7 @@ WWINLINE void Vector2::Update_Min (const Vector2 & a) } -/*********************************************************************************************** - * Vector2::Update_Max -- Set each component of the vector to the max of this and a. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/12/00 IML : Created. * - *=============================================================================================*/ +// Set each component of the vector to the max of this and a. WWINLINE void Vector2::Update_Max (const Vector2 & a) { if (a.X > X) X = a.X; @@ -544,18 +319,7 @@ WWINLINE void Vector2::Update_Max (const Vector2 & a) } -/*********************************************************************************************** - * Vector2::Scale -- multiply components of a vector by independent scaling factors. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/19/2000 IML : Created. * - *=============================================================================================*/ +// Multiply components of a vector by independent scaling factors. WWINLINE void Vector2::Scale (float a, float b) { X *= a; @@ -563,18 +327,7 @@ WWINLINE void Vector2::Scale (float a, float b) } -/*********************************************************************************************** - * Vector2::Scale -- multiply components of a vector by independent scaling factors. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/19/2000 IML : Created. * - *=============================================================================================*/ +// Multiply components of a vector by independent scaling factors. WWINLINE void Vector2::Scale (const Vector2 & a) { X *= a.X; @@ -582,15 +335,7 @@ WWINLINE void Vector2::Scale (const Vector2 & a) } -/*********************************************************************************************** - * Quick_Distance -- Fast but inaccurate 2D distance calculation. * - * * - * * - * * - * * - * HISTORY: * - * 11/29/1999MLL: Created. * - *=============================================================================================*/ +// Fast but inaccurate 2D distance calculation. WWINLINE float Quick_Distance(float x1, float y1, float x2, float y2) { // From Graphic Gems I. @@ -616,15 +361,7 @@ WWINLINE float Vector2::Quick_Distance(const Vector2 &a, const Vector2 &b) } -/*********************************************************************************************** - * Distance -- Accurate distance 2D calculation. * - * * - * * - * * - * * - * HISTORY: * - * 11/29/1999MLL: Created. * - *=============================================================================================*/ +// Accurate distance 2D calculation. WWINLINE float Vector2::Distance(const Vector2 &a, const Vector2 &b) { Vector2 temp; @@ -642,18 +379,7 @@ WWINLINE float Distance(float x1, float y1, float x2, float y2) } -/*********************************************************************************************** - * Vector2::Lerp -- linearly interpolates two Vector2's * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/14/2000 gth : Created. * - *=============================================================================================*/ +// Linearly interpolates two Vector2's. WWINLINE void Vector2::Lerp(const Vector2 & a,const Vector2 & b,float t,Vector2 * set_result) { assert(set_result != nullptr); diff --git a/Core/Libraries/Source/WWVegas/WWMath/vector2i.h b/Core/Libraries/Source/WWVegas/WWMath/vector2i.h index f8d4db8aeab..7247af87680 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/vector2i.h +++ b/Core/Libraries/Source/WWVegas/WWMath/vector2i.h @@ -30,8 +30,6 @@ * * * $Revision:: 4 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWMath/vector3.h b/Core/Libraries/Source/WWVegas/WWMath/vector3.h index f558c340813..b14a2edfab0 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/vector3.h +++ b/Core/Libraries/Source/WWVegas/WWMath/vector3.h @@ -31,36 +31,6 @@ * * * Last Update : February 24, 1997 [GH] * * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * Scalar Division Operator -- Divide a vector by a scalar * - * Scalar Multiply Operator -- Multiply a vector by a scalar * - * Vector Addition Operator -- Add two vectors * - * Vector Subtraction Operator -- Subtract two vectors * - * Vector Inner Product Operator -- Compute the inner or dot product * - * Vector Equality Operator -- Determine if two vectors are identical * - * Vector Inequality Operator -- Determine if two vectors are identical * - * Equal_Within_Epsilon -- Determine if two vectors are identical within * - * Cross_Product -- compute the cross product of two vectors * - * Vector3::Normalize -- Normalizes the vector. * - * Vector3::Length -- Returns the length of the vector * - * Vector3::Length2 -- Returns the square of the length of the vector * - * Vector3::Quick_Length -- returns a quick approximation of the length * - * Swap -- swap two Vector3's * - * Lerp -- linearly interpolate two Vector3's by an interpolation factor. * - * Lerp -- linearly interpolate two Vector3's without return-by-value * - * Vector3::Add -- Add two vector3's without return-by-value * - * Vector3::Subtract -- Subtract two vector3's without return-by-value * - * Vector3::Update_Min -- sets each component of the vector to the min of this and a * - * Vector3::Update_Max -- Sets each component of the vector to the max of this and a * - * Vector3::Scale -- scale this vector by 3 independent scale factors * - * Vector3::Rotate_X -- rotates this vector around the X axis * - * Vector3::Rotate_X -- Rotates this vector around the x axis * - * Vector3::Rotate_Y -- Rotates this vector around the y axis * - * Vector3::Rotate_Y -- Rotates this vector around the Y axis * - * Vector3::Rotate_Z -- Rotates this vector around the Z axis * - * Vector3::Rotate_Z -- Rotates this vector around the Z axis * - * Vector3::Is_Valid -- Verifies that each component of this vector is a valid float * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once @@ -191,18 +161,6 @@ class Vector3 }; -/************************************************************************** - * Scalar Multiply Operator -- Multiply a vector by a scalar * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/24/1997 GH : Created. * - *========================================================================*/ WWINLINE Vector3 operator * (const Vector3 &a,float k) { return Vector3((a.X * k),(a.Y * k),(a.Z * k)); @@ -213,35 +171,14 @@ WWINLINE Vector3 operator * (float k, const Vector3 &a) return Vector3((a.X * k),(a.Y * k),(a.Z * k)); } -/************************************************************************** - * Scalar Division Operator -- Divide a vector by a scalar * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *========================================================================*/ +// Divide a vector by a scalar. WWINLINE Vector3 operator / (const Vector3 &a,float k) { float ook = 1.0f/k; return Vector3((a.X * ook),(a.Y * ook),(a.Z * ook)); } -/************************************************************************** - * Vector Addition Operator -- Add two vectors * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/24/1997 GH : Created. * - *========================================================================*/ +// Add two vectors. WWINLINE Vector3 operator + (const Vector3 &a,const Vector3 &b) { return Vector3( @@ -251,18 +188,6 @@ WWINLINE Vector3 operator + (const Vector3 &a,const Vector3 &b) ); } -/************************************************************************** - * Vector Subtraction Operator -- Subtract two vectors * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/24/1997 GH : Created. * - *========================================================================*/ WWINLINE Vector3 operator - (const Vector3 &a,const Vector3 &b) { return Vector3( @@ -272,17 +197,7 @@ WWINLINE Vector3 operator - (const Vector3 &a,const Vector3 &b) ); } -/************************************************************************** - * Vector Inner Product -- Compute the inner or dot product of two vector * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *========================================================================*/ +// Compute the inner or dot product of two vectors. WWINLINE float operator * (const Vector3 &a,const Vector3 &b) { return a.X*b.X + @@ -298,49 +213,19 @@ WWINLINE float Vector3::Dot_Product(const Vector3 &a,const Vector3 &b) } -/************************************************************************** - * Vector Equality Operator -- Determine if two vectors are identical * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *========================================================================*/ +// Determine if two vectors are identical. WWINLINE bool operator == (const Vector3 &a,const Vector3 &b) { return ( (a.X == b.X) && (a.Y == b.Y) && (a.Z == b.Z)); } -/************************************************************************** - * Vector Inequality Operator -- Determine if two vectors are identical * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *========================================================================*/ +// Determine if two vectors are not identical. WWINLINE bool operator != (const Vector3 &a,const Vector3 &b) { return ( (a.X != b.X) || (a.Y != b.Y) || (a.Z != b.Z)); } -/************************************************************************** - * Equal_Within_Epsilon -- Determine if two vectors are identical within e* - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *========================================================================*/ +// Determine if two vectors are identical within e. WWINLINE bool Equal_Within_Epsilon(const Vector3 &a,const Vector3 &b,float epsilon) { return( (WWMath::Fabsf_Legacy(a.X - b.X) < epsilon) && @@ -349,17 +234,7 @@ WWINLINE bool Equal_Within_Epsilon(const Vector3 &a,const Vector3 &b,float epsil } -/************************************************************************** - * Cross_Product -- compute the cross product of two vectors * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *========================================================================*/ +// Compute the cross product of two vectors. #ifdef ALLOW_TEMPORARIES WWINLINE Vector3 Vector3::Cross_Product(const Vector3 &a,const Vector3 &b) { @@ -403,17 +278,6 @@ WWINLINE float Vector3::Cross_Product_Z(const Vector3 &a,const Vector3 &b) return a.X * b.Y - a.Y * b.X; } -/************************************************************************** - * Vector3::Normalize -- Normalizes the vector. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *========================================================================*/ WWINLINE void Vector3::Normalize() { float len2 = Length2(); @@ -439,51 +303,19 @@ WWINLINE Vector3 Normalize(const Vector3 & vec) } #endif -/************************************************************************** - * Vector3::Length -- Returns the length of the vector * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *========================================================================*/ WWINLINE float Vector3::Length() const { return WWMath::Sqrt(Length2()); } -/************************************************************************** - * Vector3::Length2 -- Returns the square of the length of the vector * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *========================================================================*/ +// Returns the square of the length of the vector. WWINLINE float Vector3::Length2() const { return X*X + Y*Y + Z*Z; } -/*********************************************************************************************** - * Vector3::Quick_Length -- returns a quick approximation of the length * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/15/98 GTH : Created. * - *=============================================================================================*/ +// Returns a quick approximation of the length. WWINLINE float Vector3::Quick_Length() const { // this method of approximating the length comes from Graphics Gems 1 and @@ -501,18 +333,7 @@ WWINLINE float Vector3::Quick_Length() const } -/*********************************************************************************************** - * Swap -- swap two Vector3's * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ +// Swap two Vector3's. WWINLINE void Swap(Vector3 & a,Vector3 & b) { Vector3 tmp(a); @@ -520,18 +341,7 @@ WWINLINE void Swap(Vector3 & a,Vector3 & b) b = tmp; } -/*********************************************************************************************** - * Lerp -- linearly interpolate two Vector3's without return-by-value * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 10/18/99 gth : Created. * - *=============================================================================================*/ +// Linearly interpolate two Vector3's without return-by-value. WWINLINE void Vector3::Lerp(const Vector3 & a, const Vector3 & b, float alpha,Vector3 * set_result) { assert(set_result != nullptr); @@ -550,18 +360,7 @@ WWINLINE Vector3 Vector3::Lerp(const Vector3 & a, const Vector3 & b, float alpha } #endif -/*********************************************************************************************** - * Vector3::Add -- Add two vector3's without return-by-value * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 10/18/99 gth : Created. * - *=============================================================================================*/ +// Add two vector3's without return-by-value. WWINLINE void Vector3::Add(const Vector3 &a,const Vector3 &b,Vector3 * set_result) { assert(set_result != nullptr); @@ -571,18 +370,7 @@ WWINLINE void Vector3::Add(const Vector3 &a,const Vector3 &b,Vector3 * set_resul } -/*********************************************************************************************** - * Vector3::Subtract -- Subtract two vector3's without return-by-value * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 10/18/99 gth : Created. * - *=============================================================================================*/ +// Subtract two vector3's without return-by-value. WWINLINE void Vector3::Subtract(const Vector3 &a,const Vector3 &b,Vector3 * set_result) { assert(set_result != nullptr); @@ -592,18 +380,7 @@ WWINLINE void Vector3::Subtract(const Vector3 &a,const Vector3 &b,Vector3 * set_ } -/*********************************************************************************************** - * Vector3::Update_Min -- sets each component of the vector to the min of this and a * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 10/18/99 gth : Created. * - *=============================================================================================*/ +// Sets each component of the vector to the min of this and a. WWINLINE void Vector3::Update_Min(const Vector3 & a) { if (a.X < X) X = a.X; @@ -612,18 +389,7 @@ WWINLINE void Vector3::Update_Min(const Vector3 & a) } -/*********************************************************************************************** - * Vector3::Update_Max -- Sets each component of the vector to the max of this and a * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 10/18/99 gth : Created. * - *=============================================================================================*/ +// Sets each component of the vector to the max of this and a. WWINLINE void Vector3::Update_Max(const Vector3 & a) { if (a.X > X) X = a.X; @@ -631,18 +397,8 @@ WWINLINE void Vector3::Update_Max(const Vector3 & a) if (a.Z > Z) Z = a.Z; } -/*********************************************************************************************** - * Vector3::Cap_To_Absolute_Of -- Sets each component of the vector to no larger than the -ve or +ve of* - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/29/99 wst : Created. * - *=============================================================================================*/ +// Sets each component of the vector to no larger than the -ve or +ve of the corresponding component +// of a. WWINLINE void Vector3::Cap_Absolute_To(const Vector3 & a) { if (X > 0) @@ -674,18 +430,7 @@ WWINLINE void Vector3::Cap_Absolute_To(const Vector3 & a) } -/*********************************************************************************************** - * Vector3::Scale -- scale this vector by 3 independent scale factors * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 10/18/99 gth : Created. * - *=============================================================================================*/ +// Scale this vector by 3 independent scale factors. WWINLINE void Vector3::Scale(const Vector3 & scale) { X *= scale.X; @@ -694,36 +439,14 @@ WWINLINE void Vector3::Scale(const Vector3 & scale) } -/*********************************************************************************************** - * Vector3::Rotate_X -- rotates this vector around the X axis * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 10/18/99 gth : Created. * - *=============================================================================================*/ +// Rotates this vector around the X axis. WWINLINE void Vector3::Rotate_X(float angle) { Rotate_X(WWMath::Sinf(angle),WWMath::Cosf(angle)); } -/*********************************************************************************************** - * Vector3::Rotate_X -- Rotates this vector around the x axis * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 10/18/99 gth : Created. * - *=============================================================================================*/ +// Rotates this vector around the x axis. WWINLINE void Vector3::Rotate_X(float s_angle,float c_angle) { float tmp_y = Y; @@ -734,36 +457,14 @@ WWINLINE void Vector3::Rotate_X(float s_angle,float c_angle) } -/*********************************************************************************************** - * Vector3::Rotate_Y -- Rotates this vector around the y axis * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 10/18/99 gth : Created. * - *=============================================================================================*/ +// Rotates this vector around the y axis. WWINLINE void Vector3::Rotate_Y(float angle) { Rotate_Y(WWMath::Sinf(angle),WWMath::Cosf(angle)); } -/*********************************************************************************************** - * Vector3::Rotate_Y -- Rotates this vector around the Y axis * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 10/18/99 gth : Created. * - *=============================================================================================*/ +// Rotates this vector around the Y axis. WWINLINE void Vector3::Rotate_Y(float s_angle,float c_angle) { float tmp_x = X; @@ -774,36 +475,14 @@ WWINLINE void Vector3::Rotate_Y(float s_angle,float c_angle) } -/*********************************************************************************************** - * Vector3::Rotate_Z -- Rotates this vector around the Z axis * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 10/18/99 gth : Created. * - *=============================================================================================*/ +// Rotates this vector around the Z axis. WWINLINE void Vector3::Rotate_Z(float angle) { Rotate_Z(WWMath::Sinf(angle),WWMath::Cosf(angle)); } -/*********************************************************************************************** - * Vector3::Rotate_Z -- Rotates this vector around the Z axis * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 10/18/99 gth : Created. * - *=============================================================================================*/ +// Rotates this vector around the Z axis. WWINLINE void Vector3::Rotate_Z(float s_angle,float c_angle) { float tmp_x = X; @@ -814,18 +493,7 @@ WWINLINE void Vector3::Rotate_Z(float s_angle,float c_angle) } -/*********************************************************************************************** - * Vector3::Is_Valid -- Verifies that each component of this vector is a valid float * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 10/18/99 gth : Created. * - *=============================================================================================*/ +// Verifies that each component of this vector is a valid float. WWINLINE bool Vector3::Is_Valid() const { return (WWMath::Is_Valid_Float(X) && WWMath::Is_Valid_Float(Y) && WWMath::Is_Valid_Float(Z)); @@ -856,15 +524,7 @@ WWINLINE float Vector3::Find_Z_At_Y(float y, const Vector3 &p1, const Vector3 &p return(p1.Z + ((y - p1.Y) * ((p2.Z - p1.Z) / (p2.Y - p1.Y)))); } -/*********************************************************************************************** - * Vector3::Distance -- Accurate distance calculation. * - * * - * * - * * - * * - * HISTORY: * - * 11/29/1999MLL: Created. * - *=============================================================================================*/ +// Accurate distance calculation. WWINLINE float Vector3::Distance(const Vector3 &p1, const Vector3 &p2) { Vector3 temp; @@ -872,15 +532,7 @@ WWINLINE float Vector3::Distance(const Vector3 &p1, const Vector3 &p2) return (temp.Length()); } -/*********************************************************************************************** - * Vector3::Quick_Distance -- Fast but inaccurate distance calculation. * - * * - * * - * * - * * - * HISTORY: * - * 11/29/1999MLL: Created. * - *=============================================================================================*/ +// Fast but inaccurate distance calculation. WWINLINE float Vector3::Quick_Distance(const Vector3 &p1, const Vector3 &p2) { Vector3 temp; @@ -888,15 +540,7 @@ WWINLINE float Vector3::Quick_Distance(const Vector3 &p1, const Vector3 &p2) return (temp.Quick_Length()); } -/*********************************************************************************************** - * Vector3::Convert_To_ABGR -- Converts to SR packed color . * - * * - * * - * * - * * - * HISTORY: * - * 11/29/1999MLL: Created. * - *=============================================================================================*/ +// Converts to SR packed color. WWINLINE unsigned long Vector3::Convert_To_ABGR() const { return (unsigned(255)<<24) | @@ -905,15 +549,7 @@ WWINLINE unsigned long Vector3::Convert_To_ABGR() const (unsigned(X*255.0f)); } -/*********************************************************************************************** - * Vector3::Convert_To_ARGB -- Converts to packed color . * - * * - * * - * * - * * - * HISTORY: * - * 11/29/1999MLL: Created. * - *=============================================================================================*/ +// Converts to packed color. WWINLINE unsigned long Vector3::Convert_To_ARGB() const { return (unsigned(255)<<24) | diff --git a/Core/Libraries/Source/WWVegas/WWMath/vector4.h b/Core/Libraries/Source/WWVegas/WWMath/vector4.h index 21601bc4f25..6296faf955a 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/vector4.h +++ b/Core/Libraries/Source/WWVegas/WWMath/vector4.h @@ -31,17 +31,6 @@ * * * Last Update : June 2, 1997 [GH] * * * - *-------------------------------------------------------------------------* - * Functions: * - * Scalar Division Operator -- Divide a vector by a scalar * - * Scalar Multiply Operator -- Multiply a vector by a scalar * - * Vector Addition Operator -- Add two vectors * - * Vector Subtraction Operator -- Subtract two vectors * - * Vector Inner Product Operator -- Compute the inner or dot product * - * Vector Equality Operator -- Detemine if two vectors are identical * - * Vector Inequality Operator -- Detemine if two vectors are identical * - * Swap -- swap two Vector4's * - * Vector4::Is_Valid -- Vector4::Is_Valid * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once @@ -117,18 +106,6 @@ class Vector4 WWINLINE bool Is_Valid() const; }; -/************************************************************************** - * Scalar Multiply Operator -- Multiply a vector by a scalar * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/24/1997 GH : Created. * - *========================================================================*/ WWINLINE Vector4 operator * (const Vector4 &a,float k) { return Vector4((a.X * k),(a.Y * k),(a.Z * k),(a.W * k)); @@ -139,35 +116,14 @@ WWINLINE Vector4 operator * (float k, const Vector4 &a) return a*k; } -/************************************************************************** - * Scalar Division Operator -- Divide a vector by a scalar * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *========================================================================*/ +// Divide a vector by a scalar. WWINLINE Vector4 operator / (const Vector4 &a,float k) { float ook=1.0f/k; return Vector4((a[0] * ook),(a[1] * ook),(a[2] * ook),(a[3] * ook)); } -/************************************************************************** - * Vector Addition Operator -- Add two vectors * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/24/1997 GH : Created. * - *========================================================================*/ +// Add two vectors. WWINLINE Vector4 operator + (const Vector4 &a,const Vector4 &b) { return Vector4( @@ -178,18 +134,6 @@ WWINLINE Vector4 operator + (const Vector4 &a,const Vector4 &b) ); } -/************************************************************************** - * Vector Subtraction Operator -- Subtract two vectors * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/24/1997 GH : Created. * - *========================================================================*/ WWINLINE Vector4 operator - (const Vector4 &a,const Vector4 &b) { return Vector4( @@ -200,17 +144,7 @@ WWINLINE Vector4 operator - (const Vector4 &a,const Vector4 &b) ); } -/************************************************************************** - * Vector Inner Product -- Compute the inner or dot product of two vector * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *========================================================================*/ +// Compute the inner or dot product of two vectors. WWINLINE float operator * (const Vector4 &a,const Vector4 &b) { return a[0]*b[0] + @@ -225,49 +159,18 @@ WWINLINE float Vector4::Dot_Product(const Vector4 &a,const Vector4 &b) } -/************************************************************************** - * Vector Equality Operator -- Detemine if two vectors are identical * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *========================================================================*/ +// Determine if two vectors are identical. WWINLINE bool operator == (const Vector4 &a,const Vector4 &b) { return ( (a[0] == b[0]) && (a[1] == b[1]) && (a[2] == b[2]) && (a[3] == b[3])); } -/************************************************************************** - * Vector Inequality Operator -- Detemine if two vectors are identical * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *========================================================================*/ +// Determine if two vectors are not identical. WWINLINE bool operator != (const Vector4 &a,const Vector4 &b) { return ( (a[0] != b[0]) || (a[1] != b[1]) || (a[2] != b[2]) || (a[3] != b[3])); } -/************************************************************************** - * Vector4::Normalize -- Normalizes the vector. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *========================================================================*/ WWINLINE void Vector4::Normalize() { float len2 = Length2(); @@ -290,51 +193,19 @@ WWINLINE Vector4 Normalize(const Vector4 & vec) return Vector4(0.0f,0.0f,0.0f,0.0f); } -/************************************************************************** - * Vector4::Length -- Returns the length of the vector * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *========================================================================*/ WWINLINE float Vector4::Length() const { return WWMath::Sqrt(Length2()); } -/************************************************************************** - * Vector4::Length -- Returns the square of the length of the vector * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *========================================================================*/ +// Returns the square of the length of the vector. WWINLINE float Vector4::Length2() const { return X*X + Y*Y + Z*Z + W*W; } -/*********************************************************************************************** - * Swap -- swap two Vector4's * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/02/1997 GH : Created. * - *=============================================================================================*/ +// Swap two Vector4's. WWINLINE void Swap(Vector4 & a,Vector4 & b) { Vector4 tmp(a); @@ -342,18 +213,8 @@ WWINLINE void Swap(Vector4 & a,Vector4 & b) b = tmp; } -/*********************************************************************************************** - * Lerp -- linearly interpolate two Vector4's by an interpolation factor. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: No checking is done to ensure that alpha is between 0 and 1. * - * * - * HISTORY: * - * 01/14/1999 NH : Created. * - *=============================================================================================*/ +// Linearly interpolate two Vector4's by an interpolation factor. +// WARNING: No checking is done to ensure that alpha is between 0 and 1. WWINLINE Vector4 Lerp(const Vector4 & a, const Vector4 & b, float alpha) { return Vector4( @@ -382,21 +243,7 @@ WWINLINE void Vector4::Lerp(const Vector4 & a, const Vector4 & b, float alpha,Ve set_result->X = (a.W + (b.W - a.W)*alpha); } -/*********************************************************************************************** - * Vector4::Is_Valid -- Vector4::Is_Valid * - * * - * verifies that all members of this vector are valid floats * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 10/18/99 gth : Created. * - *=============================================================================================*/ +// Verifies that all members of this vector are valid floats. WWINLINE bool Vector4::Is_Valid() const { return (WWMath::Is_Valid_Float(X) && WWMath::Is_Valid_Float(Y) && WWMath::Is_Valid_Float(Z) && WWMath::Is_Valid_Float(W)); diff --git a/Core/Libraries/Source/WWVegas/WWMath/vehiclecurve.cpp b/Core/Libraries/Source/WWVegas/WWMath/vehiclecurve.cpp index 30ef21f75ad..8f1073042bd 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/vehiclecurve.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/vehiclecurve.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 8 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "vehiclecurve.h" diff --git a/Core/Libraries/Source/WWVegas/WWMath/vehiclecurve.h b/Core/Libraries/Source/WWVegas/WWMath/vehiclecurve.h index 6dc1c7627c6..2845124c47d 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/vehiclecurve.h +++ b/Core/Libraries/Source/WWVegas/WWMath/vehiclecurve.h @@ -30,8 +30,6 @@ * * * $Revision:: 6 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWMath/vp.h b/Core/Libraries/Source/WWVegas/WWMath/vp.h index 937188093ff..b148775a375 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/vp.h +++ b/Core/Libraries/Source/WWVegas/WWMath/vp.h @@ -33,16 +33,6 @@ * $Revision:: 13 $* * * * 06/26/02 KM Matrix name change to avoid MAX conflicts * - *---------------------------------------------------------------------------------------------* - * Functions: * - * Transform - transforms a vector array given Matrix3D * - * Copy - Copies data from source to destination * - * CopyIndexed-copies dst[]=src[index[]] * - * Clear - clears array to zero * - * Normalize - normalize the array * - * MinMax - Finds the min and max of the array * - * * - *----------------------------------------------------------------------------------------------* */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WWMath/wwmath.cpp b/Core/Libraries/Source/WWVegas/WWMath/wwmath.cpp index a96ac0b68fb..9c32c5f80d3 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/wwmath.cpp +++ b/Core/Libraries/Source/WWVegas/WWMath/wwmath.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 11 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ diff --git a/Core/Libraries/Source/WWVegas/WWMath/wwmath.h b/Core/Libraries/Source/WWVegas/WWMath/wwmath.h index d27e4525315..e52a1888fab 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/wwmath.h +++ b/Core/Libraries/Source/WWVegas/WWMath/wwmath.h @@ -30,8 +30,6 @@ * * * $Revision:: 64 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once From 7ae34973df2573cc104fb15f406d702da0651856 Mon Sep 17 00:00:00 2001 From: xezon <4720891+xezon@users.noreply.github.com> Date: Mon, 16 Nov 2026 21:43:46 +0100 Subject: [PATCH 3/7] refactor(ww3d2): Replace function comment blocks with slim comments The Westwood comment blocks above the functions are replaced by slim // comments. Descriptions are kept where they add to the function name. INPUT and OUTPUT entries are dropped unless they say something the signature does not, such as units or special values. History entries are dropped, except for notes on how a function behaves today and the TheSuperHackers entries, which keep their keyword. The Functions lists in the file headers are removed as well, since they repeat the function descriptions. --- .../Source/WWVegas/WW3D2/aabtree.cpp | 413 +--------- Core/Libraries/Source/WWVegas/WW3D2/aabtree.h | 1 - .../Source/WWVegas/WW3D2/aabtreebuilder.cpp | 282 +------ .../Source/WWVegas/WW3D2/aabtreebuilder.h | 2 - .../Source/WWVegas/WW3D2/animatedsoundmgr.cpp | 2 - .../Source/WWVegas/WW3D2/animatedsoundmgr.h | 2 - Core/Libraries/Source/WWVegas/WW3D2/bmp2d.cpp | 2 - Core/Libraries/Source/WWVegas/WW3D2/bmp2d.h | 2 - .../Source/WWVegas/WW3D2/boxrobj.cpp | 719 +---------------- Core/Libraries/Source/WWVegas/WW3D2/boxrobj.h | 2 - .../Source/WWVegas/WW3D2/collect.cpp | 509 +----------- Core/Libraries/Source/WWVegas/WW3D2/collect.h | 2 - .../Source/WWVegas/WW3D2/colorspace.h | 2 - .../Source/WWVegas/WW3D2/coltest.cpp | 2 - Core/Libraries/Source/WWVegas/WW3D2/coltest.h | 2 - Core/Libraries/Source/WWVegas/WW3D2/coltype.h | 2 - .../Source/WWVegas/WW3D2/composite.cpp | 274 +------ .../Source/WWVegas/WW3D2/composite.h | 2 - .../Source/WWVegas/WW3D2/decalsys.cpp | 150 +--- .../Libraries/Source/WWVegas/WW3D2/decalsys.h | 2 - .../Source/WWVegas/WW3D2/distlod.cpp | 589 +------------- Core/Libraries/Source/WWVegas/WW3D2/distlod.h | 2 - Core/Libraries/Source/WWVegas/WW3D2/dllist.h | 2 - .../Source/WWVegas/WW3D2/dx8caps.cpp | 2 - Core/Libraries/Source/WWVegas/WW3D2/dx8caps.h | 2 - .../Libraries/Source/WWVegas/WW3D2/dx8fvf.cpp | 2 - Core/Libraries/Source/WWVegas/WW3D2/dx8fvf.h | 2 - .../Source/WWVegas/WW3D2/dx8indexbuffer.cpp | 2 - .../Source/WWVegas/WW3D2/dx8indexbuffer.h | 2 - Core/Libraries/Source/WWVegas/WW3D2/dx8list.h | 2 - .../WWVegas/WW3D2/dx8polygonrenderer.cpp | 2 - .../Source/WWVegas/WW3D2/dx8polygonrenderer.h | 2 - .../Source/WWVegas/WW3D2/dx8renderer.cpp | 2 - .../Source/WWVegas/WW3D2/dx8renderer.h | 2 - .../WWVegas/WW3D2/dx8rendererdebugger.h | 2 - .../Source/WWVegas/WW3D2/dx8texman.cpp | 88 +- .../Source/WWVegas/WW3D2/dx8texman.h | 2 - .../Source/WWVegas/WW3D2/dx8vertexbuffer.cpp | 2 - .../Source/WWVegas/WW3D2/dx8vertexbuffer.h | 2 - .../Source/WWVegas/WW3D2/dx8wrapper.cpp | 19 +- .../Source/WWVegas/WW3D2/dx8wrapper.h | 2 - .../Source/WWVegas/WW3D2/dynamesh.cpp | 2 - .../Libraries/Source/WWVegas/WW3D2/font3d.cpp | 2 - .../Source/WWVegas/WW3D2/formconv.cpp | 2 - .../Libraries/Source/WWVegas/WW3D2/formconv.h | 2 - .../Libraries/Source/WWVegas/WW3D2/framgrab.h | 2 - Core/Libraries/Source/WWVegas/WW3D2/hanim.cpp | 2 - Core/Libraries/Source/WWVegas/WW3D2/hanim.h | 2 - .../Libraries/Source/WWVegas/WW3D2/hcanim.cpp | 202 +---- Core/Libraries/Source/WWVegas/WW3D2/hcanim.h | 2 - .../Source/WWVegas/WW3D2/hmdldef.cpp | 67 +- Core/Libraries/Source/WWVegas/WW3D2/hmdldef.h | 2 - .../Source/WWVegas/WW3D2/hmorphanim.cpp | 2 - .../Source/WWVegas/WW3D2/hmorphanim.h | 2 - .../Source/WWVegas/WW3D2/hrawanim.cpp | 202 +---- .../Libraries/Source/WWVegas/WW3D2/hrawanim.h | 2 - Core/Libraries/Source/WWVegas/WW3D2/htree.cpp | 206 +---- Core/Libraries/Source/WWVegas/WW3D2/htree.h | 14 - .../Source/WWVegas/WW3D2/intersec.cpp | 2 - .../Libraries/Source/WWVegas/WW3D2/intersec.h | 2 - Core/Libraries/Source/WWVegas/WW3D2/inttest.h | 2 - Core/Libraries/Source/WWVegas/WW3D2/layer.cpp | 141 +--- Core/Libraries/Source/WWVegas/WW3D2/layer.h | 2 - Core/Libraries/Source/WWVegas/WW3D2/light.cpp | 159 +--- Core/Libraries/Source/WWVegas/WW3D2/light.h | 2 - .../Libraries/Source/WWVegas/WW3D2/line3d.cpp | 183 +---- Core/Libraries/Source/WWVegas/WW3D2/line3d.h | 2 - .../Libraries/Source/WWVegas/WW3D2/mapper.cpp | 31 +- Core/Libraries/Source/WWVegas/WW3D2/mapper.h | 2 - .../Source/WWVegas/WW3D2/matinfo.cpp | 2 - Core/Libraries/Source/WWVegas/WW3D2/matinfo.h | 2 - .../Source/WWVegas/WW3D2/matpass.cpp | 116 +-- Core/Libraries/Source/WWVegas/WW3D2/matpass.h | 2 - .../Source/WWVegas/WW3D2/matrixmapper.cpp | 167 +--- .../Source/WWVegas/WW3D2/matrixmapper.h | 2 - Core/Libraries/Source/WWVegas/WW3D2/mesh.cpp | 521 +----------- Core/Libraries/Source/WWVegas/WW3D2/mesh.h | 2 - .../Source/WWVegas/WW3D2/meshdam.cpp | 62 -- Core/Libraries/Source/WWVegas/WW3D2/meshdam.h | 2 - .../Source/WWVegas/WW3D2/meshgeometry.cpp | 683 +--------------- .../Source/WWVegas/WW3D2/meshgeometry.h | 2 - .../Source/WWVegas/WW3D2/meshmdl.cpp | 2 - Core/Libraries/Source/WWVegas/WW3D2/meshmdl.h | 2 - .../Source/WWVegas/WW3D2/meshmdlio.cpp | 500 +----------- .../Source/WWVegas/WW3D2/metalmap.cpp | 120 +-- .../Libraries/Source/WWVegas/WW3D2/metalmap.h | 2 - .../Source/WWVegas/WW3D2/motchan.cpp | 353 +------- Core/Libraries/Source/WWVegas/WW3D2/motchan.h | 2 - .../Source/WWVegas/WW3D2/part_emt.cpp | 2 - .../Libraries/Source/WWVegas/WW3D2/part_emt.h | 2 - Core/Libraries/Source/WWVegas/WW3D2/pivot.cpp | 17 - Core/Libraries/Source/WWVegas/WW3D2/pivot.h | 2 - .../Source/WWVegas/WW3D2/pointgr.cpp | 500 +----------- Core/Libraries/Source/WWVegas/WW3D2/pointgr.h | 2 - .../Source/WWVegas/WW3D2/polyinfo.cpp | 2 - .../Libraries/Source/WWVegas/WW3D2/polyinfo.h | 2 - .../Source/WWVegas/WW3D2/predlod.cpp | 70 +- Core/Libraries/Source/WWVegas/WW3D2/predlod.h | 2 - .../Source/WWVegas/WW3D2/prim_anim.cpp | 2 - .../Source/WWVegas/WW3D2/prim_anim.h | 2 - .../Source/WWVegas/WW3D2/projector.cpp | 131 +-- .../Source/WWVegas/WW3D2/projector.h | 2 - Core/Libraries/Source/WWVegas/WW3D2/proto.cpp | 30 +- Core/Libraries/Source/WWVegas/WW3D2/proto.h | 2 - Core/Libraries/Source/WWVegas/WW3D2/proxy.h | 2 - Core/Libraries/Source/WWVegas/WW3D2/rddesc.h | 2 - .../Source/WWVegas/WW3D2/render2dsentence.cpp | 2 - .../Source/WWVegas/WW3D2/render2dsentence.h | 2 - .../WWVegas/WW3D2/renderobjectrecycler.cpp | 70 +- .../WWVegas/WW3D2/renderobjectrecycler.h | 2 - .../Source/WWVegas/WW3D2/rendobj.cpp | 534 +----------- Core/Libraries/Source/WWVegas/WW3D2/rendobj.h | 32 +- .../Source/WWVegas/WW3D2/ringobj.cpp | 475 +---------- Core/Libraries/Source/WWVegas/WW3D2/ringobj.h | 2 - .../Libraries/Source/WWVegas/WW3D2/robjlist.h | 2 - .../Source/WWVegas/WW3D2/segline.cpp | 2 - Core/Libraries/Source/WWVegas/WW3D2/segline.h | 2 - .../Source/WWVegas/WW3D2/seglinerenderer.cpp | 2 - .../Source/WWVegas/WW3D2/seglinerenderer.h | 2 - .../Libraries/Source/WWVegas/WW3D2/shader.cpp | 117 +-- Core/Libraries/Source/WWVegas/WW3D2/shader.h | 2 - .../Source/WWVegas/WW3D2/shattersystem.cpp | 2 - .../Source/WWVegas/WW3D2/shattersystem.h | 2 - Core/Libraries/Source/WWVegas/WW3D2/shdlib.h | 2 - Core/Libraries/Source/WWVegas/WW3D2/snapPts.h | 2 - .../Source/WWVegas/WW3D2/snappts.cpp | 2 - .../Source/WWVegas/WW3D2/sortingrenderer.cpp | 2 - .../Source/WWVegas/WW3D2/soundlibrarybridge.h | 1 - .../Source/WWVegas/WW3D2/soundrobj.cpp | 2 - .../Source/WWVegas/WW3D2/soundrobj.h | 2 - .../Source/WWVegas/WW3D2/sphereobj.cpp | 481 +---------- .../Source/WWVegas/WW3D2/sphereobj.h | 2 - .../Source/WWVegas/WW3D2/static_sort_list.cpp | 2 - .../Source/WWVegas/WW3D2/static_sort_list.h | 2 - .../Libraries/Source/WWVegas/WW3D2/streak.cpp | 2 - Core/Libraries/Source/WWVegas/WW3D2/streak.h | 2 - .../Source/WWVegas/WW3D2/streakRender.h | 2 - .../Source/WWVegas/WW3D2/surfaceclass.cpp | 253 +----- .../Source/WWVegas/WW3D2/surfaceclass.h | 2 - .../Source/WWVegas/WW3D2/texproject.cpp | 543 +------------ .../Source/WWVegas/WW3D2/texproject.h | 2 - .../Source/WWVegas/WW3D2/textdraw.cpp | 2 - .../Source/WWVegas/WW3D2/texture.cpp | 3 - Core/Libraries/Source/WWVegas/WW3D2/texture.h | 2 - .../Source/WWVegas/WW3D2/texturefilter.cpp | 2 - .../Source/WWVegas/WW3D2/texturefilter.h | 2 - .../Source/WWVegas/WW3D2/textureloader.cpp | 2 - .../Source/WWVegas/WW3D2/textureloader.h | 2 - .../Source/WWVegas/WW3D2/vertmaterial.cpp | 50 -- .../Source/WWVegas/WW3D2/vertmaterial.h | 2 - .../Source/WWVegas/WW3D2/visrasterizer.cpp | 2 - .../Source/WWVegas/WW3D2/visrasterizer.h | 2 - .../Source/WWVegas/WW3D2/w3d_dep.cpp | 176 +--- Core/Libraries/Source/WWVegas/WW3D2/w3d_dep.h | 2 - .../Libraries/Source/WWVegas/WW3D2/w3d_file.h | 2 - .../Source/WWVegas/WW3D2/w3d_obsolete.h | 2 - .../Source/WWVegas/WW3D2/w3d_util.cpp | 2 - .../Libraries/Source/WWVegas/WW3D2/w3d_util.h | 2 - Core/Libraries/Source/WWVegas/WW3D2/w3derr.h | 2 - .../Source/WWVegas/WW3D2/w3dexclusionlist.cpp | 2 - .../Source/WWVegas/WW3D2/w3dexclusionlist.h | 2 - Core/Libraries/Source/WWVegas/WW3D2/ww3d.cpp | 757 +----------------- Core/Libraries/Source/WWVegas/WW3D2/ww3d.h | 2 - .../Source/WWVegas/WW3D2/ww3dformat.cpp | 2 - .../Source/WWVegas/WW3D2/ww3dformat.h | 4 - .../Libraries/Source/WWVegas/WW3D2/ww3dtrig.h | 2 - 166 files changed, 468 insertions(+), 10787 deletions(-) diff --git a/Core/Libraries/Source/WWVegas/WW3D2/aabtree.cpp b/Core/Libraries/Source/WWVegas/WW3D2/aabtree.cpp index 4575787c265..d8fa19bce22 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/aabtree.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/aabtree.cpp @@ -30,35 +30,6 @@ * * * $Revision:: 4 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * AABTreeClass::AABTreeClass -- Constructor * - * AABTreeClass::AABTreeClass -- Constructor * - * AABTreeClass::AABTreeClass -- copy constructor * - * AABTreeClass::~AABTreeClass -- Destructor * - * AABTreeClass::operator = -- assignment operator * - * AABTreeClass::Reset -- reset this tree, releases all allocated resources * - * AABTreeClass::Build_Tree_Recursive -- Initializes this tree from the given builder * - * AABTreeClass::Set_Mesh -- set the mesh pointer * - * AABTreeClass::Generate_APT -- Generate an active poly table for the mesh * - * AABTreeClass::Generate_OBBox_APT_Recursive -- recursively generate the apt * - * AABTreeClass::Cast_Ray_Recursive -- Internal implementation of Cast_Ray * - * AABTreeClass::Cast_Semi_Infinite_Axis_Aligned_Ray_Recursive -- Internal implementation * - * AABTreeClass::Cast_AABox_Recursive -- internal implementation of Cast_AABox * - * AABTreeClass::Cast_OBBox_Recursive -- Internal implementation of Cast_OBBox * - * AABTreeClass::Intersect_OBBox_Recursive -- internal implementation of Intersect_OBBox * - * AABTreeClass::Cast_Ray_To_Polys -- cast the ray to polys in the given node * - * AABTreeClass::Cast_Semi_Infinite_Axis_Aligned_Ray_To_Polys -- cast ray to polys in the nod* - * AABTreeClass::Cast_AABox_To_Polys -- cast aabox to polys in the given node * - * AABTreeClass::Cast_OBBox_To_Polys -- cast obbox to polys in the given node * - * AABTreeClass::Intersect_OBBox_With_Polys -- Test polys for intersection * - * AABTreeClass::Update_Bounding_Boxes_Recursive -- recompute the bounding boxes * - * AABTreeClass::Update_Min_Max -- updates min and max given a polygon index * - * AABTreeClass::Load_W3D -- Load a W3D description of an AABTree * - * AABTreeClass::Read_Poly_Indices -- load the polygon index array * - * AABTreeClass::Read_Nodes -- Load the node array * - * AABTreeClass::Generate_APT -- generate an apt from a box and viewdir * - * AABTreeClass::Generate_OBBox_APT_Recursive -- recurse, generate the apt for a box and vie * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -75,17 +46,6 @@ -/*********************************************************************************************** - * AABTreeClass::AABTreeClass -- Constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *=============================================================================================*/ AABTreeClass::AABTreeClass() : NodeCount(0), Nodes(nullptr), @@ -95,21 +55,7 @@ AABTreeClass::AABTreeClass() : { } -/*********************************************************************************************** - * AABTreeClass::AABTreeClass -- Constructor * - * * - * Builds an AABTree from the contents of an AABTreeBuilderClass. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/19/98 GTH : Created. * - * 5/23/2000 gth : Created. * - *=============================================================================================*/ +// Builds an AABTree from the contents of an AABTreeBuilderClass. AABTreeClass::AABTreeClass(AABTreeBuilderClass * builder) { NodeCount = builder->Node_Count(); @@ -123,18 +69,6 @@ AABTreeClass::AABTreeClass(AABTreeBuilderClass * builder) } -/*********************************************************************************************** - * AABTreeClass::AABTreeClass -- copy constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/22/99 GTH : Created. * - *=============================================================================================*/ AABTreeClass::AABTreeClass(const AABTreeClass & that) : NodeCount(0), Nodes(nullptr), @@ -145,35 +79,11 @@ AABTreeClass::AABTreeClass(const AABTreeClass & that) : *this = that; } -/*********************************************************************************************** - * AABTreeClass::~AABTreeClass -- Destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/19/98 GTH : Created. * - *=============================================================================================*/ AABTreeClass::~AABTreeClass() { Reset(); } -/*********************************************************************************************** - * AABTreeClass::operator = -- assignment operator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/22/99 GTH : Created. * - *=============================================================================================*/ AABTreeClass & AABTreeClass::operator = (const AABTreeClass & that) { Reset(); @@ -196,18 +106,7 @@ AABTreeClass & AABTreeClass::operator = (const AABTreeClass & that) } -/*********************************************************************************************** - * AABTreeClass::Reset -- reset this tree, releases all allocated resources * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/22/99 GTH : Created. * - *=============================================================================================*/ +// Reset this tree, releases all allocated resources. void AABTreeClass::Reset() { NodeCount = 0; @@ -221,18 +120,7 @@ void AABTreeClass::Reset() Mesh = nullptr; } -/*********************************************************************************************** - * AABTreeClass::Scale - uniform scale * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/17/02 Jani : Created. * - *=============================================================================================*/ +// Uniform scale. void AABTreeClass::Scale(float f) { for (int i=0;i & apt) { OBBoxAPTContextStruct context(box,apt); @@ -338,20 +190,6 @@ void AABTreeClass::Generate_APT(const OBBoxClass & box,SimpleDynVecClass -/*********************************************************************************************** - * AABTreeClass::Generate_OBBox_APT_Recursive -- recursively generate the apt * - * * - * INPUT: * - * node - current node in the recursion * - * context - structure containing the results/current state * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/25/00 gth : Created. * - *=============================================================================================*/ void AABTreeClass::Generate_OBBox_APT_Recursive(CullNodeStruct * node,OBBoxAPTContextStruct & context) { /* @@ -408,21 +246,8 @@ void AABTreeClass::Generate_OBBox_APT_Recursive(CullNodeStruct * node,OBBoxAPTCo } -/*********************************************************************************************** - * AABTreeClass::Generate_APT -- generate an apt from a box and viewdir * - * * - * Indices of the polys which intersect the box and are not backfacing to the given viewdir * - * will be added to the passed in apt. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/10/2001 gth : Created. * - *=============================================================================================*/ +// Generate an apt from a box and viewdir. Indices of the polys which intersect the box and are not +// backfacing to the given viewdir will be added to the passed in apt. void AABTreeClass::Generate_APT ( const OBBoxClass & box, @@ -435,18 +260,7 @@ void AABTreeClass::Generate_APT } -/*********************************************************************************************** - * AABTreeClass::Generate_OBBox_APT_Recursive -- recurse, generate the apt for a box and viewd * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/10/2001 gth : Created. * - *=============================================================================================*/ +// Recurse, generate the apt for a box and viewdir. void AABTreeClass::Generate_OBBox_APT_Recursive(CullNodeStruct * node, OBBoxRayAPTContextStruct & context) { /* @@ -506,20 +320,6 @@ void AABTreeClass::Generate_OBBox_APT_Recursive(CullNodeStruct * node, OBBoxRayA } -/*********************************************************************************************** - * AABTreeClass::Cast_Ray_Recursive -- Internal implementation of Cast_Ray * - * * - * INPUT: * - * raytest - contains all of the ray test information * - * node - current cull node being processed * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/19/98 GTH : Created. * - *=============================================================================================*/ bool AABTreeClass::Cast_Ray_Recursive(CullNodeStruct * node,RayCollisionTestClass & raytest) { /* @@ -546,24 +346,9 @@ bool AABTreeClass::Cast_Ray_Recursive(CullNodeStruct * node,RayCollisionTestClas } -/*********************************************************************************************** - * AABTreeClass::Cast_Semi_Infinite_Axis_Aligned_Ray_Recursive -- Internal implementation * - * * - * INPUT: * - * node - current cull node being processed * - * start_point - starting point * - * axis_r - the axis along which the ray is projected * - * axis_1, axis_2 - the other two axes * - * direction - 0 means the ray goes toward the negative axis, 1 means positive. * - * flags - reference bitfield for result flags (ray hit edge, start point embedded in tri, etc)* - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 8/30/00 NH : Created. * - *=============================================================================================*/ +// Internal implementation. The direction 0 means the ray goes toward the negative axis, 1 means +// positive. The flags are a reference bitfield for result flags (ray hit edge, start point embedded +// in tri, etc). int AABTreeClass::Cast_Semi_Infinite_Axis_Aligned_Ray_Recursive(CullNodeStruct * node, const Vector3 & start_point, int axis_r, int axis_1, int axis_2, int direction, unsigned char & flags) @@ -608,20 +393,6 @@ int AABTreeClass::Cast_Semi_Infinite_Axis_Aligned_Ray_Recursive(CullNodeStruct * } -/*********************************************************************************************** - * AABTreeClass::Cast_AABox_Recursive -- internal implementation of Cast_AABox * - * * - * INPUT: * - * boxtest - contains description of the collision operation to be performed * - * node - current cull node being processed * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/19/98 GTH : Created. * - *=============================================================================================*/ bool AABTreeClass::Cast_AABox_Recursive(CullNodeStruct * node,AABoxCollisionTestClass & boxtest) { /* @@ -648,20 +419,6 @@ bool AABTreeClass::Cast_AABox_Recursive(CullNodeStruct * node,AABoxCollisionTest } -/*********************************************************************************************** - * AABTreeClass::Cast_OBBox_Recursive -- Internal implementation of Cast_OBBox * - * * - * INPUT: * - * boxtest - contains description of the collision test to be performed * - * node - current cull node being processed * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/19/98 GTH : Created. * - *=============================================================================================*/ bool AABTreeClass::Cast_OBBox_Recursive(CullNodeStruct * node,OBBoxCollisionTestClass & boxtest) { /* @@ -688,18 +445,6 @@ bool AABTreeClass::Cast_OBBox_Recursive(CullNodeStruct * node,OBBoxCollisionTest } -/*********************************************************************************************** - * AABTreeClass::Intersect_OBBox_Recursive -- internal implementation of Intersect_OBBox * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/20/00 gth : Created. * - *=============================================================================================*/ bool AABTreeClass::Intersect_OBBox_Recursive(AABTreeClass::CullNodeStruct * node,OBBoxIntersectionTestClass & test) { /* @@ -724,18 +469,6 @@ bool AABTreeClass::Intersect_OBBox_Recursive(AABTreeClass::CullNodeStruct * node return res; } -/*********************************************************************************************** - * AABTreeClass::Cast_Ray_To_Polys -- cast the ray to polys in the given node * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/19/98 GTH : Created. * - *=============================================================================================*/ bool AABTreeClass::Cast_Ray_To_Polys(CullNodeStruct * node,RayCollisionTestClass & raytest) { if (node->Get_Poly_Count() > 0) { @@ -784,24 +517,9 @@ bool AABTreeClass::Cast_Ray_To_Polys(CullNodeStruct * node,RayCollisionTestClass return false; } -/*********************************************************************************************** - * AABTreeClass::Cast_Semi_Infinite_Axis_Aligned_Ray_To_Polys -- cast ray to polys in the node * - * * - * INPUT: * - * node - current cull node being processed * - * start_point - starting point * - * axis_r - the axis along which the ray is projected * - * axis_1, axis_2 - the other two axes * - * direction - 0 means the ray goes toward the negative axis, 1 means positive. * - * flags - reference bitfield for result flags (ray hit edge, start point embedded in tri, etc)* - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 8/30/00 NH : Created. * - *=============================================================================================*/ +// Cast ray to polys in the node. The direction 0 means the ray goes toward the negative axis, 1 +// means positive. The flags are a reference bitfield for result flags (ray hit edge, start point +// embedded in tri, etc). int AABTreeClass::Cast_Semi_Infinite_Axis_Aligned_Ray_To_Polys(CullNodeStruct * node, const Vector3 & start_point, int axis_r, int axis_1, int axis_2, int direction, unsigned char & flags) @@ -839,18 +557,6 @@ int AABTreeClass::Cast_Semi_Infinite_Axis_Aligned_Ray_To_Polys(CullNodeStruct * } -/*********************************************************************************************** - * AABTreeClass::Cast_AABox_To_Polys -- cast aabox to polys in the given node * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/19/98 GTH : Created. * - *=============================================================================================*/ bool AABTreeClass::Cast_AABox_To_Polys(CullNodeStruct * node,AABoxCollisionTestClass & boxtest) { if (node->Get_Poly_Count() > 0) { @@ -900,18 +606,6 @@ bool AABTreeClass::Cast_AABox_To_Polys(CullNodeStruct * node,AABoxCollisionTestC } -/*********************************************************************************************** - * AABTreeClass::Cast_OBBox_To_Polys -- cast obbox to polys in the given node * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/19/98 GTH : Created. * - *=============================================================================================*/ bool AABTreeClass::Cast_OBBox_To_Polys(CullNodeStruct * node,OBBoxCollisionTestClass & boxtest) { int polycount = node->Get_Poly_Count(); @@ -964,18 +658,6 @@ bool AABTreeClass::Cast_OBBox_To_Polys(CullNodeStruct * node,OBBoxCollisionTestC } -/*********************************************************************************************** - * AABTreeClass::Intersect_OBBox_With_Polys -- Test polys for intersection * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/20/00 gth : Created. * - *=============================================================================================*/ bool AABTreeClass::Intersect_OBBox_With_Polys ( CullNodeStruct * node, @@ -1021,21 +703,8 @@ bool AABTreeClass::Intersect_OBBox_With_Polys } -/*********************************************************************************************** - * AABTreeClass::Update_Bounding_Boxes_Recursive -- recompute the bounding boxes * - * * - * Typically this function will be used when you have modified the mesh slightly and you need * - * to update the bounding boxes but you want to keep the structure of the tree. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/22/99 GTH : Created. * - *=============================================================================================*/ +// Typically this function will be used when you have modified the mesh slightly and you need to +// update the bounding boxes but you want to keep the structure of the tree. void AABTreeClass::Update_Bounding_Boxes_Recursive(CullNodeStruct * node) { node->Min.Set(100000.0f,100000.0f,100000.0f); @@ -1097,18 +766,7 @@ void AABTreeClass::Update_Bounding_Boxes_Recursive(CullNodeStruct * node) } -/*********************************************************************************************** - * AABTreeClass::Update_Min_Max -- updates min and max given a polygon index * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/22/99 GTH : Created. * - *=============================================================================================*/ +// Updates min and max given a polygon index. void AABTreeClass::Update_Min_Max(int poly_index,Vector3 & min,Vector3 & max) { for (int vert_index = 0; vert_index < 3; vert_index++) { @@ -1127,18 +785,7 @@ void AABTreeClass::Update_Min_Max(int poly_index,Vector3 & min,Vector3 & max) } -/*********************************************************************************************** - * AABTreeClass::Load_W3D -- Load a W3D description of an AABTree * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/22/2000 gth : Created. * - *=============================================================================================*/ +// Load a W3D description of an AABTree. void AABTreeClass::Load_W3D(ChunkLoadClass & cload) { Reset(); @@ -1170,36 +817,14 @@ void AABTreeClass::Load_W3D(ChunkLoadClass & cload) } -/*********************************************************************************************** - * AABTreeClass::Read_Poly_Indices -- load the polygon index array * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/22/2000 gth : Created. * - *=============================================================================================*/ +// Load the polygon index array. void AABTreeClass::Read_Poly_Indices(ChunkLoadClass & cload) { cload.Read(PolyIndices,sizeof(uint32) * PolyCount); } -/*********************************************************************************************** - * AABTreeClass::Read_Nodes -- Load the node array * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/22/2000 gth : Created. * - *=============================================================================================*/ +// Load the node array. void AABTreeClass::Read_Nodes(ChunkLoadClass & cload) { W3dMeshAABTreeNode w3dnode; diff --git a/Core/Libraries/Source/WWVegas/WW3D2/aabtree.h b/Core/Libraries/Source/WWVegas/WW3D2/aabtree.h index 54c21044598..91281114be8 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/aabtree.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/aabtree.h @@ -34,7 +34,6 @@ * * *---------------------------------------------------------------------------------------------* * 06/26/02 KM Integrating shader system - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/aabtreebuilder.cpp b/Core/Libraries/Source/WWVegas/WW3D2/aabtreebuilder.cpp index d37d557fb28..e9377bf4c1f 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/aabtreebuilder.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/aabtreebuilder.cpp @@ -32,29 +32,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * AABTreeBuilderClass::AABTreeBuilderClass -- Constructor * - * AABTreeBuilderClass::~AABTreeBuilderClass -- Destructor * - * AABTreeBuilderClass::Reset -- reset the builder, delete all arrays * - * AABTreeBuilderClass::Build_AABTree -- Build an AABTree for the given mesh. * - * AABTreeBuilderClass::Build_Tree -- recursively builds the culling tree * - * AABTreeBuilderClass::Select_Splitting_Plane -- select a partition for the given polys * - * AABTreeBuilderClass::Compute_Plane_Score -- evaluate the suitability of a partition plane * - * AABTreeBuilderClass::Which_Side -- which side of a plane is the given poly * - * AABTreeBuilderClass::Split_Polys -- partition the polys with a plane * - * AABTreeBuilderClass::Compute_Bounding_Box -- compute bounding boxes for the cull nodes * - * AABTreeBuilderClass::Assign_Index -- assign an array index to each node * - * AABTreeBuilderClass::Node_Count -- Count the nodes in the tree * - * AABTreeBuilderClass::Poly_Count -- returns number of polys * - * AABTreeBuilderClass::Node_Count_Recursive -- internal implementation of Node_Count * - * AABTreeBuilderClass::Submit_Tree -- install nodes into an AABTreeClass * - * AABTreeBuilderClass::Submit_Tree_Recursive -- internal implementation of Submit_Tree * - * AABTreeBuilderClass::Update_Min -- ensure given vector is < min of the poly * - * AABTreeBuilderClass::Update_Max -- ensure given vector is > max of poly * - * AABTreeBuilderClass::Update_Min_Max -- ensure given vector is in min max of poly * - * AABTreeBuilderClass::Export -- Saves this AABTree into a W3D chunk * - * AABTreeBuilderClass::Build_W3D_AABTree_Recursive -- Build array of indices and W3dMeshAAB * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "aabtreebuilder.h" @@ -68,17 +45,6 @@ const float COINCIDENCE_EPSILON = 0.001f; -/*********************************************************************************************** - * AABTreeBuilderClass::AABTreeBuilderClass -- Constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *=============================================================================================*/ AABTreeBuilderClass::AABTreeBuilderClass() : Root(nullptr), CurPolyIndex(0), @@ -90,36 +56,13 @@ AABTreeBuilderClass::AABTreeBuilderClass() : } -/*********************************************************************************************** - * AABTreeBuilderClass::~AABTreeBuilderClass -- Destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/19/2000 gth : Created. * - *=============================================================================================*/ AABTreeBuilderClass::~AABTreeBuilderClass() { Reset(); } -/*********************************************************************************************** - * AABTreeBuilderClass::Reset -- reset the builder, delete all arrays * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/19/2000 gth : Created. * - *=============================================================================================*/ +// Reset the builder, delete all arrays. void AABTreeBuilderClass::Reset() { delete Root; @@ -132,18 +75,7 @@ void AABTreeBuilderClass::Reset() Polys = nullptr; } -/*********************************************************************************************** - * AABTreeBuilderClass::Build_AABTree -- Build an AABTree for the given mesh. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/19/98 GTH : Created. * - *=============================================================================================*/ +// Build an AABTree for the given mesh. void AABTreeBuilderClass::Build_AABTree(int polycount,TriIndex * polys,int vertcount,Vector3 * verts) { WWASSERT(polycount > 0); @@ -196,19 +128,7 @@ void AABTreeBuilderClass::Build_AABTree(int polycount,TriIndex * polys,int vertc } -/*********************************************************************************************** - * AABTreeBuilderClass::Build_AABTree -- Build an AABTree for the given mesh. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/19/98 GTH : Created. * - * 6/28/02 KJM : This version handles 32-bit indexes - *=============================================================================================*/ +// Build an AABTree for the given mesh. void AABTreeBuilderClass::Build_AABTree(int polycount,Vector3i * polys,int vertcount,Vector3 * verts) { WWASSERT(polycount > 0); @@ -263,18 +183,7 @@ void AABTreeBuilderClass::Build_AABTree(int polycount,Vector3i * polys,int vertc } -/*********************************************************************************************** - * AABTreeBuilderClass::Build_Tree -- recursively builds the culling tree * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/19/98 GTH : Created. * - *=============================================================================================*/ +// Recursively builds the culling tree. void AABTreeBuilderClass::Build_Tree(CullNodeStruct * node,int polycount,int * polyindices) { /* @@ -353,18 +262,7 @@ void AABTreeBuilderClass::Build_Tree(CullNodeStruct * node,int polycount,int * p } -/*********************************************************************************************** - * AABTreeBuilderClass::Select_Splitting_Plane -- select a partition for the given polys * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/19/98 GTH : Created. * - *=============================================================================================*/ +// Select a partition for the given polys. AABTreeBuilderClass::SplitChoiceStruct AABTreeBuilderClass::Select_Splitting_Plane(int polycount,int * polyindices) { @@ -413,18 +311,7 @@ AABTreeBuilderClass::Select_Splitting_Plane(int polycount,int * polyindices) } -/*********************************************************************************************** - * AABTreeBuilderClass::Compute_Plane_Score -- evaluate the suitability of a partition plane * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/19/98 GTH : Created. * - *=============================================================================================*/ +// Evaluate the suitability of a partition plane. AABTreeBuilderClass::SplitChoiceStruct AABTreeBuilderClass::Compute_Plane_Score(int polycount,int * polyindices,const AAPlaneClass & plane) { @@ -480,18 +367,7 @@ AABTreeBuilderClass::Compute_Plane_Score(int polycount,int * polyindices,const A } -/*********************************************************************************************** - * AABTreeBuilderClass::Which_Side -- which side of a plane is the given poly * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/19/98 GTH : Created. * - *=============================================================================================*/ +// Which side of a plane is the given poly. AABTreeBuilderClass::OverlapType AABTreeBuilderClass::Which_Side(const AAPlaneClass & plane,int poly_index) { @@ -546,18 +422,7 @@ AABTreeBuilderClass::Which_Side(const AAPlaneClass & plane,int poly_index) } -/*********************************************************************************************** - * AABTreeBuilderClass::Split_Polys -- partition the polys with a plane * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/19/98 GTH : Created. * - *=============================================================================================*/ +// Partition the polys with a plane. void AABTreeBuilderClass::Split_Polys ( int polycount, @@ -605,18 +470,7 @@ void AABTreeBuilderClass::Split_Polys } -/*********************************************************************************************** - * AABTreeBuilderClass::Compute_Bounding_Box -- compute bounding boxes for the cull nodes * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/19/98 GTH : Created. * - *=============================================================================================*/ +// Compute bounding boxes for the cull nodes. void AABTreeBuilderClass::Compute_Bounding_Box(CullNodeStruct * node) { /* @@ -678,18 +532,7 @@ void AABTreeBuilderClass::Compute_Bounding_Box(CullNodeStruct * node) } -/*********************************************************************************************** - * AABTreeBuilderClass::Assign_Index -- assign an array index to each node * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/19/98 GTH : Created. * - *=============================================================================================*/ +// Assign an array index to each node. int AABTreeBuilderClass::Assign_Index(CullNodeStruct * node,int index) { /* @@ -714,18 +557,6 @@ int AABTreeBuilderClass::Assign_Index(CullNodeStruct * node,int index) } -/*********************************************************************************************** - * AABTreeBuilderClass::Node_Count -- Count the nodes in the tree * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/19/98 GTH : Created. * - *=============================================================================================*/ int AABTreeBuilderClass::Node_Count() { if (Root) { @@ -736,35 +567,11 @@ int AABTreeBuilderClass::Node_Count() } -/*********************************************************************************************** - * AABTreeBuilderClass::Poly_Count -- returns number of polys * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 10/23/98 GTH : Created. * - *=============================================================================================*/ int AABTreeBuilderClass::Poly_Count() { return PolyCount; } -/*********************************************************************************************** - * AABTreeBuilderClass::Node_Count_Recursive -- internal implementation of Node_Count * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/19/98 GTH : Created. * - *=============================================================================================*/ int AABTreeBuilderClass::Node_Count_Recursive(CullNodeStruct * node,int curcount) { curcount++; @@ -778,18 +585,7 @@ int AABTreeBuilderClass::Node_Count_Recursive(CullNodeStruct * node,int curcount } -/*********************************************************************************************** - * AABTreeBuilderClass::Update_Min -- ensure given vector is < min of the poly * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/22/98 GTH : Created. * - *=============================================================================================*/ +// Ensure given vector is < min of the poly. void AABTreeBuilderClass::Update_Min(int poly_index,Vector3 & min) { for (int vert_index = 0; vert_index < 3; vert_index++) { @@ -804,18 +600,7 @@ void AABTreeBuilderClass::Update_Min(int poly_index,Vector3 & min) } -/*********************************************************************************************** - * AABTreeBuilderClass::Update_Max -- ensure given vector is > max of poly * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/22/98 GTH : Created. * - *=============================================================================================*/ +// Ensure given vector is > max of poly. void AABTreeBuilderClass::Update_Max(int poly_index,Vector3 & max) { for (int vert_index = 0; vert_index < 3; vert_index++) { @@ -830,18 +615,7 @@ void AABTreeBuilderClass::Update_Max(int poly_index,Vector3 & max) } -/*********************************************************************************************** - * AABTreeBuilderClass::Update_Min_Max -- ensure given vector is in min max of poly * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 9/24/98 BMG : Created. * - *=============================================================================================*/ +// Ensure given vector is in min max of poly. void AABTreeBuilderClass::Update_Min_Max(int poly_index, Vector3 & min, Vector3 & max) { for (int vert_index = 0; vert_index < 3; vert_index++) { @@ -861,21 +635,8 @@ void AABTreeBuilderClass::Update_Min_Max(int poly_index, Vector3 & min, Vector3 -/*********************************************************************************************** - * AABTreeBuilderClass::Export -- Saves this AABTree into a W3D chunk * - * * - * This function will export the AABTree into a W3D chunk so that it can be loaded by its * - * sister class "AABTreeClass" in the WW3D library. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/22/2000 gth : Created. * - *=============================================================================================*/ +// Saves this AABTree into a W3D chunk. This function will export the AABTree into a W3D chunk so +// that it can be loaded by its sister class "AABTreeClass" in the WW3D library. void AABTreeBuilderClass::Export(ChunkSaveClass & csave) { csave.Begin_Chunk(W3D_CHUNK_AABTREE); @@ -921,18 +682,7 @@ void AABTreeBuilderClass::Export(ChunkSaveClass & csave) } -/*********************************************************************************************** - * AABTreeBuilderClass::Build_W3D_AABTree_Recursive -- Build array of indices and W3dMeshAABTr * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/22/2000 gth : Created. * - *=============================================================================================*/ +// Build array of indices and W3dMeshAABTreeNode structs. void AABTreeBuilderClass::Build_W3D_AABTree_Recursive ( AABTreeBuilderClass::CullNodeStruct * node, diff --git a/Core/Libraries/Source/WWVegas/WW3D2/aabtreebuilder.h b/Core/Libraries/Source/WWVegas/WW3D2/aabtreebuilder.h index ed2137c22f8..929dbc71810 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/aabtreebuilder.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/aabtreebuilder.h @@ -32,8 +32,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/animatedsoundmgr.cpp b/Core/Libraries/Source/WWVegas/WW3D2/animatedsoundmgr.cpp index 30708193b94..08bc40cd67e 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/animatedsoundmgr.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/animatedsoundmgr.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ // // MBL Update for CNC3 INCURSION - 10.23.2002 - Expanded param handling, Added STOP command diff --git a/Core/Libraries/Source/WWVegas/WW3D2/animatedsoundmgr.h b/Core/Libraries/Source/WWVegas/WW3D2/animatedsoundmgr.h index 34aeb811a38..e02a694144e 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/animatedsoundmgr.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/animatedsoundmgr.h @@ -30,8 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ // // MBL Update for CNC3 INCURSION - 10.23.2002 - Expanded param handling, Added STOP command diff --git a/Core/Libraries/Source/WWVegas/WW3D2/bmp2d.cpp b/Core/Libraries/Source/WWVegas/WW3D2/bmp2d.cpp index c65aa8ebe89..5e6aa689441 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/bmp2d.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/bmp2d.cpp @@ -33,8 +33,6 @@ * $Revision:: 12 $* * * * 08/05/02 KM Texture class redesign - *-------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "bmp2d.h" diff --git a/Core/Libraries/Source/WWVegas/WW3D2/bmp2d.h b/Core/Libraries/Source/WWVegas/WW3D2/bmp2d.h index 5acbfeb5235..e430921102a 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/bmp2d.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/bmp2d.h @@ -30,8 +30,6 @@ * * * $Revision:: 3 $* * * - *-------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/boxrobj.cpp b/Core/Libraries/Source/WWVegas/WW3D2/boxrobj.cpp index ef33ba4be41..faa66b66ccb 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/boxrobj.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/boxrobj.cpp @@ -30,61 +30,6 @@ * * * $Revision:: 35 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * BoxRenderObjClass::BoxRenderObjClass -- Constructor * - * BoxRenderObjClass::BoxRenderObjClass -- Constructor - init from a definition * - * BoxRenderObjClass::BoxRenderObjClass -- Copy constructor * - * BoxRenderObjClass::operator -- assignment operator * - * BoxRenderObjClass::Get_Num_Polys -- returns number of polygons * - * BoxRenderObjClass::Get_Name -- returns name * - * BoxRenderObjClass::Set_Name -- sets the name * - * BoxRenderObjClass::Set_Color -- Sets the color of the box * - * BoxRenderObjClass::Init_Box_Render_System -- global initialization needed for boxes to wo * - * BoxRenderObjClass::Shutdown_Box_Render_System -- cleanup box render system * - * BoxRenderObjClass::Set_Box_Display_Mask -- Sets global display mask for all boxes * - * BoxRenderObjClass::Get_Box_Display_Mask -- returns the display mask * - * BoxRenderObjClass::render_box -- submits the box to the GERD * - * BoxRenderObjClass::vis_render_box -- submits box to the GERD for VIS * - * AABoxRenderObjClass::AABoxRenderObjClass -- constructor * - * AABoxRenderObjClass::AABoxRenderObjClass -- Constructor - init from a definition * - * AABoxRenderObjClass::AABoxRenderObjClass -- copy constructor * - * AABoxRenderObjClass::AABoxRenderObjClass -- Constructor from a wwmath aabox * - * AABoxRenderObjClass::operator -- assignment operator * - * AABoxRenderObjClass::Clone -- clones the box * - * AABoxRenderObjClass::Class_ID -- returns the class-id for AABox's * - * AABoxRenderObjClass::Render -- render this box * - * AABoxRenderObjClass::Special_Render -- special render this box (vis) * - * AABoxRenderObjClass::Set_Transform -- set the transform for this box * - * AABoxRenderObjClass::Set_Position -- Set the position of this box * - * AABoxRenderObjClass::update_cached_box -- update the world-space version of this box * - * AABoxRenderObjClass::Cast_Ray -- cast a ray against this box * - * AABoxRenderObjClass::Cast_AABox -- cast an AABox against this box * - * AABoxRenderObjClass::Cast_OBBox -- cast an OBBox against this box * - * AABoxRenderObjClass::Intersect_AABox -- intersect this box with an AABox * - * AABoxRenderObjClass::Intersect_OBBox -- Intersect this box with an OBBox * - * AABoxRenderObjClass::Get_Obj_Space_Bounding_Sphere -- return the object-space bounding sp * - * AABoxRenderObjClass::Get_Obj_Space_Bounding_Box -- returns the obj-space bounding box * - * OBBoxRenderObjClass::OBBoxRenderObjClass -- Constructor * - * OBBoxRenderObjClass::OBBoxRenderObjClass -- Constructor - initiallize from a definition * - * OBBoxRenderObjClass::OBBoxRenderObjClass -- copy constructor * - * OBBoxRenderObjClass::OBBoxRenderObjClass -- constructor - initialize from a wwmath obbox * - * OBBoxRenderObjClass::operator -- assignment operator * - * OBBoxRenderObjClass::Clone -- clone this obbox * - * OBBoxRenderObjClass::Class_ID -- returns the class ID of OBBoxRenderObjClass * - * OBBoxRenderObjClass::Render -- render this obbox * - * OBBoxRenderObjClass::Special_Render -- special render (vis) * - * OBBoxRenderObjClass::Set_Transform -- set the transform for this box * - * OBBoxRenderObjClass::Set_Position -- set the position of this box * - * OBBoxRenderObjClass::update_cached_box -- update the cached world-space box * - * OBBoxRenderObjClass::Cast_Ray -- cast a ray against this box * - * OBBoxRenderObjClass::Cast_AABox -- cast a swept aabox against this box * - * OBBoxRenderObjClass::Cast_OBBox -- cast a swept obbox against this bo * - * OBBoxRenderObjClass::Intersect_AABox -- test this box for intersection with an AAbox * - * OBBoxRenderObjClass::Intersect_OBBox -- test this box for intersection with an OBBox * - * OBBoxRenderObjClass::Get_Obj_Space_Bounding_Sphere -- return the obj-space bounding spher * - * OBBoxRenderObjClass::Get_Obj_Space_Bounding_Box -- returns the obj-space bounding box * - * OBBoxRenderObjClass::Get_Box -- returns the cached world-space box * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -168,18 +113,6 @@ static ShaderClass _BoxShader; */ -/*********************************************************************************************** - * BoxRenderObjClass::BoxRenderObjClass -- Constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ BoxRenderObjClass::BoxRenderObjClass() { memset(Name,0,sizeof(Name)); @@ -190,18 +123,7 @@ BoxRenderObjClass::BoxRenderObjClass() } -/*********************************************************************************************** - * BoxRenderObjClass::BoxRenderObjClass -- Constructor - init from a definition * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ +// Constructor - init from a definition. BoxRenderObjClass::BoxRenderObjClass(const W3dBoxStruct & def) { Set_Name(def.Name); @@ -214,36 +136,12 @@ BoxRenderObjClass::BoxRenderObjClass(const W3dBoxStruct & def) } -/*********************************************************************************************** - * BoxRenderObjClass::BoxRenderObjClass -- Copy constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ BoxRenderObjClass::BoxRenderObjClass(const BoxRenderObjClass & src) { *this = src; } -/*********************************************************************************************** - * BoxRenderObjClass::operator -- assignment operator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ BoxRenderObjClass & BoxRenderObjClass::operator = (const BoxRenderObjClass & that) { if (this != &that) { @@ -257,54 +155,18 @@ BoxRenderObjClass & BoxRenderObjClass::operator = (const BoxRenderObjClass & tha } -/*********************************************************************************************** - * BoxRenderObjClass::Get_Num_Polys -- returns number of polygons * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ int BoxRenderObjClass::Get_Num_Polys() const { return 12; } -/*********************************************************************************************** - * BoxRenderObjClass::Get_Name -- returns name * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ const char * BoxRenderObjClass::Get_Name() const { return Name; } -/*********************************************************************************************** - * BoxRenderObjClass::Set_Name -- sets the name * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ void BoxRenderObjClass::Set_Name(const char * name) { WWASSERT(name != nullptr); @@ -313,38 +175,14 @@ void BoxRenderObjClass::Set_Name(const char * name) } -/*********************************************************************************************** - * BoxRenderObjClass::Set_Color -- Sets the color of the box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ void BoxRenderObjClass::Set_Color(const Vector3 & color) { Color = color; } -/*********************************************************************************************** - * BoxRenderObjClass::Init_Box_Render_System -- global initialization needed for boxes to work * - * * - * Allocates materials which all boxes share. Initializes vertex tables, etc * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ +// Global initialization needed for boxes to work. Allocates materials which all boxes share. +// Initializes vertex tables, etc. void BoxRenderObjClass::Init() { WWASSERT(IsInitted == false); @@ -367,21 +205,8 @@ void BoxRenderObjClass::Init() } -/*********************************************************************************************** - * BoxRenderObjClass::Shutdown -- cleanup box render system * - * * - * Releases resources allocated in Init * - * NOTE: this is a static function that should only be called by the system * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ +// Cleanup box render system. Releases resources allocated in Init. +// NOTE: This is a static function that should only be called by the system. void BoxRenderObjClass::Shutdown() { WWASSERT(IsInitted == true); @@ -391,57 +216,21 @@ void BoxRenderObjClass::Shutdown() } -/*********************************************************************************************** - * BoxRenderObjClass::Set_Box_Display_Mask -- Sets global display mask for all boxes * - * * - * Boxes are debug objects and usually used for collision. This mask is 'AND'ed with each * - * box's collision type to determine whether the box should be rendered. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ +// Boxes are debug objects and usually used for collision. This mask is 'AND'ed with each box's +// collision type to determine whether the box should be rendered. void BoxRenderObjClass::Set_Box_Display_Mask(int mask) { DisplayMask = mask; } -/*********************************************************************************************** - * BoxRenderObjClass::Get_Box_Display_Mask -- returns the display mask * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ int BoxRenderObjClass::Get_Box_Display_Mask() { return DisplayMask; } -/*********************************************************************************************** - * BoxRenderObjClass::render_box -- submits the box to the GERD * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ +// Submits the box to the GERD. void BoxRenderObjClass::render_box(RenderInfoClass & rinfo,const Vector3 & center,const Vector3 & extent) { if (!IsInitted) return; @@ -517,20 +306,7 @@ void BoxRenderObjClass::render_box(RenderInfoClass & rinfo,const Vector3 & cente } -/*********************************************************************************************** - * BoxRenderObjClass::vis_render_box -- submits box to the GERD for VIS * - * * - * this renders the box with the specified VIS-ID. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ +// Submits box to the GERD for VIS. This renders the box with the specified VIS-ID. void BoxRenderObjClass::vis_render_box(SpecialRenderInfoClass & rinfo,const Vector3 & center,const Vector3 & extent) { if (!IsInitted) return; @@ -552,36 +328,13 @@ void BoxRenderObjClass::vis_render_box(SpecialRenderInfoClass & rinfo,const Vect ** AABoxRenderObjClass Implementation */ -/*********************************************************************************************** - * AABoxRenderObjClass::AABoxRenderObjClass -- constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ AABoxRenderObjClass::AABoxRenderObjClass() { update_cached_box(); } -/*********************************************************************************************** - * AABoxRenderObjClass::AABoxRenderObjClass -- Constructor - init from a definition * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ +// Constructor - init from a definition. AABoxRenderObjClass::AABoxRenderObjClass(const W3dBoxStruct & def) : BoxRenderObjClass(def) { @@ -589,36 +342,12 @@ AABoxRenderObjClass::AABoxRenderObjClass(const W3dBoxStruct & def) : } -/*********************************************************************************************** - * AABoxRenderObjClass::AABoxRenderObjClass -- copy constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ AABoxRenderObjClass::AABoxRenderObjClass(const AABoxRenderObjClass & src) { *this = src; } -/*********************************************************************************************** - * AABoxRenderObjClass::AABoxRenderObjClass -- Constructor from a wwmath aabox * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ AABoxRenderObjClass::AABoxRenderObjClass(const AABoxClass & box) { ObjSpaceCenter.Set(0,0,0); @@ -628,18 +357,6 @@ AABoxRenderObjClass::AABoxRenderObjClass(const AABoxClass & box) } -/*********************************************************************************************** - * AABoxRenderObjClass::operator -- assignment operator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ AABoxRenderObjClass & AABoxRenderObjClass::operator = (const AABoxRenderObjClass & that) { if (this != &that) { @@ -650,54 +367,18 @@ AABoxRenderObjClass & AABoxRenderObjClass::operator = (const AABoxRenderObjClass } -/*********************************************************************************************** - * AABoxRenderObjClass::Clone -- clones the box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ RenderObjClass * AABoxRenderObjClass::Clone() const { return W3DNEW AABoxRenderObjClass(*this); } -/*********************************************************************************************** - * AABoxRenderObjClass::Class_ID -- returns the class-id for AABox's * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ int AABoxRenderObjClass::Class_ID() const { return RenderObjClass::CLASSID_AABOX; } -/*********************************************************************************************** - * AABoxRenderObjClass::Render -- render this box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ void AABoxRenderObjClass::Render(RenderInfoClass & rinfo) { Matrix3D temp(1); @@ -707,18 +388,6 @@ void AABoxRenderObjClass::Render(RenderInfoClass & rinfo) } -/*********************************************************************************************** - * AABoxRenderObjClass::Special_Render -- special render this box (vis) * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ void AABoxRenderObjClass::Special_Render(SpecialRenderInfoClass & rinfo) { if (rinfo.RenderType == SpecialRenderInfoClass::RENDER_VIS) { @@ -731,18 +400,6 @@ void AABoxRenderObjClass::Special_Render(SpecialRenderInfoClass & rinfo) } -/*********************************************************************************************** - * AABoxRenderObjClass::Set_Transform -- set the transform for this box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ void AABoxRenderObjClass::Set_Transform(const Matrix3D &m) { RenderObjClass::Set_Transform(m); @@ -750,18 +407,6 @@ void AABoxRenderObjClass::Set_Transform(const Matrix3D &m) } -/*********************************************************************************************** - * AABoxRenderObjClass::Set_Position -- Set the position of this box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ void AABoxRenderObjClass::Set_Position(const Vector3 &v) { RenderObjClass::Set_Position(v); @@ -769,18 +414,7 @@ void AABoxRenderObjClass::Set_Position(const Vector3 &v) } -/*********************************************************************************************** - * AABoxRenderObjClass::update_cached_box -- update the world-space version of this box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ +// Update the world-space version of this box. void AABoxRenderObjClass::update_cached_box() { CachedBox.Center = Transform.Get_Translation() + ObjSpaceCenter; @@ -788,18 +422,6 @@ void AABoxRenderObjClass::update_cached_box() } -/*********************************************************************************************** - * AABoxRenderObjClass::Cast_Ray -- cast a ray against this box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ bool AABoxRenderObjClass::Cast_Ray(RayCollisionTestClass & raytest) { if ((Get_Collision_Type() & raytest.CollisionType) == 0) return false; @@ -814,18 +436,6 @@ bool AABoxRenderObjClass::Cast_Ray(RayCollisionTestClass & raytest) } -/*********************************************************************************************** - * AABoxRenderObjClass::Cast_AABox -- cast an AABox against this box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ bool AABoxRenderObjClass::Cast_AABox(AABoxCollisionTestClass & boxtest) { if ((Get_Collision_Type() & boxtest.CollisionType) == 0) return false; @@ -839,18 +449,6 @@ bool AABoxRenderObjClass::Cast_AABox(AABoxCollisionTestClass & boxtest) } -/*********************************************************************************************** - * AABoxRenderObjClass::Cast_OBBox -- cast an OBBox against this box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ bool AABoxRenderObjClass::Cast_OBBox(OBBoxCollisionTestClass & boxtest) { if ((Get_Collision_Type() & boxtest.CollisionType) == 0) return false; @@ -864,18 +462,6 @@ bool AABoxRenderObjClass::Cast_OBBox(OBBoxCollisionTestClass & boxtest) } -/*********************************************************************************************** - * AABoxRenderObjClass::Intersect_AABox -- intersect this box with an AABox * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ bool AABoxRenderObjClass::Intersect_AABox(AABoxIntersectionTestClass & boxtest) { if ((Get_Collision_Type() & boxtest.CollisionType) == 0) return false; @@ -883,18 +469,6 @@ bool AABoxRenderObjClass::Intersect_AABox(AABoxIntersectionTestClass & boxtest) } -/*********************************************************************************************** - * AABoxRenderObjClass::Intersect_OBBox -- Intersect this box with an OBBox * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ bool AABoxRenderObjClass::Intersect_OBBox(OBBoxIntersectionTestClass & boxtest) { if ((Get_Collision_Type() & boxtest.CollisionType) == 0) return false; @@ -902,72 +476,26 @@ bool AABoxRenderObjClass::Intersect_OBBox(OBBoxIntersectionTestClass & boxtest) } -/*********************************************************************************************** - * AABoxRenderObjClass::Get_Obj_Space_Bounding_Sphere -- return the object-space bounding sphe * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ +// Return the object-space bounding sphere. void AABoxRenderObjClass::Get_Obj_Space_Bounding_Sphere(SphereClass & sphere) const { sphere.Init(ObjSpaceCenter,ObjSpaceExtent.Length()); } -/*********************************************************************************************** - * AABoxRenderObjClass::Get_Obj_Space_Bounding_Box -- returns the obj-space bounding box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ void AABoxRenderObjClass::Get_Obj_Space_Bounding_Box(AABoxClass & box) const { box.Init(ObjSpaceCenter,ObjSpaceExtent); } -/*********************************************************************************************** - * OBBoxRenderObjClass::OBBoxRenderObjClass -- Constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ OBBoxRenderObjClass::OBBoxRenderObjClass() { update_cached_box(); } -/*********************************************************************************************** - * OBBoxRenderObjClass::OBBoxRenderObjClass -- Constructor - initiallize from a definition * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ +// Constructor - initialize from a definition. OBBoxRenderObjClass::OBBoxRenderObjClass(const W3dBoxStruct & def) : BoxRenderObjClass(def) { @@ -975,36 +503,13 @@ OBBoxRenderObjClass::OBBoxRenderObjClass(const W3dBoxStruct & def) : } -/*********************************************************************************************** - * OBBoxRenderObjClass::OBBoxRenderObjClass -- copy constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ OBBoxRenderObjClass::OBBoxRenderObjClass(const OBBoxRenderObjClass & that) { *this = that; } -/*********************************************************************************************** - * OBBoxRenderObjClass::OBBoxRenderObjClass -- constructor - initialize from a wwmath obbox * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ +// Constructor - initialize from a wwmath obbox. OBBoxRenderObjClass::OBBoxRenderObjClass(const OBBoxClass & box) { ObjSpaceCenter.Set(Vector3(0,0,0)); @@ -1014,18 +519,6 @@ OBBoxRenderObjClass::OBBoxRenderObjClass(const OBBoxClass & box) } -/*********************************************************************************************** - * OBBoxRenderObjClass::operator -- assignment operator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ OBBoxRenderObjClass & OBBoxRenderObjClass::operator = (const OBBoxRenderObjClass & that) { if (this != &that) { @@ -1036,54 +529,18 @@ OBBoxRenderObjClass & OBBoxRenderObjClass::operator = (const OBBoxRenderObjClass } -/*********************************************************************************************** - * OBBoxRenderObjClass::Clone -- clone this obbox * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ RenderObjClass * OBBoxRenderObjClass::Clone() const { return W3DNEW OBBoxRenderObjClass(*this); } -/*********************************************************************************************** - * OBBoxRenderObjClass::Class_ID -- returns the class ID of OBBoxRenderObjClass * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ int OBBoxRenderObjClass::Class_ID() const { return RenderObjClass::CLASSID_OBBOX; } -/*********************************************************************************************** - * OBBoxRenderObjClass::Render -- render this obbox * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ void OBBoxRenderObjClass::Render(RenderInfoClass & rinfo) { Renderer::Set_Transform(RenderTransform_World,Transform); @@ -1091,18 +548,6 @@ void OBBoxRenderObjClass::Render(RenderInfoClass & rinfo) } -/*********************************************************************************************** - * OBBoxRenderObjClass::Special_Render -- special render (vis) * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ void OBBoxRenderObjClass::Special_Render(SpecialRenderInfoClass & rinfo) { if (rinfo.RenderType == SpecialRenderInfoClass::RENDER_VIS) { @@ -1113,18 +558,6 @@ void OBBoxRenderObjClass::Special_Render(SpecialRenderInfoClass & rinfo) } -/*********************************************************************************************** - * OBBoxRenderObjClass::Set_Transform -- set the transform for this box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ void OBBoxRenderObjClass::Set_Transform(const Matrix3D &m) { RenderObjClass::Set_Transform(m); @@ -1132,18 +565,6 @@ void OBBoxRenderObjClass::Set_Transform(const Matrix3D &m) } -/*********************************************************************************************** - * OBBoxRenderObjClass::Set_Position -- set the position of this box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ void OBBoxRenderObjClass::Set_Position(const Vector3 &v) { RenderObjClass::Set_Position(v); @@ -1151,18 +572,7 @@ void OBBoxRenderObjClass::Set_Position(const Vector3 &v) } -/*********************************************************************************************** - * OBBoxRenderObjClass::update_cached_box -- update the cached world-space box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ +// Update the cached world-space box. void OBBoxRenderObjClass::update_cached_box() { Matrix3D::Transform_Vector(Transform,ObjSpaceCenter,&CachedBox.Center); @@ -1171,18 +581,6 @@ void OBBoxRenderObjClass::update_cached_box() } -/*********************************************************************************************** - * OBBoxRenderObjClass::Cast_Ray -- cast a ray against this box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ bool OBBoxRenderObjClass::Cast_Ray(RayCollisionTestClass & raytest) { if ((Get_Collision_Type() & raytest.CollisionType) == 0) return false; @@ -1197,18 +595,7 @@ bool OBBoxRenderObjClass::Cast_Ray(RayCollisionTestClass & raytest) } -/*********************************************************************************************** - * OBBoxRenderObjClass::Cast_AABox -- cast a swept aabox against this box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ +// Cast a swept aabox against this box. bool OBBoxRenderObjClass::Cast_AABox(AABoxCollisionTestClass & boxtest) { if ((Get_Collision_Type() & boxtest.CollisionType) == 0) return false; @@ -1222,18 +609,7 @@ bool OBBoxRenderObjClass::Cast_AABox(AABoxCollisionTestClass & boxtest) } -/*********************************************************************************************** - * OBBoxRenderObjClass::Cast_OBBox -- cast a swept obbox against this bo * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ +// Cast a swept obbox against this box. bool OBBoxRenderObjClass::Cast_OBBox(OBBoxCollisionTestClass & boxtest) { if ((Get_Collision_Type() & boxtest.CollisionType) == 0) return false; @@ -1247,18 +623,6 @@ bool OBBoxRenderObjClass::Cast_OBBox(OBBoxCollisionTestClass & boxtest) } -/*********************************************************************************************** - * OBBoxRenderObjClass::Intersect_AABox -- test this box for intersection with an AAbox * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ bool OBBoxRenderObjClass::Intersect_AABox(AABoxIntersectionTestClass & boxtest) { if ((Get_Collision_Type() & boxtest.CollisionType) == 0) return false; @@ -1266,18 +630,6 @@ bool OBBoxRenderObjClass::Intersect_AABox(AABoxIntersectionTestClass & boxtest) } -/*********************************************************************************************** - * OBBoxRenderObjClass::Intersect_OBBox -- test this box for intersection with an OBBox * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ bool OBBoxRenderObjClass::Intersect_OBBox(OBBoxIntersectionTestClass & boxtest) { if ((Get_Collision_Type() & boxtest.CollisionType) == 0) return false; @@ -1285,54 +637,19 @@ bool OBBoxRenderObjClass::Intersect_OBBox(OBBoxIntersectionTestClass & boxtest) } -/*********************************************************************************************** - * OBBoxRenderObjClass::Get_Obj_Space_Bounding_Sphere -- return the obj-space bounding sphere * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ void OBBoxRenderObjClass::Get_Obj_Space_Bounding_Sphere(SphereClass & sphere) const { sphere.Init(ObjSpaceCenter,ObjSpaceExtent.Length()); } -/*********************************************************************************************** - * OBBoxRenderObjClass::Get_Obj_Space_Bounding_Box -- returns the obj-space bounding box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ void OBBoxRenderObjClass::Get_Obj_Space_Bounding_Box(AABoxClass & box) const { box.Init(ObjSpaceCenter,ObjSpaceExtent); } -/*********************************************************************************************** - * OBBoxRenderObjClass::Get_Box -- returns the cached world-space box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ +// Returns the cached world-space box. OBBoxClass & OBBoxRenderObjClass::Get_Box() { Validate_Transform(); diff --git a/Core/Libraries/Source/WWVegas/WW3D2/boxrobj.h b/Core/Libraries/Source/WWVegas/WW3D2/boxrobj.h index e7a5bdc6692..2b062b04cd8 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/boxrobj.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/boxrobj.h @@ -30,8 +30,6 @@ * * * $Revision:: 6 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/collect.cpp b/Core/Libraries/Source/WWVegas/WW3D2/collect.cpp index de9f20afc2b..55758ff16d9 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/collect.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/collect.cpp @@ -30,44 +30,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * CollectionClass::CollectionClass -- default constructor for collection render object * - * CollectionClass::CollectionClass -- constructor for collection render object * - * CollectionClass::CollectionClass -- copy constructor * - * CollectionClass::CollectionClass -- assignment operator * - * CollectionClass::~CollectionClass -- destructor * - * CollectionClass::Clone -- virtual copy constructor * - * CollectionClass::Free -- releases all assets in use by this collection * - * CollectionClass::Class_ID -- returns class id for collection render objects * - * CollectionClass::Get_Num_Polys -- returns the number of polygons in this collection * - * CollectionClass::Render -- render this collection * - * CollectionClass::Special_Render -- passes the special render call to all sub-objects * - * CollectionClass::Set_Transform -- set the transform for this collection * - * CollectionClass::Set_Position -- set the position for this collection * - * CollectionClass::Get_Num_Sub_Objects -- returns the number of sub objects * - * CollectionClass::Get_Sub_Object -- returns a pointer to the desired sub object * - * CollectionClass::Add_Sub_Object -- adds another object into this collection * - * CollectionClass::Remove_Sub_Object -- removes a sub object from this collection * - * CollectionClass::Cast_Ray -- passes the ray test to each sub object * - * CollectionClass::Cast_AABox -- passes the axis-aligned box test to each sub object * - * CollectionClass::Cast_OBBox -- passes the oriented box test to each sub object * - * CollectionClass::Intersect_AABox -- test for intersection with an AABox * - * CollectionClass::Intersect_OBBox -- test for intersection with an OBBox * - * CollectionClass::Get_Obj_Space_Bounding_Sphere -- returns the object space bounding spher * - * CollectionClass::Get_Obj_Space_Bounding_Box -- returns the object-space bounding box * - * CollectionClass::Snap_Point_Count -- returns the number of snap points in this collecion * - * CollectionClass::Get_Snap_Point -- return the desired snap point * - * CollectionClass::Scale -- scale the objects in this collection * - * CollectionClass::Scale -- scale the objects in this collection * - * CollectionClass::Update_Obj_Space_Bounding_Volumes -- recomputes the object space boundin * - * CollectionClass::Update_Sub_Object_Transforms -- recomputes all sub object transforms * - * CollectionLoaderClass::Load -- reads a collection from a w3d file * - * CollectionDefClass::CollectionDefClass -- constructor * - * CollectionDefClass::~CollectionDefClass -- destructor for collection definition * - * CollectionDefClass::Free -- releases assets in use by a collection definition * - * CollectionDefClass::Get_Name -- returns name of the collection * - * CollectionDefClass::Load -- loads a collection definition from a w3d file * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -135,18 +97,6 @@ class CollectionPrototypeClass : public PrototypeClass }; -/*********************************************************************************************** - * CollectionClass::CollectionClass -- default constructor for collection render object * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 23/8/00 GTH : Created. * - *=============================================================================================*/ CollectionClass::CollectionClass() : SnapPoints(nullptr) { @@ -154,18 +104,6 @@ CollectionClass::CollectionClass() : } -/*********************************************************************************************** - * CollectionClass::CollectionClass -- constructor for collection render object * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/8/98 GTH : Created. * - *=============================================================================================*/ CollectionClass::CollectionClass(const CollectionDefClass & def) : SubObjects(def.ObjectNames.Count()), SnapPoints(nullptr) @@ -196,18 +134,6 @@ CollectionClass::CollectionClass(const CollectionDefClass & def) : } -/*********************************************************************************************** - * CollectionClass::CollectionClass -- copy constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/8/98 GTH : Created. * - *=============================================================================================*/ CollectionClass::CollectionClass(const CollectionClass & src) : CompositeRenderObjClass(src), SubObjects(src.SubObjects.Count()), @@ -217,18 +143,6 @@ CollectionClass::CollectionClass(const CollectionClass & src) : } -/*********************************************************************************************** - * CollectionClass::CollectionClass -- assignment operator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/8/98 GTH : Created. * - *=============================================================================================*/ CollectionClass & CollectionClass::operator = (const CollectionClass & that) { if (this != &that) { @@ -255,54 +169,20 @@ CollectionClass & CollectionClass::operator = (const CollectionClass & that) } -/*********************************************************************************************** - * CollectionClass::~CollectionClass -- destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/8/98 GTH : Created. * - *=============================================================================================*/ CollectionClass::~CollectionClass() { Free(); } -/*********************************************************************************************** - * CollectionClass::Clone -- virtual copy constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/8/98 GTH : Created. * - *=============================================================================================*/ +// Virtual copy constructor. RenderObjClass * CollectionClass::Clone() const { return NEW_REF( CollectionClass, (*this)); } -/*********************************************************************************************** - * CollectionClass::Free -- releases all assets in use by this collection * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/8/98 GTH : Created. * - *=============================================================================================*/ +// Releases all assets in use by this collection. void CollectionClass::Free() { for (int i=0; i -/*********************************************************************************************** - * CompositeRenderObjClass::CompositeRenderObjClass -- Constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *=============================================================================================*/ CompositeRenderObjClass::CompositeRenderObjClass() { } -/*********************************************************************************************** - * CompositeRenderObjClass::CompositeRenderObjClass -- copy constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ CompositeRenderObjClass::CompositeRenderObjClass(const CompositeRenderObjClass & that) { Set_Name(that.Get_Name()); @@ -95,35 +50,11 @@ CompositeRenderObjClass::CompositeRenderObjClass(const CompositeRenderObjClass & } -/*********************************************************************************************** - * CompositeRenderObjClass::~CompositeRenderObjClass -- Destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ CompositeRenderObjClass::~CompositeRenderObjClass() { } -/*********************************************************************************************** - * CompositeRenderObjClass::operator -- assignment operator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ CompositeRenderObjClass & CompositeRenderObjClass::operator = (const CompositeRenderObjClass & that) { Set_Name(that.Get_Name()); @@ -132,18 +63,7 @@ CompositeRenderObjClass & CompositeRenderObjClass::operator = (const CompositeRe } -/*********************************************************************************************** - * CompositeRenderObjClass::Restart -- Recursively call Restart on all sub-objects * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/30/2001 gth : Created. * - *=============================================================================================*/ +// Recursively call Restart on all sub-objects. void CompositeRenderObjClass::Restart() { for (int ni = 0; ni < Get_Num_Sub_Objects(); ni++) { @@ -154,56 +74,19 @@ void CompositeRenderObjClass::Restart() } } -/*********************************************************************************************** - * CompositeRenderObjClass::Get_Name -- returns the name of this render object * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ const char * CompositeRenderObjClass::Get_Name() const { return Name; } -/*********************************************************************************************** - * CompositeRenderObjClass::Set_Name -- sets the name of this render object * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ void CompositeRenderObjClass::Set_Name(const char * name) { Name=name; } -/*********************************************************************************************** - * CompositeRenderObjClass::Set_Base_Model_Name -- sets the "base-model-name" * - * * - * The base-model-name was needed by the aggregate code. Ask Patrick Smith about it :-) * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// The base-model-name was needed by the aggregate code. Ask Patrick Smith about it :-). void CompositeRenderObjClass::Set_Base_Model_Name(const char *name) { // null is a legal value for BaseModelName. Unfortunately, @@ -217,18 +100,6 @@ void CompositeRenderObjClass::Set_Base_Model_Name(const char *name) } -/*********************************************************************************************** - * CompositeRenderObjClass::Get_Num_Polys -- returns the number of polys * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ int CompositeRenderObjClass::Get_Num_Polys() const { int count = 0; @@ -242,18 +113,7 @@ int CompositeRenderObjClass::Get_Num_Polys() const } -/*********************************************************************************************** - * CompositeRenderObjClass::Notify_Added -- notify all sub-objects that they were added * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Notify all sub-objects that they were added. void CompositeRenderObjClass::Notify_Added(SceneClass * scene) { RenderObjClass::Notify_Added(scene); @@ -266,18 +126,7 @@ void CompositeRenderObjClass::Notify_Added(SceneClass * scene) } -/*********************************************************************************************** - * CompositeRenderObjClass::Notify_Removed -- notifies all subobjs they were removed from the * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Notifies all subobjs they were removed from the scene. void CompositeRenderObjClass::Notify_Removed(SceneClass * scene) { for (int ni = 0; ni < Get_Num_Sub_Objects(); ni++) { @@ -290,18 +139,6 @@ void CompositeRenderObjClass::Notify_Removed(SceneClass * scene) } -/*********************************************************************************************** - * CompositeRenderObjClass::Cast_Ray -- cast a ray against this object * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ bool CompositeRenderObjClass::Cast_Ray(RayCollisionTestClass & raytest) { bool res = false; @@ -315,18 +152,7 @@ bool CompositeRenderObjClass::Cast_Ray(RayCollisionTestClass & raytest) } -/*********************************************************************************************** - * CompositeRenderObjClass::Cast_AABox -- cast a swept AABox against this object * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Cast a swept AABox against this object. bool CompositeRenderObjClass::Cast_AABox(AABoxCollisionTestClass & boxtest) { bool res = false; @@ -340,18 +166,7 @@ bool CompositeRenderObjClass::Cast_AABox(AABoxCollisionTestClass & boxtest) } -/*********************************************************************************************** - * CompositeRenderObjClass::Cast_OBBox -- cast a swept OBBox against this object * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Cast a swept OBBox against this object. bool CompositeRenderObjClass::Cast_OBBox(OBBoxCollisionTestClass & boxtest) { bool res = false; @@ -365,18 +180,6 @@ bool CompositeRenderObjClass::Cast_OBBox(OBBoxCollisionTestClass & boxtest) } -/*********************************************************************************************** - * CompositeRenderObjClass::Intersect_AABox -- intersect this object with an AABox * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ bool CompositeRenderObjClass::Intersect_AABox(AABoxIntersectionTestClass & boxtest) { bool res = false; @@ -390,18 +193,6 @@ bool CompositeRenderObjClass::Intersect_AABox(AABoxIntersectionTestClass & boxte } -/*********************************************************************************************** - * CompositeRenderObjClass::Intersect_OBBox -- intersect this object with an OBBox * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ bool CompositeRenderObjClass::Intersect_OBBox(OBBoxIntersectionTestClass & boxtest) { bool res = false; @@ -415,18 +206,6 @@ bool CompositeRenderObjClass::Intersect_OBBox(OBBoxIntersectionTestClass & boxte } -/*********************************************************************************************** - * CompositeRenderObjClass::Create_Decal -- create a decal on this object * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ void CompositeRenderObjClass::Create_Decal(DecalGeneratorClass * generator) { for (int i=0; iUpdate_Obj_Space_Bounding_Volumes(); } -/*********************************************************************************************** - * CompositeRenderObjClass::Set_User_Data -- set the userdata * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ void CompositeRenderObjClass::Set_User_Data(void *value, bool recursive) { RenderObjClass::Set_User_Data(value); diff --git a/Core/Libraries/Source/WWVegas/WW3D2/composite.h b/Core/Libraries/Source/WWVegas/WW3D2/composite.h index 66762ddde81..7eb7e7309e9 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/composite.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/composite.h @@ -30,8 +30,6 @@ * * * $Revision:: 5 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/decalsys.cpp b/Core/Libraries/Source/WWVegas/WW3D2/decalsys.cpp index ff6e93eb84d..cf9d5c6ee04 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/decalsys.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/decalsys.cpp @@ -33,18 +33,6 @@ * $Revision:: 8 $* * * * 06/26/02 KM Matrix name change to avoid MAX conflicts * - *---------------------------------------------------------------------------------------------* - * Functions: * - * DecalSystemClass::DecalSystemClass -- Constructor * - * DecalSystemClass::~DecalSystemClass -- Destructor * - * DecalSystemClass::Lock_Decal_Generator -- returns a DecalGenerator * - * DecalSystemClass::Unlock_Decal_Generator -- Destroys the decal generator * - * DecalSystemClass::Generate_Unique_Global_Decal_Id -- Generates a unique id for a decal * - * DecalGeneratorClass::DecalGeneratorClass -- Constructor * - * DecalGeneratorClass::~DecalGeneratorClass -- Destructor * - * DecalGeneratorClass::Add_Mesh -- Meshes that generate a decal should add themselves * - * DecalGeneratorClass::Get_Mesh_List -- returns the list of meshes * - * DecalGeneratorClass::Set_Mesh_Transform -- sets the current mesh coordinate system * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "decalsys.h" @@ -62,50 +50,16 @@ uint32 DecalSystemClass::DecalIDGenerator = 0; ** DecalSystemClass Implementation */ -/*********************************************************************************************** - * DecalSystemClass::DecalSystemClass -- Constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *=============================================================================================*/ DecalSystemClass::DecalSystemClass() { } -/*********************************************************************************************** - * DecalSystemClass::~DecalSystemClass -- Destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *=============================================================================================*/ DecalSystemClass::~DecalSystemClass() { } -/*********************************************************************************************** - * DecalSystemClass::Lock_Decal_Generator -- returns a DecalGenerator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ DecalGeneratorClass * DecalSystemClass::Lock_Decal_Generator() { DecalGeneratorClass * gen = W3DNEW DecalGeneratorClass(Generate_Decal_Id(), this); @@ -113,40 +67,15 @@ DecalGeneratorClass * DecalSystemClass::Lock_Decal_Generator() } -/*********************************************************************************************** - * DecalSystemClass::Unlock_Decal_Generator -- Destroys the decal generator * - * * - * Derived classes may take a record of the results of the generator here. Then they can * - * put a cap on the total number of decals in the system or whatever... * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Derived classes may take a record of the results of the generator here. Then they can put a cap +// on the total number of decals in the system or whatever... void DecalSystemClass::Unlock_Decal_Generator(DecalGeneratorClass * generator) { delete generator; } -/*********************************************************************************************** - * DecalSystemClass::Generate_Unique_Global_Decal_Id -- Generates a unique id for a decal * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * Hopefully you won't use more than 4 billion decals at one time... * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// WARNING: Hopefully you won't use more than 4 billion decals at one time... uint32 DecalSystemClass::Generate_Unique_Global_Decal_Id() { return DecalIDGenerator++; @@ -157,18 +86,6 @@ uint32 DecalSystemClass::Generate_Unique_Global_Decal_Id() ** DecalGeneratorClass Implementation */ -/*********************************************************************************************** - * DecalGeneratorClass::DecalGeneratorClass -- Constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ DecalGeneratorClass::DecalGeneratorClass(uint32 id,DecalSystemClass * system) : DecalID(id), System(system), @@ -183,39 +100,14 @@ DecalGeneratorClass::DecalGeneratorClass(uint32 id,DecalSystemClass * system) : } -/*********************************************************************************************** - * DecalGeneratorClass::~DecalGeneratorClass -- Destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ DecalGeneratorClass::~DecalGeneratorClass() { REF_PTR_RELEASE(Material); } -/*********************************************************************************************** - * DecalGeneratorClass::Add_Mesh -- Meshes that generate a decal should add themselves * - * * - * This adds a mesh to the internal list. All meshes that actually add a decal should add * - * themselves to this list so that the DecalSystem can keep track of them. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// All meshes that actually add a decal should add themselves to this list so that the DecalSystem +// can keep track of them. void DecalGeneratorClass::Add_Mesh(RenderObjClass * mesh) { WWASSERT(mesh->Class_ID() == RenderObjClass::CLASSID_MESH); @@ -223,41 +115,15 @@ void DecalGeneratorClass::Add_Mesh(RenderObjClass * mesh) } -/*********************************************************************************************** - * DecalGeneratorClass::Get_Mesh_List -- returns the list of meshes * - * * - * This is the list of meshes which generated decals for this "logical decal" * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// This is the list of meshes which generated decals for this "logical decal". NonRefRenderObjListClass & DecalGeneratorClass::Get_Mesh_List() { return MeshList; } -/*********************************************************************************************** - * DecalGeneratorClass::Set_Mesh_Transform -- sets the current mesh coordinate system * - * * - * The coordinate system of the mesh is needed in order to compute texture coordinates for * - * the decal polygons. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Sets the current mesh coordinate system. The coordinate system of the mesh is needed in order to +// compute texture coordinates for the decal polygons. void DecalGeneratorClass::Set_Mesh_Transform(const Matrix3D & mesh_transform) { /* diff --git a/Core/Libraries/Source/WWVegas/WW3D2/decalsys.h b/Core/Libraries/Source/WWVegas/WW3D2/decalsys.h index 4042aad9d9b..4b5c6de22e7 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/decalsys.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/decalsys.h @@ -32,8 +32,6 @@ * * * $Revision:: 6 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/distlod.cpp b/Core/Libraries/Source/WWVegas/WW3D2/distlod.cpp index c2db8f3d1f6..af1a0c1c294 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/distlod.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/distlod.cpp @@ -30,50 +30,6 @@ * * * $Revision:: 3 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * DistLODDefClass -- default constructor for DistLODDefClass * - * DistLODDefClass::DistLODDefClass -- manual constructor for DistLODDefClass * - * DistLODDefClass::~DistLODDefClass -- destructor for DistLODDefClass * - * DistLODDefClass::Free -- releases all memory in use by this object * - * DistLODDefClass::Load -- initialize this object from a W3D file * - * DistLODDefClass::read_header -- read the header from a W3D file * - * DistLODDefClass::read_node -- read a model node description from a W3D file * - * DistLODClass::DistLODClass -- constructor * - * DistLODClass::DistLODClass -- copy constructor * - * DistLODClass::~DistLODClass -- destructor * - * DistLODClass::Free -- releases memory in use * - * DistLODClass::Get_Name -- returns the name of this LOD object * - * DistLODClass::Get_Num_Polys -- returns the number of polys in this model * - * DistLODClass::Render -- Render this LOD. * - * DistLODClass::Special_Render -- custom render function * - * DistLODCLass::Get_Num_Sub_Objects -- returns the number of subobjects (levels of detail) * - * DistLODClass::Get_Sub_Object -- returns pointer to the specified sub-object (LOD) * - * DistLODCLass::Set_Transform -- sets the transform for this model * - * DistLODClass::Set_Position -- set the position of this object * - * DistLODClass::Set_Animation -- set the animation state of this model * - * DistLODClass::Set_Animation -- set the animation state of this model * - * DistLODClass::Set_Animation -- set the animation state to a blend of two anims * - * DistLODClass::Set_Animation -- set the animation state to a combination of anims * - * DistLODClass::Get_Num_Bones -- returns the number of bones * - * DistLODClass::Get_Bone_Name -- returns the name of the specified bone * - * DistLODClass::Get_Bone_Index -- returns the index of the given bone (if found) * - * DistLODClass::Get_Bone_Transform -- returns the transform of the given bone * - * DistLODClass::Get_Bone_Transform -- returns the transform of the given bone * - * DistLODClass::Capture_Bone -- take control of a bone * - * DistLODClass::Release_Bone -- release control of a bone * - * DistLODClass::Is_Bone_Captured -- check whether the given bone is captured * - * DistLODClass::Control_Bone -- set the transform for a captured bone * - * DistLODClass::Cast_Ray -- cast a ray against this model * - * DistLODClass::Cast_AABox -- perform an AABox cast against this model * - * DistLODClass::Cast_OBBox -- perform an OBBox cast against this model * - * DistLODCLass::Get_Num_Snap_Points -- returns number of snap points in this model * - * DistLODClass::Get_Snap_Point -- returns the i'th snap point * - * DistLODCLass::Scale -- scale this model; passes on to each LOD * - * DistLODClass::Scale -- scale this model; passes on to each LOD * - * DistLODClass::Update_LOD -- adjusts the current LOD based on the distance * - * DistLODClass::Increment_Lod -- moves to a higher detail LOD * - * DistLODClass::Decrement_Lod -- moves to a lower detail LOD * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -155,19 +111,7 @@ PrototypeClass *DistLODLoaderClass::Load_W3D( ChunkLoadClass &cload ) } -/*********************************************************************************************** - * DistLODDefClass -- default constructor for DistLODDefClass * - * * - * DistLODDefClass is a "blueprint" for constructing a DistLODClass * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *=============================================================================================*/ +// DistLODDefClass is a "blueprint" for constructing a DistLODClass. DistLODDefClass::DistLODDefClass() : Name(nullptr), LodCount(0), @@ -176,22 +120,10 @@ DistLODDefClass::DistLODDefClass() : } -/*********************************************************************************************** - * DistLODDefClass::DistLODDefClass -- manual constructor for DistLODDefClass * - * * - * This constructor allows you to create a DistLODDef Manually (and then use it to create * - * the desired DistLODClass). The array of DistLODModelDefStructs which you pass in will * - * only be read from so you are responsible for the memory used by them. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/15/98 GTH : Created. * - *=============================================================================================*/ +// Manual constructor for DistLODDefClass. This constructor allows you to create a DistLODDef +// manually (and then use it to create the desired DistLODClass). The array of +// DistLODModelDefStructs which you pass in will only be read from so you are responsible for the +// memory used by them. DistLODDefClass::DistLODDefClass(const char * name,int lodcount,DistLODNodeDefStruct * modeldefs) : Name(nullptr), LodCount(0), @@ -210,36 +142,13 @@ DistLODDefClass::DistLODDefClass(const char * name,int lodcount,DistLODNodeDefSt } -/*********************************************************************************************** - * DistLODDefClass::~DistLODDefClass -- destructor for DistLODDefClass * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/15/98 GTH : Created. * - *=============================================================================================*/ DistLODDefClass::~DistLODDefClass() { Free(); } -/*********************************************************************************************** - * DistLODDefClass::Free -- releases all memory in use by this object * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/15/98 GTH : Created. * - *=============================================================================================*/ +// Releases all memory in use by this object. void DistLODDefClass::Free() { delete[] Name; @@ -256,18 +165,7 @@ void DistLODDefClass::Free() } -/*********************************************************************************************** - * DistLODDefClass::Load -- initialize this object from a W3D file * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/15/98 GTH : Created. * - *=============================================================================================*/ +// Initialize this object from a W3D file. WW3DErrorType DistLODDefClass::Load_W3D(ChunkLoadClass & cload) { /* @@ -315,18 +213,6 @@ WW3DErrorType DistLODDefClass::Load_W3D(ChunkLoadClass & cload) } -/*********************************************************************************************** - * DistLODDefClass::read_header -- read the header from a W3D file * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/15/98 GTH : Created. * - *=============================================================================================*/ bool DistLODDefClass::read_header(ChunkLoadClass & cload) { /* @@ -354,36 +240,13 @@ bool DistLODDefClass::read_header(ChunkLoadClass & cload) } -/*********************************************************************************************** - * DistLODDefClass::read_node -- read a model node description from a W3D file * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/15/98 GTH : Created. * - *=============================================================================================*/ +// Read a model node description from a W3D file. bool DistLODDefClass::read_node(ChunkLoadClass & cload,DistLODNodeDefStruct * node) { return true; } -/*********************************************************************************************** - * DistLODClass::DistLODClass -- constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/3/99 GTH : Created. * - *=============================================================================================*/ DistLODClass::DistLODClass(const DistLODDefClass & def) { Set_Name(def.Get_Name()); @@ -407,18 +270,6 @@ DistLODClass::DistLODClass(const DistLODDefClass & def) } -/*********************************************************************************************** - * DistLODClass::DistLODClass -- copy constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/3/99 GTH : Created. * - *=============================================================================================*/ DistLODClass::DistLODClass(const DistLODClass & that) : CompositeRenderObjClass( that ) { @@ -440,36 +291,13 @@ DistLODClass::DistLODClass(const DistLODClass & that) : } -/*********************************************************************************************** - * DistLODClass::~DistLODClass -- destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/3/99 GTH : Created. * - *=============================================================================================*/ DistLODClass::~DistLODClass() { Free(); } -/*********************************************************************************************** - * DistLODClass::Free -- releases memory in use * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/3/99 GTH : Created. * - *=============================================================================================*/ +// Releases memory in use. void DistLODClass::Free() { if (Lods != nullptr) { @@ -488,37 +316,13 @@ void DistLODClass::Free() } -/*********************************************************************************************** - * DistLODClass::Get_Num_Polys -- returns the number of polys in this model * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * returns the number of polys in the *current* lod. * - * * - * HISTORY: * - * 3/3/99 GTH : Created. * - *=============================================================================================*/ +// WARNING: Returns the number of polys in the *current* lod. int DistLODClass::Get_Num_Polys() const { return Lods[CurLod].Model->Get_Num_Polys(); } -/*********************************************************************************************** - * DistLODClass::Render -- Render this LOD. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/3/99 GTH : Created. * - *=============================================================================================*/ void DistLODClass::Render(RenderInfoClass & rinfo) { if (Is_Not_Hidden_At_All() == false) { @@ -530,18 +334,6 @@ void DistLODClass::Render(RenderInfoClass & rinfo) } -/*********************************************************************************************** - * DistLODClass::Special_Render -- custom render function * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/3/99 GTH : Created. * - *=============================================================================================*/ void DistLODClass::Special_Render(SpecialRenderInfoClass & rinfo) { Update_Lod(rinfo.Camera); @@ -549,36 +341,13 @@ void DistLODClass::Special_Render(SpecialRenderInfoClass & rinfo) } -/*********************************************************************************************** - * DistLODCLass::Get_Num_Sub_Objects -- returns the number of subobjects (levels of detail) * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/1/99 GTH : Created. * - *=============================================================================================*/ +// Returns the number of subobjects (levels of detail). int DistLODClass::Get_Num_Sub_Objects() const { return LodCount; } -/*********************************************************************************************** - * DistLODClass::Get_Sub_Object -- returns pointer to the specified sub-object (LOD) * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/1/99 GTH : Created. * - *=============================================================================================*/ RenderObjClass * DistLODClass::Get_Sub_Object(int index) const { assert(index >= 0); @@ -608,20 +377,7 @@ int DistLODClass::Add_Sub_Object_To_Bone(RenderObjClass * subobj,int bone_index) } -/*********************************************************************************************** - * DistLODCLass::Set_Transform -- sets the transform for this model * - * * - * sets the transform in all LODs. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/3/99 GTH : Created. * - *=============================================================================================*/ +// Sets the transform in all LODs. void DistLODClass::Set_Transform(const Matrix3D &m) { RenderObjClass::Set_Transform(m); @@ -632,20 +388,7 @@ void DistLODClass::Set_Transform(const Matrix3D &m) } -/*********************************************************************************************** - * DistLODClass::Set_Position -- set the position of this object * - * * - * sets the position of all lods * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/3/99 GTH : Created. * - *=============================================================================================*/ +// Sets the position of all lods. void DistLODClass::Set_Position(const Vector3 &v) { RenderObjClass::Set_Position(v); @@ -656,18 +399,7 @@ void DistLODClass::Set_Position(const Vector3 &v) } -/*********************************************************************************************** - * DistLODClass::Set_Animation -- set the animation state of this model * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/3/99 GTH : Created. * - *=============================================================================================*/ +// Set the animation state of this model. void DistLODClass::Set_Animation() { for (int i=0; iPeek_Animation(); } -/*********************************************************************************************** - * DistLODClass::Get_Num_Bones -- returns the number of bones * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/3/99 GTH : Created. * - *=============================================================================================*/ int DistLODClass::Get_Num_Bones() { return Lods[0].Model->Get_Num_Bones(); } -/*********************************************************************************************** - * DistLODClass::Get_Bone_Name -- returns the name of the specified bone * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/3/99 GTH : Created. * - *=============================================================================================*/ const char * DistLODClass::Get_Bone_Name(int bone_index) { return Lods[0].Model->Get_Bone_Name(bone_index); } -/*********************************************************************************************** - * DistLODClass::Get_Bone_Index -- returns the index of the given bone (if found) * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/3/99 GTH : Created. * - *=============================================================================================*/ int DistLODClass::Get_Bone_Index(const char * bonename) { // Highest LOD is used since lowest may be a Null3DObjClass. @@ -813,18 +464,6 @@ int DistLODClass::Get_Bone_Index(const char * bonename) } -/*********************************************************************************************** - * DistLODClass::Get_Bone_Transform -- returns the transform of the given bone * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/3/99 GTH : Created. * - *=============================================================================================*/ const Matrix3D & DistLODClass::Get_Bone_Transform(const char * bonename) { // Highest LOD is used since lowest may be a Null3DObjClass. @@ -832,18 +471,6 @@ const Matrix3D & DistLODClass::Get_Bone_Transform(const char * bonename) } -/*********************************************************************************************** - * DistLODClass::Get_Bone_Transform -- returns the transform of the given bone * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/3/99 GTH : Created. * - *=============================================================================================*/ const Matrix3D & DistLODClass::Get_Bone_Transform(int boneindex) { // Highest LOD is used since lowest may be a Null3DObjClass. @@ -851,18 +478,7 @@ const Matrix3D & DistLODClass::Get_Bone_Transform(int boneindex) } -/*********************************************************************************************** - * DistLODClass::Capture_Bone -- take control of a bone * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/3/99 GTH : Created. * - *=============================================================================================*/ +// Take control of a bone. void DistLODClass::Capture_Bone(int bindex) { for (int i=0; iGet_Num_Snap_Points(); } -/*********************************************************************************************** - * DistLODClass::Get_Snap_Point -- returns the i'th snap point * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/1/99 GTH : Created. * - *=============================================================================================*/ void DistLODClass::Get_Snap_Point(int index,Vector3 * set) { Lods[0].Model->Get_Snap_Point(index,set); } -/*********************************************************************************************** - * DistLODCLass::Scale -- scale this model; passes on to each LOD * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/1/99 GTH : Created. * - *=============================================================================================*/ +// Scale this model; passes on to each LOD. void DistLODClass::Scale(float scale) { for (int i=0; iGet_Pivot(); @@ -485,18 +376,6 @@ void HCompressedAnimClass::add_channel(AdaptiveDeltaMotionChannelClass * newchan -/*********************************************************************************************** - * HCompressedAnimClass::read_bit_channel -- read a bit channel from the file * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/98 GTH : Created. * - *=============================================================================================*/ bool HCompressedAnimClass::read_bit_channel(ChunkLoadClass & cload,TimeCodedBitChannelClass * * newchan) { TimeCodedBitChannelClass* channel = W3DNEW TimeCodedBitChannelClass; @@ -513,18 +392,6 @@ bool HCompressedAnimClass::read_bit_channel(ChunkLoadClass & cload,TimeCodedBitC } -/*********************************************************************************************** - * HCompressedAnimClass::add_bit_channel -- install a bit channel into the animation * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/98 GTH : Created. * - *=============================================================================================*/ void HCompressedAnimClass::add_bit_channel(TimeCodedBitChannelClass * newchan) { int idx = newchan->Get_Pivot(); @@ -537,18 +404,7 @@ void HCompressedAnimClass::add_bit_channel(TimeCodedBitChannelClass * newchan) } } -/*********************************************************************************************** - * HCompressedAnimClass::Get_Translation -- returns the translation vector for the given frame * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ +// Returns the translation vector for the given frame. void HCompressedAnimClass::Get_Translation( Vector3& trans, int pividx, float frame ) const { struct NodeCompressedMotionStruct * motion = &NodeMotion[pividx]; @@ -572,18 +428,7 @@ void HCompressedAnimClass::Get_Translation( Vector3& trans, int pividx, float fr } } -/*********************************************************************************************** - * HCompressedAnimClass::Get_Orientation -- returns a quaternion for the orientation of the * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ +// Returns a quaternion for the orientation of the pivot at the given frame. void HCompressedAnimClass::Get_Orientation(Quaternion& q, int pividx,float frame) const { switch(Flavor) { @@ -601,18 +446,7 @@ void HCompressedAnimClass::Get_Orientation(Quaternion& q, int pividx,float frame } } -/*********************************************************************************************** - * HCompressedAnimClass::Get_Transform -- returns the transform matrix for the given frame * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ +// Returns the transform matrix for the given frame. void HCompressedAnimClass::Get_Transform( Matrix3D& mtx, int pividx, float frame ) const { struct NodeCompressedMotionStruct * motion = &NodeMotion[pividx]; @@ -647,18 +481,7 @@ void HCompressedAnimClass::Get_Transform( Matrix3D& mtx, int pividx, float frame } } -/*********************************************************************************************** - * HCompressedAnimClass::Get_Visibility -- return visibility state for given pivot/frame * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/98 GTH : Created. * - *=============================================================================================*/ +// Return visibility state for given pivot/frame. bool HCompressedAnimClass::Get_Visibility(int pividx,float frame) { @@ -673,18 +496,7 @@ bool HCompressedAnimClass::Get_Visibility(int pividx,float frame) -/*********************************************************************************************** - * HAnimClass::Is_Node_Motion_Present -- return true if there is motion defined for this frame * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/23/99 EHC : Created. * - *=============================================================================================*/ +// Return true if there is motion defined for this frame. bool HCompressedAnimClass::Is_Node_Motion_Present(int pividx) { WWASSERT((pividx >= 0) && (pividx < NumNodes)); diff --git a/Core/Libraries/Source/WWVegas/WW3D2/hcanim.h b/Core/Libraries/Source/WWVegas/WW3D2/hcanim.h index b7c85029c57..73e1ae9d2eb 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/hcanim.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/hcanim.h @@ -31,8 +31,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/hmdldef.cpp b/Core/Libraries/Source/WWVegas/WW3D2/hmdldef.cpp index 954d3e72bd5..544f15a9152 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/hmdldef.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/hmdldef.cpp @@ -30,9 +30,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * HModelDefClass::HModelDefClass -- Constructor * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -43,18 +40,6 @@ #include "snapPts.h" -/*********************************************************************************************** - * HModelDefClass::HModelDefClass -- Constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/15/97 GTH : Created. * - *=============================================================================================*/ HModelDefClass::HModelDefClass() : SubObjectCount(0), SubObjects(nullptr), @@ -63,35 +48,12 @@ HModelDefClass::HModelDefClass() : } -/*********************************************************************************************** - * HModelDefClass::~HModelDefClass -- destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ HModelDefClass::~HModelDefClass() { Free(); } -/*********************************************************************************************** - * HModelDefClass::Free -- de-allocate all memory in use * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ +// De-allocate all memory in use. void HModelDefClass::Free() { delete[] SubObjects; @@ -105,18 +67,7 @@ void HModelDefClass::Free() } -/*********************************************************************************************** - * HModelDefClass::Load -- load a set of mesh connections from a file * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ +// Load a set of mesh connections from a file. int HModelDefClass::Load_W3D(ChunkLoadClass & cload) { bool pre30 = false; @@ -214,19 +165,7 @@ int HModelDefClass::Load_W3D(ChunkLoadClass & cload) } -/*********************************************************************************************** - * HModelDefClass::read_connection -- read a single connection from the file * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - * 10/22/97 GH : Check for mesh connections with PivotID=-1 * - *=============================================================================================*/ +// Read a single connection from the file. Mesh connections with PivotID=-1 are checked for. bool HModelDefClass::read_connection(ChunkLoadClass & cload,HmdlNodeDefStruct * node,bool pre30) { diff --git a/Core/Libraries/Source/WWVegas/WW3D2/hmdldef.h b/Core/Libraries/Source/WWVegas/WW3D2/hmdldef.h index 47570b209fe..23c05be0b8e 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/hmdldef.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/hmdldef.h @@ -30,8 +30,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/hmorphanim.cpp b/Core/Libraries/Source/WWVegas/WW3D2/hmorphanim.cpp index d1e346c51ec..7014fd0558f 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/hmorphanim.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/hmorphanim.cpp @@ -32,8 +32,6 @@ * * * $Revision:: 7 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "hmorphanim.h" diff --git a/Core/Libraries/Source/WWVegas/WW3D2/hmorphanim.h b/Core/Libraries/Source/WWVegas/WW3D2/hmorphanim.h index 2b0eee80542..e375e83685e 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/hmorphanim.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/hmorphanim.h @@ -32,8 +32,6 @@ * * * $Revision:: 4 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/hrawanim.cpp b/Core/Libraries/Source/WWVegas/WW3D2/hrawanim.cpp index 8b0406e8869..f81c9967998 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/hrawanim.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/hrawanim.cpp @@ -32,22 +32,6 @@ * * * $Revision:: 5 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * HRawAnimClass::HRawAnimClass -- constructor * - * HRawAnimClass::~HRawAnimClass -- Destructor * - * HRawAnimClass::Free -- De-allocates all memory in use * - * HRawAnimClass::Load -- Loads hierarchy animation from a file * - * HRawAnimClass::read_channel -- Reads in a single channel of motion * - * HRawAnimClass::add_channel -- Adds a motion channel to the animation * - * HRawAnimClass::Get_Translation -- returns the translation vector for the given frame * - * HRawAnimClass::Get_Orientation -- returns a quaternion for the orientation of the pivot * - * HRawAnimClass::Get_XRotation -- Returns the X euler angle for the given pivot, frame * - * HRawAnimClass::Get_YRotation -- returns the Y Euler angle for the given pivot, frame * - * HRawAnimClass::Get_ZRotation -- returns the Z Euler angle for the given pivot, frame * - * HRawAnimClass::read_bit_channel -- read a bit channel from the file * - * HRawAnimClass::add_bit_channel -- install a bit channel into the animation * - * HRawAnimClass::Get_Visibility -- return visibility state for given pivot/frame * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "hrawanim.h" @@ -56,17 +40,6 @@ #include "assetmgr.h" #include "htree.h" -/*********************************************************************************************** - * NodeMotionStruct::NodeMotionStruct -- constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *=============================================================================================*/ NodeMotionStruct::NodeMotionStruct() : X(nullptr), Y(nullptr), @@ -80,18 +53,6 @@ NodeMotionStruct::NodeMotionStruct() : } -/*********************************************************************************************** - * NodeMotionStruct::~NodeMotionStruct -- destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 10/23/98 GTH : Created. * - *=============================================================================================*/ NodeMotionStruct::~NodeMotionStruct() { delete X; @@ -105,18 +66,6 @@ NodeMotionStruct::~NodeMotionStruct() } -/*********************************************************************************************** - * HRawAnimClass::HRawAnimClass -- constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ HRawAnimClass::HRawAnimClass() : NumFrames(0), NumNodes(0), @@ -128,36 +77,13 @@ HRawAnimClass::HRawAnimClass() : } -/*********************************************************************************************** - * HRawAnimClass::~HRawAnimClass -- Destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ HRawAnimClass::~HRawAnimClass() { Free(); } -/*********************************************************************************************** - * HRawAnimClass::Free -- De-allocates all memory in use * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ +// De-allocates all memory in use. void HRawAnimClass::Free() { delete[] NodeMotion; @@ -165,18 +91,6 @@ void HRawAnimClass::Free() } -/*********************************************************************************************** - * HRawAnimClass::Load -- Loads hierarchy animation from a file * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ int HRawAnimClass::Load_W3D(ChunkLoadClass & cload) { bool pre30 = false; @@ -293,18 +207,7 @@ int HRawAnimClass::Load_W3D(ChunkLoadClass & cload) } -/*********************************************************************************************** - * HRawAnimClass::read_channel -- Reads in a single channel of motion * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ +// Reads in a single channel of motion. bool HRawAnimClass::read_channel(ChunkLoadClass & cload,MotionChannelClass * * newchan,bool pre30) { MotionChannelClass* channel = W3DNEW MotionChannelClass; @@ -325,18 +228,6 @@ bool HRawAnimClass::read_channel(ChunkLoadClass & cload,MotionChannelClass * * n } } -/*********************************************************************************************** - * HRawAnimClass::add_channel -- Adds a motion channel to the animation * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ void HRawAnimClass::add_channel(MotionChannelClass * newchan) { int idx = newchan->Get_Pivot(); @@ -375,18 +266,6 @@ void HRawAnimClass::add_channel(MotionChannelClass * newchan) } -/*********************************************************************************************** - * HRawAnimClass::read_bit_channel -- read a bit channel from the file * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/98 GTH : Created. * - *=============================================================================================*/ bool HRawAnimClass::read_bit_channel(ChunkLoadClass & cload,BitChannelClass * * newchan,bool pre30) { BitChannelClass* channel = W3DNEW BitChannelClass; @@ -408,18 +287,6 @@ bool HRawAnimClass::read_bit_channel(ChunkLoadClass & cload,BitChannelClass * * } -/*********************************************************************************************** - * HRawAnimClass::add_bit_channel -- install a bit channel into the animation * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/98 GTH : Created. * - *=============================================================================================*/ void HRawAnimClass::add_bit_channel(BitChannelClass * newchan) { int idx = newchan->Get_Pivot(); @@ -432,18 +299,7 @@ void HRawAnimClass::add_bit_channel(BitChannelClass * newchan) } } -/*********************************************************************************************** - * HRawAnimClass::Get_Translation -- returns the translation vector for the given fr * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ +// Returns the translation vector for the given frame. void HRawAnimClass::Get_Translation(Vector3& trans, int pividx, float frame ) const { struct NodeMotionStruct * motion = &NodeMotion[pividx]; @@ -497,18 +353,7 @@ void HRawAnimClass::Get_Translation(Vector3& trans, int pividx, float frame ) co Vector3::Lerp( trans0, trans1, ratio, &trans ); } -/*********************************************************************************************** - * HRawAnimClass::Get_Orientation -- returns a quaternion for the orientation of the * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ +// Returns a quaternion for the orientation of the pivot at the given frame. void HRawAnimClass::Get_Orientation(Quaternion& q, int pividx,float frame) const { // int frame0 = (int)frame; @@ -576,18 +421,7 @@ void HRawAnimClass::Get_Orientation(Quaternion& q, int pividx,float frame) const #endif } -/*********************************************************************************************** - * HRawAnimClass::Get_Transform -- returns the transform matrix for the given frame * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ +// Returns the transform matrix for the given frame. void HRawAnimClass::Get_Transform(Matrix3D& mtx, int pividx, float frame ) const { struct NodeMotionStruct * motion = &NodeMotion[pividx]; @@ -649,18 +483,7 @@ void HRawAnimClass::Get_Transform(Matrix3D& mtx, int pividx, float frame ) const mtx.Set_Translation(trans); } -/*********************************************************************************************** - * HRawAnimClass::Get_Visibility -- return visibility state for given pivot/frame * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/98 GTH : Created. * - *=============================================================================================*/ +// Return visibility state for given pivot/frame. bool HRawAnimClass::Get_Visibility(int pividx,float frame) { if (NodeMotion[pividx].Vis != nullptr) { @@ -672,18 +495,7 @@ bool HRawAnimClass::Get_Visibility(int pividx,float frame) } -/*********************************************************************************************** - * HRawAnimClass::Is_Node_Motion_Present -- return true if there is motion defined for this frame * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/23/99 EHC : Created. * - *=============================================================================================*/ +// Return true if there is motion defined for this frame. bool HRawAnimClass::Is_Node_Motion_Present(int pividx) { WWASSERT((pividx >= 0) && (pividx < NumNodes)); diff --git a/Core/Libraries/Source/WWVegas/WW3D2/hrawanim.h b/Core/Libraries/Source/WWVegas/WW3D2/hrawanim.h index 7ad9e67513f..f2c2d10614f 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/hrawanim.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/hrawanim.h @@ -32,8 +32,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/htree.cpp b/Core/Libraries/Source/WWVegas/WW3D2/htree.cpp index 75f9496dd10..9d1dd842f73 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/htree.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/htree.cpp @@ -31,23 +31,6 @@ * * * $Revision:: 14 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * HTreeClass::HTreeClass -- constructor * - * HTreeClass::~HTreeClass -- destructor * - * HTreeClass::Load -- loads a hierarchy tree from a file * - * HTreeClass::read_pivots -- reads the pivots out of a file * - * HTreeClass::Free -- de-allocate all memory in use * - * HTreeClass::Base_Update -- Computes the base pose transform for each pivot * - * HTreeClass::Anim_Update -- Computes the transform for each pivot with motion * - * HTreeClass::Blend_Update -- computes each pivot as a blend of two anims * - * HTreeClass::Combo_Update -- compute each pivot's transform using an anim combo * - * HTreeClass::Get_Transform -- returns the transformation for the desired pivot * - * HTreeClass::Find_Bone -- Find a bone by name * - * HTreeClass::Get_Bone_Name -- get the name of a bone from its index * - * HTreeClass::Update_Parent_Need_Bits -- all "needed" children force their parents to be nee* - * HTreeClass::HTreeClass -- copy constructor * - * HTreeClass::Get_Parent_Index -- returns index of the parent of the given bone * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -63,18 +46,6 @@ #include "motchan.h" #include "ww3d.h" -/*********************************************************************************************** - * HTreeClass::HTreeClass -- constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ HTreeClass::HTreeClass() : NumPivots(0), Pivot(nullptr), @@ -102,18 +73,6 @@ void HTreeClass::Init_Default() } -/*********************************************************************************************** - * HTreeClass::~HTreeClass -- destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ HTreeClass::~HTreeClass() { Free(); @@ -123,18 +82,6 @@ HTreeClass::~HTreeClass() } -/*********************************************************************************************** - * HTreeClass::HTreeClass -- copy constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/4/98 GTH : Created. * - *=============================================================================================*/ HTreeClass::HTreeClass(const HTreeClass & src) : NumPivots(0), Pivot(nullptr), @@ -160,18 +107,6 @@ HTreeClass::HTreeClass(const HTreeClass & src) : ScaleFactor = src.ScaleFactor; } -/*********************************************************************************************** - * HTreeClass::Load -- loads a hierarchy tree from a file * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ int HTreeClass::Load_W3D(ChunkLoadClass & cload) { Free(); @@ -244,18 +179,6 @@ int HTreeClass::Load_W3D(ChunkLoadClass & cload) } -/*********************************************************************************************** - * HTreeClass::read_pivots -- reads the pivots out of a file * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ bool HTreeClass::read_pivots(ChunkLoadClass & cload,bool pre30) { W3dPivotStruct piv; @@ -343,18 +266,7 @@ bool HTreeClass::read_pivots(ChunkLoadClass & cload,bool pre30) } -/*********************************************************************************************** - * HTreeClass::Free -- de-allocate all memory in use * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ +// De-allocate all memory in use. void HTreeClass::Free() { delete[] Pivot; @@ -366,18 +278,7 @@ void HTreeClass::Free() } -/*********************************************************************************************** - * HTreeClass::Simple_Evaluate_Pivot -- Returns the transform of a pivot at the given frame. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 04/13/2000 PDS : Created. * - *=============================================================================================*/ +// Returns the transform of a pivot at the given frame. bool HTreeClass::Simple_Evaluate_Pivot ( HAnimClass * motion, @@ -452,18 +353,7 @@ bool HTreeClass::Simple_Evaluate_Pivot -/*********************************************************************************************** - * HTreeClass::Simple_Evaluate_Pivot -- Returns the transform of a pivot at the given frame. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 04/13/2000 PDS : Created. * - *=============================================================================================*/ +// Returns the transform of a pivot at the given frame. bool HTreeClass::Simple_Evaluate_Pivot ( int pivot_index, @@ -514,18 +404,7 @@ bool HTreeClass::Simple_Evaluate_Pivot } -/*********************************************************************************************** - * HTreeClass::Base_Update -- Computes the base pose transform for each pivot * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ +// Computes the base pose transform for each pivot. void HTreeClass::Base_Update(const Matrix3D & root) { PivotClass *pivot; @@ -545,18 +424,7 @@ void HTreeClass::Base_Update(const Matrix3D & root) } } -/*********************************************************************************************** - * HTreeClass::Anim_Update -- Computes the transform for each pivot with motion * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ +// Computes the transform for each pivot with motion. void HTreeClass::Anim_Update(const Matrix3D & root,HAnimClass * motion,float frame) { PivotClass *pivot; @@ -690,18 +558,7 @@ void HTreeClass::Anim_Update_Without_Interpolation(const Matrix3D & root,HRawAni } -/*********************************************************************************************** - * HTreeClass::Blend_Update -- computes each pivot as a blend of two anims * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/4/98 GTH : Created. * - *=============================================================================================*/ +// Computes each pivot as a blend of two anims. void HTreeClass::Blend_Update ( const Matrix3D & root, @@ -762,18 +619,7 @@ void HTreeClass::Blend_Update -/*********************************************************************************************** - * HTreeClass::Combo_Update -- compute each pivot's transform using an anim combo * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/4/98 GTH : Created. * - *=============================================================================================*/ +// Compute each pivot's transform using an anim combo. void HTreeClass::Combo_Update ( const Matrix3D & root, @@ -913,18 +759,6 @@ void HTreeClass::Combo_Update } -/*********************************************************************************************** - * HTreeClass::Find_Bone -- Find a bone by name * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/4/97 GTH : Created. * - *=============================================================================================*/ int HTreeClass::Get_Bone_Index(const char * name) const { for (int i=0; i < NumPivots; i++) { @@ -936,18 +770,6 @@ int HTreeClass::Get_Bone_Index(const char * name) const } -/*********************************************************************************************** - * HTreeClass::Get_Bone_Name -- get the name of a bone from its index * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/4/97 GTH : Created. * - *=============================================================================================*/ const char * HTreeClass::Get_Bone_Name(int boneidx) const { assert(boneidx >= 0); @@ -957,20 +779,6 @@ const char * HTreeClass::Get_Bone_Name(int boneidx) const } -/*********************************************************************************************** - * HTreeClass::Get_Parent_Index -- returns index of the parent of the given bone * - * * - * INPUT: * - * boneidx - the bone you are interested in * - * * - * OUTPUT: * - * the index of that bone's parent * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/12/2000 gth : Created. * - *=============================================================================================*/ int HTreeClass::Get_Parent_Index(int boneidx) const { assert(boneidx >= 0); diff --git a/Core/Libraries/Source/WWVegas/WW3D2/htree.h b/Core/Libraries/Source/WWVegas/WW3D2/htree.h index 7bbdb383160..a8161673609 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/htree.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/htree.h @@ -31,8 +31,6 @@ * * * $Revision:: 6 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once @@ -182,18 +180,6 @@ WWINLINE bool HTreeClass::Get_Visibility(int pivot) const return Pivot[pivot].IsVisible; } -/*********************************************************************************************** - * HTreeClass::Get_Transform -- returns the transformation for the desired pivot * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ WWINLINE const Matrix3D & HTreeClass::Get_Transform(int pivot) const { assert(pivot >= 0); diff --git a/Core/Libraries/Source/WWVegas/WW3D2/intersec.cpp b/Core/Libraries/Source/WWVegas/WW3D2/intersec.cpp index 1709f956bb0..02bd760c7ab 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/intersec.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/intersec.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 3 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ diff --git a/Core/Libraries/Source/WWVegas/WW3D2/intersec.h b/Core/Libraries/Source/WWVegas/WW3D2/intersec.h index 0914394f27f..28b0af317f7 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/intersec.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/intersec.h @@ -30,8 +30,6 @@ * * * $Revision:: 5 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* diff --git a/Core/Libraries/Source/WWVegas/WW3D2/inttest.h b/Core/Libraries/Source/WWVegas/WW3D2/inttest.h index 005552f7b5d..fd72cb937b1 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/inttest.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/inttest.h @@ -32,8 +32,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/layer.cpp b/Core/Libraries/Source/WWVegas/WW3D2/layer.cpp index 2ea246a4f76..d85d5a25b10 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/layer.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/layer.cpp @@ -30,18 +30,6 @@ * * * $Revision:: 3 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * LayerClass::LayerClass -- constructor * - * LayerClass::~LayerClass -- destructor * - * LayerClass::Set_Scene -- Set the scene used by this layer * - * LayerClass::Get_Scene -- get the scene being rendered by this layer * - * LayerClass::Peek_Scene -- get the scene being rendered by this layer w/o a ref * - * LayerClass::Set_Camera -- Set the camera being used by this layer * - * LayerClass::Get_Camera -- get the camera being used by this layer * - * LayerClass::LayerClass -- default constructor * - * LC::Peek_Camera -- Get copy of camera. * - * LC::Set -- Kinda like an assignment operator. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -50,18 +38,6 @@ #include "camera.h" -/*********************************************************************************************** - * LayerClass::LayerClass -- default constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/27/98 GTH : Created. * - *=============================================================================================*/ LayerClass::LayerClass() : Scene(nullptr), Camera(nullptr), @@ -80,21 +56,7 @@ LayerClass::LayerClass(const LayerClass &src) : { } -/*********************************************************************************************** - * LayerClass::LayerClass -- constructor * - * * - * simply constructs a layer class, initialized with the desired settings * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/27/98 GTH : Created. * - *=============================================================================================*/ +// Constructs a layer class, initialized with the desired settings. LayerClass::LayerClass ( SceneClass * scene, @@ -116,18 +78,6 @@ LayerClass::LayerClass } -/*********************************************************************************************** - * LayerClass::~LayerClass -- destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/27/98 GTH : Created. * - *=============================================================================================*/ LayerClass::~LayerClass() { if (Scene) { @@ -141,18 +91,6 @@ LayerClass::~LayerClass() } -/*********************************************************************************************** - * LayerClass::Set_Scene -- Set the scene used by this layer * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/27/98 GTH : Created. * - *=============================================================================================*/ void LayerClass::Set_Scene(SceneClass * scene) { if (Scene) { @@ -165,18 +103,7 @@ void LayerClass::Set_Scene(SceneClass * scene) } -/*********************************************************************************************** - * LayerClass::Get_Scene -- get the scene being rendered by this layer * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/27/98 GTH : Created. * - *=============================================================================================*/ +// Get the scene being rendered by this layer. SceneClass * LayerClass::Get_Scene() const { if (Scene) { @@ -186,36 +113,14 @@ SceneClass * LayerClass::Get_Scene() const } -/*********************************************************************************************** - * LayerClass::Peek_Scene -- get the scene being rendered by this layer * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/8/99 NH : Created. * - *=============================================================================================*/ +// Get the scene being rendered by this layer. SceneClass * LayerClass::Peek_Scene() const { return Scene; } -/*********************************************************************************************** - * LayerClass::Set_Camera -- Set the camera being used by this layer * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/27/98 GTH : Created. * - *=============================================================================================*/ +// Set the camera being used by this layer. void LayerClass::Set_Camera(CameraClass * cam) { if (Camera) { @@ -228,18 +133,7 @@ void LayerClass::Set_Camera(CameraClass * cam) } -/*********************************************************************************************** - * LayerClass::Get_Camera -- get the camera being used by this layer * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/27/98 GTH : Created. * - *=============================================================================================*/ +// Get the camera being used by this layer. CameraClass * LayerClass::Get_Camera() const { if (Camera) { @@ -249,36 +143,13 @@ CameraClass * LayerClass::Get_Camera() const } -/*********************************************************************************************** - * LC::Peek_Camera -- Get copy of camera. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/14/2001 SKB : Created. * - *=============================================================================================*/ CameraClass * LayerClass::Peek_Camera() const { return Camera; } -/*********************************************************************************************** - * LC::Set -- Kinda like an assignment operator. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/14/2001 SKB : Created. * - *=============================================================================================*/ +// Kinda like an assignment operator. void LayerClass::Set(const LayerClass & layer) { Set_Camera(layer.Peek_Camera()); diff --git a/Core/Libraries/Source/WWVegas/WW3D2/layer.h b/Core/Libraries/Source/WWVegas/WW3D2/layer.h index 449db660d3a..d568cc40542 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/layer.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/layer.h @@ -30,8 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/light.cpp b/Core/Libraries/Source/WWVegas/WW3D2/light.cpp index fe955dac69e..0c770b670e4 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/light.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/light.cpp @@ -30,27 +30,6 @@ * * * $Revision:: 8 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * LightClass::LightClass -- Constructor * - * LightClass::LightClass -- copy constructor * - * LightClass::operator == -- assignment operator * - * LightClass::~LightClass -- destructor * - * LightClass::Clone -- virtual copy constructor * - * LightClass::Get_Attenuation_Range -- returns a dist beyond which the light is attenuated * - * LightClass::Get_Obj_Space_Bounding_Sphere -- returns the object space bounding sphere * - * LightClass::Get_Obj_Space_Bounding_Box -- returns the object space bounding box * - * LightClass::Vertex_Processor_Push -- pushes the light into the GERD * - * LightClass::Vertex_Processor_Pop -- pops the light from the GERD * - * LightClass::Set_Transform -- sets transform and marks srLight transform as dirty. * - * LightClass::Set_Position -- sets position and marks srLight transform as dirty. * - * LightClass::Notify_Added -- lights add themselves to the VP list when added * - * LightClass::Notify_Removed -- lights remove themselves from the VP list when removed * - * LightClass::Load_W3D -- Initialize this light from a W3D file * - * LightClass::Save_W3D -- Save this light's settings into a W3D file * - * LightImpClass::LightImpClass -- constructor * - * LightImpClass::Process_Push -- exposes the "push" process for an srLight * - * LightImpClass::Process_Pop -- exposes the "pop" process for an srLight * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "light.h" @@ -65,19 +44,6 @@ -/*********************************************************************************************** - * LightClass::LightClass -- Constructor * - * * - * INPUT: * - * type - type of light to create. * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/21/98 GTH : Created. * - *=============================================================================================*/ LightClass::LightClass(LightType type) : Type(type), Flags(0), @@ -103,18 +69,6 @@ LightClass::LightClass(LightType type) : } -/*********************************************************************************************** - * LightClass::LightClass -- copy constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/21/98 GTH : Created. * - *=============================================================================================*/ LightClass::LightClass(const LightClass & src) : Type(src.Type), Flags(src.Flags), @@ -135,18 +89,6 @@ LightClass::LightClass(const LightClass & src) : } -/*********************************************************************************************** - * LightClass::operator == -- assignment operator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/21/98 GTH : Created. * - *=============================================================================================*/ LightClass & LightClass::operator = (const LightClass & that) { if (this != &that) { @@ -172,53 +114,19 @@ LightClass & LightClass::operator = (const LightClass & that) } -/*********************************************************************************************** - * LightClass::~LightClass -- destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/21/98 GTH : Created. * - *=============================================================================================*/ LightClass::~LightClass() { } -/*********************************************************************************************** - * LightClass::Clone -- virtual copy constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/21/98 GTH : Created. * - *=============================================================================================*/ +// Virtual copy constructor. RenderObjClass * LightClass::Clone() const { return W3DNEW LightClass(*this); } -/*********************************************************************************************** - * LightClass::Notify_Added -- lights add themselves to the VP list when added * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/26/99 GTH : Created. * - *=============================================================================================*/ +// Lights add themselves to the VP list when added. void LightClass::Notify_Added(SceneClass * scene) { RenderObjClass::Notify_Added(scene); @@ -226,18 +134,7 @@ void LightClass::Notify_Added(SceneClass * scene) } -/*********************************************************************************************** - * LightClass::Notify_Removed -- lights remove themselves from the VP list when removed * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/26/99 GTH : Created. * - *=============================================================================================*/ +// Lights remove themselves from the VP list when removed. void LightClass::Notify_Removed(SceneClass * scene) { scene->Unregister(this,SceneClass::LIGHT); @@ -246,18 +143,6 @@ void LightClass::Notify_Removed(SceneClass * scene) -/*********************************************************************************************** - * LightClass::Get_Obj_Space_Bounding_Sphere -- returns the object space bounding sphere * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/8/98 GTH : Created. * - *=============================================================================================*/ void LightClass::Get_Obj_Space_Bounding_Sphere(SphereClass & sphere) const { sphere.Center.Set(0,0,0); @@ -265,18 +150,6 @@ void LightClass::Get_Obj_Space_Bounding_Sphere(SphereClass & sphere) const } -/*********************************************************************************************** - * LightClass::Get_Obj_Space_Bounding_Box -- returns the object space bounding box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/8/98 GTH : Created. * - *=============================================================================================*/ void LightClass::Get_Obj_Space_Bounding_Box(AABoxClass & box) const { float r = Get_Attenuation_Range(); @@ -285,18 +158,7 @@ void LightClass::Get_Obj_Space_Bounding_Box(AABoxClass & box) const } -/*********************************************************************************************** - * LightClass::Load_W3D -- Initialize this light from a W3D file * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 9/23/99 GTH : Created. * - *=============================================================================================*/ +// Initialize this light from a W3D file. WW3DErrorType LightClass::Load_W3D(ChunkLoadClass & cload) { W3dLightStruct lightinfo; @@ -364,18 +226,7 @@ WW3DErrorType LightClass::Load_W3D(ChunkLoadClass & cload) } -/*********************************************************************************************** - * LightClass::Save_W3D -- Save this light's settings into a W3D file * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 9/23/99 GTH : Created. * - *=============================================================================================*/ +// Save this light's settings into a W3D file. WW3DErrorType LightClass::Save_W3D(ChunkSaveClass & csave) { csave.Begin_Chunk(W3D_CHUNK_LIGHT); diff --git a/Core/Libraries/Source/WWVegas/WW3D2/light.h b/Core/Libraries/Source/WWVegas/WW3D2/light.h index be7f774e80f..c788cf8ce7d 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/light.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/light.h @@ -30,8 +30,6 @@ * * * $Revision:: 7 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/line3d.cpp b/Core/Libraries/Source/WWVegas/WW3D2/line3d.cpp index 1beee57313d..4623abd427e 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/line3d.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/line3d.cpp @@ -30,21 +30,6 @@ * * * $Revision:: 11 $* * * - *-------------------------------------------------------------------------* - * Functions: * - * Line3DClass::Line3DClass -- Constructor * - * Line3DClass::Line3DClass -- Copy constructor. * - * Line3DClass::operator = -- assignment operator * - * Line3DClass::~Line3DClass -- Destructor. * - * Line3DClass::Clone -- Creates a clone of this Line3D * - * Line3DClass::Scale -- Scale object * - * Line3DClass::Scale -- Scale object * - * Line3DClass::Update_Cached_Bounding_Volumes -- update bounding vols * - * Line3DClass::Reset -- Reset line start and end points. * - * Line3DClass::Reset -- Reset line start and end points, and line width.* - * Re_Color -- Reset the line color. * - * Set_Opacity -- Reset the line opacity. * - * Line3DClass::Render -- render the 3d line * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "line3d.h" @@ -77,23 +62,6 @@ const unsigned short Indices[]= }; -/************************************************************************** - * Line3DClass::Line3DClass -- Constructor * - * * - * INPUT: Vector3 start, end - start, end points of line (world coords).* - * float width - width of line (in world units). * - * float r, g, b - R, G, B components of line color. * - * float opacity - opacity of line. * - * * - * OUTPUT: none. * - * * - * WARNINGS: * - * * - * HISTORY: * - * 01/15/1998 NH : Created. * - * 04/21/1998 NH : Ported to SR 1.3. * - * 02/16/2001 HY : Ported to DX8 * - *========================================================================*/ Line3DClass::Line3DClass (const Vector3 & start, const Vector3 & end, float width, float r, float g, float b, float opacity) { @@ -143,20 +111,6 @@ Line3DClass::Line3DClass (const Vector3 & start, const Vector3 & end, } -/************************************************************************** - * Line3DClass::Line3DClass -- Copy constructor. * - * * - * INPUT: const Line3DClass & src - source to copy from. * - * * - * OUTPUT: none. * - * * - * WARNINGS: * - * * - * HISTORY: * - * 01/15/1998 NH : Created. * - * 04/21/1998 NH : Ported to SR 1.3. * - * 02/16/2001 HY : Ported to DX8 * - *========================================================================*/ Line3DClass::Line3DClass(const Line3DClass & src) : RenderObjClass(src), Length(src.Length), @@ -168,20 +122,6 @@ Line3DClass::Line3DClass(const Line3DClass & src) : } -/************************************************************************** - * Line3DClass::operator = -- assignment operator * - * * - * INPUT: const Line3DClass & that - source to copy from. * - * * - * OUTPUT: Line3DClass & - result of assignment. * - * * - * WARNINGS: * - * * - * HISTORY: * - * 01/15/1998 NH : Created. * - * 04/21/1998 NH : Ported to SR 1.3. * - * 02/16/2001 HY : Ported to DX8 * - *========================================================================*/ Line3DClass & Line3DClass::operator = (const Line3DClass & that) { // Naty: need to add MatInfo and remapper to do this Byon @@ -202,56 +142,16 @@ Line3DClass & Line3DClass::operator = (const Line3DClass & that) } -/************************************************************************** - * Line3DClass::~Line3DClass -- Destructor. * - * * - * INPUT: none. * - * * - * OUTPUT: none. * - * * - * WARNINGS: * - * * - * HISTORY: * - * 01/15/1998 NH : Created. * - * 04/21/1998 NH : Ported to SR 1.3. * - * 02/16/2001 HY : Ported to DX8 * - *========================================================================*/ Line3DClass::~Line3DClass() { } -/************************************************************************** - * Line3DClass::Clone -- Creates a clone of this Line3D * - * * - * INPUT: none. * - * * - * OUTPUT: RenderObjClass * - pointer to cloned object. * - * * - * WARNINGS: * - * * - * HISTORY: * - * 01/15/1998 NH : Created. * - *========================================================================*/ RenderObjClass * Line3DClass::Clone() const { return NEW_REF( Line3DClass, (*this)); } -/*********************************************************************************************** - * Line3DClass::Render -- render the 3d line * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/8/98 GTH : Created. * - * 02/16/2001 HY : Ported to DX8 * - *=============================================================================================*/ - void Line3DClass::Render(RenderInfoClass & rinfo) { if (Is_Not_Hidden_At_All() == false) { @@ -305,20 +205,6 @@ void Line3DClass::Render(RenderInfoClass & rinfo) DX8Wrapper::Draw_Triangles(0,36/3,0,8); } -/************************************************************************** - * Line3DClass::Scale -- Scale object * - * * - * INPUT: float scale - uniform scale factor. * - * * - * OUTPUT: none. * - * * - * WARNINGS: * - * * - * HISTORY: * - * 01/27/1998 NH : Created. * - * 04/21/1998 NH : Ported to SR 1.3. * - * 02/16/2001 HY : Ported to DX8 * - *========================================================================*/ void Line3DClass::Scale(float scale) { for (int i=0; i<8; i++) vert[i]*=scale; @@ -333,20 +219,6 @@ void Line3DClass::Scale(float scale) } -/************************************************************************** - * Line3DClass::Scale -- Scale object * - * * - * INPUT: float scalex, scaley, scalez - axis scale factors. * - * * - * OUTPUT: none. * - * * - * WARNINGS: * - * * - * HISTORY: * - * 01/27/1998 NH : Created. * - * 04/21/1998 NH : Ported to SR 1.3. * - * 02/16/2001 HY : Ported to DX8 * - *========================================================================*/ void Line3DClass::Scale(float scalex, float scaley, float scalez) { // The line width is always the same in the y and z axes (the line @@ -379,19 +251,7 @@ void Line3DClass::Get_Obj_Space_Bounding_Box(AABoxClass & box) const box.Extent.Set(half_l, 0.0f, 0.0f); } -/************************************************************************** - * Line3DClass::Reset -- Reset line start and end points. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 01/19/1998 NH : Created. * - * 04/21/1998 NH : Ported to SR 1.3. * - *========================================================================*/ +// Reset line start and end points. void Line3DClass::Reset(const Vector3 & new_start, const Vector3 & new_end) { // Adjust length of line: @@ -415,19 +275,7 @@ void Line3DClass::Reset(const Vector3 & new_start, const Vector3 & new_end) } -/************************************************************************** - * Line3DClass::Reset -- Reset line start and end points, and line width. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 01/19/1998 NH : Created. * - * 04/21/1998 NH : Ported to SR 1.3. * - *========================================================================*/ +// Reset line start and end points, and line width. void Line3DClass::Reset(const Vector3 & new_start, const Vector3 & new_end, float new_width) { // Adjust length and width of line: @@ -461,37 +309,14 @@ void Line3DClass::Reset(const Vector3 & new_start, const Vector3 & new_end, floa } -/************************************************************************** - * Re_Color -- Reset the line color. * - * * - * INPUT: float r, g, b - components of the new color. * - * * - * OUTPUT: none. * - * * - * WARNINGS: * - * * - * HISTORY: * - * 01/26/1998 NH : Created. * - * 04/21/1998 NH : Ported to SR 1.3. * - *========================================================================*/ +// Reset the line color. void Line3DClass::Re_Color(float r, float g, float b) { Color=Vector4(r,g,b,Color.W); } -/************************************************************************** - * Set_Opacity -- Reset the line opacity. * - * * - * INPUT: float opacity - new opacity. * - * * - * OUTPUT: none. * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/03/1998 NH : Created. * - *========================================================================*/ +// Reset the line opacity. void Line3DClass::Set_Opacity(float opacity) { if (opacity < 1.0f) diff --git a/Core/Libraries/Source/WWVegas/WW3D2/line3d.h b/Core/Libraries/Source/WWVegas/WW3D2/line3d.h index 7fb2be1fad8..1f96c58ac5c 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/line3d.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/line3d.h @@ -30,8 +30,6 @@ * * * $Revision:: 2 $* * * - *-------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/mapper.cpp b/Core/Libraries/Source/WWVegas/WW3D2/mapper.cpp index 84dbde8a261..ce36052c82e 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/mapper.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/mapper.cpp @@ -1195,20 +1195,7 @@ void GridWSEnvMapperClass::Calculate_Texture_Matrix(Matrix4x4 &tex_matrix) tex_matrix = md * mv; } -/*********************************************************************************************** - * GridWSClassicEnvironmentMapperClass::GridWSClassicEnvironmentMapperClass -- Grid WS Env Map * - * * - * * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *=============================================================================================*/ +// Grid WS Env Map. GridWSClassicEnvironmentMapperClass::GridWSClassicEnvironmentMapperClass(float fps, unsigned int gridwidth_log2, unsigned int last_frame, unsigned int offset, AxisType axis, unsigned int stage) : GridWSEnvMapperClass(fps, gridwidth_log2, last_frame, offset, axis, stage) { @@ -1238,21 +1225,7 @@ void GridWSClassicEnvironmentMapperClass::Apply(int uv_array_index) DX8Wrapper::Set_DX8_Texture_Stage_State(Stage,D3DTSS_TEXTURETRANSFORMFLAGS,D3DTTFF_COUNT2); } -/*********************************************************************************************** - * GridWSEnvironmentMapperClass::GridWSEnvironmentMapperClass -- grid ws env * - * * - * * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/29/2002 hy : Created. * - *=============================================================================================*/ +// Grid WS Env Map. GridWSEnvironmentMapperClass::GridWSEnvironmentMapperClass(float fps, unsigned int gridwidth_log2, unsigned int last_frame, unsigned int offset, AxisType axis, unsigned int stage) : GridWSEnvMapperClass(fps, gridwidth_log2, last_frame, offset, axis, stage) { diff --git a/Core/Libraries/Source/WWVegas/WW3D2/mapper.h b/Core/Libraries/Source/WWVegas/WW3D2/mapper.h index 751ac0bb833..b4e76f1d957 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/mapper.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/mapper.h @@ -33,8 +33,6 @@ * $Revision:: 26 $* * * * 06/26/02 KM Matrix name change to avoid MAX conflicts * - *-------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/matinfo.cpp b/Core/Libraries/Source/WWVegas/WW3D2/matinfo.cpp index 0926bd796b8..0e83a6677e1 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/matinfo.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/matinfo.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 10 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ diff --git a/Core/Libraries/Source/WWVegas/WW3D2/matinfo.h b/Core/Libraries/Source/WWVegas/WW3D2/matinfo.h index a8fe13450ed..6a0ecae0f92 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/matinfo.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/matinfo.h @@ -30,8 +30,6 @@ * * * $Revision:: 11 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/matpass.cpp b/Core/Libraries/Source/WWVegas/WW3D2/matpass.cpp index f0a6dbb72b9..b6f41e1e467 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/matpass.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/matpass.cpp @@ -33,16 +33,6 @@ * $Revision:: 8 $* * * * 06/27/02 KM Changes to max texture stage caps * - *---------------------------------------------------------------------------------------------* - * Functions: * - * MaterialPassClass::MaterialPassClass -- Constructor * - * MaterialPassClass::~MaterialPassClass -- Destructor * - * MaterialPassClass::Install_Materials -- Plug our material settings into D3D * - * MaterialPassClass::Set_Texture -- Set texture to use * - * MaterialPassClass::Set_Shader -- Set the shader to use * - * MaterialPassClass::Set_Material -- set vertex material to use * - * MaterialPassClass::Get_Texture -- Get a pointer to the texture * - * MaterialPassClass::Get_Material -- get the vertex material * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -57,18 +47,6 @@ bool MaterialPassClass::EnablePerPolygonCulling = true; -/*********************************************************************************************** - * MaterialPassClass::MaterialPassClass -- Constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/26/2001 gth : Created. * - *=============================================================================================*/ MaterialPassClass::MaterialPassClass() : Shader(0), Material(nullptr), @@ -80,19 +58,6 @@ MaterialPassClass::MaterialPassClass() : } } -/*********************************************************************************************** - * MaterialPassClass::~MaterialPassClass -- Destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/9/99 gth : Created. * - * 06/27/02 kjm : Changes to max texture stage caps * - *=============================================================================================*/ MaterialPassClass::~MaterialPassClass() { for (int i=0; i= 0); @@ -148,19 +89,6 @@ void MaterialPassClass::Set_Texture(TextureClass * tex,int stage) } -/*********************************************************************************************** - * MaterialPassClass::Set_Shader -- Set the shader to use * - * * - * INPUT: * - * shader - shader for this material pass * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/9/99 gth : Created. * - *=============================================================================================*/ void MaterialPassClass::Set_Shader(ShaderClass shader) { Shader = shader; @@ -168,38 +96,13 @@ void MaterialPassClass::Set_Shader(ShaderClass shader) } -/*********************************************************************************************** - * MaterialPassClass::Set_Material -- set vertex material to use * - * * - * INPUT: * - * mat - pointer to the vertex material this material pass uses * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/9/99 gth : Created. * - *=============================================================================================*/ +// Set vertex material to use. void MaterialPassClass::Set_Material(VertexMaterialClass * mat) { REF_PTR_SET(Material,mat); } -/*********************************************************************************************** - * MaterialPassClass::Get_Texture -- Get a pointer to the texture * - * * - * INPUT: * - * * - * OUTPUT: * - * reference counted pointer to the texture this material pass is using * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/9/99 gth : Created. * - *=============================================================================================*/ TextureClass * MaterialPassClass::Get_Texture(int stage) const { WWASSERT(stage >= 0); @@ -212,19 +115,6 @@ TextureClass * MaterialPassClass::Get_Texture(int stage) const } -/*********************************************************************************************** - * MaterialPassClass::Get_Material -- get the vertex material * - * * - * INPUT: * - * * - * OUTPUT: * - * reference counted pointer to the vertex material being used by this material pass * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/9/99 gth : Created. * - *=============================================================================================*/ VertexMaterialClass * MaterialPassClass::Get_Material() const { if (Material) { diff --git a/Core/Libraries/Source/WWVegas/WW3D2/matpass.h b/Core/Libraries/Source/WWVegas/WW3D2/matpass.h index 53dd32afb62..8fd96fd8a8d 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/matpass.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/matpass.h @@ -33,8 +33,6 @@ * $Revision:: 6 $* * * * 06/27/02 KM Texture class abstraction * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/matrixmapper.cpp b/Core/Libraries/Source/WWVegas/WW3D2/matrixmapper.cpp index e3be6a87520..7bb4dd01709 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/matrixmapper.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/matrixmapper.cpp @@ -33,20 +33,6 @@ * $Revision:: 11 $* * * * 06/26/02 KM Matrix name change to avoid MAX conflicts * - *---------------------------------------------------------------------------------------------* - * Functions: * - * MatrixMapperClass::MatrixMapperClass -- Constructor * - * MatrixMapperClass::Set_Texture_Transform -- Sets the viewspace-to-texturespace transform * - * MatrixMapperClass::Update_View_To_Pixel_Transform -- recomputes ViewToPixel * - * MatrixMapperClass::Compute_Texture_Coordinate -- compute a single texture coord * - * MatrixMapperClass::Apply -- Apply texture mapper to render states and texture stage states* - * MatrixMapperClass::Calculate_Texture_Matrix -- Calculate texture matrix * - * CompositeMatrixMapperClass::CompositeMatrixMapperClass -- Constructor * - * CompositeMatrixMapperClass::CompositeMatrixMapperClass -- Copy Constructor * - * CompositeMatrixMapperClass::~CompositeMatrixMapperClass -- Destructor * - * CompositeMatrixMapperClass::~CompositeMatrixMapperClass -- Destructor * - * CompositeMatrixMapperClass::Apply -- Apply texture mapper to render states and ts states * - * CompositeMatrixMapperClass::Calculate_Texture_Matrix -- Calculate texture matrix * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -54,20 +40,7 @@ #include "dx8wrapper.h" -/*********************************************************************************************** - * MatrixMapperClass::MatrixMapperClass -- Constructor * - * * - * Initializes the member variables to defaults * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/13/99 gth : created * - *=============================================================================================*/ +// Initializes the member variables to defaults. MatrixMapperClass::MatrixMapperClass(int stage) : TextureMapperClass(stage), Flags(0), @@ -79,36 +52,14 @@ MatrixMapperClass::MatrixMapperClass(int stage) : { } -/*********************************************************************************************** - * MatrixMapperClass::Set_Texture_Transform -- Sets the viewspace-to-texturespace transform * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/20/2001 gth : created * - *=============================================================================================*/ +// Sets the viewspace-to-texturespace transform. void MatrixMapperClass::Set_Texture_Transform(const Matrix3D & view_to_texture,float texsize) { ViewToTexture = Matrix4x4(view_to_texture); Update_View_To_Pixel_Transform(texsize); } -/*********************************************************************************************** - * MatrixMapperClass::Set_Texture_Transform -- Sets the viewspace-to-texturespace transform * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/13/99 gth : Created. * - *=============================================================================================*/ +// Sets the viewspace-to-texturespace transform. void MatrixMapperClass::Set_Texture_Transform(const Matrix4x4 & view_to_texture,float texsize) { ViewToTexture=view_to_texture; @@ -116,18 +67,6 @@ void MatrixMapperClass::Set_Texture_Transform(const Matrix4x4 & view_to_texture, Update_View_To_Pixel_Transform(texsize); } -/*********************************************************************************************** - * MatrixMapperClass::Update_View_To_Pixel_Transform -- recomputes ViewToPixel * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/4/00 gth : Created. * - *=============================================================================================*/ void MatrixMapperClass::Update_View_To_Pixel_Transform(float tex_size) { /* @@ -190,20 +129,6 @@ void MatrixMapperClass::Update_View_To_Pixel_Transform(float tex_size) } -/*********************************************************************************************** - * MatrixMapperClass::Compute_Texture_Coordinate -- compute a single texture coord * - * * - * INPUT: * - * point - 3D point to calculate the texture coordinate for * - * set_stq - pointer to texture coordinate, s,t will be stored in X,Y. q will be stored in Z * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/25/00 gth : Created. * - *=============================================================================================*/ void MatrixMapperClass::Compute_Texture_Coordinate(const Vector3 & point,Vector3 * set_stq) { set_stq->X = ViewToPixel[0][0]*point.X + ViewToPixel[0][1]*point.Y + ViewToPixel[0][2]*point.Z + ViewToPixel[0][3]; @@ -211,18 +136,7 @@ void MatrixMapperClass::Compute_Texture_Coordinate(const Vector3 & point,Vector3 set_stq->Z = ViewToPixel[3][0]*point.X + ViewToPixel[3][1]*point.Y + ViewToPixel[3][2]*point.Z + ViewToPixel[3][3]; } -/*********************************************************************************************** - * MatrixMapperClass::Apply -- Apply texture mapper to render states and texture stage states * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/05/01 NH : Created comment block. * - *=============================================================================================*/ +// Apply texture mapper to render states and texture stage states. void MatrixMapperClass::Apply(int uv_array_index) { Matrix4x4 m; @@ -279,18 +193,6 @@ void MatrixMapperClass::Apply(int uv_array_index) } -/*********************************************************************************************** - * MatrixMapperClass::Calculate_Texture_Matrix -- Calculate texture matrix * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/06/01 NH : Created comment block. * - *=============================================================================================*/ void MatrixMapperClass::Calculate_Texture_Matrix(Matrix4x4 &tex_matrix) { // We return ViewToPixel. This is not, strictly speaking, always correct, but it is close @@ -299,18 +201,6 @@ void MatrixMapperClass::Calculate_Texture_Matrix(Matrix4x4 &tex_matrix) tex_matrix = ViewToPixel; } -/*********************************************************************************************** - * CompositeMatrixMapperClass::CompositeMatrixMapperClass -- Constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/05/01 NH : Created. * - *=============================================================================================*/ CompositeMatrixMapperClass::CompositeMatrixMapperClass(TextureMapperClass *internal_mapper, unsigned int stage) : MatrixMapperClass(stage), InternalMapper(internal_mapper) @@ -320,18 +210,6 @@ CompositeMatrixMapperClass::CompositeMatrixMapperClass(TextureMapperClass *inter } } -/*********************************************************************************************** - * CompositeMatrixMapperClass::CompositeMatrixMapperClass -- Copy Constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/05/01 NH : Created. * - *=============================================================================================*/ CompositeMatrixMapperClass::CompositeMatrixMapperClass(const CompositeMatrixMapperClass & src) : MatrixMapperClass(src), InternalMapper(src.InternalMapper ? src.InternalMapper->Clone() : nullptr) @@ -341,18 +219,6 @@ CompositeMatrixMapperClass::CompositeMatrixMapperClass(const CompositeMatrixMapp } } -/*********************************************************************************************** - * CompositeMatrixMapperClass::~CompositeMatrixMapperClass -- Destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/05/01 NH : Created. * - *=============================================================================================*/ CompositeMatrixMapperClass::~CompositeMatrixMapperClass() { if (InternalMapper) { @@ -361,18 +227,7 @@ CompositeMatrixMapperClass::~CompositeMatrixMapperClass() } } -/*********************************************************************************************** - * CompositeMatrixMapperClass::Apply -- Apply texture mapper to render states and ts states * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/05/01 NH : Created. * - *=============================================================================================*/ +// Apply texture mapper to render states and ts states. void CompositeMatrixMapperClass::Apply(int uv_array_index) { if (InternalMapper) { @@ -408,18 +263,6 @@ void CompositeMatrixMapperClass::Apply(int uv_array_index) } } -/*********************************************************************************************** - * MatrixMapperClass::Calculate_Texture_Matrix -- Calculate texture matrix * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/06/01 NH : Created comment block. * - *=============================================================================================*/ void CompositeMatrixMapperClass::Calculate_Texture_Matrix(Matrix4x4 &tex_matrix) { if (InternalMapper) { diff --git a/Core/Libraries/Source/WWVegas/WW3D2/matrixmapper.h b/Core/Libraries/Source/WWVegas/WW3D2/matrixmapper.h index baff1045054..cee3b041d8f 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/matrixmapper.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/matrixmapper.h @@ -33,8 +33,6 @@ * $Revision:: 8 $* * * * 06/26/02 KM Matrix name change to avoid MAX conflicts * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/mesh.cpp b/Core/Libraries/Source/WWVegas/WW3D2/mesh.cpp index 848bff01e65..fdab0a06bea 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/mesh.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/mesh.cpp @@ -31,59 +31,6 @@ * * * Last Update : June 12, 1997 [GH] * * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * MeshClass::MeshClass -- Constructor for MeshClass * - * MeshClass::MeshClass -- Copy Constructor for MeshClass * - * MeshClass::operator == -- assignment operator for MeshClass * - * MeshClass::~MeshClass -- destructor * - * MeshClass::Contains -- Determines whether mesh contains a (worldspace) point. * - * MeshClass::Free -- Releases all memory/assets in use by this mesh * - * MeshClass::Clone -- Creates a clone of this mesh * - * MeshClass::Get_Name -- returns the name of the mesh * - * MeshClass::Set_Name -- sets the name of this mesh * - * MeshClass::Get_W3D_Flags -- access to the W3D flags * - * MeshClass::Get_User_Text -- access to the text buffer * - * MeshClass::Scale -- Scales the mesh * - * MeshClass::Scale -- Scales the mesh * - * MeshClass::Init -- Init the mesh from a MeshBuilder object * - * MeshClass::Load -- creates a mesh out of a mesh chunk in a .w3d file * - * MeshClass::Cast_Ray -- compute a ray intersection with this mesh * - * MeshClass::Cast_AABox -- cast an AABox against this mesh * - * MeshClass::Cast_OBBox -- Cast an obbox against this mesh * - * MeshClass::Intersect_AABox -- test for intersection with given AABox * - * MeshClass::Intersect_OBBox -- test for intersection with the given OBBox * - * MeshClass::Generate_Culling_Tree -- Generates a hierarchical culling tree for the mesh * - * MeshClass::Direct_Load -- read the w3d file directly into this mesh object * - * MeshClass::read_chunks -- read all of the chunks from the .wtm file * - * MeshClass::read_vertices -- reads the vertex chunk * - * MeshClass::read_texcoords -- read in the texture coordinates chunk * - * MeshClass::install_texture_coordinates -- installs the given u-v's in each channel that is* - * MeshClass::read_vertex_normals -- reads a surrender normal chunk from the wtm file * - * MeshClass::read_v3_materials -- Reads in version 3 materials. * - * MeshClass::read_map -- Reads definition of a texture map from the file * - * MeshClass::read_triangles -- read the triangles chunk * - * MeshClass::read_per_tri_materials -- read the material indices for each triangle * - * MeshClass::read_user_text -- read in the user text chunk * - * MeshClass::read_vertex_colors -- read in the vertex colors chunk * - * MeshClass::read_vertex_influences -- read in the vertex influences chunk * - * MeshClass::Get_Material_Info -- returns a pointer to the material info * - * MeshClass::Create_Decal -- creates a decal on this mesh * - * MeshClass::Delete_Decal -- removes a decal from this mesh * - * MeshClass::Get_Num_Polys -- returns the number of polys (tris) in this mesh * - * MeshClass::Render -- renders this mesh * - * MeshClass::Special_Render -- special render function for meshes * - * MeshClass::update_skin -- deforms the mesh * - * MeshClass::clone_materials -- clone the materials for this mesh * - * MeshClass::install_materials -- transfers the materials into the mesh * - * MeshClass::Get_Model -- user access to the mesh model * - * MeshClass::Get_Obj_Space_Bounding_Sphere -- returns obj-space bounding sphere * - * MeshClass::Get_Obj_Space_Bounding_Box -- returns the obj-space bounding box * - * MeshClass::Get_Deformed_Vertices -- Gets the deformed vertices for a skin * - * MeshClass::Get_Deformed_Vertices -- Gets the deformed vertices for a skin * - * MeshClass::Render_Material_Pass -- Render a procedural material pass for this mesh * - * MeshClass::Replace_VertexMaterial -- Replaces existing vertex material with a new one. Wi * - * MeshClass::Make_Unique -- Makes mesh unique in the renderer, but still shares system ram * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "mesh.h" @@ -143,20 +90,7 @@ static SimpleDynVecClass temp_apt; static DynamicVectorClass _TempVertexBuffer; -/*********************************************************************************************** - * MeshClass::MeshClass -- Constructor for MeshClass * - * * - * Initializes an empty mesh class * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/6/98 GTH : Created. * - *=============================================================================================*/ +// Initializes an empty mesh class. MeshClass::MeshClass() : Model(nullptr), DecalMesh(nullptr), @@ -172,19 +106,7 @@ MeshClass::MeshClass() : } -/*********************************************************************************************** - * MeshClass::MeshClass -- Copy Constructor for MeshClass * - * * - * Creates a mesh which is a copy of the given mesh * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *=============================================================================================*/ +// Creates a mesh which is a copy of the given mesh. MeshClass::MeshClass(const MeshClass & that) : RenderObjClass(that), Model(nullptr), @@ -202,18 +124,7 @@ MeshClass::MeshClass(const MeshClass & that) : } -/*********************************************************************************************** - * operator == -- assignment operator for MeshClass * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/6/98 GTH : Created. * - *=============================================================================================*/ +// Assignment operator for MeshClass. MeshClass & MeshClass::operator = (const MeshClass & that) { if (this != &that) { @@ -231,37 +142,14 @@ MeshClass & MeshClass::operator = (const MeshClass & that) } -/*********************************************************************************************** - * MeshClass::~MeshClass -- destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/6/98 GTH : Created. * - *=============================================================================================*/ MeshClass::~MeshClass() { Free(); } -/*********************************************************************************************** - * MeshClass::Contains -- Determines whether mesh contains a (worldspace) point. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: Assumes mesh is a closed manifold - results are undefined otherwise * - * This function will NOT work for skins * - * * - * HISTORY: * - * 8/30/00 NH : Created. * - *=============================================================================================*/ +// Determines whether mesh contains a (worldspace) point. This function will NOT work for skins. +// WARNING: Assumes mesh is a closed manifold - results are undefined otherwise. bool MeshClass::Contains(const Vector3 &point) { // Transform point to object space and pass on to model @@ -271,18 +159,7 @@ bool MeshClass::Contains(const Vector3 &point) } -/*********************************************************************************************** - * MeshClass::Free -- Releases all memory/assets in use by this mesh * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/6/98 GTH : Created. * - *=============================================================================================*/ +// Releases all memory/assets in use by this mesh. void MeshClass::Free() { REF_PTR_RELEASE(Model); @@ -290,107 +167,37 @@ void MeshClass::Free() } -/*********************************************************************************************** - * MeshClass::Clone -- Creates a clone of this mesh * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/6/98 GTH : Created. * - *=============================================================================================*/ RenderObjClass * MeshClass::Clone() const { return NEW_REF( MeshClass, (*this)); } -/*********************************************************************************************** - * MeshClass::Get_Name -- returns the name of the mesh * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/15/98 GTH : Created. * - *=============================================================================================*/ const char * MeshClass::Get_Name() const { return Model->Get_Name(); } -/*********************************************************************************************** - * MeshClass::Set_Name -- sets the name of this mesh * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/9/99 GTH : Created. * - *=============================================================================================*/ void MeshClass::Set_Name(const char * name) { Model->Set_Name(name); } -/*********************************************************************************************** - * MeshClass::Get_W3D_Flags -- access to the W3D flags * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/15/98 GTH : Created. * - *=============================================================================================*/ +// Access to the W3D flags. uint32 MeshClass::Get_W3D_Flags() { return Model->W3dAttributes; } -/*********************************************************************************************** - * MeshClass::Get_User_Text -- access to the text buffer * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/15/98 GTH : Created. * - *=============================================================================================*/ +// Access to the text buffer. const char * MeshClass::Get_User_Text() const { return Model->Get_User_Text(); } -/*********************************************************************************************** - * MeshClass::Get_Material_Info -- returns a pointer to the material info * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/20/98 GTH : Created. * - *=============================================================================================*/ MaterialInfoClass * MeshClass::Get_Material_Info() { if (Model) { @@ -403,18 +210,7 @@ MaterialInfoClass * MeshClass::Get_Material_Info() } -/*********************************************************************************************** - * MeshClass::Get_Model -- user access to the mesh model * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/4/99 GTH : Created. * - *=============================================================================================*/ +// User access to the mesh model. MeshModelClass * MeshClass::Get_Model() { if (Model != nullptr) { @@ -423,17 +219,6 @@ MeshModelClass * MeshClass::Get_Model() return Model; } -/*********************************************************************************************** - * MeshClass::Scale -- Scales the mesh * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *=============================================================================================*/ void MeshClass::Scale(float scale) { if (scale==1.0f) return; @@ -452,19 +237,6 @@ void MeshClass::Scale(float scale) } -/*********************************************************************************************** - * MeshClass::Scale -- Scales the mesh * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/6/98 GTH : Created. * - * 12/8/98 GTH : Modified the box scaling to use the non-uniform parameters * - *=============================================================================================*/ void MeshClass::Scale(float scalex, float scaley, float scalez) { // scale the surrender mesh model @@ -484,18 +256,7 @@ void MeshClass::Scale(float scalex, float scaley, float scalez) } -/*********************************************************************************************** - * MeshClass::Get_Deformed_Vertices -- Gets the deformed vertices for a skin * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/4/2001 gth : Created. * - *=============================================================================================*/ +// Gets the deformed vertices for a skin. void MeshClass::Get_Deformed_Vertices(Vector3 *dst_vert, Vector3 *dst_norm) { WWASSERT(Model->Get_Flag(MeshGeometryClass::SKIN)); @@ -503,18 +264,7 @@ void MeshClass::Get_Deformed_Vertices(Vector3 *dst_vert, Vector3 *dst_norm) } -/*********************************************************************************************** - * MeshClass::Get_Deformed_Vertices -- Gets the deformed vertices for a skin * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/4/2001 gth : Created. * - *=============================================================================================*/ +// Gets the deformed vertices for a skin. void MeshClass::Get_Deformed_Vertices(Vector3 *dst_vert) { WWASSERT(Model->Get_Flag(MeshGeometryClass::SKIN)); @@ -524,18 +274,6 @@ void MeshClass::Get_Deformed_Vertices(Vector3 *dst_vert) Model->get_deformed_vertices(dst_vert,Container->Get_HTree()); } -/*********************************************************************************************** - * MeshClass::Create_Decal -- creates a decal on this mesh * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ void MeshClass::Create_Decal(DecalGeneratorClass * generator) { WWMEMLOG(MEM_GEOMETRY); @@ -599,18 +337,6 @@ void MeshClass::Create_Decal(DecalGeneratorClass * generator) } -/*********************************************************************************************** - * MeshClass::Delete_Decal -- removes a decal from this mesh * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ void MeshClass::Delete_Decal(uint32 decal_id) { if (DecalMesh != nullptr) { @@ -619,18 +345,6 @@ void MeshClass::Delete_Decal(uint32 decal_id) } -/*********************************************************************************************** - * MeshClass::Get_Num_Polys -- returns the number of polys (tris) in this mesh * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/6/98 GTH : Created. * - *=============================================================================================*/ int MeshClass::Get_Num_Polys() const { if (Model) { @@ -644,18 +358,6 @@ int MeshClass::Get_Num_Polys() const } -/*********************************************************************************************** - * MeshClass::Render -- renders this mesh * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/10/98 GTH : Created. * - *=============================================================================================*/ void MeshClass::Render(RenderInfoClass & rinfo) { WWPROFILE("Mesh::Render"); @@ -808,18 +510,6 @@ void MeshClass::Render(RenderInfoClass & rinfo) } -/*********************************************************************************************** - * MeshClass::Render_Material_Pass -- Render a procedural material pass for this mesh * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/4/2001 gth : Created. * - *=============================================================================================*/ void MeshClass::Render_Material_Pass(MaterialPassClass * pass,IndexBufferClass * ib) { //Added to allow dynamic opacity on additional render passed @@ -1012,18 +702,6 @@ void MeshClass::Render_Material_Pass(MaterialPassClass * pass,IndexBufferClass * } -/*********************************************************************************************** - * MeshClass::Special_Render -- special render function for meshes * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/10/98 GTH : Created. * - *=============================================================================================*/ void MeshClass::Special_Render(SpecialRenderInfoClass & rinfo) { if (Is_Not_Hidden_At_All() == false) @@ -1068,42 +746,14 @@ void MeshClass::Replace_Texture(TextureClass* texture,TextureClass* new_texture) } -/*********************************************************************************************** - * MeshClass::Replace_VertexMaterial -- Replaces existing vertex material with a new one. Will * - * * - * * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/2/2001 hy : Created. * - *=============================================================================================*/ +// Replaces existing vertex material with a new one. void MeshClass::Replace_VertexMaterial(VertexMaterialClass* vmat,VertexMaterialClass* new_vmat) { Model->Replace_VertexMaterial(vmat,new_vmat); } -/*********************************************************************************************** - * MeshClass::Make_Unique -- Makes mesh unique in the renderer, but still shares system ram ge * - * * - * * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/2/2001 hy : Created. * - *=============================================================================================*/ +// Makes mesh unique in the renderer, but still shares system ram geometry. void MeshClass::Make_Unique(bool force_meshmdl_clone) { // Usually we will not clone the mesh model if it is already unique - force_meshmdl_clone will @@ -1117,18 +767,7 @@ void MeshClass::Make_Unique(bool force_meshmdl_clone) REF_PTR_RELEASE(newmesh); } -/*********************************************************************************************** - * MeshClass::Load -- creates a mesh out of a mesh chunk in a .w3d file * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/12/1997 GH : Created. * - *=============================================================================================*/ +// Creates a mesh out of a mesh chunk in a .w3d file. WW3DErrorType MeshClass::Load_W3D(ChunkLoadClass & cload) { Vector3 boxmin,boxmax; @@ -1197,18 +836,6 @@ WW3DErrorType MeshClass::Load_W3D(ChunkLoadClass & cload) } -/*********************************************************************************************** - * MeshClass::Cast_Ray -- compute a ray intersection with this mesh * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/17/98 GTH : Created. * - *=============================================================================================*/ bool MeshClass::Cast_Ray(RayCollisionTestClass & raytest) { if ((Get_Collision_Type() & raytest.CollisionType) == 0) return false; @@ -1253,18 +880,6 @@ bool MeshClass::Cast_Ray(RayCollisionTestClass & raytest) } -/*********************************************************************************************** - * MeshClass::Cast_AABox -- cast an AABox against this mesh * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/17/98 GTH : Created. * - *=============================================================================================*/ bool MeshClass::Cast_AABox(AABoxCollisionTestClass & boxtest) { if ((Get_Collision_Type() & boxtest.CollisionType) == 0) return false; @@ -1283,18 +898,7 @@ bool MeshClass::Cast_AABox(AABoxCollisionTestClass & boxtest) } -/*********************************************************************************************** - * Cast_OBBox -- Cast an obbox against this mesh * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/17/98 GTH : Created. * - *=============================================================================================*/ +// Cast an obbox against this mesh. bool MeshClass::Cast_OBBox(OBBoxCollisionTestClass & boxtest) { if ((Get_Collision_Type() & boxtest.CollisionType) == 0) return false; @@ -1327,22 +931,8 @@ bool MeshClass::Cast_OBBox(OBBoxCollisionTestClass & boxtest) } -/*********************************************************************************************** - * MeshClass::Intersect_AABox -- test for intersection with given AABox * - * * - * The AAbox given is assumed to be in world space. Since meshes aren't generally in world * - * space, the test must be transformed into our local coordinate system (which turns it into * - * an OBBox...) * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ +// The AAbox given is assumed to be in world space. Since meshes aren't generally in world space, +// the test must be transformed into our local coordinate system (which turns it into an OBBox...). bool MeshClass::Intersect_AABox(AABoxIntersectionTestClass & boxtest) { if ((Get_Collision_Type() & boxtest.CollisionType) == 0) return false; @@ -1355,21 +945,8 @@ bool MeshClass::Intersect_AABox(AABoxIntersectionTestClass & boxtest) } -/*********************************************************************************************** - * MeshClass::Intersect_OBBox -- test for intersection with the given OBBox * - * * - * The given OBBox is assumed to be in world space so we need to transform it into the mesh's * - * local coordinate system. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ +// The given OBBox is assumed to be in world space so we need to transform it into the mesh's local +// coordinate system. bool MeshClass::Intersect_OBBox(OBBoxIntersectionTestClass & boxtest) { if ((Get_Collision_Type() & boxtest.CollisionType) == 0) return false; @@ -1382,18 +959,6 @@ bool MeshClass::Intersect_OBBox(OBBoxIntersectionTestClass & boxtest) } -/*********************************************************************************************** - * MeshClass::Get_Obj_Space_Bounding_Sphere -- returns obj-space bounding sphere * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ void MeshClass::Get_Obj_Space_Bounding_Sphere(SphereClass & sphere) const { if (Model) { @@ -1405,18 +970,6 @@ void MeshClass::Get_Obj_Space_Bounding_Sphere(SphereClass & sphere) const } -/*********************************************************************************************** - * MeshClass::Get_Obj_Space_Bounding_Box -- returns the obj-space bounding box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ void MeshClass::Get_Obj_Space_Bounding_Box(AABoxClass & box) const { if (Model) { @@ -1427,36 +980,12 @@ void MeshClass::Get_Obj_Space_Bounding_Box(AABoxClass & box) const } -/*********************************************************************************************** - * MeshClass::Generate_Culling_Tree -- Generates a hierarchical culling tree for the mesh * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/18/98 GTH : Created. * - *=============================================================================================*/ void MeshClass::Generate_Culling_Tree() { Model->Generate_Culling_Tree(); } -/*********************************************************************************************** - * MeshClass::Add_Dependencies_To_List -- Add dependent files to the list. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/18/99 PDS : Created. * - *=============================================================================================*/ void MeshClass::Add_Dependencies_To_List ( DynamicVectorClass &file_list, @@ -1493,18 +1022,6 @@ void MeshClass::Add_Dependencies_To_List } -/*********************************************************************************************** - * MeshClass::Update_Cached_Bounding_Volumes -- default collision sphere. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/14/2001 NH : Created. * - *=============================================================================================*/ void MeshClass::Update_Cached_Bounding_Volumes() const { Get_Obj_Space_Bounding_Sphere(CachedBoundingSphere); diff --git a/Core/Libraries/Source/WWVegas/WW3D2/mesh.h b/Core/Libraries/Source/WWVegas/WW3D2/mesh.h index 864adbf3cb4..33cd9005b0f 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/mesh.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/mesh.h @@ -31,8 +31,6 @@ * * * Last Update : June 11, 1997 [GH] * * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/meshdam.cpp b/Core/Libraries/Source/WWVegas/WW3D2/meshdam.cpp index e98445be210..23f58ec2af9 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/meshdam.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/meshdam.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -45,18 +43,6 @@ //#include -/*********************************************************************************************** - * DamageClass::DamageClass -- constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 10/28/1997 GH : Created. * - *=============================================================================================*/ DamageClass::DamageClass(): DamageIndex(0), NumMaterials(0), @@ -68,18 +54,6 @@ DamageClass::DamageClass(): } -/*********************************************************************************************** - * DamageClass::~DamageClass -- destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 10/28/1997 GH : Created. * - *=============================================================================================*/ DamageClass::~DamageClass() { delete [] Verts; @@ -89,18 +63,6 @@ DamageClass::~DamageClass() Colors = nullptr; } -/*********************************************************************************************** - * DamageClass::Load -- load damage data from a W3D file * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 10/28/1997 GH : Created. * - *=============================================================================================*/ WW3DErrorType DamageClass::Load(ChunkLoadClass & cload,MeshModelClass * basemesh) { #if 0 @@ -183,18 +145,6 @@ WW3DErrorType DamageClass::Load(ChunkLoadClass & cload,MeshModelClass * basemesh return WW3D_ERROR_OK; } -/*********************************************************************************************** - * DamageClass::read_vertices -- read damage vertices from a W3D file * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/04/1997 GH : Created. * - *=============================================================================================*/ WW3DErrorType DamageClass::read_vertices(ChunkLoadClass & cload,MeshModelClass * basemesh) { #if 0 @@ -219,18 +169,6 @@ WW3DErrorType DamageClass::read_vertices(ChunkLoadClass & cload,MeshModelClass * return WW3D_ERROR_OK; } -/*********************************************************************************************** - * DamageClass::read_colors -- read damage colors from a w3d file * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/04/1997 GH : Created. * - *=============================================================================================*/ WW3DErrorType DamageClass::read_colors(ChunkLoadClass & cload,MeshModelClass * basemesh) { #if 0 diff --git a/Core/Libraries/Source/WWVegas/WW3D2/meshdam.h b/Core/Libraries/Source/WWVegas/WW3D2/meshdam.h index aadb1944b56..31fa333ce2f 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/meshdam.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/meshdam.h @@ -30,8 +30,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #if 0 diff --git a/Core/Libraries/Source/WWVegas/WW3D2/meshgeometry.cpp b/Core/Libraries/Source/WWVegas/WW3D2/meshgeometry.cpp index a8dcd75673b..147c81cffd9 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/meshgeometry.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/meshgeometry.cpp @@ -32,56 +32,6 @@ * * * $Revision:: 14 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * MeshGeometryClass::MeshGeometryClass -- Constructor * - * MeshGeometryClass::MeshGeometryClass -- Copy Constructor * - * -- assignment operator * - * MeshGeometryClass::~MeshGeometryClass -- destructor * - * MeshGeometryClass::Reset_Geometry -- releases current resources and allocates space if ne * - * MeshGeometryClass::Get_Name -- returns the name * - * MeshGeometryClass::Set_Name -- set the name of this model * - * MeshGeometryClass::Get_User_Text -- get the user-text buffer * - * MeshGeometryClass::Set_User_Text -- set the user text buffer * - * MeshGeometryClass::Get_Bounding_Box -- get the bounding box * - * MeshGeometryClass::Get_Bounding_Sphere -- get the bounding sphere * - * MeshGeometryClass::Generate_Rigid_APT -- generate active polygon table * - * MeshGeometryClass::Generate_Skin_APT -- generate an active polygon table * - * MeshGeometryClass::Contains -- test if the mesh contains the given point * - * MeshGeometryClass::Cast_Ray -- compute a ray intersection with this mesh * - * MeshGeometryClass::Cast_AABox -- cast an AABox against this mesh * - * MeshGeometryClass::Cast_OBBox -- Cast an obbox against this mesh * - * MeshGeometryClass::Intersect_OBBox -- test for intersection with the given OBBox * - * MeshGeometryClass::Cast_World_Space_AABox -- test for intersection with a worldspace AABox* - * MeshGeometryClass::cast_semi_infinite_axis_aligned_ray -- casts an axis aligned ray * - * MeshGeometryClass::cast_aabox_identity -- aligned aabox test * - * MeshGeometryClass::cast_aabox_z90 -- aabox test which is rotated about z by 90 * - * MeshGeometryClass::cast_aabox_z180 -- aabox test which is rotated about z by 180 * - * MeshGeometryClass::cast_aabox_z270 -- aabox test which is rotated about z by 270 * - * MeshGeometryClass::cast_ray_brute_force -- brute force ray-cast * - * MeshGeometryClass::cast_aabox_brute_force -- brute force aabox cast * - * MeshGeometryClass::cast_obbox_brute_force -- brute force obbox cast * - * MeshGeometryClass::intersect_obbox_brute_force -- brute force intersection check * - * MeshGeometryClass::Compute_Plane_Equations -- Recalculates the plane equations * - * MeshGeometryClass::Compute_Vertex_Normals -- recompute the vertex normals * - * MeshGeometryClass::Compute_Bounds -- recomputes the bounding volumes * - * MeshGeometryClass::get_vert_normals -- get the vertex normal array * - * MeshGeometryClass::Get_Vertex_Normal_Array -- validates and returns the vertex normal arr * - * MeshGeometryClass::get_planes -- get the plane array memory (internal) * - * MeshGeometryClass::Get_Plane_Array -- validates and returns the array of plane equations * - * MeshGeometryClass::Compute_Plane -- compute the plane equation of a single poly * - * MeshGeometryClass::Generate_Culling_Tree -- Generate an AABTree for this mesh * - * MeshGeometryClass::Load_W3D -- Load a mesh from a w3d * - * MeshGeometryClass::read_chunks -- read w3d chunks * - * MeshGeometryClass::read_vertices -- read the vertex chunk from a W3D file * - * MeshGeometryClass::read_vertex_normals -- read the vertex normals chunk from a w3d file * - * MeshGeometryClass::read_triangles -- read the triangles chunk from a w3d file * - * MeshGeometryClass::read_user_text -- read the user text chunk from a w3d file * - * MeshGeometryClass::read_vertex_influences -- read the vertex influences chunk from a w3d * - * MeshGeometryClass::read_vertex_shade_indices -- read the vertex shade indices chunk * - * MeshGeometryClass::read_aabtree -- read the AABTree chunk from a w3d file * - * MeshGeometryClass::Generate_APT -- generate an apt for a box and view direction * - * MeshGeometryClass::Generate_Rigid_APT -- generate an apt using backface culling * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -109,18 +59,6 @@ static SimpleVecClass _VNormArray(1024); #endif -/*********************************************************************************************** - * MeshGeometryClass::MeshGeometryClass -- Constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/9/2000 gth : Created. * - *=============================================================================================*/ MeshGeometryClass::MeshGeometryClass() : MeshName(nullptr), UserText(nullptr), @@ -145,18 +83,6 @@ MeshGeometryClass::MeshGeometryClass() : } -/*********************************************************************************************** - * MeshGeometryClass::MeshGeometryClass -- Copy Constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/9/2000 gth : Created. * - *=============================================================================================*/ MeshGeometryClass::MeshGeometryClass(const MeshGeometryClass & that) : MeshName(nullptr), UserText(nullptr), @@ -182,18 +108,6 @@ MeshGeometryClass::MeshGeometryClass(const MeshGeometryClass & that) : } -/*********************************************************************************************** - * -- assignment operator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/9/2000 gth : Created. * - *=============================================================================================*/ MeshGeometryClass & MeshGeometryClass::operator = (const MeshGeometryClass & that) { if (this != &that) { @@ -231,36 +145,13 @@ MeshGeometryClass & MeshGeometryClass::operator = (const MeshGeometryClass & tha } -/*********************************************************************************************** - * MeshGeometryClass::~MeshGeometryClass -- destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/9/2000 gth : Created. * - *=============================================================================================*/ MeshGeometryClass::~MeshGeometryClass() { Reset_Geometry(0,0); } -/*********************************************************************************************** - * MeshGeometryClass::Reset_Geometry -- releases current resources and allocates space if need * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/9/2000 gth : Created. * - *=============================================================================================*/ +// Releases current resources and allocates space if needed. void MeshGeometryClass::Reset_Geometry(int polycount,int vertcount) { // Release everything we have and reset to initial state @@ -301,18 +192,6 @@ void MeshGeometryClass::Reset_Geometry(int polycount,int vertcount) } -/*********************************************************************************************** - * MeshGeometryClass::Get_Name -- returns the name * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/9/2000 gth : Created. * - *=============================================================================================*/ const char * MeshGeometryClass::Get_Name() const { if (MeshName) { @@ -322,18 +201,6 @@ const char * MeshGeometryClass::Get_Name() const } -/*********************************************************************************************** - * MeshGeometryClass::Set_Name -- set the name of this model * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/9/2000 gth : Created. * - *=============================================================================================*/ void MeshGeometryClass::Set_Name(const char * newname) { if (MeshName) { @@ -346,18 +213,6 @@ void MeshGeometryClass::Set_Name(const char * newname) } -/*********************************************************************************************** - * MeshGeometryClass::Get_User_Text -- get the user-text buffer * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/9/2000 gth : Created. * - *=============================================================================================*/ const char * MeshGeometryClass::Get_User_Text() { if (UserText) { @@ -367,18 +222,6 @@ const char * MeshGeometryClass::Get_User_Text() } -/*********************************************************************************************** - * MeshGeometryClass::Set_User_Text -- set the user text buffer * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/9/2000 gth : Created. * - *=============================================================================================*/ void MeshGeometryClass::Set_User_Text(char * usertext) { if (UserText) { @@ -391,18 +234,6 @@ void MeshGeometryClass::Set_User_Text(char * usertext) } -/*********************************************************************************************** - * MeshGeometryClass::Get_Bounding_Box -- get the bounding box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/9/2000 gth : Created. * - *=============================================================================================*/ void MeshGeometryClass::Get_Bounding_Box(AABoxClass * set_box) { WWASSERT(set_box != nullptr); @@ -411,18 +242,6 @@ void MeshGeometryClass::Get_Bounding_Box(AABoxClass * set_box) } -/*********************************************************************************************** - * MeshGeometryClass::Get_Bounding_Sphere -- get the bounding sphere * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/9/2000 gth : Created. * - *=============================================================================================*/ void MeshGeometryClass::Get_Bounding_Sphere(SphereClass * set_sphere) { WWASSERT(set_sphere != nullptr); @@ -431,18 +250,7 @@ void MeshGeometryClass::Get_Bounding_Sphere(SphereClass * set_sphere) } -/*********************************************************************************************** - * MeshGeometryClass::Generate_Rigid_APT -- generate an apt using backface culling * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/10/2001 gth : Created. * - *=============================================================================================*/ +// Generate an apt using backface culling. void MeshGeometryClass::Generate_Rigid_APT(const Vector3 & view_dir, SimpleDynVecClass & apt) { const Vector4 * norms = Get_Plane_Array(); @@ -458,20 +266,7 @@ void MeshGeometryClass::Generate_Rigid_APT(const Vector3 & view_dir, SimpleDynVe } -/*********************************************************************************************** - * MeshGeometryClass::Generate_Rigid_APT -- generate active polygon table * - * * - * This function will cull the mesh against the specified volume * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/9/2000 gth : Created. * - *=============================================================================================*/ +// Generate active polygon table by culling the mesh against the specified volume. void MeshGeometryClass::Generate_Rigid_APT(const OBBoxClass & local_box, SimpleDynVecClass & apt) { if (CullTree != nullptr) { @@ -500,18 +295,7 @@ void MeshGeometryClass::Generate_Rigid_APT(const OBBoxClass & local_box, SimpleD } -/*********************************************************************************************** - * MeshGeometryClass::Generate_APT -- generate an apt for a box and view direction * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/10/2001 gth : Created. * - *=============================================================================================*/ +// Generate an apt for a box and view direction. void MeshGeometryClass::Generate_Rigid_APT(const OBBoxClass & local_box,const Vector3 & viewdir,SimpleDynVecClass & apt) { if (CullTree != nullptr) { @@ -541,20 +325,7 @@ void MeshGeometryClass::Generate_Rigid_APT(const OBBoxClass & local_box,const Ve } } -/*********************************************************************************************** - * MeshGeometryClass::Generate_Skin_APT -- generate an active polygon table * - * * - * This function culls the mesh against the specified volume * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/9/2000 gth : Created. * - *=============================================================================================*/ +// Generate an active polygon table by culling the mesh against the specified volume. void MeshGeometryClass::Generate_Skin_APT(const OBBoxClass & world_box, SimpleDynVecClass & apt, const Vector3 *world_vertex_locs) { WWASSERT(world_vertex_locs); @@ -582,18 +353,7 @@ void MeshGeometryClass::Generate_Skin_APT(const OBBoxClass & world_box, SimpleDy } -/*********************************************************************************************** - * MeshGeometryClass::Contains -- test if the mesh contains the given point * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/9/2000 gth : Created. * - *=============================================================================================*/ +// Test if the mesh contains the given point. bool MeshGeometryClass::Contains(const Vector3 &point) { // To determine whether the mesh contains a point, we will use the parity method (cast a @@ -626,18 +386,6 @@ bool MeshGeometryClass::Contains(const Vector3 &point) } -/*********************************************************************************************** - * MeshGeometryClass::Cast_Ray -- compute a ray intersection with this mesh * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/1/2001 NH : Created. * - *=============================================================================================*/ bool MeshGeometryClass::Cast_Ray(RayCollisionTestClass & raytest) { bool hit = false; @@ -652,18 +400,6 @@ bool MeshGeometryClass::Cast_Ray(RayCollisionTestClass & raytest) } -/*********************************************************************************************** - * MeshGeometryClass::Cast_AABox -- cast an AABox against this mesh * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/1/2001 NH : Created. * - *=============================================================================================*/ bool MeshGeometryClass::Cast_AABox(AABoxCollisionTestClass & boxtest) { bool hit = false; @@ -678,18 +414,6 @@ bool MeshGeometryClass::Cast_AABox(AABoxCollisionTestClass & boxtest) } -/*********************************************************************************************** - * MeshGeometryClass::Cast_OBBox -- Cast an obbox against this mesh * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/1/2001 NH : Created. * - *=============================================================================================*/ bool MeshGeometryClass::Cast_OBBox(OBBoxCollisionTestClass & boxtest) { bool hit = false; @@ -704,18 +428,6 @@ bool MeshGeometryClass::Cast_OBBox(OBBoxCollisionTestClass & boxtest) } -/*********************************************************************************************** - * MeshGeometryClass::Intersect_OBBox -- test for intersection with the given OBBox * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/1/2001 NH : Created. * - *=============================================================================================*/ bool MeshGeometryClass::Intersect_OBBox(OBBoxIntersectionTestClass & boxtest) { bool hit = false; @@ -730,18 +442,7 @@ bool MeshGeometryClass::Intersect_OBBox(OBBoxIntersectionTestClass & boxtest) } -/*********************************************************************************************** - * MeshGeometryClass::Cast_World_Space_AABox -- test for intersection with a worldspace AABox* - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/1/2001 NH : Created. * - *=============================================================================================*/ +// Test for intersection with a worldspace AABox. bool MeshGeometryClass::Cast_World_Space_AABox(AABoxCollisionTestClass & boxtest, const Matrix3D &transform) { /* @@ -807,20 +508,7 @@ bool MeshGeometryClass::Cast_World_Space_AABox(AABoxCollisionTestClass & boxtest } -/*********************************************************************************************** - * MeshGeometryClass::cast_semi_infinite_axis_aligned_ray -- casts an axis aligned ray * - * * - * This function is used by the 'Contains' function * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/9/2000 gth : Created. * - *=============================================================================================*/ +// This function is used by the 'Contains' function. int MeshGeometryClass::cast_semi_infinite_axis_aligned_ray(const Vector3 & start_point, int axis_dir, unsigned char & flags) { @@ -872,18 +560,7 @@ int MeshGeometryClass::cast_semi_infinite_axis_aligned_ray(const Vector3 & start } -/*********************************************************************************************** - * MeshGeometryClass::cast_aabox_identity -- aligned aabox test * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/1/2001 NH : Created. * - *=============================================================================================*/ +// Aligned aabox test. bool MeshGeometryClass::cast_aabox_identity(AABoxCollisionTestClass & boxtest, const Vector3 & translation) { // transform the test into the mesh's coordinate system @@ -899,18 +576,7 @@ bool MeshGeometryClass::cast_aabox_identity(AABoxCollisionTestClass & boxtest, c } -/*********************************************************************************************** - * MeshGeometryClass::cast_aabox_z90 -- aabox test which is rotated about z by 90 * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/1/2001 NH : Created. * - *=============================================================================================*/ +// Aabox test which is rotated about z by 90 degrees. bool MeshGeometryClass::cast_aabox_z90(AABoxCollisionTestClass & boxtest, const Vector3 & translation) { // transform the test into the mesh's coordinate system @@ -938,18 +604,7 @@ bool MeshGeometryClass::cast_aabox_z90(AABoxCollisionTestClass & boxtest, const } -/*********************************************************************************************** - * MeshGeometryClass::cast_aabox_z180 -- aabox test which is rotated about z by 180 * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/1/2001 NH : Created. * - *=============================================================================================*/ +// Aabox test which is rotated about z by 180 degrees. bool MeshGeometryClass::cast_aabox_z180(AABoxCollisionTestClass & boxtest, const Vector3 & translation) { // transform the test into the meshes coordinate system @@ -976,18 +631,7 @@ bool MeshGeometryClass::cast_aabox_z180(AABoxCollisionTestClass & boxtest, const } -/*********************************************************************************************** - * MeshGeometryClass::cast_aabox_z270 -- aabox test which is rotated about z by 270 * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/1/2001 NH : Created. * - *=============================================================================================*/ +// Aabox test which is rotated about z by 270 degrees. bool MeshGeometryClass::cast_aabox_z270(AABoxCollisionTestClass & boxtest, const Vector3 & translation) { // transform the test into the mesh's coordinate system @@ -1015,20 +659,7 @@ bool MeshGeometryClass::cast_aabox_z270(AABoxCollisionTestClass & boxtest, const } -/*********************************************************************************************** - * MeshGeometryClass::intersect_obbox_brute_force -- brute force intersection check * - * * - * This function gets used if the mesh does not have a CullTree * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/1/2001 NH : Created. * - *=============================================================================================*/ +// This function gets used if the mesh does not have a CullTree. bool MeshGeometryClass::intersect_obbox_brute_force(OBBoxIntersectionTestClass & localtest) { TriClass tri; @@ -1063,20 +694,7 @@ bool MeshGeometryClass::intersect_obbox_brute_force(OBBoxIntersectionTestClass & } -/*********************************************************************************************** - * MeshGeometryClass::cast_ray_brute_force -- brute force ray-cast * - * * - * This function gets used if the mesh does not have a CullTree * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/1/2001 NH : Created. * - *=============================================================================================*/ +// This function gets used if the mesh does not have a CullTree. bool MeshGeometryClass::cast_ray_brute_force(RayCollisionTestClass & raytest) { int srtri; @@ -1118,20 +736,7 @@ bool MeshGeometryClass::cast_ray_brute_force(RayCollisionTestClass & raytest) } -/*********************************************************************************************** - * MeshGeometryClass::cast_aabox_brute_force -- brute force aabox cast * - * * - * This function gets used only if the mesh doesn't have a CullTree * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/1/2001 NH : Created. * - *=============================================================================================*/ +// This function gets used only if the mesh doesn't have a CullTree. bool MeshGeometryClass::cast_aabox_brute_force(AABoxCollisionTestClass & boxtest) { /* @@ -1176,20 +781,7 @@ bool MeshGeometryClass::cast_aabox_brute_force(AABoxCollisionTestClass & boxtest } -/*********************************************************************************************** - * MeshGeometryClass::cast_obbox_brute_force -- brute force obbox cast * - * * - * This function gets used only if the mesh doesn't have a CullTree * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/1/2001 NH : Created. * - *=============================================================================================*/ +// This function gets used only if the mesh doesn't have a CullTree. bool MeshGeometryClass::cast_obbox_brute_force(OBBoxCollisionTestClass & boxtest) { /* @@ -1234,20 +826,8 @@ bool MeshGeometryClass::cast_obbox_brute_force(OBBoxCollisionTestClass & boxtest } -/*********************************************************************************************** - * MeshGeometryClass::Compute_Plane_Equations -- Recalculates the plane equations * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * This function should not normally be needed during run-time. * - * The array pointer must point to enough memory to hold a plane equation per polygon * - * * - * HISTORY: * - * 11/9/2000 gth : Created. * - *=============================================================================================*/ +// WARNING: This function should not normally be needed during run-time. The array pointer must +// point to enough memory to hold a plane equation per polygon. void MeshGeometryClass::Compute_Plane_Equations(Vector4 * peq) { WWASSERT(peq!=nullptr); @@ -1271,20 +851,8 @@ void MeshGeometryClass::Compute_Plane_Equations(Vector4 * peq) } -/*********************************************************************************************** - * MeshGeometryClass::Compute_Vertex_Normals -- recompute the vertex normals * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * This function should not normally be needed during run-time. * - * The array pointer must point to an array of Vector3's of size NumVerts * - * * - * HISTORY: * - * 11/9/2000 gth : Created. * - *=============================================================================================*/ +// WARNING: This function should not normally be needed during run-time. The array pointer must +// point to an array of Vector3's of size NumVerts. void MeshGeometryClass::Compute_Vertex_Normals(Vector3 * vnorm) { WWASSERT(vnorm != nullptr); @@ -1354,19 +922,7 @@ void MeshGeometryClass::Compute_Vertex_Normals(Vector3 * vnorm) } -/*********************************************************************************************** - * MeshGeometryClass::Compute_Bounds -- recomputes the bounding volumes * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * This function should not normally be needed during run-time. * - * * - * HISTORY: * - * 11/9/2000 gth : Created. * - *=============================================================================================*/ +// WARNING: This function should not normally be needed during run-time. void MeshGeometryClass::Compute_Bounds(Vector3 * verts) { BoundBoxMin.Set(0,0,0); @@ -1393,18 +949,6 @@ void MeshGeometryClass::Compute_Bounds(Vector3 * verts) -/*********************************************************************************************** - * MeshGeometryClass::get_vert_normals -- get the vertex normal array * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/14/2001 gth : Created. * - *=============================================================================================*/ Vector3 * MeshGeometryClass::get_vert_normals() { #if (OPTIMIZE_VNORM_RAM) @@ -1417,18 +961,6 @@ Vector3 * MeshGeometryClass::get_vert_normals() } -/*********************************************************************************************** - * MeshGeometryClass::Get_Vertex_Normal_Array -- validates and returns the vertex normal array * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/14/2001 gth : Created. * - *=============================================================================================*/ const Vector3 * MeshGeometryClass::Get_Vertex_Normal_Array() { #if (OPTIMIZE_VNORM_RAM) @@ -1444,18 +976,7 @@ const Vector3 * MeshGeometryClass::Get_Vertex_Normal_Array() -/*********************************************************************************************** - * MeshGeometryClass::get_planes -- get the plane array memory (internal) * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/14/2001 gth : Created. * - *=============================================================================================*/ +// Get the plane array memory (internal). Vector4 * MeshGeometryClass::get_planes(bool create) { #if (OPTIMIZE_PLANEEQ_RAM) @@ -1473,18 +994,7 @@ Vector4 * MeshGeometryClass::get_planes(bool create) } -/*********************************************************************************************** - * MeshGeometryClass::Get_Plane_Array -- validates and returns the array of plane equations * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/14/2001 gth : Created. * - *=============================================================================================*/ +// Validates and returns the array of plane equations. const Vector4 * MeshGeometryClass::Get_Plane_Array(bool create) { #if (OPTIMIZE_PLANEEQ_RAM) @@ -1500,18 +1010,7 @@ const Vector4 * MeshGeometryClass::Get_Plane_Array(bool create) #endif } -/*********************************************************************************************** - * MeshGeometryClass::Compute_Plane -- compute the plane equation of a single poly * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/14/2001 gth : Created. * - *=============================================================================================*/ +// Compute the plane equation of a single poly. void MeshGeometryClass::Compute_Plane(int pidx,PlaneClass * set_plane) const { WWASSERT(pidx >= 0); @@ -1523,19 +1022,7 @@ void MeshGeometryClass::Compute_Plane(int pidx,PlaneClass * set_plane) const } -/*********************************************************************************************** - * MeshGeometryClass::Generate_Culling_Tree -- Generate an AABTree for this mesh * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * This function should not normally be needed during run-time. * - * * - * HISTORY: * - * 11/9/2000 gth : Created. * - *=============================================================================================*/ +// WARNING: This function should not normally be needed during run-time. void MeshGeometryClass::Generate_Culling_Tree() { WWMEMLOG(MEM_CULLINGDATA); @@ -1550,21 +1037,8 @@ void MeshGeometryClass::Generate_Culling_Tree() } -/*********************************************************************************************** - * MeshGeometryClass::Load_W3D -- Load a mesh from a w3d file * - * * - * This function will extract just the geometry information from a W3D mesh. It must * - * be completely replaced by any derived classes that want to handle all of the chunks. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/9/2000 gth : Created. * - *=============================================================================================*/ +// This function will extract just the geometry information from a W3D mesh. It must be completely +// replaced by any derived classes that want to handle all of the chunks. WW3DErrorType MeshGeometryClass::Load_W3D(ChunkLoadClass & cload) { /* @@ -1687,21 +1161,8 @@ WW3DErrorType MeshGeometryClass::Load_W3D(ChunkLoadClass & cload) } -/*********************************************************************************************** - * MeshGeometryClass::read_chunks -- read w3d chunks * - * * - * Again, derived classes must replace this function with one that handles all of their * - * chunks in addition to calling to this class for the individual chunks that it handles. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/9/2000 gth : Created. * - *=============================================================================================*/ +// Again, derived classes must replace this function with one that handles all of their chunks in +// addition to calling to this class for the individual chunks that it handles. WW3DErrorType MeshGeometryClass::read_chunks(ChunkLoadClass & cload) { /* @@ -1763,18 +1224,7 @@ WW3DErrorType MeshGeometryClass::read_chunks(ChunkLoadClass & cload) } -/*********************************************************************************************** - * MeshGeometryClass::read_vertices -- read the vertex chunk from a W3D file * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/9/2000 gth : Created. * - *=============================================================================================*/ +// Read the vertex chunk from a W3D file. WW3DErrorType MeshGeometryClass::read_vertices(ChunkLoadClass & cload) { W3dVectorStruct vert; @@ -1796,18 +1246,6 @@ WW3DErrorType MeshGeometryClass::read_vertices(ChunkLoadClass & cload) } -/*********************************************************************************************** - * MeshGeometryClass::read_vertex_normals -- read the vertex normals chunk from a w3d file * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/9/2000 gth : Created. * - *=============================================================================================*/ WW3DErrorType MeshGeometryClass::read_vertex_normals(ChunkLoadClass & cload) { W3dVectorStruct norm; @@ -1826,18 +1264,6 @@ WW3DErrorType MeshGeometryClass::read_vertex_normals(ChunkLoadClass & cload) } -/*********************************************************************************************** - * MeshGeometryClass::read_triangles -- read the triangles chunk from a w3d file * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/9/2000 gth : Created. * - *=============================================================================================*/ WW3DErrorType MeshGeometryClass::read_triangles(ChunkLoadClass & cload) { W3dTriStruct tri; @@ -1875,18 +1301,6 @@ WW3DErrorType MeshGeometryClass::read_triangles(ChunkLoadClass & cload) } -/*********************************************************************************************** - * MeshGeometryClass::read_user_text -- read the user text chunk from a w3d file * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/9/2000 gth : Created. * - *=============================================================================================*/ WW3DErrorType MeshGeometryClass::read_user_text(ChunkLoadClass & cload) { unsigned int textlen = cload.Cur_Chunk_Length(); @@ -1914,18 +1328,7 @@ WW3DErrorType MeshGeometryClass::read_user_text(ChunkLoadClass & cload) } -/*********************************************************************************************** - * MeshGeometryClass::read_vertex_influences -- read the vertex influences chunk from a w3d fi * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/9/2000 gth : Created. * - *=============================================================================================*/ +// Read the vertex influences chunk from a w3d file. WW3DErrorType MeshGeometryClass::read_vertex_influences(ChunkLoadClass & cload) { W3dVertInfStruct vinf; @@ -1945,18 +1348,6 @@ WW3DErrorType MeshGeometryClass::read_vertex_influences(ChunkLoadClass & cload) } -/*********************************************************************************************** - * MeshGeometryClass::read_vertex_shade_indices -- read the vertex shade indices chunk * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/9/2000 gth : Created. * - *=============================================================================================*/ WW3DErrorType MeshGeometryClass::read_vertex_shade_indices(ChunkLoadClass & cload) { uint32 * shade_index = get_shade_indices(true); @@ -1972,18 +1363,6 @@ WW3DErrorType MeshGeometryClass::read_vertex_shade_indices(ChunkLoadClass & cloa } -/*********************************************************************************************** - * MeshGeometryClass::read_aabtree -- read the AABTree chunk from a w3d file * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/9/2000 gth : Created. * - *=============================================================================================*/ WW3DErrorType MeshGeometryClass::read_aabtree(ChunkLoadClass &cload) { REF_PTR_RELEASE(CullTree); diff --git a/Core/Libraries/Source/WWVegas/WW3D2/meshgeometry.h b/Core/Libraries/Source/WWVegas/WW3D2/meshgeometry.h index 4420674f5c0..6063c0be77d 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/meshgeometry.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/meshgeometry.h @@ -32,8 +32,6 @@ * * * $Revision:: 11 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/meshmdl.cpp b/Core/Libraries/Source/WWVegas/WW3D2/meshmdl.cpp index 90819ceb3a3..b115b8ecccc 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/meshmdl.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/meshmdl.cpp @@ -33,8 +33,6 @@ * $Revision:: 48 $* * * * 06/26/02 KM Matrix name change to avoid MAX conflicts * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "meshmdl.h" diff --git a/Core/Libraries/Source/WWVegas/WW3D2/meshmdl.h b/Core/Libraries/Source/WWVegas/WW3D2/meshmdl.h index 257ae2b1c24..61279e6ff33 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/meshmdl.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/meshmdl.h @@ -30,8 +30,6 @@ * * * $Revision:: 40 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/meshmdlio.cpp b/Core/Libraries/Source/WWVegas/WW3D2/meshmdlio.cpp index 672e4d08460..d7992e5b8b2 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/meshmdlio.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/meshmdlio.cpp @@ -30,49 +30,6 @@ * * * $Revision:: 27 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * MeshModelClass::Load_W3D -- Load a mesh from a W3D file * - * MeshModelClass::read_chunks -- read all of the chunks for a mesh * - * MeshModelClass::read_vertices -- reads the vertex chunk * - * MeshModelClass::read_texcoords -- read in the texture coordinates chunk * - * MeshModelClass::read_vertex_normals -- reads a vertex normal chunk from the w3d file * - * MeshModelClass::read_v3_materials -- Reads in version 3 materials. * - * MeshModelClass::read_triangles -- read the triangles chunk * - * MeshModelClass::read_per_tri_materials -- read the material indices for each triangle * - * MeshModelClass::read_user_text -- read in the user text chunk * - * MeshModelClass::read_vertex_colors -- read in the vertex colors chunk * - * MeshModelClass::read_vertex_influences -- read in the vertex influences chunk * - * MeshModelClass::read_vertex_shade_indices -- read the shade index chunk * - * MeshModelClass::read_material_info -- read the material info chunk * - * MeshModelClass::read_shaders -- read the shaders chunk * - * MeshModelClass::read_vertex_materials -- read the vertex materials chunk * - * MeshModelClass::read_textures -- read the textures chunk * - * MeshModelClass::read_material_pass -- read a material pass chunk * - * MeshModelClass::read_vertex_material_ids -- read the vmat ids for a pass * - * MeshModelClass::read_shader_ids -- read the shader indexes for a pass * - * MeshModelClass::read_dcg -- read the per-vertex diffuse color for a pass * - * MeshModelClass::read_dig -- read the per-vertex diffuse illumination for a pass * - * MeshModelClass::read_scg -- read the specular color for a pass * - * MeshModelClass::read_texture_stage -- read texture stage chunks * - * MeshModelClass::read_texture_ids -- read the texture ids for a pass,stage * - * MeshModelClass::read_stage_texcoords -- read the texcoords for a pass,stage * - * MeshModelClass::read_per_face_texcoord_ids -- read uv indices for given (pass,stage). * - * MeshModelClass::read_prelit_material -- read prelit material chunks. * - * MeshModelClass::read_aabtree -- loads the aabtree chunk * - * MeshModelClass::Save -- Save this mesh model! * - * MeshLoadContextClass::MeshLoadContextClass -- constructor for MeshLoadContextClass * - * MeshLoadContextClass::~MeshLoadContextClass -- destructor * - * MeshLoadContextClass::Get_Texcoord_Array -- returns the texture coordinates array * - * MeshLoadContextClass::Add_Shader -- adds a shader to the array * - * MeshLoadContextClass::Add_Vertex_Materail -- adds a vertex material * - * MeshLoadContextClass::Add_Texture -- adds a texture * - * MeshLoadContextClass::Add_Legacy_Material -- adds a legacy material * - * MeshLoadContextClass::Peek_Legacy_Shader -- returns a legacy shader * - * MeshLoadContextClass::Peek_Legacy_Vertex_Material -- returns a pointer to a legacy vmat * - * MeshLoadContextClass::Peek_Legacy_Texture -- returns a pointer to a texture * - * MeshSaveContextClass::MeshSaveContextClass -- constructor * - * MeshSaveContextClass::~MeshSaveContextClass -- destructor * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "meshmdl.h" @@ -222,18 +179,6 @@ class MeshSaveContextClass }; -/*********************************************************************************************** - * MeshModelClass::Load_W3D -- Load a mesh from a W3D file * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/16/99 GTH : Created. * - *=============================================================================================*/ WW3DErrorType MeshModelClass::Load_W3D(ChunkLoadClass & cload) { MeshLoadContextClass * context = nullptr; @@ -426,18 +371,6 @@ WW3DErrorType MeshModelClass::Load_W3D(ChunkLoadClass & cload) } -/*********************************************************************************************** - * MeshModelClass::read_chunks -- read all of the chunks for a mesh * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/16/99 GTH : Created. * - *=============================================================================================*/ WW3DErrorType MeshModelClass::read_chunks(ChunkLoadClass & cload,MeshLoadContextClass * context) { /* @@ -568,19 +501,7 @@ WW3DErrorType MeshModelClass::read_chunks(ChunkLoadClass & cload,MeshLoadContext } -/*********************************************************************************************** - * MeshModelClass::read_texcoords -- read in the texture coordinates chunk * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/6/98 GTH : Created. * - * 2/16/99 GTH : Moved into MeshModel * - *=============================================================================================*/ +// Read in the texture coordinates chunk. WW3DErrorType MeshModelClass::read_texcoords(ChunkLoadClass & cload,MeshLoadContextClass * context) { W3dTexCoordStruct texcoord; @@ -608,19 +529,6 @@ WW3DErrorType MeshModelClass::read_texcoords(ChunkLoadClass & cload,MeshLoadCont return WW3D_ERROR_OK; } -/*********************************************************************************************** - * MeshModelClass::read_v3_materials -- Reads in version 3 materials. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/2/98 GTH : Created. * - * 2/16/99 GTH : Moved into MeshModelClass * - *=============================================================================================*/ WW3DErrorType MeshModelClass::read_v3_materials(ChunkLoadClass & cload,MeshLoadContextClass * context) { for (unsigned int mi=0; miHeader.NumMaterials; mi++) { @@ -798,18 +706,6 @@ WW3DErrorType MeshModelClass::read_v3_materials(ChunkLoadClass & cload,MeshLoadC } -/*********************************************************************************************** - * MeshModelClass::read_per_tri_materials -- read the material indices for each triangle * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/7/98 GTH : Created. * - *=============================================================================================*/ WW3DErrorType MeshModelClass::read_per_tri_materials(ChunkLoadClass & cload,MeshLoadContextClass * context) { if (context->Header.NumMaterials == 1) return WW3D_ERROR_OK; @@ -860,19 +756,6 @@ WW3DErrorType MeshModelClass::read_per_tri_materials(ChunkLoadClass & cload,Mesh } -/*********************************************************************************************** - * MeshModelClass::read_vertex_colors -- read in the vertex colors chunk * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 10/28/1997 GH : Created. * - * 2/16/99 GTH : Moved into MeshModelClass * - *=============================================================================================*/ WW3DErrorType MeshModelClass::read_vertex_colors(ChunkLoadClass & cload,MeshLoadContextClass * context) { /* @@ -907,18 +790,6 @@ WW3DErrorType MeshModelClass::read_vertex_colors(ChunkLoadClass & cload,MeshLoad } -/*********************************************************************************************** - * MeshModelClass::read_material_info -- read the material info chunk * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/16/99 GTH : Created. * - *=============================================================================================*/ WW3DErrorType MeshModelClass::read_material_info(ChunkLoadClass & cload,MeshLoadContextClass * context) { if (cload.Read(&(context->MatInfo),sizeof(W3dMaterialInfoStruct)) != sizeof(W3dMaterialInfoStruct)) { @@ -929,18 +800,6 @@ WW3DErrorType MeshModelClass::read_material_info(ChunkLoadClass & cload,MeshLoad } -/*********************************************************************************************** - * MeshModelClass::read_shaders -- read the shaders chunk * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/16/99 GTH : Created. * - *=============================================================================================*/ WW3DErrorType MeshModelClass::read_shaders(ChunkLoadClass & cload,MeshLoadContextClass * context) { W3dShaderStruct shader; @@ -959,18 +818,6 @@ WW3DErrorType MeshModelClass::read_shaders(ChunkLoadClass & cload,MeshLoadContex } -/*********************************************************************************************** - * MeshModelClass::read_vertex_materials -- read the vertex materials chunk * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/16/99 GTH : Created. * - *=============================================================================================*/ WW3DErrorType MeshModelClass::read_vertex_materials(ChunkLoadClass & cload,MeshLoadContextClass * context) { while (cload.Open_Chunk()) { @@ -989,19 +836,6 @@ WW3DErrorType MeshModelClass::read_vertex_materials(ChunkLoadClass & cload,MeshL } -/*********************************************************************************************** - * MeshModelClass::read_textures -- read the textures chunk * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/16/99 GTH : Created. * - * 3/05/99 PDS : Broke the guts of this function into a util function in texture.cpp * - *=============================================================================================*/ WW3DErrorType MeshModelClass::read_textures(ChunkLoadClass & cload,MeshLoadContextClass * context) { // Keep reading textures until there are no more... @@ -1018,18 +852,6 @@ WW3DErrorType MeshModelClass::read_textures(ChunkLoadClass & cload,MeshLoadConte } -/*********************************************************************************************** - * MeshModelClass::read_material_pass -- read a material pass chunk * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/16/99 GTH : Created. * - *=============================================================================================*/ WW3DErrorType MeshModelClass::read_material_pass(ChunkLoadClass & cload,MeshLoadContextClass * context) { context->CurTexStage = 0; @@ -1075,19 +897,7 @@ WW3DErrorType MeshModelClass::read_material_pass(ChunkLoadClass & cload,MeshLoad } -/*********************************************************************************************** - * MeshModelClass::read_vertex_material_ids -- read the vmat ids for a pass * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/16/99 GTH : Created. * - * 9/1/2000 gth : Added alternate material desc support * - *=============================================================================================*/ +// Read the vmat ids for a pass. WW3DErrorType MeshModelClass::read_vertex_material_ids(ChunkLoadClass & cload,MeshLoadContextClass * context) { /* @@ -1126,19 +936,7 @@ WW3DErrorType MeshModelClass::read_vertex_material_ids(ChunkLoadClass & cload,Me } -/*********************************************************************************************** - * MeshModelClass::read_shader_ids -- read the shader indexes for a pass * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/16/99 GTH : Created. * - * 9/1/2000 gth : Added alternate material desc support * - *=============================================================================================*/ +// Read the shader indexes for a pass. WW3DErrorType MeshModelClass::read_shader_ids(ChunkLoadClass & cload,MeshLoadContextClass * context) { /* @@ -1219,20 +1017,7 @@ WW3DErrorType MeshModelClass::read_shader_ids(ChunkLoadClass & cload,MeshLoadCon } -/*********************************************************************************************** - * MeshModelClass::read_dcg -- read the per-vertex diffuse color for a pass * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/16/99 GTH : Created. * - * 9/1/2000 gth : Added alternate material desc support * - * 2/9/2001 gth : converted to handle dx8 limitations * - *=============================================================================================*/ +// Read the per-vertex diffuse color for a pass. WW3DErrorType MeshModelClass::read_dcg(ChunkLoadClass & cload,MeshLoadContextClass * context) { /* @@ -1287,20 +1072,7 @@ WW3DErrorType MeshModelClass::read_dcg(ChunkLoadClass & cload,MeshLoadContextCla } -/*********************************************************************************************** - * MeshModelClass::read_dig -- read the per-vertex diffuse illumination for a pass * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/16/99 GTH : Created. * - * 9/1/2000 gth : Added alternate material desc support * - * 2/9/2001 gth : converted to handle dx8 limitations * - *=============================================================================================*/ +// Read the per-vertex diffuse illumination for a pass. WW3DErrorType MeshModelClass::read_dig(ChunkLoadClass & cload,MeshLoadContextClass * context) { /* @@ -1349,38 +1121,13 @@ WW3DErrorType MeshModelClass::read_dig(ChunkLoadClass & cload,MeshLoadContextCla } -/*********************************************************************************************** - * MeshModelClass::read_scg -- read the specular color for a pass * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/16/99 GTH : Created. * - * 9/1/2000 gth : Added alternate material desc support * - * 2/9/2001 gth : new dx8 code no longer supports this chunk * - *=============================================================================================*/ +// Read the specular color for a pass. The dx8 code no longer supports this chunk. WW3DErrorType MeshModelClass::read_scg(ChunkLoadClass & cload,MeshLoadContextClass * context) { return WW3D_ERROR_OK; } -/*********************************************************************************************** - * MeshModelClass::read_texture_stage -- read texture stage chunks * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/16/99 GTH : Created. * - *=============================================================================================*/ WW3DErrorType MeshModelClass::read_texture_stage(ChunkLoadClass & cload,MeshLoadContextClass * context) { while (cload.Open_Chunk()) { @@ -1415,19 +1162,7 @@ WW3DErrorType MeshModelClass::read_texture_stage(ChunkLoadClass & cload,MeshLoad } -/*********************************************************************************************** - * MeshModelClass::read_texture_ids -- read the texture ids for a pass,stage * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/16/99 GTH : Created. * - * 9/1/2000 gth : Added alternate material desc support * - *=============================================================================================*/ +// Read the texture ids for a pass,stage. WW3DErrorType MeshModelClass::read_texture_ids(ChunkLoadClass & cload,MeshLoadContextClass * context) { uint32 texid; @@ -1471,20 +1206,7 @@ WW3DErrorType MeshModelClass::read_texture_ids(ChunkLoadClass & cload,MeshLoadCo } -/*********************************************************************************************** - * MeshModelClass::read_stage_texcoords -- read the texcoords for a pass,stage * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/16/99 GTH : Created. * - * 7/14/99 IML : Lightmap support: calculate vertex count directly from chunk size. * - * 9/1/2000 gth : Added alternate material desc support * - *=============================================================================================*/ +// Read the texcoords for a pass,stage. The vertex count is calculated directly from the chunk size. WW3DErrorType MeshModelClass::read_stage_texcoords(ChunkLoadClass & cload,MeshLoadContextClass * context) { unsigned elementcount; @@ -1519,19 +1241,7 @@ WW3DErrorType MeshModelClass::read_stage_texcoords(ChunkLoadClass & cload,MeshLo } -/*********************************************************************************************** - * MeshModelClass::read_per_face_texcoord_ids -- read uv indices for given (pass,stage). * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/02/99 IML : Created. * - * 9/1/2000 gth : Added alternate material desc support * - *=============================================================================================*/ +// Read uv indices for given (pass,stage). WW3DErrorType MeshModelClass::read_per_face_texcoord_ids (ChunkLoadClass &cload, MeshLoadContextClass *context) { unsigned size; @@ -1568,18 +1278,6 @@ WW3DErrorType MeshModelClass::read_per_face_texcoord_ids (ChunkLoadClass &cload, } -/*********************************************************************************************** - * MeshModelClass::read_prelit_material -- read prelit material chunks. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/02/99 IML : Created. * - *=============================================================================================*/ WW3DErrorType MeshModelClass::read_prelit_material (ChunkLoadClass &cload, MeshLoadContextClass *context) { // If this chunk ID matches the selected prelit chunk ID then load it, otherwise skip it. @@ -1626,19 +1324,7 @@ WW3DErrorType MeshModelClass::read_prelit_material (ChunkLoadClass &cload, MeshL } -/*********************************************************************************************** - * MeshModelClass::post_process -- post loading, perform any processing on this model. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 05/02/00 IML : Created. * - * 7/13/2001 hy : Added static sort postprocessing * - *=============================================================================================*/ +// Post loading, perform any processing on this model, including static sort postprocessing. void MeshModelClass::post_process() { #if 0 @@ -1925,18 +1611,6 @@ void MeshModelClass::install_alternate_material_desc(MeshLoadContextClass * cont } } -/*********************************************************************************************** - * MeshLoadContextClass::MeshLoadContextClass -- constructor for MeshLoadContextClass * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/10/98 GTH : Created. * - *=============================================================================================*/ MeshLoadContextClass::MeshLoadContextClass() { memset(&Header,0,sizeof(Header)); @@ -1949,18 +1623,6 @@ MeshLoadContextClass::MeshLoadContextClass() } -/*********************************************************************************************** - * MeshLoadContextClass::~MeshLoadContextClass -- destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/10/98 GTH : Created. * - *=============================================================================================*/ MeshLoadContextClass::~MeshLoadContextClass() { int i; @@ -1980,20 +1642,7 @@ MeshLoadContextClass::~MeshLoadContextClass() } -/*********************************************************************************************** - * MeshLoadContextClass::Get_Texcoord_Array -- returns the texture coordinates array * - * * - * This function mainly exists to support the obsolete version 3.0 w3d files * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/10/98 GTH : Created. * - *=============================================================================================*/ +// This function mainly exists to support the obsolete version 3.0 w3d files. W3dTexCoordStruct * MeshLoadContextClass::Get_Texcoord_Array() { if (TexCoords == nullptr) { @@ -2003,18 +1652,6 @@ W3dTexCoordStruct * MeshLoadContextClass::Get_Texcoord_Array() } -/*********************************************************************************************** - * MeshLoadContextClass::Add_Shader -- adds a shader to the array * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/10/98 GTH : Created. * - *=============================================================================================*/ int MeshLoadContextClass::Add_Shader(ShaderClass shader) { int index = Shaders.Count(); @@ -2023,18 +1660,6 @@ int MeshLoadContextClass::Add_Shader(ShaderClass shader) } -/*********************************************************************************************** - * MeshLoadContextClass::Add_Vertex_Materail -- adds a vertex material * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/10/98 GTH : Created. * - *=============================================================================================*/ int MeshLoadContextClass::Add_Vertex_Material(VertexMaterialClass * vmat) { WWASSERT(vmat != nullptr); @@ -2045,18 +1670,6 @@ int MeshLoadContextClass::Add_Vertex_Material(VertexMaterialClass * vmat) } -/*********************************************************************************************** - * MeshLoadContextClass::Add_Texture -- adds a texture * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/10/98 GTH : Created. * - *=============================================================================================*/ int MeshLoadContextClass::Add_Texture(TextureClass * tex) { WWASSERT(tex != nullptr); @@ -2067,21 +1680,7 @@ int MeshLoadContextClass::Add_Texture(TextureClass * tex) } -/*********************************************************************************************** - * MeshLoadContextClass::Add_Legacy_Material -- adds a legacy material * - * * - * This function will check to see if the parameters of any of the parts of the material are * - * duplicated. Only unique shaders/vertexmaterials will be actually added. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/10/98 GTH : Created. * - *=============================================================================================*/ +// Only unique shaders/vertexmaterials will be actually added. void MeshLoadContextClass::Add_Legacy_Material(ShaderClass shader,VertexMaterialClass * vmat,TextureClass * tex) { // create a new legacy material @@ -2136,21 +1735,7 @@ void MeshLoadContextClass::Add_Legacy_Material(ShaderClass shader,VertexMaterial } -/*********************************************************************************************** - * MeshLoadContextClass::Peek_Legacy_Shader -- returns a legacy shader * - * * - * This function does the re-indexing to go from the legacy shader index to the actual shader * - * index and then returns that shader * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/10/98 GTH : Created. * - *=============================================================================================*/ +// Re-indexes from the legacy shader index to the actual shader index and then returns that shader. ShaderClass MeshLoadContextClass::Peek_Legacy_Shader(int legacy_material_index) { WWASSERT(legacy_material_index >= 0); @@ -2160,18 +1745,7 @@ ShaderClass MeshLoadContextClass::Peek_Legacy_Shader(int legacy_material_index) } -/*********************************************************************************************** - * MeshLoadContextClass::Peek_Legacy_Vertex_Material -- returns a pointer to a legacy vertex ma* - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/10/98 GTH : Created. * - *=============================================================================================*/ +// Returns a pointer to a legacy vertex material. VertexMaterialClass * MeshLoadContextClass::Peek_Legacy_Vertex_Material(int legacy_material_index) { WWASSERT(legacy_material_index >= 0); @@ -2185,18 +1759,6 @@ VertexMaterialClass * MeshLoadContextClass::Peek_Legacy_Vertex_Material(int lega } -/*********************************************************************************************** - * MeshLoadContextClass::Peek_Legacy_Texture -- returns a pointer to a texture * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/10/98 GTH : Created. * - *=============================================================================================*/ TextureClass * MeshLoadContextClass::Peek_Legacy_Texture(int legacy_material_index) { WWASSERT(legacy_material_index >= 0); @@ -2218,17 +1780,6 @@ Vector2 * MeshLoadContextClass::Get_Temporary_UV_Array(int elementcount) -/*********************************************************************************************** - * MeshSaveContextClass::MeshSaveContextClass -- constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *=============================================================================================*/ MeshSaveContextClass::MeshSaveContextClass() : CurPass(0), CurStage(0) @@ -2236,17 +1787,6 @@ MeshSaveContextClass::MeshSaveContextClass() : } -/*********************************************************************************************** - * MeshSaveContextClass::~MeshSaveContextClass -- destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *=============================================================================================*/ MeshSaveContextClass::~MeshSaveContextClass() { } @@ -2257,18 +1797,6 @@ MeshSaveContextClass::~MeshSaveContextClass() #if 0 // MESH SAVING CODE HAS NOT BEEN MAINTAINED... Leaving here for future reference if we ever need it :-) -/*********************************************************************************************** - * MeshModelClass::Save -- Save this mesh model! * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/16/99 GTH : Created. * - *=============================================================================================*/ WW3DErrorType MeshModelClass::Save_W3D(ChunkSaveClass & csave) { MeshSaveContextClass * context = W3DNEW MeshSaveContextClass; diff --git a/Core/Libraries/Source/WWVegas/WW3D2/metalmap.cpp b/Core/Libraries/Source/WWVegas/WW3D2/metalmap.cpp index 488668b6527..0664a9a583b 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/metalmap.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/metalmap.cpp @@ -33,17 +33,6 @@ * $Revision:: 4 $* * * * 08/05/02 KM Texture class redesign - *---------------------------------------------------------------------------------------------* - * Functions: * - * MMMC::MetalMapManagerClass -- Create metal map manager according to given metal parameters* - * MMMC::MetalMapManagerClass -- Create metal map manager from INI * - * MMMC::~MetalMapManagerClass -- MetalMapManagerClass destructor * - * MMMC::Get_Metal_Map -- Get the texture for a metal map by id number * - * MMMC::Metal_Map_Count -- Get the number of metal maps in the manager * - * MMMC::Update_Lighting -- Update the lighting parameters used for generating the maps * - * MMMC::Update_Textures -- Update metal map textures (call once/frame before rendering) * - * MMMC::initialize_normal_table -- Utility function to initialize the normal table * - * MMMC::initialize_metal_params -- Utility function (shared CTor code) * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "metalmap.h" @@ -62,19 +51,7 @@ */ Vector3 * MetalMapManagerClass::_NormalTable = nullptr; -/*********************************************************************************************** - * MMMC::MetalMapManagerClass -- Create metal map manager from INI * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/23/1999 NH : Created. * - *=============================================================================================*/ +// Create metal map manager from INI. MetalMapManagerClass::MetalMapManagerClass(INIClass &ini) : MapCount(0), Textures(nullptr), @@ -154,19 +131,6 @@ MetalMapManagerClass::MetalMapManagerClass(INIClass &ini) : } -/*********************************************************************************************** - * MMMC::~MetalMapManagerClass -- MetalMapManagerClass destructor * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/19/1999 NH : Created. * - *=============================================================================================*/ MetalMapManagerClass::~MetalMapManagerClass() { if (Textures) { @@ -182,19 +146,7 @@ MetalMapManagerClass::~MetalMapManagerClass() } -/*********************************************************************************************** - * MMMC::Get_Metal_Map -- Get the texture for a metal map by id number * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/19/1999 NH : Created. * - *=============================================================================================*/ +// Get the texture for a metal map by id number. TextureClass * MetalMapManagerClass::Get_Metal_Map(int id) { if (id < 0 || id >= MapCount) return nullptr; @@ -203,38 +155,13 @@ TextureClass * MetalMapManagerClass::Get_Metal_Map(int id) } -/*********************************************************************************************** - * MMMC::Metal_Map_Count -- Get the number of metal maps in the manager * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/19/1999 NH : Created. * - *=============================================================================================*/ int MetalMapManagerClass::Metal_Map_Count() { return MapCount; } -/*********************************************************************************************** - * MMMC::Update_Lighting -- Update the lighting parameters used for generating the maps * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/19/1999 NH : Created. * - *=============================================================================================*/ +// Update the lighting parameters used for generating the maps. void MetalMapManagerClass::Update_Lighting(const Vector3& ambient, const Vector3& main_light_color, const Vector3& main_light_dir, const Vector3& camera_dir) { @@ -244,19 +171,7 @@ void MetalMapManagerClass::Update_Lighting(const Vector3& ambient, const Vector3 CurrentCameraDir= camera_dir; } -/*********************************************************************************************** - * MMMC::Update_Textures -- Update metal map textures (call once/frame before rendering) * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/19/1999 NH : Created. * - *=============================================================================================*/ +// Update metal map textures (call once/frame before rendering). void MetalMapManagerClass::Update_Textures() { // Currently the lighting is done using a simple Phong (actually Blinn) model. @@ -343,19 +258,6 @@ void MetalMapManagerClass::Update_Textures() } } -/*********************************************************************************************** - * MMMC::initialize_normal_table -- Utility function to initialize the normal table * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/19/1999 NH : Created. * - *=============================================================================================*/ void MetalMapManagerClass::initialize_normal_table() { // NOTE: changing the actual static _NormalTable member must be the last thing this function @@ -385,19 +287,7 @@ void MetalMapManagerClass::initialize_normal_table() } -/*********************************************************************************************** - * MMMC::initialize_metal_params -- Utility function (shared CTor code) * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/23/1999 NH : Created. * - *=============================================================================================*/ +// Utility function (shared CTor code). void MetalMapManagerClass::initialize_metal_params(int map_count, MetalParams *metal_params) { MapCount = map_count; diff --git a/Core/Libraries/Source/WWVegas/WW3D2/metalmap.h b/Core/Libraries/Source/WWVegas/WW3D2/metalmap.h index a2d3992e2d6..1e02a006017 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/metalmap.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/metalmap.h @@ -30,8 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/motchan.cpp b/Core/Libraries/Source/WWVegas/WW3D2/motchan.cpp index 2485d251768..3ccd220c807 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/motchan.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/motchan.cpp @@ -31,16 +31,6 @@ * * * $Revision:: 6 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * MotionChannelClass::MotionChannelClass -- constructor * - * MotionChannelClass::~MotionChannelClass -- destructor * - * MotionChannelClass::Free -- de-allocates all memory in use * - * MotionChannelClass::Load -- loads a motion channel from a file * - * BitChannelClass::BitChannelClass -- Constructor for BitChannelClass * - * BitChannelClass::~BitChannelClass -- Destructor for BitChannelClass * - * BitChannelClass::Free -- Free all "external" memory in use * - * BitChannelClass::Load -- Read a bit channel from a w3d chunk * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -78,18 +68,6 @@ static float filtertable[FILTER_TABLE_SIZE] = { }; static bool table_valid = false; -/*********************************************************************************************** - * MotionChannelClass::MotionChannelClass -- constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ MotionChannelClass::MotionChannelClass() : PivotIdx(0), Type(0), @@ -103,35 +81,12 @@ MotionChannelClass::MotionChannelClass() : { } -/*********************************************************************************************** - * MotionChannelClass::~MotionChannelClass -- destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ MotionChannelClass::~MotionChannelClass() { Free(); } -/*********************************************************************************************** - * MotionChannelClass::Free -- de-allocates all memory in use * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ +// De-allocates all memory in use. void MotionChannelClass::Free() { delete[] CompressedData; @@ -142,18 +97,6 @@ void MotionChannelClass::Free() } -/*********************************************************************************************** - * MotionChannelClass::Load -- loads a motion channel from a file * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ bool MotionChannelClass::Load_W3D(ChunkLoadClass & cload) { int size = cload.Cur_Chunk_Length(); @@ -193,17 +136,6 @@ bool MotionChannelClass::Load_W3D(ChunkLoadClass & cload) -/*********************************************************************************************** - * BitChannelClass::BitChannelClass -- Constructor for BitChannelClass * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *=============================================================================================*/ BitChannelClass::BitChannelClass() : PivotIdx(0), Type(0), @@ -215,36 +147,13 @@ BitChannelClass::BitChannelClass() : } -/*********************************************************************************************** - * BitChannelClass::~BitChannelClass -- Destructor for BitChannelClass * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/21/98 GTH : Created. * - *=============================================================================================*/ BitChannelClass::~BitChannelClass() { Free(); } -/*********************************************************************************************** - * BitChannelClass::Free -- Free all "external" memory in use * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/21/98 GTH : Created. * - *=============================================================================================*/ +// Free all "external" memory in use. void BitChannelClass::Free() { delete[] Bits; @@ -252,18 +161,7 @@ void BitChannelClass::Free() } -/*********************************************************************************************** - * BitChannelClass::Load -- Read a bit channel from a w3d chunk * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/21/98 GTH : Created. * - *=============================================================================================*/ +// Read a bit channel from a w3d chunk. bool BitChannelClass::Load_W3D(ChunkLoadClass & cload) { Free(); @@ -305,18 +203,6 @@ bool BitChannelClass::Load_W3D(ChunkLoadClass & cload) } -/*********************************************************************************************** - * TimeCodedMotionChannelClass::TimeCodedMotionChannelClass -- constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ TimeCodedMotionChannelClass::TimeCodedMotionChannelClass() : PivotIdx(0), Type(0), @@ -329,35 +215,12 @@ TimeCodedMotionChannelClass::TimeCodedMotionChannelClass() : { } -/*********************************************************************************************** - * MotionChannelClass::~MotionChannelClass -- destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ TimeCodedMotionChannelClass::~TimeCodedMotionChannelClass() { Free(); } -/*********************************************************************************************** - * TimeCodedMotionChannelClass::Free -- de-allocates all memory in use * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ +// De-allocates all memory in use. void TimeCodedMotionChannelClass::Free() { delete[] Data; @@ -365,18 +228,6 @@ void TimeCodedMotionChannelClass::Free() } -/*********************************************************************************************** - * TimeCodedMotionChannelClass::Load -- loads a motion channel from a file * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ bool TimeCodedMotionChannelClass::Load_W3D(ChunkLoadClass & cload) { int size = cload.Cur_Chunk_Length(); @@ -407,18 +258,6 @@ bool TimeCodedMotionChannelClass::Load_W3D(ChunkLoadClass & cload) } -/*********************************************************************************************** - * TimeCodedMotionChannelClass::Get_Vector -- returns the vector for the specified frame # * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ void TimeCodedMotionChannelClass::Get_Vector(float32 frame,float * setvec) { @@ -526,18 +365,6 @@ Quaternion TimeCodedMotionChannelClass::Get_QuatVector(float32 frame) -/*********************************************************************************************** - * TimeCodedMotionChannelClass::binary_search_index / returns packet index * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 01/27/2000 JGA : Created. * - *=============================================================================================*/ // New version that uses a binary search, and no cache uint32 TimeCodedMotionChannelClass::binary_search_index(uint32 timecode) { @@ -596,18 +423,6 @@ uint32 TimeCodedMotionChannelClass::binary_search_index(uint32 timecode) } -/*********************************************************************************************** - * TimeCodedMotionChannelClass::get_index / returns packet index * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 01/27/2000 JGA : Created. * - *=============================================================================================*/ uint32 TimeCodedMotionChannelClass::get_index(uint32 timecode) { assert(CachedIdx <= LastTimeCodeIdx); @@ -637,18 +452,7 @@ uint32 TimeCodedMotionChannelClass::get_index(uint32 timecode) } -/*********************************************************************************************** - * TimeCodedMotionChannelClass::set_identity -- returns an "identity" vector (not really...hmm...) * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ +// Returns an "identity" vector (not really...hmm...). void TimeCodedMotionChannelClass::set_identity(float * setvec) { if (Type == ANIM_CHANNEL_Q) { @@ -666,17 +470,6 @@ void TimeCodedMotionChannelClass::set_identity(float * setvec) } -/*********************************************************************************************** - * TimeCodedBitChannelClass::TimeCodedBitChannelClass -- Constructor for BitChannelClass * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *=============================================================================================*/ TimeCodedBitChannelClass::TimeCodedBitChannelClass() : PivotIdx(0), Type(0), @@ -687,36 +480,13 @@ TimeCodedBitChannelClass::TimeCodedBitChannelClass() : } -/*********************************************************************************************** - * TimeCodedBitChannelClass::~TimeCodedBitChannelClass -- Destructor for BitChannelClass * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/21/98 GTH : Created. * - *=============================================================================================*/ TimeCodedBitChannelClass::~TimeCodedBitChannelClass() { Free(); } -/*********************************************************************************************** - * TimeCodedBitChannelClass::Free -- Free all "external" memory in use * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/21/98 GTH : Created. * - *=============================================================================================*/ +// Free all "external" memory in use. void TimeCodedBitChannelClass::Free() { delete[] Bits; @@ -724,18 +494,7 @@ void TimeCodedBitChannelClass::Free() } -/*********************************************************************************************** - * TimeCodedBitChannelClass::Load -- Read a bit channel from a w3d chunk * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/21/98 GTH : Created. * - *=============================================================================================*/ +// Read a bit channel from a w3d chunk. bool TimeCodedBitChannelClass::Load_W3D(ChunkLoadClass & cload) { Free(); @@ -775,18 +534,6 @@ bool TimeCodedBitChannelClass::Load_W3D(ChunkLoadClass & cload) } -/*********************************************************************************************** - * TimeCodedBitChannelClass::Get_Bit -- Lookup a bit in the bit channel * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/21/98 GTH : Created. * - *=============================================================================================*/ int TimeCodedBitChannelClass::Get_Bit(int frame) { assert(frame >= 0); @@ -827,18 +574,6 @@ int TimeCodedBitChannelClass::Get_Bit(int frame) // Begin Adaptive Delta -/*********************************************************************************************** - * AdaptiveDeltaMotionChannelClass::AdaptiveDeltaMotionChannelClass -- constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/18/2000 JGA : Created. * - *=============================================================================================*/ AdaptiveDeltaMotionChannelClass::AdaptiveDeltaMotionChannelClass() : PivotIdx(0), Type(0), @@ -868,35 +603,12 @@ AdaptiveDeltaMotionChannelClass::AdaptiveDeltaMotionChannelClass() : } -/*********************************************************************************************** - * MotionChannelClass::~MotionChannelClass -- destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/18/1000 JGA : Created. * - *=============================================================================================*/ AdaptiveDeltaMotionChannelClass::~AdaptiveDeltaMotionChannelClass() { Free(); } -/*********************************************************************************************** - * AdaptiveDeltaMotionChannelClass::Free -- de-allocates all memory in use * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/18/2000 JGA : Created. * - *=============================================================================================*/ +// De-allocates all memory in use. void AdaptiveDeltaMotionChannelClass::Free() { delete[] Data; @@ -907,18 +619,6 @@ void AdaptiveDeltaMotionChannelClass::Free() } -/*********************************************************************************************** - * AdaptiveDeltaMotionChannelClass::Load -- loads a motion channel from a file * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/18/2000 JGA : Created. * - *=============================================================================================*/ bool AdaptiveDeltaMotionChannelClass::Load_W3D(ChunkLoadClass & cload) { int size = cload.Cur_Chunk_Length(); @@ -950,18 +650,6 @@ bool AdaptiveDeltaMotionChannelClass::Load_W3D(ChunkLoadClass & cload) } -/*********************************************************************************************** - * AdaptiveDeltaMotionChannelClass::decompress * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/23/2000 JGA : Created. * - *=============================================================================================*/ #define PACKET_SIZE (9) void AdaptiveDeltaMotionChannelClass::decompress(uint32 frame_idx, float *outdata) { @@ -1116,18 +804,7 @@ void AdaptiveDeltaMotionChannelClass::decompress(uint32 src_idx, float *srcdata, } -/*********************************************************************************************** - * AdaptiveDeltaMotionChannelClass::getframe returns decompressed data for frame/vectorindex * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/18/2000 JGA : Created. * - *=============================================================================================*/ +// Returns decompressed data for frame/vectorindex. float AdaptiveDeltaMotionChannelClass::getframe(uint32 frame_idx, uint32 vector_idx) { // Make sure frame_idx is valid @@ -1192,18 +869,6 @@ float AdaptiveDeltaMotionChannelClass::getframe(uint32 frame_idx, uint32 vector_ } -/*********************************************************************************************** - * AdaptiveDeltaMotionChannelClass::Get_Vector -- returns the vector for the specified frame # * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/18/2000 JGA : Created. * - *=============================================================================================*/ void AdaptiveDeltaMotionChannelClass::Get_Vector(float32 frame,float * setvec) { diff --git a/Core/Libraries/Source/WWVegas/WW3D2/motchan.h b/Core/Libraries/Source/WWVegas/WW3D2/motchan.h index c247d1d5202..bddfe0afadf 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/motchan.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/motchan.h @@ -31,8 +31,6 @@ * * * $Revision:: 5 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/part_emt.cpp b/Core/Libraries/Source/WWVegas/WW3D2/part_emt.cpp index 29b3c241999..7e83f4f9687 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/part_emt.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/part_emt.cpp @@ -33,8 +33,6 @@ * $Revision:: 14 $* * * * 08/05/02 KM Texture class redesign - *-------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "part_emt.h" diff --git a/Core/Libraries/Source/WWVegas/WW3D2/part_emt.h b/Core/Libraries/Source/WWVegas/WW3D2/part_emt.h index edca1518879..b7cd6598630 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/part_emt.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/part_emt.h @@ -30,8 +30,6 @@ * * * $Revision:: 10 $* * * - *-------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/pivot.cpp b/Core/Libraries/Source/WWVegas/WW3D2/pivot.cpp index 80342b1562e..fec8ebcd490 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/pivot.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/pivot.cpp @@ -31,29 +31,12 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * PivotClass::PivotClass -- Constructor for PivotClass * - * PivotClass::Compute_Transform -- Update the pivot's transformation matrix * - * PivotClass::Compute_Transform -- Update the pivot's transformation matrix * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "pivot.h" #include "WWMath/wwmath.h" -/*********************************************************************************************** - * PivotClass::PivotClass -- Constructor for PivotClass * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 07/24/1997 GH : Created. * - *=============================================================================================*/ PivotClass::PivotClass() : Parent(nullptr), BaseTransform(1), diff --git a/Core/Libraries/Source/WWVegas/WW3D2/pivot.h b/Core/Libraries/Source/WWVegas/WW3D2/pivot.h index 167c0094610..2bfc4933dc8 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/pivot.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/pivot.h @@ -31,8 +31,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/pointgr.cpp b/Core/Libraries/Source/WWVegas/WW3D2/pointgr.cpp index 889d75856ef..ef926c0e6f4 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/pointgr.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/pointgr.cpp @@ -33,42 +33,6 @@ * $Revision:: 38 $* * * * 06/26/02 KM Matrix name change to avoid MAX conflicts * - *-------------------------------------------------------------------------* - * Functions: * - * PointGroupClass::PointGroupClass -- PointGroupClass CTor. * - * PointGroupClass::~PointGroupClass -- PointGroupClass DTor. * - * PointGroupClass::operator = -- PointGroupClass assignment operator. * - * PointGroupClass::Set_Arrays -- Set point location/color/enable arrays.* - * PointGroupClass::Set_Point_Size -- Set default point size. * - * PointGroupClass::Get_Point_Size -- Get default point size. * - * PointGroupClass::Set_Point_Color -- Set default point color. * - * PointGroupClass::Get_Point_Color -- Get default point color. * - * PointGroupClass::Set_Point_Alpha -- Set default point alpha. * - * PointGroupClass::Get_Point_Alpha -- Get default point alpha. * - * PointGroupClass::Set_Point_Orientation -- Set default point orientatio* - * PointGroupClass::Get_Point_Orientation -- Get default point orientatio* - * PointGroupClass::Set_Point_Frame -- Set default point frame. * - * PointGroupClass::Get_Point_Frame -- Get default point frame. * - * PointGroupClass::Set_Point_Mode -- Set point rendering method. * - * PointGroupClass::Get_Point_Mode -- Get point rendering method. * - * PointGroupClass::Set_Flag -- Set given flag to on or off. * - * PointGroupClass::Get_Flag -- Get current value (on/off) of given flag.* - * PointGroupClass::Set_Texture -- Set texture used. * - * PointGroupClass::Get_Texture -- Get texture used. * - * PointGroupClass::Set_Shader -- Set shader used. * - * PointGroupClass::Get_Shader -- Get shader used. * - * PointGroupClass::Set_Billboard -- Set whether to billboard. * - * PointGroupClass::Get_Billboard -- Get whether to billboard. * - * PointGroupClass::Get_Discrete_Orientation_Count_Log2 -- what it says * - * PointGroupClass::Set_Discrete_Orientation_Count_Log2 -- what it says. * - * PointGroupClass::Get_Frame_Row_Column_Count_Log2 -- what it says * - * PointGroupClass::Set_Frame_Row_Column_Count_Log2 -- what it says. * - * PointGroupClass::Get_Polygon_Count -- Get estimated polygon count. * - * PointGroupClass::Render -- draw point group. * - * PointGroupClass::vInstance -- Create instance of class. * - * PointGroupClass::sGetClassName -- Get name of class. * - * PointGroupClass::Update_Arrays -- Update all arrays used in rendering * - * PointGroupClass::Peek_Texture -- Peeks texture * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "pointgr.h" #include "vertmaterial.h" @@ -132,18 +96,6 @@ VectorClass VertexUV; // vertex texture coords DX8IndexBufferClass *Tris, *Quads; // Index buffers. SortingIndexBufferClass *SortingTris, *SortingQuads; // Sorting index buffers. -/************************************************************************** - * PointGroupClass::PointGroupClass -- PointGroupClass CTor. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/17/1998 NH : Created. * - *========================================================================*/ PointGroupClass::PointGroupClass() : PointLoc(nullptr), PointDiffuse(nullptr), @@ -169,18 +121,6 @@ PointGroupClass::PointGroupClass() : { } -/************************************************************************** - * PointGroupClass::~PointGroupClass -- PointGroupClass DTor. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/17/1998 NH : Created. * - *========================================================================*/ PointGroupClass::~PointGroupClass() { if (PointLoc) { @@ -213,18 +153,6 @@ PointGroupClass::~PointGroupClass() } } -/************************************************************************** - * PointGroupClass::operator = -- PointGroupClass assignment operator. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/17/1998 NH : Created. * - *========================================================================*/ PointGroupClass & PointGroupClass::operator = (const PointGroupClass & that) { if (this != &that) { @@ -234,29 +162,11 @@ PointGroupClass & PointGroupClass::operator = (const PointGroupClass & that) } -/************************************************************************** - * PointGroupClass::Set_Arrays -- Set point location/color/enable arrays. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * NOTES: colors, alphas, APT, sizes, orientations and frames are * - * optional. active_point_count can also be used with a nullptr apt.* - * In this case active_point_count is ignored if it is -1 * - * (default value) and otherwise it indicates the first N active * - * points in the arrays. * - * The view plane rectangle may optionally be passed as well - * - * this is only used in SCREENSPACE mode. * - * * - * HISTORY: * - * 11/17/1998 NH : Created. * - * 08/25/1999 NH : Alphas added. * - * 06/28/2000 NH : Orientations and frames added. * - * 02/08/2001 HY : Upgraded to DX8 * - *========================================================================*/ +// Set point location/color/enable arrays. Colors, alphas, APT, sizes, orientations and frames are +// optional. active_point_count can also be used with a nullptr apt. In this case active_point_count +// is ignored if it is -1 (default value) and otherwise it indicates the first N active points in +// the arrays. The view plane rectangle may optionally be passed as well - this is only used in +// SCREENSPACE mode. void PointGroupClass::Set_Arrays( ShareBufferClass *locs, ShareBufferClass *diffuse, @@ -300,236 +210,89 @@ void PointGroupClass::Set_Arrays( VPYMax = vpymax; } -/************************************************************************** - * PointGroupClass::Set_Point_Size -- Set default point size. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: This size is ignored if a size array is present. * - * * - * HISTORY: * - * 11/17/1998 NH : Created. * - *========================================================================*/ +// WARNING: This size is ignored if a size array is present. void PointGroupClass::Set_Point_Size(float size) { DefaultPointSize = size; } -/************************************************************************** - * PointGroupClass::Get_Point_Size -- Get default point size. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: This size is ignored if a size array is present. * - * * - * HISTORY: * - * 11/17/1998 NH : Created. * - *========================================================================*/ +// WARNING: This size is ignored if a size array is present. float PointGroupClass::Get_Point_Size() { return DefaultPointSize; } -/************************************************************************** - * PointGroupClass::Set_Point_Color -- Set default point color. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: This color is ignored if a color array is present. * - * * - * HISTORY: * - * 04/20/1999 NH : Created. * - *========================================================================*/ +// WARNING: This color is ignored if a color array is present. void PointGroupClass::Set_Point_Color(Vector3 color) { DefaultPointColor = color; } -/************************************************************************** - * PointGroupClass::Get_Point_Color -- Get default point color. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: This color is ignored if a color array is present. * - * * - * HISTORY: * - * 04/20/1999 NH : Created. * - *========================================================================*/ +// WARNING: This color is ignored if a color array is present. Vector3 PointGroupClass::Get_Point_Color() { return DefaultPointColor; } -/************************************************************************** - * PointGroupClass::Set_Point_Alpha -- Set default point alpha. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: This alpha is ignored if an alpha array is present. * - * * - * HISTORY: * - * 08/25/1999 NH : Created. * - *========================================================================*/ +// WARNING: This alpha is ignored if an alpha array is present. void PointGroupClass::Set_Point_Alpha(float alpha) { DefaultPointAlpha = alpha; } -/************************************************************************** - * PointGroupClass::Get_Point_Alpha -- Get default point alpha. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: This alpha is ignored if an alpha array is present. * - * * - * HISTORY: * - * 08/25/1999 NH : Created. * - *========================================================================*/ +// WARNING: This alpha is ignored if an alpha array is present. float PointGroupClass::Get_Point_Alpha() { return DefaultPointAlpha; } -/************************************************************************** - * PointGroupClass::Set_Point_Orientation -- Set default point orientation* - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: This is ignored if an orientation array is present. * - * * - * NOTE: No need to ensure value in valid range - it will be masked later.* - * * - * HISTORY: * - * 06/28/2000 NH : Created. * - *========================================================================*/ +// No need to ensure value in valid range - it will be masked later. +// WARNING: This is ignored if an orientation array is present. void PointGroupClass::Set_Point_Orientation(unsigned char orientation) { DefaultPointOrientation = orientation; } -/************************************************************************** - * PointGroupClass::Get_Point_Orientation -- Get default point orientation* - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: This is ignored if an orientation array is present. * - * * - * HISTORY: * - * 06/28/2000 NH : Created. * - *========================================================================*/ +// WARNING: This is ignored if an orientation array is present. unsigned char PointGroupClass::Get_Point_Orientation() { return DefaultPointOrientation; } -/************************************************************************** - * PointGroupClass::Set_Point_Frame -- Set default point frame. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: This frame is ignored if an frame array is present. * - * * - * NOTE: No need to ensure value in valid range - it will be masked later.* - * * - * HISTORY: * - * 06/28/2000 NH : Created. * - *========================================================================*/ +// No need to ensure value in valid range - it will be masked later. +// WARNING: This frame is ignored if a frame array is present. void PointGroupClass::Set_Point_Frame(unsigned char frame) { DefaultPointFrame = frame; } -/************************************************************************** - * PointGroupClass::Get_Point_Frame -- Get default point frame. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: This frame is ignored if an frame array is present. * - * * - * HISTORY: * - * 06/28/2000 NH : Created. * - *========================================================================*/ +// WARNING: This frame is ignored if a frame array is present. unsigned char PointGroupClass::Get_Point_Frame() { return DefaultPointFrame; } -/************************************************************************** - * PointGroupClass::Set_Point_Mode -- Set point rendering method. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/17/1998 NH : Created. * - *========================================================================*/ void PointGroupClass::Set_Point_Mode(PointModeEnum mode) { PointMode = mode; } -/************************************************************************** - * PointGroupClass::Get_Point_Mode -- Get point rendering method. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/17/1998 NH : Created. * - *========================================================================*/ PointGroupClass::PointModeEnum PointGroupClass::Get_Point_Mode() { return PointMode; } -/************************************************************************** - * Set_Flag -- PointGroupClass::Set given flag to on or off. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/17/1998 NH : Created. * - *========================================================================*/ +// Set given flag to on or off. void PointGroupClass::Set_Flag(FlagsType flag, bool onoff) { if (onoff) Flags|=1<>flag) & 0x1; } -/************************************************************************** - * PointGroupClass::Set_Texture -- Set texture used. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/17/1998 NH : Created. * - * 02/08/2001 HY : Upgraded to DX8 * - *========================================================================*/ void PointGroupClass::Set_Texture(TextureClass* texture) { REF_PTR_SET(Texture,texture); } -/************************************************************************** - * PointGroupClass::Get_Texture -- Get texture used. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/17/1998 NH : Created. * - * 02/08/2001 HY : Upgraded to DX8 * - *========================================================================*/ TextureClass * PointGroupClass::Get_Texture() { if (Texture) Texture->Add_Ref(); @@ -592,153 +318,47 @@ TextureClass * PointGroupClass::Get_Texture() } -/*********************************************************************************************** - * PointGroupClass::Peek_Texture -- Peeks texture * - * * - * * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/12/2001 hy : Created. * - *=============================================================================================*/ TextureClass * PointGroupClass::Peek_Texture() { return Texture; } -/************************************************************************** - * PointGroupClass::Set_Shader -- Set shader used. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: the primary gradient will be set to MODULATE/DISABLE in * - * the shader depending on whether a color or alpha array was * - * passed in Set_Point_Arrays. also, texturing will be * - * enabled or disabled dependent on whether a non-null * - * texture was set. * - * these will override the primary gradient/texturing * - * settings in the given shader. * - * * - * HISTORY: * - * 11/17/1998 NH : Created. * - * 02/08/2001 HY : Upgraded to DX8 * - *========================================================================*/ +// WARNING: The primary gradient will be set to MODULATE/DISABLE in the shader depending on whether +// a color or alpha array was passed in Set_Point_Arrays. Also, texturing will be enabled or +// disabled dependent on whether a non-null texture was set. These will override the primary +// gradient/texturing settings in the given shader. void PointGroupClass::Set_Shader(ShaderClass shader) { Shader = shader; } -/************************************************************************** - * PointGroupClass::Get_Shader -- Get shader used. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/17/1998 NH : Created. * - * 02/08/2001 HY : Upgraded to DX8 * - *========================================================================*/ ShaderClass PointGroupClass::Get_Shader() { return Shader; } -/************************************************************************** - * PointGroupClass::Set_Billboard -- Set whether to Billboard. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 04/25/2002 JM : Created. * - *========================================================================*/ void PointGroupClass::Set_Billboard(bool shouldBillboard) { Billboard = shouldBillboard; } -/************************************************************************** - * PointGroupClass::Get_Billboard -- Get whether to Billboard. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 04/25/2002 JM : Created. * - *========================================================================*/ bool PointGroupClass::Get_Billboard() { return Billboard; } -/************************************************************************** - * PointGroupClass::Get_Frame_Row_Column_Count_Log2 -- what it says * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/28/2000 NH : Created. * - * 02/08/2001 HY : Upgraded to DX8 * - *========================================================================*/ unsigned char PointGroupClass::Get_Frame_Row_Column_Count_Log2() { return FrameRowColumnCountLog2; } -/************************************************************************** - * PointGroupClass::Set_Frame_Row_Column_Count_Log2 -- what it says. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/28/2000 NH : Created. * - * 02/08/2001 HY : Upgraded to DX8 * - *========================================================================*/ void PointGroupClass::Set_Frame_Row_Column_Count_Log2(unsigned char frccl2) { FrameRowColumnCountLog2 = MIN(frccl2, 4); } -/************************************************************************** - * PointGroupClass::Get_Polygon_Count -- Get estimated polygon count. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/18/1998 NH : Created. * - * 02/08/2001 HY : Upgraded to DX8 * - *========================================================================*/ int PointGroupClass::Get_Polygon_Count() { switch (PointMode) { @@ -754,19 +374,6 @@ int PointGroupClass::Get_Polygon_Count() return 0; } -/************************************************************************** - * PointGroupClass::Render -- draw point group. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/10/1998 NH : Created. * - * 02/08/2001 HY : Upgraded to DX8 * - *========================================================================*/ static SimpleVecClass remap; void PointGroupClass::Render(RenderInfoClass &rinfo) { @@ -1001,18 +608,7 @@ void PointGroupClass::Render(RenderInfoClass &rinfo) -/************************************************************************** - * PointGroupClass::Update_Arrays -- Update all arrays used in rendering * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/17/1998 NH : Created. * - *========================================================================*/ +// Update all arrays used in rendering. void PointGroupClass::Update_Arrays( Vector3 *point_loc, Vector4 *point_diffuse, @@ -1441,18 +1037,7 @@ void PointGroupClass::Update_Arrays( } -/************************************************************************** - * PointGroupClass::_Init -- Create static data. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/28/2000 NH : Created. * - *========================================================================*/ +// Create static data. void PointGroupClass::_Init() { int i, j; @@ -1605,18 +1190,7 @@ void PointGroupClass::_Init() } -/************************************************************************** - * PointGroupClass::_Shutdown -- Destroy static data. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 06/28/2000 NH : Created. * - *========================================================================*/ +// Destroy static data. void PointGroupClass::_Shutdown() { for (int i = 0; i < 5; i++) { @@ -1639,24 +1213,10 @@ void PointGroupClass::_Shutdown() -/************************************************************************** - * PointGroupClass::RenderVolumeParticles -- draw a point group.sandwich * - * * - * This is a specialized renderer. It will draw the particle repeatedly * - * while attenuating opacity appropriately, and bumping the z-position. * - * This is actually done by cloning the particle over and over at * - * successively closer positions to the camera. Very Slow! * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: USE SPARINGLY, IT IS EXPENSIVE!!!!! * - * * - * HISTORY: * - * 12/03/2002 Mark Lorenzen Created. * - * * - *========================================================================*/ +// Draw a point group sandwich. This is a specialized renderer. It will draw the particle repeatedly +// while attenuating opacity appropriately, and bumping the z-position. This is actually done by +// cloning the particle over and over at successively closer positions to the camera. Very Slow! +// WARNING: USE SPARINGLY, IT IS EXPENSIVE!!!!! #define DEFAULT_VOLUME_PARTICLE_DEPTH ( 1 ) #define MAX_VOLUME_PARTICLE_DEPTH ( 16 ) void PointGroupClass::RenderVolumeParticle(RenderInfoClass &rinfo, unsigned int depth ) diff --git a/Core/Libraries/Source/WWVegas/WW3D2/pointgr.h b/Core/Libraries/Source/WWVegas/WW3D2/pointgr.h index 5b1a23d1413..d80ddb0ad57 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/pointgr.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/pointgr.h @@ -30,8 +30,6 @@ * * * $Revision:: 10 $* * * - *-------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/polyinfo.cpp b/Core/Libraries/Source/WWVegas/WW3D2/polyinfo.cpp index 0e5751d1939..fde8e3482ab 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/polyinfo.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/polyinfo.cpp @@ -32,8 +32,6 @@ * * * $Revision:: 3 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ diff --git a/Core/Libraries/Source/WWVegas/WW3D2/polyinfo.h b/Core/Libraries/Source/WWVegas/WW3D2/polyinfo.h index 8eab24e8554..412c922cb8f 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/polyinfo.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/polyinfo.h @@ -30,8 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/predlod.cpp b/Core/Libraries/Source/WWVegas/WW3D2/predlod.cpp index 1d50a2b9d2f..6853ee6d74c 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/predlod.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/predlod.cpp @@ -30,12 +30,6 @@ * * * $Revision:: 5 $* * * - *-------------------------------------------------------------------------* - * Functions: * - * PredictiveLODOptimizerClass::Clear -- clear object list and total cost* - * PredictiveLODOptimizerClass::Add_Object -- adds object to list, cost * - * PredictiveLODOptimizerClass::Optimize_LODs -- does LOD optimization * - * PredictiveLODOptimizerClass::Free -- releases all memory used. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "predlod.h" @@ -182,18 +176,7 @@ LODHeapNode * PredictiveLODOptimizerClass::VisibleObjArray2; int PredictiveLODOptimizerClass::VisibleObjArraySize; -/************************************************************************** - * PredictiveLODOptimizerClass::Clear -- clear object list and total cost * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 03/12/1999 NH : Created. * - *========================================================================*/ +// Clear object list and total cost. void PredictiveLODOptimizerClass::Clear() { if (ObjectArray) { @@ -211,18 +194,7 @@ void PredictiveLODOptimizerClass::Clear() } -/************************************************************************** - * PredictiveLODOptimizerClass::Add_Object -- adds object to list, cost * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 03/12/1999 NH : Created. * - *========================================================================*/ +// Adds object to list, cost. void PredictiveLODOptimizerClass::Add_Object(RenderObjClass *robj) { // If array present but too small, free it and copy it to new array. @@ -253,27 +225,10 @@ void PredictiveLODOptimizerClass::Add_Object(RenderObjClass *robj) } -/************************************************************************** - * PredictiveLODOptimizerClass::Optimize_LODs -- does LOD optimization * - * * - * INPUT: float max_cost - the upper bound on the total scene Cost. * - * * - * OUTPUT: none. * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/08/1997 NH : Created. * - * 04/23/1997 NH : Ported to SR 1.3. * - * 03/12/1999 NH : Moved to PredictiveLODOptimizerClass. * - * * - * COMMENTS: * - * This function implements the algorithm outlined in "Adaptive * - * Display Algorithm for Interactive Frame Rates During Visualization * - * of Complex Virtual Environments", Thomas Funkhouser & Carlo Sequin, * - * SIGGRAPH '93 Proceedings, pp. 247-253. * - * Modifications have been made to support screensize clamping of LODs. * - *========================================================================*/ +// This function implements the algorithm outlined in "Adaptive Display Algorithm for Interactive +// Frame Rates During Visualization of Complex Virtual Environments", Thomas Funkhouser & Carlo +// Sequin, SIGGRAPH '93 Proceedings, pp. 247-253. Modifications have been made to support screensize +// clamping of LODs. void PredictiveLODOptimizerClass::Optimize_LODs(float max_cost) { if (!ObjectArray || NumObjects == 0) return; @@ -365,18 +320,7 @@ void PredictiveLODOptimizerClass::Optimize_LODs(float max_cost) } -/************************************************************************** - * PredictiveLODOptimizerClass::Free -- releases all memory used. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 03/12/1999 NH : Created. * - *========================================================================*/ +// Releases all memory used. void PredictiveLODOptimizerClass::Free() { Clear(); diff --git a/Core/Libraries/Source/WWVegas/WW3D2/predlod.h b/Core/Libraries/Source/WWVegas/WW3D2/predlod.h index 787c3c7b209..ef491754e79 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/predlod.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/predlod.h @@ -30,8 +30,6 @@ * * * $Revision:: 3 $* * * - *-------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/prim_anim.cpp b/Core/Libraries/Source/WWVegas/WW3D2/prim_anim.cpp index 74e8ddd1c31..05541b16709 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/prim_anim.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/prim_anim.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ diff --git a/Core/Libraries/Source/WWVegas/WW3D2/prim_anim.h b/Core/Libraries/Source/WWVegas/WW3D2/prim_anim.h index 6461f28ceb6..6023230fe5e 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/prim_anim.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/prim_anim.h @@ -30,8 +30,6 @@ * * * $Revision:: 2 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/projector.cpp b/Core/Libraries/Source/WWVegas/WW3D2/projector.cpp index aea6a1777ee..ffa4b4e8f0b 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/projector.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/projector.cpp @@ -33,33 +33,12 @@ * $Revision:: 6 $* * * * 06/26/02 KM Matrix name change to avoid MAX conflicts * - *---------------------------------------------------------------------------------------------* - * Functions: * - * ProjectorClass::ProjectorClass -- Constructor * - * ProjectorClass::~ProjectorClass -- Destructor * - * ProjectorClass::Set_Transform -- Set the transform for the projector * - * ProjectorClass::Get_Transform -- Returns the current transform * - * ProjectorClass::Set_Perspective_Projection -- Set up a perspective projection * - * ProjectorClass::Set_Ortho_Projection -- Set up an orthographic projection * - * ProjectorClass::Compute_Texture_Coordinate -- computes texcoord for given world-space poi * - * ProjectorClass::Update_WS_Bounding_Volume -- Recalculate the world-space bounding box * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "projector.h" #include "matrixmapper.h" -/*********************************************************************************************** - * ProjectorClass::ProjectorClass -- Constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *=============================================================================================*/ ProjectorClass::ProjectorClass() : Transform(1), Projection(1), @@ -70,38 +49,13 @@ ProjectorClass::ProjectorClass() : } -/*********************************************************************************************** - * ProjectorClass::~ProjectorClass -- Destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *=============================================================================================*/ ProjectorClass::~ProjectorClass() { REF_PTR_RELEASE(Mapper); } -/*********************************************************************************************** - * ProjectorClass::Set_Transform -- Set the transform for the projector * - * * - * Projectors can be positioned in world space just like cameras! Just point the -Z axis * - * at the target. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/11/00 gth : Created. * - * 1/27/00 gth : Created. * - *=============================================================================================*/ +// Projectors can be positioned in world space just like cameras! Just point the -Z axis at the +// target. void ProjectorClass::Set_Transform(const Matrix3D & tm) { Transform = tm; @@ -109,42 +63,15 @@ void ProjectorClass::Set_Transform(const Matrix3D & tm) } -/*********************************************************************************************** - * ProjectorClass::Get_Transform -- Returns the current transform * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/11/00 gth : Created. * - *=============================================================================================*/ const Matrix3D & ProjectorClass::Get_Transform() const { return Transform; } -/*********************************************************************************************** - * ProjectorClass::Set_Perspective_Projection -- Set up a perspective projection * - * * - * INPUT: * - * hfov - radians, horizontal field of view of the projection * - * vfov - radians, vertical field of view of the projection * - * znear - distance to near clipping plane * - * zfar - distance to far clipping plane * - * * - * OUTPUT: * - * * - * WARNINGS: * - * Remember that znear and zfar are *distances*. They are positive numbers as in the OpenGL * - * convention even though the coordinates will be negative. * - * * - * HISTORY: * - * 1/11/00 gth : Created. * - *=============================================================================================*/ +// Set up a perspective projection. The field of view angles are in radians. +// WARNING: Remember that znear and zfar are *distances*. They are positive numbers as in the OpenGL +// convention even though the coordinates will be negative. void ProjectorClass::Set_Perspective_Projection(float hfov,float vfov,float znear,float zfar) { Mapper->Set_Type(MatrixMapperClass::PERSPECTIVE_PROJECTION); @@ -162,26 +89,8 @@ void ProjectorClass::Set_Perspective_Projection(float hfov,float vfov,float znea } -/*********************************************************************************************** - * ProjectorClass::Set_Ortho_Projection -- Set up an orthographic projection * - * * - * INPUT: * - * xmin - "left" x coordinate in texture (camera) space * - * xmax - "right" x coordinate * - * ymin - "bottom" y coordinate * - * ymax - "top" y coordinate * - * znear - distance to near clipping plane * - * zfar - distance to far clipping plane * - * * - * OUTPUT: * - * * - * WARNINGS: * - * Remember that znear and zfar are *distances*. They are positive numbers as in the OpenGL * - * convention even though the coordinates will be negative. * - * * - * HISTORY: * - * 1/11/00 gth : Created. * - *=============================================================================================*/ +// WARNING: Remember that znear and zfar are *distances*. They are positive numbers as in the OpenGL +// convention even though the coordinates will be negative. void ProjectorClass::Set_Ortho_Projection(float xmin,float xmax,float ymin,float ymax,float znear,float zfar) { Mapper->Set_Type(MatrixMapperClass::ORTHO_PROJECTION); @@ -194,36 +103,14 @@ void ProjectorClass::Set_Ortho_Projection(float xmin,float xmax,float ymin,float } -/*********************************************************************************************** - * ProjectorClass::Compute_Texture_Coordinate -- computes texcoord for given world-space point * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/27/00 gth : Created. * - *=============================================================================================*/ +// Computes texcoord for given world-space point. void ProjectorClass::Compute_Texture_Coordinate(const Vector3 & point,Vector3 * set_stq) { Mapper->Compute_Texture_Coordinate(point,set_stq); } -/*********************************************************************************************** - * ProjectorClass::Update_WS_Bounding_Volume -- Recalculate the world-space bounding box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/11/00 gth : Created. * - *=============================================================================================*/ +// Recalculate the world-space bounding box. void ProjectorClass::Update_WS_Bounding_Volume() { /* diff --git a/Core/Libraries/Source/WWVegas/WW3D2/projector.h b/Core/Libraries/Source/WWVegas/WW3D2/projector.h index 49dc8dd43af..df8df08aace 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/projector.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/projector.h @@ -33,8 +33,6 @@ * $Revision:: 2 $* * * * 06/26/02 KM Matrix name change to avoid MAX conflicts * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/proto.cpp b/Core/Libraries/Source/WWVegas/WW3D2/proto.cpp index d8ef8aa5cd6..fbf15088762 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/proto.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/proto.cpp @@ -33,10 +33,6 @@ * $Revision:: 2 $* * * * 06/26/02 KM Integrating shader system - *---------------------------------------------------------------------------------------------* - * Functions: * - * MeshLoaderClass::Load -- reads in a mesh and creates a prototype for it * - * HModelLoaderClass::Load -- reads in an hmodel definition and creates a prototype for it * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -105,18 +101,7 @@ class HModelPrototypeClass : public PrototypeClass }; -/*********************************************************************************************** - * MeshLoaderClass::Load -- reads in a mesh and creates a prototype for it * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/28/98 GTH : Created. * - *=============================================================================================*/ +// Reads in a mesh and creates a prototype for it. PrototypeClass * MeshLoaderClass::Load_W3D(ChunkLoadClass & cload) { MeshClass * mesh = NEW_REF( MeshClass, () ); @@ -143,18 +128,7 @@ PrototypeClass * MeshLoaderClass::Load_W3D(ChunkLoadClass & cload) } -/*********************************************************************************************** - * HModelLoaderClass::Load -- reads in an hmodel and creates a prototype for it * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/28/98 GTH : Created. * - *=============================================================================================*/ +// Reads in an hmodel and creates a prototype for it. PrototypeClass * HModelLoaderClass::Load_W3D(ChunkLoadClass & cload) { HModelDefClass * hdef = W3DNEW HModelDefClass; diff --git a/Core/Libraries/Source/WWVegas/WW3D2/proto.h b/Core/Libraries/Source/WWVegas/WW3D2/proto.h index 07861b87f7b..1598253e330 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/proto.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/proto.h @@ -30,8 +30,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/proxy.h b/Core/Libraries/Source/WWVegas/WW3D2/proxy.h index 966768c9646..7de43e2aa10 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/proxy.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/proxy.h @@ -30,8 +30,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/rddesc.h b/Core/Libraries/Source/WWVegas/WW3D2/rddesc.h index 1e4c2f6c78b..832261c6d48 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/rddesc.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/rddesc.h @@ -30,8 +30,6 @@ * * * $Revision:: 6 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/render2dsentence.cpp b/Core/Libraries/Source/WWVegas/WW3D2/render2dsentence.cpp index a9db2f836fe..2c35707fb70 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/render2dsentence.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/render2dsentence.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 13 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "render2dsentence.h" diff --git a/Core/Libraries/Source/WWVegas/WW3D2/render2dsentence.h b/Core/Libraries/Source/WWVegas/WW3D2/render2dsentence.h index b8e57e37690..ea4f0d91807 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/render2dsentence.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/render2dsentence.h @@ -30,8 +30,6 @@ * * * $Revision:: 6 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/renderobjectrecycler.cpp b/Core/Libraries/Source/WWVegas/WW3D2/renderobjectrecycler.cpp index 46b1d962fa9..2add4977276 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/renderobjectrecycler.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/renderobjectrecycler.cpp @@ -32,13 +32,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * RenderObjectRecyclerClass::Reset -- reset the cache * - * RenderObjectRecyclerClass::Get_Render_Object -- Create/Re-use a render object * - * RenderObjectRecyclerClass::Return_Render_Object -- Return a render object to the cache * - * RenderObjectRecyclerClass::Insert_Inactive_Model -- Internally add a render object to the * - * RenderObjectRecyclerClass::Reset_Model -- resets a render object so it can be re-used * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "renderobjectrecycler.h" @@ -48,36 +41,13 @@ #include "WWMath/matrix3d.h" -/*********************************************************************************************** - * RenderObjectRecyclerClass::Reset -- reset the pool * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/25/2001 gth : Created. * - *=============================================================================================*/ void RenderObjectRecyclerClass::Reset() { InactiveModels.Reset_List(); } -/*********************************************************************************************** - * RenderObjectRecyclerClass::Get_Render_Object -- Create/Re-use a render object * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/25/2001 gth : Created. * - *=============================================================================================*/ +// Create/Re-use a render object. RenderObjClass * RenderObjectRecyclerClass::Get_Render_Object(const char * name,const Matrix3D & tm) { RefRenderObjListIterator it(&InactiveModels); @@ -111,54 +81,20 @@ RenderObjClass * RenderObjectRecyclerClass::Get_Render_Object(const char * name, } -/*********************************************************************************************** - * RenderObjectRecyclerClass::Return_Render_Object -- Return a render object to the pool * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/25/2001 gth : Created. * - *=============================================================================================*/ void RenderObjectRecyclerClass::Return_Render_Object(RenderObjClass * obj) { Insert_Inactive_Model(obj); } -/*********************************************************************************************** - * RenderObjectRecyclerClass::Insert_Inactive_Model -- Internally add a render object to the po* - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/25/2001 gth : Created. * - *=============================================================================================*/ +// Internally add a render object to the pool. void RenderObjectRecyclerClass::Insert_Inactive_Model(RenderObjClass * obj) { WWASSERT(obj != nullptr); InactiveModels.Add(obj); } -/*********************************************************************************************** - * RenderObjectRecyclerClass::Reset_Model -- resets a render object so it can be re-used * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/8/2001 gth : Created. * - *=============================================================================================*/ +// Resets a render object so it can be re-used. void RenderObjectRecyclerClass::Reset_Model(RenderObjClass * model) { /* diff --git a/Core/Libraries/Source/WWVegas/WW3D2/renderobjectrecycler.h b/Core/Libraries/Source/WWVegas/WW3D2/renderobjectrecycler.h index 20a1904e8f2..8780095c465 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/renderobjectrecycler.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/renderobjectrecycler.h @@ -32,8 +32,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/rendobj.cpp b/Core/Libraries/Source/WWVegas/WW3D2/rendobj.cpp index e2904966ef6..5995bcd64be 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/rendobj.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/rendobj.cpp @@ -34,41 +34,6 @@ * $Revision:: 17 $* * * * 07/01/02 KM Coltype enum change to avoid MAX conflicts * - *---------------------------------------------------------------------------------------------* - * Functions: * - * RenderObjClass::RenderObjClass -- constructor * - * RenderObjClass::RenderObjClass -- copy constructor * - * RenderObjClass::operator == -- assignment operator * - * RenderObjClass::Calculate_Texture_Reduction_Factor -- calculate texture reduction factor * - * RenderObjClass::Set_Texture_Reduction_Factor -- set texture reduction factor. * - * RenderObjClass::Get_Screen_Size -- get normalized area of object. * - * RenderObjClass::Get_Scene -- returns the (add_ref'd) scene pointer * - * RenderObjClass::Set_Container -- sets the container pointer * - * RenderObjClass::Get_Container -- returns the container pointer * - * RenderObjClass::Set_Transform -- set the transform for this object * - * RenderObjClass::Set_Position -- Sets the position of this object * - * RenderObjClass::Get_Transform -- returns the transform for the object * - * RenderObjClass::Get_Position -- returns the position of this render object * - * RenderObjClass::Validate_Transform -- If the transform is dirty, this causes it to be re- * - * RenderObjClass::Get_Sub_Object -- returns pointer to first sub-obj with given name * - * RenderObjClass::Add_Sub_Object_To_Bone -- add an object to a named bone * - * RenderObjClass::Prepare_LOD -- prepare object for predictive and texture LOD processing. * - * RenderObjClass::Get_Cost -- get object rendering cost for predictive LOD processing. * - * RenderObjClass::Update_Sub_Object_Bits -- updates our bits according to our sub-objects * - * RenderObjClass::Update_Sub_Object_Transforms -- re-evaluate the transforms my sub-objects * - * RenderObjClass::Add -- Generic add for render objects * - * RenderObjClass::Remove -- Generic Remove for Render Objects * - * RenderObjClass::Notify_Added -- notifies the object that it is in a scene * - * RenderObjClass::Notify_Removed -- notifies an object that it has been removed * - * RenderObjClass::Update_Cached_Bounding_Volumes -- default collision sphere. * - * RenderObjClass::Get_Obj_Space_Bounding_Sphere -- default collision sphere. * - * RenderObjClass::Get_Obj_Space_Bounding_Box -- default collision box. * - * RenderObjClass::Intersect - Returns true if specified intersection object * - * RenderObjClass::Intersect_Sphere -- tests for intersection with the bounding sphere * - * RenderObjClass::Intersect_Sphere_Quick -- tests for intersection with the bounding sphere * - * RenderObjClass::Build_Dependency_List -- Generates a list of files this obj depends on. * - * RenderObjClass::Build_Texture_List -- Builds a list of texture files this obj depends on. * - * RenderObjClass::Add_Dependencies_To_List -- Add dependent files to the list. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -146,18 +111,6 @@ static inline bool Check_Is_Transform_Identity(const Matrix3D& m) } -/*********************************************************************************************** - * RenderObjClass::RenderObjClass -- constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/04/1997 GH : Created. * - *=============================================================================================*/ RenderObjClass::RenderObjClass() : Bits(DEFAULT_BITS), Transform(1), @@ -174,19 +127,6 @@ RenderObjClass::RenderObjClass() : { } -/*********************************************************************************************** - * RenderObjClass::RenderObjClass -- copy constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/5/97 GTH : Created. * - * 1/28/98 EHC : Created. * - *=============================================================================================*/ RenderObjClass::RenderObjClass(const RenderObjClass & src) : Bits(src.Bits), Transform(src.Transform), @@ -207,19 +147,6 @@ RenderObjClass::RenderObjClass(const RenderObjClass & src) : } -/*********************************************************************************************** - * RenderObjClass -- assignment operator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/5/97 GTH : Created. * - * 2/25/99 GTH : Created. * - *=============================================================================================*/ RenderObjClass & RenderObjClass::operator = (const RenderObjClass & that) { // don't do anything if we're assigning this to this @@ -235,18 +162,6 @@ RenderObjClass & RenderObjClass::operator = (const RenderObjClass & that) } -/*********************************************************************************************** - * RenderObjClass::Calculate_Texture_Reduction_Factor -- calculate texture reduction factor. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 04/08/99 NH : Created. * - *=============================================================================================*/ /* float RenderObjClass::Calculate_Texture_Reduction_Factor(float norm_screensize) { @@ -265,18 +180,6 @@ float RenderObjClass::Calculate_Texture_Reduction_Factor(float norm_screensize) } */ -/*********************************************************************************************** - * RenderObjClass::Set_Texture_Reduction_Factor -- set texture reduction factor. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 04/08/99 NH : Created. * - *=============================================================================================*/ /* void RenderObjClass::Set_Texture_Reduction_Factor(float trf) { @@ -300,18 +203,7 @@ void RenderObjClass::Set_Texture_Reduction_Factor(float trf) } */ -/*********************************************************************************************** - * RenderObjClass::Get_Screen_Size -- get normalized area of object. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/12/99 NH : Created. * - *=============================================================================================*/ +// Get normalized area of object. float RenderObjClass::Get_Screen_Size(CameraClass &camera) { // Currently this works by projecting the bounding sphere to the screen @@ -337,18 +229,7 @@ float RenderObjClass::Get_Screen_Size(CameraClass &camera) } -/*********************************************************************************************** - * RenderObjClass::Get_Scene -- returns the (add_ref'd) scene pointer * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/4/99 GTH : Created. * - *=============================================================================================*/ +// Returns the (add_ref'd) scene pointer. SceneClass * RenderObjClass::Get_Scene() { if (Scene != nullptr) { @@ -358,18 +239,6 @@ SceneClass * RenderObjClass::Get_Scene() } -/*********************************************************************************************** - * RenderObjClass::Set_Container -- sets the container pointer * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/4/99 GTH : Created. * - *=============================================================================================*/ void RenderObjClass::Set_Container(RenderObjClass * con) { // Either we arent currently in a container or we are clearing our container, otherwise @@ -381,36 +250,12 @@ void RenderObjClass::Set_Container(RenderObjClass * con) #ifdef GET_CONTAINER_INLINE // nothing #else -/*********************************************************************************************** - * RenderObjClass::Get_Container -- returns the container pointer * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/4/99 GTH : Created. * - *=============================================================================================*/ RenderObjClass * RenderObjClass::Get_Container() const { return Container; } #endif -/*********************************************************************************************** - * RenderObjClass::Set_Transform -- set the transform for this object * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/25/99 GTH : Created. * - *=============================================================================================*/ void RenderObjClass::Set_Transform(const Matrix3D &m) { Transform = m; @@ -419,19 +264,6 @@ void RenderObjClass::Set_Transform(const Matrix3D &m) } -/*********************************************************************************************** - * RenderObjClass::Set_Position -- Sets the position of this object * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/25/99 GTH : Created. * - * 07/14/2001 SKB : Add Check_Is_Transform_Identity * - *=============================================================================================*/ void RenderObjClass::Set_Position(const Vector3 &v) { Transform.Set_Translation(v); @@ -440,18 +272,7 @@ void RenderObjClass::Set_Position(const Vector3 &v) } -/*********************************************************************************************** - * RenderObjClass::Validate_Transform -- If the transform is dirty, this causes it to be re-ca * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/15/99 GTH : Created. * - *=============================================================================================*/ +// If the transform is dirty, this causes it to be re-calculated. void RenderObjClass::Validate_Transform() const { /* @@ -482,20 +303,7 @@ void RenderObjClass::Validate_Transform() const IsTransformIdentity = Check_Is_Transform_Identity(Transform); } -/*********************************************************************************************** - * RenderObjClass::Get_Position -- returns the position of this render object * - * * - * Similar to Get_Transform but returns only the position. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/25/99 GTH : Created. * - *=============================================================================================*/ +// Similar to Get_Transform but returns only the position. Vector3 RenderObjClass::Get_Position() const { Validate_Transform(); @@ -503,18 +311,7 @@ Vector3 RenderObjClass::Get_Position() const } -/*********************************************************************************************** - * RenderObjClass::Get_Sub_Object -- returns pointer to first sub-obj with given name * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/4/99 GTH : Created. * - *=============================================================================================*/ +// Returns pointer to first sub-obj with given name. RenderObjClass * RenderObjClass::Get_Sub_Object_By_Name(const char * name, int *index) const { int i; @@ -557,20 +354,10 @@ RenderObjClass * RenderObjClass::Get_Sub_Object_By_Name(const char * name, int * } -/*********************************************************************************************** - * RenderObjClass::Add_Sub_Object_To_Bone -- add an object to a named bone * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: If the bone name is unknown then this function will add the the object to the * - * root transform rather than failing. This is due to the fact that GetBoneIndex * - * returns the root tranform for unknown bones. * - * * - * HISTORY: * - * 3/4/99 GTH : Created. * - *=============================================================================================*/ +// Add an object to a named bone. +// WARNING: If the bone name is unknown then this function will add the object to the root +// transform rather than failing. This is due to the fact that GetBoneIndex returns the root +// transform for unknown bones. int RenderObjClass::Add_Sub_Object_To_Bone(RenderObjClass * subobj,const char * bname) { int bindex = Get_Bone_Index(bname); @@ -578,18 +365,6 @@ int RenderObjClass::Add_Sub_Object_To_Bone(RenderObjClass * subobj,const char * } -/*********************************************************************************************** - * RenderObjClass::Remove_Sub_Objects_From_Bone -- remove all objects from a named bone * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/1/02 NH : Created. * - *=============================================================================================*/ int RenderObjClass::Remove_Sub_Objects_From_Bone(int boneindex) { int count = Get_Num_Sub_Objects_On_Bone(boneindex); @@ -605,34 +380,13 @@ int RenderObjClass::Remove_Sub_Objects_From_Bone(int boneindex) } -/*********************************************************************************************** - * RenderObjClass::Remove_Sub_Objects_From_Bone -- remove all objects from a named bone * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/4/99 NH : Created. * - *=============================================================================================*/ int RenderObjClass::Remove_Sub_Objects_From_Bone(const char * bname) { return Remove_Sub_Objects_From_Bone(Get_Bone_Index(bname)); } -/*********************************************************************************************** - * RenderObjClass::Prepare_LOD -- prepare object for predictive and texture LOD processing. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * HISTORY: * - * 3/11/99 NH : Created. * - *=============================================================================================*/ +// Prepare object for predictive and texture LOD processing. void RenderObjClass::Prepare_LOD(CameraClass &camera) { // Since most RenderObjClass derivatives are not LOD-capable, the default @@ -653,16 +407,7 @@ void RenderObjClass::Prepare_LOD(CameraClass &camera) } -/*********************************************************************************************** - * RenderObjClass::Get_Cost -- get object rendering cost for predictive LOD processing. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * HISTORY: * - * 3/11/99 NH : Created. * - *=============================================================================================*/ +// Get object rendering cost for predictive LOD processing. float RenderObjClass::Get_Cost() const { int polycount = Get_Num_Polys(); @@ -672,25 +417,11 @@ float RenderObjClass::Get_Cost() const } -/*********************************************************************************************** - * RenderObjClass::Calculate_Cost_Value_Arrays -- calc arrays for predictive LOD processing. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNING: This member function assumes that the arrays passed are large enough (# LODs for * - * the cost array and # LODs + 1 for the value array) to contain the desired data. * - * * - * NOTE: This member function is usually only called internally inside LOD objects for * - * initialization purposes, or externally by specialized LOD objects like the G * - * predictive LOD PIP proxy. * - * * - * NOTE: The screen area used is in normalized units. * - * * - * HISTORY: * - * 3/11/99 NH : Created. * - *=============================================================================================*/ +// Calc arrays for predictive LOD processing. This member function is usually only called internally +// inside LOD objects for initialization purposes, or externally by specialized LOD objects like the +// G predictive LOD PIP proxy. The screen area used is in normalized units. +// WARNING: This member function assumes that the arrays passed are large enough (# LODs for the +// cost array and # LODs + 1 for the value array) to contain the desired data. int RenderObjClass::Calculate_Cost_Value_Arrays(float screen_area, float *values, float *costs) const { values[0] = AT_MIN_LOD; @@ -701,23 +432,10 @@ int RenderObjClass::Calculate_Cost_Value_Arrays(float screen_area, float *values } -/*********************************************************************************************** - * RenderObjClass::Update_Sub_Object_Bits -- updates our bits according to our sub-objects * - * * - * This should be called by any object that contains other objects whenever a sub object is * - * added or removed. It updates the status of the attribute bits which are supposed to be * - * the union of all of the sub-objects attributes. (I.e. if one of our sub-objects is * - * translucent, then we should be marked as translucent). * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/25/99 GTH : Created. * - *=============================================================================================*/ +// This should be called by any object that contains other objects whenever a sub object is added or +// removed. It updates the status of the attribute bits which are supposed to be the union of all of +// the sub-objects attributes. (I.e. if one of our sub-objects is translucent, then we should be +// marked as translucent). void RenderObjClass::Update_Sub_Object_Bits() { // this doesn't do anything for non-composite objects @@ -750,39 +468,13 @@ void RenderObjClass::Update_Sub_Object_Bits() } -/*********************************************************************************************** - * RenderObjClass::Update_Sub_Object_Transforms -- re-evaluate the transforms my sub-objects * - * * - * The default implementation is empty, derived classes which have sub-objects should * - * implement it to update the transforms of their sub-objects * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/25/99 GTH : Created. * - *=============================================================================================*/ +// Re-evaluate the transforms of my sub-objects. The default implementation is empty, derived +// classes which have sub-objects should implement it to update the transforms of their sub-objects. void RenderObjClass::Update_Sub_Object_Transforms() { } -/*********************************************************************************************** - * RenderObjClass::Add -- Generic add for render objects * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/04/1997 GH : Created. * - * 2/25/99 GTH : Moved to the base RenderObjClass * - *=============================================================================================*/ void RenderObjClass::Add(SceneClass * scene) { WWASSERT(scene); @@ -791,19 +483,6 @@ void RenderObjClass::Add(SceneClass * scene) Scene->Add_Render_Object(this); } -/*********************************************************************************************** - * RenderObjClass::Remove -- Generic Remove for Render Objects * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/04/1997 GH : Created. * - * 2/25/99 GTH : moved to the base RenderObjClass * - *=============================================================================================*/ bool RenderObjClass::Remove() { // All render objects have their scene pointers set. To check if this is a "top level" @@ -829,70 +508,32 @@ bool RenderObjClass::Remove() } -/*********************************************************************************************** - * RenderObjClass::Notify_Added -- notifies the object that it is in a scene * - * * - * This function will be called whenever an object is directly or indirectly added to a scene * - * An example of "indirect" addition would be if you were added as a sub-object to an HModel * - * that was already in a scene. * - * * - * Override this function if you want to register your object for per-frame-updating or * - * as a VertexProcessor. (See the Register method of SceneClass, ParticleBufferClass, etc) * - * * - * Container objects must forward this notification to their sub objects. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * Due to implementation details of some derived scenes, the SceneClass calls this function. * - * Please dont move the call to this to RenderObjClass::Add * - * Derived classes should also call the base class to ensure that the scene pointer is set * - * * - * HISTORY: * - * 2/25/99 GTH : Created. * - *=============================================================================================*/ +// Notifies the object that it is in a scene. This function will be called whenever an object is +// directly or indirectly added to a scene. An example of "indirect" addition would be if you were +// added as a sub-object to an HModel that was already in a scene. Override this function if you +// want to register your object for per-frame-updating or as a VertexProcessor. (See the Register +// method of SceneClass, ParticleBufferClass, etc). Container objects must forward this notification +// to their sub objects. +// WARNING: Due to implementation details of some derived scenes, the SceneClass calls this +// function. Please don't move the call to this to RenderObjClass::Add. Derived classes should also +// call the base class to ensure that the scene pointer is set. void RenderObjClass::Notify_Added(SceneClass * scene) { Scene = scene; } -/*********************************************************************************************** - * RenderObjClass::Notify_Removed -- notifies an object that it has been removed * - * * - * Works similar to the Notify_Added function. You can override and Unregister yourself from * - * any scene based special processing. Container objects must recurse to their sub objects. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * Derived classes should also call the base class to ensure that the scene pointer is cleared * - * * - * HISTORY: * - * 2/25/99 GTH : Created. * - *=============================================================================================*/ +// Notifies an object that it has been removed. Works similar to the Notify_Added function. You can +// override and Unregister yourself from any scene based special processing. Container objects must +// recurse to their sub objects. +// WARNING: Derived classes should also call the base class to ensure that the scene pointer is +// cleared. void RenderObjClass::Notify_Removed(SceneClass * scene) { Scene = nullptr; } -/*********************************************************************************************** - * RenderObjClass::Update_Cached_Bounding_Volumes -- default collision sphere. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 11/7/97 GTH : Created. * - *=============================================================================================*/ void RenderObjClass::Update_Cached_Bounding_Volumes() const { Get_Obj_Space_Bounding_Box(CachedBoundingBox); @@ -910,19 +551,7 @@ void RenderObjClass::Update_Cached_Bounding_Volumes() const } -/*********************************************************************************************** - * RenderObjClass::Get_Obj_Space_Bounding_Sphere -- default collision sphere. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 28/8/97 NH : Created. * - * 2/25/99 GTH : Moved into RenderObjClass * - *=============================================================================================*/ +// Default collision sphere. void RenderObjClass::Get_Obj_Space_Bounding_Sphere(SphereClass & sphere) const { sphere.Center.Set(0,0,0); @@ -930,39 +559,12 @@ void RenderObjClass::Get_Obj_Space_Bounding_Sphere(SphereClass & sphere) const } -/*********************************************************************************************** - * RenderObjClass::Get_Obj_Space_Bounding_Box -- default collision box. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 28/8/97 NH : Created. * - * 2/25/99 GTH : Moved into RenderObjClass * - *=============================================================================================*/ void RenderObjClass::Get_Obj_Space_Bounding_Box(AABoxClass & box) const { box.Center.Set(0,0,0); box.Extent.Set(0,0,0); } -/*********************************************************************************************** - * RenderObjClass::Intersect - Returns true if specified intersection object * - * intersects this renderobject * - * * - * * - * * - * * - * INPUT: A properly configured Intersection object specifying ray direction & vector * - * * - * OUTPUT: * - * * - * HISTORY: * - * 2/25/99 GTH : Moved into RenderObjClass * - *=============================================================================================*/ bool RenderObjClass::Intersect(IntersectionClass *Intersection, IntersectionResultClass *Final_Result) { @@ -994,18 +596,7 @@ bool RenderObjClass::Intersect(IntersectionClass *Intersection, IntersectionResu } -/*********************************************************************************************** - * RenderObjClass::Intersect_Sphere -- tests for intersection with the bounding sphere * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/25/99 GTH : Created. * - *=============================================================================================*/ +// Tests for intersection with the bounding sphere. bool RenderObjClass::Intersect_Sphere(IntersectionClass *Intersection, IntersectionResultClass *Final_Result) { SphereClass sphere = Get_Bounding_Sphere(); @@ -1013,36 +604,13 @@ bool RenderObjClass::Intersect_Sphere(IntersectionClass *Intersection, Intersect } -/*********************************************************************************************** - * RenderObjClass::Intersect_Sphere_Quick -- tests for intersection with the bounding sphere * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/25/99 GTH : Created. * - *=============================================================================================*/ +// Tests for intersection with the bounding sphere. bool RenderObjClass::Intersect_Sphere_Quick(IntersectionClass *Intersection, IntersectionResultClass *Final_Result) { SphereClass sphere = Get_Bounding_Sphere(); return Intersection->Intersect_Sphere_Quick(sphere, Final_Result); } -/*********************************************************************************************** - * RenderObjClass::Build_Dependency_List -- Generates a list of files this obj depends on. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/18/99 PDS : Created. * - *=============================================================================================*/ bool RenderObjClass::Build_Dependency_List (DynamicVectorClass &file_list, bool recursive) { if (recursive) @@ -1068,18 +636,6 @@ bool RenderObjClass::Build_Dependency_List (DynamicVectorClass &fil } -/*********************************************************************************************** - * RenderObjClass::Build_Texture_List -- Builds a list of texture files this obj depends on. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/18/99 PDS : Created. * - *=============================================================================================*/ bool RenderObjClass::Build_Texture_List ( DynamicVectorClass & texture_file_list, @@ -1114,18 +670,6 @@ bool RenderObjClass::Build_Texture_List return (texture_file_list.Count () > 0); } -/*********************************************************************************************** - * RenderObjClass::Add_Dependencies_To_List -- Add dependent files to the list. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/18/99 PDS : Created. * - *=============================================================================================*/ void RenderObjClass::Add_Dependencies_To_List ( DynamicVectorClass &file_list, diff --git a/Core/Libraries/Source/WWVegas/WW3D2/rendobj.h b/Core/Libraries/Source/WWVegas/WW3D2/rendobj.h index 04aa32f14d6..0195f250e49 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/rendobj.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/rendobj.h @@ -34,8 +34,6 @@ * * * 06/27/02 KM Shader system classid addition * * 07/01/02 KM Coltype enum change to avoid MAX conflicts * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once @@ -553,18 +551,7 @@ WWINLINE const AABoxClass & RenderObjClass::Get_Bounding_Box() const return CachedBoundingBox; } -/************************************************************************** - * Bound_Degrees -- Bounds a degree value between 0 and 360. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 09/22/1997 PWG : Created. * - *========================================================================*/ +// Bounds a degree value between 0 and 360. WWINLINE float Bound_Degrees(float angle) { while (angle > 359) angle -= 360; @@ -572,21 +559,8 @@ WWINLINE float Bound_Degrees(float angle) return angle; } -/*********************************************************************************************** - * RenderObjClass::Get_Transform -- returns the transform for the object * - * * - * If the transform is invalid (a container has been moved or animated) then the transform * - * will be recalculated. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/25/99 GTH : Created. * - *=============================================================================================*/ +// If the transform is invalid (a container has been moved or animated) then the transform will be +// recalculated. WWINLINE const Matrix3D & RenderObjClass::Get_Transform() const { Validate_Transform(); diff --git a/Core/Libraries/Source/WWVegas/WW3D2/ringobj.cpp b/Core/Libraries/Source/WWVegas/WW3D2/ringobj.cpp index d35438a6a88..add25d3cba2 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/ringobj.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/ringobj.cpp @@ -30,44 +30,6 @@ * * * $Revision:: 27 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * RingRenderObjClass::RingRenderObjClass -- Constructor * - * RingRenderObjClass::RingRenderObjClass -- Constructor - init from a definition * - * RingRenderObjClass::RingRenderObjClass -- Copy constructor * - * RingRenderObjClass::~RingRenderObjClass -- destructor * - * RingRenderObjClass::operator -- assignment operator * - * RingRenderObjClass::Get_Num_Polys -- returns number of polygons * - * RingRenderObjClass::Get_Name -- returns name * - * RingRenderObjClass::Set_Name -- sets the name * - * RingRenderObjClass::Set_Color -- Sets the color of the Ring * - * RingRenderObjClass::Init_Ring_Render_System -- global initialization needed for Ring * - * RingRenderObjClass::Shutdown_Ring_Render_System -- cleanup Ring render system * - * RingRenderObjClass::Set_Ring_Display_Mask -- Sets global display mask for all Ringes * - * RingRenderObjClass::Get_Ring_Display_Mask -- returns the display mask * - * RingRenderObjClass::update_mesh_data -- Updates vertex positions, etc * - * RingRenderObjClass::render_Ring -- submits the Ring to the GERD * - * RingRenderObjClass::vis_render_Ring -- submits Ring to the GERD for VIS * - * RingRenderObjClass::RingRenderObjClass -- constructor * - * RingRenderObjClass::RingRenderObjClass -- Constructor - init from a definition * - * RingRenderObjClass::RingRenderObjClass -- copy constructor * - * RingRenderObjClass::RingRenderObjClass -- Constructor from a wwmath aaRing * - * RingRenderObjClass::operator -- assignment operator * - * RingRenderObjClass::Clone -- clones the Ring * - * RingRenderObjClass::Class_ID -- returns the class-id for AARing's * - * RingRenderObjClass::Render -- render this Ring * - * RingRenderObjClass::Special_Render -- special render this Ring (vis) * - * RingRenderObjClass::Set_Transform -- set the transform for this Ring * - * RingRenderObjClass::Set_Position -- Set the position of this Ring * - * RingRenderObjClass::update_cached_Ring -- update the world-space version of this Ring * - * RingRenderObjClass::Cast_Ray -- cast a ray against this Ring * - * RingRenderObjClass::Cast_AARing -- cast an AARing against this Ring * - * RingRenderObjClass::Cast_OBRing -- cast an OBRing against this Ring * - * RingRenderObjClass::Get_Obj_Space_Bounding_Sphere -- return the object-space bounding sper* - * RingRenderObjClass::Get_Obj_Space_Bounding_Box -- returns the obj-space bounding box * - * RingRenderObjClass::Scale -- scales ring uniformly. * - * RingRenderObjClass::Scale -- scales ring non-uniformly. * - * RingRenderObjClass::Update_Cached_Bounding_Volumes -- Updates world-space bounding volum * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -154,18 +116,6 @@ float RingLODCosts[RING_NUM_LOD + 1]; // RING_NUM_LOD doesn't include the null L */ -/*********************************************************************************************** - * RingRenderObjClass::RingRenderObjClass -- Constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ RingRenderObjClass::RingRenderObjClass() : anim_time (0.0F), IsAnimating(false), @@ -197,18 +147,7 @@ RingRenderObjClass::RingRenderObjClass() calculate_value_array(1.0f, Value); } -/*********************************************************************************************** - * RingRenderObjClass::RingRenderObjClass -- Constructor - init from a definition * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ +// Constructor - init from a definition. RingRenderObjClass::RingRenderObjClass(const W3dRingStruct & def) : anim_time (0.0F), IsAnimating(false), @@ -248,18 +187,6 @@ RingRenderObjClass::RingRenderObjClass(const W3dRingStruct & def) } -/*********************************************************************************************** - * RingRenderObjClass::RingRenderObjClass -- Copy constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ RingRenderObjClass::RingRenderObjClass(const RingRenderObjClass & src) : anim_time (0.0F), IsAnimating(false), @@ -291,18 +218,6 @@ RingRenderObjClass::RingRenderObjClass(const RingRenderObjClass & src) } -/*********************************************************************************************** - * RingRenderObjClass::~RingRenderObjClass -- destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/7/2001 gth : Created. * - *=============================================================================================*/ RingRenderObjClass::~RingRenderObjClass() { REF_PTR_RELEASE(RingMaterial); @@ -310,18 +225,6 @@ RingRenderObjClass::~RingRenderObjClass() } -/*********************************************************************************************** - * RingRenderObjClass::operator -- assignment operator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ RingRenderObjClass & RingRenderObjClass::operator = (const RingRenderObjClass & that) { if (this != &that) { @@ -353,18 +256,6 @@ RingRenderObjClass & RingRenderObjClass::operator = (const RingRenderObjClass & } -/*********************************************************************************************** - * RingRenderObjClass::Generate_Shared_Mesh_Arrays -- Generates mesh LOD arrays. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 03/08/00 pds : Created. * - *=============================================================================================*/ void RingRenderObjClass::Generate_Shared_Mesh_Arrays () { // Generate shared Mesh Arrays @@ -402,18 +293,6 @@ void RingRenderObjClass::calculate_value_array(float screen_area, float *values) } -/*********************************************************************************************** - * RingRenderObjClass::Init_Material -- Sets up the material and default shader for the Ring.* - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 03/08/00 pds : Created. * - *=============================================================================================*/ void RingRenderObjClass::Init_Material () { REF_PTR_RELEASE (RingMaterial); @@ -433,71 +312,23 @@ void RingRenderObjClass::Init_Material () -/*********************************************************************************************** - * RingRenderObjClass::Get_Num_Polys -- returns number of polygons * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ int RingRenderObjClass::Get_Num_Polys() const { return RingLODCosts[CurrentLOD]; } -/*********************************************************************************************** - * RingRenderObjClass::Set_Texture * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ void RingRenderObjClass::Set_Texture(TextureClass *tf) { REF_PTR_SET(RingTexture,tf); } -/*********************************************************************************************** - * RingRenderObjClass::Get_Name -- returns name * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ const char * RingRenderObjClass::Get_Name() const { return Name; } -/*********************************************************************************************** - * RingRenderObjClass::Set_Name -- sets the name * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ void RingRenderObjClass::Set_Name(const char * name) { WWASSERT(name != nullptr); @@ -505,18 +336,7 @@ void RingRenderObjClass::Set_Name(const char * name) (void)nameLen; WWASSERT(nameLen < ARRAY_SIZE(Name)); } -/*********************************************************************************************** - * RingRenderObjClass::render_ring -- submits the box to the GERD * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ +// Submits the ring to the GERD. void RingRenderObjClass::render_ring(RenderInfoClass & rinfo,const Vector3 & center,const Vector3 & extent) { // Should never get here with null LOD @@ -599,74 +419,25 @@ void RingRenderObjClass::render_ring(RenderInfoClass & rinfo,const Vector3 & cen } -/*********************************************************************************************** - * RingRenderObjClass::vis_render_ring -- submits box to the GERD for VIS * - * * - * this renders the ring with the specified VIS-ID. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ +// Submits box to the GERD for VIS. This renders the ring with the specified VIS-ID. void RingRenderObjClass::vis_render_ring(SpecialRenderInfoClass & rinfo,const Vector3 & center,const Vector3 & extent) { WWASSERT(0); } -/*********************************************************************************************** - * RingRenderObjClass::Clone -- clones the ring * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ RenderObjClass * RingRenderObjClass::Clone() const { return W3DNEW RingRenderObjClass(*this); } -/*********************************************************************************************** - * RingRenderObjClass::Class_ID -- returns the class-id for Rings's * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ int RingRenderObjClass::Class_ID() const { return RenderObjClass::CLASSID_RING; } -/*********************************************************************************************** - * RingRenderObjClass::Render -- render this ring * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ void RingRenderObjClass::Render(RenderInfoClass & rinfo) { // null LOD @@ -734,18 +505,7 @@ void RingRenderObjClass::Render(RenderInfoClass & rinfo) } -/*********************************************************************************************** - * RingRenderObjClass::Get_Default_Color - get the default (or first frame) value * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/13/2000 pds : Created. * - *=============================================================================================*/ +// Get the default (or first frame) value. Vector3 RingRenderObjClass::Get_Default_Color() const { Vector3 value; @@ -760,18 +520,7 @@ Vector3 RingRenderObjClass::Get_Default_Color() const } -/*********************************************************************************************** - * RingRenderObjClass::Get_Default_Alpha - get the default (or first frame) value * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/13/2000 pds : Created. * - *=============================================================================================*/ +// Get the default (or first frame) value. float RingRenderObjClass::Get_Default_Alpha() const { float value; @@ -786,18 +535,7 @@ float RingRenderObjClass::Get_Default_Alpha() const } -/*********************************************************************************************** - * RingRenderObjClass::Get_Default_Inner_Scale - get the default (or first frame) value * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/13/2000 pds : Created. * - *=============================================================================================*/ +// Get the default (or first frame) value. Vector2 RingRenderObjClass::Get_Default_Inner_Scale() const { Vector2 value; @@ -812,18 +550,7 @@ Vector2 RingRenderObjClass::Get_Default_Inner_Scale() const } -/*********************************************************************************************** - * RingRenderObjClass::Get_Default_Outer_Scale - get the default (or first frame) value * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/13/2000 pds : Created. * - *=============================================================================================*/ +// Get the default (or first frame) value. Vector2 RingRenderObjClass::Get_Default_Outer_Scale() const { Vector2 value; @@ -838,18 +565,7 @@ Vector2 RingRenderObjClass::Get_Default_Outer_Scale() const } -/*********************************************************************************************** - * RingRenderObjClass::Special_Render -- special render this box (vis) * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * -, * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ +// Special render this ring (vis). void RingRenderObjClass::Special_Render(SpecialRenderInfoClass & rinfo) { Matrix3D temp(1); @@ -863,18 +579,6 @@ void RingRenderObjClass::Special_Render(SpecialRenderInfoClass & rinfo) } -/*********************************************************************************************** - * RingRenderObjClass::Set_Transform -- set the transform for this box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ void RingRenderObjClass::Set_Transform(const Matrix3D &m) { RenderObjClass::Set_Transform(m); @@ -882,18 +586,6 @@ void RingRenderObjClass::Set_Transform(const Matrix3D &m) } -/*********************************************************************************************** - * RingRenderObjClass::Set_Position -- Set the position of this box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ void RingRenderObjClass::Set_Position(const Vector3 &v) { RenderObjClass::Set_Position(v); @@ -901,18 +593,7 @@ void RingRenderObjClass::Set_Position(const Vector3 &v) } -/*********************************************************************************************** - * RingRenderObjClass::update_cached_box -- update the world-space version of this box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ +// Update the world-space version of this ring. void RingRenderObjClass::update_cached_box() { CachedBox.Center = Transform.Get_Translation() + ObjSpaceCenter; @@ -920,18 +601,7 @@ void RingRenderObjClass::update_cached_box() } -/*********************************************************************************************** - * RingRenderObjClass::Get_Obj_Space_Bounding_Ring -- return the object-space bounding sphe * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ +// Return the object-space bounding sphere. void RingRenderObjClass::Get_Obj_Space_Bounding_Sphere(SphereClass & sphere) const { sphere.Center = ObjSpaceCenter; @@ -939,18 +609,6 @@ void RingRenderObjClass::Get_Obj_Space_Bounding_Sphere(SphereClass & sphere) con } -/*********************************************************************************************** - * RingRenderObjClass::Get_Obj_Space_Bounding_Box -- returns the obj-space bounding box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ void RingRenderObjClass::Get_Obj_Space_Bounding_Box(AABoxClass & box) const { box.Center = ObjSpaceCenter; @@ -1021,18 +679,6 @@ int RingRenderObjClass::Calculate_Cost_Value_Arrays(float screen_area, float *va } -/*********************************************************************************************** - * RingRenderObjClass::Scale -- scales ring uniformly. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/01/02 NH : Created. * - *=============================================================================================*/ void RingRenderObjClass::Scale(float scale) { if (scale == 1.0f) return; @@ -1056,18 +702,7 @@ void RingRenderObjClass::Scale(float scale) } -/*********************************************************************************************** - * RingRenderObjClass::Scale -- scales ring non-uniformly. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/01/02 NH : Created. * - *=============================================================================================*/ +// Scales ring non-uniformly. void RingRenderObjClass::Scale(float scalex, float scaley, float scalez) { // Scale default values @@ -1097,18 +732,7 @@ void RingRenderObjClass::Scale(float scalex, float scaley, float scalez) } -/*********************************************************************************************** - * RingRenderObjClass::Update_On_Visibility -- Either starts or stops the animation based on vis* - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/04/00 pds : Created. * - *=============================================================================================*/ +// Either starts or stops the animation based on visibility. void RingRenderObjClass::Update_On_Visibility() { // Simply start or stop the animation based on @@ -1120,18 +744,7 @@ void RingRenderObjClass::Update_On_Visibility() } } -/*********************************************************************************************** - * RingRenderObjClass::animate -- Update Current Display state * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/07/00 jga : Created. * - *=============================================================================================*/ +// Update Current Display state. void RingRenderObjClass::animate() { if (Is_Animating ()) { @@ -1377,18 +990,6 @@ RingLoaderClass _RingLoader; // Vertices are ordered as such // center, followed by outer ring // -/*********************************************************************************************** - * RingMeshClass::RingMeshClass -- Constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/07/00 jga : Created. * - *=============================================================================================*/ RingMeshClass::RingMeshClass(float radius, int slices): Radius(radius), Slices(slices), @@ -1406,18 +1007,6 @@ OuterScale (1.0F, 1.0F) Generate(radius, slices); } -/*********************************************************************************************** - * RingMeshClass::RingMeshClass -- Constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/07/00 jga : Created. * - *=============================================================================================*/ RingMeshClass::RingMeshClass(): Radius(0.0f), Slices(0), @@ -1493,18 +1082,7 @@ void RingMeshClass::Scale (const Vector2 &inner_scale, const Vector2 &outer_scal } -/*********************************************************************************************** - * RingMeshClass::Generate - Create Ring Geometry * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/07/00 jga : Created. * - *=============================================================================================*/ +// Create Ring Geometry. void RingMeshClass::Generate(float radius, int slices) { Free (); @@ -1576,35 +1154,12 @@ void RingMeshClass::Generate(float radius, int slices) } -/*********************************************************************************************** - * RingMeshClass::~RingMeshClass -- Destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/07/00 jga : Created. * - *=============================================================================================*/ RingMeshClass::~RingMeshClass() { Free(); } -/*********************************************************************************************** - * RingMeshClass::Free - Release Memory, that the ring mesh is using * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/07/00 jga : Created. * - *=============================================================================================*/ +// Release memory that the ring mesh is using. void RingMeshClass::Free() { diff --git a/Core/Libraries/Source/WWVegas/WW3D2/ringobj.h b/Core/Libraries/Source/WWVegas/WW3D2/ringobj.h index b997bd0c385..ec3ceb833dc 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/ringobj.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/ringobj.h @@ -30,8 +30,6 @@ * * * $Revision:: 5 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/robjlist.h b/Core/Libraries/Source/WWVegas/WW3D2/robjlist.h index e41fb946f5e..5ee22382586 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/robjlist.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/robjlist.h @@ -30,8 +30,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/segline.cpp b/Core/Libraries/Source/WWVegas/WW3D2/segline.cpp index 4c66ee6dcc3..736613d03cd 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/segline.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/segline.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 23 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "segline.h" diff --git a/Core/Libraries/Source/WWVegas/WW3D2/segline.h b/Core/Libraries/Source/WWVegas/WW3D2/segline.h index e934adca877..fd1fc5fd2fc 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/segline.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/segline.h @@ -30,8 +30,6 @@ * * * $Revision:: 12 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/seglinerenderer.cpp b/Core/Libraries/Source/WWVegas/WW3D2/seglinerenderer.cpp index f816e800220..1e1d927a180 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/seglinerenderer.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/seglinerenderer.cpp @@ -33,8 +33,6 @@ * $Revision:: 5 $* * * * 06/26/02 KM Matrix name change to avoid MAX conflicts * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "seglinerenderer.h" diff --git a/Core/Libraries/Source/WWVegas/WW3D2/seglinerenderer.h b/Core/Libraries/Source/WWVegas/WW3D2/seglinerenderer.h index 8053adbf223..81a61808989 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/seglinerenderer.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/seglinerenderer.h @@ -32,8 +32,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/shader.cpp b/Core/Libraries/Source/WWVegas/WW3D2/shader.cpp index 49bc07dd1f1..a65b4c42c98 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/shader.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/shader.cpp @@ -30,14 +30,6 @@ * * * $Revision:: 21 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * ShaderClass::Init_From_Material3 -- Initialize a shader from a Material3 structure * - * ShaderClass::Apply -- Apply the renderstates for this shader * - * ShaderClass::Invert_Backface_Culling -- Globally invert the sense of all backface culling * - * ShaderClass::Is_Backface_Culling_Inverted -- Is backface culling inverted? * - * ShaderClass::Get_SS_Category -- Helper function for static sort system * - * ShaderClass::Guess_Sort_Level -- Guess the static sort level * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "shader.h" @@ -240,18 +232,6 @@ ShaderClass ShaderClass::_PresetMultiplicative2DShader(SC_MUL_2D); ShaderClass ShaderClass::_PresetMultiplicativeSpriteShader(SC_MUL_SPRITE); -/*********************************************************************************************** - * ShaderClass::Init_From_Material3 -- Initialize a shader from a Material3 structure * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/24/2001 gth : Created. * - *=============================================================================================*/ void ShaderClass::Init_From_Material3(const W3dMaterial3Struct & mat3) { if ( mat3.Attributes & W3DMATERIAL_USE_ALPHA ) { @@ -262,21 +242,8 @@ void ShaderClass::Init_From_Material3(const W3dMaterial3Struct & mat3) } -/*********************************************************************************************** - * ShaderClass::Enable_Fog -- Turn on fog for this shader. * - * * - * Enable most appropriate fog mode (FOG_ENABLE, FOG_SCALE_FRAGMENT or FOG_WHITE) for given * - * source and destination blends. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 05/02/00 IML : Created. * - *=============================================================================================*/ +// Enable most appropriate fog mode (FOG_ENABLE, FOG_SCALE_FRAGMENT or FOG_WHITE) for given source +// and destination blends. void ShaderClass::Enable_Fog (const char *source) { @@ -328,18 +295,6 @@ void ShaderClass::Enable_Fog (const char *source) } -/*********************************************************************************************** - * ShaderClass::Report_Unable_To_Fog -- * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 10/04/00 IML : Created. * - *=============================================================================================*/ void ShaderClass::Report_Unable_To_Fog (const char *source) { #ifdef DEBUG_LOGGING @@ -395,18 +350,6 @@ const Blend dstBlendLUT[] = static_assert(ARRAY_SIZE(dstBlendLUT) == ShaderClass::DSTBLEND_MAX, "Incorrect array size"); -/*********************************************************************************************** - * ShaderClass::Apply -- Apply the renderstates for this shader * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/24/2001 gth : Created. * - *=============================================================================================*/ void ShaderClass::Apply() { unsigned long diff; @@ -1043,18 +986,7 @@ void ShaderClass::Apply() } -/*********************************************************************************************** - * ShaderClass::Invert_Backface_Culling -- Globally invert the sense of all backface culling * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/24/2001 gth : Created. * - *=============================================================================================*/ +// Globally invert the sense of all backface culling. void ShaderClass::Invert_Backface_Culling(bool onoff) { if (onoff == true) { @@ -1066,21 +998,7 @@ void ShaderClass::Invert_Backface_Culling(bool onoff) } -/*********************************************************************************************** - * ShaderClass::Get_SS_Category -- Helper function for static sort system * - * * - * * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/13/2001 hy : Created. * - *=============================================================================================*/ +// Helper function for static sort system. ShaderClass::StaticSortCategoryType ShaderClass::Get_SS_Category() const { // category: Opaque @@ -1104,21 +1022,6 @@ ShaderClass::StaticSortCategoryType ShaderClass::Get_SS_Category() const } -/*********************************************************************************************** - * ShaderClass::Guess_Sort_Level -- Guess the static sort level * - * * - * * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 8/27/2001 hy : Created. * - *=============================================================================================*/ int ShaderClass::Guess_Sort_Level() const { int sort_level; @@ -1143,18 +1046,6 @@ int ShaderClass::Guess_Sort_Level() const return sort_level; } -/*********************************************************************************************** - * ShaderClass::Is_Backface_Culling_Inverted -- Is backface culling inverted? * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/24/2001 gth : Created. * - *=============================================================================================*/ bool ShaderClass::Is_Backface_Culling_Inverted() { return (_PolygonCullMode == D3DCULL_CCW); diff --git a/Core/Libraries/Source/WWVegas/WW3D2/shader.h b/Core/Libraries/Source/WWVegas/WW3D2/shader.h index 492f6c72795..ea2f6e361d1 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/shader.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/shader.h @@ -30,8 +30,6 @@ * * * $Revision:: 16 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/shattersystem.cpp b/Core/Libraries/Source/WWVegas/WW3D2/shattersystem.cpp index 3538d143055..9b1024a8241 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/shattersystem.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/shattersystem.cpp @@ -32,8 +32,6 @@ * * * $Revision:: 11 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "shattersystem.h" diff --git a/Core/Libraries/Source/WWVegas/WW3D2/shattersystem.h b/Core/Libraries/Source/WWVegas/WW3D2/shattersystem.h index 2e135df3f1d..18e9cfebae5 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/shattersystem.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/shattersystem.h @@ -32,8 +32,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/shdlib.h b/Core/Libraries/Source/WWVegas/WW3D2/shdlib.h index 0307babe95c..3d2fdb1604a 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/shdlib.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/shdlib.h @@ -32,8 +32,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/snapPts.h b/Core/Libraries/Source/WWVegas/WW3D2/snapPts.h index ebe0f693719..a54d66201fa 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/snapPts.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/snapPts.h @@ -30,8 +30,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/snappts.cpp b/Core/Libraries/Source/WWVegas/WW3D2/snappts.cpp index e285512cb76..f12ce9e47a6 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/snappts.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/snappts.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "snapPts.h" diff --git a/Core/Libraries/Source/WWVegas/WW3D2/sortingrenderer.cpp b/Core/Libraries/Source/WWVegas/WW3D2/sortingrenderer.cpp index 973aaf61c21..a928612e5dd 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/sortingrenderer.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/sortingrenderer.cpp @@ -34,8 +34,6 @@ * * * 06/26/02 KM Matrix name change to avoid MAX conflicts * * 06/27/02 KM Changes to max texture stage caps * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "sortingrenderer.h" diff --git a/Core/Libraries/Source/WWVegas/WW3D2/soundlibrarybridge.h b/Core/Libraries/Source/WWVegas/WW3D2/soundlibrarybridge.h index 367fcc4573b..1eb69956d49 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/soundlibrarybridge.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/soundlibrarybridge.h @@ -31,7 +31,6 @@ * Last update : 10/23/2002 MBL * *--------------------------------------------------------------------------------------------- - * Functions: * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/soundrobj.cpp b/Core/Libraries/Source/WWVegas/WW3D2/soundrobj.cpp index d977a6bacde..9e16e0a47bb 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/soundrobj.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/soundrobj.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 4 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "soundrobj.h" diff --git a/Core/Libraries/Source/WWVegas/WW3D2/soundrobj.h b/Core/Libraries/Source/WWVegas/WW3D2/soundrobj.h index 8342bd34e39..213fe8878cb 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/soundrobj.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/soundrobj.h @@ -30,8 +30,6 @@ * * * $Revision:: 4 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/sphereobj.cpp b/Core/Libraries/Source/WWVegas/WW3D2/sphereobj.cpp index 8fbc2e15bf3..658a82d66cb 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/sphereobj.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/sphereobj.cpp @@ -33,38 +33,6 @@ * $Revision:: 24 $* * * * 06/26/02 KM Matrix name change to avoid MAX conflicts * - *---------------------------------------------------------------------------------------------* - * Functions: * - * SphereRenderObjClass::SphereRenderObjClass -- Constructor * - * SphereRenderObjClass::SphereRenderObjClass -- Constructor - init from a definition * - * SphereRenderObjClass::SphereRenderObjClass -- Copy constructor * - * SphereRenderObjClass::operator -- assignment operator * - * SphereRenderObjClass::Get_Num_Polys -- returns number of polygons * - * SphereRenderObjClass::Get_Name -- returns name * - * SphereRenderObjClass::Set_Name -- sets the name * - * SphereRenderObjClass::render_Sphere -- submits the Sphere to the GERD * - * SphereRenderObjClass::vis_render_Sphere -- submits Sphere to the GERD for VIS * - * SphereRenderObjClass::SphereRenderObjClass -- constructor * - * SphereRenderObjClass::SphereRenderObjClass -- Constructor - init from a definition * - * SphereRenderObjClass::SphereRenderObjClass -- copy constructor * - * SphereRenderObjClass::SphereRenderObjClass -- Constructor from a wwmath aaSphere * - * SphereRenderObjClass::operator -- assignment operator * - * SphereRenderObjClass::Clone -- clones the Sphere * - * SphereRenderObjClass::Class_ID -- returns the class-id for AASphere's * - * SphereRenderObjClass::Render -- render this Sphere * - * SphereRenderObjClass::Special_Render -- special render this Sphere (vis) * - * SphereRenderObjClass::Set_Transform -- set the transform for this Sphere * - * SphereRenderObjClass::Set_Position -- Set the position of this Sphere * - * SphereRenderObjClass::update_cached_Sphere -- update the world-space version of this Spher* - * SphereRenderObjClass::Cast_Ray -- cast a ray against this Sphere * - * SphereRenderObjClass::Cast_AASphere -- cast an AASphere against this Sphere * - * SphereRenderObjClass::Cast_OBSphere -- cast an OBSphere against this Sphere * - * SphereRenderObjClass::Intersect_AASphere -- intersect this Sphere with an AASphere * - * SphereRenderObjClass::Intersect_OBSphere -- Intersect this Sphere with an OBSphere * - * SphereRenderObjClass::Get_Obj_Space_Bounding_Sphere -- return the object-space bounding sp* - * SphereRenderObjClass::Get_Obj_Space_Bounding_Sphere -- returns the obj-space bounding Sphe* - * SphereRenderObjClass::Scale -- scales sphere uniformly. * - * SphereRenderObjClass::Scale -- scales sphere non-uniformly. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -102,18 +70,6 @@ float SphereLODCosts[SPHERE_NUM_LOD + 1]; // SPHERE_NUM_LOD doesn't include the ** SphereRenderObjClass Implementation */ -/*********************************************************************************************** - * SphereRenderObjClass::SphereRenderObjClass -- Constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ SphereRenderObjClass::SphereRenderObjClass() : anim_time (0.0F), IsAnimating (true), @@ -144,18 +100,7 @@ SphereRenderObjClass::SphereRenderObjClass() } -/*********************************************************************************************** - * SphereRenderObjClass::SphereRenderObjClass -- Constructor - init from a definition * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ +// Constructor - init from a definition. SphereRenderObjClass::SphereRenderObjClass(const W3dSphereStruct & def) : anim_time (0.0F), IsAnimating (true), @@ -194,18 +139,6 @@ SphereRenderObjClass::SphereRenderObjClass(const W3dSphereStruct & def) } -/*********************************************************************************************** - * SphereRenderObjClass::SphereRenderObjClass -- Copy constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ SphereRenderObjClass::SphereRenderObjClass(const SphereRenderObjClass & src) : anim_time (0.0F), IsAnimating (true), @@ -239,18 +172,6 @@ SphereRenderObjClass::~SphereRenderObjClass() REF_PTR_RELEASE(SphereMaterial); } -/*********************************************************************************************** - * SphereRenderObjClass::operator -- assignment operator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ SphereRenderObjClass & SphereRenderObjClass::operator = (const SphereRenderObjClass & that) { if (this != &that) { @@ -280,18 +201,6 @@ SphereRenderObjClass & SphereRenderObjClass::operator = (const SphereRenderObjCl } -/*********************************************************************************************** - * SphereRenderObjClass::Generate_Shared_Mesh_Arrays -- Generates mesh LOD arrays. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 03/08/00 pds : Created. * - *=============================================================================================*/ void SphereRenderObjClass::Generate_Shared_Mesh_Arrays (const AlphaVectorStruct &alphavector) { // Generate shared Mesh Arrays @@ -332,18 +241,6 @@ void SphereRenderObjClass::calculate_value_array(float screen_area, float *value } -/*********************************************************************************************** - * SphereRenderObjClass::Init_Material -- Sets up the material and default shader for the sphere.* - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 03/08/00 pds : Created. * - *=============================================================================================*/ void SphereRenderObjClass::Init_Material () { REF_PTR_RELEASE (SphereMaterial); @@ -367,72 +264,24 @@ void SphereRenderObjClass::Init_Material () } -/*********************************************************************************************** - * SphereRenderObjClass::Get_Num_Polys -- returns number of polygons * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ int SphereRenderObjClass::Get_Num_Polys() const { return SphereLODCosts[CurrentLOD]; } -/*********************************************************************************************** - * SphereRenderObjClass::Set_Texture * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ void SphereRenderObjClass::Set_Texture(TextureClass *tf) { REF_PTR_SET(SphereTexture,tf); } -/*********************************************************************************************** - * SphereRenderObjClass::Get_Name -- returns name * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ const char * SphereRenderObjClass::Get_Name() const { return Name; } -/*********************************************************************************************** - * SphereRenderObjClass::Set_Name -- sets the name * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ void SphereRenderObjClass::Set_Name(const char * name) { WWASSERT(name != nullptr); @@ -441,19 +290,6 @@ void SphereRenderObjClass::Set_Name(const char * name) } -/*********************************************************************************************** - * SphereRenderObjClass::render_sphere * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/01/00 jga : Created. * - * 2/19/01 HY : upgraded to DX8 * - *=============================================================================================*/ void SphereRenderObjClass::render_sphere() { // Should never get here with null LOD @@ -530,73 +366,24 @@ void SphereRenderObjClass::render_sphere() } -/*********************************************************************************************** - * SphereRenderObjClass::vis_render_sphere -- submits box to the GERD for VIS * - * * - * this renders the sphere with the specified VIS-ID. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ +// Submits sphere to the GERD for VIS. This renders the sphere with the specified VIS-ID. void SphereRenderObjClass::vis_render_sphere(SpecialRenderInfoClass & rinfo,const Vector3 & center,const Vector3 & extent) { } -/*********************************************************************************************** - * SphereRenderObjClass::Clone -- clones the box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ RenderObjClass * SphereRenderObjClass::Clone() const { return W3DNEW SphereRenderObjClass(*this); } -/*********************************************************************************************** - * SphereRenderObjClass::Class_ID -- returns the class-id for sphere's * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ int SphereRenderObjClass::Class_ID() const { return RenderObjClass::CLASSID_SPHERE; } -/*********************************************************************************************** - * SphereRenderObjClass::Render -- render this box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ void SphereRenderObjClass::Render(RenderInfoClass & rinfo) { // null LOD @@ -683,18 +470,7 @@ void SphereRenderObjClass::Render(RenderInfoClass & rinfo) } -/*********************************************************************************************** - * SphereRenderObjClass::Special_Render -- special render this box (vis) * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ +// Special render this sphere (vis). void SphereRenderObjClass::Special_Render(SpecialRenderInfoClass & rinfo) { Matrix3D temp(1); @@ -708,18 +484,6 @@ void SphereRenderObjClass::Special_Render(SpecialRenderInfoClass & rinfo) } -/*********************************************************************************************** - * SphereRenderObjClass::Set_Transform -- set the transform for this box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ void SphereRenderObjClass::Set_Transform(const Matrix3D &m) { RenderObjClass::Set_Transform(m); @@ -727,18 +491,6 @@ void SphereRenderObjClass::Set_Transform(const Matrix3D &m) } -/*********************************************************************************************** - * SphereRenderObjClass::Set_Position -- Set the position of this box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ void SphereRenderObjClass::Set_Position(const Vector3 &v) { RenderObjClass::Set_Position(v); @@ -746,18 +498,7 @@ void SphereRenderObjClass::Set_Position(const Vector3 &v) } -/*********************************************************************************************** - * SphereRenderObjClass::update_cached_box -- update the world-space version of this box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ +// Update the world-space version of this sphere. void SphereRenderObjClass::update_cached_box() { CachedBox.Center = Transform.Get_Translation() + ObjSpaceCenter; @@ -765,36 +506,13 @@ void SphereRenderObjClass::update_cached_box() } -/*********************************************************************************************** - * SphereRenderObjClass::Get_Obj_Space_Bounding_Sphere -- return the object-space bounding sphe * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ +// Return the object-space bounding sphere. void SphereRenderObjClass::Get_Obj_Space_Bounding_Sphere(SphereClass & sphere) const { sphere.Init(ObjSpaceCenter,ObjSpaceExtent.Length()); } -/*********************************************************************************************** - * SphereRenderObjClass::Get_Obj_Space_Bounding_Box -- returns the obj-space bounding box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ void SphereRenderObjClass::Get_Obj_Space_Bounding_Box(AABoxClass & box) const { box.Init(ObjSpaceCenter,ObjSpaceExtent); @@ -864,18 +582,6 @@ int SphereRenderObjClass::Calculate_Cost_Value_Arrays(float screen_area, float * } -/*********************************************************************************************** - * SphereRenderObjClass::Scale -- scales sphere uniformly. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/01/02 NH : Created. * - *=============================================================================================*/ void SphereRenderObjClass::Scale(float scale) { if (scale == 1.0f) return; @@ -893,18 +599,7 @@ void SphereRenderObjClass::Scale(float scale) } -/*********************************************************************************************** - * SphereRenderObjClass::Scale -- scales sphere non-uniformly. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/01/02 NH : Created. * - *=============================================================================================*/ +// Scales sphere non-uniformly. void SphereRenderObjClass::Scale(float scalex, float scaley, float scalez) { // Scale default value @@ -927,18 +622,7 @@ void SphereRenderObjClass::Scale(float scalex, float scaley, float scalez) -/*********************************************************************************************** - * SphereRenderObjClass::Update_Cached_Bounding_Volumes -- Updates world-space bounding volumes * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/19/00 gth : Created. * - *=============================================================================================*/ +// Updates world-space bounding volumes. void SphereRenderObjClass::Update_Cached_Bounding_Volumes() const { CachedBoundingBox.Extent.X = ObjSpaceExtent.X * CurrentScale.X; @@ -952,18 +636,7 @@ void SphereRenderObjClass::Update_Cached_Bounding_Volumes() const } -/*********************************************************************************************** - * SphereRenderObjClass::Get_Default_Color - get the default (or first frame) value * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/13/2000 pds : Created. * - *=============================================================================================*/ +// Get the default (or first frame) value. Vector3 SphereRenderObjClass::Get_Default_Color() const { Vector3 value; @@ -978,18 +651,7 @@ Vector3 SphereRenderObjClass::Get_Default_Color() const } -/*********************************************************************************************** - * SphereRenderObjClass::Get_Default_Alpha - get the default (or first frame) value * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/13/2000 pds : Created. * - *=============================================================================================*/ +// Get the default (or first frame) value. float SphereRenderObjClass::Get_Default_Alpha() const { float value; @@ -1004,18 +666,7 @@ float SphereRenderObjClass::Get_Default_Alpha() const } -/*********************************************************************************************** - * SphereRenderObjClass::Get_Default_Scale - get the default (or first frame) value * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/13/2000 pds : Created. * - *=============================================================================================*/ +// Get the default (or first frame) value. Vector3 SphereRenderObjClass::Get_Default_Scale() const { Vector3 value; @@ -1030,18 +681,7 @@ Vector3 SphereRenderObjClass::Get_Default_Scale() const } -/*********************************************************************************************** - * SphereRenderObjClass::Get_Default_Vector - get the default (or first frame) value * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/13/2000 pds : Created. * - *=============================================================================================*/ +// Get the default (or first frame) value. AlphaVectorStruct SphereRenderObjClass::Get_Default_Vector() const { AlphaVectorStruct value; @@ -1056,18 +696,7 @@ AlphaVectorStruct SphereRenderObjClass::Get_Default_Vector() const } -/*********************************************************************************************** - * SphereRenderObjClass::Update_On_Visibility -- Either starts or stops the animation based on visibility* - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/04/00 pds : Created. * - *=============================================================================================*/ +// Either starts or stops the animation based on visibility. void SphereRenderObjClass::Update_On_Visibility() { // Simply start or stop the animation based on @@ -1080,18 +709,7 @@ void SphereRenderObjClass::Update_On_Visibility() } -/*********************************************************************************************** - * SphereRenderObjClass::animate -- Update Current Display state * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/07/00 jga : Created. * - *=============================================================================================*/ +// Update Current Display state. void SphereRenderObjClass::animate () { if (Is_Animating ()) { @@ -1330,18 +948,6 @@ SphereLoaderClass _SphereLoader; // Vertices are ordered as such // North Pole, stack 1, stack 2, stack x..., SouthPole // -/*********************************************************************************************** - * SphereMeshClass::SphereMeshClass -- Constructor for SphereMesh Geometry * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/07/00 jga : Created. * - *=============================================================================================*/ SphereMeshClass::SphereMeshClass(float radius, int slices, int stacks): Radius(radius), Slices(slices), @@ -1367,18 +973,6 @@ inverse_alpha(false) } -/*********************************************************************************************** - * SphereMeshClass::SphereMeshClass -- Constructor for SphereMesh Geometry * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/07/00 jga : Created. * - *=============================================================================================*/ SphereMeshClass::SphereMeshClass(): Radius(0.0f), Slices(0), @@ -1402,19 +996,8 @@ inverse_alpha(false) -/*********************************************************************************************** - * SphereMeshClass::Set_Alpha_Vector -- Unit Direction Vector, for Alpha hole effects * - * * - * INPUT: vector4 v ; Unit Vector pointing into the sphere in object space * - * .W = Intensity ; Percent Effect * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/07/00 jga : Created. * - *=============================================================================================*/ +// Unit Direction Vector, for Alpha hole effects. The vector points into the sphere in object space, +// W is the intensity in percent effect. void SphereMeshClass::Set_Alpha_Vector (const AlphaVectorStruct &v, bool inverse, bool is_additive, bool force) { // @@ -1468,18 +1051,7 @@ void SphereMeshClass::Set_Alpha_Vector (const AlphaVectorStruct &v, bool inverse } -/*********************************************************************************************** - * SphereMeshClass::Generate -- Alloc Memory, and Generate Geometry, for the SphereMesh * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/07/00 jga : Created. * - *=============================================================================================*/ +// Alloc Memory, and Generate Geometry, for the SphereMesh. void SphereMeshClass::Generate(float radius, int slices, int stacks) { // compute # of vertices @@ -1682,14 +1254,6 @@ void SphereMeshClass::Generate(float radius, int slices, int stacks) -/*********************************************************************************************** - * SphereMeshClass::~SphereMeshClass -- Destructor * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/07/00 jga : Created. * - *=============================================================================================*/ SphereMeshClass::~SphereMeshClass() { @@ -1698,18 +1262,7 @@ SphereMeshClass::~SphereMeshClass() } -/*********************************************************************************************** - * SphereMeshClass::Free Memory used by geometry for the SphereMesh * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/07/00 jga : Created. * - *=============================================================================================*/ +// Frees memory used by geometry for the SphereMesh. void SphereMeshClass::Free() { delete [] vtx; diff --git a/Core/Libraries/Source/WWVegas/WW3D2/sphereobj.h b/Core/Libraries/Source/WWVegas/WW3D2/sphereobj.h index 76328bc3e04..994ed14b734 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/sphereobj.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/sphereobj.h @@ -30,8 +30,6 @@ * * * $Revision:: 7 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/static_sort_list.cpp b/Core/Libraries/Source/WWVegas/WW3D2/static_sort_list.cpp index fa86f7561ce..e5df4b42521 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/static_sort_list.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/static_sort_list.cpp @@ -32,8 +32,6 @@ * * * $Revision:: $* * * - *-------------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/Core/Libraries/Source/WWVegas/WW3D2/static_sort_list.h b/Core/Libraries/Source/WWVegas/WW3D2/static_sort_list.h index 5dd640d8c58..36b7695ba68 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/static_sort_list.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/static_sort_list.h @@ -32,8 +32,6 @@ * * * $Revision:: $* * * - *---------------------------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/streak.cpp b/Core/Libraries/Source/WWVegas/WW3D2/streak.cpp index 05c3dc1ad72..32a4d429838 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/streak.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/streak.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 23 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "streak.h" diff --git a/Core/Libraries/Source/WWVegas/WW3D2/streak.h b/Core/Libraries/Source/WWVegas/WW3D2/streak.h index 77a242689e0..9ab25798714 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/streak.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/streak.h @@ -30,8 +30,6 @@ * * * $Revision:: 1 $* * * - *-------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/streakRender.h b/Core/Libraries/Source/WWVegas/WW3D2/streakRender.h index 46337fea7db..de2f65744af 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/streakRender.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/streakRender.h @@ -32,8 +32,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/surfaceclass.cpp b/Core/Libraries/Source/WWVegas/WW3D2/surfaceclass.cpp index 042a7486f31..ac8114f4974 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/surfaceclass.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/surfaceclass.cpp @@ -32,19 +32,6 @@ * * * $Revision:: 25 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * SurfaceClass::Clear -- Clears a surface to 0 * - * SurfaceClass::Copy -- Copies a region from one surface to another of the same format * - * SurfaceClass::FindBBAlpha -- Finds the bounding box of non zero pixels in the region (x0, * - * SurfaceClass::Is_Transparent_Column -- Tests to see if the column is transparent or not * - * SurfaceClass::Copy -- Copies from a byte array to the surface * - * SurfaceClass::CreateCopy -- Creates a byte array copy of the surface * - * SurfaceClass::DrawHLine -- draws a horizontal line * - * SurfaceClass::DrawPixel -- draws a pixel * - * SurfaceClass::Copy -- Copies a block of system ram to the surface * - * SurfaceClass::Hue_Shift -- changes the hue of the surface * - * SurfaceClass::Is_Monochrome -- Checks if surface is monochrome or not * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "surfaceclass.h" @@ -242,21 +229,6 @@ void SurfaceClass::Unlock() DX8_ErrorCode(D3DSurface->UnlockRect()); } -/*********************************************************************************************** - * SurfaceClass::Clear -- Clears a surface to 0 * - * * - * * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/13/2001 hy : Created. * - *=============================================================================================*/ void SurfaceClass::Clear() { SurfaceDescription sd; @@ -281,21 +253,7 @@ void SurfaceClass::Clear() } -/*********************************************************************************************** - * SurfaceClass::Copy -- Copies from a byte array to the surface * - * * - * * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/15/2001 hy : Created. * - *=============================================================================================*/ +// Copies from a byte array to the surface. void SurfaceClass::Copy(const unsigned char *other) { SurfaceDescription sd; @@ -320,21 +278,7 @@ void SurfaceClass::Copy(const unsigned char *other) } -/*********************************************************************************************** - * SurfaceClass::Copy -- Copies a block of system ram to the surface * - * * - * * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/2/2001 hy : Created. * - *=============================================================================================*/ +// Copies a block of system ram to the surface. void SurfaceClass::Copy(const Vector2i &min, const Vector2i &max, const unsigned char *other) { SurfaceDescription sd; @@ -365,21 +309,7 @@ void SurfaceClass::Copy(const Vector2i &min, const Vector2i &max, const unsigned } -/*********************************************************************************************** - * SurfaceClass::CreateCopy -- Creates a byte array copy of the surface * - * * - * * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/16/2001 hy : Created. * - *=============================================================================================*/ +// Creates a byte array copy of the surface. unsigned char *SurfaceClass::CreateCopy(int *width,int *height,int*size,bool flip) { SurfaceDescription sd; @@ -418,21 +348,7 @@ unsigned char *SurfaceClass::CreateCopy(int *width,int *height,int*size,bool fli } -/*********************************************************************************************** - * SurfaceClass::Copy -- Copies a region from one surface to another * - * * - * * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/13/2001 hy : Created. * - *=============================================================================================*/ +// Copies a region from one surface to another. void SurfaceClass::Copy( unsigned int dstx, unsigned int dsty, unsigned int srcx, unsigned int srcy, @@ -478,21 +394,7 @@ void SurfaceClass::Copy( } } -/*********************************************************************************************** - * SurfaceClass::Copy -- Copies a region from one surface to another * - * * - * * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/13/2001 hy : Created. * - *=============================================================================================*/ +// Copies a region from one surface to another. void SurfaceClass::Stretch_Copy( unsigned int dstx, unsigned int dsty, unsigned int dstwidth, unsigned int dstheight, unsigned int srcx, unsigned int srcy, unsigned int srcwidth, unsigned int srcheight, @@ -519,21 +421,7 @@ void SurfaceClass::Stretch_Copy( DX8_ErrorCode(D3DXLoadSurfaceFromSurface(D3DSurface,nullptr,&dest,other->D3DSurface,nullptr,&src,D3DX_FILTER_TRIANGLE ,0)); } -/*********************************************************************************************** - * SurfaceClass::FindBB -- Finds the bounding box of non zero pixels in the region * - * * - * * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/13/2001 hy : Created. * - *=============================================================================================*/ +// Finds the bounding box of non zero pixels in the region. void SurfaceClass::FindBB(Vector2i *min,Vector2i*max) { SurfaceDescription sd; @@ -594,21 +482,7 @@ void SurfaceClass::FindBB(Vector2i *min,Vector2i*max) } -/*********************************************************************************************** - * SurfaceClass::Is_Transparent_Column -- Tests to see if the column is transparent or not * - * * - * * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/13/2001 hy : Created. * - *=============================================================================================*/ +// Tests to see if the column is transparent or not. bool SurfaceClass::Is_Transparent_Column(unsigned int column) { SurfaceDescription sd; @@ -662,22 +536,8 @@ bool SurfaceClass::Is_Transparent_Column(unsigned int column) return true; } -/*********************************************************************************************** - * SurfaceClass::Get_Pixel -- Returns the pixel's RGB valus to the caller * - * * - * * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/13/2001 hy : Created. * - * 1/10/2025 TheSuperHackers : Added bits and pitch to argument list for better performance * - *=============================================================================================*/ +// Returns the pixel's RGB values to the caller. +// TheSuperHackers @performance Added bits and pitch to the argument list. void SurfaceClass::Get_Pixel(Vector3 &rgb, int x, int y, LockedSurfacePtr pBits, int pitch) { SurfaceDescription sd; @@ -688,21 +548,6 @@ void SurfaceClass::Get_Pixel(Vector3 &rgb, int x, int y, LockedSurfacePtr pBits, Convert_Pixel(rgb,sd,dst); } -/*********************************************************************************************** - * SurfaceClass::Attach -- Attaches a surface pointer to the object, releasing the current ptr.* - * * - * * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/27/2001 pds : Created. * - *=============================================================================================*/ void SurfaceClass::Attach (IDirect3DSurface8 *surface) { Detach (); @@ -717,21 +562,7 @@ void SurfaceClass::Attach (IDirect3DSurface8 *surface) } -/*********************************************************************************************** - * SurfaceClass::Detach -- Releases the reference on the internal surface ptr, and NULLs it. .* - * * - * * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/27/2001 pds : Created. * - *=============================================================================================*/ +// Releases the reference on the internal surface ptr, and NULLs it. void SurfaceClass::Detach () { // @@ -745,21 +576,7 @@ void SurfaceClass::Detach () } -/*********************************************************************************************** - * SurfaceClass::DrawPixel -- draws a pixel * - * * - * * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/10/2025 TheSuperHackers : Added bits and pitch to argument list for better performance * - *=============================================================================================*/ +// TheSuperHackers @performance Added bits and pitch to the argument list. void SurfaceClass::Draw_Pixel(const unsigned int x, const unsigned int y, unsigned int color, unsigned int bytesPerPixel, LockedSurfacePtr pBits, int pitch) { @@ -769,22 +586,7 @@ void SurfaceClass::Draw_Pixel(const unsigned int x, const unsigned int y, unsign -/*********************************************************************************************** - * SurfaceClass::DrawHLine -- draws a horizontal line * - * * - * * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/9/2001 hy : Created. * - * 1/10/2025 TheSuperHackers : Added bits and pitch to argument list for better performance * - *=============================================================================================*/ +// TheSuperHackers @performance Added bits and pitch to the argument list. void SurfaceClass::Draw_H_Line(const unsigned int y, const unsigned int x1, const unsigned int x2, unsigned int color, unsigned int bytesPerPixel, LockedSurfacePtr pBits, int pitch) { @@ -798,21 +600,7 @@ void SurfaceClass::Draw_H_Line(const unsigned int y, const unsigned int x1, cons } -/*********************************************************************************************** - * SurfaceClass::Is_Monochrome -- Checks if surface is monochrome or not * - * * - * * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/5/2001 hy : Created. * - *=============================================================================================*/ +// Checks if surface is monochrome or not. bool SurfaceClass::Is_Monochrome() { unsigned int x,y; @@ -888,21 +676,6 @@ bool SurfaceClass::Is_Monochrome() return true; } -/*********************************************************************************************** - * SurfaceClass::Hue_Shift -- changes the hue of the surface * - * * - * * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/3/2001 hy : Created. * - *=============================================================================================*/ void SurfaceClass::Hue_Shift(const Vector3 &hsv_shift) { unsigned int x,y; diff --git a/Core/Libraries/Source/WWVegas/WW3D2/surfaceclass.h b/Core/Libraries/Source/WWVegas/WW3D2/surfaceclass.h index d68868ebd25..c0d4e9f5508 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/surfaceclass.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/surfaceclass.h @@ -32,8 +32,6 @@ * * * $Revision:: 17 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/texproject.cpp b/Core/Libraries/Source/WWVegas/WW3D2/texproject.cpp index e8d2277196a..782b6295c98 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/texproject.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/texproject.cpp @@ -35,42 +35,6 @@ * 06/26/02 KM Matrix name change to avoid MAX conflicts * * 06/27/02 KM Render to shadow buffer texture support * * 08/05/02 KM Texture class redesign - *---------------------------------------------------------------------------------------------* - * Functions: * - * TexProjectClass::TexProjectClass -- Constructor * - * TexProjectClass::~TexProjectClass -- Destructor * - * TexProjectClass::Set_Texture_Size -- Set the size of texture to use * - * TexProjectClass::Get_Texture_Size -- Returns the stored texture size * - * TexProjectClass::Set_Flag -- Turn specified flag on or off * - * TexProjectClass::Get_Flag -- Get the current state of specified flag * - * TexProjectClass::Set_Intensity -- Set the intensity of this projector * - * TexProjectClass::Get_Intensity -- returns the current "desired" intensity * - * TexProjectClass::Set_Attenuation -- Set the attenuation factor * - * TexProjectClass::Get_Attenuation -- Returns the attenuation value * - * TexProjectClass::Enable_Attenuation -- Set the state of the ATTENUATE flag * - * TexProjectClass::Is_Attenuation_Enabled -- Get the state of the ATTENUATE flag * - * TexProjectClass::Is_Depth_Gradient_Enabled -- returns whether the depth gradient is enabl * - * TexProjectClass::Enable_Depth_Gradient -- enable/disable depth gradient * - * TexProjectClass::Init_Multiplicative -- Initialize this to be a multiplicative texture pr * - * TexProjectClass::Is_Intensity_Zero -- check if we can eliminate this projector * - * TexProjectClass::Init_Additive -- Set up the projector to be additive * - * TexProjectClass::Set_Perspective_Projection -- Set up a perspective projection * - * TexProjectClass::Set_Ortho_Projection -- Set up an orthographic projection * - * TexProjectClass::Set_Texture -- Set the texture to be projected * - * TexProjectClass::Get_Texture -- Returns the texture being projected * - * TexProjectClass::Peek_Texture -- Returns the texture being projected * - * TexProjectClass::Peek_Material_Pass -- Returns the material pass object * - * TexProjectClass::Compute_Perspective_Projection -- Set up a perspective projection of an * - * TexProjectClass::Compute_Perspective_Projection -- Set up a perspective projection of an * - * TexProjectClass::Compute_Ortho_Projection -- Automatic Orthographic projection * - * TexProjectClass::Compute_Ortho_Projection -- Automatic Orthographic projection * - * TexProjectClass::Compute_Texture -- Generates texture by rendering an object * - * TexProjectClass::Configure_Camera -- setup a camera to match this projector * - * TexProjectClass::Pre_Render_Update -- Prepare the projector for rendering * - * TexProjectClass::Update_WS_Bounding_Volume -- Recalculate the world-space bounding box * - * TexProjectClass::Get_Surface -- Returns pointer to the texture surface * - * TexProjectClass::Set_Render_Target -- Install a render target for this projector to use * - * TexProjectClass::Needs_Render_Target -- returns wheter this projector needs a render targ * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -168,18 +132,6 @@ const float INTENSITY_RATE_OF_CHANGE = 1.0f; // change in intensity per seco -/*********************************************************************************************** - * TexProjectClass::TexProjectClass -- Constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/4/00 gth : Created. * - *=============================================================================================*/ TexProjectClass::TexProjectClass() : Flags(DEFAULT_FLAGS), DesiredIntensity(1.0f), @@ -219,18 +171,6 @@ TexProjectClass::TexProjectClass() : } -/*********************************************************************************************** - * TexProjectClass::~TexProjectClass -- Destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/4/00 gth : Created. * - *=============================================================================================*/ TexProjectClass::~TexProjectClass() { REF_PTR_RELEASE(Mapper1); @@ -240,22 +180,8 @@ TexProjectClass::~TexProjectClass() } -/*********************************************************************************************** - * TexProjectClass::Set_Texture_Size -- Set the size of texture to use * - * * - * This function stores the desired texture size in this TexProjectClass. Note that * - * this size is only used if you have the TexProjectClass generate a texture. * - * * - * INPUT: * - * size - dimension of the texture in pixels * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/4/00 gth : Created. * - *=============================================================================================*/ +// Set the size of texture to use in pixels. Note that this size is only used if you have the +// TexProjectClass generate a texture. void TexProjectClass::Set_Texture_Size(int size) { WWASSERT(size > 0); @@ -265,42 +191,16 @@ void TexProjectClass::Set_Texture_Size(int size) } -/*********************************************************************************************** - * TexProjectClass::Get_Texture_Size -- Returns the stored texture size * - * * - * Returns the size stored in the flags variable. This can be different than the actual * - * texture's size if you manually installed a texture. This size is only used when * - * automatically generating a texture as is the case when creating shadows. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/4/00 gth : Created. * - *=============================================================================================*/ +// Returns the size stored in the flags variable. This can be different than the actual texture's +// size if you manually installed a texture. This size is only used when automatically generating a +// texture as is the case when creating shadows. int TexProjectClass::Get_Texture_Size() { return (Flags & SIZE_MASK) >> SIZE_SHIFT; } -/*********************************************************************************************** - * TexProjectClass::Set_Flag -- Turn specified flag on or off * - * * - * See the TexProjectClass header file for valid flags * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/4/00 gth : Created. * - *=============================================================================================*/ +// Turn specified flag on or off. See the TexProjectClass header file for valid flags. void TexProjectClass::Set_Flag(uint32 flag,bool onoff) { if (onoff) { @@ -311,44 +211,17 @@ void TexProjectClass::Set_Flag(uint32 flag,bool onoff) } -/*********************************************************************************************** - * TexProjectClass::Get_Flag -- Get the current state of specified flag * - * * - * See the TexProjectClass header file for valid flags * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/4/00 gth : Created. * - *=============================================================================================*/ +// See the TexProjectClass header file for valid flags. bool TexProjectClass::Get_Flag(uint32 flag) const { return (Flags & flag) == flag; } -/*********************************************************************************************** - * TexProjectClass::Set_Intensity -- Set the intensity of this projector * - * * - * The "intensity" is a value between 0 and 1. At 0, the projector will have no effect * - * At 1, the projector will be at its highest strength. The intensity will automatically * - * smoothly interpolate towards the value specified unless you use the immediate option. * - * * - * INPUT: * - * intensity - desired intensity, 0 <= intensity <= 1 * - * immediate - should the intensity be immediately set to the desired value? (default = false) * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/4/00 gth : Created. * - *=============================================================================================*/ +// Set the intensity of this projector. The "intensity" is a value between 0 and 1. At 0, the +// projector will have no effect. At 1, the projector will be at its highest strength. The intensity +// will automatically smoothly interpolate towards the value specified unless you use the immediate +// option. void TexProjectClass::Set_Intensity(float intensity,bool immediate) { WWASSERT(intensity <= 1.0f); @@ -361,63 +234,24 @@ void TexProjectClass::Set_Intensity(float intensity,bool immediate) } -/*********************************************************************************************** - * TexProjectClass::Get_Intensity -- returns the current "desired" intensity * - * * - * This will return the last value that was sent into this object through Set_Intensity. * - * Note however that the actual intensity used in rendering may not have arrived at * - * that value yet. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/4/00 gth : Created. * - *=============================================================================================*/ +// Returns the last value that was sent into this object through Set_Intensity. Note however that +// the actual intensity used in rendering may not have arrived at that value yet. float TexProjectClass::Get_Intensity() { return DesiredIntensity; } -/*********************************************************************************************** - * TexProjectClass::Is_Intensity_Zero -- check if we can eliminate this projector * - * * - * Only returns true if the current intensity is zero AND the target intensity is zero * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/4/00 gth : Created. * - *=============================================================================================*/ +// Check if we can eliminate this projector. Only returns true if the current intensity is zero AND +// the target intensity is zero. bool TexProjectClass::Is_Intensity_Zero() { return ((Intensity == 0.0f) && (DesiredIntensity == 0.0f)); } -/*********************************************************************************************** - * TexProjectClass::Set_Attenuation -- Set the attenuation factor * - * * - * Attenuation scales the intensity. I use attenuation to make shadows fade away as they * - * get farther away from the light source or from the viewer. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/4/00 gth : Created. * - *=============================================================================================*/ +// Attenuation scales the intensity. I use attenuation to make shadows fade away as they get farther +// away from the light source or from the viewer. void TexProjectClass::Set_Attenuation(float attenuation) { WWASSERT(attenuation >= 0.0f); @@ -426,72 +260,26 @@ void TexProjectClass::Set_Attenuation(float attenuation) } -/*********************************************************************************************** - * TexProjectClass::Get_Attenuation -- Returns the attenuation value * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/4/00 gth : Created. * - *=============================================================================================*/ float TexProjectClass::Get_Attenuation() { return Attenuation; } -/*********************************************************************************************** - * TexProjectClass::Enable_Attenuation -- Set the state of the ATTENUATE flag * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/4/00 gth : Created. * - *=============================================================================================*/ +// Set the state of the ATTENUATE flag. void TexProjectClass::Enable_Attenuation(bool onoff) { Set_Flag(ATTENUATE,onoff); } -/*********************************************************************************************** - * TexProjectClass::Is_Attenuation_Enabled -- Get the state of the ATTENUATE flag * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/4/00 gth : Created. * - *=============================================================================================*/ +// Get the state of the ATTENUATE flag. bool TexProjectClass::Is_Attenuation_Enabled() { return Get_Flag(ATTENUATE); } -/*********************************************************************************************** - * TexProjectClass::Enable_Depth_Gradient -- enable/disable depth gradient * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/25/2000 gth : Created. * - *=============================================================================================*/ void TexProjectClass::Enable_Depth_Gradient(bool onoff) { Set_Flag(USE_DEPTH_GRADIENT,onoff); @@ -505,38 +293,13 @@ void TexProjectClass::Enable_Depth_Gradient(bool onoff) } -/*********************************************************************************************** - * TexProjectClass::Is_Depth_Gradient_Enabled -- returns whether the depth gradient is enabled * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/25/2000 gth : Created. * - *=============================================================================================*/ bool TexProjectClass::Is_Depth_Gradient_Enabled(bool onoff) { return Get_Flag(USE_DEPTH_GRADIENT); } -/*********************************************************************************************** - * TexProjectClass::Init_Multiplicative -- Initialize this to be a multiplicative texture proj * - * * - * Set up the internal materials so that the texture is multiplied with whatever it is * - * projected onto. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/4/00 gth : Created. * - *=============================================================================================*/ +// Set up the internal materials so that the texture is multiplied with whatever it is projected +// onto. void TexProjectClass::Init_Multiplicative() { Set_Flag(ADDITIVE,false); @@ -630,18 +393,6 @@ void TexProjectClass::Init_Multiplicative() } -/*********************************************************************************************** - * TexProjectClass::Init_Additive -- Set up the projector to be additive * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/11/00 gth : Created. * - *=============================================================================================*/ void TexProjectClass::Init_Additive() { Set_Flag(ADDITIVE,true); @@ -716,18 +467,6 @@ void TexProjectClass::Init_Additive() } -/*********************************************************************************************** - * TexProjectClass::Set_Texture -- Set the texture to be projected * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/11/00 gth : Created. * - *=============================================================================================*/ void TexProjectClass::Set_Texture(TextureClass * texture) { if (texture != nullptr) @@ -739,73 +478,25 @@ void TexProjectClass::Set_Texture(TextureClass * texture) } -/*********************************************************************************************** - * TexProjectClass::Get_Texture -- Returns the texture being projected * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * the pointer is ref-counted! make sure to keep track of your references * - * * - * HISTORY: * - * 1/11/00 gth : Created. * - *=============================================================================================*/ +// WARNING: The pointer is ref-counted! make sure to keep track of your references. TextureClass * TexProjectClass::Get_Texture() const { return MaterialPass->Get_Texture(); } -/*********************************************************************************************** - * TexProjectClass::Peek_Texture -- Returns the texture being projected * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/11/00 gth : Created. * - *=============================================================================================*/ TextureClass * TexProjectClass::Peek_Texture() const { return MaterialPass->Peek_Texture(); } -/*********************************************************************************************** - * TexProjectClass::Peek_Material_Pass -- Returns the material pass object * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/11/00 gth : Created. * - *=============================================================================================*/ MaterialPassClass * TexProjectClass::Peek_Material_Pass() { return MaterialPass; } -/*********************************************************************************************** - * TexProjectClass::Set_Perspective_Projection -- set up a perspective projection * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/27/00 gth : Created. * - *=============================================================================================*/ void TexProjectClass::Set_Perspective_Projection(float hfov,float vfov,float znear,float zfar) { HFov = hfov; @@ -818,18 +509,6 @@ void TexProjectClass::Set_Perspective_Projection(float hfov,float vfov,float zne } -/*********************************************************************************************** - * TexProjectClass::Set_Ortho_Projection -- set up an orthographic projection * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/27/00 gth : Created. * - *=============================================================================================*/ void TexProjectClass::Set_Ortho_Projection(float xmin,float xmax,float ymin,float ymax,float znear,float zfar) { XMin = xmin; @@ -843,25 +522,9 @@ void TexProjectClass::Set_Ortho_Projection(float xmin,float xmax,float ymin,floa Set_Flag(PERSPECTIVE,false); } -/*********************************************************************************************** - * TexProjectClass::Compute_Perspective_Projection -- Set up a perspective projection of an ob * - * * - * This function automates the process of generating the perspective parameters needed to * - * tightly bound the projection of an object. * - * * - * INPUT: * - * model - object which we are created a projection of * - * lightpos - positional light source * - * znear - distance to near clipping plane for the projection (if -1.0, will be generated) * - * zfar - distance to far clipping plane for the projection (if -1.0, will be generated) * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/11/00 gth : Created. * - *=============================================================================================*/ +// Set up a perspective projection of an object. This function automates the process of generating +// the perspective parameters needed to tightly bound the projection of an object. If znear or zfar +// is -1.0, it will be generated. bool TexProjectClass::Compute_Perspective_Projection ( RenderObjClass * model, @@ -883,26 +546,9 @@ bool TexProjectClass::Compute_Perspective_Projection } -/*********************************************************************************************** - * TexProjectClass::Compute_Perspective_Projection -- Set up a perspective projection of an ob * - * * - * This function automates the process of generating the perspective parameters needed to * - * tightly bound the projection of an object. * - * * - * INPUT: * - * obj_box - object space bounding box of the object we are projecting * - * tm - transform of the object we are projecting * - * lightpos - positional light source * - * user_znear - distance to near clipping plane for the projection (if -1.0, will be generated)* - * user_zfar - distance to far clipping plane for the projection (if -1.0, will be generated) * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/11/00 gth : Created. * - *=============================================================================================*/ +// Set up a perspective projection of an object. This function automates the process of generating +// the perspective parameters needed to tightly bound the projection of an object. If znear or zfar +// is -1.0, it will be generated. bool TexProjectClass::Compute_Perspective_Projection ( const AABoxClass & obj_box, @@ -970,24 +616,8 @@ bool TexProjectClass::Compute_Perspective_Projection } -/*********************************************************************************************** - * TexProjectClass::Compute_Ortho_Projection -- Automatic Orthographic projection * - * * - * Generates the orthographic projection parameters to tightly bound an object * - * * - * INPUT: * - * model - object which we are created a projection of * - * lightdir - directional light source * - * znear - distance to near clipping plane for the projection (if -1.0, will be generated) * - * zfar - distance to far clipping plane for the projection (if -1.0, will be generated) * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/11/00 gth : Created. * - *=============================================================================================*/ +// Automatic Orthographic projection. Generates the orthographic projection parameters to tightly +// bound an object. If znear or zfar is -1.0, it will be generated. bool TexProjectClass::Compute_Ortho_Projection ( RenderObjClass * model, @@ -1009,25 +639,8 @@ bool TexProjectClass::Compute_Ortho_Projection } -/*********************************************************************************************** - * TexProjectClass::Compute_Ortho_Projection -- Automatic Orthographic projection * - * * - * Generates the orthographic projection parameters to tightly bound an object * - * * - * INPUT: * - * obj_box - object space bounding box of the object we are projecting * - * tm - transform of the object we are projecting * - * lightdir - directional light * - * user_znear - distance to near clipping plane for the projection (if -1.0, will be generated)* - * user_zfar - distance to far clipping plane for the projection (if -1.0, will be generated) * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/11/00 gth : Created. * - *=============================================================================================*/ +// Automatic Orthographic projection. Generates the orthographic projection parameters to tightly +// bound an object. If znear or zfar is -1.0, it will be generated. bool TexProjectClass::Compute_Ortho_Projection ( const AABoxClass & obj_box, @@ -1094,21 +707,7 @@ bool TexProjectClass::Compute_Ortho_Projection return true; } -/*********************************************************************************************** - * TexProjectClass::Compute_Texture -- Generates texture by rendering an object * - * * - * INPUT: * - * model - pointer to the render object to generate a shadow texture for * - * context - shadow render context which has been initialized to resolution * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/11/00 gth : Created. * - * 5/16/02 kjm : Added optional custom depth/stencil target * - *=============================================================================================*/ +// Generates texture by rendering an object. bool TexProjectClass::Compute_Texture ( RenderObjClass * model, @@ -1171,36 +770,14 @@ bool TexProjectClass::Compute_Texture } -/*********************************************************************************************** - * TexProjectClass::Needs_Render_Target -- returns wheter this projector needs a render target * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/17/2001 gth : Created. * - *=============================================================================================*/ +// Returns whether this projector needs a render target. bool TexProjectClass::Needs_Render_Target() { return Get_Flag(TEXTURE_DIRTY); } -/*********************************************************************************************** - * TexProjectClass::Set_Render_Target -- Install a render target for this projector to use * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/16/2001 gth : Created. * - *=============================================================================================*/ +// Install a render target for this projector to use. void TexProjectClass::Set_Render_Target ( TextureClass* render_target, @@ -1212,19 +789,6 @@ void TexProjectClass::Set_Render_Target REF_PTR_SET(DepthStencilTarget,zbuffer); } -/*********************************************************************************************** - * TexProjectClass::Peek_Render_Target -- Returns pointer to the render target if we have one * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/5/2001 gth : Created. * - * 5/16/2002 kjm : Added optional custom zbuffer * - *=============================================================================================*/ TextureClass* TexProjectClass::Peek_Render_Target ( TextureClass** rtarget, @@ -1243,18 +807,6 @@ TextureClass* TexProjectClass::Peek_Render_Target return RenderTarget; } -/*********************************************************************************************** - * TexProjectClass::Configure_Camera -- set up a camera to match this projector * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/11/00 gth : Created. * - *=============================================================================================*/ void TexProjectClass::Configure_Camera(CameraClass & camera) { camera.Set_Transform(Transform); @@ -1278,18 +830,6 @@ void TexProjectClass::Configure_Camera(CameraClass & camera) } -/*********************************************************************************************** - * TexProjectClass::Pre_Render_Update -- Prepare the projector for rendering * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/11/00 gth : Created. * - *=============================================================================================*/ void TexProjectClass::Pre_Render_Update(const Matrix3D & camera) { /* @@ -1352,18 +892,7 @@ void TexProjectClass::Pre_Render_Update(const Matrix3D & camera) } -/*********************************************************************************************** - * TexProjectClass::Update_WS_Bounding_Volume -- Recalculate the world-space bounding box * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/11/00 gth : Created. * - *=============================================================================================*/ +// Recalculate the world-space bounding box. void TexProjectClass::Update_WS_Bounding_Volume() { ProjectorClass::Update_WS_Bounding_Volume(); diff --git a/Core/Libraries/Source/WWVegas/WW3D2/texproject.h b/Core/Libraries/Source/WWVegas/WW3D2/texproject.h index 368a1584a59..82802f3b757 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/texproject.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/texproject.h @@ -33,8 +33,6 @@ * $Revision:: 8 $* * * * 06/27/02 KM Render to shadow buffer texture support * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/textdraw.cpp b/Core/Libraries/Source/WWVegas/WW3D2/textdraw.cpp index c019bc99285..fceb9260183 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/textdraw.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/textdraw.cpp @@ -30,8 +30,6 @@ * * * $Revision:: 7 $* * * - *-------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "textdraw.h" diff --git a/Core/Libraries/Source/WWVegas/WW3D2/texture.cpp b/Core/Libraries/Source/WWVegas/WW3D2/texture.cpp index 36d0d362579..9fdbb961c96 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/texture.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/texture.cpp @@ -34,9 +34,6 @@ * * * 06/27/02 KM Texture class abstraction * * 08/05/02 KM Texture class redesign (revisited) - *---------------------------------------------------------------------------------------------* - * Functions: * - * FileListTextureClass::Load_Frame_Surface -- Load source texture * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "texture.h" diff --git a/Core/Libraries/Source/WWVegas/WW3D2/texture.h b/Core/Libraries/Source/WWVegas/WW3D2/texture.h index 0ce681ce531..b0e7c90eb54 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/texture.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/texture.h @@ -35,8 +35,6 @@ * 05/16/02 KM Base texture class to abstract major texture types, e.g. 3d, z, cube, etc. * 06/27/02 KM Texture class abstraction * * 08/05/02 KM Texture class redesign (revisited) - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/texturefilter.cpp b/Core/Libraries/Source/WWVegas/WW3D2/texturefilter.cpp index c4315519903..2a067451232 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/texturefilter.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/texturefilter.cpp @@ -33,8 +33,6 @@ * $Revision:: 1 $* * * * 08/05/02 KM Texture filter class abstraction * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "texturefilter.h" diff --git a/Core/Libraries/Source/WWVegas/WW3D2/texturefilter.h b/Core/Libraries/Source/WWVegas/WW3D2/texturefilter.h index ee41f148826..acd5a158dc2 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/texturefilter.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/texturefilter.h @@ -33,8 +33,6 @@ * $Revision:: 1 $* * * * 08/05/02 KM Texture filter class abstraction * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/textureloader.cpp b/Core/Libraries/Source/WWVegas/WW3D2/textureloader.cpp index 95ae2097fe1..3d438569711 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/textureloader.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/textureloader.cpp @@ -34,8 +34,6 @@ * * * 06/27/02 KM Texture class abstraction * * 08/05/02 KM Texture class redesign (revisited) - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "textureloader.h" diff --git a/Core/Libraries/Source/WWVegas/WW3D2/textureloader.h b/Core/Libraries/Source/WWVegas/WW3D2/textureloader.h index b7d1f20b9ab..ad9ed0a3897 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/textureloader.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/textureloader.h @@ -33,8 +33,6 @@ * $Revision:: 2 $* * * * 06/27/02 KM Texture class abstraction * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Core/Libraries/Source/WWVegas/WW3D2/vertmaterial.cpp b/Core/Libraries/Source/WWVegas/WW3D2/vertmaterial.cpp index d5182c0a772..91ce231b05d 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/vertmaterial.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/vertmaterial.cpp @@ -30,11 +30,6 @@ * * * $Revision:: 42 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * Init -- init code * - * Shutdown -- shutdown code * - * Get_Preset -- retrieve presets * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "vertmaterial.h" @@ -996,21 +991,6 @@ void VertexMaterialClass::Apply_Null() } -/*********************************************************************************************** - * Init -- init code * - * * - * * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/14/2001 hy : Created. * - *=============================================================================================*/ void VertexMaterialClass::Init() { int i; @@ -1024,21 +1004,6 @@ void VertexMaterialClass::Init() } -/*********************************************************************************************** - * Shutdown -- shutdown code * - * * - * * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/14/2001 hy : Created. * - *=============================================================================================*/ void VertexMaterialClass::Shutdown() { int i; @@ -1047,21 +1012,6 @@ void VertexMaterialClass::Shutdown() } -/*********************************************************************************************** - * Get_Preset -- retrieve presets * - * * - * * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/14/2001 hy : Created. * - *=============================================================================================*/ VertexMaterialClass * VertexMaterialClass::Get_Preset(PresetType type) { WWASSERT(type Date: Mon, 16 Nov 2026 21:47:45 +0100 Subject: [PATCH 4/7] refactor(ww3d2): Replace function comment blocks in Generals and Zero Hour The Westwood comment blocks above the functions in the WW3D2 files of Generals and Zero Hour are replaced by slim // comments, following the same rules as in Core. Functions that exist in both games get identical comments, including where the original blocks differed only in spelling or history entries. The Functions lists in the file headers are removed as well. --- .../Source/WWVegas/WW3D2/animobj.cpp | 401 +---- .../Libraries/Source/WWVegas/WW3D2/animobj.h | 57 +- .../Source/WWVegas/WW3D2/assetmgr.cpp | 557 +------ .../Libraries/Source/WWVegas/WW3D2/assetmgr.h | 2 - .../Libraries/Source/WWVegas/WW3D2/camera.cpp | 363 +---- .../Libraries/Source/WWVegas/WW3D2/camera.h | 105 +- .../Libraries/Source/WWVegas/WW3D2/dazzle.cpp | 2 - .../Source/WWVegas/WW3D2/decalmsh.cpp | 198 +-- .../Libraries/Source/WWVegas/WW3D2/decalmsh.h | 2 - .../Source/WWVegas/WW3D2/hanimmgr.cpp | 161 +- .../Libraries/Source/WWVegas/WW3D2/hanimmgr.h | 2 - .../Libraries/Source/WWVegas/WW3D2/hlod.cpp | 1322 +---------------- .../Libraries/Source/WWVegas/WW3D2/hlod.h | 2 - .../Source/WWVegas/WW3D2/htreemgr.cpp | 135 +- .../Libraries/Source/WWVegas/WW3D2/htreemgr.h | 2 - .../Source/WWVegas/WW3D2/lightenvironment.cpp | 2 - .../Source/WWVegas/WW3D2/lightenvironment.h | 2 - .../Source/WWVegas/WW3D2/meshbuild.cpp | 324 +--- .../Source/WWVegas/WW3D2/meshbuild.h | 2 - .../Source/WWVegas/WW3D2/meshmatdesc.cpp | 2 - .../Source/WWVegas/WW3D2/meshmatdesc.h | 2 - .../Source/WWVegas/WW3D2/nullrobj.cpp | 2 - .../Libraries/Source/WWVegas/WW3D2/nullrobj.h | 2 - .../Source/WWVegas/WW3D2/part_buf.cpp | 2 - .../Libraries/Source/WWVegas/WW3D2/part_buf.h | 2 - .../Source/WWVegas/WW3D2/render2d.cpp | 2 - .../Libraries/Source/WWVegas/WW3D2/render2d.h | 2 - .../Libraries/Source/WWVegas/WW3D2/rinfo.cpp | 2 - .../Libraries/Source/WWVegas/WW3D2/rinfo.h | 2 - .../Libraries/Source/WWVegas/WW3D2/scene.cpp | 232 +-- .../Libraries/Source/WWVegas/WW3D2/scene.h | 2 - .../Source/WWVegas/WW3D2/animobj.cpp | 401 +---- .../Libraries/Source/WWVegas/WW3D2/animobj.h | 57 +- .../Source/WWVegas/WW3D2/assetmgr.cpp | 557 +------ .../Libraries/Source/WWVegas/WW3D2/assetmgr.h | 2 - .../Libraries/Source/WWVegas/WW3D2/camera.cpp | 363 +---- .../Libraries/Source/WWVegas/WW3D2/camera.h | 105 +- .../Libraries/Source/WWVegas/WW3D2/dazzle.cpp | 2 - .../Source/WWVegas/WW3D2/decalmsh.cpp | 198 +-- .../Libraries/Source/WWVegas/WW3D2/decalmsh.h | 2 - .../Source/WWVegas/WW3D2/hanimmgr.cpp | 161 +- .../Libraries/Source/WWVegas/WW3D2/hanimmgr.h | 2 - .../Libraries/Source/WWVegas/WW3D2/hlod.cpp | 1322 +---------------- .../Libraries/Source/WWVegas/WW3D2/hlod.h | 2 - .../Source/WWVegas/WW3D2/htreemgr.cpp | 135 +- .../Libraries/Source/WWVegas/WW3D2/htreemgr.h | 2 - .../Source/WWVegas/WW3D2/lightenvironment.cpp | 2 - .../Source/WWVegas/WW3D2/lightenvironment.h | 2 - .../Source/WWVegas/WW3D2/linegrp.cpp | 2 - .../Libraries/Source/WWVegas/WW3D2/linegrp.h | 2 - .../Source/WWVegas/WW3D2/meshbuild.cpp | 324 +--- .../Source/WWVegas/WW3D2/meshbuild.h | 2 - .../Source/WWVegas/WW3D2/meshmatdesc.cpp | 2 - .../Source/WWVegas/WW3D2/meshmatdesc.h | 2 - .../Source/WWVegas/WW3D2/nullrobj.cpp | 2 - .../Libraries/Source/WWVegas/WW3D2/nullrobj.h | 2 - .../Source/WWVegas/WW3D2/part_buf.cpp | 2 - .../Libraries/Source/WWVegas/WW3D2/part_buf.h | 2 - .../Source/WWVegas/WW3D2/render2d.cpp | 2 - .../Libraries/Source/WWVegas/WW3D2/render2d.h | 2 - .../Libraries/Source/WWVegas/WW3D2/rinfo.cpp | 2 - .../Libraries/Source/WWVegas/WW3D2/rinfo.h | 2 - .../Libraries/Source/WWVegas/WW3D2/scene.cpp | 233 +-- .../Libraries/Source/WWVegas/WW3D2/scene.h | 2 - 64 files changed, 370 insertions(+), 7425 deletions(-) diff --git a/Generals/Code/Libraries/Source/WWVegas/WW3D2/animobj.cpp b/Generals/Code/Libraries/Source/WWVegas/WW3D2/animobj.cpp index 10aeecd4991..5683a630137 100644 --- a/Generals/Code/Libraries/Source/WWVegas/WW3D2/animobj.cpp +++ b/Generals/Code/Libraries/Source/WWVegas/WW3D2/animobj.cpp @@ -30,31 +30,6 @@ * * * $Revision:: 7 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * Animatable3DObjClass::Animatable3DObjClass -- constructor * - * Animatable3DObjClass::Animatable3DObjClass -- copy constructor * - * Animatable3DObjClass::~Animatable3DObjClass -- destructor * - * Animatable3DObjClass::operator = -- assignment operator * - * Animatable3DObjClass::Release -- Releases any anims being held by this object * - * Animatable3DObjClass::Render -- Update this object for rendering * - * Animatable3DObjClass::Special_Render -- "special render" function for animatables * - * Animatable3DObjClass::Set_Transform -- sets the transform and marks sub-objects as dirty * - * Animatable3DObjClass::Set_Position -- Sets the position and marks sub-objects as dirty * - * Animatable3DObjClass::Get_Num_Bones -- returns number of bones in this object * - * Animatable3DObjClass::Get_Bone_Name -- returns the name of the given bone * - * Animatable3DObjClass::Get_Bone_Index -- returns the index of the given bone * - * Animatable3DObjClass::Set_Animation -- set the animation state to "none" (base pose) * - * Animatable3DObjClass::Set_Animation -- Set the animation state to the given anim/frame * - * Animatable3DObjClass::Set_Animation -- set the animation state to a blend of two anims * - * Animatable3DObjClass::Set_Animation -- Set animation state with an anim combo * - * Animatable3DObjClass::Get_Bone_Transform -- return the transform for the given bone * - * Animatable3DObjClass::Get_Bone_Transform -- return the transform for the given bone * - * Animatable3DObjClass::Capture_Bone -- capture the specified bone (override animation) * - * Animatable3DObjClass::Release_Bone -- release the specified bone (allow animation) * - * Animatable3DObjClass::Is_Bone_Captured -- returns whether the specified bone is captured * - * Animatable3DObjClass::Control_Bone -- sets the transform for the bone * - * Animatable3DObjClass::Update_Sub_Object_Transforms -- recalculate the transforms for our * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -68,19 +43,6 @@ #include "animatedsoundmgr.h" -/*********************************************************************************************** - * Animatable3DObjClass::Animatable3DObjClass -- constructor * - * * - * INPUT: * - * htree_name -- name of the hierarchy tree which defines the "bone" structure for this object * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/8/98 GTH : Created. * - *=============================================================================================*/ Animatable3DObjClass::Animatable3DObjClass(const char * htree_name) : IsTreeValid(0), CurMotionMode(BASE_POSE) @@ -122,19 +84,6 @@ Animatable3DObjClass::Animatable3DObjClass(const char * htree_name) : } -/*********************************************************************************************** - * Animatable3DObjClass::Animatable3DObjClass -- copy constructor * - * * - * INPUT: * - * src -- animatable object to copy. * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/8/98 GTH : Created. * - *=============================================================================================*/ Animatable3DObjClass::Animatable3DObjClass(const Animatable3DObjClass & src) : CompositeRenderObjClass(src), IsTreeValid(0), @@ -161,18 +110,6 @@ Animatable3DObjClass::Animatable3DObjClass(const Animatable3DObjClass & src) : } -/*********************************************************************************************** - * Animatable3DObjClass::~Animatable3DObjClass -- destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/8/98 GTH : Created. * - *=============================================================================================*/ Animatable3DObjClass::~Animatable3DObjClass() { Release(); @@ -181,18 +118,6 @@ Animatable3DObjClass::~Animatable3DObjClass() } -/*********************************************************************************************** - * Animatable3DObjClass::operator = -- assignment operator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/2/99 GTH : Created. * - *=============================================================================================*/ Animatable3DObjClass & Animatable3DObjClass::operator = (const Animatable3DObjClass & that) { if (&that != this) { @@ -223,18 +148,7 @@ Animatable3DObjClass & Animatable3DObjClass::operator = (const Animatable3DObjCl return *this; } -/*********************************************************************************************** - * Animatable3DObjClass::Release -- Releases any anims being held by this object * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/8/98 GTH : Created. * - *=============================================================================================*/ +// Releases any anims being held by this object. void Animatable3DObjClass::Release() { switch (CurMotionMode) { @@ -269,18 +183,6 @@ void Animatable3DObjClass::Release() } } -/*********************************************************************************************** - * Animatable3DObjClass::Render -- Update this object for rendering * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/8/98 GTH : Created. * - *=============================================================================================*/ void Animatable3DObjClass::Render(RenderInfoClass & rinfo) { if (HTree == nullptr) return; @@ -299,18 +201,6 @@ void Animatable3DObjClass::Render(RenderInfoClass & rinfo) } } -/*********************************************************************************************** - * Animatable3DObjClass::Special_Render -- "special render" function for animatables * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/10/98 GTH : Created. * - *=============================================================================================*/ void Animatable3DObjClass::Special_Render(SpecialRenderInfoClass & rinfo) { if (HTree == nullptr) return; @@ -326,18 +216,7 @@ void Animatable3DObjClass::Special_Render(SpecialRenderInfoClass & rinfo) } -/*********************************************************************************************** - * Animatable3DObjClass::Set_Transform -- sets the transform and marks sub-objects as dirty * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/2/99 GTH : Created. * - *=============================================================================================*/ +// Sets the transform and marks sub-objects as dirty. void Animatable3DObjClass::Set_Transform(const Matrix3D &m) { CompositeRenderObjClass::Set_Transform(m); @@ -345,18 +224,7 @@ void Animatable3DObjClass::Set_Transform(const Matrix3D &m) } -/*********************************************************************************************** - * Animatable3DObjClass::Set_Position -- Sets the position and marks sub-objects as dirty * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/2/99 GTH : Created. * - *=============================================================================================*/ +// Sets the position and marks sub-objects as dirty. void Animatable3DObjClass::Set_Position(const Vector3 &v) { CompositeRenderObjClass::Set_Position(v); @@ -364,18 +232,6 @@ void Animatable3DObjClass::Set_Position(const Vector3 &v) } -/*********************************************************************************************** - * Animatable3DObjClass::Get_Num_Bones -- returns number of bones in this object * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/2/99 GTH : Created. * - *=============================================================================================*/ int Animatable3DObjClass::Get_Num_Bones() { if (HTree) { @@ -386,18 +242,6 @@ int Animatable3DObjClass::Get_Num_Bones() } -/*********************************************************************************************** - * Animatable3DObjClass::Get_Bone_Name -- returns the name of the given bone * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/2/99 GTH : Created. * - *=============================================================================================*/ const char * Animatable3DObjClass::Get_Bone_Name(int bone_index) { if (HTree) { @@ -408,18 +252,6 @@ const char * Animatable3DObjClass::Get_Bone_Name(int bone_index) } -/*********************************************************************************************** - * Animatable3DObjClass::Get_Bone_Index -- returns the index of the given bone * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/2/99 GTH : Created. * - *=============================================================================================*/ int Animatable3DObjClass::Get_Bone_Index(const char * bonename) { if (HTree) { @@ -431,18 +263,7 @@ int Animatable3DObjClass::Get_Bone_Index(const char * bonename) -/*********************************************************************************************** - * Animatable3DObjClass::Set_Animation -- set the animation state to "none" (base pose) * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/8/98 GTH : Created. * - *=============================================================================================*/ +// Set the animation state to "none" (base pose). void Animatable3DObjClass::Set_Animation() { Release(); @@ -451,18 +272,7 @@ void Animatable3DObjClass::Set_Animation() } -/*********************************************************************************************** - * Animatable3DObjClass::Set_Animation -- Set the animation state to the given anim/frame * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/8/98 GTH : Created. * - *=============================================================================================*/ +// Set the animation state to the given anim/frame. void Animatable3DObjClass::Set_Animation(HAnimClass * motion, float frame, int mode) { @@ -499,18 +309,7 @@ void Animatable3DObjClass::Set_Animation(HAnimClass * motion, float frame, int m } -/*********************************************************************************************** - * Animatable3DObjClass::Set_Animation -- set the animation state to a blend of two anims * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/8/98 GTH : Created. * - *=============================================================================================*/ +// Set the animation state to a blend of two anims. void Animatable3DObjClass::Set_Animation ( HAnimClass * motion0, @@ -552,18 +351,7 @@ void Animatable3DObjClass::Set_Animation } -/*********************************************************************************************** - * Animatable3DObjClass::Set_Animation -- Set animation state with an anim combo * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/8/98 GTH : Created. * - *=============================================================================================*/ +// Set animation state with an anim combo. void Animatable3DObjClass::Set_Animation ( HAnimComboClass * anim_combo @@ -590,18 +378,6 @@ void Animatable3DObjClass::Set_Animation } -/*********************************************************************************************** - * Animatable3DObjClass::Peek_Animation * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/8/98 GTH : Created. * - *=============================================================================================*/ HAnimClass * Animatable3DObjClass::Peek_Animation() { if ( CurMotionMode == SINGLE_ANIM ) { @@ -612,18 +388,6 @@ HAnimClass * Animatable3DObjClass::Peek_Animation() } -/*********************************************************************************************** - * Animatable3DObjClass::Get_Bone_Transform -- return the transform for the given bone * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/8/98 GTH : Created. * - *=============================================================================================*/ const Matrix3D & Animatable3DObjClass::Get_Bone_Transform(const char * bonename) { if (HTree) { @@ -638,18 +402,6 @@ const Matrix3D & Animatable3DObjClass::Get_Bone_Transform(const char * bonename) } -/*********************************************************************************************** - * Animatable3DObjClass::Get_Bone_Transform -- return the transform for the given bone * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/8/98 GTH : Created. * - *=============================================================================================*/ const Matrix3D & Animatable3DObjClass::Get_Bone_Transform(int boneindex) { Validate_Transform(); @@ -670,18 +422,7 @@ const Matrix3D & Animatable3DObjClass::Get_Bone_Transform(int boneindex) } -/*********************************************************************************************** - * Animatable3DObjClass::Capture_Bone -- capture the specified bone (override animation) * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/2/99 GTH : Created. * - *=============================================================================================*/ +// Capture the specified bone (override animation). void Animatable3DObjClass::Capture_Bone(int boneindex) { if (HTree) { @@ -690,18 +431,7 @@ void Animatable3DObjClass::Capture_Bone(int boneindex) } -/*********************************************************************************************** - * Animatable3DObjClass::Release_Bone -- release the specified bone (allow animation) * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/2/99 GTH : Created. * - *=============================================================================================*/ +// Release the specified bone (allow animation). void Animatable3DObjClass::Release_Bone(int boneindex) { if (HTree) { @@ -710,18 +440,6 @@ void Animatable3DObjClass::Release_Bone(int boneindex) } -/*********************************************************************************************** - * Animatable3DObjClass::Is_Bone_Captured -- returns whether the specified bone is captured * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/2/99 GTH : Created. * - *=============================================================================================*/ bool Animatable3DObjClass::Is_Bone_Captured(int boneindex) const { if (HTree) { @@ -732,18 +450,6 @@ bool Animatable3DObjClass::Is_Bone_Captured(int boneindex) const } -/*********************************************************************************************** - * Animatable3DObjClass::Control_Bone -- sets the transform for the bone * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/2/99 GTH : Created. * - *=============================================================================================*/ void Animatable3DObjClass::Control_Bone(int bindex,const Matrix3D & objtm,bool world_space_translation) { #ifdef DEBUG_CRASHING @@ -760,18 +466,7 @@ void Animatable3DObjClass::Control_Bone(int bindex,const Matrix3D & objtm,bool w } } -/*********************************************************************************************** - * Animatable3DObjClass::Update_Sub_Object_Transforms -- recalculate the transforms for our su * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/8/98 GTH : Created. * - *=============================================================================================*/ +// Recalculate the transforms for our sub-objects. void Animatable3DObjClass::Update_Sub_Object_Transforms() { /* @@ -849,19 +544,7 @@ void Animatable3DObjClass::Update_Sub_Object_Transforms() } -/*********************************************************************************************** - * Animatable3DObjClass::Simple_Evaluate_Bone -- If the animation is 'single', evaluate the * - * given pivot and return its transform. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 04/13/2000 PDS : Created. * - *=============================================================================================*/ +// If the animation is 'single', evaluate the given pivot and return its transform. bool Animatable3DObjClass::Simple_Evaluate_Bone(int boneindex, Matrix3D *tm) const { bool retval = false; @@ -888,19 +571,7 @@ bool Animatable3DObjClass::Simple_Evaluate_Bone(int boneindex, Matrix3D *tm) con } -/*********************************************************************************************** - * Animatable3DObjClass::Simple_Evaluate_Bone -- If the animation is 'single', evaluate the * - * given pivot and return its transform. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 04/13/2000 PDS : Created. * - *=============================================================================================*/ +// If the animation is 'single', evaluate the given pivot and return its transform. bool Animatable3DObjClass::Simple_Evaluate_Bone(int boneindex, float frame, Matrix3D *tm) const { bool retval = false; @@ -920,18 +591,8 @@ bool Animatable3DObjClass::Simple_Evaluate_Bone(int boneindex, float frame, Matr } -/*********************************************************************************************** - * Animatable3DObjClass::Compute_Current_Frame -- Returns the animation frame for the next rend* - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: Only works for Single and CSingle! * - * * - * HISTORY: * - * 04/13/2000 PDS : Created. * - *=============================================================================================*/ +// Returns the animation frame for the next render. +// WARNING: Only works for Single and CSingle! float Animatable3DObjClass::Compute_Current_Frame(float *newDirection) const { float frame = 0; @@ -1028,18 +689,8 @@ float Animatable3DObjClass::Compute_Current_Frame(float *newDirection) const return frame; } -/*********************************************************************************************** - * Animatable3DObjClass::Single_Anim_Progress -- progress anims for loop and once * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: Only works for Single and CSingle * - * * - * HISTORY: * - * 10/26/99 BMG : Created. * - *=============================================================================================*/ +// Progress anims for loop and once. +// WARNING: Only works for Single and CSingle. void Animatable3DObjClass::Single_Anim_Progress () { // @@ -1056,18 +707,8 @@ void Animatable3DObjClass::Single_Anim_Progress () } -/*********************************************************************************************** - * Animatable3DObjClass::Is_Animation_Complete -- is the current animation on the last frame? * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: Only works for Single, ONCE anims * - * * - * HISTORY: * - * 4/13/99 BMG : Created. * - *=============================================================================================*/ +// Is the current animation on the last frame? +// WARNING: Only works for Single, ONCE anims. bool Animatable3DObjClass::Is_Animation_Complete() const { if (CurMotionMode == SINGLE_ANIM) { @@ -1083,9 +724,6 @@ bool Animatable3DObjClass::Is_Animation_Complete() const return false; } -/*********************************************************************************************** - * Animatable3DObjClass::Peek_Animation_And_Info * - *=============================================================================================*/ HAnimClass * Animatable3DObjClass::Peek_Animation_And_Info(float& frame, int& numFrames, int& mode, float& mult) { if ( CurMotionMode == SINGLE_ANIM ) { @@ -1099,9 +737,6 @@ HAnimClass * Animatable3DObjClass::Peek_Animation_And_Info(float& frame, int& nu } } -/*********************************************************************************************** - * Animatable3DObjClass::Set_Animation_Frame_Rate_Multiplier * - *=============================================================================================*/ void Animatable3DObjClass::Set_Animation_Frame_Rate_Multiplier(float multiplier) { // 020607 srj -- added diff --git a/Generals/Code/Libraries/Source/WWVegas/WW3D2/animobj.h b/Generals/Code/Libraries/Source/WWVegas/WW3D2/animobj.h index eee665cc393..6f8d8e8485d 100644 --- a/Generals/Code/Libraries/Source/WWVegas/WW3D2/animobj.h +++ b/Generals/Code/Libraries/Source/WWVegas/WW3D2/animobj.h @@ -30,12 +30,6 @@ * * * $Revision:: 4 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * Animatable3DObjClass::Base_Update -- animation update function for the base pose * - * Animatable3DObjClass::Anim_Update -- Update function for a single animation * - * Animatable3DObjClass::Blend_Update -- update function for a blend of two animations * - * Animatable3DObjClass::Combo_Update -- Animation update for a combination of anims * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once @@ -215,18 +209,7 @@ class Animatable3DObjClass : public CompositeRenderObjClass -/*********************************************************************************************** - * Animatable3DObjClass::Base_Update -- animation update function for the base pose * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/2/99 GTH : Created. * - *=============================================================================================*/ +// Animation update function for the base pose. inline void Animatable3DObjClass::Base_Update(const Matrix3D & root) { /* @@ -239,18 +222,6 @@ inline void Animatable3DObjClass::Base_Update(const Matrix3D & root) } -/*********************************************************************************************** - * Animatable3DObjClass::Anim_Update -- Update function for a single animation * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/2/99 GTH : Created. * - *=============================================================================================*/ inline void Animatable3DObjClass::Anim_Update(const Matrix3D & root,HAnimClass * motion,float frame) { /* @@ -268,18 +239,7 @@ inline void Animatable3DObjClass::Anim_Update(const Matrix3D & root,HAnimClass * } -/*********************************************************************************************** - * Animatable3DObjClass::Blend_Update -- update function for a blend of two animations * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/2/99 GTH : Created. * - *=============================================================================================*/ +// Update function for a blend of two animations. inline void Animatable3DObjClass::Blend_Update ( const Matrix3D & root, @@ -300,18 +260,7 @@ inline void Animatable3DObjClass::Blend_Update } -/*********************************************************************************************** - * Animatable3DObjClass::Combo_Update -- Animation update for a combination of anims * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/2/99 GTH : Created. * - *=============================================================================================*/ +// Animation update for a combination of anims. inline void Animatable3DObjClass::Combo_Update( const Matrix3D & root, HAnimComboClass *anim ) { if (HTree) { diff --git a/Generals/Code/Libraries/Source/WWVegas/WW3D2/assetmgr.cpp b/Generals/Code/Libraries/Source/WWVegas/WW3D2/assetmgr.cpp index c5439d841ea..e27ecab0dea 100644 --- a/Generals/Code/Libraries/Source/WWVegas/WW3D2/assetmgr.cpp +++ b/Generals/Code/Libraries/Source/WWVegas/WW3D2/assetmgr.cpp @@ -35,45 +35,6 @@ * * * 06/27/02 KM Texture class abstraction * * 08/05/02 KM Texture class redesign (revisited) - *---------------------------------------------------------------------------------------------* - * Functions: * - * WW3DAssetManager::WW3DAssetManager -- Constructor * - * WW3DAssetManager::~WW3DAssetManager -- Destructor * - * WW3DAssetManager::Free -- free all memory (un-needed?) * - * WW3DAssetManager::Free_Assets -- Release all loaded assets * - * WW3DAssetManager::Load_3D_Assets -- Load 3D assets from a .W3D file * - * WW3DAssetManager::Load_Prototype -- loads a prototype from a W3D chunk * - * WW3DAssetManager::Create_Render_Obj -- Create a render object for the user * - * WW3DAssetManager::Render_Obj_Exists -- Check whether a render object with the given name * - * WW3DAssetManager::Create_Render_Obj_Iterator -- Create an iterator which can enumerate al * - * WW3DAssetManager::Release_Render_Obj_Iterator -- release a render object iterator * - * WW3DAssetManager::Create_HAnim_Iterator -- Creates an HAnim Iterator * - * WW3DAssetManager::Create_HTree_Iterator -- creates an htree iterator * - * WW3DAssetManager::Create_Material_Iterator -- Create a material iterator * - * WW3DAssetManager::Create_Font3DData_Iterator -- Create a Font3DData iterator * - * WW3DAssetManager::Get_HAnim -- Returns a pointer to a names HAnim * - * WW3DAssetManager::Get_HTree -- Returns a pointer to the named HTree * - * WW3DAssetManager::Get_Material -- Gets a pointer to a loaded material or creates it * - * WW3DAssetManager::Get_Material -- Gets a pointer to a loaded material or creates the mate * - * WW3DAssetManager::Get_Material -- Gets a pointer to a loaded material or creates it * - * WW3DAssetManager::Get_Font3DInstance -- Creates a pointer to a Font3DInstance * - * WW3DAssetManager::Get_Font3DData -- Gets a pointer to a loaded Font3DData or creates it * - * WW3DAssetManager::Release_Material -- Release a material * - * WW3DAssetManager::Release_Font3DData -- Release a Font3DData * - * WW3DAssetManager::Add_Material -- Add a material to the list * - * WW3DAssetManager::Add_Font3DData -- Add a Font3DData to the list * - * WW3DAssetManager::Get_Texture -- get a TextureClass for the specified targa * - * WW3DAssetManager::Release_All_Textures -- release all textures in the system * - * WW3DAssetManager::Register_Prototype_Loader -- add a new loader to the system * - * WW3DAssetManager::Find_Prototype_Loader -- find the loader that handles this chunk type * - * WW3DAssetManager::Add_Prototype -- adds the prototype to the hash table * - * WW3DAssetManager::Find_Prototype -- searches the hash table for the prototype * - * WW3DAssetManager::Open_Texture_File_Cache -- Turn on the texture cache system. * - * WW3DAssetManager::Close_Texture_File_Cache -- Turn off the texture cache system. * - * CachedTextureFileClass::getMipmapData -- get data for texture - check to see if in cache. * - * CachedTextureFileClass::getMipmapLevelPartial -- not yet implemented * - * CachedTextureFileClass::setupDefaultValues -- loads texture in to get default data. * - * WW3DAssetManager::Get_Streaming_Texture -- Gets a streaming texture. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "assetmgr.h" @@ -186,19 +147,6 @@ class Font3DDataIterator : public AssetIterator friend class WW3DAssetManager; }; -/*********************************************************************************************** - * WW3DAssetManager::WW3DAssetManager -- Constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/21/97 GTH : Created. * - * 05/10/1999 SKB : Add TextureCache * - *=============================================================================================*/ WW3DAssetManager::WW3DAssetManager() : PrototypeLoaders (PROTOLOADERS_VECTOR_SIZE), Prototypes (PROTOTYPES_VECTOR_SIZE), @@ -236,18 +184,6 @@ WW3DAssetManager::WW3DAssetManager() : } -/*********************************************************************************************** - * WW3DAssetManager::~WW3DAssetManager -- Destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/21/97 GTH : Created. * - *=============================================================================================*/ WW3DAssetManager::~WW3DAssetManager() { delete MetalManager; @@ -406,37 +342,14 @@ void WW3DAssetManager::Log_Texture_Statistics() */ } -/*********************************************************************************************** - * WW3DAssetManager::Free -- free all memory (un-needed?) * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/21/97 GTH : Created. * - *=============================================================================================*/ +// Free all memory (un-needed?). void WW3DAssetManager::Free() { Free_Assets(); } -/*********************************************************************************************** - * WW3DAssetManager::Free_Assets -- Release all loaded assets * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/21/97 GTH : Created. * - * 05/10/1999 SKB : Close down texture cache file. * - *=============================================================================================*/ +// Release all loaded assets. void WW3DAssetManager::Free_Assets() { WWPROFILE( "WW3DAssetManager::Free_Assets" ); @@ -471,18 +384,7 @@ void WW3DAssetManager::Free_Assets() } -/*********************************************************************************************** - * WW3DAssetManager::Free_Unused_Assets -- Release all assets that are referenced only by * - * the asset manager. * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 02/18/99 EHC : Created. * - *=============================================================================================*/ +// Release all assets that are referenced only by the asset manager. void WW3DAssetManager::Release_Unused_Assets() { // release all references to objects that have only one reference on them @@ -491,23 +393,8 @@ void WW3DAssetManager::Release_Unused_Assets() Release_Unused_Font3DDatas(); } -/*********************************************************************************************** - * WW3DAssetManager::Free_Assets_With_Exclusion_List -- Release all assets that are not named * - * in the exclusion list. * - * * - * This function checks if each prototype is named or is a child of something named in the * - * given exclusion list. * - * * - * INPUT: * - * exclusion_list - list of names of render object prototypes to not release. * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/12/2002 GH : Created. * - *=============================================================================================*/ +// Release all assets that are not named in the exclusion list. This function checks if each +// prototype is named or is a child of something named in the given exclusion list. void WW3DAssetManager::Free_Assets_With_Exclusion_List(const DynamicVectorClass & exclusion_names) { // Reset the dx8 mesh renderer @@ -561,24 +448,10 @@ void WW3DAssetManager::Free_Assets_With_Exclusion_List(const DynamicVectorClass< } -/*********************************************************************************************** - * WW3DAssetManager::Create_Asset_List -- Create a list of the W3D files that are loaded * - * * - * This function checks if each prototype is named or is a child of something named in the * - * given exclusion list. * - * * - * INPUT: * - * model_list - dynamic vector to populate with names of w3d files loaded * - * * - * OUTPUT: * - * * - * WARNINGS: * - * As in other places in the code, we are assuming that w3d filenames match the "top-level" * - * render object contained within them! * - * * - * HISTORY: * - * 12/12/2002 GH : Created. * - *=============================================================================================*/ +// Create a list of the W3D files that are loaded. This function checks if each prototype is named +// or is a child of something named in the given exclusion list. +// WARNING: As in other places in the code, we are assuming that w3d filenames match the "top-level" +// render object contained within them! void WW3DAssetManager::Create_Asset_List(DynamicVectorClass & model_list) { for (int i=0; i & model } -/*********************************************************************************************** - * WW3DAssetManager::Load_3D_Assets -- Load 3D assets from a file * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 10/22/98 BMG : Created. * - *=============================================================================================*/ bool WW3DAssetManager::Load_3D_Assets( const char * filename ) { bool result = false; @@ -630,18 +491,7 @@ bool WW3DAssetManager::Load_3D_Assets( const char * filename ) } -/*********************************************************************************************** - * WW3DAssetManager::Load_3D_Assets -- Load 3D assets from a .W3D file * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/21/97 GTH : Created. * - *=============================================================================================*/ +// Load 3D assets from a .W3D file. bool WW3DAssetManager::Load_3D_Assets(FileClass & w3dfile) { WWPROFILE( "WW3DAssetManager::Load_3D_Assets" ); @@ -679,20 +529,7 @@ bool WW3DAssetManager::Load_3D_Assets(FileClass & w3dfile) } -/*********************************************************************************************** - * WW3DAssetManager::Load_Prototype -- loads a prototype from a W3D chunk * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/29/98 GTH : Created. * - * 2/19/99 EHC : Now has the Add_Prototype call responsible for adding the prototype to * - * the Prototypes list object. * - *=============================================================================================*/ +// The Add_Prototype call is responsible for adding the prototype to the Prototypes list. bool WW3DAssetManager::Load_Prototype(ChunkLoadClass & cload) { WWPROFILE( "WW3DAssetManager::Load_Prototype" ); @@ -765,21 +602,8 @@ bool WW3DAssetManager::Load_Prototype(ChunkLoadClass & cload) } -/*********************************************************************************************** - * WW3DAssetManager::Create_Render_Obj -- Create a render object for the user * - * * - * This function will create any type of render object. I.e. if you pass in the name * - * of an HModel, it will create an hmodel for you. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/21/97 GTH : Created. * - *=============================================================================================*/ +// This function will create any type of render object. I.e. if you pass in the name of an HModel, +// it will create an hmodel for you. RenderObjClass * WW3DAssetManager::Create_Render_Obj(const char * name) { WWPROFILE( "WW3DAssetManager::Create_Render_Obj" ); @@ -827,18 +651,7 @@ RenderObjClass * WW3DAssetManager::Create_Render_Obj(const char * name) } -/*********************************************************************************************** - * WW3DAssetManager::Render_Obj_Exists -- Check whether a render object with the given name ex * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/21/97 GTH : Created. * - *=============================================================================================*/ +// Check whether a render object with the given name exists. bool WW3DAssetManager::Render_Obj_Exists(const char * name) { if (Find_Prototype(name) == nullptr) return false; @@ -846,120 +659,45 @@ bool WW3DAssetManager::Render_Obj_Exists(const char * name) } -/*********************************************************************************************** - * WW3DAssetManager::Create_Render_Obj_Iterator -- Create an iterator which can enumerate all * - * * - * The iterator returned can enumerate all of the loaded render objects for you. * - * The user is responsible for releasing the iterator! * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * User must release the iterator back to the asset manager or there will be a memory leak * - * * - * HISTORY: * - * 12/21/97 GTH : Created. * - *=============================================================================================*/ +// The iterator returned can enumerate all of the loaded render objects for you. +// WARNING: User must release the iterator back to the asset manager or there will be a memory leak. RenderObjIterator * WW3DAssetManager::Create_Render_Obj_Iterator() { return W3DNEW RObjIterator(); } -/*********************************************************************************************** - * WW3DAssetManager::Release_Render_Obj_Iterator -- release a render object iterator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 9/28/98 GTH : Created. * - *=============================================================================================*/ void WW3DAssetManager::Release_Render_Obj_Iterator(RenderObjIterator * it) { WWASSERT(it != nullptr); delete it; } -/*********************************************************************************************** - * WW3DAssetManager::Create_HAnim_Iterator -- Creates an HAnim Iterator * - * * - * Creates an iterator which can enumerate each of the named hierarchical animations * - * which are currently loaded. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * User must delete the iterator! * - * * - * HISTORY: * - * 12/21/97 GTH : Created. * - *=============================================================================================*/ +// Creates an iterator which can enumerate each of the named hierarchical animations which are +// currently loaded. +// WARNING: User must delete the iterator! AssetIterator * WW3DAssetManager::Create_HAnim_Iterator() { return W3DNEW HAnimIterator(); } -/*********************************************************************************************** - * WW3DAssetManager::Create_HTree_Iterator -- creates an htree iterator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/11/98 GTH : Created. * - *=============================================================================================*/ AssetIterator * WW3DAssetManager::Create_HTree_Iterator() { return W3DNEW HTreeIterator(); } -/*********************************************************************************************** - * WW3DAssetManager::Create_Font3DData_Iterator -- Create a Font3DData iterator * - * * - * Creates an iterator which can enumerate each of the Font3DDatas currently loaded * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * User must delete the iterator! * - * * - * HISTORY: * - * 1/6/98 GTH : Created. * - *=============================================================================================*/ +// Creates an iterator which can enumerate each of the Font3DDatas currently loaded. +// WARNING: User must delete the iterator! AssetIterator * WW3DAssetManager::Create_Font3DData_Iterator() { return W3DNEW Font3DDataIterator(); } -/*********************************************************************************************** - * WW3DAssetManager::Get_HAnim -- Returns a pointer to a names HAnim * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * The implementation has changed since its inception, the asset manager no longer owns the * - * hanim's so they need to be released by the caller. * - * * - * HISTORY: * - * 12/21/97 GTH : Created. * - *=============================================================================================*/ +// Returns a pointer to a named HAnim. +// WARNING: The implementation has changed since its inception, the asset manager no longer owns the +// hanims so they need to be released by the caller. HAnimClass * WW3DAssetManager::Get_HAnim(const char * name) { WWPROFILE( "WW3DAssetManager::Get_HAnim" ); @@ -1003,19 +741,8 @@ HAnimClass * WW3DAssetManager::Get_HAnim(const char * name) } -/*********************************************************************************************** - * WW3DAssetManager::Get_HTree -- Returns a pointer to the named HTree * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * DO NOT DELETE the HTree you get from this function, it is "owned" by the asset manager. * - * * - * HISTORY: * - * 12/21/97 GTH : Created. * - *=============================================================================================*/ +// Returns a pointer to the named HTree. +// WARNING: DO NOT DELETE the HTree you get from this function, it is "owned" by the asset manager. HTreeClass * WW3DAssetManager::Get_HTree(const char * name) { WWPROFILE( "WW3DAssetManager::Get_HTree" ); @@ -1048,18 +775,7 @@ HTreeClass * WW3DAssetManager::Get_HTree(const char * name) return htree; } -/*********************************************************************************************** - * WW3DAssetManager::Get_Texture -- get a TextureClass from the specified file * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/31/2001 NH : Created. * - *=============================================================================================*/ +// Get a TextureClass from the specified file. TextureClass * WW3DAssetManager::Get_Texture ( const char * filename, @@ -1131,18 +847,6 @@ TextureClass * WW3DAssetManager::Get_Texture } -/*********************************************************************************************** - * WW3DAssetManager::Release_All_Textures -- release all textures in the system * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 3/10/98 GTH : Created. * - *=============================================================================================*/ void WW3DAssetManager::Release_All_Textures() { /* @@ -1160,18 +864,7 @@ void WW3DAssetManager::Release_All_Textures() } -/*********************************************************************************************** - * WW3DAssetManager::Release_Unused_Textures -- release all textures with refcount == 1 * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/18/99 EHC : Created. * - *=============================================================================================*/ +// Release all textures with refcount == 1. void WW3DAssetManager::Release_Unused_Textures() { /* @@ -1204,18 +897,6 @@ void WW3DAssetManager::Release_Unused_Textures() } } -/*********************************************************************************************** - * WW3DAssetManager::Release_Texture -- release a specific texture from the asset manager * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/18/99 EHC : Created. * - *=============================================================================================*/ void WW3DAssetManager::Release_Texture(TextureClass *tex) { /* @@ -1306,18 +987,6 @@ void WW3DAssetManager::Log_All_Textures() -/*********************************************************************************************** - * WW3DAssetManager::Get_Font3DInstance -- Creates a pointer to a Font3DInstance * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/6/98 GTH : Created. * - *=============================================================================================*/ Font3DInstanceClass * WW3DAssetManager::Get_Font3DInstance( const char *name ) { WWPROFILE( "WW3DAssetManager::Get_Font3DInstance" ); @@ -1325,18 +994,7 @@ Font3DInstanceClass * WW3DAssetManager::Get_Font3DInstance( const char *name ) } -/*********************************************************************************************** - * WW3DAssetManager::Get_Font3DData -- Gets a pointer to a loaded Font3DData or creates it * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/6/98 GTH : Created. * - *=============================================================================================*/ +// Gets a pointer to a loaded Font3DData or creates it. Font3DDataClass * WW3DAssetManager::Get_Font3DData( const char *name ) { WWPROFILE( "WW3DAssetManager::Get_Font3DData" ); @@ -1359,18 +1017,6 @@ Font3DDataClass * WW3DAssetManager::Get_Font3DData( const char *name ) return font; } -/*********************************************************************************************** - * WW3DAssetManager::Add_Font3DData -- Add a Font3DData to the list * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/6/98 GTH : Created. * - *=============================================================================================*/ void WW3DAssetManager::Add_Font3DData(Font3DDataClass * font) { font->Add_Ref(); @@ -1383,18 +1029,6 @@ void WW3DAssetManager::Remove_Font3DData(Font3DDataClass * font) Font3DDatas.Remove(font); } -/*********************************************************************************************** - * WW3DAssetManager::Release_All_Font3DDatas -- Release all Font3DDatas from the asset manager * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/6/98 GTH : Created. * - *=============================================================================================*/ void WW3DAssetManager::Release_All_Font3DDatas() { // for each mat in the list, get it and release ref it @@ -1404,18 +1038,7 @@ void WW3DAssetManager::Release_All_Font3DDatas() } } -/*********************************************************************************************** - * WW3DAssetManager::Release_Unused_Font3DDatas -- Release all Font3DDatas with refcount == 1 * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/6/98 GTH : Created. * - *=============================================================================================*/ +// Release all Font3DDatas with refcount == 1. void WW3DAssetManager::Release_Unused_Font3DDatas() { /* @@ -1433,18 +1056,7 @@ void WW3DAssetManager::Release_Unused_Font3DDatas() } } -/*********************************************************************************************** - * WW3DAssetManager::Get_FontChars -- Gets a pointer to a loaded FontChars or creates it * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/1/01 BMG : Created. * - *=============================================================================================*/ +// Gets a pointer to a loaded FontChars or creates it. FontCharsClass * WW3DAssetManager::Get_FontChars( const char * name, int point_size, bool is_bold ) { WWPROFILE( "WW3DAssetManager::Get_FontChars" ); @@ -1471,18 +1083,6 @@ FontCharsClass * WW3DAssetManager::Get_FontChars( const char * name, int point_s } -/*********************************************************************************************** - * WW3DAssetManager::Release_All_FontChars -- Release all FontChars from the asset manager * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 6/1/01 BMG : Created. * - *=============================================================================================*/ void WW3DAssetManager::Release_All_FontChars() { // for each fontchars in the list, get it and release ref it @@ -1493,9 +1093,6 @@ void WW3DAssetManager::Release_All_FontChars() } -/*********************************************************************************************** - * WW3DAssetManager::Free_All_FontChars_Glyph_Caches -- Discards all cached glyphs * - *=============================================================================================*/ void WW3DAssetManager::Free_All_FontChars_Glyph_Caches() { for ( int i = 0; i < FontCharsList.Count(); i++ ) { @@ -1503,24 +1100,10 @@ void WW3DAssetManager::Free_All_FontChars_Glyph_Caches() } } -/*********************************************************************************************** - * WW3DAssetManager::Register_Prototype_Loader -- add a new loader to the system * - * * - * The library will automatically install loaders for the "built-in" render object * - * types. This function exists so that the user can design App-specific render objects, * - * define a chunk format for them, and have the asset manager load them in like everything * - * else. * - * * - * INPUT: * - * loader - pointer to a global or static instance of your loader type. * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/28/98 GTH : Created. * - *=============================================================================================*/ +// Add a new loader to the system. The library will automatically install loaders for the "built-in" +// render object types. This function exists so that the user can design App-specific render +// objects, define a chunk format for them, and have the asset manager load them in like everything +// else. void WW3DAssetManager::Register_Prototype_Loader(PrototypeLoaderClass * loader) { WWASSERT(loader != nullptr); @@ -1528,20 +1111,7 @@ void WW3DAssetManager::Register_Prototype_Loader(PrototypeLoaderClass * loader) } -/*********************************************************************************************** - * WW3DAssetManager::Find_Prototype_Loader -- find the loader that handles this chunk type * - * * - * INPUT: * - * chunk_id - chunk type that the loader needs to handle * - * * - * OUTPUT: * - * pointer to the appropriate loader or null if one wasn't found * - * * - * WARNINGS: * - * * - * HISTORY: * - * 7/28/98 GTH : Created. * - *=============================================================================================*/ +// Returns null if no loader handles this chunk type. PrototypeLoaderClass * WW3DAssetManager::Find_Prototype_Loader(int chunk_id) { for (int i=0; i _TempNormalBuffer; */ -/*********************************************************************************************** - * SkinDecalMeshClass::SkinDecalMeshClass -- Constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/31/00 NH : Created. * - *=============================================================================================*/ SkinDecalMeshClass::SkinDecalMeshClass(MeshClass * parent, DecalSystemClass * system) : DecalMeshClass(parent, system) { } -/*********************************************************************************************** - * SkinDecalMeshClass::~SkinDecalMeshClass -- Destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/31/00 NH : Created. * - *=============================================================================================*/ SkinDecalMeshClass::~SkinDecalMeshClass() { int i; @@ -759,18 +622,6 @@ SkinDecalMeshClass::~SkinDecalMeshClass() } -/*********************************************************************************************** - * SkinDecalMeshClass::Render -- Render the decals * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/31/00 NH : Created. * - *=============================================================================================*/ void SkinDecalMeshClass::Render() { if ((Decals.Count() == 0) || (WW3D::Are_Decals_Enabled() == false)) return; @@ -863,21 +714,8 @@ void SkinDecalMeshClass::Render() } -/*********************************************************************************************** - * SkinDecalMeshClass::Process_Material_Run -- scans the mesh for material runs * - * * - * This function will install the materials for poly[start_index] and scan forward for * - * the next material change. It will return the start index for the next material change * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/22/2001 gth : Created. * - *=============================================================================================*/ +// This function will install the materials for poly[start_index] and scan forward for the next +// material change. It will return the start index for the next material change. int SkinDecalMeshClass::Process_Material_Run(int start_index) { DX8Wrapper::Set_Texture(0,Textures[start_index]); @@ -896,19 +734,7 @@ int SkinDecalMeshClass::Process_Material_Run(int start_index) } -/*********************************************************************************************** - * SkinDecalMeshClass::Create_Decal -- Generate a new decal * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * All Decals on a mesh must be generated from the same DecalSystemClass! * - * * - * HISTORY: * - * 1/31/00 NH : Created. * - *=============================================================================================*/ +// WARNING: All Decals on a mesh must be generated from the same DecalSystemClass! bool SkinDecalMeshClass::Create_Decal(DecalGeneratorClass * generator, const OBBoxClass & localbox, SimpleDynVecClass & apt, const DynamicVectorClass * world_vertex_locs) @@ -1021,18 +847,6 @@ bool SkinDecalMeshClass::Create_Decal(DecalGeneratorClass * generator, } -/*********************************************************************************************** - * SkinDecalMeshClass::Delete_Decal -- Delete a decal * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/31/00 NH : Created. * - *=============================================================================================*/ bool SkinDecalMeshClass::Delete_Decal(uint32 id) { /* diff --git a/Generals/Code/Libraries/Source/WWVegas/WW3D2/decalmsh.h b/Generals/Code/Libraries/Source/WWVegas/WW3D2/decalmsh.h index c4a47a75a00..e4c6b4a9263 100644 --- a/Generals/Code/Libraries/Source/WWVegas/WW3D2/decalmsh.h +++ b/Generals/Code/Libraries/Source/WWVegas/WW3D2/decalmsh.h @@ -32,8 +32,6 @@ * * * $Revision:: 7 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Generals/Code/Libraries/Source/WWVegas/WW3D2/hanimmgr.cpp b/Generals/Code/Libraries/Source/WWVegas/WW3D2/hanimmgr.cpp index 3876d84ca7c..d74deec9890 100644 --- a/Generals/Code/Libraries/Source/WWVegas/WW3D2/hanimmgr.cpp +++ b/Generals/Code/Libraries/Source/WWVegas/WW3D2/hanimmgr.cpp @@ -31,19 +31,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * HAnimManagerClass::HAnimManagerClass -- constructor * - * HAnimManagerClass::~HAnimManagerClass -- destructor * - * HAnimManagerClass::Load_Anim -- loads a set of motion data from a file * - * HAnimManagerClass::Get_Anim_ID -- looks up the ID of a named Hierarchy Animation * - * HAnimManagerClass::Get_Anim -- returns a pointer to the specified animation data * - * HAnimManagerClass::Get_Anim -- returns a pointer to the specified Hierarchy Animation * - * HAnimManagerClass::Free -- de-allocate all memory in use * - * HAnimManagerClass::Free_All_Anims -- de-allocate all currently loaded animations * - * HAnimManagerClass::Load_Raw_Anim -- Load a raw anim * - * HAnimManagerClass::Load_Compressed_Anim -- load a compressed animation * - * HAnimManagerClass::Add_Anim -- Adds an externally created animation to the manager * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #include "hanimmgr.h" @@ -57,18 +44,6 @@ #include "animatedsoundmgr.h" -/*********************************************************************************************** - * HAnimManagerClass::HAnimManagerClass -- constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ HAnimManagerClass::HAnimManagerClass() { // Create the hash tables @@ -77,18 +52,6 @@ HAnimManagerClass::HAnimManagerClass() } -/*********************************************************************************************** - * HAnimManagerClass::~HAnimManagerClass -- destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ HAnimManagerClass::~HAnimManagerClass() { Free_All_Anims(); @@ -102,18 +65,6 @@ HAnimManagerClass::~HAnimManagerClass() } -/*********************************************************************************************** - * HAnimManagerClass::Load_Anim -- loads a set of motion data from a file * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ int HAnimManagerClass::Load_Anim(ChunkLoadClass & cload) { WWMEMLOG(MEM_ANIMATION); @@ -137,18 +88,6 @@ int HAnimManagerClass::Load_Anim(ChunkLoadClass & cload) } -/*********************************************************************************************** - * HAnimManagerClass::Load_Morph_Anim -- Load a HMorphAnimClass * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/23/2000 pds : Created. * - *=============================================================================================*/ int HAnimManagerClass::Load_Morph_Anim(ChunkLoadClass & cload) { HMorphAnimClass * newanim = W3DNEW HMorphAnimClass; @@ -180,18 +119,6 @@ int HAnimManagerClass::Load_Morph_Anim(ChunkLoadClass & cload) } -/*********************************************************************************************** - * HAnimManagerClass::Load_Raw_Anim -- Load a raw anim * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/23/2000 gth : Created. * - *=============================================================================================*/ int HAnimManagerClass::Load_Raw_Anim(ChunkLoadClass & cload) { HRawAnimClass * newanim = W3DNEW HRawAnimClass; @@ -223,18 +150,6 @@ int HAnimManagerClass::Load_Raw_Anim(ChunkLoadClass & cload) } -/*********************************************************************************************** - * HAnimManagerClass::Load_Compressed_Anim -- load a compressed animation * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 5/23/2000 gth : Created. * - *=============================================================================================*/ int HAnimManagerClass::Load_Compressed_Anim(ChunkLoadClass & cload) { HCompressedAnimClass * newanim = W3DNEW HCompressedAnimClass; @@ -265,36 +180,12 @@ int HAnimManagerClass::Load_Compressed_Anim(ChunkLoadClass & cload) return 1; } -/*********************************************************************************************** - * HAnimManagerClass::Peek_Anim -- returns a pointer to the specified animation data * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ HAnimClass * HAnimManagerClass::Peek_Anim(const char * name) { return (HAnimClass*)AnimPtrTable->Find( name ); } -/*********************************************************************************************** - * HAnimManagerClass::Get_Anim -- returns a pointer to the specified animation data * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ HAnimClass * HAnimManagerClass::Get_Anim(const char * name) { HAnimClass * anim = Peek_Anim( name ); @@ -305,18 +196,7 @@ HAnimClass * HAnimManagerClass::Get_Anim(const char * name) } -/*********************************************************************************************** - * HAnimManagerClass::Free_All_Anims -- de-allocate all currently loaded animations * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 08/11/1997 GH : Created. * - *=============================================================================================*/ +// De-allocate all currently loaded animations. void HAnimManagerClass::Free_All_Anims() { // Make an iterator, and release all ptrs @@ -330,18 +210,7 @@ void HAnimManagerClass::Free_All_Anims() AnimPtrTable->Reset(); } -/*********************************************************************************************** - * HAnimManagerClass::Free_All_Anims_With_Exclusion_List -- release animations not in the list * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/12/2002 GH : Created. * - *=============================================================================================*/ +// Release animations not in the list. void HAnimManagerClass::Free_All_Anims_With_Exclusion_List(const W3DExclusionListClass & exclusion_list) { // Remove and Release_Ref any animation not in the exclusion list. @@ -362,18 +231,7 @@ void HAnimManagerClass::Free_All_Anims_With_Exclusion_List(const W3DExclusionLis } -/*********************************************************************************************** - * HAnimManagerClass::Create_Asset_List -- Create a list of the W3D files that are loaded * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 12/12/2002 GH : Created. * - *=============================================================================================*/ +// Create a list of the W3D files that are loaded. void HAnimManagerClass::Create_Asset_List(DynamicVectorClass & exclusion_list) { HAnimManagerIterator it( *this ); @@ -391,18 +249,7 @@ void HAnimManagerClass::Create_Asset_List(DynamicVectorClass & excl } -/*********************************************************************************************** - * HAnimManagerClass::Add_Anim -- Adds an externally created animation to the manager * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 05/31/2000 PDS : Created. * - *=============================================================================================*/ +// Adds an externally created animation to the manager. bool HAnimManagerClass::Add_Anim(HAnimClass *new_anim) { WWASSERT (new_anim != nullptr); diff --git a/Generals/Code/Libraries/Source/WWVegas/WW3D2/hanimmgr.h b/Generals/Code/Libraries/Source/WWVegas/WW3D2/hanimmgr.h index d1d5535b93e..578951caeec 100644 --- a/Generals/Code/Libraries/Source/WWVegas/WW3D2/hanimmgr.h +++ b/Generals/Code/Libraries/Source/WWVegas/WW3D2/hanimmgr.h @@ -31,8 +31,6 @@ * * * $Revision:: 1 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #pragma once diff --git a/Generals/Code/Libraries/Source/WWVegas/WW3D2/hlod.cpp b/Generals/Code/Libraries/Source/WWVegas/WW3D2/hlod.cpp index e8cc3a81e65..adb51db0785 100644 --- a/Generals/Code/Libraries/Source/WWVegas/WW3D2/hlod.cpp +++ b/Generals/Code/Libraries/Source/WWVegas/WW3D2/hlod.cpp @@ -30,100 +30,6 @@ * * * $Revision:: 10 $* * * - *---------------------------------------------------------------------------------------------* - * Functions: * - * HLodLoaderClass::Load_W3D -- Loads an HlodDef from a W3D file * - * HLodPrototypeClass::Create -- Creates an HLod from an HLodDef * - * HLodDefClass::HLodDefClass -- Constructor * - * HLodDefClass::HLodDefClass -- Copy Constructor * - * HLodDefClass::~HLodDefClass -- Destructor * - * HLodDefClass::Free -- releases all resources being used * - * HLodDefClass::Initialize -- init this def from an HLod * - * HLodDefClass::Save -- save this HLodDef * - * HLodDefClass::Save_Header -- writes the HLodDef header * - * HLodDefClass::Save_Lod_Array -- Saves the lod array * - * HLodDefClass::Save_Aggregate_Array -- Save the array of aggregate models * - * HLodDefClass::Save_Proxy_Array -- Save the array of proxies * - * HLodDefClass::Load_W3D -- Loads this HLodDef from a W3d File * - * HLodDefClass::read_header -- loads the HLodDef header from a W3d file * - * HLodDefClass::read_proxy_array -- load the proxy names * - * HLodDefClass::SubObjectArrayClass::SubObjectArrayClass -- LodArray constructor * - * HLodDefClass::SubObjectArrayClass::~SubObjectArrayClass -- LodArray destructor * - * HLodDefClass::SubObjectArrayClass::Save_W3D -- saves a w3d file for this HLodDef * - * HLodDefClass::SubObjectArrayClass::Load_W3D -- LodArray load function * - * HLodDefClass::SubObjectArrayClass::Reset -- release the contents of this array * - * HLodDefClass::SubObjectArrayClass::Copy_Additional_Models -- copies the additional models * - * HLodClass::HLodClass -- Constructor * - * HLodClass::HLodClass -- copy constructor * - * HLodClass::HLodClass -- Constructor * - * HLodClass::HLodClass -- Constructs an HLod from an HLodDef * - * HLodClass::HLodClass -- Constructs an HLod from an HModelDef * - * HLodClass::operator -- assignment operator * - * HLodClass::~HLodClass -- Destructor * - * HLodClass::Free -- releases all resources * - * HLodClass::Clone -- virtual copy constructor * - * HLodClass::Set_Max_Screen_Size -- Set max-screen-size for an LOD * - * HLodClass::Get_Max_Screen_Size -- get max-screen-size for an LOD * - * HLodClass::Get_Lod_Count -- returns number of levels of detail * - * HLodClass::Get_Lod_Model_Count -- number of sub-objs in a given level of detail * - * HLodClass::Peek_Lod_Model -- returns pointer to a model in one of the LODs * - * HLodClass::Get_Lod_Model -- returns a pointer to a model in one of the LODs * - * HLodClass::Get_Lod_Model_Bone -- returns the bone index of a model * - * HLodClass::Get_Additional_Model_Count -- number of additional sub-objs * - * HLodClass::Peek_Additional_Model -- returns pointer to an additional model * - * HLodClass::Get_Additional_Model -- returns pointer to an additional model * - * HLodClass::Get_Additional_Model_Bone -- returns the bone index of an additional model * - * HLodClass::Is_NULL_Lod_Included -- does this HLod have nullptr as its lowest LOD * - * HLodClass::Include_NULL_Lod -- Add nullptr as the lowest LOD * - * HLodClass::Get_Num_Polys -- returns polycount of the current LOD * - * HLodClass::Render -- render this HLod * - * HLodClass::Special_Render -- Special_Render for HLod * - * HLodClass::Set_Transform -- Sets the transform * - * HLodClass::Set_Position -- Sets the position * - * HLodClass::Notify_Added -- callback notifies subobjs that they were added * - * HLodClass::Notify_Removed -- notifies subobjs that they were removed * - * HLodClass::Get_Num_Sub_Objects -- returns total number of sub-objects * - * HLodClass::Get_Sub_Object -- returns a pointer to specified sub-object * - * HLodClass::Add_Sub_Object -- add a sub-object to this HLod * - * HLodClass::Remove_Sub_Object -- remove a sub-object from this HLod * - * HLodClass::Get_Num_Sub_Objects_On_Bone -- returns the number of objects on the given bone * - * HLodClass::Get_Sub_Object_On_Bone -- returns obj on the given bone * - * HLodClass::Get_Sub_Object_Bone_Index -- returns bone index of given object * - * HLodClass::Add_Sub_Object_To_Bone -- adds a sub-object to a bone * - * HLodClass::Set_Animation -- set animation state to the base-pose * - * HLodClass::Set_Animation -- set animation state to an animation frame * - * HLodClass::Set_Animation -- set animation state to a blend of two animations * - * HLodClass::Set_Animation -- set animation state to a combination of anims * - * HLodClass::Cast_Ray -- cast a ray against this HLod * - * HLodClass::Cast_AABox -- Cast a swept AABox against this HLod * - * HLodClass::Cast_OBBox -- Cast a swept OBBox against this HLod * - * HLodClass::Intersect_AABox -- Intersect an AABox with this HLod * - * HLodClass::Intersect_OBBox -- Intersect an OBBox with this HLod * - * HLodClass::Prepare_LOD -- Prepare for LOD processing * - * HLodClass::Recalculate_Static_LOD_Factors -- compute lod factors * - * HLodClass::Increment_LOD -- move to next lod * - * HLodClass::Decrement_LOD -- move to previous lod * - * HLodClass::Get_Cost -- returns the cost of this LOD * - * HLodClass::Get_Value -- returns the value of this LOD * - * HLodClass::Get_Post_Increment_Value -- returns the post increment value * - * HLodClass::Set_LOD_Level -- set the current lod level * - * HLodClass::Get_LOD_Level -- returns the current LOD level * - * HLodClass::Get_LOD_Count -- returns the number of levels of detail * - * HLodClass::Calculate_Cost_Value_Arrays -- computes the cost-value arrays * - * HLodClass::Get_Current_LOD -- returns a render object which represents the current LOD * - * HLodClass::Set_Texture_Reduction_Factor -- resizeable texture support * - * HLodClass::Scale -- scale this HLod model * - * HLodClass::Get_Num_Snap_Points -- returns the number of snap points in this model * - * HLodClass::Get_Snap_Point -- returns specified snap-point * - * HLodClass::Update_Sub_Object_Transforms -- updates transforms of all sub-objects * - * HLodClass::Update_Obj_Space_Bounding_Volumes -- update object-space bounding volumes * - * HLodClass::Add_Lod_Model -- adds a model to one of the lods * - * HLodClass::Create_Decal -- create a decal on this HLod * - * HLodClass::Delete_Decal -- remove a decal from this HLod * - * HLodClass::Set_HTree -- replace the hierarchy tree * - * HLodClass::Get_Proxy_Count -- Returns the number of proxy objects * - * HLodClass::Get_Proxy -- returns the information for the i'th proxy * - * HLodClass::Set_Hidden -- Propogates the hidden bit to particle emitters. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -199,18 +105,7 @@ class ProxyArrayClass : public VectorClass, public RefCountCla ** The HLod Loader Implementation */ -/*********************************************************************************************** - * HLodLoaderClass::Load_W3D -- Loads an HlodDef from a W3D file * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Loads an HlodDef from a W3D file. PrototypeClass *HLodLoaderClass::Load_W3D( ChunkLoadClass &cload ) { HLodDefClass * def = W3DNEW HLodDefClass; @@ -237,18 +132,7 @@ PrototypeClass *HLodLoaderClass::Load_W3D( ChunkLoadClass &cload ) ** HLod Prototype Implementation */ -/*********************************************************************************************** - * HLodPrototypeClass::Create -- Creates an HLod from an HLodDef * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Creates an HLod from an HLodDef. RenderObjClass * HLodPrototypeClass::Create() { HLodClass * hlod = NEW_REF( HLodClass , ( *Definition ) ); @@ -260,17 +144,6 @@ RenderObjClass * HLodPrototypeClass::Create() ** HLodDef Implementation */ -/*********************************************************************************************** - * HLodDefClass::HLodDefClass -- Constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *=============================================================================================*/ HLodDefClass::HLodDefClass() : Name(nullptr), HierarchyTreeName(nullptr), @@ -281,18 +154,6 @@ HLodDefClass::HLodDefClass() : } -/*********************************************************************************************** - * HLodDefClass::HLodDefClass -- Copy Constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ HLodDefClass::HLodDefClass(HLodClass &src_lod) : Name(nullptr), HierarchyTreeName(nullptr), @@ -304,36 +165,13 @@ HLodDefClass::HLodDefClass(HLodClass &src_lod) : } -/*********************************************************************************************** - * HLodDefClass::~HLodDefClass -- Destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ HLodDefClass::~HLodDefClass() { Free (); } -/*********************************************************************************************** - * HLodDefClass::Free -- releases all resources being used * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Releases all resources being used. void HLodDefClass::Free() { ::free(Name); @@ -351,18 +189,6 @@ void HLodDefClass::Free() } -/*********************************************************************************************** - * HLodDefClass::Initialize -- init this def from an HLod * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ void HLodDefClass::Initialize(HLodClass &src_lod) { // Start with a fresh set of data @@ -417,18 +243,6 @@ void HLodDefClass::Initialize(HLodClass &src_lod) } -/*********************************************************************************************** - * HLodDefClass::Save -- save this HLodDef * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ WW3DErrorType HLodDefClass::Save(ChunkSaveClass & csave) { // Assume error @@ -456,18 +270,6 @@ WW3DErrorType HLodDefClass::Save(ChunkSaveClass & csave) } -/*********************************************************************************************** - * HLodDefClass::Save_Header -- writes the HLodDef header * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ WW3DErrorType HLodDefClass::Save_Header(ChunkSaveClass &csave) { // Assume error @@ -505,18 +307,6 @@ WW3DErrorType HLodDefClass::Save_Header(ChunkSaveClass &csave) } -/*********************************************************************************************** - * HLodDefClass::Save_Lod_Array -- Saves the lod array * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ WW3DErrorType HLodDefClass::Save_Lod_Array(ChunkSaveClass &csave) { // Loop through all the LODs and save their model array to the chunk @@ -536,21 +326,7 @@ WW3DErrorType HLodDefClass::Save_Lod_Array(ChunkSaveClass &csave) } -/*********************************************************************************************** - * HLodDefClass::Save_Aggregate_Array -- Save the array of aggregate models * - * * - * aggregate models are ones that are attached as "additional" models. * - * * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 10/25/2000 gth : Created. * - *=============================================================================================*/ +// Aggregate models are ones that are attached as "additional" models. WW3DErrorType HLodDefClass::Save_Aggregate_Array(ChunkSaveClass & csave) { bool success = true; @@ -565,20 +341,8 @@ WW3DErrorType HLodDefClass::Save_Aggregate_Array(ChunkSaveClass & csave) } -/*********************************************************************************************** - * HLodDefClass::Save_Proxy_Array -- Save the array of proxies * - * * - * The screen size in the array header is 0. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 10/18/2026 TheSuperHackers : Created. * - *=============================================================================================*/ +// The screen size in the array header is 0. +// TheSuperHackers @fix Added to keep the proxy and aggregate arrays of HLod definitions. WW3DErrorType HLodDefClass::Save_Proxy_Array(ChunkSaveClass & csave) { bool success = true; @@ -618,18 +382,6 @@ WW3DErrorType HLodDefClass::Save_Proxy_Array(ChunkSaveClass & csave) } -/*********************************************************************************************** - * HLodDefClass::Load_W3D -- Loads this HLodDef from a W3d File * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ WW3DErrorType HLodDefClass::Load_W3D(ChunkLoadClass & cload) { /* @@ -682,18 +434,7 @@ WW3DErrorType HLodDefClass::Load_W3D(ChunkLoadClass & cload) } -/*********************************************************************************************** - * HLodDefClass::read_header -- loads the HLodDef header from a W3d file * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Loads the HLodDef header from a W3d file. bool HLodDefClass::read_header(ChunkLoadClass & cload) { /* @@ -721,22 +462,9 @@ bool HLodDefClass::read_header(ChunkLoadClass & cload) } -/*********************************************************************************************** - * HLodDefClass::read_proxy_array -- load the proxy names * - * * - * This function is coded separately from SubObjectArrayClass::Load because we are going * - * to store the proxies in a shared data structure. Because all of the proxy data is * - * constant, each instanced HLOD can just add-ref a pointer to its proxy array. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 10/27/2000 gth : Created. * - *=============================================================================================*/ +// Load the proxy names. This function is coded separately from SubObjectArrayClass::Load because we +// are going to store the proxies in a shared data structure. Because all of the proxy data is +// constant, each instanced HLOD can just add-ref a pointer to its proxy array. bool HLodDefClass::read_proxy_array(ChunkLoadClass & cload) { REF_PTR_RELEASE(ProxyArray); @@ -771,17 +499,6 @@ bool HLodDefClass::read_proxy_array(ChunkLoadClass & cload) } -/*********************************************************************************************** - * HLodDefClass::SubObjectArrayClass::SubObjectArrayClass -- LodArray constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *=============================================================================================*/ HLodDefClass::SubObjectArrayClass::SubObjectArrayClass() : MaxScreenSize(NO_MAX_SCREEN_SIZE), ModelCount(0), @@ -791,36 +508,13 @@ HLodDefClass::SubObjectArrayClass::SubObjectArrayClass() : } -/*********************************************************************************************** - * HLodDefClass::SubObjectArrayClass::~SubObjectArrayClass -- LodArray destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ HLodDefClass::SubObjectArrayClass::~SubObjectArrayClass() { Reset(); } -/*********************************************************************************************** - * HLodDefClass::SubObjectArrayClass::Reset -- release the contents of this array * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 10/25/2000 gth : Created. * - *=============================================================================================*/ +// Release the contents of this array. void HLodDefClass::SubObjectArrayClass::Reset() { MaxScreenSize = NO_MAX_SCREEN_SIZE; @@ -840,18 +534,7 @@ void HLodDefClass::SubObjectArrayClass::Reset() } -/*********************************************************************************************** - * HLodDefClass::SubObjectArrayClass::Copy_Additional_Models -- copies the additional models * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 10/18/2026 TheSuperHackers : Created. * - *=============================================================================================*/ +// TheSuperHackers @fix Added to keep the proxy and aggregate arrays of HLod definitions. void HLodDefClass::SubObjectArrayClass::Copy_Additional_Models(const HLodClass & hlod) { Reset(); @@ -869,18 +552,6 @@ void HLodDefClass::SubObjectArrayClass::Copy_Additional_Models(const HLodClass & } -/*********************************************************************************************** - * HLodDefClass::SubObjectArrayClass::Load_W3D -- LodArray load function * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ bool HLodDefClass::SubObjectArrayClass::Load_W3D(ChunkLoadClass & cload) { /* @@ -920,21 +591,9 @@ bool HLodDefClass::SubObjectArrayClass::Load_W3D(ChunkLoadClass & cload) return true; } -/*********************************************************************************************** - * HLodDefClass::SubObjectArrayClass::Save_W3D -- saves a w3d file for this HLodDef * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - * 10/18/2026 TheSuperHackers : Write only the array contents, as Load_W3D reads them. * - * The caller wraps them in W3D_CHUNK_HLOD_LOD_ARRAY or * - * W3D_CHUNK_HLOD_AGGREGATE_ARRAY. * - *=============================================================================================*/ +// Saves a w3d file for this HLodDef. +// TheSuperHackers @fix Writes only the array contents, as Load_W3D reads them. The caller wraps +// them in W3D_CHUNK_HLOD_LOD_ARRAY or W3D_CHUNK_HLOD_AGGREGATE_ARRAY. bool HLodDefClass::SubObjectArrayClass::Save_W3D(ChunkSaveClass &csave) { // Assume error @@ -988,17 +647,6 @@ bool HLodDefClass::SubObjectArrayClass::Save_W3D(ChunkSaveClass &csave) -/*********************************************************************************************** - * HLodClass::HLodClass -- Constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - *=============================================================================================*/ HLodClass::HLodClass() : Animatable3DObjClass(nullptr), LodCount(0), @@ -1015,18 +663,6 @@ HLodClass::HLodClass() : } -/*********************************************************************************************** - * HLodClass::HLodClass -- copy constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ HLodClass::HLodClass(const HLodClass & src) : Animatable3DObjClass(src), LodCount(0), @@ -1044,21 +680,8 @@ HLodClass::HLodClass(const HLodClass & src) : } -/*********************************************************************************************** - * HLodClass::HLodClass -- Constructor * - * * - * Creates an HLodClass from an array of render objects. Each render object is assumed to * - * be an alternate level of detail. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Creates an HLodClass from an array of render objects. Each render object is assumed to be an +// alternate level of detail. HLodClass::HLodClass(const char * name,RenderObjClass ** lods,int count) : Animatable3DObjClass(nullptr), LodCount(0), @@ -1149,18 +772,7 @@ HLodClass::HLodClass(const char * name,RenderObjClass ** lods,int count) : } -/*********************************************************************************************** - * HLodClass::HLodClass -- Constructs an HLod from an HLodDef * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Constructs an HLod from an HLodDef. HLodClass::HLodClass(const HLodDefClass & def) : Animatable3DObjClass(def.HierarchyTreeName), LodCount(0), @@ -1237,18 +849,7 @@ HLodClass::HLodClass(const HLodDefClass & def) : } -/*********************************************************************************************** - * HLodClass::HLodClass -- Constructs an HLod from an HModelDef * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Constructs an HLod from an HModelDef. HLodClass::HLodClass(const HModelDefClass & def) : Animatable3DObjClass(def.BasePoseName), LodCount(0), @@ -1308,18 +909,6 @@ HLodClass::HLodClass(const HModelDefClass & def) : } -/*********************************************************************************************** - * HLodClass::operator -- assignment operator * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ HLodClass & HLodClass::operator = (const HLodClass & that) { int lod,model; @@ -1396,36 +985,13 @@ HLodClass & HLodClass::operator = (const HLodClass & that) } -/*********************************************************************************************** - * HLodClass::~HLodClass -- Destructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ HLodClass::~HLodClass() { Free(); } -/*********************************************************************************************** - * HLodClass::Free -- releases all resources * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Releases all resources. void HLodClass::Free() { int lod,model; @@ -1470,36 +1036,14 @@ void HLodClass::Free() } -/*********************************************************************************************** - * HLodClass::Clone -- virtual copy constructor * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Virtual copy constructor. RenderObjClass * HLodClass::Clone() const { return W3DNEW HLodClass(*this); } -/*********************************************************************************************** - * HLodClass::Get_Obj_Space_Bounding_Box -- Return the bounding box mesh if we have one. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/13/00 pds : Created. * - *=============================================================================================*/ +// Return the bounding box mesh if we have one. void HLodClass::Get_Obj_Space_Bounding_Box(AABoxClass & box) const { // @@ -1542,18 +1086,7 @@ void HLodClass::Get_Obj_Space_Bounding_Box(AABoxClass & box) const } -/*********************************************************************************************** - * HLodClass::Get_Obj_Space_Bounding_Sphere -- Use the bounding box mesh to calculate a sphere.* - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/13/00 pds : Created. * - *=============================================================================================*/ +// Use the bounding box mesh to calculate a sphere. void HLodClass::Get_Obj_Space_Bounding_Sphere(SphereClass & sphere) const { AABoxClass box; @@ -1563,18 +1096,7 @@ void HLodClass::Get_Obj_Space_Bounding_Sphere(SphereClass & sphere) const } -/*********************************************************************************************** - * HLodClass::Get_Obj_Space_Bounding_Sphere -- Use the bounding box mesh to calculate a sphere.* - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/13/00 pds : Created. * - *=============================================================================================*/ +// Use the bounding box mesh to calculate a sphere. const SphereClass &HLodClass::Get_Bounding_Sphere() const { if (BoundingBoxIndex >= 0) { @@ -1601,18 +1123,7 @@ const SphereClass &HLodClass::Get_Bounding_Sphere() const } -/*********************************************************************************************** - * HLodClass::Get_Obj_Space_Bounding_Box -- Return the bounding box mesh if we have one. * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 4/13/00 pds : Created. * - *=============================================================================================*/ +// Return the bounding box mesh if we have one. const AABoxClass &HLodClass::Get_Bounding_Box() const { if (BoundingBoxIndex >= 0) { @@ -1638,18 +1149,6 @@ const AABoxClass &HLodClass::Get_Bounding_Box() const } -/*********************************************************************************************** - * HLodClass::Set_Max_Screen_Size -- Set max-screen-size for an LOD * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ void HLodClass::Set_Max_Screen_Size(int lod_index, float size) { // Params valid? @@ -1673,18 +1172,6 @@ void HLodClass::Set_Max_Screen_Size(int lod_index, float size) } -/*********************************************************************************************** - * HLodClass::Get_Max_Screen_Size -- get max-screen-size for an LOD * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ float HLodClass::Get_Max_Screen_Size(int lod_index) const { float size = NO_MAX_SCREEN_SIZE; @@ -1703,36 +1190,13 @@ float HLodClass::Get_Max_Screen_Size(int lod_index) const } -/*********************************************************************************************** - * HLodClass::Get_Lod_Count -- returns number of levels of detail * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Returns number of levels of detail. int HLodClass::Get_Lod_Count() const { return LodCount; } -/*********************************************************************************************** - * HLodClass::Set_LOD_Bias -- sets LOD bias * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 2/08/00 nh : Created. * - *=============================================================================================*/ void HLodClass::Set_LOD_Bias(float bias) { assert(bias > 0.0f); @@ -1746,18 +1210,7 @@ void HLodClass::Set_LOD_Bias(float bias) } -/*********************************************************************************************** - * HLodClass::Get_Lod_Model_Count -- number of sub-objs in a given level of detail * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Number of sub-objs in a given level of detail. int HLodClass::Get_Lod_Model_Count(int lod_index) const { int count = 0; @@ -1776,18 +1229,6 @@ int HLodClass::Get_Lod_Model_Count(int lod_index) const } -/*********************************************************************************************** - * HLodClass::Peek_Lod_Model -- returns pointer to a model in one of the LODs * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ RenderObjClass *HLodClass::Peek_Lod_Model(int lod_index, int model_index) const { RenderObjClass *pmodel = nullptr; @@ -1808,18 +1249,6 @@ RenderObjClass *HLodClass::Peek_Lod_Model(int lod_index, int model_index) const } -/*********************************************************************************************** - * HLodClass::Get_Lod_Model -- returns a pointer to a model in one of the LODs * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ RenderObjClass *HLodClass::Get_Lod_Model(int lod_index, int model_index) const { RenderObjClass *pmodel = nullptr; @@ -1843,18 +1272,6 @@ RenderObjClass *HLodClass::Get_Lod_Model(int lod_index, int model_index) const } -/*********************************************************************************************** - * HLodClass::Get_Lod_Model_Bone -- returns the bone index of a model * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ int HLodClass::Get_Lod_Model_Bone(int lod_index, int model_index) const { int bone_index = 0; @@ -1875,36 +1292,12 @@ int HLodClass::Get_Lod_Model_Bone(int lod_index, int model_index) const } -/*********************************************************************************************** - * HLodClass::Get_Additional_Model_Count -- number of additional sub-objs * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 8/23/00 NH : Created. * - *=============================================================================================*/ int HLodClass::Get_Additional_Model_Count() const { return AdditionalModels.Count(); } -/*********************************************************************************************** - * HLodClass::Peek_Additional_Model -- returns pointer to an additional model * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 8/23/00 NH : Created. * - *=============================================================================================*/ RenderObjClass * HLodClass::Peek_Additional_Model (int model_index) const { RenderObjClass *pmodel = nullptr; @@ -1924,18 +1317,6 @@ RenderObjClass * HLodClass::Peek_Additional_Model (int model_index) const } -/*********************************************************************************************** - * HLodClass::Get_Additional_Model -- returns pointer to an additional model * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 8/23/00 NH : Created. * - *=============================================================================================*/ RenderObjClass * HLodClass::Get_Additional_Model (int model_index) const { RenderObjClass *pmodel = nullptr; @@ -1958,18 +1339,6 @@ RenderObjClass * HLodClass::Get_Additional_Model (int model_index) const } -/*********************************************************************************************** - * HLodClass::Get_Additional_Model_Bone -- returns the bone index of an additional model * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 8/23/00 NH : Created. * - *=============================================================================================*/ int HLodClass::Get_Additional_Model_Bone (int model_index) const { int bone_index = 0; @@ -1989,18 +1358,7 @@ int HLodClass::Get_Additional_Model_Bone (int model_index) const } -/*********************************************************************************************** - * HLodClass::Is_NULL_Lod_Included -- does this HLod have nullptr as its lowest LOD * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Does this HLod have nullptr as its lowest LOD. bool HLodClass::Is_NULL_Lod_Included() const { bool included = false; @@ -2015,18 +1373,7 @@ bool HLodClass::Is_NULL_Lod_Included() const } -/*********************************************************************************************** - * HLodClass::Include_NULL_Lod -- Add nullptr as the lowest LOD * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Add nullptr as the lowest LOD. void HLodClass::Include_NULL_Lod(bool include) { if ((include == false) && Is_NULL_Lod_Included ()) { @@ -2106,18 +1453,6 @@ void HLodClass::Include_NULL_Lod(bool include) } -/*********************************************************************************************** - * HLodClass::Get_Proxy_Count -- Returns the number of proxy records * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 10/27/2000 gth : Created. * - *=============================================================================================*/ int HLodClass::Get_Proxy_Count() const { if (ProxyArray != nullptr) { @@ -2128,18 +1463,7 @@ int HLodClass::Get_Proxy_Count() const } -/*********************************************************************************************** - * HLodClass::Get_Proxy -- returns the information for the i'th proxy * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 10/27/2000 gth : Created. * - *=============================================================================================*/ +// Returns the information for the i'th proxy. bool HLodClass::Get_Proxy (int index, ProxyClass &proxy) const { bool retval = false; @@ -2169,18 +1493,6 @@ bool HLodClass::Get_Proxy (int index, ProxyClass &proxy) const } -/*********************************************************************************************** - * HLodClass::Get_Num_Polys -- returns polycount of the current LOD * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ int HLodClass::Get_Num_Polys() const { int polycount = 0; @@ -2203,18 +1515,6 @@ int HLodClass::Get_Num_Polys() const } -/*********************************************************************************************** - * HLodClass::Render -- render this HLod * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ void HLodClass::Render(RenderInfoClass & rinfo) { int i; @@ -2243,18 +1543,6 @@ void HLodClass::Render(RenderInfoClass & rinfo) } -/*********************************************************************************************** - * HLodClass::Special_Render -- Special_Render for HLod * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ void HLodClass::Special_Render(SpecialRenderInfoClass & rinfo) { int i; @@ -2280,18 +1568,6 @@ void HLodClass::Special_Render(SpecialRenderInfoClass & rinfo) } -/*********************************************************************************************** - * HLodClass::Set_Transform -- Sets the transform * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ void HLodClass::Set_Transform(const Matrix3D &m) { Animatable3DObjClass::Set_Transform(m); @@ -2299,18 +1575,6 @@ void HLodClass::Set_Transform(const Matrix3D &m) } -/*********************************************************************************************** - * HLodClass::Set_Position -- Sets the position * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ void HLodClass::Set_Position(const Vector3 &v) { Animatable3DObjClass::Set_Position(v); @@ -2318,18 +1582,7 @@ void HLodClass::Set_Position(const Vector3 &v) } -/*********************************************************************************************** - * HLodClass::Notify_Added -- callback notifies subobjs that they were added * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Callback notifies subobjs that they were added. void HLodClass::Notify_Added(SceneClass * scene) { RenderObjClass::Notify_Added(scene); @@ -2346,18 +1599,7 @@ void HLodClass::Notify_Added(SceneClass * scene) } -/*********************************************************************************************** - * HLodClass::Notify_Removed -- notifies subobjs that they were removed * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Notifies subobjs that they were removed. void HLodClass::Notify_Removed(SceneClass * scene) { int i; @@ -2374,18 +1616,6 @@ void HLodClass::Notify_Removed(SceneClass * scene) } -/*********************************************************************************************** - * HLodClass::Get_Num_Sub_Objects -- returns total number of sub-objects * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ int HLodClass::Get_Num_Sub_Objects() const { int count = 0; @@ -2397,18 +1627,6 @@ int HLodClass::Get_Num_Sub_Objects() const } -/*********************************************************************************************** - * HLodClass::Get_Sub_Object -- returns a pointer to specified sub-object * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ RenderObjClass * HLodClass::Get_Sub_Object(int index) const { WWASSERT(index >= 0); @@ -2425,36 +1643,12 @@ RenderObjClass * HLodClass::Get_Sub_Object(int index) const } -/*********************************************************************************************** - * HLodClass::Add_Sub_Object -- add a sub-object to this HLod * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ int HLodClass::Add_Sub_Object(RenderObjClass * subobj) { return Add_Sub_Object_To_Bone(subobj,0); } -/*********************************************************************************************** - * HLodClass::Remove_Sub_Object -- remove a sub-object from this HLod * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ int HLodClass::Remove_Sub_Object(RenderObjClass * removeme) { // no object given? @@ -2518,18 +1712,6 @@ int HLodClass::Remove_Sub_Object(RenderObjClass * removeme) } -/*********************************************************************************************** - * HLodClass::Get_Num_Sub_Objects_On_Bone -- returns the number of objects on the given bone * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ int HLodClass::Get_Num_Sub_Objects_On_Bone(int boneindex) const { int count = 0; @@ -2546,18 +1728,6 @@ int HLodClass::Get_Num_Sub_Objects_On_Bone(int boneindex) const } -/*********************************************************************************************** - * HLodClass::Get_Sub_Object_On_Bone -- returns obj on the given bone * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ RenderObjClass * HLodClass::Get_Sub_Object_On_Bone(int index,int boneindex) const { int count = 0; @@ -2585,18 +1755,6 @@ RenderObjClass * HLodClass::Get_Sub_Object_On_Bone(int index,int boneindex) cons } -/*********************************************************************************************** - * HLodClass::Get_Sub_Object_Bone_Index -- returns bone index of given object * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ int HLodClass::Get_Sub_Object_Bone_Index(RenderObjClass * subobj) const { for (int lod = 0; lod < LodCount; lod++) { @@ -2620,18 +1778,6 @@ int HLodClass::Get_Sub_Object_Bone_Index(int LodIndex, int ModelIndex) const return Lod[LodIndex][ModelIndex].BoneIndex; } -/*********************************************************************************************** - * HLodClass::Add_Sub_Object_To_Bone -- adds a sub-object to a bone * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ int HLodClass::Add_Sub_Object_To_Bone(RenderObjClass * subobj,int boneindex) { WWASSERT(subobj); @@ -2661,18 +1807,7 @@ int HLodClass::Add_Sub_Object_To_Bone(RenderObjClass * subobj,int boneindex) } -/*********************************************************************************************** - * HLodClass::Set_Animation -- set animation state to the base-pose * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Set animation state to the base-pose. void HLodClass::Set_Animation() { Animatable3DObjClass::Set_Animation(); @@ -2680,18 +1815,7 @@ void HLodClass::Set_Animation() } -/*********************************************************************************************** - * HLodClass::Set_Animation -- set animation state to an animation frame * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Set animation state to an animation frame. void HLodClass::Set_Animation(HAnimClass * motion,float frame,int mode) { Animatable3DObjClass::Set_Animation(motion,frame,mode); @@ -2699,18 +1823,7 @@ void HLodClass::Set_Animation(HAnimClass * motion,float frame,int mode) } -/*********************************************************************************************** - * HLodClass::Set_Animation -- set animation state to a blend of two animations * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Set animation state to a blend of two animations. void HLodClass::Set_Animation ( HAnimClass * motion0, @@ -2725,18 +1838,7 @@ void HLodClass::Set_Animation } -/*********************************************************************************************** - * HLodClass::Set_Animation -- set animation state to a combination of anims * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Set animation state to a combination of anims. void HLodClass::Set_Animation(HAnimComboClass * anim_combo) { Animatable3DObjClass::Set_Animation(anim_combo); @@ -2744,18 +1846,7 @@ void HLodClass::Set_Animation(HAnimComboClass * anim_combo) } -/*********************************************************************************************** - * HLodClass::Cast_Ray -- cast a ray against this HLod * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Cast a ray against this HLod. bool HLodClass::Cast_Ray(RayCollisionTestClass & raytest) { if (Are_Sub_Object_Transforms_Dirty ()) { @@ -2779,18 +1870,7 @@ bool HLodClass::Cast_Ray(RayCollisionTestClass & raytest) } -/*********************************************************************************************** - * HLodClass::Cast_AABox -- Cast a swept AABox against this HLod * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Cast a swept AABox against this HLod. bool HLodClass::Cast_AABox(AABoxCollisionTestClass & boxtest) { if (Are_Sub_Object_Transforms_Dirty ()) { @@ -2814,18 +1894,7 @@ bool HLodClass::Cast_AABox(AABoxCollisionTestClass & boxtest) } -/*********************************************************************************************** - * HLodClass::Cast_OBBox -- Cast a swept OBBox against this HLod * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Cast a swept OBBox against this HLod. bool HLodClass::Cast_OBBox(OBBoxCollisionTestClass & boxtest) { if (Are_Sub_Object_Transforms_Dirty ()) { @@ -2849,18 +1918,6 @@ bool HLodClass::Cast_OBBox(OBBoxCollisionTestClass & boxtest) } -/*********************************************************************************************** - * HLodClass::Intersect_AABox -- Intersect an AABox with this HLod * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ bool HLodClass::Intersect_AABox(AABoxIntersectionTestClass & boxtest) { if (Are_Sub_Object_Transforms_Dirty ()) { @@ -2884,18 +1941,6 @@ bool HLodClass::Intersect_AABox(AABoxIntersectionTestClass & boxtest) } -/*********************************************************************************************** - * HLodClass::Intersect_OBBox -- Intersect an OBBox with this HLod * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ bool HLodClass::Intersect_OBBox(OBBoxIntersectionTestClass & boxtest) { if (Are_Sub_Object_Transforms_Dirty ()) { @@ -2919,18 +1964,6 @@ bool HLodClass::Intersect_OBBox(OBBoxIntersectionTestClass & boxtest) } -/*********************************************************************************************** - * HLodClass::Prepare_LOD -- Prepare for LOD processing * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ void HLodClass::Prepare_LOD(CameraClass &camera) { if (Is_Not_Hidden_At_All() == false) { @@ -2980,18 +2013,6 @@ void HLodClass::Prepare_LOD(CameraClass &camera) } -/*********************************************************************************************** - * HLodClass::Recalculate_Static_LOD_Factors -- compute lod factors * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ void HLodClass::Recalculate_Static_LOD_Factors() { /* @@ -3026,18 +2047,7 @@ void HLodClass::Recalculate_Static_LOD_Factors() } -/*********************************************************************************************** - * HLodClass::Increment_LOD -- move to next lod * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Move to next lod. void HLodClass::Increment_LOD() { if (CurLod >= (LodCount-1)) return; @@ -3060,18 +2070,7 @@ void HLodClass::Increment_LOD() } -/*********************************************************************************************** - * HLodClass::Decrement_LOD -- move to previous lod * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Move to previous lod. void HLodClass::Decrement_LOD() { if (CurLod < 1) return; @@ -3094,72 +2093,24 @@ void HLodClass::Decrement_LOD() } -/*********************************************************************************************** - * HLodClass::Get_Cost -- returns the cost of this LOD * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ float HLodClass::Get_Cost() const { return(Cost[CurLod]); } -/*********************************************************************************************** - * HLodClass::Get_Value -- returns the value of this LOD * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ float HLodClass::Get_Value() const { return(Value[CurLod]); } -/*********************************************************************************************** - * HLodClass::Get_Post_Increment_Value -- returns the post increment value * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ float HLodClass::Get_Post_Increment_Value() const { return(Value[CurLod + 1]); } -/*********************************************************************************************** - * HLodClass::Set_LOD_Level -- set the current lod level * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ void HLodClass::Set_LOD_Level(int lod) { lod = MAX(0, lod); @@ -3186,54 +2137,19 @@ void HLodClass::Set_LOD_Level(int lod) } -/*********************************************************************************************** - * HLodClass::Get_LOD_Level -- returns the current LOD level * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ int HLodClass::Get_LOD_Level() const { return CurLod; } -/*********************************************************************************************** - * HLodClass::Get_LOD_Count -- returns the number of levels of detail * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Returns the number of levels of detail. int HLodClass::Get_LOD_Count() const { return LodCount; } -/*********************************************************************************************** - * HLodClass::Calculate_Cost_Value_Arrays -- computes the cost-value arrays * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ int HLodClass::Calculate_Cost_Value_Arrays(float screen_area, float *values, float *costs) const { int lod = 0; @@ -3271,18 +2187,7 @@ int HLodClass::Calculate_Cost_Value_Arrays(float screen_area, float *values, flo } -/*********************************************************************************************** - * HLodClass::Get_Current_LOD -- returns a render object which represents the current LOD * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Returns a render object which represents the current LOD. RenderObjClass * HLodClass::Get_Current_LOD() { int count = Get_Lod_Model_Count(CurLod); @@ -3294,18 +2199,7 @@ RenderObjClass * HLodClass::Get_Current_LOD() } -/*********************************************************************************************** - * HLodClass::Set_Texture_Reduction_Factor -- resizeable texture support * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Resizeable texture support. /* void HLodClass::Set_Texture_Reduction_Factor(float trf) { @@ -3322,18 +2216,7 @@ void HLodClass::Set_Texture_Reduction_Factor(float trf) } */ -/*********************************************************************************************** - * HLodClass::Scale -- scale this HLod model * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ +// Scale this HLod model. void HLodClass::Scale(float scale) { if (scale==1.0f) return; @@ -3364,18 +2247,6 @@ void HLodClass::Scale(float scale) } -/*********************************************************************************************** - * HLodClass::Get_Num_Snap_Points -- returns the number of snap points in this model * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ int HLodClass::Get_Num_Snap_Points() { if (SnapPoints) { @@ -3386,18 +2257,6 @@ int HLodClass::Get_Num_Snap_Points() } -/*********************************************************************************************** - * HLodClass::Get_Snap_Point -- returns specified snap-point * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ void HLodClass::Get_Snap_Point(int index,Vector3 * set) { WWASSERT(set != nullptr); @@ -3409,18 +2268,6 @@ void HLodClass::Get_Snap_Point(int index,Vector3 * set) } -/*********************************************************************************************** - * HLodClass::Update_Sub_Object_Transforms -- updates transforms of all sub-objects * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ void HLodClass::Update_Sub_Object_Transforms() { /* @@ -3460,18 +2307,6 @@ void HLodClass::Update_Sub_Object_Transforms() } -/*********************************************************************************************** - * HLodClass::Update_Obj_Space_Bounding_Volumes -- update object-space bounding volumes * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ void HLodClass::Update_Obj_Space_Bounding_Volumes() { // @@ -3577,18 +2412,6 @@ void HLodClass::Update_Obj_Space_Bounding_Volumes() } -/*********************************************************************************************** - * HLodClass::Add_Lod_Model -- adds a model to one of the lods * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ void HLodClass::Add_Lod_Model(int lod, RenderObjClass * robj, int boneindex) { WWASSERT(robj != nullptr); @@ -3607,18 +2430,6 @@ void HLodClass::Add_Lod_Model(int lod, RenderObjClass * robj, int boneindex) } -/*********************************************************************************************** - * HLodClass::Create_Decal -- create a decal on this HLod * - * * - * INPUT: * - * * - * OUTPUT: * - * * - * WARNINGS: * - * * - * HISTORY: * - * 1/26/00 gth : Created. * - *=============================================================================================*/ void HLodClass::Create_Decal(DecalGeneratorClass * generator) { for (int lod=0; lod