TLB Simulator™

This commit is contained in:
KikooDX 2021-05-02 17:59:18 +02:00
commit b059b66837
7 changed files with 53 additions and 0 deletions

13
.gitignore vendored Normal file
View File

@ -0,0 +1,13 @@
# Build files
/build-fx
/build-cg
/*.g1a
/*.g3a
# Python bytecode
__pycache__/
# Common IDE files
*.sublime-project
*.sublime-workspace
.vscode

18
CMakeLists.txt Normal file
View File

@ -0,0 +1,18 @@
# Configure with [fxsdk build-fx] or [fxsdk build-cg], which provide the
# toolchain file and module path of the fxSDK
cmake_minimum_required(VERSION 3.18)
project(TLBSimulator)
include(GenerateG3A)
find_package(Gint 2.1 REQUIRED)
add_executable(tlbsim src/main.c)
target_compile_options(tlbsim PRIVATE -Wall -Wextra -Os)
target_link_libraries(tlbsim Gint::Gint)
generate_g3a(
TARGET tlbsim
OUTPUT "${PROJECT_NAME}.g3a"
NAME "${PROJECT_NAME}"
ICONS assets-cg/icon-uns.png assets-cg/icon-sel.png)

BIN
assets-cg/example.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -0,0 +1,3 @@
example.png:
type: bopti-image
name: img_example

BIN
assets-cg/icon-sel.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

BIN
assets-cg/icon-uns.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

19
src/main.c Normal file
View File

@ -0,0 +1,19 @@
#include <gint/display.h>
#include <gint/keyboard.h>
int
main(void)
{
int dumb_number = 69;
int *dumb_pointer = &dumb_number;
do {
dclear(C_WHITE);
dprint(1, 1, C_BLACK, "Look at this dummy hahaha %d %d", dumb_pointer, *dumb_pointer);
dumb_pointer = (int *)((int)dumb_pointer * 3);
dupdate();
clearevents();
} while(!keydown(KEY_EXIT));
return 1;
}