[Mod FF]: Added fonts from console versions.
This commit is contained in:
parent
7d92fb4b63
commit
1976c730d4
BIN
iw3sp_mod_ff_src/raw/english/fonts/bigFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/english/fonts/bigFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/english/fonts/boldFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/english/fonts/boldFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/english/fonts/consoleFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/english/fonts/consoleFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/english/fonts/extraBigFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/english/fonts/extraBigFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/english/fonts/normalFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/english/fonts/normalFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/english/fonts/objectiveFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/english/fonts/objectiveFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/english/fonts/smallFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/english/fonts/smallFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/english/materials/fonts/gamefonts_xenon
Normal file
BIN
iw3sp_mod_ff_src/raw/english/materials/fonts/gamefonts_xenon
Normal file
Binary file not shown.
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/french/fonts/bigFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/french/fonts/bigFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/french/fonts/boldFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/french/fonts/boldFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/french/fonts/consoleFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/french/fonts/consoleFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/french/fonts/extraBigFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/french/fonts/extraBigFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/french/fonts/normalFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/french/fonts/normalFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/french/fonts/objectiveFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/french/fonts/objectiveFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/french/fonts/smallFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/french/fonts/smallFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/french/materials/fonts/gamefonts_xenon
Normal file
BIN
iw3sp_mod_ff_src/raw/french/materials/fonts/gamefonts_xenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/french/materials/fonts/gamefonts_xenon_glow
Normal file
BIN
iw3sp_mod_ff_src/raw/french/materials/fonts/gamefonts_xenon_glow
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/german/fonts/bigFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/german/fonts/bigFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/german/fonts/boldFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/german/fonts/boldFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/german/fonts/consoleFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/german/fonts/consoleFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/german/fonts/extraBigFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/german/fonts/extraBigFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/german/fonts/normalFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/german/fonts/normalFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/german/fonts/objectiveFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/german/fonts/objectiveFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/german/fonts/smallFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/german/fonts/smallFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/german/materials/fonts/gamefonts_xenon
Normal file
BIN
iw3sp_mod_ff_src/raw/german/materials/fonts/gamefonts_xenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/german/materials/fonts/gamefonts_xenon_glow
Normal file
BIN
iw3sp_mod_ff_src/raw/german/materials/fonts/gamefonts_xenon_glow
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/italian/fonts/bigFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/italian/fonts/bigFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/italian/fonts/boldFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/italian/fonts/boldFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/italian/fonts/consoleFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/italian/fonts/consoleFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/italian/fonts/extraBigFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/italian/fonts/extraBigFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/italian/fonts/normalFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/italian/fonts/normalFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/italian/fonts/objectiveFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/italian/fonts/objectiveFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/italian/fonts/smallFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/italian/fonts/smallFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/italian/materials/fonts/gamefonts_xenon
Normal file
BIN
iw3sp_mod_ff_src/raw/italian/materials/fonts/gamefonts_xenon
Normal file
Binary file not shown.
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/spanish/fonts/bigFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/spanish/fonts/bigFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/spanish/fonts/boldFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/spanish/fonts/boldFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/spanish/fonts/consoleFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/spanish/fonts/consoleFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/spanish/fonts/extraBigFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/spanish/fonts/extraBigFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/spanish/fonts/normalFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/spanish/fonts/normalFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/spanish/fonts/objectiveFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/spanish/fonts/objectiveFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/spanish/fonts/smallFontXenon
Normal file
BIN
iw3sp_mod_ff_src/raw/spanish/fonts/smallFontXenon
Normal file
Binary file not shown.
BIN
iw3sp_mod_ff_src/raw/spanish/materials/fonts/gamefonts_xenon
Normal file
BIN
iw3sp_mod_ff_src/raw/spanish/materials/fonts/gamefonts_xenon
Normal file
Binary file not shown.
Binary file not shown.
@ -135,4 +135,19 @@ namespace Components
|
|||||||
got->second(¶ms);
|
got->second(¶ms);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* Command::Cmd_Argv/*eax*/(int argIndex/*eax*/)
|
||||||
|
{
|
||||||
|
const char* result;
|
||||||
|
const static uint32_t Cmd_Argv_func = 0x40F150;
|
||||||
|
__asm
|
||||||
|
{
|
||||||
|
pushad;
|
||||||
|
mov eax, argIndex;
|
||||||
|
call Cmd_Argv_func;
|
||||||
|
mov result, eax;
|
||||||
|
popad;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
@ -45,6 +45,8 @@ namespace Components
|
|||||||
static void AddRaw(const char* name, const char* args, const char* description, void(*callback)(), bool key = false);
|
static void AddRaw(const char* name, const char* args, const char* description, void(*callback)(), bool key = false);
|
||||||
static void Execute(std::string command, bool sync = true);
|
static void Execute(std::string command, bool sync = true);
|
||||||
|
|
||||||
|
static const char* Cmd_Argv/*eax*/(int argIndex/*eax*/);
|
||||||
|
|
||||||
static Game::cmd_function_s* Find(const std::string& command);
|
static Game::cmd_function_s* Find(const std::string& command);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -6,59 +6,97 @@ namespace Components
|
|||||||
|
|
||||||
void ServerCommand::Add(const char* name, const std::function<void()>& callback)
|
void ServerCommand::Add(const char* name, const std::function<void()>& callback)
|
||||||
{
|
{
|
||||||
ServerCommands[name] = callback;
|
const auto command = Utils::String::ToLower(name);
|
||||||
|
ServerCommands[command] = callback;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ServerCommand::DispatchServerCommand(const char* cmd_args)
|
void ServerCommand::DispatchServerCommand(const char* cmd, int cmdArgCount)
|
||||||
{
|
{
|
||||||
//Game::Com_Printf(0, "^3CmdArg: %s\n", cmd_args);
|
Game::Com_Printf(0, "Command Name %s\n", cmd);
|
||||||
|
Game::Com_Printf(0, "Command Argument Count %d\n", cmdArgCount);
|
||||||
|
|
||||||
if (const auto itr = ServerCommands.begin(); itr != ServerCommands.end())
|
if (const auto itr = ServerCommands.begin(); itr != ServerCommands.end())
|
||||||
{
|
{
|
||||||
if (!std::strcmp(cmd_args, itr->first.c_str()))
|
if (!std::strcmp(cmd, itr->first.c_str()))
|
||||||
{
|
{
|
||||||
itr->second();
|
itr->second();
|
||||||
|
//Game::Com_Printf(0, "^2game find custom command :D\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void __declspec(naked) CG_DispatchServerCommand_stub()
|
bool ServerCommand::CustomServerCommandExists(const char* cmd)
|
||||||
{
|
{
|
||||||
const static uint32_t next_cmd_offset = 0x429963;
|
for (const auto& [key, value] : ServerCommands)
|
||||||
const static uint32_t sw_func_offset = 0x429942;
|
{
|
||||||
|
if (!std::strcmp(cmd, key.c_str()))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// push edi; text
|
return false;
|
||||||
// push esi; cmd_args
|
}
|
||||||
// push ecx; length (wtf?)
|
|
||||||
|
void __declspec(naked) ServerCommand::CG_DispatchServerCommandStub1()
|
||||||
|
{
|
||||||
|
const static uint32_t end_jump = 0x42A1C7;
|
||||||
|
const static uint32_t original_checks = 0x42992D;
|
||||||
__asm
|
__asm
|
||||||
{
|
{
|
||||||
push esi; //cmd_args
|
jz cmd_not_found;
|
||||||
|
|
||||||
pushad;
|
pushad;
|
||||||
push esi;
|
push ebp;
|
||||||
call ServerCommand::DispatchServerCommand;
|
push eax;
|
||||||
add esp, 4;
|
call DispatchServerCommand;
|
||||||
jnz SW_STOCK;
|
add esp, 8;
|
||||||
popad;
|
popad;
|
||||||
pop esi;
|
|
||||||
SW_STOCK:
|
jmp original_checks;
|
||||||
popad;
|
|
||||||
pop esi;
|
cmd_not_found:
|
||||||
|
jmp end_jump;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void __declspec(naked) ServerCommand::CG_DispatchServerCommandStub2()
|
||||||
|
{
|
||||||
|
const static uint32_t retn_addr = 0x42A1AB;
|
||||||
|
const static uint32_t jmp_unknown_cmd = 0x42A1B7;
|
||||||
|
const static uint32_t return_op = 0x42A1C7;
|
||||||
|
__asm
|
||||||
|
{
|
||||||
|
//stock op's
|
||||||
|
xor edx, edx;
|
||||||
repe cmpsb;
|
repe cmpsb;
|
||||||
jnz NEXT_SERVER_CMD;
|
jnz UNKNOWN_COMMAND_HOOK;
|
||||||
cmp ebp, 1;
|
jmp retn_addr;
|
||||||
jmp sw_func_offset;
|
|
||||||
NEXT_SERVER_CMD:
|
UNKNOWN_COMMAND_HOOK:
|
||||||
jmp next_cmd_offset;
|
|
||||||
|
// just making another check variant here with custom container.
|
||||||
|
pushad;
|
||||||
|
push eax;
|
||||||
|
call CustomServerCommandExists;
|
||||||
|
add esp, 4;
|
||||||
|
test al, al;
|
||||||
|
jz UNKNOWN_COMMAND_REAL;
|
||||||
|
popad;
|
||||||
|
|
||||||
|
jmp return_op;
|
||||||
|
UNKNOWN_COMMAND_REAL:
|
||||||
|
popad;
|
||||||
|
jmp jmp_unknown_cmd;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ServerCommand::ServerCommand()
|
ServerCommand::ServerCommand()
|
||||||
{
|
{
|
||||||
Utils::Hook::Nop(0x42993B, 7);
|
Utils::Hook(0x429927, CG_DispatchServerCommandStub1, HOOK_JUMP).install()->quick();
|
||||||
// Sadly, but I doesn't find resolve about printing error in the game console,
|
Utils::Hook::Nop(0x42A1A5, 6);
|
||||||
// when cmd_args similar with strings and custom server cmds works fine.
|
Utils::Hook(0x42A1A5, CG_DispatchServerCommandStub2, HOOK_JUMP).install()->quick();
|
||||||
Utils::Hook::Nop(0x42A1BF, 5);
|
|
||||||
Utils::Hook(0x42993B, CG_DispatchServerCommand_stub, HOOK_JUMP).install()->quick();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ServerCommand::~ServerCommand()
|
ServerCommand::~ServerCommand()
|
||||||
|
@ -10,7 +10,10 @@ namespace Components
|
|||||||
|
|
||||||
static void Add(const char* name, const std::function<void()>& callback);
|
static void Add(const char* name, const std::function<void()>& callback);
|
||||||
private:
|
private:
|
||||||
static void DispatchServerCommand(const char* cmd_args);
|
static void DispatchServerCommand(const char* cmd, int cmdArgCount);
|
||||||
static std::unordered_map<std::string, std::function<void()>> ServerCommands;
|
static std::unordered_map<std::string, std::function<void()>> ServerCommands;
|
||||||
|
static void CG_DispatchServerCommandStub1();
|
||||||
|
static void CG_DispatchServerCommandStub2();
|
||||||
|
static bool CustomServerCommandExists(const char* cmd);
|
||||||
};
|
};
|
||||||
}
|
}
|
@ -334,8 +334,8 @@ namespace Components
|
|||||||
viewportWidth,
|
viewportWidth,
|
||||||
viewportHeight,
|
viewportHeight,
|
||||||
viewportWidth / adjustedRealWidth,
|
viewportWidth / adjustedRealWidth,
|
||||||
Dvars::safeArea_horizontal->current.value,
|
Dvars::console_menu_style->current.enabled ? 0.85f : Dvars::safeArea_horizontal->current.value,
|
||||||
Dvars::safeArea_vertical->current.value,
|
Dvars::console_menu_style->current.enabled ? 0.85f : Dvars::safeArea_vertical->current.value,
|
||||||
scrPlace->virtualViewableMin,
|
scrPlace->virtualViewableMin,
|
||||||
scrPlace->virtualViewableMax,
|
scrPlace->virtualViewableMax,
|
||||||
viewportWidth,
|
viewportWidth,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user