initial commit

This commit is contained in:
kdx 2023-03-17 09:50:44 +01:00
commit bda2e4aeb6
13 changed files with 1099 additions and 0 deletions

14
.gitignore vendored Normal file
View File

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

29
CMakeLists.txt Normal file
View File

@ -0,0 +1,29 @@
# Configure with [fxsdk build-cg], which provide the toolchain file
# and module path of the fxSDK
cmake_minimum_required(VERSION 3.15)
project(MyAddin)
include(GenerateG1A)
include(GenerateG3A)
include(Fxconv)
find_package(Gint 2.9 REQUIRED)
set(SOURCES
src/main.c
src/lzy.c
)
set(ASSETS
res/font.png
res/tset.png
)
fxconv_declare_assets(${ASSETS} WITH_METADATA)
add_executable(myaddin ${SOURCES} ${ASSETS} ${ASSETS_${FXSDK_PLATFORM}})
target_compile_options(myaddin PRIVATE -Wall -Wextra -Os)
target_link_libraries(myaddin Gint::Gint)
generate_g3a(TARGET myaddin OUTPUT "hyperultra.g3a" NAME ""
ICONS res/icon-uns.png res/icon-sel.png)

2
build.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
gcc -std=c99 -Wall -Wextra -o hyperultra src/*.c -lSDL2 -lSDL2_image -lSDL2_mixer

3
compile_flags.txt Normal file
View File

@ -0,0 +1,3 @@
-Wall
-Wextra
-std=c99

BIN
res/font.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

6
res/fxconv-metadata.txt Normal file
View File

@ -0,0 +1,6 @@
font.png:
type: bopti-image
name: bimg_font
tset.png:
type: bopti-image
name: bimg_tset

BIN
res/icon-sel.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

BIN
res/icon-uns.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
res/tset.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 B

6
src/cfg.h Normal file
View File

@ -0,0 +1,6 @@
#pragma once
#define CHR_WIDTH 8
#define CHR_HEIGHT 16
#define DISPLAY_WIDTH 400
#define DISPLAY_HEIGHT 224
#define TSIZE 16

11
src/lzy.c Normal file
View File

@ -0,0 +1,11 @@
#include "cfg.h"
#define LZY_IMPLEMENTATION
#define LZY_GINT_TILESET bimg_tset
#define LZY_GINT_FONT bimg_font
#define LZY_CHR_WIDTH CHR_WIDTH
#define LZY_CHR_HEIGHT CHR_WIDTH
#define LZY_DISPLAY_WIDTH DISPLAY_WIDTH
#define LZY_DISPLAY_HEIGHT DISPLAY_HEIGHT
#define LZY_FIRST_CHR ' '
#define LZY_TILE_SIZE TSIZE
#include "lzy.h"

1022
src/lzy.h Normal file

File diff suppressed because it is too large Load Diff

6
src/main.c Normal file
View File

@ -0,0 +1,6 @@
#include "lzy.h"
int main(void)
{
return 1;
}