Project

General

Profile

Revision 160

implemented sprite rotation

View differences:

graphics.h
4 4
#include <lcom/lcf.h>
5 5
#include <stdint.h>
6 6

  
7
#define GET_ALP(n)          (0xFF & ((n) >> 24))
7 8
#define GET_RED(n)          (0xFF & ((n) >> 16))
8 9
#define GET_GRE(n)          (0xFF & ((n) >>  8))
9 10
#define GET_BLU(n)          (0xFF & (n      ))
11
#define SET_ALP(n)          (((n)&0xFF) << 24)
10 12
#define SET_RED(n)          (((n)&0xFF) << 16)
11 13
#define SET_GRE(n)          (((n)&0xFF) <<  8)
12 14
#define SET_BLU(n)          (((n)&0xFF)      )
13
#define SET_COLOR(r,g,b)    (SET_RED(r) | SET_GRE(g) | SET_BLU(b))
15
#define SET_RGB(r,g,b)      (             SET_RED(r) | SET_GRE(g) | SET_BLU(b))
16
#define SET_ARGB(a,r,g,b)   (SET_ALP(a) | SET_RED(r) | SET_GRE(g) | SET_BLU(b))
14 17
#define FAR2PHYS(n)         ((((n)>>12) & 0xFFFFFFF0) + ((n) & 0x0000FFFF))
15 18

  
16 19
typedef struct __attribute__((packed)) {
......
61 64

  
62 65
int (free_memory_map)(void);
63 66

  
64
int (set_pixel)(uint16_t row, uint16_t col, uint32_t color);
67
int (set_pixel)      (uint16_t x, uint16_t y, uint32_t color);
68
int (set_pixel_alpha)(uint16_t x, uint16_t y, uint32_t color, uint8_t alpha);
65 69

  
66 70
/**
67 71
 * @brief

Also available in: Unified diff