Attempting to add a book chooser. (Doesn't work)
4
Makefile
|
@ -41,7 +41,7 @@ TARGET := $(notdir $(CURDIR))
|
||||||
BUILD := build
|
BUILD := build
|
||||||
SOURCES := source
|
SOURCES := source
|
||||||
DATA := data
|
DATA := data
|
||||||
INCLUDES := include
|
INCLUDES := include include/menus/book include/menus/book-chooser
|
||||||
ROMFS := RomFS
|
ROMFS := RomFS
|
||||||
|
|
||||||
VERSION_MAJOR := 0
|
VERSION_MAJOR := 0
|
||||||
|
@ -70,7 +70,7 @@ LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs -g $(ARCH) -Wl,-Map,$(notdir $*
|
||||||
#LIBS := `sdl2-config --libs` -lSDL2_ttf -lSDL2_image
|
#LIBS := `sdl2-config --libs` -lSDL2_ttf -lSDL2_image
|
||||||
#LIBS := `aarch64-none-elf-pkg-config --libs sdl2 SDL2_ttf SDL2_mixer`
|
#LIBS := `aarch64-none-elf-pkg-config --libs sdl2 SDL2_ttf SDL2_mixer`
|
||||||
#LIBS := `sdl2-config --libs` -lSDL2_ttf -lSDL2_image -lfreetype -lz -lnx
|
#LIBS := `sdl2-config --libs` -lSDL2_ttf -lSDL2_image -lfreetype -lz -lnx
|
||||||
LIBS := `sdl2-config --libs` -lSDL2_ttf -lSDL2_image -lfreetype -lpng -ljpeg -lz -lbz2 -ltwili -lnx -lmupdf -lmupdf-third
|
LIBS := `sdl2-config --libs` -lSDL2_ttf -lSDL2_image -lfreetype -lpng -ljpeg -lwebp -lz -lbz2 -ltwili -lnx -lmupdf -lmupdf-third
|
||||||
#LIBS := `aarch64-none-elf-pkg-config --libs sdl2` -lSDL2_ttf #-lSDL2_image -lmupdf -lmupdf-third
|
#LIBS := `aarch64-none-elf-pkg-config --libs sdl2` -lSDL2_ttf #-lSDL2_image -lmupdf -lmupdf-third
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
|
|
After Width: | Height: | Size: 257 B |
After Width: | Height: | Size: 517 B |
After Width: | Height: | Size: 263 B |
After Width: | Height: | Size: 529 B |
After Width: | Height: | Size: 263 B |
After Width: | Height: | Size: 527 B |
After Width: | Height: | Size: 263 B |
After Width: | Height: | Size: 560 B |
After Width: | Height: | Size: 264 B |
After Width: | Height: | Size: 578 B |
After Width: | Height: | Size: 263 B |
After Width: | Height: | Size: 556 B |
After Width: | Height: | Size: 263 B |
After Width: | Height: | Size: 534 B |
After Width: | Height: | Size: 295 B |
After Width: | Height: | Size: 551 B |
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL.h>
|
||||||
#include <SDL2/SDL_ttf.h>
|
#include <SDL2/SDL_ttf.h>
|
||||||
|
#include "SDL_helper.h"
|
||||||
|
|
||||||
extern SDL_Window *WINDOW;
|
extern SDL_Window *WINDOW;
|
||||||
extern SDL_Surface *WINDOW_SURFACE;
|
extern SDL_Surface *WINDOW_SURFACE;
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
#ifndef EBOOK_READER_MENU_CHOOSER_HPP
|
||||||
|
#define EBOOK_READER_MENU_CHOOSER_HPP
|
||||||
|
|
||||||
|
void Menu_StartChoosing();
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,12 @@
|
||||||
|
#ifndef NX_SHELL_TEXTURES_H
|
||||||
|
#define NX_SHELL_TEXTURES_H
|
||||||
|
|
||||||
|
|
||||||
|
SDL_Texture *battery_20, *battery_20_charging, *battery_30, *battery_30_charging, *battery_50, *battery_50_charging, \
|
||||||
|
*battery_60, *battery_60_charging, *battery_80, *battery_80_charging, *battery_90, *battery_90_charging, \
|
||||||
|
*battery_full, *battery_full_charging, *battery_low, *battery_unknown;
|
||||||
|
|
||||||
|
void Textures_Load(void);
|
||||||
|
void Textures_Free(void);
|
||||||
|
|
||||||
|
#endif
|
|
@ -10,28 +10,12 @@
|
||||||
#include <twili.h>
|
#include <twili.h>
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "menu_book_reader.h"
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "SDL_helper.h"
|
#include "SDL_helper.h"
|
||||||
|
#include "textures.h"
|
||||||
|
#include "MenuChooser.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
/*void draw_rects(SDL_Renderer *renderer, int x, int y) {
|
|
||||||
// R
|
|
||||||
SDL_SetRenderDrawColor(renderer, 255, 0, 0, 255);
|
|
||||||
SDL_Rect r = {x, y, 64, 64};
|
|
||||||
SDL_RenderFillRect(renderer, &r);
|
|
||||||
|
|
||||||
// G
|
|
||||||
SDL_SetRenderDrawColor(renderer, 0, 255, 0, 255);
|
|
||||||
SDL_Rect g = {x + 64, y, 64, 64};
|
|
||||||
SDL_RenderFillRect(renderer, &g);
|
|
||||||
|
|
||||||
// B
|
|
||||||
SDL_SetRenderDrawColor(renderer, 0, 0, 255, 255);
|
|
||||||
SDL_Rect b = {x + 128, y, 64, 64};
|
|
||||||
SDL_RenderFillRect(renderer, &b);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
SDL_Renderer* RENDERER;
|
SDL_Renderer* RENDERER;
|
||||||
SDL_Window* WINDOW;
|
SDL_Window* WINDOW;
|
||||||
SDL_Surface* WINDOW_SURFACE;
|
SDL_Surface* WINDOW_SURFACE;
|
||||||
|
@ -46,24 +30,22 @@ void Term_Services() {
|
||||||
TTF_CloseFont(ARIAL_UNICODE);
|
TTF_CloseFont(ARIAL_UNICODE);
|
||||||
TTF_Quit();
|
TTF_Quit();
|
||||||
|
|
||||||
|
Textures_Free();
|
||||||
romfsExit();
|
romfsExit();
|
||||||
|
|
||||||
SDL_DestroyRenderer(RENDERER);
|
SDL_DestroyRenderer(RENDERER);
|
||||||
|
SDL_FreeSurface(WINDOW_SURFACE);
|
||||||
SDL_DestroyWindow(WINDOW);
|
SDL_DestroyWindow(WINDOW);
|
||||||
SDL_Quit();
|
SDL_Quit();
|
||||||
|
|
||||||
//socketExit();
|
|
||||||
twiliExit();
|
twiliExit();
|
||||||
run = false;
|
run = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Init_Services() {
|
void Init_Services() {
|
||||||
twiliInitialize();
|
twiliInitialize();
|
||||||
/*socketInitializeDefault();
|
|
||||||
nxlinkStdio();*/
|
|
||||||
std::cout << "Initalize Serices" << std::endl;
|
std::cout << "Initalize Serices" << std::endl;
|
||||||
|
|
||||||
// mandatory at least on switch, else gfx is not properly closed
|
|
||||||
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK) < 0) {
|
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK) < 0) {
|
||||||
SDL_Log("SDL_Init: %s\n", SDL_GetError());
|
SDL_Log("SDL_Init: %s\n", SDL_GetError());
|
||||||
Term_Services();
|
Term_Services();
|
||||||
|
@ -71,39 +53,27 @@ void Init_Services() {
|
||||||
|
|
||||||
TTF_Init();
|
TTF_Init();
|
||||||
|
|
||||||
// create an SDL WINDOW (OpenGL ES2 always enabled)
|
|
||||||
// when SDL_FULLSCREEN flag is not set, viewport is automatically handled by SDL (use SDL_SetWINDOWSize to "change resolution")
|
|
||||||
// available switch SDL2 video modes :
|
|
||||||
// 1920 x 1080 @ 32 bpp (SDL_PIXELFORMAT_RGBA8888)
|
|
||||||
// 1280 x 720 @ 32 bpp (SDL_PIXELFORMAT_RGBA8888)
|
|
||||||
WINDOW = SDL_CreateWindow("sdl2_gles2", 0, 0, 1280, 720, 0);
|
WINDOW = SDL_CreateWindow("sdl2_gles2", 0, 0, 1280, 720, 0);
|
||||||
if (!WINDOW) {
|
if (!WINDOW) {
|
||||||
SDL_Log("SDL_CreateWindow: %s\n", SDL_GetError());
|
SDL_Log("SDL_CreateWindow: %s\n", SDL_GetError());
|
||||||
Term_Services();
|
Term_Services();
|
||||||
}
|
}
|
||||||
|
|
||||||
// create a renderer (OpenGL ES2)
|
|
||||||
RENDERER = SDL_CreateRenderer(WINDOW, 0, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
|
RENDERER = SDL_CreateRenderer(WINDOW, 0, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
|
||||||
if (!RENDERER) {
|
if (!RENDERER) {
|
||||||
SDL_Log("SDL_CreateRenderer: %s\n", SDL_GetError());
|
SDL_Log("SDL_CreateRenderer: %s\n", SDL_GetError());
|
||||||
Term_Services();
|
Term_Services();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get a reference to the window surface
|
|
||||||
// This has to be ran after you create the renderer.
|
|
||||||
WINDOW_SURFACE = SDL_GetWindowSurface(WINDOW);
|
WINDOW_SURFACE = SDL_GetWindowSurface(WINDOW);
|
||||||
|
|
||||||
romfsInit();
|
romfsInit();
|
||||||
|
Textures_Load();
|
||||||
ARIAL_UNICODE = TTF_OpenFont("romfs:/arial.ttf", 35);
|
ARIAL_UNICODE = TTF_OpenFont("romfs:/res/font/arial.ttf", 35);
|
||||||
if (!ARIAL_UNICODE) {
|
if (!ARIAL_UNICODE) {
|
||||||
Term_Services();
|
Term_Services();
|
||||||
}
|
}
|
||||||
|
|
||||||
// open CONTROLLER_PLAYER_1 and CONTROLLER_PLAYER_2
|
|
||||||
// when railed, both joycons are mapped to joystick #0,
|
|
||||||
// else joycons are individually mapped to joystick #0, joystick #1, ...
|
|
||||||
// https://github.com/devkitPro/SDL/blob/switch-sdl2/src/joystick/switch/SDL_sysjoystick.c#L45
|
|
||||||
for (int i = 0; i < 2; i++) {
|
for (int i = 0; i < 2; i++) {
|
||||||
if (SDL_JoystickOpen(i) == NULL) {
|
if (SDL_JoystickOpen(i) == NULL) {
|
||||||
SDL_Log("SDL_JoystickOpen: %s\n", SDL_GetError());
|
SDL_Log("SDL_JoystickOpen: %s\n", SDL_GetError());
|
||||||
|
@ -113,17 +83,12 @@ void Init_Services() {
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
/*SDL_Renderer* RENDERER;
|
|
||||||
SDL_Window* WINDOW;
|
|
||||||
SDL_Surface* WINDOW_SURFACE;
|
|
||||||
TTF_Font* ARIAL_UNICODE;*/
|
|
||||||
//int x = 0, w = 1920, h = 1080;
|
|
||||||
|
|
||||||
Init_Services();
|
Init_Services();
|
||||||
|
|
||||||
std::cout << "Opening test.epub" << std::endl;
|
//std::cout << "Opening test.pdf" << std::endl;
|
||||||
Menu_OpenBook("/switch/eBookReader/books/test.epub");
|
//Menu_OpenBook("/switch/eBookReader/books/test.pdf");
|
||||||
//Menu_OpenBook("/switch/eBookReader/books/test.epub");
|
//Menu_OpenBook("/switch/eBookReader/books/test.epub");
|
||||||
|
Menu_StartChoosing();
|
||||||
|
|
||||||
while (run) {
|
while (run) {
|
||||||
while (SDL_PollEvent(&EVENT)) {
|
while (SDL_PollEvent(&EVENT)) {
|
||||||
|
|
|
@ -0,0 +1,53 @@
|
||||||
|
extern "C" {
|
||||||
|
#include "MenuChooser.h"
|
||||||
|
#include "common.h"
|
||||||
|
#include "SDL_helper.h"
|
||||||
|
}
|
||||||
|
|
||||||
|
#include <switch.h>
|
||||||
|
#include <iostream>
|
||||||
|
#include <dirent.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
//using namespace std;
|
||||||
|
|
||||||
|
void Menu_StartChoosing() {
|
||||||
|
int choosen_index = 0;
|
||||||
|
|
||||||
|
struct dirent *entry;
|
||||||
|
DIR *dir = opendir("/switch/eBookReader/books");
|
||||||
|
|
||||||
|
if (dir == NULL) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
while(appletMainLoop()) {
|
||||||
|
SDL_ClearScreen(RENDERER, WHITE);
|
||||||
|
SDL_RenderClear(RENDERER);
|
||||||
|
|
||||||
|
int space_index = 0;
|
||||||
|
while ((entry = readdir(dir)) != NULL) {
|
||||||
|
SDL_DrawText(RENDERER, ARIAL_UNICODE, 20, 20 + (30 * space_index), BLACK, entry->d_name);
|
||||||
|
space_index++;
|
||||||
|
//cout << entry->d_name << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
SDL_RenderPresent(RENDERER);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*void list_dir(const char *path) {
|
||||||
|
struct dirent *entry;
|
||||||
|
DIR *dir = opendir(path);
|
||||||
|
|
||||||
|
if (dir == NULL) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
while ((entry = readdir(dir)) != NULL) {
|
||||||
|
entry->
|
||||||
|
//cout << entry->d_name << endl;
|
||||||
|
}
|
||||||
|
closedir(dir);
|
||||||
|
}*/
|
|
@ -7,14 +7,12 @@
|
||||||
|
|
||||||
struct SDL_Texture;
|
struct SDL_Texture;
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
BookPageLayoutPortrait,
|
BookPageLayoutPortrait,
|
||||||
BookPageLayoutLandscape
|
BookPageLayoutLandscape
|
||||||
} BookPageLayout;
|
} BookPageLayout;
|
||||||
|
|
||||||
class BookReader
|
class BookReader {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
BookReader(const char *path);
|
BookReader(const char *path);
|
||||||
~BookReader();
|
~BookReader();
|
||||||
|
@ -31,8 +29,7 @@ class BookReader
|
||||||
void switch_page_layout();
|
void switch_page_layout();
|
||||||
void draw();
|
void draw();
|
||||||
|
|
||||||
BookPageLayout currentPageLayout()
|
BookPageLayout currentPageLayout() {
|
||||||
{
|
|
||||||
return _currentPageLayout;
|
return _currentPageLayout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "menu_book_reader.h"
|
#include "menu_book_reader.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
//#include "touch_helper.h"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "BookReader.hpp"
|
#include "BookReader.hpp"
|
||||||
|
|
|
@ -97,14 +97,14 @@ static void StatusBar_GetBatteryStatus(int x, int y)
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(buf, 5, "%d%%", percent);
|
snprintf(buf, 5, "%d%%", percent);
|
||||||
TTF_SizeText(Roboto, buf, &width, NULL);
|
TTF_SizeText(ARIAL_UNICODE, buf, &width, NULL);
|
||||||
SDL_DrawText(RENDERER, Roboto, (x - width - 10), y, WHITE, buf);
|
SDL_DrawText(RENDERER, ARIAL_UNICODE, (x - width - 10), y, WHITE, buf);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
snprintf(buf, 5, "%d%%", percent);
|
snprintf(buf, 5, "%d%%", percent);
|
||||||
TTF_SizeText(Roboto, buf, &width, NULL);
|
TTF_SizeText(ARIAL_UNICODE, buf, &width, NULL);
|
||||||
SDL_DrawText(RENDERER, Roboto, (x - width - 10), y, WHITE, buf);
|
SDL_DrawText(RENDERER, ARIAL_UNICODE, (x - width - 10), y, WHITE, buf);
|
||||||
SDL_DrawImage(RENDERER, battery_unknown, x, 1);
|
SDL_DrawImage(RENDERER, battery_unknown, x, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -112,8 +112,8 @@ static void StatusBar_GetBatteryStatus(int x, int y)
|
||||||
void StatusBar_DisplayTime(void)
|
void StatusBar_DisplayTime(void)
|
||||||
{
|
{
|
||||||
int width = 0, height = 0;
|
int width = 0, height = 0;
|
||||||
TTF_SizeText(Roboto, Clock_GetCurrentTime(), &width, &height);
|
TTF_SizeText(ARIAL_UNICODE, Clock_GetCurrentTime(), &width, &height);
|
||||||
|
|
||||||
StatusBar_GetBatteryStatus(1260 - width - 44, (40 - height) / 2);
|
StatusBar_GetBatteryStatus(1260 - width - 44, (40 - height) / 2);
|
||||||
SDL_DrawText(RENDERER, Roboto, 1260 - width, (40 - height) / 2, WHITE, Clock_GetCurrentTime());
|
SDL_DrawText(RENDERER, ARIAL_UNICODE, 1260 - width, (40 - height) / 2, WHITE, Clock_GetCurrentTime());
|
||||||
}
|
}
|
|
@ -0,0 +1,143 @@
|
||||||
|
#include "common.h"
|
||||||
|
#include "SDL_helper.h"
|
||||||
|
#include "textures.h"
|
||||||
|
|
||||||
|
void Textures_Load(void) {
|
||||||
|
/*SDL_LoadImage(RENDERER, &icon_app, "romfs:/res/images/ic_fso_type_executable.png");
|
||||||
|
SDL_LoadImage(RENDERER, &icon_archive, "romfs:/res/images/ic_fso_type_compress.png");
|
||||||
|
SDL_LoadImage(RENDERER, &icon_audio, "romfs:/res/images/ic_fso_type_audio.png");
|
||||||
|
SDL_LoadImage(RENDERER, &icon_dir, "romfs:/res/images/ic_fso_folder.png");
|
||||||
|
SDL_LoadImage(RENDERER, &icon_dir_dark, "romfs:/res/images/ic_fso_folder_dark.png");
|
||||||
|
SDL_LoadImage(RENDERER, &icon_doc, "romfs:/res/images/ic_fso_type_document.png");
|
||||||
|
SDL_LoadImage(RENDERER, &icon_file, "romfs:/res/images/ic_fso_default.png");
|
||||||
|
SDL_LoadImage(RENDERER, &icon_image, "romfs:/res/images/ic_fso_type_image.png");
|
||||||
|
SDL_LoadImage(RENDERER, &icon_text, "romfs:/res/images/ic_fso_type_text.png");
|
||||||
|
SDL_LoadImage(RENDERER, &icon_check, "romfs:/res/images/btn_material_light_check_on_normal.png");
|
||||||
|
SDL_LoadImage(RENDERER, &icon_check_dark, "romfs:/res/images/btn_material_light_check_on_normal_dark.png");
|
||||||
|
SDL_LoadImage(RENDERER, &icon_uncheck, "romfs:/res/images/btn_material_light_check_off_normal.png");
|
||||||
|
SDL_LoadImage(RENDERER, &icon_uncheck_dark, "romfs:/res/images/btn_material_light_check_off_normal_dark.png");
|
||||||
|
SDL_LoadImage(RENDERER, &dialog, "romfs:/res/images/ic_material_dialog.png");
|
||||||
|
SDL_LoadImage(RENDERER, &options_dialog, "romfs:/res/images/ic_material_options_dialog.png");
|
||||||
|
SDL_LoadImage(RENDERER, &properties_dialog, "romfs:/res/images/ic_material_properties_dialog.png");
|
||||||
|
SDL_LoadImage(RENDERER, &dialog_dark, "romfs:/res/images/ic_material_dialog_dark.png");
|
||||||
|
SDL_LoadImage(RENDERER, &options_dialog_dark, "romfs:/res/images/ic_material_options_dialog_dark.png");
|
||||||
|
SDL_LoadImage(RENDERER, &properties_dialog_dark, "romfs:/res/images/ic_material_properties_dialog_dark.png");
|
||||||
|
SDL_LoadImage(RENDERER, &bg_header, "romfs:/res/images/bg_header.png");
|
||||||
|
SDL_LoadImage(RENDERER, &icon_settings, "romfs:/res/images/ic_material_light_settings.png");
|
||||||
|
SDL_LoadImage(RENDERER, &icon_sd, "romfs:/res/images/ic_material_light_sdcard.png");
|
||||||
|
SDL_LoadImage(RENDERER, &icon_secure, "romfs:/res/images/ic_material_light_secure.png");
|
||||||
|
SDL_LoadImage(RENDERER, &icon_settings_dark, "romfs:/res/images/ic_material_light_settings_dark.png");
|
||||||
|
SDL_LoadImage(RENDERER, &icon_sd_dark, "romfs:/res/images/ic_material_light_sdcard_dark.png");
|
||||||
|
SDL_LoadImage(RENDERER, &icon_secure_dark, "romfs:/res/images/ic_material_light_secure_dark.png");
|
||||||
|
SDL_LoadImage(RENDERER, &icon_radio_off, "romfs:/res/images/btn_material_light_radio_off_normal.png");
|
||||||
|
SDL_LoadImage(RENDERER, &icon_radio_on, "romfs:/res/images/btn_material_light_radio_on_normal.png");
|
||||||
|
SDL_LoadImage(RENDERER, &icon_radio_dark_off, "romfs:/res/images/btn_material_light_radio_off_normal_dark.png");
|
||||||
|
SDL_LoadImage(RENDERER, &icon_radio_dark_on, "romfs:/res/images/btn_material_light_radio_on_normal_dark.png");
|
||||||
|
SDL_LoadImage(RENDERER, &icon_toggle_on, "romfs:/res/images/btn_material_light_toggle_on_normal.png");
|
||||||
|
SDL_LoadImage(RENDERER, &icon_toggle_dark_on, "romfs:/res/images/btn_material_light_toggle_on_normal_dark.png");
|
||||||
|
SDL_LoadImage(RENDERER, &icon_toggle_off, "romfs:/res/images/btn_material_light_toggle_off_normal.png");
|
||||||
|
SDL_LoadImage(RENDERER, &default_artwork, "romfs:/res/images/default_artwork.png");
|
||||||
|
SDL_LoadImage(RENDERER, &default_artwork_blur, "romfs:/res/images/default_artwork_blur.png");
|
||||||
|
SDL_LoadImage(RENDERER, &btn_play, "romfs:/res/images/btn_playback_play.png");
|
||||||
|
SDL_LoadImage(RENDERER, &btn_pause, "romfs:/res/images/btn_playback_pause.png");
|
||||||
|
SDL_LoadImage(RENDERER, &btn_rewind, "romfs:/res/images/btn_playback_rewind.png");
|
||||||
|
SDL_LoadImage(RENDERER, &btn_forward, "romfs:/res/images/btn_playback_forward.png");
|
||||||
|
SDL_LoadImage(RENDERER, &btn_repeat, "romfs:/res/images/btn_playback_repeat.png");
|
||||||
|
SDL_LoadImage(RENDERER, &btn_shuffle, "romfs:/res/images/btn_playback_shuffle.png");
|
||||||
|
SDL_LoadImage(RENDERER, &btn_repeat_overlay, "romfs:/res/images/btn_playback_repeat_overlay.png");
|
||||||
|
SDL_LoadImage(RENDERER, &btn_shuffle_overlay, "romfs:/res/images/btn_playback_shuffle_overlay.png");
|
||||||
|
SDL_LoadImage(RENDERER, &icon_nav_drawer, "romfs:/res/images/ic_material_light_navigation_drawer.png");
|
||||||
|
SDL_LoadImage(RENDERER, &icon_actions, "romfs:/res/images/ic_material_light_contextual_action.png");
|
||||||
|
SDL_LoadImage(RENDERER, &icon_back, "romfs:/res/images/ic_arrow_back_normal.png");
|
||||||
|
SDL_LoadImage(RENDERER, &icon_accept, "romfs:/res/images/ic_material_light_accept.png");
|
||||||
|
SDL_LoadImage(RENDERER, &icon_accept_dark, "romfs:/res/images/ic_material_light_accept_dark.png");
|
||||||
|
SDL_LoadImage(RENDERER, &icon_remove, "romfs:/res/images/ic_material_light_remove.png");
|
||||||
|
SDL_LoadImage(RENDERER, &icon_remove_dark, "romfs:/res/images/ic_material_light_remove_dark.png");*/
|
||||||
|
SDL_LoadImage(RENDERER, &battery_20, "romfs:/res/images/battery_20.png");
|
||||||
|
SDL_LoadImage(RENDERER, &battery_20_charging, "romfs:/res/images/battery_20_charging.png");
|
||||||
|
SDL_LoadImage(RENDERER, &battery_30, "romfs:/res/images/battery_30.png");
|
||||||
|
SDL_LoadImage(RENDERER, &battery_30_charging, "romfs:/res/images/battery_30_charging.png");
|
||||||
|
SDL_LoadImage(RENDERER, &battery_50, "romfs:/res/images/battery_50.png");
|
||||||
|
SDL_LoadImage(RENDERER, &battery_50_charging, "romfs:/res/images/battery_50_charging.png");
|
||||||
|
SDL_LoadImage(RENDERER, &battery_60, "romfs:/res/images/battery_60.png");
|
||||||
|
SDL_LoadImage(RENDERER, &battery_60_charging, "romfs:/res/images/battery_60_charging.png");
|
||||||
|
SDL_LoadImage(RENDERER, &battery_80, "romfs:/res/images/battery_80.png");
|
||||||
|
SDL_LoadImage(RENDERER, &battery_80_charging, "romfs:/res/images/battery_80_charging.png");
|
||||||
|
SDL_LoadImage(RENDERER, &battery_90, "romfs:/res/images/battery_90.png");
|
||||||
|
SDL_LoadImage(RENDERER, &battery_90_charging, "romfs:/res/images/battery_90_charging.png");
|
||||||
|
SDL_LoadImage(RENDERER, &battery_full, "romfs:/res/images/battery_full.png");
|
||||||
|
SDL_LoadImage(RENDERER, &battery_full_charging, "romfs:/res/images/battery_full_charging.png");
|
||||||
|
SDL_LoadImage(RENDERER, &battery_low, "romfs:/res/images/battery_low.png");
|
||||||
|
SDL_LoadImage(RENDERER, &battery_unknown, "romfs:/res/images/battery_unknown.png");
|
||||||
|
//SDL_LoadImage(RENDERER, &icon_lock, "romfs:/res/images/ic_material_dialog_fs_locked.png");
|
||||||
|
}
|
||||||
|
|
||||||
|
void Textures_Free(void)
|
||||||
|
{
|
||||||
|
//SDL_DestroyTexture(icon_lock);
|
||||||
|
SDL_DestroyTexture(battery_unknown);
|
||||||
|
SDL_DestroyTexture(battery_low);
|
||||||
|
SDL_DestroyTexture(battery_full_charging);
|
||||||
|
SDL_DestroyTexture(battery_full);
|
||||||
|
SDL_DestroyTexture(battery_90_charging);
|
||||||
|
SDL_DestroyTexture(battery_80_charging);
|
||||||
|
SDL_DestroyTexture(battery_80);
|
||||||
|
SDL_DestroyTexture(battery_60_charging);
|
||||||
|
SDL_DestroyTexture(battery_60);
|
||||||
|
SDL_DestroyTexture(battery_50_charging);
|
||||||
|
SDL_DestroyTexture(battery_50);
|
||||||
|
SDL_DestroyTexture(battery_30_charging);
|
||||||
|
SDL_DestroyTexture(battery_30);
|
||||||
|
SDL_DestroyTexture(battery_20_charging);
|
||||||
|
SDL_DestroyTexture(battery_20);
|
||||||
|
/*SDL_DestroyTexture(icon_remove_dark);
|
||||||
|
SDL_DestroyTexture(icon_remove);
|
||||||
|
SDL_DestroyTexture(icon_accept_dark);
|
||||||
|
SDL_DestroyTexture(icon_accept);
|
||||||
|
SDL_DestroyTexture(icon_back);
|
||||||
|
SDL_DestroyTexture(icon_actions);
|
||||||
|
SDL_DestroyTexture(icon_nav_drawer);
|
||||||
|
SDL_DestroyTexture(btn_shuffle_overlay);
|
||||||
|
SDL_DestroyTexture(btn_repeat_overlay);
|
||||||
|
SDL_DestroyTexture(btn_shuffle);
|
||||||
|
SDL_DestroyTexture(btn_repeat);
|
||||||
|
SDL_DestroyTexture(btn_forward);
|
||||||
|
SDL_DestroyTexture(btn_rewind);
|
||||||
|
SDL_DestroyTexture(btn_pause);
|
||||||
|
SDL_DestroyTexture(btn_play);
|
||||||
|
SDL_DestroyTexture(default_artwork_blur);
|
||||||
|
SDL_DestroyTexture(default_artwork);
|
||||||
|
SDL_DestroyTexture(icon_toggle_off);
|
||||||
|
SDL_DestroyTexture(icon_toggle_dark_on);
|
||||||
|
SDL_DestroyTexture(icon_toggle_on);
|
||||||
|
SDL_DestroyTexture(icon_radio_dark_on);
|
||||||
|
SDL_DestroyTexture(icon_radio_dark_off);
|
||||||
|
SDL_DestroyTexture(icon_radio_on);
|
||||||
|
SDL_DestroyTexture(icon_radio_off);
|
||||||
|
SDL_DestroyTexture(icon_secure_dark);
|
||||||
|
SDL_DestroyTexture(icon_sd_dark);
|
||||||
|
SDL_DestroyTexture(icon_settings_dark);
|
||||||
|
SDL_DestroyTexture(icon_secure);
|
||||||
|
SDL_DestroyTexture(icon_sd);
|
||||||
|
SDL_DestroyTexture(icon_settings);
|
||||||
|
SDL_DestroyTexture(bg_header);
|
||||||
|
SDL_DestroyTexture(properties_dialog_dark);
|
||||||
|
SDL_DestroyTexture(options_dialog_dark);
|
||||||
|
SDL_DestroyTexture(dialog_dark);
|
||||||
|
SDL_DestroyTexture(properties_dialog);
|
||||||
|
SDL_DestroyTexture(options_dialog);
|
||||||
|
SDL_DestroyTexture(dialog);
|
||||||
|
SDL_DestroyTexture(icon_uncheck_dark);
|
||||||
|
SDL_DestroyTexture(icon_uncheck);
|
||||||
|
SDL_DestroyTexture(icon_check_dark);
|
||||||
|
SDL_DestroyTexture(icon_check);
|
||||||
|
SDL_DestroyTexture(icon_text);
|
||||||
|
SDL_DestroyTexture(icon_image);
|
||||||
|
SDL_DestroyTexture(icon_file);
|
||||||
|
SDL_DestroyTexture(icon_doc);
|
||||||
|
SDL_DestroyTexture(icon_dir_dark);
|
||||||
|
SDL_DestroyTexture(icon_dir);
|
||||||
|
SDL_DestroyTexture(icon_audio);
|
||||||
|
SDL_DestroyTexture(icon_archive);
|
||||||
|
SDL_DestroyTexture(icon_app);*/
|
||||||
|
}
|