finalize 4.0.0

This commit is contained in:
dborth 2009-04-05 01:51:56 +00:00
parent 632e1b2232
commit 6191d5f741
15 changed files with 532 additions and 106 deletions

View File

@ -48,17 +48,20 @@ guides on how to install and get homebrew working on your Nintendo Wii.
| UPDATE HISTORY | | UPDATE HISTORY |
•˜———–—––-- - —————————––––– ———–—––-- - —————————––––– ———–—––-- - ————————• •˜———–—––-- - —————————––––– ———–—––-- - —————————––––– ———–—––-- - ————————•
[4.0.0] [4.0.0 - April 4, 2009]
* New GX-based menu, with a completely redesigned layout. Has Wiimote IR * New GX-based menu, with a completely redesigned layout. Has Wiimote IR
support, sounds, graphics, animation effects, and more support, sounds, graphics, animation effects, and more
* Thanks to the3seashells for designing some top-notch artwork, to
Peter de Man for composing the music, and a special thanks to shagkur for
fixing libogc bugs that would have otherwise prevented the release
* Onscreen keyboard for changing save/load folders and network settings * Onscreen keyboard for changing save/load folders and network settings
* Menu configuration options (configurable exit button, wiimote orientation, * Menu configuration options (configurable exit button, wiimote orientation,
volumes) volumes)
* Configurable button mapping for superscope, mouse and justifier * Configurable button mapping for superscope, mouse and justifier
* New save manager, allowing multiple saves and save browsing. Shows * New save manager, allowing multiple saves and save browsing. Shows
screenshots for Snapshot saves, and save dates/times screenshots for Snapshot saves, and save dates/times
* Experimental hq2x filter * Experimental hq2x filter, contributed by michniewski
[009 - January 27, 2009] [009 - January 27, 2009]

View File

@ -3,9 +3,10 @@
* *
* Tantric January 2009 * Tantric January 2009
* *
* imagelist.h * filelist.h
* *
* Contains a list of all of the images in the images/ folder * Contains a list of all of the files stored in the images/, fonts/, and
* sounds/ folders
***************************************************************************/ ***************************************************************************/
#ifndef _FILELIST_H_ #ifndef _FILELIST_H_
@ -19,9 +20,18 @@ extern const u32 font_ttf_size;
extern const u8 bg_music_ogg[]; extern const u8 bg_music_ogg[];
extern const u32 bg_music_ogg_size; extern const u32 bg_music_ogg_size;
extern const u8 enter_ogg[];
extern const u32 enter_ogg_size;
extern const u8 exit_ogg[];
extern const u32 exit_ogg_size;
extern const u8 button_over_pcm[]; extern const u8 button_over_pcm[];
extern const u32 button_over_pcm_size; extern const u32 button_over_pcm_size;
extern const u8 button_click_pcm[];
extern const u32 button_click_pcm_size;
extern const u8 logo_png[]; extern const u8 logo_png[];
extern const u32 logo_png_size; extern const u32 logo_png_size;

View File

