From ac45b583053efbbe885d1ee4bf8317b570b8b5df Mon Sep 17 00:00:00 2001 From: Matt Thorson Date: Thu, 21 May 2020 20:33:29 -0700 Subject: [PATCH] CornerCorrection fix --- src/Core/Game.bf | 4 ++-- src/Input/Input.bf | 4 ++-- src/Physics/Actor.bf | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Core/Game.bf b/src/Core/Game.bf index 239f2e0..7f7a1b2 100644 --- a/src/Core/Game.bf +++ b/src/Core/Game.bf @@ -77,7 +77,7 @@ namespace Strawberry SDLImage.Init(.PNG | .JPG); SDLMixer.OpenAudio(44100, SDLMixer.MIX_DEFAULT_FORMAT, 2, 4096); SDLTTF.Init(); - Input.Init(gamepadLimit); + Input.[Friend]Init(gamepadLimit); } public ~this() @@ -97,7 +97,7 @@ namespace Strawberry delete VirtualInputs; } - Input.Dispose(); + Input.[Friend]Dispose(); Game = null; } diff --git a/src/Input/Input.bf b/src/Input/Input.bf index fcf2e04..85bf824 100644 --- a/src/Input/Input.bf +++ b/src/Input/Input.bf @@ -10,7 +10,7 @@ namespace Strawberry static private bool[] previousKeyboard; static private SDL.SDL_GameController*[] gamepads; - static public void Init(int gamepadLimit) + static private void Init(int gamepadLimit) { keyboard = SDL.GetKeyboardState(null); previousKeyboard = new bool[(int)SDL.Scancode.NUMSCANCODES]; @@ -20,7 +20,7 @@ namespace Strawberry gamepads[i] = SDL.GameControllerOpen((int32)i); } - static public void Dispose() + static private void Dispose() { delete previousKeyboard; delete gamepads; diff --git a/src/Physics/Actor.bf b/src/Physics/Actor.bf index e3b1fd5..b2fa705 100644 --- a/src/Physics/Actor.bf +++ b/src/Physics/Actor.bf @@ -210,7 +210,7 @@ namespace Strawberry else checker = scope:: (p) => !Check(Scene, p) && !Check(p); - for (let i < maxAmount) + for (int i = 1; i <= maxAmount; i++) { for (int j = -1; j <= 1; j += 2) {