mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-01 09:05:06 +01:00
706e18c6c0
progress, thanks alot to dimok and the whole usb loader gx team for help and the code for it! To zoom the banner to fullscreen click the back button, to zoom out the back button again, known bugs: -some games fuck up the textures of buttons (e.g. wii play motion) -if no wii game or channel was selected and you try to launch a game or exit wiiflow it will most likely codedump
66 lines
1.5 KiB
C++
66 lines
1.5 KiB
C++
/*
|
|
Copyright (c) 2010 - Wii Banner Player Project
|
|
Copyright (c) 2012 - Dimok
|
|
|
|
This software is provided 'as-is', without any express or implied
|
|
warranty. In no event will the authors be held liable for any damages
|
|
arising from the use of this software.
|
|
|
|
Permission is granted to anyone to use this software for any purpose,
|
|
including commercial applications, and to alter it and redistribute it
|
|
freely, subject to the following restrictions:
|
|
|
|
1. The origin of this software must not be misrepresented; you must not
|
|
claim that you wrote the original software. If you use this software
|
|
in a product, an acknowledgment in the product documentation would be
|
|
appreciated but is not required.
|
|
|
|
2. Altered source versions must be plainly marked as such, and must not be
|
|
misrepresented as being the original software.
|
|
|
|
3. This notice may not be removed or altered from any source
|
|
distribution.
|
|
*/
|
|
#ifndef WII_BNR_WINDOW_H_
|
|
#define WII_BNR_WINDOW_H_
|
|
|
|
#include "QuadPane.h"
|
|
|
|
class Window : public QuadPane
|
|
{
|
|
public:
|
|
typedef QuadPane Base;
|
|
|
|
static const u32 MAGIC = MAKE_FOURCC('w', 'n', 'd', '1');
|
|
|
|
void Load(Pane::Header *file);
|
|
|
|
private:
|
|
void Draw(const BannerResources& resources, u8 render_alpha, const float ws_scale, Mtx &view) const;
|
|
|
|
struct inflation
|
|
{
|
|
float l, r, t, b;
|
|
};
|
|
|
|
struct Header
|
|
{
|
|
inflation infl;
|
|
u8 frame_count;
|
|
u8 pad[3];
|
|
u32 content_offset;
|
|
u32 frame_table_offset;
|
|
} __attribute__((packed));
|
|
|
|
struct Frame
|
|
{
|
|
u16 material_index;
|
|
u8 texture_flip;
|
|
} __attribute__((packed));
|
|
|
|
Header *header;
|
|
std::vector<Frame *> frames;
|
|
};
|
|
|
|
#endif
|