mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-01-10 12:31:09 +00:00
Fixed old bitmap logic by isolating the c64 old bitmap logic into separa .h and .c files!
This commit is contained in:
parent
2cd61a8d78
commit
7e86bebc41
1793
src/main/fragment/cache/fragment-cache-wdc65c02.asm
vendored
1793
src/main/fragment/cache/fragment-cache-wdc65c02.asm
vendored
File diff suppressed because it is too large
Load Diff
13
src/main/kc/include/bitmap-draw-c64.h
Normal file
13
src/main/kc/include/bitmap-draw-c64.h
Normal file
@ -0,0 +1,13 @@
|
||||
// Plot and line drawing routines for HIRES bitmaps
|
||||
// Currently it can only plot on the first 256 x-positions.
|
||||
|
||||
// Initialize the bitmap plotter tables for a specific bitmap
|
||||
void bitmap_init(char* bitmap);
|
||||
|
||||
// Clear all graphics on the bitmap
|
||||
void bitmap_clear();
|
||||
|
||||
void bitmap_plot(char x, char y);
|
||||
|
||||
// Draw a line on the bitmap
|
||||
void bitmap_line(char x0, char x1, char y0, char y1);
|
13
src/main/kc/include/bitmap-draw-cx16.h
Normal file
13
src/main/kc/include/bitmap-draw-cx16.h
Normal file
@ -0,0 +1,13 @@
|
||||
// Plot and line drawing routines for HIRES bitmaps
|
||||
// Currently it can only plot on the first 256 x-positions.
|
||||
|
||||
// Initialize the bitmap plotter tables for a specific bitmap
|
||||
void bitmap_init(byte layer, dword address);
|
||||
|
||||
// Clear all graphics on the bitmap
|
||||
void bitmap_clear();
|
||||
|
||||
void bitmap_plot(word x, word y, byte c);
|
||||
|
||||
// Draw a line on the bitmap
|
||||
void bitmap_line(word x0, word x1, word y0, word y1, byte c);
|
@ -1,13 +1,9 @@
|
||||
// Plot and line drawing routines for HIRES bitmaps
|
||||
// Currently it can only plot on the first 256 x-positions.
|
||||
|
||||
// Initialize the bitmap plotter tables for a specific bitmap
|
||||
void bitmap_init(byte layer, dword address);
|
||||
|
||||
// Clear all graphics on the bitmap
|
||||
void bitmap_clear();
|
||||
|
||||
void bitmap_plot(word x, word y, byte c);
|
||||
|
||||
// Draw a line on the bitmap
|
||||
void bitmap_line(word x0, word x1, word y0, word y1, byte c);
|
||||
// Provides provide bitmap output
|
||||
// Currently C64/PLUS4/VIC20/CX16 platforms are supported
|
||||
#if defined(__CX16__)
|
||||
#include "bitmap-draw-cx16.h"
|
||||
#elif defined(__C64__)
|
||||
#include "bitmap-draw-c64.h"
|
||||
#else
|
||||
#error "Target platform does not support bitmap-draw.h"
|
||||
#endif
|
23
src/main/kc/include/bitmap2-c64.h
Normal file
23
src/main/kc/include/bitmap2-c64.h
Normal file
@ -0,0 +1,23 @@
|
||||
// Simple single-color (320x200) bitmap routines
|
||||
#include <string.h>
|
||||
|
||||
// Initialize bitmap plotting tables
|
||||
void bitmap_init(char* gfx, char* screen);
|
||||
|
||||
// Clear all graphics on the bitmap
|
||||
// bgcol - the background color to fill the screen with
|
||||
// fgcol - the foreground color to fill the screen with
|
||||
void bitmap_clear(char bgcol, char fgcol);
|
||||
|
||||
// Plot a single dot in the bitmap
|
||||
void bitmap_plot(unsigned int x, char y);
|
||||
|
||||
// Draw a line on the bitmap using bresenhams algorithm
|
||||
void bitmap_line(unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2);
|
||||
|
||||
// Get the absolute value of a 16-bit unsigned number treated as a signed number.
|
||||
unsigned int abs_u16(unsigned int w);
|
||||
|
||||
// Get the sign of a 16-bit unsigned number treated as a signed number.
|
||||
// Returns unsigned -1 if the number is
|
||||
unsigned int sgn_u16(unsigned int w);
|
23
src/main/kc/include/bitmap2-cx16.h
Normal file
23
src/main/kc/include/bitmap2-cx16.h
Normal file
@ -0,0 +1,23 @@
|
||||
// Simple single-color (320x200) bitmap routines
|
||||
#include <string.h>
|
||||
|
||||
// Initialize bitmap plotting tables
|
||||
void bitmap_init(char* gfx, char* screen);
|
||||
|
||||
// Clear all graphics on the bitmap
|
||||
// bgcol - the background color to fill the screen with
|
||||
// fgcol - the foreground color to fill the screen with
|
||||
void bitmap_clear(char bgcol, char fgcol);
|
||||
|
||||
// Plot a single dot in the bitmap
|
||||
void bitmap_plot(unsigned int x, char y);
|
||||
|
||||
// Draw a line on the bitmap using bresenhams algorithm
|
||||
void bitmap_line(unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2);
|
||||
|
||||
// Get the absolute value of a 16-bit unsigned number treated as a signed number.
|
||||
unsigned int abs_u16(unsigned int w);
|
||||
|
||||
// Get the sign of a 16-bit unsigned number treated as a signed number.
|
||||
// Returns unsigned -1 if the number is
|
||||
unsigned int sgn_u16(unsigned int w);
|
@ -1,23 +1,9 @@
|
||||
// Simple single-color (320x200) bitmap routines
|
||||
#include <string.h>
|
||||
|
||||
// Initialize bitmap plotting tables
|
||||
void bitmap_init(char* gfx, char* screen);
|
||||
|
||||
// Clear all graphics on the bitmap
|
||||
// bgcol - the background color to fill the screen with
|
||||
// fgcol - the foreground color to fill the screen with
|
||||
void bitmap_clear(char bgcol, char fgcol);
|
||||
|
||||
// Plot a single dot in the bitmap
|
||||
void bitmap_plot(unsigned int x, char y);
|
||||
|
||||
// Draw a line on the bitmap using bresenhams algorithm
|
||||
void bitmap_line(unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2);
|
||||
|
||||
// Get the absolute value of a 16-bit unsigned number treated as a signed number.
|
||||
unsigned int abs_u16(unsigned int w);
|
||||
|
||||
// Get the sign of a 16-bit unsigned number treated as a signed number.
|
||||
// Returns unsigned -1 if the number is
|
||||
unsigned int sgn_u16(unsigned int w);
|
||||
// Provides provide bitmap output
|
||||
// Currently C64/PLUS4/VIC20/CX16 platforms are supported
|
||||
#if defined(__CX16__)
|
||||
#include "bitmap-cx16.h"
|
||||
#elif defined(__C64__)
|
||||
#include "bitmap-c64.h"
|
||||
#else
|
||||
#error "Target platform does not support bitmap.h"
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user