Moved command line completion into C++ file Adjusted export functions from clientScreen

Moved command line completion into C++ file
Adjusted export functions from clientScreen

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6c3a0b3..e6c3f7f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -278,6 +278,7 @@ set( FRAMEWORKS_HEADERS
 	${MOUNT_DIR}/API/Network_api.hpp
 	${MOUNT_DIR}/API/NetworkChain_api.hpp
 	${MOUNT_DIR}/API/Parse_api.hpp
+	${MOUNT_DIR}/API/CmdCompletion_api.hpp
 	${MOUNT_DIR}/framework/FileSystem.hpp
 	${MOUNT_DIR}/framework/CVarSystem.hpp
 	${MOUNT_DIR}/framework/CmdSystem.hpp
@@ -293,6 +294,7 @@ set( FRAMEWORKS_HEADERS
 	${MOUNT_DIR}/framework/Network.hpp
 	${MOUNT_DIR}/framework/NetworkChain.hpp
 	${MOUNT_DIR}/framework/Parse.hpp
+	${MOUNT_DIR}/framework/CmdCompletion.hpp
 )
 
 set( FRAMEWORKS_SOURCES
@@ -312,6 +314,7 @@ set( FRAMEWORKS_SOURCES
 	${MOUNT_DIR}/framework/Network.cpp
 	${MOUNT_DIR}/framework/NetworkChain.cpp
 	${MOUNT_DIR}/framework/Parse.cpp
+	${MOUNT_DIR}/framework/CmdCompletion.cpp
 )
 
 set( CLIENTLIST_HEADERS
@@ -378,6 +381,7 @@ set( PLATFORMLIST_SOURCES
   ${MOUNT_DIR}/platform/systemMain.cpp
   ${MOUNT_DIR}/console/consoleCurses.cpp
   ${MOUNT_DIR}/console/consoleLogging.cpp
+  ${MOUNT_DIR}/console/consoleHistory.cpp
 )
 
 SET ( PLATFORM_DEDICATED_SOURCES
@@ -397,6 +401,8 @@ SET ( PLATFORMLIST_HEADERS
     ${MOUNT_DIR}/console/consoleCurses.hpp
 	${MOUNT_DIR}/API/consoleLogging_api.hpp
     ${MOUNT_DIR}/console/consoleLogging.hpp
+	${MOUNT_DIR}/API/consoleHistory_api.hpp
+	${MOUNT_DIR}/console/consoleHistory.hpp
 )
 
 set( SDLLIST
@@ -635,7 +641,7 @@ endif()
 
 if( BUILD_SERVER )
 	# Setup the target Server
-	add_executable( server ${SHAREDLIST_HEADERS} ${QCOMMONLIST_HEADERS} ${FRAMEWORKS_HEADERS} ${DOWNLOADLIST_HEADERS} ${SERVERLIST_HEADERS} ${COLLISIONMODEL_HEADERS} ${CLIENTLIST_HEADERS}  ${SHAREDLIST_SOURCES} ${SERVERLIST_SOURCES} ${DOWNLOADLIST_SOURCES} ${COLLISIONMODEL_SOURCES} ${QCOMMONLIST_SOURCES} ${FRAMEWORKS_SOURCES} ${PLATFORMLIST_HEADERS} ${PLATFORM_DEDICATED_SOURCES} ${NULL_SERVER_SOURCES} ${NULL_SERVER_HEADERS} )
+	add_executable( server ${SHAREDLIST_HEADERS} ${QCOMMONLIST_HEADERS} ${FRAMEWORKS_HEADERS} ${DOWNLOADLIST_HEADERS} ${SERVERLIST_HEADERS} ${COLLISIONMODEL_HEADERS} ${CLIENTLIST_HEADERS}  ${SHAREDLIST_SOURCES} ${SERVERLIST_SOURCES} ${DOWNLOADLIST_SOURCES} ${COLLISIONMODEL_SOURCES} ${QCOMMONLIST_SOURCES} ${FRAMEWORKS_SOURCES} ${PLATFORMLIST_HEADERS} ${PLATFORMLIST_SOURCES} ${PLATFORM_DEDICATED_SOURCES} ${NULL_SERVER_SOURCES} ${NULL_SERVER_HEADERS} )
 
 	if(WIN32)
 		target_compile_options(server PRIVATE "/MP")
@@ -680,7 +686,7 @@ if( BUILD_AUTOUPDATE_SERVER )
 	add_executable( autoupdateserver ${SHAREDLIST_HEADERS} ${FRAMEWORKS_HEADERS} ${DOWNLOADLIST_HEADERS}
 	${SERVERLIST_HEADERS} ${COLLISIONMODEL_HEADERS} ${CLIENTLIST_HEADERS} ${DOWNLOADLIST_SOURCES}
 	${QCOMMONLIST_HEADERS} ${SHAREDLIST_SOURCES} ${SERVERLIST_SOURCES} ${COLLISIONMODEL_SOURCES} 
-	${QCOMMONLIST_SOURCES} ${PLATFORMLIST_HEADERS} ${FRAMEWORKS_SOURCES}
+	${QCOMMONLIST_SOURCES} ${PLATFORMLIST_HEADERS} ${PLATFORMLIST_SOURCES} ${FRAMEWORKS_SOURCES}
 	${PLATFORM_DEDICATED_SOURCES} ${NULL_AUTOUPDATESERVER_SOURCES} ${NULL_AUTOUPDATESERVER_HEADERS} )
 
 	target_link_libraries( autoupdateserver ${OS_LIBRARIES} )
diff --git a/src/engine/API/CmdCompletion_api.hpp b/src/engine/API/CmdCompletion_api.hpp
new file mode 100644
index 0000000..b197ae0
--- /dev/null
+++ b/src/engine/API/CmdCompletion_api.hpp
@@ -0,0 +1,79 @@
+////////////////////////////////////////////////////////////////////////////////////////
+// Copyright(C) 2018 - 2021 Dusan Jocic <dusanjocic@msn.com>
+//
+// This file is part of the OpenWolf GPL Source Code.
+// OpenWolf Source Code is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// OpenWolf Source Code is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with OpenWolf Source Code.  If not, see <http://www.gnu.org/licenses/>.
+//
+// In addition, the OpenWolf Source Code is also subject to certain additional terms.
+// You should have received a copy of these additional terms immediately following the
+// terms and conditions of the GNU General Public License which accompanied the
+// OpenWolf Source Code. If not, please request a copy in writing from id Software
+// at the address below.
+//
+// If you have questions concerning this license or the applicable additional terms,
+// you may contact in writing id Software LLC, c/o ZeniMax Media Inc.,
+// Suite 120, Rockville, Maryland 20850 USA.
+//
+// -------------------------------------------------------------------------------------
+// File name:   cmdCompletion_api.hpp
+// Created:
+// Compilers:   Microsoft (R) C/C++ Optimizing Compiler Version 19.26.28806 for x64,
+//              gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0
+// Description:
+// -------------------------------------------------------------------------------------
+////////////////////////////////////////////////////////////////////////////////////////
+
+#ifndef __CMDCOMPLETION_API_H__
+#define __CMDCOMPLETION_API_H__
+
+/*
+==============================================================
+Edit fields and command line history/completion
+==============================================================
+*/
+
+#define MAX_EDIT_LINE   256
+typedef struct
+{
+    sint cursor;
+    sint scroll;
+    sint widthInChars;
+    valueType buffer[MAX_EDIT_LINE];
+} field_t;
+
+//
+// idCmdCompletionSystem
+//
+class idCmdCompletionSystem
+{
+public:
+    virtual void CompleteKeyname( void ) = 0;
+    virtual void CompleteCgame( sint argNum ) = 0;
+    virtual void CompleteFilename( pointer dir, pointer ext, bool stripExt ) = 0;
+    virtual void CompleteAlias( void ) = 0;
+    virtual void CompleteDelay( void ) = 0;
+    virtual void CompleteCommand( valueType* cmd, bool doCommands, bool doCvars ) = 0;
+    virtual void AutoComplete( field_t* field, pointer prompt ) = 0;
+    virtual void Clear( field_t* edit ) = 0;
+    virtual void Set( field_t* edit, pointer content ) = 0;
+    virtual void WordDelete( field_t* edit ) = 0;
+    virtual void Draw( field_t* edit, sint x, sint y, bool showCursor, bool noColorEscape, float32 alpha ) = 0;
+    virtual void BigDraw( field_t* edit, sint x, sint y, bool showCursor, bool noColorEscape ) = 0;
+    virtual void KeyDownEvent( field_t* edit, sint key ) = 0;
+    virtual void CharEvent( field_t* edit, sint ch ) = 0;
+};
+
+extern idCmdCompletionSystem* cmdCompletionSystem;
+
+#endif //__COMMANDLINECOMPLETION_API_H__
\ No newline at end of file
diff --git a/src/engine/API/clientScreen_api.hpp b/src/engine/API/clientScreen_api.hpp
index 8c04b77..0123582 100644
--- a/src/engine/API/clientScreen_api.hpp
+++ b/src/engine/API/clientScreen_api.hpp
@@ -35,6 +35,23 @@ class idClientScreenSystem
 public:
 
     virtual void UpdateScreen( void ) = 0;
+    virtual void DrawSmallStringExt( sint x, sint y, pointer string, float32* setColor, bool forceColor, bool noColorEscape ) = 0;
+    virtual void DrawBigString( sint x, sint y, pointer s, float32 alpha, bool noColorEscape ) = 0;
+    virtual float32 ConsoleFontStringWidth( pointer s, sint len ) = 0;
+    virtual void DrawConsoleFontChar( float32 x, float32 y, sint ch ) = 0;
+    virtual void AdjustFrom640( float32* x, float32* y, float32* w, float32* h ) = 0;
+    virtual void FillRect( float32 x, float32 y, float32 width, float32 height, const float32* color ) = 0;
+    virtual void DrawChar( sint x, sint y, float32 size, sint ch ) = 0;
+    virtual void DrawSmallChar( sint x, sint y, sint ch ) = 0;
+    virtual void DrawStringExt( sint x, sint y, float32 size, pointer string, float32* setColor, bool forceColor, bool noColorEscape ) = 0;

[... diff too long, it was truncated ...]

GitHub
sha: 9fe3dbbb