@ -1,15 +1,35 @@
/**************************************************************************** /*!\mainpage libwiigui Documentation
* Snes9x 1.51 Nintendo Wii/Gamecube Port
* *
* Tantric February 2009 * \section Introduction
* libwiigui is a GUI library for the Wii, created to help structure the
* design of a complicated GUI interface, and to enable an author to create
* a sophisticated, feature-rich GUI. It was originally conceived and written
* after I started to design a GUI for Snes9x GX, and found libwiisprite and
* GRRLIB inadequate for the purpose. It uses GX for drawing, and makes use
* of PNGU for displaying images and FreeTypeGX for text. It was designed to
* be flexible and is easy to modify - don't be afraid to change the way it
* works or expand it to suit your GUI's purposes! If you do, and you think
* your changes might benefit others, please share them so they might be
* added to the project!
* *
* gui.h * \section Quickstart
* * Start from the supplied template example. For more advanced uses, see the
* GUI class definitions * source code for Snes9x GX, FCE Ultra GX, and Visual Boy Advance GX.
***************************************************************************/
#ifndef GUI_H * \section Contact
#define GUI_H * If you have any suggestions for the library or documentation, or want to
* contribute, please visit the libwiigui website:
* http://code.google.com/p/libwiigui/
* \section Credits
* This library was wholly designed and written by Tantric. Thanks to the
* authors of PNGU and FreeTypeGX, of which this library makes use. Thanks
* also to the authors of GRRLIB and libwiisprite for laying the foundations.
*
*/
#ifndef LIBWIIGUI_H
#define LIBWIIGUI_H
#include <gccore.h> #include <gccore.h>
#include <malloc.h> #include <malloc.h>
@ -78,233 +98,478 @@ enum
#define EFFECT_SCALE 128 #define EFFECT_SCALE 128
#define EFFECT_COLOR_TRANSITION 256 #define EFFECT_COLOR_TRANSITION 256
//!Sound conversion and playback. A wrapper for other sound libraries - ASND, libmad, ltremor, etc
class GuiSound class GuiSound
{ {
public: public:
//!Constructor
//!\param s Pointer to the sound data
//!\param l Length of sound data
//!\param t Sound format type (SOUND_PCM or SOUND_OGG)
GuiSound(const u8 * s, int l, int t); GuiSound(const u8 * s, int l, int t);
//!Destructor
~GuiSound(); ~GuiSound();
//!Start sound playback
void Play(); void Play();
//!Stop sound playback
void Stop(); void Stop();
//!Pause sound playback
void Pause(); void Pause();
//!Resume sound playback
void Resume(); void Resume();
//!Checks if the sound is currently playing
//!\return true if sound is playing, false otherwise
bool IsPlaying();
//!Set sound volume
//!\param v Sound volume (0-100)
void SetVolume(int v); void SetVolume(int v);
//!Set the sound to loop playback (only applies to OGG)
//!\param l Loop (true to loop)
void SetLoop(bool l);
protected: protected:
const u8 * sound; const u8 * sound; //!< Pointer to the sound data
int type; int type; //!< Sound format type (SOUND_PCM or SOUND_OGG)
s32 length; s32 length; //!< Length of sound data
s32 voice; s32 voice; //!< Currently assigned ASND voice channel
s32 volume; s32 volume; //!< Sound volume (0-100)
bool loop; //!< Loop sound playback
}; };
//!Primary Gui class
class GuiElement class GuiElement
{ {
public: public:
//!Constructor
GuiElement(); GuiElement();
//!Destructor
~GuiElement(); ~GuiElement();
//!Set the element's parent
//!\param e Pointer to parent element
void SetParent(GuiElement * e); void SetParent(GuiElement * e);
//!Gets the current leftmost coordinate of the element
//!Considers horizontal alignment, x offset, width, and parent element's GetLeft() / GetWidth() values
//!\return left coordinate
int GetLeft(); int GetLeft();
//!Gets the current topmost coordinate of the element
//!Considers vertical alignment, y offset, height, and parent element's GetTop() / GetHeight() values
//!\return top coordinate
int GetTop(); int GetTop();
//!Gets the current width of the element. Does not currently consider the scale
//!\return width
int GetWidth(); int GetWidth();
//!Gets the height of the element. Does not currently consider the scale
//!\return height
int GetHeight(); int GetHeight();
//!Sets the size (width/height) of the element
//!\param w Width of element
//!\param h Height of element
void SetSize(int w, int h); void SetSize(int w, int h);
//!Checks whether or not the element is visible
//!\return true if visible, false otherwise
bool IsVisible(); bool IsVisible();
//!Checks whether or not the element is selectable
//!\return true if selectable, false otherwise
bool IsSelectable(); bool IsSelectable();
//!Checks whether or not the element is clickable
//!\return true if clickable, false otherwise
bool IsClickable(); bool IsClickable();
//!Sets whether or not the element is selectable
//!\param s Selectable
void SetSelectable(bool s); void SetSelectable(bool s);
//!Sets whether or not the element is clickable
//!\param c Clickable
void SetClickable(bool c); void SetClickable(bool c);
//!Gets the element's current state
//!\return state
int GetState(); int GetState();
//!Sets the element's alpha value
//!\param a alpha value
void SetAlpha(int a); void SetAlpha(int a);
//!Gets the element's alpha value
//!Considers alpha, alphaDyn, and the parent element's GetAlpha() value
//!\return alpha
int GetAlpha(); int GetAlpha();
//!Sets the element's scale
//!\param s scale (1 is 100%)
void SetScale(float s); void SetScale(float s);
//!Gets the element's current scale
//!Considers scale, scaleDyn, and the parent element's GetScale() value
float GetScale(); float GetScale();
//!Set a new GuiTrigger for the element
//!\param t Pointer to GuiTrigger
void SetTrigger(GuiTrigger * t); void SetTrigger(GuiTrigger * t);
//!\overload
//!\param i Index of trigger array to set
//!\param t Pointer to GuiTrigger
void SetTrigger(u8 i, GuiTrigger * t); void SetTrigger(u8 i, GuiTrigger * t);
//!Checks whether rumble was requested by the element
//!\return true is rumble was requested, false otherwise
bool Rumble(); bool Rumble();
//!Sets whether or not the element is requesting a rumble event
//!\param r true if requesting rumble, false if not
void SetRumble(bool r); void SetRumble(bool r);
//!Set an effect for the element
//!\param e Effect to enable
//!\param a Amount of the effect (usage varies on effect)
//!\param t Target amount of the effect (usage varies on effect)
void SetEffect(int e, int a, int t=0); void SetEffect(int e, int a, int t=0);
//!Sets an effect to be enabled on wiimote cursor over
//!\param e Effect to enable
//!\param a Amount of the effect (usage varies on effect)
//!\param t Target amount of the effect (usage varies on effect)
void SetEffectOnOver(int e, int a, int t=0); void SetEffectOnOver(int e, int a, int t=0);
//!Shortcut to SetEffectOnOver(EFFECT_SCALE, 4, 110)
void SetEffectGrow(); void SetEffectGrow();
//!Gets the current element effects
//!\return element effects
int GetEffect(); int GetEffect();
//!Checks whether the specified coordinates are within the element's boundaries
//!\param x X coordinate
//!\param y Y coordinate
//!\return true if contained within, false otherwise
bool IsInside(int x, int y); bool IsInside(int x, int y);
//!Sets the element's position
//!\param x X coordinate
//!\param y Y coordinate
void SetPosition(int x, int y); void SetPosition(int x, int y);
//!Updates the element's effects (dynamic values)
//!Called by Draw(), used for animation purposes
void UpdateEffects(); void UpdateEffects();
//!Sets a function to called after after Update()
//!Callback function can be used to response to changes in the state of the element, and/or update the element's attributes
void SetUpdateCallback(UpdateCallback u); void SetUpdateCallback(UpdateCallback u);
//!Checks whether the element is in focus
//!\return true if element is in focus, false otherwise
int IsFocused(); int IsFocused();
//!Sets the element's visibility
//!\param v Visibility (true = visible)
virtual void SetVisible(bool v); virtual void SetVisible(bool v);
//!Sets the element's focus
//!\param v Focus (true = in focus)
virtual void SetFocus(int f); virtual void SetFocus(int f);
//!Sets the element's state
//!\param v State (STATE_DEFAULT, STATE_SELECTED, STATE_CLICKED, STATE_DISABLED)
virtual void SetState(int s); virtual void SetState(int s);
//!Resets the element's state to STATE_DEFAULT
virtual void ResetState(); virtual void ResetState();
//!Gets whether or not the element is in STATE_SELECTED
//!\return true if selected, false otherwise
virtual int GetSelected(); virtual int GetSelected();
//!Sets the element's alignment respective to its parent element
//!\param hor Horizontal alignment (ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTRE)
//!\param vert Vertical alignment (ALIGN_TOP, ALIGN_BOTTOM, ALIGN_MIDDLE)
virtual void SetAlignment(int hor, int vert); virtual void SetAlignment(int hor, int vert);
//!Called constantly to allow the element to respond to the current input data
//!\param t Pointer to a GuiTrigger, containing the current input data from PAD/WPAD
virtual void Update(GuiTrigger * t); virtual void Update(GuiTrigger * t);
//!Called constantly to redraw the element
virtual void Draw(); virtual void Draw();
protected: protected:
bool visible; bool visible; //!< Visibility of the element. If false, Draw() is skipped
int focus; // -1 = cannot focus, 0 = not focused, 1 = focused int focus; //!< Element focus (-1 = focus disabled, 0 = not focused, 1 = focused)
int width; int width; //!< Element width
int height; int height; //!< Element height
int xoffset; int xoffset; //!< Element X offset
int yoffset; int yoffset; //!< Element Y offset
int xoffsetDyn; int xoffsetDyn; //!< Element X offset, dynamic (added to xoffset value for animation effects)
int yoffsetDyn; int yoffsetDyn; //!< Element Y offset, dynamic (added to yoffset value for animation effects)
int alpha; int alpha; //!< Element alpha value (0-255)
f32 scale; f32 scale; //!< Element scale (1 = 100%)
int alphaDyn; int alphaDyn; //!< Element alpha, dynamic (multiplied by alpha value for blending/fading effects)
f32 scaleDyn; f32 scaleDyn; //!< Element scale, dynamic (multiplied by alpha value for blending/fading effects)
bool rumble; bool rumble; //!< Wiimote rumble (on/off) - set to on when this element requests a rumble event
int effects; int effects; //!< Currently enabled effect(s). 0 when no effects are enabled
int effectAmount; int effectAmount; //!< Effect amount. Used by different effects for different purposes
int effectTarget; int effectTarget; //!< Effect target amount. Used by different effects for different purposes
int effectsOver; int effectsOver; //!< Effects to enable when wiimote cursor is over this element. Copied to effects variable on over event
int effectAmountOver; int effectAmountOver; //!< EffectAmount to set when wiimote cursor is over this element
int effectTargetOver; int effectTargetOver; //!< EffectTarget to set when wiimote cursor is over this element
int alignmentHor; // LEFT, RIGHT, CENTRE int alignmentHor; //!< Horizontal element alignment, respective to parent element (LEFT, RIGHT, CENTRE)
int alignmentVert; // TOP, BOTTOM, MIDDLE int alignmentVert; //!< Horizontal element alignment, respective to parent element (TOP, BOTTOM, MIDDLE)
int state; // DEFAULT, SELECTED, CLICKED, DISABLED int state; //!< Element state (DEFAULT, SELECTED, CLICKED, DISABLED)
bool selectable; // is SELECTED a valid state? bool selectable; //!< Whether or not this element selectable (can change to SELECTED state)
bool clickable; // is CLICKED a valid state? bool clickable; //!< Whether or not this element is clickable (can change to CLICKED state)
GuiTrigger * trigger[2]; GuiTrigger * trigger[2]; //!< GuiTriggers (input actions) that this element responds to
GuiElement * parentElement; GuiElement * parentElement; //!< Parent element
UpdateCallback updateCB; UpdateCallback updateCB; //!< Callback function to call when this element is updated
}; };
//!Groups elements into one window in which they can be managed. //!Allows GuiElements to be grouped together into a "window"
class GuiWindow : public GuiElement class GuiWindow : public GuiElement
{ {
public: public:
//!Constructor //!Constructor
GuiWindow(); GuiWindow();
//!\overload
//!\param w Width of window
//!\param h Height of window
GuiWindow(int w, int h); GuiWindow(int w, int h);
//!Destructor. //!Destructor
~GuiWindow(); ~GuiWindow();
//!Appends a GuiElement to the GuiWindow
//!Appends a element at the end, thus drawing it at last. //!\param e The GuiElement to append. If it is already in the GuiWindow, it is removed first
//!\param element The element to append. If it is already in the list, it gets removed first.
void Append(GuiElement* e); void Append(GuiElement* e);
//!Inserts a element into the manager. //!Inserts a GuiElement into the GuiWindow at the specified index
//!\param element The element to insert. If it is already in the list, it gets removed first. //!\param e The GuiElement to insert. If it is already in the GuiWindow, it is removed first
//!\param index The new index of the element. //!\param i Index in which to insert the element
void Insert(GuiElement* e, u32 index); void Insert(GuiElement* e, u32 i);
//!Removes a element from the list. //!Removes the specified GuiElement from the GuiWindow
//!\param element A element that is in the list. //!\param e GuiElement to be removed
void Remove(GuiElement* e); void Remove(GuiElement* e);
//!Clears the whole GuiWindow from all GuiElement. //!Removes all GuiElements
void RemoveAll(); void RemoveAll();
//!Returns the GuiElement at the specified index
//!Returns a element at a specified index. //!\param index The index of the element
//!\param index The index from where to poll the element. //!\return A pointer to the element at the index, NULL on error (eg: out of bounds)
//!\return A pointer to the element at the index. NULL if index is out of bounds.
GuiElement* GetGuiElementAt(u32 index) const; GuiElement* GetGuiElementAt(u32 index) const;
//!Returns the size of the list of elements. //!Returns the size of the list of elements
//!\return The size of the current elementlist. //!\return The size of the current element list
u32 GetSize(); u32 GetSize();
//!Sets the visibility of the window
//!\param v visibility (true = visible)
void SetVisible(bool v); void SetVisible(bool v);
//!Resets the window's state to STATE_DEFAULT
void ResetState(); void ResetState();
//!Sets the window's state
//!\param s State
void SetState(int s); void SetState(int s);
//!Gets the index of the GuiElement inside the window that is currently selected
//!\return index of selected GuiElement
int GetSelected(); int GetSelected();
//!Sets the window focus
//!\param f Focus
void SetFocus(int f); void SetFocus(int f);
//!Change the focus to the specified element
//!This is intended for the primary GuiWindow only
//!\param e GuiElement that should have focus
void ChangeFocus(GuiElement * e); void ChangeFocus(GuiElement * e);
//!Changes window focus to the next focusable window or element
//!If no element is in focus, changes focus to the first available element
//!If B or 1 button is pressed, changes focus to the next available element
//!This is intended for the primary GuiWindow only
//!\param t Pointer to a GuiTrigger, containing the current input data from PAD/WPAD
void ToggleFocus(GuiTrigger * t); void ToggleFocus(GuiTrigger * t);
//!Moves the selected element to the element to the left or right
//!\param d Direction to move (-1 = left, 1 = right)
void MoveSelectionHor(int d); void MoveSelectionHor(int d);
//!Moves the selected element to the element above or below
//!\param d Direction to move (-1 = up, 1 = down)
void MoveSelectionVert(int d); void MoveSelectionVert(int d);
//!Draws all the elements in this GuiWindow
//!Draws all the elements in this GuiWindow.
void Draw(); void Draw();
//!Updates the window and all elements contains within
//!Allows the GuiWindow and all elements to respond to the input data specified
//!\param t Pointer to a GuiTrigger, containing the current input data from PAD/WPAD
void Update(GuiTrigger * t); void Update(GuiTrigger * t);
protected: protected:
std::vector<GuiElement*> _elements; std::vector<GuiElement*> _elements; //!< Contains all elements within the GuiWindow
}; };
//!Converts image data into GX-useable RGBA8
//!Currently designed for use only with PNG files
class GuiImageData class GuiImageData
{ {
public: public:
//!Constructor
//!Converts the image data to RGBA8 - expects PNG format
//!\param i Image data
GuiImageData(const u8 * i); GuiImageData(const u8 * i);
//!Destructor
~GuiImageData(); ~GuiImageData();
//!Gets a pointer to the image data
//!\return pointer to image data
u8 * GetImage(); u8 * GetImage();
//!Gets the image width
//!\return image width
int GetWidth(); int GetWidth();
//!Gets the image height
//!\return image height
int GetHeight(); int GetHeight();
protected: protected:
u8 * data; u8 * data; //!< Image data
int height; int height; //!< Height of image
int width; int width; //!< Width of image
}; };
//!Display, manage, and manipulate images in the Gui
class GuiImage : public GuiElement class GuiImage : public GuiElement
{ {
public: public:
//!Constructor
//!\param img Pointer to GuiImageData element
GuiImage(GuiImageData * img); GuiImage(GuiImageData * img);
//!\overload
//!Sets up a new image from the image data specified
//!\param img
//!\param w Image width
//!\param h Image height
GuiImage(u8 * img, int w, int h); GuiImage(u8 * img, int w, int h);
//!\overload
//!Creates an image filled with the specified color
//!\param w Image width
//!\param h Image height
//!\param c Image color
GuiImage(int w, int h, GXColor c); GuiImage(int w, int h, GXColor c);
//!Destructor
~GuiImage(); ~GuiImage();
//!Sets the image rotation angle for drawing
//!\param a Angle (in degrees)
void SetAngle(float a); void SetAngle(float a);
//!Sets the number of times to draw the image horizontally
//!\param t Number of times to draw the image
void SetTile(int t); void SetTile(int t);
//!Constantly called to draw the image
void Draw(); void Draw();
//!Gets the image data
//!\return pointer to image data
u8 * GetImage(); u8 * GetImage();
//!Sets up a new image using the GuiImageData object specified
//!\param img Pointer to GuiImageData object
void SetImage(GuiImageData * img); void SetImage(GuiImageData * img);
//!\overload
//!\param img Pointer to image data
//!\param w Width
//!\param h Height
void SetImage(u8 * img, int w, int h); void SetImage(u8 * img, int w, int h);
//!Gets the pixel color at the specified coordinates of the image
//!\param x X coordinate
//!\param y Y coordinate
GXColor GetPixel(int x, int y); GXColor GetPixel(int x, int y);
//!Sets the pixel color at the specified coordinates of the image
//!\param x X coordinate
//!\param y Y coordinate
//!\param color Pixel color
void SetPixel(int x, int y, GXColor color); void SetPixel(int x, int y, GXColor color);
//!Directly modifies the image data to create a color-striped effect
//!Alters the RGB values by the specified amount
//!\param s Amount to increment/decrement the RGB values in the image
void ColorStripe(int s); void ColorStripe(int s);
//!Sets a stripe effect on the image, overlaying alpha blended rectangles
//!Does not alter the image data
//!\param s Alpha amount to draw over the image
void SetStripe(int s); void SetStripe(int s);
protected: protected:
int imgType; int imgType; //!< Type of image data (IMAGE_TEXTURE, IMAGE_COLOR, IMAGE_DATA)
u8 * image; u8 * image; //!< Poiner to image data. May be shared with GuiImageData data
f32 imageangle; f32 imageangle; //!< Angle to draw the image
int tile; int tile; //!< Number of times to draw (tile) the image horizontally
int stripe; int stripe; //!< Alpha value (0-255) to apply a stripe effect to the texture
}; };
//!Display, manage, and manipulate text in the Gui
class GuiText : public GuiElement class GuiText : public GuiElement
{ {
public: public:
//!Constructor
//!\param t Text
//!\param s Font size
//!\param c Font color
GuiText(const char * t, int s, GXColor c); GuiText(const char * t, int s, GXColor c);
//!\overload
//!\Assumes SetPresets() has been called to setup preferred text attributes
//!\param t Text
GuiText(const char * t); GuiText(const char * t);
//!Destructor
~GuiText(); ~GuiText();
//!Sets the text of the GuiText element
//!\param t Text
void SetText(const char * t); void SetText(const char * t);
//!Sets up preset values to be used by GuiText(t)
//!Useful when printing multiple text elements, all with the same attributes set
//!\param sz Font size
//!\param c Font color
//!\param w Maximum width of texture image (for text wrapping)
//!\param s Font size
//!\param h Text alignment (horizontal)
//!\param v Text alignment (vertical)
void SetPresets(int sz, GXColor c, int w, u16 s, int h, int v); void SetPresets(int sz, GXColor c, int w, u16 s, int h, int v);
//!Sets the font size
//!\param s Font size
void SetFontSize(int s); void SetFontSize(int s);
//!Sets the maximum width of the drawn texture image
//!If the text exceeds this, it is wrapped to the next line
//!\param w Maximum width
void SetMaxWidth(int w); void SetMaxWidth(int w);
//!Sets the font color
//!\param c Font color
void SetColor(GXColor c); void SetColor(GXColor c);
//!Sets the FreeTypeGX style attributes
//!\param s Style attributes
void SetStyle(u16 s); void SetStyle(u16 s);
//!Sets the text alignment
//!\param hor Horizontal alignment (ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTRE)
//!\param vert Vertical alignment (ALIGN_TOP, ALIGN_BOTTOM, ALIGN_MIDDLE)
void SetAlignment(int hor, int vert); void SetAlignment(int hor, int vert);
//!Constantly called to draw the text
void Draw(); void Draw();
protected: protected:
wchar_t* text; wchar_t* text; //!< Unicode text value
int size; int size; //!< Font size
int maxWidth; int maxWidth; //!< Maximum width of the generated text object (for text wrapping)
u16 style; u16 style; //!< FreeTypeGX style attributes
GXColor color; GXColor color; //!< Font color
}; };
//!Display, manage, and manipulate buttons in the Gui
//!Buttons can have images, icons, text, and sound set (all of which are optional)
class GuiButton : public GuiElement class GuiButton : public GuiElement
{ {
public: public:
//!Constructor
//!\param w Width
//!\param h Height
GuiButton(int w, int h); GuiButton(int w, int h);
//!Destructor
~GuiButton(); ~GuiButton();
//!Sets the button's image
//!\param i Pointer to GuiImage object
void SetImage(GuiImage* i); void SetImage(GuiImage* i);
//!Sets the button's image on over
//!\param i Pointer to GuiImage object
void SetImageOver(GuiImage* i); void SetImageOver(GuiImage* i);
//!Sets the button's icon
//!\param i Pointer to GuiImage object
void SetIcon(GuiImage* i); void SetIcon(GuiImage* i);
//!Sets the button's icon on over
//!\param i Pointer to GuiImage object
void SetIconOver(GuiImage* i); void SetIconOver(GuiImage* i);
//!Sets the button's label
//!\param t Pointer to GuiText object
void SetLabel(GuiText* t); void SetLabel(GuiText* t);
void SetLabelOver(GuiText* t); //!\overload
//!\param t Pointer to GuiText object
//!\param n Index of label to set
void SetLabel(GuiText* t, int n); void SetLabel(GuiText* t, int n);
//!Sets the button's label on over (eg: different colored text)
//!\param t Pointer to GuiText object
void SetLabelOver(GuiText* t);
//!\overload
//!\param t Pointer to GuiText object
//!\param n Index of label to set
void SetLabelOver(GuiText* t, int n); void SetLabelOver(GuiText* t, int n);
//!Sets the sound to play on over
//!\param s Pointer to GuiSound object
void SetSoundOver(GuiSound * s); void SetSoundOver(GuiSound * s);
//!Sets the sound to play on click
//!\param s Pointer to GuiSound object
void SetSoundClick(GuiSound * s); void SetSoundClick(GuiSound * s);
//!Constantly called to draw the GuiButton
void Draw(); void Draw();
//!Constantly called to allow the GuiButton to respond to updated input data
//!\param t Pointer to a GuiTrigger, containing the current input data from PAD/WPAD
void Update(GuiTrigger * t); void Update(GuiTrigger * t);
protected: protected:
GuiImage * image; GuiImage * image; //!< Button image
GuiImage * imageOver; GuiImage * imageOver; //!< Button image on wiimote cursor over
GuiImage * icon; GuiImage * icon; //!< Button icon (drawn after button image)
GuiImage * iconOver; GuiImage * iconOver; //!< Button icon on wiimote cursor over
GuiText * label[3]; GuiText * label[3]; //!< Label(s) to display
GuiText * labelOver[3]; GuiText * labelOver[3]; //!< Label(s) to display on wiimote cursor over
GuiSound * soundOver; GuiSound * soundOver; //!< Sound to play on wiimote cursor over
GuiSound * soundClick; GuiSound * soundClick; //!< Sound to play on click
}; };
//!Display a list of files
class GuiFileBrowser : public GuiElement class GuiFileBrowser : public GuiElement
{ {
public: public:
@ -348,6 +613,8 @@ class GuiFileBrowser : public GuiElement
GuiImageData * scrollbarBox; GuiImageData * scrollbarBox;
GuiImageData * scrollbarBoxOver; GuiImageData * scrollbarBoxOver;
GuiSound * btnSoundOver;
GuiSound * btnSoundClick;
GuiTrigger * trigA; GuiTrigger * trigA;
}; };
@ -357,6 +624,7 @@ typedef struct _optionlist {
char value[MAX_OPTIONS][150]; char value[MAX_OPTIONS][150];
} OptionList; } OptionList;
//!Display a list of menu options
class GuiOptionBrowser : public GuiElement class GuiOptionBrowser : public GuiElement
{ {
public: public:
@ -403,6 +671,8 @@ class GuiOptionBrowser : public GuiElement
GuiImageData * scrollbarBox; GuiImageData * scrollbarBox;
GuiImageData * scrollbarBoxOver; GuiImageData * scrollbarBoxOver;
GuiSound * btnSoundOver;
GuiSound * btnSoundClick;
GuiTrigger * trigA; GuiTrigger * trigA;
}; };
@ -416,6 +686,7 @@ typedef struct _savelist {
int files[2][100]; int files[2][100];
} SaveList; } SaveList;
//!Display a list of game save files, with screenshots and file information
class GuiSaveBrowser : public GuiElement class GuiSaveBrowser : public GuiElement
{ {
public: public:
@ -464,6 +735,8 @@ class GuiSaveBrowser : public GuiElement
GuiImageData * scrollbarBox; GuiImageData * scrollbarBox;
GuiImageData * scrollbarBoxOver; GuiImageData * scrollbarBoxOver;
GuiSound * btnSoundOver;
GuiSound * btnSoundClick;
GuiTrigger * trigA; GuiTrigger * trigA;
}; };
@ -471,6 +744,7 @@ typedef struct _keytype {
char ch, chShift; char ch, chShift;
} Key; } Key;
//!On-screen keyboard
class GuiKeyboard : public GuiWindow class GuiKeyboard : public GuiWindow
{ {
public: public:
@ -512,6 +786,7 @@ class GuiKeyboard : public GuiWindow
GuiImageData * keyLarge; GuiImageData * keyLarge;
GuiImageData * keyLargeOver; GuiImageData * keyLargeOver;
GuiSound * keySoundOver; GuiSound * keySoundOver;
GuiSound * keySoundClick;
GuiTrigger * trigA; GuiTrigger * trigA;
}; };

