Skip to content

Commit 5571fbe

Browse files
committed
FF8: Preliminary support for true widescreen
1 parent 9203488 commit 5571fbe

2 files changed

Lines changed: 18 additions & 6 deletions

File tree

src/cfg.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -502,9 +502,6 @@ void read_cfg()
502502
else
503503
external_vibrate_path += "/ff7";
504504

505-
// WIDESCREEN
506-
if (ff8 && aspect_ratio > AR_STRETCH) aspect_ratio = AR_ORIGINAL;
507-
508505
// VOLUME
509506
if (external_music_volume > 100) external_music_volume = 100;
510507
if (external_sfx_volume > 100) external_sfx_volume = 100;

src/renderer.cpp

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1736,10 +1736,15 @@ void Renderer::setScissor(uint16_t x, uint16_t y, uint16_t width, uint16_t heigh
17361736
case MODE_FIELD:
17371737
{
17381738
// Keep the default scissor for widescreen disabled movies and fields
1739-
bool is_movie_playing = *ff7_externals.word_CC1638 && !ff7_externals.modules_global_object->BGMOVIE_flag;
1740-
if((is_movie_playing && widescreen.getMovieMode() == WM_DISABLED) || widescreen.getMode() == WM_DISABLED)
1739+
bool isKeepDefaultScissor = false;
1740+
if (!ff8)
1741+
{
1742+
bool is_movie_playing = *ff7_externals.word_CC1638 && !ff7_externals.modules_global_object->BGMOVIE_flag;
1743+
isKeepDefaultScissor = (is_movie_playing && widescreen.getMovieMode() == WM_DISABLED) || widescreen.getMode() == WM_DISABLED;
1744+
}
1745+
1746+
if (isKeepDefaultScissor)
17411747
{
1742-
scissorOffsetX = getInternalCoordX(x + abs(wide_viewport_x));
17431748
return;
17441749
}
17451750

@@ -1779,6 +1784,16 @@ void Renderer::setScissor(uint16_t x, uint16_t y, uint16_t width, uint16_t heigh
17791784
scissorWidth = getInternalCoordX(wide_viewport_width);
17801785
else if(internalState.bIsTLVertex)
17811786
scissorOffsetX = getInternalCoordX(x + abs(wide_viewport_x));
1787+
1788+
if (ff8)
1789+
{
1790+
// This removes the black bars on the top and bottom of the screen
1791+
if(y == 24 && height == 432)
1792+
{
1793+
scissorOffsetY = getInternalCoordY(0.0);
1794+
scissorHeight = getInternalCoordY(480);
1795+
}
1796+
}
17821797
}
17831798
break;
17841799
default:

0 commit comments

Comments
 (0)