New language/string handling
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2327 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
a24bd9a894
commit
505eca76e6
20 changed files with 962 additions and 270 deletions
|
@ -13,9 +13,11 @@ AR = sh-elf-ar
|
||||||
AS = sh-elf-as
|
AS = sh-elf-as
|
||||||
OC = sh-elf-objcopy
|
OC = sh-elf-objcopy
|
||||||
|
|
||||||
|
LANGUAGE = english
|
||||||
|
|
||||||
FIRMWARE := ../firmware
|
FIRMWARE := ../firmware
|
||||||
|
|
||||||
INCLUDES= -I$(FIRMWARE)/include -I$(FIRMWARE) -I$(FIRMWARE)/common -I$(FIRMWARE)/drivers -I$(FIRMWARE)/malloc -I.
|
INCLUDES= -I$(FIRMWARE)/include -I$(FIRMWARE) -I$(FIRMWARE)/common -I$(FIRMWARE)/drivers -I$(FIRMWARE)/malloc -I. -I$(OBJDIR)
|
||||||
|
|
||||||
# store output files in this directory:
|
# store output files in this directory:
|
||||||
OBJDIR = .
|
OBJDIR = .
|
||||||
|
@ -47,7 +49,7 @@ else
|
||||||
OUTNAME = archos.mod
|
OUTNAME = archos.mod
|
||||||
endif
|
endif
|
||||||
|
|
||||||
OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
|
OBJS := $(OBJDIR)/lang.o $(SRC:%.c=$(OBJDIR)/%.o)
|
||||||
|
|
||||||
all : $(OBJDIR)/$(OUTNAME)
|
all : $(OBJDIR)/$(OUTNAME)
|
||||||
|
|
||||||
|
@ -70,6 +72,10 @@ $(OBJDIR)/%.o: %.c
|
||||||
@mkdir -p `dirname $@`
|
@mkdir -p `dirname $@`
|
||||||
$(CC) $(CFLAGS) -c $< -o $@
|
$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
|
$(OBJDIR)/lang.o: lang/$(LANGUAGE).lang
|
||||||
|
../tools/genlang -p=$(OBJDIR)/lang $<
|
||||||
|
$(CC) $(CFLAGS) -c $(OBJDIR)/lang.c -o $@
|
||||||
|
|
||||||
dist:
|
dist:
|
||||||
tar czvf dist.tar.gz Makefile main.c start.s app.lds
|
tar czvf dist.tar.gz Makefile main.c start.s app.lds
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,8 @@
|
||||||
#include "kernel.h"
|
#include "kernel.h"
|
||||||
#include "sprintf.h"
|
#include "sprintf.h"
|
||||||
|
|
||||||
|
#include "lang.h"
|
||||||
|
|
||||||
extern Menu bounce(void);
|
extern Menu bounce(void);
|
||||||
extern Menu snow(void);
|
extern Menu snow(void);
|
||||||
|
|
||||||
|
@ -40,8 +42,8 @@ Menu demo_menu(void)
|
||||||
Menu result;
|
Menu result;
|
||||||
|
|
||||||
struct menu_items items[] = {
|
struct menu_items items[] = {
|
||||||
{ "Bounce", bounce },
|
{ str(LANG_BOUNCE), bounce },
|
||||||
{ "Snow", snow },
|
{ str(LANG_SNOW), snow },
|
||||||
};
|
};
|
||||||
|
|
||||||
m=menu_init( items, sizeof items / sizeof(struct menu_items) );
|
m=menu_init( items, sizeof items / sizeof(struct menu_items) );
|
||||||
|
|
|
@ -34,6 +34,8 @@
|
||||||
|
|
||||||
#include "sokoban.h"
|
#include "sokoban.h"
|
||||||
#include "wormlet.h"
|
#include "wormlet.h"
|
||||||
|
#include "lang.h"
|
||||||
|
|
||||||
extern Menu tetris(void);
|
extern Menu tetris(void);
|
||||||
extern Menu snake(void);
|
extern Menu snake(void);
|
||||||
|
|
||||||
|
@ -43,10 +45,10 @@ Menu games_menu(void)
|
||||||
Menu result;
|
Menu result;
|
||||||
|
|
||||||
struct menu_items items[] = {
|
struct menu_items items[] = {
|
||||||
{ "Tetris", tetris },
|
{ str(LANG_TETRIS), tetris },
|
||||||
{ "Sokoban", sokoban },
|
{ str(LANG_SOKOBAN), sokoban },
|
||||||
{ "Wormlet", wormlet },
|
{ str(LANG_WORMLET), wormlet },
|
||||||
{ "Snake", snake }
|
{ str(LANG_SNAKE), snake }
|
||||||
};
|
};
|
||||||
|
|
||||||
m=menu_init( items, sizeof items / sizeof(struct menu_items) );
|
m=menu_init( items, sizeof items / sizeof(struct menu_items) );
|
||||||
|
|
16
apps/lang.c
16
apps/lang.c
|
@ -1,16 +0,0 @@
|
||||||
/* This file was automaticly generated using genlang, the strings come
|
|
||||||
from "lang/english.lang" */
|
|
||||||
|
|
||||||
unsigned char *language_strings[]={
|
|
||||||
"Sound Settings",
|
|
||||||
"General Settings",
|
|
||||||
"Games",
|
|
||||||
"Demos",
|
|
||||||
"Info",
|
|
||||||
"Version",
|
|
||||||
"Debug (keep out!)",
|
|
||||||
"Rockbox info:",
|
|
||||||
"Buf: %d.%02dMb",
|
|
||||||
"Buffer: %d.%02dMb",
|
|
||||||
};
|
|
||||||
/* end of generated string list */
|
|
25
apps/lang.h
25
apps/lang.h
|
@ -1,25 +0,0 @@
|
||||||
/* This file was automaticly generated using genlang */
|
|
||||||
/*
|
|
||||||
* The str() macro/functions is how to access strings that might be
|
|
||||||
* translated. Use it like str(MACRO) and expect a string to be
|
|
||||||
* returned!
|
|
||||||
*/
|
|
||||||
#define str(x) language_strings[x]
|
|
||||||
|
|
||||||
/* this is the array with all the strings */
|
|
||||||
extern unsigned char *language_strings[];
|
|
||||||
|
|
||||||
/* The enum below contains all available strings */
|
|
||||||
enum {
|
|
||||||
LANG_SOUND_SETTINGS,
|
|
||||||
LANG_GENERAL_SETTINGS,
|
|
||||||
LANG_GAMES,
|
|
||||||
LANG_DEMOS,
|
|
||||||
LANG_INFO,
|
|
||||||
LANG_VERSION,
|
|
||||||
LANG_DEBUG,
|
|
||||||
LANG_ROCKBOX_INFO,
|
|
||||||
LANG_BUFFER_STAT_PLAYER,
|
|
||||||
LANG_BUFFER_STAT_RECORDER,
|
|
||||||
};
|
|
||||||
/* end of generated enum list */
|
|
|
@ -33,6 +33,11 @@ desc: in the main menu
|
||||||
eng: "Debug (keep out!)"
|
eng: "Debug (keep out!)"
|
||||||
new:
|
new:
|
||||||
|
|
||||||
|
id: LANG_USB
|
||||||
|
desc: in the main menu
|
||||||
|
eng: "USB (sim)"
|
||||||
|
new:
|
||||||
|
|
||||||
id: LANG_ROCKBOX_INFO
|
id: LANG_ROCKBOX_INFO
|
||||||
desc: displayed topmost on the info screen
|
desc: displayed topmost on the info screen
|
||||||
eng: "Rockbox info:"
|
eng: "Rockbox info:"
|
||||||
|
@ -48,3 +53,731 @@ desc: the buffer size recorder-screen width, %d MB %d fraction of MB
|
||||||
eng: "Buffer: %d.%02dMb"
|
eng: "Buffer: %d.%02dMb"
|
||||||
new:
|
new:
|
||||||
|
|
||||||
|
id: LANG_BATTERY_LEVEL_PLAYER
|
||||||
|
desc: the battery level in percentage
|
||||||
|
eng: "Batt: %d%%%s"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_BATTERY_LEVEL_RECORDER
|
||||||
|
desc: the battery level in percentage
|
||||||
|
eng: "Battery: %d%%%s"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_BATTERY_CHARGE
|
||||||
|
desc: tells that the battery is charging, instead of battery level
|
||||||
|
eng: "Battery: charging"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_BOUNCE
|
||||||
|
desc: in the demos menu
|
||||||
|
eng: "Bounce"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_SNOW
|
||||||
|
desc: in the demos menu
|
||||||
|
eng: "Snow"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_TETRIS
|
||||||
|
desc: in the games menu
|
||||||
|
eng: "Tetris"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_SOKOBAN
|
||||||
|
desc: in the games menu
|
||||||
|
eng: "Sokoban"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_WORMLET
|
||||||
|
desc: in the games menu
|
||||||
|
eng: "Wormlet"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_SNAKE
|
||||||
|
desc: in the games menu
|
||||||
|
eng: "Snake"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_PLAYLIST_LOAD
|
||||||
|
desc: displayed on screen while loading a playlist
|
||||||
|
eng: "Loading..."
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_PLAYLIST_SHUFFLE
|
||||||
|
desc: displayed on screen while shuffling a playlist
|
||||||
|
eng: "Shuffling..."
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_PLAYLIST_PLAY
|
||||||
|
desc: displayed on screen when start playing a playlist
|
||||||
|
eng: "Playing..."
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_PLAYINDICES_PLAYLIST
|
||||||
|
desc: in playlist.indices() when playlist is full
|
||||||
|
eng: "Playlist"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_PLAYINDICES_BUFFER
|
||||||
|
desc: in playlist.indices() when playlist is full
|
||||||
|
eng: "buffer full"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_PLAYINDICES_AMOUNT
|
||||||
|
desc: number of files in playlist
|
||||||
|
eng: "%d files"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_SETTINGS_SAVE_PLAYER
|
||||||
|
desc: displayed if save settings has failed
|
||||||
|
eng: "Save failed"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_SETTINGS_BATTERY_PLAYER
|
||||||
|
desc: if save settings has failed
|
||||||
|
eng: "Batt. low?"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_SETTINGS_SAVE_RECORDER
|
||||||
|
desc: displayed if save settings has failed
|
||||||
|
eng: "Save failed"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_SETTINGS_BATTERY_RECORDER
|
||||||
|
desc: if save settings has failed
|
||||||
|
eng: "Is battery low?"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_TIME_SET
|
||||||
|
dec: used in set_time()
|
||||||
|
eng: "ON to set"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_TIME_REVERT
|
||||||
|
desc: used in set_time()
|
||||||
|
eng: "OFF to revert"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_HIDDEN
|
||||||
|
desc: in settings_menu
|
||||||
|
eng: "Hidden Files"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_HIDDEN_SHOW
|
||||||
|
desc: in settings_menu
|
||||||
|
eng: "Show"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_HIDDEN_HIDE
|
||||||
|
desc: in settings_menu
|
||||||
|
eng: "Hide"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_CONTRAST
|
||||||
|
desc: in settings_menu
|
||||||
|
eng: "Contrast"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_SHUFFLE
|
||||||
|
desc: in settings_menu
|
||||||
|
eng: "Shuffle"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_PLAY_SELECTED
|
||||||
|
desc: in settings_menu
|
||||||
|
eng: "Play selected first"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_MP3FILTER
|
||||||
|
desc: in settings_menu
|
||||||
|
eng: "Music Filter"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_SORT_CASE
|
||||||
|
desc: in settings_menu
|
||||||
|
eng: "Sort Case Sensitive"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_RESUME
|
||||||
|
desc: in settings_menu
|
||||||
|
eng: "Resume"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_OFF
|
||||||
|
desc: Used in a lot of places
|
||||||
|
eng: "Off"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_RESUME_SETTING_ASK
|
||||||
|
desc: in settings_menu
|
||||||
|
eng: "ask"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_ON
|
||||||
|
desc: Used in a lot of places
|
||||||
|
eng: "On"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_BACKLIGHT
|
||||||
|
desc: in settings_menu
|
||||||
|
eng: "Backlight"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_BACKLIGHT_ON
|
||||||
|
desc: in settings_menu,
|
||||||
|
|
||||||
|
id: LANG_SCROLL
|
||||||
|
desc: in settings_menu
|
||||||
|
eng: "Scroll Speed Setting Example"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_DISCHARGE
|
||||||
|
desc: in settings_menu
|
||||||
|
eng: "Deep discharge"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_TIME
|
||||||
|
desc: in settings_menu
|
||||||
|
eng: "Set Time/Date"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_SPINDOWN
|
||||||
|
desc: in settings_menu
|
||||||
|
eng: "Disk Spindown"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_FFRW_STEP
|
||||||
|
desc: in settings_menu
|
||||||
|
eng: "FF/RW Min Step"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_FFRW_ACCEL
|
||||||
|
desc: in settings_menu
|
||||||
|
eng: "FF/RW Accel"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_FOLLOW
|
||||||
|
desc: in settings_menu
|
||||||
|
eng: "Follow Playlist"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_RESET_ASK_PLAYER
|
||||||
|
desc: confirm to reset settings
|
||||||
|
eng: "Really?"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_RESET_CONFIRM_PLAYER
|
||||||
|
desc: confirm to reset settings
|
||||||
|
eng: "Play/Stop"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_RESET_ASK_RECORDER
|
||||||
|
desc: confirm to reset settings
|
||||||
|
eng: "Are you sure?"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_RESET_CONFIRM_RECORDER
|
||||||
|
desc: confirm to reset settings
|
||||||
|
eng: "Play = Yes"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_RESET_CANCEL_RECORDER
|
||||||
|
desc: confirm to reset settings
|
||||||
|
eng: "Any Other = No"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_RESET_DONE_SETTING
|
||||||
|
desc: visual confirmation after settings reset
|
||||||
|
eng: "Settings"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_RESET_DONE_CLEAR
|
||||||
|
desc: visual confirmation after settings reset
|
||||||
|
eng: "Cleared"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_RESET_DONE_CANCEL
|
||||||
|
desc: Visual confirmation of cancelation
|
||||||
|
eng: "Canceled"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_CASE_MENU
|
||||||
|
desc: in fileview_settings_menu()
|
||||||
|
eng: "Sort Mode"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_SCROLL_MENU
|
||||||
|
desc: in display_settings_menu()
|
||||||
|
eng: "Scroll Speed"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_RESET
|
||||||
|
desc: in system_settings_menu()
|
||||||
|
eng: "Reset settings"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_PLAYBACK
|
||||||
|
desc: in settings_menu()
|
||||||
|
eng: "Playback"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_FILE
|
||||||
|
desc: in settings_menu()
|
||||||
|
eng: "File View"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_DISPLAY
|
||||||
|
desc: in settings_menu()
|
||||||
|
eng: "Display"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_SYSTEM
|
||||||
|
desc: in settings_menu()
|
||||||
|
eng: "System"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_VOLUME
|
||||||
|
desc: in sound_settings
|
||||||
|
eng: "Volume"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_BALANCE
|
||||||
|
desc: in sound_settings
|
||||||
|
eng: "Balance"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_BASS
|
||||||
|
desc: in sound_settings
|
||||||
|
eng: "Bass"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_TREBLE
|
||||||
|
desc: in sound_settings
|
||||||
|
eng: "Treble"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_LOUDNESS
|
||||||
|
desc: in sound_settings
|
||||||
|
eng: "Loudness"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_BBOOST
|
||||||
|
desc: in sound settings
|
||||||
|
eng: "Bass Boost"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_DECAY
|
||||||
|
desc: in sound_settings
|
||||||
|
eng: "AV decay time"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_CHANNEL_MENU
|
||||||
|
desc: in sound_settings
|
||||||
|
eng: "Channels"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_CHANNEL
|
||||||
|
desc: in sound_settings
|
||||||
|
eng: "Channel configuration"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_CHANNEL_STEREO
|
||||||
|
desc: in sound_settings
|
||||||
|
eng: "Stereo"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_CHANNEL_MONO
|
||||||
|
desc: in sound_settings
|
||||||
|
eng: "Mono"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_CHANNEL_LEFT
|
||||||
|
desc: in sound_settings
|
||||||
|
eng: "Mono Left"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_CHANNEL_RIGHT
|
||||||
|
desc: in sound_settings
|
||||||
|
eng: "Mono Right"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_AUTOVOL
|
||||||
|
desc: in sound_settings
|
||||||
|
eng: "Auto Volume"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_SHOWDIR_ERROR_BUFFER
|
||||||
|
desc: in showdir(), displayed on screen when you reach buffer limit
|
||||||
|
eng: "Dir Buffer"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_SHOWDIR_ERROR_FULL
|
||||||
|
desc: in showdir(), displayed on screen when you reach buffer limit
|
||||||
|
eng: "is full!"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_RESUME_ASK
|
||||||
|
desc: question asked at the begining when resume is on
|
||||||
|
eng: "Resume?"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_RESUME_CONFIRM_PLAYER
|
||||||
|
desc: posible answers to resume question
|
||||||
|
eng: "(PLAY/STOP)"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_RESUME_CONFIRM_RECORDER
|
||||||
|
desc: posible answer to resume question
|
||||||
|
eng: "Play = Yes"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_RESUME_CANCEL_RECORDER
|
||||||
|
desc: posible answer to resume question
|
||||||
|
eng: "Any Other = No"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_KEYLOCK_ON_PLAYER
|
||||||
|
desc: displayed when key lock is on
|
||||||
|
eng: "Keylock ON"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_KEYLOCK_OFF_PLAYER
|
||||||
|
desc: displayed when key lock is turned off
|
||||||
|
eng: "Keylock OFF"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_KEYLOCK_ON_RECORDER
|
||||||
|
desc: displayed when key lock is on
|
||||||
|
eng: "Key lock is ON"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_KEYLOCK_OFF_RECORDER
|
||||||
|
desc: displayed when key lock is turned off
|
||||||
|
eng: "Key lock is OFF"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_MUTE_ON_PLAYER
|
||||||
|
desc: displayed when mute is on
|
||||||
|
eng: "Mute ON"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_MUTE_OFF_PLAYER
|
||||||
|
desc: displayed when mute is off
|
||||||
|
eng: "MUTE OFF"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_MUTE_ON_RECORDER
|
||||||
|
desc: displayed when mute is on
|
||||||
|
eng: "Mute is ON"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_MUTE_OFF_RECORDER
|
||||||
|
desc: displayed when mute is off
|
||||||
|
eng: "Mute is OFF"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_ID3_INFO
|
||||||
|
desc: in the browse_id3() function
|
||||||
|
eng: "-ID3 Info- "
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_ID3_SCREEN
|
||||||
|
desc: in the browse_id3() function
|
||||||
|
eng: "--Screen-- "
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_ID3_TITLE
|
||||||
|
desc: in wps
|
||||||
|
eng: "[Title]"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_ID3_NO_TITLE
|
||||||
|
desc: in wps when no title is avaible
|
||||||
|
eng: "<no title>"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_ID3_ARTIST
|
||||||
|
desc: in wps
|
||||||
|
eng: "[Artist]"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_ID3_NO_ARTIST
|
||||||
|
desc: in wps when no artist is avaible
|
||||||
|
eng: "<no artist>"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_ID3_ALBUM
|
||||||
|
desc: in wps
|
||||||
|
eng: "[Album]"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_ID3_NO_ALBUM
|
||||||
|
desc: in wps when no album is avaible
|
||||||
|
eng: "<no album>"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_ID3_TRACKNUM
|
||||||
|
desc: in wps
|
||||||
|
eng: "[Tracknum]"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_ID3_NO_TRACKNUM
|
||||||
|
desc: in wps if no track number is avaible
|
||||||
|
eng: "<no tracknum>"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_ID3_LENGHT
|
||||||
|
desc: in wps
|
||||||
|
eng: "[Length]"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_ID3_PLAYLIST
|
||||||
|
desc: in wps
|
||||||
|
eng: "[Playlist]"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_ID3_BITRATE
|
||||||
|
desc: in wps
|
||||||
|
eng: "[Bitrate]"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_ID3_FRECUENCY
|
||||||
|
desc: in wps
|
||||||
|
eng: "[Frecuency]"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_ID3_PATH
|
||||||
|
desc: in wps
|
||||||
|
eng: "[PATH]"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_PITCH_UP
|
||||||
|
desc: in wps
|
||||||
|
eng: "Pitch up"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_PITCH_DOWN
|
||||||
|
desc: in wps
|
||||||
|
eng: "Pitch down"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_PAUSE
|
||||||
|
desc: in wps
|
||||||
|
eng: "Pause"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_F2_MODE
|
||||||
|
desc: in wps F2 pressed
|
||||||
|
eng: "mode:"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_DIR_FILTER
|
||||||
|
desc: in wps F2 pressed
|
||||||
|
eng: "Dir filter: %s"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_F3_STATUS
|
||||||
|
desc: in wps F3 pressed
|
||||||
|
eng: "Status"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_F3_SCROLL
|
||||||
|
desc: in wps F3 pressed
|
||||||
|
eng: "Scroll"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_F3_BAR
|
||||||
|
desc: in wps F3 pressed
|
||||||
|
eng: "bar"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_END_PLAYLIST_PLAYER
|
||||||
|
desc: when playlist has finished
|
||||||
|
eng: "End of list"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_END_CONFIRM_PLAYER
|
||||||
|
desc: when playlist has finished
|
||||||
|
eng: "<Press ON>"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_END_PLAYLIST_RECORDER
|
||||||
|
desc: when playlist has finished
|
||||||
|
eng: "<End of song list>"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_END_CONFIRM_RECORDER
|
||||||
|
desc: when playlist has finished
|
||||||
|
eng: "Press ON"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_SNAKE_SCORE
|
||||||
|
desc: when you die in snake game
|
||||||
|
eng: "Your score :"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_SNAKE_HISCORE
|
||||||
|
desc: high score in snake game
|
||||||
|
eng: "High Score: %d"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_SNAKE_HISCORE_NEW
|
||||||
|
desc: new high score in snake game
|
||||||
|
eng: "New High Score!"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_SNAKE_PAUSE
|
||||||
|
desc: displayed when game is paused
|
||||||
|
eng: "Game Paused"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_SNAKE_RESUME
|
||||||
|
desc: what to do to resume game
|
||||||
|
eng: "[Play] to resume"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_SNAKE_QUIT
|
||||||
|
desc: how to quit game
|
||||||
|
eng: "[Off] to quit"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_SNAKE_LEVEL
|
||||||
|
desc: level of difficulty
|
||||||
|
eng: "Level - %d"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_SNAKE_RANGE
|
||||||
|
desc: range of levels
|
||||||
|
eng: "(1 - slow, 9 - fast)"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_SNAKE_START
|
||||||
|
desc: how to start or pause the game
|
||||||
|
eng: "[Play] to start/pause"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_SOKOBAN_LEVEL
|
||||||
|
desc: must be smaller than 6 characters
|
||||||
|
eng: "Level"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_SOKOBAN_MOVE
|
||||||
|
desc: must be smaller than 6 characters
|
||||||
|
eng: "Moves"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_SOKOBAN_WIN
|
||||||
|
desc: displayed when you win
|
||||||
|
eng: "YOU WIN!!"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_SOKOBAN_QUIT
|
||||||
|
desc: how to quit game
|
||||||
|
eng: "[Off] to stop"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_SOKOBAN_F1
|
||||||
|
desc: what does F1 do
|
||||||
|
eng: "[F1] - level"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_SOKOBAN_F2
|
||||||
|
desc: what does F2 do
|
||||||
|
eng: "[F2] same level"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_SOKOBAN_F3
|
||||||
|
desc: what does F3 do
|
||||||
|
eng: "[F3] + level"
|
||||||
|
new:
|
||||||
|
|
||||||
|
# Next ids are for Worlmet Game.
|
||||||
|
# Lenght restrictions for score board strings (LANG_SB_XXX):
|
||||||
|
# LCD_PROPFONTS: max 43 pixel
|
||||||
|
# fix font: max 7 characters
|
||||||
|
|
||||||
|
id: LANG_WORMLET_LENGTH
|
||||||
|
desc: wormlet game
|
||||||
|
eng: "Len:%d"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_WORMLET_GROWING
|
||||||
|
desc: wormlet game
|
||||||
|
eng: "Growing"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_WORMLET_HUNGRY
|
||||||
|
desc: wormlet game
|
||||||
|
eng: "Hungry"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_WORMLET_WORMED
|
||||||
|
desc: wormlet game
|
||||||
|
eng: "Wormed"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_WORMLET_ARGH
|
||||||
|
desc: wormlet game
|
||||||
|
eng: "Argh"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_WORMLET_CRASHED
|
||||||
|
desc: wormlet game
|
||||||
|
eng: "Crashed"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_WORMLET_HIGHSCORE
|
||||||
|
desc: wormlet game
|
||||||
|
eng: "Hs: %d"
|
||||||
|
new:
|
||||||
|
|
||||||
|
# Length restrictions for wormlet config screen strings (LANG_CS_XXX)
|
||||||
|
# They must fit on the entire screen - preferably with the
|
||||||
|
# key names aligned right
|
||||||
|
|
||||||
|
id: LANG_WORMLET_PLAYERS
|
||||||
|
desc: wormlet game
|
||||||
|
eng: "%d Players up/dn"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_WORMLET_WORMS
|
||||||
|
desc: wormlet game
|
||||||
|
eng: "%d Worms l/r"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_WORMLET_REMOTE_CTRL
|
||||||
|
desc: wormlet game
|
||||||
|
eng: "Remote control F1"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_WORMLET_NO_REM_CTRL
|
||||||
|
desc: wormlet game
|
||||||
|
eng: "No rem. control F1"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_WORMLET_2_KEY_CTRL
|
||||||
|
desc: wormlet game
|
||||||
|
eng: "2 key control F1"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_WORMLET_4_KEY_CTRL
|
||||||
|
desc: wormlet game
|
||||||
|
eng: "4 key control F1"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_WORMLET_NO_CONTROL
|
||||||
|
desc: wormlet game
|
||||||
|
eng: "Out of control"
|
||||||
|
new:
|
||||||
|
|
||||||
|
# Wormlet game ids ended
|
||||||
|
|
||||||
|
id: LANG_TETRIS_LOSE
|
||||||
|
desc: tetris game
|
||||||
|
eng: "You lose!"
|
||||||
|
new:
|
||||||
|
|
||||||
|
id: LANG_TETRIS_LEVEL
|
||||||
|
desc: tetris game
|
||||||
|
eng: "0 Rows - Level 0"
|
||||||
|
new:
|
||||||
|
|
|
@ -172,19 +172,19 @@ Menu show_info(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_LCD_CHARCELLS
|
#ifdef HAVE_LCD_CHARCELLS
|
||||||
snprintf(s, sizeof(s), "Batt: %d%%%s",
|
snprintf(s, sizeof(s), str(LANG_BATTERY_LEVEL_PLAYER),
|
||||||
battery_level(), battery_level_safe() ? "" : "!");
|
battery_level(), battery_level_safe() ? "" : "!");
|
||||||
lcd_puts(0, 1, s);
|
lcd_puts(0, 1, s);
|
||||||
#else
|
#else
|
||||||
#ifdef HAVE_CHARGE_CTRL
|
#ifdef HAVE_CHARGE_CTRL
|
||||||
if (charger_enabled)
|
if (charger_enabled)
|
||||||
snprintf(s, sizeof(s), "Battery: charging");
|
snprintf(s, sizeof(s), str(LANG_BATTERY_CHARGE));
|
||||||
else
|
else
|
||||||
snprintf(s, sizeof(s), "Battery: %d%%%s",
|
snprintf(s, sizeof(s), str(LANG_BATTERY_LEVEL_RECORDER),
|
||||||
battery_level(), battery_level_safe() ? "" : " !!");
|
battery_level(), battery_level_safe() ? "" : " !!");
|
||||||
lcd_puts(0, 3, s);
|
lcd_puts(0, 3, s);
|
||||||
#else
|
#else
|
||||||
snprintf(s, sizeof(s), "Battery: %d%%%s",
|
snprintf(s, sizeof(s), str(LANG_BATTERY_LEVEL_RECORDER),
|
||||||
battery_level(), battery_level_safe() ? "" : " !!");
|
battery_level(), battery_level_safe() ? "" : " !!");
|
||||||
lcd_puts(0, 3, s);
|
lcd_puts(0, 3, s);
|
||||||
#endif
|
#endif
|
||||||
|
@ -224,7 +224,7 @@ Menu main_menu(void)
|
||||||
#ifndef SIMULATOR
|
#ifndef SIMULATOR
|
||||||
{ str(LANG_DEBUG), debug_menu },
|
{ str(LANG_DEBUG), debug_menu },
|
||||||
#else
|
#else
|
||||||
{ "USB (sim)", simulate_usb },
|
{ str(LANG_USB), simulate_usb },
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,8 @@
|
||||||
#include "widgets.h"
|
#include "widgets.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "lang.h"
|
||||||
|
|
||||||
struct playlist_info playlist;
|
struct playlist_info playlist;
|
||||||
|
|
||||||
#define PLAYLIST_BUFFER_SIZE (AVERAGE_FILENAME_LENGTH*MAX_FILES_IN_DIR)
|
#define PLAYLIST_BUFFER_SIZE (AVERAGE_FILENAME_LENGTH*MAX_FILES_IN_DIR)
|
||||||
|
@ -209,7 +211,7 @@ int play_list(char *dir, /* "current directory" */
|
||||||
/* If file is NULL, the list is in RAM */
|
/* If file is NULL, the list is in RAM */
|
||||||
if(file) {
|
if(file) {
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
lcd_puts(0,0,"Loading...");
|
lcd_puts(0,0,str(LANG_PLAYLIST_LOAD));
|
||||||
status_draw();
|
status_draw();
|
||||||
lcd_update();
|
lcd_update();
|
||||||
playlist.in_ram = false;
|
playlist.in_ram = false;
|
||||||
|
@ -273,7 +275,7 @@ int play_list(char *dir, /* "current directory" */
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!playlist.in_ram) {
|
if(!playlist.in_ram) {
|
||||||
lcd_puts(0,0,"Playing... ");
|
lcd_puts(0,0,str(LANG_PLAYLIST_PLAY));
|
||||||
status_draw();
|
status_draw();
|
||||||
lcd_update();
|
lcd_update();
|
||||||
}
|
}
|
||||||
|
@ -350,8 +352,8 @@ void add_indices_to_playlist(void)
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
lcd_puts(0,0,"Playlist");
|
lcd_puts(0,0,str(LANG_PLAYINDICES_PLAYLIST));
|
||||||
lcd_puts(0,1,"buffer full");
|
lcd_puts(0,1,str(LANG_PLAYINDICES_BUFFER));
|
||||||
lcd_update();
|
lcd_update();
|
||||||
sleep(HZ*2);
|
sleep(HZ*2);
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
|
@ -363,7 +365,8 @@ void add_indices_to_playlist(void)
|
||||||
if(!playlist.in_ram) {
|
if(!playlist.in_ram) {
|
||||||
if ( current_tick >= next_tick ) {
|
if ( current_tick >= next_tick ) {
|
||||||
next_tick = current_tick + HZ;
|
next_tick = current_tick + HZ;
|
||||||
snprintf(line, sizeof line, "%d files",
|
snprintf(line, sizeof line,
|
||||||
|
str(LANG_PLAYINDICES_AMOUNT),
|
||||||
playlist.amount);
|
playlist.amount);
|
||||||
lcd_puts(0,1,line);
|
lcd_puts(0,1,line);
|
||||||
status_draw();
|
status_draw();
|
||||||
|
@ -380,7 +383,8 @@ void add_indices_to_playlist(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(!playlist.in_ram) {
|
if(!playlist.in_ram) {
|
||||||
snprintf(line, sizeof line, "%d files", playlist.amount);
|
snprintf(line, sizeof line, str(LANG_PLAYINDICES_AMOUNT),
|
||||||
|
playlist.amount);
|
||||||
lcd_puts(0,1,line);
|
lcd_puts(0,1,line);
|
||||||
status_draw();
|
status_draw();
|
||||||
lcd_update();
|
lcd_update();
|
||||||
|
|
|
@ -20,7 +20,7 @@ dir is the current direction of the snake - 0=up, 1=right, 2=down, 3=left;
|
||||||
#include "button.h"
|
#include "button.h"
|
||||||
#include "kernel.h"
|
#include "kernel.h"
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
|
#include "lang.h"
|
||||||
|
|
||||||
int board[28][16],snakelength;
|
int board[28][16],snakelength;
|
||||||
unsigned int score,hiscore=0;
|
unsigned int score,hiscore=0;
|
||||||
|
@ -35,14 +35,14 @@ void die (void) {
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
snprintf(pscore,sizeof(pscore),"%d",score);
|
snprintf(pscore,sizeof(pscore),"%d",score);
|
||||||
lcd_putsxy(3,12,"oops...",0);
|
lcd_putsxy(3,12,"oops...",0);
|
||||||
lcd_putsxy(3,22,"Your Score :",0);
|
lcd_putsxy(3,22,str(LANG_SNAKE_SCORE),0);
|
||||||
lcd_putsxy(3,32, pscore,0);
|
lcd_putsxy(3,32, pscore,0);
|
||||||
if (score>hiscore) {
|
if (score>hiscore) {
|
||||||
hiscore=score;
|
hiscore=score;
|
||||||
lcd_putsxy(3,42,"New High Score!",0);
|
lcd_putsxy(3,42,str(LANG_SNAKE_HISCORE_NEW),0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
snprintf(hscore,sizeof(hscore),"High Score %d",hiscore);
|
snprintf(hscore,sizeof(hscore),str(LANG_SNAKE_HISCORE),hiscore);
|
||||||
lcd_putsxy(3,42,hscore,0);
|
lcd_putsxy(3,42,hscore,0);
|
||||||
}
|
}
|
||||||
lcd_update();
|
lcd_update();
|
||||||
|
@ -141,9 +141,9 @@ void redraw (void) {
|
||||||
|
|
||||||
void game_pause (void) {
|
void game_pause (void) {
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
lcd_putsxy(3,12,"Game Paused",0);
|
lcd_putsxy(3,12,str(LANG_SNAKE_PAUSE),0);
|
||||||
lcd_putsxy(3,22,"[play] to resume",0);
|
lcd_putsxy(3,22,str(LANG_SNAKE_RESUME),0);
|
||||||
lcd_putsxy(3,32,"[off] to quit",0);
|
lcd_putsxy(3,32,str(LANG_SNAKE_QUIT),0);
|
||||||
lcd_update();
|
lcd_update();
|
||||||
while (1) {
|
while (1) {
|
||||||
switch (button_get(true)) {
|
switch (button_get(true)) {
|
||||||
|
@ -221,12 +221,12 @@ void game_init(void) {
|
||||||
|
|
||||||
|
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
snprintf(plevel,sizeof(plevel),"Level - %d",level);
|
snprintf(plevel,sizeof(plevel),str(LANG_SNAKE_LEVEL),level);
|
||||||
snprintf(phscore,sizeof(phscore),"High Score - %d",hiscore);
|
snprintf(phscore,sizeof(phscore),str(LANG_SNAKE_HISCORE),hiscore);
|
||||||
lcd_putsxy(3,2, plevel,0);
|
lcd_putsxy(3,2, plevel,0);
|
||||||
lcd_putsxy(3,12, "(1 - slow, 9 - fast)",0);
|
lcd_putsxy(3,12, str(LANG_SNAKE_RANGE),0);
|
||||||
lcd_putsxy(3,22, "[off] to quit",0);
|
lcd_putsxy(3,22, str(LANG_SNAKE_QUIT),0);
|
||||||
lcd_putsxy(3,32, "[play] to start/pause",0);
|
lcd_putsxy(3,32, str(LANG_SNAKE_START),0);
|
||||||
lcd_putsxy(3,42, phscore,0);
|
lcd_putsxy(3,42, phscore,0);
|
||||||
lcd_update();
|
lcd_update();
|
||||||
|
|
||||||
|
@ -250,7 +250,7 @@ void game_init(void) {
|
||||||
return;
|
return;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
snprintf(plevel,sizeof(plevel),"Level - %d",level);
|
snprintf(plevel,sizeof(plevel),str(LANG_SNAKE_LEVEL),level);
|
||||||
lcd_putsxy(3,2, plevel,0);
|
lcd_putsxy(3,2, plevel,0);
|
||||||
lcd_update();
|
lcd_update();
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#endif
|
#endif
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include "lang.h"
|
||||||
#define SOKOBAN_TITLE "Sokoban"
|
#define SOKOBAN_TITLE "Sokoban"
|
||||||
#define SOKOBAN_TITLE_FONT 2
|
#define SOKOBAN_TITLE_FONT 2
|
||||||
#define NUM_LEVELS sizeof(levels)/320
|
#define NUM_LEVELS sizeof(levels)/320
|
||||||
|
@ -1847,8 +1847,8 @@ void update_screen(void) {
|
||||||
|
|
||||||
lcd_drawrect (80,0,32,32);
|
lcd_drawrect (80,0,32,32);
|
||||||
lcd_drawrect (80,32,32,64);
|
lcd_drawrect (80,32,32,64);
|
||||||
lcd_putsxy (81, 10, "Level", 0);
|
lcd_putsxy (81, 10, str(LANG_SOKOBAN_LEVEL), 0);
|
||||||
lcd_putsxy (81, 42, "Moves", 0);
|
lcd_putsxy (81, 42, str(LANG_SOKOBAN_MOVE), 0);
|
||||||
/* print out the screen */
|
/* print out the screen */
|
||||||
lcd_update();
|
lcd_update();
|
||||||
}
|
}
|
||||||
|
@ -2187,7 +2187,7 @@ void sokoban_loop(void) {
|
||||||
if (current_level == NUM_LEVELS) {
|
if (current_level == NUM_LEVELS) {
|
||||||
for(ii=0; ii<30 ; ii++) {
|
for(ii=0; ii<30 ; ii++) {
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
lcd_putsxy(10, 20, "YOU WIN!!", 2);
|
lcd_putsxy(10, 20, str(LANG_SOKOBAN_WIN), 2);
|
||||||
lcd_update();
|
lcd_update();
|
||||||
lcd_invertrect(0,0,111,63);
|
lcd_invertrect(0,0,111,63);
|
||||||
lcd_update();
|
lcd_update();
|
||||||
|
@ -2232,10 +2232,10 @@ Menu sokoban(void)
|
||||||
|
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
|
|
||||||
lcd_putsxy( 3,12, "[Off] to stop", 0);
|
lcd_putsxy( 3,12, str(LANG_SOKOBAN_QUIT), 0);
|
||||||
lcd_putsxy( 3,22, "[F1] - level",0);
|
lcd_putsxy( 3,22, str(LANG_SOKOBAN_F1),0);
|
||||||
lcd_putsxy( 3,32, "[F2] same level",0);
|
lcd_putsxy( 3,32, str(LANG_SOKOBAN_F2),0);
|
||||||
lcd_putsxy( 3,42, "[F3] + level",0);
|
lcd_putsxy( 3,42, str(LANG_SOKOBAN_F3),0);
|
||||||
|
|
||||||
lcd_update();
|
lcd_update();
|
||||||
sleep(HZ*2);
|
sleep(HZ*2);
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#endif
|
#endif
|
||||||
#include "sprintf.h"
|
#include "sprintf.h"
|
||||||
|
#include "lang.h"
|
||||||
#define TETRIS_TITLE "Tetris!"
|
#define TETRIS_TITLE "Tetris!"
|
||||||
#define TETRIS_TITLE_FONT 1
|
#define TETRIS_TITLE_FONT 1
|
||||||
#define TETRIS_TITLE_XLOC 43
|
#define TETRIS_TITLE_XLOC 43
|
||||||
|
@ -366,7 +366,7 @@ void game_loop(void)
|
||||||
if(gameover())
|
if(gameover())
|
||||||
{
|
{
|
||||||
lcd_clearrect(0, 52, LCD_WIDTH, LCD_HEIGHT - 52);
|
lcd_clearrect(0, 52, LCD_WIDTH, LCD_HEIGHT - 52);
|
||||||
lcd_putsxy (2, 52, "You lose!", 0);
|
lcd_putsxy (2, 52, str(LANG_TETRIS_LOSE), 0);
|
||||||
lcd_update();
|
lcd_update();
|
||||||
sleep(HZ * 3);
|
sleep(HZ * 3);
|
||||||
return;
|
return;
|
||||||
|
@ -396,7 +396,7 @@ Menu tetris(void)
|
||||||
init_tetris();
|
init_tetris();
|
||||||
|
|
||||||
draw_frame(start_x, start_x + max_x - 1, start_y - 1, start_y + max_y);
|
draw_frame(start_x, start_x + max_x - 1, start_y - 1, start_y + max_y);
|
||||||
lcd_putsxy (2, 42, "0 Rows - Level 0", 0);
|
lcd_putsxy (2, 42, str(LANG_TETRIS_LEVEL), 0);
|
||||||
lcd_update();
|
lcd_update();
|
||||||
|
|
||||||
next_b = t_rand(blocks);
|
next_b = t_rand(blocks);
|
||||||
|
|
|
@ -33,36 +33,7 @@
|
||||||
#include "kernel.h"
|
#include "kernel.h"
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
#include "rtc.h"
|
#include "rtc.h"
|
||||||
|
#include "lang.h"
|
||||||
/* I extracted string constants for output to
|
|
||||||
simplify inernationalization - once we have
|
|
||||||
decided how to do that exactly. Even though
|
|
||||||
there are other strings in the code they don't
|
|
||||||
have to be internationalized because they are
|
|
||||||
only for debugging purposes and are only included
|
|
||||||
if DEBUG_WORMLET is defined anyway.*/
|
|
||||||
|
|
||||||
/* Length restriction for score board strings (LANG_SB_XXX):
|
|
||||||
LCD_PROPFONTS: max 43 pixel
|
|
||||||
fix font: max 7 characters*/
|
|
||||||
#define LANG_SB_LENGTH "Len:%d"
|
|
||||||
#define LANG_SB_GROWING "Growing"
|
|
||||||
#define LANG_SB_HUNGRY "Hungry"
|
|
||||||
#define LANG_SB_WORMED "Wormed"
|
|
||||||
#define LANG_SB_ARGH "Argh"
|
|
||||||
#define LANG_SB_CRASHED "Crashed"
|
|
||||||
#define LANG_SB_HIGHSCORE "Hs: %d"
|
|
||||||
|
|
||||||
/* Length restriction for config screen strings (LANG_CS_XXX):
|
|
||||||
The must fit on the entire screen - preferably
|
|
||||||
with the key names aligned right. */
|
|
||||||
#define LANG_CS_PLAYERS "%d Players up/dn"
|
|
||||||
#define LANG_CS_WORMS "%d Worms l/r"
|
|
||||||
#define LANG_CS_REMOTE_CTRL "Remote control F1"
|
|
||||||
#define LANG_CS_NO_REM_CTRL "No rem. control F1"
|
|
||||||
#define LANG_CS_2_KEY_CTRL "2 key control F1"
|
|
||||||
#define LANG_CS_4_KEY_CTRL "4 key control F1"
|
|
||||||
#define LANG_CS_NO_CONTROL "Out of control"
|
|
||||||
|
|
||||||
/* size of the field the worm lives in */
|
/* size of the field the worm lives in */
|
||||||
#define FIELD_RECT_X 1
|
#define FIELD_RECT_X 1
|
||||||
|
@ -1208,37 +1179,37 @@ static void score_board(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* length */
|
/* length */
|
||||||
snprintf(buf, sizeof (buf), LANG_SB_LENGTH, score);
|
snprintf(buf, sizeof (buf),str(LANG_WORMLET_LENGTH), score);
|
||||||
|
|
||||||
/* worm state */
|
/* worm state */
|
||||||
switch (check_collision(&worms[i])) {
|
switch (check_collision(&worms[i])) {
|
||||||
case COLLISION_NONE:
|
case COLLISION_NONE:
|
||||||
if (worms[i].growing > 0){
|
if (worms[i].growing > 0){
|
||||||
snprintf(buf2, sizeof(buf2), LANG_SB_GROWING);
|
snprintf(buf2, sizeof(buf2), str(LANG_WORMLET_GROWING));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (worms[i].alive) {
|
if (worms[i].alive) {
|
||||||
snprintf(buf2, sizeof(buf2), LANG_SB_HUNGRY);
|
snprintf(buf2, sizeof(buf2), str(LANG_WORMLET_HUNGRY));
|
||||||
} else {
|
} else {
|
||||||
snprintf(buf2, sizeof(buf2), LANG_SB_WORMED);
|
snprintf(buf2, sizeof(buf2), str(LANG_WORMLET_WORMED));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case COLLISION_WORM:
|
case COLLISION_WORM:
|
||||||
snprintf(buf2, sizeof(buf2), LANG_SB_WORMED);
|
snprintf(buf2, sizeof(buf2), str(LANG_WORMLET_WORMED));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case COLLISION_FOOD:
|
case COLLISION_FOOD:
|
||||||
snprintf(buf2, sizeof(buf2), LANG_SB_GROWING);
|
snprintf(buf2, sizeof(buf2), str(LANG_WORMLET_GROWING));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case COLLISION_ARGH:
|
case COLLISION_ARGH:
|
||||||
snprintf(buf2, sizeof(buf2), LANG_SB_ARGH);
|
snprintf(buf2, sizeof(buf2), str(LANG_WORMLET_ARGH));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case COLLISION_FIELD:
|
case COLLISION_FIELD:
|
||||||
snprintf(buf2, sizeof(buf2), LANG_SB_CRASHED);
|
snprintf(buf2, sizeof(buf2), str(LANG_WORMLET_CRASHED));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
lcd_putsxy(FIELD_RECT_WIDTH + 3, y , buf, 0);
|
lcd_putsxy(FIELD_RECT_WIDTH + 3, y , buf, 0);
|
||||||
|
@ -1250,7 +1221,7 @@ static void score_board(void)
|
||||||
}
|
}
|
||||||
y += 19;
|
y += 19;
|
||||||
}
|
}
|
||||||
snprintf(buf , sizeof(buf), LANG_SB_HIGHSCORE, highscore);
|
snprintf(buf , sizeof(buf), str(LANG_WORMLET_HIGHSCORE), highscore);
|
||||||
#ifndef DEBUG_WORMLET
|
#ifndef DEBUG_WORMLET
|
||||||
lcd_putsxy(FIELD_RECT_WIDTH + 3, LCD_HEIGHT - 8, buf, 0);
|
lcd_putsxy(FIELD_RECT_WIDTH + 3, LCD_HEIGHT - 8, buf, 0);
|
||||||
#else
|
#else
|
||||||
|
@ -1937,29 +1908,29 @@ Menu wormlet(void)
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
|
|
||||||
/* first line players */
|
/* first line players */
|
||||||
snprintf(buf, sizeof buf, LANG_CS_PLAYERS, players);
|
snprintf(buf, sizeof buf, str(LANG_WORMLET_PLAYERS), players);
|
||||||
lcd_puts(0, 0, buf);
|
lcd_puts(0, 0, buf);
|
||||||
|
|
||||||
/* second line worms */
|
/* second line worms */
|
||||||
snprintf(buf, sizeof buf, LANG_CS_WORMS, worm_count);
|
snprintf(buf, sizeof buf, str(LANG_WORMLET_WORMS), worm_count);
|
||||||
lcd_puts(0, 1, buf);
|
lcd_puts(0, 1, buf);
|
||||||
|
|
||||||
/* third line control */
|
/* third line control */
|
||||||
if (players > 1) {
|
if (players > 1) {
|
||||||
if (use_remote) {
|
if (use_remote) {
|
||||||
snprintf(buf, sizeof buf, LANG_CS_REMOTE_CTRL);
|
snprintf(buf, sizeof buf, str(LANG_WORMLET_REMOTE_CTRL));
|
||||||
} else {
|
} else {
|
||||||
snprintf(buf, sizeof buf, LANG_CS_NO_REM_CTRL);
|
snprintf(buf, sizeof buf, str(LANG_WORMLET_NO_REM_CTRL));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (players > 0) {
|
if (players > 0) {
|
||||||
if (use_remote) {
|
if (use_remote) {
|
||||||
snprintf(buf, sizeof buf, LANG_CS_2_KEY_CTRL);
|
snprintf(buf, sizeof buf, str(LANG_WORMLET_2_KEY_CTRL));
|
||||||
} else {
|
} else {
|
||||||
snprintf(buf, sizeof buf, LANG_CS_4_KEY_CTRL);
|
snprintf(buf, sizeof buf, str(LANG_WORMLET_4_KEY_CTRL));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
snprintf(buf, sizeof buf, LANG_CS_NO_CONTROL);
|
snprintf(buf, sizeof buf, str(LANG_WORMLET_NO_CONTROL));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lcd_puts(0, 2, buf);
|
lcd_puts(0, 2, buf);
|
||||||
|
|
|
@ -43,6 +43,8 @@
|
||||||
#include "font.h"
|
#include "font.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "lang.h"
|
||||||
|
|
||||||
struct user_settings global_settings;
|
struct user_settings global_settings;
|
||||||
char rockboxdir[] = ROCKBOX_DIR; /* config/font/data file directory */
|
char rockboxdir[] = ROCKBOX_DIR; /* config/font/data file directory */
|
||||||
|
|
||||||
|
@ -304,11 +306,11 @@ int settings_save( void )
|
||||||
{
|
{
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
#ifdef HAVE_LCD_CHARCELLS
|
#ifdef HAVE_LCD_CHARCELLS
|
||||||
lcd_puts(0, 0, "Save failed");
|
lcd_puts(0, 0, str(LANG_SETTINGS_SAVE_PLAYER));
|
||||||
lcd_puts(0, 1, "Batt. low?");
|
lcd_puts(0, 1, str(LANG_SETTINGS_BATTERY_PLAYER));
|
||||||
#else
|
#else
|
||||||
lcd_puts(4, 2, "Save failed");
|
lcd_puts(4, 2, str(LANG_SETTINGS_SAVE_RECORDER));
|
||||||
lcd_puts(2, 4, "Is battery low?");
|
lcd_puts(2, 4, str(LANG_SETTINGS_BATTERY_RECORDER));
|
||||||
lcd_update();
|
lcd_update();
|
||||||
#endif
|
#endif
|
||||||
sleep(HZ*2);
|
sleep(HZ*2);
|
||||||
|
@ -944,8 +946,8 @@ void set_time(char* string, int timedate[])
|
||||||
cursor[cursorpos][INDEX_WIDTH],
|
cursor[cursorpos][INDEX_WIDTH],
|
||||||
line_height);
|
line_height);
|
||||||
|
|
||||||
lcd_puts(0, 4, "ON to set");
|
lcd_puts(0, 4, str(LANG_TIME_SET));
|
||||||
lcd_puts(0, 5, "OFF to revert");
|
lcd_puts(0, 5, str(LANG_TIME_REVERT));
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
status_draw();
|
status_draw();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -36,17 +36,18 @@
|
||||||
#include "powermgmt.h"
|
#include "powermgmt.h"
|
||||||
#include "rtc.h"
|
#include "rtc.h"
|
||||||
#include "ata.h"
|
#include "ata.h"
|
||||||
|
#include "lang.h"
|
||||||
|
|
||||||
static Menu show_hidden_files(void)
|
static Menu show_hidden_files(void)
|
||||||
{
|
{
|
||||||
set_bool_options( "Hidden Files", &global_settings.show_hidden_files,
|
set_bool_options( str(LANG_HIDDEN), &global_settings.show_hidden_files,
|
||||||
"show", "hide" );
|
str(LANG_HIDDEN_SHOW), str(LANG_HIDDEN_HIDE) );
|
||||||
return MENU_OK;
|
return MENU_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Menu contrast(void)
|
static Menu contrast(void)
|
||||||
{
|
{
|
||||||
set_int( "Contrast", "", &global_settings.contrast,
|
set_int( str(LANG_CONTRAST), "", &global_settings.contrast,
|
||||||
lcd_set_contrast, 1, 0, MAX_CONTRAST_SETTING );
|
lcd_set_contrast, 1, 0, MAX_CONTRAST_SETTING );
|
||||||
return MENU_OK;
|
return MENU_OK;
|
||||||
}
|
}
|
||||||
|
@ -54,50 +55,53 @@ static Menu contrast(void)
|
||||||
#ifndef HAVE_RECORDER_KEYPAD
|
#ifndef HAVE_RECORDER_KEYPAD
|
||||||
static Menu shuffle(void)
|
static Menu shuffle(void)
|
||||||
{
|
{
|
||||||
set_bool( "Shuffle", &global_settings.playlist_shuffle );
|
set_bool( str(LANG_SHUFFLE), &global_settings.playlist_shuffle );
|
||||||
return MENU_OK;
|
return MENU_OK;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static Menu play_selected(void)
|
static Menu play_selected(void)
|
||||||
{
|
{
|
||||||
set_bool( "Play Selected", &global_settings.play_selected );
|
set_bool( str(LANG_PLAY_SELECTED), &global_settings.play_selected );
|
||||||
return MENU_OK;
|
return MENU_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Menu mp3_filter(void)
|
static Menu mp3_filter(void)
|
||||||
{
|
{
|
||||||
set_bool( "Music Filter", &global_settings.mp3filter );
|
set_bool( str(LANG_MP3FILTER), &global_settings.mp3filter );
|
||||||
return MENU_OK;
|
return MENU_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Menu sort_case(void)
|
static Menu sort_case(void)
|
||||||
{
|
{
|
||||||
set_bool( "Sort Case Sensitive", &global_settings.sort_case );
|
set_bool( str(LANG_SORT_CASE), &global_settings.sort_case );
|
||||||
return MENU_OK;
|
return MENU_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Menu resume(void)
|
static Menu resume(void)
|
||||||
{
|
{
|
||||||
char* names[] = { "off", "ask", "on" };
|
char* names[] = { str(LANG_OFF),
|
||||||
set_option( "Resume", &global_settings.resume, names, 3, NULL );
|
str(LANG_RESUME_SETTING_ASK),
|
||||||
|
str(LANG_ON) };
|
||||||
|
set_option( str(LANG_RESUME), &global_settings.resume, names, 3, NULL );
|
||||||
return MENU_OK;
|
return MENU_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Menu backlight_timer(void)
|
static Menu backlight_timer(void)
|
||||||
{
|
{
|
||||||
char* names[] = { "off", "on ",
|
char* names[] = { str(LANG_OFF), str(LANG_ON),
|
||||||
"1s ", "2s ", "3s ", "4s ", "5s ",
|
"1s ", "2s ", "3s ", "4s ", "5s ",
|
||||||
"6s ", "7s ", "8s ", "9s ", "10s",
|
"6s ", "7s ", "8s ", "9s ", "10s",
|
||||||
"15s", "20s", "25s", "30s", "45s",
|
"15s", "20s", "25s", "30s", "45s",
|
||||||
"60s", "90s"};
|
"60s", "90s"};
|
||||||
set_option("Backlight", &global_settings.backlight, names, 19, backlight_time );
|
set_option(str(LANG_BACKLIGHT), &global_settings.backlight, names, 19,
|
||||||
|
backlight_time );
|
||||||
return MENU_OK;
|
return MENU_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Menu scroll_speed(void)
|
static Menu scroll_speed(void)
|
||||||
{
|
{
|
||||||
set_int("Scroll Speed Setting Example", "", &global_settings.scroll_speed,
|
set_int(str(LANG_SCROLL), "", &global_settings.scroll_speed,
|
||||||
&lcd_scroll_speed, 1, 1, 30 );
|
&lcd_scroll_speed, 1, 1, 30 );
|
||||||
return MENU_OK;
|
return MENU_OK;
|
||||||
}
|
}
|
||||||
|
@ -105,7 +109,7 @@ static Menu scroll_speed(void)
|
||||||
#ifdef HAVE_CHARGE_CTRL
|
#ifdef HAVE_CHARGE_CTRL
|
||||||
static Menu deep_discharge(void)
|
static Menu deep_discharge(void)
|
||||||
{
|
{
|
||||||
set_bool( "Deep Discharge", &global_settings.discharge );
|
set_bool( str(LANG_DISCHARGE), &global_settings.discharge );
|
||||||
charge_restart_level = global_settings.discharge ?
|
charge_restart_level = global_settings.discharge ?
|
||||||
CHARGE_RESTART_LO : CHARGE_RESTART_HI;
|
CHARGE_RESTART_LO : CHARGE_RESTART_HI;
|
||||||
return MENU_OK;
|
return MENU_OK;
|
||||||
|
@ -139,7 +143,7 @@ static Menu timedate_set(void)
|
||||||
timedate[5] = ((timedate[5] & 0x30) >> 4) * 10 + (timedate[5] & 0x0f);
|
timedate[5] = ((timedate[5] & 0x30) >> 4) * 10 + (timedate[5] & 0x0f);
|
||||||
|
|
||||||
|
|
||||||
set_time("Set time/date",timedate);
|
set_time(str(LANG_TIME),timedate);
|
||||||
|
|
||||||
if(timedate[0] != -1) {
|
if(timedate[0] != -1) {
|
||||||
/* hour */
|
/* hour */
|
||||||
|
@ -155,14 +159,14 @@ static Menu timedate_set(void)
|
||||||
/* day */
|
/* day */
|
||||||
timedate[5] = ((timedate[5]/10) << 4 | timedate[5]%10) & 0x3f;
|
timedate[5] = ((timedate[5]/10) << 4 | timedate[5]%10) & 0x3f;
|
||||||
|
|
||||||
rtc_write(0x03, timedate[0] | (rtc_read(0x03) & 0xc0)); /* hour */
|
rtc_write(0x03, timedate[0] | (rtc_read(0x03) & 0xc0)); /* hour */
|
||||||
rtc_write(0x02, timedate[1] | (rtc_read(0x02) & 0x80)); /* minute */
|
rtc_write(0x02, timedate[1] | (rtc_read(0x02) & 0x80)); /* minute */
|
||||||
rtc_write(0x01, timedate[2] | (rtc_read(0x01) & 0x80)); /* second */
|
rtc_write(0x01, timedate[2] | (rtc_read(0x01) & 0x80)); /* second */
|
||||||
rtc_write(0x07, timedate[3]); /* year */
|
rtc_write(0x07, timedate[3]); /* year */
|
||||||
rtc_write(0x06, timedate[4] | (rtc_read(0x06) & 0xe0)); /* month */
|
rtc_write(0x06, timedate[4] | (rtc_read(0x06) & 0xe0)); /* month */
|
||||||
rtc_write(0x05, timedate[5] | (rtc_read(0x05) & 0xc0)); /* day */
|
rtc_write(0x05, timedate[5] | (rtc_read(0x05) & 0xc0)); /* day */
|
||||||
rtc_write(0x04, timedate[6] | (rtc_read(0x04) & 0xf8)); /* dayofweek */
|
rtc_write(0x04, timedate[6] | (rtc_read(0x04) & 0xf8)); /* dayofweek */
|
||||||
rtc_write(0x00, 0x00); /* 0.1 + 0.01 seconds */
|
rtc_write(0x00, 0x00); /* 0.1 + 0.01 seconds */
|
||||||
}
|
}
|
||||||
return MENU_OK;
|
return MENU_OK;
|
||||||
}
|
}
|
||||||
|
@ -170,7 +174,7 @@ static Menu timedate_set(void)
|
||||||
|
|
||||||
static Menu spindown(void)
|
static Menu spindown(void)
|
||||||
{
|
{
|
||||||
set_int("Disk Spindown", "s", &global_settings.disk_spindown,
|
set_int(str(LANG_SPINDOWN), "s", &global_settings.disk_spindown,
|
||||||
ata_spindown, 1, 3, 254 );
|
ata_spindown, 1, 3, 254 );
|
||||||
return MENU_OK;
|
return MENU_OK;
|
||||||
}
|
}
|
||||||
|
@ -181,25 +185,25 @@ static Menu ff_rewind_min_step(void)
|
||||||
"5s", "6s", "8s", "10s",
|
"5s", "6s", "8s", "10s",
|
||||||
"15s", "20s", "25s", "30s",
|
"15s", "20s", "25s", "30s",
|
||||||
"45s", "60s" };
|
"45s", "60s" };
|
||||||
set_option("FF/RW Min Step", &global_settings.ff_rewind_min_step,
|
set_option(str(LANG_FFRW_STEP), &global_settings.ff_rewind_min_step,
|
||||||
names, 14, NULL );
|
names, 14, NULL );
|
||||||
return MENU_OK;
|
return MENU_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Menu ff_rewind_accel(void)
|
static Menu ff_rewind_accel(void)
|
||||||
{
|
{
|
||||||
char* names[] = { "off", "2x/1s", "2x/2s", "2x/3s",
|
char* names[] = { str(LANG_OFF), "2x/1s", "2x/2s", "2x/3s",
|
||||||
"2x/4s", "2x/5s", "2x/6s", "2x/7s",
|
"2x/4s", "2x/5s", "2x/6s", "2x/7s",
|
||||||
"2x/8s", "2x/9s", "2x/10s", "2x/11s",
|
"2x/8s", "2x/9s", "2x/10s", "2x/11s",
|
||||||
"2x/12s", "2x/13s", "2x/14s", "2x/15s", };
|
"2x/12s", "2x/13s", "2x/14s", "2x/15s", };
|
||||||
set_option("FF/RW Accel", &global_settings.ff_rewind_accel,
|
set_option(str(LANG_FFRW_ACCEL), &global_settings.ff_rewind_accel,
|
||||||
names, 16, NULL );
|
names, 16, NULL );
|
||||||
return MENU_OK;
|
return MENU_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Menu browse_current(void)
|
static Menu browse_current(void)
|
||||||
{
|
{
|
||||||
set_bool( "Follow Playlist", &global_settings.browse_current );
|
set_bool( str(LANG_FOLLOW), &global_settings.browse_current );
|
||||||
return MENU_OK;
|
return MENU_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -210,13 +214,14 @@ Menu playback_settings_menu(void)
|
||||||
|
|
||||||
struct menu_items items[] = {
|
struct menu_items items[] = {
|
||||||
#ifndef HAVE_RECORDER_KEYPAD
|
#ifndef HAVE_RECORDER_KEYPAD
|
||||||
{ "Shuffle", shuffle },
|
{ str(LANG_SHUFFLE), shuffle },
|
||||||
#endif
|
#endif
|
||||||
{ "Play Selected", play_selected },
|
{ str(LANG_PLAY_SELECTED), play_selected },
|
||||||
{ "Resume", resume },
|
{ str(LANG_RESUME), resume },
|
||||||
{ "FF/RW Min Step", ff_rewind_min_step },
|
{ str(LANG_FFRW_STEP), ff_rewind_min_step },
|
||||||
{ "FF/RW Accel", ff_rewind_accel },
|
{ str(LANG_FFRW_ACCEL), ff_rewind_accel },
|
||||||
};
|
};
|
||||||
|
|
||||||
bool old_shuffle = global_settings.playlist_shuffle;
|
bool old_shuffle = global_settings.playlist_shuffle;
|
||||||
|
|
||||||
m=menu_init( items, sizeof items / sizeof(struct menu_items) );
|
m=menu_init( items, sizeof items / sizeof(struct menu_items) );
|
||||||
|
@ -243,26 +248,26 @@ static Menu reset_settings(void)
|
||||||
|
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
#ifdef HAVE_LCD_CHARCELLS
|
#ifdef HAVE_LCD_CHARCELLS
|
||||||
lcd_puts(0,0,"Really?");
|
lcd_puts(0,0,str(LANG_RESET_ASK_PLAYER));
|
||||||
lcd_puts(0,1,"Play/Stop");
|
lcd_puts(0,1,str(LANG_RESET_CONFIRM_PLAYER));
|
||||||
#else
|
#else
|
||||||
lcd_puts(0,0,"Are you sure?");
|
lcd_puts(0,0,str(LANG_RESET_ASK_RECORDER));
|
||||||
lcd_puts(0,1,"Play = Yes");
|
lcd_puts(0,1,str(LANG_RESET_CONFIRM_RECORDER));
|
||||||
lcd_puts(0,2,"Any Other = No");
|
lcd_puts(0,2,str(LANG_RESET_CANCEL_RECORDER));
|
||||||
#endif
|
#endif
|
||||||
lcd_update();
|
lcd_update();
|
||||||
button = button_get(true);
|
button = button_get(true);
|
||||||
if (button == BUTTON_PLAY) {
|
if (button == BUTTON_PLAY) {
|
||||||
settings_reset();
|
settings_reset();
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
lcd_puts(0,0,"Settings");
|
lcd_puts(0,0,str(LANG_RESET_DONE_SETTING));
|
||||||
lcd_puts(0,1,"Cleared");
|
lcd_puts(0,1,str(LANG_RESET_DONE_CLEAR));
|
||||||
lcd_update();
|
lcd_update();
|
||||||
sleep(HZ);
|
sleep(HZ);
|
||||||
return(true);
|
return(true);
|
||||||
} else {
|
} else {
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
lcd_puts(0,0,"Canceled");
|
lcd_puts(0,0,str(LANG_RESET_DONE_CANCEL));
|
||||||
lcd_update();
|
lcd_update();
|
||||||
sleep(HZ);
|
sleep(HZ);
|
||||||
return(false);
|
return(false);
|
||||||
|
@ -275,10 +280,10 @@ static Menu fileview_settings_menu(void)
|
||||||
Menu result;
|
Menu result;
|
||||||
|
|
||||||
struct menu_items items[] = {
|
struct menu_items items[] = {
|
||||||
{ "Sort Mode", sort_case },
|
{ str(LANG_CASE_MENU), sort_case },
|
||||||
{ "Music Filter", mp3_filter },
|
{ str(LANG_MP3FILTER), mp3_filter },
|
||||||
{ "Hidden Files", show_hidden_files },
|
{ str(LANG_HIDDEN), show_hidden_files },
|
||||||
{ "Follow Playlist", browse_current },
|
{ str(LANG_FOLLOW), browse_current },
|
||||||
};
|
};
|
||||||
|
|
||||||
m=menu_init( items, sizeof items / sizeof(struct menu_items) );
|
m=menu_init( items, sizeof items / sizeof(struct menu_items) );
|
||||||
|
@ -293,9 +298,9 @@ static Menu display_settings_menu(void)
|
||||||
Menu result;
|
Menu result;
|
||||||
|
|
||||||
struct menu_items items[] = {
|
struct menu_items items[] = {
|
||||||
{ "Scroll Speed", scroll_speed },
|
{ str(LANG_SCROLL_MENU), scroll_speed },
|
||||||
{ "Backlight", backlight_timer },
|
{ str(LANG_BACKLIGHT), backlight_timer },
|
||||||
{ "Contrast", contrast },
|
{ str(LANG_CONTRAST), contrast },
|
||||||
};
|
};
|
||||||
|
|
||||||
m=menu_init( items, sizeof items / sizeof(struct menu_items) );
|
m=menu_init( items, sizeof items / sizeof(struct menu_items) );
|
||||||
|
@ -310,14 +315,14 @@ static Menu system_settings_menu(void)
|
||||||
Menu result;
|
Menu result;
|
||||||
|
|
||||||
struct menu_items items[] = {
|
struct menu_items items[] = {
|
||||||
{ "Disk Spindown", spindown },
|
{ str(LANG_SPINDOWN), spindown },
|
||||||
#ifdef HAVE_CHARGE_CTRL
|
#ifdef HAVE_CHARGE_CTRL
|
||||||
{ "Deep Discharge", deep_discharge },
|
{ str(LANG_DISCHARGE), deep_discharge },
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_RTC
|
#ifdef HAVE_RTC
|
||||||
{ "Time/Date", timedate_set },
|
{ str(LANG_TIME), timedate_set },
|
||||||
#endif
|
#endif
|
||||||
{ "Reset settings", reset_settings },
|
{ str(LANG_RESET), reset_settings },
|
||||||
};
|
};
|
||||||
|
|
||||||
m=menu_init( items, sizeof items / sizeof(struct menu_items) );
|
m=menu_init( items, sizeof items / sizeof(struct menu_items) );
|
||||||
|
@ -332,10 +337,10 @@ Menu settings_menu(void)
|
||||||
Menu result;
|
Menu result;
|
||||||
|
|
||||||
struct menu_items items[] = {
|
struct menu_items items[] = {
|
||||||
{ "Playback", playback_settings_menu },
|
{ str(LANG_PLAYBACK), playback_settings_menu },
|
||||||
{ "File View", fileview_settings_menu },
|
{ str(LANG_FILE), fileview_settings_menu },
|
||||||
{ "Display", display_settings_menu },
|
{ str(LANG_DISPLAY), display_settings_menu },
|
||||||
{ "System", system_settings_menu },
|
{ str(LANG_SYSTEM), system_settings_menu },
|
||||||
};
|
};
|
||||||
|
|
||||||
m=menu_init( items, sizeof items / sizeof(struct menu_items) );
|
m=menu_init( items, sizeof items / sizeof(struct menu_items) );
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
#include "icons.h"
|
#include "icons.h"
|
||||||
#endif
|
#endif
|
||||||
|
#include "lang.h"
|
||||||
|
|
||||||
static char *fmt[] =
|
static char *fmt[] =
|
||||||
{
|
{
|
||||||
|
@ -147,38 +148,38 @@ void set_sound(char* string,
|
||||||
|
|
||||||
static Menu volume(void)
|
static Menu volume(void)
|
||||||
{
|
{
|
||||||
set_sound("Volume", &global_settings.volume, SOUND_VOLUME);
|
set_sound(str(LANG_VOLUME), &global_settings.volume, SOUND_VOLUME);
|
||||||
return MENU_OK;
|
return MENU_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Menu balance(void)
|
static Menu balance(void)
|
||||||
{
|
{
|
||||||
set_sound("Balance", &global_settings.balance, SOUND_BALANCE);
|
set_sound(str(LANG_BALANCE), &global_settings.balance, SOUND_BALANCE);
|
||||||
return MENU_OK;
|
return MENU_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Menu bass(void)
|
static Menu bass(void)
|
||||||
{
|
{
|
||||||
set_sound("Bass", &global_settings.bass, SOUND_BASS);
|
set_sound(str(LANG_BASS), &global_settings.bass, SOUND_BASS);
|
||||||
return MENU_OK;
|
return MENU_OK;
|
||||||
};
|
};
|
||||||
|
|
||||||
static Menu treble(void)
|
static Menu treble(void)
|
||||||
{
|
{
|
||||||
set_sound("Treble", &global_settings.treble, SOUND_TREBLE);
|
set_sound(str(LANG_TREBLE), &global_settings.treble, SOUND_TREBLE);
|
||||||
return MENU_OK;
|
return MENU_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_MAS3587F
|
#ifdef HAVE_MAS3587F
|
||||||
static Menu loudness(void)
|
static Menu loudness(void)
|
||||||
{
|
{
|
||||||
set_sound("Loudness", &global_settings.loudness, SOUND_LOUDNESS);
|
set_sound(str(LANG_LOUDNESS), &global_settings.loudness, SOUND_LOUDNESS);
|
||||||
return MENU_OK;
|
return MENU_OK;
|
||||||
};
|
};
|
||||||
|
|
||||||
static Menu bass_boost(void)
|
static Menu bass_boost(void)
|
||||||
{
|
{
|
||||||
set_sound("Bass boost", &global_settings.bass_boost, SOUND_SUPERBASS);
|
set_sound(str(LANG_BBOOST), &global_settings.bass_boost, SOUND_SUPERBASS);
|
||||||
return MENU_OK;
|
return MENU_OK;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -189,8 +190,8 @@ static void set_avc(int val)
|
||||||
|
|
||||||
static Menu avc(void)
|
static Menu avc(void)
|
||||||
{
|
{
|
||||||
char* names[] = { "off", "2s", "4s", "8s" };
|
char* names[] = { str(LANG_OFF), "2s", "4s", "8s" };
|
||||||
set_option("AV decay time", &global_settings.avc, names, 4, set_avc );
|
set_option(str(LANG_DECAY), &global_settings.avc, names, 4, set_avc );
|
||||||
return MENU_OK;
|
return MENU_OK;
|
||||||
}
|
}
|
||||||
#endif /* ARCHOS_RECORDER */
|
#endif /* ARCHOS_RECORDER */
|
||||||
|
@ -202,8 +203,9 @@ static void set_chanconf(int val)
|
||||||
|
|
||||||
static Menu chanconf(void)
|
static Menu chanconf(void)
|
||||||
{
|
{
|
||||||
char *names[] = {"Stereo", "Mono", "Mono Left", "Mono Right" };
|
char *names[] = {str(LANG_CHANNEL_STEREO), str(LANG_CHANNEL_MONO),
|
||||||
set_option("Channel configuration",
|
str(LANG_CHANNEL_LEFT),str(LANG_CHANNEL_RIGHT) };
|
||||||
|
set_option(str(LANG_CHANNEL),
|
||||||
&global_settings.channel_config, names, 4, set_chanconf );
|
&global_settings.channel_config, names, 4, set_chanconf );
|
||||||
return MENU_OK;
|
return MENU_OK;
|
||||||
}
|
}
|
||||||
|
@ -213,15 +215,15 @@ Menu sound_menu(void)
|
||||||
int m;
|
int m;
|
||||||
Menu result;
|
Menu result;
|
||||||
struct menu_items items[] = {
|
struct menu_items items[] = {
|
||||||
{ "Volume", volume },
|
{ str(LANG_VOLUME), volume },
|
||||||
{ "Bass", bass },
|
{ str(LANG_BASS), bass },
|
||||||
{ "Treble", treble },
|
{ str(LANG_TREBLE), treble },
|
||||||
{ "Balance", balance },
|
{ str(LANG_BALANCE), balance },
|
||||||
{ "Channels", chanconf },
|
{ str(LANG_CHANNEL_MENU), chanconf },
|
||||||
#ifdef HAVE_MAS3587F
|
#ifdef HAVE_MAS3587F
|
||||||
{ "Loudness", loudness },
|
{ str(LANG_LOUDNESS), loudness },
|
||||||
{ "Bass Boost", bass_boost },
|
{ str(LANG_BBOOST), bass_boost },
|
||||||
{ "Auto Volume", avc }
|
{ str(LANG_AUTOVOL), avc }
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
13
apps/tree.c
13
apps/tree.c
|
@ -45,6 +45,7 @@
|
||||||
#include "ata.h"
|
#include "ata.h"
|
||||||
#include "rolo.h"
|
#include "rolo.h"
|
||||||
#include "icons.h"
|
#include "icons.h"
|
||||||
|
#include "lang.h"
|
||||||
|
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
#include "widgets.h"
|
#include "widgets.h"
|
||||||
|
@ -289,8 +290,8 @@ static int showdir(char *path, int start)
|
||||||
lcd_double_height(false);
|
lcd_double_height(false);
|
||||||
#endif
|
#endif
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
lcd_puts(0,0,"Dir buffer");
|
lcd_puts(0,0,str(LANG_SHOWDIR_ERROR_BUFFER));
|
||||||
lcd_puts(0,1,"is full!");
|
lcd_puts(0,1,str(LANG_SHOWDIR_ERROR_FULL));
|
||||||
lcd_update();
|
lcd_update();
|
||||||
sleep(HZ*2);
|
sleep(HZ*2);
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
|
@ -420,12 +421,12 @@ bool ask_resume(void)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
lcd_puts(0,0,"Resume?");
|
lcd_puts(0,0,str(LANG_RESUME_ASK));
|
||||||
#ifdef HAVE_LCD_CHARCELLS
|
#ifdef HAVE_LCD_CHARCELLS
|
||||||
lcd_puts(0,1,"(Play/Stop)");
|
lcd_puts(0,1,str(LANG_RESUME_CONFIRM_PLAYER));
|
||||||
#else
|
#else
|
||||||
lcd_puts(0,1,"Play = Yes");
|
lcd_puts(0,1,str(LANG_RESUME_CONFIRM_RECORDER));
|
||||||
lcd_puts(0,2,"Any other = No");
|
lcd_puts(0,2,str(LANG_RESUME_CANCEL_RECORDER));
|
||||||
#endif
|
#endif
|
||||||
lcd_update();
|
lcd_update();
|
||||||
if (button_get(true) == BUTTON_PLAY)
|
if (button_get(true) == BUTTON_PLAY)
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
#include "status.h"
|
#include "status.h"
|
||||||
#include "wps-display.h"
|
#include "wps-display.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
#include "lang.h"
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
#include "icons.h"
|
#include "icons.h"
|
||||||
#include "widgets.h"
|
#include "widgets.h"
|
||||||
|
@ -579,11 +579,11 @@ void wps_display(struct mp3entry* id3)
|
||||||
if (!id3 && !mpeg_is_playing())
|
if (!id3 && !mpeg_is_playing())
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LCD_CHARCELLS
|
#ifdef HAVE_LCD_CHARCELLS
|
||||||
lcd_puts(0, 0, "End of list");
|
lcd_puts(0, 0, str(LANG_END_PLAYLIST_PLAYER));
|
||||||
lcd_puts(0, 1, "<Press ON>");
|
lcd_puts(0, 1, str(LANG_END_CONFIRM_PLAYER));
|
||||||
#else
|
#else
|
||||||
lcd_puts(0, 2, "<End of song list>");
|
lcd_puts(0, 2, str(LANG_END_PLAYLIST_RECORDER));
|
||||||
lcd_puts(5, 4, "Press ON");
|
lcd_puts(5, 4, str(LANG_END_CONFIRM_RECORDER));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
79
apps/wps.c
79
apps/wps.c
|
@ -40,7 +40,7 @@
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
#include "icons.h"
|
#include "icons.h"
|
||||||
#endif
|
#endif
|
||||||
|
#include "lang.h"
|
||||||
#define FF_REWIND_MAX_PERCENT 3 /* cap ff/rewind step size at max % of file */
|
#define FF_REWIND_MAX_PERCENT 3 /* cap ff/rewind step size at max % of file */
|
||||||
/* 3% of 30min file == 54s step size */
|
/* 3% of 30min file == 54s step size */
|
||||||
|
|
||||||
|
@ -116,17 +116,17 @@ void display_keylock_text(bool locked)
|
||||||
|
|
||||||
#ifdef HAVE_LCD_CHARCELLS
|
#ifdef HAVE_LCD_CHARCELLS
|
||||||
if(locked)
|
if(locked)
|
||||||
lcd_puts(0, 0, "Keylock ON");
|
lcd_puts(0, 0, str(LANG_KEYLOCK_ON_PLAYER));
|
||||||
else
|
else
|
||||||
lcd_puts(0, 0, "Keylock OFF");
|
lcd_puts(0, 0, str(LANG_KEYLOCK_OFF_PLAYER));
|
||||||
#else
|
#else
|
||||||
if(locked)
|
if(locked)
|
||||||
{
|
{
|
||||||
lcd_puts(2, 3, "Key lock is ON");
|
lcd_puts(2, 3, str(LANG_KEYLOCK_ON_RECORDER));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lcd_puts(2, 3, "Key lock is OFF");
|
lcd_puts(2, 3, str(LANG_KEYLOCK_OFF_RECORDER));
|
||||||
}
|
}
|
||||||
lcd_update();
|
lcd_update();
|
||||||
#endif
|
#endif
|
||||||
|
@ -141,17 +141,17 @@ void display_mute_text(bool muted)
|
||||||
|
|
||||||
#ifdef HAVE_LCD_CHARCELLS
|
#ifdef HAVE_LCD_CHARCELLS
|
||||||
if (muted)
|
if (muted)
|
||||||
lcd_puts(0, 0, "Mute ON");
|
lcd_puts(0, 0, str(LANG_MUTE_ON_PLAYER));
|
||||||
else
|
else
|
||||||
lcd_puts(0, 0, "Mute OFF");
|
lcd_puts(0, 0, str(LANG_MUTE_OFF_PLAYER));
|
||||||
#else
|
#else
|
||||||
if (muted)
|
if (muted)
|
||||||
{
|
{
|
||||||
lcd_puts(2, 3, "Mute is ON");
|
lcd_puts(2, 3, str(LANG_MUTE_ON_RECORDER));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lcd_puts(2, 3, "Mute is OFF");
|
lcd_puts(2, 3, str(LANG_MUTE_OFF_RECORDER));
|
||||||
}
|
}
|
||||||
lcd_update();
|
lcd_update();
|
||||||
#endif
|
#endif
|
||||||
|
@ -185,8 +185,8 @@ static int browse_id3(void)
|
||||||
|
|
||||||
lcd_stop_scroll();
|
lcd_stop_scroll();
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
lcd_puts(0, 0, "-ID3 Info- ");
|
lcd_puts(0, 0, str(LANG_ID3_INFO));
|
||||||
lcd_puts(0, 1, "--Screen-- ");
|
lcd_puts(0, 1, str(LANG_ID3_SCREEN));
|
||||||
lcd_update();
|
lcd_update();
|
||||||
sleep(HZ);
|
sleep(HZ);
|
||||||
|
|
||||||
|
@ -198,23 +198,26 @@ static int browse_id3(void)
|
||||||
switch (menu_pos)
|
switch (menu_pos)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
lcd_puts(0, 0, "[Title]");
|
lcd_puts(0, 0, str(LANG_ID3_TITLE));
|
||||||
lcd_puts_scroll(0, 1, id3->title ? id3->title : "<no title>");
|
lcd_puts_scroll(0, 1, id3->title ? id3->title :
|
||||||
|
(char*)str(LANG_ID3_NO_TITLE));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
lcd_puts(0, 0, "[Artist]");
|
lcd_puts(0, 0, str(LANG_ID3_ARTIST));
|
||||||
lcd_puts_scroll(0, 1,
|
lcd_puts_scroll(0, 1,
|
||||||
id3->artist ? id3->artist : "<no artist>");
|
id3->artist ? id3->artist :
|
||||||
|
(char*)str(LANG_ID3_NO_ARTIST));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
lcd_puts(0, 0, "[Album]");
|
lcd_puts(0, 0, str(LANG_ID3_ALBUM));
|
||||||
lcd_puts_scroll(0, 1, id3->album ? id3->album : "<no album>");
|
lcd_puts_scroll(0, 1, id3->album ? id3->album :
|
||||||
|
(char*)str(LANG_ID3_NO_ALBUM));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
lcd_puts(0, 0, "[Tracknum]");
|
lcd_puts(0, 0, str(LANG_ID3_TRACKNUM));
|
||||||
|
|
||||||
if (id3->tracknum)
|
if (id3->tracknum)
|
||||||
{
|
{
|
||||||
|
@ -224,12 +227,12 @@ static int browse_id3(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lcd_puts_scroll(0, 1, "<no tracknum>");
|
lcd_puts_scroll(0, 1, str(LANG_ID3_NO_TRACKNUM));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
lcd_puts(0, 0, "[Length]");
|
lcd_puts(0, 0, str(LANG_ID3_LENGHT));
|
||||||
snprintf(scroll_text,sizeof(scroll_text), "%d:%02d",
|
snprintf(scroll_text,sizeof(scroll_text), "%d:%02d",
|
||||||
id3->length / 60000,
|
id3->length / 60000,
|
||||||
id3->length % 60000 / 1000 );
|
id3->length % 60000 / 1000 );
|
||||||
|
@ -237,7 +240,7 @@ static int browse_id3(void)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5:
|
case 5:
|
||||||
lcd_puts(0, 0, "[Playlist]");
|
lcd_puts(0, 0, str(LANG_ID3_PLAYLIST));
|
||||||
snprintf(scroll_text,sizeof(scroll_text), "%d/%d",
|
snprintf(scroll_text,sizeof(scroll_text), "%d/%d",
|
||||||
id3->index + 1, playlist.amount);
|
id3->index + 1, playlist.amount);
|
||||||
lcd_puts_scroll(0, 1, scroll_text);
|
lcd_puts_scroll(0, 1, scroll_text);
|
||||||
|
@ -245,21 +248,21 @@ static int browse_id3(void)
|
||||||
|
|
||||||
|
|
||||||
case 6:
|
case 6:
|
||||||
lcd_puts(0, 0, "[Bitrate]");
|
lcd_puts(0, 0, str(LANG_ID3_BITRATE));
|
||||||
snprintf(scroll_text,sizeof(scroll_text), "%d kbps",
|
snprintf(scroll_text,sizeof(scroll_text), "%d kbps",
|
||||||
id3->bitrate);
|
id3->bitrate);
|
||||||
lcd_puts(0, 1, scroll_text);
|
lcd_puts(0, 1, scroll_text);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 7:
|
case 7:
|
||||||
lcd_puts(0, 0, "[Frequency]");
|
lcd_puts(0, 0, str(LANG_ID3_FRECUENCY));
|
||||||
snprintf(scroll_text,sizeof(scroll_text), "%d Hz",
|
snprintf(scroll_text,sizeof(scroll_text), "%d Hz",
|
||||||
id3->frequency);
|
id3->frequency);
|
||||||
lcd_puts(0, 1, scroll_text);
|
lcd_puts(0, 1, scroll_text);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 8:
|
case 8:
|
||||||
lcd_puts(0, 0, "[Path]");
|
lcd_puts(0, 0, str(LANG_ID3_PATH));
|
||||||
lcd_puts_scroll(0, 1, id3->path);
|
lcd_puts_scroll(0, 1, id3->path);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -644,7 +647,7 @@ int on_screen(void)
|
||||||
lcd_scroll_pause();
|
lcd_scroll_pause();
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
|
|
||||||
ptr = "Pitch up";
|
ptr = str(LANG_PITCH_UP);
|
||||||
lcd_getstringsize(ptr,FONT_UI,&w,&h);
|
lcd_getstringsize(ptr,FONT_UI,&w,&h);
|
||||||
lcd_putsxy((LCD_WIDTH-w)/2, 0, ptr, FONT_UI);
|
lcd_putsxy((LCD_WIDTH-w)/2, 0, ptr, FONT_UI);
|
||||||
lcd_bitmap(bitmap_icons_7x8[Icon_UpArrow],
|
lcd_bitmap(bitmap_icons_7x8[Icon_UpArrow],
|
||||||
|
@ -654,13 +657,13 @@ int on_screen(void)
|
||||||
lcd_getstringsize(buf,FONT_UI,&w,&h);
|
lcd_getstringsize(buf,FONT_UI,&w,&h);
|
||||||
lcd_putsxy((LCD_WIDTH-w)/2, h, buf, FONT_UI);
|
lcd_putsxy((LCD_WIDTH-w)/2, h, buf, FONT_UI);
|
||||||
|
|
||||||
ptr = "Pitch down";
|
ptr = str(LANG_PITCH_DOWN);
|
||||||
lcd_getstringsize(ptr,FONT_UI,&w,&h);
|
lcd_getstringsize(ptr,FONT_UI,&w,&h);
|
||||||
lcd_putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h, ptr, FONT_UI);
|
lcd_putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h, ptr, FONT_UI);
|
||||||
lcd_bitmap(bitmap_icons_7x8[Icon_DownArrow],
|
lcd_bitmap(bitmap_icons_7x8[Icon_DownArrow],
|
||||||
LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8, true);
|
LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8, true);
|
||||||
|
|
||||||
ptr = "Pause";
|
ptr = str(LANG_PAUSE);
|
||||||
lcd_getstringsize(ptr,FONT_UI,&w,&h);
|
lcd_getstringsize(ptr,FONT_UI,&w,&h);
|
||||||
lcd_putsxy((LCD_WIDTH-(w/2))/2, LCD_HEIGHT/2 - h/2, ptr, FONT_UI);
|
lcd_putsxy((LCD_WIDTH-(w/2))/2, LCD_HEIGHT/2 - h/2, ptr, FONT_UI);
|
||||||
lcd_bitmap(bitmap_icons_7x8[Icon_Pause],
|
lcd_bitmap(bitmap_icons_7x8[Icon_Pause],
|
||||||
|
@ -753,15 +756,15 @@ bool f2_screen(void)
|
||||||
while (!exit) {
|
while (!exit) {
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
|
|
||||||
lcd_putsxy(0, LCD_HEIGHT/2 - h*2, "Shuffle", FONT_UI);
|
lcd_putsxy(0, LCD_HEIGHT/2 - h*2, str(LANG_SHUFFLE), FONT_UI);
|
||||||
lcd_putsxy(0, LCD_HEIGHT/2 - h, "mode:", FONT_UI);
|
lcd_putsxy(0, LCD_HEIGHT/2 - h, str(LANG_F2_MODE), FONT_UI);
|
||||||
lcd_putsxy(0, LCD_HEIGHT/2,
|
lcd_putsxy(0, LCD_HEIGHT/2,
|
||||||
global_settings.playlist_shuffle ? "on" : "off", FONT_UI);
|
global_settings.playlist_shuffle ? str(LANG_ON) : str(LANG_OFF), FONT_UI);
|
||||||
lcd_bitmap(bitmap_icons_7x8[Icon_FastBackward],
|
lcd_bitmap(bitmap_icons_7x8[Icon_FastBackward],
|
||||||
LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8, true);
|
LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8, true);
|
||||||
|
|
||||||
snprintf(buf, sizeof buf, "Dir filter: %s",
|
snprintf(buf, sizeof buf, str(LANG_DIR_FILTER),
|
||||||
global_settings.mp3filter ? "on" : "off");
|
global_settings.mp3filter ? str(LANG_ON) : str(LANG_OFF));
|
||||||
|
|
||||||
/* Get the string width and height */
|
/* Get the string width and height */
|
||||||
lcd_getstringsize(buf,FONT_UI,&w,&h);
|
lcd_getstringsize(buf,FONT_UI,&w,&h);
|
||||||
|
@ -819,21 +822,21 @@ bool f3_screen(void)
|
||||||
int w,h;
|
int w,h;
|
||||||
char* ptr;
|
char* ptr;
|
||||||
|
|
||||||
ptr = "Status";
|
ptr = str(LANG_F3_STATUS);
|
||||||
lcd_getstringsize(ptr,FONT_UI,&w,&h);
|
lcd_getstringsize(ptr,FONT_UI,&w,&h);
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
|
|
||||||
lcd_putsxy(0, LCD_HEIGHT/2 - h*2, "Scroll", FONT_UI);
|
lcd_putsxy(0, LCD_HEIGHT/2 - h*2, str(LANG_F3_SCROLL), FONT_UI);
|
||||||
lcd_putsxy(0, LCD_HEIGHT/2 - h, "bar:", FONT_UI);
|
lcd_putsxy(0, LCD_HEIGHT/2 - h, str(LANG_F3_BAR), FONT_UI);
|
||||||
lcd_putsxy(0, LCD_HEIGHT/2,
|
lcd_putsxy(0, LCD_HEIGHT/2,
|
||||||
global_settings.scrollbar ? "on" : "off", FONT_UI);
|
global_settings.scrollbar ? str(LANG_ON) : str(LANG_OFF), FONT_UI);
|
||||||
lcd_bitmap(bitmap_icons_7x8[Icon_FastBackward],
|
lcd_bitmap(bitmap_icons_7x8[Icon_FastBackward],
|
||||||
LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8, true);
|
LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8, true);
|
||||||
|
|
||||||
lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2 - h*2, ptr, FONT_UI);
|
lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2 - h*2, ptr, FONT_UI);
|
||||||
lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2 - h, "bar:", FONT_UI);
|
lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2 - h, str(LANG_F3_BAR), FONT_UI);
|
||||||
lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2,
|
lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2,
|
||||||
global_settings.statusbar ? "on" : "off", FONT_UI);
|
global_settings.statusbar ? str(LANG_ON) : str(LANG_OFF), FONT_UI);
|
||||||
lcd_bitmap(bitmap_icons_7x8[Icon_FastForward],
|
lcd_bitmap(bitmap_icons_7x8[Icon_FastForward],
|
||||||
LCD_WIDTH/2 + 8, LCD_HEIGHT/2 - 4, 7, 8, true);
|
LCD_WIDTH/2 + 8, LCD_HEIGHT/2 - 4, 7, 8, true);
|
||||||
lcd_update();
|
lcd_update();
|
||||||
|
|
|
@ -40,6 +40,7 @@ DEBUG = -g
|
||||||
|
|
||||||
# where to put all output files
|
# where to put all output files
|
||||||
OBJDIR = .
|
OBJDIR = .
|
||||||
|
LANGUAGE = english
|
||||||
|
|
||||||
TARGET = $(OBJDIR)/uisw32.exe
|
TARGET = $(OBJDIR)/uisw32.exe
|
||||||
|
|
||||||
|
@ -49,7 +50,7 @@ $(KEYPAD) $(DISPLAY) -DAPPSVERSION=\"$(VERSION)\"
|
||||||
LDFLAGS = -lgdi32 -luser32 -mwindows
|
LDFLAGS = -lgdi32 -luser32 -mwindows
|
||||||
|
|
||||||
# Use this for simulator-only files
|
# Use this for simulator-only files
|
||||||
INCLUDES = -I. -I$(DRIVERS) -I$(COMMON) -I$(FIRMWAREDIR) -I$(APPDIR) -I$(MACHINEDIR) -I../common -I$(MACHINEDIR)
|
INCLUDES = -I. -I$(DRIVERS) -I$(COMMON) -I$(FIRMWAREDIR) -I$(APPDIR) -I$(MACHINEDIR) -I../common -I$(MACHINEDIR) -I$(OBJDIR)
|
||||||
|
|
||||||
# The true Rockbox Applications should use this include path:
|
# The true Rockbox Applications should use this include path:
|
||||||
APPINCLUDES = -I$(FIRMWAREDIR)/include $(INCLUDES)
|
APPINCLUDES = -I$(FIRMWAREDIR)/include $(INCLUDES)
|
||||||
|
@ -64,8 +65,7 @@ FIRMSRCS = lcd.c power.c sprintf.c id3.c usb.c \
|
||||||
mpeg.c powermgmt.c font.c loadfont.c X5x8.c
|
mpeg.c powermgmt.c font.c loadfont.c X5x8.c
|
||||||
|
|
||||||
APPS = main.c tree.c menu.c credits.c main_menu.c icons.c \
|
APPS = main.c tree.c menu.c credits.c main_menu.c icons.c \
|
||||||
playlist.c showtext.c wps.c wps-display.c settings.c status.c \
|
playlist.c showtext.c wps.c wps-display.c settings.c status.c
|
||||||
lang.c
|
|
||||||
|
|
||||||
MENUS = games_menu.c demo_menu.c settings_menu.c sound_menu.c
|
MENUS = games_menu.c demo_menu.c settings_menu.c sound_menu.c
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ SRCS = button.c dir-win32.c lcd-win32.c panic-win32.c thread-win32.c \
|
||||||
debug-win32.c kernel.c string-win32.c uisw32.c stubs.c \
|
debug-win32.c kernel.c string-win32.c uisw32.c stubs.c \
|
||||||
$(APPS) $(MENUS) $(FIRMSRCS) strtok.c sim_icons.c
|
$(APPS) $(MENUS) $(FIRMSRCS) strtok.c sim_icons.c
|
||||||
|
|
||||||
OBJS := $(SRCS:%.c=$(OBJDIR)/%.o) $(OBJDIR)/uisw32-res.o
|
OBJS := $(OBJDIR)/lang.o $(SRCS:%.c=$(OBJDIR)/%.o) $(OBJDIR)/uisw32-res.o
|
||||||
|
|
||||||
all: $(TARGET)
|
all: $(TARGET)
|
||||||
|
|
||||||
|
@ -161,8 +161,9 @@ $(OBJDIR)/playlist.o: $(APPDIR)/playlist.c
|
||||||
$(OBJDIR)/showtext.o: $(APPDIR)/showtext.c
|
$(OBJDIR)/showtext.o: $(APPDIR)/showtext.c
|
||||||
$(CC) $(APPCFLAGS) -c $< -o $@
|
$(CC) $(APPCFLAGS) -c $< -o $@
|
||||||
|
|
||||||
$(OBJDIR)/lang.o: $(APPDIR)/lang.c
|
$(OBJDIR)/lang.o: $(APPDIR)/lang/$(LANGUAGE).lang
|
||||||
$(CC) $(APPCFLAGS) -c $< -o $@
|
$(TOOLSDIR)/genlang -p=$(OBJDIR)/lang $<
|
||||||
|
$(CC) $(CFLAGS) -c $(OBJDIR)/lang.c -o $@
|
||||||
|
|
||||||
$(OBJDIR)/lcd.o: $(DRIVERS)/lcd.c
|
$(OBJDIR)/lcd.o: $(DRIVERS)/lcd.c
|
||||||
$(CC) $(APPCFLAGS) -c $< -o $@
|
$(CC) $(APPCFLAGS) -c $< -o $@
|
||||||
|
|
|
@ -42,6 +42,7 @@ DEBUG = -g
|
||||||
OBJDIR = .
|
OBJDIR = .
|
||||||
|
|
||||||
TARGET = $(OBJDIR)/rockboxui
|
TARGET = $(OBJDIR)/rockboxui
|
||||||
|
LANGUAGE = english
|
||||||
|
|
||||||
DEFINES = -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR \
|
DEFINES = -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR \
|
||||||
$(KEYPAD) $(DISPLAY) $(EXTRA_DEFINES)
|
$(KEYPAD) $(DISPLAY) $(EXTRA_DEFINES)
|
||||||
|
@ -49,7 +50,7 @@ $(KEYPAD) $(DISPLAY) $(EXTRA_DEFINES)
|
||||||
LDFLAGS = -lX11 -lm -lXt -lXmu -lnsl
|
LDFLAGS = -lX11 -lm -lXt -lXmu -lnsl
|
||||||
|
|
||||||
# Use this for simulator-only files
|
# Use this for simulator-only files
|
||||||
INCLUDES = -I. -I$(DRIVERS) -I$(COMMON) -I$(FIRMWAREDIR) -I$(APPDIR) -I$(MACHINEDIR) -I../common
|
INCLUDES = -I. -I$(DRIVERS) -I$(COMMON) -I$(FIRMWAREDIR) -I$(APPDIR) -I$(MACHINEDIR) -I../common -I$(OBJDIR)
|
||||||
SRCDIRS = . $(DRIVERS) $(COMMON) $(FIRMWAREDIR) $(APPDIR) $(MACHINEDIR)
|
SRCDIRS = . $(DRIVERS) $(COMMON) $(FIRMWAREDIR) $(APPDIR) $(MACHINEDIR)
|
||||||
|
|
||||||
# The true Rockbox Applications should use this include path:
|
# The true Rockbox Applications should use this include path:
|
||||||
|
@ -80,8 +81,7 @@ FIRMSRCS = lcd.c sprintf.c id3.c debug.c usb.c mpeg.c power.c\
|
||||||
powermgmt.c font.c X5x8.c loadfont.c panic.c
|
powermgmt.c font.c X5x8.c loadfont.c panic.c
|
||||||
|
|
||||||
APPS = main.c tree.c menu.c credits.c main_menu.c\
|
APPS = main.c tree.c menu.c credits.c main_menu.c\
|
||||||
playlist.c showtext.c wps.c wps-display.c settings.c status.c icons.c \
|
playlist.c showtext.c wps.c wps-display.c settings.c status.c icons.c
|
||||||
lang.c
|
|
||||||
|
|
||||||
MENUS = games_menu.c demo_menu.c settings_menu.c sound_menu.c
|
MENUS = games_menu.c demo_menu.c settings_menu.c sound_menu.c
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ ifdef MPEG_PLAY
|
||||||
INCLUDES += -I$(LIBMADDIR)
|
INCLUDES += -I$(LIBMADDIR)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
OBJS := $(SRCS:%.c=$(OBJDIR)/%.o)
|
OBJS := $(OBJDIR)/lang.o $(SRCS:%.c=$(OBJDIR)/%.o)
|
||||||
|
|
||||||
all: $(TARGET) $(EXTRA_TARGETS)
|
all: $(TARGET) $(EXTRA_TARGETS)
|
||||||
|
|
||||||
|
@ -214,8 +214,9 @@ $(OBJDIR)/playlist.o: $(APPDIR)/playlist.c
|
||||||
$(OBJDIR)/showtext.o: $(APPDIR)/showtext.c
|
$(OBJDIR)/showtext.o: $(APPDIR)/showtext.c
|
||||||
$(CC) $(APPCFLAGS) -c $< -o $@
|
$(CC) $(APPCFLAGS) -c $< -o $@
|
||||||
|
|
||||||
$(OBJDIR)/lang.o: $(APPDIR)/lang.c
|
$(OBJDIR)/lang.o: $(APPDIR)/lang/$(LANGUAGE).lang
|
||||||
$(CC) $(APPCFLAGS) -c $< -o $@
|
$(TOOLSDIR)/genlang -p=$(OBJDIR)/lang $<
|
||||||
|
$(CC) $(CFLAGS) -c $(OBJDIR)/lang.c -o $@
|
||||||
|
|
||||||
$(OBJDIR)/lcd.o: $(DRIVERS)/lcd.c
|
$(OBJDIR)/lcd.o: $(DRIVERS)/lcd.c
|
||||||
$(CC) $(CFLAGS) -c $< -o $@
|
$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
Loading…
Reference in a new issue