View File

@ -29,6 +29,9 @@ GuiFileBrowser::GuiFileBrowser(int w, int h)
else else
trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
btnSoundOver = new GuiSound(button_over_pcm, button_over_pcm_size, SOUND_PCM);
btnSoundClick = new GuiSound(button_click_pcm, button_click_pcm_size, SOUND_PCM);
bgGameSelection = new GuiImageData(bg_game_selection_png); bgGameSelection = new GuiImageData(bg_game_selection_png);
bgGameSelectionImg = new GuiImage(bgGameSelection); bgGameSelectionImg = new GuiImage(bgGameSelection);
bgGameSelectionImg->SetParent(this); bgGameSelectionImg->SetParent(this);
@ -63,6 +66,8 @@ GuiFileBrowser::GuiFileBrowser(int w, int h)
arrowUpBtn->SetAlignment(ALIGN_RIGHT, ALIGN_TOP); arrowUpBtn->SetAlignment(ALIGN_RIGHT, ALIGN_TOP);
arrowUpBtn->SetSelectable(false); arrowUpBtn->SetSelectable(false);
arrowUpBtn->SetTrigger(trigA); arrowUpBtn->SetTrigger(trigA);
arrowUpBtn->SetSoundOver(btnSoundOver);
arrowUpBtn->SetSoundClick(btnSoundClick);
arrowDownBtn = new GuiButton(arrowDownImg->GetWidth(), arrowDownImg->GetHeight()); arrowDownBtn = new GuiButton(arrowDownImg->GetWidth(), arrowDownImg->GetHeight());
arrowDownBtn->SetParent(this); arrowDownBtn->SetParent(this);
@ -71,6 +76,8 @@ GuiFileBrowser::GuiFileBrowser(int w, int h)
arrowDownBtn->SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM); arrowDownBtn->SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM);
arrowDownBtn->SetSelectable(false); arrowDownBtn->SetSelectable(false);
arrowDownBtn->SetTrigger(trigA); arrowDownBtn->SetTrigger(trigA);
arrowDownBtn->SetSoundOver(btnSoundOver);
arrowDownBtn->SetSoundClick(btnSoundClick);
scrollbarBoxBtn = new GuiButton(scrollbarBoxImg->GetWidth(), scrollbarBoxImg->GetHeight()); scrollbarBoxBtn = new GuiButton(scrollbarBoxImg->GetWidth(), scrollbarBoxImg->GetHeight());
scrollbarBoxBtn->SetParent(this); scrollbarBoxBtn->SetParent(this);
@ -94,6 +101,7 @@ GuiFileBrowser::GuiFileBrowser(int w, int h)
gameList[i]->SetImageOver(gameListBg[i]); gameList[i]->SetImageOver(gameListBg[i]);
gameList[i]->SetPosition(2,30*i+3); gameList[i]->SetPosition(2,30*i+3);
gameList[i]->SetTrigger(trigA); gameList[i]->SetTrigger(trigA);
gameList[i]->SetSoundClick(btnSoundClick);
} }
} }
@ -126,6 +134,8 @@ GuiFileBrowser::~GuiFileBrowser()
delete scrollbarBox; delete scrollbarBox;
delete scrollbarBoxOver; delete scrollbarBoxOver;
delete btnSoundOver;
delete btnSoundClick;
delete trigA; delete trigA;
for(int i=0; i<PAGESIZE; i++) for(int i=0; i<PAGESIZE; i++)

