2D Vector basis, FX display doesn't work.

This commit is contained in:
KikooDX 2020-09-10 17:29:33 +02:00
parent 78821557c1
commit 81aca3309b
5 changed files with 37 additions and 1 deletions

7
include/init.h Normal file
View File

@ -0,0 +1,7 @@
#ifndef _DEF_INIT
#define _DEF_INIT
#include <gint/gray.h>
void init();
#endif

10
include/vec2d.h Normal file
View File

@ -0,0 +1,10 @@
#ifndef DEF_VEC2D
#define DEF_VEC2D
struct Vec2D
{
int x;
int y;
};
#endif

10
src/init.c Normal file
View File

@ -0,0 +1,10 @@
#include "init.h"
void init()
{
#ifdef FX9860G
gray_start();
#endif /* FX9860G */
#ifdef FXCG50
#endif /* FXCG50*/
}

View File

@ -1,10 +1,18 @@
#include <gint/display.h>
#include <gint/keyboard.h>
#include "init.h"
#include "vec2d.h"
int main(void)
{
init(); /* initialise gint */
struct Vec2D vector_test = {
.x = 20,
.y = -50
};
dclear(C_WHITE);
dtext(1, 1, C_BLACK, "Sample fxSDK add-in.");
dprint(1, 1, C_BLACK, "vector_test: x = %d, y = %d", vector_test.x, vector_test.y);
dupdate();
getkey();

1
src/vec2d.c Normal file
View File

@ -0,0 +1 @@
#include "vec2d.h"