Skip to content

Instantly share code, notes, and snippets.

View ericoporto's full-sized avatar
🎮
making

Érico Porto ericoporto

🎮
making
View GitHub Profile
Baixe o instalador pra windows da release do projeto coq platform: https://github.com/coq/platform/releases/tag/2022.09.1
NÃO INSTALE, use 7-zip pra extrair o exe em um diretório
copie o bin, lib, etc, share, man para seu /usr/local/
confirme que o arquivo findlib.conf está em /usr/local/lib
No seu bash rc, adicione a linha export OCAMLFIND_CONF=/usr/local/lib/findlib.conf
reinicie seu terminal MSYS2 e digite coqide no terminal
$ ./ags --windowed --log-stdout=+m:all --sdl-log=1
Adventure Game Studio v3.6 Interpreter
Copyright (c) 1999-2011 Chris Jones and 2011-2023 others
ACI version 3.6.0.44
Initializing backend libs
SDL Version: 2.24.1
Initializing game data
Looking for the game data.
Cwd: /home/user/git/userfork/ags/cmake-build-release
diff --git a/Engine/gfx/ali3dogl.cpp b/Engine/gfx/ali3dogl.cpp
index 51c3f3e..eb1c676 100644
--- a/Engine/gfx/ali3dogl.cpp
+++ b/Engine/gfx/ali3dogl.cpp
@@ -269,10 +269,13 @@ void OGLGraphicsDriver::InitGlParams(const DisplayMode &mode)
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
+ Debug::Printf(kDbgMsg_Info, "OGL: Vsync mode is %d.", mode.Vsync);
_capsVsync = SDL_GL_SetSwapInterval(mode.Vsync ? 1 : 0) == 0;
@ericoporto
ericoporto / oglvsynclogdiff.patch
Created March 15, 2023 00:15
oglvsynclogdiff.patch
$ git diff
diff --git a/Engine/gfx/ali3dogl.cpp b/Engine/gfx/ali3dogl.cpp
index 51c3f3e..2f235ce 100644
--- a/Engine/gfx/ali3dogl.cpp
+++ b/Engine/gfx/ali3dogl.cpp
@@ -2049,9 +2049,10 @@ void OGLGraphicsDriver::SetScreenTint(int red, int green, int blue)
bool OGLGraphicsDriver::SetVsyncImpl(bool enabled, bool &vsync_res)
{
+ Debug::Printf(kDbgMsg_Info, "OGL: SetVsyncImpl (%d) called", enabled);
@ericoporto
ericoporto / vsynchanglog.txt
Created March 15, 2023 00:13
vsynchanglog.txt
$ ./ags --windowed --log-stdout=+m:all --sdl-log=1
Adventure Game Studio v3.6 Interpreter
Copyright (c) 1999-2011 Chris Jones and 2011-2023 others
ACI version 3.6.0.44
Initializing backend libs
SDL Version: 2.24.1
Initializing game data
Looking for the game data.
Cwd: /home/user/git/userfork/ags/cmake-build-release
@ericoporto
ericoporto / log.txt
Created March 13, 2023 23:41
trying to understand openGL Swap Interval from SDL log.txt
./ags --windowed --log-stdout=+m:all --sdl-log=1
Adventure Game Studio v3.6 Interpreter
Copyright (c) 1999-2011 Chris Jones and 2011-2023 others
ACI version 3.6.0.44
Initializing backend libs
SDL Version: 2.24.1
Initializing game data
Looking for the game data.
Cwd: /home/user/git/user/ags/cmake-build-release
@ericoporto
ericoporto / log.txt
Created March 8, 2023 01:29
log.txt
Adventure Game Studio v3.6 Interpreter
Copyright (c) 1999-2011 Chris Jones and 2011-2023 others
ACI version 3.6.0.44
Initializing backend libs
SDL Version: 2.24.1
Initializing game data
Located game data pak: /home/user/git/user/ags/cmake-build-release/larry_midi_test/game.ags
Opened game data file: ac2game.dta
Game data version: 26
inline Rect full_transform(const Rect &r, const glm::mat4 &m)
{
// Extract the translation, rotation, and scaling components from the transformation matrix
glm::vec3 translation = glm::vec3(m[3][0], m[3][1], m[3][2]);
glm::vec3 scaling = glm::vec3(m[0][0], m[1][1], m[2][2]);
glm::quat rotation = glm::quat_cast(m);
// Calculate the half-width and half-height of the original rectangle
float half_width = 0.5f * (float)(r.Right - r.Left);
float half_height = 0.5f * (float)(r.Bottom - r.Top);
./ags.exe --console-attach --log-file=main:all --sdl-log=2 --log-file-path=log_hang.log
Adventure Game Studio v3.6 Interpreter
Copyright (c) 1999-2011 Chris Jones and 2011-2022 others
ACI version 3.6.0.36
Installing exception handler
Initializing backend libs
SDL Version: 2.24.1
Initializing game data
Looking for the game data.
$ ./ags.exe --console-attach --log-stdout=main:all
Adventure Game Studio v3.6 Interpreter
Copyright (c) 1999-2011 Chris Jones and 2011-2022 others
ACI version 3.6.0.36
Installing exception handler
Initializing backend libs
SDL Version: 2.24.1
Initializing game data
Looking for the game data.