Skip to content

Commit

Permalink
Fix build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Lactozilla committed Sep 22, 2024
1 parent 5f8855c commit 896e3d0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion source/Engine/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ PRIVATE STATIC void Application::RunFrame(void* p) {
Graphics::Save();
Graphics::Translate(infoW - infoPadding - (8 * 16.0 * 0.85), infoPadding, 0.0);
Graphics::Scale(0.85, 0.85, 1.0);
snprintf(textBuffer, 256, "FPS: %03.1f", TargetFPS);
snprintf(textBuffer, 256, "FPS: %03.1f", CurrentFPS);
DEBUG_DrawText(textBuffer, 0.0, 0.0);
Graphics::Restore();

Expand Down
2 changes: 0 additions & 2 deletions source/Engine/Bytecode/ScriptManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ vector<ObjClass*> ScriptManager::ClassImplList;

SDL_mutex* ScriptManager::GlobalLock = NULL;

#ifdef VM_DEBUG
static Uint32 VMBranchLimit = 0;
#endif

// #define DEBUG_STRESS_GC

Expand Down
20 changes: 10 additions & 10 deletions source/Engine/Bytecode/VMThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,16 @@ PUBLIC VMValue VMThread::ReadConstant(CallFrame* frame) {
return (*frame->Function->Chunk.Constants)[ReadUInt32(frame)];
}

#define DO_RETURN() { \
FrameCount--; \
if (FrameCount == ReturnFrame) { \
return INTERPRET_FINISHED; \
} \
StackTop = frame->Slots; \
Push(InterpretResult); \
frame = &Frames[FrameCount - 1]; \
}

#ifdef VM_DEBUG
PUBLIC bool VMThread::ShowBranchLimitMessage(const char* errorMessage, ...) {
va_list args;
Expand Down Expand Up @@ -401,16 +411,6 @@ PRIVATE bool VMThread::DoJumpBack(CallFrame* frame, int offset) {
return CheckBranchLimit(frame);
}

#define DO_RETURN() { \
FrameCount--; \
if (FrameCount == ReturnFrame) { \
return INTERPRET_FINISHED; \
} \
StackTop = frame->Slots; \
Push(InterpretResult); \
frame = &Frames[FrameCount - 1]; \
}

#define JUMP(offset) \
{ \
if (DoJump(frame, offset) == false) { \
Expand Down
2 changes: 2 additions & 0 deletions source/Engine/Input/Input.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ class InputBind {
virtual bool IsDefined() const = 0;

virtual InputBind* Clone() const = 0;

virtual ~InputBind() = default;
};

class KeyboardBind : public InputBind {
Expand Down

0 comments on commit 896e3d0

Please sign in to comment.