45 lines
1007 B
C
45 lines
1007 B
C
#include "display.h"
|
|
|
|
#include <gint/display.h>
|
|
#include <stdlib.h>
|
|
#include "game.h"
|
|
#include "errors.h"
|
|
|
|
int vpos = 0;
|
|
|
|
inline int display_init(void)
|
|
{
|
|
return SUCCESS;
|
|
}
|
|
|
|
inline void display_exit(void)
|
|
{
|
|
#include <gint/keyboard.h>
|
|
dupdate();
|
|
getkey();
|
|
}
|
|
|
|
inline int display_clear(void)
|
|
{
|
|
dclear(C_WHITE);
|
|
return SUCCESS;
|
|
}
|
|
|
|
inline int display_update(void)
|
|
{
|
|
dupdate();
|
|
return SUCCESS;
|
|
}
|
|
|
|
inline int display_draw_texture(texture_t *texture, const rect_t *src_rect, const rect_t *dst_rect, bool flip)
|
|
{
|
|
dsubimage_rgb16_effect((int)dst_rect->x, (int)dst_rect->y, texture, (int)src_rect->x, (int)src_rect->y, (int)src_rect->w, (int)src_rect->h, flip ? IMAGE_HFLIP : DIMAGE_NONE);
|
|
return SUCCESS;
|
|
}
|
|
|
|
inline int display_draw_frect(const frect_t *frect, unsigned int r, unsigned int g, unsigned int b, unsigned int a)
|
|
{
|
|
drect((int)frect->x, (int)frect->y, (int)(frect->x + frect->w), (int)(frect->y + frect->h), (r >> 3 ) | (g >> 2) | (g >> 3));
|
|
return SUCCESS;
|
|
}
|