View File

@ -99,6 +99,7 @@ GuiKeyboard::GuiKeyboard(char * t, u16 max)
keyLargeOver = new GuiImageData(keyboard_largekey_over_png); keyLargeOver = new GuiImageData(keyboard_largekey_over_png);
keySoundOver = new GuiSound(button_over_pcm, button_over_pcm_size, SOUND_PCM); keySoundOver = new GuiSound(button_over_pcm, button_over_pcm_size, SOUND_PCM);
keySoundClick = new GuiSound(button_click_pcm, button_click_pcm_size, SOUND_PCM);
trigA = new GuiTrigger; trigA = new GuiTrigger;
if(GCSettings.WiimoteOrientation) if(GCSettings.WiimoteOrientation)
@ -114,6 +115,7 @@ GuiKeyboard::GuiKeyboard(char * t, u16 max)
keyBack->SetImageOver(keyBackOverImg); keyBack->SetImageOver(keyBackOverImg);
keyBack->SetLabel(keyBackText); keyBack->SetLabel(keyBackText);
keyBack->SetSoundOver(keySoundOver); keyBack->SetSoundOver(keySoundOver);
keyBack->SetSoundClick(keySoundClick);
keyBack->SetTrigger(trigA); keyBack->SetTrigger(trigA);
keyBack->SetPosition(10*42+40, 0*42+80); keyBack->SetPosition(10*42+40, 0*42+80);
keyBack->SetEffectGrow(); keyBack->SetEffectGrow();
@ -127,6 +129,7 @@ GuiKeyboard::GuiKeyboard(char * t, u16 max)
keyCaps->SetImageOver(keyCapsOverImg); keyCaps->SetImageOver(keyCapsOverImg);
keyCaps->SetLabel(keyCapsText); keyCaps->SetLabel(keyCapsText);
keyCaps->SetSoundOver(keySoundOver); keyCaps->SetSoundOver(keySoundOver);
keyCaps->SetSoundClick(keySoundClick);
keyCaps->SetTrigger(trigA); keyCaps->SetTrigger(trigA);
keyCaps->SetPosition(0, 2*42+80); keyCaps->SetPosition(0, 2*42+80);
keyCaps->SetEffectGrow(); keyCaps->SetEffectGrow();
@ -140,6 +143,7 @@ GuiKeyboard::GuiKeyboard(char * t, u16 max)
keyShift->SetImageOver(keyShiftOverImg); keyShift->SetImageOver(keyShiftOverImg);
keyShift->SetLabel(keyShiftText); keyShift->SetLabel(keyShiftText);
keyShift->SetSoundOver(keySoundOver); keyShift->SetSoundOver(keySoundOver);
keyShift->SetSoundClick(keySoundClick);
keyShift->SetTrigger(trigA); keyShift->SetTrigger(trigA);
keyShift->SetPosition(21, 3*42+80); keyShift->SetPosition(21, 3*42+80);
keyShift->SetEffectGrow(); keyShift->SetEffectGrow();
@ -151,6 +155,7 @@ GuiKeyboard::GuiKeyboard(char * t, u16 max)
keySpace->SetImage(keySpaceImg); keySpace->SetImage(keySpaceImg);
keySpace->SetImageOver(keySpaceOverImg); keySpace->SetImageOver(keySpaceOverImg);
keySpace->SetSoundOver(keySoundOver); keySpace->SetSoundOver(keySoundOver);
keySpace->SetSoundClick(keySoundClick);
keySpace->SetTrigger(trigA); keySpace->SetTrigger(trigA);
keySpace->SetPosition(0, 4*42+80); keySpace->SetPosition(0, 4*42+80);
keySpace->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); keySpace->SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
@ -170,6 +175,7 @@ GuiKeyboard::GuiKeyboard(char * t, u16 max)
keyBtn[i][j]->SetImage(keyImg[i][j]); keyBtn[i][j]->SetImage(keyImg[i][j]);
keyBtn[i][j]->SetImageOver(keyImgOver[i][j]); keyBtn[i][j]->SetImageOver(keyImgOver[i][j]);
keyBtn[i][j]->SetSoundOver(keySoundOver); keyBtn[i][j]->SetSoundOver(keySoundOver);
keyBtn[i][j]->SetSoundClick(keySoundClick);
keyBtn[i][j]->SetTrigger(trigA); keyBtn[i][j]->SetTrigger(trigA);
keyBtn[i][j]->SetLabel(keyTxt[i][j]); keyBtn[i][j]->SetLabel(keyTxt[i][j]);
keyBtn[i][j]->SetPosition(j*42+21*i+40, i*42+80); keyBtn[i][j]->SetPosition(j*42+21*i+40, i*42+80);
@ -209,6 +215,7 @@ GuiKeyboard::~GuiKeyboard()
delete keyLarge; delete keyLarge;
delete keyLargeOver; delete keyLargeOver;
delete keySoundOver; delete keySoundOver;
delete keySoundClick;
delete trigA; delete trigA;
for(int i=0; i<4; i++) for(int i=0; i<4; i++)

View File

@ -30,6 +30,9 @@ GuiOptionBrowser::GuiOptionBrowser(int w, int h, OptionList * l)
else else
trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
btnSoundOver = new GuiSound(button_over_pcm, button_over_pcm_size, SOUND_PCM);
btnSoundClick = new GuiSound(button_click_pcm, button_click_pcm_size, SOUND_PCM);
bgOptions = new GuiImageData(bg_options_png); bgOptions = new GuiImageData(bg_options_png);
bgOptionsImg = new GuiImage(bgOptions); bgOptionsImg = new GuiImage(bgOptions);
bgOptionsImg->SetParent(this); bgOptionsImg->SetParent(this);
@ -63,6 +66,8 @@ GuiOptionBrowser::GuiOptionBrowser(int w, int h, OptionList * l)
arrowUpBtn->SetAlignment(ALIGN_RIGHT, ALIGN_TOP); arrowUpBtn->SetAlignment(ALIGN_RIGHT, ALIGN_TOP);
arrowUpBtn->SetSelectable(false); arrowUpBtn->SetSelectable(false);
arrowUpBtn->SetTrigger(trigA); arrowUpBtn->SetTrigger(trigA);
arrowUpBtn->SetSoundOver(btnSoundOver);
arrowUpBtn->SetSoundClick(btnSoundClick);
arrowDownBtn = new GuiButton(arrowDownImg->GetWidth(), arrowDownImg->GetHeight()); arrowDownBtn = new GuiButton(arrowDownImg->GetWidth(), arrowDownImg->GetHeight());
arrowDownBtn->SetParent(this); arrowDownBtn->SetParent(this);
@ -71,6 +76,8 @@ GuiOptionBrowser::GuiOptionBrowser(int w, int h, OptionList * l)
arrowDownBtn->SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM); arrowDownBtn->SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM);
arrowDownBtn->SetSelectable(false); arrowDownBtn->SetSelectable(false);
arrowDownBtn->SetTrigger(trigA); arrowDownBtn->SetTrigger(trigA);
arrowDownBtn->SetSoundOver(btnSoundOver);
arrowDownBtn->SetSoundClick(btnSoundClick);
scrollbarBoxBtn = new GuiButton(scrollbarBoxImg->GetWidth(), scrollbarBoxImg->GetHeight()); scrollbarBoxBtn = new GuiButton(scrollbarBoxImg->GetWidth(), scrollbarBoxImg->GetHeight());
scrollbarBoxBtn->SetParent(this); scrollbarBoxBtn->SetParent(this);
@ -98,6 +105,7 @@ GuiOptionBrowser::GuiOptionBrowser(int w, int h, OptionList * l)
optionBtn[i]->SetImageOver(optionBg[i]); optionBtn[i]->SetImageOver(optionBg[i]);
optionBtn[i]->SetPosition(0,30*i+3); optionBtn[i]->SetPosition(0,30*i+3);
optionBtn[i]->SetTrigger(trigA); optionBtn[i]->SetTrigger(trigA);
optionBtn[i]->SetSoundClick(btnSoundClick);
} }
} }
@ -130,6 +138,8 @@ GuiOptionBrowser::~GuiOptionBrowser()
delete scrollbarBoxOver; delete scrollbarBoxOver;
delete trigA; delete trigA;
delete btnSoundOver;
delete btnSoundClick;
for(int i=0; i<PAGESIZE; i++) for(int i=0; i<PAGESIZE; i++)
{ {

View File

@ -37,6 +37,9 @@ GuiSaveBrowser::GuiSaveBrowser(int w, int h, SaveList * s, int a)
else else
trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
btnSoundOver = new GuiSound(button_over_pcm, button_over_pcm_size, SOUND_PCM);
btnSoundClick = new GuiSound(button_click_pcm, button_click_pcm_size, SOUND_PCM);
gameSave = new GuiImageData(button_gamesave_png); gameSave = new GuiImageData(button_gamesave_png);
gameSaveOver = new GuiImageData(button_gamesave_over_png); gameSaveOver = new GuiImageData(button_gamesave_over_png);
gameSaveBlank = new GuiImageData(button_gamesave_blank_png); gameSaveBlank = new GuiImageData(button_gamesave_blank_png);
@ -67,6 +70,8 @@ GuiSaveBrowser::GuiSaveBrowser(int w, int h, SaveList * s, int a)
arrowUpBtn->SetAlignment(ALIGN_RIGHT, ALIGN_TOP); arrowUpBtn->SetAlignment(ALIGN_RIGHT, ALIGN_TOP);
arrowUpBtn->SetSelectable(false); arrowUpBtn->SetSelectable(false);
arrowUpBtn->SetTrigger(trigA); arrowUpBtn->SetTrigger(trigA);
arrowUpBtn->SetSoundOver(btnSoundOver);
arrowUpBtn->SetSoundClick(btnSoundClick);
arrowDownBtn = new GuiButton(arrowDownImg->GetWidth(), arrowDownImg->GetHeight()); arrowDownBtn = new GuiButton(arrowDownImg->GetWidth(), arrowDownImg->GetHeight());
arrowDownBtn->SetParent(this); arrowDownBtn->SetParent(this);
@ -75,6 +80,8 @@ GuiSaveBrowser::GuiSaveBrowser(int w, int h, SaveList * s, int a)
arrowDownBtn->SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM); arrowDownBtn->SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM);
arrowDownBtn->SetSelectable(false); arrowDownBtn->SetSelectable(false);
arrowDownBtn->SetTrigger(trigA); arrowDownBtn->SetTrigger(trigA);
arrowDownBtn->SetSoundOver(btnSoundOver);
arrowDownBtn->SetSoundClick(btnSoundClick);
scrollbarBoxBtn = new GuiButton(scrollbarBoxImg->GetWidth(), scrollbarBoxImg->GetHeight()); scrollbarBoxBtn = new GuiButton(scrollbarBoxImg->GetWidth(), scrollbarBoxImg->GetHeight());
scrollbarBoxBtn->SetParent(this); scrollbarBoxBtn->SetParent(this);
@ -116,6 +123,8 @@ GuiSaveBrowser::GuiSaveBrowser(int w, int h, SaveList * s, int a)
saveBtn[i]->SetState(STATE_DISABLED); saveBtn[i]->SetState(STATE_DISABLED);
saveBtn[i]->SetEffectGrow(); saveBtn[i]->SetEffectGrow();
saveBtn[i]->SetVisible(false); saveBtn[i]->SetVisible(false);
saveBtn[i]->SetSoundOver(btnSoundOver);
saveBtn[i]->SetSoundClick(btnSoundClick);
} }
} }
@ -147,6 +156,8 @@ GuiSaveBrowser::~GuiSaveBrowser()
delete scrollbarBox; delete scrollbarBox;
delete scrollbarBoxOver; delete scrollbarBoxOver;
delete btnSoundOver;
delete btnSoundClick;
delete trigA; delete trigA;
for(int i=0; i<SAVELISTSIZE; i++) for(int i=0; i<SAVELISTSIZE; i++)

