00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef GRAPHICS_H_
00021 #define GRAPHICS_H_
00022
00023 #include "types.h"
00024
00026 namespace Graphics
00027 {
00029 namespace ColorTransformation
00030 {
00032 enum mode
00033 {
00034 LIGHTER,
00035 DARKER
00036 };
00037 }
00039 void FactorizePalette (const u16* src_palette, u16* dst_palette,
00040 int palette_size, u8 factor,
00041 ColorTransformation::mode trans);
00042
00044 namespace SplashEffect
00045 {
00046 const char APPEAR = 1;
00047 const char DISSOLVE = 2;
00048 }
00049
00051 void SplashImage (const unsigned int* bitmap, const unsigned short* palette,
00052 Types::Screen::selector screen, int bgid, u8 effect);
00053
00055 void PrintBitmap (int x, int y, int width, int height,
00056 const unsigned int* bitmap, unsigned short key_color,
00057 int bgid, Types::Screen::selector screen);
00058
00060 void PrintBitmapRegion (int dst_x, int dst_y, int region_x,
00061 int region_y, int region_width,
00062 int region_height, int bmp_width, int bmp_height,
00063 const unsigned int* bitmap,
00064 unsigned short key_color, int bgid,
00065 Types::Screen::selector screen,
00066 bool use_key_color = true);
00067
00069 void RedrawBgRegion (int x, int y, int region_width, int region_height,
00070 Types::MainScreenMode::mode screen_mode,
00071 GameMode::mode game_mode, int bgid);
00072
00074 void RedrawBgRegion (int x, int y, int region_width, int region_height,
00075 Types::SubScreenMode::mode screen_mode,
00076 GameMode::mode game_mode, int bgid);
00077
00079 void PrintBitmap (int x, int y, int width, int height,
00080 const unsigned char* bitmap, int bgid,
00081 Types::Screen::selector screen);
00082
00084 void Fill (unsigned short color, Types::Screen::selector screen);
00085
00088 unsigned short FindColor (unsigned short color,
00089 Types::Screen::selector screen,
00090 unsigned short offset = 0);
00092 void SetColors ();
00093
00096 const unsigned int* GetBitmapPtr (Types::MainScreenMode::mode screen_mode);
00099 const unsigned short* GetPalPtr (Types::MainScreenMode::mode screen_mode);
00102 const unsigned int* GetBitmapPtr (Types::SubScreenMode::mode screen_mode,
00103 GameMode::mode game_mode);
00106 const unsigned short* GetPalPtr (Types::SubScreenMode::mode screen_mode,
00107 GameMode::mode game_mode);
00108 }
00109
00110 #endif // GRAPHICS_H_