graphicsOld.h

Go to the documentation of this file.
00001 #define g_vram_base (u32*)(MEMORY_VMEM_BASE | MEMORY_UNCACHED_OFFSET);
00002 
00003 #define PSP_LINE_SIZE SCREEN_STRIDE
00004 
00005 #define A(color) ((u8)(color >> 24 & 0xFF))
00006 #define B(color) ((u8)(color >> 16 & 0xFF))
00007 #define G(color) ((u8)(color >> 8 & 0xFF))
00008 #define R(color) ((u8)(color & 0xFF))
00009 
00010 #define IS_ALPHA(color) (((color) & 0xff000000) == 0xff000000 ? 0 : 1)
00011 #define FRAMEBUFFER_SIZE ((SCREEN_STRIDE * SCREEN_HEIGHT) << 2)
00012 #define MAX(X, Y) max(x, y)
00013 
00014 #define Color u32
00015 
00016 #define Image Texture
00017 
00018 //extern void makeColorAlpha(Image* source, Color color);
00019 
00020 
00021 #define loadImage(filename) texLoad(filename)
00022 //extern void blitImageToImage(int sx, int sy, int width, int height, Image* source, int dx, int dy, Image* destination);
00023 #define blitImageToScreen(sx, sy, width, height, source, dx, dy) graphics2dDrawTextureSection(dx, dy, width, height, source, sx, sy, width, height)
00024 //extern void blitAlphaImageToImage(int sx, int sy, int width, int height, Image* source, int dx, int dy, Image* destination);
00025 #define blitAlphaImageToScreen(sx, sy, width, height, source, dx, dy) graphics2dDrawTextureSection(dx, dy, width, height, source, sx, sy, width, height)
00026 #define createImage(width, height) texCreate(width, height, GU_PSM_8888)
00027 #define freeImage(image) texFree(image)
00028 //extern void clearImage(Color color, Image* image);
00029 //extern void clearScreen(Color color);
00030 //extern void fillImageRect(Color color, int x0, int y0, int width, int height, Image* image);
00031 #define fillScreenRect(color, x0, y0, width, height) graphics2dDrawRectFilled(x0, y0, width, height, color)
00032 #define putPixelScreen(color, x, y) graphics2dDrawPoint(x, y, color)
00033 //extern void putPixelImage(Color color, int x, int y, Image* image);
00034 //extern Color getPixelScreen(int x, int y);
00035 //extern Color getPixelImage(int x, int y, Image* image);
00036 //extern void printTextScreen(int x, int y, const char* text, u32 color);
00037 //extern void printTextImage(int x, int y, const char* text, u32 color, Image* image);
00038 //extern void saveImage(const char* filename, Color* data, int width, int height, int lineSize, int saveAlpha);
00039 #define flipScreen() graphicsSwapBuffers()
00040 #define initGraphics() graphicsInit()
00041 #define disableGraphics() graphicsTerm()
00042 #define drawLineScreen(x0, y0, x1, y1, color) graphics2dDrawLine(x0, y0, x1, y1, color)
00043 //extern void drawLineImage(int x0, int y0, int x1, int y1, Color color, Image* image);
00044 #define getVramDrawBuffer() graphicsDrawBuffer
00045 #define getVramDisplayBuffer() graphicsDisplayBuffer
00046 //extern void guStart();

Generated on Wed Sep 5 19:04:01 2007 for funcLib by  doxygen 1.5.1