2022-08-20 15:06:19 +02:00
|
|
|
#include "bosonx.h"
|
|
|
|
#include <gint/keyboard.h>
|
|
|
|
#include <gint/display.h>
|
|
|
|
|
|
|
|
int main(void)
|
|
|
|
{
|
|
|
|
level_t level = level_create(1);
|
|
|
|
|
|
|
|
while (1) {
|
|
|
|
level_update(&level);
|
|
|
|
|
|
|
|
//TODO: display
|
|
|
|
dclear(C_WHITE);
|
|
|
|
level_display(&level);
|
|
|
|
dupdate();
|
|
|
|
|
|
|
|
clearevents();
|
|
|
|
if(keydown(KEY_EXIT) || keydown(KEY_MENU)) break;
|
|
|
|
if(keydown(KEY_EXE)) {
|
|
|
|
level_advance(&level);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
#if 0
|
2022-08-20 11:51:24 +02:00
|
|
|
#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;
|
|
|
|
}
|
2022-08-20 15:06:19 +02:00
|
|
|
#endif
|