Fix Compilação Pegasus Season 5.2 - Remover verificações de DLL e corrigir resource.rc
Este fix remove as verificações de DLL que impediam o cliente de iniciar e corrige o erro de compilação no resource.rc.
1. Editando ZzzAI.cpp
Procurar:
Código:
extern "C" __declspec(dllexport) void ExternalCalcFPS(double currentTime, double lastTime, int frameCount)<br>{<br><br> if (!hFPSDLL)<br> {<br> MessageBoxA(0, "Cannot Load SystemFPS.dll", "DLL Error", MB_OK | MB_ICONERROR);<br> ExitProcess(0);<br><br> }<br><br> if (!ExternalCalcFPS)<br> {<br> MessageBoxA(0, "Cannot find function ExternalCalcFPS", "DLL Error", MB_OK | MB_ICONERROR);<br> ExitProcess(0);<br><br> }<br>}
Substituir por:
Código:
extern "C" __declspec(dllexport) void ExternalCalcFPS(double currentTime, double lastTime, int frameCount)<br>{<br> // DLL checks removed - no longer needed<br> // Client will work without SystemFPS.dll<br>}
2. Editando MainLoad.cpp
Procurar:
Código:
if (gProtect.ReadDllFile("SystemFPS.dll") == 0)<br> {<br> MessageBoxA(0, "Failed to load FPS !
To view the content, you need to sign in or register
", "DLL Error", MB_OK | MB_ICONERROR);<br> ExitProcess(0);<br> return 0;<br> }
Substituir por:
Código:
// SystemFPS.dll is optional - continue without it<br> // if (gProtect.ReadDllFile("SystemFPS.dll") == 0)<br> // {<br> // MessageBoxA(0, "Failed to load FPS !
To view the content, you need to sign in or register
", "DLL Error", MB_OK | MB_ICONERROR);<br> // ExitProcess(0);<br> // return 0;<br> // }
3. Editando resource.rc
Procurar:
Código:
#define APSTUDIO_READONLY_SYMBOLS<br>/////////////////////////////////////////////////////////////////////////////<br>//<br>// Generated from the TEXTINCLUDE 2 resource.<br>//<br>#include "afxres.h"
Substituir por:
Código:
#define APSTUDIO_READONLY_SYMBOLS<br>/////////////////////////////////////////////////////////////////////////////<br>//<br>// Generated from the TEXTINCLUDE 2 resource.<br>//<br>#include "windows.h"
4. Observações
• Este fix remove as dependências de SystemFPS.dll que impediam o cliente de iniciar
• Corrige o erro RC1015 (cannot open include file 'afxres.h') durante a compilação
• O cliente agora compila sem erros e inicia normalmente sem mensagens de DLL Error
• Testado com Visual Studio 2022 Community
• Compatível com Pegasus Season 5.2 e versões similares
• O arquivo resource.rc foi corrigido para não depender de MFC (afxres.h)