Changed font.ttf

Rearranged some texts for new font
Added overwriting (with prompt) when restoring a savegame
Forgot to set the file attributes when using the normal Card_setstatus functions
This commit is contained in:
sulokutdcmago 2012-09-08 10:08:58 +00:00
parent 27d7d63aed
commit 4b58d5ed0b
10 changed files with 82 additions and 34 deletions

Binary file not shown.

View File

@ -2,8 +2,8 @@
<app version="1">
<name>GCMM</name>
<coder>Suloku, PabloACZ, Pikachu025, dronesplitter</coder>
<version>1.2c</version>
<release_date>20120906000000</release_date>
<version>1.2d</version>
<release_date>20120908000000</release_date>
<short_description>Memory Card Manager</short_description>
<long_description>A memory card manager for Wii/GC.

View File

@ -30,6 +30,13 @@ I (suloku) have updated the code to newest libraries to port it to the Wii syste
|0O×øo· UPDATE HISTORY ·oø×O0|
`¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨'
[What's New 1.2d - september 08, 2012 - By suloku]
* Previous version couldn't raw backup if backup folder didn't exist in sd/usb
* Added (double)overwrite prompt when restoring a savefile to memory card (Nano/Excelsiior's idea)
* Updated graphics so raw mode commands are less cryptic (wii mode design based on JoostinOnline's for GCMM+)
* Use DejavuSans as font (much better readability) from GCMM+ by Nano/Excelsiior
[What's New 1.2c - september 06, 2012 - By suloku]
* Raw backups are now named with the number of blocks: insted of Backup_*timestamp*.raw now it is 0059b_*timestamp.raw, 2043b_*timestamp.raw...
@ -130,6 +137,9 @@ Users:
* Memory cards can be extracted/inserted at will at the main menu screen. It is not recommended to change the card in any other screen.
* Dolphin (wii/gc computer emulator) has a nice memory card manager, check it out!
About usb devices:
* Two of my usb devices won't work with GCMM, but those same devices make The Homebrew Channel crash. If you have problems try another usb device or an SD card.
Developers:
* LibOGC card functions works with time functions that use Epoch (seconds since jan 1, 1970) as reference, while GameCube works with seconds since jan 1, 2000). The difference is 946684800 seconds
@ -194,26 +204,26 @@ Raw mode controls:
`¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨'
Currently gcmm uses:
*DevkitPPC r26: http://sourceforge.net/projects/devkitpro/files/devkitPPC/
*libOGC 1.8.11 git (2012-07-25): http://sourceforge.net/projects/devkitpro/files/libogc
* DevkitPPC r26: http://sourceforge.net/projects/devkitpro/files/devkitPPC/
* libOGC 1.8.11 git (2012-07-25): http://sourceforge.net/projects/devkitpro/files/libogc
note: it compiles and runs fine with 1.8.11 release
*libfat 1.0.11: http://sourceforge.net/projects/devkitpro/files/libfat/
*libFreeType 2.4.2 port: http://sourceforge.net/projects/devkitpro/files/portlibs/ppc/
* libfat 1.0.11: http://sourceforge.net/projects/devkitpro/files/libfat/
* libFreeType 2.4.2 port: http://sourceforge.net/projects/devkitpro/files/portlibs/ppc/
×—–­—–­—–­—–­ –­—–­—–­—–­—–­—–­—–­—–­—–­—–­— ­—–­—–­—–­—–­—–­—–­—–­—-­—–­-–•¬
|0O×øo· CREDITS ·oø×O0|
`¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨'
*SoftDev for his contributions to the GC/WII scene
*Costis for helping with some doubts, he's allways there
*Masken for his code on raw data reading/writing
*Justb & dsbomb for originally creating gcmm
*CowTRobo & Samsom for very useful old sources
*Tantric for pointing out that official memory cards won't work on wii mode, which encouraged me to continue gcmm as all my previous efforts where in vane due to using an official card for the testing.
*tueidj, for his patches and very useful information and support. Official memory cards work due to his work.
*dronesplitter for banner and icon implementation
*PlabloACZ and Picachu025 for updating the source.
*Nano, for inspiring me to finally working again on GCMM
* SoftDev for his contributions to the GC/WII scene
* Costis for helping with some doubts, he's allways there
* Masken for his code on raw data reading/writing
* Justb & dsbomb for originally creating gcmm
* CowTRobo & Samsom for very useful old sources
* Tantric for pointing out that official memory cards won't work on wii mode, which encouraged me to continue gcmm as all my previous efforts where in vane due to using an official card for the testing.
* tueidj, for his patches and very useful information and support. Official memory cards work due to his work.
* dronesplitter for banner and icon implementation
* PlabloACZ and Picachu025 for updating the source.
* Nano(Excelsiior), for inspiring me to finally working again on GCMM
×—–­—–­—–­—–­ –­—–­—–­—–­—–­—–­—–­—–­—–­—–­— ­—–­—–­—–­—–­—–­—–­—–­—-­—–­-–•¬
|0O×øo· ·oø×O0|

View File

@ -8,5 +8,5 @@ fontface:
.globl fontsize
fontsize: .long 28736
fontsize: .long 42604

View File

@ -684,7 +684,7 @@ void showCardInfo(int sel){
//clear right pane, but just the card info
int bgcolor = getcolour(84,174,211);
DrawBoxFilled(375, 165, 605, 390, bgcolor);
int y = 190, x = 375;
int y = 190, x = 378;
int err;
char txt[1024];
int i;
@ -749,7 +749,7 @@ void showCardInfo(int sel){
void showSaveInfo(int sel)
{
int y = 160, x = 375, j;
int y = 160, x = 378, j;
char gamecode[5], company[3], txt[1024];
//clear right pane, but just the save info
@ -1151,7 +1151,7 @@ void clearLeftPane()
void clearRightPane()
{
int bgcolor = getcolour(84,174,211);
DrawBoxFilled(376, 112, 605, 390, bgcolor);
DrawBoxFilled(376, 112, 605, 395, bgcolor);
}
void DrawHLine (int x1, int x2, int y, int color)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 844 KiB

After

Width:  |  Height:  |  Size: 844 KiB

View File

@ -273,7 +273,7 @@ void SD_BackupMode ()
int bytestodo;
clearRightPane();
DrawText(390,130,"B a c k u p M o d e");
DrawText(380,130,"B a c k u p M o d e");
writeStatusBar("Pick a file using UP or DOWN ", "Press A to backup to SD Card ") ;
/*** Get the directory listing from the memory card ***/
memitems = CardGetDirectory (MEM_CARD);
@ -333,7 +333,7 @@ void SD_BackupModeAllFiles ()
char buffer[128];
clearRightPane();
DrawText(390,130," B a c k u p A l l ");
DrawText(380,130," B a c k u p A l l ");
writeStatusBar("Backing up all files.", "This may take a while.");
/*** Get the directory listing from the memory card ***/
memitems = CardGetDirectory (MEM_CARD);
@ -380,7 +380,7 @@ void SD_RestoreMode ()
int selected;
clearRightPane();
DrawText(390,130,"R e s t o r e M o d e");
DrawText(380,130,"R e s t o r e M o d e");
writeStatusBar("Pick a file using UP or DOWN", "Press A to restore to Memory Card ") ;
files = SDGetFileList (1);
if (!files)
@ -431,7 +431,7 @@ void SD_RawBackupMode ()
s32 writen = 0;
char msg[64];
clearRightPane();
DrawText(50, 230, "R A W B a c k u p M o d e");
DrawText(40, 230, "R A W B a c k u p M o d e");
writeStatusBar("Reading memory card... ", "");
if (BackupRawImage(MEM_CARD, &writen) == 1)
@ -459,7 +459,7 @@ void SD_RawRestoreMode ()
int i;
clearRightPane();
DrawText(400,130,"R A W R e s t o r e");
DrawText(380,130,"R A W R e s t o r e");
DrawText(450,150,"M o d e");
writeStatusBar("Pick a file using UP or DOWN", "Press A to restore to Memory Card ");
@ -580,7 +580,7 @@ int main ()
case 700 : //Raw backup mode
if (have_sd)
{
DrawText(50, 230, "R A W B a c k u p M o d e");
DrawText(40, 230, "R A W B a c k u p M o d e");
SD_RawBackupMode();
}else
{
@ -610,7 +610,8 @@ int main ()
VIDEO_WaitVSync ();
if (CARD_Probe(MEM_CARD) > 0)
{
DrawText(50, 230, "F o r m a t C a r d M o d e");
DrawText(70, 230, "F o r m a t C a r d");
DrawText(150, 250, "M o d e");
clearRightPane();
MC_FormatMode(MEM_CARD);

View File

@ -491,7 +491,7 @@ int CardWriteFile (int slot)
char company[4];
char gamecode[6];
char filename[CARD_FILENAMELEN];
int err;
int err, ret;
u32 SectorSize;
int offset;
int written;
@ -526,7 +526,24 @@ int CardWriteFile (int slot)
{
if (((u32)CardDir.gamecode == (u32)gamecode) && (strcmp ((char *) CardDir.filename, (char *)filename) == 0))
{
/*** Found the file - abort ***/
/*** Found the file - prompt user ***/
ret = WaitPromptChoice("File already exists. Overwrite?", "Overwrite", "Cancel");
if (!ret){
ret = WaitPromptChoiceAZ("Are you -SURE- you want to overwrite?", "Overwrite", "Cancel");
if(!ret){
err = CARD_Delete(slot, (char *) &filename);
if (err < 0)
{
WaitCardError("MCDel", err);
CARD_Unmount (slot);
return 0;
}
err = CARD_FindFirst (slot, &CardDir, false);
continue;
}
}
/*** User canceled - abort ***/
CARD_Unmount (slot);
WaitCardError("File already exists", err);
return 0;
@ -539,10 +556,31 @@ int CardWriteFile (int slot)
CARD_SetCompany(company);
CARD_SetGamecode(gamecode);
tryagain:
/*** Now restore the file from backup ***/
err = CARD_Create (slot, (char *) filename, filelen, &CardFile);
if (err < 0)
{
if (err == CARD_ERROR_EXIST)
{
/*** Found the file - prompt user ***/
ret = WaitPromptChoice("File already exists. Overwrite?", "Overwrite", "Cancel");
if (!ret){
ret = WaitPromptChoiceAZ("Are you -SURE- you want to overwrite?", "Overwrite", "Cancel");
if(!ret){
err = CARD_Delete(slot, (char *) &filename);
if (err < 0)
{
WaitCardError("MCDel", err);
CARD_SetCompany(NULL);
CARD_SetGamecode(NULL);
CARD_Unmount (slot);
return 0;
}
goto tryagain;
}
}
}
//Return To show all so we don't have errors
CARD_SetCompany(NULL);
CARD_SetGamecode(NULL);
@ -572,13 +610,12 @@ int CardWriteFile (int slot)
#ifdef STATUSOGC
/*** Finally, update the status ***/
CARD_SetStatus (slot, CardFile.filenum, &CardStatus);
//For some reason this sets the file to Move->allowed, Copy->not allowed, Public file instead of the actual permission value
CARD_SetAttributes(slot, CardFile.filenum, &permission);
#else
__card_setstatusex(slot, CardFile.filenum, &gci);
#endif
//For some reason this sets the file to Move->allowed, Copy->not allowed, Public file instead of the actual permission value
//CARD_SetAttributes(slot, CardFile.filenum, &permission);
//Return To show all so we don't have errors
CARD_SetCompany(NULL);
CARD_SetGamecode(NULL);
@ -737,9 +774,9 @@ void MC_FormatMode(s32 slot)
if (!erase){
if (!slot){
erase = WaitPromptChoiceAZ("All contents of memory card in slot A will be erased, continue?", "Format", "Cancel");
erase = WaitPromptChoiceAZ("All contents of memory card in slot A will be erased!", "Format", "Cancel");
}else{
erase = WaitPromptChoiceAZ("All contents of memory card in slot B will be erased, continue?", "Format", "Cancel");
erase = WaitPromptChoiceAZ("All contents of memory card in slot B will be erased!", "Format", "Cancel");
}
if (!erase)

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 844 KiB

After

Width:  |  Height:  |  Size: 844 KiB