This file contains 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 "export.h" | |
#include <windows.h> | |
#include <stdio.h> | |
#include <iostream> | |
#include <glad/glad.h> | |
#include <GLFW/glfw3.h> | |
static GLFWwindow* window = nullptr; |
This file contains 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
public class MoneyButton extends GameObject{ | |
public Sprite buttonClickable; | |
public Sprite buttonClicked; | |
public int money = 0; | |
// Add a debounce time so that you can wait before registering the next click | |
private double mouseDebounceTime = 0.1; | |
private double mouseDebounceTimeLeft = 0.1; |
This file contains 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
' I changed lines 85-88 to this | |
Renderer.AddLayer(BackgroundBuffer.RenderID) | |
'Renderer.AddLayer(BackgroundBuffer.FrameBufferID, Source, Destination) | |
Renderer.UpdateImage(GB.RenderID, GB.Image) | |
Renderer.AddLayer(GB.RenderID) |
This file contains 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
@echo off | |
IF NOT EXIST bin mkdir bin | |
IF NOT EXIST bin-int mkdir bin-int | |
pushd bin-int | |
cl ..\guessNumber.cpp /link | |
popd |
This file contains 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 <stdio.h> | |
#include <stdarg.h> | |
#include "Log.h" | |
void LogInternal(const char *file, int line, const char *format, ...) | |
{ | |
printf("'%s' Line: %d\n", file, line); | |
printf("\t"); | |
va_list argptr; |
This file contains 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
-- This is in PracticeProject/premake5.lua, I just can't create a subdirectory in a Github gist | |
project "PracticeProject" | |
kind "ConsoleApp" | |
language "C++" | |
cppdialect "C++17" | |
staticruntime "on" | |
targetdir("../bin/" .. outputdir .. "/%{prj.name}") | |
objdir("../bin-int/" .. outputdir .. "/%{prj.name}") |
This file contains 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 "Vector3.h" | |
#include <stdio.h> | |
namespace Math | |
{ | |
float Dot(Vector3 a, Vector3 b) | |
{ | |
return a.x * b.x + a.y * b.y + a.z * b.z; | |
} |
This file contains 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
class Main { | |
static int[] someArray = {0, 1, 2, 3, 4}; | |
public static void main(String args[]) { | |
System.out.println("SomeArray[0]: " + someArray[0]); | |
System.out.println("SomeArray[1]: " + someArray[1]); | |
System.out.println("SomeArray[2]: " + someArray[2]); | |
System.out.println("SomeArray[3]: " + someArray[3]); | |
System.out.println("SomeArray[4]: " + someArray[4]); |