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
00019
00020
00021 #define loadImage(filename) texLoad(filename)
00022
00023 #define blitImageToScreen(sx, sy, width, height, source, dx, dy) graphics2dDrawTextureSection(dx, dy, width, height, source, sx, sy, width, height)
00024
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
00029
00030
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
00034
00035
00036
00037
00038
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
00044 #define getVramDrawBuffer() graphicsDrawBuffer
00045 #define getVramDisplayBuffer() graphicsDisplayBuffer
00046