Advertisement
Guest User

rasterizer.h

a guest
Nov 26th, 2014
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.66 KB | None | 0 0
  1. /*
  2.  * File:   rasterizer.h
  3.  * Author: oink
  4.  *
  5.  * Created on November 26, 2014, 11:59 AM
  6.  */
  7.  
  8. #ifndef RASTERIZER_H
  9. #define RASTERIZER_H
  10.  
  11. #ifdef  __cplusplus
  12. extern "C" {
  13. #endif
  14.    
  15. #include <3ds.h>
  16.  
  17. #define RGB8(r, g, b) (u32)((((r) & 0xFF) << 8) | (((g) & 0xFF) << 16) | (((b) & 0xFF) << 24) | (0x00 << 0))
  18.  
  19. void clearFrameBuffer(u8 *fb, u32 color);
  20. void pixel2D(u8* fb, u16 x, u16 y, u32 color);
  21. void fillBox2D(u8* fb, u16 x1, u16 x2, u16 w, u16 h, u32 color);
  22. void box2D(u8* fb, u16 x1, u16 x2, u16 w, u16 h, u32 color);
  23. void line2D(u8* fb, u16 x1, u16 y1, u16 x2, u16 y2, u32 color);
  24.  
  25.  
  26. #ifdef  __cplusplus
  27. }
  28. #endif
  29.  
  30. #endif  /* RASTERIZER_H */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement