Misc cleanups

This commit is contained in:
Romain Goyet
2015-05-18 19:57:33 +02:00
parent 1cb88ccad0
commit f487d775ff
8 changed files with 64 additions and 36 deletions

View File

@@ -1,5 +1,5 @@
CFLAGS += -Ikandinsky/include -Iplatform/stm32f429
objs += $(addprefix kandinsky/src/, line.o text.o font.o)
SFLAGS += -Ikandinsky/include -Iplatform/stm32f429
objs += $(addprefix kandinsky/src/, line.o text.o font.o rect.o)
FREETYPE_PATH := /usr/local/Cellar/freetype/2.5.5
LIBPNG_PATH := /usr/local/Cellar/libpng/1.6.17
@@ -10,7 +10,7 @@ font_files = $(addprefix kandinsky/src/, font.h font.c)
$(font_files): kandinsky/fonts/rasterizer
@echo "RASTER $(font_files)"
@$< kandinsky/fonts/DroidSansMono.ttf 20 20 $(font_files)
@$< kandinsky/fonts/ProggyClean.ttf 16 16 $(font_files)
kandinsky/fonts/rasterizer: kandinsky/fonts/rasterizer.c
@echo "HOSTCC $@"

View File

@@ -1,7 +1,10 @@
#ifndef KANDINSKY_KANDINSKY_H
#define KANDINSKY_KANDINSKY_H
#include <kandinsky/point.h>
#include <kandinsky/color.h>
#include <kandinsky/line.h>
#include <kandinsky/point.h>
#include <kandinsky/rect.h>
#include <kandinsky/text.h>
#endif

View File

@@ -1,8 +1,7 @@
#ifndef KANDINSKY_COLOR_H
#define KANDINSKY_COLOR_H
#include <stdint.h>
typedef uint8_t KDColor;
#include <framebuffer.h>
typedef pixel_t KDColor;
#endif

View File

@@ -1,11 +1,11 @@
#ifndef KANDINSKY_POINT_H
#define KANDINSKY_POINT_H
#include <stdint.h>
#include <kandinsky/coordinate.h>
typedef struct {
uint16_t x;
uint16_t y;
KDCoordinate x;
KDCoordinate y;
} KDPoint;
#endif

View File

@@ -1,8 +1,6 @@
#include <kandinsky/line.h>
#include "framebuffer.h"
void KDDrawLine(KDPoint p1, KDPoint p2) {
for (int i=0; i<10; i++) {
PIXEL(i,i) = 0xFF;
for (KDCoordinate x = p1.x; x<p2.x; x++) {
}
}