From 62ff9b7f4c4078fbccfb7b1ff4c68a73690a951e Mon Sep 17 00:00:00 2001 From: Ludovic Date: Thu, 26 Oct 2017 02:23:38 +0200 Subject: [PATCH] Renamed file.c to files.cpp Renamed huffman.c to huffman.cp Renamed msg.c to msg.cpp Added Pipe class Made loaddef a local variable instead of a global variable for future potential multi-threading support --- code/globalcpp/basemain.cpp | 33 +- code/globalcpp/pipe.cpp | 356 ++++++++ code/globalcpp/pipe.h | 62 ++ code/qcommon/{files.c => files.cpp} | 30 +- code/qcommon/{huffman.c => huffman.cpp} | 2 +- code/qcommon/{msg.c => msg.cpp} | 8 +- code/qcommon/queue.h | 289 +++---- code/qcommon/unzip.h | 8 + code/skeletor/bonetable.cpp | 2 - code/tiki/tiki_anim.cpp | 7 +- code/tiki/tiki_files.cpp | 6 +- .../MOHConverterModule.vcxproj | 261 ++++++ .../MOHConverterModule.vcxproj.filters | 297 +++++++ .../MOHConverterWorker.vcxproj | 413 +++++++++ .../MOHConverterWorker.vcxproj.filters | 792 ++++++++++++++++++ misc/msvc12_13/omohaaded/omohaaded.vcxproj | 6 +- .../omohaaded/omohaaded.vcxproj.filters | 18 +- .../omohconverter/omohconverter.vcxproj | 222 +---- .../omohconverter.vcxproj.filters | 511 +---------- misc/msvc12_13/openmohaa/openmohaa.sln | 39 +- misc/msvc12_13/openmohaa/openmohaa.vcxproj | 6 +- .../openmohaa/openmohaa.vcxproj.filters | 18 +- 22 files changed, 2486 insertions(+), 900 deletions(-) create mode 100644 code/globalcpp/pipe.cpp create mode 100644 code/globalcpp/pipe.h rename code/qcommon/{files.c => files.cpp} (99%) rename code/qcommon/{huffman.c => huffman.cpp} (99%) rename code/qcommon/{msg.c => msg.cpp} (99%) create mode 100644 misc/msvc12_13/MOHConverterModule/MOHConverterModule.vcxproj create mode 100644 misc/msvc12_13/MOHConverterModule/MOHConverterModule.vcxproj.filters create mode 100644 misc/msvc12_13/MOHConverterWorker/MOHConverterWorker.vcxproj create mode 100644 misc/msvc12_13/MOHConverterWorker/MOHConverterWorker.vcxproj.filters diff --git a/code/globalcpp/basemain.cpp b/code/globalcpp/basemain.cpp index 0baf8158..fb27dcd9 100644 --- a/code/globalcpp/basemain.cpp +++ b/code/globalcpp/basemain.cpp @@ -83,7 +83,36 @@ void BaseIdle( void ) } } -int MainEvent( const Container< Event * >& conev ); + +#ifdef _WINDLL +void InitModule(); +void ShutdownModule(); + +BOOL APIENTRY DllMain(HMODULE hModule, + DWORD ul_reason_for_call, + LPVOID lpReserved +) +{ + switch (ul_reason_for_call) + { + case DLL_PROCESS_ATTACH: + BaseInit(); + InitModule(); + break; + case DLL_PROCESS_DETACH: + ShutdownModule(); + + L_ShutdownEvents(); + + Com_Shutdown(); + FS_Shutdown(qtrue); + break; + } + return TRUE; +} +#else + +int MainEvent(const Container< Event * >& conev); int main( int argc, char **argv ) { @@ -132,3 +161,5 @@ int main( int argc, char **argv ) Com_Shutdown(); FS_Shutdown( qtrue ); } + +#endif diff --git a/code/globalcpp/pipe.cpp b/code/globalcpp/pipe.cpp new file mode 100644 index 00000000..af2ed87c --- /dev/null +++ b/code/globalcpp/pipe.cpp @@ -0,0 +1,356 @@ +#include "pipe.h" +#include + +MessageEvent::MessageEvent() +{ + Buffer = NULL; + BufferSize = 0; + AllocatedSize = 0; + Position = NULL; + bReadMode = false; +} + +MessageEvent::~MessageEvent() +{ + if (Buffer) + { + free(Buffer); + } +} + +void MessageEvent::Reset() +{ + if (Buffer) + { + free(Buffer); + } + + Buffer = NULL; + BufferSize = 0; + AllocatedSize = 0; + Position = NULL; + bReadMode = false; +} + +byte* MessageEvent::SetReadMode(size_t size) +{ + Reset(); + + Buffer = (byte*)malloc(size); + BufferSize = size; + AllocatedSize = size; + Position = Buffer; + bReadMode = true; + + return Buffer; +} + +bool MessageEvent::ReadBool() +{ + return !FinishedReading() ? *Position++ : false; +} + +str MessageEvent::ReadString() +{ + str Value; + + while (1) + { + char CharValue = ReadByte(); + if (CharValue <= 0) + { + break; + } + + Value += CharValue; + } + + return Value; +} + +byte MessageEvent::ReadByte() +{ + if (FinishedReading()) + { + return -1; + } + + return *Position++; +} + +int MessageEvent::ReadInteger() +{ + if (FinishedReading()) + { + return -1; + } + + int Value = *(int*)Position; + Position += 4; + return Value; +} + +void MessageEvent::WriteBool(bool Value) +{ + if (bReadMode) + { + return; + } + + BufferSize += sizeof(bool); + EnsureAllocated(); + + *Position++ = Value; +} + +void MessageEvent::WriteInteger(int Value) +{ + if (bReadMode) + { + return; + } + + BufferSize += sizeof(int); + EnsureAllocated(); + + *(int*)Position = Value; + Position += 4; +} + +void MessageEvent::WriteString(const char* Value) +{ + if (bReadMode) + { + return; + } + + size_t length = strlen(Value) + 1; + + BufferSize += length; + EnsureAllocated(); + + for (size_t i = 0; i < length; i++) + { + *Position++ = Value[i]; + } +} + +byte* MessageEvent::GetData() const +{ + return Buffer; +} + +size_t MessageEvent::GetDataSize() const +{ + return BufferSize; +} + +bool MessageEvent::FinishedReading() +{ + return !bReadMode || (Position - Buffer >= BufferSize); +} + +void MessageEvent::EnsureAllocated() +{ + if (!bReadMode && AllocatedSize < BufferSize) + { + AllocatedSize = BufferSize + 20; + + if (Buffer) + { + size_t p = Position - Buffer; + + Buffer = (byte*)realloc(Buffer, AllocatedSize); + Position = Buffer + p; + } + else + { + Buffer = (byte*)malloc(AllocatedSize); + Position = Buffer; + } + } +} + +PipeClass::PipeClass() +{ + m_phSourceReadHandle = NULL; + m_phSourceWriteHandle = NULL; + m_phTargetReadHandle = NULL; + m_phTargetWriteHandle = NULL; + + SECURITY_ATTRIBUTES PipeAttributes; + PipeAttributes.nLength = sizeof(SECURITY_ATTRIBUTES); + PipeAttributes.bInheritHandle = TRUE; + PipeAttributes.lpSecurityDescriptor = NULL; + + CreatePipe(&m_phSourceReadHandle, &m_phSourceWriteHandle, &PipeAttributes, 65535); + CreatePipe(&m_phTargetReadHandle, &m_phTargetWriteHandle, &PipeAttributes, 65535); + + SetHandleInformation(m_phSourceWriteHandle, HANDLE_FLAG_INHERIT, 1); + SetHandleInformation(m_phTargetReadHandle, HANDLE_FLAG_INHERIT, 1); +} + +PipeClass::PipeClass(void* SourceHandle, void* TargetHandle) +{ + m_phSourceReadHandle = SourceHandle; + m_phTargetWriteHandle = TargetHandle; + + m_phSourceWriteHandle = NULL; + m_phTargetReadHandle = NULL; +} + +PipeClass::~PipeClass() +{ + if (m_phSourceReadHandle) + { + CloseHandle(m_phSourceReadHandle); + } + + if (m_phSourceWriteHandle) + { + CloseHandle(m_phSourceWriteHandle); + } + + if (m_phTargetReadHandle) + { + CloseHandle(m_phTargetReadHandle); + } + + if (m_phTargetWriteHandle) + { + CloseHandle(m_phTargetWriteHandle); + } +} + +/* +void PipeClass::ProcessPipe( bool bWait ) +{ + Container ConEvent = Read( bWait ); + + for( int i = 1; i <= ConEvent.NumObjects(); i++ ) + { + ProcessEvent( ConEvent.ObjectAt( i ) ); + } +} +*/ + +bool PipeClass::IsValid() const +{ + LARGE_INTEGER FileSize; + + return GetFileSizeEx(m_phSourceReadHandle, &FileSize); +} + +bool PipeClass::IsValidForWriting() const +{ + LARGE_INTEGER FileSize; + + return GetFileSizeEx(m_phTargetWriteHandle, &FileSize); +} + +void PipeClass::Read(MessageEvent* Msg, bool bWait) +{ + ReadPipeData(Msg, bWait); +} + +/* +Container PipeClass::Read( bool bWait ) +{ + char *buffer; + const char *com_token; + str sCommand; + Container ConEvent; + + str data = ReadPipeData( bWait ); + + buffer = ( char * )malloc( data.length() + 1 ); + strcpy( buffer, data.c_str() ); + + char *b = buffer; + + while( 1 ) + { + com_token = COM_Parse( &b ); + + if( !com_token || !com_token[ 0 ] ) + { + break; + } + + sCommand = com_token; + + Event *ev = new Event( sCommand ); + + while( 1 ) + { + com_token = COM_GetToken( ( const char ** )&b, false ); + + if( !com_token[ 0 ] ) + break; + + ev->AddString( com_token ); + } + + ConEvent.AddObject( ev ); + } + + free( buffer ); + return ConEvent; +} + +void PipeClass::Send( const str& data ) +{ + WritePipeData( data ); +} +*/ + +void PipeClass::Send(const MessageEvent* Msg) +{ + WritePipeData(Msg); +} + +bool PipeClass::HasData() +{ + LARGE_INTEGER FileSize; + + BOOL bSuccess = GetFileSizeEx(m_phSourceReadHandle, &FileSize); + return bSuccess && FileSize.LowPart; +} + +void* PipeClass::GetSourceNativeHandle() +{ + return m_phSourceWriteHandle; +} + +void* PipeClass::GetTargetNativeHandle() +{ + return m_phTargetReadHandle; +} + +void PipeClass::ReadPipeData(MessageEvent* Msg, bool bWait) +{ + LARGE_INTEGER FileSize; + + BOOL bSuccess = GetFileSizeEx(m_phSourceReadHandle, &FileSize); + if (bSuccess && (FileSize.LowPart || bWait)) + { + DWORD size; + + if (ReadFile(m_phSourceReadHandle, &size, sizeof(DWORD), NULL, NULL)) + { + byte* buffer = Msg->SetReadMode(size); + ReadFile(m_phSourceReadHandle, buffer, size, NULL, NULL); + } + } +} + +void PipeClass::WritePipeData(const MessageEvent* Msg) +{ + DWORD size = (DWORD)Msg->GetDataSize(); + + // Write the size of the message + WriteFile(m_phTargetWriteHandle, &size, sizeof(DWORD), NULL, NULL); + + // Write the message + WriteFile(m_phTargetWriteHandle, Msg->GetData(), size, NULL, NULL); +} diff --git a/code/globalcpp/pipe.h b/code/globalcpp/pipe.h new file mode 100644 index 00000000..dd81194c --- /dev/null +++ b/code/globalcpp/pipe.h @@ -0,0 +1,62 @@ +#pragma once + +#include "listener.h" + +class MessageEvent { +private: + byte* Buffer; + size_t AllocatedSize; + size_t BufferSize; + byte* Position; + bool bReadMode; + +public: + MessageEvent(); + MessageEvent(byte* Buffer, size_t Size); + ~MessageEvent(); + + void Reset(); + byte* SetReadMode(size_t Size); + + bool ReadBool(); + int ReadInteger(); + str ReadString(); + byte ReadByte(); + + void WriteBool(bool Value); + void WriteInteger(int Value); + void WriteString(const char* Value); + + byte* GetData() const; + size_t GetDataSize() const; + +private: + bool FinishedReading(); + void EnsureAllocated(); +}; + +class PipeClass { +private: + void *m_phSourceReadHandle; + void *m_phSourceWriteHandle; + void *m_phTargetReadHandle; + void *m_phTargetWriteHandle; + +public: + PipeClass(); + PipeClass(void* SourceHandle, void* TargetHandle); + ~PipeClass(); + + bool IsValid() const; + bool IsValidForWriting() const; + void Read(MessageEvent* Msg, bool bWait = false); + void Send(const MessageEvent* Msg); + bool HasData(); + + void* GetSourceNativeHandle(); + void* GetTargetNativeHandle(); + +private: + void ReadPipeData(MessageEvent* Msg, bool bWait = false ); + void WritePipeData(const MessageEvent* Msg); +}; diff --git a/code/qcommon/files.c b/code/qcommon/files.cpp similarity index 99% rename from code/qcommon/files.c rename to code/qcommon/files.cpp index 4ed0f133..de46314b 100644 --- a/code/qcommon/files.c +++ b/code/qcommon/files.cpp @@ -281,7 +281,7 @@ typedef struct { char name[MAX_ZPATH]; } fileHandleData_t; -static fileHandleData_t fsh[MAX_FILE_HANDLES]; +fileHandleData_t fsh[MAX_FILE_HANDLES]; // TTimo - https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=540 // wether we did a reorder on the current search path when joining the server @@ -599,7 +599,7 @@ static void FS_CopyFile( char *fromOSPath, char *toOSPath ) { // we are using direct malloc instead of Z_Malloc here, so it // probably won't work on a mac... Its only for developers anyway... - buf = malloc( len ); + buf = (byte*)malloc( len ); if (fread( buf, 1, len, f ) != len) Com_Error( ERR_FATAL, "Short read in FS_Copyfiles()\n" ); fclose( f ); @@ -1102,7 +1102,7 @@ Used for streaming data out of either a separate file or a ZIP file. =========== */ -extern qboolean com_fullyInitialized; +extern "C" qboolean com_fullyInitialized; int FS_FOpenFileRead( const char *filename, fileHandle_t *file, qboolean uniqueFILE, qboolean quiet ) { searchpath_t *search; @@ -1721,7 +1721,7 @@ int FS_ReadFileEx( const char *qpath, void **buffer, qboolean quiet ) { return len; } - buf = Hunk_AllocateTempMemory(len+1); + buf = (byte*)Hunk_AllocateTempMemory(len+1); *buffer = buf; r = FS_Read( buf, len, com_journalDataFile ); @@ -1770,7 +1770,7 @@ int FS_ReadFileEx( const char *qpath, void **buffer, qboolean quiet ) { fs_loadCount++; fs_loadStack++; - buf = Hunk_AllocateTempMemory(len+1); + buf = (byte*)Hunk_AllocateTempMemory(len+1); *buffer = buf; FS_Read (buf, len, h); @@ -1952,9 +1952,9 @@ static pack_t *FS_LoadZipFile( char *zipfile, const char *basename ) unzGoToNextFile(uf); } - buildBuffer = Z_Malloc( (gi.number_entry * sizeof( fileInPack_t )) + len ); + buildBuffer = (fileInPack_t*)Z_Malloc( (gi.number_entry * sizeof( fileInPack_t )) + len ); namePtr = ((char *) buildBuffer) + gi.number_entry * sizeof( fileInPack_t ); - fs_headerLongs = Z_Malloc( ( gi.number_entry + 1 ) * sizeof(int) ); + fs_headerLongs = (int*)Z_Malloc( ( gi.number_entry + 1 ) * sizeof(int) ); fs_headerLongs[ fs_numHeaderLongs++ ] = LittleLong( fs_checksumFeed ); // get the hash table size from the number of files in the zip @@ -1965,7 +1965,7 @@ static pack_t *FS_LoadZipFile( char *zipfile, const char *basename ) } } - pack = Z_Malloc( sizeof( pack_t ) + i * sizeof(fileInPack_t *) ); + pack = (pack_t*)Z_Malloc( sizeof( pack_t ) + i * sizeof(fileInPack_t *) ); pack->hashSize = i; pack->hashTable = (fileInPack_t **) (((char *) pack) + sizeof( pack_t )); for(i = 0; i < pack->hashSize; i++) { @@ -2058,7 +2058,7 @@ static int FS_ReturnPath( const char *zname, char *zpath, size_t *depth ) { FS_AddFileToList ================== */ -static int FS_AddFileToList( char *name, const char *list[MAX_FOUND_FILES], int nfiles ) { +static int FS_AddFileToList( char *name, char **list, int nfiles ) { int i; if ( nfiles == MAX_FOUND_FILES - 1 ) { @@ -2201,7 +2201,7 @@ char **FS_ListFilteredFiles( const char *path, const char *extension, char *filt return NULL; } - listCopy = Z_Malloc( ( nfiles + 1 ) * sizeof( *listCopy ) ); + listCopy = (char**)Z_Malloc( ( nfiles + 1 ) * sizeof( *listCopy ) ); for ( i = 0 ; i < nfiles ; i++ ) { listCopy[i] = list[i]; } @@ -2316,7 +2316,7 @@ static char** Sys_ConcatenateFileLists( char **list0, char **list1 ) totalLength += Sys_CountFileList(list1); /* Create new list. */ - dst = cat = Z_Malloc( ( totalLength + 1 ) * sizeof( char* ) ); + dst = cat = (char**)Z_Malloc( ( totalLength + 1 ) * sizeof( char* ) ); /* Copy over lists. */ if (list0) @@ -2558,7 +2558,7 @@ void FS_SortFileList(char **filelist, int numfiles) { int i, j, k, numsortedfiles; char **sortedlist; - sortedlist = Z_Malloc( ( numfiles + 1 ) * sizeof( *sortedlist ) ); + sortedlist = (char**)Z_Malloc( ( numfiles + 1 ) * sizeof( *sortedlist ) ); sortedlist[0] = NULL; numsortedfiles = 0; for (i = 0; i < numfiles; i++) { @@ -2719,7 +2719,7 @@ void FS_AddGameDirectory( const char *path, const char *dir ) { // store the game name for downloading strcpy(pak->pakGamename, dir); - search = Z_Malloc (sizeof(searchpath_t)); + search = (searchpath_t*)Z_Malloc (sizeof(searchpath_t)); search->pack = pak; search->next = fs_searchpaths; search->dir = NULL; @@ -2732,8 +2732,8 @@ void FS_AddGameDirectory( const char *path, const char *dir ) { // // add the directory to the search path // - search = Z_Malloc( sizeof( searchpath_t ) ); - search->dir = Z_Malloc( sizeof( *search->dir ) ); + search = (searchpath_t*)Z_Malloc( sizeof( searchpath_t ) ); + search->dir = (directory_t*)Z_Malloc( sizeof( *search->dir ) ); search->pack = NULL; Q_strncpyz( search->dir->path, path, sizeof( search->dir->path ) ); diff --git a/code/qcommon/huffman.c b/code/qcommon/huffman.cpp similarity index 99% rename from code/qcommon/huffman.c rename to code/qcommon/huffman.cpp index f6986074..b552390b 100644 --- a/code/qcommon/huffman.c +++ b/code/qcommon/huffman.cpp @@ -27,7 +27,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "q_shared.h" #include "qcommon.h" -static int bloc = 0; +int bloc = 0; void Huff_putBit( int bit, byte *fout, int *offset) { bloc = *offset; diff --git a/code/qcommon/msg.c b/code/qcommon/msg.cpp similarity index 99% rename from code/qcommon/msg.c rename to code/qcommon/msg.cpp index 840c18f0..003dc5ff 100644 --- a/code/qcommon/msg.c +++ b/code/qcommon/msg.cpp @@ -22,9 +22,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "q_shared.h" #include "qcommon.h" -static huffman_t msgHuff; +huffman_t msgHuff; -static qboolean msgInit = qfalse; +qboolean msgInit = qfalse; int pcount[256]; @@ -590,7 +590,7 @@ delta functions ============================================================================= */ -extern cvar_t *cl_shownet; +extern "C" cvar_t *cl_shownet; #define LOG(x) if( cl_shownet->integer == 4 ) { Com_Printf("%s ", x ); }; @@ -637,7 +637,7 @@ delta functions with keys ============================================================================= */ -int kbitmask[32] = { +unsigned int kbitmask[32] = { 0x00000001, 0x00000003, 0x00000007, 0x0000000F, 0x0000001F, 0x0000003F, 0x0000007F, 0x000000FF, 0x000001FF, 0x000003FF, 0x000007FF, 0x00000FFF, diff --git a/code/qcommon/queue.h b/code/qcommon/queue.h index 1b4e7c9d..92063b9d 100644 --- a/code/qcommon/queue.h +++ b/code/qcommon/queue.h @@ -28,212 +28,219 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "class.h" +template class QueueNode : public Class - { - public: - void *data; - QueueNode *next; +{ +public: + T data; + QueueNode *next; - QueueNode(); - }; + QueueNode(); +}; -inline QueueNode::QueueNode() - { +template +QueueNode::QueueNode() +{ data = NULL; next = NULL; - } +} +template class Queue : public Class - { - private: - QueueNode *head; - QueueNode *tail; +{ +private: + QueueNode *head; + QueueNode *tail; - public: - Queue(); - ~Queue(); - void Clear( void ); - qboolean Empty( void ); - void Enqueue( void *data ); - void *Dequeue( void ); - void Remove( void *data ); - qboolean Inqueue( void *data ); - }; +public: + Queue(); + ~Queue(); + void Clear(void); + qboolean Empty(void); + void Enqueue(T data); + T Dequeue(void); + void Remove(T data); + qboolean Inqueue(T data); +}; -inline qboolean Queue::Empty +template +qboolean Queue::Empty ( void ) +{ + if (head == NULL) { - if ( head == NULL ) - { - assert( !tail ); + assert(!tail); return true; - } - - assert( tail ); - return false; } -inline void Queue::Enqueue + assert(tail); + return false; +} + +template +void Queue::Enqueue ( - void *data + T data ) - { - QueueNode *tmp; +{ + QueueNode *tmp; - tmp = new QueueNode; - if ( !tmp ) - { - assert( NULL ); - gi.Error( ERR_DROP, "Queue::Enqueue : Out of memory" ); - } + tmp = new QueueNode; + assert(tmp); tmp->data = data; - assert( !tmp->next ); - if ( !head ) - { - assert( !tail ); + assert(!tmp->next); + if (!head) + { + assert(!tail); head = tmp; - } - else - { - assert( tail ); - tail->next = tmp; - } - tail = tmp; } + else + { + assert(tail); + tail->next = tmp; + } + tail = tmp; +} -inline void *Queue::Dequeue +template +T Queue::Dequeue ( void ) - { - void *ptr; - QueueNode *node; +{ + T ptr; + QueueNode *node; - if ( !head ) - { - assert( !tail ); + if (!head) + { + assert(!tail); return NULL; - } + } node = head; ptr = node->data; head = node->next; - if ( head == NULL ) - { - assert( tail == node ); + if (head == NULL) + { + assert(tail == node); tail = NULL; - } + } delete node; return ptr; - } +} -inline void Queue::Clear +template +void Queue::Clear ( void ) +{ + while (!Empty()) { - while( !Empty() ) - { Dequeue(); - } } +} -inline Queue::Queue() - { +template +Queue::Queue() +{ head = NULL; tail = NULL; - } +} -inline Queue::~Queue() - { +template +Queue::~Queue() +{ Clear(); +} + +template +void Queue::Remove + ( + T data + ) + +{ + QueueNode *node; + QueueNode *prev; + + if (!head) + { + assert(!tail); + + gi.DPrintf("Queue::Remove : Data not found in queue\n"); + return; } -inline void Queue::Remove - ( - void *data - ) - - { - QueueNode *node; - QueueNode *prev; - - if ( !head ) + for (prev = NULL, node = head; node != NULL; prev = node, node = node->next) + { + if (node->data == data) { - assert( !tail ); + break; + } + } - gi.DPrintf( "Queue::Remove : Data not found in queue\n" ); - return; + if (!node) + { + gi.DPrintf("Queue::Remove : Data not found in queue\n"); + } + else + { + if (!prev) + { + // at head + assert(node == head); + head = node->next; + if (head == NULL) + { + assert(tail == node); + tail = NULL; + } + } + else + { + prev->next = node->next; + if (prev->next == NULL) + { + // at tail + assert(tail == node); + tail = prev; + } } - for( prev = NULL, node = head; node != NULL; prev = node, node = node->next ) - { - if ( node->data == data ) - { - break; - } - } + delete node; + } +} - if ( !node ) - { - gi.DPrintf( "Queue::Remove : Data not found in queue\n" ); - } - else - { - if ( !prev ) - { - // at head - assert( node == head ); - head = node->next; - if ( head == NULL ) - { - assert( tail == node ); - tail = NULL; - } - } - else - { - prev->next = node->next; - if ( prev->next == NULL ) - { - // at tail - assert( tail == node ); - tail = prev; - } - } +template +qboolean Queue::Inqueue + ( + T data + ) - delete node; - } - } +{ + QueueNode *node; -inline qboolean Queue::Inqueue - ( - void *data - ) + for (node = head; node != NULL; node = node->next) + { + if (node->data == data) + { + return true; + } + } - { - QueueNode *node; - - for( node = head; node != NULL; node = node->next ) - { - if ( node->data == data ) - { - return true; - } - } - - return false; - } + return false; +} #endif /* queue.h */ diff --git a/code/qcommon/unzip.h b/code/qcommon/unzip.h index b6fbde4f..1b3c80a4 100644 --- a/code/qcommon/unzip.h +++ b/code/qcommon/unzip.h @@ -20,6 +20,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ +#ifdef __cplusplus +extern "C" { +#endif + #if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP) /* like the STRICT of WIN32, we define a pointer that cannot be converted from (void*) without cast */ @@ -351,3 +355,7 @@ extern long unzGetOffset(unzFile file); /* Set the current file offset */ extern int unzSetOffset(unzFile file, long pos); + +#ifdef __cplusplus +} +#endif diff --git a/code/skeletor/bonetable.cpp b/code/skeletor/bonetable.cpp index f821b5ec..d3e252d4 100644 --- a/code/skeletor/bonetable.cpp +++ b/code/skeletor/bonetable.cpp @@ -26,13 +26,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include "dbgheap.h" - void ChannelNameTable::CopyChannel( ChannelName_t *dest, const ChannelName_t *source ) { memcpy( dest, source, sizeof( ChannelName_t ) ); } - void ChannelNameTable::SetChannelName( ChannelName_t *channel, const char *newName ) { strcpy( channel->name, newName ); diff --git a/code/tiki/tiki_anim.cpp b/code/tiki/tiki_anim.cpp index f3c9dd28..65fb4cca 100644 --- a/code/tiki/tiki_anim.cpp +++ b/code/tiki/tiki_anim.cpp @@ -35,9 +35,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA AnimCompareFunc =============== */ -static int AnimCompareFunc( const void *a, const void *b ) +static int AnimCompareFunc(void *context, const void *a, const void *b ) { - return stricmp( loaddef.loadanims[ *( int * )a ]->alias, loaddef.loadanims[ *( int * )b ]->alias ); + dloaddef_t *ld = (dloaddef_t*)context; + return stricmp( ld->loadanims[ *( int * )a ]->alias, ld->loadanims[ *( int * )b ]->alias ); } /* @@ -51,7 +52,7 @@ void TIKI_GetAnimOrder( dloaddef_t *ld, int *order ) for( i = 0; i < ld->numanims; i++ ) order[ i ] = i; - qsort( order, ld->numanims, sizeof( int ), AnimCompareFunc ); + qsort_s( order, ld->numanims, sizeof( int ), AnimCompareFunc, (void*)ld ); } /* diff --git a/code/tiki/tiki_files.cpp b/code/tiki/tiki_files.cpp index 94203cbc..11f97052 100644 --- a/code/tiki/tiki_files.cpp +++ b/code/tiki/tiki_files.cpp @@ -56,7 +56,6 @@ static int m_cachedDataLookup[ 4095 ]; static skeletorCacheEntry_t m_cachedData[ 4095 ]; InitSkelCache InitSkelCache::init; MEM_TempAlloc TIKI_allocator; -dloaddef_t loaddef; /* =============== @@ -114,6 +113,7 @@ TIKI_LoadTikiAnim qboolean loadtikicommands = true; dtikianim_t *TIKI_LoadTikiAnim( const char *path ) { + dloaddef_t loaddef; dtikianim_t *tiki = NULL; const char *token; float tempVec[ 3 ]; @@ -503,7 +503,7 @@ skelAnimDataGameHeader_t *SkeletorCacheFileCallback( const char *path ) Com_Printf( "+loadanim: %s\n", path ); } - sprintf( tempName, "g%s", path ); + sprintf_s( tempName, "g%s", path ); UI_LoadResource( tempName ); return finishedHeader; @@ -864,7 +864,7 @@ dtikianim_t *TIKI_InitTiki( dloaddef_t *ld, size_t defsize ) } TIKI_GetAnimOrder( ld, order ); - sprintf( tempName, "e%s", ld->path ); + sprintf_s( tempName, "e%s", ld->path ); UI_LoadResource( tempName ); panim->m_aliases = temp_aliases; diff --git a/misc/msvc12_13/MOHConverterModule/MOHConverterModule.vcxproj b/misc/msvc12_13/MOHConverterModule/MOHConverterModule.vcxproj new file mode 100644 index 00000000..e18c70a5 --- /dev/null +++ b/misc/msvc12_13/MOHConverterModule/MOHConverterModule.vcxproj @@ -0,0 +1,261 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 15.0 + {7A66A643-9419-4609-BA8F-95E8A9F9E8E5} + Win32Proj + MOHConverterModule + 10.0.16299.0 + + + + DynamicLibrary + true + v141 + + + DynamicLibrary + false + v141 + true + + + DynamicLibrary + true + v141 + + + DynamicLibrary + false + v141 + true + + + + + + + + + + + + + + + + + + + + + false + $(SolutionDir)..\..\..\build\$(Configuration)\$(PlatformShortName)\ + $(SolutionDir)bin\$(ProjectName)$(PlatformShortName)\$(Configuration)\ + $(ProjectName)_$(PlatformShortName) + + + true + $(SolutionDir)..\..\..\build\$(Configuration)\$(PlatformShortName)\ + $(SolutionDir)bin\$(ProjectName)$(PlatformShortName)\$(Configuration)\ + $(ProjectName)_$(PlatformShortName) + + + true + $(SolutionDir)..\..\..\build\$(Configuration)\$(PlatformShortName)\ + $(SolutionDir)bin\$(ProjectName)$(PlatformShortName)\$(Configuration)\ + $(ProjectName)_$(PlatformShortName) + + + false + $(SolutionDir)..\..\..\build\$(Configuration)\$(PlatformShortName)\ + $(SolutionDir)bin\$(ProjectName)$(PlatformShortName)\$(Configuration)\ + $(ProjectName)_$(PlatformShortName) + + + + Level3 + MaxSpeed + true + true + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NO_SCRIPTENGINE;STANDALONE;_COM_NOPRINTF;MOHCONVERTERLIBRARY_EXPORTS;NDEBUG;_CONSOLE;_LIB;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + ../../../code/SDL2/include;../../../code/globalcpp;../../../code/testutils;../../../code/globalcpp/dummy;../../../code/qcommon;../../../code/tools/FBX/FBX SDK/2018.1/include;../../../code/tools/common;../../../code/tools/boost + true + + + Windows + true + true + true + ..\..\..\code\tools\FBX\FBX SDK\2018.1\lib\vs2015\x64\release + winmm.lib;%(AdditionalDependencies) + + + + + Level3 + Disabled + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NO_SCRIPTENGINE;STANDALONE;_COM_NOPRINTF;MOHCONVERTERLIBRARY_EXPORTS;_DEBUG_MEM;_DEBUG;_CONSOLE;_LIB;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + ../../../code/SDL2/include;../../../code/globalcpp;../../../code/testutils;../../../code/globalcpp/dummy;../../../code/qcommon;../../../code/tools/FBX/FBX SDK/2018.1/include;../../../code/tools/common;../../../code/tools/boost + true + false + + + Windows + true + ..\..\..\code\tools\FBX\FBX SDK\2018.1\lib\vs2015\x86\debug + winmm.lib;%(AdditionalDependencies) + + + + + Level3 + Disabled + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NO_SCRIPTENGINE;STANDALONE;_COM_NOPRINTF;MOHCONVERTERLIBRARY_EXPORTS;_DEBUG_MEM;_DEBUG;_CONSOLE;_LIB;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + ../../../code/SDL2/include;../../../code/globalcpp;../../../code/testutils;../../../code/globalcpp/dummy;../../../code/qcommon;../../../code/tools/FBX/FBX SDK/2018.1/include;../../../code/tools/common;../../../code/tools/boost + true + false + + + Windows + true + ..\..\..\code\tools\FBX\FBX SDK\2018.1\lib\vs2015\x64\debug + winmm.lib;%(AdditionalDependencies) + + + + + Level3 + MaxSpeed + true + true + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NO_SCRIPTENGINE;STANDALONE;_COM_NOPRINTF;MOHCONVERTERLIBRARY_EXPORTS;NDEBUG;_CONSOLE;_LIB;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + ../../../code/SDL2/include;../../../code/globalcpp;../../../code/testutils;../../../code/globalcpp/dummy;../../../code/qcommon;../../../code/tools/FBX/FBX SDK/2018.1/include;../../../code/tools/common;../../../code/tools/boost + true + + + Windows + true + true + true + ..\..\..\code\tools\FBX\FBX SDK\2018.1\lib\vs2015\x86\release + winmm.lib;%(AdditionalDependencies) + + + + + + \ No newline at end of file diff --git a/misc/msvc12_13/MOHConverterModule/MOHConverterModule.vcxproj.filters b/misc/msvc12_13/MOHConverterModule/MOHConverterModule.vcxproj.filters new file mode 100644 index 00000000..87f990e2 --- /dev/null +++ b/misc/msvc12_13/MOHConverterModule/MOHConverterModule.vcxproj.filters @@ -0,0 +1,297 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {a56b47b0-448d-4184-a5c2-5344200efea2} + + + + + Source Files + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + global + + + global + + + global + + + global + + + global + + + global + + + Header Files + + + global + + + global + + + \ No newline at end of file diff --git a/misc/msvc12_13/MOHConverterWorker/MOHConverterWorker.vcxproj b/misc/msvc12_13/MOHConverterWorker/MOHConverterWorker.vcxproj new file mode 100644 index 00000000..8128a4ba --- /dev/null +++ b/misc/msvc12_13/MOHConverterWorker/MOHConverterWorker.vcxproj @@ -0,0 +1,413 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 15.0 + {7E035F4B-CEA0-4985-980A-18635BF759B3} + MOHConverterWorker + 10.0.16299.0 + + + + Application + true + v141 + MultiByte + + + Application + false + v141 + true + MultiByte + + + Application + true + v141 + MultiByte + + + Application + false + v141 + true + MultiByte + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\..\..\build\$(Configuration)\$(PlatformShortName)\ + $(SolutionDir)bin\$(ProjectName)$(PlatformShortName)\$(Configuration)\ + $(ProjectName)_$(PlatformShortName) + + + $(SolutionDir)..\..\..\build\$(Configuration)\$(PlatformShortName)\ + $(SolutionDir)bin\$(ProjectName)$(PlatformShortName)\$(Configuration)\ + $(ProjectName)_$(PlatformShortName) + + + $(SolutionDir)..\..\..\build\$(Configuration)\$(PlatformShortName)\ + $(SolutionDir)bin\$(ProjectName)$(PlatformShortName)\$(Configuration)\ + $(ProjectName)_$(PlatformShortName) + + + $(SolutionDir)..\..\..\build\$(Configuration)\$(PlatformShortName)\ + $(SolutionDir)bin\$(ProjectName)$(PlatformShortName)\$(Configuration)\ + $(ProjectName)_$(PlatformShortName) + + + + Level3 + Disabled + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NO_SCRIPTENGINE;STANDALONE;_COM_NOPRINTF;_DEBUG_MEM;_DEBUG;_CONSOLE;_LIB;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + ../../../code/SDL2/include;../../../code/globalcpp;../../../code/testutils;../../../code/globalcpp/dummy;../../../code/qcommon;../../../code/tools/FBX/FBX SDK/2018.1/include;../../../code/tools/common;../../../code/tools/boost + true + false + + + winmm.lib;libfbxsdk-md.lib;%(AdditionalDependencies) + ..\..\..\code\tools\FBX\FBX SDK\2018.1\lib\vs2015\x64\debug + + + + + Level3 + Disabled + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NO_SCRIPTENGINE;STANDALONE;_COM_NOPRINTF;_DEBUG_MEM;_DEBUG;_CONSOLE;_LIB;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + ../../../code/SDL2/include;../../../code/globalcpp;../../../code/testutils;../../../code/globalcpp/dummy;../../../code/qcommon;../../../code/tools/FBX/FBX SDK/2018.1/include;../../../code/tools/common;../../../code/tools/boost + true + false + + + winmm.lib;libfbxsdk-md.lib;%(AdditionalDependencies) + ..\..\..\code\tools\FBX\FBX SDK\2018.1\lib\vs2015\x86\debug + + + + + Level3 + MaxSpeed + true + true + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NO_SCRIPTENGINE;STANDALONE;_COM_NOPRINTF;NDEBUG;_CONSOLE;_LIB;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + ../../../code/SDL2/include;../../../code/globalcpp;../../../code/testutils;../../../code/globalcpp/dummy;../../../code/qcommon;../../../code/tools/FBX/FBX SDK/2018.1/include;../../../code/tools/common;../../../code/tools/boost + true + + + true + true + winmm.lib;libfbxsdk-md.lib;%(AdditionalDependencies) + ..\..\..\code\tools\FBX\FBX SDK\2018.1\lib\vs2015\x86\release + + + + + Level3 + MaxSpeed + true + true + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NO_SCRIPTENGINE;STANDALONE;_COM_NOPRINTF;NDEBUG;_CONSOLE;_LIB;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + ../../../code/SDL2/include;../../../code/globalcpp;../../../code/testutils;../../../code/globalcpp/dummy;../../../code/qcommon;../../../code/tools/FBX/FBX SDK/2018.1/include;../../../code/tools/common;../../../code/tools/boost + true + + + true + true + winmm.lib;libfbxsdk-md.lib;%(AdditionalDependencies) + ..\..\..\code\tools\FBX\FBX SDK\2018.1\lib\vs2015\x64\release + + + + + + \ No newline at end of file diff --git a/misc/msvc12_13/MOHConverterWorker/MOHConverterWorker.vcxproj.filters b/misc/msvc12_13/MOHConverterWorker/MOHConverterWorker.vcxproj.filters new file mode 100644 index 00000000..1afbc596 --- /dev/null +++ b/misc/msvc12_13/MOHConverterWorker/MOHConverterWorker.vcxproj.filters @@ -0,0 +1,792 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {59baf7aa-c554-49f9-b8b8-e8c0b6dac12e} + + + {af2ae363-bcbf-4a63-89b3-c62a1ead0a03} + + + {b1138651-5949-46da-85fd-668db93ae6b8} + + + {05794acd-48df-447f-b8ee-d18ee6a5a5cd} + + + {2b3af113-ea68-4687-be17-f2c70041c1e1} + + + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + q3_common + + + q3_common + + + q3_common + + + q3_common + + + q3_common + + + q3_common + + + q3_common + + + q3_common + + + q3_common + + + q3_common + + + q3_common + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + q3map + + + q3map + + + q3map + + + q3map + + + q3map + + + q3map + + + q3map + + + q3map + + + q3map + + + q3map + + + q3map + + + q3map + + + q3map + + + q3map + + + q3map + + + q3map + + + q3map + + + q3map + + + q3map + + + q3map + + + q3map + + + q3map + + + q3map + + + q3map + + + q3map + + + q3map + + + q3map + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + Source Files + + + Source Files + + + global + + + tiki_skeletor + + + Source Files + + + global + + + global + + + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + global + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + tiki_skeletor + + + q3_common + + + q3_common + + + q3_common + + + q3_common + + + q3_common + + + q3_common + + + q3_common + + + q3_common + + + q3_common + + + q3_common + + + q3_common + + + q3_common + + + q3_common + + + q3_common + + + q3_common + + + q3_common + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + jpeglib + + + q3map + + + q3map + + + q3map + + + q3map + + + q3map + + + q3map + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + global + + + global + + + global + + + global + + + global + + + \ No newline at end of file diff --git a/misc/msvc12_13/omohaaded/omohaaded.vcxproj b/misc/msvc12_13/omohaaded/omohaaded.vcxproj index d37245e7..b509fd96 100644 --- a/misc/msvc12_13/omohaaded/omohaaded.vcxproj +++ b/misc/msvc12_13/omohaaded/omohaaded.vcxproj @@ -200,13 +200,13 @@ - - + + - + diff --git a/misc/msvc12_13/omohaaded/omohaaded.vcxproj.filters b/misc/msvc12_13/omohaaded/omohaaded.vcxproj.filters index 01d8f936..b7aa22d1 100644 --- a/misc/msvc12_13/omohaaded/omohaaded.vcxproj.filters +++ b/misc/msvc12_13/omohaaded/omohaaded.vcxproj.filters @@ -66,18 +66,9 @@ Source Files - - Source Files - - - Source Files - Source Files - - Source Files - Source Files @@ -252,6 +243,15 @@ Source Files + + Source Files + + + Source Files + + + Source Files + diff --git a/misc/msvc12_13/omohconverter/omohconverter.vcxproj b/misc/msvc12_13/omohconverter/omohconverter.vcxproj index 97f4ef10..3cd1974b 100644 --- a/misc/msvc12_13/omohconverter/omohconverter.vcxproj +++ b/misc/msvc12_13/omohconverter/omohconverter.vcxproj @@ -115,49 +115,49 @@ true - $(SolutionDir)..\..\..\build\ + $(SolutionDir)..\..\..\build\$(Configuration)\$(PlatformShortName)\ $(SolutionDir)bin\$(ProjectName)$(PlatformShortName)\$(Configuration)\ $(ProjectName)_$(PlatformShortName) true - $(SolutionDir)..\..\..\build\ + $(SolutionDir)..\..\..\build\$(Configuration)\$(PlatformShortName)\ $(SolutionDir)bin\$(ProjectName)$(PlatformShortName)\$(Configuration)\ $(ProjectName)_$(PlatformShortName) true - $(SolutionDir)..\..\..\build\ + $(SolutionDir)..\..\..\build\$(Configuration)\$(PlatformShortName)\ $(SolutionDir)bin\$(ProjectName)$(PlatformShortName)\$(Configuration)\ $(ProjectName)_$(PlatformShortName) true - $(SolutionDir)..\..\..\build\ + $(SolutionDir)..\..\..\build\$(Configuration)\$(PlatformShortName)\ $(SolutionDir)bin\$(ProjectName)$(PlatformShortName)\$(Configuration)\ q3converter_$(PlatformShortName) false - $(SolutionDir)..\..\..\build\ + $(SolutionDir)..\..\..\build\$(Configuration)\$(PlatformShortName)\ $(SolutionDir)bin\$(ProjectName)$(PlatformShortName)\$(Configuration)\ $(ProjectName)_$(PlatformShortName) false - $(SolutionDir)..\..\..\build\ + $(SolutionDir)..\..\..\build\$(Configuration)\$(PlatformShortName)\ $(SolutionDir)bin\$(ProjectName)$(PlatformShortName)\$(Configuration)\ $(ProjectName)_$(PlatformShortName) false - $(SolutionDir)..\..\..\build\ + $(SolutionDir)..\..\..\build\$(Configuration)\$(PlatformShortName)\ $(SolutionDir)bin\$(ProjectName)$(PlatformShortName)\$(Configuration)\ $(ProjectName)_$(PlatformShortName) false - $(SolutionDir)..\..\..\build\ + $(SolutionDir)..\..\..\build\$(Configuration)\$(PlatformShortName)\ $(SolutionDir)bin\$(ProjectName)$(PlatformShortName)\$(Configuration)\ q3converter_$(PlatformShortName) @@ -175,12 +175,12 @@ Console true - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;winmm.lib;libfbxsdk-md.lib;%(AdditionalDependencies) ..\..\..\code\tools\FBX\FBX SDK\2017.1\lib\vs2015\x86\debug + winmm.lib;$(SolutionDir)..\..\..\build\$(Configuration)\$(PlatformShortName)\MOHConverterModule_$(PlatformShortName).lib;%(AdditionalDependencies) @@ -197,12 +197,12 @@ Console true - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;winmm.lib;libfbxsdk-md.lib;%(AdditionalDependencies) ..\..\..\code\tools\FBX\FBX SDK\2017.1\lib\vs2015\x86\debug + winmm.lib;$(SolutionDir)..\..\..\build\$(Configuration)\$(PlatformShortName)\MOHConverterModule_$(PlatformShortName).lib;%(AdditionalDependencies) @@ -219,12 +219,12 @@ Console true - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;winmm.lib;libfbxsdk-md.lib;%(AdditionalDependencies) ..\..\..\code\tools\FBX\FBX SDK\2018.1\lib\vs2015\x64\debug + winmm.lib;$(SolutionDir)..\..\..\build\$(Configuration)\$(PlatformShortName)\MOHConverterModule_$(PlatformShortName).lib;%(AdditionalDependencies) $(SolutionDir)..\..\build_increment.bat $(SolutionDir)..\..\$(ProjectName) @@ -244,12 +244,12 @@ Console true - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;winmm.lib;libfbxsdk-md.lib;%(AdditionalDependencies) ..\..\..\code\tools\FBX\FBX SDK\2018.1\lib\vs2015\x64\debug + winmm.lib;$(SolutionDir)..\..\..\build\$(Configuration)\$(PlatformShortName)\MOHConverterModule_$(PlatformShortName).lib;%(AdditionalDependencies) $(SolutionDir)..\..\build_increment.bat $(SolutionDir)..\..\$(ProjectName) @@ -272,12 +272,12 @@ true true true - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;winmm.lib;libfbxsdk.lib;%(AdditionalDependencies) ..\..\..\code\tools\FBX\FBX SDK\2017.1\lib\vs2015\x86\release + winmm.lib;$(SolutionDir)..\..\..\build\$(Configuration)\$(PlatformShortName)\MOHConverterModule_$(PlatformShortName).lib;%(AdditionalDependencies) @@ -297,12 +297,12 @@ true true true - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;winmm.lib;libfbxsdk.lib;%(AdditionalDependencies) ..\..\..\code\tools\FBX\FBX SDK\2017.1\lib\vs2015\x86\release + winmm.lib;$(SolutionDir)..\..\..\build\$(Configuration)\$(PlatformShortName)\MOHConverterModule_$(PlatformShortName).lib;%(AdditionalDependencies) @@ -322,12 +322,12 @@ true true true - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;winmm.lib;libfbxsdk-md.lib;%(AdditionalDependencies) ..\..\..\code\tools\FBX\FBX SDK\2018.1\lib\vs2015\x64\release + winmm.lib;$(SolutionDir)..\..\..\build\$(Configuration)\$(PlatformShortName)\MOHConverterModule_$(PlatformShortName).lib;%(AdditionalDependencies) @@ -347,16 +347,15 @@ false true true - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;winmm.lib;libfbxsdk-md.lib;%(AdditionalDependencies) ..\..\..\code\tools\FBX\FBX SDK\2018.1\lib\vs2015\x64\release + winmm.lib;$(SolutionDir)..\..\..\build\$(Configuration)\$(PlatformShortName)\MOHConverterModule_$(PlatformShortName).lib;%(AdditionalDependencies) - @@ -378,147 +377,26 @@ - + - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - true - true - - - - - - true - true - - - true - true - - - - - - true - true - - - true - true - - - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -544,7 +422,6 @@ - @@ -556,59 +433,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -623,19 +448,12 @@ - - - - - - - diff --git a/misc/msvc12_13/omohconverter/omohconverter.vcxproj.filters b/misc/msvc12_13/omohconverter/omohconverter.vcxproj.filters index 6f4b952c..24ea3e5a 100644 --- a/misc/msvc12_13/omohconverter/omohconverter.vcxproj.filters +++ b/misc/msvc12_13/omohconverter/omohconverter.vcxproj.filters @@ -16,18 +16,6 @@ {9cbf895e-7cd6-4d44-9491-49b99c7ec6ca} - - {8d8c8602-bd22-47a2-b420-53e8a35ab2c0} - - - {bb5b422a-47f6-47e8-8873-39789c9a917b} - - - {b8821f97-61c4-492a-97b8-8dc7d7b23b93} - - - {bda88887-861f-493a-9248-9792a05d2489} - @@ -84,9 +72,6 @@ global - - Source Files - global @@ -108,9 +93,6 @@ global - - global - global @@ -141,320 +123,23 @@ global - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - Source Files - global - + Source Files - + Source Files - - Source Files + + global - - Source Files + + global - - jpeglib - - - jpeglib - - - jpeglib - - - jpeglib - - - jpeglib - - - jpeglib - - - jpeglib - - - jpeglib - - - jpeglib - - - jpeglib - - - jpeglib - - - jpeglib - - - jpeglib - - - jpeglib - - - jpeglib - - - jpeglib - - - jpeglib - - - jpeglib - - - jpeglib - - - jpeglib - - - jpeglib - - - jpeglib - - - q3map - - - q3map - - - q3map - - - q3map - - - q3map - - - q3map - - - q3map - - - q3map - - - q3map - - - q3map - - - q3map - - - q3map - - - q3map - - - q3map - - - q3map - - - q3map - - - q3map - - - q3map - - - q3map - - - q3map - - - q3map - - - q3map - - - q3map - - - q3map - - - q3map - - - q3map - - - q3_common - - - q3_common - - - q3_common - - - q3_common - - - q3_common - - - q3_common - - - q3_common - - - q3_common - - - q3_common - - - q3_common - - - q3_common - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - q3map - - - Source Files + + global @@ -578,87 +263,6 @@ Header Files - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - - - tiki_skeletor - Header Files @@ -680,105 +284,6 @@ Header Files - - jpeglib - - - jpeglib - - - jpeglib - - - jpeglib - - - jpeglib - - - jpeglib - - - jpeglib - - - jpeglib - - - jpeglib - - - jpeglib - - - q3map - - - q3map - - - q3map - - - q3map - - - q3map - - - q3map - - - q3_common - - - q3_common - - - q3_common - - - q3_common - - - q3_common - - - q3_common - - - q3_common - - - q3_common - - - q3_common - - - q3_common - - - q3_common - - - q3_common - - - q3_common - - - q3_common - - - q3_common - - - q3_common - - - Header Files - Header Files diff --git a/misc/msvc12_13/openmohaa/openmohaa.sln b/misc/msvc12_13/openmohaa/openmohaa.sln index 6bb5f13a..85425a5b 100644 --- a/misc/msvc12_13/openmohaa/openmohaa.sln +++ b/misc/msvc12_13/openmohaa/openmohaa.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26430.16 +VisualStudioVersion = 15.0.27004.2005 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openmohaa", "openmohaa.vcxproj", "{A9E3E13B-C83E-48AC-91EA-4942B0FF723A}" ProjectSection(ProjectDependencies) = postProject @@ -26,6 +26,16 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FLEX_Bison", "..\FLEX_Bison\FLEX_Bison.vcxproj", "{C43E74A6-EA43-4264-B8E5-F6E4CC9843DC}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "omohconverter", "..\omohconverter\omohconverter.vcxproj", "{2573DDFC-0576-4766-8A8E-E482035D12AF}" + ProjectSection(ProjectDependencies) = postProject + {7A66A643-9419-4609-BA8F-95E8A9F9E8E5} = {7A66A643-9419-4609-BA8F-95E8A9F9E8E5} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MOHConverterModule", "..\MOHConverterModule\MOHConverterModule.vcxproj", "{7A66A643-9419-4609-BA8F-95E8A9F9E8E5}" + ProjectSection(ProjectDependencies) = postProject + {7E035F4B-CEA0-4985-980A-18635BF759B3} = {7E035F4B-CEA0-4985-980A-18635BF759B3} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MOHConverterWorker", "..\MOHConverterWorker\MOHConverterWorker.vcxproj", "{7E035F4B-CEA0-4985-980A-18635BF759B3}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -125,8 +135,35 @@ Global {2573DDFC-0576-4766-8A8E-E482035D12AF}.Release|Win32.ActiveCfg = Release|Win32 {2573DDFC-0576-4766-8A8E-E482035D12AF}.Release|Win32.Build.0 = Release|Win32 {2573DDFC-0576-4766-8A8E-E482035D12AF}.Release|x64.ActiveCfg = Release|x64 + {7A66A643-9419-4609-BA8F-95E8A9F9E8E5}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {7A66A643-9419-4609-BA8F-95E8A9F9E8E5}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {7A66A643-9419-4609-BA8F-95E8A9F9E8E5}.Debug|Win32.ActiveCfg = Debug|Win32 + {7A66A643-9419-4609-BA8F-95E8A9F9E8E5}.Debug|Win32.Build.0 = Debug|Win32 + {7A66A643-9419-4609-BA8F-95E8A9F9E8E5}.Debug|x64.ActiveCfg = Debug|x64 + {7A66A643-9419-4609-BA8F-95E8A9F9E8E5}.Debug|x64.Build.0 = Debug|x64 + {7A66A643-9419-4609-BA8F-95E8A9F9E8E5}.Release|Mixed Platforms.ActiveCfg = Release|Win32 + {7A66A643-9419-4609-BA8F-95E8A9F9E8E5}.Release|Mixed Platforms.Build.0 = Release|Win32 + {7A66A643-9419-4609-BA8F-95E8A9F9E8E5}.Release|Win32.ActiveCfg = Release|Win32 + {7A66A643-9419-4609-BA8F-95E8A9F9E8E5}.Release|Win32.Build.0 = Release|Win32 + {7A66A643-9419-4609-BA8F-95E8A9F9E8E5}.Release|x64.ActiveCfg = Release|x64 + {7A66A643-9419-4609-BA8F-95E8A9F9E8E5}.Release|x64.Build.0 = Release|x64 + {7E035F4B-CEA0-4985-980A-18635BF759B3}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {7E035F4B-CEA0-4985-980A-18635BF759B3}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {7E035F4B-CEA0-4985-980A-18635BF759B3}.Debug|Win32.ActiveCfg = Debug|Win32 + {7E035F4B-CEA0-4985-980A-18635BF759B3}.Debug|Win32.Build.0 = Debug|Win32 + {7E035F4B-CEA0-4985-980A-18635BF759B3}.Debug|x64.ActiveCfg = Debug|x64 + {7E035F4B-CEA0-4985-980A-18635BF759B3}.Debug|x64.Build.0 = Debug|x64 + {7E035F4B-CEA0-4985-980A-18635BF759B3}.Release|Mixed Platforms.ActiveCfg = Release|Win32 + {7E035F4B-CEA0-4985-980A-18635BF759B3}.Release|Mixed Platforms.Build.0 = Release|Win32 + {7E035F4B-CEA0-4985-980A-18635BF759B3}.Release|Win32.ActiveCfg = Release|Win32 + {7E035F4B-CEA0-4985-980A-18635BF759B3}.Release|Win32.Build.0 = Release|Win32 + {7E035F4B-CEA0-4985-980A-18635BF759B3}.Release|x64.ActiveCfg = Release|x64 + {7E035F4B-CEA0-4985-980A-18635BF759B3}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {441D4217-B4CB-4C53-9251-3046DC9CF5B3} + EndGlobalSection EndGlobal diff --git a/misc/msvc12_13/openmohaa/openmohaa.vcxproj b/misc/msvc12_13/openmohaa/openmohaa.vcxproj index ab2db4fe..8e994a37 100644 --- a/misc/msvc12_13/openmohaa/openmohaa.vcxproj +++ b/misc/msvc12_13/openmohaa/openmohaa.vcxproj @@ -271,10 +271,13 @@ + + + true @@ -323,11 +326,8 @@ - - - diff --git a/misc/msvc12_13/openmohaa/openmohaa.vcxproj.filters b/misc/msvc12_13/openmohaa/openmohaa.vcxproj.filters index 2338a9db..8c01ba58 100644 --- a/misc/msvc12_13/openmohaa/openmohaa.vcxproj.filters +++ b/misc/msvc12_13/openmohaa/openmohaa.vcxproj.filters @@ -93,21 +93,12 @@ Source Files - - Source Files - - - Source Files - Source Files Source Files - - Source Files - Source Files @@ -888,6 +879,15 @@ uilib + + Source Files + + + Source Files + + + Source Files +