Skip to content

Commit

Permalink
change X position of ep text string
Browse files Browse the repository at this point in the history
- move episode title string close to left border on X axis to fix overlapping text when GameEpisode screen runs on native resolution
- add ALLIGN_EPX ifdef to gamemenu.cpp and include flag in Miyoo makefile
  • Loading branch information
Apaczer committed Jan 26, 2023
1 parent c73ad7b commit c570ede
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile.miyoo
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ OpenJazz: $(OBJS)
$(CXX) -Wall -I$(INCLUDE) -I$(INCLUDE)/SDL $(OBJS) -o OpenJazz -lSDL -lasound -lz -lpthread -lstdc++

%.o: %.cpp
$(CXX) -Wall -DMIYOO -DUSE_PSMPLUG -DHOMEDIR -DQUIT_SELECT -I$(INCLUDE) -I$(INCLUDE)/SDL -Isrc -Iext/psmplug -O3 -c $< -o $@
$(CXX) -Wall -DMIYOO -DUSE_PSMPLUG -DHOMEDIR -DQUIT_SELECT -DALLIGN_EPX -I$(INCLUDE) -I$(INCLUDE)/SDL -Isrc -Iext/psmplug -O3 -c $< -o $@
#
#-DGFX8TO16BIT
#-DUSE_MODPLUG
Expand Down
13 changes: 12 additions & 1 deletion src/menu/gamemenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -580,18 +580,29 @@ int GameMenu::newGameEpisode (GameModeType mode) {

// black on white
fontmn2->mapPalette(240, 8, 79, -80);
#if defined (ALLIGN_EPX)
drawRect(8, (canvasH >> 1) + (count << 4) - 94,
160, 15, 79);
#else
drawRect(episodeX - 2, (canvasH >> 1) + (count << 4) - 94,
160, 15, 79);
#endif

} else if (!exists[count])
fontmn2->mapPalette(240, 8, 94, -16);

// align both separately
#if defined (ALLIGN_EPX)
fontmn2->showString(episodeTag[count], 10,
(canvasH >> 1) + (count << 4) - 92);
fontmn2->showString(episodeTitle[count], 26,
(canvasH >> 1) + (count << 4) - 92);
#else
fontmn2->showString(episodeTag[count], episodeX - (count < 6 ? 2 : 0),
(canvasH >> 1) + (count << 4) - 92);
fontmn2->showString(episodeTitle[count], episodeX + 16,
(canvasH >> 1) + (count << 4) - 92);

#endif
if ((count == episode) || (!exists[count]))
fontmn2->mapPalette(240, 8, 9, 80);

Expand Down

0 comments on commit c570ede

Please sign in to comment.