Skip to content

Commit

Permalink
Removed playfield image, use menu-background instead.
Browse files Browse the repository at this point in the history
Separate "playfield" images are no longer supported in osu!.

Signed-off-by: Jeffrey Han <[email protected]>
  • Loading branch information
itdelatrisu committed Jan 6, 2017
1 parent 0ef1e8b commit c250fce
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
Binary file removed res/playfield.png
Binary file not shown.
7 changes: 0 additions & 7 deletions src/itdelatrisu/opsu/GameImage.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,6 @@ protected Image process_sub(Image img, int w, int h) {
HITCIRCLE_SELECT ("hitcircleselect", "png"),
UNRANKED ("play-unranked", "png"),
FOLLOWPOINT ("followpoint", "png"),
PLAYFIELD ("playfield", "png|jpg", false, false) {
@Override
protected Image process_sub(Image img, int w, int h) {
img.setAlpha(0.7f);
return img.getScaledCopy(w, h);
}
},

// Game Pause/Fail
PAUSE_CONTINUE ("pause-continue", "png"),
Expand Down
2 changes: 1 addition & 1 deletion src/itdelatrisu/opsu/states/Game.java
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ else if (deathTime > -1) // "Easy" mod: health bar increasing
dimLevel = 1f;
}
if (Options.isDefaultPlayfieldForced() || !beatmap.drawBackground(width, height, dimLevel, false)) {
Image playfield = GameImage.PLAYFIELD.getImage();
Image playfield = GameImage.MENU_BG.getImage();
playfield.setAlpha(dimLevel);
playfield.draw();
playfield.setAlpha(1f);
Expand Down
8 changes: 6 additions & 2 deletions src/itdelatrisu/opsu/states/GameRanking.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,12 @@ public void render(GameContainer container, StateBasedGame game, Graphics g)
Beatmap beatmap = MusicController.getBeatmap();

// background
if (!beatmap.drawBackground(width, height, 0.5f, true))
GameImage.PLAYFIELD.getImage().draw(0,0);
if (!beatmap.drawBackground(width, height, 0.5f, true)) {
Image playfield = GameImage.MENU_BG.getImage();
playfield.setAlpha(0.5f);
playfield.draw();
playfield.setAlpha(1f);
}

// ranking screen elements
data.drawRankingElements(g, beatmap, animationProgress.getTime());
Expand Down
8 changes: 6 additions & 2 deletions src/itdelatrisu/opsu/states/SongMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -496,8 +496,12 @@ public void render(GameContainer container, StateBasedGame game, Graphics g)
// background
if (focusNode != null) {
Beatmap focusNodeBeatmap = focusNode.getSelectedBeatmap();
if (!focusNodeBeatmap.drawBackground(width, height, bgAlpha.getValue(), true))
GameImage.PLAYFIELD.getImage().draw();
if (!focusNodeBeatmap.drawBackground(width, height, bgAlpha.getValue(), true)) {
Image playfield = GameImage.MENU_BG.getImage();
playfield.setAlpha(bgAlpha.getValue());
playfield.draw();
playfield.setAlpha(1f);
}
}

// star stream
Expand Down

0 comments on commit c250fce

Please sign in to comment.