aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Schodet2011-01-25 20:28:32 +0100
committerNicolas Schodet2011-01-25 20:28:32 +0100
commit6aebfe0246c16971dc7733cedcd4b65a0fce6b42 (patch)
treef204f785a450cba2391f95352002c479ca892384
parent100953400e65342243d6838c4bac25de310d1eae (diff)
dirty hack to test RIC file drawing from firmwarewip_dirty_ric
-rw-r--r--AT91SAM7S256/Source/Functions.inl9
-rw-r--r--AT91SAM7S256/Source/c_cmd.h2
-rw-r--r--AT91SAM7S256/Source/modules.h2
3 files changed, 12 insertions, 1 deletions
diff --git a/AT91SAM7S256/Source/Functions.inl b/AT91SAM7S256/Source/Functions.inl
index 1424721..1fcdf63 100644
--- a/AT91SAM7S256/Source/Functions.inl
+++ b/AT91SAM7S256/Source/Functions.inl
@@ -2592,16 +2592,22 @@ UBYTE cUiFileRun(UBYTE Action) // Run selected file
case (FILETYPE_SOUND * 10 + 0) : // Start sound file (*.snd, *.rso) Wait for sound idle
{
+#if 0 /* Dirty hack. */
strcpy((char*)pMapSound->SoundFilename,(char*)VarsUi.SelectedFilename);
pMapSound->Volume = IOMapUi.Volume;
pMapSound->Mode = SOUND_ONCE;
pMapSound->Flags |= SOUND_UPDATE;
+#else /* Dirty hack. */
+ SLONG vars[2] = { 0, 0 };
+ cCmdDrawPicture(0, 0, VarsUi.SelectedFilename, vars, 0);
+#endif /* Dirty hack. */
VarsUi.State++;
}
break;
case (FILETYPE_SOUND * 10 + 1) : // Wait for stop or user break
{
+#if 0 /* Dirty hack. */
cUiRunning(MENU_RUN);
if (SOUND_IDLE == pMapSound->State)
@@ -2609,10 +2615,13 @@ UBYTE cUiFileRun(UBYTE Action) // Run selected file
pMapDisplay->pTextLines[FILERUN_TEXTLINE] = cUiGetString(TXT_FILERUN_ENDED);
VarsUi.State = 99;
}
+#endif /* Dirty hack. */
if (BUTTON_EXIT == cUiReadButtons())
{
+#if 0 /* Dirty hack. */
pMapSound->Flags &= ~SOUND_UPDATE;
pMapSound->State = SOUND_STOP;
+#endif /* Dirty hack. */
pMapDisplay->pTextLines[FILERUN_TEXTLINE] = cUiGetString(TXT_FILERUN_ABORTED);
VarsUi.State = 99;
}
diff --git a/AT91SAM7S256/Source/c_cmd.h b/AT91SAM7S256/Source/c_cmd.h
index 86949cb..9a6f057 100644
--- a/AT91SAM7S256/Source/c_cmd.h
+++ b/AT91SAM7S256/Source/c_cmd.h
@@ -879,4 +879,6 @@ typedef struct
#endif //ENABLE_VM
+NXT_STATUS cCmdDrawPicture(SLONG x, SLONG y, UBYTE *pFileName, SLONG *pVars,
+ ULONG DrawOptions);
#endif //C_CMD
diff --git a/AT91SAM7S256/Source/modules.h b/AT91SAM7S256/Source/modules.h
index a5f3bb1..c5d6d2b 100644
--- a/AT91SAM7S256/Source/modules.h
+++ b/AT91SAM7S256/Source/modules.h
@@ -25,7 +25,7 @@
#define ON_BRICK_PROGRAMSTEPS 5 // no of on brick program steps
#define STATUSTEXT_SIZE 8 // zero termination not included
-#define TXT_SOUND_EXT "rso" // Sound filename extension
+#define TXT_SOUND_EXT "ric" // Sound filename extension
#define TXT_LMS_EXT "rxe" // Mindstorms program filename extension
#define TXT_NXT_EXT "rpg" // Program filename extension
#define TXT_TRYME_EXT "rtm" // Try me program filename extension