View File

@ -20,6 +20,7 @@ GuiSound::GuiSound(const u8 * snd, s32 len, int t)
type = t; type = t;
voice = -1; voice = -1;
volume = 100; volume = 100;
loop = false;
} }
/** /**
@ -27,6 +28,10 @@ GuiSound::GuiSound(const u8 * snd, s32 len, int t)
*/ */
GuiSound::~GuiSound() GuiSound::~GuiSound()
{ {
#ifndef NO_SOUND
if(type == SOUND_OGG)
StopOgg();
#endif
} }
void GuiSound::Play() void GuiSound::Play()
@ -40,13 +45,16 @@ void GuiSound::Play()
vol = 255*(volume/100.0)*(GCSettings.SFXVolume/100.0); vol = 255*(volume/100.0)*(GCSettings.SFXVolume/100.0);
voice = ASND_GetFirstUnusedVoice(); voice = ASND_GetFirstUnusedVoice();
if(voice >= 0) if(voice >= 0)
ASND_SetVoice(voice, VOICE_MONO_8BIT, 8000, 0, ASND_SetVoice(voice, VOICE_STEREO_16BIT, 48000, 0,
(u8 *)sound, length, vol, vol, NULL); (u8 *)sound, length, vol, vol, NULL);
break; break;
case SOUND_OGG: case SOUND_OGG:
voice = 0; voice = 0;
PlayOgg(mem_open((char *)sound, length), 0, OGG_INFINITE_TIME); if(loop)
PlayOgg(mem_open((char *)sound, length), 0, OGG_INFINITE_TIME);
else
PlayOgg(mem_open((char *)sound, length), 0, OGG_ONE_TIME);
SetVolumeOgg(255*(volume/100.0)); SetVolumeOgg(255*(volume/100.0));
break; break;
} }
@ -110,6 +118,14 @@ void GuiSound::Resume()
#endif #endif
} }
bool GuiSound::IsPlaying()
{
if(ASND_StatusVoice(voice) == SND_WORKING || ASND_StatusVoice(voice) == SND_WAITING)
return true;
else
return false;
}
void GuiSound::SetVolume(int vol) void GuiSound::SetVolume(int vol)
{ {
#ifndef NO_SOUND #ifndef NO_SOUND
@ -132,3 +148,8 @@ void GuiSound::SetVolume(int vol)
} }
#endif #endif
} }
void GuiSound::SetLoop(bool l)
{
loop = l;
}

View File

