This adds the above two "graphicsinfo.conf" options to override the
automatically calculated playfield scroll values when starting a game.
The purpose of these options is to force an initial scroll position
(which is used for all levels), which means that the visible part of
the playfield when the game is started is not determined by the player
position, but by the values defined using the above options.
This may be useful in combination with a large value for the option
"game.forced_scroll_delay_value" to limit the visible part of the
playfield to a smaller, screen-sized area, while the remaining part of
the playfield contains some control elements. It may also be useful
for levels using teleportation from one area to another area while
still controlling which parts of the playfield entered by the player
are visible. It can also be used to force a certain initial visible
part of the playfield, regardless of the exact position of the player
within that area. And it is currently the only way to force showing
levels with an even width or even height with the player near the
border of the playfield with half-tile border elements, which would
also be needed for teleporting the player to a different part of the
playfield without scrolling the playfield relative to the player's
screen position.
Therefore, this feature should probably be considered experimental.
{ "game.graphics_engine_version", "-1" },
{ "game.forced_scroll_delay_value", "-1" },
+ { "game.forced_scroll_x", ARG_UNDEFINED },
+ { "game.forced_scroll_y", ARG_UNDEFINED },
{ "game.use_native_emc_graphics_engine", "false" },
{ "game.use_native_sp_graphics_engine", "true" },
{ "game.use_masked_pushing", "false" },
scroll_y = SCROLL_POSITION_Y(local_player->jy);
}
+ if (game.forced_scroll_x != ARG_UNDEFINED_VALUE)
+ scroll_x = game.forced_scroll_x;
+ if (game.forced_scroll_y != ARG_UNDEFINED_VALUE)
+ scroll_y = game.forced_scroll_y;
+
// !!! FIX THIS (START) !!!
if (level.game_engine_type == GAME_ENGINE_TYPE_EM)
{
boolean use_masked_pushing;
boolean use_masked_elements;
boolean use_masked_elements_initial;
+ int forced_scroll_x;
+ int forced_scroll_y;
int forced_scroll_delay_value;
int scroll_delay_value;
int tile_size;