dos-vga-arena-shooter-game/vga.h

39 lines
674 B
C

#ifndef __VGA_H__
#define __VGA_H__
#include <time.h>
#include "types.h"
#include "bmpload.h"
#define VGA_DISPLAY_WIDTH (320)
#define VGA_DISPLAY_HEIGHT (200)
struct VGAColor {
byte red;
byte green;
byte blue;
};
struct SpriteRender {
byte* data;
int x;
int y;
unsigned int width;
unsigned int height;
int transparentColor;
unsigned int modulo;
};
void drawSprite(struct SpriteRender *sprite);
void buildSpriteFromSpritesheet(struct BMPImage*, struct SpriteRender*, int, int, int, int);
byte *initializeDrawBuffer();
byte *getDrawBuffer();
void freeDrawBuffer();
void copyDrawBufferToDisplay();
void setVGAColors(struct VGAColor[], int);
#endif