Initial commit
9
.gitignore
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
.*.swp
|
||||||
|
*.o
|
||||||
|
*.d
|
||||||
|
*~
|
||||||
|
.*.swp
|
||||||
|
*.dSYM
|
||||||
|
*.pyc
|
||||||
|
.DS_Store
|
||||||
|
|
1
.kateconfig
Normal file
@ -0,0 +1 @@
|
|||||||
|
kate: space-indent off; tab-width 4; indent-width 4; replace-tabs off; eol unix;
|
340
COPYING
Normal file
@ -0,0 +1,340 @@
|
|||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 2, June 1991
|
||||||
|
|
||||||
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||||
|
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
License is intended to guarantee your freedom to share and change free
|
||||||
|
software--to make sure the software is free for all its users. This
|
||||||
|
General Public License applies to most of the Free Software
|
||||||
|
Foundation's software and to any other program whose authors commit to
|
||||||
|
using it. (Some other Free Software Foundation software is covered by
|
||||||
|
the GNU Library General Public License instead.) You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
this service if you wish), that you receive source code or can get it
|
||||||
|
if you want it, that you can change the software or use pieces of it
|
||||||
|
in new free programs; and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid
|
||||||
|
anyone to deny you these rights or to ask you to surrender the rights.
|
||||||
|
These restrictions translate to certain responsibilities for you if you
|
||||||
|
distribute copies of the software, or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must give the recipients all the rights that
|
||||||
|
you have. You must make sure that they, too, receive or can get the
|
||||||
|
source code. And you must show them these terms so they know their
|
||||||
|
rights.
|
||||||
|
|
||||||
|
We protect your rights with two steps: (1) copyright the software, and
|
||||||
|
(2) offer you this license which gives you legal permission to copy,
|
||||||
|
distribute and/or modify the software.
|
||||||
|
|
||||||
|
Also, for each author's protection and ours, we want to make certain
|
||||||
|
that everyone understands that there is no warranty for this free
|
||||||
|
software. If the software is modified by someone else and passed on, we
|
||||||
|
want its recipients to know that what they have is not the original, so
|
||||||
|
that any problems introduced by others will not reflect on the original
|
||||||
|
authors' reputations.
|
||||||
|
|
||||||
|
Finally, any free program is threatened constantly by software
|
||||||
|
patents. We wish to avoid the danger that redistributors of a free
|
||||||
|
program will individually obtain patent licenses, in effect making the
|
||||||
|
program proprietary. To prevent this, we have made it clear that any
|
||||||
|
patent must be licensed for everyone's free use or not licensed at all.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License applies to any program or other work which contains
|
||||||
|
a notice placed by the copyright holder saying it may be distributed
|
||||||
|
under the terms of this General Public License. The "Program", below,
|
||||||
|
refers to any such program or work, and a "work based on the Program"
|
||||||
|
means either the Program or any derivative work under copyright law:
|
||||||
|
that is to say, a work containing the Program or a portion of it,
|
||||||
|
either verbatim or with modifications and/or translated into another
|
||||||
|
language. (Hereinafter, translation is included without limitation in
|
||||||
|
the term "modification".) Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running the Program is not restricted, and the output from the Program
|
||||||
|
is covered only if its contents constitute a work based on the
|
||||||
|
Program (independent of having been made by running the Program).
|
||||||
|
Whether that is true depends on what the Program does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Program's
|
||||||
|
source code as you receive it, in any medium, provided that you
|
||||||
|
conspicuously and appropriately publish on each copy an appropriate
|
||||||
|
copyright notice and disclaimer of warranty; keep intact all the
|
||||||
|
notices that refer to this License and to the absence of any warranty;
|
||||||
|
and give any other recipients of the Program a copy of this License
|
||||||
|
along with the Program.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy, and
|
||||||
|
you may at your option offer warranty protection in exchange for a fee.
|
||||||
|
|
||||||
|
2. You may modify your copy or copies of the Program or any portion
|
||||||
|
of it, thus forming a work based on the Program, and copy and
|
||||||
|
distribute such modifications or work under the terms of Section 1
|
||||||
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) You must cause the modified files to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
b) You must cause any work that you distribute or publish, that in
|
||||||
|
whole or in part contains or is derived from the Program or any
|
||||||
|
part thereof, to be licensed as a whole at no charge to all third
|
||||||
|
parties under the terms of this License.
|
||||||
|
|
||||||
|
c) If the modified program normally reads commands interactively
|
||||||
|
when run, you must cause it, when started running for such
|
||||||
|
interactive use in the most ordinary way, to print or display an
|
||||||
|
announcement including an appropriate copyright notice and a
|
||||||
|
notice that there is no warranty (or else, saying that you provide
|
||||||
|
a warranty) and that users may redistribute the program under
|
||||||
|
these conditions, and telling the user how to view a copy of this
|
||||||
|
License. (Exception: if the Program itself is interactive but
|
||||||
|
does not normally print such an announcement, your work based on
|
||||||
|
the Program is not required to print an announcement.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Program,
|
||||||
|
and can be reasonably considered independent and separate works in
|
||||||
|
themselves, then this License, and its terms, do not apply to those
|
||||||
|
sections when you distribute them as separate works. But when you
|
||||||
|
distribute the same sections as part of a whole which is a work based
|
||||||
|
on the Program, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the
|
||||||
|
entire whole, and thus to each and every part regardless of who wrote it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
|
exercise the right to control the distribution of derivative or
|
||||||
|
collective works based on the Program.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Program
|
||||||
|
with the Program (or with a work based on the Program) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may copy and distribute the Program (or a work based on it,
|
||||||
|
under Section 2) in object code or executable form under the terms of
|
||||||
|
Sections 1 and 2 above provided that you also do one of the following:
|
||||||
|
|
||||||
|
a) Accompany it with the complete corresponding machine-readable
|
||||||
|
source code, which must be distributed under the terms of Sections
|
||||||
|
1 and 2 above on a medium customarily used for software interchange; or,
|
||||||
|
|
||||||
|
b) Accompany it with a written offer, valid for at least three
|
||||||
|
years, to give any third party, for a charge no more than your
|
||||||
|
cost of physically performing source distribution, a complete
|
||||||
|
machine-readable copy of the corresponding source code, to be
|
||||||
|
distributed under the terms of Sections 1 and 2 above on a medium
|
||||||
|
customarily used for software interchange; or,
|
||||||
|
|
||||||
|
c) Accompany it with the information you received as to the offer
|
||||||
|
to distribute corresponding source code. (This alternative is
|
||||||
|
allowed only for noncommercial distribution and only if you
|
||||||
|
received the program in object code or executable form with such
|
||||||
|
an offer, in accord with Subsection b above.)
|
||||||
|
|
||||||
|
The source code for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For an executable work, complete source
|
||||||
|
code means all the source code for all modules it contains, plus any
|
||||||
|
associated interface definition files, plus the scripts used to
|
||||||
|
control compilation and installation of the executable. However, as a
|
||||||
|
special exception, the source code distributed need not include
|
||||||
|
anything that is normally distributed (in either source or binary
|
||||||
|
form) with the major components (compiler, kernel, and so on) of the
|
||||||
|
operating system on which the executable runs, unless that component
|
||||||
|
itself accompanies the executable.
|
||||||
|
|
||||||
|
If distribution of executable or object code is made by offering
|
||||||
|
access to copy from a designated place, then offering equivalent
|
||||||
|
access to copy the source code from the same place counts as
|
||||||
|
distribution of the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
4. You may not copy, modify, sublicense, or distribute the Program
|
||||||
|
except as expressly provided under this License. Any attempt
|
||||||
|
otherwise to copy, modify, sublicense or distribute the Program is
|
||||||
|
void, and will automatically terminate your rights under this License.
|
||||||
|
However, parties who have received copies, or rights, from you under
|
||||||
|
this License will not have their licenses terminated so long as such
|
||||||
|
parties remain in full compliance.
|
||||||
|
|
||||||
|
5. You are not required to accept this License, since you have not
|
||||||
|
signed it. However, nothing else grants you permission to modify or
|
||||||
|
distribute the Program or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Program (or any work based on the
|
||||||
|
Program), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Program or works based on it.
|
||||||
|
|
||||||
|
6. Each time you redistribute the Program (or any work based on the
|
||||||
|
Program), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute or modify the Program subject to
|
||||||
|
these terms and conditions. You may not impose any further
|
||||||
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
|
You are not responsible for enforcing compliance by third parties to
|
||||||
|
this License.
|
||||||
|
|
||||||
|
7. If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues),
|
||||||
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot
|
||||||
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you
|
||||||
|
may not distribute the Program at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Program by
|
||||||
|
all those who receive copies directly or indirectly through you, then
|
||||||
|
the only way you could satisfy both it and this License would be to
|
||||||
|
refrain entirely from distribution of the Program.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under
|
||||||
|
any particular circumstance, the balance of the section is intended to
|
||||||
|
apply and the section as a whole is intended to apply in other
|
||||||
|
circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any
|
||||||
|
patents or other property right claims or to contest validity of any
|
||||||
|
such claims; this section has the sole purpose of protecting the
|
||||||
|
integrity of the free software distribution system, which is
|
||||||
|
implemented by public license practices. Many people have made
|
||||||
|
generous contributions to the wide range of software distributed
|
||||||
|
through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
|
to distribute software through any other system and a licensee cannot
|
||||||
|
impose that choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
|
8. If the distribution and/or use of the Program is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Program under this License
|
||||||
|
may add an explicit geographical distribution limitation excluding
|
||||||
|
those countries, so that distribution is permitted only in or among
|
||||||
|
countries not thus excluded. In such case, this License incorporates
|
||||||
|
the limitation as if written in the body of this License.
|
||||||
|
|
||||||
|
9. The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Program
|
||||||
|
specifies a version number of this License which applies to it and "any
|
||||||
|
later version", you have the option of following the terms and conditions
|
||||||
|
either of that version or of any later version published by the Free
|
||||||
|
Software Foundation. If the Program does not specify a version number of
|
||||||
|
this License, you may choose any version ever published by the Free Software
|
||||||
|
Foundation.
|
||||||
|
|
||||||
|
10. If you wish to incorporate parts of the Program into other free
|
||||||
|
programs whose distribution conditions are different, write to the author
|
||||||
|
to ask for permission. For software which is copyrighted by the Free
|
||||||
|
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||||
|
make exceptions for this. Our decision will be guided by the two goals
|
||||||
|
of preserving the free status of all derivatives of our free software and
|
||||||
|
of promoting the sharing and reuse of software generally.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||||
|
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||||
|
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||||
|
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||||
|
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||||
|
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||||
|
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||||
|
REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||||
|
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||||
|
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||||
|
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||||
|
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||||
|
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
convey the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program is interactive, make it output a short notice like this
|
||||||
|
when it starts in an interactive mode:
|
||||||
|
|
||||||
|
Gnomovision version 69, Copyright (C) year name of author
|
||||||
|
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, the commands you use may
|
||||||
|
be called something other than `show w' and `show c'; they could even be
|
||||||
|
mouse-clicks or menu items--whatever suits your program.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||||
|
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||||
|
|
||||||
|
<signature of Ty Coon>, 1 April 1989
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
This General Public License does not permit incorporating your program into
|
||||||
|
proprietary programs. If your program is a subroutine library, you may
|
||||||
|
consider it more useful to permit linking proprietary applications with the
|
||||||
|
library. If this is what you want to do, use the GNU Library General
|
||||||
|
Public License instead of this License.
|
61
README.md
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
# The Homebrew Channel
|
||||||
|
|
||||||
|
This repository contains the public release of the source code for
|
||||||
|
The Homebrew Channel.
|
||||||
|
|
||||||
|
Included portions:
|
||||||
|
|
||||||
|
* The Homebrew Channel
|
||||||
|
* Reload stub
|
||||||
|
* Banner
|
||||||
|
* PyWii (includes Alameda for banner creation)
|
||||||
|
* WiiPAX (LZMA executable packer)
|
||||||
|
|
||||||
|
Not included:
|
||||||
|
|
||||||
|
* Installer
|
||||||
|
|
||||||
|
Note that the code in this repository differs from the source code used to build
|
||||||
|
the official version of The Homebrew Channel, which includes additional
|
||||||
|
protection features (i.e. we had to add reverse-DRM to stop scammers from
|
||||||
|
selling it).
|
||||||
|
|
||||||
|
This code is released with no warranty, and hasn't even been tested on a real
|
||||||
|
Wii, only under Dolphin (yes, this release runs under Dolphin).
|
||||||
|
|
||||||
|
## Build instructions
|
||||||
|
|
||||||
|
You need DevkitPPC and libogc installed, and the DEVKITPRO/DEVKITPPC environment
|
||||||
|
variables correctly set. Use the latest available versions. Make sure you have
|
||||||
|
libogc/libfat, and also install the following 3rd party libraries:
|
||||||
|
|
||||||
|
* zlib
|
||||||
|
* libpng
|
||||||
|
* mxml
|
||||||
|
* freetype
|
||||||
|
|
||||||
|
You can download binaries of those
|
||||||
|
[here](https://sourceforge.net/projects/devkitpro/files/portlibs/ppc/).
|
||||||
|
|
||||||
|
Additionally, you'll need the following packages on your host machine:
|
||||||
|
|
||||||
|
* pycryptodome (for PyWii)
|
||||||
|
* libpng headers (libpng-dev)
|
||||||
|
* gettext
|
||||||
|
|
||||||
|
The build process has only been tested on Linux. You're on your own if you
|
||||||
|
want to try building this on OSX or Windows.
|
||||||
|
|
||||||
|
First run 'make' in wiipax, then 'make' in channel. You'll find a .wad file
|
||||||
|
that you can install or directly run with Dolphin under
|
||||||
|
channel/title/channel_retail.wad. You'll also find executable binaries under
|
||||||
|
channel/channelapp, but be advised that the NAND save file / theme storage
|
||||||
|
features won't work properly if HBC isn't launched as a channel with its
|
||||||
|
correct title identity/permissions.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
Unless otherwise noted in an individual file header, all source code in this
|
||||||
|
repository is released under the terms of the GNU General Public License,
|
||||||
|
version 2 or later. The full text of the license can be found in the COPYING
|
||||||
|
file.
|
12
broadway.mk
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
ifeq ($(strip $(DEVKITPPC)),)
|
||||||
|
$(error "Set DEVKITPPC in your environment.")
|
||||||
|
endif
|
||||||
|
|
||||||
|
PREFIX = $(DEVKITPPC)/bin/powerpc-eabi-
|
||||||
|
|
||||||
|
CFLAGS = -mcpu=750 -mpaired -m32 -mhard-float -mno-eabi -mno-sdata
|
||||||
|
CFLAGS += -ffreestanding -ffunction-sections -fdata-sections
|
||||||
|
CFLAGS += -Wall -Wextra -O2
|
||||||
|
ASFLAGS =
|
||||||
|
LDFLAGS = -mcpu=750 -m32 -n -nostartfiles -nodefaultlibs -Wl,-gc-sections
|
||||||
|
|
14
channel/Makefile
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
.PHONY: clean installer
|
||||||
|
|
||||||
|
all:
|
||||||
|
@$(MAKE) -C channelapp channel
|
||||||
|
@$(MAKE) -C banner
|
||||||
|
@$(MAKE) -C title
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@$(MAKE) -C channelapp clean
|
||||||
|
@$(MAKE) -C banner clean
|
||||||
|
@$(MAKE) -C title clean
|
||||||
|
@$(MAKE) -C wiiload clean
|
||||||
|
@$(MAKE) -C wiiload clean WIN32=1
|
||||||
|
|
69
channel/README
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
The Homebrew Channel v1.1.2
|
||||||
|
Copyright (C) 2007-2012 Team Twiizers, all rights reserved.
|
||||||
|
All rights reserved; do not redistribute
|
||||||
|
|
||||||
|
|
||||||
|
Update instructions:
|
||||||
|
|
||||||
|
|
||||||
|
If you have previously installed The Homebrew Channel, you can update it. If
|
||||||
|
this is the first time you are installing it, see README.txt for installation
|
||||||
|
instructions. The easiest way to update is using the built-in online update
|
||||||
|
functionality. Simply configure the WiFi network settings for your Wii for
|
||||||
|
proper Internet connectivity, and boot up the channel. If the connection is
|
||||||
|
established, you'll see an opaque white (not semitransparent) world icon
|
||||||
|
in the lower right corner, and an update prompt will automatically appear.
|
||||||
|
Accept it to begin downloading the update. If you cannot or do not want to
|
||||||
|
connect your Wii to the Internet, simply run the boot.elf file using any
|
||||||
|
homebrew booting method. For example, you can upload it using wiiload or
|
||||||
|
you can make a directory inside /apps (for example, /apps/Update) and copy
|
||||||
|
boot.elf there. Then, simply run it from the previous version of The Homebrew
|
||||||
|
Channel.
|
||||||
|
|
||||||
|
|
||||||
|
Adding and customizing apps:
|
||||||
|
|
||||||
|
|
||||||
|
All user applications should be stored in their own subdirectory inside of
|
||||||
|
apps/; some examples have been provided. Each subdirectory should have at
|
||||||
|
least three files; ScummVM will be used as an example.
|
||||||
|
|
||||||
|
* apps/ScummVM/boot.elf main executable to be loaded
|
||||||
|
* apps/ScummVM/icon.png icon to be displayed in The Homebrew Channel
|
||||||
|
Menu; should be 128 x 48 pixels
|
||||||
|
* apps/ScummVM/meta.xml XML description of the channel. This format
|
||||||
|
might change for future releases of The
|
||||||
|
Homebrew channel, but we will try to remain
|
||||||
|
backwards-compatible. See
|
||||||
|
http://wiibrew.org/wiki/Homebrew_Channel
|
||||||
|
for information on what data should be included
|
||||||
|
in this file.
|
||||||
|
|
||||||
|
|
||||||
|
Staying current with new releases:
|
||||||
|
|
||||||
|
|
||||||
|
Relax, you will not need to do anything to keep up with new releases of the
|
||||||
|
Homebrew Channel. When a new version is available, a message will appear
|
||||||
|
giving you the option to download and install the new version, if your Wii
|
||||||
|
is configured to connect to the Internet.
|
||||||
|
|
||||||
|
|
||||||
|
Uninstallation:
|
||||||
|
|
||||||
|
|
||||||
|
You may uninstall the channel as you would any other channel, by using the Data
|
||||||
|
Management screen of the Wii Menu. Erasing every last trace of The Homebrew
|
||||||
|
Channel is not practical on a complex system such as the Wii. If a need
|
||||||
|
arises, we will develop a more thorough uninstaller application.
|
||||||
|
|
||||||
|
|
||||||
|
Reminder about elf files:
|
||||||
|
|
||||||
|
|
||||||
|
Old ELF files were incorrect and will not work. Please use DOL files or
|
||||||
|
recompile with the latest version of devkitPPC. You can use the following
|
||||||
|
command to convert a broken ELF file to a DOL file:
|
||||||
|
|
||||||
|
powerpc-gekko-objcopy -O binary boot.elf boot.dol
|
||||||
|
|
6
channel/banner/.gitignore
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
build
|
||||||
|
channel.imet
|
||||||
|
tools/png2tpl
|
||||||
|
tools/mkbns
|
||||||
|
tools/lz77
|
||||||
|
*.raw
|
64
channel/banner/Makefile
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
ifeq ($(WIN32), 1)
|
||||||
|
export PREFIX = i586-mingw32msvc-
|
||||||
|
export EXE := .exe
|
||||||
|
export LFLAGS = -lws2_32
|
||||||
|
else
|
||||||
|
export PREFIX =
|
||||||
|
export EXE =
|
||||||
|
export LFLAGS =
|
||||||
|
endif
|
||||||
|
|
||||||
|
export PYWII := $(CURDIR)/../../pywii/pywii-tools
|
||||||
|
export ALAMEDA := $(CURDIR)/../../pywii/Alameda
|
||||||
|
|
||||||
|
export PNG2TPL := $(CURDIR)/tools/png2tpl$(EXE)
|
||||||
|
export MKBNS := $(CURDIR)/tools/mkbns$(EXE)
|
||||||
|
export LZ77 := $(CURDIR)/tools/lz77$(EXE)
|
||||||
|
export ADDIMD5 := python $(CURDIR)/tools/addimd5.py
|
||||||
|
export ARCPACK := python $(PYWII)/arcpack.py
|
||||||
|
export SOX := sox
|
||||||
|
|
||||||
|
all: channel.imet
|
||||||
|
|
||||||
|
channel.imet: build/data.arc names.txt tools/join-imet.py
|
||||||
|
python tools/join-imet.py $@ build/data.arc build/icon.arc build/banner.arc build/sound.bns names.txt
|
||||||
|
|
||||||
|
build/data.arc : build/data/meta/icon.bin build/data/meta/banner.bin build/data/meta/sound.bin
|
||||||
|
$(ARCPACK) $@ build/data
|
||||||
|
|
||||||
|
build/data/meta/icon.bin : icon/* $(PNG2TPL) $(LZ77)
|
||||||
|
$(MAKE) -C icon -f ../Makefile.section
|
||||||
|
|
||||||
|
build/data/meta/banner.bin : banner/* $(PNG2TPL) $(LZ77)
|
||||||
|
$(MAKE) -C banner -f ../Makefile.section
|
||||||
|
|
||||||
|
build/data/meta/sound.bin : build/sound.bns
|
||||||
|
@[ ! -d build/data/meta ] && mkdir -p build/data/meta || true
|
||||||
|
$(ADDIMD5) $< $@
|
||||||
|
|
||||||
|
build/sound.bns : build/wiibrew-banner-intro-part.raw build/wiibrew-banner-loop-part.raw $(MKBNS)
|
||||||
|
@[ ! -d build ] && mkdir -p build || true
|
||||||
|
$(MKBNS) build/wiibrew-banner-intro-part.raw $@ 1 build/wiibrew-banner-loop-part.raw
|
||||||
|
|
||||||
|
build/%.raw : sound/%.wav
|
||||||
|
@[ ! -d build ] && mkdir -p build || true
|
||||||
|
$(SOX) $< -r 32000 -c 2 -e signed-integer -b 16 -t raw $@
|
||||||
|
|
||||||
|
testi : channel.imet
|
||||||
|
python $(ALAMEDA)/Alameda.py channel.imet icon
|
||||||
|
testb : channel.imet
|
||||||
|
python $(ALAMEDA)/Alameda.py channel.imet banner
|
||||||
|
|
||||||
|
$(PNG2TPL): tools/*.c
|
||||||
|
$(MAKE) -C tools png2tpl$(EXE)
|
||||||
|
|
||||||
|
$(MKBNS): tools/*.c
|
||||||
|
$(MAKE) -C tools mkbns$(EXE)
|
||||||
|
|
||||||
|
$(LZ77): tools/*.c
|
||||||
|
$(MAKE) -C tools lz77$(EXE)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f channel.imet
|
||||||
|
rm -rf build
|
||||||
|
$(MAKE) -C tools clean
|
30
channel/banner/Makefile.section
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
|
||||||
|
TYPE = $(notdir $(CURDIR))
|
||||||
|
|
||||||
|
PNGS = $(wildcard *.png)
|
||||||
|
TPLS = $(patsubst %.png,../build/$(TYPE)/arc/timg/%.tpl,$(PNGS))
|
||||||
|
|
||||||
|
../build/data/meta/$(TYPE).bin : ../build/$(TYPE).lz77
|
||||||
|
@[ ! -d ../build/data/meta ] && mkdir -p ../build/data/meta || true
|
||||||
|
$(ADDIMD5) $< $@
|
||||||
|
|
||||||
|
../build/$(TYPE).lz77 : ../build/$(TYPE).arc
|
||||||
|
$(LZ77) $< $@
|
||||||
|
|
||||||
|
ifeq ($(TYPE),banner)
|
||||||
|
ANIMS = ../build/$(TYPE)/arc/anim/$(TYPE)_Start.brlan ../build/$(TYPE)/arc/anim/$(TYPE)_Loop.brlan
|
||||||
|
else
|
||||||
|
ANIMS = ../build/$(TYPE)/arc/anim/$(TYPE).brlan
|
||||||
|
endif
|
||||||
|
../build/$(TYPE)/arc/blyt/$(TYPE).brlyt $(ANIMS) : mk$(TYPE).py
|
||||||
|
@[ ! -d ../build/$(TYPE)/arc/anim ] && mkdir -p ../build/$(TYPE)/arc/anim || true
|
||||||
|
@[ ! -d ../build/$(TYPE)/arc/blyt ] && mkdir -p ../build/$(TYPE)/arc/blyt || true
|
||||||
|
python mk$(TYPE).py ../build/$(TYPE)/arc/blyt/$(TYPE).brlyt $(ANIMS)
|
||||||
|
|
||||||
|
../build/$(TYPE).arc : $(TPLS) ../build/$(TYPE)/arc/blyt/$(TYPE).brlyt $(ANIMS)
|
||||||
|
$(ARCPACK) ../build/$(TYPE).arc ../build/$(TYPE)
|
||||||
|
|
||||||
|
../build/$(TYPE)/arc/timg/%.tpl : %.png
|
||||||
|
@[ ! -d ../build/$(TYPE)/arc/timg ] && mkdir -p ../build/$(TYPE)/arc/timg || true
|
||||||
|
$(PNG2TPL) $< $@ `grep $< textures.txt | cut -f 2-`
|
||||||
|
|
BIN
channel/banner/banner/abubble1.png
Normal file
After Width: | Height: | Size: 981 B |
BIN
channel/banner/banner/abubble2.png
Normal file
After Width: | Height: | Size: 710 B |
BIN
channel/banner/banner/abubble3.png
Normal file
After Width: | Height: | Size: 364 B |
BIN
channel/banner/banner/abubble4.png
Normal file
After Width: | Height: | Size: 396 B |
BIN
channel/banner/banner/abubble5.png
Normal file
After Width: | Height: | Size: 359 B |
BIN
channel/banner/banner/abubble6.png
Normal file
After Width: | Height: | Size: 248 B |
BIN
channel/banner/banner/banner_fade.png
Normal file
After Width: | Height: | Size: 240 B |
BIN
channel/banner/banner/banner_shape2.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
channel/banner/banner/banner_title.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
channel/banner/banner/banner_wave1a.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
channel/banner/banner/banner_wave1b.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
channel/banner/banner/banner_wavea.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
channel/banner/banner/banner_waveb.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
channel/banner/banner/bbubble1.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
channel/banner/banner/cbubble1.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
channel/banner/banner/cbubble2.png
Normal file
After Width: | Height: | Size: 283 B |
383
channel/banner/banner/mkbanner.py
Normal file
@ -0,0 +1,383 @@
|
|||||||
|
import sys, os, random
|
||||||
|
|
||||||
|
sys.path.append(os.environ['ALAMEDA']+"/../Common")
|
||||||
|
sys.path.append(os.environ['ALAMEDA'])
|
||||||
|
|
||||||
|
from Alameda import *
|
||||||
|
|
||||||
|
brlyt = Brlyt(None, None, None)
|
||||||
|
brlyt.Width = 810
|
||||||
|
brlyt.Height = 456
|
||||||
|
|
||||||
|
brlyt.Textures.add(Brlyt.BrlytTexture("banner_title.tpl"))
|
||||||
|
brlyt.Textures.add(Brlyt.BrlytTexture("white.tpl"))
|
||||||
|
brlyt.Textures.add(Brlyt.BrlytTexture("banner_wavea.tpl"))
|
||||||
|
brlyt.Textures.add(Brlyt.BrlytTexture("banner_waveb.tpl"))
|
||||||
|
brlyt.Textures.add(Brlyt.BrlytTexture("banner_wave1a.tpl"))
|
||||||
|
brlyt.Textures.add(Brlyt.BrlytTexture("banner_wave1b.tpl"))
|
||||||
|
brlyt.Textures.add(Brlyt.BrlytTexture("banner_shape2.tpl"))
|
||||||
|
brlyt.Textures.add(Brlyt.BrlytTexture("banner_fade.tpl"))
|
||||||
|
|
||||||
|
brlyt.Materials.add(Brlyt.BrlytMaterial("title"))
|
||||||
|
brlyt.Materials[0].Textures.append((0,0,0))
|
||||||
|
brlyt.Materials[0].TextureCoords.append([0,0,0,1,1])
|
||||||
|
brlyt.Materials[0].SthB.append(0x01041e00)
|
||||||
|
|
||||||
|
brlyt.Materials.add(Brlyt.BrlytMaterial("white"))
|
||||||
|
brlyt.Materials[1].Textures.append((1,1,1))
|
||||||
|
brlyt.Materials[1].TextureCoords.append([0,0,0,1,1])
|
||||||
|
brlyt.Materials[1].SthB.append(0x01041e00)
|
||||||
|
|
||||||
|
brlyt.Materials.add(Brlyt.BrlytMaterial("wavea"))
|
||||||
|
brlyt.Materials[2].Textures.append((2,1,0))
|
||||||
|
brlyt.Materials[2].TextureCoords.append([0,2,0,3,6])
|
||||||
|
brlyt.Materials[2].SthB.append(0x01041e00)
|
||||||
|
|
||||||
|
brlyt.Materials.add(Brlyt.BrlytMaterial("waveb"))
|
||||||
|
brlyt.Materials[3].Textures.append((3,1,0))
|
||||||
|
brlyt.Materials[3].TextureCoords.append([0,2,0,3,6])
|
||||||
|
brlyt.Materials[3].SthB.append(0x01041e00)
|
||||||
|
|
||||||
|
brlyt.Materials.add(Brlyt.BrlytMaterial("wave1a"))
|
||||||
|
brlyt.Materials[4].Textures.append((4,0,0))
|
||||||
|
brlyt.Materials[4].TextureCoords.append([0,0,0,1,1])
|
||||||
|
brlyt.Materials[4].SthB.append(0x01041e00)
|
||||||
|
|
||||||
|
brlyt.Materials.add(Brlyt.BrlytMaterial("wave1b"))
|
||||||
|
brlyt.Materials[5].Textures.append((5,0,0))
|
||||||
|
brlyt.Materials[5].TextureCoords.append([0,0,0,1,1])
|
||||||
|
brlyt.Materials[5].SthB.append(0x01041e00)
|
||||||
|
|
||||||
|
brlyt.Materials.add(Brlyt.BrlytMaterial("shape2"))
|
||||||
|
brlyt.Materials[6].Textures.append((6,0,0))
|
||||||
|
brlyt.Materials[6].TextureCoords.append([0,0,0,1,1])
|
||||||
|
brlyt.Materials[6].SthB.append(0x01041e00)
|
||||||
|
|
||||||
|
brlyt.Materials.add(Brlyt.BrlytMaterial("fade"))
|
||||||
|
brlyt.Materials[7].Textures.append((7,0,0))
|
||||||
|
brlyt.Materials[7].TextureCoords.append([0,0,0,1,1])
|
||||||
|
brlyt.Materials[7].SthB.append(0x01041e00)
|
||||||
|
|
||||||
|
brlyt.RootPane = Pane("RootPane")
|
||||||
|
brlyt.RootPane.Width = brlyt.Width
|
||||||
|
brlyt.RootPane.Height = brlyt.Height
|
||||||
|
|
||||||
|
waterpane = Pane("water")
|
||||||
|
bubblepane = Pane("bubbles")
|
||||||
|
|
||||||
|
bkg = Picture("background")
|
||||||
|
bkg.Material = 1
|
||||||
|
bkg.X, bkg.Y, bkg.Width, bkg.Height = 0,0,brlyt.Width,brlyt.Height
|
||||||
|
|
||||||
|
tit = Picture("title")
|
||||||
|
tit.Material = 0
|
||||||
|
tit.X, tit.Y, tit.Width, tit.Height = 0,32,400,180
|
||||||
|
|
||||||
|
wavea = Picture("wavea")
|
||||||
|
wavea.Material = 2
|
||||||
|
wavea.X, wavea.Y, wavea.Width, wavea.Height = -300,35,3072,384
|
||||||
|
|
||||||
|
waveb = Picture("waveb")
|
||||||
|
waveb.Material = 3
|
||||||
|
waveb.X, waveb.Y, waveb.Width, waveb.Height = -300,32,3072,384
|
||||||
|
|
||||||
|
wave1a = Picture("wave1a")
|
||||||
|
wave1a.Material = 4
|
||||||
|
wave1a.X, wave1a.Y, wave1a.Width, wave1a.Height = -200,160,382,32
|
||||||
|
|
||||||
|
wave1b1 = Picture("wave1b1")
|
||||||
|
wave1b1.Material = 5
|
||||||
|
wave1b1.X, wave1b1.Y, wave1b1.Width, wave1b1.Height = 200,170,527,37
|
||||||
|
|
||||||
|
wave1b2 = Picture("wave1b2")
|
||||||
|
wave1b2.Material = 5
|
||||||
|
wave1b2.X, wave1b2.Y, wave1b2.Width, wave1b2.Height = -380,170,527,37
|
||||||
|
|
||||||
|
shadow = Picture("shadow")
|
||||||
|
shadow.Material = 6
|
||||||
|
shadow.X, shadow.Y, shadow.Width, shadow.Height = -180,150,644,28
|
||||||
|
|
||||||
|
fade = Picture("fade")
|
||||||
|
fade.Material = 7
|
||||||
|
fade.X, fade.Y, fade.Width, fade.Height = 0,8,brlyt.Width,256
|
||||||
|
|
||||||
|
boom = Picture("boom")
|
||||||
|
boom.Material = 1
|
||||||
|
boom.Alpha = 0
|
||||||
|
boom.X, boom.Y, boom.Width, boom.Height = 0,0,brlyt.Width,brlyt.Height
|
||||||
|
|
||||||
|
waterpane.Add(wavea)
|
||||||
|
waterpane.Add(waveb)
|
||||||
|
waterpane.Add(wave1a)
|
||||||
|
waterpane.Add(wave1b1)
|
||||||
|
waterpane.Add(wave1b2)
|
||||||
|
waterpane.Add(shadow)
|
||||||
|
waterpane.Add(fade)
|
||||||
|
waterpane.Add(bubblepane)
|
||||||
|
|
||||||
|
brlyt.RootPane.Add(bkg)
|
||||||
|
brlyt.RootPane.Add(waterpane)
|
||||||
|
brlyt.RootPane.Add(tit)
|
||||||
|
brlyt.RootPane.Add(boom)
|
||||||
|
|
||||||
|
fakeStart = -60 * 10
|
||||||
|
loopStart = 60 * 6
|
||||||
|
loopEnd = 60 * 22
|
||||||
|
|
||||||
|
brlan = Brlan()
|
||||||
|
brlan.Anim.add(Brlan.BrlanAnimSet("water"))
|
||||||
|
brlan.Anim.add(Brlan.BrlanAnimSet("wavea"))
|
||||||
|
brlan.Anim.add(Brlan.BrlanAnimSet("waveb"))
|
||||||
|
brlan.Anim.add(Brlan.BrlanAnimSet("wave1a"))
|
||||||
|
brlan.Anim.add(Brlan.BrlanAnimSet("wave1b1"))
|
||||||
|
brlan.Anim.add(Brlan.BrlanAnimSet("wave1b2"))
|
||||||
|
brlan.Anim.add(Brlan.BrlanAnimSet("shadow"))
|
||||||
|
brlan.Anim.add(Brlan.BrlanAnimSet("title"))
|
||||||
|
brlan.Anim.add(Brlan.BrlanAnimSet("boom"))
|
||||||
|
|
||||||
|
brlan.Anim['title'].add(Brlan.BrlanAnimClass(Brlan.A_COORD))
|
||||||
|
brlan.Anim['title'][Brlan.A_COORD].add(Brlan.BrlanAnim(Brlan.C_Y))
|
||||||
|
brlan.Anim['title'][Brlan.A_COORD][Brlan.C_Y].repsimple(fakeStart, loopEnd, 12, 32, 0, 20, 0)
|
||||||
|
|
||||||
|
brlan.Anim['title'].add(Brlan.BrlanAnimClass(Brlan.A_PARM))
|
||||||
|
brlan.Anim['title'][Brlan.A_PARM].add(Brlan.BrlanAnim(Brlan.P_ALPHA))
|
||||||
|
brlan.Anim['title'][Brlan.A_PARM][Brlan.P_ALPHA].Triplets.append((0, 0, 0))
|
||||||
|
brlan.Anim['title'][Brlan.A_PARM][Brlan.P_ALPHA].Triplets.append((243, 0, 0))
|
||||||
|
brlan.Anim['title'][Brlan.A_PARM][Brlan.P_ALPHA].Triplets.append((244, 255, 0))
|
||||||
|
|
||||||
|
brlan.Anim['boom'].add(Brlan.BrlanAnimClass(Brlan.A_PARM))
|
||||||
|
brlan.Anim['boom'][Brlan.A_PARM].add(Brlan.BrlanAnim(Brlan.P_ALPHA))
|
||||||
|
brlan.Anim['boom'][Brlan.A_PARM][Brlan.P_ALPHA].Triplets.append((0, 0, 0))
|
||||||
|
brlan.Anim['boom'][Brlan.A_PARM][Brlan.P_ALPHA].Triplets.append((243, 0, 0))
|
||||||
|
brlan.Anim['boom'][Brlan.A_PARM][Brlan.P_ALPHA].Triplets.append((244, 255, 0))
|
||||||
|
brlan.Anim['boom'][Brlan.A_PARM][Brlan.P_ALPHA].Triplets.append((246, 255, 0))
|
||||||
|
brlan.Anim['boom'][Brlan.A_PARM][Brlan.P_ALPHA].Triplets.append((256, 0, 0))
|
||||||
|
|
||||||
|
|
||||||
|
for i in ['wavea', 'waveb', 'wave1a', 'wave1b1', 'wave1b2', 'shadow']:
|
||||||
|
brlan.Anim[i].add(Brlan.BrlanAnimClass(Brlan.A_COORD))
|
||||||
|
brlan.Anim[i][Brlan.A_COORD].add(Brlan.BrlanAnim(Brlan.C_X))
|
||||||
|
brlan.Anim[i][Brlan.A_COORD].add(Brlan.BrlanAnim(Brlan.C_Y))
|
||||||
|
|
||||||
|
brlan.Anim['wavea'][Brlan.A_COORD][Brlan.C_X].repsimple(fakeStart, loopEnd, 4, -300, 0, 300, 0)
|
||||||
|
brlan.Anim['waveb'][Brlan.A_COORD][Brlan.C_X].repsimple(fakeStart, loopEnd, 4, -300, 2.0, 300, 2.0)
|
||||||
|
brlan.Anim['wavea'][Brlan.A_COORD][Brlan.C_Y].repsimple(fakeStart, loopEnd, 6, 35, 0, 55, 0)
|
||||||
|
brlan.Anim['waveb'][Brlan.A_COORD][Brlan.C_Y].repsimple(fakeStart, loopEnd, 8, 45, 0, 55, 0)
|
||||||
|
|
||||||
|
brlan.Anim['wave1a'][Brlan.A_COORD][Brlan.C_X].repsimple(fakeStart, loopEnd, 4, -200, 4.0, 200, 4.0)
|
||||||
|
brlan.Anim['wave1a'][Brlan.A_COORD][Brlan.C_Y].repsimple(fakeStart, loopEnd, 6, 160, 0.2, 180, 0.2)
|
||||||
|
brlan.Anim['wave1b1'][Brlan.A_COORD][Brlan.C_X].repsimple(fakeStart, loopEnd, 4, 200, 3.2, 400, 3.2)
|
||||||
|
brlan.Anim['wave1b1'][Brlan.A_COORD][Brlan.C_Y].repsimple(fakeStart, loopEnd, 6, 170, 0.2, 183, 0.2)
|
||||||
|
brlan.Anim['wave1b2'][Brlan.A_COORD][Brlan.C_X].repsimple(fakeStart, loopEnd, 4, -400, 3.7, -200, 3.7)
|
||||||
|
brlan.Anim['wave1b2'][Brlan.A_COORD][Brlan.C_Y].repsimple(fakeStart, loopEnd, 6, 165, 0.2, 185, 0.2)
|
||||||
|
|
||||||
|
brlan.Anim['shadow'][Brlan.A_COORD][Brlan.C_X].repsimple(fakeStart, loopEnd, 4, -180, 1.4, 100, 1.4)
|
||||||
|
brlan.Anim['shadow'][Brlan.A_COORD][Brlan.C_Y].repsimple(fakeStart, loopEnd, 6, 150, 0.2, 155, 0.2)
|
||||||
|
|
||||||
|
brlan.Anim.add(Brlan.BrlanAnimSet("water"))
|
||||||
|
brlan.Anim['water'].add(Brlan.BrlanAnimClass(Brlan.A_COORD))
|
||||||
|
brlan.Anim['water'][Brlan.A_COORD].add(Brlan.BrlanAnim(Brlan.C_Y))
|
||||||
|
brlan.Anim['water'][Brlan.A_COORD][Brlan.C_Y].Triplets.append((0, -320, 0))
|
||||||
|
brlan.Anim['water'][Brlan.A_COORD][Brlan.C_Y].Triplets.append((160, 0, 0))
|
||||||
|
|
||||||
|
##### Bubble generation #####
|
||||||
|
|
||||||
|
random.seed(1)
|
||||||
|
|
||||||
|
class BubbleType:
|
||||||
|
def __init__(self, name, width, height):
|
||||||
|
self.Name = name
|
||||||
|
self.TextureName = name + ".tpl"
|
||||||
|
self.Width = width
|
||||||
|
self.Height = height
|
||||||
|
self.PicCtr = 0
|
||||||
|
def makemat(self, brlyt):
|
||||||
|
self.Brlyt = brlyt
|
||||||
|
self.Texture = len(brlyt.Textures)
|
||||||
|
brlyt.Textures.add(Brlyt.BrlytTexture(self.TextureName))
|
||||||
|
self.Material = len(brlyt.Materials)
|
||||||
|
brlyt.Materials.add(Brlyt.BrlytMaterial(self.Name))
|
||||||
|
brlyt.Materials[self.Material].Textures.append((self.Texture,0,0))
|
||||||
|
brlyt.Materials[self.Material].TextureCoords.append([0,0,0,1,1])
|
||||||
|
brlyt.Materials[self.Material].SthB.append(0x01041e00)
|
||||||
|
def makepic(self):
|
||||||
|
name = "%s_%d"%(self.Name,self.PicCtr)
|
||||||
|
pic = Picture(name)
|
||||||
|
pic.Material = self.Material
|
||||||
|
pic.X, pic.Y, pic.Width, pic.Height = 0,-600,self.Width,self.Height
|
||||||
|
self.PicCtr += 1
|
||||||
|
return pic
|
||||||
|
|
||||||
|
class BubbleInstance:
|
||||||
|
YSTART = -150
|
||||||
|
YEND = 170
|
||||||
|
FADESTART = 0.7
|
||||||
|
def __init__(self, start, length=None, x=None, xp=None):
|
||||||
|
if x is None:
|
||||||
|
x = random.uniform(-brlyt.Width/2-64, brlyt.Width/2+64)
|
||||||
|
if xp is None:
|
||||||
|
xp = random.uniform(0, 32)
|
||||||
|
if length is None:
|
||||||
|
length = random.uniform(50, 170)
|
||||||
|
self.X = x
|
||||||
|
self.XP = xp
|
||||||
|
self.Start = start
|
||||||
|
self.Length = length
|
||||||
|
self.End = self.Start + self.Length
|
||||||
|
self.TypeID = None
|
||||||
|
def render(self, brlan):
|
||||||
|
if self.Picture.Name not in brlan.Anim:
|
||||||
|
#print "Adding animation set for %s"%self.Picture.Name
|
||||||
|
brlan.Anim.add(Brlan.BrlanAnimSet(self.Picture.Name))
|
||||||
|
brlan.Anim[self.Picture.Name].add(Brlan.BrlanAnimClass(Brlan.A_COORD))
|
||||||
|
brlan.Anim[self.Picture.Name].add(Brlan.BrlanAnimClass(Brlan.A_PARM))
|
||||||
|
brlan.Anim[self.Picture.Name][Brlan.A_COORD].add(Brlan.BrlanAnim(Brlan.C_X))
|
||||||
|
brlan.Anim[self.Picture.Name][Brlan.A_COORD].add(Brlan.BrlanAnim(Brlan.C_Y))
|
||||||
|
brlan.Anim[self.Picture.Name][Brlan.A_PARM].add(Brlan.BrlanAnim(Brlan.P_ALPHA))
|
||||||
|
|
||||||
|
tps = [
|
||||||
|
brlan.Anim[self.Picture.Name][Brlan.A_COORD][Brlan.C_X],
|
||||||
|
brlan.Anim[self.Picture.Name][Brlan.A_COORD][Brlan.C_Y],
|
||||||
|
brlan.Anim[self.Picture.Name][Brlan.A_PARM][Brlan.P_ALPHA]
|
||||||
|
]
|
||||||
|
|
||||||
|
for i in tps:
|
||||||
|
if len(i.Triplets) > 0:
|
||||||
|
if i.Triplets[-1][0] >= self.Start:
|
||||||
|
print "WTF at %s: %f >= %f"%(self.Picture.Name,i.Triplets[-1][0],self.Start)
|
||||||
|
raise RuntimeError("We Have A Problem")
|
||||||
|
|
||||||
|
brlan.Anim[self.Picture.Name][Brlan.A_COORD][Brlan.C_X].Triplets.append((self.Start, self.X, 0))
|
||||||
|
brlan.Anim[self.Picture.Name][Brlan.A_COORD][Brlan.C_Y].Triplets.append((self.Start, self.YSTART, 1))
|
||||||
|
brlan.Anim[self.Picture.Name][Brlan.A_COORD][Brlan.C_X].Triplets.append((self.End, self.X, 0))
|
||||||
|
brlan.Anim[self.Picture.Name][Brlan.A_COORD][Brlan.C_Y].Triplets.append((self.End, self.YEND, 1))
|
||||||
|
|
||||||
|
fadepoint = self.Start + self.Length * self.FADESTART
|
||||||
|
|
||||||
|
brlan.Anim[self.Picture.Name][Brlan.A_PARM][Brlan.P_ALPHA].Triplets.append((self.Start, 0, 0))
|
||||||
|
brlan.Anim[self.Picture.Name][Brlan.A_PARM][Brlan.P_ALPHA].Triplets.append((self.Start, 255, 0))
|
||||||
|
brlan.Anim[self.Picture.Name][Brlan.A_PARM][Brlan.P_ALPHA].Triplets.append((fadepoint, 255, 0))
|
||||||
|
brlan.Anim[self.Picture.Name][Brlan.A_PARM][Brlan.P_ALPHA].Triplets.append((self.End, 0, 0))
|
||||||
|
def clone(self):
|
||||||
|
new = BubbleInstance(self.Start, self.Length, self.X, self.XP)
|
||||||
|
new.TypeID = self.TypeID
|
||||||
|
return new
|
||||||
|
|
||||||
|
class BubbleCollection:
|
||||||
|
def __init__(self, brlyt, brlan, pane):
|
||||||
|
self.Brlyt = brlyt
|
||||||
|
self.Brlan = brlan
|
||||||
|
self.Pane = pane
|
||||||
|
self.BubbleTypes = []
|
||||||
|
self.Instances = []
|
||||||
|
def addtype(self, t, chance):
|
||||||
|
self.BubbleTypes.append((t, chance))
|
||||||
|
def choosetype(self):
|
||||||
|
sumchances = sum([c for t,c in self.BubbleTypes])
|
||||||
|
opt = random.uniform(0,sumchances)
|
||||||
|
for i,bt in enumerate(self.BubbleTypes):
|
||||||
|
t,c = bt
|
||||||
|
if c > opt:
|
||||||
|
return i
|
||||||
|
opt -= c
|
||||||
|
return i
|
||||||
|
def addinstance(self, i):
|
||||||
|
if i.TypeID is None:
|
||||||
|
i.TypeID = self.choosetype()
|
||||||
|
self.Instances.append(i)
|
||||||
|
def cleanInstances(self, time):
|
||||||
|
for tis in self.TypeInstances:
|
||||||
|
for i, ti in enumerate(tis):
|
||||||
|
pic, user = ti
|
||||||
|
if user is not None and user.End < time:
|
||||||
|
#print "Freeing instance: [%f-%f]"%(user.Start,user.End)
|
||||||
|
tis[i] = pic, None
|
||||||
|
def printinstances(self):
|
||||||
|
print "Type Instances:"
|
||||||
|
for tid, tis in enumerate(self.TypeInstances):
|
||||||
|
print " Type Instances for type %d (%s):"%(tid, self.BubbleTypes[tid][0].Name)
|
||||||
|
for i, ti in enumerate(tis):
|
||||||
|
pic, user = ti
|
||||||
|
if user is None:
|
||||||
|
print " %d: Picture %s, free"%(i,pic.Name)
|
||||||
|
else:
|
||||||
|
print " %d: Picture %s, user: %s [%f-%f]"%(i,pic.Name,repr(user),user.Start,user.End)
|
||||||
|
def render(self):
|
||||||
|
for t,c in self.BubbleTypes:
|
||||||
|
t.makemat(self.Brlyt)
|
||||||
|
self.TypeInstances = []
|
||||||
|
for i in range(len(self.BubbleTypes)):
|
||||||
|
self.TypeInstances.append([])
|
||||||
|
self.Instances.sort(key=lambda x: x.Start)
|
||||||
|
for n,i in enumerate(self.Instances):
|
||||||
|
#print "Processing instance %d of type %d (%f-%f)"%(n,i.TypeID,i.Start,i.End)
|
||||||
|
time = i.Start
|
||||||
|
self.cleanInstances(time)
|
||||||
|
tis = self.TypeInstances[i.TypeID]
|
||||||
|
for nti,ti in enumerate(tis):
|
||||||
|
pic, user = ti
|
||||||
|
if user is None:
|
||||||
|
tis[nti] = (pic,i)
|
||||||
|
i.Picture = pic
|
||||||
|
#print "Found space"
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
#print "No space for type %d"%i.TypeID
|
||||||
|
pic = self.BubbleTypes[i.TypeID][0].makepic()
|
||||||
|
self.Pane.Add(pic)
|
||||||
|
tis.append((pic, i))
|
||||||
|
i.Picture = pic
|
||||||
|
i.render(self.Brlan)
|
||||||
|
#self.printinstances()
|
||||||
|
|
||||||
|
print "Fake Start",fakeStart
|
||||||
|
print "Loop Start",loopStart
|
||||||
|
print "Loop End",loopEnd
|
||||||
|
|
||||||
|
col = BubbleCollection(brlyt, brlan, bubblepane)
|
||||||
|
col.addtype(BubbleType("abubble1", 48, 48),1)
|
||||||
|
col.addtype(BubbleType("abubble2", 32, 32),1)
|
||||||
|
col.addtype(BubbleType("abubble3", 16, 16),1)
|
||||||
|
col.addtype(BubbleType("abubble4", 24, 24),1)
|
||||||
|
col.addtype(BubbleType("abubble5", 32, 32),1)
|
||||||
|
col.addtype(BubbleType("abubble6", 16, 16),1)
|
||||||
|
col.addtype(BubbleType("bbubble1", 48, 48),1)
|
||||||
|
col.addtype(BubbleType("cbubble1", 64, 64),1)
|
||||||
|
col.addtype(BubbleType("cbubble2", 16, 16),1)
|
||||||
|
|
||||||
|
bubbleBoom = 190
|
||||||
|
|
||||||
|
# bubble mania!
|
||||||
|
for i in range(100):
|
||||||
|
col.addinstance(BubbleInstance(bubbleBoom))
|
||||||
|
|
||||||
|
# now fill things
|
||||||
|
for i in range(280):
|
||||||
|
start = random.uniform(bubbleBoom, loopEnd)
|
||||||
|
col.addinstance(BubbleInstance(start))
|
||||||
|
|
||||||
|
# clear the ones that overrun the loop
|
||||||
|
for i in col.Instances:
|
||||||
|
if i.End > loopEnd:
|
||||||
|
col.Instances.remove(i)
|
||||||
|
|
||||||
|
# and copy the loop start bubbles to the end
|
||||||
|
for i in col.Instances:
|
||||||
|
if i.Start < loopStart and i.End > loopStart:
|
||||||
|
new = i.clone()
|
||||||
|
new.Start -= loopStart
|
||||||
|
new.Start += loopEnd
|
||||||
|
new.End -= loopStart
|
||||||
|
new.End += loopEnd
|
||||||
|
col.Instances.append(new)
|
||||||
|
|
||||||
|
col.render()
|
||||||
|
|
||||||
|
brldata = brlyt.Pack()
|
||||||
|
open(sys.argv[1],"w").write(brldata)
|
||||||
|
|
||||||
|
bradata = brlan.Pack(loopStart)
|
||||||
|
open(sys.argv[2],"w").write(bradata)
|
||||||
|
|
||||||
|
bradata = brlan.Pack(loopStart, loopEnd)
|
||||||
|
open(sys.argv[3],"w").write(bradata)
|
20
channel/banner/banner/textures.txt
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#-----------------------
|
||||||
|
# texture x y
|
||||||
|
#-----------------------
|
||||||
|
abubble1.png 0 0
|
||||||
|
abubble2.png 0 0
|
||||||
|
abubble3.png 0 0
|
||||||
|
abubble4.png 0 0
|
||||||
|
abubble5.png 0 0
|
||||||
|
abubble6.png 0 0
|
||||||
|
bbubble1.png 0 0
|
||||||
|
cbubble1.png 0 0
|
||||||
|
cbubble2.png 0 0
|
||||||
|
white.png 1 1
|
||||||
|
banner_fade.png 1 0
|
||||||
|
banner_title.png 0 0
|
||||||
|
banner_wave1a.png 0 0
|
||||||
|
banner_wave1b.png 0 0
|
||||||
|
banner_wavea.png 1 0
|
||||||
|
banner_waveb.png 1 0
|
||||||
|
banner_shape2.png 0 0
|
BIN
channel/banner/banner/white.png
Normal file
After Width: | Height: | Size: 177 B |
BIN
channel/banner/icon/icon_fade.png
Normal file
After Width: | Height: | Size: 214 B |
BIN
channel/banner/icon/icon_shape2.png
Normal file
After Width: | Height: | Size: 610 B |
BIN
channel/banner/icon/icon_title.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
channel/banner/icon/icon_wave1a.png
Normal file
After Width: | Height: | Size: 407 B |
BIN
channel/banner/icon/icon_wave1b.png
Normal file
After Width: | Height: | Size: 452 B |
BIN
channel/banner/icon/icon_wavea.png
Normal file
After Width: | Height: | Size: 877 B |
BIN
channel/banner/icon/icon_waveb.png
Normal file
After Width: | Height: | Size: 843 B |
182
channel/banner/icon/mkicon.py
Normal file
@ -0,0 +1,182 @@
|
|||||||
|
import sys, os, struct, random
|
||||||
|
|
||||||
|
sys.path.append(os.environ['ALAMEDA']+"/../Common")
|
||||||
|
sys.path.append(os.environ['ALAMEDA'])
|
||||||
|
|
||||||
|
from Alameda import *
|
||||||
|
|
||||||
|
brlyt = Brlyt(None, None, None)
|
||||||
|
brlyt.Width = 170
|
||||||
|
brlyt.Height = 96
|
||||||
|
|
||||||
|
brlyt.Textures.add(Brlyt.BrlytTexture("icon_title.tpl"))
|
||||||
|
brlyt.Textures.add(Brlyt.BrlytTexture("white.tpl"))
|
||||||
|
brlyt.Textures.add(Brlyt.BrlytTexture("icon_wavea.tpl"))
|
||||||
|
brlyt.Textures.add(Brlyt.BrlytTexture("icon_waveb.tpl"))
|
||||||
|
brlyt.Textures.add(Brlyt.BrlytTexture("icon_wave1a.tpl"))
|
||||||
|
brlyt.Textures.add(Brlyt.BrlytTexture("icon_wave1b.tpl"))
|
||||||
|
brlyt.Textures.add(Brlyt.BrlytTexture("icon_shape2.tpl"))
|
||||||
|
brlyt.Textures.add(Brlyt.BrlytTexture("icon_fade.tpl"))
|
||||||
|
|
||||||
|
brlyt.Materials.add(Brlyt.BrlytMaterial("title"))
|
||||||
|
brlyt.Materials[0].Textures.append((0,0,0))
|
||||||
|
brlyt.Materials[0].TextureCoords.append([0,0,0,1,1])
|
||||||
|
brlyt.Materials[0].SthB.append(0x01041e00)
|
||||||
|
|
||||||
|
brlyt.Materials.add(Brlyt.BrlytMaterial("white"))
|
||||||
|
brlyt.Materials[1].Textures.append((1,1,1))
|
||||||
|
brlyt.Materials[1].TextureCoords.append([0,0,0,1,1])
|
||||||
|
brlyt.Materials[1].SthB.append(0x01041e00)
|
||||||
|
|
||||||
|
brlyt.Materials.add(Brlyt.BrlytMaterial("wavea"))
|
||||||
|
brlyt.Materials[2].Textures.append((2,1,0))
|
||||||
|
brlyt.Materials[2].TextureCoords.append([0,2,0,4,6])
|
||||||
|
brlyt.Materials[2].SthB.append(0x01041e00)
|
||||||
|
|
||||||
|
brlyt.Materials.add(Brlyt.BrlytMaterial("waveb"))
|
||||||
|
brlyt.Materials[3].Textures.append((3,1,0))
|
||||||
|
brlyt.Materials[3].TextureCoords.append([0,2,0,4,6])
|
||||||
|
brlyt.Materials[3].SthB.append(0x01041e00)
|
||||||
|
|
||||||
|
brlyt.Materials.add(Brlyt.BrlytMaterial("wave1a"))
|
||||||
|
brlyt.Materials[4].Textures.append((4,0,0))
|
||||||
|
brlyt.Materials[4].TextureCoords.append([0,0,0,1,1])
|
||||||
|
brlyt.Materials[4].SthB.append(0x01041e00)
|
||||||
|
|
||||||
|
brlyt.Materials.add(Brlyt.BrlytMaterial("wave1b"))
|
||||||
|
brlyt.Materials[5].Textures.append((5,0,0))
|
||||||
|
brlyt.Materials[5].TextureCoords.append([0,0,0,1,1])
|
||||||
|
brlyt.Materials[5].SthB.append(0x01041e00)
|
||||||
|
|
||||||
|
brlyt.Materials.add(Brlyt.BrlytMaterial("shape2"))
|
||||||
|
brlyt.Materials[6].Textures.append((6,0,0))
|
||||||
|
brlyt.Materials[6].TextureCoords.append([0,0,0,1,1])
|
||||||
|
brlyt.Materials[6].SthB.append(0x01041e00)
|
||||||
|
|
||||||
|
brlyt.Materials.add(Brlyt.BrlytMaterial("fade"))
|
||||||
|
brlyt.Materials[7].Textures.append((7,0,0))
|
||||||
|
brlyt.Materials[7].TextureCoords.append([0,0,0,1,1])
|
||||||
|
brlyt.Materials[7].SthB.append(0x01041e00)
|
||||||
|
|
||||||
|
|
||||||
|
brlyt.RootPane = Pane("RootPane")
|
||||||
|
brlyt.RootPane.Width = brlyt.Width
|
||||||
|
brlyt.RootPane.Height = brlyt.Height
|
||||||
|
|
||||||
|
waterpane = Pane("water")
|
||||||
|
|
||||||
|
bkg = Picture("background")
|
||||||
|
bkg.Material = 1
|
||||||
|
bkg.X, bkg.Y, bkg.Width, bkg.Height = 0,0,170,96
|
||||||
|
|
||||||
|
tit = Picture("title")
|
||||||
|
tit.Material = 0
|
||||||
|
tit.X, tit.Y, tit.Width, tit.Height = 0,-7,110,49
|
||||||
|
|
||||||
|
wavea = Picture("wavea")
|
||||||
|
wavea.Material = 2
|
||||||
|
wavea.X, wavea.Y, wavea.Width, wavea.Height = -171,-5,1024,96
|
||||||
|
|
||||||
|
waveb = Picture("waveb")
|
||||||
|
waveb.Material = 3
|
||||||
|
waveb.X, waveb.Y, waveb.Width, waveb.Height = -171,-3,1024,96
|
||||||
|
|
||||||
|
wave1a = Picture("wave1a")
|
||||||
|
wave1a.Material = 4
|
||||||
|
wave1a.X, wave1a.Y, wave1a.Width, wave1a.Height = -75,27,94,8
|
||||||
|
|
||||||
|
wave1b = Picture("wave1b")
|
||||||
|
wave1b.Material = 5
|
||||||
|
wave1b.X, wave1b.Y, wave1b.Width, wave1b.Height = 65,27,130,9
|
||||||
|
|
||||||
|
shadow = Picture("shadow")
|
||||||
|
shadow.Material = 6
|
||||||
|
shadow.X, shadow.Y, shadow.Width, shadow.Height = -45,21,159,7
|
||||||
|
|
||||||
|
fade = Picture("fade")
|
||||||
|
fade.Material = 7
|
||||||
|
fade.X, fade.Y, fade.Width, fade.Height = 0,-16,170,80
|
||||||
|
|
||||||
|
|
||||||
|
waterpane.Add(wavea)
|
||||||
|
waterpane.Add(waveb)
|
||||||
|
waterpane.Add(wave1a)
|
||||||
|
waterpane.Add(wave1b)
|
||||||
|
waterpane.Add(shadow)
|
||||||
|
waterpane.Add(fade)
|
||||||
|
|
||||||
|
brlyt.RootPane.Add(bkg)
|
||||||
|
brlyt.RootPane.Add(waterpane)
|
||||||
|
brlyt.RootPane.Add(tit)
|
||||||
|
|
||||||
|
brldata = brlyt.Pack()
|
||||||
|
|
||||||
|
open(sys.argv[1],"w").write(brldata)
|
||||||
|
|
||||||
|
|
||||||
|
brlan = Brlan()
|
||||||
|
brlan.Anim.add(Brlan.BrlanAnimSet("water"))
|
||||||
|
brlan.Anim.add(Brlan.BrlanAnimSet("wavea"))
|
||||||
|
brlan.Anim.add(Brlan.BrlanAnimSet("waveb"))
|
||||||
|
brlan.Anim.add(Brlan.BrlanAnimSet("wave1a"))
|
||||||
|
brlan.Anim.add(Brlan.BrlanAnimSet("wave1b"))
|
||||||
|
brlan.Anim.add(Brlan.BrlanAnimSet("shadow"))
|
||||||
|
brlan.Anim.add(Brlan.BrlanAnimSet("title"))
|
||||||
|
|
||||||
|
brlan.Anim['title'].add(Brlan.BrlanAnimClass(Brlan.A_COORD))
|
||||||
|
brlan.Anim['title'][Brlan.A_COORD].add(Brlan.BrlanAnim(Brlan.C_Y))
|
||||||
|
brlan.Anim['title'][Brlan.A_COORD][Brlan.C_Y].repsimple(0, 960, 8, -7, 0, -11, 0)
|
||||||
|
|
||||||
|
for i in ['wavea', 'waveb', 'wave1a', 'wave1b', 'shadow']:
|
||||||
|
brlan.Anim[i].add(Brlan.BrlanAnimClass(Brlan.A_COORD))
|
||||||
|
brlan.Anim[i][Brlan.A_COORD].add(Brlan.BrlanAnim(Brlan.C_X))
|
||||||
|
brlan.Anim[i][Brlan.A_COORD].add(Brlan.BrlanAnim(Brlan.C_Y))
|
||||||
|
|
||||||
|
brlan.Anim['wavea'][Brlan.A_COORD][Brlan.C_X].repsimple(0, 960, 2, -130, 0, 130, 0)
|
||||||
|
brlan.Anim['waveb'][Brlan.A_COORD][Brlan.C_X].repsimple(0, 960, 2, -130, 2.0, 130, 2.0)
|
||||||
|
brlan.Anim['wavea'][Brlan.A_COORD][Brlan.C_Y].repsimple(0, 960, 3, -5, 0, 1, 0)
|
||||||
|
brlan.Anim['waveb'][Brlan.A_COORD][Brlan.C_Y].repsimple(0, 960, 4, -3, 0, 3, 0)
|
||||||
|
|
||||||
|
brlan.Anim['wave1a'][Brlan.A_COORD][Brlan.C_X].Triplets.append((0, -75, 0.2))
|
||||||
|
brlan.Anim['wave1a'][Brlan.A_COORD][Brlan.C_Y].Triplets.append((0, 27, 0.2))
|
||||||
|
brlan.Anim['wave1a'][Brlan.A_COORD][Brlan.C_X].Triplets.append((100, 0, 0.2))
|
||||||
|
brlan.Anim['wave1a'][Brlan.A_COORD][Brlan.C_Y].Triplets.append((100, 29, 0.2))
|
||||||
|
brlan.Anim['wave1a'][Brlan.A_COORD][Brlan.C_X].Triplets.append((200, 50, 0.2))
|
||||||
|
brlan.Anim['wave1a'][Brlan.A_COORD][Brlan.C_Y].Triplets.append((200, 27, 0.2))
|
||||||
|
brlan.Anim['wave1a'][Brlan.A_COORD][Brlan.C_X].Triplets.append((400, -75, 0.2))
|
||||||
|
brlan.Anim['wave1a'][Brlan.A_COORD][Brlan.C_Y].Triplets.append((400, 27, 0.2))
|
||||||
|
brlan.Anim['wave1a'][Brlan.A_COORD][Brlan.C_X].Triplets.append((500, -40, 0.2))
|
||||||
|
brlan.Anim['wave1a'][Brlan.A_COORD][Brlan.C_Y].Triplets.append((500, 30, 0.2))
|
||||||
|
brlan.Anim['wave1a'][Brlan.A_COORD][Brlan.C_X].Triplets.append((600, -40, 0.2))
|
||||||
|
brlan.Anim['wave1a'][Brlan.A_COORD][Brlan.C_Y].Triplets.append((600, 30, 0.2))
|
||||||
|
brlan.Anim['wave1a'][Brlan.A_COORD][Brlan.C_X].Triplets.append((750, 15, 0.2))
|
||||||
|
brlan.Anim['wave1a'][Brlan.A_COORD][Brlan.C_Y].Triplets.append((750, 28, 0.2))
|
||||||
|
brlan.Anim['wave1a'][Brlan.A_COORD][Brlan.C_X].Triplets.append((960, -75, 0.2))
|
||||||
|
brlan.Anim['wave1a'][Brlan.A_COORD][Brlan.C_Y].Triplets.append((960, 27, 0.2))
|
||||||
|
|
||||||
|
brlan.Anim['wave1b'][Brlan.A_COORD][Brlan.C_X].Triplets.append((0, 65, 0.2))
|
||||||
|
brlan.Anim['wave1b'][Brlan.A_COORD][Brlan.C_Y].Triplets.append((0, 27, 0.2))
|
||||||
|
brlan.Anim['wave1b'][Brlan.A_COORD][Brlan.C_X].Triplets.append((120, 10, 0.2))
|
||||||
|
brlan.Anim['wave1b'][Brlan.A_COORD][Brlan.C_Y].Triplets.append((120, 29, 0.2))
|
||||||
|
brlan.Anim['wave1b'][Brlan.A_COORD][Brlan.C_X].Triplets.append((190, 65, 0.2))
|
||||||
|
brlan.Anim['wave1b'][Brlan.A_COORD][Brlan.C_Y].Triplets.append((190, 27, 0.2))
|
||||||
|
brlan.Anim['wave1b'][Brlan.A_COORD][Brlan.C_X].Triplets.append((430, 20, 0.2))
|
||||||
|
brlan.Anim['wave1b'][Brlan.A_COORD][Brlan.C_Y].Triplets.append((430, 27, 0.2))
|
||||||
|
brlan.Anim['wave1b'][Brlan.A_COORD][Brlan.C_X].Triplets.append((510, -20, 0.2))
|
||||||
|
brlan.Anim['wave1b'][Brlan.A_COORD][Brlan.C_Y].Triplets.append((510, 30, 0.2))
|
||||||
|
brlan.Anim['wave1b'][Brlan.A_COORD][Brlan.C_X].Triplets.append((670, -40, 0.2))
|
||||||
|
brlan.Anim['wave1b'][Brlan.A_COORD][Brlan.C_Y].Triplets.append((670, 30, 0.2))
|
||||||
|
brlan.Anim['wave1b'][Brlan.A_COORD][Brlan.C_X].Triplets.append((710, 0, 0.2))
|
||||||
|
brlan.Anim['wave1b'][Brlan.A_COORD][Brlan.C_Y].Triplets.append((710, 28, 0.2))
|
||||||
|
brlan.Anim['wave1b'][Brlan.A_COORD][Brlan.C_X].Triplets.append((960, 65, 0.2))
|
||||||
|
brlan.Anim['wave1b'][Brlan.A_COORD][Brlan.C_Y].Triplets.append((960, 27, 0.2))
|
||||||
|
|
||||||
|
brlan.Anim['shadow'][Brlan.A_COORD][Brlan.C_Y].repsimple(0, 960, 4, 21, -0.1, 25, -0.1)
|
||||||
|
brlan.Anim['shadow'][Brlan.A_COORD][Brlan.C_X].repsimple(0, 960, 2, -45, -0.1, 45, -0.1)
|
||||||
|
|
||||||
|
|
||||||
|
bradata = brlan.Pack(60*16)
|
||||||
|
for a,b,c in brlan.Anim['waveb'][Brlan.A_COORD][Brlan.C_X].Triplets:
|
||||||
|
print a,b,c
|
||||||
|
|
||||||
|
open(sys.argv[2],"w").write(bradata)
|
11
channel/banner/icon/textures.txt
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#-----------------------
|
||||||
|
# texture x y
|
||||||
|
#-----------------------
|
||||||
|
white.png 1 1
|
||||||
|
icon_fade.png 1 0
|
||||||
|
icon_title.png 0 0
|
||||||
|
icon_wave1a.png 0 0
|
||||||
|
icon_wave1b.png 0 0
|
||||||
|
icon_wavea.png 1 0
|
||||||
|
icon_waveb.png 1 0
|
||||||
|
icon_shape2.png 0 0
|
BIN
channel/banner/icon/white.png
Normal file
After Width: | Height: | Size: 177 B |
9
channel/banner/names.txt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
jp=Homebrewチャンネル
|
||||||
|
en=Homebrew Channel
|
||||||
|
de=Homebrewkanal
|
||||||
|
fr=Chaîne Homebrew
|
||||||
|
sp=Canal Homebrew
|
||||||
|
it=Canale Homebrew
|
||||||
|
nl=Homebrewkanaal
|
||||||
|
cn=Homebrew频道
|
||||||
|
ko=Homebrew 채널
|
BIN
channel/banner/sound/wiibrew-banner-intro-part.wav
Normal file
BIN
channel/banner/sound/wiibrew-banner-loop-part.wav
Normal file
19
channel/banner/tools/Makefile
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
|
||||||
|
CFLAGS = -O3 -Wall -I/usr/local/include -L/usr/local/lib
|
||||||
|
|
||||||
|
CC = $(PREFIX)gcc
|
||||||
|
STRIP = $(PREFIX)strip
|
||||||
|
|
||||||
|
all: mkbns$(EXE) png2tpl$(EXE) lz77$(EXE)
|
||||||
|
|
||||||
|
mkbns$(EXE): mkbns.c
|
||||||
|
$(CC) $(CFLAGS) -o mkbns mkbns.c -lm
|
||||||
|
|
||||||
|
png2tpl$(EXE): png2tpl.c
|
||||||
|
$(CC) $(CFLAGS) -o png2tpl png2tpl.c -lpng
|
||||||
|
|
||||||
|
lz77$(EXE): lz77.c
|
||||||
|
$(CC) $(CFLAGS) -o lz77 lz77.c
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f mkbns$(EXE) png2tpl$(EXE) lz77$(EXE)
|
13
channel/banner/tools/addimd5.py
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import md5, sys, struct
|
||||||
|
|
||||||
|
data= open(sys.argv[1]).read()
|
||||||
|
|
||||||
|
digest = md5.new(data).digest()
|
||||||
|
|
||||||
|
hdr = struct.pack(">4sI8x","IMD5",len(data))
|
||||||
|
|
||||||
|
f2 = open(sys.argv[2],"w")
|
||||||
|
f2.write(hdr)
|
||||||
|
f2.write(digest)
|
||||||
|
f2.write(data)
|
||||||
|
f2.close()
|
48
channel/banner/tools/join-imet.py
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
import os, sys, struct, md5
|
||||||
|
|
||||||
|
output, datafile, iconarc, bannerarc, soundbns, namesfile = sys.argv[1:]
|
||||||
|
|
||||||
|
data = open(datafile,"r").read()
|
||||||
|
|
||||||
|
names={}
|
||||||
|
|
||||||
|
for i in open(namesfile,"r"):
|
||||||
|
a,b = i.split("=")
|
||||||
|
while b[-1] == "\n":
|
||||||
|
b = b[:-1]
|
||||||
|
b = b.replace("\\n","\n")
|
||||||
|
names[a] = b.decode("utf-8")
|
||||||
|
|
||||||
|
def getsize(x):
|
||||||
|
return os.stat(x).st_size
|
||||||
|
|
||||||
|
def pad(x,l):
|
||||||
|
if len(x) > l:
|
||||||
|
raise ValueError("%d > %d",len(x),l)
|
||||||
|
n = l-len(x)
|
||||||
|
return x + "\x00"*n
|
||||||
|
|
||||||
|
imet = "\x00"*0x40
|
||||||
|
imet += struct.pack(">4sIIIIII","IMET",0x600,3,getsize(iconarc),getsize(bannerarc),getsize(soundbns),1)
|
||||||
|
|
||||||
|
for i in ["jp", "en", "de", "fr", "sp", "it", "nl", "cn", None, "ko"]:
|
||||||
|
try:
|
||||||
|
imet += pad(names[i].encode("UTF-16BE"),0x54)
|
||||||
|
except KeyError:
|
||||||
|
imet += "\x00"*0x54
|
||||||
|
imet += "\x00"*(0x600 - len(imet))
|
||||||
|
|
||||||
|
imet = imet[:-16] + md5.new(imet).digest()
|
||||||
|
|
||||||
|
open(output,"w").write(imet)
|
||||||
|
|
||||||
|
f = open(sys.argv[1],"w")
|
||||||
|
f.write(imet)
|
||||||
|
f.write(data)
|
||||||
|
|
||||||
|
fsize = f.tell()
|
||||||
|
|
||||||
|
if (fsize % 20) != 0:
|
||||||
|
f.write("\x00"*(20-(fsize%20)))
|
||||||
|
|
||||||
|
f.close()
|
273
channel/banner/tools/lz77.c
Normal file
@ -0,0 +1,273 @@
|
|||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
/*Altered by Kuwanger*/
|
||||||
|
/*************************************************************************
|
||||||
|
* Name: lz.c
|
||||||
|
* Author: Marcus Geelnard
|
||||||
|
* Description: LZ77 coder/decoder implementation.
|
||||||
|
* Reentrant: Yes
|
||||||
|
* $Id: lz.c,v 1.4 2004/10/08 19:28:04 marcus256 Exp $
|
||||||
|
*
|
||||||
|
* The LZ77 compression scheme is a substitutional compression scheme
|
||||||
|
* proposed by Abraham Lempel and Jakob Ziv in 1977. It is very simple in
|
||||||
|
* its design, and uses no fancy bit level compression.
|
||||||
|
*
|
||||||
|
* This is my first attempt at an implementation of a LZ77 code/decoder.
|
||||||
|
*
|
||||||
|
* The principle of the LZ77 compression algorithm is to store repeated
|
||||||
|
* occurrences of strings as references to previous occurrences of the same
|
||||||
|
* string. The point is that the reference consumes less space than the
|
||||||
|
* string itself, provided that the string is long enough (in this
|
||||||
|
* implementation, the string has to be at least 4 bytes long, since the
|
||||||
|
* minimum coded reference is 3 bytes long). Also note that the term
|
||||||
|
* "string" refers to any kind of byte sequence (it does not have to be
|
||||||
|
* an ASCII string, for instance).
|
||||||
|
*
|
||||||
|
* The coder uses a brute force approach to finding string matches in the
|
||||||
|
* history buffer (or "sliding window", if you wish), which is very, very
|
||||||
|
* slow. I recon the complexity is somewhere between O(n^2) and O(n^3),
|
||||||
|
* depending on the input data.
|
||||||
|
*
|
||||||
|
* There is also a faster implementation that uses a large working buffer
|
||||||
|
* in which a "jump table" is stored, which is used to quickly find
|
||||||
|
* possible string matches (see the source code for LZ_CompressFast() for
|
||||||
|
* more information). The faster method is an order of magnitude faster,
|
||||||
|
* and also does a full string search in the entire input buffer (it does
|
||||||
|
* not use a sliding window).
|
||||||
|
*
|
||||||
|
* The upside is that decompression is very fast, and the compression ratio
|
||||||
|
* is often very good.
|
||||||
|
*
|
||||||
|
* The reference to a string is coded as a (length,offset) pair, where the
|
||||||
|
* length indicates the length of the string, and the offset gives the
|
||||||
|
* offset from the current data position. To distinguish between string
|
||||||
|
* references and literal strings (uncompressed bytes), a string reference
|
||||||
|
* is preceded by a marker byte, which is chosen as the least common byte
|
||||||
|
* symbol in the input data stream (this marker byte is stored in the
|
||||||
|
* output stream as the first byte).
|
||||||
|
*
|
||||||
|
* Occurrences of the marker byte in the stream are encoded as the marker
|
||||||
|
* byte followed by a zero byte, which means that occurrences of the marker
|
||||||
|
* byte have to be coded with two bytes.
|
||||||
|
*
|
||||||
|
* The lengths and offsets are coded in a variable length fashion, allowing
|
||||||
|
* values of any magnitude (up to 4294967295 in this implementation).
|
||||||
|
*
|
||||||
|
* With this compression scheme, the worst case compression result is
|
||||||
|
* (257/256)*insize + 1.
|
||||||
|
*
|
||||||
|
*-------------------------------------------------------------------------
|
||||||
|
* Copyright (c) 2003-2004 Marcus Geelnard
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
* Marcus Geelnard
|
||||||
|
* marcus.geelnard at home.se
|
||||||
|
*************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
* Constants used for LZ77 coding
|
||||||
|
*************************************************************************/
|
||||||
|
|
||||||
|
/* Maximum offset (can be any size < 2^32). Lower values gives faster
|
||||||
|
compression, while higher values gives better compression.
|
||||||
|
NOTE: LZ_CompressFast does not use this constant. */
|
||||||
|
#define LZ_MAX_OFFSET 4096
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
* INTERNAL FUNCTIONS *
|
||||||
|
*************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
* _LZ_StringCompare() - Return maximum length string match.
|
||||||
|
*************************************************************************/
|
||||||
|
|
||||||
|
static unsigned int _LZ_StringCompare( unsigned char * str1,
|
||||||
|
unsigned char * str2, unsigned int minlen, unsigned int maxlen )
|
||||||
|
{
|
||||||
|
unsigned int len;
|
||||||
|
|
||||||
|
for( len = minlen; (len < maxlen) && (str1[len] == str2[len]); ++ len );
|
||||||
|
// for( len = minlen; (len < maxlen) && (str2+len+1 < str1-1) && (str1[len] == str2[len]); ++ len );
|
||||||
|
|
||||||
|
return len;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
* PUBLIC FUNCTIONS *
|
||||||
|
*************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
* LZ_Compress() - Compress a block of data using an LZ77 coder.
|
||||||
|
* in - Input (uncompressed) buffer.
|
||||||
|
* out - Output (compressed) buffer. This buffer must be 0.4% larger
|
||||||
|
* than the input buffer, plus one byte.
|
||||||
|
* insize - Number of input bytes.
|
||||||
|
* The function returns the size of the compressed data.
|
||||||
|
*************************************************************************/
|
||||||
|
|
||||||
|
int LZ_Compress( unsigned char *in, unsigned char *out,
|
||||||
|
unsigned int insize )
|
||||||
|
{
|
||||||
|
unsigned char mask, bundle1, bundle2;
|
||||||
|
int inpos, outpos, bytesleft;
|
||||||
|
int maxoffset, offset, bestoffset;
|
||||||
|
int maxlength, length, bestlength;
|
||||||
|
unsigned char *ptr1, *ptr2, *flags;
|
||||||
|
|
||||||
|
/* Do we have anything to compress? */
|
||||||
|
if( insize < 1 )
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remember the repetition marker for the decoder */
|
||||||
|
|
||||||
|
out[0] = 0x10;
|
||||||
|
out[1] = insize&0xFF;
|
||||||
|
out[2] = (insize>>8)&0xFF;
|
||||||
|
out[3] = (insize>>16)&0xFF;
|
||||||
|
flags = &out[4];
|
||||||
|
*flags = 0;
|
||||||
|
mask = 128;
|
||||||
|
|
||||||
|
/* Start of compression */
|
||||||
|
inpos = 0;
|
||||||
|
outpos = 5;
|
||||||
|
|
||||||
|
/* Main compression loop */
|
||||||
|
bytesleft = insize;
|
||||||
|
do
|
||||||
|
{
|
||||||
|
/* Determine most distant position */
|
||||||
|
if( inpos > LZ_MAX_OFFSET ) maxoffset = LZ_MAX_OFFSET;
|
||||||
|
else maxoffset = inpos;
|
||||||
|
|
||||||
|
/* Get pointer to current position */
|
||||||
|
ptr1 = &in[ inpos ];
|
||||||
|
|
||||||
|
/* Search history window for maximum length string match */
|
||||||
|
bestlength = 2;
|
||||||
|
bestoffset = 0;
|
||||||
|
for( offset = 3; offset <= maxoffset; ++ offset )
|
||||||
|
{
|
||||||
|
/* Get pointer to candidate string */
|
||||||
|
ptr2 = &ptr1[ -offset ];
|
||||||
|
|
||||||
|
/* Quickly determine if this is a candidate (for speed) */
|
||||||
|
if( (ptr1[ 0 ] == ptr2[ 0 ]) &&
|
||||||
|
(ptr1[ bestlength ] == ptr2[ bestlength ]) )
|
||||||
|
{
|
||||||
|
/* Determine maximum length for this offset */
|
||||||
|
maxlength = ((inpos+1) > 18 ? 18 : inpos + 1);
|
||||||
|
|
||||||
|
/* Count maximum length match at this offset */
|
||||||
|
length = _LZ_StringCompare( ptr1, ptr2, 0, maxlength );
|
||||||
|
|
||||||
|
/* Better match than any previous match? */
|
||||||
|
if( length > bestlength )
|
||||||
|
{
|
||||||
|
bestlength = length;
|
||||||
|
bestoffset = offset;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Was there a good enough match? */
|
||||||
|
if( bestlength > 2)
|
||||||
|
{
|
||||||
|
*flags |= mask;
|
||||||
|
mask >>= 1;
|
||||||
|
bundle2 = ((bestlength-3)<<4) | (((bestoffset-1)&0xF00)>>8);
|
||||||
|
bundle1 = (bestoffset-1)&0xFF;
|
||||||
|
out [ outpos++ ] = bundle2;
|
||||||
|
out [ outpos++ ] = bundle1;
|
||||||
|
|
||||||
|
inpos += bestlength;
|
||||||
|
bytesleft -= bestlength;
|
||||||
|
if (!mask) {
|
||||||
|
mask = 128;
|
||||||
|
flags = &out [ outpos++ ];
|
||||||
|
*flags = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mask >>= 1;
|
||||||
|
out[ outpos ++ ] = in[ inpos++ ];
|
||||||
|
-- bytesleft;
|
||||||
|
if (!mask) {
|
||||||
|
mask = 128;
|
||||||
|
flags = &out [ outpos++ ];
|
||||||
|
*flags = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while( bytesleft > 3 );
|
||||||
|
|
||||||
|
/* Dump remaining bytes, if any */
|
||||||
|
while( inpos < insize )
|
||||||
|
{
|
||||||
|
out[ outpos ++ ] = in[ inpos++ ];
|
||||||
|
}
|
||||||
|
|
||||||
|
while(outpos&3)
|
||||||
|
out [ outpos ++] = 0;
|
||||||
|
|
||||||
|
return outpos;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
int in, out, size;
|
||||||
|
struct stat buf;
|
||||||
|
unsigned char *uncompressed, *compressed;
|
||||||
|
|
||||||
|
if (argc == 3) {
|
||||||
|
in = open(argv[1], O_RDONLY);
|
||||||
|
out = creat(argv[2], 0600);
|
||||||
|
fstat(in, &buf);
|
||||||
|
uncompressed = malloc(buf.st_size);
|
||||||
|
read(in, uncompressed, buf.st_size);
|
||||||
|
close(in);
|
||||||
|
compressed = malloc(buf.st_size*2);
|
||||||
|
size = LZ_Compress(uncompressed, compressed, buf.st_size);
|
||||||
|
write(out, "LZ77", 4);
|
||||||
|
write(out, compressed, size);
|
||||||
|
close(out);
|
||||||
|
free(compressed);
|
||||||
|
free(uncompressed);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
printf("Usage: %s file.bin file.lz77\n", argv[0]);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
353
channel/banner/tools/mkbns.c
Normal file
@ -0,0 +1,353 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
uint16_t deftbl[16] = {
|
||||||
|
2048, 0,
|
||||||
|
4096, -2048,
|
||||||
|
0, 0,
|
||||||
|
1536, 512,
|
||||||
|
1920, 0,
|
||||||
|
2176, 0,
|
||||||
|
3680, -1664,
|
||||||
|
3136, -1856
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
int16_t deftbl[16] = {
|
||||||
|
2048, 0,
|
||||||
|
0,0,
|
||||||
|
0,0,
|
||||||
|
0,0,
|
||||||
|
0,0,
|
||||||
|
0,0,
|
||||||
|
0,0,
|
||||||
|
0,0,
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int16_t deftbl[16] = {
|
||||||
|
674,1040,
|
||||||
|
3598,-1738,
|
||||||
|
2270,-583,
|
||||||
|
3967,-1969,
|
||||||
|
1516,381,
|
||||||
|
3453, -1468,
|
||||||
|
2606, -617,
|
||||||
|
3795, -1759,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
|
||||||
|
uint32_t fourcc;
|
||||||
|
uint32_t unk;
|
||||||
|
uint32_t filesize;
|
||||||
|
uint16_t unk1,unk2;
|
||||||
|
uint32_t infooff;
|
||||||
|
uint32_t infosize;
|
||||||
|
uint32_t dataoff;
|
||||||
|
uint32_t datasize;
|
||||||
|
} bnshdr;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint32_t fourcc;
|
||||||
|
uint32_t size;
|
||||||
|
uint16_t looped;
|
||||||
|
uint16_t unk2;
|
||||||
|
uint16_t srate;
|
||||||
|
uint16_t unk3;
|
||||||
|
uint32_t looppoint;
|
||||||
|
uint32_t samples;
|
||||||
|
uint32_t unknown1[6];
|
||||||
|
uint32_t start1;
|
||||||
|
uint32_t start2;
|
||||||
|
uint32_t unknown2[2];
|
||||||
|
int16_t tbl1[16];
|
||||||
|
uint16_t unka1[8];
|
||||||
|
int16_t tbl2[16];
|
||||||
|
uint16_t unka2[8];
|
||||||
|
} bnsinfo;
|
||||||
|
|
||||||
|
float tables[2][16];
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint32_t fourcc;
|
||||||
|
uint32_t size;
|
||||||
|
} bnsdatahdr;
|
||||||
|
|
||||||
|
#define SWAB16(x) ((((x)>>8)&0xFF) | (((x)&0xFF)<<8))
|
||||||
|
#define SWAB32(x) ((SWAB16((x)&0xFFFF)<<16)|(SWAB16(((x)>>16)&0xFFFF)))
|
||||||
|
|
||||||
|
#define ISWAB16(x) x=SWAB16(x)
|
||||||
|
#define ISWAB32(x) x=SWAB32(x)
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
int16_t l;
|
||||||
|
int16_t r;
|
||||||
|
} sample;
|
||||||
|
|
||||||
|
int16_t lsamps[2][2] = {{0,0},{0,0}};
|
||||||
|
int16_t rlsamps[2][2] = {{0,0},{0,0}};
|
||||||
|
|
||||||
|
#define CLAMP(a,min,max) (((a)>(max))?(max):(((a)<(min))?(min):(a)))
|
||||||
|
|
||||||
|
void unpack_adpcm(int idx, int16_t *table, uint8_t *data, int16_t *outbuf)
|
||||||
|
{
|
||||||
|
|
||||||
|
int32_t index = (data[0] >> 4) & 0x7; //highest bit of byte is ignored
|
||||||
|
uint32_t exponent = 28 - (data[0] & 0xf);
|
||||||
|
int32_t factor1 = table[2*index];
|
||||||
|
int32_t factor2 = table[2*index + 1];
|
||||||
|
int i;
|
||||||
|
int32_t sample;
|
||||||
|
for(i=0;i<14;i++) {
|
||||||
|
sample = data[1+(i/2)];
|
||||||
|
if(!(i&1)) {
|
||||||
|
sample = (sample&0xf0)<<24;
|
||||||
|
} else {
|
||||||
|
sample = (sample)<<28;
|
||||||
|
}
|
||||||
|
sample = ((lsamps[idx][1]*factor1 + lsamps[idx][0]*factor2)>>11) + (sample>>exponent);
|
||||||
|
if(sample>32767) sample=32767;
|
||||||
|
if(sample<-32768) sample=-32768;
|
||||||
|
if(abs(sample)>20000) printf("dammit %d\n",sample);
|
||||||
|
outbuf[i] = sample;
|
||||||
|
lsamps[idx][0] = lsamps[idx][1];
|
||||||
|
lsamps[idx][1] = outbuf[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t findexp(float residual, uint8_t *nybble)
|
||||||
|
{
|
||||||
|
uint8_t exp = 0;
|
||||||
|
|
||||||
|
while((residual > 7.5f) || (residual < -8.5f)) {
|
||||||
|
exp++;
|
||||||
|
residual /= 2;
|
||||||
|
}
|
||||||
|
if(nybble)
|
||||||
|
*nybble = CLAMP((int16_t)floor(residual),-8,7);
|
||||||
|
return exp;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t determine_std_exponent(int idx, int16_t *table, int index, int16_t *inbuf)
|
||||||
|
{
|
||||||
|
int32_t maxres = 0;
|
||||||
|
int32_t factor1 = table[2*index];
|
||||||
|
int32_t factor2 = table[2*index + 1];
|
||||||
|
int32_t predictor;
|
||||||
|
int32_t residual;
|
||||||
|
int i;
|
||||||
|
int16_t elsamps[2];
|
||||||
|
memcpy(elsamps,rlsamps[idx],sizeof(int16_t)*2);
|
||||||
|
for(i=0;i<14;i++) {
|
||||||
|
predictor = (elsamps[1]*factor1 + elsamps[0]*factor2)/2048;
|
||||||
|
residual = inbuf[i] - predictor;
|
||||||
|
if(residual > maxres) maxres = residual;
|
||||||
|
elsamps[0] = elsamps[1];
|
||||||
|
elsamps[1] = inbuf[i];
|
||||||
|
}
|
||||||
|
return findexp(maxres,NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
float compress_adpcm(int idx, int16_t *table, uint8_t tblidx, uint8_t *data, int16_t *inbuf, int16_t *lsamps) {
|
||||||
|
|
||||||
|
int32_t factor1 = table[2*tblidx];
|
||||||
|
int32_t factor2 = table[2*tblidx + 1];
|
||||||
|
int32_t predictor;
|
||||||
|
int32_t residual;
|
||||||
|
uint8_t exp;
|
||||||
|
int8_t nybble;
|
||||||
|
int i;
|
||||||
|
float error = 0;
|
||||||
|
|
||||||
|
exp = determine_std_exponent(idx, table, tblidx, inbuf);
|
||||||
|
|
||||||
|
while(exp<=15) {
|
||||||
|
memcpy(lsamps,rlsamps[idx],sizeof(int16_t)*2);
|
||||||
|
data[0] = exp | tblidx<<4;
|
||||||
|
error = 0;
|
||||||
|
for(i=0;i<14;i++) {
|
||||||
|
predictor = (lsamps[1]*factor1 + lsamps[0]*factor2)>>11;
|
||||||
|
residual = inbuf[i] - predictor;
|
||||||
|
residual = residual>>exp;
|
||||||
|
if((residual > 7) || (residual < -8)) {
|
||||||
|
exp++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
nybble = CLAMP(residual,-8,7);
|
||||||
|
if(i&1) {
|
||||||
|
data[i/2+1] |= nybble&0xf;
|
||||||
|
} else {
|
||||||
|
data[i/2+1] = nybble<<4;
|
||||||
|
}
|
||||||
|
predictor += nybble<<exp;
|
||||||
|
lsamps[0] = lsamps[1];
|
||||||
|
lsamps[1] = CLAMP(predictor,-32768,32767);
|
||||||
|
error += powf(lsamps[1] - inbuf[i],2.0f);
|
||||||
|
}
|
||||||
|
if(i == 14) break;
|
||||||
|
}
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void repack_adpcm(int idx, int16_t *table, uint8_t *data, int16_t *inbuf)
|
||||||
|
{
|
||||||
|
uint8_t tblidx;
|
||||||
|
uint8_t testdata[8];
|
||||||
|
int16_t tlsamps[2];
|
||||||
|
int16_t blsamps[2];
|
||||||
|
float error;
|
||||||
|
float besterror = 99999999.0f;
|
||||||
|
for(tblidx = 0; tblidx < 8; tblidx++) {
|
||||||
|
error = compress_adpcm(idx, table, tblidx, testdata, inbuf, tlsamps);
|
||||||
|
if(error < besterror) {
|
||||||
|
besterror = error;
|
||||||
|
memcpy(data, testdata, 8);
|
||||||
|
memcpy(blsamps, tlsamps, sizeof(int16_t)*2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
memcpy(rlsamps[idx], blsamps, sizeof(int16_t)*2);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
|
||||||
|
FILE *f;
|
||||||
|
FILE *f2 = NULL;
|
||||||
|
FILE *fo;
|
||||||
|
int i,j;
|
||||||
|
int16_t sampbuf[14];
|
||||||
|
|
||||||
|
bnshdr hdr;
|
||||||
|
bnsinfo info;
|
||||||
|
bnsdatahdr datahdr;
|
||||||
|
uint8_t *databuf;
|
||||||
|
uint8_t *data1;
|
||||||
|
uint8_t *data2;
|
||||||
|
sample *datain;
|
||||||
|
|
||||||
|
int samples;
|
||||||
|
int loop_pt = 0;
|
||||||
|
int blocks;
|
||||||
|
int separated_loop = 0;
|
||||||
|
|
||||||
|
if(argc > 4 && (atoi(argv[3]) == 1))
|
||||||
|
separated_loop = 1;
|
||||||
|
|
||||||
|
f = fopen(argv[1],"r");
|
||||||
|
fo = fopen(argv[2],"w");
|
||||||
|
|
||||||
|
fseek(f,0,SEEK_END);
|
||||||
|
|
||||||
|
samples = ftell(f)/(sizeof(uint16_t)*2);
|
||||||
|
|
||||||
|
if(separated_loop) {
|
||||||
|
f2 = fopen(argv[4],"r");
|
||||||
|
fseek(f2,0,SEEK_END);
|
||||||
|
loop_pt = samples;
|
||||||
|
samples += ftell(f2)/(sizeof(uint16_t)*2);
|
||||||
|
}
|
||||||
|
|
||||||
|
blocks = (samples+13)/14;
|
||||||
|
|
||||||
|
memset(&hdr,0,sizeof(hdr));
|
||||||
|
memset(&info,0,sizeof(info));
|
||||||
|
memset(&datahdr,0,sizeof(datahdr));
|
||||||
|
|
||||||
|
hdr.fourcc = 0x20534e42;
|
||||||
|
hdr.unk = SWAB32(0xfeff0100);
|
||||||
|
hdr.filesize = SWAB32(blocks * 16 + sizeof(hdr) + sizeof(info) + sizeof(datahdr));
|
||||||
|
hdr.unk1 = SWAB16(32);
|
||||||
|
hdr.unk2 = SWAB16(2);
|
||||||
|
hdr.infooff = SWAB32(sizeof(hdr));
|
||||||
|
hdr.infosize = SWAB32(sizeof(info));
|
||||||
|
hdr.dataoff = SWAB32(sizeof(hdr) + sizeof(info));
|
||||||
|
hdr.datasize = SWAB32(sizeof(datahdr) + blocks * 16);
|
||||||
|
|
||||||
|
info.fourcc = 0x4f464e49;
|
||||||
|
info.size = SWAB32(sizeof(info));
|
||||||
|
info.srate = SWAB16(32000);
|
||||||
|
if(argc > 3 && (atoi(argv[3]) == 1))
|
||||||
|
info.looped = SWAB16(1);
|
||||||
|
info.unk2 = SWAB16(0x200);
|
||||||
|
info.looppoint = SWAB32(loop_pt);
|
||||||
|
info.samples = SWAB32(samples);
|
||||||
|
info.unknown1[0] = SWAB32(0x18);
|
||||||
|
info.unknown1[1] = SWAB32(0x00);
|
||||||
|
info.unknown1[2] = SWAB32(0x20);
|
||||||
|
info.unknown1[3] = SWAB32(0x2c);
|
||||||
|
info.unknown1[4] = SWAB32(0x00);
|
||||||
|
info.unknown1[5] = SWAB32(0x38);
|
||||||
|
info.unknown2[0] = SWAB32(0x68);
|
||||||
|
info.unknown2[1] = SWAB32(0x00);
|
||||||
|
info.start1 = SWAB32(0);
|
||||||
|
info.start2 = SWAB32(blocks * 8);
|
||||||
|
for(i=0;i<16;i++) {
|
||||||
|
info.tbl1[i] = SWAB16((int16_t)(deftbl[i]));
|
||||||
|
info.tbl2[i] = SWAB16((int16_t)(deftbl[i]));
|
||||||
|
}
|
||||||
|
|
||||||
|
datahdr.fourcc = 0x41544144;
|
||||||
|
datahdr.size = SWAB32(blocks * 16);
|
||||||
|
|
||||||
|
fwrite(&hdr,sizeof(hdr),1,fo);
|
||||||
|
fwrite(&info,sizeof(info),1,fo);
|
||||||
|
fwrite(&datahdr,sizeof(datahdr),1,fo);
|
||||||
|
|
||||||
|
|
||||||
|
datain = malloc(sizeof(uint16_t)*2*blocks*14);
|
||||||
|
memset(datain,0,sizeof(uint16_t)*2*blocks*14);
|
||||||
|
|
||||||
|
databuf = malloc(blocks * 16);
|
||||||
|
data1 = databuf;
|
||||||
|
data2 = databuf + blocks * 8;
|
||||||
|
|
||||||
|
if(separated_loop) {
|
||||||
|
fseek(f,0,SEEK_SET);
|
||||||
|
fread(datain,sizeof(uint16_t)*2,loop_pt,f);
|
||||||
|
fseek(f2,0,SEEK_SET);
|
||||||
|
fread(&datain[loop_pt],sizeof(uint16_t)*2,samples-loop_pt,f2);
|
||||||
|
fclose(f);
|
||||||
|
fclose(f2);
|
||||||
|
} else {
|
||||||
|
fseek(f,0,SEEK_SET);
|
||||||
|
fread(datain,sizeof(uint16_t)*2,samples,f);
|
||||||
|
fclose(f);
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("Samples: 0x%x\n",samples);
|
||||||
|
printf("Blocks: 0x%x Size ADPCM: 0x%x Size PCM: 0x%x\n",blocks,blocks*8,blocks*14);
|
||||||
|
if(separated_loop)
|
||||||
|
printf("Loop point: 0x%x samples\n",loop_pt);
|
||||||
|
|
||||||
|
for(i=0;i<blocks;i++) {
|
||||||
|
//printf("Block %d\n",i);
|
||||||
|
for(j=0;j<14;j++) {
|
||||||
|
sampbuf[j] = datain[i*14+j].l;
|
||||||
|
}
|
||||||
|
repack_adpcm(0,deftbl,data1,sampbuf);
|
||||||
|
//unpack_adpcm(0,deftbl,data1,sampbuf);
|
||||||
|
for(j=0;j<14;j++) {
|
||||||
|
sampbuf[j] = datain[i*14+j].r;
|
||||||
|
}
|
||||||
|
repack_adpcm(1,deftbl,data2,sampbuf);
|
||||||
|
//unpack_adpcm(1,deftbl,data2,sampbuf);
|
||||||
|
data1 += 8;
|
||||||
|
data2 += 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
fwrite(databuf, blocks*16, 1, fo);
|
||||||
|
|
||||||
|
fclose(fo);
|
||||||
|
|
||||||
|
free(datain); free(databuf);
|
||||||
|
return 0;
|
||||||
|
}
|
221
channel/banner/tools/png2tpl.c
Normal file
@ -0,0 +1,221 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <png.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
struct tpl_hdr {
|
||||||
|
uint32_t magic;
|
||||||
|
uint32_t ntextures;
|
||||||
|
uint32_t hdrsize;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct tpl_tex {
|
||||||
|
uint32_t hdroff;
|
||||||
|
uint32_t pltoff;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct tpl_texhdr {
|
||||||
|
uint16_t height;
|
||||||
|
uint16_t width;
|
||||||
|
uint32_t format;
|
||||||
|
uint32_t offset;
|
||||||
|
uint32_t wraps;
|
||||||
|
uint32_t wrapt;
|
||||||
|
uint32_t minfilter;
|
||||||
|
uint32_t maxfilter;
|
||||||
|
float lodbias;
|
||||||
|
uint8_t edgelod;
|
||||||
|
uint8_t minlod;
|
||||||
|
uint8_t maxlod;
|
||||||
|
uint8_t unpacked;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define SWAB16(x) ((((x)>>8)&0xFF) | (((x)&0xFF)<<8))
|
||||||
|
#define SWAB32(x) ((SWAB16(((uint32_t)(x))&0xFFFF)<<16)|(SWAB16((((uint32_t)(x))>>16)&0xFFFF)))
|
||||||
|
|
||||||
|
#define ISWAB16(x) x=SWAB16(x)
|
||||||
|
#define ISWAB32(x) x=SWAB32(x)
|
||||||
|
|
||||||
|
#define ALIGN(x) (((x)+31)&(~31))
|
||||||
|
|
||||||
|
void do_ia8(int width, int height, FILE *fp, uint8_t **row_pointers) {
|
||||||
|
|
||||||
|
uint16_t **in = (uint16_t **)row_pointers;
|
||||||
|
int wo, ho, wt, i, j;
|
||||||
|
uint16_t *out;
|
||||||
|
wo = (width + 3) & ~3;
|
||||||
|
ho = (height + 3) & ~3;
|
||||||
|
wt = wo/4;
|
||||||
|
out = malloc(wo*ho*2);
|
||||||
|
memset(out,0,wo*ho*2);
|
||||||
|
for(i=0; i<height; i++) {
|
||||||
|
for(j=0; j<width; j++) {
|
||||||
|
int tx,ty,opos;
|
||||||
|
tx = j / 4;
|
||||||
|
ty = i / 4;
|
||||||
|
opos = (tx*16) + (ty*16*wt) + j%4 + (i%4)*4;
|
||||||
|
out[opos] = in[i][j];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fwrite(out,2,wo*ho,fp);
|
||||||
|
}
|
||||||
|
|
||||||
|
void do_rgb565(int width, int height, FILE *fp, uint8_t **row_pointers) {
|
||||||
|
|
||||||
|
uint8_t **in = (uint8_t **)row_pointers;
|
||||||
|
int wo, ho, wt, i, j;
|
||||||
|
uint16_t *out;
|
||||||
|
wo = (width + 3) & ~3;
|
||||||
|
ho = (height + 3) & ~3;
|
||||||
|
wt = wo/4;
|
||||||
|
out = malloc(wo*ho*2);
|
||||||
|
memset(out,0,wo*ho*2);
|
||||||
|
for(i=0; i<height; i++) {
|
||||||
|
for(j=0; j<width; j++) {
|
||||||
|
int tx,ty,opos;
|
||||||
|
tx = j / 4;
|
||||||
|
ty = i / 4;
|
||||||
|
opos = (tx*16) + (ty*16*wt) + j%4 + (i%4)*4;
|
||||||
|
out[opos] = SWAB16((in[i][j*3]<<8) & 0xF800);
|
||||||
|
out[opos] |= SWAB16((in[i][j*3+1]<<3) & 0x07E0);
|
||||||
|
out[opos] |= SWAB16((in[i][j*3+2]>>3) & 0x001F);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fwrite(out,2,wo*ho,fp);
|
||||||
|
}
|
||||||
|
|
||||||
|
void do_i8(int width, int height, FILE *fp, uint8_t **in) {
|
||||||
|
|
||||||
|
int wo, ho, wt, i, j;
|
||||||
|
uint8_t *out;
|
||||||
|
wo = (width + 7) & ~7;
|
||||||
|
ho = (height + 3) & ~3;
|
||||||
|
wt = wo/8;
|
||||||
|
out = malloc(wo*ho);
|
||||||
|
memset(out,0,wo*ho);
|
||||||
|
for(i=0; i<height; i++) {
|
||||||
|
for(j=0; j<width; j++) {
|
||||||
|
int tx,ty,opos;
|
||||||
|
tx = j / 8;
|
||||||
|
ty = i / 4;
|
||||||
|
opos = (tx*32) + (ty*32*wt) + j%8 + (i%4)*8;
|
||||||
|
out[opos] = in[i][j];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fwrite(out,1,wo*ho,fp);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void do_rgba8(int width, int height, FILE *fp, uint8_t **row_pointers) {
|
||||||
|
|
||||||
|
uint32_t **in = (uint32_t **)row_pointers;
|
||||||
|
int wo, ho, wt, i, j;
|
||||||
|
uint16_t *out;
|
||||||
|
wo = (width + 3) & ~3;
|
||||||
|
ho = (height + 3) & ~3;
|
||||||
|
wt = wo/4;
|
||||||
|
out = malloc(wo*ho*4);
|
||||||
|
memset(out,0,wo*ho*4);
|
||||||
|
for(i=0; i<height; i++) {
|
||||||
|
for(j=0; j<width; j++) {
|
||||||
|
int tx,ty,opos;
|
||||||
|
tx = j / 4;
|
||||||
|
ty = i / 4;
|
||||||
|
opos = (tx*32) + (ty*32*wt) + j%4 + (i%4)*4;
|
||||||
|
out[opos] = (in[i][j]&0xFFFF);
|
||||||
|
out[opos+16] = (in[i][j]>>16);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fwrite(out,2,wo*ho*2,fp);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
png_structp png_ptr = png_create_read_struct
|
||||||
|
(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
|
||||||
|
|
||||||
|
png_infop info_ptr = png_create_info_struct(png_ptr);
|
||||||
|
|
||||||
|
if (setjmp(png_jmpbuf(png_ptr)))
|
||||||
|
{
|
||||||
|
printf("PNG error\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
FILE *fp = fopen(argv[1],"rb");
|
||||||
|
|
||||||
|
png_init_io(png_ptr, fp);
|
||||||
|
png_read_png(png_ptr, info_ptr, PNG_TRANSFORM_PACKING|PNG_TRANSFORM_EXPAND|PNG_TRANSFORM_STRIP_16|PNG_TRANSFORM_SWAP_ALPHA, NULL);
|
||||||
|
|
||||||
|
uint8_t **row_pointers = png_get_rows(png_ptr, info_ptr);
|
||||||
|
|
||||||
|
png_uint_32 width, height;
|
||||||
|
int bit_depth, color_type, filter_method, compression_type, interlace_type;
|
||||||
|
png_get_IHDR(png_ptr, info_ptr, &width, &height,
|
||||||
|
&bit_depth, &color_type, &interlace_type,
|
||||||
|
&compression_type, &filter_method);
|
||||||
|
|
||||||
|
printf("Texture: %d x %d\n",(int)width,(int)height);
|
||||||
|
|
||||||
|
FILE *fo = fopen(argv[2],"wb");
|
||||||
|
|
||||||
|
struct tpl_hdr tplhdr;
|
||||||
|
tplhdr.magic = SWAB32(0x0020af30);
|
||||||
|
tplhdr.ntextures = SWAB32(1);
|
||||||
|
tplhdr.hdrsize = SWAB32(sizeof(struct tpl_hdr));
|
||||||
|
|
||||||
|
fwrite(&tplhdr,sizeof(struct tpl_hdr),1,fo);
|
||||||
|
|
||||||
|
struct tpl_tex tpltex;
|
||||||
|
tpltex.hdroff = SWAB32(ftell(fo) + sizeof(struct tpl_tex));
|
||||||
|
tpltex.pltoff = SWAB32(0);
|
||||||
|
|
||||||
|
fwrite(&tpltex,sizeof(struct tpl_tex),1,fo);
|
||||||
|
|
||||||
|
struct tpl_texhdr texhdr;
|
||||||
|
memset(&texhdr,0,sizeof(struct tpl_texhdr));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
texhdr.width = SWAB16(width);
|
||||||
|
texhdr.height = SWAB16(height);
|
||||||
|
texhdr.offset = SWAB32(ALIGN(ftell(fo) + sizeof(struct tpl_texhdr)));
|
||||||
|
texhdr.minfilter = SWAB32(1);
|
||||||
|
texhdr.maxfilter = SWAB32(1);
|
||||||
|
texhdr.wraps = SWAB32(atoi(argv[3]));
|
||||||
|
texhdr.wrapt = SWAB32(atoi(argv[4]));
|
||||||
|
|
||||||
|
switch(color_type) {
|
||||||
|
case PNG_COLOR_TYPE_GRAY_ALPHA:
|
||||||
|
texhdr.format = SWAB32(3); //IA8
|
||||||
|
fwrite(&texhdr,sizeof(struct tpl_texhdr),1,fo);
|
||||||
|
fseek(fo,SWAB32(texhdr.offset),SEEK_SET);
|
||||||
|
do_ia8(width, height, fo,row_pointers);
|
||||||
|
break;
|
||||||
|
case PNG_COLOR_TYPE_GRAY:
|
||||||
|
texhdr.format = SWAB32(1); //I8
|
||||||
|
fwrite(&texhdr,sizeof(struct tpl_texhdr),1,fo);
|
||||||
|
fseek(fo,SWAB32(texhdr.offset),SEEK_SET);
|
||||||
|
do_i8(width, height, fo,row_pointers);
|
||||||
|
break;
|
||||||
|
case PNG_COLOR_TYPE_RGB_ALPHA:
|
||||||
|
texhdr.format = SWAB32(6); //ARGB
|
||||||
|
fwrite(&texhdr,sizeof(struct tpl_texhdr),1,fo);
|
||||||
|
fseek(fo,SWAB32(texhdr.offset),SEEK_SET);
|
||||||
|
do_rgba8(width, height, fo,row_pointers);
|
||||||
|
break;
|
||||||
|
case PNG_COLOR_TYPE_RGB:
|
||||||
|
texhdr.format = SWAB32(4); //RGB565
|
||||||
|
fwrite(&texhdr,sizeof(struct tpl_texhdr),1,fo);
|
||||||
|
fseek(fo,SWAB32(texhdr.offset),SEEK_SET);
|
||||||
|
do_rgb565(width, height, fo,row_pointers);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
10
channel/channelapp/.gitignore
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
stub.bin
|
||||||
|
*.dol
|
||||||
|
*.elf
|
||||||
|
.*.swp
|
||||||
|
dist
|
||||||
|
build
|
||||||
|
i18n/merge
|
||||||
|
i18n/*.gen
|
||||||
|
*.map
|
||||||
|
|
230
channel/channelapp/Makefile
Normal file
@ -0,0 +1,230 @@
|
|||||||
|
#pngcrush -rem iTXt -rem tEXt -d out *.png
|
||||||
|
|
||||||
|
PREFIX = $(DEVKITPPC)/bin/powerpc-eabi-
|
||||||
|
|
||||||
|
CC = $(PREFIX)gcc
|
||||||
|
AS = $(PREFIX)as
|
||||||
|
OBJCOPY = $(PREFIX)objcopy
|
||||||
|
ELF2DOL =$(DEVKITPPC)/bin/elf2dol
|
||||||
|
GDB = $(PREFIX)gdb
|
||||||
|
BIN2S = $(DEVKITPPC)/bin/bin2s
|
||||||
|
TARGET_STUB = stub
|
||||||
|
TARGET_APP = channelapp
|
||||||
|
TARGET_CHAN = channelapp-channel
|
||||||
|
|
||||||
|
WIIPAX = ../../wiipax/client/wiipax
|
||||||
|
|
||||||
|
BASE_ADDR = 0x81330000
|
||||||
|
|
||||||
|
DIR_STUB = stub
|
||||||
|
DIR_SRC = source
|
||||||
|
DIR_DATA = data
|
||||||
|
DIR_DATA_CRYPT = $(DIR_DATA)/crypt
|
||||||
|
DIR_I18N = i18n
|
||||||
|
DIR_BUILD = build
|
||||||
|
DIR_BUILD_CHAN = $(DIR_BUILD)/channel
|
||||||
|
|
||||||
|
DIR_INCLUDES = $(DIR_BUILD) \
|
||||||
|
$(DEVKITPRO)/libogc/include \
|
||||||
|
$(DEVKITPRO)/3rd/include \
|
||||||
|
$(DEVKITPRO)/3rd/include/freetype2
|
||||||
|
|
||||||
|
DIR_LIBS = \
|
||||||
|
$(DEVKITPRO)/libogc/lib/wii \
|
||||||
|
$(DEVKITPRO)/3rd/lib
|
||||||
|
|
||||||
|
LIBS = fat wiiuse bte mxml png15 z ogc m db freetype
|
||||||
|
|
||||||
|
MACHDEP = -g -DGEKKO -mrvl -mcpu=750 -meabi -mhard-float
|
||||||
|
CFLAGS = $(MACHDEP) -Os -Wall -DBASE_ADDR=$(BASE_ADDR) $(DIR_INCLUDES:%=-I%)
|
||||||
|
# using -Os for the stub makes it dependent on libgcc
|
||||||
|
CFLAGS_STUB = $(MACHDEP) -O2 -Wall -DBASE_ADDR=$(BASE_ADDR) $(DIR_INCLUDES:%=-I%)
|
||||||
|
ASFLAGS = -D_LANGUAGE_ASSEMBLY -DHW_RVL
|
||||||
|
LDFLAGS_STUB = $(MACHDEP) -Wl,--section-start,.init=0x80001800 -nostartfiles -nodefaultlibs
|
||||||
|
LDFLAGS_APP = $(MACHDEP) -specs=newrvl.spec -Wl,--section-start,.init=$(BASE_ADDR) \
|
||||||
|
$(DIR_LIBS:%=-L%) $(LIBS:%=-l%) -Wl,-Map,channelapp.map
|
||||||
|
LDFLAGS_CHAN = $(MACHDEP) -specs=newrvl.spec -Wl,--section-start,.init=$(BASE_ADDR) -Wl,-e,_stub_start $(DIR_LIBS:%=-L%) $(LIBS:%=-l%) -Wl,-Map,channelapp_chan.map
|
||||||
|
|
||||||
|
FILES_STUB = $(wildcard $(DIR_STUB)/*.S) $(wildcard $(DIR_STUB)/*.c)
|
||||||
|
FILES_STUB_OBJx = $(FILES_STUB:$(DIR_STUB)/%.S=$(DIR_BUILD)/%.o)
|
||||||
|
FILES_STUB_OBJ = $(FILES_STUB_OBJx:$(DIR_STUB)/%.c=$(DIR_BUILD)/%.o)
|
||||||
|
|
||||||
|
BANNER_BIN = banner/banner.bin
|
||||||
|
BANNER_OBJ = $(DIR_BUILD)/banner_bin.o
|
||||||
|
|
||||||
|
FILES_TTF = $(wildcard $(DIR_DATA)/*.ttf)
|
||||||
|
FILES_TTF_OBJ = $(FILES_TTF:$(DIR_DATA)/%.ttf=$(DIR_BUILD)/%_ttf.o)
|
||||||
|
|
||||||
|
FILES_PNG = $(wildcard $(DIR_DATA)/*.png)
|
||||||
|
FILES_PNG_OBJ = $(FILES_PNG:$(DIR_DATA)/%.png=$(DIR_BUILD)/%_png.o)
|
||||||
|
|
||||||
|
POTPL = $(DIR_I18N)/template.pot
|
||||||
|
POTPL_MRG = $(DIR_I18N)/template.merge.pot
|
||||||
|
FILES_PO = $(wildcard $(DIR_I18N)/*.po)
|
||||||
|
FILES_PO_ENC = $(FILES_PO:$(DIR_I18N)/%.po=$(DIR_BUILD)/%.enc.po)
|
||||||
|
FILES_MO = $(FILES_PO_ENC:$(DIR_BUILD)/%.enc.po=$(DIR_BUILD)/%.mo)
|
||||||
|
FILES_MO_OBJ = $(FILES_MO:$(DIR_BUILD)/%.mo=$(DIR_BUILD)/%_mo.o)
|
||||||
|
ENCODING = utf-8
|
||||||
|
FILES_PO_MRG = $(FILES_PO:$(DIR_I18N)/%.po=$(DIR_I18N)/merge/%.po)
|
||||||
|
|
||||||
|
FILES_SRC = $(wildcard $(DIR_SRC)/*.c)
|
||||||
|
FILES_SRC_OBJ = $(FILES_SRC:$(DIR_SRC)/%.c=$(DIR_BUILD)/%.o) \
|
||||||
|
$(DIR_BUILD)/$(TARGET_STUB)_bin.o $(BANNER_OBJ) \
|
||||||
|
$(FILES_PNG_OBJ) $(FILES_MO_OBJ) $(FILES_TTF_OBJ)
|
||||||
|
|
||||||
|
FILES_CHAN = $(DIR_CHAN)/nandloader.S
|
||||||
|
FILES_CHAN_OBJ = $(DIR_BUILD)/nandloader.o $(FILES_SRC_OBJ)
|
||||||
|
|
||||||
|
.PHONY: all channel world clean upload gdb debug
|
||||||
|
|
||||||
|
all:
|
||||||
|
@[ -d $(DIR_BUILD) ] || mkdir $(DIR_BUILD)
|
||||||
|
@$(MAKE) --no-print-directory data
|
||||||
|
@$(MAKE) --no-print-directory $(TARGET_APP).elf
|
||||||
|
|
||||||
|
channel:
|
||||||
|
@$(MAKE) --no-print-directory all
|
||||||
|
@$(MAKE) --no-print-directory $(TARGET_CHAN).dol
|
||||||
|
|
||||||
|
world:
|
||||||
|
@$(MAKE) --no-print-directory all
|
||||||
|
@$(MAKE) --no-print-directory $(TARGET_CHAN).dol
|
||||||
|
|
||||||
|
data: $(BANNER_OBJ) $(FILES_PNG_OBJ) $(FILES_MO_OBJ) \
|
||||||
|
$(FILES_PNG_INT_OBJ) $(FILES_INT_OBJ) \
|
||||||
|
$(FILES_TTF_OBJ)
|
||||||
|
|
||||||
|
%.bin: %.elf
|
||||||
|
@echo $(@F)
|
||||||
|
@$(OBJCOPY) -O binary $< $@
|
||||||
|
|
||||||
|
%.dol: %.elf $(ELF2DOL)
|
||||||
|
@echo $(@F)
|
||||||
|
@$(ELF2DOL) $< $@
|
||||||
|
|
||||||
|
$(TARGET_STUB).elf: $(FILES_STUB_OBJ)
|
||||||
|
@echo $(@F)
|
||||||
|
@$(CC) $(FILES_STUB_OBJ) $(LDFLAGS_STUB) -o $@
|
||||||
|
|
||||||
|
$(TARGET_APP)_nopax.elf: $(FILES_SRC_OBJ) newrvl.ld
|
||||||
|
@echo $(@F)
|
||||||
|
@$(CC) $(FILES_SRC_OBJ) $(LDFLAGS_APP) -o $@
|
||||||
|
|
||||||
|
$(TARGET_APP).elf: $(TARGET_APP)_nopax.elf
|
||||||
|
@$(WIIPAX) -s devkitfail $< $@
|
||||||
|
|
||||||
|
$(TARGET_CHAN).elf: $(TARGET_APP)_nopax.elf
|
||||||
|
@echo $(@F)
|
||||||
|
@$(WIIPAX) -s dkfailchannel $< $@
|
||||||
|
|
||||||
|
$(DIR_BUILD)/$(TARGET_STUB)_bin.o: $(TARGET_STUB).bin
|
||||||
|
@echo $(@F)
|
||||||
|
@$(BIN2S) -a 32 $< | $(AS) -o $@
|
||||||
|
|
||||||
|
$(BANNER_BIN):
|
||||||
|
@$(MAKE) -C banner
|
||||||
|
|
||||||
|
$(BANNER_OBJ): $(BANNER_BIN)
|
||||||
|
@echo $(@F)
|
||||||
|
@$(BIN2S) -a 32 $< | $(AS) -o $@
|
||||||
|
@echo "extern const u8 $(<F:%.bin=%_bin)[];" > $(@:%.o=%.h)
|
||||||
|
@echo "extern const u8 $(<F:%.bin=%_bin)_end;" >> $(@:%.o=%.h)
|
||||||
|
@echo "extern const u32 $(<F:%.bin=%_bin)_size;" >> $(@:%.o=%.h)
|
||||||
|
|
||||||
|
$(DIR_BUILD)/%_png.o: $(DIR_DATA)/%.png
|
||||||
|
@echo $(@F)
|
||||||
|
@$(BIN2S) -a 32 $< | $(AS) -o $@
|
||||||
|
@echo "extern const u8 $(<F:%.png=%_png)[];" > $(@:%.o=%.h)
|
||||||
|
@echo "extern const u8 $(<F:%.png=%_png)_end;" >> $(@:%.o=%.h)
|
||||||
|
@echo "extern const u32 $(<F:%.png=%_png)_size;" >> $(@:%.o=%.h)
|
||||||
|
|
||||||
|
$(DIR_BUILD)/%_ttf.o: $(DIR_DATA)/%.ttf
|
||||||
|
@echo $(@F)
|
||||||
|
@$(BIN2S) -a 32 $< | $(AS) -o $@
|
||||||
|
@echo "extern const u8 $(<F:%.ttf=%_ttf)[];" > $(@:%.o=%.h)
|
||||||
|
@echo "extern const u8 $(<F:%.ttf=%_ttf)_end;" >> $(@:%.o=%.h)
|
||||||
|
@echo "extern const u32 $(<F:%.ttf=%_ttf)_size;" >> $(@:%.o=%.h)
|
||||||
|
|
||||||
|
$(DIR_BUILD)/%_mo.o: $(DIR_BUILD)/%.mo
|
||||||
|
@echo $(@F)
|
||||||
|
@$(BIN2S) -a 32 $< | $(AS) -o $@
|
||||||
|
@echo "extern const u8 $(<F:%.mo=%_mo)[];" > $(@:%.o=%.h)
|
||||||
|
@echo "extern const u8 $(<F:%.mo=%_mo)_end;" >> $(@:%.o=%.h)
|
||||||
|
@echo "extern const u32 $(<F:%.mo=%_mo)_size;" >> $(@:%.o=%.h)
|
||||||
|
|
||||||
|
$(DIR_BUILD)/%.o: $(DIR_INT)/%
|
||||||
|
@echo $(@F)
|
||||||
|
@$(BIN2S) -a 32 $< | $(AS) -o $@
|
||||||
|
@echo "extern const u8 $(subst .,_,$(<F))[];" > $(@:%.o=%.h)
|
||||||
|
@echo "extern const u8 $(subst .,_,$(<F))_end;" >> $(@:%.o=%.h)
|
||||||
|
@echo "extern const u32 $(subst .,_,$(<F))_size;" >> $(@:%.o=%.h)
|
||||||
|
|
||||||
|
$(DIR_BUILD)/%.mo: $(DIR_BUILD)/%.enc.po
|
||||||
|
@echo $(@F)
|
||||||
|
@msgfmt --no-hash -o $@ $<
|
||||||
|
|
||||||
|
$(DIR_BUILD)/%.enc.po: $(DIR_I18N)/%.po
|
||||||
|
@echo $(@F)
|
||||||
|
@msgconv -t $(ENCODING) -o $@ $<
|
||||||
|
|
||||||
|
$(DIR_BUILD)/%.o: $(DIR_STUB)/%.c
|
||||||
|
@echo $(@F)
|
||||||
|
@$(CC) $(CFLAGS_STUB) -MMD -MP -MF $(@:%.o=%.d) -c $< -o $@
|
||||||
|
|
||||||
|
$(DIR_BUILD)/%.o: $(DIR_STUB)/%.S
|
||||||
|
@echo $(@F)
|
||||||
|
@$(CC) $(ASFLAGS) -c $< -o $@
|
||||||
|
|
||||||
|
$(DIR_BUILD)/%.o: $(DIR_SRC)/%.c
|
||||||
|
@echo $(@F)
|
||||||
|
@$(CC) $(CFLAGS) -MMD -MP -MF $(@:%.o=%.d) -c $< -o $@
|
||||||
|
|
||||||
|
-include $(FILES_SRC_OBJ:%.o=%.d)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf $(DIR_BUILD) \
|
||||||
|
*.elf *.dol *.bin *.map i18n/merge/* $(POTPL).gen
|
||||||
|
@$(MAKE) -C banner clean
|
||||||
|
|
||||||
|
wiiload:
|
||||||
|
@$(MAKE) --no-print-directory all
|
||||||
|
@$(DEVKITPPC)/bin/wiiload $(TARGET_APP).elf
|
||||||
|
|
||||||
|
upload: wiiload
|
||||||
|
|
||||||
|
$(POTPL).gen: source/*.c
|
||||||
|
@echo "GETTEXT $(POTPL).gen"
|
||||||
|
@xgettext --from-code=UTF-8 -C -o $(POTPL).gen --keyword=_ source/*.c
|
||||||
|
@sed -i.bak s/CHARSET/UTF-8/g $(POTPL).gen
|
||||||
|
|
||||||
|
$(POTPL): $(POTPL).gen
|
||||||
|
@echo "MERGE $(POTPL_MRG)"
|
||||||
|
@msgmerge $(POTPL) $(POTPL).gen > $(POTPL_MRG)
|
||||||
|
@mv -v $(POTPL_MRG) $(POTPL)
|
||||||
|
@rm $(POTPL).gen.bak
|
||||||
|
|
||||||
|
genmsgs: $(POTPL)
|
||||||
|
msgmerge: $(POTPL) $(FILES_PO_MRG)
|
||||||
|
movemerge:
|
||||||
|
@mv -v i18n/merge/* i18n
|
||||||
|
|
||||||
|
msgupdate: msgmerge movemerge msgstats
|
||||||
|
|
||||||
|
%.postats: %.po
|
||||||
|
@echo -n "$<: "
|
||||||
|
@msgfmt --statistics -o /dev/null $<
|
||||||
|
|
||||||
|
msgstats: $(FILES_PO:%.po=%.postats)
|
||||||
|
msgmergestats: msgmerge $(FILES_PO_MRG:%.po=%.postats)
|
||||||
|
|
||||||
|
$(DIR_I18N)/merge/%.po : $(DIR_I18N)/%.po $(POTPL)
|
||||||
|
@[ ! -d $(DIR_I18N)/merge ] && mkdir -p $(DIR_I18N)/merge || true
|
||||||
|
@echo "MERGE $(@F)"
|
||||||
|
@msgmerge -o $@ $(@:$(DIR_I18N)/merge/%.po=$(DIR_I18N)/%.po) $(POTPL)
|
||||||
|
|
||||||
|
gdb:
|
||||||
|
$(GDB) -n $(TARGET_APP)_nopax.elf
|
||||||
|
|
||||||
|
debug:
|
||||||
|
$(GDB) -n $(TARGET_APP)_nopax.elf -x gdb.txt
|
||||||
|
|
3
channel/channelapp/banner/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
twintig
|
||||||
|
banner.bin
|
||||||
|
|
11
channel/channelapp/banner/Makefile
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
all: banner.bin
|
||||||
|
|
||||||
|
banner.bin: twintig title banner.ppm icon.ppm
|
||||||
|
@$(CURDIR)/twintig
|
||||||
|
|
||||||
|
twintig: twintig.c
|
||||||
|
@gcc -g -O2 -Wall $< -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f twintig banner.bin
|
||||||
|
|
4
channel/channelapp/banner/banner.ppm
Normal file
4
channel/channelapp/banner/icon.ppm
Normal file
BIN
channel/channelapp/banner/title
Normal file
103
channel/channelapp/banner/twintig.c
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
// Copyright 2007,2008 Segher Boessenkool <segher@kernel.crashing.org>
|
||||||
|
// Licensed under the terms of the GNU GPL, version 2
|
||||||
|
// http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <dirent.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#define ERROR(s) do { fprintf(stderr, s "\n"); exit(1); } while (0)
|
||||||
|
|
||||||
|
// basic data types
|
||||||
|
typedef unsigned char u8;
|
||||||
|
typedef unsigned short u16;
|
||||||
|
typedef unsigned int u32;
|
||||||
|
|
||||||
|
void wbe16(u8 *p, u16 x) {
|
||||||
|
p[0] = x >> 8;
|
||||||
|
p[1] = x;
|
||||||
|
}
|
||||||
|
|
||||||
|
void wbe32(u8 *p, u32 x) {
|
||||||
|
wbe16(p, x >> 16);
|
||||||
|
wbe16(p + 2, x);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int read_image(u8 *data, u32 w, u32 h, const char *name) {
|
||||||
|
FILE *fp;
|
||||||
|
u32 x, y;
|
||||||
|
u32 ww, hh;
|
||||||
|
|
||||||
|
fp = fopen(name, "rb");
|
||||||
|
if (!fp)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
if (fscanf(fp, "P6 %d %d 255\n", &ww, &hh) != 2)
|
||||||
|
ERROR("bad ppm");
|
||||||
|
if (ww != w || hh != h)
|
||||||
|
ERROR("wrong size ppm");
|
||||||
|
|
||||||
|
for (y = 0; y < h; y++)
|
||||||
|
for (x = 0; x < w; x++) {
|
||||||
|
u8 pix[3];
|
||||||
|
u16 raw;
|
||||||
|
u32 x0, x1, y0, y1, off;
|
||||||
|
|
||||||
|
x0 = x & 3;
|
||||||
|
x1 = x >> 2;
|
||||||
|
y0 = y & 3;
|
||||||
|
y1 = y >> 2;
|
||||||
|
off = x0 + 4 * y0 + 16 * x1 + 4 * w * y1;
|
||||||
|
|
||||||
|
if (fread(pix, 3, 1, fp) != 1)
|
||||||
|
ERROR("read");
|
||||||
|
|
||||||
|
raw = (pix[0] & 0xf8) << 7;
|
||||||
|
raw |= (pix[1] & 0xf8) << 2;
|
||||||
|
raw |= (pix[2] & 0xf8) >> 3;
|
||||||
|
raw |= 0x8000;
|
||||||
|
|
||||||
|
wbe16(data + 2*off, raw);
|
||||||
|
}
|
||||||
|
|
||||||
|
fclose(fp);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int argc, char **argv) {
|
||||||
|
FILE *in, *fp;
|
||||||
|
u8 header[0x72a0];
|
||||||
|
|
||||||
|
fp = fopen("banner.bin", "wb+");
|
||||||
|
if (!fp)
|
||||||
|
ERROR("open banner.bin");
|
||||||
|
|
||||||
|
memset(header, 0, sizeof header);
|
||||||
|
|
||||||
|
memcpy(header, "WIBN", 4);
|
||||||
|
header[9] = 2; // wtf
|
||||||
|
|
||||||
|
in = fopen("title", "rb");
|
||||||
|
if (!in)
|
||||||
|
ERROR("open title");
|
||||||
|
if (fread(header + 0x20, 0x80, 1, in) != 1)
|
||||||
|
ERROR("read title");
|
||||||
|
fclose(in);
|
||||||
|
|
||||||
|
if(read_image(header + 0xa0, 192, 64, "banner.ppm"))
|
||||||
|
ERROR("open banner.ppm");
|
||||||
|
|
||||||
|
if(read_image(header + 0x60a0, 48, 48, "icon.ppm"))
|
||||||
|
ERROR("open icon.ppm");
|
||||||
|
|
||||||
|
if (fwrite(header, 0x72a0, 1, fp) != 1)
|
||||||
|
ERROR("write header");
|
||||||
|
|
||||||
|
fclose(fp);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
143
channel/channelapp/config.h
Normal file
@ -0,0 +1,143 @@
|
|||||||
|
#ifndef _CONFIG_H_
|
||||||
|
#define _CONFIG_H_
|
||||||
|
|
||||||
|
#define CHANNEL_VERSION_DATE 201611230000llu
|
||||||
|
#define CHANNEL_VERSION_STR "1.1.3"
|
||||||
|
|
||||||
|
//#define DEBUG_APP
|
||||||
|
//#define DEBUG_STUB
|
||||||
|
|
||||||
|
#define ENABLE_WIDESCREEN
|
||||||
|
#define ENABLE_SCREENSHOTS
|
||||||
|
//#define ENABLE_UPDATES
|
||||||
|
//#define FORCE_LANG CONF_LANG_JAPANESE
|
||||||
|
|
||||||
|
#ifdef DEBUG_APP
|
||||||
|
void gprintf_enable(int enable);
|
||||||
|
int gprintf(const char *format, ...) __attribute__ ((format (printf, 1, 2)));
|
||||||
|
void hexdump(const void *d, int len);
|
||||||
|
void memstats(int reset);
|
||||||
|
#define CHKBUFACC(access, ptr, len) \
|
||||||
|
do { \
|
||||||
|
if ((access < ptr) || (access >= ptr + len)) \
|
||||||
|
gprintf("WARNING: buffer access out of range: %s:%d\n", __FILE__, __LINE__); \
|
||||||
|
} while (0)
|
||||||
|
#else
|
||||||
|
#define gprintf(...)
|
||||||
|
#define hexdump(...)
|
||||||
|
#define memstats(...)
|
||||||
|
#define gprintf_enable(...)
|
||||||
|
#define CHKBUFACC(...)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define UPDATE_URL "http://example.com/update.sxml"
|
||||||
|
#define UPDATE_PUBLIC_KEY \
|
||||||
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \
|
||||||
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \
|
||||||
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \
|
||||||
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||||
|
|
||||||
|
#define USBGECKO_CHANNEL 1
|
||||||
|
|
||||||
|
#define STUB_MAGIC 0x4c4f41444b544858ull
|
||||||
|
#define STUB_ADDR_MAGIC ((u64 *) 0x80002f00)
|
||||||
|
#define STUB_ADDR_TITLE ((u64 *) 0x80002f08)
|
||||||
|
|
||||||
|
#define BOOTMII_IOS 254
|
||||||
|
#define TITLEID_BOOTMII (0x0000000100000000LL | BOOTMII_IOS)
|
||||||
|
|
||||||
|
#define PREFERRED IOS_GetPreferredVersion()
|
||||||
|
#define UNCHANGED IOS_GetVersion()
|
||||||
|
|
||||||
|
#define MY_TITLEID 0x000100014f484243ull
|
||||||
|
#define STUB_LOAD_IOS_VERSION UNCHANGED
|
||||||
|
#define APPS_IOS_VERSION PREFERRED
|
||||||
|
|
||||||
|
#define VIEW_Z_ORIGIN -420
|
||||||
|
|
||||||
|
#define GFX_ORIGIN_STACK_SIZE 16
|
||||||
|
|
||||||
|
// peak bubbles
|
||||||
|
#define MAX_BUBBLE_COUNT 20
|
||||||
|
// minimum bubbles
|
||||||
|
#define MIN_BUBBLE_COUNT 4
|
||||||
|
// cycle time in minutes
|
||||||
|
#define BUBBLE_TIME_CYCLE (60*24)
|
||||||
|
// time (in minutes, inside cycle) of minimum bubbles
|
||||||
|
#define BUBBLE_MIN_TIME (60*4)
|
||||||
|
// time (in minutes) offset from BUBBLE_MIN_TIME of maximum bubbles
|
||||||
|
#define BUBBLE_MAX_OFFSET (60*12)
|
||||||
|
// bubble size
|
||||||
|
#define BUBBLE_SIZE_MIN 0.4
|
||||||
|
#define BUBBLE_SIZE_MAX 1.0
|
||||||
|
// bubble pop radius modifier
|
||||||
|
#define BUBBLE_POP_RADIUS 0.8
|
||||||
|
// bubble pop generates this many bubbles
|
||||||
|
#define BUBBLE_POP_MAX 10
|
||||||
|
#define BUBBLE_POP_MIN 5
|
||||||
|
// bubble pop sub-bubble size
|
||||||
|
#define BUBBLE_POP_SIZE_MIN 0.2
|
||||||
|
#define BUBBLE_POP_SIZE_MAX 0.4
|
||||||
|
// bubble pop spread out range
|
||||||
|
#define BUBBLE_POP_SPREAD_X 40
|
||||||
|
#define BUBBLE_POP_SPREAD_Y 30
|
||||||
|
|
||||||
|
#define IRAND(max) ((int) ((float) (max) * (rand () / (RAND_MAX + 1.0))))
|
||||||
|
#define FRAND(max) ((max) * (rand () / (RAND_MAX + 1.0)))
|
||||||
|
|
||||||
|
#define WIDGET_DISABLED_COLOR 0xFFFFFF54
|
||||||
|
|
||||||
|
#define DIALOG_MASK_COLOR 0x101010a0
|
||||||
|
|
||||||
|
#define TEX_LAYER_WIDGETS 2
|
||||||
|
#define TEX_LAYER_DIALOGS 30
|
||||||
|
|
||||||
|
#define TEX_LAYER_CURSOR 80
|
||||||
|
|
||||||
|
#define APP_ENTRY_ICON_X 8
|
||||||
|
#define APP_ENTRY_ICON_Y 8
|
||||||
|
#define GRID_APP_ENTRY_ICON_X 8
|
||||||
|
#define GRID_APP_ENTRY_ICON_Y 8
|
||||||
|
#define APP_ENTRY_ICON_WIDTH 128
|
||||||
|
#define APP_ENTRY_ICON_HEIGHT 48
|
||||||
|
#define APP_ENTRY_TEXT1_X 156
|
||||||
|
#define APP_ENTRY_TEXT1_Y 8
|
||||||
|
#define APP_ENTRY_TEXT2_X 156
|
||||||
|
#define APP_ENTRY_TEXT2_Y 54
|
||||||
|
|
||||||
|
#define MAX_ENTRIES 1024
|
||||||
|
|
||||||
|
#define TCP_CONNECT_TIMEOUT 5000
|
||||||
|
#define TCP_BLOCK_SIZE (16 * 1024)
|
||||||
|
#define TCP_BLOCK_RECV_TIMEOUT 10000
|
||||||
|
#define TCP_BLOCK_SEND_TIMEOUT 4000
|
||||||
|
|
||||||
|
#define WIILOAD_MIN_VERSION 0x0005
|
||||||
|
#define ARGS_MAX_LEN 1024
|
||||||
|
|
||||||
|
#define LD_TCP_PORT 4299
|
||||||
|
#define LD_THREAD_STACKSIZE (1024 * 8)
|
||||||
|
#define LD_THREAD_PRIO 48
|
||||||
|
#define LD_TIMEOUT 3000
|
||||||
|
#define LD_MIN_ADDR 0x80003400
|
||||||
|
#define LD_MAX_ADDR (BASE_ADDR - 1 - ARGS_MAX_LEN)
|
||||||
|
#define LD_MAX_SIZE (LD_MAX_ADDR - LD_MIN_ADDR)
|
||||||
|
#define LD_ARGS_ADDR (LD_MAX_ADDR + 1)
|
||||||
|
|
||||||
|
#define HTTP_THREAD_STACKSIZE (1024 * 8)
|
||||||
|
#define HTTP_THREAD_PRIO 48
|
||||||
|
#define HTTP_TIMEOUT 30000
|
||||||
|
|
||||||
|
#define MANAGE_THREAD_STACKSIZE (1024 * 16)
|
||||||
|
#define MANAGE_THREAD_PRIO 48
|
||||||
|
|
||||||
|
#define APPENTRY_THREAD_STACKSIZE (1024 * 16)
|
||||||
|
#define APPENTRY_THREAD_PRIO 62
|
||||||
|
|
||||||
|
#define UPDATE_THREAD_STACKSIZE (1024 * 8)
|
||||||
|
#define UPDATE_THREAD_PRIO 58
|
||||||
|
|
||||||
|
#define FORCE_INLINE __attribute__((always_inline))
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
BIN
channel/channelapp/data/about.png
Normal file
After Width: | Height: | Size: 6.4 KiB |
BIN
channel/channelapp/data/apps_grid.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
channel/channelapp/data/apps_grid_hover.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
channel/channelapp/data/apps_list.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
channel/channelapp/data/apps_list_hover.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
channel/channelapp/data/apps_next.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
channel/channelapp/data/apps_next_hover.png
Normal file
After Width: | Height: | Size: 4.8 KiB |
BIN
channel/channelapp/data/apps_previous.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
channel/channelapp/data/apps_previous_hover.png
Normal file
After Width: | Height: | Size: 4.8 KiB |
BIN
channel/channelapp/data/background.png
Normal file
After Width: | Height: | Size: 122 KiB |
BIN
channel/channelapp/data/background_wide.png
Normal file
After Width: | Height: | Size: 149 KiB |
BIN
channel/channelapp/data/bubble1.png
Normal file
After Width: | Height: | Size: 4.9 KiB |
BIN
channel/channelapp/data/bubble2.png
Normal file
After Width: | Height: | Size: 5.5 KiB |
BIN
channel/channelapp/data/bubble3.png
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
channel/channelapp/data/button.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
channel/channelapp/data/button_focus.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
channel/channelapp/data/button_small.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
channel/channelapp/data/button_small_focus.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
channel/channelapp/data/button_tiny.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
channel/channelapp/data/button_tiny_focus.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
channel/channelapp/data/content_arrow_down.png
Normal file
After Width: | Height: | Size: 383 B |
BIN
channel/channelapp/data/content_arrow_up.png
Normal file
After Width: | Height: | Size: 369 B |
BIN
channel/channelapp/data/cursor_drag.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
channel/channelapp/data/cursor_drag_shade.png
Normal file
After Width: | Height: | Size: 670 B |
BIN
channel/channelapp/data/cursor_pic.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
channel/channelapp/data/cursor_shade.png
Normal file
After Width: | Height: | Size: 628 B |
BIN
channel/channelapp/data/dialog_background.png
Normal file
After Width: | Height: | Size: 6.9 KiB |
BIN
channel/channelapp/data/dlg_confirm.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
channel/channelapp/data/dlg_error.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
channel/channelapp/data/dlg_info.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
channel/channelapp/data/dlg_warning.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
channel/channelapp/data/droid.ttf
Normal file
BIN
channel/channelapp/data/droidbold.ttf
Normal file
BIN
channel/channelapp/data/icon_network.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
channel/channelapp/data/icon_network_active.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
channel/channelapp/data/icon_usbgecko.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
channel/channelapp/data/icon_usbgecko_active.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
channel/channelapp/data/logo.png
Normal file
After Width: | Height: | Size: 9.8 KiB |
BIN
channel/channelapp/data/progress.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
channel/channelapp/data/throbber.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
4
channel/channelapp/gdb.txt
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
target remote /dev/ttyUSB0
|
||||||
|
info threads
|
||||||
|
bt
|
||||||
|
|
257
channel/channelapp/i18n/dutch.po
Normal file
@ -0,0 +1,257 @@
|
|||||||
|
# translation of template.pot to Dutch
|
||||||
|
# Dutch translations for PACKAGE package.
|
||||||
|
# Copyright (C) 2008 THE PACKAGE'S COPYRIGHT HOLDER
|
||||||
|
# This file is distributed under the same license as the PACKAGE package.
|
||||||
|
#
|
||||||
|
# blasty
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: nederlands\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2016-11-22 21:29+0900\n"
|
||||||
|
"PO-Revision-Date: 2008-05-21 01:17+0200\n"
|
||||||
|
"Last-Translator: ChronoX\n"
|
||||||
|
"Language-Team: Dutch\n"
|
||||||
|
"Language: \n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
"X-Generator: KBabel 1.11.4\n"
|
||||||
|
|
||||||
|
#: source/dialogs.c:53
|
||||||
|
msgid "no description available"
|
||||||
|
msgstr "Geen omschrijving beschikbaar"
|
||||||
|
|
||||||
|
#: source/dialogs.c:55
|
||||||
|
msgid "Information"
|
||||||
|
msgstr "Informatie"
|
||||||
|
|
||||||
|
#: source/dialogs.c:56
|
||||||
|
msgid "Confirmation"
|
||||||
|
msgstr "Bevestiging"
|
||||||
|
|
||||||
|
#: source/dialogs.c:57
|
||||||
|
msgid "Warning"
|
||||||
|
msgstr "Waarschuwing"
|
||||||
|
|
||||||
|
#: source/dialogs.c:58
|
||||||
|
msgid "Error"
|
||||||
|
msgstr "Error"
|
||||||
|
|
||||||
|
#: source/dialogs.c:59
|
||||||
|
msgid "Ok"
|
||||||
|
msgstr "OK"
|
||||||
|
|
||||||
|
#: source/dialogs.c:60
|
||||||
|
msgid "Cancel"
|
||||||
|
msgstr "Annuleren"
|
||||||
|
|
||||||
|
#: source/dialogs.c:61
|
||||||
|
msgid "Yes"
|
||||||
|
msgstr "Ja"
|
||||||
|
|
||||||
|
#: source/dialogs.c:62
|
||||||
|
msgid "No"
|
||||||
|
msgstr "Nee"
|
||||||
|
|
||||||
|
#: source/dialogs.c:63
|
||||||
|
msgid "Delete"
|
||||||
|
msgstr "Verwijder"
|
||||||
|
|
||||||
|
#: source/dialogs.c:64
|
||||||
|
msgid "Load"
|
||||||
|
msgstr "Start"
|
||||||
|
|
||||||
|
#: source/dialogs.c:65 source/m_main.c:95
|
||||||
|
msgid "Back"
|
||||||
|
msgstr "Terug"
|
||||||
|
|
||||||
|
#: source/dialogs.c:66
|
||||||
|
msgid "Options"
|
||||||
|
msgstr "Opties"
|
||||||
|
|
||||||
|
#: source/dialogs.c:67
|
||||||
|
msgid "Device:"
|
||||||
|
msgstr "Apparaat:"
|
||||||
|
|
||||||
|
#: source/dialogs.c:68
|
||||||
|
msgid "Internal SD Slot"
|
||||||
|
msgstr "Intern SD Slot"
|
||||||
|
|
||||||
|
#: source/dialogs.c:69
|
||||||
|
msgid "USB device"
|
||||||
|
msgstr "USB apparaat"
|
||||||
|
|
||||||
|
#: source/dialogs.c:70
|
||||||
|
msgid "SDGecko Slot A"
|
||||||
|
msgstr "SDGecko Slot A"
|
||||||
|
|
||||||
|
#: source/dialogs.c:71
|
||||||
|
msgid "SDGecko Slot B"
|
||||||
|
msgstr "SDGecko Slot B"
|
||||||
|
|
||||||
|
#: source/dialogs.c:72
|
||||||
|
msgid "Sort applications by:"
|
||||||
|
msgstr "Sorteer applicaties op:"
|
||||||
|
|
||||||
|
#: source/dialogs.c:73
|
||||||
|
msgid "Name"
|
||||||
|
msgstr "Naam"
|
||||||
|
|
||||||
|
#: source/dialogs.c:74
|
||||||
|
msgid "Date"
|
||||||
|
msgstr "Datum"
|
||||||
|
|
||||||
|
#: source/dialogs.c:110
|
||||||
|
msgid "<YourLanguageHere> translation by <YourNickNameHere>"
|
||||||
|
msgstr "Nederlandse vertaling door bLAStY en ChronoX"
|
||||||
|
|
||||||
|
#: source/dialogs.c:115
|
||||||
|
msgid "Theme:"
|
||||||
|
msgstr "Thema:"
|
||||||
|
|
||||||
|
#: source/dialogs.c:125
|
||||||
|
#, c-format
|
||||||
|
msgid "Version: %s"
|
||||||
|
msgstr "Versie: %s"
|
||||||
|
|
||||||
|
#: source/dialogs.c:126
|
||||||
|
#, c-format
|
||||||
|
msgid "Author: %s"
|
||||||
|
msgstr "Auteur: %s"
|
||||||
|
|
||||||
|
#: source/loader.c:716
|
||||||
|
msgid "Error while reading the application from the SD card"
|
||||||
|
msgstr ""
|
||||||
|
"Er is een fout opgetreden tijdens het lezen van de applicatie van de SD kaart"
|
||||||
|
|
||||||
|
#: source/loader.c:717
|
||||||
|
msgid "Error while receiving the application"
|
||||||
|
msgstr "Er is een fout opgetreden tijdens het ontvangen van de applicatie"
|
||||||
|
|
||||||
|
#: source/loader.c:718
|
||||||
|
msgid "Error uncompressing the received data"
|
||||||
|
msgstr "Error tijdens het uitpakken van de ontvangen data"
|
||||||
|
|
||||||
|
#: source/loader.c:719
|
||||||
|
msgid "This is not a valid Wii application"
|
||||||
|
msgstr "Dit is geen geldige Wii applicatie"
|
||||||
|
|
||||||
|
#: source/loader.c:720
|
||||||
|
msgid "This is not a usable ZIP file"
|
||||||
|
msgstr "Dit is geen bruikbaar ZIP bestand"
|
||||||
|
|
||||||
|
#: source/loader.c:721
|
||||||
|
msgid "Not enough memory"
|
||||||
|
msgstr "Niet genoeg geheugen"
|
||||||
|
|
||||||
|
#: source/loader.c:763
|
||||||
|
#, c-format
|
||||||
|
msgid "Loading %s"
|
||||||
|
msgstr "Bezig met laden van %s"
|
||||||
|
|
||||||
|
#: source/loader.c:772
|
||||||
|
#, c-format
|
||||||
|
msgid "Receiving over USBGecko"
|
||||||
|
msgstr "Ontvangen via USBGecko"
|
||||||
|
|
||||||
|
#: source/loader.c:782
|
||||||
|
#, c-format
|
||||||
|
msgid "Receiving from %s"
|
||||||
|
msgstr "Laden via %s"
|
||||||
|
|
||||||
|
#: source/loader.c:968
|
||||||
|
#, c-format
|
||||||
|
msgid ""
|
||||||
|
"Extract the received ZIP file?\n"
|
||||||
|
"%s of free space are required."
|
||||||
|
msgstr ""
|
||||||
|
"Pak het ontvangen ZIP bestand uit?\n"
|
||||||
|
"%s aan vrije ruimte is vereist."
|
||||||
|
|
||||||
|
#: source/loader.c:969
|
||||||
|
#, c-format
|
||||||
|
msgid "WARNING: Files in '%s' will be overwritten"
|
||||||
|
msgstr "WAARSCHUWING: Bestanden in '%s' zullen worden overschreven"
|
||||||
|
|
||||||
|
#: source/loader.c:970
|
||||||
|
msgid "Error while extracting the ZIP file"
|
||||||
|
msgstr "Er is een fout opgetreden tijdens het uitpakken van de ZIP filee"
|
||||||
|
|
||||||
|
#: source/main.c:250
|
||||||
|
msgid "Do you really want to delete this application?"
|
||||||
|
msgstr "Wil je echt deze applicatie verwijderen?"
|
||||||
|
|
||||||
|
#: source/main.c:251
|
||||||
|
#, c-format
|
||||||
|
msgid "Error deleting '%s'"
|
||||||
|
msgstr "Kon '%s' niet verwijderen"
|
||||||
|
|
||||||
|
#: source/manage.c:518
|
||||||
|
msgid "Extracting"
|
||||||
|
msgstr "Uitpakken"
|
||||||
|
|
||||||
|
#: source/m_main.c:80
|
||||||
|
msgid "Network not initialized"
|
||||||
|
msgstr "Netwerk niet geïnitialiseerd"
|
||||||
|
|
||||||
|
#: source/m_main.c:81
|
||||||
|
#, c-format
|
||||||
|
msgid "Your Wii's IP is %u.%u.%u.%u"
|
||||||
|
msgstr "IP adres: %u.%u.%u.%u"
|
||||||
|
|
||||||
|
#: source/m_main.c:97
|
||||||
|
msgid "About"
|
||||||
|
msgstr "Info"
|
||||||
|
|
||||||
|
#: source/m_main.c:102
|
||||||
|
msgid "Launch BootMii"
|
||||||
|
msgstr "BootMii starten"
|
||||||
|
|
||||||
|
#: source/m_main.c:106
|
||||||
|
msgid "Exit to System Menu"
|
||||||
|
msgstr "Terug naar System Menu"
|
||||||
|
|
||||||
|
#: source/m_main.c:109
|
||||||
|
msgid "Shutdown"
|
||||||
|
msgstr "Afsluiten"
|
||||||
|
|
||||||
|
#: source/update.c:232
|
||||||
|
#, c-format
|
||||||
|
msgid ""
|
||||||
|
"An update to the Homebrew Channel (version %s, replacing the installed "
|
||||||
|
"version %s) is available for installation, do you want to update now?\n"
|
||||||
|
"\n"
|
||||||
|
"Release notes:\n"
|
||||||
|
"\n"
|
||||||
|
"%s"
|
||||||
|
msgstr ""
|
||||||
|
"Een update voor het Homebrew Kanaal (%s zal de huidige %s vervangen) is "
|
||||||
|
"beschikbaar, wil je nu updaten?\n"
|
||||||
|
"\n"
|
||||||
|
"Release notes:\n"
|
||||||
|
"\n"
|
||||||
|
"%s"
|
||||||
|
|
||||||
|
#: source/update.c:262
|
||||||
|
#, c-format
|
||||||
|
msgid "Downloading Update (%u kB)"
|
||||||
|
msgstr "Update wordt gedownload (%u kB)"
|
||||||
|
|
||||||
|
#: source/update.c:304
|
||||||
|
msgid "Download failed"
|
||||||
|
msgstr "Downloaden mislukt"
|
||||||
|
|
||||||
|
#: source/widgets.c:16
|
||||||
|
msgid "<no description>"
|
||||||
|
msgstr "<geen omschrijving>"
|
||||||
|
|
||||||
|
#~ msgid "Version: <unknown>"
|
||||||
|
#~ msgstr "Versie: <onbekend>"
|
||||||
|
|
||||||
|
#~ msgid "Coder: <unknown>"
|
||||||
|
#~ msgstr "Auteur: <onbekend>"
|
||||||
|
|
||||||
|
#~ msgid "Deleting"
|
||||||
|
#~ msgstr "Verijwderen"
|
261
channel/channelapp/i18n/french.po
Normal file
@ -0,0 +1,261 @@
|
|||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||||
|
# This file is distributed under the same license as the PACKAGE package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2016-11-22 21:29+0900\n"
|
||||||
|
"PO-Revision-Date: 2008-05-23 08:52+0100\n"
|
||||||
|
"Last-Translator: Bruno C. <Chandler>\n"
|
||||||
|
"Language-Team: LANGUAGE\n"
|
||||||
|
"Language: \n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
|
#: source/dialogs.c:53
|
||||||
|
msgid "no description available"
|
||||||
|
msgstr "aucune description disponible"
|
||||||
|
|
||||||
|
# This and the following strings are dialog box "title bars"
|
||||||
|
#: source/dialogs.c:55
|
||||||
|
msgid "Information"
|
||||||
|
msgstr "Information"
|
||||||
|
|
||||||
|
#: source/dialogs.c:56
|
||||||
|
msgid "Confirmation"
|
||||||
|
msgstr "Confirmation"
|
||||||
|
|
||||||
|
#: source/dialogs.c:57
|
||||||
|
msgid "Warning"
|
||||||
|
msgstr "Avertissement"
|
||||||
|
|
||||||
|
#: source/dialogs.c:58
|
||||||
|
msgid "Error"
|
||||||
|
msgstr "Erreur"
|
||||||
|
|
||||||
|
# button text
|
||||||
|
#: source/dialogs.c:59
|
||||||
|
msgid "Ok"
|
||||||
|
msgstr "Ok"
|
||||||
|
|
||||||
|
# button text
|
||||||
|
#: source/dialogs.c:60
|
||||||
|
msgid "Cancel"
|
||||||
|
msgstr "Annuler"
|
||||||
|
|
||||||
|
# button text
|
||||||
|
#: source/dialogs.c:61
|
||||||
|
msgid "Yes"
|
||||||
|
msgstr "Oui"
|
||||||
|
|
||||||
|
# button text
|
||||||
|
#: source/dialogs.c:62
|
||||||
|
msgid "No"
|
||||||
|
msgstr "Non"
|
||||||
|
|
||||||
|
#: source/dialogs.c:63
|
||||||
|
msgid "Delete"
|
||||||
|
msgstr "Supprimer"
|
||||||
|
|
||||||
|
# button text
|
||||||
|
#: source/dialogs.c:64
|
||||||
|
msgid "Load"
|
||||||
|
msgstr "Charger"
|
||||||
|
|
||||||
|
# button text
|
||||||
|
#: source/dialogs.c:65 source/m_main.c:95
|
||||||
|
msgid "Back"
|
||||||
|
msgstr "Retour"
|
||||||
|
|
||||||
|
#: source/dialogs.c:66
|
||||||
|
msgid "Options"
|
||||||
|
msgstr "Options"
|
||||||
|
|
||||||
|
#: source/dialogs.c:67
|
||||||
|
msgid "Device:"
|
||||||
|
msgstr "Dispositif:"
|
||||||
|
|
||||||
|
#: source/dialogs.c:68
|
||||||
|
msgid "Internal SD Slot"
|
||||||
|
msgstr "Lecteur de carte SD"
|
||||||
|
|
||||||
|
#: source/dialogs.c:69
|
||||||
|
msgid "USB device"
|
||||||
|
msgstr "Dispositif USB"
|
||||||
|
|
||||||
|
#: source/dialogs.c:70
|
||||||
|
msgid "SDGecko Slot A"
|
||||||
|
msgstr "Lecteur SDGecko A"
|
||||||
|
|
||||||
|
#: source/dialogs.c:71
|
||||||
|
msgid "SDGecko Slot B"
|
||||||
|
msgstr "Lecteur SDGecko B"
|
||||||
|
|
||||||
|
#: source/dialogs.c:72
|
||||||
|
msgid "Sort applications by:"
|
||||||
|
msgstr "Trier les applications par:"
|
||||||
|
|
||||||
|
#: source/dialogs.c:73
|
||||||
|
msgid "Name"
|
||||||
|
msgstr "Nom"
|
||||||
|
|
||||||
|
#: source/dialogs.c:74
|
||||||
|
msgid "Date"
|
||||||
|
msgstr "Date"
|
||||||
|
|
||||||
|
#: source/dialogs.c:110
|
||||||
|
msgid "<YourLanguageHere> translation by <YourNickNameHere>"
|
||||||
|
msgstr "Traduction française par Chandler et Strangerke"
|
||||||
|
|
||||||
|
#: source/dialogs.c:115
|
||||||
|
msgid "Theme:"
|
||||||
|
msgstr "Thème:"
|
||||||
|
|
||||||
|
#: source/dialogs.c:125
|
||||||
|
#, c-format
|
||||||
|
msgid "Version: %s"
|
||||||
|
msgstr "Version : %s"
|
||||||
|
|
||||||
|
#: source/dialogs.c:126
|
||||||
|
#, c-format
|
||||||
|
msgid "Author: %s"
|
||||||
|
msgstr "Auteur : %s"
|
||||||
|
|
||||||
|
#: source/loader.c:716
|
||||||
|
msgid "Error while reading the application from the SD card"
|
||||||
|
msgstr "Erreur de lecture de l'application à partir de la carte SD"
|
||||||
|
|
||||||
|
#: source/loader.c:717
|
||||||
|
msgid "Error while receiving the application"
|
||||||
|
msgstr "Erreur lors de la réception de l'application"
|
||||||
|
|
||||||
|
#: source/loader.c:718
|
||||||
|
msgid "Error uncompressing the received data"
|
||||||
|
msgstr "Erreur de décompression des données reçues"
|
||||||
|
|
||||||
|
#: source/loader.c:719
|
||||||
|
msgid "This is not a valid Wii application"
|
||||||
|
msgstr "Application Wii non valide"
|
||||||
|
|
||||||
|
#: source/loader.c:720
|
||||||
|
msgid "This is not a usable ZIP file"
|
||||||
|
msgstr "Ce fichier ZIP est inutilisable"
|
||||||
|
|
||||||
|
#: source/loader.c:721
|
||||||
|
msgid "Not enough memory"
|
||||||
|
msgstr "Mémoire insuffisante"
|
||||||
|
|
||||||
|
#: source/loader.c:763
|
||||||
|
#, c-format
|
||||||
|
msgid "Loading %s"
|
||||||
|
msgstr "Chargement de %s"
|
||||||
|
|
||||||
|
#: source/loader.c:772
|
||||||
|
#, c-format
|
||||||
|
msgid "Receiving over USBGecko"
|
||||||
|
msgstr "Réception sur USBGecko"
|
||||||
|
|
||||||
|
#: source/loader.c:782
|
||||||
|
#, c-format
|
||||||
|
msgid "Receiving from %s"
|
||||||
|
msgstr "Réception à partir de %s"
|
||||||
|
|
||||||
|
#: source/loader.c:968
|
||||||
|
#, c-format
|
||||||
|
msgid ""
|
||||||
|
"Extract the received ZIP file?\n"
|
||||||
|
"%s of free space are required."
|
||||||
|
msgstr ""
|
||||||
|
"Decompression du fichier ZIP reçu?\n"
|
||||||
|
"Un espace libre de %s est nécessaire."
|
||||||
|
|
||||||
|
#: source/loader.c:969
|
||||||
|
#, c-format
|
||||||
|
msgid "WARNING: Files in '%s' will be overwritten"
|
||||||
|
msgstr "ATTENTION: Les fichiers dans '%s' seront écrasés"
|
||||||
|
|
||||||
|
#: source/loader.c:970
|
||||||
|
msgid "Error while extracting the ZIP file"
|
||||||
|
msgstr "Erreur de décompression du fichier ZIP"
|
||||||
|
|
||||||
|
#: source/main.c:250
|
||||||
|
msgid "Do you really want to delete this application?"
|
||||||
|
msgstr "Voulez-vous vraiment supprimer cette application?"
|
||||||
|
|
||||||
|
#: source/main.c:251
|
||||||
|
#, c-format
|
||||||
|
msgid "Error deleting '%s'"
|
||||||
|
msgstr "Errur lors de la suppression de '%s'"
|
||||||
|
|
||||||
|
#: source/manage.c:518
|
||||||
|
msgid "Extracting"
|
||||||
|
msgstr "Extraction en cours"
|
||||||
|
|
||||||
|
#: source/m_main.c:80
|
||||||
|
msgid "Network not initialized"
|
||||||
|
msgstr "Réseau non initialisé"
|
||||||
|
|
||||||
|
#: source/m_main.c:81
|
||||||
|
#, c-format
|
||||||
|
msgid "Your Wii's IP is %u.%u.%u.%u"
|
||||||
|
msgstr "L'IP de votre Wii est %u.%u.%u.%u"
|
||||||
|
|
||||||
|
# button text
|
||||||
|
#: source/m_main.c:97
|
||||||
|
msgid "About"
|
||||||
|
msgstr "À propos de"
|
||||||
|
|
||||||
|
#: source/m_main.c:102
|
||||||
|
msgid "Launch BootMii"
|
||||||
|
msgstr "Lancer BootMii"
|
||||||
|
|
||||||
|
#: source/m_main.c:106
|
||||||
|
msgid "Exit to System Menu"
|
||||||
|
msgstr "Retour au menu système"
|
||||||
|
|
||||||
|
#: source/m_main.c:109
|
||||||
|
msgid "Shutdown"
|
||||||
|
msgstr "Arrêt"
|
||||||
|
|
||||||
|
#: source/update.c:232
|
||||||
|
#, c-format
|
||||||
|
msgid ""
|
||||||
|
"An update to the Homebrew Channel (version %s, replacing the installed "
|
||||||
|
"version %s) is available for installation, do you want to update now?\n"
|
||||||
|
"\n"
|
||||||
|
"Release notes:\n"
|
||||||
|
"\n"
|
||||||
|
"%s"
|
||||||
|
msgstr ""
|
||||||
|
"Une mise à jour de la chaine Homebrew (version %s, remplaçant la version "
|
||||||
|
"installée %s) est disponible. Voulez-vous faire la mise à jour maintenant ?\n"
|
||||||
|
"\n"
|
||||||
|
"Notes de version :\n"
|
||||||
|
"\n"
|
||||||
|
"%s"
|
||||||
|
|
||||||
|
#: source/update.c:262
|
||||||
|
#, c-format
|
||||||
|
msgid "Downloading Update (%u kB)"
|
||||||
|
msgstr "Téléchargement... (%u Ko)"
|
||||||
|
|
||||||
|
#: source/update.c:304
|
||||||
|
msgid "Download failed"
|
||||||
|
msgstr "Échec du téléchargement"
|
||||||
|
|
||||||
|
#: source/widgets.c:16
|
||||||
|
msgid "<no description>"
|
||||||
|
msgstr "<aucune description>"
|
||||||
|
|
||||||
|
#~ msgid "Version: <unknown>"
|
||||||
|
#~ msgstr "Version : <inconnue>"
|
||||||
|
|
||||||
|
#~ msgid "Coder: <unknown>"
|
||||||
|
#~ msgstr "Auteur : <inconnu>"
|
||||||
|
|
||||||
|
#~ msgid "Deleting"
|
||||||
|
#~ msgstr "Suppression en cours"
|