#include <palette.h>
Collaboration diagram for Palette:
Public Member Functions | |
Palette () | |
~Palette () | |
void | fade (int cycles, int inout, int pal_num=-1) |
bool | is_faded_out () |
void | flash_red () |
void | set (int pal_num, int new_brightness=-1, bool repaint=true) |
int | get_brightness () |
void | set_fades_enabled (bool f) |
bool | get_fades_enabled () const |
void | apply (bool repaint=true) |
void | load (const char *fname, int index, const char *xfname=0, int xindex=-1) |
void | set_brightness (int bright) |
void | set_max_val (int max) |
int | get_max_val () |
void | fade_in (int cycles) |
void | fade_out (int cycles) |
int | find_color (int r, int g, int b) |
void | create_trans_table (unsigned char br, unsigned bg, unsigned bb, int alpha, unsigned char *table) |
void | show () |
void | set_color (int nr, int r, int g, int b) |
unsigned char | get_red (int nr) |
unsigned char | get_green (int nr) |
unsigned char | get_blue (int nr) |
void | set_palette (unsigned char palnew[768]) |
Private Attributes | |
Image_window8 * | win |
unsigned char | pal1 [768] |
unsigned char | pal2 [768] |
int | brightness |
int | max_val |
int | palette |
bool | faded_out |
bool | fades_enabled |
Definition at line 42 of file palette.h.
Palette::Palette | ( | ) |
Definition at line 42 of file palette.cc.
Palette::~Palette | ( | ) |
Definition at line 49 of file palette.cc.
void Palette::fade | ( | int | cycles, | |
int | inout, | |||
int | pal_num = -1 | |||
) |
Definition at line 59 of file palette.cc.
References PALETTES_FLX.
Referenced by ActionEndgame(), ActionSIIntro(), BG_Game::end_game(), Game_window::setup_game(), and Usecode_internal::UI_fade_palette().
bool Palette::is_faded_out | ( | ) | [inline] |
Definition at line 58 of file palette.h.
References faded_out.
Referenced by Usecode_internal::click_to_continue().
void Palette::flash_red | ( | ) |
Definition at line 79 of file palette.cc.
References Game_window::get_instance(), PALETTE_RED, and Game_window::set_painted().
Referenced by Actor::reduce_health().
Here is the call graph for this function:
void Palette::set | ( | int | pal_num, | |
int | new_brightness = -1 , |
|||
bool | repaint = true | |||
) |
Definition at line 95 of file palette.cc.
References PALETTES_FLX.
Referenced by ActionEndgame(), ActionSIIntro(), BuildGameMap(), change_gamma(), Lightning_effect::handle_event(), Game_clock::set_time_palette(), Cheat::shape_browser(), Conversation::show_face(), Cheat::toggle_infravision(), Cheat::toggle_pickpocket(), and Usecode_internal::UI_infravision().
int Palette::get_brightness | ( | ) | [inline] |
Definition at line 64 of file palette.h.
References brightness.
Referenced by playfli::play(), and Conversation::show_face().
void Palette::set_fades_enabled | ( | bool | f | ) | [inline] |
Definition at line 67 of file palette.h.
References fades_enabled.
Referenced by Init(), and ExultMenu::setup().
bool Palette::get_fades_enabled | ( | ) | const [inline] |
Definition at line 68 of file palette.h.
References fades_enabled.
Referenced by ExultMenu::setup().
void Palette::apply | ( | bool | repaint = true |
) |
Definition at line 116 of file palette.cc.
References brightness, max_val, pal1, Image_window8::set_palette(), Image_window::show(), and win.
Referenced by CheatScreen::AdvancedFlagLoop(), ShapeBrowser::browse_shapes(), CheatScreen::BusinessLoop(), Game_window::double_clicked(), BG_Game::end_game(), CheatScreen::FlagLoop(), CheatScreen::GlobalFlagLoop(), SI_Game::new_game(), BG_Game::new_game(), CheatScreen::NormalLoop(), CheatScreen::NPCLoop(), playfli::play(), Game_window::resized(), TextScroller::run(), ExultMenu::run(), VideoOptions_gump::save_settings(), BG_Game::scene_desk(), BG_Game::scene_guardian(), BG_Game::scene_moongate(), ExultMenu::setup(), Game_window::setup_load_palette(), CheatScreen::StatLoop(), and CheatScreen::TimeSetLoop().
Here is the call graph for this function:
void Palette::load | ( | const char * | fname, | |
int | index, | |||
const char * | xfname = 0 , |
|||
int | xindex = -1 | |||
) |
Definition at line 126 of file palette.cc.
References Game_window::get_instance(), gwin, is_system_path_defined(), len, pal1, pal2, and U7object::retrieve().
Referenced by ShapeBrowser::browse_shapes(), Game_window::double_clicked(), BG_Game::end_game(), Shape_manager::load(), BG_Game::new_game(), ExultMenu::run(), BG_Game::scene_butterfly(), BG_Game::scene_desk(), BG_Game::scene_guardian(), BG_Game::scene_lord_british(), BG_Game::scene_moongate(), Set_renderer(), Game_window::setup_load_palette(), BG_Game::show_credits(), BG_Game::show_quotes(), CheatScreen::show_screen(), SI_Game::top_menu(), and BG_Game::top_menu().
Here is the call graph for this function:
void Palette::set_brightness | ( | int | bright | ) |
Definition at line 222 of file palette.cc.
References brightness.
Referenced by BG_Game::end_game(), and playfli::play().
void Palette::set_max_val | ( | int | max | ) |
int Palette::get_max_val | ( | ) |
void Palette::fade_in | ( | int | cycles | ) |
Definition at line 227 of file palette.cc.
References brightness, fades_enabled, Game_window::get_instance(), max_val, pal1, pal2, Image_window8::set_palette(), Image_window::show(), and win.
Referenced by BG_Game::end_game(), Game::journey_failed_text(), ExultMenu::run(), BG_Game::scene_butterfly(), BG_Game::scene_lord_british(), SI_Game::top_menu(), and BG_Game::top_menu().
Here is the call graph for this function:
void Palette::fade_out | ( | int | cycles | ) |
Definition at line 254 of file palette.cc.
References brightness, fades_enabled, Game_window::get_instance(), max_val, pal1, pal2, Image_window8::set_palette(), Image_window::show(), and win.
Referenced by BG_Game::end_game(), ExCineFlic::fade_out(), Game::journey_failed_text(), SI_Game::new_game(), BG_Game::new_game(), BG_Game::play_intro(), TextScroller::run(), ExultMenu::run(), BG_Game::scene_lord_british(), ExultMenu::setup(), Game_window::setup_game(), SI_Game::show_journey_failed(), BG_Game::show_journey_failed(), and Game::show_menu().
Here is the call graph for this function:
int Palette::find_color | ( | int | r, | |
int | g, | |||
int | b | |||
) |
void Palette::create_trans_table | ( | unsigned char | br, | |
unsigned | bg, | |||
unsigned | bb, | |||
int | alpha, | |||
unsigned char * | table | |||
) |
void Palette::show | ( | ) |
Definition at line 326 of file palette.cc.
References Image_window8::fill8(), and win.
Here is the call graph for this function:
void Palette::set_color | ( | int | nr, | |
int | r, | |||
int | g, | |||
int | b | |||
) |
Definition at line 334 of file palette.cc.
References pal1.
Referenced by BG_Game::scene_guardian().
unsigned char Palette::get_red | ( | int | nr | ) | [inline] |
unsigned char Palette::get_green | ( | int | nr | ) | [inline] |
unsigned char Palette::get_blue | ( | int | nr | ) | [inline] |
void Palette::set_palette | ( | unsigned char | palnew[768] | ) |
Image_window8* Palette::win [private] |
unsigned char Palette::pal1[768] [private] |
Definition at line 45 of file palette.h.
Referenced by apply(), fade_in(), fade_out(), find_color(), get_blue(), get_green(), get_red(), load(), set_color(), and set_palette().
unsigned char Palette::pal2[768] [private] |
Definition at line 46 of file palette.h.
Referenced by fade_in(), fade_out(), load(), and set_palette().
int Palette::brightness [private] |
Definition at line 47 of file palette.h.
Referenced by apply(), fade_in(), fade_out(), get_brightness(), and set_brightness().
int Palette::max_val [private] |
Definition at line 48 of file palette.h.
Referenced by apply(), fade_in(), fade_out(), get_max_val(), and set_max_val().
int Palette::palette [private] |
bool Palette::faded_out [private] |
bool Palette::fades_enabled [private] |
Definition at line 51 of file palette.h.
Referenced by fade_in(), fade_out(), get_fades_enabled(), and set_fades_enabled().