mirror of
https://github.com/RocketRobz/SavvyManager.git
synced 2025-06-19 01:25:35 -04:00
Add backgrounds for game title text
This commit is contained in:
parent
30e1503583
commit
e94e3eae34
2
Makefile
2
Makefile
@ -54,7 +54,7 @@ UNIVCORE := Universal-Core
|
|||||||
SOURCES := $(UNIVCORE) source source/screens source/utils
|
SOURCES := $(UNIVCORE) source source/screens source/utils
|
||||||
DATA := data
|
DATA := data
|
||||||
INCLUDES := $(UNIVCORE) include include/screens include/utils
|
INCLUDES := $(UNIVCORE) include include/screens include/utils
|
||||||
GRAPHICS := assets/gfx assets/gfx_chars assets/gfx_charprevbg assets/gfx_gamesel assets/gfx_gameshots
|
GRAPHICS := assets/gfx assets/gfx_chars assets/gfx_charprevbg assets/gfx_gamesel assets/gfx_gameshots assets/gfx_gamebg
|
||||||
ROMFS := romfs
|
ROMFS := romfs
|
||||||
GFXBUILD := $(ROMFS)/gfx
|
GFXBUILD := $(ROMFS)/gfx
|
||||||
APP_AUTHOR := RocketRobz
|
APP_AUTHOR := RocketRobz
|
||||||
|
7
assets/gfx_gamebg/gameBgSprites.t3s
Normal file
7
assets/gfx_gamebg/gameBgSprites.t3s
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
--atlas -f rgba -z auto
|
||||||
|
title1_bg.png
|
||||||
|
title1_bgE.png
|
||||||
|
title2_bg.png
|
||||||
|
title3_bg.png
|
||||||
|
title4_bg.png
|
||||||
|
title4_bgE.png
|
BIN
assets/gfx_gamebg/title1_bg.png
Normal file
BIN
assets/gfx_gamebg/title1_bg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 668 B |
BIN
assets/gfx_gamebg/title1_bgE.png
Normal file
BIN
assets/gfx_gamebg/title1_bgE.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 614 B |
BIN
assets/gfx_gamebg/title2_bg.png
Normal file
BIN
assets/gfx_gamebg/title2_bg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 95 KiB |
BIN
assets/gfx_gamebg/title3_bg.png
Normal file
BIN
assets/gfx_gamebg/title3_bg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 90 KiB |
BIN
assets/gfx_gamebg/title4_bg.png
Normal file
BIN
assets/gfx_gamebg/title4_bg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
BIN
assets/gfx_gamebg/title4_bgE.png
Normal file
BIN
assets/gfx_gamebg/title4_bgE.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
@ -4,6 +4,7 @@
|
|||||||
#include "sprites.h"
|
#include "sprites.h"
|
||||||
#include "gameSelSprites.h"
|
#include "gameSelSprites.h"
|
||||||
#include "gameShotSprites.h"
|
#include "gameShotSprites.h"
|
||||||
|
#include "gameBgSprites.h"
|
||||||
|
|
||||||
#include <3ds.h>
|
#include <3ds.h>
|
||||||
#include <citro2d.h>
|
#include <citro2d.h>
|
||||||
@ -34,6 +35,7 @@ namespace GFX {
|
|||||||
void showCharSprite(int zoomIn, int fadeAlpha);
|
void showCharSprite(int zoomIn, int fadeAlpha);
|
||||||
void DrawGameSelSprite(int img, int x, int y, float ScaleX = 1, float ScaleY = 1);
|
void DrawGameSelSprite(int img, int x, int y, float ScaleX = 1, float ScaleY = 1);
|
||||||
void DrawGameShotSprite(int img, int x, int y, float ScaleX = 1, float ScaleY = 1);
|
void DrawGameShotSprite(int img, int x, int y, float ScaleX = 1, float ScaleY = 1);
|
||||||
|
void DrawGameBgSprite(int img, int x, int y, float ScaleX = 1, float ScaleY = 1);
|
||||||
void DrawSprite(int img, int x, int y, float ScaleX = 1, float ScaleY = 1, GPU_TEXTURE_FILTER_PARAM filter = GPU_NEAREST);
|
void DrawSprite(int img, int x, int y, float ScaleX = 1, float ScaleY = 1, GPU_TEXTURE_FILTER_PARAM filter = GPU_NEAREST);
|
||||||
void DrawSpriteBlend(int img, float x, float y, u32 color, float ScaleX = 1, float ScaleY = 1, GPU_TEXTURE_FILTER_PARAM filter = GPU_NEAREST);
|
void DrawSpriteBlend(int img, float x, float y, u32 color, float ScaleX = 1, float ScaleY = 1, GPU_TEXTURE_FILTER_PARAM filter = GPU_NEAREST);
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
static C2D_SpriteSheet sprites;
|
static C2D_SpriteSheet sprites;
|
||||||
static C2D_SpriteSheet gameSelSprites;
|
static C2D_SpriteSheet gameSelSprites;
|
||||||
static C2D_SpriteSheet gameShotSprites;
|
static C2D_SpriteSheet gameShotSprites;
|
||||||
|
static C2D_SpriteSheet gameBgSprites;
|
||||||
static C2D_SpriteSheet bgSprite;
|
static C2D_SpriteSheet bgSprite;
|
||||||
static C2D_SpriteSheet chracterSprite;
|
static C2D_SpriteSheet chracterSprite;
|
||||||
static bool doChracterSpriteFree = false;
|
static bool doChracterSpriteFree = false;
|
||||||
@ -22,6 +23,7 @@ Result GFX::loadSheets() {
|
|||||||
sprites = C2D_SpriteSheetLoad("romfs:/gfx/sprites.t3x");
|
sprites = C2D_SpriteSheetLoad("romfs:/gfx/sprites.t3x");
|
||||||
gameSelSprites = C2D_SpriteSheetLoad("romfs:/gfx/gameSelSprites.t3x");
|
gameSelSprites = C2D_SpriteSheetLoad("romfs:/gfx/gameSelSprites.t3x");
|
||||||
gameShotSprites = C2D_SpriteSheetLoad("romfs:/gfx/gameShotSprites.t3x");
|
gameShotSprites = C2D_SpriteSheetLoad("romfs:/gfx/gameShotSprites.t3x");
|
||||||
|
gameBgSprites = C2D_SpriteSheetLoad("romfs:/gfx/gameBgSprites.t3x");
|
||||||
GFX::loadBgSprite();
|
GFX::loadBgSprite();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -30,6 +32,7 @@ Result GFX::unloadSheets() {
|
|||||||
C2D_SpriteSheetFree(sprites);
|
C2D_SpriteSheetFree(sprites);
|
||||||
C2D_SpriteSheetFree(gameSelSprites);
|
C2D_SpriteSheetFree(gameSelSprites);
|
||||||
C2D_SpriteSheetFree(gameShotSprites);
|
C2D_SpriteSheetFree(gameShotSprites);
|
||||||
|
C2D_SpriteSheetFree(gameBgSprites);
|
||||||
if (doBgSpriteFree) {
|
if (doBgSpriteFree) {
|
||||||
C2D_SpriteSheetFree(bgSprite);
|
C2D_SpriteSheetFree(bgSprite);
|
||||||
}
|
}
|
||||||
@ -115,6 +118,10 @@ void GFX::DrawGameShotSprite(int img, int x, int y, float ScaleX, float ScaleY)
|
|||||||
C2D_DrawImageAt(C2D_SpriteSheetGetImage(gameShotSprites, img), x, y, 0.5f, NULL, ScaleX, ScaleY);
|
C2D_DrawImageAt(C2D_SpriteSheetGetImage(gameShotSprites, img), x, y, 0.5f, NULL, ScaleX, ScaleY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GFX::DrawGameBgSprite(int img, int x, int y, float ScaleX, float ScaleY) {
|
||||||
|
C2D_DrawImageAt(C2D_SpriteSheetGetImage(gameBgSprites, img), x, y, 0.5f, NULL, ScaleX, ScaleY);
|
||||||
|
}
|
||||||
|
|
||||||
void GFX::DrawSprite(int img, int x, int y, float ScaleX, float ScaleY, GPU_TEXTURE_FILTER_PARAM filter) {
|
void GFX::DrawSprite(int img, int x, int y, float ScaleX, float ScaleY, GPU_TEXTURE_FILTER_PARAM filter) {
|
||||||
C2D_Image image = C2D_SpriteSheetGetImage(sprites, img);
|
C2D_Image image = C2D_SpriteSheetGetImage(sprites, img);
|
||||||
C3D_TexSetFilter(image.tex, filter, filter);
|
C3D_TexSetFilter(image.tex, filter, filter);
|
||||||
|
@ -90,29 +90,33 @@ void GameSelect::Draw(void) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Gui::ScreenDraw(Bottom);
|
Gui::ScreenDraw(Bottom);
|
||||||
Gui::Draw_Rect(0, 0, 320, 240, WHITE); // Fill gaps of BG
|
|
||||||
for(int w = 0; w < 7; w++) {
|
|
||||||
for(int h = 0; h < 3; h++) {
|
|
||||||
GFX::DrawSprite(sprites_phone_bg_idx, -76+bg_xPos+w*72, bg_yPos+h*136);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Gui::DrawString(8, 8, 0.50, BLACK, "Select a game to manage its save data.");
|
|
||||||
switch(highlightedGame) {
|
switch(highlightedGame) {
|
||||||
case 0:
|
case 0:
|
||||||
default:
|
default:
|
||||||
|
/*Gui::Draw_Rect(0, 0, 320, 240, WHITE); // Fill gaps of BG
|
||||||
|
for(int w = 0; w < 7; w++) {
|
||||||
|
for(int h = 0; h < 3; h++) {
|
||||||
|
GFX::DrawSprite(sprites_phone_bg_idx, -76+bg_xPos+w*72, bg_yPos+h*136);
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
GFX::DrawGameBgSprite((sysRegion==CFG_REGION_EUR || sysRegion==CFG_REGION_AUS) ? gameBgSprites_title1_bgE_idx : gameBgSprites_title1_bg_idx, 0, 0, 2, 2);
|
||||||
GFX::DrawGameSelSprite(ss1Logo, ss1LogoXpos, 56);
|
GFX::DrawGameSelSprite(ss1Logo, ss1LogoXpos, 56);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
|
GFX::DrawGameBgSprite(gameBgSprites_title2_bg_idx, 0, 0);
|
||||||
GFX::DrawGameSelSprite(ss2Logo, ssLogoXpos, 56);
|
GFX::DrawGameSelSprite(ss2Logo, ssLogoXpos, 56);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
GFX::DrawGameBgSprite(gameBgSprites_title3_bg_idx, 0, 0);
|
||||||
GFX::DrawGameSelSprite(ss3Logo, 0, 56);
|
GFX::DrawGameSelSprite(ss3Logo, 0, 56);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
|
GFX::DrawGameBgSprite((sysRegion==CFG_REGION_EUR || sysRegion==CFG_REGION_AUS) ? gameBgSprites_title4_bgE_idx : gameBgSprites_title4_bg_idx, 0, 0);
|
||||||
GFX::DrawGameSelSprite(ss4Logo, ssLogoXpos, 56);
|
GFX::DrawGameSelSprite(ss4Logo, ssLogoXpos, 56);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Gui::DrawString(8, 8, 0.50, BLACK, "Select a game to manage its save data.");
|
||||||
Gui::DrawString(8, 112, 0.55, BLACK, "<");
|
Gui::DrawString(8, 112, 0.55, BLACK, "<");
|
||||||
Gui::DrawString(304, 112, 0.55, BLACK, ">");
|
Gui::DrawString(304, 112, 0.55, BLACK, ">");
|
||||||
Gui::DrawString(8, 202, 0.50, BLACK, "START: Exit");
|
Gui::DrawString(8, 202, 0.50, BLACK, "START: Exit");
|
||||||
|
Loading…
Reference in New Issue
Block a user