@ -67,6 +67,8 @@ static GuiImage * bgImg = NULL;
static GuiImage * bgTopImg = NULL; static GuiImage * bgTopImg = NULL;
static GuiImage * bgBottomImg = NULL; static GuiImage * bgBottomImg = NULL;
static GuiSound * bgMusic = NULL; static GuiSound * bgMusic = NULL;
static GuiSound * enterSound = NULL;
static GuiSound * exitSound = NULL;
static GuiWindow * mainWindow = NULL; static GuiWindow * mainWindow = NULL;
static GuiText * settingText = NULL; static GuiText * settingText = NULL;
static int lastMenu = MENU_NONE; static int lastMenu = MENU_NONE;
@ -133,6 +135,7 @@ WindowPrompt(const char *title, const char *msg, const char *btn1Label, const ch
promptWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); promptWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
promptWindow.SetPosition(0, -10); promptWindow.SetPosition(0, -10);
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM); GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM);
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
GuiImageData btnOutline(button_png); GuiImageData btnOutline(button_png);
GuiImageData btnOutlineOver(button_over_png); GuiImageData btnOutlineOver(button_over_png);
GuiTrigger trigA; GuiTrigger trigA;
@ -172,6 +175,7 @@ WindowPrompt(const char *title, const char *msg, const char *btn1Label, const ch
btn1.SetImage(&btn1Img); btn1.SetImage(&btn1Img);
btn1.SetImageOver(&btn1ImgOver); btn1.SetImageOver(&btn1ImgOver);
btn1.SetSoundOver(&btnSoundOver); btn1.SetSoundOver(&btnSoundOver);
btn1.SetSoundClick(&btnSoundClick);
btn1.SetTrigger(&trigA); btn1.SetTrigger(&trigA);
btn1.SetState(STATE_SELECTED); btn1.SetState(STATE_SELECTED);
btn1.SetEffectGrow(); btn1.SetEffectGrow();
@ -186,6 +190,7 @@ WindowPrompt(const char *title, const char *msg, const char *btn1Label, const ch
btn2.SetImage(&btn2Img); btn2.SetImage(&btn2Img);
btn2.SetImageOver(&btn2ImgOver); btn2.SetImageOver(&btn2ImgOver);
btn2.SetSoundOver(&btnSoundOver); btn2.SetSoundOver(&btnSoundOver);
btn2.SetSoundClick(&btnSoundClick);
btn2.SetTrigger(&trigA); btn2.SetTrigger(&trigA);
btn2.SetEffectGrow(); btn2.SetEffectGrow();
@ -335,6 +340,7 @@ ProgressWindow(char *title, char *msg)
promptWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); promptWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
promptWindow.SetPosition(0, -10); promptWindow.SetPosition(0, -10);
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM); GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM);
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
GuiImageData btnOutline(button_png); GuiImageData btnOutline(button_png);
GuiImageData btnOutlineOver(button_over_png); GuiImageData btnOutlineOver(button_over_png);
GuiTrigger trigA; GuiTrigger trigA;
@ -572,6 +578,7 @@ static void OnScreenKeyboard(char * var, u16 maxlen)
GuiKeyboard keyboard(var, maxlen); GuiKeyboard keyboard(var, maxlen);
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM); GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM);
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
GuiImageData btnOutline(button_png); GuiImageData btnOutline(button_png);
GuiImageData btnOutlineOver(button_over_png); GuiImageData btnOutlineOver(button_over_png);
GuiTrigger trigA; GuiTrigger trigA;
@ -592,6 +599,7 @@ static void OnScreenKeyboard(char * var, u16 maxlen)
okBtn.SetImage(&okBtnImg); okBtn.SetImage(&okBtnImg);
okBtn.SetImageOver(&okBtnImgOver); okBtn.SetImageOver(&okBtnImgOver);
okBtn.SetSoundOver(&btnSoundOver); okBtn.SetSoundOver(&btnSoundOver);
okBtn.SetSoundClick(&btnSoundClick);
okBtn.SetTrigger(&trigA); okBtn.SetTrigger(&trigA);
okBtn.SetEffectGrow(); okBtn.SetEffectGrow();
@ -605,6 +613,7 @@ static void OnScreenKeyboard(char * var, u16 maxlen)
cancelBtn.SetImage(&cancelBtnImg); cancelBtn.SetImage(&cancelBtnImg);
cancelBtn.SetImageOver(&cancelBtnImgOver); cancelBtn.SetImageOver(&cancelBtnImgOver);
cancelBtn.SetSoundOver(&btnSoundOver); cancelBtn.SetSoundOver(&btnSoundOver);
cancelBtn.SetSoundClick(&btnSoundClick);
cancelBtn.SetTrigger(&trigA); cancelBtn.SetTrigger(&trigA);
cancelBtn.SetEffectGrow(); cancelBtn.SetEffectGrow();
@ -652,6 +661,7 @@ SettingWindow(const char * title, GuiWindow * w)
GuiWindow promptWindow(448,288); GuiWindow promptWindow(448,288);
promptWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); promptWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM); GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM);
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
GuiImageData btnOutline(button_png); GuiImageData btnOutline(button_png);
GuiImageData btnOutlineOver(button_over_png); GuiImageData btnOutlineOver(button_over_png);
GuiTrigger trigA; GuiTrigger trigA;
@ -679,6 +689,7 @@ SettingWindow(const char * title, GuiWindow * w)
okBtn.SetImage(&okBtnImg); okBtn.SetImage(&okBtnImg);
okBtn.SetImageOver(&okBtnImgOver); okBtn.SetImageOver(&okBtnImgOver);
okBtn.SetSoundOver(&btnSoundOver); okBtn.SetSoundOver(&btnSoundOver);
okBtn.SetSoundClick(&btnSoundClick);
okBtn.SetTrigger(&trigA); okBtn.SetTrigger(&trigA);
okBtn.SetEffectGrow(); okBtn.SetEffectGrow();
@ -692,6 +703,7 @@ SettingWindow(const char * title, GuiWindow * w)
cancelBtn.SetImage(&cancelBtnImg); cancelBtn.SetImage(&cancelBtnImg);
cancelBtn.SetImageOver(&cancelBtnImgOver); cancelBtn.SetImageOver(&cancelBtnImgOver);
cancelBtn.SetSoundOver(&btnSoundOver); cancelBtn.SetSoundOver(&btnSoundOver);
cancelBtn.SetSoundClick(&btnSoundClick);
cancelBtn.SetTrigger(&trigA); cancelBtn.SetTrigger(&trigA);
cancelBtn.SetEffectGrow(); cancelBtn.SetEffectGrow();
@ -891,6 +903,7 @@ static int MenuGameSelection()
titleTxt.SetPosition(50,50); titleTxt.SetPosition(50,50);
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM); GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM);
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
GuiImageData iconHome(icon_home_png); GuiImageData iconHome(icon_home_png);
GuiImageData iconSettings(icon_settings_png); GuiImageData iconSettings(icon_settings_png);
GuiImageData btnOutline(button_png); GuiImageData btnOutline(button_png);
@ -917,6 +930,7 @@ static int MenuGameSelection()
settingsBtn.SetImage(&settingsBtnImg); settingsBtn.SetImage(&settingsBtnImg);
settingsBtn.SetImageOver(&settingsBtnImgOver); settingsBtn.SetImageOver(&settingsBtnImgOver);
settingsBtn.SetSoundOver(&btnSoundOver); settingsBtn.SetSoundOver(&btnSoundOver);
settingsBtn.SetSoundClick(&btnSoundClick);
settingsBtn.SetTrigger(&trigA); settingsBtn.SetTrigger(&trigA);
settingsBtn.SetEffectGrow(); settingsBtn.SetEffectGrow();
@ -934,6 +948,7 @@ static int MenuGameSelection()
exitBtn.SetImage(&exitBtnImg); exitBtn.SetImage(&exitBtnImg);
exitBtn.SetImageOver(&exitBtnImgOver); exitBtn.SetImageOver(&exitBtnImgOver);
exitBtn.SetSoundOver(&btnSoundOver); exitBtn.SetSoundOver(&btnSoundOver);
exitBtn.SetSoundClick(&btnSoundClick);
exitBtn.SetTrigger(&trigA); exitBtn.SetTrigger(&trigA);
exitBtn.SetTrigger(&trigHome); exitBtn.SetTrigger(&trigHome);
exitBtn.SetEffectGrow(); exitBtn.SetEffectGrow();
@ -1118,6 +1133,7 @@ static int MenuGame()
titleTxt.SetPosition(50,50); titleTxt.SetPosition(50,50);
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM); GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM);
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
GuiImageData btnOutline(button_png); GuiImageData btnOutline(button_png);
GuiImageData btnOutlineOver(button_over_png); GuiImageData btnOutlineOver(button_over_png);
GuiImageData btnCloseOutline(button_small_png); GuiImageData btnCloseOutline(button_small_png);
@ -1155,6 +1171,7 @@ static int MenuGame()
saveBtn.SetImageOver(&saveBtnImgOver); saveBtn.SetImageOver(&saveBtnImgOver);
saveBtn.SetIcon(&saveBtnIcon); saveBtn.SetIcon(&saveBtnIcon);
saveBtn.SetSoundOver(&btnSoundOver); saveBtn.SetSoundOver(&btnSoundOver);
saveBtn.SetSoundClick(&btnSoundClick);
saveBtn.SetTrigger(&trigA); saveBtn.SetTrigger(&trigA);
saveBtn.SetEffectGrow(); saveBtn.SetEffectGrow();
@ -1170,6 +1187,7 @@ static int MenuGame()
loadBtn.SetImageOver(&loadBtnImgOver); loadBtn.SetImageOver(&loadBtnImgOver);
loadBtn.SetIcon(&loadBtnIcon); loadBtn.SetIcon(&loadBtnIcon);
loadBtn.SetSoundOver(&btnSoundOver); loadBtn.SetSoundOver(&btnSoundOver);
loadBtn.SetSoundClick(&btnSoundClick);
loadBtn.SetTrigger(&trigA); loadBtn.SetTrigger(&trigA);
loadBtn.SetEffectGrow(); loadBtn.SetEffectGrow();
@ -1185,6 +1203,7 @@ static int MenuGame()
resetBtn.SetImageOver(&resetBtnImgOver); resetBtn.SetImageOver(&resetBtnImgOver);
resetBtn.SetIcon(&resetBtnIcon); resetBtn.SetIcon(&resetBtnIcon);
resetBtn.SetSoundOver(&btnSoundOver); resetBtn.SetSoundOver(&btnSoundOver);
resetBtn.SetSoundClick(&btnSoundClick);
resetBtn.SetTrigger(&trigA); resetBtn.SetTrigger(&trigA);
resetBtn.SetEffectGrow(); resetBtn.SetEffectGrow();
@ -1200,6 +1219,7 @@ static int MenuGame()
controllerBtn.SetImageOver(&controllerBtnImgOver); controllerBtn.SetImageOver(&controllerBtnImgOver);
controllerBtn.SetIcon(&controllerBtnIcon); controllerBtn.SetIcon(&controllerBtnIcon);
controllerBtn.SetSoundOver(&btnSoundOver); controllerBtn.SetSoundOver(&btnSoundOver);
controllerBtn.SetSoundClick(&btnSoundClick);
controllerBtn.SetTrigger(&trigA); controllerBtn.SetTrigger(&trigA);
controllerBtn.SetEffectGrow(); controllerBtn.SetEffectGrow();
@ -1215,6 +1235,7 @@ static int MenuGame()
cheatsBtn.SetImageOver(&cheatsBtnImgOver); cheatsBtn.SetImageOver(&cheatsBtnImgOver);
cheatsBtn.SetIcon(&cheatsBtnIcon); cheatsBtn.SetIcon(&cheatsBtnIcon);
cheatsBtn.SetSoundOver(&btnSoundOver); cheatsBtn.SetSoundOver(&btnSoundOver);
cheatsBtn.SetSoundClick(&btnSoundClick);
cheatsBtn.SetTrigger(&trigA); cheatsBtn.SetTrigger(&trigA);
cheatsBtn.SetEffectGrow(); cheatsBtn.SetEffectGrow();
@ -1228,6 +1249,7 @@ static int MenuGame()
mainmenuBtn.SetImage(&mainmenuBtnImg); mainmenuBtn.SetImage(&mainmenuBtnImg);
mainmenuBtn.SetImageOver(&mainmenuBtnImgOver); mainmenuBtn.SetImageOver(&mainmenuBtnImgOver);
mainmenuBtn.SetSoundOver(&btnSoundOver); mainmenuBtn.SetSoundOver(&btnSoundOver);
mainmenuBtn.SetSoundClick(&btnSoundClick);
mainmenuBtn.SetTrigger(&trigA); mainmenuBtn.SetTrigger(&trigA);
mainmenuBtn.SetEffectGrow(); mainmenuBtn.SetEffectGrow();
@ -1241,6 +1263,7 @@ static int MenuGame()
closeBtn.SetImage(&closeBtnImg); closeBtn.SetImage(&closeBtnImg);
closeBtn.SetImageOver(&closeBtnImgOver); closeBtn.SetImageOver(&closeBtnImgOver);
closeBtn.SetSoundOver(&btnSoundOver); closeBtn.SetSoundOver(&btnSoundOver);
closeBtn.SetSoundClick(&btnSoundClick);
closeBtn.SetTrigger(&trigA); closeBtn.SetTrigger(&trigA);
closeBtn.SetTrigger(&trigHome); closeBtn.SetTrigger(&trigHome);
closeBtn.SetEffectGrow(); closeBtn.SetEffectGrow();
@ -1310,6 +1333,7 @@ static int MenuGame()
if(lastMenu == MENU_NONE) if(lastMenu == MENU_NONE)
{ {
enterSound->Play();
bgTopImg->SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 35); bgTopImg->SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 35);
closeBtn.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 35); closeBtn.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 35);
titleTxt.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 35); titleTxt.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 35);
@ -1411,6 +1435,7 @@ static int MenuGame()
{ {
menu = MENU_EXIT; menu = MENU_EXIT;
exitSound->Play();
bgTopImg->SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35); bgTopImg->SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35);
closeBtn.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35); closeBtn.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35);
titleTxt.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35); titleTxt.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35);
@ -1424,13 +1449,13 @@ static int MenuGame()
batteryBtn[3]->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 35); batteryBtn[3]->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 35);
#endif #endif
saveBtn.SetEffect(EFFECT_FADE, -15); saveBtn.SetEffect(EFFECT_FADE, -20);
loadBtn.SetEffect(EFFECT_FADE, -15); loadBtn.SetEffect(EFFECT_FADE, -20);
resetBtn.SetEffect(EFFECT_FADE, -15); resetBtn.SetEffect(EFFECT_FADE, -20);
controllerBtn.SetEffect(EFFECT_FADE, -15); controllerBtn.SetEffect(EFFECT_FADE, -20);
cheatsBtn.SetEffect(EFFECT_FADE, -15); cheatsBtn.SetEffect(EFFECT_FADE, -20);
usleep(150000); // wait for effects to finish usleep(200000); // wait for effects to finish
} }
} }
@ -1485,6 +1510,7 @@ static int MenuGameSaves(int action)
titleTxt.SetText("Save Game"); titleTxt.SetText("Save Game");
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM); GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM);
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
GuiImageData btnOutline(button_png); GuiImageData btnOutline(button_png);
GuiImageData btnOutlineOver(button_over_png); GuiImageData btnOutlineOver(button_over_png);
GuiImageData btnCloseOutline(button_small_png); GuiImageData btnCloseOutline(button_small_png);
@ -1509,6 +1535,7 @@ static int MenuGameSaves(int action)
backBtn.SetImage(&backBtnImg); backBtn.SetImage(&backBtnImg);
backBtn.SetImageOver(&backBtnImgOver); backBtn.SetImageOver(&backBtnImgOver);
backBtn.SetSoundOver(&btnSoundOver); backBtn.SetSoundOver(&btnSoundOver);
backBtn.SetSoundClick(&btnSoundClick);
backBtn.SetTrigger(&trigA); backBtn.SetTrigger(&trigA);
backBtn.SetEffectGrow(); backBtn.SetEffectGrow();
@ -1522,6 +1549,7 @@ static int MenuGameSaves(int action)
closeBtn.SetImage(&closeBtnImg); closeBtn.SetImage(&closeBtnImg);
closeBtn.SetImageOver(&closeBtnImgOver); closeBtn.SetImageOver(&closeBtnImgOver);
closeBtn.SetSoundOver(&btnSoundOver); closeBtn.SetSoundOver(&btnSoundOver);
closeBtn.SetSoundClick(&btnSoundClick);
closeBtn.SetTrigger(&trigA); closeBtn.SetTrigger(&trigA);
closeBtn.SetTrigger(&trigHome); closeBtn.SetTrigger(&trigHome);
closeBtn.SetEffectGrow(); closeBtn.SetEffectGrow();
@ -1704,6 +1732,7 @@ static int MenuGameSaves(int action)
{ {
menu = MENU_EXIT; menu = MENU_EXIT;
exitSound->Play();
bgTopImg->SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35); bgTopImg->SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35);
closeBtn.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35); closeBtn.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35);
titleTxt.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35); titleTxt.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35);
@ -1711,9 +1740,9 @@ static int MenuGameSaves(int action)
bgBottomImg->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 35); bgBottomImg->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 35);
btnLogo->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 35); btnLogo->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 35);
w.SetEffect(EFFECT_FADE, -15); w.SetEffect(EFFECT_FADE, -20);
usleep(150000); // wait for effects to finish usleep(200000); // wait for effects to finish
} }
} }
@ -1752,6 +1781,7 @@ static int MenuGameCheats()
titleTxt.SetPosition(50,50); titleTxt.SetPosition(50,50);
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM); GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM);
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
GuiImageData btnOutline(button_png); GuiImageData btnOutline(button_png);
GuiImageData btnOutlineOver(button_over_png); GuiImageData btnOutlineOver(button_over_png);
GuiImageData btnCloseOutline(button_small_png); GuiImageData btnCloseOutline(button_small_png);
@ -1776,6 +1806,7 @@ static int MenuGameCheats()
backBtn.SetImage(&backBtnImg); backBtn.SetImage(&backBtnImg);
backBtn.SetImageOver(&backBtnImgOver); backBtn.SetImageOver(&backBtnImgOver);
backBtn.SetSoundOver(&btnSoundOver); backBtn.SetSoundOver(&btnSoundOver);
backBtn.SetSoundClick(&btnSoundClick);
backBtn.SetTrigger(&trigA); backBtn.SetTrigger(&trigA);
backBtn.SetEffectGrow(); backBtn.SetEffectGrow();
@ -1789,6 +1820,7 @@ static int MenuGameCheats()
closeBtn.SetImage(&closeBtnImg); closeBtn.SetImage(&closeBtnImg);
closeBtn.SetImageOver(&closeBtnImgOver); closeBtn.SetImageOver(&closeBtnImgOver);
closeBtn.SetSoundOver(&btnSoundOver); closeBtn.SetSoundOver(&btnSoundOver);
closeBtn.SetSoundClick(&btnSoundClick);
closeBtn.SetTrigger(&trigA); closeBtn.SetTrigger(&trigA);
closeBtn.SetTrigger(&trigHome); closeBtn.SetTrigger(&trigHome);
closeBtn.SetEffectGrow(); closeBtn.SetEffectGrow();
@ -1828,6 +1860,7 @@ static int MenuGameCheats()
{ {
menu = MENU_EXIT; menu = MENU_EXIT;
exitSound->Play();
bgTopImg->SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35); bgTopImg->SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35);
closeBtn.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35); closeBtn.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35);
titleTxt.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35); titleTxt.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 35);
@ -1835,9 +1868,9 @@ static int MenuGameCheats()
bgBottomImg->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 35); bgBottomImg->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 35);
btnLogo->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 35); btnLogo->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 35);
w.SetEffect(EFFECT_FADE, -15); w.SetEffect(EFFECT_FADE, -20);
usleep(150000); // wait for effects to finish usleep(200000); // wait for effects to finish
} }
} }
HaltGui(); HaltGui();
@ -1859,6 +1892,7 @@ static int MenuSettings()
titleTxt.SetPosition(50,50); titleTxt.SetPosition(50,50);
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM); GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM);
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
GuiImageData btnOutline(button_png); GuiImageData btnOutline(button_png);
GuiImageData btnOutlineOver(button_over_png); GuiImageData btnOutlineOver(button_over_png);
GuiImageData btnLargeOutline(button_large_png); GuiImageData btnLargeOutline(button_large_png);
@ -1888,6 +1922,7 @@ static int MenuSettings()
mappingBtn.SetImageOver(&mappingBtnImgOver); mappingBtn.SetImageOver(&mappingBtnImgOver);
mappingBtn.SetIcon(&mappingBtnIcon); mappingBtn.SetIcon(&mappingBtnIcon);
mappingBtn.SetSoundOver(&btnSoundOver); mappingBtn.SetSoundOver(&btnSoundOver);
mappingBtn.SetSoundClick(&btnSoundClick);
mappingBtn.SetTrigger(&trigA); mappingBtn.SetTrigger(&trigA);
mappingBtn.SetEffectGrow(); mappingBtn.SetEffectGrow();
@ -1904,6 +1939,7 @@ static int MenuSettings()
videoBtn.SetImageOver(&videoBtnImgOver); videoBtn.SetImageOver(&videoBtnImgOver);
videoBtn.SetIcon(&videoBtnIcon); videoBtn.SetIcon(&videoBtnIcon);
videoBtn.SetSoundOver(&btnSoundOver); videoBtn.SetSoundOver(&btnSoundOver);
videoBtn.SetSoundClick(&btnSoundClick);
videoBtn.SetTrigger(&trigA); videoBtn.SetTrigger(&trigA);
videoBtn.SetEffectGrow(); videoBtn.SetEffectGrow();
@ -1925,6 +1961,7 @@ static int MenuSettings()
savingBtn.SetImageOver(&savingBtnImgOver); savingBtn.SetImageOver(&savingBtnImgOver);
savingBtn.SetIcon(&fileBtnIcon); savingBtn.SetIcon(&fileBtnIcon);
savingBtn.SetSoundOver(&btnSoundOver); savingBtn.SetSoundOver(&btnSoundOver);
savingBtn.SetSoundClick(&btnSoundClick);
savingBtn.SetTrigger(&trigA); savingBtn.SetTrigger(&trigA);
savingBtn.SetEffectGrow(); savingBtn.SetEffectGrow();
@ -1941,6 +1978,7 @@ static int MenuSettings()
menuBtn.SetImageOver(&menuBtnImgOver); menuBtn.SetImageOver(&menuBtnImgOver);
menuBtn.SetIcon(&menuBtnIcon); menuBtn.SetIcon(&menuBtnIcon);
menuBtn.SetSoundOver(&btnSoundOver); menuBtn.SetSoundOver(&btnSoundOver);
menuBtn.SetSoundClick(&btnSoundClick);
menuBtn.SetTrigger(&trigA); menuBtn.SetTrigger(&trigA);
menuBtn.SetEffectGrow(); menuBtn.SetEffectGrow();
@ -1957,6 +1995,7 @@ static int MenuSettings()
networkBtn.SetImageOver(&networkBtnImgOver); networkBtn.SetImageOver(&networkBtnImgOver);
networkBtn.SetIcon(&networkBtnIcon); networkBtn.SetIcon(&networkBtnIcon);
networkBtn.SetSoundOver(&btnSoundOver); networkBtn.SetSoundOver(&btnSoundOver);
networkBtn.SetSoundClick(&btnSoundClick);
networkBtn.SetTrigger(&trigA); networkBtn.SetTrigger(&trigA);
networkBtn.SetEffectGrow(); networkBtn.SetEffectGrow();
@ -1970,6 +2009,7 @@ static int MenuSettings()
backBtn.SetImage(&backBtnImg); backBtn.SetImage(&backBtnImg);
backBtn.SetImageOver(&backBtnImgOver); backBtn.SetImageOver(&backBtnImgOver);
backBtn.SetSoundOver(&btnSoundOver); backBtn.SetSoundOver(&btnSoundOver);
backBtn.SetSoundClick(&btnSoundClick);
backBtn.SetTrigger(&trigA); backBtn.SetTrigger(&trigA);
backBtn.SetEffectGrow(); backBtn.SetEffectGrow();
@ -1983,6 +2023,7 @@ static int MenuSettings()
resetBtn.SetImage(&resetBtnImg); resetBtn.SetImage(&resetBtnImg);
resetBtn.SetImageOver(&resetBtnImgOver); resetBtn.SetImageOver(&resetBtnImgOver);
resetBtn.SetSoundOver(&btnSoundOver); resetBtn.SetSoundOver(&btnSoundOver);
resetBtn.SetSoundClick(&btnSoundClick);
resetBtn.SetTrigger(&trigA); resetBtn.SetTrigger(&trigA);
resetBtn.SetEffectGrow(); resetBtn.SetEffectGrow();
@ -2068,6 +2109,7 @@ static int MenuSettingsMappings()
titleTxt.SetPosition(50,50); titleTxt.SetPosition(50,50);
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM); GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM);
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
GuiImageData btnOutline(button_png); GuiImageData btnOutline(button_png);
GuiImageData btnOutlineOver(button_over_png); GuiImageData btnOutlineOver(button_over_png);
GuiImageData btnLargeOutline(button_large_png); GuiImageData btnLargeOutline(button_large_png);
@ -2096,6 +2138,7 @@ static int MenuSettingsMappings()
snesBtn.SetImageOver(&snesBtnImgOver); snesBtn.SetImageOver(&snesBtnImgOver);
snesBtn.SetIcon(&snesBtnIcon); snesBtn.SetIcon(&snesBtnIcon);
snesBtn.SetSoundOver(&btnSoundOver); snesBtn.SetSoundOver(&btnSoundOver);
snesBtn.SetSoundClick(&btnSoundClick);
snesBtn.SetTrigger(&trigA); snesBtn.SetTrigger(&trigA);
snesBtn.SetEffectGrow(); snesBtn.SetEffectGrow();
@ -2112,6 +2155,7 @@ static int MenuSettingsMappings()
superscopeBtn.SetImageOver(&superscopeBtnImgOver); superscopeBtn.SetImageOver(&superscopeBtnImgOver);
superscopeBtn.SetIcon(&superscopeBtnIcon); superscopeBtn.SetIcon(&superscopeBtnIcon);
superscopeBtn.SetSoundOver(&btnSoundOver); superscopeBtn.SetSoundOver(&btnSoundOver);
superscopeBtn.SetSoundClick(&btnSoundClick);
superscopeBtn.SetTrigger(&trigA); superscopeBtn.SetTrigger(&trigA);
superscopeBtn.SetEffectGrow(); superscopeBtn.SetEffectGrow();
@ -2128,6 +2172,7 @@ static int MenuSettingsMappings()
mouseBtn.SetImageOver(&mouseBtnImgOver); mouseBtn.SetImageOver(&mouseBtnImgOver);
mouseBtn.SetIcon(&mouseBtnIcon); mouseBtn.SetIcon(&mouseBtnIcon);
mouseBtn.SetSoundOver(&btnSoundOver); mouseBtn.SetSoundOver(&btnSoundOver);
mouseBtn.SetSoundClick(&btnSoundClick);
mouseBtn.SetTrigger(&trigA); mouseBtn.SetTrigger(&trigA);
mouseBtn.SetEffectGrow(); mouseBtn.SetEffectGrow();
@ -2143,6 +2188,7 @@ static int MenuSettingsMappings()
justifierBtn.SetImageOver(&justifierBtnImgOver); justifierBtn.SetImageOver(&justifierBtnImgOver);
justifierBtn.SetIcon(&justifierBtnIcon); justifierBtn.SetIcon(&justifierBtnIcon);
justifierBtn.SetSoundOver(&btnSoundOver); justifierBtn.SetSoundOver(&btnSoundOver);
justifierBtn.SetSoundClick(&btnSoundClick);
justifierBtn.SetTrigger(&trigA); justifierBtn.SetTrigger(&trigA);
justifierBtn.SetEffectGrow(); justifierBtn.SetEffectGrow();
@ -2156,6 +2202,7 @@ static int MenuSettingsMappings()
backBtn.SetImage(&backBtnImg); backBtn.SetImage(&backBtnImg);
backBtn.SetImageOver(&backBtnImgOver); backBtn.SetImageOver(&backBtnImgOver);
backBtn.SetSoundOver(&btnSoundOver); backBtn.SetSoundOver(&btnSoundOver);
backBtn.SetSoundClick(&btnSoundClick);
backBtn.SetTrigger(&trigA); backBtn.SetTrigger(&trigA);
backBtn.SetEffectGrow(); backBtn.SetEffectGrow();
@ -2224,6 +2271,7 @@ static int MenuSettingsMappingsController()
subtitleTxt.SetPosition(50,60); subtitleTxt.SetPosition(50,60);
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM); GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM);
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
GuiImageData btnOutline(button_png); GuiImageData btnOutline(button_png);
GuiImageData btnOutlineOver(button_over_png); GuiImageData btnOutlineOver(button_over_png);
GuiImageData btnLargeOutline(button_large_png); GuiImageData btnLargeOutline(button_large_png);
@ -2252,6 +2300,7 @@ static int MenuSettingsMappingsController()
gamecubeBtn.SetImageOver(&gamecubeBtnImgOver); gamecubeBtn.SetImageOver(&gamecubeBtnImgOver);
gamecubeBtn.SetIcon(&gamecubeBtnIcon); gamecubeBtn.SetIcon(&gamecubeBtnIcon);
gamecubeBtn.SetSoundOver(&btnSoundOver); gamecubeBtn.SetSoundOver(&btnSoundOver);
gamecubeBtn.SetSoundClick(&btnSoundClick);
gamecubeBtn.SetTrigger(&trigA); gamecubeBtn.SetTrigger(&trigA);
gamecubeBtn.SetEffectGrow(); gamecubeBtn.SetEffectGrow();
@ -2267,6 +2316,7 @@ static int MenuSettingsMappingsController()
wiimoteBtn.SetImageOver(&wiimoteBtnImgOver); wiimoteBtn.SetImageOver(&wiimoteBtnImgOver);
wiimoteBtn.SetIcon(&wiimoteBtnIcon); wiimoteBtn.SetIcon(&wiimoteBtnIcon);
wiimoteBtn.SetSoundOver(&btnSoundOver); wiimoteBtn.SetSoundOver(&btnSoundOver);
wiimoteBtn.SetSoundClick(&btnSoundClick);
wiimoteBtn.SetTrigger(&trigA); wiimoteBtn.SetTrigger(&trigA);
wiimoteBtn.SetEffectGrow(); wiimoteBtn.SetEffectGrow();
@ -2283,6 +2333,7 @@ static int MenuSettingsMappingsController()
classicBtn.SetImageOver(&classicBtnImgOver); classicBtn.SetImageOver(&classicBtnImgOver);
classicBtn.SetIcon(&classicBtnIcon); classicBtn.SetIcon(&classicBtnIcon);
classicBtn.SetSoundOver(&btnSoundOver); classicBtn.SetSoundOver(&btnSoundOver);
classicBtn.SetSoundClick(&btnSoundClick);
classicBtn.SetTrigger(&trigA); classicBtn.SetTrigger(&trigA);
classicBtn.SetEffectGrow(); classicBtn.SetEffectGrow();
@ -2304,6 +2355,7 @@ static int MenuSettingsMappingsController()
nunchukBtn.SetImageOver(&nunchukBtnImgOver); nunchukBtn.SetImageOver(&nunchukBtnImgOver);
nunchukBtn.SetIcon(&nunchukBtnIcon); nunchukBtn.SetIcon(&nunchukBtnIcon);
nunchukBtn.SetSoundOver(&btnSoundOver); nunchukBtn.SetSoundOver(&btnSoundOver);
nunchukBtn.SetSoundClick(&btnSoundClick);
nunchukBtn.SetTrigger(&trigA); nunchukBtn.SetTrigger(&trigA);
nunchukBtn.SetEffectGrow(); nunchukBtn.SetEffectGrow();
@ -2317,6 +2369,7 @@ static int MenuSettingsMappingsController()
backBtn.SetImage(&backBtnImg); backBtn.SetImage(&backBtnImg);
backBtn.SetImageOver(&backBtnImgOver); backBtn.SetImageOver(&backBtnImgOver);
backBtn.SetSoundOver(&btnSoundOver); backBtn.SetSoundOver(&btnSoundOver);
backBtn.SetSoundClick(&btnSoundClick);
backBtn.SetTrigger(&trigA); backBtn.SetTrigger(&trigA);
backBtn.SetEffectGrow(); backBtn.SetEffectGrow();
@ -2386,6 +2439,7 @@ ButtonMappingWindow()
promptWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); promptWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
promptWindow.SetPosition(0, -10); promptWindow.SetPosition(0, -10);
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM); GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM);
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
GuiImageData btnOutline(button_png); GuiImageData btnOutline(button_png);
GuiImageData btnOutlineOver(button_over_png); GuiImageData btnOutlineOver(button_over_png);
GuiTrigger trigA; GuiTrigger trigA;
@ -2520,6 +2574,7 @@ static int MenuSettingsMappingsMap()
subtitleTxt.SetPosition(50,60); subtitleTxt.SetPosition(50,60);
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM); GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM);
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
GuiImageData btnOutline(button_png); GuiImageData btnOutline(button_png);
GuiImageData btnOutlineOver(button_over_png); GuiImageData btnOutlineOver(button_over_png);
@ -2539,6 +2594,7 @@ static int MenuSettingsMappingsMap()
backBtn.SetImage(&backBtnImg); backBtn.SetImage(&backBtnImg);
backBtn.SetImageOver(&backBtnImgOver); backBtn.SetImageOver(&backBtnImgOver);
backBtn.SetSoundOver(&btnSoundOver); backBtn.SetSoundOver(&btnSoundOver);
backBtn.SetSoundClick(&btnSoundClick);
backBtn.SetTrigger(&trigA); backBtn.SetTrigger(&trigA);
backBtn.SetEffectGrow(); backBtn.SetEffectGrow();
@ -2865,6 +2921,7 @@ static int MenuSettingsVideo()
titleTxt.SetPosition(50,50); titleTxt.SetPosition(50,50);
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM); GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM);
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
GuiImageData btnOutline(button_png); GuiImageData btnOutline(button_png);
GuiImageData btnOutlineOver(button_over_png); GuiImageData btnOutlineOver(button_over_png);
@ -2884,6 +2941,7 @@ static int MenuSettingsVideo()
backBtn.SetImage(&backBtnImg); backBtn.SetImage(&backBtnImg);
backBtn.SetImageOver(&backBtnImgOver); backBtn.SetImageOver(&backBtnImgOver);
backBtn.SetSoundOver(&btnSoundOver); backBtn.SetSoundOver(&btnSoundOver);
backBtn.SetSoundClick(&btnSoundClick);
backBtn.SetTrigger(&trigA); backBtn.SetTrigger(&trigA);
backBtn.SetEffectGrow(); backBtn.SetEffectGrow();
@ -2991,6 +3049,7 @@ static int MenuSettingsFile()
titleTxt.SetPosition(50,50); titleTxt.SetPosition(50,50);
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM); GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM);
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
GuiImageData btnOutline(button_png); GuiImageData btnOutline(button_png);
GuiImageData btnOutlineOver(button_over_png); GuiImageData btnOutlineOver(button_over_png);
@ -3010,6 +3069,7 @@ static int MenuSettingsFile()
backBtn.SetImage(&backBtnImg); backBtn.SetImage(&backBtnImg);
backBtn.SetImageOver(&backBtnImgOver); backBtn.SetImageOver(&backBtnImgOver);
backBtn.SetSoundOver(&btnSoundOver); backBtn.SetSoundOver(&btnSoundOver);
backBtn.SetSoundClick(&btnSoundClick);
backBtn.SetTrigger(&trigA); backBtn.SetTrigger(&trigA);
backBtn.SetEffectGrow(); backBtn.SetEffectGrow();
@ -3171,6 +3231,7 @@ static int MenuSettingsMenu()
titleTxt.SetPosition(50,50); titleTxt.SetPosition(50,50);
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM); GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM);
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
GuiImageData btnOutline(button_png); GuiImageData btnOutline(button_png);
GuiImageData btnOutlineOver(button_over_png); GuiImageData btnOutlineOver(button_over_png);
@ -3190,6 +3251,7 @@ static int MenuSettingsMenu()
backBtn.SetImage(&backBtnImg); backBtn.SetImage(&backBtnImg);
backBtn.SetImageOver(&backBtnImgOver); backBtn.SetImageOver(&backBtnImgOver);
backBtn.SetSoundOver(&btnSoundOver); backBtn.SetSoundOver(&btnSoundOver);
backBtn.SetSoundClick(&btnSoundClick);
backBtn.SetTrigger(&trigA); backBtn.SetTrigger(&trigA);
backBtn.SetEffectGrow(); backBtn.SetEffectGrow();
@ -3303,6 +3365,7 @@ static int MenuSettingsNetwork()
titleTxt.SetPosition(50,50); titleTxt.SetPosition(50,50);
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM); GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM);
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
GuiImageData btnOutline(button_png); GuiImageData btnOutline(button_png);
GuiImageData btnOutlineOver(button_over_png); GuiImageData btnOutlineOver(button_over_png);
@ -3322,6 +3385,7 @@ static int MenuSettingsNetwork()
backBtn.SetImage(&backBtnImg); backBtn.SetImage(&backBtnImg);
backBtn.SetImageOver(&backBtnImgOver); backBtn.SetImageOver(&backBtnImgOver);
backBtn.SetSoundOver(&btnSoundOver); backBtn.SetSoundOver(&btnSoundOver);
backBtn.SetSoundClick(&btnSoundClick);
backBtn.SetTrigger(&trigA); backBtn.SetTrigger(&trigA);
backBtn.SetEffectGrow(); backBtn.SetEffectGrow();
@ -3419,6 +3483,8 @@ MainMenu (int menu)
else else
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM);
GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
GuiImageData bgTop(bg_top_png); GuiImageData bgTop(bg_top_png);
bgTopImg = new GuiImage(&bgTop); bgTopImg = new GuiImage(&bgTop);
GuiImageData bgBottom(bg_bottom_png); GuiImageData bgBottom(bg_bottom_png);
@ -3437,6 +3503,8 @@ MainMenu (int menu)
btnLogo->SetImage(&logoImg); btnLogo->SetImage(&logoImg);
btnLogo->SetImageOver(&logoImgOver); btnLogo->SetImageOver(&logoImgOver);
btnLogo->SetLabel(&logoTxt); btnLogo->SetLabel(&logoTxt);
btnLogo->SetSoundOver(&btnSoundOver);
btnLogo->SetSoundClick(&btnSoundClick);
btnLogo->SetTrigger(&trigA); btnLogo->SetTrigger(&trigA);
btnLogo->SetUpdateCallback(WindowCredits); btnLogo->SetUpdateCallback(WindowCredits);
@ -3460,6 +3528,11 @@ MainMenu (int menu)
#ifndef NO_SOUND #ifndef NO_SOUND
bgMusic = new GuiSound(bg_music_ogg, bg_music_ogg_size, SOUND_OGG); bgMusic = new GuiSound(bg_music_ogg, bg_music_ogg_size, SOUND_OGG);
bgMusic->SetVolume(GCSettings.MusicVolume); bgMusic->SetVolume(GCSettings.MusicVolume);
bgMusic->SetLoop(true);
enterSound = new GuiSound(enter_ogg, enter_ogg_size, SOUND_OGG);
enterSound->SetVolume(GCSettings.SFXVolume);
exitSound = new GuiSound(exit_ogg, exit_ogg_size, SOUND_OGG);
exitSound->SetVolume(GCSettings.SFXVolume);
if(currentMenu == MENU_GAMESELECTION) bgMusic->Play(); // startup music if(currentMenu == MENU_GAMESELECTION) bgMusic->Play(); // startup music
#endif #endif
@ -3517,12 +3590,18 @@ MainMenu (int menu)
ShutoffRumble(); ShutoffRumble();
#endif #endif
#ifndef NO_SOUND
if(exitSound->IsPlaying())
usleep(150000); // give sound more time to play
#endif
CancelAction(); CancelAction();
HaltGui(); HaltGui();
#ifndef NO_SOUND #ifndef NO_SOUND
bgMusic->Stop();
delete bgMusic; delete bgMusic;
delete enterSound;
delete exitSound;
#endif #endif
//delete memTxt; //delete memTxt;

Binary file not shown.

Binary file not shown.

BIN
source/ngc/sounds/enter.ogg Normal file

Binary file not shown.

BIN
source/ngc/sounds/exit.ogg Normal file

Binary file not shown.

View File

@ -582,8 +582,8 @@ InitGCVideo ()
// widescreen fix // widescreen fix
if(CONF_GetAspectRatio() == CONF_ASPECT_16_9) if(CONF_GetAspectRatio() == CONF_ASPECT_16_9)
{ {
vmode->viWidth = 688; vmode->viWidth = VI_MAX_WIDTH_PAL-12;
vmode->viXOrigin = (VI_MAX_WIDTH_PAL - 688) / 2; vmode->viXOrigin = ((VI_MAX_WIDTH_PAL - vmode->viWidth) / 2) + 2;
} }
#endif #endif

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<app version="009"> <app version="010">
<file url="http://snes9x-gx.googlecode.com/files/Snes9x%20GX%20009%20-%20Wii.zip"></file> <file url="http://snes9x-gx.googlecode.com/files/Snes9x%20GX%204.0.0%20-%20Wii.zip"></file>
</app> </app>