meta: initial commit
This commit is contained in:
commit
96ec759657
|
@ -0,0 +1,13 @@
|
|||
# Build files
|
||||
/build-fx
|
||||
/build-cg
|
||||
/*.g1a
|
||||
/*.g3a
|
||||
|
||||
# Python bytecode
|
||||
__pycache__/
|
||||
|
||||
# Common IDE files
|
||||
*.sublime-project
|
||||
*.sublime-workspace
|
||||
.vscode
|
|
@ -0,0 +1,24 @@
|
|||
cmake_minimum_required(VERSION 3.15)
|
||||
project(BosonX LANGUAGES ASM C CXX)
|
||||
|
||||
include(GenerateG3A)
|
||||
include(Fxconv)
|
||||
|
||||
find_package(Azur 0.1 REQUIRED)
|
||||
find_package(Gint 2.8 REQUIRED)
|
||||
find_package(LibProf 2.1 REQUIRED)
|
||||
|
||||
set(SOURCES
|
||||
src/main.cpp)
|
||||
set(ASSETS)
|
||||
|
||||
fxconv_declare_assets(${ASSETS} WITH_METADATA)
|
||||
|
||||
add_executable(addin ${SOURCES} ${ASSETS})
|
||||
target_compile_options(addin PRIVATE -Wall -Wextra -Os -std=c++20)
|
||||
target_link_options(addin PRIVATE -Wl,-Map=map)
|
||||
target_link_libraries(addin PRIVATE
|
||||
Azur::Azur -lnum LibProf::LibProf Gint::Gint -lstdc++)
|
||||
|
||||
generate_g3a(TARGET addin OUTPUT "BosonX.g3a"
|
||||
NAME "BosonX" ICONS assets-cg/icon-uns.png assets-cg/icon-sel.png)
|
Binary file not shown.
After Width: | Height: | Size: 8.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.5 KiB |
|
@ -0,0 +1,47 @@
|
|||
#include <gint/display.h>
|
||||
#include <gint/keyboard.h>
|
||||
#include <gint/timer.h>
|
||||
#include <azur/gint/render.h>
|
||||
#include <gint/drivers/r61524.h>
|
||||
#include <math.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
azrp_config_scale(1);
|
||||
azrp_shader_clear_configure();
|
||||
/* azrp_shader_image_rgb16_configure();
|
||||
azrp_shader_image_p8_configure();
|
||||
azrp_shader_image_p4_configure(); */
|
||||
azrp_shader_triangle_configure();
|
||||
|
||||
int volatile need_frame = 1;
|
||||
int timer = timer_configure(TIMER_ANY, 33000, GINT_CALL_SET(&need_frame));
|
||||
timer_start(timer);
|
||||
|
||||
float t = 0.0;
|
||||
|
||||
while(1) {
|
||||
float dt = 1.0 / 30;
|
||||
t += dt;
|
||||
|
||||
int y1 = (int)(90 * sin(t + 0.05)) + 100;
|
||||
int y2 = (int)(90 * sin(t + 1.05)) + 100;
|
||||
int y3 = (int)(90 * sin(t + 2.05)) + 100;
|
||||
|
||||
azrp_clear(C_WHITE);
|
||||
azrp_triangle(10, y1, 128, y2, 380, y3, C_RED);
|
||||
azrp_update();
|
||||
|
||||
drect(0, DHEIGHT-20, DWIDTH-1, DHEIGHT-1, C_WHITE);
|
||||
dprint(1, 210, C_BLACK, "Hello, World!");
|
||||
r61524_display(gint_vram, DHEIGHT-20, 20, R61524_DMA_WAIT);
|
||||
|
||||
//---
|
||||
|
||||
clearevents();
|
||||
if(keydown(KEY_EXIT) || keydown(KEY_MENU)) break;
|
||||
}
|
||||
|
||||
timer_stop(timer);
|
||||
return 1;
|
||||
}
|
Loading…
Reference in New Issue