create doxygen doc and correct makefile

This commit is contained in:
milang 2019-08-29 15:22:38 +02:00
parent eb69825bd3
commit 350efd5e38
No known key found for this signature in database
GPG Key ID: D287C9D6C33D9035
6 changed files with 51 additions and 41 deletions

View File

@ -1,35 +1,37 @@
# fxengine makefile
# fxengine needs gint (@Lephenixnoir)
target ?= sh3eb-elf
cflags := -m3 -mb -D FX9860G -ffreestanding -nostdlib -fstrict-volatile-bitfields -Wall \
-Wextra -Os -Iinclude -I .
-Wextra -Os -Iinclude -I .
dflags = -MT $@ -MMD -MP -MF $(@:%.o=%.d)
lib := libfxengine.a
header := include/
prefix := $(shell $(target)-gcc -print-search-dirs | grep install \
prefix := $(shell sh3eb-elf-gcc -print-search-dirs | grep install \
| sed 's/install: //')
ifeq "$(prefix)" ""
$(error "Can't find install directory")
$(error "Can't find install directory... Leaving installation process")
endif
src := $(shell find src -name '*.c')
obj := $(src:%=build/%.o)
#src := $(shell find src -name '*.c')
src = $(wildcard src/*.c)
obj = $(src:%=build/%.o)
all: $(lib)
$(lib): $(obj)
$(target)-ar rcs $@ $^
sh3eb-elf-ar rcs $@ $^
build/%.c.o: %.c
@ mkdir -p $(dir $@)
$(target)-gcc -c $< -o $@ $(cflags)
sh3eb-elf-gcc -c $< -o $@ $(cflags) $(dflags)
include $(wildcard build/*/*.d)
clean:
@ rm -rf build
@ -47,3 +49,7 @@ install:
sh3eb-elf-ar -t $(lib)
cp $(lib) $(prefix)
cp -r $(header) $(prefix)/include/fxengine
uninstall:
rm -f $(prefix)/$(lib)
rm -rf $(prefix)/include/fxengine

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,14 +1,11 @@
#include <stdint.h>
#include <stdbool.h>
/* bitmap codé bit à bit
0 dans layout -> transparent
1 dans layout -> 1 dans color -> noir
0 dans color -> blanc */
/** bitmap rich type
* @warning Monochrome only !
* transparency is in the layout
*/
/**
* @brief bitmap rich type
* transparency is in the layout
* @warning Monochrome only !
*/
struct bitmap_rich
{
uint32_t size_px_x;
@ -20,31 +17,38 @@ struct bitmap_rich
};
typedef struct bitmap_rich bitmap_rich;
/** get the color of pixel from rich bitmap
* @return the color coded in a unsigned char :
* if (color >> 1)
* switch (color%2)
* {
* case 0:
* // WHITE
* break;
* case 1:
* // BLACK
* }
* else
* // TRANSPARENT
* @param the bitmap
* @param x coordinate
* @param y coordinate
*/
/**
* @brief get the color of pixel from rich bitmap
*
* @param[in] bmp The bitmap
* @param[in] x The bitmap x coordinate (in pixels)
* @param[in] y The bitmap y coordinate (in pixels)
*
* @return the color coded in a unsigned char :
* if (color >> 1)
* switch (color%2)
* {
* case 0:
* // WHITE
* break;
* case 1:
* // BLACK
* }
* else
*/
inline uint8_t bitmap_get_pixel_r(const bitmap_rich * bmp, uint32_t x, uint32_t y);
/** display a pixel from rich bitmap
* // TRANSPARENT
* @param the bitmap
* @param x coordinate
* @param y coordinate
*/
/**
* @brief display a specific rich bitmap pixel on the screen
*
* @param[in] bmp The bitmap
* @param[in] bmp_x The bitmap x coordinate (in pixels)
* @param[in] bmp_y The bitmap y coordinate (in pixels)
* @param[in] x screen : x coordinate
* @param[in] y screen : y coordinate
*/
void bitmap_display_pixel_r(const bitmap_rich * bmp, uint32_t bmp_x, uint32_t bmp_y, uint32_t x, uint32_t y);

Binary file not shown.