597b25682a
--- The objective of this early rework of the kernel architecture is to prepare the project to run on other hardware than the Casio calculator (like Raspberry Pi devices). This is why I switched the kernel workflow to integrate a custom bootloader for the particular kernel image we generate. The v0.7.0 of the kernel is not released since the USB driver is not stable yet. But the need to deeply rework the architecture is prioritized. So, as this is a critical update, I update the minor version (which is a major indicator here since I don't have the mature version yet (v1.x.x)). Also, I work on a brand-new micro-kernel (for the Raspberry Pi 3b and Google Pixels), so, the name of this project, Vhex, has migrated to a temporary name(?): VxGOS (for Vhex Gaming Operating System), which will be changed as soon as the v0.8.0 is released. (I choose this name only because the word "gaming" make me laugh. Take showers folks). The objective of version 0.8.0 is to support: - architecture rework - internal bootloader - proper KASLR support - stack protection (libSSP) --- *update* > [common] | [kernel] move kernel source file in the new "vxgos" root directory | [boards] move board-related files / scripts in the new "vxgos" | [bootloader] support fxcg50 self-translation from ROM to RAM | [bootloader] support fxcg50 KASLR patching | [scripts] move `vxdev` tool in the new "scripts" root directory | [scripts] move norm related files to "checker" directory | [vxsdk] update the vxSDK indication file
45 lines
1.4 KiB
C
45 lines
1.4 KiB
C
#ifndef __VHEX_DISPLAY_DRAW_LINE__
|
|
# define __VHEX_DISPLAY_DRAW_LINE__
|
|
|
|
#include <vhex/defs/types.h>
|
|
#include <vhex/display/shader.h>
|
|
|
|
//---
|
|
// User-level API
|
|
//---
|
|
|
|
/* dline(): Render a straight line
|
|
|
|
This function draws a line using a Bresenham-style algorithm and dline() has
|
|
optimizations for horizontal and vertical lines.
|
|
|
|
dline() is currently not able to clip arbitrary lines without calculating
|
|
all the pixels, so drawing a line from (-1e6,0) to (1e6,395) will work but
|
|
will be very slow.
|
|
|
|
@x1 @y1 @x2 @y2 Endpoints of the line (both included).
|
|
@color Line color (same values as dpixel() are allowed) */
|
|
extern void dline(int color, int x1, int y1, int x2, int y2);
|
|
|
|
/* dhline() : render an horizontal line */
|
|
extern void dhline(int color, int y, int x1, int x2);
|
|
|
|
/* dvline() : render an vertical line */
|
|
extern void dvline(int color, int x, int y1, int y2);
|
|
|
|
|
|
//---
|
|
// Kernel-level API
|
|
//---
|
|
|
|
/* dline_render() : real drawing function */
|
|
extern void dline_render(dsurface_t *s, int c, int x1, int y1, int x2, int y2);
|
|
|
|
/* dhline_render() : optimized drawing function for horizontal line */
|
|
extern void dhline_render(dsurface_t *s, int color, int y, int x1, int x2);
|
|
|
|
/* dvline_render() : optimized drawing function for vertical line */
|
|
extern void dvline_render(dsurface_t *s, int color, int x, int y1, int y2);
|
|
|
|
#endif /* __VHEX_DISPLAY_DRAW_LINE__ */
|