Make textmode an entry in Visuals_DrawType and misc textmode fixes

This commit is contained in:
TotallyNotElite 2019-08-31 19:17:16 +02:00
parent 3d347e7e2b
commit 88a714f00f
5 changed files with 14 additions and 11 deletions

View File

@ -39,20 +39,23 @@ set(GameValues "tf2;hl2dm;dab;tf2c;css;dynamic" CACHE INTERNAL "List of supporte
set_property(CACHE Game PROPERTY STRINGS ${GameValues})
set(Visuals_DrawType "IMGUI" CACHE STRING "Target drawing api")
set(DrawTypes "No Visuals;Glez;Engine;IMGUI;IMGUI Streamproof" CACHE INTERNAL "Select the drawing api that cathook should use")
set(DrawTypes "Textmode;No Visuals;Glez;Engine;IMGUI;IMGUI Streamproof" CACHE INTERNAL "Select the drawing api that cathook should use")
set_property(CACHE Visuals_DrawType PROPERTY STRINGS ${DrawTypes})
set(Visuals_EnforceStreamSafety 1 CACHE BOOL "If a streamsafe drawing method is used, this will remove features that are not streamsafe.")
set(EnableVisuals 0)
set(EnableVisuals 1)
set(EnableGlezDrawing 0)
set(EnableEngineDrawing 0)
set(EnableImGuiDrawing 0)
set(ExternalDrawing 0)
set(Textmode 0)
if(NOT Visuals_DrawType STREQUAL "No Visuals")
set(EnableVisuals 1)
endif()
if(Visuals_DrawType STREQUAL "Glez")
if(Visuals_DrawType STREQUAL "Textmode")
set(EnableVisuals 0)
set(Textmode 1)
elseif(Visuals_DrawType STREQUAL "No Visuals")
set(EnableVisuals 0)
elseif(Visuals_DrawType STREQUAL "Glez")
set(EnableGlezDrawing 1)
elseif(Visuals_DrawType STREQUAL "Engine")
set(EnableEngineDrawing 1)
@ -73,7 +76,6 @@ set(EnableGUI 1 CACHE BOOL "Enable GUI")
set(EnableIPC 1 CACHE BOOL "Enable IPC")
set(DataPath "/opt/cathook/data" CACHE FILEPATH "Data location")
set(VACBypass 0 CACHE BOOL "Textmode VAC bypass")
set(Textmode 0 CACHE BOOL "Various textmode-only features for bots")
set(EnableTextmodeStdin 0 CACHE BOOL "Textmode Stdin -> Console bridge (EXPERIMENTAL)")
set(EnableWarnings 0 CACHE BOOL "Enable compile warnings")
set(EnableOnlineFeatures 0 CACHE BOOL "Enable online features (WIP)")

View File

@ -128,7 +128,7 @@ matrix3x4_t *EntityHitboxCache::GetBones()
{
if (g_Settings.is_create_move)
{
#if ENABLE_VISUALS
#if TEXTMODE
if (!*bonecache_enabled || parent_ref->m_Type() != ENTITY_PLAYER || IsPlayerInvisible(parent_ref))
{
PROF_SECTION(bone_setup);

View File

@ -585,7 +585,7 @@ free(logname);*/
init_stack().pop();
}
logging::Info("Initializer stack done");
#if not ENABLE_VISUALS
#if TEXTMODE
hack::command_stack().push("exec cat_autoexec_textmode");
#else
hack::command_stack().push("exec cat_autoexec");

View File

@ -23,6 +23,7 @@ set(ignore_files ${ignore_files} CACHE INTERNAL "")
if(EnableVisuals)
add_subdirectory(visual)
elseif(Textmode)
endif()
if(Textmode)
add_subdirectory(textmode)
endif()

View File

@ -89,7 +89,7 @@ DEFINE_HOOKED_METHOD(Paint, void, IEngineVGui *this_, PaintMode_t mode)
EC::run(EC::Paint);
}
#if !ENABLE_VISUALS
#if TEXTMODE
return;
#else
return original::Paint(this_, mode);