This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "pch.h" | |
#include <iostream> | |
#include <map> | |
#include <string> | |
// virtual CPU registers | |
#define SREG_SP 1 // stack pointer | |
#define SREG_MAR 2 // memory address register | |
#define SREG_AX 3 // general purpose |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inline bool FixupArgument(char fixup, ScriptOperation& codeOp, int argIndex, ccInstance* codeInst, ccInstance& c_this, int pc_at) { | |
using FixupFunc = std::function<bool(ScriptOperation&, int, ccInstance*, ccInstance&, int)>; | |
// #define FIXUP_GLOBALDATA 1 // code[fixup] += &globaldata[0] | |
// #define FIXUP_FUNCTION 2 // code[fixup] += &code[0] | |
// #define FIXUP_STRING 3 // code[fixup] += &strings[0] | |
// #define FIXUP_IMPORT 4 // code[fixup] = &imported_thing[code[fixup]] | |
// #define FIXUP_DATADATA 5 // globaldata[fixup] += &globaldata[0] | |
// #define FIXUP_STACK 6 // code[fixup] += &stack[0] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ./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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ./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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |