- [FIX] El mode a pantalla completa ja manté proporcions senceres, amb barres negres pels costat quan fa falta
- [NEW] Amb F4 se fa toggle entre mode NORMAL, SCANLINES, FOSFORO i SCANLINES+FOSFORO
This commit is contained in:
@@ -76,6 +76,15 @@ void loadConfig()
|
||||
std::string txt_fullscreen = file::getConfigValue("fullscreen");
|
||||
if (txt_fullscreen=="yes") fullscreen = true;
|
||||
|
||||
int screen_mode = SCREEN_MODE_NORMAL;
|
||||
std::string txt_fosforo = file::getConfigValue("fosforo");
|
||||
if (txt_fosforo=="yes") screen_mode |= SCREEN_MODE_FOSFORO;
|
||||
|
||||
std::string txt_scanlines = file::getConfigValue("scanlines");
|
||||
if (txt_scanlines=="yes") screen_mode |= SCREEN_MODE_SCANLINES;
|
||||
|
||||
draw::setScreenMode(screen_mode);
|
||||
|
||||
static const char* nomtecles[6] = {"keyup", "keydown", "keyleft", "keyright", "keyjump", "keypick"};
|
||||
for (int i=0; i<6; ++i)
|
||||
{
|
||||
@@ -112,7 +121,11 @@ void game::init()
|
||||
audio::loadSound("snd_boost.wav");
|
||||
}
|
||||
|
||||
draw::loadPalette("test.gif");
|
||||
if (draw::getScreenMode()&SCREEN_MODE_FOSFORO) {
|
||||
draw::loadPalette("fosforo.gif");
|
||||
} else {
|
||||
draw::loadPalette("test.gif");
|
||||
}
|
||||
|
||||
if (editor::isDevMode()) {
|
||||
current_module = M_GAME;
|
||||
@@ -139,6 +152,19 @@ bool game::loop()
|
||||
fullscreen = draw::getFullscreen();
|
||||
file::setConfigValue("fullscreen", fullscreen?"yes":"no");
|
||||
}
|
||||
if (input::keyPressed(SDL_SCANCODE_F4)) {
|
||||
draw::toggleScreenMode();
|
||||
const int mode = draw::getScreenMode();
|
||||
|
||||
if (mode&SCREEN_MODE_FOSFORO) {
|
||||
draw::loadPalette("fosforo.gif");
|
||||
} else {
|
||||
draw::loadPalette("test.gif");
|
||||
}
|
||||
|
||||
file::setConfigValue("fosforo", mode&SCREEN_MODE_FOSFORO?"yes":"no");
|
||||
file::setConfigValue("scanlines", mode&SCREEN_MODE_SCANLINES?"yes":"no");
|
||||
}
|
||||
|
||||
if (input::keyPressed(SDL_SCANCODE_F12)) {
|
||||
draw::reloadAll();
|
||||
|
||||
Reference in New Issue
Block a user