diff --git a/project/jni/application/REminiscence/AndroidAppSettings.cfg b/project/jni/application/REminiscence/AndroidAppSettings.cfg new file mode 100644 index 000000000..b17859042 --- /dev/null +++ b/project/jni/application/REminiscence/AndroidAppSettings.cfg @@ -0,0 +1,32 @@ +# The application settings for Android libSDL port +AppSettingVersion=14 +LibSdlVersion=1.2 +AppName="REminiscence" +AppFullName=fr.freecyxdown.sdl +ScreenOrientation=h +InhibitSuspend=n +AppDataDownloadUrl="Data files size is 1 Mb|http://anddev.at.ua/data/reminiscence-data.zip?attredirects=0&d=1" +SdlVideoResize=y +SdlVideoResizeKeepAspect=n +NeedDepthBuffer=n +AppUsesMouse=y +AppNeedsTwoButtonMouse=n +AppNeedsArrowKeys=y +AppNeedsTextInput=y +AppUsesJoystick=n +AppHandlesJoystickSensitivity=n +AppUsesMultitouch=n +NonBlockingSwapBuffers=n +RedefinedKeys="RETURN RSHIFT BACKSPACE RETURN RSHIFT" +AppTouchscreenKeyboardKeysAmount=3 +AppTouchscreenKeyboardKeysAmountAutoFire=0 +MultiABI=n +AppVersionCode=01901 +AppVersionName="0.1.9" +CompiledLibraries="jpeg png" +CustomBuildScript=n +AppCflags='-Dmain=SDL_main -DBYPASS_PROTECTION' +AppLdflags='' +AppSubdirsBuild='' +AppUseCrystaXToolchain=n +ReadmeText='^You may press "Home" now - the data will be downloaded in background' diff --git a/project/jni/application/REminiscence/AndroidBuild.sh b/project/jni/application/REminiscence/AndroidBuild.sh new file mode 100755 index 000000000..b840bdf3d --- /dev/null +++ b/project/jni/application/REminiscence/AndroidBuild.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +LOCAL_PATH=`dirname $0` +LOCAL_PATH=`cd $LOCAL_PATH && pwd` + +# Hacks for broken configure scripts +#rm -rf $LOCAL_PATH/../../obj/local/armeabi/libSDL_*.so +#rm -rf $LOCAL_PATH/../../obj/local/armeabi/libsdl_main.so + +# Uncomment if your configure expects SDL libraries in form "libSDL_name.so" +#if [ -e $LOCAL_PATH/../../obj/local/armeabi/libsdl_mixer.so ] ; then +# ln -sf libsdl_mixer.so $LOCAL_PATH/../../obj/local/armeabi/libSDL_Mixer.so +#fi + +#for F in $LOCAL_PATH/../../obj/local/armeabi/libsdl_*.so; do +# LIBNAME=`echo $F | sed "s@$LOCAL_PATH/../../obj/local/armeabi/libsdl_\(.*\)[.]so@\1@"` +# ln -sf libsdl_$LIBNAME.so $LOCAL_PATH/../../obj/local/armeabi/libSDL_$LIBNAME.so +#done + +../setEnvironment.sh make -C REminiscence-0.1.9 -j2 && cp -f REminiscence-0.1.9/rs libapplication.so diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/COPYING b/project/jni/application/REminiscence/REminiscence-0.1.9/COPYING new file mode 100644 index 000000000..f64098563 --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, 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. + + + Copyright (C) + + 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 Street, 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. + + , 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. diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/Makefile b/project/jni/application/REminiscence/REminiscence-0.1.9/Makefile new file mode 100644 index 000000000..3047a0a90 --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/Makefile @@ -0,0 +1,29 @@ + +SDL_CFLAGS = `sdl-config --cflags` -Dmain=SDL_main -fpic -mthumb-interwork -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -DANDROID -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -fno-exceptions -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -I/home/lubomyr/src/endless_space/android-ndk-r4-crystax/build/platforms/android-8/arch-arm/usr/include -I/home/lubomyr/project/jni/sdl-1.2/include +SDL_LIBS = `sdl-config --libs` -nostdlib -Wl,-soname,libapplication.so -Wl,-shared,-Bsymbolic -Wl,--whole-archive -Wl,--no-whole-archive /home/lubomyr/src/endless_space/android-ndk-r4-crystax/build/prebuilt/linux-x86/arm-eabi-4.4.0/arm-eabi/lib/libstdc++.a /home/lubomyr/src/endless_space/android-ndk-r4-crystax/build/platforms/android-8/arch-arm/usr/lib/libc.a -L/home/lubomyr/project/obj/local/armeabi -lsdl-1.2 -lm -llog -lgcc -L/home/lubomyr/src/endless_space/android-ndk-r4-crystax/build/platforms/android-8/arch-arm/usr/lib + +DEFINES = -DBYPASS_PROTECTION +#DEFINES = -DBYPASS_PROTECTION -DNDEBUG + +CXX = arm-eabi-g++ +CXXFLAGS:= -g -Wall -Wuninitialized -Wno-unknown-pragmas -Wshadow -Wimplicit +CXXFLAGS+= -Wundef -Wreorder -Wwrite-strings -Wnon-virtual-dtor -Wno-multichar +CXXFLAGS+= $(SDL_CFLAGS) $(DEFINES) + +SRCS = collision.cpp cutscene.cpp file.cpp game.cpp graphics.cpp main.cpp menu.cpp \ + mixer.cpp mod_player.cpp piege.cpp resource.cpp scaler.cpp sfx_player.cpp \ + staticres.cpp systemstub_sdl.cpp unpack.cpp util.cpp video.cpp + +OBJS = $(SRCS:.cpp=.o) +DEPS = $(SRCS:.cpp=.d) + +rs: $(OBJS) + $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(SDL_LIBS) -lz + +.cpp.o: + $(CXX) $(CXXFLAGS) -MMD -c $< -o $*.o + +clean: + rm -f *.o *.d + +-include $(DEPS) diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/README b/project/jni/application/REminiscence/REminiscence-0.1.9/README new file mode 100644 index 000000000..6276fca23 --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/README @@ -0,0 +1,138 @@ + +REminiscence README +Release version: 0.1.9 (Mar 16 2007) +------------------------------------------------------------------------------- + + +About: +------ + +REminiscence is a re-implementation of the engine used in the game Flashback +made by Delphine Software and released in 1992. More informations about the +game can be found at [1], [2] and [3]. + + +Supported Versions: +------------------- + +Only the PC DOS versions are supported. The engine has been reported to work +with english, french, german and spanish versions of the game. + + +Compiling: +---------- + +Tweak the Makefile if needed and type make (only gcc3 has been tested so far). +The SDL and zlib libraries are required. + + +Data Files: +----------- + +You will need the original files, here is the required list : + + FB_TXT.FNT + GLOBAL.ICN + GLOBAL.FIB + GLOBAL.SPC + *.OFF + *.SPR + *.MAP + *.PAL + *.ANI + *.CT + *.MBK + *.OBJ + *.PGE + *.RP + *.TBN + *.CMD + *.POL + *CINE.* + +If you have a version distributed by SSI, you'll have to rename some files : + + logosssi.cmd -> logos.cmd + logosssi.pol -> logos.pol + menu1ssi.map -> menu1.map + menu1ssi.pal -> menu1.pal + +In order to hear music, you'll need the original music files (.mod) of the +amiga version. Copy them to the DATA directory and rename them like this : + + mod.flashback-ascenseur + mod.flashback-ceinturea + mod.flashback-chute + mod.flashback-desintegr + mod.flashback-donneobjt + mod.flashback-fin + mod.flashback-fin2 + mod.flashback-game_over + mod.flashback-holocube + mod.flashback-introb + mod.flashback-jungle + mod.flashback-logo + mod.flashback-memoire + mod.flashback-missionca + mod.flashback-options1 + mod.flashback-options2 + mod.flashback-reunion + mod.flashback-taxi + mod.flashback-teleport2 + mod.flashback-teleporta + mod.flashback-voyage + + +Running: +-------- + +By default, the engine will try to load the game data files from the 'DATA' +directory (as the original game did). The savestates are saved in the current +directory. These paths can be changed using command line switches : + + Usage: rs [OPTIONS]... + --datapath=PATH Path to data files (default 'DATA') + --savepath=PATH Path to save files (default '.') + +In-game hotkeys : + + Arrow Keys move Conrad + Enter use the current inventory object + Shift talk / use / run / shoot + Escape display the options + Backspace display the inventory + Alt Enter toggle windowed/fullscreen mode + Alt + and - change video scaler + Ctrl S save game state + Ctrl L load game state + Ctrl + and - change game state slot + Ctrl R toggle input keys record + Ctrl P toggle input keys replay + +Debug hotkeys : + + Ctrl F toggle fast mode + Ctrl I set Conrad life counter to 32767 + Ctrl B toggle display of updated dirty blocks + Ctrl M mirror mode (just a hack, really) + + +Credits: +-------- + +Delphine Software, obviously, for making another great game. +Yaz0r, Pixel and gawd for sharing information they gathered on the game. + + +Contact: +-------- + +Gregory Montoir, cyx@users.sourceforge.net + + +URLs: +----- + +[1] http://www.mobygames.com/game/flashback-the-quest-for-identity +[2] http://en.wikipedia.org/wiki/Flashback:_The_Quest_for_Identity +[3] http://ramal.free.fr/fb_en.htm diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/collision.cpp b/project/jni/application/REminiscence/REminiscence-0.1.9/collision.cpp new file mode 100644 index 000000000..523037940 --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/collision.cpp @@ -0,0 +1,523 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "game.h" +#include "resource.h" + + +void Game::col_prepareRoomState() { + memset(_col_activeCollisionSlots, 0xFF, sizeof(_col_activeCollisionSlots)); + _col_currentLeftRoom = _res._ctData[CT_LEFT_ROOM + _currentRoom]; + _col_currentRightRoom = _res._ctData[CT_RIGHT_ROOM + _currentRoom]; + for (int i = 0; i != _col_curPos; ++i) { + CollisionSlot *_di = _col_slotsTable[i]; + uint8 room = _di->ct_pos / 64; + if (room == _currentRoom) { + _col_activeCollisionSlots[0x30 + (_di->ct_pos & 0x3F)] = i; + } else if (room == _col_currentLeftRoom) { + _col_activeCollisionSlots[0x00 + (_di->ct_pos & 0x3F)] = i; + } else if (room == _col_currentRightRoom) { + _col_activeCollisionSlots[0x60 + (_di->ct_pos & 0x3F)] = i; + } + } +#ifdef DEBUG_COLLISION + printf("---\n"); + for (int y = 0; y < 7; ++y) { + for (int x = 0; x < 16; ++x) { + printf("%d", _res._ctData[0x100 + _currentRoom * 0x70 + y * 16 + x]); + } + printf("\n"); + } +#endif +} + +void Game::col_clearState() { + _col_curPos = 0; + _col_curSlot = _col_slots; +} + +void Game::col_preparePiegeState(LivePGE *pge) { + debug(DBG_COL, "Game::col_preparePiegeState() pge_num=%d", pge - &_pgeLive[0]); + CollisionSlot *ct_slot1, *ct_slot2; + if (pge->init_PGE->unk1C == 0) { + pge->collision_slot = 0xFF; + return; + } + int i = 0; + ct_slot1 = 0; + for (int c = 0; c < pge->init_PGE->unk1C; ++c) { + ct_slot2 = _col_curSlot; + if (ct_slot2 + 1 > &_col_slots[255]) + return; + _col_curSlot = ct_slot2 + 1; + int16 pos = col_getGridPos(pge, i); + if (pos < 0) { + if (ct_slot1 == 0) { + pge->collision_slot = 0xFF; + } else { + ct_slot1->index = 0xFFFF; + } + return; + } + ct_slot2->ct_pos = pos; + ct_slot2->live_pge = pge; + ct_slot2->index = 0xFFFF; + int16 _ax = col_findSlot(pos); + if (_ax >= 0) { + ct_slot2->prev_slot = _col_slotsTable[_ax]; + _col_slotsTable[_ax] = ct_slot2; + if (ct_slot1 == 0) { + pge->collision_slot = _ax; + } else { + ct_slot1->index = _ax; + } + LivePGE *temp_pge = ct_slot2->live_pge; + if (temp_pge->flags & 0x80) { + _pge_liveTable2[temp_pge->index] = temp_pge; + temp_pge->flags |= 4; + } + if (ct_slot2->prev_slot) { + temp_pge = ct_slot2->prev_slot->live_pge; + if (temp_pge->flags & 0x80) { + _pge_liveTable2[temp_pge->index] = temp_pge; + temp_pge->flags |= 4; + } + } + } else { + ct_slot2->prev_slot = 0; + _col_slotsTable[_col_curPos] = ct_slot2; + if (ct_slot1 == 0) { + pge->collision_slot = _col_curPos; + } else { + ct_slot1->index = _col_curPos; + } + _col_curPos++; + } + ct_slot1 = ct_slot2; + i += 0x10; + } +} + +uint16 Game::col_getGridPos(LivePGE *pge, int16 dx) { + int16 x = pge->pos_x + dx; + int16 y = pge->pos_y; + + int8 c = pge->room_location; + if (c < 0) return 0xFFFF; + + if (x < 0) { + c = _res._ctData[CT_LEFT_ROOM + c]; + if (c < 0) return 0xFFFF; + x += 256; + } else if (x >= 256) { + c = _res._ctData[CT_RIGHT_ROOM + c]; + if (c < 0) return 0xFFFF; + x -= 256; + } else if (y < 0) { + c = _res._ctData[CT_UP_ROOM + c]; + if (c < 0) return 0xFFFF; + y += 216; + } else if (y >= 216) { + c = _res._ctData[CT_DOWN_ROOM + c]; + if (c < 0) return 0xFFFF; + y -= 216; + } + + x = (x + 8) >> 4; + y = (y - 8) / 72; + if (x < 0 || x > 15 || y < 0 || y > 2) { + return 0xFFFF; + } else { + return y * 16 + x + c * 64; + } +} + +int16 Game::col_findSlot(int16 pos) { + for (uint16 i = 0; i < _col_curPos; ++i) { + if (_col_slotsTable[i]->ct_pos == pos) + return i; + } + return -1; +} + +int16 Game::col_getGridData(LivePGE *pge, int16 dy, int16 dx) { + if (_pge_currentPiegeFacingDir) { + dx = -dx; + } + const int16 pge_grid_y = _col_currentPiegeGridPosY + dy; + const int16 pge_grid_x = _col_currentPiegeGridPosX + dx; + const int8 *room_ct_data; + int8 next_room; + if (pge_grid_x < 0) { + room_ct_data = &_res._ctData[CT_LEFT_ROOM]; + next_room = room_ct_data[pge->room_location]; + if (next_room < 0) return 1; + room_ct_data += pge_grid_x + 16 + pge_grid_y * 16 + next_room * 0x70; + return (int16)room_ct_data[0x40]; + } else if (pge_grid_x >= 16) { + room_ct_data = &_res._ctData[CT_RIGHT_ROOM]; + next_room = room_ct_data[pge->room_location]; + if (next_room < 0) return 1; + room_ct_data += pge_grid_x - 16 + pge_grid_y * 16 + next_room * 0x70; + return (int16)room_ct_data[0x80]; + } else if (pge_grid_y < 1) { + room_ct_data = &_res._ctData[CT_UP_ROOM]; + next_room = room_ct_data[pge->room_location]; + if (next_room < 0) return 1; + room_ct_data += pge_grid_x + (pge_grid_y + 6) * 16 + next_room * 0x70; + return (int16)room_ct_data[0x100]; + } else if (pge_grid_y >= 7) { + room_ct_data = &_res._ctData[CT_DOWN_ROOM]; + next_room = room_ct_data[pge->room_location]; + if (next_room < 0) return 1; + room_ct_data += pge_grid_x + (pge_grid_y - 6) * 16 + next_room * 0x70; + return (int16)room_ct_data[0xC0]; + } else { + room_ct_data = &_res._ctData[0x100]; + room_ct_data += pge_grid_x + pge_grid_y * 16 + pge->room_location * 0x70; + return (int16)room_ct_data[0]; + } +} + +LivePGE *Game::col_findPiege(LivePGE *pge, uint16 arg2) { + if (pge->collision_slot != 0xFF) { + CollisionSlot *slot = _col_slotsTable[pge->collision_slot]; + while (slot) { + if (slot->live_pge == pge) { + slot = slot->prev_slot; + } else { + if (arg2 == 0xFFFF || arg2 == slot->live_pge->init_PGE->object_type) { + return slot->live_pge; + } else { + slot = slot->prev_slot; + } + } + } + } + return 0; +} + +uint8 Game::col_findCurrentCollidingObject(LivePGE *pge, uint8 n1, uint8 n2, uint8 n3, LivePGE **pge_out) { + if (pge_out) { + *pge_out = pge; + } + if (pge->collision_slot != 0xFF) { + CollisionSlot *cs = _col_slotsTable[pge->collision_slot]; + while (cs) { + LivePGE *col_pge = cs->live_pge; + if (pge_out) { + *pge_out = col_pge; + } + if (col_pge->init_PGE->object_type == n1 || + col_pge->init_PGE->object_type == n2 || + col_pge->init_PGE->object_type == n3) { + return col_pge->init_PGE->colliding_icon_num; + } else { + cs = cs->prev_slot; + } + } + } + return 0; +} + +int16 Game::col_detectHit(LivePGE *pge, int16 arg2, int16 arg4, col_Callback1 callback1, col_Callback2 callback2, int16 argA, int16 argC) { + debug(DBG_COL, "col_detectHit()"); + int16 pos_dx, pos_dy, var8, varA; + int16 collision_score = 0; + int8 pge_room = pge->room_location; + if (pge_room < 0 || pge_room >= 0x40) { + return 0; + } + int16 thr = pge->init_PGE->counter_values[0]; + if (thr > 0) { + pos_dx = -1; + pos_dy = -1; + } else { + pos_dx = 1; + pos_dy = 1; + thr = -thr; + } + if (_pge_currentPiegeFacingDir) { + pos_dx = -pos_dx; + } + int16 grid_pos_x = (pge->pos_x + 8) >> 4; + int16 grid_pos_y = (pge->pos_y / 72); + if (grid_pos_y >= 0 && grid_pos_y <= 2) { + grid_pos_y *= 16; + collision_score = 0; + var8 = 0; + varA = 0; + if (argA != 0) { + var8 = pos_dy; + grid_pos_x += pos_dx; + varA = 1; + } + while (varA <= thr) { + if (grid_pos_x < 0) { + pge_room = _res._ctData[CT_LEFT_ROOM + pge_room]; + if (pge_room < 0) break; + grid_pos_x += 16; + } + if (grid_pos_x >= 16) { + pge_room = _res._ctData[CT_RIGHT_ROOM + pge_room]; + if (pge_room < 0) break; + grid_pos_x -= 16; + } + int16 slot = col_findSlot(grid_pos_y + grid_pos_x + pge_room * 64); + if (slot >= 0) { + CollisionSlot *cs = _col_slotsTable[slot]; + while (cs) { + collision_score += (this->*callback1)(cs->live_pge, pge, arg2, arg4); + cs = cs->prev_slot; + } + } + if ((this->*callback2)(pge, var8, varA, arg2) != 0) { + break; + } + grid_pos_x += pos_dx; + ++varA; + var8 += pos_dy; + } + } + if (argC == -1) { + return collision_score; + } else { + return 0; + } +} + +int Game::col_detectHitCallback1(LivePGE *pge, int16 dy, int16 unk1, int16 unk2) { + if (col_getGridData(pge, 1, dy) != 0) { + return 1; + } else { + return 0; + } +} + +int Game::col_detectHitCallback6(LivePGE *pge, int16 dy, int16 unk1, int16 unk2) { + return 0; +} + +int Game::col_detectHitCallback2(LivePGE *pge1, LivePGE *pge2, int16 unk1, int16 unk2) { + if (pge1 != pge2 && (pge1->flags & 4)) { + if (pge1->init_PGE->object_type == unk2) { + if ((pge1->flags & 1) == (pge2->flags & 1)) { + if (col_detectHitCallbackHelper(pge1, unk1) == 0) { + return 1; + } + } + } + } + return 0; +} + +int Game::col_detectHitCallback3(LivePGE *pge1, LivePGE *pge2, int16 unk1, int16 unk2) { + if (pge1 != pge2 && (pge1->flags & 4)) { + if (pge1->init_PGE->object_type == unk2) { + if ((pge1->flags & 1) != (pge2->flags & 1)) { + if (col_detectHitCallbackHelper(pge1, unk1) == 0) { + return 1; + } + } + } + } + return 0; +} + +int Game::col_detectHitCallback4(LivePGE *pge1, LivePGE *pge2, int16 unk1, int16 unk2) { + if (pge1 != pge2 && (pge1->flags & 4)) { + if (pge1->init_PGE->object_type == unk2) { + if ((pge1->flags & 1) != (pge2->flags & 1)) { + if (col_detectHitCallbackHelper(pge1, unk1) == 0) { + pge_updateGroup(pge2->index, pge1->index, unk1); + return 1; + } + } + } + } + return 0; +} + +int Game::col_detectHitCallback5(LivePGE *pge1, LivePGE *pge2, int16 unk1, int16 unk2) { + if (pge1 != pge2 && (pge1->flags & 4)) { + if (pge1->init_PGE->object_type == unk2) { + if ((pge1->flags & 1) == (pge2->flags & 1)) { + if (col_detectHitCallbackHelper(pge1, unk1) == 0) { + pge_updateGroup(pge2->index, pge1->index, unk1); + return 1; + } + } + } + } + return 0; +} + +int Game::col_detectHitCallbackHelper(LivePGE *pge, int16 groupId) { + InitPGE *init_pge = pge->init_PGE; + assert(init_pge->obj_node_number < _res._numObjectNodes); + ObjectNode *on = _res._objectNodesMap[init_pge->obj_node_number]; + Object *obj = &on->objects[pge->first_obj_number]; + int i = pge->first_obj_number; + while (pge->obj_type == obj->type && on->last_obj_number > i) { + if (obj->opcode2 == 0x6B) { // pge_op_isInGroupSlice + if (obj->opcode_arg2 == 0) { + if (groupId == 1 || groupId == 2) return 0xFFFF; + } + if (obj->opcode_arg2 == 1) { + if (groupId == 3 || groupId == 4) return 0xFFFF; + } + } else if (obj->opcode2 == 0x22) { // pge_op_isInGroup + if (obj->opcode_arg2 == groupId) return 0xFFFF; + } + + if (obj->opcode1 == 0x6B) { // pge_op_isInGroupSlice + if (obj->opcode_arg1 == 0) { + if (groupId == 1 || groupId == 2) return 0xFFFF; + } + if (obj->opcode_arg1 == 1) { + if (groupId == 3 || groupId == 4) return 0xFFFF; + } + } else if (obj->opcode1 == 0x22) { // pge_op_isInGroup + if (obj->opcode_arg1 == groupId) return 0xFFFF; + } + ++obj; + ++i; + } + return 0; +} + +int Game::col_detectGunHitCallback1(LivePGE *pge, int16 arg2, int16 arg4, int16 arg6) { + int16 _ax = col_getGridData(pge, 1, arg2); + if (_ax != 0) { + if (!(_ax & 2) || (arg6 != 1)) { + return _ax; + } + } + return 0; +} + +int Game::col_detectGunHitCallback2(LivePGE *pge1, LivePGE *pge2, int16 arg4, int16) { + if (pge1 != pge2 && (pge1->flags & 4)) { + if (pge1->init_PGE->object_type == 1 || pge1->init_PGE->object_type == 10) { + uint8 id; + if ((pge1->flags & 1) != (pge2->flags & 1)) { + id = 4; + if (arg4 == 0) { + id = 3; + } + } else { + id = 2; + if (arg4 == 0) { + id = 1; + } + } + if (col_detectHitCallbackHelper(pge1, id) != 0) { + pge_updateGroup(pge2->index, pge1->index, id); + return 1; + } + } + } + return 0; +} + +int Game::col_detectGunHitCallback3(LivePGE *pge1, LivePGE *pge2, int16 arg4, int16) { + if (pge1 != pge2 && (pge1->flags & 4)) { + if (pge1->init_PGE->object_type == 1 || pge1->init_PGE->object_type == 12 || pge1->init_PGE->object_type == 10) { + uint8 id; + if ((pge1->flags & 1) != (pge2->flags & 1)) { + id = 4; + if (arg4 == 0) { + id = 3; + } + } else { + id = 2; + if (arg4 == 0) { + id = 1; + } + } + if (col_detectHitCallbackHelper(pge1, id) != 0) { + pge_updateGroup(pge2->index, pge1->index, id); + return 1; + } + + } + } + return 0; +} + +int Game::col_detectGunHit(LivePGE *pge, int16 arg2, int16 arg4, col_Callback1 callback1, col_Callback2 callback2, int16 argA, int16 argC) { + int8 pge_room = pge->room_location; + if (pge_room < 0 || pge_room >= 0x40) return 0; + int16 thr, pos_dx, pos_dy; + if (argC == -1) { + thr = pge->init_PGE->counter_values[0]; + } else { + thr = pge->init_PGE->counter_values[3]; + } + if (thr > 0) { + pos_dx = -1; + pos_dy = -1; + } else { + pos_dx = 1; + pos_dy = 1; + thr = -thr; + } + if (_pge_currentPiegeFacingDir) { + pos_dx = -pos_dx; + } + int16 grid_pos_x = (pge->pos_x + 8) >> 4; + int16 grid_pos_y = (pge->pos_y - 8) / 72; + if (grid_pos_y >= 0 && grid_pos_y <= 2) { + grid_pos_y *= 16; + int16 var8 = 0; + int16 varA = 0; + if (argA != 0) { + var8 = pos_dy; + grid_pos_x += pos_dx; + varA = 1; + } + while (varA <= thr) { + if (grid_pos_x < 0) { + pge_room = _res._ctData[CT_LEFT_ROOM + pge_room]; + if (pge_room < 0) return 0; + grid_pos_x += 0x10; + } + if (grid_pos_x >= 0x10) { + pge_room = _res._ctData[CT_RIGHT_ROOM + pge_room]; + if (pge_room < 0) return 0; + grid_pos_x -= 0x10; + } + int16 slot = col_findSlot(pge_room * 64 + grid_pos_x + grid_pos_y); + if (slot >= 0) { + CollisionSlot *cs = _col_slotsTable[slot]; + while (cs) { + int r = (this->*callback1)(cs->live_pge, pge, arg2, arg4); + if (r != 0) return r; + cs = cs->prev_slot; + } + } + if ((this->*callback2)(pge, var8, varA, arg2) != 0) { + break; + } + grid_pos_x += pos_dx; + ++varA; + var8 += pos_dy; + } + } + return 0; +} diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/cutscene.cpp b/project/jni/application/REminiscence/REminiscence-0.1.9/cutscene.cpp new file mode 100644 index 000000000..e8085a7ff --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/cutscene.cpp @@ -0,0 +1,1028 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "mod_player.h" +#include "resource.h" +#include "systemstub.h" +#include "video.h" +#include "cutscene.h" + + +Cutscene::Cutscene(ModPlayer *ply, Resource *res, SystemStub *stub, Video *vid, Version ver) + : _ply(ply), _res(res), _stub(stub), _vid(vid), _ver(ver) { + memset(_palBuf, 0, sizeof(_palBuf)); +} + +void Cutscene::sync() { + // XXX input handling + if (!(_stub->_pi.dbgMask & PlayerInput::DF_FASTMODE)) { + int32 delay = _stub->getTimeStamp() - _tstamp; + int32 pause = _frameDelay * TIMER_SLICE - delay; + if (pause > 0) { + _stub->sleep(pause); + } + } + _tstamp = _stub->getTimeStamp(); +} + +void Cutscene::copyPalette(const uint8 *pal, uint16 num) { + uint8 *dst = (uint8 *)_palBuf; + if (num != 0) { + dst += 0x20; + } + memcpy(dst, pal, 0x20); + _newPal = true; +} + +void Cutscene::updatePalette() { + if (_newPal) { + const uint8 *p = _palBuf; + for (int i = 0; i < 32; ++i) { + uint16 color = READ_BE_UINT16(p); p += 2; + uint8 t = (color == 0) ? 0 : 3; + Color c; + c.r = ((color & 0xF00) >> 6) | t; + c.g = ((color & 0x0F0) >> 2) | t; + c.b = ((color & 0x00F) << 2) | t; + _stub->setPaletteEntry(0xC0 + i, &c); + } + _newPal = false; + } +} + +void Cutscene::setPalette() { + sync(); + updatePalette(); + SWAP(_page0, _page1); + _stub->copyRect(0, 0, Video::GAMESCREEN_W, Video::GAMESCREEN_H, _page0, 256); + _stub->updateScreen(0); +} + +void Cutscene::initRotationData(uint16 a, uint16 b, uint16 c) { + int16 n1 = _sinTable[a]; + int16 n2 = _cosTable[a]; + int16 n3 = _sinTable[c]; + int16 n4 = _cosTable[c]; + int16 n5 = _sinTable[b]; + int16 n6 = _cosTable[b]; + _rotData[0] = ((n2 * n6) >> 8) - ((((n4 * n1) >> 8) * n5) >> 8); + _rotData[1] = ((n1 * n6) >> 8) + ((((n4 * n2) >> 8) * n5) >> 8); + _rotData[2] = ( n3 * n1) >> 8; + _rotData[3] = (-n3 * n2) >> 8; +} + +uint16 Cutscene::findTextSeparators(const uint8 *p) { + uint8 *q = _textSep; + uint16 ret = 0; + uint16 pos = 0; + for (; *p != 0xA; ++p) { + if (*p == 0x7C) { + *q++ = pos; + if (pos > ret) { + ret = pos; + } + pos = 0; + } else { + ++pos; + } + } + *q++ = pos; + if (pos > ret) { + ret = pos; + } + *q++ = 0; + return ret; +} + +void Cutscene::drawText(int16 x, int16 y, const uint8 *p, uint16 color, uint8 *page, uint8 n) { + debug(DBG_CUT, "Cutscene::drawText(x=%d, y=%d, c=%d)", x, y, color); + uint16 last_sep = 0; + if (n != 0) { + last_sep = findTextSeparators(p); + if (n != 2) { + last_sep = 30; + } + } + const uint8 *sep = _textSep; + y += 50; + x += 8; + int16 yy = y; + int16 xx = x; + if (n != 0) { + xx += ((last_sep - *sep++) & 0xFE) * 4; + } + for (; *p != 0xA; ++p) { + if (*p == 0x7C) { + yy += 8; + xx = x; + if (n != 0) { + xx += ((last_sep - *sep++) & 0xFE) * 4; + } + } else if (*p == 0x20) { + xx += 8; + } else { + uint8 *dst_char = page + 256 * yy + xx; + const uint8 *src = _res->_fnt + (*p - 32) * 32; + for (int h = 0; h < 8; ++h) { + for (int w = 0; w < 4; ++w) { + uint8 c1 = (*src & 0xF0) >> 4; + uint8 c2 = (*src & 0x0F) >> 0; + ++src; + if (c1 != 0) { + *dst_char = (c1 == 0xF) ? color : (0xE0 + c1); + } + ++dst_char; + if (c2 != 0) { + *dst_char = (c2 == 0xF) ? color : (0xE0 + c2); + } + ++dst_char; + } + dst_char += 256 - 8; + } + xx += 8; + } + } +} + +void Cutscene::swapLayers() { + if (_clearScreen == 0) { + memcpy(_page1, _pageC, Video::GAMESCREEN_W * Video::GAMESCREEN_H); + } else { + memset(_page1, 0xC0, Video::GAMESCREEN_W * Video::GAMESCREEN_H); + } +} + +void Cutscene::drawCreditsText() { + if (_creditsSequence) { + if (_textUnk2 != 0) { + if (_varText == 0) { + _textUnk2 = 0; + } else { + return; + } + } + if (_creditsTextCounter <= 0) { // XXX + uint8 code = *_textCurPtr; + if (code == 0xFF) { + _textBuf[0] = 0xA; +// _cut_status = 0; + } else if (code == 0xFE) { + ++_textCurPtr; + code = *_textCurPtr++; + _creditsTextCounter = code; + } else if (code == 1) { + ++_textCurPtr; + _creditsTextPosX = *_textCurPtr++; + _creditsTextPosY = *_textCurPtr++; + } else if (code == 0) { + _textCurBuf = _textBuf; + _textBuf[0] = 0xA; + ++_textCurPtr; + if (_varText != 0) { + _textUnk2 = 0xFF; + } + } else { + *_textCurBuf++ = code; + _textCurBuf = _textCurBuf; + *_textCurBuf = 0xA; + ++_textCurPtr; + } + } else { + _creditsTextCounter -= 10; // XXX adjust + } + drawText((_creditsTextPosX - 1) * 8, _creditsTextPosY * 8, _textBuf, 0xEF, _page1, 0); + } +} + +void Cutscene::drawProtectionShape(uint8 shapeNum, int16 zoom) { + debug(DBG_CUT, "Cutscene::drawProtectionShape() shapeNum = %d", shapeNum); + _shape_ix = 64; + _shape_iy = 64; + _shape_count = 0; + + int16 x = 0; + int16 y = 0; + zoom += 512; + initRotationData(0, 180, 90); + + const uint8 *shapeOffsetTable = _protectionShapeData + READ_BE_UINT16(_protectionShapeData + 0x02); + const uint8 *shapeDataTable = _protectionShapeData + READ_BE_UINT16(_protectionShapeData + 0x0E); + const uint8 *verticesOffsetTable = _protectionShapeData + READ_BE_UINT16(_protectionShapeData + 0x0A); + const uint8 *verticesDataTable = _protectionShapeData + READ_BE_UINT16(_protectionShapeData + 0x12); + + ++shapeNum; + const uint8 *shapeData = shapeDataTable + READ_BE_UINT16(shapeOffsetTable + (shapeNum & 0x7FF) * 2); + uint16 primitiveCount = READ_BE_UINT16(shapeData); shapeData += 2; + + while (primitiveCount--) { + uint16 verticesOffset = READ_BE_UINT16(shapeData); shapeData += 2; + const uint8 *p = verticesDataTable + READ_BE_UINT16(verticesOffsetTable + (verticesOffset & 0x3FFF) * 2); + int16 dx = 0; + int16 dy = 0; + if (verticesOffset & 0x8000) { + dx = READ_BE_UINT16(shapeData); shapeData += 2; + dy = READ_BE_UINT16(shapeData); shapeData += 2; + } + _hasAlphaColor = (verticesOffset & 0x4000) != 0; + _primitiveColor = 0xC0 + *shapeData++; + drawShapeScaleRotate(p, zoom, dx, dy, x, y, 0, 0); + ++_shape_count; + } +} + +void Cutscene::op_markCurPos() { + debug(DBG_CUT, "Cutscene::op_markCurPos()"); + _cmdPtrBak = _cmdPtr; + drawCreditsText(); + _frameDelay = 5; + setPalette(); + swapLayers(); + _varText = 0; +} + +void Cutscene::op_refreshScreen() { + debug(DBG_CUT, "Cutscene::op_refreshScreen()"); + _clearScreen = fetchNextCmdByte(); + if (_clearScreen != 0) { + swapLayers(); + _varText = 0; + } +} + +void Cutscene::op_waitForSync() { + debug(DBG_CUT, "Cutscene::op_waitForSync()"); + if (_creditsSequence) { + uint16 n = fetchNextCmdByte() * 2; + do { + _varText = 0xFF; + _frameDelay = 3; + if (_textBuf == _textCurBuf) { + _creditsTextCounter = 20; + } + memcpy(_page1, _page0, Video::GAMESCREEN_W * Video::GAMESCREEN_H); + drawCreditsText(); + setPalette(); + } while (--n); + swapLayers(); + _varText = 0; + } else { + _frameDelay = fetchNextCmdByte() * 4; + sync(); // XXX handle input + } +} + +void Cutscene::drawShape(const uint8 *data, int16 x, int16 y) { + debug(DBG_CUT, "Cutscene::drawShape()"); + _gfx._layer = _page1; + uint8 numVertices = *data++; + if (numVertices & 0x80) { + Point pt; + pt.x = READ_BE_UINT16(data) + x; data += 2; + pt.y = READ_BE_UINT16(data) + y; data += 2; + uint16 rx = READ_BE_UINT16(data); data += 2; + uint16 ry = READ_BE_UINT16(data); data += 2; + _gfx.drawEllipse(_primitiveColor, _hasAlphaColor, &pt, rx, ry); + } else if (numVertices == 0) { + Point pt; + pt.x = READ_BE_UINT16(data) + x; data += 2; + pt.y = READ_BE_UINT16(data) + y; data += 2; + _gfx.drawPoint(_primitiveColor, &pt); + } else { + Point *pt = _vertices; + int16 ix = READ_BE_UINT16(data); data += 2; + int16 iy = READ_BE_UINT16(data); data += 2; + pt->x = ix + x; + pt->y = iy + y; + ++pt; + int16 n = numVertices - 1; + ++numVertices; + for (; n >= 0; --n) { + int16 dx = (int8)*data++; + int16 dy = (int8)*data++; + if (dy == 0 && n != 0 && *(data + 1) == 0) { + ix += dx; + --numVertices; + } else { + ix += dx; + iy += dy; + pt->x = ix + x; + pt->y = iy + y; + ++pt; + } + } + _gfx.drawPolygon(_primitiveColor, _hasAlphaColor, _vertices, numVertices); + } +} + +void Cutscene::op_drawShape() { + debug(DBG_CUT, "Cutscene::op_drawShape()"); + + int16 x = 0; + int16 y = 0; + uint16 shapeOffset = fetchNextCmdWord(); + if (shapeOffset & 0x8000) { + x = fetchNextCmdWord(); + y = fetchNextCmdWord(); + } + + const uint8 *shapeOffsetTable = _polPtr + READ_BE_UINT16(_polPtr + 0x02); + const uint8 *shapeDataTable = _polPtr + READ_BE_UINT16(_polPtr + 0x0E); + const uint8 *verticesOffsetTable = _polPtr + READ_BE_UINT16(_polPtr + 0x0A); + const uint8 *verticesDataTable = _polPtr + READ_BE_UINT16(_polPtr + 0x12); + + const uint8 *shapeData = shapeDataTable + READ_BE_UINT16(shapeOffsetTable + (shapeOffset & 0x7FF) * 2); + uint16 primitiveCount = READ_BE_UINT16(shapeData); shapeData += 2; + + while (primitiveCount--) { + uint16 verticesOffset = READ_BE_UINT16(shapeData); shapeData += 2; + const uint8 *primitiveVertices = verticesDataTable + READ_BE_UINT16(verticesOffsetTable + (verticesOffset & 0x3FFF) * 2); + int16 dx = 0; + int16 dy = 0; + if (verticesOffset & 0x8000) { + dx = READ_BE_UINT16(shapeData); shapeData += 2; + dy = READ_BE_UINT16(shapeData); shapeData += 2; + } + _hasAlphaColor = (verticesOffset & 0x4000) != 0; + uint8 color = *shapeData++; + if (_clearScreen == 0) { + color += 0x10; + } + _primitiveColor = 0xC0 + color; + drawShape(primitiveVertices, x + dx, y + dy); + } + if (_clearScreen != 0) { + memcpy(_pageC, _page1, Video::GAMESCREEN_W * Video::GAMESCREEN_H); + } +} + +void Cutscene::op_setPalette() { + debug(DBG_CUT, "Cutscene::op_setPalette()"); + uint8 num = fetchNextCmdByte(); + uint8 palNum = fetchNextCmdByte(); + uint16 off = READ_BE_UINT16(_polPtr + 6); + const uint8 *p = _polPtr + off + num * 32; + copyPalette(p, palNum ^ 1); + if (_creditsSequence) { + _palBuf[0x20] = 0x0F; + _palBuf[0x21] = 0xFF; + } +} + +void Cutscene::op_drawStringAtBottom() { + debug(DBG_CUT, "Cutscene::op_drawStringAtBottom()"); + uint16 strId = fetchNextCmdWord(); + if (!_creditsSequence) { + memset(_pageC + 179 * 256, 0xC0, 45 * 256); + memset(_page1 + 179 * 256, 0xC0, 45 * 256); + memset(_page0 + 179 * 256, 0xC0, 45 * 256); + if (strId != 0xFFFF) { + uint16 offset = READ_BE_UINT16(_res->_cine_off + strId * 2); + drawText(0, 129, _res->_cine_txt + offset, 0xEF, _page1, 1); + drawText(0, 129, _res->_cine_txt + offset, 0xEF, _pageC, 1); + } + } +} + +void Cutscene::op_nop() { + debug(DBG_CUT, "Cutscene::op_nop()"); +} + +void Cutscene::op_skip3() { + debug(DBG_CUT, "Cutscene::op_skip3()"); + _cmdPtr += 3; +} + +void Cutscene::op_refreshAll() { + debug(DBG_CUT, "Cutscene::op_refreshAll()"); + _frameDelay = 5; + setPalette(); + swapLayers(); + _varText = 0xFF; + op_handleKeys(); +} + +void Cutscene::drawShapeScale(const uint8 *data, int16 zoom, int16 b, int16 c, int16 d, int16 e, int16 f, int16 g) { + debug(DBG_CUT, "Cutscene::drawShapeScale(%d, %d, %d, %d, %d, %d, %d)", zoom, b, c, d, e, f, g); + _gfx._layer = _page1; + uint8 numVertices = *data++; + if (numVertices & 0x80) { + int16 x, y; + Point *pt = _vertices; + Point pr[2]; + _shape_cur_x = b + READ_BE_UINT16(data); data += 2; + _shape_cur_y = c + READ_BE_UINT16(data); data += 2; + x = READ_BE_UINT16(data); data += 2; + y = READ_BE_UINT16(data); data += 2; + _shape_cur_x16 = 0; + _shape_cur_y16 = 0; + pr[0].x = 0; + pr[0].y = -y; + pr[1].x = -x; + pr[1].y = y; + if (_shape_count == 0) { + f -= ((((_shape_ix - _shape_ox) * zoom) * 128) + 0x8000) >> 16; + g -= ((((_shape_iy - _shape_oy) * zoom) * 128) + 0x8000) >> 16; + pt->x = f; + pt->y = g; + ++pt; + _shape_cur_x16 = f << 16; + _shape_cur_y16 = g << 16; + } else { + _shape_cur_x16 = _shape_prev_x16 + ((_shape_cur_x - _shape_prev_x) * zoom) * 128; + pt->x = (_shape_cur_x16 + 0x8000) >> 16; + _shape_cur_y16 = _shape_prev_y16 + ((_shape_cur_y - _shape_prev_y) * zoom) * 128; + pt->y = (_shape_cur_y16 + 0x8000) >> 16; + ++pt; + } + for (int i = 0; i < 2; ++i) { + _shape_cur_x += pr[i].x; + _shape_cur_x16 += pr[i].x * zoom * 128; + pt->x = (_shape_cur_x16 + 0x8000) >> 16; + _shape_cur_y += pr[i].y; + _shape_cur_y16 += pr[i].y * zoom * 128; + pt->y = (_shape_cur_y16 + 0x8000) >> 16; + ++pt; + } + _shape_prev_x = _shape_cur_x; + _shape_prev_y = _shape_cur_y; + _shape_prev_x16 = _shape_cur_x16; + _shape_prev_y16 = _shape_cur_y16; + Point po; + po.x = _vertices[0].x + d + _shape_ix; + po.y = _vertices[0].y + e + _shape_iy; + int16 rx = _vertices[0].x - _vertices[2].x; + int16 ry = _vertices[0].y - _vertices[1].y; + _gfx.drawEllipse(_primitiveColor, _hasAlphaColor, &po, rx, ry); + } else if (numVertices == 0) { + Point pt; + pt.x = _shape_cur_x = b + READ_BE_UINT16(data); data += 2; + pt.y = _shape_cur_y = c + READ_BE_UINT16(data); data += 2; + if (_shape_count == 0) { + f -= ((((_shape_ix - pt.x) * zoom) * 128) + 0x8000) >> 16; + g -= ((((_shape_iy - pt.y) * zoom) * 128) + 0x8000) >> 16; + pt.x = f + _shape_ix + d; + pt.y = g + _shape_iy + e; + _shape_cur_x16 = f << 16; + _shape_cur_y16 = g << 16; + } else { + _shape_cur_x16 = _shape_prev_x16 + ((pt.x - _shape_prev_x) * zoom) * 128; + _shape_cur_y16 = _shape_prev_y16 + ((pt.y - _shape_prev_y) * zoom) * 128; + pt.x = ((_shape_cur_x16 + 0x8000) >> 16) + _shape_ix + d; + pt.y = ((_shape_cur_y16 + 0x8000) >> 16) + _shape_iy + e; + } + _shape_prev_x = _shape_cur_x; + _shape_prev_y = _shape_cur_y; + _shape_prev_x16 = _shape_cur_x16; + _shape_prev_y16 = _shape_cur_y16; + _gfx.drawPoint(_primitiveColor, &pt); + } else { + Point *pt = _vertices; + int16 ix, iy; + _shape_cur_x = ix = READ_BE_UINT16(data) + b; data += 2; + _shape_cur_y = iy = READ_BE_UINT16(data) + c; data += 2; + if (_shape_count == 0) { + f -= ((((_shape_ix - _shape_ox) * zoom) * 128) + 0x8000) >> 16; + g -= ((((_shape_iy - _shape_oy) * zoom) * 128) + 0x8000) >> 16; + pt->x = f + _shape_ix + d; + pt->y = g + _shape_iy + e; + ++pt; + _shape_cur_x16 = f << 16; + _shape_cur_y16 = g << 16; + } else { + _shape_cur_x16 = _shape_prev_x16 + ((_shape_cur_x - _shape_prev_x) * zoom) * 128; + _shape_cur_y16 = _shape_prev_y16 + ((_shape_cur_y - _shape_prev_y) * zoom) * 128; + pt->x = ix = ((_shape_cur_x16 + 0x8000) >> 16) + _shape_ix + d; + pt->y = iy = ((_shape_cur_y16 + 0x8000) >> 16) + _shape_iy + e; + ++pt; + } + int16 n = numVertices - 1; + ++numVertices; + int16 sx = 0; + for (; n >= 0; --n) { + ix = (int8)(*data++) + sx; + iy = (int8)(*data++); + if (iy == 0 && n != 0 && *(data + 1) == 0) { + sx = ix; + --numVertices; + } else { + sx = 0; + _shape_cur_x += ix; + _shape_cur_y += iy; + _shape_cur_x16 += ix * zoom * 128; + _shape_cur_y16 += iy * zoom * 128; + pt->x = ((_shape_cur_x16 + 0x8000) >> 16) + _shape_ix + d; + pt->y = ((_shape_cur_y16 + 0x8000) >> 16) + _shape_iy + e; + ++pt; + } + } + _shape_prev_x = _shape_cur_x; + _shape_prev_y = _shape_cur_y; + _shape_prev_x16 = _shape_cur_x16; + _shape_prev_y16 = _shape_cur_y16; + _gfx.drawPolygon(_primitiveColor, _hasAlphaColor, _vertices, numVertices); + } +} + +void Cutscene::op_drawShapeScale() { + debug(DBG_CUT, "Cutscene::op_drawShapeScale()"); + + _shape_count = 0; + + int16 x = 0; + int16 y = 0; + uint16 shapeOffset = fetchNextCmdWord(); + if (shapeOffset & 0x8000) { + x = fetchNextCmdWord(); + y = fetchNextCmdWord(); + } + + uint16 zoom = fetchNextCmdWord() + 512; + _shape_ix = fetchNextCmdByte(); + _shape_iy = fetchNextCmdByte(); + + const uint8 *shapeOffsetTable = _polPtr + READ_BE_UINT16(_polPtr + 0x02); + const uint8 *shapeDataTable = _polPtr + READ_BE_UINT16(_polPtr + 0x0E); + const uint8 *verticesOffsetTable = _polPtr + READ_BE_UINT16(_polPtr + 0x0A); + const uint8 *verticesDataTable = _polPtr + READ_BE_UINT16(_polPtr + 0x12); + + const uint8 *shapeData = shapeDataTable + READ_BE_UINT16(shapeOffsetTable + (shapeOffset & 0x7FF) * 2); + uint16 primitiveCount = READ_BE_UINT16(shapeData); shapeData += 2; + + if (primitiveCount != 0) { + uint16 verticesOffset = READ_BE_UINT16(shapeData); + int16 dx = 0; + int16 dy = 0; + if (verticesOffset & 0x8000) { + dx = READ_BE_UINT16(shapeData + 2); + dy = READ_BE_UINT16(shapeData + 4); + } + const uint8 *p = verticesDataTable + READ_BE_UINT16(verticesOffsetTable + (verticesOffset & 0x3FFF) * 2) + 1; + _shape_ox = READ_BE_UINT16(p) + dx; p += 2; + _shape_oy = READ_BE_UINT16(p) + dy; p += 2; + while (primitiveCount--) { + verticesOffset = READ_BE_UINT16(shapeData); shapeData += 2; + p = verticesDataTable + READ_BE_UINT16(verticesOffsetTable + (verticesOffset & 0x3FFF) * 2); + dx = 0; + dy = 0; + if (verticesOffset & 0x8000) { + dx = READ_BE_UINT16(shapeData); shapeData += 2; + dy = READ_BE_UINT16(shapeData); shapeData += 2; + } + _hasAlphaColor = (verticesOffset & 0x4000) != 0; + uint8 color = *shapeData++; + if (_clearScreen == 0) { + color += 0x10; // 2nd pal buf + } + _primitiveColor = 0xC0 + color; + drawShapeScale(p, zoom, dx, dy, x, y, 0, 0); + ++_shape_count; + } + } +} + +void Cutscene::drawShapeScaleRotate(const uint8 *data, int16 zoom, int16 b, int16 c, int16 d, int16 e, int16 f, int16 g) { + debug(DBG_CUT, "Cutscene::drawShapeScaleRotate(%d, %d, %d, %d, %d, %d, %d)", zoom, b, c, d, e, f, g); + _gfx._layer = _page1; + uint8 numVertices = *data++; + if (numVertices & 0x80) { + int16 x, y, ix, iy; + Point pr[2]; + Point *pt = _vertices; + _shape_cur_x = ix = b + READ_BE_UINT16(data); data += 2; + _shape_cur_y = iy = c + READ_BE_UINT16(data); data += 2; + x = READ_BE_UINT16(data); data += 2; + y = READ_BE_UINT16(data); data += 2; + _shape_cur_x16 = _shape_ix - ix; + _shape_cur_y16 = _shape_iy - iy; + _shape_ox = _shape_cur_x = _shape_ix + ((_shape_cur_x16 * _rotData[0] + _shape_cur_y16 * _rotData[1]) >> 8); + _shape_oy = _shape_cur_y = _shape_iy + ((_shape_cur_x16 * _rotData[2] + _shape_cur_y16 * _rotData[3]) >> 8); + pr[0].x = 0; + pr[0].y = -y; + pr[1].x = -x; + pr[1].y = y; + if (_shape_count == 0) { + f -= ((_shape_ix - _shape_cur_x) * zoom * 128 + 0x8000) >> 16; + g -= ((_shape_iy - _shape_cur_y) * zoom * 128 + 0x8000) >> 16; + pt->x = f; + pt->y = g; + ++pt; + _shape_cur_x16 = f << 16; + _shape_cur_y16 = g << 16; + } else { + _shape_cur_x16 = _shape_prev_x16 + (_shape_cur_x - _shape_prev_x) * zoom * 128; + _shape_cur_y16 = _shape_prev_y16 + (_shape_cur_y - _shape_prev_y) * zoom * 128; + pt->x = (_shape_cur_x16 + 0x8000) >> 16; + pt->y = (_shape_cur_y16 + 0x8000) >> 16; + ++pt; + } + for (int i = 0; i < 2; ++i) { + _shape_cur_x += pr[i].x; + _shape_cur_x16 += pr[i].x * zoom * 128; + pt->x = (_shape_cur_x16 + 0x8000) >> 16; + _shape_cur_y += pr[i].y; + _shape_cur_y16 += pr[i].y * zoom * 128; + pt->y = (_shape_cur_y16 + 0x8000) >> 16; + ++pt; + } + _shape_prev_x = _shape_cur_x; + _shape_prev_y = _shape_cur_y; + _shape_prev_x16 = _shape_cur_x16; + _shape_prev_y16 = _shape_cur_y16; + Point po; + po.x = _vertices[0].x + d + _shape_ix; + po.y = _vertices[0].y + e + _shape_iy; + int16 rx = _vertices[0].x - _vertices[2].x; + int16 ry = _vertices[0].y - _vertices[1].y; + _gfx.drawEllipse(_primitiveColor, _hasAlphaColor, &po, rx, ry); + } else if (numVertices == 0) { + Point pt; + pt.x = b + READ_BE_UINT16(data); data += 2; + pt.y = c + READ_BE_UINT16(data); data += 2; + _shape_cur_x16 = _shape_ix - pt.x; + _shape_cur_y16 = _shape_iy - pt.y; + _shape_cur_x = _shape_ix + ((_rotData[0] * _shape_cur_x16 + _rotData[1] * _shape_cur_y16) >> 8); + _shape_cur_y = _shape_iy + ((_rotData[2] * _shape_cur_x16 + _rotData[3] * _shape_cur_y16) >> 8); + if (_shape_count != 0) { + _shape_cur_x16 = _shape_prev_x16 + (_shape_cur_x - _shape_prev_x) * zoom * 128; + pt.x = ((_shape_cur_x16 + 0x8000) >> 16) + _shape_ix + d; + _shape_cur_y16 = _shape_prev_y16 + (_shape_cur_y - _shape_prev_y) * zoom * 128; + pt.y = ((_shape_cur_y16 + 0x8000) >> 16) + _shape_iy + e; + } else { + f -= (((_shape_ix - _shape_cur_x) * zoom * 128) + 0x8000) >> 16; + g -= (((_shape_iy - _shape_cur_y) * zoom * 128) + 0x8000) >> 16; + _shape_cur_x16 = f << 16; + _shape_cur_y16 = g << 16; + pt.x = f + _shape_ix + d; + pt.y = g + _shape_iy + e; + } + _shape_prev_x = _shape_cur_x; + _shape_prev_y = _shape_cur_y; + _shape_prev_x16 = _shape_cur_x16; + _shape_prev_y16 = _shape_cur_y16; + _gfx.drawPoint(_primitiveColor, &pt); + } else { + int16 x, y, a, shape_last_x, shape_last_y; + Point tempVertices[40]; + _shape_cur_x = b + READ_BE_UINT16(data); data += 2; + x = _shape_cur_x; + _shape_cur_y = c + READ_BE_UINT16(data); data += 2; + y = _shape_cur_y; + _shape_cur_x16 = _shape_ix - x; + _shape_cur_y16 = _shape_iy - y; + + a = _shape_ix + ((_rotData[0] * _shape_cur_x16 + _rotData[1] * _shape_cur_y16) >> 8); + if (_shape_count == 0) { + _shape_ox = a; + } + _shape_cur_x = shape_last_x = a; + a = _shape_iy + ((_rotData[2] * _shape_cur_x16 + _rotData[3] * _shape_cur_y16) >> 8); + if (_shape_count == 0) { + _shape_oy = a; + } + _shape_cur_y = shape_last_y = a; + + int16 ix = x; + int16 iy = y; + Point *pt2 = tempVertices; + int16 sx = 0; + for (int16 n = numVertices - 1; n >= 0; --n) { + x = (int8)(*data++) + sx; + y = (int8)(*data++); + if (y == 0 && n != 0 && *(data + 1) == 0) { + sx = x; + --numVertices; + } else { + ix += x; + iy += y; + sx = 0; + _shape_cur_x16 = _shape_ix - ix; + _shape_cur_y16 = _shape_iy - iy; + a = _shape_ix + ((_rotData[0] * _shape_cur_x16 + _rotData[1] * _shape_cur_y16) >> 8); + pt2->x = a - shape_last_x; + shape_last_x = a; + a = _shape_iy + ((_rotData[2] * _shape_cur_x16 + _rotData[3] * _shape_cur_y16) >> 8); + pt2->y = a - shape_last_y; + shape_last_y = a; + ++pt2; + } + } + Point *pt = _vertices; + if (_shape_count == 0) { + ix = _shape_ox; + iy = _shape_oy; + f -= (((_shape_ix - ix) * zoom * 128) + 0x8000) >> 16; + g -= (((_shape_iy - iy) * zoom * 128) + 0x8000) >> 16; + pt->x = f + _shape_ix + d; + pt->y = g + _shape_iy + e; + ++pt; + _shape_cur_x16 = f << 16; + _shape_cur_y16 = g << 16; + } else { + _shape_cur_x16 = _shape_prev_x16 + ((_shape_cur_x - _shape_prev_x) * zoom * 128); + pt->x = _shape_ix + d + ((_shape_cur_x16 + 0x8000) >> 16); + _shape_cur_y16 = _shape_prev_y16 + ((_shape_cur_y - _shape_prev_y) * zoom * 128); + pt->y = _shape_iy + e + ((_shape_cur_y16 + 0x8000) >> 16); + ++pt; + } + for (int i = 0; i < numVertices; ++i) { + _shape_cur_x += tempVertices[i].x; + _shape_cur_x16 += tempVertices[i].x * zoom * 128; + pt->x = d + _shape_ix + ((_shape_cur_x16 + 0x8000) >> 16); + _shape_cur_y += tempVertices[i].y; + _shape_cur_y16 += tempVertices[i].y * zoom * 128; + pt->y = e + _shape_iy + ((_shape_cur_y16 + 0x8000) >> 16); + ++pt; + } + _shape_prev_x = _shape_cur_x; + _shape_prev_y = _shape_cur_y; + _shape_prev_x16 = _shape_cur_x16; + _shape_prev_y16 = _shape_cur_y16; + _gfx.drawPolygon(_primitiveColor, _hasAlphaColor, _vertices, numVertices + 1); + } +} + +void Cutscene::op_drawShapeScaleRotate() { + debug(DBG_CUT, "Cutscene::op_drawShapeScaleRotate()"); + + _shape_count = 0; + + int16 x = 0; + int16 y = 0; + uint16 shapeOffset = fetchNextCmdWord(); + if (shapeOffset & 0x8000) { + x = fetchNextCmdWord(); + y = fetchNextCmdWord(); + } + + uint16 zoom = 512; + if (shapeOffset & 0x4000) { + zoom += fetchNextCmdWord(); + } + _shape_ix = fetchNextCmdByte(); + _shape_iy = fetchNextCmdByte(); + + uint16 r1, r2, r3; + r1 = fetchNextCmdWord(); + r2 = 180; + if (shapeOffset & 0x2000) { + r2 = fetchNextCmdWord(); + } + r3 = 90; + if (shapeOffset & 0x1000) { + r3 = fetchNextCmdWord(); + } + initRotationData(r1, r2, r3); + + const uint8 *shapeOffsetTable = _polPtr + READ_BE_UINT16(_polPtr + 0x02); + const uint8 *shapeDataTable = _polPtr + READ_BE_UINT16(_polPtr + 0x0E); + const uint8 *verticesOffsetTable = _polPtr + READ_BE_UINT16(_polPtr + 0x0A); + const uint8 *verticesDataTable = _polPtr + READ_BE_UINT16(_polPtr + 0x12); + + const uint8 *shapeData = shapeDataTable + READ_BE_UINT16(shapeOffsetTable + (shapeOffset & 0x7FF) * 2); + uint16 primitiveCount = READ_BE_UINT16(shapeData); shapeData += 2; + + while (primitiveCount--) { + uint16 verticesOffset = READ_BE_UINT16(shapeData); shapeData += 2; + const uint8 *p = verticesDataTable + READ_BE_UINT16(verticesOffsetTable + (verticesOffset & 0x3FFF) * 2); + int16 dx = 0; + int16 dy = 0; + if (verticesOffset & 0x8000) { + dx = READ_BE_UINT16(shapeData); shapeData += 2; + dy = READ_BE_UINT16(shapeData); shapeData += 2; + } + _hasAlphaColor = (verticesOffset & 0x4000) != 0; + uint8 color = *shapeData++; + if (_clearScreen == 0) { + color += 0x10; // 2nd pal buf + } + _primitiveColor = 0xC0 + color; + drawShapeScaleRotate(p, zoom, dx, dy, x, y, 0, 0); + ++_shape_count; + } +} + +void Cutscene::op_drawCreditsText() { + debug(DBG_CUT, "Cutscene::op_drawCreditsText()"); + _varText = 0xFF; + if (_textCurBuf == _textBuf) { + ++_creditsTextCounter; + } + memcpy(_page1, _page0, Video::GAMESCREEN_W * Video::GAMESCREEN_H); + _frameDelay = 10; + setPalette(); +} + +void Cutscene::op_drawStringAtPos() { + debug(DBG_CUT, "Cutscene::op_drawStringAtPos()"); + uint16 strId = fetchNextCmdWord(); + if (strId != 0xFFFF) { + int16 x = (int8)fetchNextCmdByte() * 8; + int16 y = (int8)fetchNextCmdByte() * 8; + if (!_creditsSequence) { + uint8 color = 0xD0 + (strId >> 0xC); + uint16 offset = READ_BE_UINT16(_res->_cine_off + (strId & 0xFFF) * 2); + drawText(x, y, _res->_cine_txt + offset, color, _page1, 2); + // workaround for buggy cutscene script + if (_id == 0x34 && (strId & 0xFFF) == 0x45) { + if ((_cmdPtr - _cmdPtrBak) == 0xA) { + _stub->copyRect(0, 0, Video::GAMESCREEN_W, Video::GAMESCREEN_H, _page1, 256); + _stub->updateScreen(0); + } else { + _stub->sleep(15); + } + } + } + } +} + +void Cutscene::op_handleKeys() { + debug(DBG_CUT, "Cutscene::op_handleKeys()"); + while (1) { + uint8 key_mask = fetchNextCmdByte(); + if (key_mask == 0xFF) { + return; + } + bool b = true; + switch (key_mask) { + case 1: + b = (_stub->_pi.dirMask & PlayerInput::DIR_UP) != 0; + break; + case 2: + b = (_stub->_pi.dirMask & PlayerInput::DIR_DOWN) != 0; + break; + case 4: + b = (_stub->_pi.dirMask & PlayerInput::DIR_LEFT) != 0; + break; + case 8: + b = (_stub->_pi.dirMask & PlayerInput::DIR_RIGHT) != 0; + break; + case 0x80: + b = _stub->_pi.space || _stub->_pi.enter || _stub->_pi.shift; + break; + } + if (b) { + break; + } + _cmdPtr += 2; + } + _stub->_pi.dirMask = 0; + _stub->_pi.enter = false; + _stub->_pi.space = false; + _stub->_pi.shift = false; + int16 n = fetchNextCmdWord(); + if (n < 0) { + n = -n - 1; + if (_varKey == 0) { + _stop = true; + return; + } + if (_varKey != n) { + _cmdPtr = _cmdPtrBak; + return; + } + _varKey = 0; + --n; + _cmdPtr = _res->_cmd; + n = READ_BE_UINT16(_cmdPtr + n * 2 + 2); + } + _cmdPtr = _cmdPtrBak = _res->_cmd + n + _startOffset; +} + +uint8 Cutscene::fetchNextCmdByte() { + return *_cmdPtr++; +} + +uint16 Cutscene::fetchNextCmdWord() { + uint16 i = READ_BE_UINT16(_cmdPtr); + _cmdPtr += 2; + return i; +} + +void Cutscene::mainLoop(uint16 offset) { + _frameDelay = 5; + _tstamp = _stub->getTimeStamp(); + + Color c; + c.r = c.g = c.b = 0; + for (int i = 0; i < 0x20; ++i) { + _stub->setPaletteEntry(0xC0 + i, &c); + } + if (_id != 0x4A && !_creditsSequence) { + _ply->play(_musicTable[_id]); + } + _newPal = false; + _hasAlphaColor = false; + uint8 *p = _res->_cmd; + if (offset != 0) { + offset = READ_BE_UINT16(p + (offset + 1) * 2); + } + _startOffset = (READ_BE_UINT16(p) + 1) * 2; + _varKey = 0; + _cmdPtr = _cmdPtrBak = p + _startOffset + offset; + _polPtr = _res->_pol; + debug(DBG_CUT, "_startOffset = %d offset = %d", _startOffset, offset); + + while (!_stub->_pi.quit && !_interrupted && !_stop) { + uint8 op = fetchNextCmdByte(); + debug(DBG_CUT, "Cutscene::play() opcode = 0x%X (%d)", op, (op >> 2)); + if (op & 0x80) { + break; + } + op >>= 2; + if (op >= NUM_OPCODES) { + error("Invalid cutscene opcode = 0x%02X", op); + } + (this->*_opcodeTable[op])(); + _stub->processEvents(); + if (_stub->_pi.backspace) { + _stub->_pi.backspace = false; + _interrupted = true; + } + } + if (_interrupted || _id != 0x0D) { + _ply->stop(); + } +} + +void Cutscene::load(uint16 cutName) { + assert(cutName != 0xFFFF); + const char *name = _namesTable[cutName & 0xFF]; + _res->load(name, Resource::OT_CMD); + _res->load(name, Resource::OT_POL); + _res->load_CINE(); +} + +void Cutscene::prepare() { + _page0 = _vid->_frontLayer; + _page1 = _vid->_tempLayer; + _pageC = _vid->_tempLayer2; + _stub->_pi.dirMask = 0; + _stub->_pi.enter = false; + _stub->_pi.space = false; + _stub->_pi.shift = false; + _interrupted = false; + _stop = false; + _gfx.setClippingRect(8, 50, 240, 128); +} + +void Cutscene::startCredits() { + _textCurPtr = _creditsData; + _textBuf[0] = 0xA; + _textCurBuf = _textBuf; + _creditsSequence = true; +// _cut_status = 1; + _varText = 0; + _textUnk2 = 0; + _creditsTextCounter = 0; + _interrupted = false; + const uint16 *cut_seq = _creditsCutSeq; + while (!_stub->_pi.quit && !_interrupted) { + uint16 cut_id = *cut_seq++; + if (cut_id == 0xFFFF) { + break; + } + prepare(); + uint16 cutName = _offsetsTable[cut_id * 2 + 0]; + uint16 cutOff = _offsetsTable[cut_id * 2 + 1]; + load(cutName); + mainLoop(cutOff); + } + _creditsSequence = false; +} + +void Cutscene::play() { + if (_id != 0xFFFF) { + _textCurBuf = NULL; + debug(DBG_CUT, "Cutscene::play() _id=0x%X", _id); + _creditsSequence = false; + prepare(); + uint16 cutName = _offsetsTable[_id * 2 + 0]; + uint16 cutOff = _offsetsTable[_id * 2 + 1]; + if (cutName != 0xFFFF) { + load(cutName); + mainLoop(cutOff); + if (_id == 0x3D) { + startCredits(); + } + } + _vid->fullRefresh(); + if (_id != 0x3D) { + _id = 0xFFFF; + } + } +} diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/cutscene.h b/project/jni/application/REminiscence/REminiscence-0.1.9/cutscene.h new file mode 100644 index 000000000..2ee3f872d --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/cutscene.h @@ -0,0 +1,138 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __CUTSCENE_H__ +#define __CUTSCENE_H__ + +#include "intern.h" +#include "graphics.h" + +struct ModPlayer; +struct Resource; +struct SystemStub; +struct Video; + +struct Cutscene { + typedef void (Cutscene::*OpcodeStub)(); + + enum { + NUM_OPCODES = 15, + TIMER_SLICE = 15 + }; + + static const OpcodeStub _opcodeTable[]; + static const char *_namesTable[]; + static const uint16 _offsetsTable[]; + static const uint16 _cosTable[]; + static const uint16 _sinTable[]; + static const uint8 _creditsData[]; + static const uint16 _creditsCutSeq[]; + static const uint8 _musicTable[]; + static const uint8 _protectionShapeData[]; + + Graphics _gfx; + ModPlayer *_ply; + Resource *_res; + SystemStub *_stub; + Video *_vid; + Version _ver; + + uint16 _id; + uint16 _deathCutsceneId; + bool _interrupted; + bool _stop; + uint8 *_polPtr; + uint8 *_cmdPtr; + uint8 *_cmdPtrBak; + uint32 _tstamp; + uint8 _frameDelay; + bool _newPal; + uint8 _palBuf[0x20 * 2]; + uint16 _startOffset; + bool _creditsSequence; + uint32 _rotData[4]; + uint8 _primitiveColor; + uint8 _clearScreen; + Point _vertices[0x80]; + bool _hasAlphaColor; + uint8 _varText; + uint8 _varKey; + int16 _shape_ix; + int16 _shape_iy; + int16 _shape_ox; + int16 _shape_oy; + int16 _shape_cur_x; + int16 _shape_cur_y; + int16 _shape_prev_x; + int16 _shape_prev_y; + uint16 _shape_count; + uint32 _shape_cur_x16; + uint32 _shape_cur_y16; + uint32 _shape_prev_x16; + uint32 _shape_prev_y16; + uint8 _textSep[0x14]; + uint8 _textBuf[500]; + const uint8 *_textCurPtr; + uint8 *_textCurBuf; + uint8 _textUnk2; + uint8 _creditsTextPosX; + uint8 _creditsTextPosY; + int16 _creditsTextCounter; + uint8 *_page0, *_page1, *_pageC; + + Cutscene(ModPlayer *player, Resource *res, SystemStub *stub, Video *vid, Version ver); + + void sync(); + void copyPalette(const uint8 *pal, uint16 num); + void updatePalette(); + void setPalette(); + void initRotationData(uint16 a, uint16 b, uint16 c); + uint16 findTextSeparators(const uint8 *p); + void drawText(int16 x, int16 y, const uint8 *p, uint16 color, uint8 *page, uint8 n); + void swapLayers(); + void drawCreditsText(); + void drawProtectionShape(uint8 shapeNum, int16 zoom); + void drawShape(const uint8 *data, int16 x, int16 y); + void drawShapeScale(const uint8 *data, int16 zoom, int16 b, int16 c, int16 d, int16 e, int16 f, int16 g); + void drawShapeScaleRotate(const uint8 *data, int16 zoom, int16 b, int16 c, int16 d, int16 e, int16 f, int16 g); + + void op_markCurPos(); + void op_refreshScreen(); + void op_waitForSync(); + void op_drawShape(); + void op_setPalette(); + void op_drawStringAtBottom(); + void op_nop(); + void op_skip3(); + void op_refreshAll(); + void op_drawShapeScale(); + void op_drawShapeScaleRotate(); + void op_drawCreditsText(); + void op_drawStringAtPos(); + void op_handleKeys(); + + uint8 fetchNextCmdByte(); + uint16 fetchNextCmdWord(); + void mainLoop(uint16 offset); + void load(uint16 cutName); + void prepare(); + void startCredits(); + void play(); +}; + +#endif // __CUTSCENE_H__ diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/file.cpp b/project/jni/application/REminiscence/REminiscence-0.1.9/file.cpp new file mode 100644 index 000000000..fd5ede914 --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/file.cpp @@ -0,0 +1,222 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "zlib.h" +#include "file.h" + + +struct File_impl { + bool _ioErr; + File_impl() : _ioErr(false) {} + virtual bool open(const char *path, const char *mode) = 0; + virtual void close() = 0; + virtual uint32 size() = 0; + virtual void seek(int32 off) = 0; + virtual void read(void *ptr, uint32 len) = 0; + virtual void write(void *ptr, uint32 len) = 0; +}; + +struct stdFile : File_impl { + FILE *_fp; + stdFile() : _fp(0) {} + bool open(const char *path, const char *mode) { + _ioErr = false; + _fp = fopen(path, mode); + return (_fp != 0); + } + void close() { + if (_fp) { + fclose(_fp); + _fp = 0; + } + } + uint32 size() { + uint32 sz = 0; + if (_fp) { + int pos = ftell(_fp); + fseek(_fp, 0, SEEK_END); + sz = ftell(_fp); + fseek(_fp, pos, SEEK_SET); + } + return sz; + } + void seek(int32 off) { + if (_fp) { + fseek(_fp, off, SEEK_SET); + } + } + void read(void *ptr, uint32 len) { + if (_fp) { + uint32 r = fread(ptr, 1, len, _fp); + if (r != len) { + _ioErr = true; + } + } + } + void write(void *ptr, uint32 len) { + if (_fp) { + uint32 r = fwrite(ptr, 1, len, _fp); + if (r != len) { + _ioErr = true; + } + } + } +}; + +struct zlibFile : File_impl { + gzFile _fp; + zlibFile() : _fp(0) {} + bool open(const char *path, const char *mode) { + _ioErr = false; + _fp = gzopen(path, mode); + return (_fp != 0); + } + void close() { + if (_fp) { + gzclose(_fp); + _fp = 0; + } + } + uint32 size() { + uint32 sz = 0; + if (_fp) { + int pos = gztell(_fp); + gzseek(_fp, 0, SEEK_END); + sz = gztell(_fp); + gzseek(_fp, pos, SEEK_SET); + } + return sz; + } + void seek(int32 off) { + if (_fp) { + gzseek(_fp, off, SEEK_SET); + } + } + void read(void *ptr, uint32 len) { + if (_fp) { + uint32 r = gzread(_fp, ptr, len); + if (r != len) { + _ioErr = true; + } + } + } + void write(void *ptr, uint32 len) { + if (_fp) { + uint32 r = gzwrite(_fp, ptr, len); + if (r != len) { + _ioErr = true; + } + } + } +}; + + +File::File(bool gzipped) { + if (gzipped) { + _impl = new zlibFile; + } else { + _impl = new stdFile; + } +} + +File::~File() { + _impl->close(); + delete _impl; +} + +bool File::open(const char *filename, const char *directory, const char *mode) { + _impl->close(); + char buf[512]; + sprintf(buf, "%s/%s", directory, filename); + char *p = buf + strlen(directory) + 1; + string_lower(p); + bool opened = _impl->open(buf, mode); + if (!opened) { // let's try uppercase + string_upper(p); + opened = _impl->open(buf, mode); + } + return opened; +} + +void File::close() { + _impl->close(); +} + +bool File::ioErr() const { + return _impl->_ioErr; +} + +uint32 File::size() { + return _impl->size(); +} + +void File::seek(int32 off) { + _impl->seek(off); +} + +void File::read(void *ptr, uint32 len) { + _impl->read(ptr, len); +} + +uint8 File::readByte() { + uint8 b; + read(&b, 1); + return b; +} + +uint16 File::readUint16LE() { + uint8 lo = readByte(); + uint8 hi = readByte(); + return (hi << 8) | lo; +} + +uint32 File::readUint32LE() { + uint16 lo = readUint16LE(); + uint16 hi = readUint16LE(); + return (hi << 16) | lo; +} + +uint16 File::readUint16BE() { + uint8 hi = readByte(); + uint8 lo = readByte(); + return (hi << 8) | lo; +} + +uint32 File::readUint32BE() { + uint16 hi = readUint16BE(); + uint16 lo = readUint16BE(); + return (hi << 16) | lo; +} + +void File::write(void *ptr, uint32 len) { + _impl->write(ptr, len); +} + +void File::writeByte(uint8 b) { + write(&b, 1); +} + +void File::writeUint16BE(uint16 n) { + writeByte(n >> 8); + writeByte(n & 0xFF); +} + +void File::writeUint32BE(uint32 n) { + writeUint16BE(n >> 16); + writeUint16BE(n & 0xFFFF); +} diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/file.h b/project/jni/application/REminiscence/REminiscence-0.1.9/file.h new file mode 100644 index 000000000..d2940fde1 --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/file.h @@ -0,0 +1,49 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __FILE_H__ +#define __FILE_H__ + +#include "intern.h" + +struct File_impl; + +struct File { + File(bool gzipped = false); + ~File(); + + File_impl *_impl; + + bool open(const char *filename, const char *directory, const char *mode); + void close(); + bool ioErr() const; + uint32 size(); + void seek(int32 off); + void read(void *ptr, uint32 len); + uint8 readByte(); + uint16 readUint16LE(); + uint32 readUint32LE(); + uint16 readUint16BE(); + uint32 readUint32BE(); + void write(void *ptr, uint32 size); + void writeByte(uint8 b); + void writeUint16BE(uint16 n); + void writeUint32BE(uint32 n); +}; + +#endif // __FILE_H__ diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/game.cpp b/project/jni/application/REminiscence/REminiscence-0.1.9/game.cpp new file mode 100644 index 000000000..03da1f4b5 --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/game.cpp @@ -0,0 +1,1600 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include "file.h" +#include "systemstub.h" +#include "unpack.h" +#include "game.h" + + +Game::Game(SystemStub *stub, const char *dataPath, const char *savePath, Version ver) + : _cut(&_modPly, &_res, stub, &_vid, ver), _menu(&_modPly, &_res, stub, &_vid), + _mix(stub), _modPly(&_mix, dataPath), _res(dataPath, ver), _sfxPly(&_mix), _vid(&_res, stub), + _stub(stub), _savePath(savePath) { + _stateSlot = 1; + _inp_demo = 0; + _inp_record = false; + _inp_replay = false; +} + +void Game::run() { + _stub->init("REminiscence", Video::GAMESCREEN_W, Video::GAMESCREEN_H); + + _randSeed = time(0); + _res.load_TEXT(); + _res.load("FB_TXT", Resource::OT_FNT); + +#ifndef BYPASS_PROTECTION + while (!handleProtectionScreen()); + if (_stub->_pi.quit) { + return; + } +#endif + + _mix.init(); + + playCutscene(0x40); + playCutscene(0x0D); + if (!_cut._interrupted) { + playCutscene(0x4A); + } + + _res.load("GLOBAL", Resource::OT_ICN); + _res.load("PERSO", Resource::OT_SPR); + _res.load_SPR_OFF("PERSO", _res._spr1); + _res.load_FIB("GLOBAL"); + + _skillLevel = 1; + _currentLevel = 0; + + while (!_stub->_pi.quit && _menu.handleTitleScreen(_skillLevel, _currentLevel)) { + if (_currentLevel == 7) { + _vid.fadeOut(); + _vid.setTextPalette(); + playCutscene(0x3D); + } else { + _vid.setTextPalette(); + _vid.setPalette0xF(); + _stub->setOverscanColor(0xE0); + mainLoop(); + } + } + + _res.free_TEXT(); + + _mix.free(); + _stub->destroy(); +} + +void Game::resetGameState() { + _animBuffers._states[0] = _animBuffer0State; + _animBuffers._curPos[0] = 0xFF; + _animBuffers._states[1] = _animBuffer1State; + _animBuffers._curPos[1] = 0xFF; + _animBuffers._states[2] = _animBuffer2State; + _animBuffers._curPos[2] = 0xFF; + _animBuffers._states[3] = _animBuffer3State; + _animBuffers._curPos[3] = 0xFF; + _currentRoom = _res._pgeInit[0].init_room; + _cut._deathCutsceneId = 0xFFFF; + _pge_opTempVar2 = 0xFFFF; + _deathCutsceneCounter = 0; + _saveStateCompleted = false; + _loadMap = true; + pge_resetGroups(); + _blinkingConradCounter = 0; + _pge_processOBJ = false; + _pge_opTempVar1 = 0; + _textToDisplay = 0xFFFF; +} + +void Game::mainLoop() { + _vid._unkPalSlot1 = 0; + _vid._unkPalSlot2 = 0; + _score = 0; + _firstBankData = _bankData; + _lastBankData = _bankData + sizeof(_bankData); + loadLevelData(); + resetGameState(); + while (!_stub->_pi.quit) { + playCutscene(); + if (_cut._id == 0x3D) { + showFinalScore(); + break; + } + if (_deathCutsceneCounter) { + --_deathCutsceneCounter; + if (_deathCutsceneCounter == 0) { + playCutscene(_cut._deathCutsceneId); + if (!handleContinueAbort()) { + playCutscene(0x41); + break; + } else { + if (_validSaveState) { + if (!loadGameState(0)) { + break; + } + } else { + loadLevelData(); + resetGameState(); + } + continue; + } + + } + } + memcpy(_vid._frontLayer, _vid._backLayer, Video::GAMESCREEN_W * Video::GAMESCREEN_H); + pge_getInput(); + pge_prepare(); + col_prepareRoomState(); + uint8 oldLevel = _currentLevel; + for (uint16 i = 0; i < _res._pgeNum; ++i) { + LivePGE *pge = _pge_liveTable2[i]; + if (pge) { + _col_currentPiegeGridPosY = (pge->pos_y / 36) & ~1; + _col_currentPiegeGridPosX = (pge->pos_x + 8) >> 4; + pge_process(pge); + } + } + if (oldLevel != _currentLevel) { + changeLevel(); + _pge_opTempVar1 = 0; + continue; + } + if (_loadMap) { + if (_currentRoom == 0xFF) { + _cut._id = 6; + _deathCutsceneCounter = 1; + } else { + _currentRoom = _pgeLive[0].room_location; + loadLevelMap(); + _loadMap = false; + _vid.fullRefresh(); + } + } + prepareAnims(); + drawAnims(); + drawCurrentInventoryItem(); + drawLevelTexts(); + printLevelCode(); + if (_blinkingConradCounter != 0) { + --_blinkingConradCounter; + } + _vid.updateScreen(); + updateTiming(); + drawStoryTexts(); + if (_stub->_pi.backspace) { + _stub->_pi.backspace = false; + handleInventory(); + } + if (_stub->_pi.escape) { + _stub->_pi.escape = false; + if (handleConfigPanel()) { + break; + } + } + inp_handleSpecialKeys(); + } +} + +void Game::updateTiming() { + static uint32 tstamp = 0; + int32 delay = _stub->getTimeStamp() - tstamp; + int32 pause = (_stub->_pi.dbgMask & PlayerInput::DF_FASTMODE) ? 20 : 30; + pause -= delay; + if (pause > 0) { + _stub->sleep(pause); + } + tstamp = _stub->getTimeStamp(); +} + +void Game::playCutscene(int id) { + if (id != -1) { + _cut._id = id; + } + if (_cut._id != 0xFFFF) { + _sfxPly.stop(); + _cut.play(); + } +} + +void Game::inp_handleSpecialKeys() { + if (_stub->_pi.dbgMask & PlayerInput::DF_SETLIFE) { + _pgeLive[0].life = 0x7FFF; + } + if (_stub->_pi.load) { + loadGameState(_stateSlot); + _stub->_pi.load = false; + } + if (_stub->_pi.save) { + saveGameState(_stateSlot); + _stub->_pi.save = false; + } + if (_stub->_pi.stateSlot != 0) { + int8 slot = _stateSlot + _stub->_pi.stateSlot; + if (slot >= 1 && slot < 100) { + _stateSlot = slot; + debug(DBG_INFO, "Current game state slot is %d", _stateSlot); + } + _stub->_pi.stateSlot = 0; + } + if (_stub->_pi.inpRecord || _stub->_pi.inpReplay) { + bool replay = false; + bool record = false; + char demoFile[20]; + makeGameDemoName(demoFile); + if (_inp_demo) { + _inp_demo->close(); + delete _inp_demo; + } + _inp_demo = new File(true); + if (_stub->_pi.inpRecord) { + if (_inp_record) { + debug(DBG_INFO, "Stop recording input keys"); + } else { + if (_inp_demo->open(demoFile, _savePath, "wb")) { + debug(DBG_INFO, "Recording input keys"); + _inp_demo->writeUint32BE('FBDM'); + _inp_demo->writeUint16BE(0); + _inp_demo->writeUint32BE(_randSeed); + record = true; + } else { + warning("Unable to save demo file '%s'", demoFile); + } + } + } + if (_stub->_pi.inpReplay) { + if (_inp_replay) { + debug(DBG_INFO, "Stop replaying input keys"); + } else { + if (_inp_demo->open(demoFile, _savePath, "rb")) { + debug(DBG_INFO, "Replaying input keys"); + _inp_demo->readUint32BE(); + _inp_demo->readUint16BE(); + _randSeed = _inp_demo->readUint32BE(); + replay = true; + } else { + warning("Unable to open demo file '%s'", demoFile); + } + } + } + _inp_record = record; + _inp_replay = replay; + _stub->_pi.inpReplay = false; + _stub->_pi.inpRecord = false; + } +} + +void Game::drawCurrentInventoryItem() { + uint16 src = _pgeLive[0].current_inventory_PGE; + if (src != 0xFF) { + _currentIcon = _res._pgeInit[src].icon_num; + drawIcon(_currentIcon, 232, 8, 0xA); + } +} + +void Game::showFinalScore() { + playCutscene(0x49); + char textBuf[50]; + sprintf(textBuf, "SCORE %08lu", _score); + _vid.drawString(textBuf, (256 - strlen(textBuf) * 8) / 2, 40, 0xE5); + strcpy(textBuf, _menu._passwords[7][_skillLevel]); + _vid.drawString(textBuf, (256 - strlen(textBuf) * 8) / 2, 16, 0xE7); + while (!_stub->_pi.quit) { + _stub->copyRect(0, 0, Video::GAMESCREEN_W, Video::GAMESCREEN_H, _vid._frontLayer, 256); + _stub->updateScreen(0); + _stub->processEvents(); + if (_stub->_pi.enter) { + _stub->_pi.enter = false; + break; + } + _stub->sleep(100); + } +} + +bool Game::handleConfigPanel() { + int i, j; + const int x = 7; + const int y = 10; + const int w = 17; + const int h = 12; + + _vid._charShadowColor = 0xE2; + _vid._charFrontColor = 0xEE; + _vid._charTransparentColor = 0xFF; + + _vid.drawChar(0x81, y, x); + for (i = 1; i < w; ++i) { + _vid.drawChar(0x85, y, x + i); + } + _vid.drawChar(0x82, y, x + w); + for (j = 1; j < h; ++j) { + _vid.drawChar(0x86, y + j, x); + for (i = 1; i < w; ++i) { + _vid._charTransparentColor = 0xE2; + _vid.drawChar(0x20, y + j, x + i); + } + _vid._charTransparentColor = 0xFF; + _vid.drawChar(0x87, y + j, x + w); + } + _vid.drawChar(0x83, y + h, x); + for (i = 1; i < w; ++i) { + _vid.drawChar(0x88, y + h, x + i); + } + _vid.drawChar(0x84, y + h, x + w); + + _menu._charVar3 = 0xE4; + _menu._charVar4 = 0xE5; + _menu._charVar1 = 0xE2; + _menu._charVar2 = 0xEE; + + _vid.fullRefresh(); + enum { MENU_ITEM_LOAD = 1, MENU_ITEM_SAVE = 2, MENU_ITEM_ABORT = 3 }; + uint8 colors[] = { 2, 3, 3, 3 }; + int current = 0; + while (!_stub->_pi.quit) { + _menu.drawString(_res.getMenuString(LocaleData::LI_18_RESUME_GAME), y + 2, 9, colors[0]); + _menu.drawString(_res.getMenuString(LocaleData::LI_20_LOAD_GAME), y + 4, 9, colors[1]); + _menu.drawString(_res.getMenuString(LocaleData::LI_21_SAVE_GAME), y + 6, 9, colors[2]); + _menu.drawString(_res.getMenuString(LocaleData::LI_19_ABORT_GAME), y + 8, 9, colors[3]); + char slotItem[30]; + sprintf(slotItem, "%s : %d-%02d", _res.getMenuString(LocaleData::LI_22_SAVE_SLOT), _currentLevel + 1, _stateSlot); + _menu.drawString(slotItem, y + 10, 9, 1); + + _vid.updateScreen(); + _stub->sleep(80); + inp_update(); + + int prev = current; + if (_stub->_pi.dirMask & PlayerInput::DIR_UP) { + _stub->_pi.dirMask &= ~PlayerInput::DIR_UP; + current = (current + 3) % 4; + } + if (_stub->_pi.dirMask & PlayerInput::DIR_DOWN) { + _stub->_pi.dirMask &= ~PlayerInput::DIR_DOWN; + current = (current + 1) % 4; + } + if (_stub->_pi.dirMask & PlayerInput::DIR_LEFT) { + _stub->_pi.dirMask &= ~PlayerInput::DIR_LEFT; + --_stateSlot; + if (_stateSlot < 1) { + _stateSlot = 1; + } + } + if (_stub->_pi.dirMask & PlayerInput::DIR_RIGHT) { + _stub->_pi.dirMask &= ~PlayerInput::DIR_RIGHT; + ++_stateSlot; + if (_stateSlot > 99) { + _stateSlot = 99; + } + } + if (prev != current) { + SWAP(colors[prev], colors[current]); + } + if (_stub->_pi.enter) { + _stub->_pi.enter = false; + switch (current) { + case MENU_ITEM_LOAD: + _stub->_pi.load = true; + break; + case MENU_ITEM_SAVE: + _stub->_pi.save = true; + break; + } + break; + } + } + _vid.fullRefresh(); + return (current == MENU_ITEM_ABORT); +} + +bool Game::handleContinueAbort() { + playCutscene(0x48); + char textBuf[50]; + int timeout = 100; + int current_color = 0; + uint8 colors[] = { 0xE4, 0xE5 }; + uint8 color_inc = 0xFF; + Color col; + _stub->getPaletteEntry(0xE4, &col); + memcpy(_vid._tempLayer, _vid._frontLayer, Video::GAMESCREEN_W * Video::GAMESCREEN_H); + while (timeout >= 0 && !_stub->_pi.quit) { + const char *str; + str = _res.getMenuString(LocaleData::LI_01_CONTINUE_OR_ABORT); + _vid.drawString(str, (256 - strlen(str) * 8) / 2, 64, 0xE3); + str = _res.getMenuString(LocaleData::LI_02_TIME); + sprintf(textBuf, "%s : %d", str, timeout / 10); + _vid.drawString(textBuf, 96, 88, 0xE3); + str = _res.getMenuString(LocaleData::LI_03_CONTINUE); + _vid.drawString(str, (256 - strlen(str) * 8) / 2, 104, colors[0]); + str = _res.getMenuString(LocaleData::LI_04_ABORT); + _vid.drawString(str, (256 - strlen(str) * 8) / 2, 112, colors[1]); + sprintf(textBuf, "SCORE %08lu", _score); + _vid.drawString(textBuf, 64, 154, 0xE3); + if (_stub->_pi.dirMask & PlayerInput::DIR_UP) { + _stub->_pi.dirMask &= ~PlayerInput::DIR_UP; + if (current_color > 0) { + SWAP(colors[current_color], colors[current_color - 1]); + --current_color; + } + } + if (_stub->_pi.dirMask & PlayerInput::DIR_DOWN) { + _stub->_pi.dirMask &= ~PlayerInput::DIR_DOWN; + if (current_color < 1) { + SWAP(colors[current_color], colors[current_color + 1]); + ++current_color; + } + } + if (_stub->_pi.enter) { + _stub->_pi.enter = false; + return (current_color == 0); + } + _stub->copyRect(0, 0, Video::GAMESCREEN_W, Video::GAMESCREEN_H, _vid._frontLayer, 256); + _stub->updateScreen(0); + if (col.b >= 0x3D) { + color_inc = 0; + } + if (col.b < 2) { + color_inc = 0xFF; + } + if (color_inc == 0xFF) { + col.b += 2; + col.g += 2; + } else { + col.b -= 2; + col.g -= 2; + } + _stub->setPaletteEntry(0xE4, &col); + _stub->processEvents(); + _stub->sleep(100); + --timeout; + memcpy(_vid._frontLayer, _vid._tempLayer, Video::GAMESCREEN_W * Video::GAMESCREEN_H); + } + return false; +} + +bool Game::handleProtectionScreen() { + bool valid = true; + _cut.prepare(); + _cut.copyPalette(_protectionPal, 0); + _cut.updatePalette(); + _cut._gfx.setClippingRect(64, 48, 128, 128); + + _menu._charVar1 = 0xE0; + _menu._charVar2 = 0xEF; + _menu._charVar4 = 0xE5; + _menu._charVar5 = 0xE2; + + int shapeNum = getRandomNumber() % 30; + for (int16 zoom = 2000; zoom != 0; zoom -= 100) { + _cut.drawProtectionShape(shapeNum, zoom); + _stub->copyRect(0, 0, Video::GAMESCREEN_W, Video::GAMESCREEN_H, _vid._tempLayer, 256); + _stub->updateScreen(0); + _stub->sleep(30); + } + int codeNum = getRandomNumber() % 5; + _cut.drawProtectionShape(shapeNum, 1); + _vid.setTextPalette(); + char codeText[7]; + int len = 0; + do { + codeText[len] = '\0'; + memcpy(_vid._frontLayer, _vid._tempLayer, Video::GAMESCREEN_W * Video::GAMESCREEN_H); + _menu.drawString("PROTECTION", 2, 11, 5); + char textBuf[20]; + sprintf(textBuf, "CODE %d : %s", codeNum + 1, codeText); + _menu.drawString(textBuf, 23, 8, 5); + _vid.updateScreen(); + _stub->sleep(50); + _stub->processEvents(); + char c = _stub->_pi.lastChar; + if (c != 0) { + _stub->_pi.lastChar = 0; + if (len < 6) { + if (c >= 'a' && c <= 'z') { + c &= ~0x20; + } + if ((c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9')) { + codeText[len] = c; + ++len; + } + } + } + if (_stub->_pi.backspace) { + _stub->_pi.backspace = false; + if (len > 0) { + --len; + } + } + if (_stub->_pi.enter) { + _stub->_pi.enter = false; + if (len > 0) { + const uint8 *p = _protectionCodeData + shapeNum * 0x1E + codeNum * 6; + for (int i = 0; i < len; ++i) { + uint8 r = 0; + uint8 ch = codeText[i]; + for (int b = 0; b < 8; ++b) { + if (ch & (1 << b)) { + r |= (1 << (7 - b)); + } + } + r ^= 0x55; + if (r != *p++) { + valid = false; + break; + } + } + break; + } + } + } while (!_stub->_pi.quit); + _vid.fadeOut(); + return valid; +} + +void Game::printLevelCode() { + if (_printLevelCodeCounter != 0) { + --_printLevelCodeCounter; + if (_printLevelCodeCounter != 0) { + char levelCode[50]; + sprintf(levelCode, "CODE: %s", _menu._passwords[_currentLevel][_skillLevel]); + _vid.drawString(levelCode, (Video::GAMESCREEN_W - strlen(levelCode) * 8) / 2, 16, 0xE7); + } + } +} + +void Game::printSaveStateCompleted() { + if (_saveStateCompleted) { + const char *str = _res.getMenuString(LocaleData::LI_05_COMPLETED); + _vid.drawString(str, (176 - strlen(str) * 8) / 2, 34, 0xE6); + } +} + +void Game::drawLevelTexts() { + LivePGE *pge = &_pgeLive[0]; + int8 obj = col_findCurrentCollidingObject(pge, 3, 0xFF, 0xFF, &pge); + if (obj == 0) { + obj = col_findCurrentCollidingObject(pge, 0xFF, 5, 9, &pge); + } + if (obj > 0) { + _printLevelCodeCounter = 0; + if (_textToDisplay == 0xFFFF) { + uint8 icon_num = obj - 1; + drawIcon(icon_num, 80, 8, 0xA); + uint8 txt_num = pge->init_PGE->text_num; + const char *str = (const char *)_res._tbn + READ_LE_UINT16(_res._tbn + txt_num * 2); + _vid.drawString(str, (176 - strlen(str) * 8) / 2, 26, 0xE6); + if (icon_num == 2) { + printSaveStateCompleted(); + return; + } + } else { + _currentInventoryIconNum = obj - 1; + } + } + _saveStateCompleted = false; +} + +void Game::drawStoryTexts() { + if (_textToDisplay != 0xFFFF) { + uint16 text_col_mask = 0xE8; + const uint8 *str = _res.getGameString(_textToDisplay); + memcpy(_vid._tempLayer, _vid._frontLayer, Video::GAMESCREEN_W * Video::GAMESCREEN_H); + int textSpeechSegment = 0; + while (!_stub->_pi.quit) { + drawIcon(_currentInventoryIconNum, 80, 8, 0xA); + if (*str == 0xFF) { + text_col_mask = READ_LE_UINT16(str + 1); + str += 3; + } + int16 text_y_pos = 26; + while (1) { + uint16 len = getLineLength(str); + str = (const uint8 *)_vid.drawString((const char *)str, (176 - len * 8) / 2, text_y_pos, text_col_mask); + text_y_pos += 8; + if (*str == 0 || *str == 0xB) { + break; + } + ++str; + } + MixerChunk chunk; + _res.load_VCE(_textToDisplay, textSpeechSegment++, &chunk.data, &chunk.len); + if (chunk.data) { + _mix.play(&chunk, 32000, Mixer::MAX_VOLUME); + } + _vid.updateScreen(); + while (!_stub->_pi.backspace && !_stub->_pi.quit) { + inp_update(); + _stub->sleep(80); + } + if (chunk.data) { + _mix.stopAll(); + } + _stub->_pi.backspace = false; + if (*str == 0) { + break; + } + ++str; + memcpy(_vid._frontLayer, _vid._tempLayer, Video::GAMESCREEN_W * Video::GAMESCREEN_H); + } + _textToDisplay = 0xFFFF; + } +} + +void Game::prepareAnims() { + if (!(_currentRoom & 0x80) && _currentRoom < 0x40) { + int8 pge_room; + LivePGE *pge = _pge_liveTable1[_currentRoom]; + while (pge) { + prepareAnimsHelper(pge, 0, 0); + pge = pge->next_PGE_in_room; + } + pge_room = _res._ctData[CT_UP_ROOM + _currentRoom]; + if (pge_room >= 0 && pge_room < 0x40) { + pge = _pge_liveTable1[pge_room]; + while (pge) { + if ((pge->init_PGE->object_type != 10 && pge->pos_y > 176) || (pge->init_PGE->object_type == 10 && pge->pos_y > 216)) { + prepareAnimsHelper(pge, 0, -216); + } + pge = pge->next_PGE_in_room; + } + } + pge_room = _res._ctData[CT_DOWN_ROOM + _currentRoom]; + if (pge_room >= 0 && pge_room < 0x40) { + pge = _pge_liveTable1[pge_room]; + while (pge) { + if (pge->pos_y < 48) { + prepareAnimsHelper(pge, 0, 216); + } + pge = pge->next_PGE_in_room; + } + } + pge_room = _res._ctData[CT_LEFT_ROOM + _currentRoom]; + if (pge_room >= 0 && pge_room < 0x40) { + pge = _pge_liveTable1[pge_room]; + while (pge) { + if (pge->pos_x > 224) { + prepareAnimsHelper(pge, -256, 0); + } + pge = pge->next_PGE_in_room; + } + } + pge_room = _res._ctData[CT_RIGHT_ROOM + _currentRoom]; + if (pge_room >= 0 && pge_room < 0x40) { + pge = _pge_liveTable1[pge_room]; + while (pge) { + if (pge->pos_x <= 32) { + prepareAnimsHelper(pge, 256, 0); + } + pge = pge->next_PGE_in_room; + } + } + } +} + +void Game::prepareAnimsHelper(LivePGE *pge, int16 dx, int16 dy) { + debug(DBG_GAME, "Game::prepareAnimsHelper() dx=0x%X dy=0x%X pge_num=%d pge->flags=0x%X pge->anim_number=0x%X", dx, dy, pge - &_pgeLive[0], pge->flags, pge->anim_number); + int16 xpos, ypos; + if (!(pge->flags & 8)) { + if (pge->index != 0 && loadMonsterSprites(pge) == 0) { + return; + } + assert(pge->anim_number < 1287); + const uint8 *dataPtr = _res._spr_off[pge->anim_number]; + if (dataPtr == 0) { + return; + } + + if (pge->flags & 2) { + xpos = (int8)dataPtr[0] + dx + pge->pos_x; + uint8 _cl = dataPtr[2]; + if (_cl & 0x40) { + _cl = dataPtr[3]; + } else { + _cl &= 0x3F; + } + xpos -= _cl; + } else { + xpos = dx + pge->pos_x - (int8)dataPtr[0]; + } + + ypos = dy + pge->pos_y - (int8)dataPtr[1] + 2; + if (xpos <= -32 || xpos >= 256 || ypos < -48 || ypos >= 224) { + return; + } + xpos += 8; + dataPtr += 4; + if (pge == &_pgeLive[0]) { + _animBuffers.addState(1, xpos, ypos, dataPtr, pge); + } else if (pge->flags & 0x10) { + _animBuffers.addState(2, xpos, ypos, dataPtr, pge); + } else { + _animBuffers.addState(0, xpos, ypos, dataPtr, pge); + } + } else { + assert(pge->anim_number < _res._numSpc); + const uint8 *dataPtr = _res._spc + READ_BE_UINT16(_res._spc + pge->anim_number * 2); + xpos = dx + pge->pos_x + 8; + ypos = dy + pge->pos_y + 2; + + if (pge->init_PGE->object_type == 11) { + _animBuffers.addState(3, xpos, ypos, dataPtr, pge); + } else if (pge->flags & 0x10) { + _animBuffers.addState(2, xpos, ypos, dataPtr, pge); + } else { + _animBuffers.addState(0, xpos, ypos, dataPtr, pge); + } + } +} + +void Game::drawAnims() { + debug(DBG_GAME, "Game::drawAnims()"); + _eraseBackground = false; + drawAnimBuffer(2, _animBuffer2State); + drawAnimBuffer(1, _animBuffer1State); + drawAnimBuffer(0, _animBuffer0State); + _eraseBackground = true; + drawAnimBuffer(3, _animBuffer3State); +} + +void Game::drawAnimBuffer(uint8 stateNum, AnimBufferState *state) { + debug(DBG_GAME, "Game::drawAnimBuffer() state=%d", stateNum); + assert(stateNum < 4); + _animBuffers._states[stateNum] = state; + uint8 lastPos = _animBuffers._curPos[stateNum]; + if (lastPos != 0xFF) { + uint8 numAnims = lastPos + 1; + state += lastPos; + _animBuffers._curPos[stateNum] = 0xFF; + do { + LivePGE *pge = state->pge; + if (!(pge->flags & 8)) { + if (stateNum == 1 && (_blinkingConradCounter & 1)) { + break; + } + if (!(state->dataPtr[-2] & 0x80)) { + decodeCharacterFrame(state->dataPtr, _res._memBuf); + drawCharacter(_res._memBuf, state->x, state->y, state->dataPtr[-1], state->dataPtr[-2], pge->flags); + } else { + drawCharacter(state->dataPtr, state->x, state->y, state->dataPtr[-1], state->dataPtr[-2], pge->flags); + } + } else { + drawObject(state->dataPtr, state->x, state->y, pge->flags); + } + --state; + } while (--numAnims != 0); + } +} + +void Game::drawObject(const uint8 *dataPtr, int16 x, int16 y, uint8 flags) { + debug(DBG_GAME, "Game::drawObject() dataPtr[]=0x%X dx=%d dy=%d", dataPtr[0], (int8)dataPtr[1], (int8)dataPtr[2]); + assert(dataPtr[0] < 0x4A); + uint8 slot = _res._rp[dataPtr[0]]; + uint8 *data = findBankData(slot); + if (data == 0) { + data = loadBankData(slot); + } + _bankDataPtrs = data; + int16 posy = y - (int8)dataPtr[2]; + int16 posx = x; + if (flags & 2) { + posx += (int8)dataPtr[1]; + } else { + posx -= (int8)dataPtr[1]; + } + int i = dataPtr[5]; + dataPtr += 6; + while (i--) { + drawObjectFrame(dataPtr, posx, posy, flags); + dataPtr += 4; + } +} + +void Game::drawObjectFrame(const uint8 *dataPtr, int16 x, int16 y, uint8 flags) { + debug(DBG_GAME, "Game::drawObjectFrame(0x%X, %d, %d, 0x%X)", dataPtr, x, y, flags); + const uint8 *src = _bankDataPtrs + dataPtr[0] * 32; + + int16 sprite_y = y + dataPtr[2]; + int16 sprite_x; + if (flags & 2) { + sprite_x = x - dataPtr[1] - (((dataPtr[3] & 0xC) + 4) * 2); + } else { + sprite_x = x + dataPtr[1]; + } + + uint8 sprite_flags = dataPtr[3]; + if (flags & 2) { + sprite_flags ^= 0x10; + } + + uint8 sprite_h = (((sprite_flags >> 0) & 3) + 1) * 8; + uint8 sprite_w = (((sprite_flags >> 2) & 3) + 1) * 8; + + int size = sprite_w * sprite_h / 2; + for (int i = 0; i < size; ++i) { + uint8 col = *src++; + _res._memBuf[i * 2 + 0] = (col & 0xF0) >> 4; + _res._memBuf[i * 2 + 1] = (col & 0x0F) >> 0; + } + + src = _res._memBuf; + bool sprite_mirror_x = false; + int16 sprite_clipped_w; + if (sprite_x >= 0) { + sprite_clipped_w = sprite_x + sprite_w; + if (sprite_clipped_w < 256) { + sprite_clipped_w = sprite_w; + } else { + sprite_clipped_w = 256 - sprite_x; + if (sprite_flags & 0x10) { + sprite_mirror_x = true; + src += sprite_w - 1; + } + } + } else { + sprite_clipped_w = sprite_x + sprite_w; + if (!(sprite_flags & 0x10)) { + src -= sprite_x; + sprite_x = 0; + } else { + sprite_mirror_x = true; + src += sprite_x + sprite_w - 1; + sprite_x = 0; + } + } + if (sprite_clipped_w <= 0) { + return; + } + + int16 sprite_clipped_h; + if (sprite_y >= 0) { + sprite_clipped_h = 224 - sprite_h; + if (sprite_y < sprite_clipped_h) { + sprite_clipped_h = sprite_h; + } else { + sprite_clipped_h = 224 - sprite_y; + } + } else { + sprite_clipped_h = sprite_h + sprite_y; + src -= sprite_w * sprite_y; + sprite_y = 0; + } + if (sprite_clipped_h <= 0) { + return; + } + + if (!sprite_mirror_x && (sprite_flags & 0x10)) { + src += sprite_w - 1; + } + + uint32 dst_offset = 256 * sprite_y + sprite_x; + uint8 sprite_col_mask = (flags & 0x60) >> 1; + + if (_eraseBackground) { + if (!(sprite_flags & 0x10)) { + _vid.drawSpriteSub1(src, _vid._frontLayer + dst_offset, sprite_w, sprite_clipped_h, sprite_clipped_w, sprite_col_mask); + } else { + _vid.drawSpriteSub2(src, _vid._frontLayer + dst_offset, sprite_w, sprite_clipped_h, sprite_clipped_w, sprite_col_mask); + } + } else { + if (!(sprite_flags & 0x10)) { + _vid.drawSpriteSub3(src, _vid._frontLayer + dst_offset, sprite_w, sprite_clipped_h, sprite_clipped_w, sprite_col_mask); + } else { + _vid.drawSpriteSub4(src, _vid._frontLayer + dst_offset, sprite_w, sprite_clipped_h, sprite_clipped_w, sprite_col_mask); + } + } + _vid.markBlockAsDirty(sprite_x, sprite_y, sprite_clipped_w, sprite_clipped_h); +} + +void Game::decodeCharacterFrame(const uint8 *dataPtr, uint8 *dstPtr) { + int n = READ_BE_UINT16(dataPtr); dataPtr += 2; + uint16 len = n * 2; + uint8 *dst = dstPtr + 0x400; + while (n--) { + uint8 c = *dataPtr++; + dst[0] = (c & 0xF0) >> 4; + dst[1] = (c & 0x0F) >> 0; + dst += 2; + } + dst = dstPtr; + const uint8 *src = dstPtr + 0x400; + do { + uint8 c1 = *src++; + if (c1 == 0xF) { + uint8 c2 = *src++; + uint16 c3 = *src++; + if (c2 == 0xF) { + c1 = *src++; + c2 = *src++; + c3 = (c3 << 4) | c1; + len -= 2; + } + memset(dst, c2, c3 + 4); + dst += c3 + 4; + len -= 3; + } else { + *dst++ = c1; + --len; + } + } while (len != 0); +} + + +void Game::drawCharacter(const uint8 *dataPtr, int16 pos_x, int16 pos_y, uint8 a, uint8 b, uint8 flags) { + debug(DBG_GAME, "Game::drawCharacter(0x%X, %d, %d, 0x%X, 0x%X, 0x%X)", dataPtr, pos_x, pos_y, a, b, flags); + + bool var16 = false; // sprite_mirror_y + if (b & 0x40) { + b &= 0xBF; + SWAP(a, b); + var16 = true; + } + uint16 sprite_h = a; + uint16 sprite_w = b; + + const uint8 *src = dataPtr; + bool var14 = false; + + int16 sprite_clipped_w; + if (pos_x >= 0) { + if (pos_x + sprite_w < 256) { + sprite_clipped_w = sprite_w; + } else { + sprite_clipped_w = 256 - pos_x; + if (flags & 2) { + var14 = true; + if (var16) { + src += (sprite_w - 1) * sprite_h; + } else { + src += sprite_w - 1; + } + } + } + } else { + sprite_clipped_w = pos_x + sprite_w; + if (!(flags & 2)) { + if (var16) { + src -= sprite_h * pos_x; + pos_x = 0; + } else { + src -= pos_x; + pos_x = 0; + } + } else { + var14 = true; + if (var16) { + src += sprite_h * (pos_x + sprite_w - 1); + pos_x = 0; + } else { + src += pos_x + sprite_w - 1; + var14 = true; + pos_x = 0; + } + } + } + if (sprite_clipped_w <= 0) { + return; + } + + int16 sprite_clipped_h; + if (pos_y >= 0) { + if (pos_y < 224 - sprite_h) { + sprite_clipped_h = sprite_h; + } else { + sprite_clipped_h = 224 - pos_y; + } + } else { + sprite_clipped_h = sprite_h + pos_y; + if (var16) { + src -= pos_y; + } else { + src -= sprite_w * pos_y; + } + pos_y = 0; + } + if (sprite_clipped_h <= 0) { + return; + } + + if (!var14 && (flags & 2)) { + if (var16) { + src += sprite_h * (sprite_w - 1); + } else { + src += sprite_w - 1; + } + } + + uint32 dst_offset = 256 * pos_y + pos_x; + uint8 sprite_col_mask = ((flags & 0x60) == 0x60) ? 0x50 : 0x40; + + debug(DBG_GAME, "dst_offset=0x%X src_offset=0x%X", dst_offset, src - dataPtr); + + if (!(flags & 2)) { + if (var16) { + _vid.drawSpriteSub5(src, _vid._frontLayer + dst_offset, sprite_h, sprite_clipped_h, sprite_clipped_w, sprite_col_mask); + } else { + _vid.drawSpriteSub3(src, _vid._frontLayer + dst_offset, sprite_w, sprite_clipped_h, sprite_clipped_w, sprite_col_mask); + } + } else { + if (var16) { + _vid.drawSpriteSub6(src, _vid._frontLayer + dst_offset, sprite_h, sprite_clipped_h, sprite_clipped_w, sprite_col_mask); + } else { + _vid.drawSpriteSub4(src, _vid._frontLayer + dst_offset, sprite_w, sprite_clipped_h, sprite_clipped_w, sprite_col_mask); + } + } + _vid.markBlockAsDirty(pos_x, pos_y, sprite_clipped_w, sprite_clipped_h); +} + +uint8 *Game::loadBankData(uint16 mbkEntryNum) { + debug(DBG_GAME, "Game::loadBankData(%d)", mbkEntryNum); + MbkEntry *me = &_res._mbk[mbkEntryNum]; + const uint16 avail = _lastBankData - _firstBankData; + const uint16 size = (me->len & 0x7FFF) * 32; + if (avail < size) { + _curBankSlot = &_bankSlots[0]; + _curBankSlot->entryNum = 0xFFFF; + _curBankSlot->ptr = 0; + _firstBankData = _bankData; + } + _curBankSlot->entryNum = mbkEntryNum; + _curBankSlot->ptr = _firstBankData; + ++_curBankSlot; + _curBankSlot->entryNum = 0xFFFF; + _curBankSlot->ptr = 0; + const uint8 *data = _res._mbkData + me->offset; + if (me->len & 0x8000) { + warning("Uncompressed bank data %d", mbkEntryNum); + memcpy(_firstBankData, data, size); + } else { + assert(me->offset != 0); + if (!delphine_unpack(_firstBankData, data, 0)) { + error("Bad CRC for bank data %d", mbkEntryNum); + } + } + uint8 *bankData = _firstBankData; + _firstBankData += size; + assert(_firstBankData < _lastBankData); + return bankData; +} + +int Game::loadMonsterSprites(LivePGE *pge) { + debug(DBG_GAME, "Game::loadMonsterSprites()"); + InitPGE *init_pge = pge->init_PGE; + if (init_pge->obj_node_number != 0x49 && init_pge->object_type != 10) { + return 0xFFFF; + } + if (init_pge->obj_node_number == _curMonsterFrame) { + return 0xFFFF; + } + if (pge->room_location != _currentRoom) { + return 0; + } + + const uint8 *mList = _monsterListLevels[_currentLevel]; + while (*mList != init_pge->obj_node_number) { + if (*mList == 0xFF) { // end of list + return 0; + } + mList += 2; + } + _curMonsterFrame = mList[0]; + if (_curMonsterNum != mList[1]) { + _curMonsterNum = mList[1]; + _res.load(_monsterNames[_curMonsterNum], Resource::OT_SPRM); + _res.load_SPR_OFF(_monsterNames[_curMonsterNum], _res._sprm); + _vid.setPaletteSlotLE(5, _monsterPals[_curMonsterNum]); + } + return 0xFFFF; +} + +void Game::loadLevelMap() { + debug(DBG_GAME, "Game::loadLevelMap() room=%d", _currentRoom); + _currentIcon = 0xFF; + _vid.copyLevelMap(_currentRoom); + _vid.setLevelPalettes(); +} + +void Game::loadLevelData() { + _res.clearLevelRes(); + + const Level *lvl = &_gameLevels[_currentLevel]; + _res.load(lvl->name, Resource::OT_SPC); + _res.load(lvl->name, Resource::OT_MBK); + _res.load(lvl->name, Resource::OT_RP); + _res.load(lvl->name, Resource::OT_CT); + _res.load(lvl->name, Resource::OT_MAP); + _res.load(lvl->name, Resource::OT_PAL); + + _res.load(lvl->name2, Resource::OT_PGE); + _res.load(lvl->name2, Resource::OT_OBJ); + _res.load(lvl->name2, Resource::OT_ANI); + _res.load(lvl->name2, Resource::OT_TBN); + + _cut._id = lvl->cutscene_id; + + _curMonsterNum = 0xFFFF; + _curMonsterFrame = 0; + + _curBankSlot = &_bankSlots[0]; + _curBankSlot->entryNum = 0xFFFF; + _curBankSlot->ptr = 0; + _firstBankData = _bankData; + _printLevelCodeCounter = 150; + + _col_slots2Cur = _col_slots2; + _col_slots2Next = 0; + + memset(_pge_liveTable2, 0, sizeof(_pge_liveTable2)); + memset(_pge_liveTable1, 0, sizeof(_pge_liveTable1)); + + _currentRoom = _res._pgeInit[0].init_room; + uint16 n = _res._pgeNum; + while (n--) { + pge_loadForCurrentLevel(n); + } + + for (uint16 i = 0; i < _res._pgeNum; ++i) { + if (_res._pgeInit[i].skill <= _skillLevel) { + LivePGE *pge = &_pgeLive[i]; + pge->next_PGE_in_room = _pge_liveTable1[pge->room_location]; + _pge_liveTable1[pge->room_location] = pge; + } + } + pge_resetGroups(); + _validSaveState = false; +} + +uint8 *Game::findBankData(uint16 entryNum) { + BankSlot *slot = &_bankSlots[0]; + while (slot->entryNum != 0xFFFF) { + if (slot->entryNum == entryNum) { + return slot->ptr; + } + ++slot; + } + return 0; +} + +void Game::drawIcon(uint8 iconNum, int16 x, int16 y, uint8 colMask) { + uint16 offset = READ_LE_UINT16(_res._icn + iconNum * 2); + uint8 buf[256]; + uint8 *p = _res._icn + offset + 2; + for (int i = 0; i < 128; ++i) { + uint8 col = *p++; + buf[i * 2 + 0] = (col & 0xF0) >> 4; + buf[i * 2 + 1] = (col & 0x0F) >> 0; + } + _vid.drawSpriteSub1(buf, _vid._frontLayer + x + y * 256, 16, 16, 16, colMask << 4); + _vid.markBlockAsDirty(x, y, 16, 16); +} + +void Game::playSound(uint8 sfxId, uint8 softVol) { + if (sfxId < _res._numSfx) { + SoundFx *sfx = &_res._sfxList[sfxId]; + if (sfx->data) { + MixerChunk mc; + mc.data = sfx->data; + mc.len = sfx->len; + _mix.play(&mc, 6000, Mixer::MAX_VOLUME >> softVol); + } + } else { + // in-game music + _sfxPly.play(sfxId); + } +} + +uint16 Game::getRandomNumber() { + uint32 n = _randSeed * 2; + if (_randSeed > n) { + n ^= 0x1D872B41; + } + _randSeed = n; + return n & 0xFFFF; +} + +void Game::changeLevel() { + _vid.fadeOut(); + loadLevelData(); + loadLevelMap(); + _vid.setPalette0xF(); + _vid.setTextPalette(); + _vid.fullRefresh(); +} + +uint16 Game::getLineLength(const uint8 *str) const { + uint16 len = 0; + while (*str && *str != 0xB && *str != 0xA) { + ++str; + ++len; + } + return len; +} + +void Game::handleInventory() { + LivePGE *selected_pge = 0; + LivePGE *pge = &_pgeLive[0]; + if (pge->life > 0 && pge->current_inventory_PGE != 0xFF) { + playSound(66, 0); + InventoryItem items[24]; + int num_items = 0; + uint8 inv_pge = pge->current_inventory_PGE; + while (inv_pge != 0xFF) { + items[num_items].icon_num = _res._pgeInit[inv_pge].icon_num; + items[num_items].init_pge = &_res._pgeInit[inv_pge]; + items[num_items].live_pge = &_pgeLive[inv_pge]; + inv_pge = _pgeLive[inv_pge].next_inventory_PGE; + ++num_items; + } + items[num_items].icon_num = 0xFF; + int current_item = 0; + int num_lines = (num_items - 1) / 4 + 1; + int current_line = 0; + bool display_score = false; + while (!_stub->_pi.backspace && !_stub->_pi.quit) { + // draw inventory background + int icon_h = 5; + int icon_y = 140; + int icon_num = 31; + do { + int icon_x = 56; + int icon_w = 9; + do { + drawIcon(icon_num, icon_x, icon_y, 0xF); + ++icon_num; + icon_x += 16; + } while (--icon_w); + icon_y += 16; + } while (--icon_h); + + if (!display_score) { + int icon_x_pos = 72; + for (int i = 0; i < 4; ++i) { + int item_it = current_line * 4 + i; + if (items[item_it].icon_num == 0xFF) { + break; + } + drawIcon(items[item_it].icon_num, icon_x_pos, 157, 0xA); + if (current_item == item_it) { + drawIcon(76, icon_x_pos, 157, 0xA); + selected_pge = items[item_it].live_pge; + uint8 txt_num = items[item_it].init_pge->text_num; + const char *str = (const char *)_res._tbn + READ_LE_UINT16(_res._tbn + txt_num * 2); + _vid.drawString(str, (256 - strlen(str) * 8) / 2, 189, 0xED); + if (items[item_it].init_pge->init_flags & 4) { + char counterValue[10]; + sprintf(counterValue, "%d", selected_pge->life); + _vid.drawString(counterValue, (256 - strlen(counterValue) * 8) / 2, 197, 0xED); + } + } + icon_x_pos += 32; + } + if (current_line != 0) { + drawIcon(0x4E, 120, 176, 0xA); // down arrow + } + if (current_line != num_lines - 1) { + drawIcon(0x4D, 120, 143, 0xA); // up arrow + } + } else { + char textBuf[50]; + sprintf(textBuf, "SCORE %08lu", _score); + _vid.drawString(textBuf, (114 - strlen(textBuf) * 8) / 2 + 72, 158, 0xE5); + sprintf(textBuf, "%s:%s", _res.getMenuString(LocaleData::LI_06_LEVEL), _res.getMenuString(LocaleData::LI_13_EASY + _skillLevel)); + _vid.drawString(textBuf, (114 - strlen(textBuf) * 8) / 2 + 72, 166, 0xE5); + } + + _vid.updateScreen(); + _stub->sleep(80); + inp_update(); + + if (_stub->_pi.dirMask & PlayerInput::DIR_UP) { + _stub->_pi.dirMask &= ~PlayerInput::DIR_UP; + if (current_line < num_lines - 1) { + ++current_line; + current_item = current_line * 4; + } + } + if (_stub->_pi.dirMask & PlayerInput::DIR_DOWN) { + _stub->_pi.dirMask &= ~PlayerInput::DIR_DOWN; + if (current_line > 0) { + --current_line; + current_item = current_line * 4; + } + } + if (_stub->_pi.dirMask & PlayerInput::DIR_LEFT) { + _stub->_pi.dirMask &= ~PlayerInput::DIR_LEFT; + if (current_item > 0) { + int item_num = current_item % 4; + if (item_num > 0) { + --current_item; + } + } + } + if (_stub->_pi.dirMask & PlayerInput::DIR_RIGHT) { + _stub->_pi.dirMask &= ~PlayerInput::DIR_RIGHT; + if (current_item < num_items - 1) { + int item_num = current_item % 4; + if (item_num < 3) { + ++current_item; + } + } + } + if (_stub->_pi.enter) { + _stub->_pi.enter = false; + display_score = !display_score; + } + } + _vid.fullRefresh(); + _stub->_pi.backspace = false; + if (selected_pge) { + pge_setCurrentInventoryObject(selected_pge); + } + playSound(66, 0); + } +} + +void Game::inp_update() { + if (_inp_replay && _inp_demo) { + uint8 keymask = _inp_demo->readByte(); + if (_inp_demo->ioErr()) { + _inp_replay = false; + } else { + _stub->_pi.dirMask = keymask & 0xF; + _stub->_pi.enter = (keymask & 0x10) != 0; + _stub->_pi.space = (keymask & 0x20) != 0; + _stub->_pi.shift = (keymask & 0x40) != 0; + _stub->_pi.quit = (keymask & 0x80) != 0; + } + } + _stub->processEvents(); + if (_inp_record && _inp_demo) { + uint8 keymask = _stub->_pi.dirMask; + if (_stub->_pi.enter) { + keymask |= 0x10; + } + if (_stub->_pi.space) { + keymask |= 0x20; + } + if (_stub->_pi.shift) { + keymask |= 0x40; + } + if (_stub->_pi.quit) { + keymask |= 0x80; + } + _inp_demo->writeByte(keymask); + if (_inp_demo->ioErr()) { + _inp_record = false; + } + } +} + +void Game::makeGameDemoName(char *buf) { + sprintf(buf, "rs-level%d.demo", _currentLevel + 1); +} + +void Game::makeGameStateName(uint8 slot, char *buf) { + sprintf(buf, "rs-level%d-%02d.state", _currentLevel + 1, slot); +} + +bool Game::saveGameState(uint8 slot) { + bool success = false; + char stateFile[20]; + makeGameStateName(slot, stateFile); + File f(true); + if (!f.open(stateFile, _savePath, "wb")) { + warning("Unable to save state file '%s'", stateFile); + } else { + // header + f.writeUint32BE('FBSV'); + f.writeUint16BE(2); + char hdrdesc[32]; + memset(hdrdesc, 0, sizeof(hdrdesc)); + sprintf(hdrdesc, "level=%d room=%d", _currentLevel + 1, _currentRoom); + f.write(hdrdesc, sizeof(hdrdesc)); + // contents + saveState(&f); + if (f.ioErr()) { + warning("I/O error when saving game state"); + } else { + debug(DBG_INFO, "Saved state to slot %d", slot); + success = true; + } + } + return success; +} + +bool Game::loadGameState(uint8 slot) { + bool success = false; + char stateFile[20]; + makeGameStateName(slot, stateFile); + File f(true); + if (!f.open(stateFile, _savePath, "rb")) { + warning("Unable to open state file '%s'", stateFile); + } else { + uint32 id = f.readUint32BE(); + if (id != 'FBSV') { + warning("Bad save state format"); + } else { + uint16 ver = f.readUint16BE(); + if (ver != 2) { + warning("Invalid save state version"); + } else { + char hdrdesc[32]; + f.read(hdrdesc, sizeof(hdrdesc)); + // contents + loadState(&f); + if (f.ioErr()) { + warning("I/O error when loading game state"); + } else { + debug(DBG_INFO, "Loaded state from slot %d", slot); + success = true; + } + } + } + } + return success; +} + +void Game::saveState(File *f) { + f->writeByte(_skillLevel); + f->writeUint32BE(_score); + if (_col_slots2Cur == 0) { + f->writeUint32BE(0xFFFFFFFF); + } else { + f->writeUint32BE(_col_slots2Cur - &_col_slots2[0]); + } + if (_col_slots2Next == 0) { + f->writeUint32BE(0xFFFFFFFF); + } else { + f->writeUint32BE(_col_slots2Next - &_col_slots2[0]); + } + for (int i = 0; i < _res._pgeNum; ++i) { + LivePGE *pge = &_pgeLive[i]; + f->writeUint16BE(pge->obj_type); + f->writeUint16BE(pge->pos_x); + f->writeUint16BE(pge->pos_y); + f->writeByte(pge->anim_seq); + f->writeByte(pge->room_location); + f->writeUint16BE(pge->life); + f->writeUint16BE(pge->counter_value); + f->writeByte(pge->collision_slot); + f->writeByte(pge->next_inventory_PGE); + f->writeByte(pge->current_inventory_PGE); + f->writeByte(pge->unkF); + f->writeUint16BE(pge->anim_number); + f->writeByte(pge->flags); + f->writeByte(pge->index); + f->writeUint16BE(pge->first_obj_number); + if (pge->next_PGE_in_room == 0) { + f->writeUint32BE(0xFFFFFFFF); + } else { + f->writeUint32BE(pge->next_PGE_in_room - &_pgeLive[0]); + } + if (pge->init_PGE == 0) { + f->writeUint32BE(0xFFFFFFFF); + } else { + f->writeUint32BE(pge->init_PGE - &_res._pgeInit[0]); + } + } + f->write(&_res._ctData[0x100], 0x1C00); + for (CollisionSlot2 *cs2 = &_col_slots2[0]; cs2 < _col_slots2Cur; ++cs2) { + if (cs2->next_slot == 0) { + f->writeUint32BE(0xFFFFFFFF); + } else { + f->writeUint32BE(cs2->next_slot - &_col_slots2[0]); + } + if (cs2->unk2 == 0) { + f->writeUint32BE(0xFFFFFFFF); + } else { + f->writeUint32BE(cs2->unk2 - &_res._ctData[0x100]); + } + f->writeByte(cs2->data_size); + f->write(cs2->data_buf, 0x10); + } +} + +void Game::loadState(File *f) { + uint16 i; + uint32 off; + _skillLevel = f->readByte(); + _score = f->readUint32BE(); + memset(_pge_liveTable2, 0, sizeof(_pge_liveTable2)); + memset(_pge_liveTable1, 0, sizeof(_pge_liveTable1)); + off = f->readUint32BE(); + if (off == 0xFFFFFFFF) { + _col_slots2Cur = 0; + } else { + _col_slots2Cur = &_col_slots2[0] + off; + } + off = f->readUint32BE(); + if (off == 0xFFFFFFFF) { + _col_slots2Next = 0; + } else { + _col_slots2Next = &_col_slots2[0] + off; + } + for (i = 0; i < _res._pgeNum; ++i) { + LivePGE *pge = &_pgeLive[i]; + pge->obj_type = f->readUint16BE(); + pge->pos_x = f->readUint16BE(); + pge->pos_y = f->readUint16BE(); + pge->anim_seq = f->readByte(); + pge->room_location = f->readByte(); + pge->life = f->readUint16BE(); + pge->counter_value = f->readUint16BE(); + pge->collision_slot = f->readByte(); + pge->next_inventory_PGE = f->readByte(); + pge->current_inventory_PGE = f->readByte(); + pge->unkF = f->readByte(); + pge->anim_number = f->readUint16BE(); + pge->flags = f->readByte(); + pge->index = f->readByte(); + pge->first_obj_number = f->readUint16BE(); + off = f->readUint32BE(); + if (off == 0xFFFFFFFF) { + pge->next_PGE_in_room = 0; + } else { + pge->next_PGE_in_room = &_pgeLive[0] + off; + } + off = f->readUint32BE(); + if (off == 0xFFFFFFFF) { + pge->init_PGE = 0; + } else { + pge->init_PGE = &_res._pgeInit[0] + off; + } + } + f->read(&_res._ctData[0x100], 0x1C00); + for (CollisionSlot2 *cs2 = &_col_slots2[0]; cs2 < _col_slots2Cur; ++cs2) { + off = f->readUint32BE(); + if (off == 0xFFFFFFFF) { + cs2->next_slot = 0; + } else { + cs2->next_slot = &_col_slots2[0] + off; + } + off = f->readUint32BE(); + if (off == 0xFFFFFFFF) { + cs2->unk2 = 0; + } else { + cs2->unk2 = &_res._ctData[0x100] + off; + } + cs2->data_size = f->readByte(); + f->read(cs2->data_buf, 0x10); + } + for (i = 0; i < _res._pgeNum; ++i) { + if (_res._pgeInit[i].skill <= _skillLevel) { + LivePGE *pge = &_pgeLive[i]; + if (pge->flags & 4) { + _pge_liveTable2[pge->index] = pge; + } + pge->next_PGE_in_room = _pge_liveTable1[pge->room_location]; + _pge_liveTable1[pge->room_location] = pge; + } + } + resetGameState(); +} + +void AnimBuffers::addState(uint8 stateNum, int16 x, int16 y, const uint8 *dataPtr, LivePGE *pge) { + debug(DBG_GAME, "AnimBuffers::addState() stateNum=%d x=%d y=%d dataPtr=0x%X pge=0x%X", stateNum, x, y, dataPtr, pge); + assert(stateNum < 4); + AnimBufferState *state = _states[stateNum]; + state->x = x; + state->y = y; + state->dataPtr = dataPtr; + state->pge = pge; + ++_curPos[stateNum]; + ++_states[stateNum]; +} diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/game.h b/project/jni/application/REminiscence/REminiscence-0.1.9/game.h new file mode 100644 index 000000000..435097e95 --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/game.h @@ -0,0 +1,391 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GAME_H__ +#define __GAME_H__ + +#include "intern.h" +#include "cutscene.h" +#include "menu.h" +#include "mixer.h" +#include "mod_player.h" +#include "resource.h" +#include "sfx_player.h" +#include "video.h" + +struct File; +struct SystemStub; + +struct Game { + typedef int (Game::*pge_OpcodeProc)(ObjectOpcodeArgs *args); + typedef int (Game::*pge_ZOrderCallback)(LivePGE *, LivePGE *, uint8, uint8); + typedef int (Game::*col_Callback1)(LivePGE *, LivePGE *, int16, int16); + typedef int (Game::*col_Callback2)(LivePGE *, int16, int16, int16); + + enum { + CT_UP_ROOM = 0x00, + CT_DOWN_ROOM = 0x40, + CT_RIGHT_ROOM = 0x80, + CT_LEFT_ROOM = 0xC0 + }; + + static const Level _gameLevels[]; + static const uint16 _scoreTable[]; + static const uint8 _monsterListLevel1[]; + static const uint8 _monsterListLevel2[]; + static const uint8 _monsterListLevel3[]; + static const uint8 _monsterListLevel4_1[]; + static const uint8 _monsterListLevel4_2[]; + static const uint8 _monsterListLevel5_1[]; + static const uint8 _monsterListLevel5_2[]; + static const uint8 *_monsterListLevels[]; + static const uint8 _monsterPals[4][32]; + static const char *_monsterNames[]; + static const pge_OpcodeProc _pge_opcodeTable[]; + static const uint8 _pge_modKeysTable[]; + static const uint8 _protectionCodeData[]; + static const uint8 _protectionPal[]; + + Cutscene _cut; + Menu _menu; + Mixer _mix; + ModPlayer _modPly; + Resource _res; + SfxPlayer _sfxPly; + Video _vid; + SystemStub *_stub; + const char *_savePath; + + const uint8 *_stringsTable; + const char **_textsTable; + uint8 _currentLevel; + uint8 _skillLevel; + uint32 _score; + uint8 _currentRoom; + uint8 _currentIcon; + bool _loadMap; + uint8 _printLevelCodeCounter; + uint32 _randSeed; + uint16 _currentInventoryIconNum; + uint16 _curMonsterFrame; + uint16 _curMonsterNum; + uint8 _blinkingConradCounter; + uint16 _textToDisplay; + bool _eraseBackground; + AnimBufferState _animBuffer0State[41]; + AnimBufferState _animBuffer1State[6]; // Conrad + AnimBufferState _animBuffer2State[42]; + AnimBufferState _animBuffer3State[12]; + AnimBuffers _animBuffers; + uint8 _bankData[0x7000]; + uint8 *_firstBankData; + uint8 *_lastBankData; + BankSlot _bankSlots[49]; + BankSlot *_curBankSlot; + const uint8 *_bankDataPtrs; + uint16 _deathCutsceneCounter; + bool _saveStateCompleted; + + Game(SystemStub *, const char *dataPath, const char *savePath, Version ver); + + void run(); + void resetGameState(); + void mainLoop(); + void updateTiming(); + void playCutscene(int id = -1); + void loadLevelMap(); + void loadLevelData(); + void start(); + void drawIcon(uint8 iconNum, int16 x, int16 y, uint8 colMask); + void drawCurrentInventoryItem(); + void printLevelCode(); + void showFinalScore(); + bool handleConfigPanel(); + bool handleContinueAbort(); + bool handleProtectionScreen(); + void printSaveStateCompleted(); + void drawLevelTexts(); + void drawStoryTexts(); + void prepareAnims(); + void prepareAnimsHelper(LivePGE *pge, int16 dx, int16 dy); + void drawAnims(); + void drawAnimBuffer(uint8 stateNum, AnimBufferState *state); + void drawObject(const uint8 *dataPtr, int16 x, int16 y, uint8 flags); + void drawObjectFrame(const uint8 *dataPtr, int16 x, int16 y, uint8 flags); + void decodeCharacterFrame(const uint8 *dataPtr, uint8 *dstPtr); + void drawCharacter(const uint8 *dataPtr, int16 x, int16 y, uint8 a, uint8 b, uint8 flags); + uint8 *loadBankData(uint16 MbkEntryNum); + int loadMonsterSprites(LivePGE *pge); + void playSound(uint8 sfxId, uint8 softVol); + uint16 getRandomNumber(); + void changeLevel(); + uint16 getLineLength(const uint8 *str) const; + void handleInventory(); + uint8 *findBankData(uint16 entryNum); + + + // pieges + bool _pge_playAnimSound; + GroupPGE _pge_groups[256]; + GroupPGE *_pge_groupsTable[256]; + GroupPGE *_pge_nextFreeGroup; + LivePGE *_pge_liveTable2[256]; // active pieges list (index = pge number) + LivePGE *_pge_liveTable1[256]; // pieges list by room (index = room) + LivePGE _pgeLive[256]; + uint8 _pge_currentPiegeRoom; + bool _pge_currentPiegeFacingDir; // (false == left) + bool _pge_processOBJ; + uint8 _pge_inpKeysMask; + uint16 _pge_opTempVar1; + uint16 _pge_opTempVar2; + uint16 _pge_compareVar1; + uint16 _pge_compareVar2; + + void pge_resetGroups(); + void pge_removeFromGroup(uint8 idx); + int pge_isInGroup(LivePGE *pge_dst, uint16 group_id, uint16 counter); + void pge_loadForCurrentLevel(uint16 idx); + void pge_process(LivePGE *pge); + void pge_setupNextAnimFrame(LivePGE *pge, GroupPGE *le); + void pge_playAnimSound(LivePGE *pge, uint16 arg2); + void pge_setupAnim(LivePGE *pge); + int pge_execute(LivePGE *live_pge, InitPGE *init_pge, const Object *obj); + void pge_prepare(); + void pge_setupDefaultAnim(LivePGE *pge); + uint16 pge_processOBJ(LivePGE *pge); + void pge_setupOtherPieges(LivePGE *pge, InitPGE *init_pge); + void pge_addToCurrentRoomList(LivePGE *pge, uint8 room); + void pge_getInput(); + int pge_op_isInpUp(ObjectOpcodeArgs *args); + int pge_op_isInpBackward(ObjectOpcodeArgs *args); + int pge_op_isInpDown(ObjectOpcodeArgs *args); + int pge_op_isInpForward(ObjectOpcodeArgs *args); + int pge_op_isInpUpMod(ObjectOpcodeArgs *args); + int pge_op_isInpBackwardMod(ObjectOpcodeArgs *args); + int pge_op_isInpDownMod(ObjectOpcodeArgs *args); + int pge_op_isInpForwardMod(ObjectOpcodeArgs *args); + int pge_op_isInpIdle(ObjectOpcodeArgs *args); + int pge_op_isInpNoMod(ObjectOpcodeArgs *args); + int pge_op_getCollision0u(ObjectOpcodeArgs *args); + int pge_op_getCollision00(ObjectOpcodeArgs *args); + int pge_op_getCollision0d(ObjectOpcodeArgs *args); + int pge_op_getCollision1u(ObjectOpcodeArgs *args); + int pge_op_getCollision10(ObjectOpcodeArgs *args); + int pge_op_getCollision1d(ObjectOpcodeArgs *args); + int pge_op_getCollision2u(ObjectOpcodeArgs *args); + int pge_op_getCollision20(ObjectOpcodeArgs *args); + int pge_op_getCollision2d(ObjectOpcodeArgs *args); + int pge_op_doesNotCollide0u(ObjectOpcodeArgs *args); + int pge_op_doesNotCollide00(ObjectOpcodeArgs *args); + int pge_op_doesNotCollide0d(ObjectOpcodeArgs *args); + int pge_op_doesNotCollide1u(ObjectOpcodeArgs *args); + int pge_op_doesNotCollide10(ObjectOpcodeArgs *args); + int pge_op_doesNotCollide1d(ObjectOpcodeArgs *args); + int pge_op_doesNotCollide2u(ObjectOpcodeArgs *args); + int pge_op_doesNotCollide20(ObjectOpcodeArgs *args); + int pge_op_doesNotCollide2d(ObjectOpcodeArgs *args); + int pge_op_collides0o0d(ObjectOpcodeArgs *args); + int pge_op_collides2o2d(ObjectOpcodeArgs *args); + int pge_op_collides0o0u(ObjectOpcodeArgs *args); + int pge_op_collides2o2u(ObjectOpcodeArgs *args); + int pge_op_collides2u2o(ObjectOpcodeArgs *args); + int pge_op_isInGroup(ObjectOpcodeArgs *args); + int pge_op_updateGroup0(ObjectOpcodeArgs *args); + int pge_op_updateGroup1(ObjectOpcodeArgs *args); + int pge_op_updateGroup2(ObjectOpcodeArgs *args); + int pge_op_updateGroup3(ObjectOpcodeArgs *args); + int pge_op_isPiegeDead(ObjectOpcodeArgs *args); + int pge_op_collides1u2o(ObjectOpcodeArgs *args); + int pge_op_collides1u1o(ObjectOpcodeArgs *args); + int pge_op_collides1o1u(ObjectOpcodeArgs *args); + int pge_o_unk0x2B(ObjectOpcodeArgs *args); + int pge_o_unk0x2C(ObjectOpcodeArgs *args); + int pge_o_unk0x2D(ObjectOpcodeArgs *args); + int pge_op_nop(ObjectOpcodeArgs *args); + int pge_op_pickupObject(ObjectOpcodeArgs *args); + int pge_op_addItemToInventory(ObjectOpcodeArgs *args); + int pge_op_copyPiege(ObjectOpcodeArgs *args); + int pge_op_canUseCurrentInventoryItem(ObjectOpcodeArgs *args); + int pge_op_removeItemFromInventory(ObjectOpcodeArgs *args); + int pge_o_unk0x34(ObjectOpcodeArgs *args); + int pge_op_isInpMod(ObjectOpcodeArgs *args); + int pge_op_setCollisionState1(ObjectOpcodeArgs *args); + int pge_op_setCollisionState0(ObjectOpcodeArgs *args); + int pge_op_isInGroup1(ObjectOpcodeArgs *args); + int pge_op_isInGroup2(ObjectOpcodeArgs *args); + int pge_op_isInGroup3(ObjectOpcodeArgs *args); + int pge_op_isInGroup4(ObjectOpcodeArgs *args); + int pge_o_unk0x3C(ObjectOpcodeArgs *args); + int pge_o_unk0x3D(ObjectOpcodeArgs *args); + int pge_op_setPiegeCounter(ObjectOpcodeArgs *args); + int pge_op_decPiegeCounter(ObjectOpcodeArgs *args); + int pge_o_unk0x40(ObjectOpcodeArgs *args); + int pge_op_wakeUpPiege(ObjectOpcodeArgs *args); + int pge_op_removePiege(ObjectOpcodeArgs *args); + int pge_op_removePiegeIfNotNear(ObjectOpcodeArgs *args); + int pge_op_loadPiegeCounter(ObjectOpcodeArgs *args); + int pge_o_unk0x45(ObjectOpcodeArgs *args); + int pge_o_unk0x46(ObjectOpcodeArgs *args); + int pge_o_unk0x47(ObjectOpcodeArgs *args); + int pge_o_unk0x48(ObjectOpcodeArgs *args); + int pge_o_unk0x49(ObjectOpcodeArgs *args); + int pge_o_unk0x4A(ObjectOpcodeArgs *args); + int pge_op_killPiege(ObjectOpcodeArgs *args); + int pge_op_isInCurrentRoom(ObjectOpcodeArgs *args); + int pge_op_isNotInCurrentRoom(ObjectOpcodeArgs *args); + int pge_op_scrollPosY(ObjectOpcodeArgs *args); + int pge_op_playDefaultDeathCutscene(ObjectOpcodeArgs *args); + int pge_o_unk0x50(ObjectOpcodeArgs *args); + int pge_o_unk0x52(ObjectOpcodeArgs *args); + int pge_o_unk0x53(ObjectOpcodeArgs *args); + int pge_op_isPiegeNear(ObjectOpcodeArgs *args); + int pge_op_setLife(ObjectOpcodeArgs *args); + int pge_op_incLife(ObjectOpcodeArgs *args); + int pge_op_setPiegeDefaultAnim(ObjectOpcodeArgs *args); + int pge_op_setLifeCounter(ObjectOpcodeArgs *args); + int pge_op_decLifeCounter(ObjectOpcodeArgs *args); + int pge_op_playCutscene(ObjectOpcodeArgs *args); + int pge_op_isTempVar2Set(ObjectOpcodeArgs *args); + int pge_op_playDeathCutscene(ObjectOpcodeArgs *args); + int pge_o_unk0x5D(ObjectOpcodeArgs *args); + int pge_o_unk0x5E(ObjectOpcodeArgs *args); + int pge_o_unk0x5F(ObjectOpcodeArgs *args); + int pge_op_findAndCopyPiege(ObjectOpcodeArgs *args); + int pge_op_isInRandomRange(ObjectOpcodeArgs *args); + int pge_o_unk0x62(ObjectOpcodeArgs *args); + int pge_o_unk0x63(ObjectOpcodeArgs *args); + int pge_o_unk0x64(ObjectOpcodeArgs *args); + int pge_op_addToCredits(ObjectOpcodeArgs *args); + int pge_op_subFromCredits(ObjectOpcodeArgs *args); + int pge_o_unk0x67(ObjectOpcodeArgs *args); + int pge_op_setCollisionState2(ObjectOpcodeArgs *args); + int pge_op_saveState(ObjectOpcodeArgs *args); + int pge_o_unk0x6A(ObjectOpcodeArgs *args); + int pge_op_isInGroupSlice(ObjectOpcodeArgs *args); + int pge_o_unk0x6C(ObjectOpcodeArgs *args); + int pge_op_isCollidingObject(ObjectOpcodeArgs *args); + int pge_o_unk0x6E(ObjectOpcodeArgs *args); + int pge_o_unk0x6F(ObjectOpcodeArgs *args); + int pge_o_unk0x70(ObjectOpcodeArgs *args); + int pge_o_unk0x71(ObjectOpcodeArgs *args); + int pge_o_unk0x72(ObjectOpcodeArgs *args); + int pge_o_unk0x73(ObjectOpcodeArgs *args); + int pge_op_collides4u(ObjectOpcodeArgs *args); + int pge_op_doesNotCollide4u(ObjectOpcodeArgs *args); + int pge_op_isBelowConrad(ObjectOpcodeArgs *args); + int pge_op_isAboveConrad(ObjectOpcodeArgs *args); + int pge_op_isNotFacingConrad(ObjectOpcodeArgs *args); + int pge_op_isFacingConrad(ObjectOpcodeArgs *args); + int pge_op_collides2u1u(ObjectOpcodeArgs *args); + int pge_op_displayText(ObjectOpcodeArgs *args); + int pge_o_unk0x7C(ObjectOpcodeArgs *args); + int pge_op_playSound(ObjectOpcodeArgs *args); + int pge_o_unk0x7E(ObjectOpcodeArgs *args); + int pge_o_unk0x7F(ObjectOpcodeArgs *args); + int pge_op_setPiegePosX(ObjectOpcodeArgs *args); + int pge_op_setPiegePosModX(ObjectOpcodeArgs *args); + int pge_op_changeRoom(ObjectOpcodeArgs *args); + int pge_op_hasInventoryItem(ObjectOpcodeArgs *args); + int pge_op_changeLevel(ObjectOpcodeArgs *args); + int pge_op_shakeScreen(ObjectOpcodeArgs *args); + int pge_o_unk0x86(ObjectOpcodeArgs *args); + int pge_op_playSoundGroup(ObjectOpcodeArgs *args); + int pge_op_adjustPos(ObjectOpcodeArgs *args); + int pge_op_setTempVar1(ObjectOpcodeArgs *args); + int pge_op_isTempVar1Set(ObjectOpcodeArgs *args); + int pge_setCurrentInventoryObject(LivePGE *pge); + void pge_updateInventory(LivePGE *pge1, LivePGE *pge2); + void pge_reorderInventory(LivePGE *pge); + LivePGE *pge_getInventoryItemBefore(LivePGE *pge, LivePGE *last_pge); + void pge_addToInventory(LivePGE *pge1, LivePGE *pge2, LivePGE *pge3); + int pge_updateCollisionState(LivePGE *pge, int16 pge_dy, uint8 var8); + int pge_ZOrder(LivePGE *pge, int16 num, pge_ZOrderCallback compare, uint16 unk); + void pge_updateGroup(uint8 idx, uint8 unk1, int16 unk2); + void pge_removeFromInventory(LivePGE *pge1, LivePGE *pge2, LivePGE *pge3); + int pge_ZOrderByAnimY(LivePGE *pge1, LivePGE *pge2, uint8 comp, uint8 comp2); + int pge_ZOrderByAnimYIfType(LivePGE *pge1, LivePGE *pge2, uint8 comp, uint8 comp2); + int pge_ZOrderIfIndex(LivePGE *pge1, LivePGE *pge2, uint8 comp, uint8 comp2); + int pge_ZOrderByIndex(LivePGE *pge1, LivePGE *pge2, uint8 comp, uint8 comp2); + int pge_ZOrderByObj(LivePGE *pge1, LivePGE *pge2, uint8 comp, uint8 comp2); + int pge_ZOrderIfDifferentDirection(LivePGE *pge1, LivePGE *pge2, uint8 comp, uint8 comp2); + int pge_ZOrderIfSameDirection(LivePGE *pge1, LivePGE *pge2, uint8 comp, uint8 comp2); + int pge_ZOrderIfTypeAndSameDirection(LivePGE *pge1, LivePGE *pge2, uint8 comp, uint8 comp2); + int pge_ZOrderIfTypeAndDifferentDirection(LivePGE *pge1, LivePGE *pge2, uint8 comp, uint8 comp2); + int pge_ZOrderByNumber(LivePGE *pge1, LivePGE *pge2, uint8 comp, uint8 comp2); + + + // collision + CollisionSlot _col_slots[256]; + uint8 _col_curPos; + CollisionSlot *_col_slotsTable[256]; + CollisionSlot *_col_curSlot; + CollisionSlot2 _col_slots2[256]; + CollisionSlot2 *_col_slots2Cur; + CollisionSlot2 *_col_slots2Next; + uint8 _col_activeCollisionSlots[0x30 * 3]; // left, current, right + uint8 _col_currentLeftRoom; + uint8 _col_currentRightRoom; + int16 _col_currentPiegeGridPosX; + int16 _col_currentPiegeGridPosY; + + void col_prepareRoomState(); + void col_clearState(); + LivePGE *col_findPiege(LivePGE *pge, uint16 arg2); + int16 col_findSlot(int16 pos); + void col_preparePiegeState(LivePGE *dst_pge); + uint16 col_getGridPos(LivePGE *pge, int16 dx); + int16 col_getGridData(LivePGE *pge, int16 dy, int16 dx); + uint8 col_findCurrentCollidingObject(LivePGE *pge, uint8 n1, uint8 n2, uint8 n3, LivePGE **pge_out); + int16 col_detectHit(LivePGE *pge, int16 arg2, int16 arg4, col_Callback1 callback1, col_Callback2 callback2, int16 argA, int16 argC); + int col_detectHitCallback2(LivePGE *pge1, LivePGE *pge2, int16 unk1, int16 unk2); + int col_detectHitCallback3(LivePGE *pge1, LivePGE *pge2, int16 unk1, int16 unk2); + int col_detectHitCallback4(LivePGE *pge1, LivePGE *pge2, int16 unk1, int16 unk2); + int col_detectHitCallback5(LivePGE *pge1, LivePGE *pge2, int16 unk1, int16 unk2); + int col_detectHitCallback1(LivePGE *pge, int16 dy, int16 unk1, int16 unk2); + int col_detectHitCallback6(LivePGE *pge, int16 dy, int16 unk1, int16 unk2); + int col_detectHitCallbackHelper(LivePGE *pge, int16 unk1); + int col_detectGunHitCallback1(LivePGE *pge, int16 arg2, int16 arg4, int16 arg6); + int col_detectGunHitCallback2(LivePGE *pge1, LivePGE *pge2, int16 arg4, int16); + int col_detectGunHitCallback3(LivePGE *pge1, LivePGE *pge2, int16 arg4, int16); + int col_detectGunHit(LivePGE *pge, int16 arg2, int16 arg4, col_Callback1 callback1, col_Callback2 callback2, int16 argA, int16 argC); + + + // input + uint8 _inp_lastKeysHit; + uint8 _inp_lastKeysHitLeftRight; + bool _inp_replay; + bool _inp_record; + File *_inp_demo; + + void inp_handleSpecialKeys(); + void inp_update(); + + + // save/load state + uint8 _stateSlot; + bool _validSaveState; + + void makeGameDemoName(char *buf); + void makeGameStateName(uint8 slot, char *buf); + bool saveGameState(uint8 slot); + bool loadGameState(uint8 slot); + void saveState(File *f); + void loadState(File *f); +}; + +#endif // __GAME_H__ diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/graphics.cpp b/project/jni/application/REminiscence/REminiscence-0.1.9/graphics.cpp new file mode 100644 index 000000000..e856020bc --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/graphics.cpp @@ -0,0 +1,718 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "graphics.h" + + +void Graphics::setClippingRect(int16 rx, int16 ry, int16 rw, int16 rh) { + debug(DBG_VIDEO, "Graphics::setClippingRect(%d, %d, %d, %d)", rx, ry, rw, rh); + _crx = rx; + _cry = ry; + _crw = rw; + _crh = rh; +} + +void Graphics::drawPoint(uint8 color, const Point *pt) { + debug(DBG_VIDEO, "Graphics::drawPoint() col=0x%X x=%d, y=%d", color, pt->x, pt->y); + if (pt->x >= 0 && pt->x < _crw && pt->y >= 0 && pt->y < _crh) { + *(_layer + (pt->y + _cry) * 256 + pt->x + _crx) = color; + } +} + +void Graphics::drawLine(uint8 color, const Point *pt1, const Point *pt2) { + debug(DBG_VIDEO, "Graphics::drawLine()"); + int16 dxincr1 = 1; + int16 dyincr1 = 1; + int16 dx = pt2->x - pt1->x; + if (dx < 0) { + dxincr1 = -1; + dx = -dx; + } + int16 dy = pt2->y - pt1->y; + if (dy < 0) { + dyincr1 = -1; + dy = -dy; + } + int16 dxincr2, dyincr2, delta1, delta2; + if (dx < dy) { + dxincr2 = 0; + dyincr2 = 1; + delta1 = dx; + delta2 = dy; + if (dyincr1 < 0) { + dyincr2 = -1; + } + } else { + dxincr2 = 1; + dyincr2 = 0; + delta1 = dy; + delta2 = dx; + if (dxincr1 < 0) { + dxincr2 = -1; + } + } + Point pt; + pt.x = pt1->x; + pt.y = pt1->y; + int16 octincr1 = delta1 * 2 - delta2 * 2; + int16 octincr2 = delta1 * 2; + int16 oct = delta1 * 2 - delta2; + if (delta2 >= 0) { + drawPoint(color, &pt); + while (--delta2 >= 0) { + if (oct >= 0) { + pt.x += dxincr1; + pt.y += dyincr1; + oct += octincr1; + } else { + pt.x += dxincr2; + pt.y += dyincr2; + oct += octincr2; + } + drawPoint(color, &pt); + } + } +} + +void Graphics::addEllipseRadius(int16 y, int16 x1, int16 x2) { + debug(DBG_VIDEO, "Graphics::addEllipseRadius()"); + if (y >= 0 && y <= _crh) { + y = (y - _areaPoints[0]) * 2; + if (x1 < 0) { + x1 = 0; + } + if (x2 >= _crw) { + x2 = _crw - 1; + } + _areaPoints[y + 1] = x1; + _areaPoints[y + 2] = x2; + } +} + +void Graphics::drawEllipse(uint8 color, bool hasAlpha, const Point *pt, int16 rx, int16 ry) { + debug(DBG_VIDEO, "Graphics::drawEllipse()"); + bool flag = false; + int16 y = pt->y - ry; + if (y < 0) { + y = 0; + } + if (y < _crh) { + if (pt->y + ry >= 0) { + _areaPoints[0] = y; + int32 dy = 0; + int32 rxsq = rx * rx; + int32 rxsq2 = rx * rx * 2; + int32 rxsq4 = rx * rx * 4; + int32 rysq = ry * ry; + int32 rysq2 = ry * ry * 2; + int32 rysq4 = ry * ry * 4; + + int32 dx = 0; + int32 b = rx * ((rysq2 & 0xFFFF) + (rysq2 >> 16)); + int32 a = 2 * b; + + int32 ny1, ny2, nx1, nx2; + ny1 = ny2 = rysq4 / 2 - a + rxsq; + nx1 = nx2 = rxsq2 - b + rysq; + + while (ny2 < 0) { + int16 x2 = pt->x + rx; + int16 x1 = pt->x - rx; + int16 by = pt->y + dy; + int16 ty = pt->y - dy; + if (x1 != x2) { + addEllipseRadius(by, x1, x2); + if (ty < by) { + addEllipseRadius(ty, x1, x2); + } + } + dy += 1; + dx += rxsq4; + nx1 = dx; + if (nx2 < 0) { + nx2 += nx1 + rxsq2; + ny2 += nx1; + } else { + --rx; + a -= rysq4; + ny1 = a; + nx2 += nx1 + rxsq2 - ny1; + ny2 += nx1 + rysq2 - ny1; + } + } + + while (rx >= 0) { + bool flag2 = false; + int16 x2 = pt->x + rx; + int16 x1 = pt->x - rx; + int16 by = pt->y + dy; + int16 ty = pt->y - dy; + if (!flag && x1 != x2) { + flag2 = true; + addEllipseRadius(by, x1, x2); + if (ty < by) { + addEllipseRadius(ty, x1, x2); + } + } + if (flag2) { + flag = true; + } + --rx; + a -= rysq4; + nx1 = a; + if (ny2 < 0) { + ++dy; + flag = false; + dx += rxsq4; + ny2 += dx - nx1 + rysq2; + ny1 = dx - nx1 + rysq2; + } else { + ny2 += rysq2 - nx1; + ny1 = rysq2 - nx1; + } + } + if (flag) { + ++dy; + } + + while (dy <= ry) { + int16 ty = pt->y - dy; + int16 by = pt->y + dy; + if (ty < by) { + addEllipseRadius(ty, pt->x, pt->x); + } + addEllipseRadius(by, pt->x, pt->x); + ++dy; + } + y = pt->y + ry + 1; + if (y > _crh) { + y = _crh; + } + y = (y - _areaPoints[0]) * 2; + _areaPoints[y + 1] = -1; + fillArea(color, hasAlpha); + } + } +} + +void Graphics::fillArea(uint8 color, bool hasAlpha) { + debug(DBG_VIDEO, "Graphics::fillArea()"); + int16 *pts = _areaPoints; + uint8 *dst = _layer + (_cry + *pts++) * 256 + _crx; + int16 x1 = *pts++; + if (x1 >= 0) { + if (hasAlpha && color > 0xC7) { + do { + int16 x2 = *pts++; + if (x2 < _crw && x2 >= x1) { + int len = x2 - x1 + 1; + for (int i = 0; i < len; ++i) { + *(dst + x1 + i) |= color & 8; // XXX 0x88 + } + } + dst += 256; + x1 = *pts++; + } while (x1 >= 0); + } else { + do { + int16 x2 = *pts++; + if (x2 < _crw && x2 >= x1) { + int len = x2 - x1 + 1; + memset(dst + x1, color, len); + } + dst += 256; + x1 = *pts++; + } while (x1 >= 0); + } + } +} + +void Graphics::drawSegment(uint8 color, bool hasAlpha, int16 ys, const Point *pts, uint8 numPts) { + debug(DBG_VIDEO, "Graphics::drawSegment()"); + int16 xmin, xmax, ymin, ymax; + xmin = xmax = pts[0].x; + ymin = ymax = pts[0].y; + for (int i = 1; i < numPts; ++i) { + int16 x = pts[i].x; + int16 y = pts[i].y; + if ((xmin << 16) + ymin > (x << 16) + y) { + xmin = x; + ymin = y; + } + if ((xmax << 16) + ymax < (x << 16) + y) { + xmax = x; + ymax = y; + } + } + if (xmin < 0) { + xmin = 0; + } + if (xmax >= _crw) { + xmax = _crw - 1; + } + _areaPoints[0] = ys; + _areaPoints[1] = xmin; + _areaPoints[2] = xmax; + _areaPoints[3] = -1; + fillArea(color, hasAlpha); +} + +void Graphics::drawPolygonOutline(uint8 color, const Point *pts, uint8 numPts) { + debug(DBG_VIDEO, "Graphics::drawPolygonOutline()"); + assert(numPts >= 2); + int i; + for (i = 0; i < numPts - 1; ++i) { + drawLine(color, &pts[i], &pts[i + 1]); + } + drawLine(color, &pts[i], &pts[0]); +} + +static int32 calcPolyStep1(int16 dx, int16 dy) { + debug(DBG_VIDEO, "Graphics::calcPolyStep1()"); + assert(dy != 0); + int32 a = dx * 256; + if ((a >> 16) < dy) { + a = ((int16)(a / dy)) * 256; + } else { + a = ((a / 256) / dy) & 0xFFFF0000; + } + return a; +} + +static int32 calcPolyStep2(int16 dx, int16 dy) { + debug(DBG_VIDEO, "Graphics::calcPolyStep2()"); + assert(dy != 0); + int32 a = dx * 256; + if ((a >> 16) < dy) { + a = ((int16)(a / dy)) * 256; + } else { + a = ((a / 256) / dy) << 16; + } + return a; +} + +static void drawPolygonHelper1(int32 &x, int16 &y, int32 &step, int16 *&pts, int16 *&start) { + bool first = true; + x = pts[0]; + y = pts[1]; + int16 dy, dx; + do { + if (first) { + first = false; + } else { + x = *pts; + } + --pts; + dy = *pts - y; + --pts; + dx = *pts - x; + } while (dy <= 0 && start < pts); + x <<= 16; + if (dy > 0) { + step = calcPolyStep1(dx, dy); + } +} + +static void drawPolygonHelper2(int32 &x, int16 &y, int32 &step, int16 *&pts, int16 *&start) { + bool first = true; + x = *start++; + y = *start++; + int16 dy, dx; + do { + if (first) { + first = false; + } else { + x = *start; + start += 2; + } + dy = start[1] - y; + dx = start[0] - x; + } while (dy <= 0 && start < pts); + x <<= 16; + if (dy > 0) { + step = calcPolyStep2(dx, dy); + } +} + +void Graphics::drawPolygon(uint8 color, bool hasAlpha, const Point *pts, uint8 numPts) { + debug(DBG_VIDEO, "Graphics::drawPolygon()"); + assert(numPts * 4 < 0x100); + + int16 *apts1 = &_areaPoints[0x100]; + int16 *apts2 = &_areaPoints[0x100 + numPts * 2]; + + int16 xmin, xmax, ymin, ymax; + xmin = xmax = pts[0].x; + ymin = ymax = pts[0].y; + + int16 *spts = apts1; + *apts1++ = *apts2++ = pts[0].x; + *apts1++ = *apts2++ = pts[0].y; + + for (int p = 1; p < numPts; ++p) { + int16 x = pts[p].x; + int16 y = pts[p].y; + if (ymin > y) { + ymin = y; + spts = apts1; + } + if (ymax < y) { + ymax = y; + } + *apts1++ = *apts2++ = x; + *apts1++ = *apts2++ = y; + + if (xmin > x) { + xmin = x; + } + if (xmax < x) { + xmax = x; + } + } + int16 *rpts = _areaPoints; + if (xmax < 0 || xmin >= _crw || ymax < 0 || ymin >= _crh) { + return; + } + if (numPts == 2) { + drawLine(color, &pts[0], &pts[1]); + return; + } + if (ymax == ymin) { + drawSegment(color, hasAlpha, ymax, pts, numPts); + return; + } + int16 x, dx, y, dy; + int32 a, b, d, f; + int32 xstep1 = 0; + int32 xstep2 = 0; + + apts1 = &spts[numPts * 2]; + xmax = _crw - 1; + ymax = _crh - 1; + int32 l1 = 65536; + int32 l2 = -65536; + if (ymin < 0) { + int16 x0, y0; + do { + --apts1; + y0 = *apts1; + --apts1; + x0 = *apts1; + } while (y0 < 0); + x = apts1[2]; + y = apts1[3]; + dy = y0 - y; + dx = x0 - x; + xstep1 = (dy << 16) | dx; + assert(dy != 0); + a = y * dx / dy; + b = (x - a) << 16; + d = xstep1 = calcPolyStep1(dx, dy); + if (d < 0) { + d = -d; + } + if (d < l1) { + d = l2; + } + d /= 2; + b -= d; + + do { + x0 = *spts++; + y0 = *spts++; + } while (*(spts + 1) < 0); + dy = spts[1] - y0; + dx = spts[0] - x0; + xstep2 = (dy << 16) | dx; + assert(dy != 0); + a = y0 * dx / dy; + f = (x0 - a) << 16; + d = xstep2 = calcPolyStep2(dx, dy); + if (d < 0) { + d = -d; + } + if (d < l1) { + d = l1; + } + d /= 2; + f += d; + ymin = 0; + *rpts++ = 0; + goto gfx_startLine; + } + + *rpts++ = ymin; + +gfx_startNewLine: + drawPolygonHelper2(f, ymin, xstep2, apts1, spts); + if (spts >= apts1) { + b = apts1[0] << 16; + dy = apts1[1]; + if (dy <= ymax) goto gfx_endLine; + goto gfx_fillArea; + } + drawPolygonHelper1(b, ymin, xstep1, apts1, spts); + d = xstep1; + if (d < 0) { + if (d >= l2) { + d = l1; + } + d /= 2; + b += d; + } + d = xstep2; + if (d >= 0) { + if (d <= l1) { + d = l1; + } + d /= 2; + f += d; + } + d = b; + if (d < 0) { + d = 0; + } + x = f >> 16; + if (x > xmax) { + x = xmax; + } + *rpts++ = d >> 16; + *rpts++ = x; + ++ymin; + d = xstep1; + if (d >= 0) { + if (d <= l1) { + d = l1; + } + d /= 2; + } + b += d; + d = xstep2; + if (d < 0) { + if (d >= l2) { + d = l1; + } + d /= 2; + } + f += d; + +gfx_startLine: + while (1) { + dy = apts1[1]; + if (spts >= apts1) { + break; + } else if (dy > spts[1]) { + dy = spts[1]; + if (dy > ymax) { + goto gfx_drawPolygonEnd; + } + dy -= ymin; + if (dy > 0) { + --dy; + do { + a = b; + if (a < 0) { + a = 0; + } + x = f >> 16; + if (x > xmax) { + x = xmax; + } + *rpts++ = a >> 16; + *rpts++ = x; + b += xstep1; + f += xstep2; + --dy; + } while (dy >= 0); + } + drawPolygonHelper2(f, ymin, xstep2, apts1, spts); + d = xstep2; + if (d >= 0) { + if (d <= l1) { + d = l1; + } + d /= 2; + f += d; + } else { + d = b; + if (d < 0) { + d = 0; + } + x = f >> 16; + if (x > xmax) { + x = xmax; + } + *rpts++ = d >> 16; + *rpts++ = x; + ++ymin; + d = xstep2; + if (d >= l2) { + d = l1; + } + d /= 2; + f += d; + b += xstep1; + } + } else if (dy == spts[1]) { + if (dy > ymax) goto gfx_drawPolygonEnd; + dy -= ymin; + if (dy > 0) { + --dy; + do { + a = b; + if (a < 0) { + a = 0; + } + x = f >> 16; + if (x > xmax) { + x = xmax; + } + *rpts++ = a >> 16; + *rpts++ = x; + b += xstep1; + f += xstep2; + --dy; + } while (dy >= 0); + } + goto gfx_startNewLine; + } else if (dy > ymax) { + goto gfx_drawPolygonEnd; + } else { + dy -= ymin; + if (dy > 0) { + --dy; + do { + a = b; + if (a < 0) { + a = 0; + } + x = f >> 16; + if (x > xmax) { + x = xmax; + } + *rpts++ = a >> 16; + *rpts++ = x; + b += xstep1; + f += xstep2; + --dy; + } while (dy >= 0); + } + drawPolygonHelper1(b, ymin, xstep1, apts1, spts); + d = xstep1; + if (d < 0) { + if (d >= l2) { + d = l1; + } + d /= 2; + b += d; + } else { + d = b; + if (d < 0) { + d = 0; + } + x = f >> 16; + if (x > xmax) { + x = xmax; + } + *rpts++ = d >> 16; + *rpts++ = x; + ++ymin; + d = xstep1; + if (d <= l1) { + d = l1; + } + d /= 2; + b += d; + f += xstep2; + } + } + } + + if (dy > ymax) goto gfx_drawPolygonEnd; + dy -= ymin; + if (dy < 0) goto gfx_fillArea; + if (dy > 0) { + --dy; + do { + a = b; + if (a < 0) { + a = 0; + } + x = f >> 16; + if (x > xmax) { + x = xmax; + } + *rpts++ = a >> 16; + *rpts++ = x; + b += xstep1; + f += xstep2; + --dy; + } while (dy >= 0); + } + + b = f = (apts1[0] << 16) | apts1[1]; + +gfx_endLine: + d = xstep1; + if (d >= 0) { + if (d >= l1) { + d /= 2; + b -= d; + } + } + d = xstep2; + if (d < 0) { + d /= 2; + f -= d; + } + a = b; + if (a < 0) { + a = 0; + } + x = f >> 16; + if (x > xmax) { + x = xmax; + } + *rpts++ = a >> 16; + *rpts++ = x; + goto gfx_fillArea; + +gfx_drawPolygonEnd: + dy = ymax - ymin; + if (dy >= 0) { + do { + a = b; + if (a < 0) { + a = 0; + } + x = f >> 16; + if (x > xmax) { + x = xmax; + } + *rpts++ = a >> 16; + *rpts++ = x; + b += xstep1; + f += xstep2; + --dy; + } while (dy >= 0); + } + +gfx_fillArea: + *rpts++ = -1; + fillArea(color, hasAlpha); +} diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/graphics.h b/project/jni/application/REminiscence/REminiscence-0.1.9/graphics.h new file mode 100644 index 000000000..561e2925c --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/graphics.h @@ -0,0 +1,40 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __GRAPHICS_H__ +#define __GRAPHICS_H__ + +#include "intern.h" + +struct Graphics { + uint8 *_layer; + int16 _areaPoints[0x200]; + int16 _crx, _cry, _crw, _crh; + + void setClippingRect(int16 vx, int16 vy, int16 vw, int16 vh); + void drawPoint(uint8 color, const Point *pt); + void drawLine(uint8 color, const Point *pt1, const Point *pt2); + void addEllipseRadius(int16 y, int16 x1, int16 x2); + void drawEllipse(uint8 color, bool hasAlpha, const Point *pt, int16 rx, int16 ry); + void fillArea(uint8 color, bool hasAlpha); + void drawSegment(uint8 color, bool hasAlpha, int16 ys, const Point *pts, uint8 numPts); + void drawPolygonOutline(uint8 color, const Point *pts, uint8 numPts); + void drawPolygon(uint8 color, bool hasAlpha, const Point *pts, uint8 numPts); +}; + +#endif // __GRAPHICS_H__ diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/intern.h b/project/jni/application/REminiscence/REminiscence-0.1.9/intern.h new file mode 100644 index 000000000..01247e33d --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/intern.h @@ -0,0 +1,193 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __INTERN_H__ +#define __INTERN_H__ + +#include +#include +#include +#include + +#include "sys.h" +#include "util.h" + +#define MAX(x,y) ((x)>(y)?(x):(y)) +#define MIN(x,y) ((x)<(y)?(x):(y)) +#define ARRAYSIZE(a) (sizeof(a)/sizeof(a[0])) + +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + +template +inline void SWAP(T &a, T &b) { + T tmp = a; + a = b; + b = tmp; +} + +enum Version { + VER_FR, + VER_EN, + VER_DE, + VER_SP +}; + +struct Color { + uint8 r; + uint8 g; + uint8 b; +}; + +struct Point { + int16 x; + int16 y; +}; + +struct Level { + const char *name; + const char *name2; + uint16 cutscene_id; +}; + +struct InitPGE { + uint16 type; + int16 pos_x; + int16 pos_y; + uint16 obj_node_number; + uint16 life; + int16 counter_values[4]; + uint8 object_type; + uint8 init_room; + uint8 room_location; + uint8 init_flags; + uint8 colliding_icon_num; + uint8 icon_num; + uint8 object_id; + uint8 skill; + uint8 mirror_x; + uint8 flags; + uint8 unk1C; // collidable, collision_data_len + uint8 text_num; +}; + +struct LivePGE { + uint16 obj_type; + int16 pos_x; + int16 pos_y; + uint8 anim_seq; + uint8 room_location; + int16 life; + int16 counter_value; + uint8 collision_slot; + uint8 next_inventory_PGE; + uint8 current_inventory_PGE; + uint8 unkF; // unk_inventory_PGE + uint16 anim_number; + uint8 flags; + uint8 index; + uint16 first_obj_number; + LivePGE *next_PGE_in_room; + InitPGE *init_PGE; +}; + +struct GroupPGE { + GroupPGE *next_entry; + uint16 index; + uint16 group_id; +}; + +struct Object { + uint16 type; + int8 dx; + int8 dy; + uint16 init_obj_type; + uint8 opcode2; + uint8 opcode1; + uint8 flags; + uint8 opcode3; + uint16 init_obj_number; + int16 opcode_arg1; + int16 opcode_arg2; + int16 opcode_arg3; +}; + +struct ObjectNode { + uint16 last_obj_number; + Object *objects; + uint16 num_objects; +}; + +struct ObjectOpcodeArgs { + LivePGE *pge; // arg0 + int16 a; // arg2 + int16 b; // arg4 +}; + +struct AnimBufferState { + int16 x; + int16 y; + const uint8 *dataPtr; + LivePGE *pge; +}; + +struct AnimBuffers { + AnimBufferState *_states[4]; + uint8 _curPos[4]; + + void addState(uint8 stateNum, int16 x, int16 y, const uint8 *dataPtr, LivePGE *pge); +}; + +struct CollisionSlot { + int16 ct_pos; + CollisionSlot *prev_slot; + LivePGE *live_pge; + uint16 index; +}; + +struct MbkEntry { + uint16 offset; + uint16 len; +}; + +struct BankSlot { + uint16 entryNum; + uint8 *ptr; +}; + +struct CollisionSlot2 { + CollisionSlot2 *next_slot; + int8 *unk2; + uint8 data_size; + uint8 data_buf[0x10]; // XXX check size +}; + +struct InventoryItem { + uint8 icon_num; + InitPGE *init_pge; + LivePGE *live_pge; +}; + +struct SoundFx { + uint32 offset; + uint16 len; + uint8 *data; +}; + +#endif // __INTERN_H__ diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/locale.cpp-unused b/project/jni/application/REminiscence/REminiscence-0.1.9/locale.cpp-unused new file mode 100644 index 000000000..43f8af441 --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/locale.cpp-unused @@ -0,0 +1,50 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2006 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "locale.h" + + +Locale::Locale(Version ver) + : _ver(ver) { + switch (_ver) { + case VER_FR: + _stringsTable = _stringsTableFR; + _textsTable = _textsTableFR; + break; + case VER_EN: + _stringsTable = _stringsTableEN; + _textsTable = _textsTableEN; + break; + case VER_DE: + _stringsTable = _stringsTableDE; + _textsTable = _textsTableDE; + break; + case VER_SP: + _stringsTable = _stringsTableSP; + _textsTable = _textsTableSP; + break; + } +} + +const char *Locale::get(int id) const { + const char *text = 0; + if (id >= 0 && id < LI_NUM) { + text = _textsTable[id]; + } + return text; +} diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/locale.h-unused b/project/jni/application/REminiscence/REminiscence-0.1.9/locale.h-unused new file mode 100644 index 000000000..89992ae05 --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/locale.h-unused @@ -0,0 +1,69 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2006 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __LOCALE_H__ +#define __LOCALE_H__ + +#include "intern.h" + +struct Locale { + enum Id { + LI_01_CONTINUE_OR_ABORT = 0, + LI_02_TIME, + LI_03_CONTINUE, + LI_04_ABORT, + LI_05_COMPLETED, + LI_06_LEVEL, + LI_07_START, + LI_08_SKILL, + LI_09_PASSWORD, + LI_10_INFO, + LI_11_QUIT, + LI_12_SKILL_LEVEL, + LI_13_EASY, + LI_14_NORMAL, + LI_15_EXPERT, + LI_16_ENTER_PASSWORD1, + LI_17_ENTER_PASSWORD2, + LI_18_RESUME_GAME, + LI_19_ABORT_GAME, + LI_20_LOAD_GAME, + LI_21_SAVE_GAME, + LI_22_SAVE_SLOT, + + LI_NUM + }; + + static const char *_textsTableFR[]; + static const char *_textsTableEN[]; + static const char *_textsTableDE[]; + static const char *_textsTableSP[]; + static const uint8 _stringsTableFR[]; + static const uint8 _stringsTableEN[]; + static const uint8 _stringsTableDE[]; + static const uint8 _stringsTableSP[]; + + Version _ver; + const char **_textsTable; + const uint8 *_stringsTable; + + Locale(Version ver); + const char *get(int id) const; +}; + +#endif // __LOCALE_H__ diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/main.cpp b/project/jni/application/REminiscence/REminiscence-0.1.9/main.cpp new file mode 100644 index 000000000..2db9bca39 --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/main.cpp @@ -0,0 +1,85 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "file.h" +#include "game.h" +#include "systemstub.h" + +static const char *USAGE = + "REminiscence - Flashback Interpreter\n" + "Usage: rs [OPTIONS]...\n" + " --datapath=PATH Path to data files (default 'DATA')\n" + " --savepath=PATH Path to save files (default '.')"; + +static bool parseOption(const char *arg, const char *longCmd, const char **opt) { + bool handled = false; + if (arg[0] == '-' && arg[1] == '-') { + if (strncmp(arg + 2, longCmd, strlen(longCmd)) == 0) { + *opt = arg + 2 + strlen(longCmd); + handled = true; + } + } + return handled; +} + +static Version detectVersion(const char *dataPath) { + static struct { + const char *filename; + Version ver; + } checkTable[] = { + { "ENGCINE.BIN", VER_EN }, + { "FR_CINE.BIN", VER_FR }, + { "GERCINE.BIN", VER_DE }, + { "SPACINE.BIN", VER_SP } + }; + for (uint8 i = 0; i < ARRAYSIZE(checkTable); ++i) { + File f; + if (f.open(checkTable[i].filename, dataPath, "rb")) { + return checkTable[i].ver; + } + } + error("Unable to find data files, check that all required files are present"); + return VER_EN; +} + +#undef main + +#include +int main(int argc, char *argv[]) { + const char *dataPath = "DATA"; + const char *savePath = "."; + for (int i = 1; i < argc; ++i) { + bool opt = false; + if (strlen(argv[i]) >= 2) { + opt |= parseOption(argv[i], "datapath=", &dataPath); + opt |= parseOption(argv[i], "savepath=", &savePath); + } + if (!opt) { + printf(USAGE); + return 0; + } + } + Version ver = detectVersion(dataPath); + g_debugMask = DBG_INFO; // DBG_CUT | DBG_VIDEO | DBG_RES | DBG_MENU | DBG_PGE | DBG_GAME | DBG_UNPACK | DBG_COL | DBG_MOD | DBG_SFX; + SystemStub *stub = SystemStub_SDL_create(); + Game *g = new Game(stub, dataPath, savePath, ver); + g->run(); + delete g; + delete stub; + return 0; +} diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/menu.cpp b/project/jni/application/REminiscence/REminiscence-0.1.9/menu.cpp new file mode 100644 index 000000000..d4c5deaf4 --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/menu.cpp @@ -0,0 +1,316 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "game.h" +#include "mod_player.h" +#include "resource.h" +#include "systemstub.h" +#include "video.h" +#include "menu.h" + + +Menu::Menu(ModPlayer *ply, Resource *res, SystemStub *stub, Video *vid) + : _ply(ply), _res(res), _stub(stub), _vid(vid) { +} + +void Menu::drawString(const char *str, int16 y, int16 x, uint8 color) { + debug(DBG_MENU, "Menu::drawString()"); + uint8 v1b = _vid->_charFrontColor; + uint8 v2b = _vid->_charTransparentColor; + uint8 v3b = _vid->_charShadowColor; + switch (color) { + case 0: + _vid->_charFrontColor = _charVar1; + _vid->_charTransparentColor = _charVar2; + _vid->_charShadowColor = _charVar2; + break; + case 1: + _vid->_charFrontColor = _charVar2; + _vid->_charTransparentColor = _charVar1; + _vid->_charShadowColor = _charVar1; + break; + case 2: + _vid->_charFrontColor = _charVar3; + _vid->_charTransparentColor = 0xFF; + _vid->_charShadowColor = _charVar1; + break; + case 3: + _vid->_charFrontColor = _charVar4; + _vid->_charTransparentColor = 0xFF; + _vid->_charShadowColor = _charVar1; + break; + case 4: + _vid->_charFrontColor = _charVar2; + _vid->_charTransparentColor = 0xFF; + _vid->_charShadowColor = _charVar1; + break; + case 5: + _vid->_charFrontColor = _charVar2; + _vid->_charTransparentColor = 0xFF; + _vid->_charShadowColor = _charVar5; + break; + } + + drawString2(str, y, x); + + _vid->_charFrontColor = v1b; + _vid->_charTransparentColor = v2b; + _vid->_charShadowColor = v3b; +} + +void Menu::drawString2(const char *str, int16 y, int16 x) { + debug(DBG_MENU, "Menu::drawString2()"); + int len = 0; + while (*str) { + _vid->drawChar((uint8)*str, y, x + len); + ++str; + ++len; + } + _vid->markBlockAsDirty(x * 8, y * 8, len * 8, 8); +} + +void Menu::loadPicture(const char *prefix) { + debug(DBG_MENU, "Menu::loadPicture('%s')", prefix); + _res->load_MAP_menu(prefix, _res->_memBuf); + for (int i = 0; i < 4; ++i) { + for (int y = 0; y < 224; ++y) { + for (int x = 0; x < 64; ++x) { + _vid->_frontLayer[i + x * 4 + 256 * y] = _res->_memBuf[0x3800 * i + x + 64 * y]; + } + } + } + _res->load_PAL_menu(prefix, _res->_memBuf); + _stub->setPalette(_res->_memBuf, 256); +} + +void Menu::handleInfoScreen() { + debug(DBG_MENU, "Menu::handleInfoScreen()"); + _vid->fadeOut(); + switch (_res->_ver) { + case VER_FR: + loadPicture("instru_f"); + break; + case VER_EN: + case VER_DE: + case VER_SP: + loadPicture("instru_e"); + break; + } + _vid->fullRefresh(); + _vid->updateScreen(); + do { + _stub->sleep(EVENTS_DELAY); + _stub->processEvents(); + if (_stub->_pi.enter) { + _stub->_pi.enter = false; + break; + } + } while (!_stub->_pi.quit); +} + +void Menu::handleSkillScreen(uint8 &new_skill) { + debug(DBG_MENU, "Menu::handleSkillScreen()"); + static const uint8 option_colors[3][3] = { { 2, 3, 3 }, { 3, 2, 3}, { 3, 3, 2 } }; + _vid->fadeOut(); + loadPicture("menu3"); + _vid->fullRefresh(); + drawString(_res->getMenuString(LocaleData::LI_12_SKILL_LEVEL), 12, 4, 3); + int skill_level = new_skill; + do { + drawString(_res->getMenuString(LocaleData::LI_13_EASY), 15, 14, option_colors[skill_level][0]); + drawString(_res->getMenuString(LocaleData::LI_14_NORMAL), 17, 14, option_colors[skill_level][1]); + drawString(_res->getMenuString(LocaleData::LI_15_EXPERT), 19, 14, option_colors[skill_level][2]); + + _vid->updateScreen(); + _stub->sleep(EVENTS_DELAY); + _stub->processEvents(); + + if (_stub->_pi.dirMask & PlayerInput::DIR_UP) { + _stub->_pi.dirMask &= ~PlayerInput::DIR_UP; + if (skill_level != 0) { + --skill_level; + } else { + skill_level = 2; + } + } + if (_stub->_pi.dirMask & PlayerInput::DIR_DOWN) { + _stub->_pi.dirMask &= ~PlayerInput::DIR_DOWN; + if (skill_level != 2) { + ++skill_level; + } else { + skill_level = 0; + } + } + if (_stub->_pi.enter) { + _stub->_pi.enter = false; + new_skill = skill_level; + return; + } + } while (!_stub->_pi.quit); + new_skill = 1; +} + +bool Menu::handlePasswordScreen(uint8 &new_skill, uint8 &new_level) { + debug(DBG_MENU, "Menu::handlePasswordScreen()"); + _vid->fadeOut(); + _vid->_charShadowColor = _charVar1; + _vid->_charTransparentColor = 0xFF; + _vid->_charFrontColor = _charVar4; + _vid->fullRefresh(); + char password[7]; + int len = 0; + do { + loadPicture("menu2"); + drawString2(_res->getMenuString(LocaleData::LI_16_ENTER_PASSWORD1), 15, 3); + drawString2(_res->getMenuString(LocaleData::LI_17_ENTER_PASSWORD2), 17, 3); + + for (int i = 0; i < len; ++i) { + _vid->drawChar((uint8)password[i], 21, i + 15); + } + _vid->drawChar(0x20, 21, len + 15); + + _vid->markBlockAsDirty(15 * 8, 21 * 8, (len + 1) * 8, 8); + _vid->updateScreen(); + _stub->sleep(EVENTS_DELAY); + _stub->processEvents(); + char c = _stub->_pi.lastChar; + if (c != 0) { + _stub->_pi.lastChar = 0; + if (len < 6) { + if (c >= 'a' && c <= 'z') { + c &= ~0x20; + } + if ((c >= 'A' && c <= 'Z') || (c == 0x20)) { + password[len] = c; + ++len; + } + } + } + if (_stub->_pi.backspace) { + _stub->_pi.backspace = false; + if (len > 0) { + --len; + } + } + if (_stub->_pi.enter) { + _stub->_pi.enter = false; + password[len] = '\0'; + for (int level = 0; level < 8; ++level) { + for (int skill = 0; skill < 3; ++skill) { + if (strcmp(_passwords[level][skill], password) == 0) { + new_level = level; + new_skill = skill; + return true; + } + } + } + return false; + } + } while (!_stub->_pi.quit); + return false; +} + +bool Menu::handleTitleScreen(uint8 &new_skill, uint8 &new_level) { + debug(DBG_MENU, "Menu::handleTitleScreen()"); + bool quit_loop = false; + int menu_entry = 0; + bool reinit_screen = true; + bool continue_game = true; + _charVar1 = 0; + _charVar2 = 0; + _charVar3 = 0; + _charVar4 = 0; + _charVar5 = 0; + _ply->play(1); + while (!quit_loop) { + if (reinit_screen) { + _vid->fadeOut(); + loadPicture("menu1"); + _vid->fullRefresh(); + _charVar3 = 1; + _charVar4 = 2; + menu_entry = 0; + reinit_screen = false; + } + int selected_menu_entry = -1; + for (int i = 0; i < 5; ++i) { + int color = (i == menu_entry) ? 2 : 3; + drawString(_res->getMenuString(LocaleData::LI_07_START + i), 16 + i * 2, 20, color); + } + + _vid->updateScreen(); + _stub->sleep(EVENTS_DELAY); + _stub->processEvents(); + + if (_stub->_pi.dirMask & PlayerInput::DIR_UP) { + _stub->_pi.dirMask &= ~PlayerInput::DIR_UP; + if (menu_entry != 0) { + --menu_entry; + } else { + menu_entry = 4; + } + } + if (_stub->_pi.dirMask & PlayerInput::DIR_DOWN) { + _stub->_pi.dirMask &= ~PlayerInput::DIR_DOWN; + if (menu_entry != 4) { + ++menu_entry; + } else { + menu_entry = 0; + } + } + if (_stub->_pi.enter) { + _stub->_pi.enter = false; + selected_menu_entry = menu_entry; + } + + if (selected_menu_entry != -1) { + switch (selected_menu_entry) { + case MENU_OPTION_ITEM_START: + new_level = 0; + quit_loop = true; + break; + case MENU_OPTION_ITEM_SKILL: + handleSkillScreen(new_skill); + reinit_screen = true; + break; + case MENU_OPTION_ITEM_PASSWORD: + if (handlePasswordScreen(new_skill, new_level)) { + quit_loop = true; + } else { + reinit_screen = true; + } + break; + case MENU_OPTION_ITEM_INFO: + handleInfoScreen(); + reinit_screen = true; + break; + case MENU_OPTION_ITEM_QUIT: + continue_game = false; + quit_loop = true; + break; + } + } + if (_stub->_pi.quit) { + continue_game = false; + quit_loop = true; + break; + } + } + _ply->stop(); + return continue_game; +} diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/menu.h b/project/jni/application/REminiscence/REminiscence-0.1.9/menu.h new file mode 100644 index 000000000..040facb4d --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/menu.h @@ -0,0 +1,67 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __MENU_H__ +#define __MENU_H__ + +#include "intern.h" + +struct ModPlayer; +struct Resource; +struct SystemStub; +struct Video; + +struct Menu { + enum { + MENU_OPTION_ITEM_START = 0, + MENU_OPTION_ITEM_SKILL, + MENU_OPTION_ITEM_PASSWORD, + MENU_OPTION_ITEM_INFO, + MENU_OPTION_ITEM_QUIT + }; + + enum { + EVENTS_DELAY = 80 + }; + + static const char *_passwords[8][3]; + + ModPlayer *_ply; + Resource *_res; + SystemStub *_stub; + Video *_vid; + + const char **_textOptions; + uint8 _charVar1; + uint8 _charVar2; + uint8 _charVar3; + uint8 _charVar4; + uint8 _charVar5; + + Menu(ModPlayer *ply, Resource *res, SystemStub *stub, Video *vid); + + void drawString(const char *str, int16 y, int16 x, uint8 color); + void drawString2(const char *str, int16 y, int16 x); + void loadPicture(const char *prefix); + void handleInfoScreen(); + void handleSkillScreen(uint8 &new_skill); + bool handlePasswordScreen(uint8 &new_skill, uint8 &new_level); + bool handleTitleScreen(uint8 &new_skill, uint8 &new_level); +}; + +#endif // __MENU_H__ diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/mixer.cpp b/project/jni/application/REminiscence/REminiscence-0.1.9/mixer.cpp new file mode 100644 index 000000000..23376bed6 --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/mixer.cpp @@ -0,0 +1,121 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "mixer.h" +#include "systemstub.h" + + +Mixer::Mixer(SystemStub *stub) + : _stub(stub) { +} + +void Mixer::init() { + memset(_channels, 0, sizeof(_channels)); + _premixHook = 0; + _mutex = _stub->createMutex(); + _stub->startAudio(Mixer::mixCallback, this); +} + +void Mixer::free() { + stopAll(); + _stub->stopAudio(); + _stub->destroyMutex(_mutex); +} + +void Mixer::setPremixHook(PremixHook premixHook, void *userData) { + debug(DBG_SND, "Mixer::setPremixHook()"); + MutexStack(_stub, _mutex); + _premixHook = premixHook; + _premixHookData = userData; +} + +void Mixer::play(const MixerChunk *mc, uint16 freq, uint8 volume) { + debug(DBG_SND, "Mixer::play(%d, %d)", freq, volume); + MutexStack(_stub, _mutex); + MixerChannel *ch = 0; + for (int i = 0; i < NUM_CHANNELS; ++i) { + MixerChannel *cur = &_channels[i]; + if (cur->active) { + if (cur->chunk.data == mc->data) { + cur->chunkPos = 0; + return; + } + } else { + ch = cur; + break; + } + } + if (ch) { + ch->active = true; + ch->volume = volume; + ch->chunk = *mc; + ch->chunkPos = 0; + ch->chunkInc = (freq << FRAC_BITS) / _stub->getOutputSampleRate(); + } +} + +uint32 Mixer::getSampleRate() const { + return _stub->getOutputSampleRate(); +} + +void Mixer::stopAll() { + debug(DBG_SND, "Mixer::stopAll()"); + MutexStack(_stub, _mutex); + for (uint8 i = 0; i < NUM_CHANNELS; ++i) { + _channels[i].active = false; + } +} + +void Mixer::mix(int8 *buf, int len) { + MutexStack(_stub, _mutex); + memset(buf, 0, len); + if (_premixHook) { + if (!_premixHook(_premixHookData, buf, len)) { + _premixHook = 0; + _premixHookData = 0; + } + } + for (uint8 i = 0; i < NUM_CHANNELS; ++i) { + MixerChannel *ch = &_channels[i]; + if (ch->active) { + for (int pos = 0; pos < len; ++pos) { + if ((ch->chunkPos >> FRAC_BITS) >= (ch->chunk.len - 1)) { + ch->active = false; + break; + } + int out = resampleLinear(&ch->chunk, ch->chunkPos, ch->chunkInc, FRAC_BITS); + addclamp(buf[pos], out * ch->volume / Mixer::MAX_VOLUME); + ch->chunkPos += ch->chunkInc; + } + } + } +} + +void Mixer::addclamp(int8& a, int b) { + int add = a + b; + if (add < -128) { + add = -128; + } else if (add > 127) { + add = 127; + } + a = add; +} + +void Mixer::mixCallback(void *param, uint8 *buf, int len) { + ((Mixer *)param)->mix((int8 *)buf, len); +} diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/mixer.h b/project/jni/application/REminiscence/REminiscence-0.1.9/mixer.h new file mode 100644 index 000000000..b02f68d58 --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/mixer.h @@ -0,0 +1,95 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __MIXER_H__ +#define __MIXER_H__ + +#include "intern.h" + +struct MixerChunk { + uint8 *data; + uint32 len; + + int8 getPCM(int offset) const { + if (offset < 0) { + offset = 0; + } else if (offset >= (int)len) { + offset = len - 1; + } + return (int8)data[offset]; + } +}; + +struct MixerChannel { + uint8 active; + uint8 volume; + MixerChunk chunk; + uint32 chunkPos; + uint32 chunkInc; +}; + +struct SystemStub; + +struct Mixer { + typedef bool (*PremixHook)(void *userData, int8 *buf, int len); + + enum { + NUM_CHANNELS = 4, + FRAC_BITS = 12, + MAX_VOLUME = 64 + }; + + void *_mutex; + SystemStub *_stub; + MixerChannel _channels[NUM_CHANNELS]; + PremixHook _premixHook; + void *_premixHookData; + + Mixer(SystemStub *stub); + void init(); + void free(); + void setPremixHook(PremixHook premixHook, void *userData); + void play(const MixerChunk *mc, uint16 freq, uint8 volume); + void stopAll(); + uint32 getSampleRate() const; + void mix(int8 *buf, int len); + + static void addclamp(int8 &a, int b); + static void mixCallback(void *param, uint8 *buf, int len); +}; + +template +int resampleLinear(T *sample, int pos, int step, int fracBits) { + const int inputPos = pos >> fracBits; + const int inputFrac = (1 << fracBits) - 1; + int out = sample->getPCM(inputPos); + out += (sample->getPCM(inputPos + 1) - out) * inputFrac >> fracBits; + return out; +} + +template +int resample3Pt(T *sample, int pos, int step, int fracBits) { + const int inputPos = pos >> fracBits; + const int inputFrac = (1 << fracBits) - 1; + int out = sample->getPCM(inputPos) >> 1; + out += sample->getPCM(inputPos + ((inputFrac - (step >> 1)) >> fracBits)) >> 2; + out += sample->getPCM(inputPos + ((inputFrac + (step >> 1)) >> fracBits)) >> 2; + return out; +} + +#endif // __MIXER_H__ diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/mod_player.cpp b/project/jni/application/REminiscence/REminiscence-0.1.9/mod_player.cpp new file mode 100644 index 000000000..1290b6586 --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/mod_player.cpp @@ -0,0 +1,523 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "file.h" +#include "mixer.h" +#include "mod_player.h" + + +ModPlayer::ModPlayer(Mixer *mixer, const char *dataPath) + : _playing(false), _mix(mixer), _dataPath(dataPath) { + memset(&_modInfo, 0, sizeof(_modInfo)); +} + +uint16 ModPlayer::findPeriod(uint16 period, uint8 fineTune) const { + for (int p = 0; p < 36; ++p) { + if (_periodTable[p] == period) { + return fineTune * 36 + p; + } + } + error("Invalid period=%d", period); + return 0; +} + +void ModPlayer::load(File *f) { + f->read(_modInfo.songName, 20); + _modInfo.songName[20] = 0; + debug(DBG_MOD, "songName = '%s'", _modInfo.songName); + + for (int s = 0; s < NUM_SAMPLES; ++s) { + SampleInfo *si = &_modInfo.samples[s]; + f->read(si->name, 22); + si->name[22] = 0; + si->len = f->readUint16BE() * 2; + si->fineTune = f->readByte(); + si->volume = f->readByte(); + si->repeatPos = f->readUint16BE() * 2; + si->repeatLen = f->readUint16BE() * 2; + si->data = 0; + assert(si->len == 0 || si->repeatPos + si->repeatLen <= si->len); + debug(DBG_MOD, "sample=%d name='%s' len=%d vol=%d", s, si->name, si->len, si->volume); + } + _modInfo.numPatterns = f->readByte(); + assert(_modInfo.numPatterns < NUM_PATTERNS); + f->readByte(); // 0x7F + f->read(_modInfo.patternOrderTable, NUM_PATTERNS); + f->readUint32BE(); // 'M.K.', Protracker, 4 channels + + uint16 n = 0; + for (int i = 0; i < NUM_PATTERNS; ++i) { + if (_modInfo.patternOrderTable[i] != 0) { + n = MAX(n, _modInfo.patternOrderTable[i]); + } + } + debug(DBG_MOD, "numPatterns=%d",n + 1); + n = (n + 1) * 64 * 4 * 4; // 64 lines of 4 notes per channel + _modInfo.patternsTable = (uint8 *)malloc(n); + assert(_modInfo.patternsTable); + f->read(_modInfo.patternsTable, n); + + for (int s = 0; s < NUM_SAMPLES; ++s) { + SampleInfo *si = &_modInfo.samples[s]; + if (si->len != 0) { + si->data = (int8 *)malloc(si->len); + if (si->data) { + f->read(si->data, si->len); + } + } + } +} + +void ModPlayer::unload() { + if (_modInfo.songName[0]) { + free(_modInfo.patternsTable); + for (int s = 0; s < NUM_SAMPLES; ++s) { + free(_modInfo.samples[s].data); + } + memset(&_modInfo, 0, sizeof(_modInfo)); + } +} + +void ModPlayer::play(uint8 num) { + if (!_playing && num < _modulesFilesCount) { + File f; + bool found = false; + for (uint8 i = 0; i < ARRAYSIZE(_modulesFiles[num]); ++i) { + if (f.open(_modulesFiles[num][i], _dataPath, "rb")) { + found = true; + break; + } + } + if (!found) { + warning("Can't find music file %d", num); + } else { + load(&f); + _currentPatternOrder = 0; + _currentPatternPos = 0; + _currentTick = 0; + _patternDelay = 0; + _songSpeed = 6; + _songTempo = 125; + _patternLoopPos = 0; + _patternLoopCount = -1; + _samplesLeft = 0; + _songNum = num; + _introSongHack = false; + memset(_tracks, 0, sizeof(_tracks)); + _mix->setPremixHook(mixCallback, this); + _playing = true; + } + } +} + +void ModPlayer::stop() { + if (_playing) { + _mix->setPremixHook(0, 0); + _playing = false; + } + unload(); +} + +void ModPlayer::handleNote(int trackNum, uint32 noteData) { + Track *tk = &_tracks[trackNum]; + uint16 sampleNum = ((noteData >> 24) & 0xF0) | ((noteData >> 12) & 0xF); + uint16 samplePeriod = (noteData >> 16) & 0xFFF; + uint16 effectData = noteData & 0xFFF; + debug(DBG_MOD, "ModPlayer::handleNote(%d) p=%d/%d sampleNumber=0x%X samplePeriod=0x%X effectData=0x%X tk->period=%d", trackNum, _currentPatternPos, _currentPatternOrder, sampleNum, samplePeriod, effectData, tk->period); + if (sampleNum != 0) { + tk->sample = &_modInfo.samples[sampleNum - 1]; + tk->volume = tk->sample->volume; + tk->pos = 0; + } + if (samplePeriod != 0) { + tk->periodIndex = findPeriod(samplePeriod, tk->sample->fineTune); + if ((effectData >> 8) != 0x3 && (effectData >> 8) != 0x5) { + tk->period = _periodTable[tk->periodIndex]; + tk->freq = PAULA_FREQ / tk->period; + } else { + tk->portamento = _periodTable[tk->periodIndex]; + } + tk->vibratoAmp = 0; + tk->vibratoSpeed = 0; + tk->vibratoPos = 0; + } + tk->effectData = effectData; +} + +void ModPlayer::applyVolumeSlide(int trackNum, int amount) { + debug(DBG_MOD, "ModPlayer::applyVolumeSlide(%d, %d)", trackNum, amount); + Track *tk = &_tracks[trackNum]; + int vol = tk->volume + amount; + if (vol < 0) { + vol = 0; + } else if (vol > 64) { + vol = 64; + } + tk->volume = vol; +} + +void ModPlayer::applyVibrato(int trackNum) { + debug(DBG_MOD, "ModPlayer::applyVibrato(%d)", trackNum); + Track *tk = &_tracks[trackNum]; + int vib = tk->vibratoAmp * _sineWaveTable[tk->vibratoPos] / 128; + if (tk->period + vib != 0) { + tk->freq = PAULA_FREQ / (tk->period + vib); + } + tk->vibratoPos += tk->vibratoSpeed; + if (tk->vibratoPos >= 64) { + tk->vibratoPos = 0; + } +} + +void ModPlayer::applyPortamento(int trackNum) { + debug(DBG_MOD, "ModPlayer::applyPortamento(%d)", trackNum); + Track *tk = &_tracks[trackNum]; + if (tk->period < tk->portamento) { + tk->period = MIN(tk->period + tk->portamentoSpeed, tk->portamento); + } else if (tk->period > tk->portamento) { + tk->period = MAX(tk->period - tk->portamentoSpeed, tk->portamento); + } + if (tk->period != 0) { + tk->freq = PAULA_FREQ / tk->period; + } +} + +void ModPlayer::handleEffect(int trackNum, bool tick) { + Track *tk = &_tracks[trackNum]; + uint8 effectNum = tk->effectData >> 8; + uint8 effectXY = tk->effectData & 0xFF; + uint8 effectX = effectXY >> 4; + uint8 effectY = effectXY & 0xF; + debug(DBG_MOD, "ModPlayer::handleEffect(%d) effectNum=0x%X effectXY=0x%X", trackNum, effectNum, effectXY); + switch (effectNum) { + case 0x0: // arpeggio + if (tick && effectXY != 0) { + uint16 period = tk->period; + switch (_currentTick & 3) { + case 1: + period = _periodTable[tk->periodIndex + effectX]; + break; + case 2: + period = _periodTable[tk->periodIndex + effectY]; + break; + } + tk->freq = PAULA_FREQ / period; + } + break; + case 0x1: // portamento up + if (tick) { + tk->period -= effectXY; + if (tk->period < 113) { // note B-3 + tk->period = 113; + } + tk->freq = PAULA_FREQ / tk->period; + } + break; + case 0x2: // portamento down + if (tick) { + tk->period += effectXY; + if (tk->period > 856) { // note C-1 + tk->period = 856; + } + tk->freq = PAULA_FREQ / tk->period; + } + break; + case 0x3: // tone portamento + if (!tick) { + if (effectXY != 0) { + tk->portamentoSpeed = effectXY; + } + } else { + applyPortamento(trackNum); + } + break; + case 0x4: // vibrato + if (!tick) { + if (effectX != 0) { + tk->vibratoSpeed = effectX; + } + if (effectY != 0) { + tk->vibratoAmp = effectY; + } + } else { + applyVibrato(trackNum); + } + break; + case 0x5: // tone portamento + volume slide + if (tick) { + applyPortamento(trackNum); + applyVolumeSlide(trackNum, effectX - effectY); + } + break; + case 0x6: // vibrato + volume slide + if (tick) { + applyVibrato(trackNum); + applyVolumeSlide(trackNum, effectX - effectY); + } + break; + case 0x9: // set sample offset + if (!tick) { + tk->pos = effectXY << (8 + FRAC_BITS); + } + break; + case 0xA: // volume slide + if (tick) { + applyVolumeSlide(trackNum, effectX - effectY); + } + break; + case 0xB: // position jump + if (!tick) { + _currentPatternOrder = effectXY; + _currentPatternPos = 0; + assert(_currentPatternOrder < _modInfo.numPatterns); + } + break; + case 0xC: // set volume + if (!tick) { + assert(effectXY <= 64); + tk->volume = effectXY; + } + break; + case 0xD: // pattern break + if (!tick) { + _currentPatternPos = effectX * 10 + effectY; + assert(_currentPatternPos < 64); + ++_currentPatternOrder; + debug(DBG_MOD, "_currentPatternPos = %d _currentPatternOrder = %d", _currentPatternPos, _currentPatternOrder); + } + break; + case 0xE: // extended effects + switch (effectX) { + case 0x0: // set filter, ignored + break; + case 0x1: // fineslide up + if (!tick) { + tk->period -= effectY; + if (tk->period < 113) { // B-3 note + tk->period = 113; + } + tk->freq = PAULA_FREQ / tk->period; + } + break; + case 0x2: // fineslide down + if (!tick) { + tk->period += effectY; + if (tk->period > 856) { // C-1 note + tk->period = 856; + } + tk->freq = PAULA_FREQ / tk->period; + } + break; + case 0x6: // loop pattern + if (!tick) { + if (effectY == 0) { + _patternLoopPos = _currentPatternPos | (_currentPatternOrder << 8); + debug(DBG_MOD, "_patternLoopPos=%d/%d", _currentPatternPos, _currentPatternOrder); + } else { + if (_patternLoopCount == -1) { + _patternLoopCount = effectY; + _currentPatternPos = _patternLoopPos & 0xFF; + _currentPatternOrder = _patternLoopPos >> 8; + } else { + --_patternLoopCount; + if (_patternLoopCount != 0) { + _currentPatternPos = _patternLoopPos & 0xFF; + _currentPatternOrder = _patternLoopPos >> 8; + } else { + _patternLoopCount = -1; + } + } + debug(DBG_MOD, "_patternLoopCount=%d", _patternLoopCount); + } + } + break; + case 0x9: // retrigger sample + if (tick) { + tk->retriggerCounter = effectY; + } else { + if (tk->retriggerCounter == 0) { + tk->pos = 0; + tk->retriggerCounter = effectY; + debug(DBG_MOD, "retrigger sample=%d _songSpeed=%d", effectY, _songSpeed); + } + --tk->retriggerCounter; + } + break; + case 0xA: // fine volume slide up + if (!tick) { + applyVolumeSlide(trackNum, effectY); + } + break; + case 0xB: // fine volume slide down + if (!tick) { + applyVolumeSlide(trackNum, -effectY); + } + break; + case 0xC: // cut sample + if (!tick) { + tk->cutCounter = effectY; + } else { + --tk->cutCounter; + if (tk->cutCounter == 0) { + tk->volume = 0; + } + } + case 0xD: // delay sample + if (!tick) { + tk->delayCounter = effectY; + } else { + if (tk->delayCounter != 0) { + --tk->delayCounter; + } + } + break; + case 0xE: // delay pattern + if (!tick) { + debug(DBG_MOD, "ModPlayer::handleEffect() _currentTick=%d delay pattern=%d", _currentTick, effectY); + _patternDelay = effectY; + } + break; + default: + warning("Unhandled extended effect 0x%X params=0x%X", effectX, effectY); + break; + } + break; + case 0xF: // set speed + if (!tick) { + if (effectXY < 0x20) { + _songSpeed = effectXY; + } else { + _songTempo = effectXY; + } + } + break; + default: + warning("Unhandled effect 0x%X params=0x%X", effectNum, effectXY); + break; + } +} + +void ModPlayer::handleTick() { + if (!_playing) { + return; + } +// if (_patternDelay != 0) { +// --_patternDelay; +// return; +// } + if (_currentTick == 0) { + debug(DBG_MOD, "_currentPatternOrder=%d _currentPatternPos=%d", _currentPatternOrder, _currentPatternPos); + uint8 currentPattern = _modInfo.patternOrderTable[_currentPatternOrder]; + const uint8 *p = _modInfo.patternsTable + (currentPattern * 64 + _currentPatternPos) * 16; + for (int i = 0; i < NUM_TRACKS; ++i) { + uint32 noteData = READ_BE_UINT32(p); + handleNote(i, noteData); + p += 4; + } + ++_currentPatternPos; + if (_currentPatternPos == 64) { + ++_currentPatternOrder; + _currentPatternPos = 0; + debug(DBG_MOD, "ModPlayer::handleTick() _currentPatternOrder = %d/%d", _currentPatternOrder, _modInfo.numPatterns); + // On the amiga version, the introduction cutscene is shorter than the PC version ; + // so the music module doesn't synchronize at all with the PC datafiles, here we + // add a hack to let the music play longer + if (_songNum == 0 && _currentPatternOrder == 3 && !_introSongHack) { + _currentPatternOrder = 1; + _introSongHack = true; +// warning("Introduction module synchronization hack"); + } + } + } + for (int i = 0; i < NUM_TRACKS; ++i) { + handleEffect(i, (_currentTick != 0)); + } + ++_currentTick; + if (_currentTick == _songSpeed) { + _currentTick = 0; + } + if (_currentPatternOrder == _modInfo.numPatterns) { + debug(DBG_MOD, "ModPlayer::handleEffect() _currentPatternOrder == _modInfo.numPatterns"); + _playing = false; + } +} + +void ModPlayer::mixSamples(int8 *buf, int samplesLen) { + for (int i = 0; i < NUM_TRACKS; ++i) { + Track *tk = &_tracks[i]; + if (tk->sample != 0 && tk->delayCounter == 0) { + int8 *mixbuf = buf; + SampleInfo *si = tk->sample; + int len = si->len << FRAC_BITS; + int loopLen = si->repeatLen << FRAC_BITS; + int loopPos = si->repeatPos << FRAC_BITS; + int deltaPos = (tk->freq << FRAC_BITS) / _mix->getSampleRate(); + int curLen = samplesLen; + int pos = tk->pos; + while (curLen != 0) { + int count; + if (loopLen > (2 << FRAC_BITS)) { + if (pos >= loopPos + loopLen) { + pos -= loopLen; + } + count = MIN(curLen, (loopPos + loopLen - pos - 1) / deltaPos + 1); + curLen -= count; + } else { + if (pos >= len) { + count = 0; + } else { + count = MIN(curLen, (len - pos - 1) / deltaPos + 1); + } + curLen = 0; + } + while (count--) { + int out = resample3Pt(si, pos, deltaPos, FRAC_BITS); + Mixer::addclamp(*mixbuf++, out * tk->volume / 64); + pos += deltaPos; + } + } + tk->pos = pos; + } + } +} + +bool ModPlayer::mix(int8 *buf, int len) { + if (_playing) { + memset(buf, 0, len); + const int samplesPerTick = _mix->getSampleRate() / (50 * _songTempo / 125); + while (len != 0) { + if (_samplesLeft == 0) { + handleTick(); + _samplesLeft = samplesPerTick; + } + int count = _samplesLeft; + if (count > len) { + count = len; + } + _samplesLeft -= count; + len -= count; + mixSamples(buf, count); + buf += count; + } + } + return _playing; +} + +bool ModPlayer::mixCallback(void *param, int8 *buf, int len) { + return ((ModPlayer *)param)->mix(buf, len); +} diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/mod_player.h b/project/jni/application/REminiscence/REminiscence-0.1.9/mod_player.h new file mode 100644 index 000000000..785e28729 --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/mod_player.h @@ -0,0 +1,122 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __MOD_PLAYER_H__ +#define __MOD_PLAYER_H__ + +#include "intern.h" + +struct File; +struct Mixer; + +struct ModPlayer { + enum { + NUM_SAMPLES = 31, + NUM_TRACKS = 4, + NUM_PATTERNS = 128, + FRAC_BITS = 12, + PAULA_FREQ = 3546897 + }; + + struct SampleInfo { + char name[23]; + uint16 len; + uint8 fineTune; + uint8 volume; + uint16 repeatPos; + uint16 repeatLen; + int8 *data; + + int8 getPCM(int offset) const { + if (offset < 0) { + offset = 0; + } else if (offset >= (int)len) { + offset = len - 1; + } + return data[offset]; + } + }; + + struct ModuleInfo { + char songName[21]; + SampleInfo samples[NUM_SAMPLES]; + uint8 numPatterns; + uint8 patternOrderTable[NUM_PATTERNS]; + uint8 *patternsTable; + }; + + struct Track { + SampleInfo *sample; + uint8 volume; + int pos; + int freq; + uint16 period; + uint16 periodIndex; + uint16 effectData; + int vibratoSpeed; + int vibratoAmp; + int vibratoPos; + int portamento; + int portamentoSpeed; + int retriggerCounter; + int delayCounter; + int cutCounter; + }; + + static const int8 _sineWaveTable[]; + static const uint16 _periodTable[]; + static const char *_modulesFiles[][2]; + static const int _modulesFilesCount; + + ModuleInfo _modInfo; + uint8 _currentPatternOrder; + uint8 _currentPatternPos; + uint8 _currentTick; + uint8 _songSpeed; + uint8 _songTempo; + int _patternDelay; + int _patternLoopPos; + int _patternLoopCount; + int _samplesLeft; + uint8 _songNum; + bool _introSongHack; + bool _playing; + Track _tracks[NUM_TRACKS]; + Mixer *_mix; + const char *_dataPath; + + ModPlayer(Mixer *mixer, const char *dataPath); + + uint16 findPeriod(uint16 period, uint8 fineTune) const; + void load(File *f); + void unload(); + void play(uint8 num); + void stop(); + void handleNote(int trackNum, uint32 noteData); + void handleTick(); + void applyVolumeSlide(int trackNum, int amount); + void applyVibrato(int trackNum); + void applyPortamento(int trackNum); + void handleEffect(int trackNum, bool tick); + void mixSamples(int8 *buf, int len); + bool mix(int8 *buf, int len); + + static bool mixCallback(void *param, int8 *buf, int len); +}; + +#endif // __MOD_PLAYER_H__ diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/piege.cpp b/project/jni/application/REminiscence/REminiscence-0.1.9/piege.cpp new file mode 100644 index 000000000..fdcea8d53 --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/piege.cpp @@ -0,0 +1,2269 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "cutscene.h" +#include "resource.h" +#include "systemstub.h" +#include "game.h" + + +void Game::pge_resetGroups() { + memset(_pge_groupsTable, 0, sizeof(_pge_groupsTable)); + GroupPGE *le = &_pge_groups[0]; + _pge_nextFreeGroup = le; + int n = 0xFF; + while (n--) { + le->next_entry = le + 1; + le->index = 0; + le->group_id = 0; + ++le; + } + le->next_entry = 0; + le->index = 0; + le->group_id = 0; +} + +void Game::pge_removeFromGroup(uint8 idx) { + GroupPGE *le = _pge_groupsTable[idx]; + if (le) { + _pge_groupsTable[idx] = 0; + GroupPGE *next = _pge_nextFreeGroup; + while (le) { + GroupPGE *cur = le->next_entry; + le->next_entry = next; + le->index = 0; + le->group_id = 0; + next = le; + le = cur; + } + _pge_nextFreeGroup = next; + } +} + +int Game::pge_isInGroup(LivePGE *pge_dst, uint16 group_id, uint16 counter) { + assert(counter >= 1 && counter <= 4); + uint16 c = pge_dst->init_PGE->counter_values[counter - 1]; + GroupPGE *le = _pge_groupsTable[pge_dst->index]; + while (le) { + if (le->group_id == group_id && le->index == c) + return 1; + le = le->next_entry; + } + return 0; +} + +void Game::pge_loadForCurrentLevel(uint16 idx) { + debug(DBG_PGE, "Game::pge_loadForCurrentLevel() idx=%d", idx); + + LivePGE *live_pge = &_pgeLive[idx]; + InitPGE *init_pge = &_res._pgeInit[idx]; + + live_pge->init_PGE = init_pge; + live_pge->obj_type = init_pge->type; + live_pge->pos_x = init_pge->pos_x; + live_pge->pos_y = init_pge->pos_y; + live_pge->anim_seq = 0; + live_pge->room_location = init_pge->init_room; + + live_pge->life = init_pge->life; + if (_skillLevel >= 2 && init_pge->object_type == 10) { + live_pge->life *= 2; + } + live_pge->counter_value = 0; + live_pge->collision_slot = 0xFF; + live_pge->next_inventory_PGE = 0xFF; + live_pge->current_inventory_PGE = 0xFF; + live_pge->unkF = 0xFF; + live_pge->anim_number = 0; + live_pge->index = idx; + live_pge->next_PGE_in_room = 0; + + uint16 flags = 0; + if (init_pge->skill <= _skillLevel) { + if (init_pge->room_location != 0 || ((init_pge->flags & 4) && (_currentRoom == init_pge->init_room))) { + flags |= 4; + _pge_liveTable2[idx] = live_pge; + } + if (init_pge->mirror_x != 0) { + flags |= 1; + } + if (init_pge->init_flags & 8) { + flags |= 0x10; + } + flags |= (init_pge->init_flags & 3) << 5; + if (init_pge->flags & 2) { + flags |= 0x80; + } + live_pge->flags = flags; + assert(init_pge->obj_node_number < _res._numObjectNodes); + ObjectNode *on = _res._objectNodesMap[init_pge->obj_node_number]; + Object *obj = on->objects; + int i = 0; + while (obj->type != live_pge->obj_type) { + ++i; + ++obj; + } + assert(i < on->num_objects); + live_pge->first_obj_number = i; + pge_setupDefaultAnim(live_pge); + } +} + +void Game::pge_process(LivePGE *pge) { + debug(DBG_PGE, "Game::pge_process() pge_num=%d", pge - &_pgeLive[0]); + _pge_playAnimSound = true; + _pge_currentPiegeFacingDir = (pge->flags & 1) != 0; + _pge_currentPiegeRoom = pge->room_location; + GroupPGE *le = _pge_groupsTable[pge->index]; + if (le) { + pge_setupNextAnimFrame(pge, le); + } + const uint8 *anim_data = _res._ani + READ_LE_UINT16(_res._ani + 2 * pge->obj_type); + if (READ_LE_UINT16(anim_data) <= pge->anim_seq) { + InitPGE *init_pge = pge->init_PGE; + assert(init_pge->obj_node_number < _res._numObjectNodes); + ObjectNode *on = _res._objectNodesMap[init_pge->obj_node_number]; + Object *obj = &on->objects[pge->first_obj_number]; + while (1) { + if (obj->type != pge->obj_type) { + pge_removeFromGroup(pge->index); + return; + } + uint16 _ax = pge_execute(pge, init_pge, obj); + if (_ax != 0) { + anim_data = _res._ani + READ_LE_UINT16(_res._ani + 2 * pge->obj_type); + uint8 snd = anim_data[2]; + if (snd) { + pge_playAnimSound(pge, snd); + } + pge_setupOtherPieges(pge, init_pge); + break; + } + ++obj; + } + } + pge_setupAnim(pge); + ++pge->anim_seq; + pge_removeFromGroup(pge->index); +} + +void Game::pge_setupNextAnimFrame(LivePGE *pge, GroupPGE *le) { + InitPGE *init_pge = pge->init_PGE; + assert(init_pge->obj_node_number < _res._numObjectNodes); + ObjectNode *on = _res._objectNodesMap[init_pge->obj_node_number]; + Object *obj = &on->objects[pge->first_obj_number]; + int i = pge->first_obj_number; + while (i < on->last_obj_number && pge->obj_type == obj->type) { + GroupPGE *next_le = le; + while (next_le) { + uint16 groupId = next_le->group_id; + if (obj->opcode2 == 0x6B) { // pge_op_isInGroupSlice + if (obj->opcode_arg2 == 0) { + if (groupId == 1 || groupId == 2) goto set_anim; + } + if (obj->opcode_arg2 == 1) { + if (groupId == 3 || groupId == 4) goto set_anim; + } + } else if (groupId == obj->opcode_arg2) { + if (obj->opcode2 == 0x22 || obj->opcode2 == 0x6F) goto set_anim; + } + if (obj->opcode1 == 0x6B) { // pge_op_isInGroupSlice + if (obj->opcode_arg1 == 0) { + if (groupId == 1 || groupId == 2) goto set_anim; + } + if (obj->opcode_arg1 == 1) { + if (groupId == 3 || groupId == 4) goto set_anim; + } + } else if (groupId == obj->opcode_arg1) { + if (obj->opcode1 == 0x22 || obj->opcode1 == 0x6F) goto set_anim; + } + next_le = next_le->next_entry; + } + ++obj; + ++i; + } + return; + +set_anim: + const uint8 *anim_data = _res._ani + READ_LE_UINT16(_res._ani + pge->obj_type * 2); + uint8 _dh = anim_data[0]; + uint8 _dl = pge->anim_seq; + const uint8 *anim_frame = anim_data + 6 + _dl * 4; + while (_dh > _dl) { + if (READ_LE_UINT16(anim_frame) != 0xFFFF) { + if (_pge_currentPiegeFacingDir) { + pge->pos_x -= (int8)anim_frame[2]; + } else { + pge->pos_x += (int8)anim_frame[2]; + } + pge->pos_y += (int8)anim_frame[3]; + } + anim_frame += 4; + ++_dl; + } + pge->anim_seq = _dh; + _col_currentPiegeGridPosY = (pge->pos_y / 36) & ~1; + _col_currentPiegeGridPosX = (pge->pos_x + 8) >> 4; +} + +void Game::pge_playAnimSound(LivePGE *pge, uint16 arg2) { + if ((pge->flags & 4) && _pge_playAnimSound) { + uint8 sfxId = (arg2 & 0xFF) - 1; + if (_currentRoom == pge->room_location) { + playSound(sfxId, 0); + } else { + if (_res._ctData[CT_DOWN_ROOM + _currentRoom] == pge->room_location || + _res._ctData[CT_UP_ROOM + _currentRoom] == pge->room_location || + _res._ctData[CT_RIGHT_ROOM + _currentRoom] == pge->room_location || + _res._ctData[CT_LEFT_ROOM + _currentRoom] == pge->room_location) { + playSound(sfxId, 1); + } + } + } +} + +void Game::pge_setupAnim(LivePGE *pge) { + debug(DBG_PGE, "Game::pge_setupAnim() pgeNum=%d", pge - &_pgeLive[0]); + const uint8 *anim_data = _res._ani + READ_LE_UINT16(_res._ani + pge->obj_type * 2); + if (anim_data[0] < pge->anim_seq) { + pge->anim_seq = 0; + } + const uint8 *anim_frame = anim_data + 6 + pge->anim_seq * 4; + if (READ_LE_UINT16(anim_frame) != 0xFFFF) { + uint16 fl = READ_LE_UINT16(anim_frame); + if (pge->flags & 1) { + fl ^= 0x8000; + pge->pos_x -= (int8)anim_frame[2]; + } else { + pge->pos_x += (int8)anim_frame[2]; + } + pge->pos_y += (int8)anim_frame[3]; + pge->flags &= ~2; + if (fl & 0x8000) { + pge->flags |= 2; + } + pge->flags &= ~8; + if (READ_LE_UINT16(anim_data + 4) & 0xFF) { + pge->flags |= 8; + } + pge->anim_number = READ_LE_UINT16(anim_frame) & 0x7FFF; + } +} + +int Game::pge_execute(LivePGE *live_pge, InitPGE *init_pge, const Object *obj) { + debug(DBG_PGE, "Game::pge_execute() pge_num=%d op1=0x%X op2=0x%X op3=0x%X", live_pge - &_pgeLive[0], obj->opcode1, obj->opcode2, obj->opcode3); + pge_OpcodeProc op; + ObjectOpcodeArgs args; + if (obj->opcode1) { + args.pge = live_pge; + args.a = obj->opcode_arg1; + args.b = 0; + debug(DBG_PGE, "pge_execute op1=0x%X", obj->opcode1); + op = _pge_opcodeTable[obj->opcode1]; + if (!op) { + warning("Game::pge_execute() missing call to pge_opcode 0x%X", obj->opcode1); + return 0; + } + if (!((this->*op)(&args) & 0xFF)) + return 0; + } + if (obj->opcode2) { + args.pge = live_pge; + args.a = obj->opcode_arg2; + args.b = obj->opcode_arg1; + debug(DBG_PGE, "pge_execute op2=0x%X", obj->opcode2); + op = _pge_opcodeTable[obj->opcode2]; + if (!op) { + warning("Game::pge_execute() missing call to pge_opcode 0x%X", obj->opcode2); + return 0; + } + if (!((this->*op)(&args) & 0xFF)) + return 0; + } + if (obj->opcode3) { + args.pge = live_pge; + args.a = obj->opcode_arg3; + args.b = 0; + debug(DBG_PGE, "pge_execute op3=0x%X", obj->opcode3); + op = _pge_opcodeTable[obj->opcode3]; + if (op) { + (this->*op)(&args); + } else { + warning("Game::pge_execute() missing call to pge_opcode 0x%X", obj->opcode3); + } + } + live_pge->obj_type = obj->init_obj_type; + live_pge->first_obj_number = obj->init_obj_number; + live_pge->anim_seq = 0; + if (obj->flags & 0xF0) { + _score += _scoreTable[obj->flags >> 4]; + } + if (obj->flags & 1) { + live_pge->flags ^= 1; + } + if (obj->flags & 2) { + --live_pge->life; + if (init_pge->object_type == 1) { + _pge_processOBJ = true; + } else if (init_pge->object_type == 10) { + _score += 100; + } + } + if (obj->flags & 4) { + ++live_pge->life; + } + if (obj->flags & 8) { + live_pge->life = 0xFFFF; + } + + if (live_pge->flags & 1) { + live_pge->pos_x -= obj->dx; + } else { + live_pge->pos_x += obj->dx; + } + live_pge->pos_y += obj->dy; + + if (_pge_processOBJ) { + if (init_pge->object_type == 1) { + if (pge_processOBJ(live_pge) != 0) { + _blinkingConradCounter = 60; + _pge_processOBJ = false; + } + } + } + return 0xFFFF; +} + +void Game::pge_prepare() { + col_clearState(); + if (!(_currentRoom & 0x80)) { + LivePGE *pge = _pge_liveTable1[_currentRoom]; + while (pge) { + col_preparePiegeState(pge); + if (!(pge->flags & 4) && (pge->init_PGE->flags & 4)) { + _pge_liveTable2[pge->index] = pge; + pge->flags |= 4; + } + pge = pge->next_PGE_in_room; + } + } + for (uint16 i = 0; i < _res._pgeNum; ++i) { + LivePGE *pge = _pge_liveTable2[i]; + if (pge && _currentRoom != pge->room_location) { + col_preparePiegeState(pge); + } + } +} + +void Game::pge_setupDefaultAnim(LivePGE *pge) { + const uint8 *anim_data = _res._ani + READ_LE_UINT16(_res._ani + pge->obj_type * 2); + if (pge->anim_seq < anim_data[0]) { + pge->anim_seq = 0; + } + const uint8 *anim_frame = anim_data + 6 + pge->anim_seq * 4; + if (READ_LE_UINT16(anim_frame) != 0xFFFF) { + uint16 f = READ_LE_UINT16(anim_data); + if (pge->flags & 1) { + f ^= 0x8000; + } + pge->flags &= ~2; + if (f & 0x8000) { + pge->flags |= 2; + } + pge->flags &= ~8; + if (READ_LE_UINT16(anim_data + 4) & 0xFFFF) { + pge->flags |= 8; + } + pge->anim_number = READ_LE_UINT16(anim_frame) & 0x7FFF; + debug(DBG_PGE, "Game::pge_setupDefaultAnim() pgeNum=%d pge->flags=0x%X pge->anim_number=0x%X pge->anim_seq=0x%X", pge - &_pgeLive[0], pge->flags, pge->anim_number, pge->anim_seq); + } +} + +uint16 Game::pge_processOBJ(LivePGE *pge) { + InitPGE *init_pge = pge->init_PGE; + assert(init_pge->obj_node_number < _res._numObjectNodes); + ObjectNode *on = _res._objectNodesMap[init_pge->obj_node_number]; + Object *obj = &on->objects[pge->first_obj_number]; + int i = pge->first_obj_number; + while (i < on->last_obj_number && pge->obj_type == obj->type) { + if (obj->opcode2 == 0x6B) return 0xFFFF; + if (obj->opcode2 == 0x22 && obj->opcode_arg2 <= 4) return 0xFFFF; + + if (obj->opcode1 == 0x6B) return 0xFFFF; + if (obj->opcode1 == 0x22 && obj->opcode_arg1 <= 4) return 0xFFFF; + + ++obj; + ++i; + } + return 0; +} + +void Game::pge_setupOtherPieges(LivePGE *pge, InitPGE *init_pge) { + const int8 *room_ct_data = 0; + if (pge->pos_x <= -10) { + pge->pos_x += 256; + room_ct_data = &_res._ctData[CT_LEFT_ROOM]; + } else if (pge->pos_x >= 256) { + pge->pos_x -= 256; + room_ct_data = &_res._ctData[CT_RIGHT_ROOM]; + } else if (pge->pos_y < 0) { + pge->pos_y += 216; + room_ct_data = &_res._ctData[CT_UP_ROOM]; + } else if (pge->pos_y >= 216) { + pge->pos_y -= 216; + room_ct_data = &_res._ctData[CT_DOWN_ROOM]; + } + if (room_ct_data) { + int8 room = pge->room_location; + if (room >= 0) { + room = room_ct_data[room]; + pge->room_location = room; + } + if (init_pge->object_type == 1) { + _currentRoom = room; + col_prepareRoomState(); + _loadMap = true; + if (!(_currentRoom & 0x80) && _currentRoom < 0x40) { + LivePGE *pge_it = _pge_liveTable1[_currentRoom]; + while (pge_it) { + if (pge_it->init_PGE->flags & 4) { + _pge_liveTable2[pge_it->index] = pge_it; + pge_it->flags |= 4; + } + pge_it = pge_it->next_PGE_in_room; + } + room = _res._ctData[CT_UP_ROOM + _currentRoom]; + if (room >= 0 && room < 0x40) { + pge_it = _pge_liveTable1[room]; + while (pge_it) { + if (pge_it->init_PGE->object_type != 10 && pge_it->pos_y >= 48 && (pge_it->init_PGE->flags & 4)) { + _pge_liveTable2[pge_it->index] = pge_it; + pge_it->flags |= 4; + } + pge_it = pge_it->next_PGE_in_room; + } + } + room = _res._ctData[CT_DOWN_ROOM + _currentRoom]; + if (room >= 0 && room < 0x40) { + pge_it = _pge_liveTable1[room]; + while (pge_it) { + if (pge_it->init_PGE->object_type != 10 && pge_it->pos_y >= 176 && (pge_it->init_PGE->flags & 4)) { + _pge_liveTable2[pge_it->index] = pge_it; + pge_it->flags |= 4; + } + pge_it = pge_it->next_PGE_in_room; + } + } + } + } + } + pge_addToCurrentRoomList(pge, _pge_currentPiegeRoom); +} + +void Game::pge_addToCurrentRoomList(LivePGE *pge, uint8 room) { + debug(DBG_PGE, "Game::pge_addToCurrentRoomList() pgeNum=%d room=%d", pge - &_pgeLive[0], room); + if (room != pge->room_location) { + LivePGE *cur_pge = _pge_liveTable1[room]; + LivePGE *prev_pge = 0; + while (cur_pge && cur_pge != pge) { + prev_pge = cur_pge; + cur_pge = cur_pge->next_PGE_in_room; + } + if (cur_pge) { + if (!prev_pge) { + _pge_liveTable1[room] = pge->next_PGE_in_room; + } else { + prev_pge->next_PGE_in_room = cur_pge->next_PGE_in_room; + } + LivePGE *temp = _pge_liveTable1[pge->room_location]; + pge->next_PGE_in_room = temp; + _pge_liveTable1[pge->room_location] = pge; + } + } +} + +void Game::pge_getInput() { + inp_update(); + _inp_lastKeysHit = _stub->_pi.dirMask; + if (_stub->_pi.mirrorMode && (_inp_lastKeysHit & 0xC)) { + _inp_lastKeysHit ^= 0xC; // invert left/right + } + if ((_inp_lastKeysHit & 0xC) && (_inp_lastKeysHit & 0x3)) { + const uint8 mask = (_inp_lastKeysHit & 0xF0) | (_inp_lastKeysHitLeftRight & 0xF); + _pge_inpKeysMask = mask; + _inp_lastKeysHit = mask; + } else { + _pge_inpKeysMask = _inp_lastKeysHit; + _inp_lastKeysHitLeftRight = _inp_lastKeysHit; + } + if (_stub->_pi.enter) { + _pge_inpKeysMask |= 0x10; + } + if (_stub->_pi.space) { + _pge_inpKeysMask |= 0x20; + } + if (_stub->_pi.shift) { + _pge_inpKeysMask |= 0x40; + } +} + +int Game::pge_op_isInpUp(ObjectOpcodeArgs *args) { + if (1 == _pge_inpKeysMask) { + return 0xFFFF; + } else { + return 0; + } +} + +int Game::pge_op_isInpBackward(ObjectOpcodeArgs *args) { + uint8 mask = 8; // right + if (_pge_currentPiegeFacingDir) { + mask = 4; // left + } + if (mask == _pge_inpKeysMask) { + return 0xFFFF; + } else { + return 0; + } +} + +int Game::pge_op_isInpDown(ObjectOpcodeArgs *args) { + if (2 == _pge_inpKeysMask) { + return 0xFFFF; + } else { + return 0; + } +} + +int Game::pge_op_isInpForward(ObjectOpcodeArgs *args) { + uint8 mask = 4; + if (_pge_currentPiegeFacingDir) { + mask = 8; + } + if (mask == _pge_inpKeysMask) { + return 0xFFFF; + } else { + return 0; + } +} + +int Game::pge_op_isInpUpMod(ObjectOpcodeArgs *args) { + assert(args->a < 3); + uint8 mask = _pge_modKeysTable[args->a] | 1; + if (mask == _pge_inpKeysMask) { + return 0xFFFF; + } else { + return 0; + } +} + +int Game::pge_op_isInpBackwardMod(ObjectOpcodeArgs *args) { + assert(args->a < 3); + uint8 mask = _pge_modKeysTable[args->a]; + if (_pge_currentPiegeFacingDir) { + mask |= 4; + } else { + mask |= 8; + } + if (mask == _pge_inpKeysMask) { + return 0xFFFF; + } else { + return 0; + } +} + +int Game::pge_op_isInpDownMod(ObjectOpcodeArgs *args) { + assert(args->a < 3); + uint8 mask = _pge_modKeysTable[args->a] | 2; + if (mask == _pge_inpKeysMask) { + return 0xFFFF; + } else { + return 0; + } +} + +int Game::pge_op_isInpForwardMod(ObjectOpcodeArgs *args) { + assert(args->a < 3); + uint8 mask = _pge_modKeysTable[args->a]; + if (_pge_currentPiegeFacingDir) { + mask |= 8; + } else { + mask |= 4; + } + if (mask == _pge_inpKeysMask) { + return 0xFFFF; + } else { + return 0; + } +} + +int Game::pge_op_isInpIdle(ObjectOpcodeArgs *args) { + if (_pge_inpKeysMask == 0) { + return 0xFFFF; + } else { + return 0; + } +} + +int Game::pge_op_isInpNoMod(ObjectOpcodeArgs *args) { + assert(args->a < 3); + uint8 mask = _pge_modKeysTable[args->a]; + if (((_pge_inpKeysMask & 0xF) | mask) == _pge_inpKeysMask) { + return 0xFFFF; + } else { + return 0; + } +} + +int Game::pge_op_getCollision0u(ObjectOpcodeArgs *args) { + return col_getGridData(args->pge, 0, -args->a); +} + +int Game::pge_op_getCollision00(ObjectOpcodeArgs *args) { + return col_getGridData(args->pge, 0, 0); +} + +int Game::pge_op_getCollision0d(ObjectOpcodeArgs *args) { + return col_getGridData(args->pge, 0, args->a); +} + +int Game::pge_op_getCollision1u(ObjectOpcodeArgs *args) { + return col_getGridData(args->pge, 1, -args->a); +} + +int Game::pge_op_getCollision10(ObjectOpcodeArgs *args) { + return col_getGridData(args->pge, 1, 0); +} + +int Game::pge_op_getCollision1d(ObjectOpcodeArgs *args) { + return col_getGridData(args->pge, 1, args->a); +} + +int Game::pge_op_getCollision2u(ObjectOpcodeArgs *args) { + return col_getGridData(args->pge, 2, -args->a); +} + +int Game::pge_op_getCollision20(ObjectOpcodeArgs *args) { + return col_getGridData(args->pge, 2, 0); +} + +int Game::pge_op_getCollision2d(ObjectOpcodeArgs *args) { + return col_getGridData(args->pge, 2, args->a); +} + +int Game::pge_op_doesNotCollide0u(ObjectOpcodeArgs *args) { + int16 r = col_getGridData(args->pge, 0, -args->a); + if (r & 0xFFFF) { + return 0; + } else { + return 0xFFFF; + } +} + +int Game::pge_op_doesNotCollide00(ObjectOpcodeArgs *args) { + int16 r = col_getGridData(args->pge, 0, 0); + if (r & 0xFFFF) { + return 0; + } else { + return 0xFFFF; + } +} + +int Game::pge_op_doesNotCollide0d(ObjectOpcodeArgs *args) { + int16 r = col_getGridData(args->pge, 0, args->a); + if (r & 0xFFFF) { + return 0; + } else { + return 0xFFFF; + } +} + +int Game::pge_op_doesNotCollide1u(ObjectOpcodeArgs *args) { + int16 r = col_getGridData(args->pge, 1, -args->a); + if (r & 0xFFFF) { + return 0; + } else { + return 0xFFFF; + } +} + +int Game::pge_op_doesNotCollide10(ObjectOpcodeArgs *args) { + int16 r = col_getGridData(args->pge, 1, 0); + if (r & 0xFFFF) { + return 0; + } else { + return 0xFFFF; + } +} + +int Game::pge_op_doesNotCollide1d(ObjectOpcodeArgs *args) { + int16 r = col_getGridData(args->pge, 1, args->a); + if (r & 0xFFFF) { + return 0; + } else { + return 0xFFFF; + } +} + +int Game::pge_op_doesNotCollide2u(ObjectOpcodeArgs *args) { + int16 r = col_getGridData(args->pge, 2, -args->a); + if (r & 0xFFFF) { + return 0; + } else { + return 0xFFFF; + } +} + +int Game::pge_op_doesNotCollide20(ObjectOpcodeArgs *args) { + int16 r = col_getGridData(args->pge, 2, 0); + if (r & 0xFFFF) { + return 0; + } else { + return 0xFFFF; + } +} + +int Game::pge_op_doesNotCollide2d(ObjectOpcodeArgs *args) { + int16 r = col_getGridData(args->pge, 2, args->a); + if (r & 0xFFFF) { + return 0; + } else { + return 0xFFFF; + } +} + +int Game::pge_op_collides0o0d(ObjectOpcodeArgs *args) { + if (col_getGridData(args->pge, 0, args->a) & 0xFFFF) { + if (col_getGridData(args->pge, 0, args->a + 1) == 0) { + if (col_getGridData(args->pge, -1, args->a) == 0) { + return 0xFFFF; + } + } + } + return 0; +} + +int Game::pge_op_collides2o2d(ObjectOpcodeArgs *args) { + if (col_getGridData(args->pge, 2, args->a) & 0xFFFF) { + if (col_getGridData(args->pge, 2, args->a + 1) == 0) { + if (col_getGridData(args->pge, 1, args->a) == 0) { + return 0xFFFF; + } + } + } + return 0; +} + +int Game::pge_op_collides0o0u(ObjectOpcodeArgs *args) { + if (col_getGridData(args->pge, 0, args->a) & 0xFFFF) { + if (col_getGridData(args->pge, 0, args->a - 1) == 0) { + if (col_getGridData(args->pge, -1, args->a) == 0) { + return 0xFFFF; + } + } + } + return 0; +} + +int Game::pge_op_collides2o2u(ObjectOpcodeArgs *args) { + if (col_getGridData(args->pge, 2, args->a) & 0xFFFF) { + if (col_getGridData(args->pge, 2, args->a - 1) == 0) { + if (col_getGridData(args->pge, 1, args->a) == 0) { + return 0xFFFF; + } + } + } + return 0; +} + +int Game::pge_op_collides2u2o(ObjectOpcodeArgs *args) { + if (col_getGridData(args->pge, 2, args->a - 1) & 0xFFFF) { + if (col_getGridData(args->pge, 2, args->a) == 0) { + if (col_getGridData(args->pge, 1, args->a - 1) == 0) { + return 0xFFFF; + } + } + } + return 0; +} + +int Game::pge_op_isInGroup(ObjectOpcodeArgs *args) { + GroupPGE *le = _pge_groupsTable[args->pge->index]; + while (le) { + if (le->group_id == args->a) { + return 0xFFFF; + } + le = le->next_entry; + } + return 0; +} + +int Game::pge_op_updateGroup0(ObjectOpcodeArgs *args) { + LivePGE *pge = args->pge; + pge_updateGroup(pge->index, pge->init_PGE->counter_values[0], args->a); + return 0xFFFF; +} + +int Game::pge_op_updateGroup1(ObjectOpcodeArgs *args) { + LivePGE *pge = args->pge; + pge_updateGroup(pge->index, pge->init_PGE->counter_values[1], args->a); + return 0xFFFF; +} + +int Game::pge_op_updateGroup2(ObjectOpcodeArgs *args) { + LivePGE *pge = args->pge; + pge_updateGroup(pge->index, pge->init_PGE->counter_values[2], args->a); + return 0xFFFF; +} + +int Game::pge_op_updateGroup3(ObjectOpcodeArgs *args) { + LivePGE *pge = args->pge; + pge_updateGroup(pge->index, pge->init_PGE->counter_values[3], args->a); + return 0xFFFF; +} + +int Game::pge_op_isPiegeDead(ObjectOpcodeArgs *args) { + LivePGE *pge = args->pge; + if (pge->life <= 0) { + if (pge->init_PGE->object_type == 10) { + _score += 100; + } + return 1; + } + return 0; +} + +int Game::pge_op_collides1u2o(ObjectOpcodeArgs *args) { + if (col_getGridData(args->pge, 1, args->a - 1) & 0xFFFF) { + if (col_getGridData(args->pge, 2, args->a) == 0) { + return 0xFFFF; + } + } + return 0; +} + +int Game::pge_op_collides1u1o(ObjectOpcodeArgs *args) { + if (col_getGridData(args->pge, 1, args->a - 1) & 0xFFFF) { + if (col_getGridData(args->pge, 1, args->a) == 0) { + return 0xFFFF; + } + } + return 0; +} + +int Game::pge_op_collides1o1u(ObjectOpcodeArgs *args) { + if (col_getGridData(args->pge, 1, args->a - 1) == 0) { + if (col_getGridData(args->pge, 1, args->a) & 0xFFFF) { + return 0xFFFF; + } + } + return 0; +} + +int Game::pge_o_unk0x2B(ObjectOpcodeArgs *args) { + return pge_ZOrder(args->pge, args->a, &Game::pge_ZOrderIfTypeAndDifferentDirection, 0); +} + +int Game::pge_o_unk0x2C(ObjectOpcodeArgs *args) { + return pge_ZOrder(args->pge, args->a, &Game::pge_ZOrderIfTypeAndSameDirection, 0); +} + +int Game::pge_o_unk0x2D(ObjectOpcodeArgs *args) { + return pge_ZOrder(args->pge, args->a, &Game::pge_ZOrderByObj, 0) ^ 1; +} + +int Game::pge_op_nop(ObjectOpcodeArgs *args) { + return 1; +} + +int Game::pge_op_pickupObject(ObjectOpcodeArgs *args) { + LivePGE *pge = col_findPiege(args->pge, 3); + if (pge) { + pge_updateGroup(args->pge->index, pge->index, args->a); + return 0xFFFF; + } + return 0; +} + +int Game::pge_op_addItemToInventory(ObjectOpcodeArgs *args) { + pge_updateInventory(&_pgeLive[args->a], args->pge); + args->pge->room_location = 0xFF; + return 0xFFFF; +} + +int Game::pge_op_copyPiege(ObjectOpcodeArgs *args) { + LivePGE *src = &_pgeLive[args->a]; + LivePGE *dst = args->pge; + + dst->pos_x = src->pos_x; + dst->pos_y = src->pos_y; + dst->room_location = src->room_location; + + dst->flags &= 0xFE; + if (src->flags & 1) { + dst->flags |= 1; + } + pge_reorderInventory(args->pge); + return 0xFFFF; +} + +int Game::pge_op_removeItemFromInventory(ObjectOpcodeArgs *args) { + if (args->pge->current_inventory_PGE != 0xFF) { + pge_updateGroup(args->pge->index, args->pge->current_inventory_PGE, args->a); + } + return 1; +} + +int Game::pge_op_canUseCurrentInventoryItem(ObjectOpcodeArgs *args) { + LivePGE *pge = &_pgeLive[0]; + if (pge->current_inventory_PGE != 0xFF && _res._pgeInit[pge->current_inventory_PGE].object_id == args->a) { + return 1; + } + return 0; +} + +// useObject related +int Game::pge_o_unk0x34(ObjectOpcodeArgs *args) { + uint8 mask = (_pge_inpKeysMask & 0xF) | _pge_modKeysTable[0]; + if (mask == _pge_inpKeysMask) { + if (col_getGridData(args->pge, 2, -args->a) == 0) { + return 0xFFFF; + } + } + return 0; +} + +int Game::pge_op_isInpMod(ObjectOpcodeArgs *args) { + assert(args->a < 3); + uint8 mask = _pge_modKeysTable[args->a]; + if (mask == _pge_inpKeysMask) { + return 0xFFFF; + } else { + return 0; + } +} + +int Game::pge_op_setCollisionState1(ObjectOpcodeArgs *args) { + return pge_updateCollisionState(args->pge, args->a, 1); +} + +int Game::pge_op_setCollisionState0(ObjectOpcodeArgs *args) { + return pge_updateCollisionState(args->pge, args->a, 0); +} + +int Game::pge_op_isInGroup1(ObjectOpcodeArgs *args) { + return pge_isInGroup(args->pge, args->a, 1); +} + +int Game::pge_op_isInGroup2(ObjectOpcodeArgs *args) { + return pge_isInGroup(args->pge, args->a, 2); +} + +int Game::pge_op_isInGroup3(ObjectOpcodeArgs *args) { + return pge_isInGroup(args->pge, args->a, 3); +} + +int Game::pge_op_isInGroup4(ObjectOpcodeArgs *args) { + return pge_isInGroup(args->pge, args->a, 4); +} + +int Game::pge_o_unk0x3C(ObjectOpcodeArgs *args) { + return pge_ZOrder(args->pge, args->a, &Game::pge_ZOrderByAnimYIfType, args->b); +} + +int Game::pge_o_unk0x3D(ObjectOpcodeArgs *args) { + return pge_ZOrder(args->pge, args->a, &Game::pge_ZOrderByAnimY, 0); +} + +int Game::pge_op_setPiegeCounter(ObjectOpcodeArgs *args) { + args->pge->counter_value = args->a; + return 1; +} + +int Game::pge_op_decPiegeCounter(ObjectOpcodeArgs *args) { + args->pge->counter_value -= 1; + if (args->a == args->pge->counter_value) { + return 0xFFFF; + } else { + return 0; + } +} + +int Game::pge_o_unk0x40(ObjectOpcodeArgs *args) { + int8 pge_room = args->pge->room_location; + if (pge_room < 0 || pge_room >= 0x40) return 0; + int col_area; + if (_currentRoom == pge_room) { + col_area = 1; + } else if (_col_currentLeftRoom == pge_room) { + col_area = 0; + } else if (_col_currentRightRoom == pge_room) { + col_area = 2; + } else { + return 0; + } + int16 grid_pos_x = (args->pge->pos_x + 8) >> 4; + int16 grid_pos_y = args->pge->pos_y / 72; + if (grid_pos_y >= 0 && grid_pos_y <= 2) { + grid_pos_y *= 16; + int16 _cx = args->a; + if (_pge_currentPiegeFacingDir) { + _cx = -_cx; + } + int8 _bl; + if (_cx >= 0) { + if (_cx > 0x10) { + _cx = 0x10; + } + int8 *var2 = &_res._ctData[0x100] + pge_room * 0x70 + grid_pos_y * 2 + 0x10 + grid_pos_x; + uint8 *var4 = _col_activeCollisionSlots + col_area * 0x30 + grid_pos_y + grid_pos_x; + int16 var12 = grid_pos_x; + --_cx; + do { + --var12; + if (var12 < 0) { + --col_area; + if (col_area < 0) return 0; + pge_room = _res._ctData[CT_LEFT_ROOM + pge_room]; + if (pge_room < 0) return 0; + var12 = 15; + var2 = &_res._ctData[0x101] + pge_room * 0x70 + grid_pos_y * 2 + 15 + 0x10; + var4 = var4 - 31; + } + --var4; + _bl = *var4; + if (_bl >= 0) { + CollisionSlot *col_slot = _col_slotsTable[_bl]; + do { + if (args->pge != col_slot->live_pge && (col_slot->live_pge->flags & 4)) { + if (col_slot->live_pge->init_PGE->object_type == args->b) { + return 1; + } + } + col_slot = col_slot->prev_slot; + } while (col_slot); + } + --var2; + if (*var2 != 0) return 0; + --_cx; + } while (_cx >= 0); + } else { + _cx = -_cx; + if (_cx > 0x10) { + _cx = 0x10; + } + int8 *var2 = &_res._ctData[0x101] + pge_room * 0x70 + grid_pos_y * 2 + 0x10 + grid_pos_x; + uint8 *var4 = _col_activeCollisionSlots + 1 + col_area * 0x30 + grid_pos_y + grid_pos_x; + int16 var12 = grid_pos_x; + --_cx; + do { + ++var12; + if (var12 == 0x10) { + ++col_area; + if (col_area > 2) return 0; + pge_room = _res._ctData[CT_RIGHT_ROOM + pge_room]; + if (pge_room < 0) return 0; + + var12 = 0; + var2 = &_res._ctData[0x101] + pge_room * 0x70 + grid_pos_y * 2 + 0x10; + var4 += 32; + } + var4++; + _bl = *var4; + if (_bl >= 0) { + CollisionSlot *col_slot = _col_slotsTable[_bl]; + do { + if (args->pge != col_slot->live_pge && (col_slot->live_pge->flags & 4)) { + if (col_slot->live_pge->init_PGE->object_type == args->b) { + return 1; + } + } + col_slot = col_slot->prev_slot; + } while (col_slot); + } + _bl = *var2; + ++var2; + if (_bl != 0) return 0; + --_cx; + } while (_cx >= 0); + } + } + return 0; +} + +int Game::pge_op_wakeUpPiege(ObjectOpcodeArgs *args) { + if (args->a <= 3) { + int16 num = args->pge->init_PGE->counter_values[args->a]; + if (num >= 0) { + LivePGE *pge = &_pgeLive[num]; + pge->flags |= 4; + _pge_liveTable2[num] = pge; + } + } + return 1; +} + +int Game::pge_op_removePiege(ObjectOpcodeArgs *args) { + if (args->a <= 3) { + int16 num = args->pge->init_PGE->counter_values[args->a]; + if (num >= 0) { + _pge_liveTable2[num] = 0; + _pgeLive[num].flags &= ~4; + } + } + return 1; +} + +int Game::pge_op_removePiegeIfNotNear(ObjectOpcodeArgs *args) { + LivePGE *pge = args->pge; + if (!(pge->init_PGE->flags & 4)) goto kill_pge; + if (_currentRoom & 0x80) goto skip_pge; + if (pge->room_location & 0x80) goto kill_pge; + if (pge->room_location > 0x3F) goto kill_pge; + if (pge->room_location == _currentRoom) goto skip_pge; + if (pge->room_location == _res._ctData[CT_UP_ROOM + _currentRoom]) goto skip_pge; + if (pge->room_location == _res._ctData[CT_DOWN_ROOM + _currentRoom]) goto skip_pge; + if (pge->room_location == _res._ctData[CT_RIGHT_ROOM + _currentRoom]) goto skip_pge; + if (pge->room_location == _res._ctData[CT_LEFT_ROOM + _currentRoom]) goto skip_pge; + +kill_pge: + pge->flags &= ~4; + pge->collision_slot = 0xFF; + _pge_liveTable2[pge->index] = 0; + +skip_pge: + _pge_playAnimSound = false; + return 1; +} + +int Game::pge_op_loadPiegeCounter(ObjectOpcodeArgs *args) { + args->pge->counter_value = args->pge->init_PGE->counter_values[args->a]; + return 1; +} + +int Game::pge_o_unk0x45(ObjectOpcodeArgs *args) { + return pge_ZOrder(args->pge, args->a, &Game::pge_ZOrderByNumber, 0); +} + +int Game::pge_o_unk0x46(ObjectOpcodeArgs *args) { + _pge_compareVar1 = 0; + pge_ZOrder(args->pge, args->a, &Game::pge_ZOrderIfDifferentDirection, 0); + return _pge_compareVar1; +} + +int Game::pge_o_unk0x47(ObjectOpcodeArgs *args) { + _pge_compareVar2 = 0; + pge_ZOrder(args->pge, args->a, &Game::pge_ZOrderIfSameDirection, 0); + return _pge_compareVar2; +} + +// used with Ian in level2 +int Game::pge_o_unk0x48(ObjectOpcodeArgs *args) { + LivePGE *pge = col_findPiege(&_pgeLive[0], args->pge->init_PGE->counter_values[0]); + if (pge && pge->life == args->pge->life) { + pge_updateGroup(args->pge->index, pge->index, args->a); + return 1; + } + return 0; +} + +int Game::pge_o_unk0x49(ObjectOpcodeArgs *args) { + return pge_ZOrder(&_pgeLive[0], args->a, &Game::pge_ZOrderIfIndex, args->pge->init_PGE->counter_values[0]); +} + +int Game::pge_o_unk0x4A(ObjectOpcodeArgs *args) { + LivePGE *pge = args->pge; + pge->room_location = 0xFE; + pge->flags &= ~4; + _pge_liveTable2[pge->index] = 0; + LivePGE *inv_pge = pge_getInventoryItemBefore(&_pgeLive[args->a], pge); + if (inv_pge == &_pgeLive[args->a]) { + if (pge->index != inv_pge->current_inventory_PGE) { + return 1; + } + } else { + if (pge->index != inv_pge->next_inventory_PGE) { + return 1; + } + } + pge_removeFromInventory(inv_pge, pge, &_pgeLive[args->a]); + return 1; +} + +int Game::pge_op_killPiege(ObjectOpcodeArgs *args) { + LivePGE *pge = args->pge; + pge->room_location = 0xFE; + pge->flags &= ~4; + _pge_liveTable2[pge->index] = 0; + if (pge->init_PGE->object_type == 10) { + _score += 200; + } + return 0xFFFF; +} + +int Game::pge_op_isInCurrentRoom(ObjectOpcodeArgs *args) { + return (args->pge->room_location == _currentRoom) ? 1 : 0; +} + +int Game::pge_op_isNotInCurrentRoom(ObjectOpcodeArgs *args) { + return (args->pge->room_location == _currentRoom) ? 0 : 1; +} + +int Game::pge_op_scrollPosY(ObjectOpcodeArgs *args) { + LivePGE *pge = args->pge; + args->pge->pos_y += args->a; + uint8 pge_num = pge->current_inventory_PGE; + while (pge_num != 0xFF) { + pge = &_pgeLive[pge_num]; + pge->pos_y += args->a; + pge_num = pge->next_inventory_PGE; + } + return 1; +} + +int Game::pge_op_playDefaultDeathCutscene(ObjectOpcodeArgs *args) { + if (_deathCutsceneCounter == 0) { + _deathCutsceneCounter = args->a; + } + return 1; +} + +int Game::pge_o_unk0x50(ObjectOpcodeArgs *args) { + return pge_ZOrder(args->pge, args->a, &Game::pge_ZOrderByObj, 0); +} + +int Game::pge_o_unk0x52(ObjectOpcodeArgs *args) { + return col_detectHit(args->pge, args->a, args->b, &Game::col_detectHitCallback4, &Game::col_detectHitCallback1, 0, 0); +} + +int Game::pge_o_unk0x53(ObjectOpcodeArgs *args) { + return col_detectHit(args->pge, args->a, args->b, &Game::col_detectHitCallback5, &Game::col_detectHitCallback1, 0, 0); +} + +int Game::pge_op_isPiegeNear(ObjectOpcodeArgs *args) { + if (col_findPiege(&_pgeLive[0], args->a) != 0) { + return 1; + } + return 0; +} + +int Game::pge_op_setLife(ObjectOpcodeArgs *args) { + args->pge->life = args->a; + return 1; +} + +int Game::pge_op_incLife(ObjectOpcodeArgs *args) { + args->pge->life += args->a; + return 1; +} + +// level2, Ian +int Game::pge_op_setPiegeDefaultAnim(ObjectOpcodeArgs *args) { + assert(args->a >= 0 && args->a < 4); + int16 r = args->pge->init_PGE->counter_values[args->a]; + args->pge->room_location = r; + if (r == 1) { + warning("setting _loadMap to true"); + _loadMap = true; + } + pge_setupDefaultAnim(args->pge); + return 1; +} + +int Game::pge_op_setLifeCounter(ObjectOpcodeArgs *args) { + _pgeLive[args->a].life = args->pge->init_PGE->counter_values[0]; + return 1; +} + +int Game::pge_op_decLifeCounter(ObjectOpcodeArgs *args) { + args->pge->life = _pgeLive[args->a].life - 1; + return 1; +} + +int Game::pge_op_playCutscene(ObjectOpcodeArgs *args) { + if (_deathCutsceneCounter == 0) { + _cut._id = args->a; + } + return 1; +} + +int Game::pge_op_isTempVar2Set(ObjectOpcodeArgs *args) { + if (_pge_opTempVar2 == args->a) { + return 1; + } + return 0; +} + +int Game::pge_op_playDeathCutscene(ObjectOpcodeArgs *args) { + if (_deathCutsceneCounter == 0) { + _deathCutsceneCounter = args->pge->init_PGE->counter_values[3] + 1; + _cut._deathCutsceneId = args->a; + } + return 1; +} + +int Game::pge_o_unk0x5D(ObjectOpcodeArgs *args) { + return col_detectHit(args->pge, args->a, args->b, &Game::col_detectHitCallback4, &Game::col_detectHitCallback6, 0, 0); +} + +int Game::pge_o_unk0x5E(ObjectOpcodeArgs *args) { + return col_detectHit(args->pge, args->a, args->b, &Game::col_detectHitCallback5, &Game::col_detectHitCallback6, 0, 0); +} + +int Game::pge_o_unk0x5F(ObjectOpcodeArgs *args) { + LivePGE *pge = args->pge; + + int8 pge_room = pge->room_location; + if (pge_room < 0 || pge_room >= 0x40) return 0; + + int16 dx; + int16 _cx = pge->init_PGE->counter_values[0]; + if (_cx <= 0) { + dx = 1; + _cx = -_cx; + } else { + dx = -1; + } + if (_pge_currentPiegeFacingDir) { + dx = -dx; + } + int16 grid_pos_x = (pge->pos_x + 8) >> 4; + int16 grid_pos_y = 0; + do { + int16 _ax = col_getGridData(pge, 1, -grid_pos_y); + if (_ax != 0) { + if (!(_ax & 2) || args->a != 1) { + pge->room_location = pge_room; + pge->pos_x = grid_pos_x * 16; + return 1; + } + } + if (grid_pos_x < 0) { + pge_room = _res._ctData[CT_LEFT_ROOM + pge_room]; + if (pge_room < 0 || pge_room >= 0x40) return 0; + grid_pos_x += 16; + } else if (grid_pos_x > 15) { + pge_room = _res._ctData[CT_RIGHT_ROOM + pge_room]; + if (pge_room < 0 || pge_room >= 0x40) return 0; + grid_pos_x -= 16; + } + grid_pos_x += dx; + ++grid_pos_y; + } while (grid_pos_y <= _cx); + return 0; +} + +int Game::pge_op_findAndCopyPiege(ObjectOpcodeArgs *args) { + GroupPGE *le = _pge_groupsTable[args->pge->index]; + while (le) { + if (le->group_id == args->a) { + args->a = le->index; + args->b = 0; + pge_op_copyPiege(args); + return 1; + } + le = le->next_entry; + } + return 0; +} + +int Game::pge_op_isInRandomRange(ObjectOpcodeArgs *args) { + uint16 n = args->a; + if (n != 0) { + if ((getRandomNumber() % n) == 0) { + return 1; + } + } + return 0; +} + +int Game::pge_o_unk0x62(ObjectOpcodeArgs *args) { + return col_detectHit(args->pge, args->a, args->b, &Game::col_detectHitCallback3, &Game::col_detectHitCallback1, 0, -1); +} + +int Game::pge_o_unk0x63(ObjectOpcodeArgs *args) { + return col_detectHit(args->pge, args->a, args->b, &Game::col_detectHitCallback2, &Game::col_detectHitCallback1, 0, -1); +} + +int Game::pge_o_unk0x64(ObjectOpcodeArgs *args) { + return col_detectGunHit(args->pge, args->a, args->b, &Game::col_detectGunHitCallback3, &Game::col_detectGunHitCallback1, 1, -1); +} + +int Game::pge_op_addToCredits(ObjectOpcodeArgs *args) { + assert(args->a >= 0 && args->a < 3); + uint8 pge = args->pge->init_PGE->counter_values[args->a]; + int16 val = args->pge->init_PGE->counter_values[args->a + 1]; + _pgeLive[pge].life += val; + return 1; +} + +int Game::pge_op_subFromCredits(ObjectOpcodeArgs *args) { + assert(args->a >= 0 && args->a < 3); + uint8 pge = args->pge->init_PGE->counter_values[args->a]; + int16 val = args->pge->init_PGE->counter_values[args->a + 1]; + _pgeLive[pge].life -= val; + return 1; +} + +int Game::pge_o_unk0x67(ObjectOpcodeArgs *args) { + if (col_getGridData(args->pge, 1, -args->a) & 2) { + return 0xFFFF; + } + return 0; +} + +int Game::pge_op_setCollisionState2(ObjectOpcodeArgs *args) { + return pge_updateCollisionState(args->pge, args->a, 2); +} + +int Game::pge_op_saveState(ObjectOpcodeArgs *args) { + _saveStateCompleted = true; + _validSaveState = saveGameState(0); + return 0xFFFF; +} + +// useGun related +int Game::pge_o_unk0x6A(ObjectOpcodeArgs *args) { + LivePGE *_si = args->pge; + int8 pge_room = _si->room_location; + if (pge_room < 0 || pge_room >= 0x40) return 0; + int8 _bl; + int col_area = 0; + int8 *ct_data; + if (_currentRoom == pge_room) { + col_area = 1; + } else if (_col_currentLeftRoom == pge_room) { + col_area = 0; + } else if (_col_currentRightRoom == pge_room) { + col_area = 2; + } else { + return 0; + } + int16 grid_pos_x = (_si->pos_x + 8) >> 4; + int16 grid_pos_y = (_si->pos_y / 72); + if (grid_pos_y >= 0 && grid_pos_y <= 2) { + grid_pos_y *= 16; + int16 _cx = args->a; + if (_pge_currentPiegeFacingDir) { + _cx = -_cx; + } + if (_cx >= 0) { + if (_cx > 0x10) { + _cx = 0x10; + } + ct_data = &_res._ctData[0x100] + pge_room * 0x70 + grid_pos_y * 2 + 0x10 + grid_pos_x; + uint8 *var4 = _col_activeCollisionSlots + col_area * 0x30 + grid_pos_y + grid_pos_x; + ++var4; + ++ct_data; + int16 varA = grid_pos_x; + do { + --varA; + if (varA < 0) { + --col_area; + if (col_area < 0) return 0; + pge_room = _res._ctData[CT_LEFT_ROOM + pge_room]; + if (pge_room < 0) return 0; + varA = 0xF; + ct_data = &_res._ctData[0x101] + pge_room * 0x70 + grid_pos_y * 2 + 0x10 + varA; + var4 -= 0x1F; + } + --var4; + _bl = *var4; + if (_bl >= 0) { + CollisionSlot *collision_slot = _col_slotsTable[_bl]; + do { + _si = collision_slot->live_pge; + if (args->pge != _si && (_si->flags & 4) && _si->life >= 0) { + if (_si->init_PGE->object_type == 1 || _si->init_PGE->object_type == 10) { + return 1; + } + } + collision_slot = collision_slot->prev_slot; + } while (collision_slot); + } + --ct_data; + if (*ct_data != 0) return 0; + --_cx; + } while (_cx >= 0); + + } else { + _cx = -_cx; + if (_cx > 0x10) { + _cx = 0x10; + } + ct_data = &_res._ctData[0x101] + pge_room * 0x70 + grid_pos_y * 2 + 0x10 + grid_pos_x; + uint8 *var4 = _col_activeCollisionSlots + 1 + col_area * 0x30 + grid_pos_y + grid_pos_x; + int16 varA = grid_pos_x; + goto loc_0_15446; + do { + ++varA; + if (varA == 0x10) { + ++col_area; + if (col_area > 2) return 0; + pge_room = _res._ctData[CT_RIGHT_ROOM + pge_room]; + if (pge_room < 0) return 0; + varA = 0; + ct_data = &_res._ctData[0x100] + pge_room * 0x70 + grid_pos_y * 2 + 0x10 + varA; + var4 += 0x20; + } +loc_0_15446: + _bl = *var4; + ++var4; + if (_bl >= 0) { + CollisionSlot *collision_slot = _col_slotsTable[_bl]; + do { + _si = collision_slot->live_pge; + if (args->pge != _si && (_si->flags & 4) && _si->life >= 0) { + if (_si->init_PGE->object_type == 1 || _si->init_PGE->object_type == 10) { + return 1; + } + } + collision_slot = collision_slot->prev_slot; + } while (collision_slot); + } + _bl = *ct_data; + ++ct_data; + if (_bl != 0) return 0; + --_cx; + } while (_cx >= 0); + } + } + return 0; +} + +int Game::pge_op_isInGroupSlice(ObjectOpcodeArgs *args) { + LivePGE *pge = args->pge; + GroupPGE *le = _pge_groupsTable[pge->index]; + if (le) { + if (args->a == 0) { + do { + if (le->group_id == 1 || le->group_id == 2) { + return 1; + } + le = le->next_entry; + } while (le); + } else { + do { + if (le->group_id == 3 || le->group_id == 4) { + return 1; + } + le = le->next_entry; + } while (le); + } + } + return 0; +} + +int Game::pge_o_unk0x6C(ObjectOpcodeArgs *args) { + LivePGE *pge = col_findPiege(&_pgeLive[0], args->pge->init_PGE->counter_values[0]); + if (pge) { + if (pge->life <= args->pge->life) { + pge_updateGroup(args->pge->index, pge->index, args->a); + return 1; + } + } + return 0; +} + +int Game::pge_op_isCollidingObject(ObjectOpcodeArgs *args) { + uint8 r = col_findCurrentCollidingObject(args->pge, 3, 0xFF, 0xFF, 0); + if (r == args->a) { + return 1; + } else { + return 0; + } +} + +// elevator +int Game::pge_o_unk0x6E(ObjectOpcodeArgs *args) { + GroupPGE *le = _pge_groupsTable[args->pge->index]; + while (le) { + if (args->a == le->group_id) { + pge_updateInventory(&_pgeLive[le->index], args->pge); + return 0xFFFF; + } + le = le->next_entry; + } + return 0; +} + + +int Game::pge_o_unk0x6F(ObjectOpcodeArgs *args) { + LivePGE *pge = args->pge; + GroupPGE *le = _pge_groupsTable[pge->index]; + while (le) { + if (args->a == le->group_id) { + pge_updateGroup(pge->index, le->index, 0xC); + return 1; + } + le = le->next_entry; + } + return 0; +} + +int Game::pge_o_unk0x70(ObjectOpcodeArgs *args) { + uint8 pge_num = args->pge->current_inventory_PGE; + while (pge_num != 0xFF) { + pge_updateGroup(args->pge->index, _pgeLive[pge_num].index, args->a); + pge_num = _pgeLive[pge_num].next_inventory_PGE; + } + return 1; +} + +// elevator +int Game::pge_o_unk0x71(ObjectOpcodeArgs *args) { + LivePGE *pge = args->pge; + GroupPGE *le = _pge_groupsTable[pge->index]; + while (le) { + if (le->group_id == args->a) { + pge_reorderInventory(args->pge); + return 1; + } + le = le->next_entry; + } + return 0; +} + +int Game::pge_o_unk0x72(ObjectOpcodeArgs *args) { + int8 *var4 = &_res._ctData[0x100] + args->pge->room_location * 0x70; + var4 += (((args->pge->pos_y / 36) & ~1) + args->a) * 16 + (args->pge->pos_x + 8) / 16; + + CollisionSlot2 *_di = _col_slots2Next; + int _cx = 0x100; + while (_di && _cx != 0) { + if (_di->unk2 != var4) { + _di = _di->next_slot; + --_cx; + } else { + memcpy(_di->unk2, _di->data_buf, _di->data_size + 1); + break; + } + } + return 0xFFFF; // XXX var4; +} + +int Game::pge_o_unk0x73(ObjectOpcodeArgs *args) { + LivePGE *pge = col_findPiege(args->pge, args->a); + if (pge != 0) { + pge_updateInventory(pge, args->pge); + return 0xFFFF; + } + return 0; +} + +int Game::pge_op_collides4u(ObjectOpcodeArgs *args) { + if (col_getGridData(args->pge, 4, -args->a) != 0) { + return 0xFFFF; + } + return 0; +} + +int Game::pge_op_doesNotCollide4u(ObjectOpcodeArgs *args) { + if (col_getGridData(args->pge, 4, -args->a) == 0) { + return 0xFFFF; + } + return 0; +} + +int Game::pge_op_isBelowConrad(ObjectOpcodeArgs *args) { + LivePGE *_si = args->pge; + LivePGE *pge_conrad = &_pgeLive[0]; + if (pge_conrad->room_location == _si->room_location) { + if ((pge_conrad->pos_y - 8) / 72 < _si->pos_y / 72) { + return 0xFFFF; + } + } else if (!(_si->room_location & 0x80) && _si->room_location < 0x40) { + if (pge_conrad->room_location == _res._ctData[CT_UP_ROOM + _si->room_location]) { + return 0xFFFF; + } + } + return 0; +} + +int Game::pge_op_isAboveConrad(ObjectOpcodeArgs *args) { + LivePGE *_si = args->pge; + LivePGE *pge_conrad = &_pgeLive[0]; + if (pge_conrad->room_location == _si->room_location) { + if ((pge_conrad->pos_y - 8) / 72 > _si->pos_y / 72) { + return 0xFFFF; + } + } else if (!(_si->room_location & 0x80) && _si->room_location < 0x40) { + if (pge_conrad->room_location == _res._ctData[CT_DOWN_ROOM + _si->room_location]) { + return 0xFFFF; + } + } + return 0; +} + +int Game::pge_op_isNotFacingConrad(ObjectOpcodeArgs *args) { + LivePGE *pge = args->pge; + LivePGE *pge_conrad = &_pgeLive[0]; + if (pge->pos_y / 72 == (pge_conrad->pos_y - 8) / 72) { // same grid cell + if (pge->room_location == pge_conrad->room_location) { + if (args->a == 0) { + if (_pge_currentPiegeFacingDir) { + if (pge->pos_x < pge_conrad->pos_x) { + return 0xFFFF; + } + } else { + if (pge->pos_x > pge_conrad->pos_x) { + return 0xFFFF; + } + } + } else { + int16 dx; + if (_pge_currentPiegeFacingDir) { + dx = pge_conrad->pos_x - pge->pos_x; + } else { + dx = pge->pos_x - pge_conrad->pos_x; + } + if (dx > 0 && dx < args->a * 16) { + return 0xFFFF; + } + } + } else if (args->a == 0) { + if (!(pge->room_location & 0x80) && pge->room_location < 0x40) { + if (_pge_currentPiegeFacingDir) { + if (pge_conrad->room_location == _res._ctData[CT_RIGHT_ROOM + pge->room_location]) + return 0xFFFF; + } else { + if (pge_conrad->room_location == _res._ctData[CT_LEFT_ROOM + pge->room_location]) + return 0xFFFF; + } + } + } + } + return 0; +} + +int Game::pge_op_isFacingConrad(ObjectOpcodeArgs *args) { + LivePGE *pge = args->pge; + LivePGE *pge_conrad = &_pgeLive[0]; + if (pge->pos_y / 72 == (pge_conrad->pos_y - 8) / 72) { + if (pge->room_location == pge_conrad->room_location) { + if (args->a == 0) { + if (_pge_currentPiegeFacingDir) { + if (pge->pos_x > pge_conrad->pos_x) { + return 0xFFFF; + } + } else { + if (pge->pos_x <= pge_conrad->pos_x) { + return 0xFFFF; + } + } + } else { + int16 dx; + if (_pge_currentPiegeFacingDir) { + dx = pge->pos_x - pge_conrad->pos_x; + } else { + dx = pge_conrad->pos_x - pge->pos_x; + } + if (dx > 0 && dx < args->a * 16) { + return 0xFFFF; + } + } + } else if (args->a == 0) { + if (!(pge->room_location & 0x80) && pge->room_location < 0x40) { + if (_pge_currentPiegeFacingDir) { + if (pge_conrad->room_location == _res._ctData[CT_LEFT_ROOM + pge->room_location]) + return 0xFFFF; + } else { + if (pge_conrad->room_location == _res._ctData[CT_RIGHT_ROOM + pge->room_location]) + return 0xFFFF; + } + } + + } + } + return 0; +} + +int Game::pge_op_collides2u1u(ObjectOpcodeArgs *args) { + if (col_getGridData(args->pge, 1, -args->a) == 0) { + if (col_getGridData(args->pge, 2, -(args->a + 1)) & 0xFFFF) { + return 0xFFFF; + } + } + return 0; +} + +int Game::pge_op_displayText(ObjectOpcodeArgs *args) { + _textToDisplay = args->a; + return 0xFFFF; +} + +int Game::pge_o_unk0x7C(ObjectOpcodeArgs *args) { + LivePGE *pge = col_findPiege(args->pge, 3); + if (pge == 0) { + pge = col_findPiege(args->pge, 5); + if (pge == 0) { + pge = col_findPiege(args->pge, 9); + if (pge == 0) { + pge = col_findPiege(args->pge, 0xFFFF); + } + } + } + if (pge != 0) { + pge_updateGroup(args->pge->index, pge->index, args->a); + } + return 0; +} + +int Game::pge_op_playSound(ObjectOpcodeArgs *args) { + uint8 sfxId = args->a & 0xFF; + uint8 softVol = args->a >> 8; + playSound(sfxId, softVol); + return 0xFFFF; +} + +int Game::pge_o_unk0x7E(ObjectOpcodeArgs *args) { + _pge_compareVar1 = 0; + pge_ZOrder(args->pge, args->a, &Game::pge_ZOrderByIndex, 0); + return _pge_compareVar1; +} + +int Game::pge_o_unk0x7F(ObjectOpcodeArgs *args) { + LivePGE *_si = args->pge; + uint8 var4 = _si->collision_slot; + uint8 var2 = _si->index; + while (var4 != 0xFF) { + CollisionSlot *slot = _col_slotsTable[var4]; + while (slot) { + if (slot->live_pge != args->pge) { + if (slot->live_pge->init_PGE->object_type == 3 && var2 != slot->live_pge->unkF) { + return 0; + } + } + if (slot->live_pge == args->pge) { + var4 = slot->index; + } + slot = slot->prev_slot; + } + } + return 0xFFFF; +} + +int Game::pge_op_setPiegePosX(ObjectOpcodeArgs *args) { + uint8 pge_num = args->pge->unkF; + if (pge_num != 0xFF) { + args->pge->pos_x = _pgeLive[pge_num].pos_x; + } + return 0xFFFF; +} + +int Game::pge_op_setPiegePosModX(ObjectOpcodeArgs *args) { + uint8 pge_num = args->pge->unkF; + if (pge_num != 0xFF) { + int16 dx = _pgeLive[pge_num].pos_x % 256; + if (dx >= args->pge->pos_x) { + dx -= args->pge->pos_x; + } + args->pge->pos_x += dx; + } + return 0xFFFF; +} + +// taxi, level4 +int Game::pge_op_changeRoom(ObjectOpcodeArgs *args) { + InitPGE *init_pge_1 = args->pge->init_PGE; + assert(args->a >= 0 && args->a < 3); + int16 _ax = init_pge_1->counter_values[args->a]; + int16 _bx = init_pge_1->counter_values[args->a + 1]; + LivePGE *live_pge_1 = &_pgeLive[_bx]; + LivePGE *live_pge_2 = &_pgeLive[_ax]; + int8 pge_room = live_pge_1->room_location; + if (pge_room >= 0 && pge_room < 0x40) { + int8 _al = live_pge_2->room_location; + live_pge_2->pos_x = live_pge_1->pos_x; + live_pge_2->pos_y = live_pge_1->pos_y; + live_pge_2->room_location = live_pge_1->room_location; + pge_addToCurrentRoomList(live_pge_2, _al); + InitPGE *init_pge_2 = live_pge_2->init_PGE; + init_pge_1 = live_pge_1->init_PGE; + if (init_pge_2->obj_node_number == init_pge_1->obj_node_number) { + live_pge_2->flags &= 0xFE; + if (live_pge_1->flags & 1) { + live_pge_2->flags |= 1; + } + live_pge_2->obj_type = live_pge_1->obj_type; + live_pge_2->anim_seq = 0; + assert(init_pge_2->obj_node_number < _res._numObjectNodes); + ObjectNode *on = _res._objectNodesMap[init_pge_2->obj_node_number]; + Object *obj = on->objects; + int i = 0; + while (obj->type != live_pge_2->obj_type) { + ++i; + ++obj; + } + live_pge_2->first_obj_number = i; + } + if (init_pge_2->object_type == 1) { + if (_currentRoom != live_pge_2->room_location) { + _currentRoom = live_pge_2->room_location; + loadLevelMap(); + _vid.fullRefresh(); + } + } + pge_setupDefaultAnim(live_pge_2); + } + return 0xFFFF; +} + +// called for example before using gun, to check its presence +int Game::pge_op_hasInventoryItem(ObjectOpcodeArgs *args) { + LivePGE *pge = &_pgeLive[0]; + uint8 _dl = pge->current_inventory_PGE; + while (_dl != 0xFF) { + pge = &_pgeLive[_dl]; + if (pge->init_PGE->object_id == args->a) { + return 0xFFFF; + } + _dl = pge->next_inventory_PGE; + } + return 0; +} + +int Game::pge_op_changeLevel(ObjectOpcodeArgs *args) { + _currentLevel = args->a - 1; + return _currentLevel; +} + +int Game::pge_op_shakeScreen(ObjectOpcodeArgs *args) { + _vid._shakeOffset = getRandomNumber() & 7; + return 0xFFFF; +} + +int Game::pge_o_unk0x86(ObjectOpcodeArgs *args) { + return col_detectGunHit(args->pge, args->a, args->b, &Game::col_detectGunHitCallback2, &Game::col_detectGunHitCallback1, 1, 0); +} + +int Game::pge_op_playSoundGroup(ObjectOpcodeArgs *args) { + assert(args->a < 4); + uint16 c = args->pge->init_PGE->counter_values[args->a]; + uint8 sfxId = c & 0xFF; + uint8 softVol = c >> 8; + playSound(sfxId, softVol); + return 0xFFFF; +} + +int Game::pge_op_adjustPos(ObjectOpcodeArgs *args) { + LivePGE *pge = args->pge; + pge->pos_x &= 0xFFF0; + if (pge->pos_y != 70 && pge->pos_y != 142 && pge->pos_y != 214) { + pge->pos_y = ((pge->pos_y / 72) + 1) * 72 - 2; + } + return 0xFFFF; +} + +int Game::pge_op_setTempVar1(ObjectOpcodeArgs *args) { + _pge_opTempVar1 = args->a; + return 0xFFFF; +} + +int Game::pge_op_isTempVar1Set(ObjectOpcodeArgs *args) { + if (_pge_opTempVar1 != args->a) { + return 0; + } else { + return 0xFFFF; + } +} + +int Game::pge_setCurrentInventoryObject(LivePGE *pge) { + LivePGE *_bx = pge_getInventoryItemBefore(&_pgeLive[0], pge); + if (_bx == &_pgeLive[0]) { + if (_bx->current_inventory_PGE != pge->index) { + return 0; + } + } else { + if (_bx->next_inventory_PGE != pge->index) { + return 0; + } + } + pge_removeFromInventory(_bx, pge, &_pgeLive[0]); + pge_addToInventory(&_pgeLive[0], pge, &_pgeLive[0]); + return 0xFFFF; +} + +void Game::pge_updateInventory(LivePGE *pge1, LivePGE *pge2) { + if (pge2->unkF != 0xFF) { + pge_reorderInventory(pge2); + } + LivePGE *_ax = pge_getInventoryItemBefore(pge1, 0); + pge_addToInventory(_ax, pge2, pge1); +} + +void Game::pge_reorderInventory(LivePGE *pge) { + if (pge->unkF != 0xFF) { + LivePGE *_bx = &_pgeLive[pge->unkF]; + LivePGE *_di = pge_getInventoryItemBefore(_bx, pge); + if (_di == _bx) { + if (_di->current_inventory_PGE == pge->index) { + pge_removeFromInventory(_di, pge, _bx); + } + } else { + if (_di->next_inventory_PGE == pge->index) { + pge_removeFromInventory(_di, pge, _bx); + } + } + } +} + +LivePGE *Game::pge_getInventoryItemBefore(LivePGE *pge, LivePGE *last_pge) { + LivePGE *_di = pge; + uint8 n = _di->current_inventory_PGE; + while (n != 0xFF) { + LivePGE *_si = &_pgeLive[n]; + if (_si == last_pge) { + break; + } else { + _di = _si; + n = _di->next_inventory_PGE; + } + } + return _di; +} + +void Game::pge_addToInventory(LivePGE *pge1, LivePGE *pge2, LivePGE *pge3) { + pge2->unkF = pge3->index; + if (pge1 == pge3) { + pge2->next_inventory_PGE = pge1->current_inventory_PGE; + pge1->current_inventory_PGE = pge2->index; + } else { + pge2->next_inventory_PGE = pge1->next_inventory_PGE; + pge1->next_inventory_PGE = pge2->index; + } +} + +int Game::pge_updateCollisionState(LivePGE *pge, int16 pge_dy, uint8 var8) { + uint8 pge_unk1C = pge->init_PGE->unk1C; + if (!(pge->room_location & 0x80) && pge->room_location < 0x40) { + int8 *grid_data = &_res._ctData[0x100] + 0x70 * pge->room_location; + int16 pge_pos_y = ((pge->pos_y / 36) & ~1) + pge_dy; + int16 pge_pos_x = (pge->pos_x + 8) >> 4; + + grid_data += pge_pos_x + pge_pos_y * 16; + + CollisionSlot2 *slot1 = _col_slots2Next; + CollisionSlot2 *slot2 = 0; + int16 i = 255; + pge_pos_x = i; + if (_pge_currentPiegeFacingDir) { + i = pge_unk1C - 1; + grid_data -= i; + } + while (slot1) { + if (slot1->unk2 == grid_data) { + slot1->data_size = pge_unk1C - 1; + assert(pge_unk1C < 0x70); + memset(grid_data, var8, pge_unk1C); + grid_data += pge_unk1C; + return 1; + } else { + ++i; + slot2 = slot1; + slot1 = slot1->next_slot; + if (--i == 0) { + break; + } + } + } + if (_col_slots2Cur < &_col_slots2[255]) { + slot1 = _col_slots2Cur; + slot1->unk2 = grid_data; + slot1->data_size = pge_unk1C - 1; + uint8 *dst = &slot1->data_buf[0]; + int8 *src = grid_data; + int n = pge_unk1C; + assert(n < 0x10); + while (n--) { + *dst++ = *src; + *src++ = var8; + } + ++_col_slots2Cur; + slot1->next_slot = _col_slots2Next; + _col_slots2Next = slot1; + } + } + return 1; +} + +int Game::pge_ZOrder(LivePGE *pge, int16 num, pge_ZOrderCallback compare, uint16 unk) { + uint8 slot = pge->collision_slot; + while (slot != 0xFF) { + CollisionSlot *cs = _col_slotsTable[slot]; + if (cs == 0) { + return 0; + } + uint8 slot_bak = slot; + slot = 0xFF; + while (cs != 0) { + if ((this->*compare)(cs->live_pge, pge, num, unk) != 0) { + return 1; + } + if (pge == cs->live_pge) { + slot = cs->index; + } + cs = cs->prev_slot; + if (slot == slot_bak) { + return 0; + } + } + } + return 0; +} + +void Game::pge_updateGroup(uint8 idx, uint8 unk1, int16 unk2) { + debug(DBG_GAME, "Game::pge_updateGroup() idx=0x%X unk1=0x%X unk2=0x%X", idx, unk1, unk2); + LivePGE *pge = &_pgeLive[unk1]; + if (!(pge->flags & 4)) { + if (!(pge->init_PGE->flags & 1)) { + return; + } + pge->flags |= 4; + _pge_liveTable2[unk1] = pge; + } + if (unk2 <= 4) { + uint8 pge_room = pge->room_location; + pge = &_pgeLive[idx]; + if (pge_room != pge->room_location) { + return; + } + if (unk1 == 0 && _blinkingConradCounter != 0) { + return; + } + // XXX + } + GroupPGE *le = _pge_nextFreeGroup; + if (le) { + // append to the list + _pge_nextFreeGroup = le->next_entry; + GroupPGE *_ax = _pge_groupsTable[unk1]; + _pge_groupsTable[unk1] = le; + le->next_entry = _ax; + le->index = idx; + le->group_id = unk2; + } +} + +void Game::pge_removeFromInventory(LivePGE *pge1, LivePGE *pge2, LivePGE *pge3) { + pge2->unkF = 0xFF; + if (pge3 == pge1) { + pge3->current_inventory_PGE = pge2->next_inventory_PGE; + pge2->next_inventory_PGE = 0xFF; + } else { + pge1->next_inventory_PGE = pge2->next_inventory_PGE; + pge2->next_inventory_PGE = 0xFF; + } +} + +int Game::pge_ZOrderByAnimY(LivePGE *pge1, LivePGE *pge2, uint8 comp, uint8 comp2) { + if (pge1 != pge2) { + uint16 off = READ_LE_UINT16(_res._ani + pge1->obj_type * 2); + if (_res._ani[off + 3] == comp) { + return 1; + } + } + return 0; +} + +int Game::pge_ZOrderByAnimYIfType(LivePGE *pge1, LivePGE *pge2, uint8 comp, uint8 comp2) { + if (pge1->init_PGE->object_type == comp2) { + uint16 off = READ_LE_UINT16(_res._ani + pge1->obj_type * 2); + if (_res._ani[off + 3] == comp) { + return 1; + } + } + return 0; +} + +int Game::pge_ZOrderIfIndex(LivePGE *pge1, LivePGE *pge2, uint8 comp, uint8 comp2) { + if (pge1->index != comp2) { + pge_updateGroup(pge2->index, pge1->index, comp); + return 1; + } + return 0; +} + +int Game::pge_ZOrderByIndex(LivePGE *pge1, LivePGE *pge2, uint8 comp, uint8 comp2) { + if (pge1 != pge2) { + pge_updateGroup(pge2->index, pge1->index, comp); + _pge_compareVar1 = 0xFFFF; + } + return 0; +} + +int Game::pge_ZOrderByObj(LivePGE *pge1, LivePGE *pge2, uint8 comp, uint8 comp2) { + if (comp == 10) { + if (pge1->init_PGE->object_type == comp && pge1->life >= 0) { + return 1; + } + } else { + if (pge1->init_PGE->object_type == comp) { + return 1; + } + } + return 0; +} + +int Game::pge_ZOrderIfDifferentDirection(LivePGE *pge1, LivePGE *pge2, uint8 comp, uint8 comp2) { + if (pge1 != pge2) { + if ((pge1->flags & 1) != (pge2->flags & 1)) { + _pge_compareVar1 = 1; + pge_updateGroup(pge2->index, pge1->index, comp); + if (pge2->index == 0) { + return 0xFFFF; + } + } + } + return 0; +} + +int Game::pge_ZOrderIfSameDirection(LivePGE *pge1, LivePGE *pge2, uint8 comp, uint8 comp2) { + if (pge1 != pge2) { + if ((pge1->flags & 1) == (pge2->flags & 1)) { + _pge_compareVar2 = 1; + pge_updateGroup(pge2->index, pge1->index, comp); + if (pge2->index == 0) { + return 0xFFFF; + } + } + } + return 0; +} + +int Game::pge_ZOrderIfTypeAndSameDirection(LivePGE *pge1, LivePGE *pge2, uint8 comp, uint8 comp2) { + if (pge1->init_PGE->object_type == comp) { + if ((pge1->flags & 1) == (pge2->flags & 1)) { + return 1; + } + } + return 0; +} + +int Game::pge_ZOrderIfTypeAndDifferentDirection(LivePGE *pge1, LivePGE *pge2, uint8 comp, uint8 comp2) { + if (pge1->init_PGE->object_type == comp) { + if ((pge1->flags & 1) != (pge2->flags & 1)) { + return 1; + } + } + return 0; +} + +int Game::pge_ZOrderByNumber(LivePGE *pge1, LivePGE *pge2, uint8 comp, uint8 comp2) { + return pge1 - pge2; +} diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/resource.cpp b/project/jni/application/REminiscence/REminiscence-0.1.9/resource.cpp new file mode 100644 index 000000000..fb09fb581 --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/resource.cpp @@ -0,0 +1,742 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "file.h" +#include "unpack.h" +#include "resource.h" + + +Resource::Resource(const char *dataPath, Version ver) { + memset(this, 0, sizeof(Resource)); + _dataPath = dataPath; + _ver = ver; + _memBuf = (uint8 *)malloc(0xE000); +} + +Resource::~Resource() { + clearLevelRes(); + free(_fnt); + free(_icn); + free(_tab); + free(_spr1); + free(_memBuf); + free(_cmd); + free(_pol); + free(_cine_off); + free(_cine_txt); + for (int i = 0; i < _numSfx; ++i) { + free(_sfxList[i].data); + } + free(_sfxList); + free(_voiceBuf); +} + +void Resource::clearLevelRes() { + free(_tbn); _tbn = 0; + free(_mbk); _mbk = 0; + free(_mbkData); _mbkData = 0; + free(_pal); _pal = 0; + free(_map); _map = 0; + free(_spc); _spc = 0; + free(_ani); _ani = 0; + free_OBJ(); +} + +void Resource::load_FIB(const char *fileName) { + debug(DBG_RES, "Resource::load_FIB('%s')", fileName); + static const uint8 fibonacciTable[] = { + 0xDE, 0xEB, 0xF3, 0xF8, 0xFB, 0xFD, 0xFE, 0xFF, + 0x00, 0x01, 0x02, 0x03, 0x05, 0x08, 0x0D, 0x15 + }; + sprintf(_entryName, "%s.FIB", fileName); + File f; + if (f.open(_entryName, _dataPath, "rb")) { + _numSfx = f.readUint16LE(); + _sfxList = (SoundFx *)malloc(_numSfx * sizeof(SoundFx)); + if (!_sfxList) { + error("Unable to allocate SoundFx table"); + } + int i; + for (i = 0; i < _numSfx; ++i) { + SoundFx *sfx = &_sfxList[i]; + sfx->offset = f.readUint32LE(); + sfx->len = f.readUint16LE(); + sfx->data = 0; + } + for (i = 0; i < _numSfx; ++i) { + SoundFx *sfx = &_sfxList[i]; + if (sfx->len == 0) { + continue; + } + f.seek(sfx->offset); + uint8 *data = (uint8 *)malloc(sfx->len * 2); + if (!data) { + error("Unable to allocate SoundFx data buffer"); + } + sfx->data = data; + uint8 c = f.readByte(); + *data++ = c; + *data++ = c; + uint16 sz = sfx->len - 1; + while (sz--) { + uint8 d = f.readByte(); + c += fibonacciTable[d >> 4]; + *data++ = c; + c += fibonacciTable[d & 15]; + *data++ = c; + } + sfx->len *= 2; + } + if (f.ioErr()) { + error("I/O error when reading '%s'", _entryName); + } + } else { + error("Can't open '%s'", _entryName); + } +} + +void Resource::load_MAP_menu(const char *fileName, uint8 *dstPtr) { + debug(DBG_RES, "Resource::load_MAP_menu('%s')", fileName); + sprintf(_entryName, "%s.MAP", fileName); + File f; + if (f.open(_entryName, _dataPath, "rb")) { + if (f.size() != 0x3800 * 4) { + error("Wrong file size for '%s', %d", _entryName, f.size()); + } + f.read(dstPtr, 0x3800 * 4); + if (f.ioErr()) { + error("I/O error when reading '%s'", _entryName); + } + } else { + error("Can't open '%s'", _entryName); + } +} + +void Resource::load_PAL_menu(const char *fileName, uint8 *dstPtr) { + debug(DBG_RES, "Resource::load_PAL_menu('%s')", fileName); + sprintf(_entryName, "%s.PAL", fileName); + File f; + if (f.open(_entryName, _dataPath, "rb")) { + if (f.size() != 768) { + error("Wrong file size for '%s', %d", _entryName, f.size()); + } + f.read(dstPtr, 768); + if (f.ioErr()) { + error("I/O error when reading '%s'", _entryName); + } + } else { + error("Can't open '%s'", _entryName); + } +} + +void Resource::load_SPR_OFF(const char *fileName, uint8 *sprData) { + debug(DBG_RES, "Resource::load_SPR_OFF('%s')", fileName); + sprintf(_entryName, "%s.OFF", fileName); + File f; + if (f.open(_entryName, _dataPath, "rb")) { + int len = f.size(); + uint8 *offData = (uint8 *)malloc(len); + if (!offData) { + error("Unable to allocate sprite offsets"); + } + f.read(offData, len); + if (f.ioErr()) { + error("I/O error when reading '%s'", _entryName); + } + const uint8 *p = offData; + uint16 pos; + while ((pos = READ_LE_UINT16(p)) != 0xFFFF) { + uint32 off = READ_LE_UINT32(p + 2); + if (off == 0xFFFFFFFF) { + _spr_off[pos] = 0; + } else { + _spr_off[pos] = sprData + off; + } + p += 6; + } + free(offData); + } else { + error("Can't open '%s'", _entryName); + } +} + +void Resource::load_CINE() { + const char *baseName = 0; + switch (_ver) { + case VER_FR: + baseName = "FR_CINE"; + break; + case VER_EN: + baseName = "ENGCINE"; + break; + case VER_DE: + baseName = "GERCINE"; + break; + case VER_SP: + baseName = "SPACINE"; + break; + } + debug(DBG_RES, "Resource::load_CINE('%s')", baseName); + if (_cine_off == 0) { + sprintf(_entryName, "%s.BIN", baseName); + File f; + if (f.open(_entryName, _dataPath, "rb")) { + int len = f.size(); + _cine_off = (uint8 *)malloc(len); + if (!_cine_off) { + error("Unable to allocate cinematics offsets"); + } + f.read(_cine_off, len); + if (f.ioErr()) { + error("I/O error when reading '%s'", _entryName); + } + } else { + error("Can't open '%s'", _entryName); + } + } + if (_cine_txt == 0) { + sprintf(_entryName, "%s.TXT", baseName); + File f; + if (f.open(_entryName, _dataPath, "rb")) { + int len = f.size(); + _cine_txt = (uint8 *)malloc(len); + if (!_cine_txt) { + error("Unable to allocate cinematics text data"); + } + f.read(_cine_txt, len); + if (f.ioErr()) { + error("I/O error when reading '%s'", _entryName); + } + } else { + error("Can't open '%s'", _entryName); + } + } +} + +void Resource::load_TEXT() { + File f; + // Load game strings + _stringsTable = 0; + if (f.open("STRINGS.TXT", _dataPath, "rb")) { + const int sz = f.size(); + _extStringsTable = (uint8 *)malloc(sz); + if (_extStringsTable) { + f.read(_extStringsTable, sz); + _stringsTable = _extStringsTable; + } + f.close(); + } + if (!_stringsTable) { + switch (_ver) { + case VER_FR: + _stringsTable = LocaleData::_stringsTableFR; + break; + case VER_EN: + _stringsTable = LocaleData::_stringsTableEN; + break; + case VER_DE: + _stringsTable = LocaleData::_stringsTableDE; + break; + case VER_SP: + _stringsTable = LocaleData::_stringsTableSP; + break; + } + } + // Load menu strings + _textsTable = 0; + if (f.open("MENUS.TXT", _dataPath, "rb")) { + const int offs = LocaleData::LI_NUM * sizeof(char *); + const int sz = f.size() + 1; + _extTextsTable = (char **)malloc(offs + sz); + if (_extTextsTable) { + char *textData = (char *)_extTextsTable + offs; + f.read(textData, sz); + textData[sz] = 0; + int textsCount = 0; + for (char *eol; (eol = strpbrk(textData, "\r\n")) != 0; ) { + *eol++ = 0; + if (*eol == '\r' || *eol == '\n') { + *eol++ = 0; + } + if (textsCount < LocaleData::LI_NUM && textData[0] != 0) { + _extTextsTable[textsCount] = textData; + ++textsCount; + } + textData = eol; + } + if (textsCount < LocaleData::LI_NUM && textData[0] != 0) { + _extTextsTable[textsCount] = textData; + ++textsCount; + } + if (textsCount < LocaleData::LI_NUM) { + free(_extTextsTable); + _extTextsTable = 0; + } else { + _textsTable = (const char **)_extTextsTable; + } + } + } + if (!_textsTable) { + switch (_ver) { + case VER_FR: + _textsTable = LocaleData::_textsTableFR; + break; + case VER_EN: + _textsTable = LocaleData::_textsTableEN; + break; + case VER_DE: + _textsTable = LocaleData::_textsTableDE; + break; + case VER_SP: + _textsTable = LocaleData::_textsTableSP; + break; + } + } +} + +void Resource::free_TEXT() { + if (_extTextsTable) { + free(_extTextsTable); + _extTextsTable = 0; + } + _stringsTable = 0; + if (_extStringsTable) { + free(_extStringsTable); + _extStringsTable = 0; + } + _textsTable = 0; +} + +void Resource::load(const char *objName, int objType) { + debug(DBG_RES, "Resource::load('%s', %d)", objName, objType); + LoadStub loadStub = 0; + switch (objType) { + case OT_MBK: + debug(DBG_RES, "chargement bank (mbk)"); + sprintf(_entryName, "%s.MBK", objName); + loadStub = &Resource::load_MBK; + break; + case OT_PGE: + debug(DBG_RES, "chargement piege (pge)"); + sprintf(_entryName, "%s.PGE", objName); + loadStub = &Resource::load_PGE; + break; + case OT_PAL: + debug(DBG_RES, "chargement palettes (pal)"); + sprintf(_entryName, "%s.PAL", objName); + loadStub = &Resource::load_PAL; + break; + case OT_CT: + debug(DBG_RES, "chargement collision (ct)"); + sprintf(_entryName, "%s.CT", objName); + loadStub = &Resource::load_CT; + break; + case OT_MAP: + debug(DBG_RES, "ouverture map (map)"); + sprintf(_entryName, "%s.MAP", objName); + loadStub = &Resource::load_MAP; + break; + case OT_SPC: + debug(DBG_RES, "chargement sprites caracteres (spc)"); + strcpy(_entryName, "GLOBAL.SPC"); + loadStub = &Resource::load_SPC; + break; + case OT_RP: + debug(DBG_RES, "chargement positions des banks pour sprite_car (rp)"); + sprintf(_entryName, "%s.RP", objName); + loadStub = &Resource::load_RP; + break; + case OT_SPR: + debug(DBG_RES, "chargement des sprites (spr)"); + sprintf(_entryName, "%s.SPR", objName); + loadStub = &Resource::load_SPR; + break; + case OT_SPRM: + debug(DBG_RES, "chargement des sprites monstre (spr)"); + sprintf(_entryName, "%s.SPR", objName); + loadStub = &Resource::load_SPRM; + break; + case OT_ICN: + debug(DBG_RES, "chargement des icones (icn)"); + sprintf(_entryName, "%s.ICN", objName); + loadStub = &Resource::load_ICN; + break; + case OT_FNT: + debug(DBG_RES, "chargement de la font (fnt)"); + sprintf(_entryName, "%s.FNT", objName); + loadStub = &Resource::load_FNT; + break; + case OT_OBJ: + debug(DBG_RES, "chargement objets (obj)"); + sprintf(_entryName, "%s.OBJ", objName); + loadStub = &Resource::load_OBJ; + break; + case OT_ANI: + debug(DBG_RES, "chargement animations (ani)"); + sprintf(_entryName, "%s.ANI", objName); + loadStub = &Resource::load_ANI; + break; + case OT_TBN: + debug(DBG_RES, "chargement des textes (tbn)"); + sprintf(_entryName, "%s.TBN", objName); + loadStub = &Resource::load_TBN; + break; + case OT_CMD: + debug(DBG_RES, "chargement des commandes (cmd)"); + sprintf(_entryName, "%s.CMD", objName); + loadStub = &Resource::load_CMD; + break; + case OT_POL: + debug(DBG_RES, "chargement des polygones (pol)"); + sprintf(_entryName, "%s.POL", objName); + loadStub = &Resource::load_POL; + break; + default: + error("Unimplemented Resource::load() type %d", objType); + break; + } + if (loadStub) { + File f; + if (f.open(_entryName, _dataPath, "rb")) { + (this->*loadStub)(&f); + if (f.ioErr()) { + error("I/O error when reading '%s'", _entryName); + } + } else { + error("Can't open '%s'", _entryName); + } + } +} + +void Resource::load_CT(File *pf) { + debug(DBG_RES, "Resource::load_CT()"); + int len = pf->size(); + uint8 *tmp = (uint8 *)malloc(len); + if (!tmp) { + error("Unable to allocate CT buffer"); + } else { + pf->read(tmp, len); + if (!delphine_unpack((uint8 *)_ctData, tmp, len)) { + error("Bad CRC for collision data"); + } + free(tmp); + } +} + +void Resource::load_FNT(File *f) { + debug(DBG_RES, "Resource::load_FNT()"); + int len = f->size(); + _fnt = (uint8 *)malloc(len); + if (!_fnt) { + error("Unable to allocate FNT buffer"); + } else { + f->read(_fnt, len); + } +} + +void Resource::load_MBK(File *f) { + debug(DBG_RES, "Resource::load_MBK()"); + uint8 num = f->readByte(); + int dataSize = f->size() - num * 6; + _mbk = (MbkEntry *)malloc(sizeof(MbkEntry) * num); + if (!_mbk) { + error("Unable to allocate MBK buffer"); + } + f->seek(0); + for (int i = 0; i < num; ++i) { + f->readUint16BE(); /* unused */ + _mbk[i].offset = f->readUint16BE() - num * 6; + _mbk[i].len = f->readUint16BE(); + debug(DBG_RES, "dataSize=0x%X entry %d off=0x%X len=0x%X", dataSize, i, _mbk[i].offset + num * 6, _mbk[i].len); + assert(_mbk[i].offset <= dataSize); + } + _mbkData = (uint8 *)malloc(dataSize); + if (!_mbkData) { + error("Unable to allocate MBK data buffer"); + } + f->read(_mbkData, dataSize); +} + +void Resource::load_ICN(File *f) { + debug(DBG_RES, "Resource::load_ICN()"); + int len = f->size(); + _icn = (uint8 *)malloc(len); + if (!_icn) { + error("Unable to allocate ICN buffer"); + } else { + f->read(_icn, len); + } +} + +void Resource::load_SPR(File *f) { + debug(DBG_RES, "Resource::load_SPR()"); + int len = f->size() - 12; + _spr1 = (uint8 *)malloc(len); + if (!_spr1) { + error("Unable to allocate SPR buffer"); + } else { + f->seek(12); + f->read(_spr1, len); + } +} + +void Resource::load_SPRM(File *f) { + debug(DBG_RES, "Resource::load_SPRM()"); + int len = f->size() - 12; + f->seek(12); + f->read(_sprm, len); +} + +void Resource::load_RP(File *f) { + debug(DBG_RES, "Resource::load_RP()"); + f->read(_rp, 0x4A); +} + +void Resource::load_SPC(File *f) { + debug(DBG_RES, "Resource::load_SPC()"); + int len = f->size(); + _spc = (uint8 *)malloc(len); + if (!_spc) { + error("Unable to allocate SPC buffer"); + } else { + f->read(_spc, len); + _numSpc = READ_BE_UINT16(_spc) / 2; + } +} + +void Resource::load_PAL(File *f) { + debug(DBG_RES, "Resource::load_PAL()"); + int len = f->size(); + _pal = (uint8 *)malloc(len); + if (!_pal) { + error("Unable to allocate PAL buffer"); + } else { + f->read(_pal, len); + } +} + +void Resource::load_MAP(File *f) { + debug(DBG_RES, "Resource::load_MAP()"); + int len = f->size(); + _map = (uint8 *)malloc(len); + if (!_map) { + error("Unable to allocate MAP buffer"); + } else { + f->read(_map, len); + } +} + +void Resource::load_OBJ(File *f) { + debug(DBG_RES, "Resource::load_OBJ()"); + + uint16 i; + + _numObjectNodes = f->readUint16LE(); + assert(_numObjectNodes < 255); + + uint32 offsets[256]; + for (i = 0; i < _numObjectNodes; ++i) { + offsets[i] = f->readUint32LE(); + } + offsets[i] = f->size() - 2; + + int numObjectsCount = 0; + uint16 objectsCount[256]; + for (i = 0; i < _numObjectNodes; ++i) { + int diff = offsets[i + 1] - offsets[i]; + if (diff != 0) { + objectsCount[numObjectsCount] = (diff - 2) / 0x12; + debug(DBG_RES, "i=%d objectsCount[numObjectsCount]=%d", i, objectsCount[numObjectsCount]); + ++numObjectsCount; + } + } + + uint32 prevOffset = 0; + ObjectNode *prevNode = 0; + int iObj = 0; + for (i = 0; i < _numObjectNodes; ++i) { + if (prevOffset != offsets[i]) { + ObjectNode *on = (ObjectNode *)malloc(sizeof(ObjectNode)); + if (!on) { + error("Unable to allocate ObjectNode num=%d", i); + } + f->seek(offsets[i] + 2); + on->last_obj_number = f->readUint16LE(); + on->num_objects = objectsCount[iObj]; + debug(DBG_RES, "last=%d num=%d", on->last_obj_number, on->num_objects); + on->objects = (Object *)malloc(sizeof(Object) * on->num_objects); + for (uint16 j = 0; j < on->num_objects; ++j) { + Object *obj = &on->objects[j]; + obj->type = f->readUint16LE(); + obj->dx = f->readByte(); + obj->dy = f->readByte(); + obj->init_obj_type = f->readUint16LE(); + obj->opcode2 = f->readByte(); + obj->opcode1 = f->readByte(); + obj->flags = f->readByte(); + obj->opcode3 = f->readByte(); + obj->init_obj_number = f->readUint16LE(); + obj->opcode_arg1 = f->readUint16LE(); + obj->opcode_arg2 = f->readUint16LE(); + obj->opcode_arg3 = f->readUint16LE(); + debug(DBG_RES, "obj_node=%d obj=%d op1=0x%X op2=0x%X op3=0x%X", i, j, obj->opcode2, obj->opcode1, obj->opcode3); + } + ++iObj; + prevOffset = offsets[i]; + prevNode = on; + } + _objectNodesMap[i] = prevNode; + } +} + +void Resource::free_OBJ() { + debug(DBG_RES, "Resource::free_OBJ()"); + ObjectNode *prevNode = 0; + for (int i = 0; i < _numObjectNodes; ++i) { + if (_objectNodesMap[i] != prevNode) { + ObjectNode *curNode = _objectNodesMap[i]; + free(curNode->objects); + _objectNodesMap[i] = 0; + prevNode = curNode; + } + } +} + +void Resource::load_PGE(File *f) { + debug(DBG_RES, "Resource::load_PGE()"); + int len = f->size() - 2; + _pgeNum = f->readUint16LE(); + memset(_pgeInit, 0, sizeof(_pgeInit)); + debug(DBG_RES, "len=%d _pgeNum=%d", len, _pgeNum); + for (uint16 i = 0; i < _pgeNum; ++i) { + InitPGE *pge = &_pgeInit[i]; + pge->type = f->readUint16LE(); + pge->pos_x = f->readUint16LE(); + pge->pos_y = f->readUint16LE(); + pge->obj_node_number = f->readUint16LE(); + pge->life = f->readUint16LE(); + for (int lc = 0; lc < 4; ++lc) { + pge->counter_values[lc] = f->readUint16LE(); + } + pge->object_type = f->readByte(); + pge->init_room = f->readByte(); + pge->room_location = f->readByte(); + pge->init_flags = f->readByte(); + pge->colliding_icon_num = f->readByte(); + pge->icon_num = f->readByte(); + pge->object_id = f->readByte(); + pge->skill = f->readByte(); + pge->mirror_x = f->readByte(); + pge->flags = f->readByte(); + pge->unk1C = f->readByte(); + f->readByte(); + pge->text_num = f->readByte(); + f->readByte(); + } +} + +void Resource::load_ANI(File *f) { + debug(DBG_RES, "Resource::load_ANI()"); + int size = f->size() - 2; + _ani = (uint8 *)malloc(size); + if (!_ani) { + error("Unable to allocate ANI buffer"); + } else { + f->seek(2); + f->read(_ani, size); + } +} + +void Resource::load_TBN(File *f) { + debug(DBG_RES, "Resource::load_TBN()"); + int len = f->size(); + _tbn = (uint8 *)malloc(len); + if (!_tbn) { + error("Unable to allocate TBN buffer"); + } else { + f->read(_tbn, len); + } +} + +void Resource::load_CMD(File *pf) { + debug(DBG_RES, "Resource::load_CMD()"); + free(_cmd); + int len = pf->size(); + _cmd = (uint8 *)malloc(len); + if (!_cmd) { + error("Unable to allocate CMD buffer"); + } else { + pf->read(_cmd, len); + } +} + +void Resource::load_POL(File *pf) { + debug(DBG_RES, "Resource::load_POL()"); + free(_pol); + int len = pf->size(); + _pol = (uint8 *)malloc(len); + if (!_pol) { + error("Unable to allocate POL buffer"); + } else { + pf->read(_pol, len); + } +} + +void Resource::load_VCE(int num, int segment, uint8 **buf, uint32 *bufSize) { + *buf = 0; + int offset = _voicesOffsetsTable[num]; + if (offset != 0xFFFF) { + const uint16 *p = _voicesOffsetsTable + offset / 2; + offset = (*p++) * 2048; + int count = *p++; + if (segment < count) { + File f; + if (f.open("VOICE.VCE", _dataPath, "rb")) { + int voiceSize = p[segment] * 2048 / 5; + free(_voiceBuf); + _voiceBuf = (uint8 *)malloc(voiceSize); + if (_voiceBuf) { + uint8 *dst = _voiceBuf; + offset += 0x2000; + for (int s = 0; s < count; ++s) { + int len = p[s] * 2048; + for (int i = 0; i < len / (0x2000 + 2048); ++i) { + if (s == segment) { + f.seek(offset); + int n = 2048; + while (n--) { + int v = f.readByte(); + if (v & 0x80) { + v = -(v & 0x7F); + } + *dst++ = (uint8)(v & 0xFF); + } + } + offset += 0x2000 + 2048; + } + if (s == segment) { + break; + } + } + *buf = _voiceBuf; + *bufSize = voiceSize; + } + } + } + } +} diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/resource.h b/project/jni/application/REminiscence/REminiscence-0.1.9/resource.h new file mode 100644 index 000000000..97b334a2d --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/resource.h @@ -0,0 +1,169 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __RESOURCE_H__ +#define __RESOURCE_H__ + +#include "intern.h" + +struct File; + +struct LocaleData { + enum Id { + LI_01_CONTINUE_OR_ABORT = 0, + LI_02_TIME, + LI_03_CONTINUE, + LI_04_ABORT, + LI_05_COMPLETED, + LI_06_LEVEL, + LI_07_START, + LI_08_SKILL, + LI_09_PASSWORD, + LI_10_INFO, + LI_11_QUIT, + LI_12_SKILL_LEVEL, + LI_13_EASY, + LI_14_NORMAL, + LI_15_EXPERT, + LI_16_ENTER_PASSWORD1, + LI_17_ENTER_PASSWORD2, + LI_18_RESUME_GAME, + LI_19_ABORT_GAME, + LI_20_LOAD_GAME, + LI_21_SAVE_GAME, + LI_22_SAVE_SLOT, + + LI_NUM + }; + + static const char *_textsTableFR[]; + static const char *_textsTableEN[]; + static const char *_textsTableDE[]; + static const char *_textsTableSP[]; + static const uint8 _stringsTableFR[]; + static const uint8 _stringsTableEN[]; + static const uint8 _stringsTableDE[]; + static const uint8 _stringsTableSP[]; +}; + +struct Resource { + typedef void (Resource::*LoadStub)(File *); + + enum ObjectType { + OT_MBK = 0x00, + OT_PGE = 0x01, + OT_PAL = 0x02, + OT_CT = 0x03, + OT_MAP = 0x04, + OT_SGD = 0x05, + OT_SPC = 0x06, + OT_RP = 0x07, + OT_DEMO = 0x08, + OT_ANI = 0x09, + OT_OBJ = 0x0A, + OT_TBN = 0x0B, + OT_SPR = 0x0C, + OT_TAB = 0x0D, + OT_ICN = 0x0E, + OT_FNT = 0x0F, + OT_TXTBIN = 0x10, + OT_CMD = 0x11, + OT_POL = 0x12, + OT_SPRM = 0x13, + OT_OFF = 0x14, + + OT_NUM = 0x15 + }; + + static const uint16 _voicesOffsetsTable[]; + + const char *_dataPath; + Version _ver; + char _entryName[30]; + uint8 *_fnt; + MbkEntry *_mbk; + uint8 *_mbkData; + uint8 *_icn; + uint8 *_tab; + uint8 *_spc; // BE + uint16 _numSpc; + uint8 _rp[0x4A]; + uint8 *_pal; // BE + uint8 *_ani; + uint8 *_tbn; + int8 _ctData[0x1D00]; + uint8 *_spr1; + uint8 *_spr_off[1287]; // 0-0x22F + 0x28E-0x2E9 ... conrad, 0x22F-0x28D : junkie + uint8 _sprm[0x8411]; // MERCENAI.SPR size + uint16 _pgeNum; + InitPGE _pgeInit[256]; + uint8 *_map; + uint16 _numObjectNodes; + ObjectNode *_objectNodesMap[255]; + uint8 *_memBuf; + SoundFx *_sfxList; + uint8 _numSfx; + uint8 *_cmd; + uint8 *_pol; + uint8 *_cine_off; + uint8 *_cine_txt; + uint8 *_voiceBuf; + char **_extTextsTable; + const char **_textsTable; + uint8 *_extStringsTable; + const uint8 *_stringsTable; + + Resource(const char *dataPath, Version ver); + ~Resource(); + + void clearLevelRes(); + void load_FIB(const char *fileName); + void load_MAP_menu(const char *fileName, uint8 *dstPtr); + void load_PAL_menu(const char *fileName, uint8 *dstPtr); + void load_SPR_OFF(const char *fileName, uint8 *sprData); + void load_CINE(); + void load_TEXT(); + void free_TEXT(); + void load(const char *objName, int objType); + void load_CT(File *pf); + void load_FNT(File *pf); + void load_MBK(File *pf); + void load_ICN(File *pf); + void load_SPR(File *pf); + void load_SPRM(File *pf); + void load_RP(File *pf); + void load_SPC(File *pf); + void load_PAL(File *pf); + void load_MAP(File *pf); + void load_OBJ(File *pf); + void free_OBJ(); + void load_PGE(File *pf); + void load_ANI(File *pf); + void load_TBN(File *pf); + void load_CMD(File *pf); + void load_POL(File *pf); + void load_VCE(int num, int segment, uint8 **buf, uint32 *bufSize); + const uint8 *getGameString(int num) { + return _stringsTable + READ_LE_UINT16(_stringsTable + num * 2); + } + const char *getMenuString(int num) { + return (num >= 0 && num < LocaleData::LI_NUM) ? _textsTable[num] : ""; + } +}; + +#endif // __RESOURCE_H__ diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/scaler.cpp b/project/jni/application/REminiscence/REminiscence-0.1.9/scaler.cpp new file mode 100644 index 000000000..5cb3bac29 --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/scaler.cpp @@ -0,0 +1,142 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "scaler.h" + + +const Scaler _scalers[] = { + { "point1x", &point1x, 1 }, + { "point2x", &point2x, 2 }, + { "scale2x", &scale2x, 2 }, + { "point3x", &point3x, 3 }, + { "scale3x", &scale3x, 3 } +}; + +void point1x(uint16 *dst, uint16 dstPitch, const uint16 *src, uint16 srcPitch, uint16 w, uint16 h) { + dstPitch >>= 1; + while (h--) { + memcpy(dst, src, w * 2); + dst += dstPitch; + src += srcPitch; + } +} + +void point2x(uint16 *dst, uint16 dstPitch, const uint16 *src, uint16 srcPitch, uint16 w, uint16 h) { + dstPitch >>= 1; + while (h--) { + uint16 *p = dst; + for (int i = 0; i < w; ++i, p += 2) { + uint16 c = *(src + i); + *(p) = c; + *(p + 1) = c; + *(p + dstPitch) = c; + *(p + dstPitch + 1) = c; + } + dst += dstPitch * 2; + src += srcPitch; + } +} + +void point3x(uint16 *dst, uint16 dstPitch, const uint16 *src, uint16 srcPitch, uint16 w, uint16 h) { + dstPitch >>= 1; + while (h--) { + uint16 *p = dst; + for (int i = 0; i < w; ++i, p += 3) { + uint16 c = *(src + i); + *(p) = c; + *(p + 1) = c; + *(p + 2) = c; + *(p + dstPitch) = c; + *(p + dstPitch + 1) = c; + *(p + dstPitch + 2) = c; + *(p + 2 * dstPitch) = c; + *(p + 2 * dstPitch + 1) = c; + *(p + 2 * dstPitch + 2) = c; + } + dst += dstPitch * 3; + src += srcPitch; + } +} + +void scale2x(uint16 *dst, uint16 dstPitch, const uint16 *src, uint16 srcPitch, uint16 w, uint16 h) { + dstPitch >>= 1; + while (h--) { + uint16 *p = dst; + for (int i = 0; i < w; ++i, p += 2) { + uint16 B = *(src + i - srcPitch); + uint16 D = *(src + i - 1); + uint16 E = *(src + i); + uint16 F = *(src + i + 1); + uint16 H = *(src + i + srcPitch); + if (B != H && D != F) { + *(p) = D == B ? D : E; + *(p + 1) = B == F ? F : E; + *(p + dstPitch) = D == H ? D : E; + *(p + dstPitch + 1) = H == F ? F : E; + } else { + *(p) = E; + *(p + 1) = E; + *(p + dstPitch) = E; + *(p + dstPitch + 1) = E; + } + } + dst += dstPitch * 2; + src += srcPitch; + } +} + +void scale3x(uint16 *dst, uint16 dstPitch, const uint16 *src, uint16 srcPitch, uint16 w, uint16 h) { + dstPitch >>= 1; + while (h--) { + uint16 *p = dst; + for (int i = 0; i < w; ++i, p += 3) { + uint16 A = *(src + i - srcPitch - 1); + uint16 B = *(src + i - srcPitch); + uint16 C = *(src + i - srcPitch + 1); + uint16 D = *(src + i - 1); + uint16 E = *(src + i); + uint16 F = *(src + i + 1); + uint16 G = *(src + i + srcPitch - 1); + uint16 H = *(src + i + srcPitch); + uint16 I = *(src + i + srcPitch + 1); + if (B != H && D != F) { + *(p) = D == B ? D : E; + *(p + 1) = (D == B && E != C) || (B == F && E != A) ? B : E; + *(p + 2) = B == F ? F : E; + *(p + dstPitch) = (D == B && E != G) || (D == B && E != A) ? D : E; + *(p + dstPitch + 1) = E; + *(p + dstPitch + 2) = (B == F && E != I) || (H == F && E != C) ? F : E; + *(p + 2 * dstPitch) = D == H ? D : E; + *(p + 2 * dstPitch + 1) = (D == H && E != I) || (H == F && E != G) ? H : E; + *(p + 2 * dstPitch + 2) = H == F ? F : E; + } else { + *(p) = E; + *(p + 1) = E; + *(p + 2) = E; + *(p + dstPitch) = E; + *(p + dstPitch + 1) = E; + *(p + dstPitch + 2) = E; + *(p + 2 * dstPitch) = E; + *(p + 2 * dstPitch + 1) = E; + *(p + 2 * dstPitch + 2) = E; + } + } + dst += dstPitch * 3; + src += srcPitch; + } +} diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/scaler.h b/project/jni/application/REminiscence/REminiscence-0.1.9/scaler.h new file mode 100644 index 000000000..233bcb15a --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/scaler.h @@ -0,0 +1,44 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __SCALER_H__ +#define __SCALER_H__ + +#include "intern.h" + +typedef void (*ScaleProc)(uint16 *dst, uint16 dstPitch, const uint16 *src, uint16 srcPitch, uint16 w, uint16 h); + +enum { + NUM_SCALERS = 5 +}; + +struct Scaler { + const char *name; + ScaleProc proc; + uint8 factor; +}; + +extern const Scaler _scalers[]; + +void point1x(uint16 *dst, uint16 dstPitch, const uint16 *src, uint16 srcPitch, uint16 w, uint16 h); +void point2x(uint16 *dst, uint16 dstPitch, const uint16 *src, uint16 srcPitch, uint16 w, uint16 h); +void point3x(uint16 *dst, uint16 dstPitch, const uint16 *src, uint16 srcPitch, uint16 w, uint16 h); +void scale2x(uint16 *dst, uint16 dstPitch, const uint16 *src, uint16 srcPitch, uint16 w, uint16 h); +void scale3x(uint16 *dst, uint16 dstPitch, const uint16 *src, uint16 srcPitch, uint16 w, uint16 h); + +#endif // __SCALER_H__ diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/sfx_player.cpp b/project/jni/application/REminiscence/REminiscence-0.1.9/sfx_player.cpp new file mode 100644 index 000000000..7a4100a0f --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/sfx_player.cpp @@ -0,0 +1,175 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "mixer.h" +#include "sfx_player.h" + + +SfxPlayer::SfxPlayer(Mixer *mixer) + : _mod(0), _playing(false), _mix(mixer) { +} + +void SfxPlayer::play(uint8 num) { + debug(DBG_SFX, "SfxPlayer::play(%d)", num); + if (!_playing) { + if (num >= 68 && num <= 75) { + static const Module *modTable[] = { + &_module68, &_module68, &_module70, &_module70, + &_module72, &_module73, &_module74, &_module75 + }; + _mod = modTable[num - 68]; + _curOrder = 0; + _numOrders = READ_BE_UINT16(_mod->moduleData); + _orderDelay = 0; + _modData = _mod->moduleData + 0x22; + memset(_samples, 0, sizeof(_samples)); + _samplesLeft = 0; + _mix->setPremixHook(mixCallback, this); + _playing = true; + } + } +} + +void SfxPlayer::stop() { + if (_playing) { + _mix->setPremixHook(0, 0); + _playing = false; + } +} + +void SfxPlayer::playSample(int channel, const uint8 *sampleData, uint16 period) { + assert(channel < NUM_CHANNELS); + SampleInfo *si = &_samples[channel]; + si->len = READ_BE_UINT16(sampleData); sampleData += 2; + si->vol = READ_BE_UINT16(sampleData); sampleData += 2; + si->loopPos = READ_BE_UINT16(sampleData); sampleData += 2; + si->loopLen = READ_BE_UINT16(sampleData); sampleData += 2; + si->freq = PAULA_FREQ / period; + si->pos = 0; + si->data = sampleData; +} + +void SfxPlayer::handleTick() { + if (!_playing) { + return; + } + if (_orderDelay != 0) { + --_orderDelay; + // check for end of song + if (_orderDelay == 0 && _modData == 0) { + _playing = false; + } + } else { + _orderDelay = READ_BE_UINT16(_mod->moduleData + 2); + debug(DBG_SFX, "curOrder=%d/%d _orderDelay=%d\n", _curOrder, _numOrders, _orderDelay); + int16 period = 0; + for (int ch = 0; ch < 3; ++ch) { + const uint8 *sampleData = 0; + uint8 b = *_modData++; + if (b != 0) { + --b; + assert(b < 5); + period = READ_BE_UINT16(_mod->moduleData + 4 + b * 2); + sampleData = _mod->sampleData[b]; + } + b = *_modData++; + if (b != 0) { + int16 per = period + (b - 1); + if (per >= 0 && per < 40) { + per = _periodTable[per]; + } else if (per == -3) { + per = 0xA0; + } else { + per = 0x71; + } + playSample(ch, sampleData, per); + } + } + ++_curOrder; + if (_curOrder >= _numOrders) { + debug(DBG_SFX, "End of song"); + _orderDelay += 20; + _modData = 0; + } + } +} + +void SfxPlayer::mixSamples(int8 *buf, int samplesLen) { + for (int i = 0; i < NUM_CHANNELS; ++i) { + SampleInfo *si = &_samples[i]; + if (si->data) { + int8 *mixbuf = buf; + int len = si->len << FRAC_BITS; + int loopLen = si->loopLen << FRAC_BITS; + int loopPos = si->loopPos << FRAC_BITS; + int deltaPos = (si->freq << FRAC_BITS) / _mix->getSampleRate(); + int curLen = samplesLen; + int pos = si->pos; + while (curLen != 0) { + int count; + if (loopLen > (2 << FRAC_BITS)) { + assert(si->loopPos + si->loopLen <= si->len); + if (pos >= loopPos + loopLen) { + pos -= loopLen; + } + count = MIN(curLen, (loopPos + loopLen - pos - 1) / deltaPos + 1); + curLen -= count; + } else { + if (pos >= len) { + count = 0; + } else { + count = MIN(curLen, (len - pos - 1) / deltaPos + 1); + } + curLen = 0; + } + while (count--) { + int out = resample3Pt(si, pos, deltaPos, FRAC_BITS); + Mixer::addclamp(*mixbuf++, out * si->vol / 64); + pos += deltaPos; + } + } + si->pos = pos; + } + } +} + +bool SfxPlayer::mix(int8 *buf, int len) { + if (_playing) { + memset(buf, 0, len); + const int samplesPerTick = _mix->getSampleRate() / 50; + while (len != 0) { + if (_samplesLeft == 0) { + handleTick(); + _samplesLeft = samplesPerTick; + } + int count = _samplesLeft; + if (count > len) { + count = len; + } + _samplesLeft -= count; + len -= count; + mixSamples(buf, count); + buf += count; + } + } + return _playing; +} + +bool SfxPlayer::mixCallback(void *param, int8 *buf, int len) { + return ((SfxPlayer *)param)->mix(buf, len); +} diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/sfx_player.h b/project/jni/application/REminiscence/REminiscence-0.1.9/sfx_player.h new file mode 100644 index 000000000..fe82e87f3 --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/sfx_player.h @@ -0,0 +1,102 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __SFX_PLAYER_H__ +#define __SFX_PLAYER_H__ + +#include "intern.h" + +struct Mixer; + +struct SfxPlayer { + enum { + NUM_SAMPLES = 5, + NUM_CHANNELS = 3, + FRAC_BITS = 12, + PAULA_FREQ = 3546897 + }; + + struct Module { + const uint8 *sampleData[NUM_SAMPLES]; + const uint8 *moduleData; + }; + + struct SampleInfo { + uint16 len; + uint16 vol; + uint16 loopPos; + uint16 loopLen; + int freq; + int pos; + const uint8 *data; + + int8 getPCM(int offset) const { + if (offset < 0) { + offset = 0; + } else if (offset >= (int)len) { + offset = len - 1; + } + return (int8)data[offset]; + } + }; + + static const uint8 _musicData68[]; + static const uint8 _musicData70[]; + static const uint8 _musicData72[]; + static const uint8 _musicData73[]; + static const uint8 _musicData74[]; + static const uint8 _musicData75[]; + static const uint8 _musicDataSample1[]; + static const uint8 _musicDataSample2[]; // tick + static const uint8 _musicDataSample3[]; // bell + static const uint8 _musicDataSample4[]; + static const uint8 _musicDataSample5[]; + static const uint8 _musicDataSample6[]; + static const uint8 _musicDataSample7[]; + static const uint8 _musicDataSample8[]; + static const Module _module68; + static const Module _module70; + static const Module _module72; + static const Module _module73; + static const Module _module74; + static const Module _module75; + static const uint16 _periodTable[]; + + const Module *_mod; + bool _playing; + int _samplesLeft; + uint16 _curOrder; + uint16 _numOrders; + uint16 _orderDelay; + const uint8 *_modData; + SampleInfo _samples[NUM_CHANNELS]; + Mixer *_mix; + + SfxPlayer(Mixer *mixer); + + void play(uint8 num); + void stop(); + void playSample(int channel, const uint8 *sampleData, uint16 period); + void handleTick(); + bool mix(int8 *buf, int len); + void mixSamples(int8 *buf, int samplesLen); + + static bool mixCallback(void *param, int8 *buf, int len); +}; + +#endif // __SFX_PLAYER_H__ diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/staticres.cpp b/project/jni/application/REminiscence/REminiscence-0.1.9/staticres.cpp new file mode 100644 index 000000000..d693e5a4e --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/staticres.cpp @@ -0,0 +1,3380 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "game.h" +#include "resource.h" + + +const Cutscene::OpcodeStub Cutscene::_opcodeTable[] = { + /* 0x00 */ + &Cutscene::op_markCurPos, + &Cutscene::op_refreshScreen, + &Cutscene::op_waitForSync, + &Cutscene::op_drawShape, + /* 0x04 */ + &Cutscene::op_setPalette, + &Cutscene::op_markCurPos, + &Cutscene::op_drawStringAtBottom, + &Cutscene::op_nop, + /* 0x08 */ + &Cutscene::op_skip3, + &Cutscene::op_refreshAll, + &Cutscene::op_drawShapeScale, + &Cutscene::op_drawShapeScaleRotate, + /* 0x0C */ + &Cutscene::op_drawCreditsText, + &Cutscene::op_drawStringAtPos, + &Cutscene::op_handleKeys +}; + +const char *Cutscene::_namesTable[] = { + "DEBUT", + "OBJET", + "CARTE", + "GEN", + "CHUTE", + "CODE", + "DESINTEG", + "INTRO1", + "STREM", + "HOLOSEQ", + "CARTEID", + "PONT", + "ASC", + "MAP", + "METRO", + "MISSIONS", + "GENMIS", + "MEMO", + "TAXI", + "ACCROCHE", + "VOYAGE", + "TELEPORT", + "LIFT", + "ESPIONS", + "LOG", + "FIN", + "GENEXP", + "LOGOS", + "OVER", + "SCORE", + "INTRO2" +}; + +const uint16 Cutscene::_offsetsTable[] = { + 0x0000, 0x0000, 0x0001, 0x0003, 0x0001, 0x0004, 0xFFFF, 0x0000, 0x0001, 0x0002, + 0x0003, 0x0000, 0x0004, 0x0000, 0xFFFF, 0x0100, 0xFFFF, 0x0000, 0x0006, 0x0000, + 0x0001, 0x0001, 0xFFFF, 0x0000, 0xFFFF, 0x0200, 0x8007, 0x0000, 0x0003, 0x0001, + 0x0001, 0x000B, 0x0001, 0x0005, 0x0009, 0x0000, 0x0001, 0x0006, 0xFFFF, 0x0000, + 0x000B, 0x0000, 0x0001, 0x000A, 0xFFFF, 0x0001, 0xFFFF, 0x0002, 0xFFFF, 0x0000, + 0x000D, 0x0004, 0x000D, 0x0000, 0x000D, 0x0001, 0x000D, 0x0002, 0x000D, 0x0003, + 0xFFFF, 0x0000, 0xFFFF, 0x0001, 0x0001, 0x000C, 0x0001, 0x000D, 0x0001, 0x000E, + 0x0001, 0x000F, 0x0001, 0x0010, 0x000F, 0x0000, 0x000F, 0x0001, 0x000F, 0x0001, + 0x000F, 0x0003, 0x000F, 0x0002, 0x000F, 0x0004, 0x0001, 0x0008, 0x0001, 0x0007, + 0x000F, 0x0005, 0xFFFF, 0x0000, 0x0004, 0x0001, 0x0011, 0x0000, 0x0001, 0x0009, + 0x0012, 0x0000, 0xFFFF, 0x0000, 0x0014, 0x0000, 0x0015, 0x0000, 0x0016, 0x0000, + 0x0016, 0x0001, 0xFFFF, 0x0012, 0x0017, 0x0000, 0x0001, 0x0011, 0x0018, 0x0000, + 0x0001, 0x0013, 0x0019, 0x0000, 0x001A, 0x0000, 0x0019, 0x0001, 0x001B, 0x0000, + 0x001C, 0x0000, 0x000F, 0x0006, 0x000F, 0x0006, 0x000F, 0x0007, 0x000F, 0x0008, + 0x000F, 0x0009, 0x000F, 0x000A, 0x001D, 0x0000, 0x001B, 0x0001, 0x001E, 0x0000, + 0xFFFF, 0x0000 +}; + +const uint16 Cutscene::_cosTable[] = { + 0x0100, 0x00FF, 0x00FF, 0x00FF, 0x00FF, 0x00FF, 0x00FE, 0x00FE, + 0x00FD, 0x00FC, 0x00FC, 0x00FB, 0x00FA, 0x00F9, 0x00F8, 0x00F7, + 0x00F6, 0x00F4, 0x00F3, 0x00F2, 0x00F0, 0x00EE, 0x00ED, 0x00EB, + 0x00E9, 0x00E8, 0x00E6, 0x00E4, 0x00E2, 0x00DF, 0x00DD, 0x00DB, + 0x00D9, 0x00D6, 0x00D4, 0x00D1, 0x00CF, 0x00CC, 0x00C9, 0x00C6, + 0x00C4, 0x00C1, 0x00BE, 0x00BB, 0x00B8, 0x00B5, 0x00B1, 0x00AE, + 0x00AB, 0x00A7, 0x00A4, 0x00A1, 0x009D, 0x009A, 0x0096, 0x0092, + 0x008F, 0x008B, 0x0087, 0x0083, 0x007F, 0x007C, 0x0078, 0x0074, + 0x0070, 0x006C, 0x0068, 0x0064, 0x005F, 0x005B, 0x0057, 0x0053, + 0x004F, 0x004A, 0x0046, 0x0042, 0x003D, 0x0039, 0x0035, 0x0030, + 0x002C, 0x0028, 0x0023, 0x001F, 0x001A, 0x0016, 0x0011, 0x000D, + 0x0008, 0x0004, 0x0000, 0xFFFC, 0xFFF8, 0xFFF3, 0xFFEF, 0xFFEA, + 0xFFE6, 0xFFE1, 0xFFDD, 0xFFD8, 0xFFD4, 0xFFD0, 0xFFCB, 0xFFC7, + 0xFFC3, 0xFFBE, 0xFFBA, 0xFFB6, 0xFFB1, 0xFFAD, 0xFFA9, 0xFFA5, + 0xFFA1, 0xFF9C, 0xFF98, 0xFF94, 0xFF90, 0xFF8C, 0xFF88, 0xFF84, + 0xFF80, 0xFF7D, 0xFF79, 0xFF75, 0xFF71, 0xFF6E, 0xFF6A, 0xFF66, + 0xFF63, 0xFF5F, 0xFF5C, 0xFF59, 0xFF55, 0xFF52, 0xFF4F, 0xFF4B, + 0xFF48, 0xFF45, 0xFF42, 0xFF3F, 0xFF3C, 0xFF3A, 0xFF37, 0xFF34, + 0xFF31, 0xFF2F, 0xFF2C, 0xFF2A, 0xFF27, 0xFF25, 0xFF23, 0xFF21, + 0xFF1E, 0xFF1C, 0xFF1A, 0xFF18, 0xFF17, 0xFF15, 0xFF13, 0xFF12, + 0xFF10, 0xFF0E, 0xFF0D, 0xFF0C, 0xFF0A, 0xFF09, 0xFF08, 0xFF07, + 0xFF06, 0xFF05, 0xFF04, 0xFF04, 0xFF03, 0xFF02, 0xFF02, 0xFF01, + 0xFF01, 0xFF01, 0xFF01, 0xFF01, 0xFF00, 0xFF01, 0xFF01, 0xFF01, + 0xFF01, 0xFF01, 0xFF02, 0xFF02, 0xFF03, 0xFF04, 0xFF04, 0xFF05, + 0xFF06, 0xFF07, 0xFF08, 0xFF09, 0xFF0A, 0xFF0C, 0xFF0D, 0xFF0E, + 0xFF10, 0xFF12, 0xFF13, 0xFF15, 0xFF17, 0xFF18, 0xFF1A, 0xFF1C, + 0xFF1E, 0xFF21, 0xFF23, 0xFF25, 0xFF27, 0xFF2A, 0xFF2C, 0xFF2F, + 0xFF31, 0xFF34, 0xFF37, 0xFF3A, 0xFF3C, 0xFF3F, 0xFF42, 0xFF45, + 0xFF48, 0xFF4B, 0xFF4F, 0xFF52, 0xFF55, 0xFF59, 0xFF5C, 0xFF5F, + 0xFF63, 0xFF66, 0xFF6A, 0xFF6E, 0xFF71, 0xFF75, 0xFF79, 0xFF7D, + 0xFF81, 0xFF84, 0xFF88, 0xFF8C, 0xFF90, 0xFF94, 0xFF98, 0xFF9C, + 0xFFA1, 0xFFA5, 0xFFA9, 0xFFAD, 0xFFB1, 0xFFB6, 0xFFBA, 0xFFBE, + 0xFFC3, 0xFFC7, 0xFFCB, 0xFFD0, 0xFFD4, 0xFFD8, 0xFFDD, 0xFFE1, + 0xFFE6, 0xFFEA, 0xFFEF, 0xFFF3, 0xFFF8, 0xFFFC, 0x0000, 0x0004, + 0x0008, 0x000D, 0x0011, 0x0016, 0x001A, 0x001F, 0x0023, 0x0028, + 0x002C, 0x0030, 0x0035, 0x0039, 0x003D, 0x0042, 0x0046, 0x004A, + 0x004F, 0x0053, 0x0057, 0x005B, 0x005F, 0x0064, 0x0068, 0x006C, + 0x0070, 0x0074, 0x0078, 0x007C, 0x0080, 0x0083, 0x0087, 0x008B, + 0x008F, 0x0092, 0x0096, 0x009A, 0x009D, 0x00A1, 0x00A4, 0x00A7, + 0x00AB, 0x00AE, 0x00B1, 0x00B5, 0x00B8, 0x00BB, 0x00BE, 0x00C1, + 0x00C4, 0x00C6, 0x00C9, 0x00CC, 0x00CF, 0x00D1, 0x00D4, 0x00D6, + 0x00D9, 0x00DB, 0x00DD, 0x00DF, 0x00E2, 0x00E4, 0x00E6, 0x00E8, + 0x00E9, 0x00EB, 0x00ED, 0x00EE, 0x00F0, 0x00F2, 0x00F3, 0x00F4, + 0x00F6, 0x00F7, 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FC, + 0x00FD, 0x00FE, 0x00FE, 0x00FF, 0x00FF, 0x00FF, 0x00FF, 0x00FF +}; + +const uint16 Cutscene::_sinTable[] = { + 0x0000, 0x0004, 0x0008, 0x000D, 0x0011, 0x0016, 0x001A, 0x001F, + 0x0023, 0x0028, 0x002C, 0x0030, 0x0035, 0x0039, 0x003D, 0x0042, + 0x0046, 0x004A, 0x004F, 0x0053, 0x0057, 0x005B, 0x005F, 0x0064, + 0x0068, 0x006C, 0x0070, 0x0074, 0x0078, 0x007C, 0x007F, 0x0083, + 0x0087, 0x008B, 0x008F, 0x0092, 0x0096, 0x009A, 0x009D, 0x00A1, + 0x00A4, 0x00A7, 0x00AB, 0x00AE, 0x00B1, 0x00B5, 0x00B8, 0x00BB, + 0x00BE, 0x00C1, 0x00C4, 0x00C6, 0x00C9, 0x00CC, 0x00CF, 0x00D1, + 0x00D4, 0x00D6, 0x00D9, 0x00DB, 0x00DD, 0x00DF, 0x00E2, 0x00E4, + 0x00E6, 0x00E8, 0x00E9, 0x00EB, 0x00ED, 0x00EE, 0x00F0, 0x00F2, + 0x00F3, 0x00F4, 0x00F6, 0x00F7, 0x00F8, 0x00F9, 0x00FA, 0x00FB, + 0x00FC, 0x00FC, 0x00FD, 0x00FE, 0x00FE, 0x00FF, 0x00FF, 0x00FF, + 0x00FF, 0x00FF, 0x0100, 0x00FF, 0x00FF, 0x00FF, 0x00FF, 0x00FF, + 0x00FE, 0x00FE, 0x00FD, 0x00FC, 0x00FC, 0x00FB, 0x00FA, 0x00F9, + 0x00F8, 0x00F7, 0x00F6, 0x00F4, 0x00F3, 0x00F2, 0x00F0, 0x00EE, + 0x00ED, 0x00EB, 0x00E9, 0x00E8, 0x00E6, 0x00E4, 0x00E2, 0x00DF, + 0x00DD, 0x00DB, 0x00D9, 0x00D6, 0x00D4, 0x00D1, 0x00CF, 0x00CC, + 0x00C9, 0x00C6, 0x00C4, 0x00C1, 0x00BE, 0x00BB, 0x00B8, 0x00B5, + 0x00B1, 0x00AE, 0x00AB, 0x00A7, 0x00A4, 0x00A1, 0x009D, 0x009A, + 0x0096, 0x0092, 0x008F, 0x008B, 0x0087, 0x0083, 0x007F, 0x007C, + 0x0078, 0x0074, 0x0070, 0x006C, 0x0068, 0x0064, 0x005F, 0x005B, + 0x0057, 0x0053, 0x004F, 0x004A, 0x0046, 0x0042, 0x003D, 0x0039, + 0x0035, 0x0030, 0x002C, 0x0028, 0x0023, 0x001F, 0x001A, 0x0016, + 0x0011, 0x000D, 0x0008, 0x0004, 0x0000, 0xFFFC, 0xFFF8, 0xFFF3, + 0xFFEF, 0xFFEA, 0xFFE6, 0xFFE1, 0xFFDD, 0xFFD8, 0xFFD4, 0xFFD0, + 0xFFCB, 0xFFC7, 0xFFC3, 0xFFBE, 0xFFBA, 0xFFB6, 0xFFB1, 0xFFAD, + 0xFFA9, 0xFFA5, 0xFFA1, 0xFF9C, 0xFF98, 0xFF94, 0xFF90, 0xFF8C, + 0xFF88, 0xFF84, 0xFF80, 0xFF7D, 0xFF79, 0xFF75, 0xFF71, 0xFF6E, + 0xFF6A, 0xFF66, 0xFF63, 0xFF5F, 0xFF5C, 0xFF59, 0xFF55, 0xFF52, + 0xFF4F, 0xFF4B, 0xFF48, 0xFF45, 0xFF42, 0xFF3F, 0xFF3C, 0xFF3A, + 0xFF37, 0xFF34, 0xFF31, 0xFF2F, 0xFF2C, 0xFF2A, 0xFF27, 0xFF25, + 0xFF23, 0xFF21, 0xFF1E, 0xFF1C, 0xFF1A, 0xFF18, 0xFF17, 0xFF15, + 0xFF13, 0xFF12, 0xFF10, 0xFF0E, 0xFF0D, 0xFF0C, 0xFF0A, 0xFF09, + 0xFF08, 0xFF07, 0xFF06, 0xFF05, 0xFF04, 0xFF04, 0xFF03, 0xFF02, + 0xFF02, 0xFF01, 0xFF01, 0xFF01, 0xFF01, 0xFF01, 0xFF00, 0xFF01, + 0xFF01, 0xFF01, 0xFF01, 0xFF01, 0xFF02, 0xFF02, 0xFF03, 0xFF04, + 0xFF04, 0xFF05, 0xFF06, 0xFF07, 0xFF08, 0xFF09, 0xFF0A, 0xFF0C, + 0xFF0D, 0xFF0E, 0xFF10, 0xFF12, 0xFF13, 0xFF15, 0xFF17, 0xFF18, + 0xFF1A, 0xFF1C, 0xFF1E, 0xFF21, 0xFF23, 0xFF25, 0xFF27, 0xFF2A, + 0xFF2C, 0xFF2F, 0xFF31, 0xFF34, 0xFF37, 0xFF3A, 0xFF3C, 0xFF3F, + 0xFF42, 0xFF45, 0xFF48, 0xFF4B, 0xFF4F, 0xFF52, 0xFF55, 0xFF59, + 0xFF5C, 0xFF5F, 0xFF63, 0xFF66, 0xFF6A, 0xFF6E, 0xFF71, 0xFF75, + 0xFF79, 0xFF7D, 0xFF81, 0xFF84, 0xFF88, 0xFF8C, 0xFF90, 0xFF94, + 0xFF98, 0xFF9C, 0xFFA1, 0xFFA5, 0xFFA9, 0xFFAD, 0xFFB1, 0xFFB6, + 0xFFBA, 0xFFBE, 0xFFC3, 0xFFC7, 0xFFCB, 0xFFD0, 0xFFD4, 0xFFD8, + 0xFFDD, 0xFFE1, 0xFFE6, 0xFFEA, 0xFFEF, 0xFFF3, 0xFFF8, 0xFFFC +}; + +const uint8 Cutscene::_creditsData[] = { + 0xFE, 0x14, 0x00, 0x01, 0x00, 0x04, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x46, 0x6C, 0x61, 0x73, + 0x68, 0x42, 0x61, 0x63, 0x6B, 0x20, 0x54, 0x65, 0x61, 0x6D, 0x20, 0x69, 0x73, 0x2E, 0x2E, 0x2E, + 0xFE, 0x32, 0xFE, 0x14, 0x00, 0x01, 0x00, 0x07, 0x00, 0x01, 0x00, 0x05, 0x20, 0x20, 0x49, 0x6E, + 0x69, 0x74, 0x69, 0x61, 0x6C, 0x20, 0x50, 0x72, 0x6F, 0x6A, 0x65, 0x63, 0x74, 0x20, 0x50, 0x72, + 0x6F, 0x67, 0x72, 0x61, 0x6D, 0x6D, 0x65, 0x72, 0x73, 0x3A, 0x7C, 0x7C, 0xFE, 0x1E, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x42, 0x65, 0x6E, 0x6F, 0x69, + 0x73, 0x74, 0x20, 0x41, 0x72, 0x6F, 0x6E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x1E, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x68, 0x69, 0x6C, + 0x69, 0x70, 0x70, 0x65, 0x20, 0x43, 0x68, 0x61, 0x73, 0x74, 0x65, 0x6C, 0x20, 0x20, 0x20, 0x7C, + 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x50, 0x61, 0x75, 0x6C, 0x20, 0x43, 0x75, 0x69, 0x73, 0x73, 0x65, 0x74, 0x20, 0x20, + 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x46, 0x72, 0x65, 0x64, 0x65, 0x72, 0x69, 0x63, 0x20, 0x53, 0x61, 0x76, 0x6F, 0x69, 0x72, 0x20, + 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x50, 0xFE, 0x1E, 0x00, 0x01, 0x00, 0x05, 0x20, 0x20, 0x47, 0x72, + 0x61, 0x70, 0x68, 0x69, 0x63, 0x20, 0x41, 0x72, 0x74, 0x69, 0x73, 0x74, 0x73, 0x3A, 0x7C, 0x7C, + 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, + 0x61, 0x74, 0x72, 0x69, 0x63, 0x6B, 0x20, 0x44, 0x61, 0x68, 0x65, 0x72, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x54, 0x68, 0x69, 0x65, 0x72, 0x72, 0x79, 0x20, 0x4C, 0x65, 0x76, 0x61, 0x73, 0x74, 0x72, + 0x65, 0x20, 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x44, 0x65, 0x6E, 0x69, 0x73, 0x20, 0x4D, 0x65, 0x72, 0x63, 0x69, + 0x65, 0x72, 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x54, 0x68, 0x69, 0x65, 0x72, 0x72, 0x79, 0x20, 0x50, 0x65, 0x72, + 0x72, 0x65, 0x61, 0x75, 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x43, 0x68, 0x72, 0x69, 0x73, 0x74, 0x69, 0x61, 0x6E, 0x20, 0x52, + 0x6F, 0x62, 0x65, 0x72, 0x74, 0x20, 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x46, 0x61, 0x62, 0x72, 0x69, 0x63, 0x65, + 0x20, 0x56, 0x69, 0x73, 0x73, 0x65, 0x72, 0x6F, 0x74, 0x20, 0x20, 0x7C, 0xFE, 0x50, 0xFE, 0x1E, + 0x00, 0x01, 0x00, 0x07, 0x20, 0x20, 0x50, 0x43, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, + 0x20, 0x50, 0x72, 0x6F, 0x67, 0x72, 0x61, 0x6D, 0x6D, 0x65, 0x72, 0x73, 0x3A, 0x7C, 0x7C, 0xFE, + 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x68, 0x69, + 0x6C, 0x69, 0x70, 0x70, 0x65, 0x20, 0x43, 0x68, 0x61, 0x73, 0x74, 0x65, 0x6C, 0x20, 0x20, 0x20, + 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x50, 0x61, 0x75, 0x6C, 0x20, 0x43, 0x75, 0x69, 0x73, 0x73, 0x65, 0x74, 0x20, + 0x20, 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x54, 0x68, 0x69, 0x65, 0x72, 0x72, 0x79, 0x20, 0x47, 0x61, 0x65, 0x72, 0x74, 0x68, + 0x6E, 0x65, 0x72, 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x41, 0x6C, 0x61, 0x69, 0x6E, 0x20, 0x52, 0x61, 0x6D, 0x6F, + 0x6E, 0x64, 0x20, 0x20, 0x20, 0x20, 0x7C, 0xFE, 0xB4, 0xFE, 0x1E, 0x00, 0x01, 0x00, 0x05, 0x20, + 0x20, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6F, 0x6E, 0x61, 0x6C, 0x20, 0x50, 0x43, 0x20, 0x67, + 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x3A, 0x7C, 0x7C, 0xFE, 0x1E, 0x7C, 0x7C, 0xFE, 0x1E, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x54, 0x68, 0x69, + 0x65, 0x72, 0x72, 0x79, 0x20, 0x4C, 0x65, 0x76, 0x61, 0x73, 0x74, 0x72, 0x65, 0x20, 0x20, 0x7C, + 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x44, 0x65, 0x6E, 0x69, 0x73, 0x20, 0x4D, 0x65, 0x72, 0x63, 0x69, 0x65, 0x72, 0x20, 0x20, + 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x54, 0x68, 0x69, 0x65, 0x72, 0x72, 0x79, 0x20, 0x50, 0x65, 0x72, 0x72, 0x65, 0x61, 0x75, + 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x50, 0xFE, 0x1E, 0x00, 0x01, 0x00, 0x05, 0x20, 0x20, 0x53, 0x74, + 0x6F, 0x72, 0x79, 0x3A, 0x7C, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x61, 0x75, 0x6C, 0x20, 0x43, 0x75, 0x69, + 0x73, 0x73, 0x65, 0x74, 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x50, 0xFE, 0x1E, 0x00, 0x01, 0x00, 0x05, + 0x20, 0x20, 0x4C, 0x65, 0x76, 0x65, 0x6C, 0x20, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6E, 0x3A, 0x7C, + 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x50, 0x61, 0x75, 0x6C, 0x20, 0x43, 0x75, 0x69, 0x73, 0x73, 0x65, 0x74, 0x20, + 0x20, 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x50, 0x61, 0x74, 0x72, 0x69, 0x63, 0x6B, 0x20, 0x44, 0x61, 0x68, 0x65, 0x72, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x44, 0x65, 0x6E, 0x69, 0x73, 0x20, 0x4D, 0x65, 0x72, 0x63, + 0x69, 0x65, 0x72, 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x46, 0x72, 0x65, 0x64, 0x65, 0x72, 0x69, 0x63, 0x20, 0x53, 0x61, + 0x76, 0x6F, 0x69, 0x72, 0x20, 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x46, 0x61, 0x62, 0x72, 0x69, 0x63, 0x65, 0x20, + 0x56, 0x69, 0x73, 0x73, 0x65, 0x72, 0x6F, 0x74, 0x20, 0x20, 0x7C, 0xFE, 0x50, 0xFE, 0x1E, 0x00, + 0x01, 0x00, 0x05, 0x20, 0x20, 0x4D, 0x75, 0x73, 0x69, 0x63, 0x3A, 0x7C, 0x7C, 0xFE, 0x1E, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4A, + 0x65, 0x61, 0x6E, 0x20, 0x42, 0x61, 0x75, 0x64, 0x6C, 0x6F, 0x74, 0x20, 0x20, 0x20, 0x7C, 0xFE, + 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x46, 0x61, + 0x62, 0x72, 0x69, 0x63, 0x65, 0x20, 0x56, 0x69, 0x73, 0x73, 0x65, 0x72, 0x6F, 0x74, 0x20, 0x20, + 0x7C, 0xFE, 0x50, 0xFE, 0x1E, 0x00, 0x01, 0x00, 0x08, 0x20, 0x20, 0x53, 0x6F, 0x75, 0x6E, 0x64, + 0x20, 0x66, 0x78, 0x3A, 0x7C, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x42, 0x65, 0x6E, 0x6F, 0x69, 0x73, 0x74, 0x20, 0x41, 0x72, 0x6F, + 0x6E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x68, 0x69, 0x6C, 0x69, 0x70, 0x70, 0x65, 0x20, 0x43, + 0x68, 0x61, 0x73, 0x74, 0x65, 0x6C, 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x61, 0x75, 0x6C, + 0x20, 0x43, 0x75, 0x69, 0x73, 0x73, 0x65, 0x74, 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x46, 0x61, 0x62, 0x72, 0x69, + 0x63, 0x65, 0x20, 0x56, 0x69, 0x73, 0x73, 0x65, 0x72, 0x6F, 0x74, 0x20, 0x20, 0x7C, 0xFE, 0x50, + 0xFE, 0x1E, 0x00, 0x01, 0x00, 0x06, 0x20, 0x20, 0x41, 0x63, 0x74, 0x6F, 0x72, 0x73, 0x3A, 0x7C, + 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x42, 0x65, 0x6E, 0x6F, 0x69, 0x73, 0x74, 0x20, 0x41, 0x72, 0x6F, 0x6E, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x50, 0x61, 0x74, 0x72, 0x69, 0x63, 0x6B, 0x20, 0x44, 0x61, 0x68, 0x65, 0x72, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x54, 0x68, 0x69, 0x65, 0x72, 0x72, 0x79, 0x20, 0x4C, 0x65, 0x76, 0x61, + 0x73, 0x74, 0x72, 0x65, 0x20, 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x44, 0x65, 0x6E, 0x69, 0x73, 0x20, 0x4D, 0x65, + 0x72, 0x63, 0x69, 0x65, 0x72, 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x54, 0x68, 0x69, 0x65, 0x72, 0x72, 0x79, 0x20, + 0x50, 0x65, 0x72, 0x72, 0x65, 0x61, 0x75, 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x43, 0x68, 0x72, 0x69, 0x73, 0x74, 0x69, 0x61, + 0x6E, 0x20, 0x52, 0x6F, 0x62, 0x65, 0x72, 0x74, 0x20, 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x1E, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x46, 0x61, 0x62, 0x72, + 0x69, 0x63, 0x65, 0x20, 0x56, 0x69, 0x73, 0x73, 0x65, 0x72, 0x6F, 0x74, 0x20, 0x20, 0x7C, 0xFE, + 0x50, 0xFE, 0x1E, 0x00, 0x01, 0x00, 0x06, 0x20, 0x20, 0x53, 0x74, 0x75, 0x6E, 0x74, 0x6D, 0x61, + 0x6E, 0x3A, 0x7C, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x44, 0x65, 0x6E, 0x69, 0x73, 0x20, 0x4D, 0x65, 0x72, 0x63, 0x69, + 0x65, 0x72, 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x50, 0xFE, 0x1E, 0x00, 0x01, 0x00, 0x06, 0x20, 0x20, + 0x56, 0x69, 0x64, 0x65, 0x6F, 0x20, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6F, 0x72, 0x73, 0x3A, + 0x7C, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x50, 0x61, 0x74, 0x72, 0x69, 0x63, 0x6B, 0x20, 0x44, 0x61, 0x68, 0x65, 0x72, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x54, 0x68, 0x69, 0x65, 0x72, 0x72, 0x79, 0x20, 0x50, 0x65, 0x72, 0x72, 0x65, + 0x61, 0x75, 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x46, 0x61, 0x62, 0x72, 0x69, 0x63, 0x65, 0x20, 0x56, 0x69, 0x73, + 0x73, 0x65, 0x72, 0x6F, 0x74, 0x20, 0x20, 0x7C, 0xFE, 0x50, 0xFE, 0x1E, 0x00, 0x01, 0x00, 0x06, + 0x20, 0x20, 0x56, 0x69, 0x64, 0x65, 0x6F, 0x20, 0x43, 0x6F, 0x2D, 0x64, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x6F, 0x72, 0x73, 0x3A, 0x7C, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x54, 0x68, 0x69, 0x65, 0x72, 0x72, 0x79, 0x20, 0x4C, 0x65, + 0x76, 0x61, 0x73, 0x74, 0x72, 0x65, 0x20, 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x44, 0x65, 0x6E, 0x69, 0x73, 0x20, + 0x4D, 0x65, 0x72, 0x63, 0x69, 0x65, 0x72, 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x43, 0x68, 0x72, 0x69, 0x73, 0x74, 0x69, 0x61, + 0x6E, 0x20, 0x52, 0x6F, 0x62, 0x65, 0x72, 0x74, 0x20, 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x50, 0xFE, + 0x1E, 0x00, 0x01, 0x00, 0x06, 0x20, 0x20, 0x56, 0x69, 0x64, 0x65, 0x6F, 0x20, 0x73, 0x66, 0x78, + 0x3A, 0x7C, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x61, 0x75, 0x6C, 0x20, 0x43, 0x75, 0x69, 0x73, 0x73, 0x65, + 0x74, 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x54, 0x68, 0x69, 0x65, 0x72, 0x72, 0x79, 0x20, 0x50, 0x65, 0x72, 0x72, + 0x65, 0x61, 0x75, 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x46, 0x61, 0x62, 0x72, 0x69, 0x63, 0x65, 0x20, 0x56, 0x69, + 0x73, 0x73, 0x65, 0x72, 0x6F, 0x74, 0x20, 0x20, 0x7C, 0xFE, 0x50, 0xFE, 0x1E, 0x00, 0x01, 0x00, + 0x07, 0x20, 0x20, 0x54, 0x65, 0x73, 0x74, 0x65, 0x72, 0x73, 0x3A, 0x7C, 0x7C, 0xFE, 0x1E, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, + 0x68, 0x69, 0x6C, 0x20, 0x42, 0x72, 0x61, 0x64, 0x6C, 0x65, 0x79, 0x20, 0x20, 0x20, 0x7C, 0xFE, + 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x61, 0x74, + 0x72, 0x69, 0x63, 0x69, 0x61, 0x20, 0x43, 0x75, 0x69, 0x73, 0x73, 0x65, 0x74, 0x20, 0x20, 0x20, + 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x53, 0x69, 0x6D, 0x6F, 0x6E, 0x20, 0x48, 0x61, 0x64, 0x6C, 0x69, 0x6E, 0x67, 0x74, + 0x6F, 0x6E, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x44, 0x61, 0x6E, 0x69, 0x65, 0x6C, 0x20, 0x4C, 0x6C, 0x65, 0x77, 0x65, 0x6C, + 0x6C, 0x79, 0x6E, 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x4A, 0x65, 0x61, 0x6E, 0x2D, 0x50, 0x69, 0x65, 0x72, 0x72, 0x65, 0x20, 0x4C, 0x75, 0x63, 0x6B, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4D, 0x61, 0x72, 0x74, 0x69, 0x6E, 0x20, 0x53, 0x6D, + 0x69, 0x74, 0x68, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x50, 0xFE, 0x1E, 0x00, 0x01, 0x00, + 0x08, 0x20, 0x20, 0x4D, 0x61, 0x6E, 0x79, 0x20, 0x74, 0x68, 0x61, 0x6E, 0x6B, 0x73, 0x20, 0x74, + 0x6F, 0x2E, 0x2E, 0x2E, 0x7C, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4C, 0x6F, 0x72, 0x69, 0x20, 0x43, 0x68, 0x72, 0x69, + 0x73, 0x74, 0x65, 0x6E, 0x73, 0x65, 0x6E, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x61, 0x74, 0x72, 0x69, 0x63, 0x69, 0x61, 0x20, 0x43, 0x75, + 0x69, 0x73, 0x73, 0x65, 0x74, 0x20, 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x41, 0x6E, 0x6E, 0x65, 0x2D, 0x4D, 0x61, 0x72, 0x69, 0x65, 0x20, + 0x4A, 0x6F, 0x61, 0x73, 0x73, 0x69, 0x6D, 0x20, 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4A, 0x65, 0x61, 0x6E, 0x2D, 0x50, 0x69, 0x65, 0x72, 0x72, + 0x65, 0x20, 0x4C, 0x75, 0x63, 0x6B, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x1E, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4D, + 0x61, 0x72, 0x63, 0x20, 0x4D, 0x69, 0x6E, 0x69, 0x65, 0x72, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7C, + 0xFE, 0x50, 0xFE, 0x1E, 0x00, 0x01, 0x00, 0x05, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x20, 0x62, 0x79, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7C, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x50, 0x61, 0x75, 0x6C, 0x20, 0x43, 0x75, 0x69, 0x73, 0x73, 0x65, 0x74, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x50, 0xFE, 0x1E, 0x00, 0x01, 0x00, + 0x03, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x72, 0x6F, 0x64, 0x75, + 0x63, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x7C, 0x7C, 0xFE, 0x1E, 0x20, 0x7C, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x44, 0x65, 0x6C, + 0x70, 0x68, 0x69, 0x6E, 0x65, 0x20, 0x53, 0x6F, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x6E, 0x64, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x55, 0x53, 0x20, 0x47, 0x4F, 0x4C, 0x44, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x1E, 0x20, 0x7C, 0x20, 0x7C, + 0x20, 0x7C, 0x20, 0x7C, 0x20, 0x7C, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x28, 0x63, 0x29, 0x4D, 0x43, 0x4D, 0x58, 0x43, 0x49, 0x49, 0x49, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x7C, 0xFE, 0x50, 0xFE, 0xFF, 0x00, 0xFF +}; + +const uint16 Cutscene::_creditsCutSeq[] = { + 0x00, 0x05, 0x2F, 0x32, 0x36, 0x3E, 0x30, 0x39, 0x3F, 0x14, 0x34, 0xFFFF +}; + +const uint8 Cutscene::_musicTable[] = { + 0x10, 0x15, 0x15, 0xFF, 0x15, 0x19, 0x0F, 0xFF, 0x15, 0x04, 0x15, 0xFF, 0xFF, 0x00, 0x19, 0x15, + 0x15, 0x0D, 0x15, 0x0D, 0x18, 0x13, 0xFF, 0xFF, 0xFF, 0x14, 0x14, 0x14, 0x14, 0x14, 0xFF, 0xFF, + 0x13, 0x13, 0x13, 0x13, 0x15, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x13, 0x13, 0x11, 0xFF, 0x03, + 0x0E, 0x13, 0x12, 0xFF, 0x06, 0x07, 0x0A, 0x0A, 0x15, 0x05, 0x13, 0x02, 0x15, 0x09, 0x17, 0x08, + 0x0B, 0x0C, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0xFF, 0xFF, 0xFF +}; + +const uint8 Cutscene::_protectionShapeData[] = { + 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x06, 0xD4, 0x00, 0x00, 0x00, 0x92, + 0x00, 0x00, 0x08, 0x24, 0x00, 0x00, 0x00, 0x02, 0x00, 0x28, 0x00, 0x54, 0x00, 0x8C, 0x00, 0xB2, + 0x00, 0xDE, 0x01, 0x21, 0x01, 0x54, 0x01, 0x7B, 0x01, 0x9D, 0x01, 0xC2, 0x01, 0xF0, 0x02, 0x2C, + 0x02, 0x66, 0x02, 0x9F, 0x02, 0xBF, 0x02, 0xF7, 0x03, 0x35, 0x03, 0x75, 0x03, 0xA4, 0x03, 0xFE, + 0x04, 0x3B, 0x04, 0x7B, 0x04, 0xB6, 0x04, 0xF8, 0x05, 0x3B, 0x05, 0x66, 0x05, 0x9E, 0x05, 0xD2, + 0x06, 0x10, 0x00, 0x00, 0x0F, 0xFF, 0x02, 0x22, 0x03, 0x33, 0x04, 0x44, 0x05, 0x55, 0x06, 0x66, + 0x07, 0x77, 0x08, 0x88, 0x09, 0x99, 0x0A, 0xAA, 0x0B, 0xBB, 0x0C, 0xCC, 0x0D, 0xDD, 0x0E, 0xEE, + 0x0F, 0xFF, 0x00, 0x00, 0x04, 0x05, 0x05, 0x05, 0x00, 0x00, 0x04, 0x44, 0x05, 0x55, 0x06, 0x66, + 0x07, 0x77, 0x08, 0x88, 0x09, 0x99, 0x0A, 0xAA, 0x0B, 0xBB, 0x0C, 0xCC, 0x0D, 0xDD, 0x0E, 0xEE, + 0x0F, 0xFF, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x02, 0x00, 0x01, 0x01, 0x00, 0x02, 0x02, 0x00, + 0x03, 0x01, 0x00, 0x04, 0x02, 0x00, 0x05, 0x01, 0x00, 0x06, 0x02, 0x00, 0x07, 0x02, 0x00, 0x08, + 0x02, 0x00, 0x09, 0x01, 0x00, 0x0A, 0x02, 0x00, 0x0B, 0x02, 0x00, 0x0A, 0x00, 0x0C, 0x02, 0x00, + 0x0D, 0x01, 0x00, 0x0E, 0x02, 0x00, 0x0F, 0x01, 0x80, 0x0A, 0x00, 0x61, 0x00, 0x00, 0x02, 0x00, + 0x10, 0x01, 0x80, 0x02, 0xFF, 0xC9, 0xFF, 0xFF, 0x02, 0x80, 0x04, 0xFF, 0xB1, 0xFF, 0xFF, 0x02, + 0x00, 0x11, 0x01, 0x00, 0x12, 0x02, 0x00, 0x0E, 0x00, 0x00, 0x02, 0x80, 0x0D, 0x00, 0x00, 0x00, + 0x0E, 0x01, 0x80, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x02, 0x00, 0x13, 0x01, 0x00, 0x14, 0x02, 0x00, + 0x15, 0x01, 0x00, 0x16, 0x02, 0x80, 0x0B, 0xFF, 0xEE, 0x00, 0x4C, 0x02, 0x00, 0x17, 0x01, 0x00, + 0x18, 0x01, 0x00, 0x19, 0x02, 0x00, 0x1A, 0x02, 0x00, 0x1B, 0x02, 0x00, 0x1C, 0x02, 0x00, 0x08, + 0x00, 0x00, 0x02, 0x00, 0x18, 0x01, 0x00, 0x19, 0x02, 0x80, 0x0D, 0x00, 0x00, 0x00, 0x46, 0x01, + 0x80, 0x0E, 0x00, 0x00, 0x00, 0x46, 0x02, 0x00, 0x1D, 0x01, 0x00, 0x1E, 0x02, 0x80, 0x0B, 0x00, + 0x08, 0x00, 0x4D, 0x02, 0x00, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x1F, 0x01, 0x00, 0x20, 0x02, 0x00, + 0x21, 0x02, 0x00, 0x22, 0x02, 0x00, 0x23, 0x01, 0x00, 0x24, 0x02, 0x00, 0x25, 0x01, 0x00, 0x26, + 0x01, 0x00, 0x27, 0x02, 0x00, 0x28, 0x01, 0x00, 0x29, 0x02, 0x00, 0x2A, 0x01, 0x00, 0x2B, 0x01, + 0x00, 0x0F, 0x00, 0x00, 0x02, 0x00, 0x2C, 0x01, 0x00, 0x2D, 0x01, 0x00, 0x2E, 0x02, 0x00, 0x2F, + 0x01, 0x00, 0x30, 0x02, 0x80, 0x18, 0x00, 0x00, 0x00, 0x7F, 0x01, 0x80, 0x19, 0x00, 0x00, 0x00, + 0x7F, 0x02, 0x80, 0x0A, 0x00, 0x03, 0xFF, 0xB2, 0x01, 0x80, 0x0A, 0x00, 0x03, 0xFF, 0xDB, 0x01, + 0x00, 0x31, 0x01, 0x00, 0x32, 0x01, 0x00, 0x33, 0x01, 0x80, 0x31, 0x00, 0x10, 0x00, 0x22, 0x02, + 0x00, 0x34, 0x02, 0x00, 0x0F, 0x00, 0x00, 0x02, 0x00, 0x14, 0x02, 0x00, 0x15, 0x01, 0x00, 0x16, + 0x02, 0x80, 0x0B, 0xFF, 0xEE, 0x00, 0x4C, 0x02, 0x00, 0x18, 0x01, 0x00, 0x19, 0x02, 0x00, 0x25, + 0x01, 0x00, 0x26, 0x01, 0x00, 0x27, 0x02, 0x00, 0x28, 0x01, 0x00, 0x29, 0x02, 0x00, 0x2A, 0x01, + 0x00, 0x35, 0x01, 0x00, 0x36, 0x02, 0x00, 0x0B, 0x00, 0x00, 0x02, 0x00, 0x37, 0x01, 0x00, 0x38, + 0x02, 0x00, 0x39, 0x01, 0x00, 0x3A, 0x02, 0x00, 0x3B, 0x02, 0x80, 0x28, 0xFF, 0xC8, 0x00, 0x0B, + 0x01, 0x00, 0x3C, 0x02, 0x00, 0x3D, 0x01, 0x00, 0x3E, 0x01, 0x00, 0x3F, 0x02, 0x00, 0x08, 0x00, + 0x00, 0x02, 0x00, 0x40, 0x01, 0x00, 0x41, 0x02, 0x00, 0x42, 0x01, 0x80, 0x2D, 0x00, 0x00, 0x00, + 0x7E, 0x01, 0x80, 0x2E, 0x00, 0x00, 0x00, 0x36, 0x02, 0x00, 0x43, 0x01, 0x00, 0x44, 0x02, 0x00, + 0x09, 0x00, 0x00, 0x02, 0x00, 0x45, 0x01, 0x00, 0x46, 0x02, 0x00, 0x47, 0x01, 0x00, 0x48, 0x02, + 0x00, 0x49, 0x01, 0x80, 0x2D, 0xFF, 0xDA, 0x00, 0x7D, 0x01, 0x80, 0x2E, 0xFF, 0xE5, 0x00, 0x36, + 0x02, 0x00, 0x4A, 0x01, 0x00, 0x0C, 0x00, 0x00, 0x02, 0x00, 0x25, 0x01, 0x00, 0x26, 0x01, 0x00, + 0x27, 0x02, 0x00, 0x28, 0x01, 0x00, 0x29, 0x02, 0x00, 0x2A, 0x01, 0x00, 0x10, 0x01, 0x80, 0x02, + 0xFF, 0xC9, 0xFF, 0xFF, 0x02, 0x80, 0x04, 0xFF, 0xB1, 0xFF, 0xFF, 0x02, 0x00, 0x11, 0x01, 0x00, + 0x12, 0x02, 0x00, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x4B, 0x01, 0x00, 0x4C, 0x02, 0x80, 0x14, 0x00, + 0x34, 0xFF, 0xDF, 0x02, 0x00, 0x4D, 0x01, 0x00, 0x4E, 0x02, 0x00, 0x4F, 0x01, 0x00, 0x50, 0x02, + 0x00, 0x51, 0x02, 0x00, 0x52, 0x02, 0x80, 0x18, 0x00, 0x7F, 0x00, 0x7F, 0x01, 0x80, 0x19, 0x00, + 0x7F, 0x00, 0x7F, 0x02, 0x00, 0x53, 0x03, 0x80, 0x2B, 0xFF, 0xF9, 0x00, 0x05, 0x01, 0x00, 0x0C, + 0x00, 0x00, 0x02, 0x00, 0x40, 0x01, 0x00, 0x41, 0x02, 0x00, 0x54, 0x01, 0x80, 0x38, 0xFF, 0xF3, + 0x00, 0x00, 0x02, 0x80, 0x2E, 0x00, 0x00, 0x00, 0x36, 0x02, 0x80, 0x47, 0x00, 0x00, 0x00, 0x2C, + 0x01, 0x00, 0x55, 0x02, 0x80, 0x47, 0x00, 0x00, 0x00, 0x0D, 0x01, 0x80, 0x55, 0x00, 0x00, 0xFF, + 0xE1, 0x02, 0x00, 0x43, 0x01, 0x00, 0x44, 0x02, 0x00, 0x0D, 0x00, 0x00, 0x02, 0x00, 0x39, 0x01, + 0x00, 0x3A, 0x02, 0x00, 0x3B, 0x02, 0x80, 0x28, 0xFF, 0xC8, 0x00, 0x0B, 0x01, 0x00, 0x3C, 0x02, + 0x80, 0x15, 0x00, 0x00, 0xFF, 0xF1, 0x01, 0x80, 0x16, 0x00, 0x00, 0xFF, 0xF1, 0x02, 0x80, 0x0B, + 0xFF, 0xEE, 0x00, 0x3D, 0x02, 0x00, 0x56, 0x01, 0x00, 0x57, 0x02, 0x00, 0x58, 0x01, 0x00, 0x59, + 0x02, 0x00, 0x0A, 0x00, 0x00, 0x02, 0x00, 0x5A, 0x01, 0x00, 0x5B, 0x02, 0x00, 0x5C, 0x01, 0x00, + 0x5D, 0x02, 0x00, 0x5E, 0x01, 0x00, 0x5F, 0x01, 0x00, 0x60, 0x02, 0x00, 0x61, 0x02, 0x00, 0x62, + 0x01, 0x00, 0x0A, 0x00, 0x00, 0x02, 0x00, 0x63, 0x01, 0x80, 0x41, 0x00, 0x3B, 0x00, 0x1F, 0x02, + 0x80, 0x56, 0x00, 0x00, 0xFF, 0xCB, 0x01, 0x80, 0x57, 0x00, 0x00, 0xFF, 0xCB, 0x02, 0x00, 0x64, + 0x01, 0x00, 0x65, 0x02, 0x80, 0x28, 0x00, 0x05, 0xFF, 0xF3, 0x01, 0x80, 0x18, 0x00, 0x00, 0x00, + 0x7F, 0x01, 0x80, 0x19, 0x00, 0x00, 0x00, 0x7F, 0x02, 0x00, 0x0C, 0x00, 0x00, 0x02, 0x00, 0x39, + 0x01, 0x00, 0x3A, 0x02, 0x00, 0x3B, 0x02, 0x80, 0x28, 0xFF, 0xC8, 0x00, 0x0B, 0x01, 0x00, 0x3C, + 0x02, 0x80, 0x15, 0x00, 0x00, 0xFF, 0xDF, 0x01, 0x80, 0x16, 0x00, 0x00, 0xFF, 0xDF, 0x02, 0x80, + 0x0B, 0xFF, 0xEE, 0x00, 0x2B, 0x02, 0x00, 0x66, 0x01, 0x80, 0x5B, 0x00, 0x2F, 0x00, 0x00, 0x02, + 0x80, 0x62, 0x00, 0x2F, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x00, 0x00, 0x02, 0x80, 0x18, 0x00, 0x00, + 0x00, 0x7F, 0x01, 0x80, 0x19, 0x00, 0x00, 0x00, 0x7F, 0x02, 0x80, 0x5A, 0x00, 0x00, 0xFF, 0xA3, + 0x01, 0x80, 0x5B, 0x00, 0x00, 0xFF, 0xC5, 0x02, 0x80, 0x62, 0x00, 0x00, 0xFF, 0xC5, 0x01, 0x80, + 0x47, 0x00, 0x00, 0x00, 0x2C, 0x01, 0x00, 0x55, 0x02, 0x80, 0x47, 0x00, 0x00, 0x00, 0x0D, 0x01, + 0x80, 0x55, 0x00, 0x00, 0xFF, 0xE1, 0x02, 0x00, 0x0B, 0x00, 0x00, 0x02, 0x00, 0x67, 0x01, 0x00, + 0x68, 0x02, 0x00, 0x69, 0x01, 0x00, 0x6A, 0x01, 0x00, 0x6B, 0x02, 0x00, 0x6C, 0x02, 0x80, 0x58, + 0xFF, 0xD2, 0xFF, 0xE0, 0x01, 0x80, 0x59, 0xFF, 0xD2, 0xFF, 0xE0, 0x02, 0x00, 0x6D, 0x01, 0x80, + 0x14, 0xFF, 0xDB, 0x00, 0x16, 0x01, 0x00, 0x10, 0x00, 0x00, 0x02, 0x00, 0x42, 0x01, 0x80, 0x2D, + 0x00, 0x00, 0x00, 0x7E, 0x01, 0x80, 0x2E, 0x00, 0x00, 0x00, 0x36, 0x02, 0x00, 0x10, 0x01, 0x80, + 0x02, 0xFF, 0xC9, 0xFF, 0xFF, 0x02, 0x80, 0x04, 0xFF, 0xB1, 0xFF, 0xFF, 0x02, 0x00, 0x11, 0x01, + 0x00, 0x12, 0x02, 0x80, 0x31, 0x00, 0x04, 0xFF, 0xED, 0x01, 0x00, 0x6E, 0x01, 0x80, 0x33, 0x00, + 0x04, 0xFF, 0x97, 0x01, 0x80, 0x31, 0x00, 0x14, 0xFF, 0xCB, 0x02, 0x80, 0x34, 0x00, 0x04, 0xFF, + 0xEC, 0x02, 0x80, 0x47, 0x00, 0x00, 0x00, 0x04, 0x01, 0x80, 0x55, 0x00, 0x00, 0xFF, 0xD8, 0x02, + 0x00, 0x0D, 0x00, 0x00, 0x02, 0x80, 0x31, 0xFF, 0xBB, 0xFF, 0xFF, 0x01, 0x80, 0x32, 0xFF, 0xBB, + 0xFF, 0xFF, 0x01, 0x00, 0x6F, 0x01, 0x80, 0x31, 0xFF, 0xCB, 0x00, 0x21, 0x02, 0x80, 0x34, 0xFF, + 0xBB, 0xFF, 0xFF, 0x02, 0x00, 0x18, 0x01, 0x00, 0x19, 0x02, 0x00, 0x70, 0x01, 0x00, 0x71, 0x02, + 0x00, 0x72, 0x02, 0x00, 0x73, 0x02, 0x80, 0x28, 0xFF, 0xEE, 0x00, 0x2B, 0x01, 0x00, 0x0E, 0x00, + 0x00, 0x02, 0x00, 0x74, 0x01, 0x80, 0x2D, 0xFF, 0xF1, 0x00, 0x7D, 0x01, 0x80, 0x2E, 0x00, 0x00, + 0x00, 0x36, 0x02, 0x80, 0x31, 0xFF, 0xFB, 0xFF, 0xBF, 0x01, 0x00, 0x75, 0x01, 0x00, 0x76, 0x01, + 0x80, 0x31, 0x00, 0x1D, 0xFF, 0xCF, 0x02, 0x00, 0x77, 0x02, 0x00, 0x40, 0x01, 0x00, 0x41, 0x02, + 0x00, 0x78, 0x01, 0x00, 0x79, 0x01, 0x80, 0x28, 0xFF, 0xF8, 0x00, 0x05, 0x01, 0x00, 0x0F, 0x00, + 0x00, 0x02, 0x00, 0x4D, 0x01, 0x00, 0x4B, 0x01, 0x00, 0x7A, 0x02, 0x80, 0x14, 0x00, 0x33, 0xFF, + 0xDC, 0x02, 0x00, 0x4E, 0x02, 0x00, 0x7B, 0x01, 0x00, 0x7C, 0x02, 0x80, 0x15, 0x00, 0x66, 0xFF, + 0xD5, 0x01, 0x00, 0x7D, 0x02, 0x80, 0x0B, 0x00, 0x43, 0x00, 0x21, 0x02, 0x00, 0x7E, 0x01, 0x00, + 0x7F, 0x01, 0x00, 0x80, 0x01, 0x00, 0x81, 0x02, 0x00, 0x0C, 0x00, 0x00, 0x02, 0x80, 0x54, 0x00, + 0x00, 0xFF, 0xBA, 0x01, 0x80, 0x38, 0xFF, 0xF3, 0xFF, 0xF3, 0x02, 0x00, 0x56, 0x01, 0x00, 0x57, + 0x02, 0x00, 0x58, 0x01, 0x00, 0x59, 0x02, 0x80, 0x47, 0x00, 0x00, 0xFF, 0xEA, 0x01, 0x80, 0x55, + 0x00, 0x00, 0xFF, 0xBE, 0x02, 0x80, 0x47, 0x00, 0x00, 0xFF, 0xCB, 0x01, 0x80, 0x55, 0x00, 0x00, + 0xFF, 0x9F, 0x02, 0x80, 0x2B, 0x00, 0x0A, 0xFF, 0xC0, 0x01, 0x00, 0x0F, 0x00, 0x00, 0x02, 0x00, + 0x82, 0x01, 0x00, 0x83, 0x01, 0x80, 0x18, 0x00, 0x7F, 0x00, 0x00, 0x01, 0x80, 0x19, 0x00, 0x7F, + 0x00, 0x00, 0x02, 0x00, 0x53, 0x03, 0x00, 0x84, 0x01, 0x00, 0x85, 0x02, 0x00, 0x86, 0x02, 0x80, + 0x31, 0x00, 0x1D, 0x00, 0x1D, 0x02, 0x00, 0x87, 0x01, 0x80, 0x0A, 0x00, 0x16, 0xFF, 0xF6, 0x02, + 0x00, 0x88, 0x02, 0x80, 0x31, 0xFF, 0xFB, 0x00, 0x2D, 0x01, 0x00, 0x89, 0x01, 0x00, 0x0B, 0x00, + 0x00, 0x02, 0x00, 0x8A, 0x01, 0x80, 0x46, 0x00, 0x01, 0xFF, 0xE9, 0x02, 0x00, 0x8B, 0x01, 0x80, + 0x78, 0xFF, 0xDF, 0x00, 0x0B, 0x02, 0x00, 0x8C, 0x01, 0x00, 0x8D, 0x01, 0x00, 0x8E, 0x02, 0x00, + 0x8F, 0x01, 0x00, 0x90, 0x02, 0x00, 0x91, 0x01, 0x00, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x92, 0x01, + 0x80, 0x02, 0xFF, 0xA7, 0x00, 0x58, 0x02, 0x00, 0x93, 0x01, 0x00, 0x94, 0x02, 0x00, 0x95, 0x02, + 0x00, 0x96, 0x01, 0x00, 0x97, 0x02, 0x00, 0x98, 0x01, 0x00, 0x99, 0x02, 0x00, 0x9A, 0x01, 0x00, + 0x9B, 0x02, 0x80, 0x9A, 0xFF, 0xE1, 0x00, 0x00, 0x01, 0x80, 0x9B, 0xFF, 0xE1, 0x00, 0x00, 0x02, + 0x00, 0x0A, 0x00, 0x00, 0x02, 0x80, 0x02, 0xFF, 0xA7, 0x00, 0x58, 0x02, 0x00, 0x9C, 0x01, 0x00, + 0x9D, 0x02, 0x00, 0x9E, 0x02, 0x80, 0x73, 0xFF, 0xBF, 0x00, 0x7F, 0x02, 0x80, 0x28, 0xFF, 0xAB, + 0x00, 0x2C, 0x01, 0x80, 0x18, 0x00, 0x7F, 0x00, 0x7F, 0x01, 0x80, 0x19, 0x00, 0x7F, 0x00, 0x7F, + 0x02, 0x00, 0x53, 0x03, 0x00, 0x0C, 0x00, 0x00, 0x02, 0x80, 0x17, 0x00, 0x01, 0x00, 0x00, 0x01, + 0x00, 0x9F, 0x01, 0x00, 0xA0, 0x02, 0x80, 0x14, 0x00, 0x02, 0x00, 0x03, 0x02, 0x80, 0x4E, 0x00, + 0x39, 0xFF, 0xF0, 0x02, 0x00, 0xA1, 0x01, 0x80, 0x7F, 0x00, 0x3B, 0x00, 0x26, 0x01, 0x00, 0xA2, + 0x01, 0x80, 0x78, 0x00, 0x01, 0xFF, 0xB4, 0x02, 0x00, 0xA3, 0x02, 0x80, 0x28, 0xFF, 0xF4, 0xFF, + 0xF6, 0x01, 0x00, 0x0D, 0x00, 0x00, 0x02, 0x00, 0x25, 0x01, 0x00, 0x26, 0x01, 0x00, 0x27, 0x02, + 0x00, 0x28, 0x01, 0x00, 0x29, 0x02, 0x00, 0x2A, 0x01, 0x00, 0xA4, 0x01, 0x00, 0xA5, 0x02, 0x00, + 0xA6, 0x01, 0x00, 0xA7, 0x02, 0x80, 0xA6, 0xFF, 0xE1, 0x00, 0x00, 0x01, 0x80, 0xA7, 0xFF, 0xE1, + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x26, 0x00, 0x2F, 0x00, 0x3A, 0x00, 0x43, + 0x00, 0x54, 0x00, 0x65, 0x00, 0x6E, 0x00, 0x7F, 0x00, 0x8E, 0x00, 0x97, 0x00, 0xA0, 0x00, 0xAB, + 0x00, 0xC6, 0x00, 0xE1, 0x00, 0xF0, 0x01, 0x0B, 0x01, 0x1C, 0x01, 0x25, 0x01, 0x30, 0x01, 0x39, + 0x01, 0x44, 0x01, 0x55, 0x01, 0x5E, 0x01, 0x67, 0x01, 0x70, 0x01, 0x7B, 0x01, 0x86, 0x01, 0x8F, + 0x01, 0x9A, 0x01, 0xAB, 0x01, 0xB4, 0x01, 0xC1, 0x01, 0xCA, 0x01, 0xD3, 0x01, 0xF8, 0x02, 0x11, + 0x02, 0x1C, 0x02, 0x25, 0x02, 0x2E, 0x02, 0x37, 0x02, 0x40, 0x02, 0x4F, 0x02, 0x5A, 0x02, 0x65, + 0x02, 0x6E, 0x02, 0x77, 0x02, 0x90, 0x02, 0xA7, 0x02, 0xB0, 0x02, 0xBB, 0x02, 0xC6, 0x02, 0xD1, + 0x02, 0xF6, 0x03, 0x0F, 0x03, 0x1A, 0x03, 0x23, 0x03, 0x2E, 0x03, 0x37, 0x03, 0x48, 0x03, 0x51, + 0x03, 0x6A, 0x03, 0x75, 0x03, 0x8E, 0x03, 0x99, 0x03, 0xA2, 0x03, 0xAD, 0x03, 0xCE, 0x03, 0xE9, + 0x03, 0xF4, 0x03, 0xFD, 0x04, 0x16, 0x04, 0x2D, 0x04, 0x38, 0x04, 0x41, 0x04, 0x4C, 0x04, 0x57, + 0x04, 0x60, 0x04, 0x69, 0x04, 0x72, 0x04, 0x7F, 0x04, 0x88, 0x04, 0x99, 0x04, 0xA6, 0x04, 0xB1, + 0x04, 0xC2, 0x04, 0xCD, 0x04, 0xE2, 0x04, 0xFB, 0x05, 0x0C, 0x05, 0x17, 0x05, 0x20, 0x05, 0x2B, + 0x05, 0x34, 0x05, 0x4D, 0x05, 0x58, 0x05, 0x71, 0x05, 0x84, 0x05, 0x8D, 0x05, 0x98, 0x05, 0xB3, + 0x05, 0xC4, 0x05, 0xCF, 0x05, 0xDA, 0x05, 0xE3, 0x05, 0xEE, 0x05, 0xF7, 0x06, 0x02, 0x06, 0x0F, + 0x06, 0x1A, 0x06, 0x25, 0x06, 0x30, 0x06, 0x3B, 0x06, 0x4C, 0x06, 0x55, 0x06, 0x5E, 0x06, 0x69, + 0x06, 0x74, 0x06, 0x7F, 0x06, 0x8A, 0x06, 0x93, 0x06, 0x9C, 0x06, 0xAB, 0x06, 0xB6, 0x06, 0xBF, + 0x06, 0xD0, 0x06, 0xD9, 0x06, 0xE2, 0x06, 0xFB, 0x07, 0x0C, 0x07, 0x17, 0x07, 0x22, 0x07, 0x2D, + 0x07, 0x3E, 0x07, 0x4F, 0x07, 0x58, 0x07, 0x63, 0x07, 0x6C, 0x07, 0x77, 0x07, 0x86, 0x07, 0x91, + 0x07, 0x9A, 0x07, 0xA3, 0x07, 0xAC, 0x07, 0xB5, 0x07, 0xBE, 0x07, 0xD9, 0x07, 0xEA, 0x07, 0xF3, + 0x07, 0xFC, 0x08, 0x07, 0x08, 0x1C, 0x08, 0x35, 0x08, 0x46, 0x08, 0x5F, 0x08, 0x70, 0x08, 0x7B, + 0x08, 0x8C, 0x08, 0x95, 0x08, 0xA0, 0x08, 0xAF, 0x08, 0xB6, 0x08, 0xBF, 0x08, 0xCA, 0x08, 0xEF, + 0x09, 0x08, 0x09, 0x21, 0x03, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x7F, 0x81, 0x00, 0x0B, + 0x00, 0x7F, 0x00, 0x00, 0x00, 0x7F, 0xFA, 0x00, 0xF8, 0xFE, 0xFA, 0xFD, 0xF7, 0xF7, 0xFC, 0xF9, + 0xFE, 0xF8, 0xFF, 0xFA, 0x00, 0xFC, 0x00, 0xA8, 0x1C, 0x00, 0xFF, 0x00, 0x5B, 0x00, 0x03, 0x00, + 0x1E, 0x00, 0x1E, 0x03, 0x00, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, 0x19, 0xAD, 0x00, 0xFF, 0x00, + 0x67, 0x00, 0x4A, 0x00, 0x0F, 0x00, 0x16, 0x06, 0x00, 0x5B, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x03, + 0xFE, 0x06, 0xFC, 0x04, 0xFC, 0x01, 0xFD, 0x00, 0x06, 0x00, 0x53, 0x00, 0x01, 0x00, 0x18, 0xEB, + 0x00, 0x01, 0xF9, 0x03, 0xF9, 0x06, 0xFA, 0x06, 0xFD, 0x02, 0x00, 0x5B, 0x00, 0x23, 0x17, 0x17, + 0xE9, 0x06, 0x06, 0x00, 0x00, 0x00, 0x02, 0x06, 0x03, 0x06, 0x06, 0x03, 0x07, 0x02, 0x0A, 0xEB, + 0x00, 0x00, 0xE5, 0x05, 0x00, 0x00, 0x00, 0x1A, 0x65, 0x65, 0x9B, 0x00, 0x00, 0xDE, 0x1E, 0xFA, + 0x01, 0x00, 0xFF, 0x00, 0x0F, 0x00, 0x5D, 0x00, 0x0F, 0x00, 0x0F, 0xFF, 0x00, 0x27, 0x00, 0x19, + 0x00, 0x15, 0x00, 0x18, 0x03, 0x00, 0x7F, 0x00, 0x7F, 0x82, 0x00, 0x00, 0x81, 0x7E, 0x00, 0x0B, + 0x00, 0x7F, 0x00, 0x11, 0xE6, 0x0D, 0x00, 0xFB, 0x01, 0xFB, 0x03, 0xF9, 0x04, 0xFA, 0x03, 0xFD, + 0x06, 0xFD, 0x02, 0x00, 0x00, 0x00, 0x02, 0xFF, 0x05, 0x00, 0x0B, 0x00, 0x7F, 0x00, 0x22, 0xE3, + 0x0D, 0x00, 0xFB, 0x01, 0xFB, 0x03, 0xF9, 0x04, 0xFA, 0x03, 0xFD, 0x06, 0xFD, 0x02, 0x00, 0x00, + 0x00, 0x02, 0xFF, 0x08, 0x00, 0x05, 0x00, 0x60, 0x00, 0x57, 0x01, 0x00, 0x1E, 0x06, 0x00, 0x22, + 0x9B, 0x00, 0x65, 0x9B, 0x0B, 0x00, 0x08, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x57, 0x00, 0x04, 0xFF, + 0x06, 0xFE, 0x08, 0xFC, 0x07, 0xF7, 0x09, 0xFA, 0x03, 0xF8, 0x03, 0xFA, 0x00, 0x00, 0x81, 0x06, + 0x00, 0x24, 0x00, 0x0D, 0xFD, 0x00, 0xFC, 0xFF, 0xFC, 0xFC, 0xFE, 0xFA, 0x00, 0xFE, 0x0D, 0x00, + 0x02, 0x00, 0x24, 0x00, 0x3F, 0xE9, 0xFA, 0x17, 0xE9, 0x03, 0x00, 0x7F, 0x00, 0x2D, 0x00, 0x52, + 0x81, 0x00, 0x00, 0xEE, 0xFF, 0x00, 0x25, 0x00, 0x50, 0x00, 0x19, 0x00, 0x19, 0x03, 0x00, 0x00, + 0x00, 0x69, 0x00, 0xD0, 0x19, 0x00, 0x00, 0x30, 0x06, 0x00, 0x01, 0x00, 0x39, 0x18, 0x00, 0x00, + 0x15, 0xF9, 0xFF, 0xF9, 0xFD, 0xFA, 0xFA, 0xFD, 0xFA, 0x02, 0x00, 0x01, 0x00, 0x7F, 0x32, 0xE7, + 0x00, 0x19, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x2A, 0xFF, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x18, 0x00, 0x18, 0x03, 0x00, 0x7E, 0x00, 0x2D, 0xE9, 0x2D, 0xEE, 0xE5, 0x2A, 0xEB, 0x03, + 0x00, 0x31, 0x00, 0x66, 0xCF, 0x18, 0x00, 0xDF, 0x2A, 0xF5, 0xFF, 0x00, 0x56, 0x00, 0x4C, 0x00, + 0x16, 0x00, 0x16, 0x03, 0x00, 0x2F, 0x00, 0x66, 0x2C, 0x00, 0x00, 0x19, 0xD4, 0x00, 0x06, 0x00, + 0x56, 0x00, 0x7D, 0xFA, 0xFD, 0xFA, 0xFA, 0xFD, 0xF9, 0xFF, 0xF9, 0x15, 0x00, 0x00, 0x18, 0x02, + 0x00, 0x2C, 0x00, 0x7F, 0xD4, 0x00, 0x00, 0xAA, 0x04, 0x00, 0x11, 0x00, 0x70, 0xFE, 0xFC, 0x14, + 0x00, 0x0B, 0x13, 0xF2, 0x00, 0xFF, 0x00, 0x1C, 0x00, 0x69, 0x00, 0x0D, 0x00, 0x0B, 0xFF, 0x00, + 0x19, 0x00, 0x26, 0x00, 0x19, 0x00, 0x36, 0x10, 0x00, 0x2F, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x0A, + 0xFE, 0x0F, 0xFE, 0x09, 0xFD, 0x0A, 0xFB, 0x0A, 0xF8, 0x0A, 0xF9, 0x07, 0xF4, 0x08, 0xFC, 0x02, + 0xF9, 0x01, 0x00, 0xE9, 0x08, 0xF9, 0x06, 0xF5, 0x03, 0xF3, 0x02, 0xF3, 0x0A, 0x00, 0x17, 0x00, + 0x3C, 0x08, 0xFF, 0x0A, 0xFD, 0x05, 0xFC, 0x05, 0xFB, 0x06, 0xF7, 0xFE, 0x09, 0xFE, 0x06, 0xF7, + 0x0F, 0xF6, 0x0A, 0xF5, 0x09, 0x03, 0x00, 0x6F, 0x00, 0x1F, 0x10, 0x00, 0x00, 0x60, 0xF0, 0x00, + 0xFF, 0x00, 0x6B, 0x00, 0x2E, 0x00, 0x14, 0x00, 0x27, 0xFF, 0x00, 0x71, 0x00, 0x16, 0x00, 0x0E, + 0x00, 0x17, 0xFF, 0x00, 0x73, 0x00, 0x14, 0x00, 0x07, 0x00, 0x07, 0x02, 0x00, 0x6E, 0x00, 0x4D, + 0x00, 0x09, 0xF8, 0xFF, 0x05, 0x00, 0x6F, 0x00, 0x4D, 0x00, 0x32, 0xE1, 0x00, 0x0E, 0xF2, 0x08, + 0xF6, 0x06, 0xF5, 0x03, 0x00, 0x24, 0x00, 0x68, 0x2D, 0x00, 0x00, 0x07, 0xD3, 0x00, 0x03, 0x00, + 0x51, 0x00, 0x00, 0x2E, 0x00, 0x00, 0x27, 0xD2, 0x00, 0xFF, 0x00, 0x51, 0x00, 0x00, 0x00, 0x2B, + 0x00, 0x26, 0xFF, 0x00, 0x67, 0x00, 0x24, 0x00, 0x17, 0x00, 0x17, 0x0A, 0x00, 0x7F, 0x00, 0x4B, + 0xFB, 0x00, 0xFB, 0xFE, 0x01, 0x00, 0xFA, 0xFD, 0xFD, 0xFD, 0xFD, 0xFC, 0xFC, 0xF7, 0xFF, 0xFB, + 0x00, 0xFB, 0x1A, 0x0D, 0x09, 0x00, 0x7F, 0x00, 0x39, 0xF8, 0x00, 0xFC, 0xFF, 0xFA, 0xFD, 0xFD, + 0xFD, 0xFC, 0xFA, 0xFD, 0xF9, 0xFF, 0xFB, 0x00, 0xFC, 0x1D, 0x0C, 0xFF, 0x00, 0x4E, 0x00, 0x49, + 0x00, 0x13, 0x00, 0x13, 0x03, 0x00, 0x45, 0x00, 0x36, 0x0C, 0x00, 0x04, 0x47, 0xF0, 0x00, 0x03, + 0x00, 0x45, 0x00, 0x69, 0x1B, 0x00, 0x00, 0x16, 0xE5, 0x00, 0x03, 0x00, 0x38, 0x00, 0x36, 0x0C, + 0x00, 0x00, 0x27, 0xF4, 0x00, 0x10, 0x00, 0x3F, 0x00, 0x7F, 0xE2, 0x00, 0x00, 0xF5, 0x01, 0xF1, + 0x02, 0xF7, 0x03, 0xF6, 0x05, 0xF6, 0x08, 0xF6, 0x07, 0xF9, 0x0C, 0xF8, 0x04, 0xFE, 0x07, 0xFF, + 0x00, 0x17, 0xF8, 0x07, 0xFA, 0x0B, 0xFD, 0x0D, 0xFE, 0x0D, 0x0A, 0x00, 0x54, 0x00, 0x43, 0xF8, + 0x00, 0xF9, 0x03, 0xFB, 0x04, 0xFB, 0x05, 0xFA, 0x09, 0x02, 0xF7, 0x02, 0xFA, 0x09, 0xF1, 0x09, + 0xF7, 0x08, 0xF9, 0x03, 0x00, 0x46, 0x00, 0x46, 0x39, 0x00, 0x00, 0x39, 0xC7, 0x00, 0xFF, 0x00, + 0x46, 0x00, 0x46, 0x00, 0x2F, 0x00, 0x2F, 0x03, 0x00, 0x20, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x2E, + 0xA1, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x21, 0x00, 0x49, 0x00, 0x24, 0x06, 0x00, 0x51, 0x00, 0x2E, + 0x09, 0xFE, 0x0F, 0xFE, 0x0A, 0x00, 0x0C, 0x02, 0x00, 0x04, 0xD0, 0x00, 0x02, 0x00, 0x43, 0x00, + 0x2A, 0x0C, 0x06, 0xF4, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x7F, 0x00, 0xC5, 0x19, 0x00, 0x0F, 0xFE, + 0x0D, 0xFC, 0x0E, 0x1A, 0xFB, 0x0C, 0xF8, 0x09, 0xF0, 0x0A, 0xF4, 0x04, 0xF1, 0x04, 0x03, 0x00, + 0x00, 0x00, 0x3D, 0x07, 0x04, 0x0C, 0x03, 0xED, 0x01, 0x0A, 0x00, 0x36, 0x00, 0x3D, 0x0D, 0x1A, + 0xF4, 0x07, 0xF3, 0x02, 0xF9, 0xFF, 0xFA, 0xFF, 0xFB, 0xFC, 0x06, 0xFF, 0x0A, 0xFB, 0x08, 0xF8, + 0x04, 0xF9, 0x03, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x21, 0xDF, 0x00, 0xFF, 0x00, 0x21, + 0x00, 0x30, 0x00, 0x23, 0x00, 0x23, 0x03, 0x00, 0x51, 0x00, 0x57, 0x2E, 0x00, 0x00, 0x28, 0xD2, + 0x00, 0x0E, 0x00, 0x60, 0x00, 0x0C, 0xFA, 0x0A, 0xFB, 0x0D, 0xFE, 0x0B, 0x01, 0x0A, 0xF0, 0x11, + 0xFC, 0xFA, 0xFE, 0xFC, 0xFD, 0xF2, 0x00, 0xF6, 0x01, 0xF3, 0x03, 0xF6, 0x05, 0xF7, 0x04, 0xF9, + 0x24, 0x00, 0x0B, 0x00, 0x43, 0x00, 0x4B, 0xFE, 0xF2, 0x01, 0xF7, 0x01, 0xF8, 0x03, 0xF7, 0x03, + 0xFA, 0x03, 0xFA, 0x00, 0x09, 0x00, 0x07, 0x01, 0x06, 0x03, 0x07, 0x05, 0x05, 0x03, 0x00, 0x00, + 0x00, 0x1B, 0x34, 0x00, 0x00, 0x2F, 0xCC, 0x00, 0xFF, 0x00, 0x34, 0x00, 0x4A, 0x00, 0x33, 0x00, + 0x21, 0x0A, 0x00, 0x7F, 0x00, 0x46, 0xE6, 0x0D, 0x00, 0xFB, 0x01, 0xFB, 0x04, 0xF7, 0x03, 0xFC, + 0x03, 0xFD, 0x06, 0xFD, 0xFF, 0x00, 0x05, 0xFF, 0x05, 0x00, 0x09, 0x00, 0x7F, 0x00, 0x57, 0xE3, + 0x0D, 0x00, 0xFB, 0x01, 0xFB, 0x03, 0xF9, 0x04, 0xFA, 0x03, 0xFD, 0x06, 0xFD, 0x04, 0xFF, 0x08, + 0x00, 0x03, 0x00, 0x30, 0x00, 0x57, 0x34, 0x00, 0x00, 0x28, 0xCC, 0x00, 0xFF, 0x00, 0x34, 0x00, + 0x00, 0x00, 0x0E, 0x00, 0x0E, 0x03, 0x00, 0x00, 0x00, 0x52, 0x00, 0xAE, 0x7F, 0x00, 0x00, 0x12, + 0x03, 0x00, 0x4D, 0x00, 0x19, 0x32, 0xE8, 0x00, 0x21, 0xD5, 0x0B, 0x02, 0x00, 0x7D, 0x00, 0x00, + 0xCE, 0x19, 0x00, 0xE7, 0xFF, 0x00, 0x22, 0x00, 0x4F, 0x00, 0x24, 0x00, 0x32, 0x02, 0x00, 0x25, + 0x00, 0x7F, 0xDB, 0x00, 0x00, 0xB7, 0x04, 0x00, 0x0E, 0x00, 0x72, 0xFF, 0xFD, 0x10, 0x00, 0x0A, + 0x10, 0xF4, 0x00, 0xFF, 0x00, 0x18, 0x00, 0x6C, 0x00, 0x0B, 0x00, 0x09, 0x06, 0x00, 0x01, 0x00, + 0x3D, 0x01, 0xFB, 0x15, 0x29, 0xF5, 0xFC, 0xFC, 0xFB, 0xFB, 0xF7, 0xFE, 0xF4, 0x04, 0x00, 0x80, + 0x00, 0x00, 0x29, 0x00, 0x00, 0x7F, 0x00, 0x2A, 0xD7, 0x00, 0x03, 0x00, 0x39, 0x00, 0x7F, 0xC7, + 0x00, 0x00, 0xC7, 0x39, 0x00, 0x06, 0x00, 0x7F, 0x00, 0x7F, 0xE7, 0x00, 0x04, 0xFA, 0x03, 0xFD, + 0x06, 0xFD, 0x04, 0xFF, 0x08, 0x00, 0x03, 0x00, 0x44, 0x00, 0x4C, 0x3B, 0x00, 0x00, 0x33, 0xC5, + 0x00, 0x08, 0x00, 0x7F, 0x00, 0x5A, 0x00, 0x25, 0xD1, 0x00, 0x01, 0xF6, 0x07, 0xF5, 0x07, 0xF9, + 0x08, 0xFB, 0x06, 0xFE, 0x0A, 0xFE, 0x0A, 0x00, 0x48, 0x00, 0x5C, 0xFB, 0x00, 0xFB, 0xFF, 0x01, + 0x00, 0xFA, 0xFD, 0xFD, 0xFD, 0xFD, 0xFC, 0xFC, 0xF7, 0xFF, 0xFB, 0x00, 0xFB, 0x1A, 0x0D, 0x06, + 0x00, 0x48, 0x00, 0x4B, 0xF8, 0x00, 0xFC, 0xFF, 0xFA, 0xFD, 0xFD, 0xFD, 0xFC, 0xFA, 0x19, 0x00, + 0x03, 0x00, 0x2F, 0x00, 0x5D, 0x50, 0x00, 0x00, 0x22, 0xB0, 0x00, 0xFF, 0x00, 0x2F, 0x00, 0x5D, + 0x00, 0x21, 0x00, 0x21, 0x03, 0x00, 0x00, 0x00, 0x1A, 0x21, 0x00, 0x00, 0x65, 0xDF, 0x00, 0xFF, + 0x00, 0x21, 0x00, 0x1A, 0x00, 0x20, 0x00, 0x20, 0x0A, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x39, 0xDC, + 0x02, 0xF7, 0x02, 0xF7, 0x04, 0xF3, 0xE6, 0x04, 0xF4, 0x08, 0xF7, 0x10, 0xF6, 0x0C, 0xFC, 0x0F, + 0xFC, 0x03, 0x00, 0x7F, 0x00, 0x42, 0xF7, 0xFA, 0xF6, 0xFE, 0x13, 0x00, 0x0A, 0x00, 0x48, 0x00, + 0x42, 0xF4, 0xE6, 0x0B, 0xF9, 0x0D, 0xFE, 0x07, 0x01, 0x06, 0x01, 0x05, 0x04, 0xFA, 0x01, 0xF5, + 0x06, 0xF9, 0x07, 0xFC, 0x07, 0x07, 0x00, 0x21, 0x00, 0x7F, 0xE6, 0x00, 0x00, 0xF2, 0x02, 0xF2, + 0x04, 0xF3, 0x04, 0xF5, 0x07, 0xF7, 0x09, 0xF9, 0xFF, 0x00, 0x2F, 0x00, 0x5D, 0x00, 0x0D, 0x00, + 0x0D, 0x03, 0x00, 0x7F, 0x00, 0x7F, 0xDF, 0x00, 0x00, 0xD9, 0x21, 0x00, 0x0B, 0x00, 0x48, 0x00, + 0x27, 0xFB, 0x00, 0xFB, 0xFF, 0x01, 0x00, 0xFA, 0xFD, 0xFD, 0xFD, 0xFD, 0xFC, 0xFC, 0xF7, 0xFF, + 0xFB, 0xFF, 0xFB, 0x00, 0xF9, 0x1B, 0x14, 0x06, 0x00, 0x47, 0x00, 0x10, 0x03, 0x06, 0xF4, 0xFD, + 0xF7, 0xF9, 0xFD, 0xFD, 0xFC, 0xFA, 0x19, 0x00, 0x03, 0x00, 0x5E, 0x00, 0x7F, 0xA2, 0x00, 0x00, + 0xDE, 0x5E, 0x00, 0x03, 0x00, 0x3F, 0x00, 0x3F, 0x40, 0x00, 0x00, 0x40, 0xC0, 0x00, 0xFF, 0x00, + 0x3F, 0x00, 0x3F, 0x00, 0x37, 0x00, 0x37, 0x03, 0x00, 0x3F, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x4A, + 0xE3, 0x00, 0xFF, 0x00, 0x3F, 0x00, 0x4A, 0x00, 0x1D, 0x00, 0x1D, 0x03, 0x00, 0x22, 0x00, 0x2C, + 0x1C, 0x00, 0x00, 0x3E, 0xE4, 0x00, 0x04, 0x00, 0x5C, 0x00, 0x47, 0xF8, 0x00, 0x00, 0xED, 0x02, + 0xEA, 0x06, 0xE2, 0x03, 0x00, 0x00, 0x00, 0x66, 0x1A, 0x00, 0x00, 0x19, 0xE6, 0x00, 0x03, 0x00, + 0x49, 0x00, 0x02, 0x10, 0x00, 0xFC, 0x47, 0xF4, 0x00, 0x03, 0x00, 0x00, 0x00, 0x68, 0x1B, 0x00, + 0x00, 0x17, 0xE5, 0x00, 0x03, 0x00, 0x7F, 0x00, 0x14, 0x00, 0x6B, 0xD2, 0x00, 0x00, 0x95, 0x06, + 0x00, 0x51, 0x00, 0x51, 0x02, 0x09, 0x02, 0x0F, 0x00, 0x0A, 0xFE, 0x0C, 0xFC, 0x00, 0x00, 0xD0, + 0x02, 0x00, 0x55, 0x00, 0x43, 0xFA, 0x0C, 0x00, 0xF4, 0xFF, 0x00, 0x60, 0x00, 0x00, 0x00, 0x1F, + 0x00, 0x4D, 0x03, 0x00, 0x43, 0x00, 0x57, 0x3C, 0x00, 0x00, 0x28, 0xC4, 0x00, 0x03, 0x00, 0x7D, + 0xFF, 0xFF, 0x00, 0x10, 0xB9, 0xFC, 0x00, 0xF4, 0x03, 0x00, 0x7F, 0xFF, 0xFF, 0x00, 0x1B, 0xEA, + 0x00, 0x00, 0xE5, 0x03, 0x00, 0x5D, 0xFF, 0xF2, 0x00, 0x0C, 0xD9, 0x00, 0x00, 0xF4, 0xFF, 0x00, + 0x67, 0x00, 0x58, 0x00, 0x0C, 0x00, 0x0C, 0xFF, 0x00, 0x1A, 0x00, 0x2C, 0x00, 0x0A, 0x00, 0x0A, + 0x05, 0x00, 0x48, 0x00, 0x19, 0x0C, 0xF7, 0x12, 0xF7, 0x19, 0xFA, 0x00, 0x21, 0xD5, 0x0B, 0x03, + 0x00, 0x2E, 0x00, 0x53, 0x51, 0x00, 0x00, 0x2C, 0xAF, 0x00, 0xFF, 0x00, 0x1A, 0x00, 0x53, 0x00, + 0x64, 0x00, 0x20, 0x06, 0x00, 0x7D, 0x00, 0x13, 0xFD, 0x06, 0xFA, 0x06, 0xF9, 0x03, 0xF9, 0x01, + 0x00, 0xEB, 0x18, 0x00, 0x02, 0x00, 0x07, 0x00, 0x27, 0xF9, 0x15, 0x00, 0xF7, 0xFF, 0x00, 0x1F, + 0x00, 0x34, 0x00, 0x0B, 0x00, 0x0B, 0x0A, 0x00, 0x00, 0x00, 0x57, 0x1A, 0xF3, 0x00, 0x05, 0xFF, + 0x05, 0xFC, 0x09, 0xFD, 0x04, 0xFD, 0x03, 0xFA, 0x03, 0x01, 0x00, 0xFB, 0x01, 0xFB, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x4A, 0x19, 0x00, 0xFC, 0x06, 0xFD, 0x03, 0xFA, 0x03, 0xFC, 0x01, 0xF8, 0x00, + 0x03, 0x00, 0x69, 0x00, 0x7F, 0x00, 0xE5, 0x16, 0x00, 0x00, 0x1B, 0x03, 0x00, 0x36, 0x00, 0x7F, + 0x00, 0xF4, 0x47, 0xFC, 0x00, 0x10, 0x03, 0x00, 0x49, 0x00, 0x19, 0xD2, 0x00, 0x00, 0xE7, 0x2E, + 0x00, 0x06, 0x00, 0x21, 0x00, 0x02, 0x06, 0x03, 0x06, 0x06, 0x03, 0x07, 0x01, 0x07, 0xEA, 0x00, + 0x00, 0xE8, 0x06, 0x00, 0x49, 0x00, 0x01, 0x00, 0x18, 0xEA, 0x00, 0x01, 0xF9, 0x03, 0xF9, 0x06, + 0xFA, 0x06, 0xFD, 0x02, 0x00, 0x00, 0x00, 0x5E, 0x00, 0xA2, 0x5E, 0x5E, 0x03, 0x00, 0x2E, 0x00, + 0x47, 0x3D, 0x1E, 0xBE, 0x00, 0xFF, 0xE2, 0xFF, 0x00, 0x03, 0x00, 0x7D, 0x00, 0x11, 0x00, 0x11, + 0x03, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x36, 0xCC, 0x00, 0x05, 0x00, 0x39, 0x00, 0x5E, + 0x01, 0x00, 0x19, 0x05, 0x00, 0x1C, 0xAD, 0x00, 0x53, 0xAD, 0x03, 0x00, 0x71, 0x00, 0x2E, 0x0E, + 0x00, 0x00, 0x51, 0xF2, 0x00, 0xFF, 0x00, 0x6E, 0x00, 0x3B, 0x00, 0x11, 0x00, 0x21, 0xFF, 0x00, + 0x73, 0x00, 0x26, 0x00, 0x0C, 0x00, 0x13, 0xFF, 0x00, 0x74, 0x00, 0x25, 0x00, 0x06, 0x00, 0x06, + 0x02, 0x00, 0x70, 0x00, 0x55, 0x00, 0x07, 0xF9, 0x00, 0x02, 0x00, 0x71, 0x00, 0x55, 0x00, 0x2A, + 0xEB, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x77, 0x00, 0xE4, 0x57, 0x00, 0x04, 0x00, 0x06, 0x01, 0x08, + 0x02, 0x07, 0x04, 0x09, 0x09, 0x03, 0x06, 0x03, 0x08, 0x00, 0x06, 0x81, 0x00, 0x06, 0x00, 0x0D, + 0x00, 0x5B, 0x00, 0x03, 0xFF, 0x04, 0xFC, 0x04, 0xFA, 0x02, 0xFE, 0x00, 0x00, 0xF3, 0x02, 0x00, + 0x3F, 0x00, 0x5B, 0xFA, 0x17, 0xE9, 0xE9, 0xFF, 0x00, 0x48, 0x00, 0x68, 0x00, 0x14, 0x00, 0x0F, + 0x03, 0x00, 0x4C, 0x00, 0x3B, 0x00, 0xC5, 0x33, 0x00, 0x00, 0x3B, 0x08, 0x00, 0x5A, 0x00, 0x00, + 0x25, 0x00, 0x00, 0x2F, 0xF6, 0xFF, 0xF5, 0xF9, 0xF9, 0xF9, 0xFB, 0xF8, 0xFE, 0xFA, 0xFE, 0xF6, + 0x0A, 0x00, 0x5C, 0x00, 0x37, 0x00, 0x05, 0xFF, 0x05, 0x00, 0xFF, 0xFD, 0x06, 0xFD, 0x03, 0xFC, + 0x03, 0xF7, 0x04, 0xFB, 0x01, 0xFB, 0x00, 0x0D, 0xE6, 0x06, 0x00, 0x4B, 0x00, 0x37, 0x00, 0x08, + 0xFF, 0x04, 0xFD, 0x06, 0xFD, 0x03, 0xFA, 0x04, 0x00, 0xE7, 0x0A, 0x00, 0x30, 0x00, 0x00, 0x0D, + 0x1A, 0xFB, 0x00, 0xFB, 0xFF, 0xF7, 0xFC, 0xFC, 0xFD, 0xFD, 0xFD, 0xFD, 0xFA, 0x00, 0x01, 0xFF, + 0xFB, 0x00, 0xFB, 0x06, 0x00, 0x3D, 0x00, 0x00, 0x00, 0x19, 0xFA, 0xFC, 0xFD, 0xFD, 0xFD, 0xFA, + 0xFF, 0xFC, 0x00, 0xF8, 0x03, 0x00, 0x00, 0x00, 0x6C, 0x00, 0x94, 0x2E, 0x00, 0x00, 0x6C, 0x06, + 0x00, 0x2E, 0x00, 0x2E, 0xFE, 0xF7, 0xFE, 0xF1, 0x00, 0xF6, 0x02, 0xF4, 0x04, 0x00, 0x00, 0x30, + 0x02, 0x00, 0x2A, 0x00, 0x3C, 0x06, 0xF4, 0x00, 0x0C, 0x03, 0x00, 0x7F, 0x00, 0x3F, 0x00, 0x40, + 0x82, 0x00, 0x00, 0xEE, 0x05, 0x00, 0x37, 0x00, 0x66, 0xF4, 0x09, 0xEE, 0x09, 0xE8, 0x06, 0x00, + 0xDF, 0x2A, 0xF5, 0x01, 0x00, 0x7F, 0x00, 0x43, 0x00, 0x09, 0x02, 0x00, 0x7F, 0x00, 0x00, 0x00, + 0x4C, 0xB4, 0xB4, 0x03, 0x00, 0x33, 0x00, 0x00, 0x35, 0x00, 0x02, 0x17, 0xFA, 0x01, 0x10, 0x00, + 0x1E, 0x00, 0x0F, 0x02, 0x0D, 0x03, 0x0D, 0x06, 0x0B, 0x08, 0x07, 0x00, 0x17, 0xF9, 0xFF, 0xFC, + 0xFE, 0xF4, 0xF8, 0xF9, 0xF9, 0xF8, 0xF6, 0xFB, 0xF6, 0xFD, 0xF6, 0xFE, 0xF7, 0xFF, 0xF1, 0x00, + 0xF6, 0x1E, 0x00, 0x0A, 0x00, 0x37, 0x00, 0x57, 0xF4, 0xF7, 0xF6, 0xF6, 0xF7, 0xF1, 0xFE, 0xFA, + 0xFE, 0xF7, 0x06, 0x09, 0x05, 0x05, 0x05, 0x04, 0x0A, 0x03, 0x09, 0x01, 0x0A, 0x00, 0x2C, 0x00, + 0x7F, 0x00, 0xFB, 0x01, 0xFB, 0x00, 0x01, 0x03, 0xFA, 0x03, 0xFD, 0x04, 0xFD, 0x09, 0xFC, 0x05, + 0xFF, 0x05, 0x00, 0xF3, 0x1A, 0x06, 0x00, 0x3D, 0x00, 0x7F, 0x00, 0xF8, 0x01, 0xFC, 0x03, 0xFA, + 0x03, 0xFD, 0x06, 0xFC, 0x00, 0x19 +}; + +const Level Game::_gameLevels[] = { + { "level1", "level1", 0x00 }, + { "level2", "level2", 0x2F }, + { "level3", "level3", 0xFFFF }, + { "level4", "level4_1", 0x34 }, + { "level4", "level4_2", 0x39 }, + { "level5", "level5_1", 0x35 }, + { "level5", "level5_2", 0xFFFF } +}; + +const uint16 Game::_scoreTable[] = { + 0, 200, 300, 400, 500, 800, 1000, 1200, 1500, 2000, 2200, 2500, 3000, 3200, 3500, 5000 +}; + +const uint8 Game::_monsterListLevel1[] = { + 0x22, 0, 0x23, 0, 0xFF +}; + +const uint8 Game::_monsterListLevel2[] = { + 0x22, 0, 0x23, 0, 0x4B, 0, 0x49, 1, 0x4D, 1, 0x76, 2, 0xFF +}; + +const uint8 Game::_monsterListLevel3[] = { + 0x76, 2, 0xFF +}; + +const uint8 Game::_monsterListLevel4_1[] = { + 0x4D, 1, 0x76, 2, 0xFF +}; + +const uint8 Game::_monsterListLevel4_2[] = { + 0x76, 2, 0xAC, 2, 0xD7, 3, 0xFF +}; + +const uint8 Game::_monsterListLevel5_1[] = { + 0xB0, 3, 0xD7, 3, 0xFF +}; + +const uint8 Game::_monsterListLevel5_2[] = { + 0xB0, 3, 0xD7, 3, 0xD8, 3, 0xFF +}; + +const uint8 *Game::_monsterListLevels[] = { + _monsterListLevel1, + _monsterListLevel2, + _monsterListLevel3, + _monsterListLevel4_1, + _monsterListLevel4_2, + _monsterListLevel5_1, + _monsterListLevel5_2 +}; + +const uint8 Game::_monsterPals[4][32] = { + { // junkie + 0x00, 0x00, 0xAA, 0x0A, 0x65, 0x0A, 0x44, 0x08, 0x22, 0x06, 0x20, 0x03, 0x40, 0x05, 0x87, 0x0C, + 0x76, 0x0B, 0x34, 0x03, 0x55, 0x09, 0x30, 0x04, 0x60, 0x07, 0x55, 0x04, 0x77, 0x07, 0xFF, 0x0F + }, + { // mercenaire + 0x00, 0x00, 0x86, 0x0C, 0x66, 0x09, 0x44, 0x08, 0xFC, 0x05, 0xA2, 0x02, 0x49, 0x05, 0x02, 0x00, + 0x14, 0x02, 0x37, 0x04, 0x25, 0x03, 0x38, 0x06, 0xAF, 0x0C, 0x6F, 0x09, 0x4C, 0x07, 0xFF, 0x0F + }, + { // replicant + 0x00, 0x00, 0x79, 0x08, 0x44, 0x05, 0x55, 0x06, 0x66, 0x0B, 0x46, 0x05, 0x57, 0x06, 0x22, 0x03, + 0x44, 0x08, 0x33, 0x04, 0xAC, 0x08, 0x8A, 0x06, 0x68, 0x04, 0x56, 0x02, 0x35, 0x02, 0xCE, 0x0A + }, + { // glue + 0x00, 0x00, 0x6C, 0x00, 0x39, 0x02, 0x4C, 0x02, 0x27, 0x02, 0x10, 0x07, 0x15, 0x01, 0x00, 0x04, + 0x10, 0x05, 0x20, 0x08, 0x00, 0x02, 0x30, 0x09, 0x55, 0x0B, 0xFF, 0x0F, 0x33, 0x0A, 0xFF, 0x0F + } +}; + +const char *Game::_monsterNames[] = { + "junky", + "mercenai", + "replican", + "glue" +}; + +const uint8 LocaleData::_stringsTableFR[] = { + 0x5A, 0x00, 0x71, 0x00, 0x90, 0x00, 0x97, 0x01, 0x58, 0x02, 0x7B, 0x02, 0xC5, 0x02, 0xEA, 0x02, + 0x50, 0x03, 0x6C, 0x03, 0xA8, 0x03, 0xF7, 0x03, 0x46, 0x04, 0x98, 0x04, 0x1C, 0x05, 0x57, 0x05, + 0x69, 0x05, 0xE1, 0x05, 0xF4, 0x05, 0x19, 0x06, 0xB5, 0x06, 0x9C, 0x08, 0x11, 0x09, 0x2B, 0x09, + 0x8D, 0x09, 0xA6, 0x09, 0xB9, 0x09, 0xDC, 0x09, 0xEF, 0x09, 0x13, 0x0A, 0x15, 0x0A, 0x17, 0x0A, + 0x7F, 0x0A, 0x90, 0x0A, 0x21, 0x0B, 0x4A, 0x0B, 0x08, 0x0C, 0x20, 0x0C, 0x44, 0x0C, 0x77, 0x0C, + 0x0E, 0x0D, 0x55, 0x0D, 0x93, 0x0D, 0xBB, 0x0D, 0xF5, 0x0D, 0x4C, 0x45, 0x20, 0x46, 0x55, 0x53, + 0x49, 0x42, 0x4C, 0x45, 0x20, 0x45, 0x53, 0x54, 0x0A, 0x47, 0x52, 0x49, 0x4C, 0x4C, 0x45, 0x2E, + 0x00, 0x4D, 0x41, 0x49, 0x4E, 0x54, 0x45, 0x4E, 0x41, 0x4E, 0x54, 0x20, 0x43, 0x41, 0x0A, 0x44, + 0x4F, 0x49, 0x54, 0x20, 0x46, 0x4F, 0x4E, 0x43, 0x54, 0x49, 0x4F, 0x4E, 0x4E, 0x45, 0x52, 0x00, + 0xFF, 0xEB, 0xEC, 0x4A, 0x27, 0x53, 0x55, 0x49, 0x53, 0x20, 0x4A, 0x41, 0x43, 0x4B, 0x2E, 0x0A, + 0x54, 0x55, 0x20, 0x56, 0x45, 0x55, 0x58, 0x20, 0x44, 0x45, 0x53, 0x20, 0x46, 0x41, 0x55, 0x58, + 0x0A, 0x50, 0x41, 0x50, 0x49, 0x45, 0x52, 0x53, 0x3F, 0x0B, 0xFF, 0xE9, 0xEA, 0x4F, 0x55, 0x49, + 0x2C, 0x45, 0x54, 0x20, 0x4C, 0x45, 0x20, 0x50, 0x4C, 0x55, 0x53, 0x0A, 0x56, 0x49, 0x54, 0x45, + 0x20, 0x50, 0x4F, 0x53, 0x53, 0x49, 0x42, 0x4C, 0x45, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, 0x31, 0x35, + 0x30, 0x30, 0x20, 0x43, 0x52, 0x45, 0x44, 0x49, 0x54, 0x53, 0x21, 0x0B, 0xFF, 0xE9, 0xEA, 0x31, + 0x35, 0x30, 0x30, 0x3F, 0x3F, 0x3F, 0x0B, 0xFF, 0xEB, 0xEC, 0x4F, 0x55, 0x41, 0x49, 0x53, 0x2C, + 0x4A, 0x27, 0x50, 0x52, 0x45, 0x4E, 0x44, 0x53, 0x0A, 0x55, 0x4E, 0x20, 0x47, 0x52, 0x4F, 0x53, + 0x20, 0x52, 0x49, 0x53, 0x51, 0x55, 0x45, 0x2E, 0x0B, 0xFF, 0xE9, 0xEA, 0x4D, 0x41, 0x49, 0x53, + 0x20, 0x4A, 0x45, 0x20, 0x4E, 0x27, 0x41, 0x49, 0x20, 0x50, 0x41, 0x53, 0x0A, 0x41, 0x53, 0x53, + 0x45, 0x5A, 0x2E, 0x2E, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, 0x56, 0x41, 0x20, 0x41, 0x20, 0x4C, 0x27, + 0x41, 0x47, 0x45, 0x4E, 0x43, 0x45, 0x0A, 0x50, 0x4F, 0x55, 0x52, 0x20, 0x4C, 0x27, 0x45, 0x4D, + 0x50, 0x4C, 0x4F, 0x49, 0x20, 0x45, 0x54, 0x0A, 0x54, 0x55, 0x20, 0x41, 0x55, 0x52, 0x41, 0x53, + 0x20, 0x55, 0x4E, 0x20, 0x4A, 0x4F, 0x42, 0x2E, 0x0B, 0x45, 0x54, 0x20, 0x52, 0x45, 0x56, 0x49, + 0x45, 0x4E, 0x53, 0x20, 0x4D, 0x45, 0x0A, 0x56, 0x4F, 0x49, 0x52, 0x20, 0x51, 0x55, 0x41, 0x4E, + 0x44, 0x20, 0x54, 0x55, 0x0A, 0x41, 0x55, 0x52, 0x41, 0x53, 0x20, 0x44, 0x45, 0x0A, 0x4C, 0x27, + 0x41, 0x52, 0x47, 0x45, 0x4E, 0x54, 0x00, 0xFF, 0xEB, 0xEC, 0x4A, 0x27, 0x43, 0x4F, 0x4E, 0x4E, + 0x41, 0x49, 0x53, 0x20, 0x43, 0x45, 0x0A, 0x47, 0x41, 0x52, 0x53, 0x20, 0x4C, 0x41, 0x2E, 0x20, + 0x49, 0x4C, 0x20, 0x41, 0x0A, 0x55, 0x4E, 0x20, 0x41, 0x4D, 0x49, 0x20, 0x51, 0x55, 0x49, 0x20, + 0x45, 0x53, 0x54, 0x0A, 0x55, 0x4E, 0x20, 0x52, 0x4F, 0x42, 0x4F, 0x54, 0x2D, 0x46, 0x4C, 0x49, + 0x43, 0x2E, 0x0B, 0x4F, 0x55, 0x20, 0x50, 0x55, 0x49, 0x53, 0x2D, 0x4A, 0x45, 0x0A, 0x54, 0x52, + 0x4F, 0x55, 0x56, 0x45, 0x52, 0x20, 0x43, 0x45, 0x54, 0x20, 0x41, 0x4D, 0x49, 0x3F, 0x0B, 0x56, + 0x41, 0x20, 0x56, 0x4F, 0x49, 0x52, 0x20, 0x41, 0x20, 0x4C, 0x41, 0x0A, 0x52, 0x45, 0x53, 0x54, + 0x52, 0x49, 0x43, 0x54, 0x45, 0x44, 0x20, 0x41, 0x52, 0x45, 0x41, 0x0A, 0x31, 0x2E, 0x4A, 0x45, + 0x20, 0x43, 0x52, 0x4F, 0x49, 0x53, 0x20, 0x51, 0x55, 0x27, 0x49, 0x4C, 0x0A, 0x45, 0x53, 0x54, + 0x20, 0x44, 0x45, 0x20, 0x47, 0x41, 0x52, 0x44, 0x45, 0x0B, 0x4D, 0x41, 0x49, 0x53, 0x20, 0x46, + 0x41, 0x49, 0x53, 0x20, 0x47, 0x41, 0x46, 0x46, 0x45, 0x0A, 0x43, 0x45, 0x53, 0x20, 0x54, 0x59, + 0x50, 0x45, 0x53, 0x2D, 0x4C, 0x41, 0x20, 0x0A, 0x53, 0x4F, 0x4E, 0x54, 0x20, 0x44, 0x41, 0x4E, + 0x47, 0x45, 0x55, 0x52, 0x45, 0x55, 0x58, 0x00, 0xFF, 0xEB, 0xEC, 0x4A, 0x45, 0x20, 0x4E, 0x45, + 0x20, 0x53, 0x41, 0x49, 0x53, 0x20, 0x52, 0x49, 0x45, 0x4E, 0x0A, 0x44, 0x45, 0x20, 0x50, 0x4C, + 0x55, 0x53, 0x2C, 0x20, 0x47, 0x41, 0x4D, 0x49, 0x4E, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x43, 0x59, + 0x2D, 0x42, 0x30, 0x32, 0x31, 0x20, 0x56, 0x45, 0x55, 0x54, 0x0A, 0x50, 0x41, 0x53, 0x53, 0x45, + 0x52, 0x20, 0x55, 0x4E, 0x20, 0x4D, 0x41, 0x52, 0x43, 0x48, 0x45, 0x0A, 0x41, 0x56, 0x45, 0x43, + 0x20, 0x54, 0x4F, 0x49, 0x2E, 0x0B, 0x49, 0x4C, 0x20, 0x54, 0x27, 0x41, 0x54, 0x54, 0x45, 0x4E, + 0x44, 0x52, 0x41, 0x0A, 0x44, 0x45, 0x52, 0x52, 0x49, 0x45, 0x52, 0x45, 0x20, 0x4C, 0x45, 0x20, + 0x42, 0x41, 0x52, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x56, 0x41, 0x20, 0x41, 0x55, 0x20, 0x42, 0x41, + 0x52, 0x2C, 0x20, 0x50, 0x45, 0x54, 0x49, 0x54, 0x0A, 0x43, 0x59, 0x2D, 0x42, 0x30, 0x32, 0x31, + 0x20, 0x54, 0x27, 0x41, 0x54, 0x54, 0x45, 0x4E, 0x44, 0x00, 0xFF, 0xEB, 0xEC, 0x4E, 0x45, 0x20, + 0x54, 0x49, 0x52, 0x45, 0x20, 0x50, 0x41, 0x53, 0x2E, 0x0A, 0x4A, 0x27, 0x53, 0x55, 0x49, 0x53, + 0x20, 0x50, 0x41, 0x53, 0x0A, 0x43, 0x59, 0x2D, 0x42, 0x30, 0x32, 0x31, 0x2E, 0x0B, 0x53, 0x41, + 0x20, 0x50, 0x4C, 0x41, 0x4E, 0x51, 0x55, 0x45, 0x20, 0x45, 0x53, 0x54, 0x0A, 0x45, 0x4E, 0x20, + 0x44, 0x45, 0x53, 0x53, 0x4F, 0x55, 0x53, 0x0B, 0x43, 0x27, 0x45, 0x53, 0x54, 0x20, 0x53, 0x4F, + 0x4E, 0x20, 0x43, 0x4F, 0x50, 0x41, 0x49, 0x4E, 0x0A, 0x4C, 0x45, 0x20, 0x46, 0x4C, 0x49, 0x43, + 0x2C, 0x20, 0x51, 0x55, 0x49, 0x20, 0x41, 0x0A, 0x4C, 0x41, 0x20, 0x43, 0x4C, 0x45, 0x2E, 0x00, + 0xFF, 0xEB, 0xEC, 0x4A, 0x45, 0x20, 0x4E, 0x45, 0x20, 0x53, 0x41, 0x49, 0x53, 0x20, 0x52, 0x49, + 0x45, 0x4E, 0x0A, 0x44, 0x45, 0x20, 0x50, 0x4C, 0x55, 0x53, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x4D, + 0x4F, 0x4E, 0x53, 0x49, 0x45, 0x55, 0x52, 0x2E, 0x2E, 0x2E, 0x0A, 0x55, 0x4E, 0x20, 0x44, 0x45, + 0x4E, 0x4F, 0x4D, 0x4D, 0x45, 0x20, 0x4A, 0x41, 0x43, 0x4B, 0x0A, 0x56, 0x4F, 0x55, 0x53, 0x20, + 0x44, 0x4F, 0x4E, 0x4E, 0x45, 0x20, 0x52, 0x2E, 0x44, 0x2E, 0x56, 0x0A, 0x50, 0x52, 0x45, 0x53, + 0x20, 0x44, 0x55, 0x20, 0x42, 0x41, 0x52, 0x00, 0x4A, 0x45, 0x20, 0x56, 0x4F, 0x55, 0x44, 0x52, + 0x41, 0x49, 0x53, 0x20, 0x55, 0x4E, 0x0A, 0x50, 0x45, 0x52, 0x4D, 0x49, 0x53, 0x20, 0x44, 0x45, + 0x0A, 0x54, 0x52, 0x41, 0x56, 0x41, 0x49, 0x4C, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, 0x41, 0x48, 0x20, + 0x4E, 0x4F, 0x4E, 0x2E, 0x43, 0x27, 0x45, 0x53, 0x54, 0x20, 0x50, 0x41, 0x53, 0x0A, 0x49, 0x43, + 0x49, 0x2E, 0x20, 0x56, 0x4F, 0x59, 0x45, 0x5A, 0x20, 0x4C, 0x45, 0x0A, 0x47, 0x55, 0x49, 0x43, + 0x48, 0x45, 0x54, 0x20, 0x43, 0x2E, 0x00, 0x4A, 0x45, 0x20, 0x56, 0x4F, 0x55, 0x44, 0x52, 0x41, + 0x49, 0x53, 0x20, 0x55, 0x4E, 0x0A, 0x50, 0x45, 0x52, 0x4D, 0x49, 0x53, 0x20, 0x64, 0x65, 0x0A, + 0x54, 0x52, 0x41, 0x56, 0x41, 0x49, 0x4C, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, 0x42, 0x4F, 0x4E, 0x2E, + 0x2E, 0x2E, 0x20, 0x4F, 0x4B, 0x2C, 0x4C, 0x45, 0x0A, 0x47, 0x4F, 0x55, 0x56, 0x45, 0x52, 0x4E, + 0x45, 0x55, 0x52, 0x20, 0x56, 0x41, 0x0A, 0x56, 0x4F, 0x55, 0x53, 0x20, 0x52, 0x45, 0x43, 0x45, + 0x56, 0x4F, 0x49, 0x52, 0x2E, 0x00, 0x4A, 0x45, 0x20, 0x56, 0x4F, 0x55, 0x44, 0x52, 0x41, 0x49, + 0x53, 0x20, 0x55, 0x4E, 0x0A, 0x50, 0x45, 0x52, 0x4D, 0x49, 0x53, 0x20, 0x44, 0x45, 0x0A, 0x54, + 0x52, 0x41, 0x56, 0x41, 0x49, 0x4C, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, 0x41, 0x48, 0x20, 0x4E, 0x4F, + 0x4E, 0x2E, 0x43, 0x45, 0x20, 0x4E, 0x27, 0x45, 0x53, 0x54, 0x0A, 0x50, 0x41, 0x53, 0x20, 0x49, + 0x43, 0x49, 0x2E, 0x20, 0x56, 0x4F, 0x59, 0x45, 0x5A, 0x0A, 0x4C, 0x45, 0x20, 0x47, 0x55, 0x49, + 0x43, 0x48, 0x45, 0x54, 0x20, 0x42, 0x2E, 0x00, 0x4A, 0x45, 0x20, 0x56, 0x4F, 0x55, 0x44, 0x52, + 0x41, 0x49, 0x53, 0x0A, 0x50, 0x41, 0x52, 0x4C, 0x45, 0x52, 0x20, 0x41, 0x20, 0x4A, 0x41, 0x43, + 0x4B, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, 0x41, 0x48, 0x20, 0x4F, 0x55, 0x41, 0x49, 0x53, 0x3F, 0x20, + 0x4A, 0x41, 0x43, 0x4B, 0x0A, 0x4E, 0x27, 0x45, 0x53, 0x54, 0x20, 0x50, 0x41, 0x53, 0x20, 0x4C, + 0x41, 0x2E, 0x0B, 0xFF, 0xE9, 0xEA, 0x48, 0x55, 0x4D, 0x2E, 0x2E, 0x2E, 0x4A, 0x45, 0x20, 0x56, + 0x49, 0x45, 0x4E, 0x53, 0x0A, 0x44, 0x45, 0x20, 0x4C, 0x41, 0x20, 0x50, 0x41, 0x52, 0x54, 0x20, + 0x44, 0x45, 0x0A, 0x4D, 0x4F, 0x4E, 0x20, 0x41, 0x4D, 0x49, 0x20, 0x49, 0x41, 0x4E, 0x2E, 0x0B, + 0xFF, 0xEB, 0xEC, 0x4F, 0x4B, 0x2E, 0x4A, 0x41, 0x43, 0x4B, 0x20, 0x54, 0x27, 0x41, 0x54, 0x54, + 0x45, 0x4E, 0x44, 0x0A, 0x44, 0x45, 0x48, 0x4F, 0x52, 0x53, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x50, + 0x41, 0x53, 0x53, 0x45, 0x20, 0x54, 0x4F, 0x4E, 0x20, 0x43, 0x48, 0x45, 0x4D, 0x49, 0x4E, 0x0A, + 0x47, 0x41, 0x4D, 0x49, 0x4E, 0x2E, 0x20, 0x54, 0x27, 0x45, 0x53, 0x20, 0x54, 0x52, 0x4F, 0x50, + 0x0A, 0x4A, 0x45, 0x55, 0x4E, 0x45, 0x20, 0x50, 0x4F, 0x55, 0x52, 0x0A, 0x43, 0x4F, 0x4E, 0x53, + 0x4F, 0x4D, 0x4D, 0x45, 0x52, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x50, 0x41, 0x50, 0x49, 0x45, 0x52, + 0x53, 0x20, 0x53, 0x2E, 0x56, 0x2E, 0x50, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x4A, 0x45, 0x20, 0x53, + 0x55, 0x49, 0x53, 0x20, 0x4C, 0x45, 0x0A, 0x43, 0x4F, 0x55, 0x52, 0x53, 0x49, 0x45, 0x52, 0x2E, + 0x0B, 0xFF, 0xEB, 0xEC, 0x41, 0x48, 0x20, 0x4F, 0x55, 0x49, 0x21, 0x56, 0x4F, 0x49, 0x4C, 0x41, + 0x2C, 0x0A, 0x41, 0x4D, 0x45, 0x4E, 0x45, 0x5A, 0x20, 0x43, 0x45, 0x20, 0x50, 0x41, 0x51, 0x55, + 0x45, 0x54, 0x0A, 0x41, 0x20, 0x4C, 0x27, 0x41, 0x47, 0x45, 0x4E, 0x43, 0x45, 0x20, 0x44, 0x45, + 0x0A, 0x56, 0x4F, 0x59, 0x41, 0x47, 0x45, 0x2E, 0x0B, 0x45, 0x54, 0x20, 0x46, 0x41, 0x49, 0x54, + 0x45, 0x53, 0x0A, 0x41, 0x54, 0x54, 0x45, 0x4E, 0x54, 0x49, 0x4F, 0x4E, 0x2C, 0x20, 0x43, 0x41, + 0x0A, 0x41, 0x20, 0x44, 0x45, 0x20, 0x4C, 0x41, 0x20, 0x56, 0x41, 0x4C, 0x45, 0x55, 0x52, 0x2E, + 0x00, 0x4C, 0x45, 0x20, 0x54, 0x45, 0x4D, 0x50, 0x20, 0x45, 0x53, 0x54, 0x0A, 0x45, 0x43, 0x4F, + 0x55, 0x4C, 0x45, 0x00, 0x49, 0x4C, 0x20, 0x59, 0x20, 0x41, 0x20, 0x55, 0x4E, 0x0A, 0x45, 0x4D, + 0x50, 0x4C, 0x41, 0x43, 0x45, 0x4D, 0x45, 0x4E, 0x54, 0x20, 0x50, 0x4F, 0x55, 0x52, 0x0A, 0x4C, + 0x41, 0x20, 0x43, 0x41, 0x52, 0x54, 0x45, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x4D, 0x45, 0x52, 0x43, + 0x49, 0x20, 0x43, 0x4F, 0x4E, 0x52, 0x41, 0x44, 0x2E, 0x0A, 0x43, 0x45, 0x53, 0x20, 0x46, 0x4C, + 0x49, 0x43, 0x53, 0x0A, 0x4D, 0x27, 0x41, 0x55, 0x52, 0x41, 0x49, 0x45, 0x4E, 0x54, 0x20, 0x46, + 0x41, 0x49, 0x54, 0x0A, 0x4C, 0x41, 0x20, 0x50, 0x45, 0x41, 0x55, 0x0B, 0x42, 0x4F, 0x4E, 0x2C, + 0x4A, 0x45, 0x20, 0x53, 0x55, 0x50, 0x50, 0x4F, 0x53, 0x45, 0x0A, 0x51, 0x55, 0x45, 0x20, 0x54, + 0x55, 0x20, 0x4E, 0x45, 0x20, 0x54, 0x45, 0x0A, 0x52, 0x41, 0x50, 0x45, 0x4C, 0x4C, 0x45, 0x53, + 0x20, 0x50, 0x41, 0x53, 0x20, 0x44, 0x45, 0x0A, 0x54, 0x4F, 0x4E, 0x20, 0x41, 0x4D, 0x49, 0x20, + 0x49, 0x41, 0x4E, 0x2E, 0x0B, 0x41, 0x4C, 0x4C, 0x45, 0x5A, 0x2C, 0x41, 0x53, 0x53, 0x49, 0x45, + 0x44, 0x53, 0x0A, 0x54, 0x4F, 0x49, 0x20, 0x53, 0x55, 0x52, 0x20, 0x43, 0x45, 0x0A, 0x53, 0x49, + 0x45, 0x47, 0x45, 0x2C, 0x4F, 0x4E, 0x20, 0x56, 0x41, 0x20, 0x59, 0x0A, 0x52, 0x45, 0x4D, 0x45, + 0x44, 0x49, 0x45, 0x52, 0x00, 0x49, 0x41, 0x4E, 0x2C, 0x43, 0x4F, 0x4D, 0x4D, 0x45, 0x4E, 0x54, + 0x0A, 0x46, 0x41, 0x49, 0x52, 0x45, 0x20, 0x50, 0x4F, 0x55, 0x52, 0x0A, 0x41, 0x4C, 0x4C, 0x45, + 0x52, 0x20, 0x53, 0x55, 0x52, 0x20, 0x54, 0x45, 0x52, 0x52, 0x45, 0x3F, 0x0B, 0xFF, 0xEB, 0xEC, + 0x4C, 0x45, 0x20, 0x56, 0x4F, 0x59, 0x41, 0x47, 0x45, 0x20, 0x45, 0x53, 0x54, 0x0A, 0x48, 0x4F, + 0x52, 0x53, 0x20, 0x44, 0x45, 0x20, 0x50, 0x52, 0x49, 0x58, 0x2E, 0x0B, 0x4C, 0x45, 0x20, 0x53, + 0x45, 0x55, 0x4C, 0x20, 0x4D, 0x4F, 0x59, 0x45, 0x4E, 0x0A, 0x53, 0x45, 0x52, 0x41, 0x49, 0x54, + 0x20, 0x51, 0x55, 0x45, 0x20, 0x54, 0x55, 0x0A, 0x50, 0x41, 0x52, 0x54, 0x49, 0x43, 0x49, 0x50, + 0x45, 0x53, 0x20, 0x41, 0x55, 0x0A, 0x44, 0x45, 0x41, 0x54, 0x48, 0x20, 0x54, 0x4F, 0x57, 0x45, + 0x52, 0x2E, 0x0B, 0xFF, 0xE9, 0xEA, 0x44, 0x45, 0x41, 0x54, 0x48, 0x20, 0x54, 0x4F, 0x57, 0x45, + 0x52, 0x3F, 0x0B, 0xFF, 0xEB, 0xEC, 0x4F, 0x55, 0x49, 0x2C, 0x43, 0x27, 0x45, 0x53, 0x54, 0x20, + 0x55, 0x4E, 0x20, 0x4A, 0x45, 0x55, 0x0A, 0x54, 0x45, 0x4C, 0x45, 0x56, 0x49, 0x53, 0x45, 0x2E, + 0x4C, 0x45, 0x0A, 0x47, 0x41, 0x47, 0x4E, 0x41, 0x4E, 0x54, 0x20, 0x52, 0x45, 0x43, 0x4F, 0x49, + 0x54, 0x0A, 0x55, 0x4E, 0x20, 0x42, 0x49, 0x4C, 0x4C, 0x45, 0x54, 0x2E, 0x0B, 0xFF, 0xE9, 0xEA, + 0x4F, 0x4B, 0x2E, 0x49, 0x4C, 0x20, 0x4D, 0x45, 0x20, 0x46, 0x41, 0x55, 0x54, 0x0A, 0x41, 0x55, + 0x53, 0x53, 0x49, 0x20, 0x44, 0x45, 0x53, 0x20, 0x46, 0x41, 0x55, 0x58, 0x0A, 0x50, 0x41, 0x50, + 0x49, 0x45, 0x52, 0x53, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, 0x4E, 0x4F, 0x20, 0x50, 0x52, 0x4F, 0x42, + 0x4C, 0x45, 0x4D, 0x4F, 0x2C, 0x0A, 0x56, 0x41, 0x20, 0x41, 0x55, 0x20, 0x42, 0x41, 0x52, 0x2C, + 0x20, 0x45, 0x54, 0x0A, 0x44, 0x45, 0x4D, 0x41, 0x4E, 0x44, 0x45, 0x20, 0x4A, 0x41, 0x43, 0x4B, + 0x0A, 0x44, 0x45, 0x20, 0x4D, 0x41, 0x20, 0x50, 0x41, 0x52, 0x54, 0x2E, 0x0B, 0x41, 0x48, 0x2C, + 0x41, 0x55, 0x20, 0x46, 0x41, 0x49, 0x54, 0x2C, 0x4A, 0x45, 0x0A, 0x54, 0x27, 0x41, 0x49, 0x20, + 0x4D, 0x49, 0x53, 0x20, 0x44, 0x41, 0x4E, 0x53, 0x20, 0x4C, 0x41, 0x0A, 0x50, 0x4F, 0x43, 0x48, + 0x45, 0x20, 0x4C, 0x45, 0x20, 0x43, 0x48, 0x41, 0x4D, 0x50, 0x0A, 0x44, 0x45, 0x20, 0x50, 0x52, + 0x4F, 0x54, 0x45, 0x43, 0x54, 0x49, 0x4F, 0x4E, 0x0B, 0x51, 0x55, 0x45, 0x20, 0x54, 0x55, 0x20, + 0x4D, 0x27, 0x41, 0x56, 0x41, 0x49, 0x53, 0x0A, 0x43, 0x4F, 0x4D, 0x4D, 0x41, 0x4E, 0x44, 0x45, + 0x2E, 0x0B, 0xFF, 0xE9, 0xEA, 0x50, 0x41, 0x52, 0x46, 0x41, 0x49, 0x54, 0x2E, 0x4A, 0x45, 0x20, + 0x54, 0x45, 0x0A, 0x52, 0x45, 0x4D, 0x45, 0x52, 0x43, 0x49, 0x45, 0x2E, 0x20, 0x41, 0x20, 0x4C, + 0x41, 0x0A, 0x50, 0x52, 0x4F, 0x43, 0x48, 0x41, 0x49, 0x4E, 0x45, 0x2C, 0x20, 0x49, 0x41, 0x4E, + 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, 0x42, 0x4F, 0x4E, 0x4E, 0x45, 0x20, 0x43, 0x48, 0x41, 0x4E, 0x43, + 0x45, 0x2E, 0x4A, 0x45, 0x0A, 0x54, 0x45, 0x20, 0x43, 0x4F, 0x4E, 0x54, 0x41, 0x43, 0x54, 0x45, + 0x52, 0x41, 0x49, 0x0A, 0x41, 0x20, 0x54, 0x4F, 0x4E, 0x20, 0x41, 0x52, 0x52, 0x49, 0x56, 0x45, + 0x20, 0x53, 0x55, 0x52, 0x0A, 0x54, 0x45, 0x52, 0x52, 0x45, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x42, + 0x49, 0x45, 0x4E, 0x56, 0x45, 0x4E, 0x55, 0x45, 0x20, 0x41, 0x0A, 0x4E, 0x45, 0x57, 0x20, 0x57, + 0x41, 0x53, 0x48, 0x49, 0x4E, 0x47, 0x54, 0x4F, 0x4E, 0x2C, 0x0A, 0x4A, 0x45, 0x55, 0x4E, 0x45, + 0x20, 0x48, 0x4F, 0x4D, 0x4D, 0x45, 0x2E, 0x0B, 0x56, 0x4F, 0x49, 0x43, 0x49, 0x20, 0x55, 0x4E, + 0x20, 0x50, 0x4C, 0x41, 0x4E, 0x0A, 0x44, 0x45, 0x20, 0x4C, 0x41, 0x20, 0x56, 0x49, 0x4C, 0x4C, + 0x45, 0x2C, 0x20, 0x49, 0x4C, 0x0A, 0x50, 0x4F, 0x55, 0x52, 0x52, 0x41, 0x20, 0x56, 0x4F, 0x55, + 0x53, 0x20, 0x45, 0x54, 0x52, 0x45, 0x0A, 0x55, 0x54, 0x49, 0x4C, 0x45, 0x2E, 0x0B, 0xFF, 0xE9, + 0xEA, 0x4D, 0x45, 0x52, 0x43, 0x49, 0x2C, 0x4D, 0x4F, 0x4E, 0x53, 0x49, 0x45, 0x55, 0x52, 0x2E, + 0x00, 0xFF, 0xEB, 0xEC, 0x42, 0x4F, 0x4E, 0x20, 0x53, 0x45, 0x4A, 0x4F, 0x55, 0x52, 0x2C, 0x50, + 0x41, 0x52, 0x4D, 0x49, 0x0A, 0x4E, 0x4F, 0x55, 0x53, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x50, 0x4F, + 0x55, 0x52, 0x20, 0x54, 0x52, 0x41, 0x56, 0x41, 0x49, 0x4C, 0x4C, 0x45, 0x52, 0x0A, 0x49, 0x4C, + 0x20, 0x56, 0x4F, 0x55, 0x53, 0x20, 0x46, 0x41, 0x55, 0x54, 0x20, 0x55, 0x4E, 0x0A, 0x50, 0x45, + 0x52, 0x4D, 0x49, 0x53, 0x2E, 0x0B, 0x56, 0x4F, 0x55, 0x53, 0x20, 0x50, 0x4F, 0x55, 0x52, 0x52, + 0x45, 0x5A, 0x20, 0x45, 0x4E, 0x0A, 0x4F, 0x42, 0x54, 0x45, 0x4E, 0x49, 0x52, 0x20, 0x55, 0x4E, + 0x20, 0x41, 0x55, 0x0A, 0x43, 0x45, 0x4E, 0x54, 0x52, 0x45, 0x20, 0x41, 0x44, 0x4D, 0x49, 0x4E, + 0x49, 0x53, 0x2D, 0x0A, 0x2D, 0x54, 0x52, 0x41, 0x54, 0x49, 0x46, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, + 0x4A, 0x45, 0x20, 0x4E, 0x27, 0x41, 0x49, 0x20, 0x50, 0x41, 0x53, 0x20, 0x4C, 0x45, 0x0A, 0x54, + 0x45, 0x4D, 0x50, 0x53, 0x2E, 0x00, 0x42, 0x4F, 0x4E, 0x4A, 0x4F, 0x55, 0x52, 0x20, 0x43, 0x48, + 0x45, 0x5A, 0x0A, 0x56, 0x4F, 0x55, 0x53, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x4A, 0x27, 0x41, 0x49, + 0x20, 0x44, 0x45, 0x4A, 0x41, 0x20, 0x56, 0x55, 0x0A, 0x43, 0x45, 0x20, 0x54, 0x59, 0x50, 0x45, + 0x20, 0x4C, 0x41, 0x20, 0x41, 0x55, 0x0A, 0x42, 0x41, 0x52, 0x2E, 0x00, 0x42, 0x4F, 0x4E, 0x4A, + 0x4F, 0x55, 0x52, 0x20, 0x43, 0x48, 0x45, 0x5A, 0x0A, 0x56, 0x4F, 0x55, 0x53, 0x2E, 0x00, 0x4F, + 0x55, 0x49, 0x2C, 0x4A, 0x45, 0x20, 0x4C, 0x45, 0x0A, 0x43, 0x4F, 0x4E, 0x4E, 0x41, 0x49, 0x53, + 0x2E, 0x43, 0x27, 0x45, 0x53, 0x54, 0x20, 0x55, 0x4E, 0x0A, 0x48, 0x41, 0x42, 0x49, 0x54, 0x55, + 0x45, 0x2E, 0x00, 0x20, 0x00, 0x20, 0x00, 0x4A, 0x45, 0x20, 0x56, 0x4F, 0x55, 0x44, 0x52, 0x41, + 0x49, 0x53, 0x20, 0x55, 0x4E, 0x0A, 0x50, 0x45, 0x52, 0x4D, 0x49, 0x53, 0x20, 0x44, 0x45, 0x0A, + 0x54, 0x52, 0x41, 0x56, 0x41, 0x49, 0x4C, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, 0x50, 0x41, 0x53, 0x20, + 0x44, 0x45, 0x20, 0x50, 0x52, 0x4F, 0x42, 0x4C, 0x45, 0x4D, 0x45, 0x0A, 0x50, 0x4F, 0x55, 0x52, + 0x20, 0x41, 0x56, 0x4F, 0x49, 0x52, 0x20, 0x55, 0x4E, 0x0A, 0x50, 0x45, 0x52, 0x4D, 0x49, 0x53, + 0x2E, 0x2E, 0x2E, 0x0B, 0x49, 0x4C, 0x20, 0x4D, 0x45, 0x20, 0x46, 0x41, 0x55, 0x54, 0x0A, 0x56, + 0x4F, 0x54, 0x52, 0x45, 0x20, 0x43, 0x41, 0x52, 0x54, 0x45, 0x20, 0x49, 0x44, 0x2E, 0x00, 0xFF, + 0xEB, 0xEC, 0x41, 0x55, 0x20, 0x53, 0x45, 0x43, 0x4F, 0x55, 0x52, 0x53, 0x2E, 0x2E, 0x2E, 0x00, + 0xFF, 0xEB, 0xEC, 0x41, 0x49, 0x44, 0x45, 0x5A, 0x20, 0x4D, 0x4F, 0x49, 0x2C, 0x4A, 0x45, 0x55, + 0x4E, 0x45, 0x0A, 0x48, 0x4F, 0x4D, 0x4D, 0x45, 0x2E, 0x4A, 0x27, 0x41, 0x49, 0x20, 0x45, 0x54, + 0x45, 0x0A, 0x41, 0x54, 0x54, 0x41, 0x51, 0x55, 0x45, 0x20, 0x50, 0x41, 0x52, 0x20, 0x44, 0x45, + 0x53, 0x0A, 0x4D, 0x55, 0x54, 0x41, 0x4E, 0x54, 0x53, 0x2E, 0x2E, 0x2E, 0x0B, 0x45, 0x54, 0x20, + 0x4A, 0x45, 0x20, 0x4E, 0x45, 0x20, 0x50, 0x45, 0x55, 0x58, 0x0A, 0x50, 0x4C, 0x55, 0x53, 0x20, + 0x4D, 0x41, 0x52, 0x43, 0x48, 0x45, 0x52, 0x0B, 0x52, 0x45, 0x54, 0x52, 0x4F, 0x55, 0x56, 0x45, + 0x5A, 0x20, 0x4D, 0x4F, 0x4E, 0x0A, 0x54, 0x45, 0x4C, 0x45, 0x50, 0x4F, 0x52, 0x54, 0x45, 0x55, + 0x52, 0x2C, 0x0A, 0x49, 0x4C, 0x20, 0x4D, 0x45, 0x20, 0x46, 0x41, 0x55, 0x54, 0x20, 0x44, 0x45, + 0x53, 0x0A, 0x53, 0x4F, 0x49, 0x4E, 0x53, 0x20, 0x55, 0x52, 0x47, 0x45, 0x4E, 0x54, 0x53, 0x2E, + 0x00, 0xFF, 0xEB, 0xEC, 0x4D, 0x45, 0x52, 0x43, 0x49, 0x2E, 0x56, 0x4F, 0x55, 0x53, 0x20, 0x56, + 0x45, 0x4E, 0x45, 0x5A, 0x0A, 0x44, 0x45, 0x20, 0x4D, 0x45, 0x20, 0x53, 0x41, 0x55, 0x56, 0x45, + 0x52, 0x20, 0x4C, 0x41, 0x0A, 0x56, 0x49, 0x45, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x50, 0x4F, 0x55, + 0x52, 0x20, 0x41, 0x4C, 0x4C, 0x45, 0x52, 0x20, 0x41, 0x20, 0x4E, 0x45, 0x57, 0x0A, 0x57, 0x41, + 0x53, 0x48, 0x49, 0x4E, 0x47, 0x54, 0x4F, 0x4E, 0x2C, 0x54, 0x55, 0x0A, 0x44, 0x4F, 0x49, 0x53, + 0x20, 0x53, 0x41, 0x55, 0x54, 0x45, 0x52, 0x20, 0x44, 0x41, 0x4E, 0x53, 0x0A, 0x43, 0x45, 0x20, + 0x47, 0x52, 0x41, 0x4E, 0x44, 0x20, 0x54, 0x52, 0x4F, 0x55, 0x0B, 0x4D, 0x41, 0x49, 0x53, 0x20, + 0x41, 0x20, 0x54, 0x41, 0x20, 0x50, 0x4C, 0x41, 0x43, 0x45, 0x0A, 0x4A, 0x27, 0x55, 0x54, 0x49, + 0x4C, 0x49, 0x53, 0x45, 0x52, 0x41, 0x49, 0x53, 0x0A, 0x55, 0x4E, 0x45, 0x20, 0x43, 0x45, 0x49, + 0x4E, 0x54, 0x55, 0x52, 0x45, 0x0A, 0x41, 0x4E, 0x54, 0x49, 0x2D, 0x47, 0x2E, 0x0B, 0xFF, 0xE9, + 0xEA, 0x4F, 0x55, 0x20, 0x50, 0x55, 0x49, 0x53, 0x2D, 0x4A, 0x45, 0x20, 0x45, 0x4E, 0x0A, 0x54, + 0x52, 0x4F, 0x55, 0x56, 0x45, 0x52, 0x20, 0x55, 0x4E, 0x45, 0x3F, 0x0B, 0xFF, 0xEB, 0xEC, 0x48, + 0x45, 0x2E, 0x48, 0x45, 0x2E, 0x4A, 0x45, 0x20, 0x50, 0x45, 0x55, 0x58, 0x0A, 0x54, 0x45, 0x20, + 0x4C, 0x41, 0x20, 0x56, 0x45, 0x4E, 0x44, 0x52, 0x45, 0x3A, 0x0A, 0x35, 0x30, 0x30, 0x20, 0x43, + 0x52, 0x45, 0x44, 0x49, 0x54, 0x53, 0x2E, 0x00, 0x42, 0x4F, 0x4E, 0x20, 0x56, 0x4F, 0x59, 0x41, + 0x47, 0x45, 0x2C, 0x4A, 0x45, 0x55, 0x4E, 0x45, 0x0A, 0x48, 0x4F, 0x4D, 0x4D, 0x45, 0x2E, 0x00, + 0x49, 0x4C, 0x20, 0x46, 0x41, 0x55, 0x44, 0x52, 0x41, 0x49, 0x54, 0x0A, 0x55, 0x4E, 0x45, 0x20, + 0x50, 0x49, 0x4C, 0x45, 0x0A, 0x43, 0x48, 0x41, 0x52, 0x47, 0x45, 0x45, 0x20, 0x41, 0x20, 0x42, + 0x4C, 0x4F, 0x43, 0x00, 0x4A, 0x45, 0x20, 0x56, 0x4F, 0x55, 0x44, 0x52, 0x41, 0x49, 0x53, 0x20, + 0x55, 0x4E, 0x0A, 0x50, 0x45, 0x52, 0x4D, 0x49, 0x53, 0x20, 0x44, 0x45, 0x0A, 0x54, 0x52, 0x41, + 0x56, 0x41, 0x49, 0x4C, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, 0x50, 0x52, 0x45, 0x4D, 0x49, 0x45, 0x52, + 0x20, 0x45, 0x54, 0x41, 0x47, 0x45, 0x00, 0x55, 0x4E, 0x45, 0x20, 0x56, 0x4F, 0x49, 0x58, 0x0A, + 0x49, 0x4E, 0x54, 0x45, 0x52, 0x49, 0x45, 0x55, 0x52, 0x45, 0x20, 0x73, 0x65, 0x0A, 0x46, 0x41, + 0x49, 0x54, 0x20, 0x45, 0x4E, 0x54, 0x45, 0x4E, 0x44, 0x52, 0x45, 0x3A, 0x0B, 0xFF, 0xEB, 0xEC, + 0x46, 0x41, 0x49, 0x53, 0x2D, 0x4D, 0x4F, 0x49, 0x0A, 0x43, 0x4F, 0x4E, 0x46, 0x49, 0x41, 0x4E, + 0x43, 0x45, 0x2E, 0x50, 0x4F, 0x53, 0x45, 0x0A, 0x4C, 0x41, 0x20, 0x43, 0x48, 0x41, 0x52, 0x47, + 0x45, 0x0A, 0x41, 0x54, 0x4F, 0x4D, 0x49, 0x51, 0x55, 0x45, 0x20, 0x49, 0x43, 0x49, 0x2E, 0x2E, + 0x2E, 0x0B, 0x45, 0x54, 0x20, 0x46, 0x55, 0x49, 0x53, 0x20, 0x41, 0x56, 0x41, 0x4E, 0x54, 0x0A, + 0x51, 0x55, 0x27, 0x45, 0x4C, 0x4C, 0x45, 0x20, 0x4E, 0x27, 0x41, 0x54, 0x2D, 0x0A, 0x2D, 0x54, + 0x45, 0x49, 0x47, 0x4E, 0x45, 0x20, 0x4C, 0x45, 0x20, 0x4E, 0x4F, 0x59, 0x41, 0x55, 0x0A, 0x44, + 0x45, 0x20, 0x4C, 0x41, 0x20, 0x50, 0x4C, 0x41, 0x4E, 0x45, 0x54, 0x45, 0x2E, 0x00, 0xFF, 0xEB, + 0xEC, 0x4A, 0x45, 0x20, 0x56, 0x4F, 0x55, 0x53, 0x20, 0x53, 0x55, 0x49, 0x53, 0x2C, 0x0A, 0x4A, + 0x45, 0x55, 0x4E, 0x45, 0x20, 0x48, 0x4F, 0x4D, 0x4D, 0x45, 0x2E, 0x0B, 0x47, 0x55, 0x49, 0x44, + 0x45, 0x5A, 0x2D, 0x4D, 0x4F, 0x49, 0x0A, 0x4A, 0x55, 0x53, 0x51, 0x55, 0x27, 0x41, 0x55, 0x20, + 0x43, 0x45, 0x4E, 0x54, 0x52, 0x45, 0x0A, 0x44, 0x45, 0x20, 0x52, 0x45, 0x43, 0x48, 0x45, 0x52, + 0x43, 0x48, 0x45, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x4D, 0x45, 0x52, 0x43, 0x49, 0x20, 0x44, 0x45, + 0x20, 0x56, 0x4F, 0x54, 0x52, 0x45, 0x0A, 0x41, 0x49, 0x44, 0x45, 0x2E, 0x2E, 0x2E, 0x0B, 0x49, + 0x4C, 0x20, 0x4E, 0x27, 0x59, 0x20, 0x41, 0x20, 0x50, 0x4C, 0x55, 0x53, 0x0A, 0x44, 0x45, 0x20, + 0x44, 0x41, 0x4E, 0x47, 0x45, 0x52, 0x2C, 0x0A, 0x4D, 0x41, 0x49, 0x4E, 0x54, 0x45, 0x4E, 0x41, + 0x4E, 0x54, 0x00, 0xFF, 0xEB, 0xEC, 0x41, 0x4C, 0x4F, 0x52, 0x53, 0x2C, 0x4D, 0x27, 0x41, 0x56, + 0x45, 0x5A, 0x0A, 0x56, 0x4F, 0x55, 0x53, 0x20, 0x41, 0x50, 0x50, 0x4F, 0x52, 0x54, 0x45, 0x0A, + 0x4C, 0x45, 0x20, 0x50, 0x41, 0x51, 0x55, 0x45, 0x54, 0x3F, 0x00, 0x43, 0x4F, 0x4D, 0x42, 0x49, + 0x45, 0x4E, 0x20, 0x43, 0x4F, 0x55, 0x54, 0x45, 0x0A, 0x55, 0x4E, 0x20, 0x42, 0x49, 0x4C, 0x4C, + 0x45, 0x54, 0x20, 0x50, 0x4F, 0x55, 0x52, 0x0A, 0x4C, 0x41, 0x20, 0x54, 0x45, 0x52, 0x52, 0x45, + 0x3F, 0x0B, 0xFF, 0xEB, 0xEC, 0x35, 0x30, 0x20, 0x30, 0x30, 0x30, 0x20, 0x43, 0x52, 0x45, 0x44, + 0x49, 0x54, 0x53, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x44, 0x4F, 0x4E, 0x4E, 0x41, 0x4E, 0x54, 0x2C, + 0x44, 0x4F, 0x4E, 0x4E, 0x41, 0x4E, 0x54, 0x2E, 0x0A, 0x31, 0x35, 0x30, 0x30, 0x20, 0x43, 0x52, + 0x45, 0x44, 0x49, 0x54, 0x53, 0x20, 0x45, 0x54, 0x0A, 0x4C, 0x45, 0x53, 0x20, 0x50, 0x41, 0x50, + 0x49, 0x45, 0x52, 0x53, 0x20, 0x53, 0x4F, 0x4E, 0x54, 0x0A, 0x41, 0x20, 0x54, 0x4F, 0x49, 0x2E, + 0x00 +}; + +const uint8 LocaleData::_stringsTableEN[] = { + 0x5A, 0x00, 0x6D, 0x00, 0x83, 0x00, 0x97, 0x01, 0x48, 0x02, 0x6C, 0x02, 0xB7, 0x02, 0xE9, 0x02, + 0x40, 0x03, 0x5F, 0x03, 0x9F, 0x03, 0xDB, 0x03, 0x1D, 0x04, 0x59, 0x04, 0xDD, 0x04, 0x08, 0x05, + 0x1A, 0x05, 0x83, 0x05, 0x8E, 0x05, 0xAC, 0x05, 0x39, 0x06, 0x23, 0x08, 0x8E, 0x08, 0xA2, 0x08, + 0xF3, 0x08, 0x09, 0x09, 0x28, 0x09, 0x51, 0x09, 0x70, 0x09, 0x93, 0x09, 0x95, 0x09, 0x97, 0x09, + 0xEE, 0x09, 0x00, 0x0A, 0x80, 0x0A, 0xA2, 0x0A, 0x4B, 0x0B, 0x64, 0x0B, 0x8F, 0x0B, 0xB7, 0x0B, + 0x40, 0x0C, 0x76, 0x0C, 0xC7, 0x0C, 0xF4, 0x0C, 0x26, 0x0D, 0x54, 0x68, 0x65, 0x20, 0x66, 0x75, + 0x73, 0x65, 0x20, 0x69, 0x73, 0x0A, 0x62, 0x6C, 0x6F, 0x77, 0x6E, 0x2E, 0x00, 0x54, 0x68, 0x61, + 0x74, 0x20, 0x73, 0x68, 0x6F, 0x75, 0x6C, 0x64, 0x0A, 0x77, 0x6F, 0x72, 0x6B, 0x20, 0x6E, 0x6F, + 0x77, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x49, 0x27, 0x6D, 0x20, 0x4A, 0x61, 0x63, 0x6B, 0x2E, 0x59, + 0x6F, 0x75, 0x27, 0x72, 0x65, 0x0A, 0x61, 0x66, 0x74, 0x65, 0x72, 0x20, 0x73, 0x6F, 0x6D, 0x65, + 0x20, 0x66, 0x61, 0x6C, 0x73, 0x65, 0x0A, 0x70, 0x61, 0x70, 0x65, 0x72, 0x73, 0x3F, 0x0B, 0xFF, + 0xE9, 0xEA, 0x59, 0x65, 0x73, 0x2C, 0x61, 0x6E, 0x64, 0x20, 0x61, 0x73, 0x0A, 0x71, 0x75, 0x69, + 0x63, 0x6B, 0x6C, 0x79, 0x20, 0x61, 0x73, 0x0A, 0x70, 0x6F, 0x73, 0x73, 0x69, 0x62, 0x6C, 0x65, + 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, 0x31, 0x35, 0x30, 0x30, 0x20, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, + 0x73, 0x21, 0x0B, 0xFF, 0xE9, 0xEA, 0x31, 0x35, 0x30, 0x30, 0x3F, 0x3F, 0x3F, 0x0B, 0xFF, 0xEB, + 0xEC, 0x59, 0x65, 0x61, 0x68, 0x2C, 0x49, 0x27, 0x6D, 0x20, 0x74, 0x61, 0x6B, 0x69, 0x6E, 0x67, + 0x0A, 0x61, 0x20, 0x62, 0x69, 0x67, 0x20, 0x72, 0x69, 0x73, 0x6B, 0x20, 0x68, 0x65, 0x72, 0x65, + 0x2E, 0x0B, 0xFF, 0xE9, 0xEA, 0x42, 0x75, 0x74, 0x20, 0x49, 0x20, 0x64, 0x6F, 0x6E, 0x27, 0x74, + 0x0A, 0x68, 0x61, 0x76, 0x65, 0x20, 0x65, 0x6E, 0x6F, 0x75, 0x67, 0x68, 0x2E, 0x2E, 0x2E, 0x0B, + 0xFF, 0xEB, 0xEC, 0x47, 0x6F, 0x20, 0x74, 0x6F, 0x20, 0x74, 0x68, 0x65, 0x0A, 0x45, 0x6D, 0x70, + 0x6C, 0x6F, 0x79, 0x6D, 0x65, 0x6E, 0x74, 0x0A, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2C, 0x20, + 0x79, 0x6F, 0x75, 0x27, 0x6C, 0x6C, 0x0A, 0x66, 0x69, 0x6E, 0x64, 0x20, 0x77, 0x6F, 0x72, 0x6B, + 0x20, 0x74, 0x68, 0x65, 0x72, 0x65, 0x2E, 0x0B, 0x41, 0x6E, 0x64, 0x20, 0x63, 0x6F, 0x6D, 0x65, + 0x20, 0x62, 0x61, 0x63, 0x6B, 0x20, 0x74, 0x6F, 0x0A, 0x6D, 0x65, 0x20, 0x77, 0x68, 0x65, 0x6E, + 0x20, 0x79, 0x6F, 0x75, 0x27, 0x76, 0x65, 0x0A, 0x67, 0x6F, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x6D, 0x6F, 0x6E, 0x65, 0x79, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x49, 0x20, 0x6B, 0x6E, 0x6F, 0x77, + 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x67, 0x75, 0x79, 0x2E, 0x0A, 0x48, 0x65, 0x20, 0x68, 0x61, + 0x73, 0x20, 0x61, 0x20, 0x66, 0x72, 0x69, 0x65, 0x6E, 0x64, 0x0A, 0x69, 0x6E, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x70, 0x6F, 0x6C, 0x69, 0x63, 0x65, 0x2E, 0x0B, 0xFF, 0xE9, 0xEA, 0x57, 0x68, 0x65, + 0x72, 0x65, 0x20, 0x63, 0x61, 0x6E, 0x20, 0x49, 0x20, 0x66, 0x69, 0x6E, 0x64, 0x0A, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x66, 0x72, 0x69, 0x65, 0x6E, 0x64, 0x3F, 0x0B, 0xFF, 0xEB, 0xEC, 0x47, 0x6F, + 0x20, 0x74, 0x6F, 0x20, 0x52, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x65, 0x64, 0x0A, 0x41, + 0x72, 0x65, 0x61, 0x20, 0x31, 0x2C, 0x20, 0x49, 0x20, 0x74, 0x68, 0x69, 0x6E, 0x6B, 0x0A, 0x68, + 0x65, 0x27, 0x73, 0x20, 0x6F, 0x6E, 0x20, 0x64, 0x75, 0x74, 0x79, 0x0A, 0x74, 0x68, 0x65, 0x72, + 0x65, 0x2E, 0x0B, 0x42, 0x75, 0x74, 0x20, 0x62, 0x65, 0x20, 0x63, 0x61, 0x72, 0x65, 0x66, 0x75, + 0x6C, 0x2C, 0x0A, 0x74, 0x68, 0x6F, 0x73, 0x65, 0x20, 0x67, 0x75, 0x79, 0x73, 0x20, 0x61, 0x72, + 0x65, 0x0A, 0x6D, 0x65, 0x61, 0x6E, 0x21, 0x00, 0xFF, 0xEB, 0xEC, 0x49, 0x20, 0x64, 0x6F, 0x6E, + 0x27, 0x74, 0x20, 0x6B, 0x6E, 0x6F, 0x77, 0x0A, 0x61, 0x6E, 0x79, 0x74, 0x68, 0x69, 0x6E, 0x67, + 0x20, 0x6D, 0x6F, 0x72, 0x65, 0x2C, 0x0A, 0x73, 0x6F, 0x6E, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x43, + 0x59, 0x2D, 0x42, 0x30, 0x32, 0x31, 0x20, 0x77, 0x61, 0x6E, 0x74, 0x73, 0x0A, 0x74, 0x6F, 0x20, + 0x6D, 0x61, 0x6B, 0x65, 0x20, 0x61, 0x20, 0x64, 0x65, 0x61, 0x6C, 0x0A, 0x77, 0x69, 0x74, 0x68, + 0x20, 0x79, 0x6F, 0x75, 0x2E, 0x0B, 0x48, 0x65, 0x27, 0x6C, 0x6C, 0x20, 0x62, 0x65, 0x20, 0x77, + 0x61, 0x69, 0x74, 0x69, 0x6E, 0x67, 0x0A, 0x62, 0x65, 0x68, 0x69, 0x6E, 0x64, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x62, 0x61, 0x72, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x47, 0x6F, 0x20, 0x74, 0x6F, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x62, 0x61, 0x72, 0x2C, 0x0A, 0x73, 0x6F, 0x6E, 0x2C, 0x20, 0x43, 0x59, + 0x2D, 0x42, 0x30, 0x32, 0x31, 0x27, 0x73, 0x0A, 0x77, 0x61, 0x69, 0x74, 0x69, 0x6E, 0x67, 0x20, + 0x66, 0x6F, 0x72, 0x20, 0x79, 0x6F, 0x75, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x44, 0x6F, 0x6E, 0x27, + 0x74, 0x20, 0x73, 0x68, 0x6F, 0x6F, 0x74, 0x2C, 0x49, 0x27, 0x6D, 0x0A, 0x6E, 0x6F, 0x74, 0x20, + 0x43, 0x59, 0x2D, 0x42, 0x30, 0x32, 0x31, 0x21, 0x0B, 0x48, 0x69, 0x73, 0x20, 0x68, 0x69, 0x64, + 0x65, 0x6F, 0x75, 0x74, 0x27, 0x73, 0x0A, 0x64, 0x6F, 0x77, 0x6E, 0x20, 0x62, 0x65, 0x6C, 0x6F, + 0x77, 0x2E, 0x0B, 0x48, 0x69, 0x73, 0x20, 0x70, 0x61, 0x6C, 0x2C, 0x74, 0x68, 0x65, 0x20, 0x63, + 0x6F, 0x70, 0x0A, 0x68, 0x61, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6B, 0x65, 0x79, 0x2E, 0x00, + 0xFF, 0xEB, 0xEC, 0x49, 0x20, 0x64, 0x6F, 0x6E, 0x27, 0x74, 0x20, 0x6B, 0x6E, 0x6F, 0x77, 0x0A, + 0x61, 0x6E, 0x79, 0x74, 0x68, 0x69, 0x6E, 0x67, 0x20, 0x65, 0x6C, 0x73, 0x65, 0x2E, 0x00, 0xFF, + 0xEB, 0xEC, 0x53, 0x69, 0x72, 0x2E, 0x2E, 0x2E, 0x20, 0x73, 0x6F, 0x6D, 0x65, 0x20, 0x67, 0x75, + 0x79, 0x0B, 0x63, 0x61, 0x6C, 0x6C, 0x65, 0x64, 0x20, 0x4A, 0x61, 0x63, 0x6B, 0x0A, 0x61, 0x72, + 0x72, 0x61, 0x6E, 0x67, 0x65, 0x64, 0x20, 0x74, 0x6F, 0x20, 0x6D, 0x65, 0x65, 0x74, 0x0A, 0x79, + 0x6F, 0x75, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x61, 0x72, 0x2E, 0x00, 0x49, + 0x27, 0x64, 0x20, 0x6C, 0x69, 0x6B, 0x65, 0x20, 0x61, 0x0A, 0x77, 0x6F, 0x72, 0x6B, 0x20, 0x70, + 0x65, 0x72, 0x6D, 0x69, 0x74, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, 0x4E, 0x6F, 0x2C, 0x20, 0x69, 0x74, + 0x27, 0x73, 0x20, 0x6E, 0x6F, 0x74, 0x0A, 0x68, 0x65, 0x72, 0x65, 0x2E, 0x20, 0x53, 0x65, 0x65, + 0x20, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x0A, 0x43, 0x2E, 0x00, 0x49, 0x27, 0x64, 0x20, 0x6C, + 0x69, 0x6B, 0x65, 0x20, 0x61, 0x0A, 0x77, 0x6F, 0x72, 0x6B, 0x20, 0x70, 0x65, 0x72, 0x6D, 0x69, + 0x74, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, 0x47, 0x6F, 0x6F, 0x64, 0x2E, 0x2E, 0x2E, 0x4F, 0x2E, 0x6B, + 0x2E, 0x2C, 0x74, 0x68, 0x65, 0x0A, 0x62, 0x6F, 0x73, 0x73, 0x20, 0x77, 0x69, 0x6C, 0x6C, 0x20, + 0x73, 0x65, 0x65, 0x0A, 0x79, 0x6F, 0x75, 0x20, 0x6E, 0x6F, 0x77, 0x2E, 0x00, 0x49, 0x27, 0x64, + 0x20, 0x6C, 0x69, 0x6B, 0x65, 0x20, 0x61, 0x0A, 0x77, 0x6F, 0x72, 0x6B, 0x20, 0x70, 0x65, 0x72, + 0x6D, 0x69, 0x74, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, 0x4E, 0x6F, 0x2C, 0x20, 0x69, 0x74, 0x27, 0x73, + 0x20, 0x6E, 0x6F, 0x74, 0x0A, 0x68, 0x65, 0x72, 0x65, 0x2E, 0x20, 0x53, 0x65, 0x65, 0x20, 0x57, + 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x0A, 0x42, 0x2E, 0x00, 0x49, 0x27, 0x64, 0x20, 0x6C, 0x69, 0x6B, + 0x65, 0x20, 0x74, 0x6F, 0x0A, 0x73, 0x70, 0x65, 0x61, 0x6B, 0x20, 0x74, 0x6F, 0x20, 0x4A, 0x61, + 0x63, 0x6B, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, 0x4F, 0x68, 0x20, 0x79, 0x65, 0x61, 0x68, 0x3F, 0x20, + 0x4A, 0x61, 0x63, 0x6B, 0x27, 0x73, 0x0A, 0x6E, 0x6F, 0x74, 0x20, 0x68, 0x65, 0x72, 0x65, 0x2E, + 0x0B, 0xFF, 0xE9, 0xEA, 0x49, 0x27, 0x76, 0x65, 0x20, 0x62, 0x65, 0x65, 0x6E, 0x20, 0x73, 0x65, + 0x6E, 0x74, 0x0A, 0x62, 0x79, 0x20, 0x6D, 0x79, 0x20, 0x66, 0x72, 0x69, 0x65, 0x6E, 0x64, 0x0A, + 0x49, 0x61, 0x6E, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, 0x4F, 0x2E, 0x6B, 0x2E, 0x20, 0x4A, 0x61, 0x63, + 0x6B, 0x27, 0x73, 0x0A, 0x77, 0x61, 0x69, 0x74, 0x69, 0x6E, 0x67, 0x20, 0x66, 0x6F, 0x72, 0x20, + 0x79, 0x6F, 0x75, 0x0A, 0x6F, 0x75, 0x74, 0x73, 0x69, 0x64, 0x65, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, + 0x42, 0x65, 0x61, 0x74, 0x20, 0x69, 0x74, 0x20, 0x73, 0x6F, 0x6E, 0x2E, 0x0A, 0x59, 0x6F, 0x75, + 0x27, 0x72, 0x65, 0x20, 0x74, 0x6F, 0x6F, 0x20, 0x79, 0x6F, 0x75, 0x6E, 0x67, 0x0A, 0x74, 0x6F, + 0x20, 0x64, 0x72, 0x69, 0x6E, 0x6B, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x50, 0x61, 0x70, 0x65, 0x72, + 0x73, 0x20, 0x70, 0x6C, 0x65, 0x61, 0x73, 0x65, 0x2E, 0x00, 0x49, 0x27, 0x6D, 0x20, 0x74, 0x68, + 0x65, 0x0A, 0x6D, 0x65, 0x73, 0x73, 0x65, 0x6E, 0x67, 0x65, 0x72, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, + 0x4F, 0x68, 0x20, 0x79, 0x65, 0x73, 0x21, 0x20, 0x48, 0x65, 0x72, 0x65, 0x2C, 0x0A, 0x74, 0x61, + 0x6B, 0x65, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x70, 0x61, 0x72, 0x63, 0x65, 0x6C, 0x0A, 0x74, + 0x6F, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x76, 0x65, 0x6C, 0x0A, 0x61, 0x67, 0x65, + 0x6E, 0x63, 0x79, 0x2E, 0x0B, 0x41, 0x6E, 0x64, 0x20, 0x62, 0x65, 0x20, 0x63, 0x61, 0x72, 0x65, + 0x66, 0x75, 0x6C, 0x0A, 0x69, 0x74, 0x27, 0x73, 0x20, 0x76, 0x61, 0x6C, 0x75, 0x61, 0x62, 0x6C, + 0x65, 0x2E, 0x00, 0x54, 0x49, 0x4D, 0x45, 0x20, 0x49, 0x53, 0x20, 0x55, 0x50, 0x00, 0x54, 0x68, + 0x65, 0x72, 0x65, 0x27, 0x73, 0x20, 0x61, 0x20, 0x70, 0x6C, 0x61, 0x63, 0x65, 0x0A, 0x66, 0x6F, + 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x61, 0x72, 0x64, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x54, + 0x68, 0x61, 0x6E, 0x6B, 0x73, 0x2C, 0x20, 0x43, 0x6F, 0x6E, 0x72, 0x61, 0x64, 0x2E, 0x0A, 0x54, + 0x68, 0x6F, 0x73, 0x65, 0x20, 0x63, 0x6F, 0x70, 0x73, 0x0A, 0x77, 0x6F, 0x75, 0x6C, 0x64, 0x27, + 0x76, 0x65, 0x20, 0x68, 0x61, 0x64, 0x20, 0x6D, 0x79, 0x0A, 0x68, 0x69, 0x64, 0x65, 0x21, 0x0B, + 0x57, 0x65, 0x6C, 0x6C, 0x2C, 0x49, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6F, 0x73, 0x65, 0x0A, 0x79, + 0x6F, 0x75, 0x20, 0x64, 0x6F, 0x6E, 0x27, 0x74, 0x0A, 0x72, 0x65, 0x6D, 0x65, 0x6D, 0x62, 0x65, + 0x72, 0x20, 0x79, 0x6F, 0x75, 0x72, 0x0A, 0x6F, 0x6C, 0x64, 0x20, 0x70, 0x61, 0x6C, 0x20, 0x49, + 0x61, 0x6E, 0x2E, 0x0B, 0x54, 0x61, 0x6B, 0x65, 0x20, 0x61, 0x20, 0x73, 0x65, 0x61, 0x74, 0x2C, + 0x0A, 0x77, 0x65, 0x27, 0x6C, 0x6C, 0x20, 0x66, 0x69, 0x78, 0x20, 0x74, 0x68, 0x61, 0x74, 0x0A, + 0x73, 0x68, 0x6F, 0x72, 0x74, 0x6C, 0x79, 0x2E, 0x00, 0x49, 0x61, 0x6E, 0x2C, 0x77, 0x68, 0x61, + 0x74, 0x20, 0x64, 0x6F, 0x20, 0x79, 0x6F, 0x75, 0x0A, 0x68, 0x61, 0x76, 0x65, 0x20, 0x74, 0x6F, + 0x20, 0x64, 0x6F, 0x20, 0x74, 0x6F, 0x0A, 0x67, 0x65, 0x74, 0x20, 0x74, 0x6F, 0x20, 0x45, 0x41, + 0x52, 0x54, 0x48, 0x3F, 0x0B, 0xFF, 0xEB, 0xEC, 0x54, 0x68, 0x65, 0x20, 0x63, 0x6F, 0x73, 0x74, + 0x20, 0x6F, 0x66, 0x20, 0x74, 0x68, 0x65, 0x0A, 0x74, 0x69, 0x63, 0x6B, 0x65, 0x74, 0x20, 0x69, + 0x73, 0x0A, 0x61, 0x73, 0x74, 0x72, 0x6F, 0x6E, 0x6F, 0x6D, 0x69, 0x63, 0x61, 0x6C, 0x2E, 0x0B, + 0x54, 0x68, 0x65, 0x20, 0x6F, 0x6E, 0x6C, 0x79, 0x20, 0x77, 0x61, 0x79, 0x0A, 0x77, 0x6F, 0x75, + 0x6C, 0x64, 0x20, 0x62, 0x65, 0x20, 0x66, 0x6F, 0x72, 0x20, 0x79, 0x6F, 0x75, 0x0A, 0x74, 0x6F, + 0x20, 0x74, 0x61, 0x6B, 0x65, 0x20, 0x70, 0x61, 0x72, 0x74, 0x20, 0x69, 0x6E, 0x0A, 0x44, 0x65, + 0x61, 0x74, 0x68, 0x20, 0x54, 0x6F, 0x77, 0x65, 0x72, 0x2E, 0x0B, 0xFF, 0xE9, 0xEA, 0x44, 0x65, + 0x61, 0x74, 0x68, 0x20, 0x54, 0x6F, 0x77, 0x65, 0x72, 0x3F, 0x0B, 0xFF, 0xEB, 0xEC, 0x59, 0x65, + 0x73, 0x2C, 0x69, 0x74, 0x27, 0x73, 0x20, 0x61, 0x0A, 0x74, 0x65, 0x6C, 0x65, 0x76, 0x69, 0x73, + 0x69, 0x6F, 0x6E, 0x20, 0x67, 0x61, 0x6D, 0x65, 0x2E, 0x0A, 0x54, 0x68, 0x65, 0x20, 0x77, 0x69, + 0x6E, 0x6E, 0x65, 0x72, 0x20, 0x67, 0x65, 0x74, 0x73, 0x0A, 0x61, 0x20, 0x74, 0x69, 0x63, 0x6B, + 0x65, 0x74, 0x2E, 0x0B, 0xFF, 0xE9, 0xEA, 0x4F, 0x2E, 0x6B, 0x2E, 0x43, 0x61, 0x6E, 0x20, 0x79, + 0x6F, 0x75, 0x0A, 0x73, 0x75, 0x70, 0x70, 0x6C, 0x79, 0x20, 0x66, 0x61, 0x6C, 0x73, 0x65, 0x0A, + 0x70, 0x61, 0x70, 0x65, 0x72, 0x73, 0x3F, 0x0B, 0xFF, 0xEB, 0xEC, 0x4E, 0x6F, 0x20, 0x70, 0x72, + 0x6F, 0x62, 0x6C, 0x65, 0x6D, 0x2E, 0x0A, 0x47, 0x6F, 0x20, 0x74, 0x6F, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x62, 0x61, 0x72, 0x0A, 0x61, 0x6E, 0x64, 0x20, 0x61, 0x73, 0x6B, 0x20, 0x66, 0x6F, 0x72, + 0x0A, 0x4A, 0x61, 0x63, 0x6B, 0x2E, 0x0B, 0x53, 0x61, 0x79, 0x20, 0x49, 0x20, 0x73, 0x65, 0x6E, + 0x74, 0x20, 0x79, 0x6F, 0x75, 0x2E, 0x0A, 0x4F, 0x68, 0x2C, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x77, 0x61, 0x79, 0x2E, 0x2E, 0x2E, 0x0B, 0x49, 0x20, 0x70, 0x75, 0x74, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x66, 0x6F, 0x72, 0x63, 0x65, 0x0A, 0x66, 0x69, 0x65, 0x6C, 0x64, 0x20, 0x79, 0x6F, + 0x75, 0x20, 0x61, 0x73, 0x6B, 0x65, 0x64, 0x0A, 0x6D, 0x65, 0x20, 0x66, 0x6F, 0x72, 0x20, 0x69, + 0x6E, 0x20, 0x79, 0x6F, 0x75, 0x72, 0x0A, 0x70, 0x6F, 0x63, 0x6B, 0x65, 0x74, 0x2E, 0x0B, 0xFF, + 0xE9, 0xEA, 0x47, 0x72, 0x65, 0x61, 0x74, 0x2E, 0x54, 0x68, 0x61, 0x6E, 0x6B, 0x0A, 0x79, 0x6F, + 0x75, 0x2C, 0x20, 0x49, 0x61, 0x6E, 0x2E, 0x27, 0x54, 0x69, 0x6C, 0x6C, 0x0A, 0x74, 0x68, 0x65, + 0x20, 0x6E, 0x65, 0x78, 0x74, 0x20, 0x74, 0x69, 0x6D, 0x65, 0x2E, 0x2E, 0x2E, 0x0B, 0xFF, 0xEB, + 0xEC, 0x47, 0x6F, 0x6F, 0x64, 0x20, 0x6C, 0x75, 0x63, 0x6B, 0x2E, 0x49, 0x27, 0x6C, 0x6C, 0x0A, + 0x62, 0x65, 0x20, 0x69, 0x6E, 0x20, 0x74, 0x6F, 0x75, 0x63, 0x68, 0x20, 0x77, 0x68, 0x65, 0x6E, + 0x0A, 0x79, 0x6F, 0x75, 0x20, 0x67, 0x65, 0x74, 0x20, 0x74, 0x6F, 0x0A, 0x45, 0x61, 0x72, 0x74, + 0x68, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x57, 0x65, 0x6C, 0x63, 0x6F, 0x6D, 0x65, 0x20, 0x74, 0x6F, + 0x0A, 0x4E, 0x65, 0x77, 0x20, 0x57, 0x61, 0x73, 0x68, 0x69, 0x6E, 0x67, 0x74, 0x6F, 0x6E, 0x2C, + 0x0A, 0x79, 0x6F, 0x75, 0x6E, 0x67, 0x20, 0x6D, 0x61, 0x6E, 0x2E, 0x0B, 0x48, 0x65, 0x72, 0x65, + 0x27, 0x73, 0x20, 0x61, 0x20, 0x6D, 0x61, 0x70, 0x20, 0x6F, 0x66, 0x0A, 0x74, 0x68, 0x65, 0x20, + 0x63, 0x69, 0x74, 0x79, 0x2C, 0x77, 0x68, 0x69, 0x63, 0x68, 0x0A, 0x79, 0x6F, 0x75, 0x20, 0x6D, + 0x61, 0x79, 0x20, 0x66, 0x69, 0x6E, 0x64, 0x0A, 0x75, 0x73, 0x65, 0x66, 0x75, 0x6C, 0x2E, 0x0B, + 0xFF, 0xE9, 0xEA, 0x54, 0x68, 0x61, 0x6E, 0x6B, 0x20, 0x79, 0x6F, 0x75, 0x2E, 0x00, 0xFF, 0xEB, + 0xEC, 0x48, 0x61, 0x76, 0x65, 0x20, 0x61, 0x20, 0x6E, 0x69, 0x63, 0x65, 0x0A, 0x64, 0x61, 0x79, + 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x59, 0x6F, 0x75, 0x20, 0x6D, 0x75, 0x73, 0x74, 0x20, 0x68, 0x61, + 0x76, 0x65, 0x20, 0x61, 0x0A, 0x70, 0x65, 0x72, 0x6D, 0x69, 0x74, 0x20, 0x69, 0x6E, 0x20, 0x6F, + 0x72, 0x64, 0x65, 0x72, 0x0A, 0x74, 0x6F, 0x20, 0x77, 0x6F, 0x72, 0x6B, 0x2E, 0x0B, 0x59, 0x6F, + 0x75, 0x20, 0x63, 0x61, 0x6E, 0x20, 0x67, 0x65, 0x74, 0x20, 0x6F, 0x6E, 0x65, 0x0A, 0x61, 0x74, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x41, 0x64, 0x6D, 0x69, 0x6E, 0x0A, 0x43, 0x65, 0x6E, 0x74, 0x65, + 0x72, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x49, 0x20, 0x64, 0x6F, 0x6E, 0x27, 0x74, 0x20, 0x68, 0x61, + 0x76, 0x65, 0x0A, 0x74, 0x69, 0x6D, 0x65, 0x2E, 0x00, 0x47, 0x6F, 0x6F, 0x64, 0x20, 0x6D, 0x6F, + 0x72, 0x6E, 0x69, 0x6E, 0x67, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, 0x47, 0x6F, 0x6F, 0x64, 0x20, 0x6D, + 0x6F, 0x72, 0x6E, 0x69, 0x6E, 0x67, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x49, 0x27, 0x76, 0x65, 0x20, + 0x73, 0x65, 0x65, 0x6E, 0x20, 0x74, 0x68, 0x61, 0x74, 0x0A, 0x67, 0x75, 0x79, 0x20, 0x62, 0x65, + 0x66, 0x6F, 0x72, 0x65, 0x20, 0x69, 0x6E, 0x0A, 0x74, 0x68, 0x65, 0x20, 0x62, 0x61, 0x72, 0x2E, + 0x00, 0x47, 0x6F, 0x6F, 0x64, 0x20, 0x6D, 0x6F, 0x72, 0x6E, 0x69, 0x6E, 0x67, 0x2E, 0x0B, 0xFF, + 0xEB, 0xEC, 0x47, 0x6F, 0x6F, 0x64, 0x20, 0x6D, 0x6F, 0x72, 0x6E, 0x69, 0x6E, 0x67, 0x2E, 0x00, + 0xFF, 0xEB, 0xEC, 0x59, 0x65, 0x73, 0x2C, 0x49, 0x20, 0x6B, 0x6E, 0x6F, 0x77, 0x20, 0x68, 0x69, + 0x6D, 0x2E, 0x0A, 0x48, 0x65, 0x27, 0x73, 0x20, 0x61, 0x20, 0x72, 0x65, 0x67, 0x75, 0x6C, 0x61, + 0x72, 0x2E, 0x00, 0x20, 0x00, 0x20, 0x00, 0x49, 0x27, 0x64, 0x20, 0x6C, 0x69, 0x6B, 0x65, 0x20, + 0x61, 0x0A, 0x77, 0x6F, 0x72, 0x6B, 0x20, 0x70, 0x65, 0x72, 0x6D, 0x69, 0x74, 0x2E, 0x0B, 0xFF, + 0xEB, 0xEC, 0x54, 0x68, 0x65, 0x72, 0x65, 0x27, 0x73, 0x20, 0x6E, 0x6F, 0x0A, 0x70, 0x72, 0x6F, + 0x62, 0x6C, 0x65, 0x6D, 0x20, 0x67, 0x65, 0x74, 0x74, 0x69, 0x6E, 0x67, 0x0A, 0x61, 0x20, 0x70, + 0x65, 0x72, 0x6D, 0x69, 0x74, 0x2E, 0x2E, 0x2E, 0x0B, 0x49, 0x20, 0x6E, 0x65, 0x65, 0x64, 0x20, + 0x79, 0x6F, 0x75, 0x72, 0x20, 0x49, 0x44, 0x0A, 0x63, 0x61, 0x72, 0x64, 0x2E, 0x00, 0xFF, 0xEB, + 0xEC, 0x48, 0x45, 0x4C, 0x50, 0x2E, 0x2E, 0x2E, 0x48, 0x45, 0x4C, 0x50, 0x2E, 0x2E, 0x2E, 0x00, + 0xFF, 0xEB, 0xEC, 0x48, 0x65, 0x6C, 0x70, 0x20, 0x6D, 0x65, 0x20, 0x79, 0x6F, 0x75, 0x6E, 0x67, + 0x0A, 0x6D, 0x61, 0x6E, 0x2E, 0x20, 0x49, 0x27, 0x76, 0x65, 0x20, 0x62, 0x65, 0x65, 0x6E, 0x0A, + 0x61, 0x74, 0x74, 0x61, 0x63, 0x6B, 0x65, 0x64, 0x20, 0x62, 0x79, 0x0A, 0x6D, 0x75, 0x74, 0x61, + 0x6E, 0x74, 0x73, 0x2E, 0x2E, 0x2E, 0x0B, 0x61, 0x6E, 0x64, 0x20, 0x49, 0x20, 0x63, 0x61, 0x6E, + 0x27, 0x74, 0x0A, 0x77, 0x61, 0x6C, 0x6B, 0x2E, 0x0B, 0x46, 0x69, 0x6E, 0x64, 0x20, 0x6D, 0x79, + 0x0A, 0x74, 0x65, 0x6C, 0x65, 0x70, 0x6F, 0x72, 0x74, 0x65, 0x72, 0x2C, 0x49, 0x0A, 0x6E, 0x65, + 0x65, 0x64, 0x20, 0x75, 0x72, 0x67, 0x65, 0x6E, 0x74, 0x20, 0x6D, 0x65, 0x64, 0x2D, 0x0A, 0x69, + 0x63, 0x61, 0x6C, 0x20, 0x61, 0x73, 0x73, 0x69, 0x73, 0x74, 0x61, 0x6E, 0x63, 0x65, 0x2E, 0x00, + 0xFF, 0xEB, 0xEC, 0x54, 0x68, 0x61, 0x6E, 0x6B, 0x73, 0x2E, 0x59, 0x6F, 0x75, 0x20, 0x6A, 0x75, + 0x73, 0x74, 0x0A, 0x73, 0x61, 0x76, 0x65, 0x64, 0x20, 0x6D, 0x79, 0x20, 0x6C, 0x69, 0x66, 0x65, + 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x54, 0x6F, 0x20, 0x67, 0x65, 0x74, 0x20, 0x74, 0x6F, 0x20, 0x4E, + 0x65, 0x77, 0x0A, 0x57, 0x61, 0x73, 0x68, 0x69, 0x6E, 0x67, 0x74, 0x6F, 0x6E, 0x2C, 0x79, 0x6F, + 0x75, 0x0A, 0x68, 0x61, 0x76, 0x65, 0x20, 0x74, 0x6F, 0x20, 0x6A, 0x75, 0x6D, 0x70, 0x0A, 0x69, + 0x6E, 0x74, 0x6F, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x68, 0x6F, 0x6C, 0x65, 0x2C, 0x0B, 0x62, + 0x75, 0x74, 0x20, 0x69, 0x66, 0x20, 0x49, 0x20, 0x77, 0x65, 0x72, 0x65, 0x0A, 0x79, 0x6F, 0x75, + 0x20, 0x49, 0x27, 0x64, 0x20, 0x75, 0x73, 0x65, 0x20, 0x61, 0x6E, 0x0A, 0x41, 0x6E, 0x74, 0x69, + 0x2D, 0x47, 0x20, 0x62, 0x65, 0x6C, 0x74, 0x2E, 0x0B, 0xFF, 0xE9, 0xEA, 0x57, 0x68, 0x65, 0x72, + 0x65, 0x20, 0x63, 0x61, 0x6E, 0x20, 0x49, 0x20, 0x66, 0x69, 0x6E, 0x64, 0x0A, 0x6F, 0x6E, 0x65, + 0x3F, 0x0B, 0xFF, 0xEB, 0xEC, 0x4E, 0x6F, 0x77, 0x2C, 0x20, 0x49, 0x20, 0x63, 0x61, 0x6E, 0x0A, + 0x73, 0x65, 0x6C, 0x6C, 0x20, 0x79, 0x6F, 0x75, 0x20, 0x6F, 0x6E, 0x65, 0x3A, 0x0A, 0x35, 0x30, + 0x30, 0x20, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x42, 0x6F, + 0x6E, 0x20, 0x76, 0x6F, 0x79, 0x61, 0x67, 0x65, 0x2C, 0x79, 0x6F, 0x75, 0x6E, 0x67, 0x0A, 0x6D, + 0x61, 0x6E, 0x2E, 0x00, 0x49, 0x20, 0x6E, 0x65, 0x65, 0x64, 0x20, 0x61, 0x20, 0x66, 0x75, 0x6C, + 0x6C, 0x79, 0x0A, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x64, 0x20, 0x6D, 0x61, 0x67, 0x6E, 0x65, + 0x74, 0x69, 0x63, 0x0A, 0x63, 0x61, 0x72, 0x74, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2E, 0x00, 0x49, + 0x27, 0x64, 0x20, 0x6C, 0x69, 0x6B, 0x65, 0x20, 0x61, 0x0A, 0x77, 0x6F, 0x72, 0x6B, 0x20, 0x70, + 0x65, 0x72, 0x6D, 0x69, 0x74, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, 0x46, 0x69, 0x72, 0x73, 0x74, 0x20, + 0x66, 0x6C, 0x6F, 0x6F, 0x72, 0x2E, 0x00, 0x41, 0x6E, 0x20, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x20, + 0x76, 0x6F, 0x69, 0x63, 0x65, 0x0A, 0x69, 0x6E, 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 0x73, + 0x20, 0x79, 0x6F, 0x75, 0x72, 0x0A, 0x74, 0x68, 0x6F, 0x75, 0x67, 0x68, 0x74, 0x73, 0x2E, 0x0B, + 0xFF, 0xEB, 0xEC, 0x54, 0x72, 0x75, 0x73, 0x74, 0x20, 0x6D, 0x65, 0x2C, 0x73, 0x6F, 0x6E, 0x2C, + 0x70, 0x75, 0x74, 0x0A, 0x74, 0x68, 0x65, 0x20, 0x61, 0x74, 0x6F, 0x6D, 0x69, 0x63, 0x0A, 0x63, + 0x68, 0x61, 0x72, 0x67, 0x65, 0x20, 0x68, 0x65, 0x72, 0x65, 0x2E, 0x2E, 0x2E, 0x0B, 0x61, 0x6E, + 0x64, 0x20, 0x66, 0x6C, 0x65, 0x65, 0x20, 0x61, 0x73, 0x0A, 0x73, 0x6F, 0x6F, 0x6E, 0x20, 0x61, + 0x73, 0x20, 0x69, 0x74, 0x0A, 0x72, 0x65, 0x61, 0x63, 0x68, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, + 0x0A, 0x70, 0x6C, 0x61, 0x6E, 0x65, 0x74, 0x27, 0x73, 0x20, 0x63, 0x6F, 0x72, 0x65, 0x2E, 0x00, + 0xFF, 0xEB, 0xEC, 0x4C, 0x65, 0x61, 0x64, 0x20, 0x6F, 0x6E, 0x2C, 0x79, 0x6F, 0x75, 0x6E, 0x67, + 0x0A, 0x6D, 0x61, 0x6E, 0x2E, 0x0B, 0x54, 0x61, 0x6B, 0x65, 0x20, 0x6D, 0x65, 0x20, 0x74, 0x6F, + 0x20, 0x74, 0x68, 0x65, 0x0A, 0x52, 0x65, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x20, 0x43, 0x65, + 0x6E, 0x74, 0x65, 0x72, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x54, 0x68, 0x61, 0x6E, 0x6B, 0x20, 0x79, + 0x6F, 0x75, 0x20, 0x66, 0x6F, 0x72, 0x0A, 0x79, 0x6F, 0x75, 0x72, 0x20, 0x68, 0x65, 0x6C, 0x70, + 0x2E, 0x2E, 0x2E, 0x0B, 0x49, 0x20, 0x61, 0x72, 0x72, 0x69, 0x76, 0x65, 0x64, 0x20, 0x73, 0x61, + 0x66, 0x65, 0x6C, 0x79, 0x0A, 0x61, 0x6E, 0x64, 0x20, 0x74, 0x68, 0x65, 0x72, 0x65, 0x27, 0x73, + 0x20, 0x6E, 0x6F, 0x0A, 0x6C, 0x6F, 0x6E, 0x67, 0x65, 0x72, 0x20, 0x61, 0x6E, 0x79, 0x0A, 0x64, + 0x61, 0x6E, 0x67, 0x65, 0x72, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x57, 0x65, 0x6C, 0x6C, 0x20, 0x74, + 0x68, 0x65, 0x6E, 0x2C, 0x68, 0x61, 0x76, 0x65, 0x0A, 0x79, 0x6F, 0x75, 0x20, 0x62, 0x72, 0x6F, + 0x75, 0x67, 0x68, 0x74, 0x20, 0x6D, 0x65, 0x0A, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x72, 0x63, + 0x65, 0x6C, 0x3F, 0x00, 0x48, 0x6F, 0x77, 0x20, 0x6D, 0x75, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, + 0x61, 0x0A, 0x74, 0x69, 0x63, 0x6B, 0x65, 0x74, 0x20, 0x74, 0x6F, 0x20, 0x45, 0x61, 0x72, 0x74, + 0x68, 0x3F, 0x0B, 0xFF, 0xEB, 0xEC, 0x35, 0x30, 0x2C, 0x30, 0x30, 0x30, 0x20, 0x63, 0x72, 0x65, + 0x64, 0x69, 0x74, 0x73, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x49, 0x20, 0x73, 0x63, 0x72, 0x61, 0x74, + 0x63, 0x68, 0x20, 0x79, 0x6F, 0x75, 0x72, 0x0A, 0x62, 0x61, 0x63, 0x6B, 0x2C, 0x79, 0x6F, 0x75, + 0x20, 0x73, 0x63, 0x72, 0x61, 0x74, 0x63, 0x68, 0x0A, 0x6D, 0x69, 0x6E, 0x65, 0x3A, 0x0B, 0x31, + 0x35, 0x30, 0x30, 0x20, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x20, 0x61, 0x6E, 0x64, 0x0A, + 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x70, 0x65, 0x72, 0x73, 0x20, 0x61, 0x72, 0x65, 0x0A, 0x79, + 0x6F, 0x75, 0x72, 0x73, 0x2E, 0x00 +}; + +const uint8 LocaleData::_stringsTableDE[] = { + 0x5A, 0x00, 0x7B, 0x00, 0x9B, 0x00, 0xB0, 0x01, 0x63, 0x02, 0x87, 0x02, 0xD3, 0x02, 0x04, 0x03, + 0x6D, 0x03, 0x86, 0x03, 0xBF, 0x03, 0x0E, 0x04, 0x5E, 0x04, 0xAD, 0x04, 0x30, 0x05, 0x60, 0x05, + 0x73, 0x05, 0xDD, 0x05, 0xEE, 0x05, 0x09, 0x06, 0xC0, 0x06, 0xBB, 0x08, 0x24, 0x09, 0x39, 0x09, + 0x87, 0x09, 0x9F, 0x09, 0xBE, 0x09, 0xEF, 0x09, 0x0E, 0x0A, 0x30, 0x0A, 0x32, 0x0A, 0x34, 0x0A, + 0x9D, 0x0A, 0xB2, 0x0A, 0x42, 0x0B, 0x66, 0x0B, 0x1F, 0x0C, 0x3B, 0x0C, 0x6C, 0x0C, 0x9D, 0x0C, + 0x39, 0x0D, 0x74, 0x0D, 0xC5, 0x0D, 0xED, 0x0D, 0x20, 0x0E, 0x44, 0x49, 0x45, 0x20, 0x53, 0x49, + 0x43, 0x48, 0x45, 0x52, 0x55, 0x4E, 0x47, 0x0A, 0x49, 0x53, 0x54, 0x0A, 0x44, 0x55, 0x52, 0x43, + 0x48, 0x47, 0x45, 0x42, 0x52, 0x41, 0x4E, 0x4E, 0x54, 0x2E, 0x00, 0x44, 0x41, 0x53, 0x20, 0x4D, + 0x5B, 0x53, 0x53, 0x54, 0x45, 0x20, 0x4A, 0x45, 0x54, 0x5A, 0x54, 0x0A, 0x46, 0x55, 0x4E, 0x4B, + 0x54, 0x49, 0x4F, 0x4E, 0x49, 0x45, 0x52, 0x45, 0x4E, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x49, 0x43, + 0x48, 0x20, 0x42, 0x49, 0x4E, 0x20, 0x4A, 0x41, 0x43, 0x4B, 0x2E, 0x0A, 0x53, 0x49, 0x45, 0x20, + 0x57, 0x4F, 0x4C, 0x4C, 0x45, 0x4E, 0x0A, 0x47, 0x45, 0x46, 0x5C, 0x4C, 0x53, 0x43, 0x48, 0x54, + 0x45, 0x0A, 0x50, 0x41, 0x50, 0x49, 0x45, 0x52, 0x45, 0x3F, 0x0B, 0xFF, 0xE9, 0xEA, 0x4A, 0x41, + 0x2C, 0x20, 0x55, 0x4E, 0x44, 0x20, 0x53, 0x4F, 0x0A, 0x53, 0x43, 0x48, 0x4E, 0x45, 0x4C, 0x4C, + 0x20, 0x57, 0x49, 0x45, 0x0A, 0x4D, 0x5D, 0x47, 0x4C, 0x49, 0x43, 0x48, 0x2E, 0x0B, 0xFF, 0xEB, + 0xEC, 0x31, 0x35, 0x30, 0x30, 0x20, 0x43, 0x52, 0x45, 0x44, 0x49, 0x54, 0x53, 0x21, 0x0B, 0xFF, + 0xE9, 0xEA, 0x31, 0x35, 0x30, 0x30, 0x3F, 0x3F, 0x3F, 0x0B, 0xFF, 0xEB, 0xEC, 0x4A, 0x41, 0x2C, + 0x20, 0x45, 0x53, 0x20, 0x49, 0x53, 0x54, 0x20, 0x45, 0x49, 0x4E, 0x0A, 0x47, 0x52, 0x4F, 0x53, + 0x53, 0x45, 0x53, 0x20, 0x52, 0x49, 0x53, 0x49, 0x4B, 0x4F, 0x0B, 0xFF, 0xE9, 0xEA, 0x41, 0x42, + 0x45, 0x52, 0x20, 0x49, 0x43, 0x48, 0x20, 0x48, 0x41, 0x42, 0x45, 0x0A, 0x4E, 0x49, 0x43, 0x48, + 0x54, 0x20, 0x47, 0x45, 0x4E, 0x55, 0x47, 0x2E, 0x2E, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, 0x47, 0x45, + 0x48, 0x45, 0x4E, 0x20, 0x53, 0x49, 0x45, 0x20, 0x5A, 0x55, 0x4D, 0x0A, 0x41, 0x52, 0x42, 0x45, + 0x49, 0x54, 0x53, 0x41, 0x4D, 0x54, 0x2C, 0x20, 0x44, 0x4F, 0x52, 0x54, 0x0A, 0x46, 0x49, 0x4E, + 0x44, 0x45, 0x4E, 0x20, 0x53, 0x49, 0x45, 0x0A, 0x41, 0x52, 0x42, 0x45, 0x49, 0x54, 0x2E, 0x0B, + 0x55, 0x4E, 0x44, 0x20, 0x4B, 0x4F, 0x4D, 0x4D, 0x45, 0x4E, 0x20, 0x53, 0x49, 0x45, 0x0A, 0x5A, + 0x55, 0x52, 0x5B, 0x43, 0x4B, 0x2C, 0x20, 0x57, 0x45, 0x4E, 0x4E, 0x20, 0x53, 0x49, 0x45, 0x0A, + 0x44, 0x41, 0x53, 0x20, 0x47, 0x45, 0x4C, 0x44, 0x20, 0x48, 0x41, 0x42, 0x45, 0x4E, 0x2E, 0x00, + 0xFF, 0xEB, 0xEC, 0x49, 0x43, 0x48, 0x20, 0x4B, 0x45, 0x4E, 0x4E, 0x45, 0x0A, 0x43, 0x59, 0x2D, + 0x42, 0x30, 0x32, 0x31, 0x2E, 0x0A, 0x53, 0x45, 0x49, 0x4E, 0x20, 0x46, 0x52, 0x45, 0x55, 0x4E, + 0x44, 0x20, 0x49, 0x53, 0x54, 0x0A, 0x42, 0x45, 0x49, 0x20, 0x44, 0x45, 0x52, 0x20, 0x50, 0x4F, + 0x4C, 0x49, 0x5A, 0x45, 0x49, 0x2E, 0x0B, 0xFF, 0xE9, 0xEA, 0x57, 0x4F, 0x20, 0x4B, 0x41, 0x4E, + 0x4E, 0x20, 0x49, 0x43, 0x48, 0x0A, 0x44, 0x45, 0x4E, 0x20, 0x46, 0x49, 0x4E, 0x44, 0x45, 0x4E, + 0x3F, 0x0B, 0xFF, 0xEB, 0xEC, 0x49, 0x4E, 0x20, 0x44, 0x45, 0x52, 0x20, 0x56, 0x45, 0x52, 0x42, + 0x4F, 0x2D, 0x0A, 0x54, 0x45, 0x4E, 0x45, 0x4E, 0x20, 0x5A, 0x4F, 0x4E, 0x45, 0x2E, 0x20, 0x45, + 0x52, 0x0A, 0x49, 0x53, 0x54, 0x20, 0x44, 0x4F, 0x52, 0x54, 0x0A, 0x41, 0x4E, 0x47, 0x45, 0x53, + 0x54, 0x45, 0x4C, 0x4C, 0x54, 0x2E, 0x0B, 0x41, 0x42, 0x45, 0x52, 0x2C, 0x20, 0x50, 0x41, 0x53, + 0x53, 0x20, 0x41, 0x55, 0x46, 0x21, 0x0A, 0x44, 0x49, 0x45, 0x53, 0x45, 0x20, 0x4C, 0x45, 0x55, + 0x54, 0x45, 0x20, 0x53, 0x49, 0x4E, 0x44, 0x0A, 0x47, 0x45, 0x46, 0x5C, 0x48, 0x52, 0x4C, 0x49, + 0x43, 0x48, 0x00, 0xFF, 0xEB, 0xEC, 0x4D, 0x45, 0x48, 0x52, 0x20, 0x57, 0x45, 0x49, 0x53, 0x53, + 0x20, 0x49, 0x43, 0x48, 0x0A, 0x4E, 0x49, 0x43, 0x48, 0x54, 0x2C, 0x20, 0x4D, 0x45, 0x49, 0x4E, + 0x0A, 0x53, 0x4F, 0x48, 0x4E, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x43, 0x59, 0x2D, 0x42, 0x4F, 0x32, + 0x31, 0x20, 0x4D, 0x5D, 0x43, 0x48, 0x54, 0x45, 0x0A, 0x45, 0x49, 0x4E, 0x20, 0x47, 0x45, 0x53, + 0x43, 0x48, 0x5C, 0x46, 0x54, 0x0A, 0x4D, 0x49, 0x54, 0x20, 0x44, 0x49, 0x52, 0x20, 0x4D, 0x41, + 0x43, 0x48, 0x45, 0x4E, 0x2E, 0x0B, 0x45, 0x52, 0x20, 0x57, 0x41, 0x52, 0x54, 0x45, 0x54, 0x20, + 0x48, 0x49, 0x4E, 0x54, 0x45, 0x52, 0x0A, 0x44, 0x45, 0x52, 0x20, 0x4B, 0x4E, 0x45, 0x49, 0x50, + 0x45, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x47, 0x45, 0x48, 0x20, 0x5A, 0x55, 0x52, 0x20, 0x4B, 0x4E, + 0x45, 0x49, 0x50, 0x45, 0x2C, 0x0A, 0x43, 0x59, 0x2D, 0x42, 0x4F, 0x32, 0x31, 0x20, 0x57, 0x41, + 0x52, 0x54, 0x45, 0x54, 0x0A, 0x44, 0x4F, 0x52, 0x54, 0x20, 0x41, 0x55, 0x46, 0x20, 0x44, 0x49, + 0x43, 0x48, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x4E, 0x49, 0x43, 0x48, 0x54, 0x20, 0x53, 0x43, 0x48, + 0x49, 0x45, 0x53, 0x53, 0x45, 0x4E, 0x2C, 0x0A, 0x49, 0x43, 0x48, 0x20, 0x42, 0x49, 0x4E, 0x20, + 0x4E, 0x49, 0x43, 0x48, 0x54, 0x0A, 0x43, 0x59, 0x2D, 0x42, 0x4F, 0x32, 0x31, 0x21, 0x0B, 0x53, + 0x45, 0x49, 0x4E, 0x20, 0x56, 0x45, 0x52, 0x53, 0x54, 0x45, 0x43, 0x4B, 0x0A, 0x49, 0x53, 0x54, + 0x20, 0x47, 0x41, 0x4E, 0x5A, 0x20, 0x55, 0x4E, 0x54, 0x45, 0x4E, 0x2E, 0x0B, 0x44, 0x45, 0x52, + 0x20, 0x50, 0x4F, 0x4C, 0x49, 0x5A, 0x49, 0x53, 0x54, 0x20, 0x48, 0x41, 0x54, 0x0A, 0x44, 0x45, + 0x4E, 0x20, 0x53, 0x43, 0x48, 0x4C, 0x5B, 0x53, 0x53, 0x45, 0x4C, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, + 0x4D, 0x45, 0x48, 0x52, 0x20, 0x57, 0x45, 0x49, 0x53, 0x53, 0x0A, 0x49, 0x43, 0x48, 0x20, 0x4E, + 0x49, 0x43, 0x48, 0x54, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x53, 0x49, 0x52, 0x2E, 0x2E, 0x2E, 0x20, + 0x4A, 0x41, 0x43, 0x4B, 0x20, 0x48, 0x41, 0x54, 0x0A, 0x45, 0x49, 0x4E, 0x20, 0x54, 0x52, 0x45, + 0x46, 0x46, 0x45, 0x4E, 0x0A, 0x42, 0x45, 0x49, 0x20, 0x44, 0x45, 0x52, 0x20, 0x4B, 0x4E, 0x45, + 0x49, 0x50, 0x45, 0x0A, 0x41, 0x52, 0x52, 0x41, 0x4E, 0x47, 0x49, 0x45, 0x52, 0x54, 0x00, 0x49, + 0x43, 0x48, 0x20, 0x4D, 0x5D, 0x43, 0x48, 0x54, 0x45, 0x20, 0x45, 0x49, 0x4E, 0x45, 0x0A, 0x41, + 0x52, 0x42, 0x45, 0x49, 0x54, 0x53, 0x45, 0x52, 0x4C, 0x41, 0x55, 0x42, 0x4E, 0x49, 0x53, 0x0B, + 0xFF, 0xEB, 0xEC, 0x4E, 0x45, 0x49, 0x4E, 0x2C, 0x20, 0x4E, 0x49, 0x43, 0x48, 0x54, 0x0A, 0x48, + 0x49, 0x45, 0x52, 0x2E, 0x20, 0x47, 0x45, 0x48, 0x45, 0x4E, 0x20, 0x53, 0x49, 0x45, 0x0A, 0x5A, + 0x55, 0x20, 0x53, 0x43, 0x48, 0x41, 0x4C, 0x54, 0x45, 0x52, 0x20, 0x43, 0x2E, 0x00, 0x49, 0x43, + 0x48, 0x20, 0x4D, 0x5D, 0x43, 0x48, 0x54, 0x45, 0x20, 0x45, 0x49, 0x4E, 0x45, 0x0A, 0x41, 0x52, + 0x42, 0x45, 0x49, 0x54, 0x53, 0x45, 0x52, 0x4C, 0x41, 0x55, 0x42, 0x4E, 0x49, 0x53, 0x0B, 0xFF, + 0xEB, 0xEC, 0x47, 0x55, 0x54, 0x2E, 0x2E, 0x2E, 0x20, 0x4F, 0x2E, 0x4B, 0x2E, 0x2C, 0x20, 0x44, + 0x45, 0x52, 0x0A, 0x43, 0x48, 0x45, 0x46, 0x20, 0x57, 0x49, 0x4C, 0x4C, 0x20, 0x53, 0x49, 0x45, + 0x0A, 0x4A, 0x45, 0x54, 0x5A, 0x54, 0x20, 0x53, 0x45, 0x48, 0x45, 0x4E, 0x2E, 0x00, 0x49, 0x43, + 0x48, 0x20, 0x4D, 0x5D, 0x43, 0x48, 0x54, 0x45, 0x20, 0x45, 0x49, 0x4E, 0x45, 0x0A, 0x41, 0x52, + 0x42, 0x45, 0x49, 0x54, 0x53, 0x45, 0x52, 0x4C, 0x41, 0x55, 0x42, 0x4E, 0x49, 0x53, 0x0B, 0xFF, + 0xEB, 0xEC, 0x4E, 0x45, 0x49, 0x4E, 0x2C, 0x20, 0x4E, 0x49, 0x43, 0x48, 0x54, 0x0A, 0x48, 0x49, + 0x45, 0x52, 0x2E, 0x20, 0x47, 0x45, 0x48, 0x45, 0x4E, 0x20, 0x53, 0x49, 0x45, 0x0A, 0x5A, 0x55, + 0x20, 0x53, 0x43, 0x48, 0x41, 0x4C, 0x54, 0x45, 0x52, 0x20, 0x42, 0x2E, 0x00, 0x49, 0x43, 0x48, + 0x20, 0x4D, 0x5D, 0x43, 0x48, 0x54, 0x45, 0x0A, 0x4A, 0x41, 0x43, 0x4B, 0x20, 0x53, 0x50, 0x52, + 0x45, 0x43, 0x48, 0x45, 0x4E, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, 0x41, 0x43, 0x48, 0x20, 0x4A, 0x41, + 0x3F, 0x20, 0x4A, 0x41, 0x43, 0x4B, 0x0A, 0x49, 0x53, 0x54, 0x20, 0x4E, 0x49, 0x43, 0x48, 0x54, + 0x20, 0x44, 0x41, 0x2E, 0x0B, 0xFF, 0xE9, 0xEA, 0x49, 0x43, 0x48, 0x20, 0x4B, 0x4F, 0x4D, 0x4D, + 0x45, 0x20, 0x56, 0x4F, 0x4E, 0x0A, 0x4D, 0x45, 0x49, 0x4E, 0x45, 0x4D, 0x20, 0x46, 0x52, 0x45, + 0x55, 0x4E, 0x44, 0x0A, 0x49, 0x41, 0x4E, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, 0x4F, 0x2E, 0x4B, 0x2E, + 0x20, 0x4A, 0x41, 0x43, 0x4B, 0x20, 0x57, 0x41, 0x52, 0x54, 0x45, 0x54, 0x0A, 0x44, 0x52, 0x41, + 0x55, 0x53, 0x53, 0x45, 0x4E, 0x20, 0x41, 0x55, 0x46, 0x0A, 0x44, 0x49, 0x43, 0x48, 0x2E, 0x00, + 0xFF, 0xEB, 0xEC, 0x4E, 0x45, 0x45, 0x2C, 0x20, 0x4D, 0x45, 0x49, 0x4E, 0x20, 0x53, 0x4F, 0x48, + 0x4E, 0x2E, 0x0A, 0x44, 0x55, 0x20, 0x42, 0x49, 0x53, 0x54, 0x20, 0x5A, 0x55, 0x20, 0x4A, 0x55, + 0x4E, 0x47, 0x0A, 0x5A, 0x55, 0x4D, 0x20, 0x54, 0x52, 0x49, 0x4E, 0x4B, 0x45, 0x4E, 0x2E, 0x00, + 0xFF, 0xEB, 0xEC, 0x50, 0x41, 0x50, 0x49, 0x45, 0x52, 0x45, 0x2C, 0x20, 0x42, 0x49, 0x54, 0x54, + 0x45, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x49, 0x43, 0x48, 0x20, 0x42, 0x49, 0x4E, 0x20, 0x44, 0x45, + 0x52, 0x0A, 0x42, 0x4F, 0x54, 0x45, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, 0x4F, 0x48, 0x20, 0x4A, 0x41, + 0x21, 0x0A, 0x44, 0x49, 0x45, 0x53, 0x45, 0x53, 0x20, 0x50, 0x41, 0x4B, 0x45, 0x54, 0x0A, 0x4D, + 0x55, 0x53, 0x53, 0x20, 0x5A, 0x55, 0x4D, 0x0A, 0x52, 0x45, 0x49, 0x53, 0x45, 0x42, 0x5B, 0x52, + 0x4F, 0x0B, 0x53, 0x45, 0x49, 0x45, 0x4E, 0x20, 0x53, 0x49, 0x45, 0x0A, 0x56, 0x4F, 0x52, 0x53, + 0x49, 0x43, 0x48, 0x54, 0x49, 0x47, 0x2C, 0x0A, 0x45, 0x53, 0x20, 0x49, 0x53, 0x54, 0x20, 0x53, + 0x45, 0x48, 0x52, 0x0A, 0x57, 0x45, 0x52, 0x54, 0x56, 0x4F, 0x4C, 0x4C, 0x00, 0x5A, 0x45, 0x49, + 0x54, 0x20, 0x41, 0x42, 0x47, 0x45, 0x4C, 0x41, 0x55, 0x46, 0x45, 0x4E, 0x2E, 0x00, 0x44, 0x49, + 0x45, 0x20, 0x4B, 0x41, 0x52, 0x54, 0x45, 0x20, 0x48, 0x41, 0x54, 0x0A, 0x45, 0x49, 0x4E, 0x45, + 0x4E, 0x20, 0x50, 0x4C, 0x41, 0x54, 0x5A, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x44, 0x41, 0x4E, 0x4B, + 0x45, 0x2C, 0x20, 0x43, 0x4F, 0x4E, 0x52, 0x41, 0x44, 0x2E, 0x0A, 0x44, 0x49, 0x45, 0x20, 0x50, + 0x4F, 0x4C, 0x49, 0x5A, 0x49, 0x53, 0x54, 0x45, 0x4E, 0x0A, 0x48, 0x5C, 0x54, 0x54, 0x45, 0x4E, + 0x20, 0x4D, 0x45, 0x49, 0x4E, 0x20, 0x56, 0x45, 0x52, 0x2D, 0x0A, 0x53, 0x54, 0x45, 0x43, 0x4B, + 0x20, 0x47, 0x45, 0x46, 0x55, 0x4E, 0x44, 0x45, 0x4E, 0x2E, 0x0B, 0x44, 0x55, 0x20, 0x45, 0x52, + 0x49, 0x4E, 0x4E, 0x45, 0x52, 0x53, 0x54, 0x0A, 0x44, 0x49, 0x43, 0x48, 0x20, 0x57, 0x4F, 0x48, + 0x4C, 0x20, 0x4E, 0x49, 0x43, 0x48, 0x54, 0x0A, 0x41, 0x4E, 0x20, 0x44, 0x45, 0x49, 0x4E, 0x45, + 0x4E, 0x20, 0x41, 0x4C, 0x54, 0x45, 0x4E, 0x0A, 0x4B, 0x55, 0x4D, 0x50, 0x45, 0x4C, 0x20, 0x49, + 0x41, 0x4E, 0x2E, 0x0B, 0x53, 0x45, 0x54, 0x5A, 0x20, 0x44, 0x49, 0x43, 0x48, 0x2C, 0x20, 0x57, + 0x49, 0x52, 0x0A, 0x42, 0x52, 0x49, 0x4E, 0x47, 0x45, 0x4E, 0x20, 0x44, 0x45, 0x49, 0x4E, 0x20, + 0x47, 0x45, 0x2D, 0x0A, 0x44, 0x5C, 0x43, 0x48, 0x54, 0x4E, 0x49, 0x53, 0x20, 0x57, 0x49, 0x45, + 0x44, 0x45, 0x52, 0x0A, 0x49, 0x4E, 0x20, 0x4F, 0x52, 0x44, 0x4E, 0x55, 0x4E, 0x47, 0x2E, 0x00, + 0x49, 0x41, 0x4E, 0x2C, 0x20, 0x57, 0x41, 0x53, 0x20, 0x4D, 0x55, 0x53, 0x53, 0x0A, 0x49, 0x43, + 0x48, 0x20, 0x4D, 0x41, 0x43, 0x48, 0x45, 0x4E, 0x2C, 0x20, 0x55, 0x4D, 0x0A, 0x5A, 0x55, 0x52, + 0x20, 0x45, 0x52, 0x44, 0x45, 0x20, 0x5A, 0x55, 0x0A, 0x4B, 0x4F, 0x4D, 0x4D, 0x45, 0x4E, 0x3F, + 0x0B, 0x44, 0x45, 0x52, 0x20, 0x50, 0x52, 0x45, 0x49, 0x53, 0x20, 0x46, 0x5B, 0x52, 0x0A, 0x44, + 0x41, 0x53, 0x20, 0x54, 0x49, 0x43, 0x4B, 0x45, 0x54, 0x20, 0x49, 0x53, 0x54, 0x0A, 0x41, 0x53, + 0x54, 0x52, 0x4F, 0x4E, 0x4F, 0x4D, 0x49, 0x53, 0x43, 0x48, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, 0x44, + 0x45, 0x52, 0x20, 0x45, 0x49, 0x4E, 0x5A, 0x49, 0x47, 0x45, 0x20, 0x57, 0x45, 0x47, 0x0A, 0x57, + 0x5C, 0x52, 0x45, 0x20, 0x44, 0x49, 0x45, 0x0A, 0x54, 0x45, 0x49, 0x4C, 0x4E, 0x41, 0x48, 0x4D, + 0x45, 0x0A, 0x41, 0x4D, 0x20, 0x54, 0x4F, 0x44, 0x45, 0x53, 0x54, 0x55, 0x52, 0x4D, 0x2E, 0x0B, + 0xFF, 0xE9, 0xEA, 0x54, 0x4F, 0x44, 0x45, 0x53, 0x54, 0x55, 0x52, 0x4D, 0x3F, 0x0B, 0xFF, 0xEB, + 0xEC, 0x44, 0x41, 0x53, 0x20, 0x49, 0x53, 0x54, 0x20, 0x45, 0x49, 0x4E, 0x45, 0x0A, 0x46, 0x45, + 0x52, 0x4E, 0x53, 0x45, 0x48, 0x53, 0x48, 0x4F, 0x57, 0x2E, 0x0A, 0x44, 0x45, 0x52, 0x20, 0x47, + 0x45, 0x57, 0x49, 0x4E, 0x4E, 0x45, 0x52, 0x20, 0x42, 0x45, 0x2D, 0x0A, 0x4B, 0x4F, 0x4D, 0x4D, + 0x54, 0x20, 0x45, 0x49, 0x4E, 0x20, 0x54, 0x49, 0x43, 0x4B, 0x45, 0x54, 0x0B, 0xFF, 0xE9, 0xEA, + 0x4B, 0x41, 0x4E, 0x4E, 0x53, 0x54, 0x20, 0x44, 0x55, 0x20, 0x4D, 0x49, 0x52, 0x0A, 0x46, 0x41, + 0x4C, 0x53, 0x43, 0x48, 0x45, 0x20, 0x50, 0x41, 0x50, 0x49, 0x45, 0x52, 0x45, 0x0A, 0x42, 0x45, + 0x53, 0x4F, 0x52, 0x47, 0x45, 0x4E, 0x3F, 0x0B, 0xFF, 0xEB, 0xEC, 0x4B, 0x45, 0x49, 0x4E, 0x20, + 0x50, 0x52, 0x4F, 0x42, 0x4C, 0x45, 0x4D, 0x2E, 0x0A, 0x47, 0x45, 0x48, 0x20, 0x5A, 0x55, 0x52, + 0x20, 0x4B, 0x4E, 0x45, 0x49, 0x50, 0x45, 0x2C, 0x0A, 0x55, 0x4E, 0x44, 0x20, 0x46, 0x52, 0x41, + 0x47, 0x0A, 0x4E, 0x41, 0x43, 0x48, 0x20, 0x4A, 0x41, 0x43, 0x4B, 0x2E, 0x0B, 0x53, 0x41, 0x47, + 0x2C, 0x20, 0x44, 0x41, 0x53, 0x53, 0x20, 0x44, 0x55, 0x20, 0x56, 0x4F, 0x4E, 0x0A, 0x4D, 0x49, + 0x52, 0x20, 0x4B, 0x4F, 0x4D, 0x4D, 0x53, 0x54, 0x2E, 0x0A, 0x41, 0x43, 0x48, 0x2E, 0x2E, 0x2E, + 0x0B, 0x2E, 0x2E, 0x49, 0x43, 0x48, 0x20, 0x48, 0x41, 0x42, 0x45, 0x20, 0x5B, 0x42, 0x52, 0x49, + 0x2D, 0x0A, 0x47, 0x45, 0x4E, 0x53, 0x20, 0x45, 0x49, 0x4E, 0x20, 0x53, 0x43, 0x48, 0x55, 0x54, + 0x5A, 0x2D, 0x0A, 0x46, 0x45, 0x4C, 0x44, 0x2C, 0x20, 0x49, 0x4E, 0x20, 0x44, 0x45, 0x49, 0x4E, + 0x45, 0x0A, 0x54, 0x41, 0x53, 0x43, 0x48, 0x45, 0x20, 0x47, 0x45, 0x53, 0x54, 0x45, 0x43, 0x4B, + 0x54, 0x2E, 0x0B, 0xFF, 0xE9, 0xEA, 0x47, 0x52, 0x4F, 0x53, 0x53, 0x41, 0x52, 0x54, 0x49, 0x47, + 0x2E, 0x0A, 0x44, 0x41, 0x4E, 0x4B, 0x45, 0x2C, 0x20, 0x49, 0x41, 0x4E, 0x2E, 0x20, 0x42, 0x49, + 0x53, 0x0A, 0x44, 0x45, 0x4D, 0x4E, 0x5C, 0x43, 0x48, 0x53, 0x54, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, + 0x49, 0x43, 0x48, 0x20, 0x4D, 0x45, 0x4C, 0x44, 0x45, 0x20, 0x4D, 0x49, 0x43, 0x48, 0x2C, 0x0A, + 0x57, 0x45, 0x4E, 0x4E, 0x20, 0x44, 0x55, 0x20, 0x41, 0x55, 0x46, 0x0A, 0x44, 0x45, 0x52, 0x20, + 0x45, 0x52, 0x44, 0x45, 0x20, 0x42, 0x49, 0x53, 0x54, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x57, 0x49, + 0x4C, 0x4C, 0x4B, 0x4F, 0x4D, 0x4D, 0x45, 0x4E, 0x20, 0x49, 0x4E, 0x0A, 0x4E, 0x45, 0x57, 0x20, + 0x57, 0x41, 0x53, 0x48, 0x49, 0x4E, 0x47, 0x54, 0x4F, 0x4E, 0x2C, 0x0A, 0x4A, 0x55, 0x4E, 0x47, + 0x45, 0x52, 0x20, 0x4D, 0x41, 0x4E, 0x4E, 0x2E, 0x0B, 0x48, 0x49, 0x45, 0x52, 0x20, 0x49, 0x53, + 0x54, 0x20, 0x45, 0x49, 0x4E, 0x0A, 0x53, 0x54, 0x41, 0x44, 0x54, 0x50, 0x4C, 0x41, 0x4E, 0x2C, + 0x0A, 0x53, 0x49, 0x45, 0x20, 0x57, 0x45, 0x52, 0x44, 0x45, 0x4E, 0x20, 0x49, 0x48, 0x4E, 0x0A, + 0x42, 0x52, 0x41, 0x55, 0x43, 0x48, 0x45, 0x4E, 0x2E, 0x0B, 0xFF, 0xE9, 0xEA, 0x44, 0x41, 0x4E, + 0x4B, 0x45, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x53, 0x43, 0x48, 0x5D, 0x4E, 0x45, 0x4E, 0x20, 0x54, + 0x41, 0x47, 0x0A, 0x4E, 0x4F, 0x43, 0x48, 0x21, 0x00, 0xFF, 0xEB, 0xEC, 0x53, 0x49, 0x45, 0x20, + 0x42, 0x52, 0x41, 0x55, 0x43, 0x48, 0x45, 0x4E, 0x0A, 0x45, 0x49, 0x4E, 0x45, 0x20, 0x41, 0x52, + 0x42, 0x45, 0x49, 0x54, 0x53, 0x2D, 0x0A, 0x45, 0x52, 0x4C, 0x41, 0x55, 0x42, 0x4E, 0x49, 0x53, + 0x2E, 0x0B, 0x53, 0x49, 0x45, 0x20, 0x42, 0x45, 0x4B, 0x4F, 0x4D, 0x4D, 0x45, 0x4E, 0x0A, 0x45, + 0x49, 0x4E, 0x45, 0x20, 0x49, 0x4E, 0x20, 0x44, 0x45, 0x52, 0x0A, 0x56, 0x45, 0x52, 0x57, 0x41, + 0x4C, 0x54, 0x55, 0x4E, 0x47, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x49, 0x43, 0x48, 0x20, 0x48, 0x41, + 0x42, 0x45, 0x20, 0x4B, 0x45, 0x49, 0x4E, 0x45, 0x0A, 0x5A, 0x45, 0x49, 0x54, 0x2E, 0x00, 0x47, + 0x55, 0x54, 0x45, 0x4E, 0x20, 0x4D, 0x4F, 0x52, 0x47, 0x45, 0x4E, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, + 0x47, 0x55, 0x54, 0x45, 0x4E, 0x20, 0x4D, 0x4F, 0x52, 0x47, 0x45, 0x4E, 0x2E, 0x00, 0xFF, 0xEB, + 0xEC, 0x49, 0x43, 0x48, 0x20, 0x53, 0x41, 0x48, 0x20, 0x44, 0x49, 0x45, 0x53, 0x45, 0x4E, 0x0A, + 0x54, 0x59, 0x50, 0x45, 0x4E, 0x20, 0x53, 0x43, 0x48, 0x4F, 0x4E, 0x20, 0x4D, 0x41, 0x4C, 0x0A, + 0x49, 0x4E, 0x20, 0x44, 0x45, 0x52, 0x20, 0x4B, 0x4E, 0x45, 0x49, 0x50, 0x45, 0x2E, 0x00, 0x47, + 0x55, 0x54, 0x45, 0x4E, 0x20, 0x4D, 0x4F, 0x52, 0x47, 0x45, 0x4E, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, + 0x47, 0x55, 0x54, 0x45, 0x4E, 0x20, 0x4D, 0x4F, 0x52, 0x47, 0x45, 0x4E, 0x2E, 0x00, 0xFF, 0xEB, + 0xEC, 0x49, 0x43, 0x48, 0x20, 0x4B, 0x45, 0x4E, 0x4E, 0x45, 0x20, 0x49, 0x48, 0x4E, 0x2E, 0x0A, + 0x49, 0x53, 0x54, 0x20, 0x53, 0x54, 0x41, 0x4D, 0x4D, 0x4B, 0x55, 0x4E, 0x44, 0x45, 0x2E, 0x00, + 0x20, 0x00, 0x20, 0x00, 0x49, 0x43, 0x48, 0x20, 0x4D, 0x5D, 0x43, 0x48, 0x54, 0x45, 0x20, 0x45, + 0x49, 0x4E, 0x45, 0x0A, 0x41, 0x52, 0x42, 0x45, 0x49, 0x54, 0x53, 0x45, 0x52, 0x4C, 0x41, 0x55, + 0x42, 0x4E, 0x49, 0x53, 0x0B, 0xFF, 0xEB, 0xEC, 0x4B, 0x45, 0x49, 0x4E, 0x20, 0x50, 0x52, 0x4F, + 0x42, 0x4C, 0x45, 0x4D, 0x2C, 0x0A, 0x45, 0x49, 0x4E, 0x45, 0x20, 0x45, 0x52, 0x4C, 0x41, 0x55, + 0x42, 0x4E, 0x49, 0x53, 0x0A, 0x5A, 0x55, 0x20, 0x42, 0x45, 0x4B, 0x4F, 0x4D, 0x4D, 0x45, 0x4E, + 0x2E, 0x2E, 0x2E, 0x0B, 0x49, 0x43, 0x48, 0x20, 0x42, 0x45, 0x4E, 0x5D, 0x54, 0x49, 0x47, 0x45, + 0x0A, 0x49, 0x48, 0x52, 0x45, 0x20, 0x4B, 0x41, 0x52, 0x54, 0x45, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, + 0x48, 0x49, 0x4C, 0x46, 0x45, 0x2E, 0x2E, 0x2E, 0x0A, 0x48, 0x49, 0x4C, 0x46, 0x45, 0x2E, 0x2E, + 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x48, 0x45, 0x4C, 0x46, 0x45, 0x4E, 0x20, 0x53, 0x49, 0x45, 0x20, + 0x4D, 0x49, 0x52, 0x2E, 0x0A, 0x49, 0x43, 0x48, 0x20, 0x57, 0x55, 0x52, 0x44, 0x45, 0x20, 0x56, + 0x4F, 0x4E, 0x0A, 0x4D, 0x55, 0x54, 0x41, 0x4E, 0x54, 0x45, 0x4E, 0x0A, 0x41, 0x4E, 0x47, 0x45, + 0x47, 0x52, 0x49, 0x46, 0x46, 0x45, 0x4E, 0x2E, 0x2E, 0x2E, 0x0B, 0x55, 0x4E, 0x44, 0x20, 0x49, + 0x43, 0x48, 0x20, 0x4B, 0x41, 0x4E, 0x4E, 0x0A, 0x4E, 0x49, 0x43, 0x48, 0x54, 0x20, 0x4C, 0x41, + 0x55, 0x46, 0x45, 0x4E, 0x2E, 0x0B, 0x48, 0x4F, 0x4C, 0x45, 0x4E, 0x20, 0x53, 0x49, 0x45, 0x20, + 0x4D, 0x45, 0x49, 0x4E, 0x45, 0x4E, 0x0A, 0x54, 0x45, 0x4C, 0x45, 0x50, 0x4F, 0x52, 0x54, 0x45, + 0x52, 0x2C, 0x20, 0x49, 0x43, 0x48, 0x0A, 0x42, 0x52, 0x41, 0x55, 0x43, 0x48, 0x45, 0x20, 0x5C, + 0x52, 0x5A, 0x54, 0x2D, 0x0A, 0x4C, 0x49, 0x43, 0x48, 0x45, 0x20, 0x48, 0x49, 0x4C, 0x46, 0x45, + 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x44, 0x41, 0x4E, 0x4B, 0x45, 0x2E, 0x20, 0x53, 0x49, 0x45, 0x20, + 0x52, 0x45, 0x54, 0x2D, 0x0A, 0x54, 0x45, 0x54, 0x45, 0x4E, 0x20, 0x4D, 0x45, 0x49, 0x4E, 0x20, + 0x4C, 0x45, 0x42, 0x45, 0x4E, 0x00, 0xFF, 0xEB, 0xEC, 0x53, 0x50, 0x52, 0x49, 0x4E, 0x47, 0x45, + 0x4E, 0x20, 0x53, 0x49, 0x45, 0x20, 0x49, 0x4E, 0x0A, 0x44, 0x49, 0x45, 0x53, 0x45, 0x53, 0x20, + 0x4C, 0x4F, 0x43, 0x48, 0x2C, 0x0B, 0x55, 0x4D, 0x20, 0x4E, 0x41, 0x43, 0x48, 0x20, 0x4E, 0x45, + 0x57, 0x0A, 0x57, 0x41, 0x53, 0x48, 0x49, 0x4E, 0x47, 0x54, 0x4F, 0x4E, 0x0A, 0x5A, 0x55, 0x20, + 0x4B, 0x4F, 0x4D, 0x4D, 0x45, 0x4E, 0x2E, 0x0B, 0x41, 0x42, 0x45, 0x52, 0x2C, 0x20, 0x49, 0x43, + 0x48, 0x20, 0x57, 0x5B, 0x52, 0x44, 0x45, 0x0A, 0x45, 0x49, 0x4E, 0x45, 0x4E, 0x20, 0x41, 0x4E, + 0x54, 0x49, 0x2D, 0x47, 0x2D, 0x0A, 0x47, 0x5B, 0x52, 0x54, 0x45, 0x4C, 0x20, 0x42, 0x45, 0x4E, + 0x55, 0x54, 0x5A, 0x45, 0x4E, 0x2E, 0x0B, 0xFF, 0xE9, 0xEA, 0x57, 0x4F, 0x20, 0x4B, 0x41, 0x4E, + 0x4E, 0x20, 0x49, 0x43, 0x48, 0x0A, 0x45, 0x49, 0x4E, 0x45, 0x4E, 0x20, 0x42, 0x45, 0x4B, 0x4F, + 0x4D, 0x4D, 0x45, 0x4E, 0x3F, 0x0B, 0xFF, 0xEB, 0xEC, 0x4E, 0x55, 0x4E, 0x2C, 0x20, 0x49, 0x43, + 0x48, 0x0A, 0x56, 0x45, 0x52, 0x4B, 0x41, 0x55, 0x46, 0x45, 0x20, 0x45, 0x49, 0x4E, 0x45, 0x4E, + 0x3A, 0x0A, 0x35, 0x30, 0x30, 0x20, 0x43, 0x52, 0x45, 0x44, 0x49, 0x54, 0x53, 0x2E, 0x00, 0xFF, + 0xEB, 0xEC, 0x47, 0x55, 0x54, 0x45, 0x20, 0x52, 0x45, 0x49, 0x53, 0x45, 0x2C, 0x0A, 0x4A, 0x55, + 0x4E, 0x47, 0x45, 0x52, 0x20, 0x4D, 0x41, 0x4E, 0x4E, 0x2E, 0x00, 0x49, 0x43, 0x48, 0x20, 0x42, + 0x52, 0x41, 0x55, 0x43, 0x48, 0x45, 0x20, 0x45, 0x49, 0x4E, 0x0A, 0x41, 0x55, 0x46, 0x47, 0x45, + 0x4C, 0x41, 0x44, 0x45, 0x4E, 0x45, 0x53, 0x20, 0x4D, 0x41, 0x2D, 0x0A, 0x47, 0x4E, 0x45, 0x54, + 0x2D, 0x43, 0x41, 0x52, 0x54, 0x52, 0x49, 0x44, 0x47, 0x45, 0x2E, 0x00, 0x49, 0x43, 0x48, 0x20, + 0x4D, 0x5D, 0x43, 0x48, 0x54, 0x45, 0x20, 0x45, 0x49, 0x4E, 0x45, 0x0A, 0x41, 0x52, 0x42, 0x45, + 0x49, 0x54, 0x53, 0x45, 0x52, 0x4C, 0x41, 0x55, 0x42, 0x4E, 0x49, 0x53, 0x0B, 0xFF, 0xEB, 0xEC, + 0x45, 0x52, 0x53, 0x54, 0x45, 0x20, 0x45, 0x54, 0x41, 0x47, 0x45, 0x2E, 0x00, 0x45, 0x49, 0x4E, + 0x45, 0x20, 0x49, 0x4E, 0x4E, 0x45, 0x52, 0x45, 0x0A, 0x53, 0x54, 0x49, 0x4D, 0x4D, 0x45, 0x0A, + 0x55, 0x4E, 0x54, 0x45, 0x52, 0x42, 0x52, 0x49, 0x43, 0x48, 0x54, 0x0A, 0x44, 0x45, 0x49, 0x4E, + 0x45, 0x20, 0x47, 0x45, 0x44, 0x41, 0x4E, 0x4B, 0x45, 0x4E, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, 0x56, + 0x45, 0x52, 0x54, 0x52, 0x41, 0x55, 0x20, 0x4D, 0x49, 0x52, 0x2C, 0x0A, 0x42, 0x52, 0x49, 0x4E, + 0x47, 0x20, 0x44, 0x49, 0x45, 0x20, 0x41, 0x54, 0x4F, 0x4D, 0x2D, 0x0A, 0x4C, 0x41, 0x44, 0x55, + 0x4E, 0x47, 0x20, 0x48, 0x49, 0x45, 0x52, 0x20, 0x41, 0x4E, 0x2E, 0x2E, 0x0B, 0x55, 0x4E, 0x44, + 0x20, 0x46, 0x4C, 0x49, 0x45, 0x48, 0x45, 0x2C, 0x20, 0x42, 0x45, 0x2D, 0x0A, 0x56, 0x4F, 0x52, + 0x20, 0x53, 0x49, 0x45, 0x20, 0x44, 0x41, 0x53, 0x20, 0x48, 0x45, 0x52, 0x5A, 0x0A, 0x44, 0x45, + 0x53, 0x20, 0x50, 0x4C, 0x41, 0x4E, 0x45, 0x54, 0x45, 0x4E, 0x0A, 0x45, 0x52, 0x52, 0x45, 0x49, + 0x43, 0x48, 0x54, 0x20, 0x48, 0x41, 0x54, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x5A, 0x55, 0x4D, 0x20, + 0x46, 0x4F, 0x52, 0x53, 0x43, 0x48, 0x55, 0x4E, 0x47, 0x53, 0x2D, 0x0A, 0x5A, 0x45, 0x4E, 0x54, + 0x52, 0x55, 0x4D, 0x2C, 0x20, 0x42, 0x49, 0x54, 0x54, 0x45, 0x2E, 0x0B, 0x4E, 0x41, 0x43, 0x48, + 0x20, 0x49, 0x48, 0x4E, 0x45, 0x4E, 0x2C, 0x0A, 0x4A, 0x55, 0x4E, 0x47, 0x45, 0x52, 0x20, 0x4D, + 0x41, 0x4E, 0x4E, 0x00, 0xFF, 0xEB, 0xEC, 0x44, 0x41, 0x4E, 0x4B, 0x45, 0x20, 0x46, 0x5B, 0x52, + 0x0A, 0x49, 0x48, 0x52, 0x45, 0x20, 0x48, 0x49, 0x4C, 0x46, 0x45, 0x0B, 0x49, 0x43, 0x48, 0x20, + 0x42, 0x49, 0x4E, 0x20, 0x53, 0x49, 0x43, 0x48, 0x45, 0x52, 0x0A, 0x41, 0x4E, 0x47, 0x45, 0x4B, + 0x4F, 0x4D, 0x4D, 0x45, 0x4E, 0x2E, 0x20, 0x45, 0x53, 0x0A, 0x42, 0x45, 0x53, 0x54, 0x45, 0x48, + 0x54, 0x20, 0x4B, 0x45, 0x49, 0x4E, 0x45, 0x0A, 0x47, 0x45, 0x46, 0x41, 0x48, 0x52, 0x20, 0x4D, + 0x45, 0x48, 0x52, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x48, 0x41, 0x42, 0x45, 0x4E, 0x20, 0x53, 0x49, + 0x45, 0x20, 0x4D, 0x49, 0x52, 0x0A, 0x44, 0x41, 0x53, 0x20, 0x50, 0x41, 0x4B, 0x45, 0x54, 0x0A, + 0x4D, 0x49, 0x54, 0x47, 0x45, 0x42, 0x52, 0x41, 0x43, 0x48, 0x54, 0x3F, 0x00, 0x57, 0x41, 0x53, + 0x20, 0x4B, 0x4F, 0x53, 0x54, 0x45, 0x54, 0x20, 0x45, 0x49, 0x4E, 0x0A, 0x54, 0x49, 0x43, 0x4B, + 0x45, 0x54, 0x20, 0x5A, 0x55, 0x52, 0x0A, 0x45, 0x52, 0x44, 0x45, 0x3F, 0x0B, 0xFF, 0xEB, 0xEC, + 0x35, 0x30, 0x2E, 0x30, 0x30, 0x30, 0x20, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x2E, 0x00, + 0xFF, 0xEB, 0xEC, 0x45, 0x49, 0x4E, 0x45, 0x20, 0x48, 0x41, 0x4E, 0x44, 0x0A, 0x57, 0x5C, 0x53, + 0x43, 0x48, 0x54, 0x0A, 0x44, 0x49, 0x45, 0x20, 0x41, 0x4E, 0x44, 0x45, 0x52, 0x45, 0x2E, 0x0B, + 0x31, 0x2E, 0x35, 0x30, 0x30, 0x20, 0x43, 0x52, 0x45, 0x44, 0x49, 0x54, 0x53, 0x0A, 0x55, 0x4E, + 0x44, 0x20, 0x44, 0x49, 0x45, 0x20, 0x50, 0x41, 0x50, 0x49, 0x45, 0x52, 0x45, 0x0A, 0x47, 0x45, + 0x48, 0x5D, 0x52, 0x45, 0x4E, 0x20, 0x44, 0x49, 0x52, 0x2E, 0x00 +}; + +const uint8 LocaleData::_stringsTableSP[] = { + 0x5A, 0x00, 0x71, 0x00, 0x8F, 0x00, 0xA7, 0x01, 0x71, 0x02, 0x8D, 0x02, 0xD8, 0x02, 0x09, 0x03, + 0x6E, 0x03, 0x84, 0x03, 0xBE, 0x03, 0x08, 0x04, 0x51, 0x04, 0x9B, 0x04, 0x18, 0x05, 0x49, 0x05, + 0x60, 0x05, 0xC3, 0x05, 0xD4, 0x05, 0xF2, 0x05, 0x8D, 0x06, 0x9B, 0x08, 0x10, 0x09, 0x2A, 0x09, + 0x89, 0x09, 0x9D, 0x09, 0xBA, 0x09, 0xE1, 0x09, 0xFE, 0x09, 0x21, 0x0A, 0x23, 0x0A, 0x25, 0x0A, + 0x8D, 0x0A, 0xA1, 0x0A, 0x2A, 0x0B, 0x51, 0x0B, 0x05, 0x0C, 0x1F, 0x0C, 0x48, 0x0C, 0x7A, 0x0C, + 0x06, 0x0D, 0x40, 0x0D, 0x89, 0x0D, 0xAD, 0x0D, 0xE8, 0x0D, 0x48, 0x41, 0x20, 0x53, 0x41, 0x4C, + 0x54, 0x41, 0x44, 0x4F, 0x0A, 0x45, 0x4C, 0x20, 0x46, 0x55, 0x53, 0x49, 0x42, 0x4C, 0x45, 0x2E, + 0x00, 0x45, 0x53, 0x54, 0x4F, 0x20, 0x44, 0x45, 0x42, 0x45, 0x52, 0x49, 0x41, 0x0A, 0x46, 0x55, + 0x4E, 0x43, 0x49, 0x4F, 0x4E, 0x41, 0x52, 0x20, 0x41, 0x48, 0x4F, 0x52, 0x41, 0x2E, 0x00, 0xFF, + 0xEB, 0xEC, 0x53, 0x4F, 0x59, 0x20, 0x4A, 0x41, 0x43, 0x4B, 0x2E, 0x40, 0x45, 0x53, 0x54, 0x41, + 0x53, 0x0A, 0x42, 0x55, 0x53, 0x43, 0x41, 0x4E, 0x44, 0x4F, 0x0A, 0x44, 0x4F, 0x43, 0x55, 0x4D, + 0x45, 0x4E, 0x54, 0x41, 0x43, 0x49, 0x4F, 0x4E, 0x0A, 0x46, 0x41, 0x4C, 0x53, 0x41, 0x3F, 0x0B, + 0xFF, 0xE9, 0xEA, 0x53, 0x49, 0x2C, 0x20, 0x59, 0x20, 0x4C, 0x4F, 0x0A, 0x4D, 0x41, 0x53, 0x20, + 0x52, 0x41, 0x50, 0x49, 0x44, 0x4F, 0x0A, 0x50, 0x4F, 0x53, 0x49, 0x42, 0x4C, 0x45, 0x2E, 0x0B, + 0xFF, 0xEB, 0xEC, 0x7B, 0x31, 0x35, 0x30, 0x30, 0x20, 0x43, 0x52, 0x45, 0x44, 0x49, 0x54, 0x4F, + 0x53, 0x21, 0x0B, 0xFF, 0xE9, 0xEA, 0x40, 0x40, 0x40, 0x31, 0x35, 0x30, 0x30, 0x3F, 0x3F, 0x3F, + 0x0B, 0xFF, 0xEB, 0xEC, 0x53, 0x49, 0x49, 0x49, 0x2C, 0x20, 0x43, 0x4F, 0x52, 0x52, 0x4F, 0x20, + 0x55, 0x4E, 0x0A, 0x47, 0x52, 0x41, 0x4E, 0x20, 0x50, 0x45, 0x4C, 0x49, 0x47, 0x52, 0x4F, 0x0A, + 0x41, 0x51, 0x55, 0x49, 0x2E, 0x0B, 0xFF, 0xE9, 0xEA, 0x50, 0x45, 0x52, 0x4F, 0x2C, 0x20, 0x59, + 0x4F, 0x20, 0x4E, 0x4F, 0x0A, 0x54, 0x45, 0x4E, 0x47, 0x4F, 0x20, 0x53, 0x55, 0x46, 0x49, 0x43, + 0x49, 0x45, 0x4E, 0x54, 0x45, 0x0B, 0xFF, 0xEB, 0xEC, 0x56, 0x45, 0x20, 0x41, 0x20, 0x4C, 0x41, + 0x20, 0x4F, 0x46, 0x49, 0x43, 0x49, 0x4E, 0x41, 0x0A, 0x44, 0x45, 0x20, 0x45, 0x4D, 0x50, 0x4C, + 0x45, 0x4F, 0x2C, 0x0A, 0x41, 0x4C, 0x4C, 0x49, 0x20, 0x45, 0x4E, 0x43, 0x4F, 0x4E, 0x54, 0x52, + 0x41, 0x52, 0x41, 0x53, 0x0A, 0x54, 0x52, 0x41, 0x42, 0x41, 0x4A, 0x4F, 0x2E, 0x0B, 0x59, 0x20, + 0x56, 0x55, 0x45, 0x4C, 0x56, 0x45, 0x20, 0x41, 0x20, 0x56, 0x45, 0x52, 0x4D, 0x45, 0x0A, 0x43, + 0x55, 0x41, 0x4E, 0x44, 0x4F, 0x20, 0x54, 0x45, 0x4E, 0x47, 0x41, 0x53, 0x0A, 0x4C, 0x41, 0x20, + 0x50, 0x41, 0x53, 0x54, 0x41, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x43, 0x4F, 0x4E, 0x4F, 0x5A, 0x43, + 0x4F, 0x20, 0x41, 0x20, 0x45, 0x53, 0x45, 0x0A, 0x54, 0x49, 0x4F, 0x2E, 0x20, 0x54, 0x49, 0x45, + 0x4E, 0x45, 0x20, 0x55, 0x4E, 0x0A, 0x41, 0x4D, 0x49, 0x47, 0x4F, 0x20, 0x45, 0x4E, 0x20, 0x4C, + 0x41, 0x0A, 0x50, 0x4F, 0x4C, 0x49, 0x43, 0x49, 0x41, 0x2E, 0x0B, 0xFF, 0xE9, 0xEA, 0x40, 0x44, + 0x4F, 0x4E, 0x44, 0x45, 0x20, 0x50, 0x55, 0x45, 0x44, 0x4F, 0x0A, 0x45, 0x4E, 0x43, 0x4F, 0x4E, + 0x54, 0x52, 0x41, 0x52, 0x20, 0x41, 0x0A, 0x45, 0x53, 0x45, 0x20, 0x41, 0x4D, 0x49, 0x47, 0x4F, + 0x3F, 0x0B, 0xFF, 0xEB, 0xEC, 0x56, 0x45, 0x20, 0x41, 0x4C, 0x20, 0x41, 0x52, 0x45, 0x41, 0x0A, + 0x52, 0x45, 0x53, 0x54, 0x52, 0x49, 0x4E, 0x47, 0x49, 0x44, 0x41, 0x20, 0x31, 0x2C, 0x0A, 0x43, + 0x52, 0x45, 0x4F, 0x20, 0x51, 0x55, 0x45, 0x20, 0x45, 0x53, 0x54, 0x41, 0x20, 0x44, 0x45, 0x0A, + 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x49, 0x4F, 0x20, 0x41, 0x4C, 0x4C, 0x49, 0x2E, 0x0B, 0x50, + 0x45, 0x52, 0x4F, 0x20, 0x54, 0x45, 0x4E, 0x20, 0x43, 0x55, 0x49, 0x44, 0x41, 0x44, 0x4F, 0x2C, + 0x0A, 0x7B, 0x45, 0x53, 0x4F, 0x53, 0x20, 0x54, 0x49, 0x4F, 0x53, 0x20, 0x53, 0x4F, 0x4E, 0x0A, + 0x55, 0x4E, 0x4F, 0x53, 0x20, 0x4D, 0x49, 0x53, 0x45, 0x52, 0x41, 0x42, 0x4C, 0x45, 0x53, 0x21, + 0x00, 0xFF, 0xEB, 0xEC, 0x59, 0x4F, 0x20, 0x4E, 0x4F, 0x20, 0x53, 0x45, 0x0A, 0x4E, 0x41, 0x44, + 0x41, 0x20, 0x4D, 0x41, 0x53, 0x2C, 0x0A, 0x48, 0x49, 0x4A, 0x4F, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, + 0x43, 0x59, 0x2D, 0x42, 0x30, 0x32, 0x31, 0x20, 0x51, 0x55, 0x49, 0x45, 0x52, 0x45, 0x0A, 0x48, + 0x41, 0x43, 0x45, 0x52, 0x20, 0x55, 0x4E, 0x20, 0x54, 0x52, 0x41, 0x54, 0x4F, 0x0A, 0x43, 0x4F, + 0x4E, 0x54, 0x49, 0x47, 0x4F, 0x2E, 0x0B, 0x45, 0x53, 0x54, 0x41, 0x52, 0x41, 0x20, 0x45, 0x53, + 0x50, 0x45, 0x52, 0x41, 0x4E, 0x44, 0x4F, 0x0A, 0x44, 0x45, 0x54, 0x52, 0x41, 0x53, 0x20, 0x44, + 0x45, 0x4C, 0x20, 0x42, 0x41, 0x52, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x56, 0x45, 0x54, 0x45, 0x20, + 0x41, 0x4C, 0x20, 0x42, 0x41, 0x52, 0x2C, 0x0A, 0x48, 0x49, 0x4A, 0x4F, 0x2C, 0x20, 0x43, 0x59, + 0x2D, 0x42, 0x30, 0x32, 0x31, 0x20, 0x54, 0x45, 0x0A, 0x45, 0x53, 0x54, 0x41, 0x20, 0x45, 0x53, + 0x50, 0x45, 0x52, 0x41, 0x4E, 0x44, 0x4F, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x7B, 0x4E, 0x4F, 0x20, + 0x44, 0x49, 0x53, 0x50, 0x41, 0x52, 0x45, 0x53, 0x2C, 0x20, 0x59, 0x4F, 0x0A, 0x4E, 0x4F, 0x20, + 0x53, 0x4F, 0x59, 0x20, 0x43, 0x59, 0x2D, 0x42, 0x30, 0x32, 0x31, 0x21, 0x0B, 0x53, 0x55, 0x20, + 0x45, 0x53, 0x43, 0x4F, 0x4E, 0x44, 0x52, 0x49, 0x4A, 0x4F, 0x0A, 0x45, 0x53, 0x54, 0x41, 0x20, + 0x41, 0x48, 0x49, 0x20, 0x41, 0x42, 0x41, 0x4A, 0x4F, 0x2E, 0x0B, 0x53, 0x55, 0x20, 0x43, 0x4F, + 0x4C, 0x45, 0x47, 0x41, 0x2C, 0x0A, 0x45, 0x4C, 0x20, 0x50, 0x4F, 0x4C, 0x49, 0x0A, 0x54, 0x49, + 0x45, 0x4E, 0x45, 0x20, 0x4C, 0x41, 0x20, 0x4C, 0x4C, 0x41, 0x56, 0x45, 0x2E, 0x00, 0xFF, 0xEB, + 0xEC, 0x59, 0x4F, 0x20, 0x4E, 0x4F, 0x20, 0x53, 0x45, 0x0A, 0x4E, 0x41, 0x44, 0x41, 0x20, 0x4D, + 0x41, 0x53, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x55, 0x4E, 0x20, 0x54, 0x49, 0x4F, 0x20, 0x4C, 0x4C, + 0x41, 0x4D, 0x41, 0x44, 0x4F, 0x0B, 0x4A, 0x41, 0x43, 0x4B, 0x20, 0x41, 0x43, 0x4F, 0x52, 0x44, + 0x4F, 0x0A, 0x52, 0x45, 0x55, 0x4E, 0x49, 0x52, 0x53, 0x45, 0x20, 0x43, 0x4F, 0x4E, 0x20, 0x55, + 0x44, 0x2E, 0x0A, 0x45, 0x4E, 0x20, 0x45, 0x4C, 0x20, 0x42, 0x41, 0x52, 0x2E, 0x00, 0x51, 0x55, + 0x45, 0x52, 0x52, 0x49, 0x41, 0x20, 0x55, 0x4E, 0x0A, 0x50, 0x45, 0x52, 0x4D, 0x49, 0x53, 0x4F, + 0x20, 0x44, 0x45, 0x0A, 0x54, 0x52, 0x41, 0x42, 0x41, 0x4A, 0x4F, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, + 0x4E, 0x4F, 0x2C, 0x20, 0x4E, 0x4F, 0x20, 0x45, 0x53, 0x20, 0x41, 0x51, 0x55, 0x49, 0x2E, 0x0A, + 0x56, 0x41, 0x59, 0x41, 0x20, 0x41, 0x20, 0x4C, 0x41, 0x0A, 0x56, 0x45, 0x4E, 0x54, 0x41, 0x4E, + 0x49, 0x4C, 0x4C, 0x41, 0x20, 0x43, 0x2E, 0x00, 0x51, 0x55, 0x45, 0x52, 0x52, 0x49, 0x41, 0x20, + 0x55, 0x4E, 0x0A, 0x50, 0x45, 0x52, 0x4D, 0x49, 0x53, 0x4F, 0x20, 0x44, 0x45, 0x0A, 0x54, 0x52, + 0x41, 0x42, 0x41, 0x4A, 0x4F, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, 0x42, 0x49, 0x45, 0x4E, 0x20, 0x2E, + 0x2E, 0x4F, 0x2E, 0x4B, 0x2E, 0x2C, 0x0A, 0x45, 0x4C, 0x20, 0x4A, 0x45, 0x46, 0x45, 0x20, 0x4C, + 0x45, 0x0A, 0x52, 0x45, 0x43, 0x49, 0x42, 0x49, 0x52, 0x41, 0x20, 0x41, 0x48, 0x4F, 0x52, 0x41, + 0x00, 0x51, 0x55, 0x45, 0x52, 0x52, 0x49, 0x41, 0x20, 0x55, 0x4E, 0x0A, 0x50, 0x45, 0x52, 0x4D, + 0x49, 0x53, 0x4F, 0x20, 0x44, 0x45, 0x0A, 0x54, 0x52, 0x41, 0x42, 0x41, 0x4A, 0x4F, 0x2E, 0x0B, + 0xFF, 0xEB, 0xEC, 0x4E, 0x4F, 0x2C, 0x20, 0x4E, 0x4F, 0x20, 0x45, 0x53, 0x20, 0x41, 0x51, 0x55, + 0x49, 0x2E, 0x0A, 0x56, 0x41, 0x59, 0x41, 0x20, 0x41, 0x20, 0x4C, 0x41, 0x0A, 0x56, 0x45, 0x4E, + 0x54, 0x41, 0x4E, 0x49, 0x4C, 0x4C, 0x41, 0x20, 0x42, 0x2E, 0x00, 0x51, 0x55, 0x49, 0x45, 0x52, + 0x4F, 0x20, 0x48, 0x41, 0x42, 0x4C, 0x41, 0x52, 0x0A, 0x43, 0x4F, 0x4E, 0x20, 0x4A, 0x41, 0x43, + 0x4B, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, 0x40, 0x41, 0x48, 0x20, 0x53, 0x49, 0x3F, 0x20, 0x4A, 0x41, + 0x43, 0x4B, 0x20, 0x4E, 0x4F, 0x0A, 0x45, 0x53, 0x54, 0x41, 0x20, 0x41, 0x51, 0x55, 0x49, 0x20, + 0x41, 0x48, 0x4F, 0x52, 0x41, 0x2E, 0x0B, 0xFF, 0xE9, 0xEA, 0x4D, 0x45, 0x20, 0x45, 0x4E, 0x56, + 0x49, 0x41, 0x0A, 0x4D, 0x49, 0x20, 0x41, 0x4D, 0x49, 0x47, 0x4F, 0x20, 0x49, 0x41, 0x4E, 0x2E, + 0x0B, 0xFF, 0xEB, 0xEC, 0x4F, 0x2E, 0x4B, 0x2E, 0x20, 0x4A, 0x41, 0x43, 0x4B, 0x20, 0x54, 0x45, + 0x0A, 0x45, 0x53, 0x54, 0x41, 0x20, 0x45, 0x53, 0x50, 0x45, 0x52, 0x41, 0x4E, 0x44, 0x4F, 0x0A, + 0x41, 0x46, 0x55, 0x45, 0x52, 0x41, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x54, 0x49, 0x52, 0x41, 0x4C, + 0x4F, 0x2C, 0x20, 0x48, 0x49, 0x4A, 0x4F, 0x2E, 0x0A, 0x45, 0x52, 0x45, 0x53, 0x20, 0x44, 0x45, + 0x4D, 0x41, 0x53, 0x49, 0x41, 0x44, 0x4F, 0x0A, 0x4A, 0x4F, 0x56, 0x45, 0x4E, 0x20, 0x50, 0x41, + 0x52, 0x41, 0x20, 0x42, 0x45, 0x42, 0x45, 0x52, 0x00, 0xFF, 0xEB, 0xEC, 0x50, 0x41, 0x50, 0x45, + 0x4C, 0x45, 0x53, 0x2C, 0x0A, 0x50, 0x4F, 0x52, 0x20, 0x46, 0x41, 0x56, 0x4F, 0x52, 0x2E, 0x00, + 0x53, 0x4F, 0x59, 0x20, 0x45, 0x4C, 0x0A, 0x4D, 0x45, 0x4E, 0x53, 0x41, 0x4A, 0x45, 0x52, 0x4F, + 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, 0x7B, 0x41, 0x48, 0x20, 0x53, 0x49, 0x21, 0x20, 0x4C, 0x4C, 0x45, + 0x56, 0x41, 0x0A, 0x45, 0x53, 0x54, 0x45, 0x20, 0x50, 0x41, 0x51, 0x55, 0x45, 0x54, 0x45, 0x20, + 0x41, 0x0A, 0x4C, 0x41, 0x20, 0x41, 0x47, 0x45, 0x4E, 0x43, 0x49, 0x41, 0x20, 0x44, 0x45, 0x0A, + 0x56, 0x49, 0x41, 0x4A, 0x45, 0x53, 0x2E, 0x0B, 0x59, 0x20, 0x54, 0x45, 0x4E, 0x20, 0x43, 0x55, + 0x49, 0x44, 0x41, 0x44, 0x4F, 0x2C, 0x0A, 0x45, 0x53, 0x20, 0x56, 0x41, 0x4C, 0x49, 0x4F, 0x53, + 0x4F, 0x2E, 0x00, 0x54, 0x49, 0x45, 0x4D, 0x50, 0x4F, 0x20, 0x43, 0x4F, 0x4E, 0x43, 0x4C, 0x55, + 0x49, 0x44, 0x4F, 0x00, 0x48, 0x41, 0x59, 0x20, 0x55, 0x4E, 0x20, 0x4C, 0x55, 0x47, 0x41, 0x52, + 0x0A, 0x50, 0x41, 0x52, 0x41, 0x20, 0x4C, 0x41, 0x20, 0x54, 0x41, 0x52, 0x4A, 0x45, 0x54, 0x41, + 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x47, 0x52, 0x41, 0x43, 0x49, 0x41, 0x53, 0x2C, 0x20, 0x43, 0x4F, + 0x4E, 0x52, 0x41, 0x44, 0x2E, 0x0A, 0x7B, 0x45, 0x53, 0x54, 0x4F, 0x53, 0x20, 0x50, 0x4F, 0x4C, + 0x49, 0x53, 0x0A, 0x48, 0x41, 0x42, 0x52, 0x49, 0x41, 0x4E, 0x20, 0x43, 0x4F, 0x4E, 0x53, 0x45, + 0x47, 0x55, 0x49, 0x44, 0x4F, 0x0A, 0x4D, 0x49, 0x20, 0x50, 0x45, 0x4C, 0x4C, 0x45, 0x4A, 0x4F, + 0x21, 0x0B, 0x42, 0x49, 0x45, 0x4E, 0x2C, 0x53, 0x55, 0x50, 0x4F, 0x4E, 0x47, 0x4F, 0x20, 0x51, + 0x55, 0x45, 0x0A, 0x4E, 0x4F, 0x20, 0x52, 0x45, 0x43, 0x55, 0x45, 0x52, 0x44, 0x41, 0x53, 0x20, + 0x41, 0x0A, 0x54, 0x55, 0x20, 0x56, 0x49, 0x45, 0x4A, 0x4F, 0x0A, 0x41, 0x4D, 0x49, 0x47, 0x4F, + 0x20, 0x49, 0x41, 0x4E, 0x2E, 0x0B, 0x53, 0x49, 0x45, 0x4E, 0x54, 0x41, 0x54, 0x45, 0x2C, 0x0A, + 0x41, 0x52, 0x52, 0x45, 0x47, 0x4C, 0x41, 0x52, 0x45, 0x4D, 0x4F, 0x53, 0x0A, 0x45, 0x53, 0x54, + 0x4F, 0x20, 0x45, 0x4E, 0x53, 0x45, 0x47, 0x55, 0x49, 0x44, 0x41, 0x2E, 0x00, 0x49, 0x41, 0x4E, + 0x2C, 0x20, 0x40, 0x51, 0x55, 0x45, 0x20, 0x54, 0x49, 0x45, 0x4E, 0x45, 0x0A, 0x55, 0x4E, 0x4F, + 0x20, 0x51, 0x55, 0x45, 0x20, 0x48, 0x41, 0x43, 0x45, 0x52, 0x20, 0x0A, 0x50, 0x41, 0x52, 0x41, + 0x20, 0x49, 0x52, 0x20, 0x41, 0x0A, 0x4C, 0x41, 0x20, 0x54, 0x49, 0x45, 0x52, 0x52, 0x41, 0x3F, + 0x0B, 0xFF, 0xEB, 0xEC, 0x45, 0x4C, 0x20, 0x50, 0x52, 0x45, 0x43, 0x49, 0x4F, 0x20, 0x44, 0x45, + 0x4C, 0x0A, 0x42, 0x49, 0x4C, 0x4C, 0x45, 0x54, 0x45, 0x20, 0x45, 0x53, 0x0A, 0x41, 0x53, 0x54, + 0x52, 0x4F, 0x4E, 0x4F, 0x4D, 0x49, 0x43, 0x4F, 0x2E, 0x0B, 0x53, 0x4F, 0x4C, 0x4F, 0x20, 0x54, + 0x45, 0x20, 0x51, 0x55, 0x45, 0x44, 0x41, 0x0A, 0x50, 0x41, 0x52, 0x54, 0x49, 0x43, 0x49, 0x50, + 0x41, 0x52, 0x20, 0x45, 0x4E, 0x20, 0x4C, 0x41, 0x0A, 0x54, 0x4F, 0x52, 0x52, 0x45, 0x20, 0x44, + 0x45, 0x20, 0x4C, 0x41, 0x0A, 0x4D, 0x55, 0x45, 0x52, 0x54, 0x45, 0x2E, 0x0B, 0xFF, 0xE9, 0xEA, + 0x40, 0x4C, 0x41, 0x20, 0x54, 0x4F, 0x52, 0x52, 0x45, 0x0A, 0x44, 0x45, 0x20, 0x4C, 0x41, 0x20, + 0x4D, 0x55, 0x45, 0x52, 0x54, 0x45, 0x3F, 0x0B, 0xFF, 0xEB, 0xEC, 0x45, 0x53, 0x20, 0x55, 0x4E, + 0x20, 0x43, 0x4F, 0x4E, 0x43, 0x55, 0x52, 0x53, 0x4F, 0x0A, 0x44, 0x45, 0x20, 0x4C, 0x41, 0x20, + 0x54, 0x45, 0x4C, 0x45, 0x2E, 0x20, 0x45, 0x4C, 0x0A, 0x47, 0x41, 0x4E, 0x41, 0x44, 0x4F, 0x52, + 0x20, 0x4F, 0x42, 0x54, 0x49, 0x45, 0x4E, 0x45, 0x0A, 0x55, 0x4E, 0x20, 0x42, 0x49, 0x4C, 0x4C, + 0x45, 0x54, 0x45, 0x2E, 0x0B, 0xFF, 0xE9, 0xEA, 0x4F, 0x2E, 0x4B, 0x2E, 0x20, 0x40, 0x50, 0x55, + 0x45, 0x44, 0x45, 0x53, 0x0A, 0x43, 0x4F, 0x4E, 0x53, 0x45, 0x47, 0x55, 0x49, 0x52, 0x4D, 0x45, + 0x0A, 0x44, 0x4F, 0x43, 0x55, 0x4D, 0x45, 0x4E, 0x54, 0x41, 0x43, 0x49, 0x4F, 0x4E, 0x0A, 0x46, + 0x41, 0x4C, 0x53, 0x41, 0x3F, 0x0B, 0xFF, 0xEB, 0xEC, 0x53, 0x49, 0x4E, 0x20, 0x50, 0x52, 0x4F, + 0x42, 0x4C, 0x45, 0x4D, 0x41, 0x53, 0x2E, 0x0A, 0x56, 0x45, 0x20, 0x41, 0x4C, 0x20, 0x42, 0x41, + 0x52, 0x20, 0x59, 0x0A, 0x50, 0x52, 0x45, 0x47, 0x55, 0x4E, 0x54, 0x41, 0x20, 0x50, 0x4F, 0x52, + 0x0A, 0x4A, 0x41, 0x43, 0x4B, 0x2E, 0x0B, 0x44, 0x49, 0x4C, 0x45, 0x20, 0x51, 0x55, 0x45, 0x20, + 0x54, 0x45, 0x0A, 0x45, 0x4E, 0x56, 0x49, 0x4F, 0x20, 0x59, 0x4F, 0x2E, 0x20, 0x41, 0x48, 0x2C, + 0x0A, 0x50, 0x4F, 0x52, 0x20, 0x43, 0x49, 0x45, 0x52, 0x54, 0x4F, 0x2E, 0x2E, 0x2E, 0x0B, 0x50, + 0x55, 0x53, 0x45, 0x20, 0x45, 0x4C, 0x20, 0x43, 0x41, 0x4D, 0x50, 0x4F, 0x20, 0x44, 0x45, 0x0A, + 0x46, 0x55, 0x45, 0x52, 0x5A, 0x41, 0x20, 0x51, 0x55, 0x45, 0x20, 0x4D, 0x45, 0x0A, 0x50, 0x45, + 0x44, 0x49, 0x53, 0x54, 0x45, 0x20, 0x45, 0x4E, 0x20, 0x54, 0x55, 0x0A, 0x42, 0x4F, 0x4C, 0x53, + 0x49, 0x4C, 0x4C, 0x4F, 0x2E, 0x0B, 0xFF, 0xE9, 0xEA, 0x43, 0x48, 0x41, 0x43, 0x48, 0x49, 0x2E, + 0x20, 0x47, 0x52, 0x41, 0x43, 0x49, 0x41, 0x53, 0x0A, 0x49, 0x41, 0x4E, 0x2E, 0x20, 0x48, 0x41, + 0x53, 0x54, 0x41, 0x20, 0x4C, 0x41, 0x0A, 0x50, 0x52, 0x4F, 0x58, 0x49, 0x4D, 0x41, 0x2E, 0x2E, + 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, 0x42, 0x55, 0x45, 0x4E, 0x41, 0x20, 0x53, 0x55, 0x45, 0x52, 0x54, + 0x45, 0x2E, 0x0A, 0x43, 0x4F, 0x4E, 0x54, 0x41, 0x43, 0x54, 0x41, 0x52, 0x45, 0x4D, 0x4F, 0x53, + 0x0A, 0x41, 0x20, 0x54, 0x55, 0x20, 0x4C, 0x4C, 0x45, 0x47, 0x41, 0x44, 0x41, 0x20, 0x41, 0x0A, + 0x4C, 0x41, 0x20, 0x54, 0x49, 0x45, 0x52, 0x52, 0x41, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x42, 0x49, + 0x45, 0x4E, 0x56, 0x45, 0x4E, 0x49, 0x44, 0x4F, 0x20, 0x41, 0x0A, 0x4E, 0x45, 0x57, 0x20, 0x57, + 0x41, 0x53, 0x48, 0x49, 0x4E, 0x47, 0x54, 0x4F, 0x4E, 0x2C, 0x0A, 0x4A, 0x4F, 0x56, 0x45, 0x4E, + 0x43, 0x49, 0x54, 0x4F, 0x2E, 0x0B, 0x41, 0x51, 0x55, 0x49, 0x20, 0x54, 0x49, 0x45, 0x4E, 0x45, + 0x53, 0x20, 0x55, 0x4E, 0x0A, 0x4D, 0x41, 0x50, 0x41, 0x20, 0x44, 0x45, 0x20, 0x4C, 0x41, 0x0A, + 0x43, 0x49, 0x55, 0x44, 0x41, 0x44, 0x20, 0x51, 0x55, 0x45, 0x20, 0x54, 0x45, 0x0A, 0x53, 0x45, + 0x52, 0x41, 0x20, 0x4D, 0x55, 0x59, 0x20, 0x55, 0x54, 0x49, 0x4C, 0x2E, 0x0B, 0xFF, 0xE9, 0xEA, + 0x4D, 0x55, 0x43, 0x48, 0x41, 0x53, 0x20, 0x47, 0x52, 0x41, 0x43, 0x49, 0x41, 0x53, 0x2E, 0x00, + 0xFF, 0xEB, 0xEC, 0x51, 0x55, 0x45, 0x20, 0x54, 0x45, 0x4E, 0x47, 0x41, 0x20, 0x55, 0x4E, 0x0A, + 0x42, 0x55, 0x45, 0x4E, 0x20, 0x44, 0x49, 0x41, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x44, 0x45, 0x42, + 0x45, 0x20, 0x54, 0x45, 0x4E, 0x45, 0x52, 0x20, 0x55, 0x4E, 0x0A, 0x50, 0x45, 0x52, 0x4D, 0x49, + 0x53, 0x4F, 0x20, 0x50, 0x41, 0x52, 0x41, 0x0A, 0x50, 0x4F, 0x44, 0x45, 0x52, 0x20, 0x54, 0x52, + 0x41, 0x42, 0x41, 0x4A, 0x41, 0x52, 0x2E, 0x0B, 0x50, 0x55, 0x45, 0x44, 0x45, 0x20, 0x43, 0x4F, + 0x4E, 0x53, 0x45, 0x47, 0x55, 0x49, 0x52, 0x0A, 0x55, 0x4E, 0x4F, 0x20, 0x45, 0x4E, 0x20, 0x45, + 0x4C, 0x20, 0x43, 0x45, 0x4E, 0x54, 0x52, 0x4F, 0x0A, 0x41, 0x44, 0x4D, 0x49, 0x4E, 0x49, 0x53, + 0x54, 0x52, 0x41, 0x54, 0x49, 0x56, 0x4F, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x4E, 0x4F, 0x20, 0x54, + 0x45, 0x4E, 0x47, 0x4F, 0x0A, 0x54, 0x49, 0x45, 0x4D, 0x50, 0x4F, 0x2E, 0x00, 0x42, 0x55, 0x45, + 0x4E, 0x4F, 0x53, 0x20, 0x44, 0x49, 0x41, 0x53, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, 0x42, 0x55, 0x45, + 0x4E, 0x4F, 0x53, 0x20, 0x44, 0x49, 0x41, 0x53, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x48, 0x45, 0x20, + 0x56, 0x49, 0x53, 0x54, 0x4F, 0x20, 0x41, 0x20, 0x45, 0x53, 0x45, 0x0A, 0x54, 0x49, 0x4F, 0x20, + 0x41, 0x4E, 0x54, 0x45, 0x53, 0x20, 0x45, 0x4E, 0x0A, 0x45, 0x4C, 0x20, 0x42, 0x41, 0x52, 0x2E, + 0x00, 0x42, 0x55, 0x45, 0x4E, 0x4F, 0x53, 0x20, 0x44, 0x49, 0x41, 0x53, 0x2E, 0x0B, 0xFF, 0xEB, + 0xEC, 0x42, 0x55, 0x45, 0x4E, 0x4F, 0x53, 0x20, 0x44, 0x49, 0x41, 0x53, 0x2E, 0x00, 0xFF, 0xEB, + 0xEC, 0x53, 0x49, 0x2C, 0x20, 0x4C, 0x45, 0x20, 0x43, 0x4F, 0x4E, 0x4F, 0x5A, 0x43, 0x4F, 0x2E, + 0x0A, 0x45, 0x53, 0x20, 0x55, 0x4E, 0x20, 0x48, 0x41, 0x42, 0x49, 0x54, 0x55, 0x41, 0x4C, 0x2E, + 0x00, 0x20, 0x00, 0x20, 0x00, 0x51, 0x55, 0x45, 0x52, 0x52, 0x49, 0x41, 0x20, 0x55, 0x4E, 0x0A, + 0x50, 0x45, 0x52, 0x4D, 0x49, 0x53, 0x4F, 0x20, 0x44, 0x45, 0x0A, 0x54, 0x52, 0x41, 0x42, 0x41, + 0x4A, 0x4F, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, 0x4E, 0x4F, 0x20, 0x48, 0x41, 0x59, 0x20, 0x50, 0x52, + 0x4F, 0x42, 0x4C, 0x45, 0x4D, 0x41, 0x2E, 0x0A, 0x50, 0x41, 0x52, 0x41, 0x20, 0x43, 0x4F, 0x4E, + 0x53, 0x45, 0x47, 0x55, 0x49, 0x52, 0x0A, 0x55, 0x4E, 0x20, 0x50, 0x45, 0x52, 0x4D, 0x49, 0x53, + 0x4F, 0x2E, 0x2E, 0x2E, 0x0B, 0x4E, 0x45, 0x43, 0x45, 0x53, 0x49, 0x54, 0x4F, 0x20, 0x53, 0x55, + 0x0A, 0x54, 0x41, 0x52, 0x4A, 0x45, 0x54, 0x41, 0x20, 0x49, 0x44, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, + 0x41, 0x59, 0x55, 0x44, 0x41, 0x2E, 0x2E, 0x2E, 0x41, 0x59, 0x55, 0x44, 0x41, 0x2E, 0x2E, 0x2E, + 0x00, 0xFF, 0xEB, 0xEC, 0x41, 0x59, 0x55, 0x44, 0x45, 0x4D, 0x45, 0x2C, 0x20, 0x4A, 0x4F, 0x56, + 0x45, 0x4E, 0x2E, 0x0A, 0x48, 0x45, 0x20, 0x53, 0x49, 0x44, 0x4F, 0x20, 0x41, 0x54, 0x41, 0x43, + 0x41, 0x44, 0x4F, 0x0A, 0x50, 0x4F, 0x52, 0x20, 0x55, 0x4E, 0x4F, 0x53, 0x20, 0x0A, 0x4D, 0x55, + 0x54, 0x41, 0x4E, 0x54, 0x45, 0x53, 0x2E, 0x2E, 0x2E, 0x0B, 0x59, 0x20, 0x4E, 0x4F, 0x20, 0x50, + 0x55, 0x45, 0x44, 0x4F, 0x0A, 0x43, 0x41, 0x4D, 0x49, 0x4E, 0x41, 0x52, 0x2E, 0x0B, 0x42, 0x55, + 0x53, 0x51, 0x55, 0x45, 0x20, 0x4D, 0x49, 0x0A, 0x54, 0x45, 0x4C, 0x45, 0x50, 0x4F, 0x52, 0x54, + 0x41, 0x44, 0x4F, 0x52, 0x2E, 0x0B, 0x4E, 0x45, 0x43, 0x45, 0x53, 0x49, 0x54, 0x4F, 0x0A, 0x41, + 0x53, 0x49, 0x53, 0x54, 0x45, 0x4E, 0x43, 0x49, 0x41, 0x0A, 0x4D, 0x45, 0x44, 0x49, 0x43, 0x41, + 0x20, 0x55, 0x52, 0x47, 0x45, 0x4E, 0x54, 0x45, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x47, 0x52, 0x41, + 0x43, 0x49, 0x41, 0x53, 0x2E, 0x41, 0x43, 0x41, 0x42, 0x41, 0x53, 0x0A, 0x44, 0x45, 0x20, 0x53, + 0x41, 0x4C, 0x56, 0x41, 0x52, 0x4D, 0x45, 0x0A, 0x4C, 0x41, 0x20, 0x56, 0x49, 0x44, 0x41, 0x2E, + 0x00, 0xFF, 0xEB, 0xEC, 0x50, 0x41, 0x52, 0x41, 0x20, 0x49, 0x52, 0x20, 0x41, 0x20, 0x4E, 0x45, + 0x57, 0x0A, 0x57, 0x41, 0x53, 0x48, 0x49, 0x4E, 0x47, 0x54, 0x4F, 0x4E, 0x2C, 0x0A, 0x54, 0x49, + 0x45, 0x4E, 0x45, 0x20, 0x51, 0x55, 0x45, 0x20, 0x53, 0x41, 0x4C, 0x54, 0x41, 0x52, 0x0A, 0x50, + 0x4F, 0x52, 0x20, 0x45, 0x53, 0x54, 0x45, 0x20, 0x41, 0x47, 0x55, 0x4A, 0x45, 0x52, 0x4F, 0x0B, + 0x50, 0x45, 0x52, 0x4F, 0x20, 0x59, 0x4F, 0x20, 0x51, 0x55, 0x45, 0x20, 0x54, 0x55, 0x0A, 0x55, + 0x53, 0x41, 0x52, 0x49, 0x41, 0x20, 0x55, 0x4E, 0x0A, 0x43, 0x49, 0x4E, 0x54, 0x55, 0x52, 0x4F, + 0x4E, 0x20, 0x41, 0x4E, 0x54, 0x49, 0x2D, 0x47, 0x2E, 0x0B, 0xFF, 0xE9, 0xEA, 0x40, 0x44, 0x4F, + 0x4E, 0x44, 0x45, 0x20, 0x50, 0x55, 0x45, 0x44, 0x4F, 0x0A, 0x45, 0x4E, 0x43, 0x4F, 0x4E, 0x54, + 0x52, 0x41, 0x52, 0x20, 0x55, 0x4E, 0x4F, 0x3F, 0x0B, 0xFF, 0xEB, 0xEC, 0x41, 0x48, 0x4F, 0x52, + 0x41, 0x2C, 0x20, 0x50, 0x55, 0x45, 0x44, 0x4F, 0x0A, 0x56, 0x45, 0x4E, 0x44, 0x45, 0x52, 0x54, + 0x45, 0x20, 0x55, 0x4E, 0x4F, 0x3A, 0x0A, 0x35, 0x30, 0x30, 0x20, 0x43, 0x52, 0x45, 0x44, 0x49, + 0x54, 0x4F, 0x53, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x42, 0x4F, 0x4E, 0x20, 0x56, 0x4F, 0x59, 0x41, + 0x47, 0x45, 0x2C, 0x0A, 0x4A, 0x4F, 0x56, 0x45, 0x4E, 0x43, 0x49, 0x54, 0x4F, 0x2E, 0x00, 0x4E, + 0x45, 0x43, 0x45, 0x53, 0x49, 0x54, 0x4F, 0x20, 0x55, 0x4E, 0x0A, 0x43, 0x41, 0x52, 0x54, 0x55, + 0x43, 0x48, 0x4F, 0x0A, 0x4D, 0x41, 0x47, 0x4E, 0x45, 0x54, 0x49, 0x43, 0x4F, 0x0A, 0x52, 0x45, + 0x43, 0x41, 0x52, 0x47, 0x41, 0x44, 0x4F, 0x00, 0x51, 0x55, 0x45, 0x52, 0x52, 0x49, 0x41, 0x20, + 0x55, 0x4E, 0x0A, 0x50, 0x45, 0x52, 0x4D, 0x49, 0x53, 0x4F, 0x20, 0x44, 0x45, 0x0A, 0x54, 0x52, + 0x41, 0x42, 0x41, 0x4A, 0x4F, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, 0x50, 0x52, 0x49, 0x4D, 0x45, 0x52, + 0x41, 0x20, 0x50, 0x4C, 0x41, 0x4E, 0x54, 0x41, 0x2E, 0x00, 0x55, 0x4E, 0x41, 0x20, 0x56, 0x4F, + 0x5A, 0x20, 0x49, 0x4E, 0x54, 0x45, 0x52, 0x49, 0x4F, 0x52, 0x0A, 0x49, 0x4E, 0x54, 0x45, 0x52, + 0x52, 0x55, 0x4D, 0x50, 0x45, 0x20, 0x54, 0x55, 0x53, 0x0A, 0x50, 0x45, 0x4E, 0x53, 0x41, 0x4D, + 0x49, 0x45, 0x4E, 0x54, 0x4F, 0x53, 0x2E, 0x0B, 0xFF, 0xEB, 0xEC, 0x43, 0x52, 0x45, 0x45, 0x4D, + 0x45, 0x2C, 0x20, 0x48, 0x49, 0x4A, 0x4F, 0x2C, 0x0A, 0x50, 0x4F, 0x4E, 0x20, 0x4C, 0x41, 0x20, + 0x43, 0x41, 0x52, 0x47, 0x41, 0x0A, 0x41, 0x54, 0x4F, 0x4D, 0x49, 0x43, 0x41, 0x20, 0x41, 0x51, + 0x55, 0x49, 0x2E, 0x2E, 0x2E, 0x0B, 0x59, 0x20, 0x48, 0x55, 0x59, 0x45, 0x20, 0x45, 0x4E, 0x20, + 0x43, 0x55, 0x41, 0x4E, 0x54, 0x4F, 0x0A, 0x41, 0x4C, 0x43, 0x41, 0x4E, 0x43, 0x45, 0x20, 0x45, + 0x4C, 0x0A, 0x4E, 0x55, 0x43, 0x4C, 0x45, 0x4F, 0x20, 0x44, 0x45, 0x4C, 0x0A, 0x50, 0x4C, 0x41, + 0x4E, 0x45, 0x54, 0x41, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x47, 0x55, 0x49, 0x41, 0x4D, 0x45, 0x2C, + 0x0A, 0x4A, 0x4F, 0x56, 0x45, 0x4E, 0x43, 0x49, 0x54, 0x4F, 0x2E, 0x0B, 0x4C, 0x4C, 0x45, 0x56, + 0x41, 0x4D, 0x45, 0x20, 0x41, 0x4C, 0x20, 0x0A, 0x43, 0x45, 0x4E, 0x54, 0x52, 0x4F, 0x20, 0x44, + 0x45, 0x0A, 0x49, 0x4E, 0x56, 0x45, 0x53, 0x54, 0x49, 0x47, 0x41, 0x43, 0x49, 0x4F, 0x4E, 0x00, + 0xFF, 0xEB, 0xEC, 0x47, 0x52, 0x41, 0x43, 0x49, 0x41, 0x53, 0x20, 0x50, 0x4F, 0x52, 0x0A, 0x54, + 0x55, 0x20, 0x41, 0x59, 0x55, 0x44, 0x41, 0x2E, 0x2E, 0x2E, 0x0B, 0x48, 0x45, 0x20, 0x4C, 0x4C, + 0x45, 0x47, 0x41, 0x44, 0x4F, 0x0A, 0x53, 0x49, 0x4E, 0x20, 0x50, 0x52, 0x4F, 0x42, 0x4C, 0x45, + 0x4D, 0x41, 0x53, 0x0A, 0x59, 0x20, 0x59, 0x41, 0x20, 0x4E, 0x4F, 0x20, 0x48, 0x41, 0x59, 0x0A, + 0x50, 0x45, 0x4C, 0x49, 0x47, 0x52, 0x4F, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x42, 0x49, 0x45, 0x4E, + 0x2C, 0x20, 0x40, 0x4D, 0x45, 0x20, 0x48, 0x41, 0x53, 0x0A, 0x54, 0x52, 0x41, 0x49, 0x44, 0x4F, + 0x20, 0x45, 0x4C, 0x0A, 0x50, 0x41, 0x51, 0x55, 0x45, 0x54, 0x45, 0x3F, 0x00, 0x40, 0x43, 0x55, + 0x41, 0x4E, 0x54, 0x4F, 0x20, 0x43, 0x55, 0x45, 0x53, 0x54, 0x41, 0x0A, 0x55, 0x4E, 0x20, 0x42, + 0x49, 0x4C, 0x4C, 0x45, 0x54, 0x45, 0x20, 0x41, 0x0A, 0x4C, 0x41, 0x20, 0x54, 0x49, 0x45, 0x52, + 0x52, 0x41, 0x3F, 0x0B, 0xFF, 0xEB, 0xEC, 0x35, 0x30, 0x2E, 0x30, 0x30, 0x30, 0x20, 0x43, 0x52, + 0x45, 0x44, 0x49, 0x54, 0x4F, 0x53, 0x2E, 0x00, 0xFF, 0xEB, 0xEC, 0x46, 0x41, 0x56, 0x4F, 0x52, + 0x2C, 0x20, 0x43, 0x4F, 0x4E, 0x0A, 0x46, 0x41, 0x56, 0x4F, 0x52, 0x20, 0x53, 0x45, 0x0A, 0x50, + 0x41, 0x47, 0x41, 0x3A, 0x0B, 0x31, 0x35, 0x30, 0x30, 0x20, 0x43, 0x52, 0x45, 0x44, 0x49, 0x54, + 0x4F, 0x53, 0x20, 0x59, 0x0A, 0x4C, 0x4F, 0x53, 0x20, 0x50, 0x41, 0x50, 0x45, 0x4C, 0x45, 0x53, + 0x0A, 0x53, 0x4F, 0x4E, 0x20, 0x54, 0x55, 0x59, 0x4F, 0x53, 0x2E, 0x00 +}; + +const char *LocaleData::_textsTableFR[] = { + "CONTINUER OU ABANDONNER ?", + "TEMPS", + "CONTINUER", + "ABANDONNER", + "TERMINEE", + "NIVEAU", + "START", + "DIFFICULTE", + "MOT DE PASSE", + "INFO", + "QUITTER", + "NIVEAU DE DIFFICULTE :", + "FACILE", + "NORMAL", + "EXPERT", + "ENTREZ LE MOT DE PASSE POUR", + "ACCEDER AU NIVEAU SOUHAITE:", + "REPRENDRE", + "ABANDONNER", + "CHARGER", + "SAUVEGARDER", + "PARTIE" +}; + +const char *LocaleData::_textsTableEN[] = { + "CONTINUE OR ABORT THIS GAME ?", + "TIME", + "CONTINUE", + "ABORT", + "COMPLETED", + "LEVEL", + "START", + "SKILL", + "PASSWORD", + "INFO", + "QUIT", + "SKILL LEVEL :", + "EASY", + "NORMAL", + "EXPERT", + "Enter password for desired", + "level :", + "RESUME GAME", + "ABORT GAME", + "LOAD GAME", + "SAVE GAME", + "SLOT" +}; + +const char *LocaleData::_textsTableDE[] = { + "WEITERSPIELEN ODER ABBRECHEN ?", + "ZEIT : ", + "WEITERSPIELEN", + "ABBRECHEN", + "FERTIG", + "LEVEL", + "START", + "SKILL", + "PASSWORD", + "INFO", + "END", + "SKILL LEVEL :", + "LEICHT", + "NORMAL", + "PROFI", + "GEBEN SIE DAS PASSWORT F[R", + "DAS GEW[NSCHTE LEVEL EIN :", + "WEITERSPIELEN", + "SPIEL ABBRECHEN", + "LADEN", + "SPEICHERN", + "SPIEL" +}; + +const char *LocaleData::_textsTableSP[] = { + "CONTINUAR O TERMINAR JUEGO ?", + "TIEMPO", + "SEGUIR", + "PARAR", + "PUNTOS", + "REANUDAR JUEGO", + "EMPEZAR", + "DIFICULTAD", + "CONTRASE}A", + "INFO", + "SALIR", + "NIVEL DE DIFICULTAD :", + "SENCILLO", + "NORMAL", + "EXPERTO", + "ESCRIBA LA CONTRASE}A", + "PARA EL NIVEL DESEADO :", + "REANUDAR JUEGO", + "PARAR JUEGO", + "CARGAR DATOS", + "GUARDAR DATOS", + "JUEGO" +}; + +const uint16 Resource::_voicesOffsetsTable[] = { + 0x0064, 0x006A, 0x0070, 0x0084, 0x0090, 0x0096, 0x009E, 0x00A4, 0x00AE, 0x00B4, + 0x00BC, 0x00C4, 0x00CC, 0x00D4, 0x00E0, 0x00E6, 0x00EC, 0x00F6, 0x00FC, 0x0102, + 0x010C, 0x0126, 0x0130, 0x0136, 0x013E, 0x0144, 0x014C, 0x0152, 0x015A, 0x0160, + 0x0166, 0x016C, 0x0176, 0x017C, 0x0186, 0x018C, 0x0198, 0x019E, 0x01A4, 0x01AC, + 0x01B6, 0x01BE, 0x01C6, 0x01CC, 0x01D4, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, + 0x0000, 0x0001, 0x0073, 0x0073, 0x0001, 0x0050, 0x00C3, 0x0008, 0x00D7, 0x007D, + 0x0078, 0x007D, 0x0087, 0x005A, 0x00E1, 0x0087, 0x0555, 0x0004, 0x00D7, 0x0069, + 0x00EB, 0x00A5, 0x0825, 0x0001, 0x008C, 0x08B1, 0x0002, 0x00CD, 0x0073, 0x09F1, + 0x0001, 0x0113, 0x0B04, 0x0003, 0x0113, 0x008C, 0x00B9, 0x0D5C, 0x0001, 0x0096, + 0x0DF2, 0x0002, 0x00AF, 0x0082, 0x0F23, 0x0002, 0x0069, 0x009B, 0x1027, 0x0002, + 0x0069, 0x00EB, 0x117B, 0x0002, 0x0069, 0x00C3, 0x12A7, 0x0004, 0x0064, 0x00AA, + 0x0078, 0x00DC, 0x1509, 0x0001, 0x00B4, 0x15BD, 0x0001, 0x0046, 0x1603, 0x0003, + 0x0050, 0x0118, 0x00A5, 0x1810, 0x0001, 0x0041, 0x1851, 0x0001, 0x0082, 0x18D3, + 0x0003, 0x0104, 0x00D7, 0x00AF, 0x1B5D, 0x000B, 0x00AA, 0x00BE, 0x0127, 0x005A, + 0x00F5, 0x00AA, 0x0104, 0x00BE, 0x00DC, 0x00B9, 0x00D7, 0x2413, 0x0003, 0x00C3, + 0x00E6, 0x003C, 0x25F8, 0x0001, 0x0069, 0x2661, 0x0002, 0x00BE, 0x00AF, 0x27CE, + 0x0001, 0x0050, 0x281E, 0x0002, 0x0041, 0x0037, 0x2896, 0x0001, 0x011D, 0x29B3, + 0x0002, 0x0041, 0x003C, 0x2A30, 0x0001, 0x00A5, 0x2AD5, 0x0001, 0x0000, 0x2AD5, + 0x0001, 0x0000, 0x2AD5, 0x0003, 0x005A, 0x00B9, 0x0073, 0x2C5B, 0x0001, 0x005F, + 0x2CBA, 0x0003, 0x00DC, 0x0064, 0x00F0, 0x2EEA, 0x0001, 0x00B9, 0x2FA3, 0x0004, + 0x0181, 0x013B, 0x005F, 0x0154, 0x3412, 0x0001, 0x00AF, 0x34C1, 0x0001, 0x00A0, + 0x3561, 0x0002, 0x0069, 0x003C, 0x3606, 0x0003, 0x0000, 0x00FA, 0x00F0, 0x37F0, + 0x0002, 0x006E, 0x00A0, 0x38FE, 0x0002, 0x0064, 0x00E6, 0x3A48, 0x0001, 0x00A5, + 0x3AED, 0x0002, 0x0078, 0x0087, 0x3BEC, 0x0002, 0x00AA, 0x00F0 +}; + +const Game::pge_OpcodeProc Game::_pge_opcodeTable[] = { + /* 0x00 */ + 0, + &Game::pge_op_isInpUp, + &Game::pge_op_isInpBackward, + &Game::pge_op_isInpDown, + /* 0x04 */ + &Game::pge_op_isInpForward, + &Game::pge_op_isInpUpMod, + &Game::pge_op_isInpBackwardMod, + &Game::pge_op_isInpDownMod, + /* 0x08 */ + &Game::pge_op_isInpForwardMod, + &Game::pge_op_isInpIdle, + &Game::pge_op_isInpNoMod, + &Game::pge_op_getCollision0u, + /* 0x0C */ + &Game::pge_op_getCollision00, + &Game::pge_op_getCollision0d, + &Game::pge_op_getCollision1u, + &Game::pge_op_getCollision10, + /* 0x10 */ + &Game::pge_op_getCollision1d, + &Game::pge_op_getCollision2u, + &Game::pge_op_getCollision20, + &Game::pge_op_getCollision2d, + /* 0x14 */ + &Game::pge_op_doesNotCollide0u, + &Game::pge_op_doesNotCollide00, + &Game::pge_op_doesNotCollide0d, + &Game::pge_op_doesNotCollide1u, + /* 0x18 */ + &Game::pge_op_doesNotCollide10, + &Game::pge_op_doesNotCollide1d, + &Game::pge_op_doesNotCollide2u, + &Game::pge_op_doesNotCollide20, + /* 0x1C */ + &Game::pge_op_doesNotCollide2d, + &Game::pge_op_collides0o0d, + &Game::pge_op_collides2o2d, + &Game::pge_op_collides0o0u, + /* 0x20 */ + &Game::pge_op_collides2o2u, + &Game::pge_op_collides2u2o, + &Game::pge_op_isInGroup, + &Game::pge_op_updateGroup0, + /* 0x24 */ + &Game::pge_op_updateGroup1, + &Game::pge_op_updateGroup2, + &Game::pge_op_updateGroup3, + &Game::pge_op_isPiegeDead, + /* 0x28 */ + &Game::pge_op_collides1u2o, + &Game::pge_op_collides1u1o, + &Game::pge_op_collides1o1u, + &Game::pge_o_unk0x2B, + /* 0x2C */ + &Game::pge_o_unk0x2C, + &Game::pge_o_unk0x2D, + &Game::pge_op_nop, + &Game::pge_op_pickupObject, + /* 0x30 */ + &Game::pge_op_addItemToInventory, + &Game::pge_op_copyPiege, + &Game::pge_op_canUseCurrentInventoryItem, + &Game::pge_op_removeItemFromInventory, + /* 0x34 */ + &Game::pge_o_unk0x34, + &Game::pge_op_isInpMod, + &Game::pge_op_setCollisionState1, + &Game::pge_op_setCollisionState0, + /* 0x38 */ + &Game::pge_op_isInGroup1, + &Game::pge_op_isInGroup2, + &Game::pge_op_isInGroup3, + &Game::pge_op_isInGroup4, + /* 0x3C */ + &Game::pge_o_unk0x3C, + &Game::pge_o_unk0x3D, + &Game::pge_op_setPiegeCounter, + &Game::pge_op_decPiegeCounter, + /* 0x40 */ + &Game::pge_o_unk0x40, + &Game::pge_op_wakeUpPiege, + &Game::pge_op_removePiege, + &Game::pge_op_removePiegeIfNotNear, + /* 0x44 */ + &Game::pge_op_loadPiegeCounter, + &Game::pge_o_unk0x45, + &Game::pge_o_unk0x46, + &Game::pge_o_unk0x47, + /* 0x48 */ + &Game::pge_o_unk0x48, + &Game::pge_o_unk0x49, + &Game::pge_o_unk0x4A, + &Game::pge_op_killPiege, + /* 0x4C */ + &Game::pge_op_isInCurrentRoom, + &Game::pge_op_isNotInCurrentRoom, + &Game::pge_op_scrollPosY, + &Game::pge_op_playDefaultDeathCutscene, + /* 0x50 */ + &Game::pge_o_unk0x50, + 0, + &Game::pge_o_unk0x52, + &Game::pge_o_unk0x53, + /* 0x54 */ + &Game::pge_op_isPiegeNear, + &Game::pge_op_setLife, + &Game::pge_op_incLife, + &Game::pge_op_setPiegeDefaultAnim, + /* 0x58 */ + &Game::pge_op_setLifeCounter, + &Game::pge_op_decLifeCounter, + &Game::pge_op_playCutscene, + &Game::pge_op_isTempVar2Set, + /* 0x5C */ + &Game::pge_op_playDeathCutscene, + &Game::pge_o_unk0x5D, + &Game::pge_o_unk0x5E, + &Game::pge_o_unk0x5F, + /* 0x60 */ + &Game::pge_op_findAndCopyPiege, + &Game::pge_op_isInRandomRange, + &Game::pge_o_unk0x62, + &Game::pge_o_unk0x63, + /* 0x64 */ + &Game::pge_o_unk0x64, + &Game::pge_op_addToCredits, + &Game::pge_op_subFromCredits, + &Game::pge_o_unk0x67, + /* 0x68 */ + &Game::pge_op_setCollisionState2, + &Game::pge_op_saveState, + &Game::pge_o_unk0x6A, + &Game::pge_op_isInGroupSlice, + /* 0x6C */ + &Game::pge_o_unk0x6C, + &Game::pge_op_isCollidingObject, + &Game::pge_o_unk0x6E, + &Game::pge_o_unk0x6F, + /* 0x70 */ + &Game::pge_o_unk0x70, + &Game::pge_o_unk0x71, + &Game::pge_o_unk0x72, + &Game::pge_o_unk0x73, + /* 0x74 */ + &Game::pge_op_collides4u, + &Game::pge_op_doesNotCollide4u, + &Game::pge_op_isBelowConrad, + &Game::pge_op_isAboveConrad, + /* 0x78 */ + &Game::pge_op_isNotFacingConrad, + &Game::pge_op_isFacingConrad, + &Game::pge_op_collides2u1u, + &Game::pge_op_displayText, + /* 0x7C */ + &Game::pge_o_unk0x7C, + &Game::pge_op_playSound, + &Game::pge_o_unk0x7E, + &Game::pge_o_unk0x7F, + /* 0x80 */ + &Game::pge_op_setPiegePosX, + &Game::pge_op_setPiegePosModX, + &Game::pge_op_changeRoom, + &Game::pge_op_hasInventoryItem, + /* 0x84 */ + &Game::pge_op_changeLevel, + &Game::pge_op_shakeScreen, + &Game::pge_o_unk0x86, + &Game::pge_op_playSoundGroup, + /* 0x88 */ + &Game::pge_op_adjustPos, + 0, + &Game::pge_op_setTempVar1, + &Game::pge_op_isTempVar1Set +}; + +const uint8 Game::_pge_modKeysTable[] = { + 0x40, 0x10, 0x20 +}; + +const uint8 Game::_protectionCodeData[] = { + 0xF9, 0x77, 0x79, 0xF9, 0xF7, 0x39, 0x79, 0x97, 0x39, 0xF9, 0x19, 0x59, 0xB9, 0x59, 0x39, 0xC9, + 0xB9, 0x19, 0xB9, 0x47, 0xB7, 0x49, 0xC9, 0xF9, 0xB9, 0x77, 0xD9, 0x07, 0x77, 0x47, 0xC9, 0x79, + 0x47, 0xF9, 0xD9, 0x19, 0x39, 0xD9, 0xB9, 0x79, 0x39, 0xD9, 0x39, 0xB9, 0x39, 0xF9, 0x19, 0x59, + 0xF9, 0xB7, 0xB9, 0x39, 0x27, 0x79, 0xB9, 0x49, 0x39, 0xD9, 0xB7, 0x07, 0xF9, 0x37, 0x99, 0x07, + 0x37, 0xD9, 0x39, 0xF9, 0xB9, 0x99, 0xB9, 0x79, 0x19, 0x59, 0xB9, 0xF9, 0x39, 0xF7, 0x39, 0x07, + 0xF9, 0x39, 0xD9, 0xD9, 0x99, 0x17, 0xD9, 0xB9, 0x77, 0xD7, 0x47, 0x77, 0x87, 0x39, 0xF9, 0x77, + 0x19, 0x59, 0xB9, 0x79, 0xB9, 0x19, 0x49, 0xD7, 0xB9, 0x99, 0x19, 0x59, 0x47, 0xF9, 0x37, 0x59, + 0x87, 0x37, 0x49, 0xC9, 0xD7, 0x77, 0xB9, 0x17, 0xD9, 0xD9, 0x17, 0x19, 0x79, 0xB7, 0xB9, 0x39, + 0x39, 0xC9, 0x39, 0x97, 0x39, 0xD9, 0x39, 0xC9, 0x39, 0xF7, 0xF9, 0x17, 0xD9, 0xC9, 0xF9, 0x99, + 0xF9, 0xB7, 0x39, 0x17, 0x37, 0x99, 0xF9, 0x97, 0x27, 0x39, 0x19, 0x99, 0x19, 0x59, 0x39, 0x79, + 0x49, 0x19, 0x39, 0x39, 0x39, 0xD9, 0xB9, 0xF9, 0x0F, 0x1F, 0xDF, 0x17, 0x19, 0xD9, 0x49, 0x49, + 0x79, 0x17, 0x39, 0xD9, 0x79, 0x19, 0x97, 0x27, 0x87, 0x67, 0xB9, 0x79, 0x19, 0x59, 0x19, 0xD9, + 0x59, 0x59, 0x79, 0x99, 0xB9, 0x19, 0x19, 0x39, 0x97, 0x99, 0x3F, 0x17, 0x17, 0x97, 0x3F, 0x39, + 0xF9, 0x99, 0xF9, 0xB7, 0x17, 0x79, 0x39, 0xC9, 0x39, 0xD9, 0x39, 0x99, 0x39, 0x17, 0x39, 0xF9, + 0xB9, 0x19, 0x19, 0x59, 0xD9, 0x19, 0xB7, 0x99, 0xC9, 0xC9, 0xD9, 0xB7, 0x19, 0x79, 0x1F, 0x7F, + 0x79, 0xD9, 0x37, 0x99, 0xF7, 0xF9, 0xB9, 0xF9, 0x39, 0xF7, 0x19, 0x59, 0xB9, 0x99, 0x39, 0x37, + 0x39, 0x39, 0xC9, 0x19, 0xC9, 0x37, 0xF9, 0xD9, 0xE7, 0x4F, 0xD9, 0xF9, 0x9F, 0x19, 0xD9, 0xD9, + 0x19, 0x79, 0x99, 0x19, 0xB9, 0x79, 0x19, 0x59, 0x39, 0xF7, 0x19, 0xB9, 0x39, 0xD9, 0x19, 0x59, + 0x99, 0x37, 0x79, 0xF9, 0x39, 0xF7, 0x39, 0x49, 0x59, 0x99, 0x59, 0xF7, 0xD9, 0x87, 0xB7, 0x39, + 0xF9, 0xB9, 0xB9, 0x19, 0x39, 0xC9, 0x39, 0xF9, 0x39, 0xF7, 0x19, 0x59, 0x39, 0x79, 0x97, 0x1F, + 0xF9, 0x77, 0x39, 0x19, 0x39, 0x99, 0x1F, 0xC9, 0x49, 0xB9, 0xD9, 0xD9, 0xF9, 0xB7, 0x49, 0xF9, + 0x39, 0xF9, 0x19, 0x59, 0x39, 0xB9, 0x39, 0x97, 0x39, 0x37, 0xB9, 0x19, 0xD9, 0x47, 0x67, 0xE7, + 0x37, 0xC9, 0x19, 0x99, 0x27, 0x39, 0x47, 0xF9, 0x87, 0x87, 0x17, 0x37, 0xD9, 0x19, 0x39, 0xC9, + 0x39, 0xF9, 0xB9, 0xF9, 0xB9, 0x49, 0x19, 0x97, 0x19, 0x59, 0x67, 0xE7, 0x47, 0xC9, 0xF9, 0x37, + 0xD9, 0x17, 0x19, 0x99, 0xC9, 0xF9, 0x79, 0x79, 0x39, 0x9F, 0xB7, 0x19, 0x39, 0x99, 0x19, 0xB9, + 0x39, 0xF9, 0xB9, 0x99, 0xB9, 0x79, 0x19, 0x59, 0xC9, 0x47, 0x79, 0x39, 0x7F, 0xFF, 0xF9, 0xB7, + 0x37, 0x79, 0x39, 0xD9, 0xB9, 0x99, 0x47, 0xD9, 0x99, 0x19, 0x39, 0x99, 0x39, 0x37, 0x39, 0x77, + 0x39, 0x77, 0x39, 0xF9, 0x19, 0x59, 0xC9, 0x79, 0xF9, 0xB7, 0x99, 0xD9, 0xC9, 0x17, 0xF9, 0x39, + 0x37, 0xE7, 0xD9, 0xF9, 0x0F, 0x77, 0xC9, 0x39, 0xB9, 0x99, 0x39, 0xF9, 0x19, 0x59, 0xB9, 0x39, + 0x39, 0xD9, 0x39, 0xF7, 0x39, 0xB7, 0x1F, 0x99, 0x19, 0xD9, 0x79, 0x77, 0x99, 0x99, 0xC9, 0x39, + 0x19, 0x99, 0x9F, 0x17, 0xD9, 0x19, 0xB9, 0x79, 0x39, 0xF9, 0xB9, 0x19, 0x19, 0x59, 0x39, 0x79, + 0x39, 0xF9, 0xD9, 0xF9, 0xC9, 0x4F, 0xBF, 0x9F, 0xB9, 0xB9, 0x17, 0x1F, 0xC9, 0x99, 0x19, 0x79, + 0x37, 0x77, 0x77, 0xD9, 0x19, 0x59, 0xB9, 0x99, 0x39, 0xD9, 0xB9, 0x39, 0x39, 0x37, 0x39, 0xC9, + 0x39, 0x3F, 0x37, 0xF9, 0x39, 0x99, 0xC9, 0xC9, 0x17, 0xB7, 0x79, 0x19, 0xC9, 0xB9, 0x7F, 0x37, + 0x39, 0x79, 0xB9, 0x19, 0x19, 0x59, 0x39, 0x39, 0x39, 0xD9, 0x39, 0xC9, 0xB9, 0x19, 0xD9, 0xD9, + 0x19, 0x39, 0x49, 0x19, 0x17, 0x37, 0x77, 0x79, 0x39, 0xD9, 0x39, 0x37, 0xF9, 0xC9, 0xF9, 0x79, + 0x39, 0xF9, 0x19, 0x59, 0x39, 0x79, 0xB9, 0xF9, 0x19, 0x59, 0xB9, 0x39, 0xC9, 0xB9, 0x79, 0x77, + 0xB7, 0x9F, 0xF7, 0x0F, 0x49, 0xF9, 0x39, 0xD9, 0xF9, 0x79, 0xB7, 0x7F, 0xC7, 0xD7, 0x49, 0x19, + 0x39, 0x97, 0x39, 0x37, 0x19, 0xF7, 0x59, 0x59, 0x79, 0xF9, 0xF7, 0x39, 0x7F, 0x49, 0x9F, 0xF9, + 0x39, 0x9F, 0x47, 0x19, 0x59, 0xF9, 0xC9, 0xC9, 0x39, 0x37, 0xF9, 0x39, 0xB9, 0x79, 0x19, 0x59, + 0x39, 0x99, 0x19, 0xB9, 0x39, 0xF9, 0xB9, 0x99, 0x79, 0x9F, 0xE7, 0xD9, 0x19, 0x79, 0x87, 0x87, + 0xC9, 0xF9, 0x39, 0x99, 0xC9, 0x39, 0x39, 0x37, 0xF7, 0x99, 0xB9, 0x79, 0x19, 0x59, 0x39, 0xD9, + 0xB9, 0x39, 0x39, 0xD9, 0x39, 0xF7, 0xC9, 0x37, 0x77, 0x79, 0x39, 0x19, 0xD9, 0x37, 0xF9, 0x77, + 0x39, 0x19, 0x1F, 0x7F, 0xC9, 0x39, 0xF9, 0x37, 0xB9, 0x79, 0x19, 0x59, 0xB9, 0x79, 0x39, 0x37, + 0xB9, 0xF9, 0xB9, 0x79, 0xF9, 0x37, 0x37, 0xD7, 0x9F, 0xF9, 0x5F, 0xE7, 0x9F, 0xC9, 0x39, 0x99, + 0x39, 0x9F, 0x9F, 0x79, 0xF9, 0x19, 0x19, 0x59, 0xB9, 0x59, 0x39, 0xD9, 0xB9, 0x19, 0x39, 0x39, + 0x39, 0xD9, 0xC9, 0x77, 0x9F, 0x07, 0x99, 0x99, 0xC9, 0x37, 0x77, 0x79, 0x39, 0x19, 0xF7, 0x39, + 0x7F, 0x49, 0x9F, 0xF9, 0x39, 0xC9, 0xB9, 0x79, 0x39, 0xF9, 0x39, 0x77, 0x39, 0xF9, 0x39, 0xF7, + 0xD7, 0x79, 0xF9, 0x39, 0x9F, 0xF7, 0x79, 0xF9, 0x0F, 0x39, 0x49, 0xB9, 0xD9, 0x77, 0x39, 0xDF, + 0x07, 0x19, 0xB9, 0x79, 0x19, 0x59, 0x39, 0xC9, 0xB9, 0x19, 0xB9, 0x19, 0x39, 0xF9, 0xD9, 0xB7, + 0x37, 0x39, 0x37, 0x19, 0x39, 0x47, 0xF9, 0x39, 0x39, 0xB7, 0x19, 0xD9, 0xE7, 0x87, 0x07, 0xB7, + 0xB9, 0x99, 0xB9, 0x59, 0x39, 0x37, 0x39, 0xF7, 0xB9, 0x99, 0x39, 0xD9, 0xD9, 0x99, 0x99, 0x79, + 0xF9, 0x39, 0x79, 0xD9, 0x19, 0x79, 0xB9, 0x87, 0xD7, 0x1F, 0x77, 0xF9, 0x79, 0xB9, 0x39, 0x19, + 0x39, 0x97, 0x39, 0xF9, 0x99, 0x79, 0xE7, 0x07, 0xA7, 0x5F, 0xD9, 0x79, 0xF9, 0x39, 0x17, 0x3F, + 0x39, 0x79, 0x5F, 0xFF, 0x27, 0xF9, 0x99, 0x99, 0x47, 0xB7, 0x37, 0x27, 0xF9, 0x79, 0x87, 0x3F, + 0x97, 0x99, 0x47, 0xB7, 0x59, 0x99, 0xB9, 0xD9, 0xC9, 0x49, 0xB7, 0x39, 0x37, 0xD9, 0xF9, 0xB7, + 0x37, 0x37, 0x39, 0xF9 +}; + +const uint8 Game::_protectionPal[] = { + 0x00, 0x00, 0x00, 0x42, 0x00, 0x63, 0x00, 0x00, 0x0F, 0xFF, 0x0F, 0xF0, 0x07, 0x77, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +const char *Menu::_passwords[8][3] = { + { "JAGUAR", "BANTHA", "TOHOLD" }, + { "COMBEL", "SHIVA", "PICOLO" }, + { "ANTIC", "KASYYK", "FUGU" }, + { "NOLAN", "SARLAC", "CAPSUL" }, + { "ARTHUR", "MAENOC", "ZZZAP" }, + { "SHIRYU", "SULUST", "MANIAC" }, + { "RENDER", "NEPTUN", "NO WAY" }, + { "BELUGA", "BELUGA", "BELUGA" } +}; + +const uint8 Video::_conradPal1[] = { + 0x00, 0x00, 0xCC, 0x0C, 0x8F, 0x08, 0x7E, 0x07, 0x6C, 0x06, 0x5B, 0x05, 0x4A, 0x04, 0x63, 0x09, + 0x52, 0x07, 0x41, 0x06, 0x30, 0x06, 0x76, 0x0C, 0x14, 0x09, 0x25, 0x0B, 0x88, 0x08, 0xFF, 0x0F +}; + +const uint8 Video::_conradPal2[] = { + 0x00, 0x00, 0x7C, 0x0B, 0x04, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x02, 0x01, 0x01, 0x26, 0x0A, + 0x14, 0x08, 0x03, 0x06, 0x02, 0x04, 0x43, 0x09, 0x02, 0x06, 0x02, 0x07, 0x6A, 0x0A, 0xFF, 0x0F +}; + +const uint8 Video::_textPal[] = { + 0x00, 0x00, 0x11, 0x01, 0x22, 0x02, 0xEF, 0x0E, 0x00, 0x0F, 0xF0, 0x0F, 0xA0, 0x0E, 0xB0, 0x0F, + 0xA0, 0x0E, 0xA0, 0x0E, 0xAA, 0x0A, 0xF0, 0x00, 0xCC, 0x0C, 0xDF, 0x0D, 0xEE, 0x0E, 0xEE, 0x0E +}; + +const uint8 Video::_palSlot0xF[] = { + 0x00, 0x00, 0x00, 0x1F, 0x17, 0x2B, 0x2B, 0x1F, 0x37, 0x37, 0x2B, 0x47, 0x43, 0x37, 0x53, 0x4F, + 0x43, 0x63, 0x5F, 0x53, 0x6F, 0x6F, 0x63, 0x7F, 0x7F, 0x73, 0x8B, 0x8F, 0x87, 0x9B, 0x9F, 0x97, + 0xA7, 0xAF, 0xA7, 0xB3, 0xBF, 0xBB, 0xBF, 0xCF, 0xCF, 0xCF, 0x00, 0x33, 0x00, 0x17, 0x0F, 0x1F +}; + +const int8 ModPlayer::_sineWaveTable[] = { + 0, 24, 49, 74, 97, 120, -115, -95, -76, -59, -44, -32, -21, -12, -6, -3, + -1, -3, -6, -12, -21, -32, -44, -59, -76, -95, -115, 120, 97, 74, 49, 24, + 0, -24, -49, -74, -97, -120, 115, 95, 76, 59, 44, 32, 21, 12, 6, 3, + 1, 3, 6, 12, 21, 32, 44, 59, 76, 95, 115, -120, -97, -74, -49, -24 +}; + +const uint16 ModPlayer::_periodTable[] = { + 856, 808, 762, 720, 678, 640, 604, 570, 538, 508, 480, 453, // C-1 to B-1 Finetune 0 + 428, 404, 381, 360, 339, 320, 302, 285, 269, 254, 240, 226, // C-2 to B-2 Finetune 0 + 214, 202, 190, 180, 170, 160, 151, 143, 135, 127, 120, 113, // C-3 to B-3 Finetune 0 + 850, 802, 757, 715, 674, 637, 601, 567, 535, 505, 477, 450, // C-1 to B-1 Finetune +1 + 425, 401, 379, 357, 337, 318, 300, 284, 268, 253, 239, 225, // C-2 to B-2 Finetune +1 + 213, 201, 189, 179, 169, 159, 150, 142, 134, 126, 119, 113, // C-3 to B-3 Finetune +1 + 844, 796, 752, 709, 670, 632, 597, 563, 532, 502, 474, 447, // C-1 to B-1 Finetune +2 + 422, 398, 376, 355, 335, 316, 298, 282, 266, 251, 237, 224, // C-2 to B-2 Finetune +2 + 211, 199, 188, 177, 167, 158, 149, 141, 133, 125, 118, 112, // C-3 to B-3 Finetune +2 + 838, 791, 746, 704, 665, 628, 592, 559, 528, 498, 470, 444, // C-1 to B-1 Finetune +3 + 419, 395, 373, 352, 332, 314, 296, 280, 264, 249, 235, 222, // C-2 to B-2 Finetune +3 + 209, 198, 187, 176, 166, 157, 148, 140, 132, 125, 118, 111, // C-3 to B-3 Finetune +3 + 832, 785, 741, 699, 660, 623, 588, 555, 524, 495, 467, 441, // C-1 to B-1 Finetune +4 + 416, 392, 370, 350, 330, 312, 294, 278, 262, 247, 233, 220, // C-2 to B-2 Finetune +4 + 208, 196, 185, 175, 165, 156, 147, 139, 131, 124, 117, 110, // C-3 to B-3 Finetune +4 + 826, 779, 736, 694, 655, 619, 584, 551, 520, 491, 463, 437, // C-1 to B-1 Finetune +5 + 413, 390, 368, 347, 328, 309, 292, 276, 260, 245, 232, 219, // C-2 to B-2 Finetune +5 + 206, 195, 184, 174, 164, 155, 146, 138, 130, 123, 116, 109, // C-3 to B-3 Finetune +5 + 820, 774, 730, 689, 651, 614, 580, 547, 516, 487, 460, 434, // C-1 to B-1 Finetune +6 + 410, 387, 365, 345, 325, 307, 290, 274, 258, 244, 230, 217, // C-2 to B-2 Finetune +6 + 205, 193, 183, 172, 163, 154, 145, 137, 129, 122, 115, 109, // C-3 to B-3 Finetune +6 + 814, 768, 725, 684, 646, 610, 575, 543, 513, 484, 457, 431, // C-1 to B-1 Finetune +7 + 407, 384, 363, 342, 323, 305, 288, 272, 256, 242, 228, 216, // C-2 to B-2 Finetune +7 + 204, 192, 181, 171, 161, 152, 144, 136, 128, 121, 114, 108, // C-3 to B-3 Finetune +7 + 907, 856, 808, 762, 720, 678, 640, 604, 570, 538, 504, 480, // C-1 to B-1 Finetune -8 + 453, 428, 404, 381, 360, 339, 320, 302, 285, 269, 254, 240, // C-2 to B-2 Finetune -8 + 226, 214, 202, 190, 180, 170, 160, 151, 143, 135, 127, 120, // C-3 to B-3 Finetune -8 + 900, 850, 802, 757, 715, 675, 636, 601, 567, 535, 505, 477, // C-1 to B-1 Finetune -7 + 450, 425, 401, 379, 357, 337, 318, 300, 284, 268, 253, 238, // C-2 to B-2 Finetune -7 + 225, 212, 200, 189, 179, 169, 159, 150, 142, 134, 126, 119, // C-3 to B-3 Finetune -7 + 894, 844, 796, 752, 709, 670, 632, 597, 563, 532, 502, 474, // C-1 to B-1 Finetune -6 + 447, 422, 398, 376, 355, 335, 316, 298, 282, 266, 251, 237, // C-2 to B-2 Finetune -6 + 223, 211, 199, 188, 177, 167, 158, 149, 141, 133, 125, 118, // C-3 to B-3 Finetune -6 + 887, 838, 791, 746, 704, 665, 628, 592, 559, 528, 498, 470, // C-1 to B-1 Finetune -5 + 444, 419, 395, 373, 352, 332, 314, 296, 280, 264, 249, 235, // C-2 to B-2 Finetune -5 + 222, 209, 198, 187, 176, 166, 157, 148, 140, 132, 125, 118, // C-3 to B-3 Finetune -5 + 881, 832, 785, 741, 699, 660, 623, 588, 555, 524, 494, 467, // C-1 to B-1 Finetune -4 + 441, 416, 392, 370, 350, 330, 312, 294, 278, 262, 247, 233, // C-2 to B-2 Finetune -4 + 220, 208, 196, 185, 175, 165, 156, 147, 139, 131, 123, 117, // C-3 to B-3 Finetune -4 + 875, 826, 779, 736, 694, 655, 619, 584, 551, 520, 491, 463, // C-1 to B-1 Finetune -3 + 437, 413, 390, 368, 347, 338, 309, 292, 276, 260, 245, 232, // C-2 to B-2 Finetune -3 + 219, 206, 195, 184, 174, 164, 155, 146, 138, 130, 123, 116, // C-3 to B-3 Finetune -3 + 868, 820, 774, 730, 689, 651, 614, 580, 547, 516, 487, 460, // C-1 to B-1 Finetune -2 + 434, 410, 387, 365, 345, 325, 307, 290, 274, 258, 244, 230, // C-2 to B-2 Finetune -2 + 217, 205, 193, 183, 172, 163, 154, 145, 137, 129, 122, 115, // C-3 to B-3 Finetune -2 + 862, 814, 768, 725, 684, 646, 610, 575, 543, 513, 484, 457, // C-1 to B-1 Finetune -1 + 431, 407, 384, 363, 342, 323, 305, 288, 272, 256, 242, 228, // C-2 to B-2 Finetune -1 + 216, 203, 192, 181, 171, 161, 152, 144, 136, 128, 121, 114 // C-3 to B-3 Finetune -1 +}; + +const char *ModPlayer::_modulesFiles[][2] = { + { "intro", "mod.flashback-introb" }, // introl3 + { "options", "mod.flashback-options2" }, // option3 + { "journal", "mod.flashback-options1" }, // journal3 + { "ceinture", "mod.flashback-ceinturea" }, // chute3 + { "desinteg", "mod.flashback-desintegr" }, // desinte3 + { "reunion", "mod.flashback-reunion" }, // capture3 + { "voyage", "mod.flashback-voyage" }, // voyage3 + { "level4", "mod.flashback-teleporta" }, // telepor3 + { "planetexplo", "mod.flashback-teleport2" }, // planexp3 + { "fin", "mod.flashback-fin" }, // end31 + { "ascenseur", "mod.flashback-ascenseur" }, // lift3 + { "logo", "mod.flashback-logo" }, // present3 + { "game_over", "mod.flashback-game_over" }, // gameove3 + { "holocube", "mod.flashback-holocube" }, // holo3 + { "memoire", "mod.flashback-memoire" }, // memory3 + { "chute", "mod.flashback-chute" }, // chutevi3 + { "debut", "mod.flashback-jungle" }, // reveil3 + { "missions", "mod.flashback-missionca" }, // misvali3 + { "taxi", "mod.flashback-taxi" }, // taxi3 + { "donneobj", "mod.flashback-donneobjt" }, // donner3 + { "missions2", "mod.flashback-fin2" } // mission3 +// { 0, 0, }, // objet3 +// { 0, 0, }, // recharg3 +// { 0, 0, }, // generat3 +// { 0, 0, }, // pont3 +// { 0, 0, } // rechage3 +}; + +const int ModPlayer::_modulesFilesCount = ARRAYSIZE(_modulesFiles); + +const uint8 SfxPlayer::_musicData68[] = { + 0x00, 0x1B, 0x00, 0x07, 0x00, 0x0C, 0x00, 0x18, 0xFF, 0xF4, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, + 0x02, 0x01, 0x04, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x0A, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0F, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x0D, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x04, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0F, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x14, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x16, 0x04, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0F, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x04, 0x0F +}; + +const uint8 SfxPlayer::_musicData70[] = { + 0x00, 0x12, 0x00, 0x07, 0x00, 0x0C, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x02, 0x01, 0x00, 0x00, 0x01, 0x0D, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x01, 0x11, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x03, 0x16, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00 +}; + +const uint8 SfxPlayer::_musicData72[] = { + 0x00, 0x4F, 0x00, 0x06, 0x00, 0x0C, 0x00, 0x18, 0x00, 0x24, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x05, 0x02, 0x01, 0x04, 0x1B, 0x01, 0x08, 0x00, 0x00, 0x04, 0x1D, 0x01, 0x05, + 0x02, 0x01, 0x04, 0x1B, 0x01, 0x0A, 0x02, 0x01, 0x04, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x04, 0x1B, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x1D, 0x01, 0x0A, 0x02, 0x01, 0x04, 0x1B, 0x01, 0x0D, 0x00, 0x00, + 0x04, 0x1D, 0x01, 0x0A, 0x02, 0x01, 0x04, 0x1B, 0x01, 0x0F, 0x02, 0x01, 0x04, 0x1D, 0x00, 0x00, + 0x00, 0x00, 0x04, 0x1B, 0x01, 0x0A, 0x00, 0x00, 0x04, 0x1D, 0x01, 0x11, 0x02, 0x01, 0x04, 0x1B, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x1D, 0x01, 0x10, 0x02, 0x01, 0x04, 0x1B, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x04, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x04, 0x1D, 0x00, 0x00, + 0x00, 0x00, 0x04, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x04, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x04, 0x1B, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x04, 0x1B, 0x01, 0x10, 0x03, 0x01, + 0x04, 0x1D, 0x01, 0x0F, 0x03, 0x01, 0x04, 0x1B, 0x01, 0x0D, 0x02, 0x01, 0x04, 0x1D, 0x01, 0x0F, + 0x03, 0x01, 0x04, 0x1B, 0x01, 0x0D, 0x02, 0x01, 0x04, 0x1D, 0x01, 0x0A, 0x03, 0x01, 0x04, 0x1B, + 0x01, 0x08, 0x03, 0x01, 0x04, 0x1D, 0x01, 0x08, 0x02, 0x01, 0x04, 0x1B, 0x01, 0x0A, 0x00, 0x00, + 0x04, 0x1D, 0x01, 0x08, 0x00, 0x00, 0x04, 0x1B, 0x01, 0x0A, 0x00, 0x00, 0x04, 0x1D, 0x00, 0x00, + 0x03, 0x01, 0x04, 0x1B, 0x01, 0x0A, 0x00, 0x00, 0x04, 0x1D, 0x01, 0x08, 0x00, 0x00, 0x04, 0x1B, + 0x01, 0x0A, 0x02, 0x01, 0x04, 0x1D, 0x01, 0x08, 0x00, 0x00, 0x04, 0x1B, 0x01, 0x0A, 0x02, 0x01, + 0x04, 0x1D, 0x00, 0x00, 0x02, 0x01, 0x04, 0x1B, 0x01, 0x0A, 0x00, 0x00, 0x04, 0x1D, 0x01, 0x08, + 0x03, 0x01, 0x04, 0x1B, 0x01, 0x0A, 0x00, 0x00, 0x04, 0x1D, 0x01, 0x0D, 0x00, 0x00, 0x04, 0x1B, + 0x01, 0x0F, 0x00, 0x00, 0x04, 0x1D, 0x01, 0x08, 0x02, 0x01, 0x04, 0x1B, 0x01, 0x0A, 0x00, 0x00, + 0x04, 0x1D, 0x01, 0x08, 0x00, 0x00, 0x04, 0x1B, 0x01, 0x0A, 0x00, 0x00, 0x04, 0x1D, 0x00, 0x00, + 0x03, 0x01, 0x04, 0x1B, 0x01, 0x0A, 0x00, 0x00, 0x04, 0x1D, 0x01, 0x08, 0x00, 0x00, 0x04, 0x1B, + 0x01, 0x0A, 0x02, 0x01, 0x04, 0x1D, 0x01, 0x08, 0x00, 0x00, 0x04, 0x1B, 0x01, 0x0A, 0x02, 0x01, + 0x04, 0x1D, 0x00, 0x00, 0x02, 0x01, 0x04, 0x1B, 0x01, 0x0A, 0x00, 0x00, 0x04, 0x1D, 0x01, 0x08, + 0x03, 0x01, 0x04, 0x1B, 0x01, 0x03, 0x00, 0x00, 0x04, 0x1D, 0x01, 0x05, 0x00, 0x00, 0x04, 0x1B, + 0x01, 0x08, 0x00, 0x00, 0x04, 0x1D, 0x01, 0x08, 0x02, 0x01, 0x04, 0x1B, 0x01, 0x0A, 0x00, 0x00, + 0x04, 0x1D, 0x01, 0x08, 0x00, 0x00, 0x04, 0x1B, 0x01, 0x0A, 0x00, 0x00, 0x04, 0x1D, 0x00, 0x00, + 0x03, 0x01, 0x04, 0x1B, 0x01, 0x0A, 0x00, 0x00, 0x04, 0x1D, 0x01, 0x08, 0x00, 0x00, 0x04, 0x1B, + 0x01, 0x0A, 0x02, 0x01, 0x04, 0x1D, 0x01, 0x08, 0x00, 0x00, 0x04, 0x1B, 0x01, 0x0A, 0x02, 0x01, + 0x04, 0x1D, 0x00, 0x00, 0x02, 0x01, 0x04, 0x1B, 0x01, 0x0A, 0x00, 0x00, 0x04, 0x1D, 0x01, 0x08, + 0x03, 0x01, 0x04, 0x1B, 0x01, 0x0A, 0x03, 0x01, 0x04, 0x1D, 0x01, 0x0D, 0x03, 0x01, 0x04, 0x1B, + 0x01, 0x0F, 0x03, 0x01, 0x04, 0x1D, 0x01, 0x0A, 0x02, 0x01, 0x04, 0x1B +}; + +const uint8 SfxPlayer::_musicData73[] = { + 0x00, 0x41, 0x00, 0x06, 0x00, 0x0C, 0x00, 0x18, 0x00, 0x0C, 0xFF, 0xF4, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x08, 0x02, 0x01, 0x04, 0x0A, 0x01, 0x0A, 0x00, 0x00, 0x04, 0x11, 0x01, 0x08, + 0x03, 0x01, 0x04, 0x12, 0x01, 0x0A, 0x02, 0x01, 0x04, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x04, 0x11, + 0x01, 0x0A, 0x02, 0x01, 0x04, 0x12, 0x00, 0x00, 0x03, 0x01, 0x04, 0x0A, 0x01, 0x05, 0x00, 0x00, + 0x04, 0x11, 0x01, 0x08, 0x02, 0x01, 0x04, 0x0A, 0x01, 0x0A, 0x00, 0x00, 0x04, 0x11, 0x01, 0x08, + 0x03, 0x01, 0x04, 0x12, 0x01, 0x0A, 0x02, 0x01, 0x04, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x04, 0x11, + 0x01, 0x0A, 0x02, 0x01, 0x04, 0x12, 0x00, 0x00, 0x03, 0x01, 0x04, 0x0A, 0x01, 0x05, 0x00, 0x00, + 0x04, 0x11, 0x01, 0x08, 0x02, 0x01, 0x04, 0x0A, 0x01, 0x0A, 0x00, 0x00, 0x04, 0x11, 0x01, 0x08, + 0x03, 0x01, 0x04, 0x12, 0x01, 0x0A, 0x02, 0x01, 0x04, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x04, 0x11, + 0x01, 0x0A, 0x02, 0x01, 0x04, 0x12, 0x00, 0x00, 0x03, 0x01, 0x04, 0x0A, 0x01, 0x0D, 0x00, 0x00, + 0x04, 0x11, 0x00, 0x00, 0x02, 0x01, 0x04, 0x0A, 0x01, 0x0F, 0x02, 0x01, 0x04, 0x11, 0x01, 0x0C, + 0x03, 0x01, 0x04, 0x12, 0x01, 0x0D, 0x02, 0x01, 0x04, 0x0A, 0x01, 0x0A, 0x00, 0x00, 0x04, 0x11, + 0x01, 0x05, 0x02, 0x01, 0x04, 0x12, 0x01, 0x08, 0x03, 0x01, 0x04, 0x0A, 0x01, 0x0D, 0x00, 0x00, + 0x04, 0x11, 0x01, 0x08, 0x02, 0x01, 0x04, 0x0A, 0x01, 0x0A, 0x00, 0x00, 0x04, 0x11, 0x01, 0x08, + 0x03, 0x01, 0x04, 0x12, 0x01, 0x0A, 0x02, 0x01, 0x04, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x04, 0x11, + 0x01, 0x0A, 0x02, 0x01, 0x04, 0x12, 0x00, 0x00, 0x03, 0x01, 0x04, 0x0A, 0x01, 0x05, 0x00, 0x00, + 0x04, 0x11, 0x01, 0x08, 0x02, 0x01, 0x04, 0x0A, 0x01, 0x0A, 0x00, 0x00, 0x04, 0x11, 0x01, 0x08, + 0x03, 0x01, 0x04, 0x12, 0x01, 0x0A, 0x02, 0x01, 0x04, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x04, 0x11, + 0x01, 0x0A, 0x02, 0x01, 0x04, 0x12, 0x00, 0x00, 0x03, 0x01, 0x04, 0x0A, 0x01, 0x05, 0x00, 0x00, + 0x04, 0x11, 0x01, 0x08, 0x02, 0x01, 0x04, 0x0A, 0x01, 0x0A, 0x00, 0x00, 0x04, 0x11, 0x01, 0x08, + 0x03, 0x01, 0x04, 0x12, 0x01, 0x0A, 0x02, 0x01, 0x04, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x04, 0x11, + 0x01, 0x0A, 0x02, 0x01, 0x04, 0x12, 0x00, 0x00, 0x03, 0x01, 0x04, 0x0A, 0x01, 0x0D, 0x00, 0x00, + 0x04, 0x11, 0x00, 0x00, 0x02, 0x01, 0x04, 0x0A, 0x01, 0x0F, 0x02, 0x01, 0x04, 0x11, 0x01, 0x0C, + 0x03, 0x01, 0x04, 0x12, 0x01, 0x0D, 0x02, 0x01, 0x04, 0x0A, 0x01, 0x0A, 0x00, 0x00, 0x04, 0x11, + 0x01, 0x05, 0x02, 0x01, 0x04, 0x12, 0x01, 0x08, 0x03, 0x01, 0x04, 0x0A, 0x01, 0x0D, 0x03, 0x01, + 0x04, 0x11, 0x01, 0x0A, 0x02, 0x01, 0x04, 0x0A +}; + +const uint8 SfxPlayer::_musicData74[] = { + 0x00, 0x41, 0x00, 0x07, 0x00, 0x0C, 0x00, 0x18, 0x00, 0x24, 0x00, 0x0C, 0x00, 0x24, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x08, 0x02, 0x01, 0x00, 0x00, 0x01, 0x08, 0x05, 0x27, 0x00, 0x00, 0x01, 0x08, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x05, 0x27, 0x00, 0x00, 0x01, 0x08, 0x02, 0x01, 0x00, 0x00, + 0x01, 0x08, 0x05, 0x27, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x05, 0x27, + 0x00, 0x00, 0x01, 0x08, 0x02, 0x01, 0x00, 0x00, 0x01, 0x08, 0x05, 0x27, 0x00, 0x00, 0x01, 0x08, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x05, 0x27, 0x00, 0x00, 0x01, 0x0B, 0x02, 0x01, 0x00, 0x00, + 0x01, 0x08, 0x05, 0x27, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0B, 0x05, 0x27, + 0x00, 0x00, 0x01, 0x08, 0x02, 0x01, 0x00, 0x00, 0x01, 0x08, 0x05, 0x27, 0x04, 0x08, 0x01, 0x08, + 0x03, 0x01, 0x00, 0x00, 0x01, 0x08, 0x05, 0x27, 0x00, 0x00, 0x01, 0x08, 0x02, 0x01, 0x04, 0x08, + 0x01, 0x08, 0x05, 0x27, 0x00, 0x00, 0x01, 0x08, 0x03, 0x01, 0x00, 0x00, 0x01, 0x08, 0x05, 0x27, + 0x04, 0x08, 0x01, 0x06, 0x02, 0x01, 0x00, 0x00, 0x01, 0x08, 0x05, 0x27, 0x00, 0x00, 0x01, 0x08, + 0x03, 0x01, 0x00, 0x00, 0x01, 0x08, 0x05, 0x27, 0x00, 0x00, 0x01, 0x0B, 0x02, 0x01, 0x00, 0x00, + 0x01, 0x08, 0x05, 0x27, 0x00, 0x00, 0x01, 0x08, 0x03, 0x01, 0x00, 0x00, 0x01, 0x0B, 0x05, 0x27, + 0x00, 0x00, 0x01, 0x08, 0x02, 0x01, 0x00, 0x00, 0x01, 0x08, 0x05, 0x27, 0x04, 0x08, 0x01, 0x08, + 0x03, 0x01, 0x00, 0x00, 0x01, 0x08, 0x05, 0x27, 0x00, 0x00, 0x01, 0x08, 0x02, 0x01, 0x04, 0x08, + 0x01, 0x08, 0x05, 0x27, 0x00, 0x00, 0x01, 0x08, 0x03, 0x01, 0x00, 0x00, 0x01, 0x08, 0x05, 0x27, + 0x04, 0x08, 0x01, 0x06, 0x02, 0x01, 0x00, 0x00, 0x01, 0x08, 0x05, 0x27, 0x00, 0x00, 0x01, 0x08, + 0x03, 0x01, 0x00, 0x00, 0x01, 0x08, 0x05, 0x27, 0x00, 0x00, 0x01, 0x0B, 0x02, 0x01, 0x00, 0x00, + 0x01, 0x08, 0x05, 0x27, 0x00, 0x00, 0x01, 0x08, 0x03, 0x01, 0x00, 0x00, 0x01, 0x0B, 0x05, 0x27, + 0x00, 0x00, 0x01, 0x08, 0x02, 0x01, 0x00, 0x00, 0x01, 0x08, 0x05, 0x27, 0x04, 0x08, 0x01, 0x08, + 0x03, 0x01, 0x00, 0x00, 0x01, 0x08, 0x05, 0x27, 0x00, 0x00, 0x01, 0x08, 0x02, 0x01, 0x04, 0x08, + 0x01, 0x08, 0x05, 0x27, 0x00, 0x00, 0x01, 0x08, 0x03, 0x01, 0x00, 0x00, 0x01, 0x08, 0x05, 0x27, + 0x04, 0x08, 0x01, 0x06, 0x02, 0x01, 0x00, 0x00, 0x01, 0x08, 0x05, 0x27, 0x00, 0x00, 0x01, 0x08, + 0x03, 0x01, 0x00, 0x00, 0x01, 0x08, 0x05, 0x27, 0x00, 0x00, 0x01, 0x08, 0x02, 0x01, 0x00, 0x00, + 0x01, 0x08, 0x05, 0x27, 0x00, 0x00, 0x01, 0x0B, 0x03, 0x01, 0x00, 0x00, 0x01, 0x0D, 0x05, 0x27, + 0x00, 0x00, 0x01, 0x08, 0x02, 0x01, 0x00, 0x00 +}; + +const uint8 SfxPlayer::_musicData75[] = { + 0x00, 0x41, 0x00, 0x05, 0x00, 0x0C, 0x00, 0x24, 0x00, 0x24, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x08, 0x02, 0x01, 0x04, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, + 0x05, 0x27, 0x04, 0x14, 0x01, 0x08, 0x05, 0x27, 0x00, 0x00, 0x01, 0x08, 0x03, 0x01, 0x04, 0x12, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x05, 0x27, 0x04, 0x14, 0x01, 0x08, 0x05, 0x27, + 0x00, 0x00, 0x01, 0x08, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, + 0x05, 0x27, 0x00, 0x00, 0x01, 0x08, 0x05, 0x27, 0x00, 0x00, 0x01, 0x08, 0x03, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x05, 0x27, 0x04, 0x12, 0x01, 0x08, 0x05, 0x27, + 0x00, 0x00, 0x01, 0x08, 0x02, 0x01, 0x04, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, + 0x05, 0x27, 0x04, 0x14, 0x01, 0x08, 0x05, 0x27, 0x00, 0x00, 0x01, 0x08, 0x03, 0x01, 0x04, 0x12, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x05, 0x27, 0x04, 0x14, 0x01, 0x08, 0x05, 0x27, + 0x00, 0x00, 0x01, 0x08, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, + 0x05, 0x27, 0x04, 0x12, 0x01, 0x08, 0x05, 0x27, 0x00, 0x00, 0x01, 0x06, 0x03, 0x01, 0x04, 0x11, + 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x01, 0x05, 0x05, 0x27, 0x04, 0x12, 0x01, 0x06, 0x05, 0x27, + 0x00, 0x00, 0x01, 0x08, 0x02, 0x01, 0x04, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, + 0x05, 0x27, 0x04, 0x14, 0x01, 0x08, 0x05, 0x27, 0x00, 0x00, 0x01, 0x08, 0x03, 0x01, 0x04, 0x12, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x05, 0x27, 0x04, 0x14, 0x01, 0x08, 0x05, 0x27, + 0x00, 0x00, 0x01, 0x08, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, + 0x05, 0x27, 0x00, 0x00, 0x01, 0x08, 0x05, 0x27, 0x00, 0x00, 0x01, 0x08, 0x03, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x05, 0x27, 0x04, 0x12, 0x01, 0x08, 0x05, 0x27, + 0x00, 0x00, 0x01, 0x08, 0x02, 0x01, 0x04, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, + 0x05, 0x27, 0x04, 0x14, 0x01, 0x08, 0x05, 0x27, 0x00, 0x00, 0x01, 0x08, 0x03, 0x01, 0x04, 0x12, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x05, 0x27, 0x04, 0x14, 0x01, 0x08, 0x05, 0x27, + 0x00, 0x00, 0x01, 0x08, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, + 0x05, 0x27, 0x00, 0x00, 0x01, 0x08, 0x05, 0x27, 0x00, 0x00, 0x01, 0x06, 0x03, 0x01, 0x00, 0x00, + 0x01, 0x06, 0x03, 0x01, 0x00, 0x00, 0x01, 0x05, 0x03, 0x01, 0x00, 0x00, 0x01, 0x06, 0x03, 0x01, + 0x00, 0x00, 0x01, 0x08, 0x02, 0x01, 0x00, 0x00 +}; + +const uint8 SfxPlayer::_musicDataSample1[] = { + 0x08, 0x2C, 0x00, 0x40, 0x07, 0x2A, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x04, + 0x03, 0x05, 0x07, 0x08, 0x08, 0x0B, 0x0E, 0x0F, 0x11, 0x14, 0x14, 0x16, 0x18, 0x1C, 0x20, 0x1E, + 0x1A, 0x1A, 0x1F, 0x22, 0x1F, 0x19, 0x16, 0x27, 0x1C, 0xC8, 0x0F, 0x7F, 0x30, 0xA0, 0x97, 0x0F, + 0x73, 0x50, 0xC4, 0x96, 0xE7, 0x15, 0xFC, 0xFD, 0x12, 0x0C, 0xE6, 0xEF, 0x0F, 0xF8, 0xE3, 0xFF, + 0x47, 0x4E, 0x08, 0xD2, 0xEA, 0x27, 0x3B, 0x22, 0x09, 0x03, 0xFF, 0xF2, 0xF3, 0x03, 0x00, 0xEA, + 0xDE, 0xD4, 0xC7, 0xC2, 0xBC, 0xB4, 0xB6, 0xB8, 0xA8, 0x96, 0x95, 0x99, 0x9C, 0x9F, 0xA0, 0xA0, + 0xA3, 0xA4, 0xA4, 0xB3, 0xCB, 0xD7, 0xDB, 0xDF, 0xEA, 0xFD, 0x0F, 0x1C, 0x26, 0x37, 0x4B, 0x57, + 0x5F, 0x6A, 0x73, 0x78, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, + 0x7F, 0x78, 0x6C, 0x64, 0x5E, 0x58, 0x4B, 0x40, 0x3A, 0x2E, 0x1E, 0x16, 0x11, 0x0B, 0x06, 0xFE, + 0xF3, 0xE9, 0xE2, 0xDD, 0x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, 0xF9, 0xEB, 0xE0, 0xD6, 0xCC, 0xC3, 0xBA, + 0xB0, 0xA6, 0xA0, 0x99, 0x92, 0x8C, 0x88, 0x88, 0x88, 0x85, 0x83, 0x85, 0x89, 0x8C, 0x91, 0x9A, + 0xA2, 0xAB, 0xB2, 0xBB, 0xC7, 0xD6, 0xE3, 0xF1, 0xFF, 0x0C, 0x17, 0x23, 0x2D, 0x39, 0x45, 0x50, + 0x5A, 0x63, 0x67, 0x6A, 0x6E, 0x72, 0x76, 0x7A, 0x7A, 0x76, 0x73, 0x72, 0x6E, 0x6B, 0x6A, 0x66, + 0x61, 0x5D, 0x53, 0x4B, 0x48, 0x45, 0x40, 0x3C, 0x3A, 0x33, 0x2D, 0x2A, 0x24, 0x20, 0x20, 0x20, + 0x1C, 0x1B, 0x1A, 0x16, 0x13, 0x12, 0x11, 0x12, 0x12, 0x10, 0x0D, 0x0B, 0x0B, 0x09, 0x07, 0x07, + 0x06, 0x05, 0x04, 0x02, 0x01, 0xFE, 0xFC, 0xFC, 0xFF, 0x00, 0xFE, 0xFB, 0xFA, 0xFA, 0xFC, 0xFD, + 0xFC, 0xFD, 0x01, 0x02, 0x00, 0x00, 0x04, 0x08, 0x0C, 0x0E, 0x0D, 0x10, 0x13, 0x16, 0x19, 0x1B, + 0x1D, 0x1E, 0x21, 0x23, 0x23, 0x23, 0x24, 0x26, 0x28, 0x26, 0x23, 0x21, 0x21, 0x23, 0x23, 0x1F, + 0x1C, 0x1C, 0x1B, 0x1A, 0x18, 0x16, 0x15, 0x14, 0x13, 0x11, 0x0F, 0x0E, 0x0C, 0x0A, 0x08, 0x03, + 0xFD, 0xFA, 0xFA, 0xF9, 0xF6, 0xF3, 0xF1, 0xEF, 0xEF, 0xEF, 0xF0, 0xF3, 0xF4, 0xF2, 0xF4, 0xF9, + 0xFD, 0x00, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x09, 0x08, 0x05, 0x01, 0xFD, 0xF9, 0xF5, 0xF1, + 0xED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x08, 0x11, 0x1B, 0x24, 0x2D, 0x35, 0x3D, 0x45, 0x4B, + 0x50, 0x55, 0x58, 0x5B, 0x5E, 0x60, 0x60, 0x60, 0x5F, 0x5E, 0x5D, 0x5B, 0x59, 0x58, 0x57, 0x54, + 0x52, 0x4F, 0x4E, 0x4D, 0x4C, 0x4A, 0x48, 0x47, 0x46, 0x46, 0x46, 0x46, 0x46, 0x45, 0x44, 0x44, + 0x44, 0x45, 0x44, 0x44, 0x43, 0x43, 0x43, 0x43, 0x42, 0x41, 0x41, 0x40, 0x3F, 0x3D, 0x3C, 0x3C, + 0x3B, 0x3A, 0x39, 0x38, 0x36, 0x36, 0x35, 0x34, 0x34, 0x34, 0x33, 0x32, 0x32, 0x33, 0x34, 0x35, + 0x34, 0x34, 0x34, 0x36, 0x36, 0x36, 0x36, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x36, 0x34, + 0x35, 0x34, 0x33, 0x32, 0x32, 0x32, 0x32, 0x31, 0x30, 0x30, 0x30, 0x2F, 0x2F, 0x30, 0x30, 0x30, + 0x31, 0x31, 0x32, 0x32, 0x33, 0x34, 0x35, 0x36, 0x36, 0x36, 0x37, 0x38, 0x38, 0x38, 0x37, 0x35, + 0x32, 0x2F, 0x2D, 0x29, 0x24, 0x20, 0x1A, 0x14, 0x0E, 0x08, 0x03, 0xFE, 0xF8, 0xF3, 0xEE, 0xEA, + 0xE6, 0xE2, 0xE0, 0xDE, 0xDB, 0xD9, 0xD8, 0xD6, 0xD5, 0xD3, 0xD1, 0xD0, 0xCD, 0xCA, 0xC7, 0xC4, + 0xC1, 0xBD, 0xBA, 0xB6, 0xB3, 0xB0, 0xAC, 0xA9, 0xA7, 0xA5, 0xA3, 0xA1, 0xA0, 0xA0, 0xA0, 0xA0, + 0xA1, 0xA1, 0xA2, 0xA2, 0xA4, 0xA6, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAC, 0xAD, 0xAE, + 0xAF, 0x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0x44, 0x44, 0x45, 0x45, 0x46, 0x47, 0x47, 0x47, 0x48, 0x49, + 0x49, 0x49, 0x49, 0x4A, 0x49, 0x49, 0x49, 0x48, 0x48, 0x47, 0x46, 0x45, 0x45, 0x44, 0x43, 0x42, + 0x41, 0x41, 0x40, 0x40, 0x3F, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3F, 0x3F, 0x3F, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x3F, 0x3F, 0x3E, 0x3E, 0x3D, 0x3C, 0x3B, 0x3A, 0x39, + 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x31, 0x30, 0x30, 0x30, 0x2F, 0x2F, 0x30, 0x30, + 0x30, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x3A, 0x3B, 0x3D, 0x3D, 0x3E, 0x3F, + 0x3F, 0x3F, 0x3E, 0x3E, 0x3C, 0x3B, 0x38, 0x36, 0x33, 0x30, 0x2B, 0x27, 0x22, 0x1E, 0x19, 0x14, + 0x0E, 0x09, 0x04, 0xFE, 0xF8, 0xF3, 0xED, 0xE8, 0xE2, 0xDC, 0xD6, 0xD1, 0xCB, 0xC6, 0xC0, 0xBC, + 0xB7, 0xB2, 0xAE, 0xAB, 0xA8, 0xA5, 0xA2, 0xA0, 0x9F, 0x9E, 0x9C, 0x9B, 0x9B, 0x9A, 0x9A, 0x99, + 0x99, 0x99, 0x98, 0x98, 0x97, 0x97, 0x96, 0x95, 0x95, 0x95, 0x94, 0x94, 0x94, 0x94, 0x94, 0x95, + 0x96, 0x97, 0x99, 0x9B, 0x9E, 0xA0, 0xA4, 0xA8, 0xAD, 0xB2, 0xB7, 0xBD, 0xC3, 0xCA, 0xD1, 0xD7, + 0xDF, 0xE5, 0xEC, 0xF3, 0xF9, 0xFF, 0x04, 0x09, 0x0C, 0x0F, 0x11, 0x12, 0x12, 0x11, 0x10, 0x0D, + 0x09, 0x05, 0x00, 0xFB, 0xF5, 0xEF, 0xE9, 0xE2, 0xDC, 0xD6, 0xD0, 0xC9, 0xC4, 0xBF, 0xBB, 0xB7, + 0xB4, 0xB1, 0xB0, 0xAF, 0xAF, 0xAF, 0xB1, 0xB4, 0xB7, 0xBB, 0xBF, 0xC5, 0xCA, 0xD1, 0xD7, 0xDE, + 0xE5, 0xED, 0xF4, 0xFC, 0x03, 0x0B, 0x12, 0x19, 0x1F, 0x24, 0x29, 0x2E, 0x33, 0x36, 0x39, 0x3C, + 0x3E, 0x40, 0x41, 0x42, 0x42, 0x43, 0x43, 0x43, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x41, 0x41, + 0x41, 0x41, 0x41, 0x42, 0x42, 0x43, 0x43, 0x44, 0x44, 0x44, 0x45, 0x46, 0x47, 0x47, 0x47, 0x48, + 0x48, 0x48, 0x48, 0x48, 0x48, 0x47, 0x47, 0x46, 0x46, 0x45, 0x44, 0x43, 0x43, 0x42, 0x41, 0x40, + 0x40, 0x3F, 0x3F, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3F, 0x3F, 0x3F, 0x3F, 0x40, 0x40, 0x41, 0x41, + 0x41, 0x41, 0x41, 0x41, 0x41, 0x40, 0x40, 0x40, 0x3F, 0x3E, 0x3D, 0x3C, 0x3B, 0x3A, 0x39, 0x38, + 0x37, 0x35, 0x34, 0x33, 0x32, 0x31, 0x30, 0x30, 0x2F, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, 0x2E, + 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x35, 0x36, 0x37, 0x39, 0x3A, 0x3C, 0x3D, 0x3E, 0x3F, 0x40, + 0x41, 0x42, 0x42, 0x42, 0x41, 0x40, 0x3F, 0x3E, 0x3C, 0x39, 0x37, 0x34, 0x31, 0x2D, 0x29, 0x24, + 0x20, 0x1B, 0x16, 0x10, 0x0A, 0x05, 0xFE, 0xF8, 0xF2, 0xEC, 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, 0x42, 0x41, 0x41, 0x40, 0x40, 0x3F, 0x3E, 0x3E, 0x3D, 0x3B, 0x3A, 0x39, 0x38, 0x37, 0x36, + 0x35, 0x34, 0x33, 0x32, 0x31, 0x30, 0x2F, 0x2E, 0x2E, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2E, 0x2F, + 0x2F, 0x30, 0x31, 0x33, 0x34, 0x35, 0x36, 0x38, 0x39, 0x3B, 0x3C, 0x3D, 0x3F, 0x40, 0x41, 0x42, + 0x43, 0x44, 0x45, 0x45, 0x45, 0x45, 0x44, 0x43, 0x42, 0x40, 0x3E, 0x3C, 0x39, 0x36, 0x32, 0x2E, + 0x2A, 0x26, 0x21, 0x1C, 0x16, 0x10, 0x0A, 0x04, 0xFE, 0xF8, 0xF2, 0xEC, 0xE6, 0xE0, 0xDB, 0xD6, + 0xD1, 0xCC, 0xC8, 0xC4, 0xC0, 0xBD, 0xB9, 0xB6, 0xB3, 0xB1, 0xAE, 0xAB, 0xA8, 0xA5, 0xA3, 0xA0, + 0x9D, 0x9A, 0x98, 0x95, 0x92, 0x8F, 0x8D, 0x8A, 0x88, 0x86, 0x84, 0x83, 0x82, 0x82, 0x82, 0x82, + 0x82, 0x83, 0x84, 0x86, 0x86 +}; + +const uint8 SfxPlayer::_musicDataSample2[] = { + 0x0D, 0x90, 0x00, 0x40, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x22, 0x1E, 0x18, 0x14, 0x10, 0x10, + 0x12, 0x16, 0x18, 0x1E, 0x22, 0x22, 0x1E, 0x20, 0x24, 0x22, 0x28, 0x38, 0x30, 0x36, 0x38, 0x2A, + 0x38, 0x32, 0x48, 0x30, 0x36, 0x58, 0x2E, 0x78, 0x24, 0x1A, 0x60, 0x1A, 0x78, 0xF6, 0x7F, 0x80, + 0x7F, 0x00, 0xFE, 0x7F, 0xB8, 0x7E, 0xE8, 0x0A, 0x7C, 0x28, 0x80, 0x9A, 0x7F, 0x6C, 0x60, 0xE4, + 0x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F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x70, 0x54, + 0x58, 0x60, 0x3C, 0x3A, 0x40, 0x1C, 0x12, 0x08, 0x00, 0xE4, 0xCC, 0xCA, 0xC0, 0xE2, 0xD6, 0xBA, + 0x96, 0x80, 0x9A, 0x82, 0x80, 0x9C, 0x8E, 0x82, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x82, + 0x88, 0x90, 0x8E, 0x92, 0x9E, 0xAE, 0xD8, 0xE0, 0xC2, 0xB0, 0xA8, 0xBA, 0xD8, 0xFC, 0x10, 0x02, + 0xF0, 0xEA, 0x0C, 0x3A, 0x48, 0x34, 0x24, 0x16, 0x1E, 0x3E, 0x6C, 0x7F, 0x7F, 0x62, 0x46, 0x3C, + 0x54, 0x76, 0x7E, 0x74, 0x7A, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, + 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, + 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,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 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, + 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, + 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7C, 0x78, 0x76, + 0x72, 0x6E, 0x6C, 0x68, 0x64, 0x60, 0x5C, 0x58, 0x56, 0x52, 0x50, 0x4C, 0x44, 0x46, 0x3E, 0x38, + 0x38, 0x2E, 0x2A, 0x1C, 0x1E, 0x18, 0x0E, 0x16, 0x02, 0xF0, 0xFA, 0xFC, 0xEC, 0xEC, 0xDC, 0xE2, + 0xD4, 0xDA, 0xCC, 0xC8, 0xCC, 0xBE, 0xC6, 0xC0, 0xBA, 0xBC, 0xB6, 0xB0, 0xA2, 0xA6, 0x9E, 0x94, + 0x96, 0x8C, 0x98, 0x80, 0x92, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x86, 0x8E, 0x8C, 0x8C, 0x94, 0x90, + 0x98, 0xA0, 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C, 0xFC, 0xF6, 0xFC, 0xF2, 0xFC, 0xFA, + 0xFE, 0xFC, 0xFE, 0x00, 0xFC, 0xFE, 0x00, 0xFE, 0x06, 0x02, 0x04, 0x10, 0x0E, 0x12, 0x0C, 0x0E, + 0x0E, 0x0C, 0x0E, 0x10, 0x10, 0x1A, 0x0E, 0x08, 0x16, 0x1A, 0x20, 0x20, 0x22, 0x2C, 0x2C, 0x30, + 0x30, 0x38, 0x3E, 0x34, 0x36, 0x3E, 0x40, 0x3C, 0x42, 0x3C, 0x44, 0x46, 0x46, 0x4A, 0x4C, 0x4A, + 0x4A, 0x52, 0x50, 0x56, 0x5E, 0x5E, 0x60, 0x60, 0x62, 0x60, 0x62, 0x64, 0x60, 0x64, 0x64, 0x6A, + 0x72, 0x68, 0x66, 0x6C, 0x6E, 0x6E, 0x74, 0x70, 0x6C, 0x6C, 0x66, 0x70, 0x7A, 0x7A, 0x7A, 0x78, + 0x74, 0x72, 0x72, 0x78, 0x72, 0x76, 0x76, 0x74, 0x78, 0x72, 0x76, 0x72, 0x70, 0x74, 0x70, 0x72, + 0x70, 0x76, 0x74, 0x6E, 0x6A, 0x66, 0x68, 0x64, 0x64, 0x60, 0x64, 0x64, 0x64, 0x68, 0x60, 0x5A, + 0x5C, 0x58, 0x56, 0x54, 0x58, 0x4C, 0x50, 0x4E, 0x4A, 0x4A, 0x46, 0x46, 0x42, 0x42, 0x46, 0x46, + 0x42, 0x40, 0x40, 0x3C, 0x3A, 0x3A, 0x3A, 0x36, 0x3A, 0x36, 0x34, 0x30, 0x2E, 0x30, 0x28, 0x24, + 0x26, 0x1E, 0x26, 0x1E, 0x18, 0x1A, 0x14, 0x16, 0x1C, 0x12, 0x08, 0x02, 0x04, 0x04, 0x08, 0x04, + 0x00, 0x00, 0xFA, 0xF8, 0xF2, 0xF2, 0xEC, 0xE8, 0xEA, 0xE4, 0xE2, 0xE0, 0xDA, 0xDE, 0xDC, 0xD6, + 0xD2, 0xD2, 0xCE, 0xCC, 0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 0xE8, 0xE6, 0xE6, 0xEC, 0xF0, 0xEE, 0xEE, 0xEC, 0xEE, + 0xF2, 0xF4, 0xF8, 0xF4, 0xF8, 0xF8, 0xF8, 0xFA, 0xFE, 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x04, + 0x08, 0x0A, 0x08, 0x0C, 0x0A, 0x0E, 0x0E, 0x0C, 0x0C, 0x10, 0x10, 0x12, 0x16, 0x18, 0x1A, 0x18, + 0x16, 0x18, 0x18, 0x16, 0x1A, 0x1E, 0x1E, 0x1E, 0x18, 0x1C, 0x1E, 0x1E, 0x1C, 0x1A, 0x20, 0x1E, + 0x24, 0x24, 0x24, 0x22, 0x20, 0x22, 0x22, 0x26, 0x22, 0x20, 0x20, 0x26, 0x26, 0x20, 0x1E, 0x1E, + 0x1E, 0x1C, 0x1A, 0x1C, 0x20, 0x20, 0x22, 0x22, 0x24, 0x20, 0x1E, 0x20, 0x22, 0x26, 0x20, 0x22, + 0x24, 0x24, 0x1E, 0x1C, 0x1C, 0x22, 0x22, 0x1C, 0x20, 0x20, 0x1E, 0x1C, 0x1C, 0x1A, 0x1A, 0x1C, + 0x1E, 0x1C, 0x1A, 0x1A, 0x18, 0x1C, 0x1A, 0x18, 0x1E, 0x18, 0x1C, 0x14, 0x12, 0x12, 0x16, 0x10, + 0x0E, 0x16, 0x14, 0x16, 0x10, 0x0E, 0x12, 0x16, 0x16, 0x14, 0x18, 0x10, 0x10, 0x10, 0x12, 0x10, + 0x10, 0x08, 0x08, 0x06, 0x08, 0x08, 0x06, 0x0C, 0x08, 0x08, 0x06, 0x08, 0x08, 0x0A, 0x08, 0x0A, + 0x0C, 0x06, 0x04, 0x04, 0x06, 0x04, 0x04, 0x06, 0x04, 0x02, 0x06, 0x06, 0x02, 0x04, 0x04, 0x06, + 0x08, 0x06, 0x04, 0x04, 0x06, 0x0C, 0x0A, 0x02, 0x02 +}; + +const uint8 SfxPlayer::_musicDataSample3[] = { + 0x11, 0x8C, 0x00, 0x20, 0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0xEA, 0xE7, 0xE9, 0xF6, 0xFD, 0xFD, 0xFF, 0x0B, + 0x16, 0x18, 0x11, 0x08, 0x08 +}; + +const uint8 SfxPlayer::_musicDataSample4[] = { + 0x01, 0xF8, 0x00, 0x40, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0E, 0x0D, 0xF4, 0x0F, 0xFF, 0x0C, + 0x10, 0xE1, 0xC9, 0xD5, 0xF2, 0x17, 0x2C, 0x05, 0x1B, 0x50, 0x1D, 0x1F, 0x40, 0x1B, 0x09, 0x2B, + 0xFE, 0xE0, 0x0A, 0x27, 0xDF, 0xEB, 0x1F, 0x41, 0x56, 0x2E, 0x06, 0xEC, 0xC0, 0xA7, 0xCF, 0xE5, + 0x24, 0x2C, 0x2B, 0x53, 0x36, 0x2C, 0x15, 0x1F, 0x1E, 0x18, 0x18, 0x15, 0xD9, 0xD6, 0x03, 0xEE, + 0xEF, 0x3F, 0x38, 0x36, 0x36, 0x0F, 0xE8, 0xC9, 0xC6, 0xE0, 0x21, 0xF7, 0x08, 0x3C, 0x45, 0x14, + 0x33, 0x37, 0x2A, 0x17, 0x03, 0x21, 0x10, 0x15, 0xFC, 0xCD, 0xD5, 0xF6, 0x12, 0x46, 0x24, 0xFC, + 0xF3, 0x22, 0x0A, 0xD7, 0xE8, 0x02, 0xF9, 0x0C, 0x3D, 0x46, 0x25, 0x16, 0x30, 0x0C, 0xF2, 0x16, + 0x35, 0xF8, 0xF1, 0x01, 0x03, 0x07, 0xF6, 0x11, 0x08, 0x0E, 0x14, 0x1F, 0x0F, 0xF5, 0xFD, 0x03, + 0x0E, 0xE3, 0x11, 0x2B, 0x26, 0x23, 0x21, 0x18, 0xFF, 0x11, 0x0C, 0x08, 0x07, 0x05, 0x06, 0x0A, + 0x18, 0x0F, 0x0F, 0x0E, 0x0C, 0x05, 0x12, 0x2C, 0x01, 0xFD, 0x05, 0xF6, 0xF6, 0x15, 0x29, 0x1B, + 0x0C, 0x09, 0x2A, 0x12, 0x08, 0x14, 0x00, 0xF8, 0x03, 0x26, 0x14, 0x11, 0x0C, 0x1E, 0x00, 0xFA, + 0x14, 0x15, 0x0A, 0x04, 0x07, 0x05, 0x08, 0x09, 0x18, 0x03, 0x09, 0x1A, 0x1A, 0x21, 0x12, 0x11, + 0x06, 0x01, 0x0C, 0xF3, 0x1D, 0x1F, 0x15, 0x10, 0x11, 0x10, 0x05, 0x06, 0x15, 0x02, 0xF7, 0x0C, + 0x17, 0x16, 0x01, 0xFB, 0x09, 0x01, 0x13, 0x2D, 0x28, 0x0E, 0x07, 0x1C, 0xFB, 0x01, 0x17, 0x19, + 0x02, 0x07, 0x15, 0x14, 0x0D, 0x14, 0xFD, 0xF6, 0x05, 0x16, 0x23, 0x10, 0x0E, 0x08, 0xFD, 0x09, + 0x0B, 0x16, 0x1A, 0x11, 0x13, 0x07, 0x10, 0x18, 0x0B, 0x02, 0x0D, 0x0E, 0x13, 0x1E, 0x23, 0x0C, + 0xF8, 0x00, 0x05, 0x09, 0x06, 0x1A, 0x1B, 0x01, 0x0C, 0x0C, 0x08, 0x0C, 0x17, 0x18, 0x08, 0x0C, + 0x19, 0x13, 0x06, 0x06, 0x04, 0x04, 0x11, 0x23, 0x21, 0x14, 0x0C, 0x09, 0x03, 0x08, 0x0E, 0x12, + 0x08, 0x0A, 0x0A, 0x02, 0x10, 0x15, 0x0C, 0x0A, 0x0F, 0x16, 0x1F, 0x1C, 0x14, 0x05, 0xF5, 0x02, + 0x16, 0x14, 0x17, 0x1C, 0x1B, 0x08, 0x06, 0x0F, 0x0A, 0x03, 0x0C, 0x14, 0x09, 0x0E, 0x1B, 0x09, + 0xFB, 0x05, 0x0F, 0x10, 0x1D, 0x21, 0x1B, 0x09, 0x09, 0x02, 0x06, 0x07, 0x0E, 0x16, 0x10, 0x15, + 0x17, 0x0E, 0x0D, 0x0A, 0x08, 0x02, 0x0F, 0x21, 0x16, 0x0C, 0x09, 0x03, 0xFC, 0x07, 0x19, 0x19, + 0x0F, 0x22, 0x17, 0x06, 0x03, 0x0C, 0x0D, 0xFE, 0x11, 0x1C, 0x13, 0x14, 0x17, 0x0D, 0xFC, 0xFD, + 0x16, 0x16, 0x14, 0x19, 0x10, 0x02, 0x00, 0x0A, 0x0C, 0x0A, 0x17, 0x15, 0x16, 0x11, 0x12, 0x14, + 0x04, 0xFF, 0x0C, 0x10, 0x11, 0x1D, 0x1A, 0x0A, 0x06, 0x0E, 0x00, 0x07, 0x16, 0x12, 0x0F, 0x0F, + 0x12, 0x07, 0x02, 0x13, 0x0A, 0x09, 0x15, 0x1B, 0x19, 0x0D, 0x0C, 0x07, 0x00, 0x07, 0x15, 0x17, + 0x10, 0x14, 0x19, 0x06, 0x02, 0x10, 0x0C, 0x0A, 0x0F, 0x15, 0x11, 0x0C, 0x12, 0x0D, 0x06, 0x06, + 0x0E, 0x17, 0x13, 0x12, 0x16, 0x0A, 0x06, 0x0E, 0x12, 0x0C, 0x13, 0x1C, 0x0C, 0x0C, 0x14, 0x0C, + 0x07, 0x0F, 0x0D, 0x07, 0x0F, 0x19, 0x11, 0x0F, 0x10, 0x0D, 0x09, 0x0B, 0x13, 0x14, 0x10, 0x0E, + 0x11, 0x0A, 0x07, 0x0B, 0x17, 0x0F, 0x0D, 0x17, 0x14, 0x0B, 0x10, 0x11, 0x06, 0x06, 0x10, 0x13, + 0x0F, 0x10, 0x13, 0x0E, 0x07, 0x0E, 0x13, 0x0E, 0x0D, 0x13, 0x0F, 0x0E, 0x15, 0x11, 0x0B, 0x0D, + 0x0F, 0x0A, 0x0E, 0x14, 0x14, 0x0C, 0x0F, 0x0B, 0x0B, 0x11, 0x13, 0x10, 0x0C, 0x0B, 0x0F, 0x10, + 0x10 +}; + +const uint8 SfxPlayer::_musicDataSample5[] = { + 0x09, 0xE4, 0x00, 0x40, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, + 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0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 0x80, 0x80, 0x80, 0x80, + 0x84, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x84, 0x84, 0x8C, 0xA0, 0xC0, 0xD4, 0xD0, 0xE4, 0xEC, 0xF0, + 0xF8, 0x10, 0x20, 0x4C, 0x64, 0x68, 0x6C, 0x78, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x6C, 0x64, 0x58, + 0x34, 0x2C, 0x34, 0x38, 0x2C, 0x14, 0x14, 0x20, 0x2C, 0x38, 0x34, 0x34, 0x3C, 0x3C, 0x3C, 0x2C, + 0x38, 0x54, 0x70, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x74, 0x78, 0x78, 0x7C, 0x6C, 0x74, 0x7F, 0x7F, + 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, + 0x74, 0x4C, 0x4C, 0x4C, 0x30, 0x14, 0x14, 0x04, 0x10, 0x1C, 0xF4, 0xCC, 0xAC, 0x84, 0x88, 0x80, + 0x80, 0x80, 0x84, 0xA8, 0x80, 0x80, 0x80, 0x84, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xAC, + 0x80, 0x80, 0xA4, 0xFC, 0x14, 0x00, 0x00, 0xF8, 0x3C, 0x70, 0x64, 0x30, 0xEC, 0x34, 0x7F, 0x44, + 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x70, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, + 0x7F, 0x7F, 0x7F, 0x7F, 0x70, 0x68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0xEC, 0x18, + 0x18, 0x08, 0xE0, 0xF4, 0x0C, 0x20, 0x0C, 0x00, 0x00, 0x10, 0x1C, 0x00, 0xEC, 0x0C, 0x10, 0x14, + 0x10, 0x0C, 0xF8, 0xF8, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x04, 0x1C, 0x30, 0x24, 0x0C, 0xE4, 0xF4, + 0x08, 0x14, 0x0C, 0x00, 0x00, 0x0C, 0x08, 0x00, 0xEC, 0x04, 0x1C, 0x14, 0x08, 0x1C, 0x24, 0x2C, + 0x18, 0x10, 0x20, 0x0C, 0x20, 0x3C, 0x24, 0x20, 0x20, 0x38, 0x38, 0x18, 0x14, 0x1C, 0x18, 0x24, + 0x2C, 0x0C, 0x14, 0x24, 0x00, 0xEC, 0xF4, 0xEC, 0xD8, 0xD8, 0xE8, 0xE0, 0xB4, 0xC4, 0xF0, 0xEC, + 0xD0, 0xD4, 0xE0, 0xE4, 0xE0, 0xE4, 0xDC, 0x0C, 0x0C, 0x00, 0x00, 0x10, 0x20, 0x14, 0x14, 0x18, + 0x14, 0x14, 0x14, 0x10, 0x08, 0x24, 0x2C, 0x28, 0x24, 0x34, 0x30, 0x30, 0x34, 0x34, 0x38, 0x2C, + 0x1C, 0x1C, 0x34, 0x18, 0x04, 0x14, 0x10, 0x14, 0x14, 0x00, 0xE4, 0xEC, 0xE4, 0xFC, 0x10, 0x0C, + 0x0C, 0x14, 0x20, 0x04, 0x0C, 0x2C, 0x20, 0x14, 0x04, 0x08, 0x10, 0x2C, 0x2C, 0x14, 0x24, 0x00, + 0xEC, 0xFC, 0x10, 0x0C, 0x00, 0x10, 0x08, 0xF4, 0x00, 0xF4, 0x00, 0xFC, 0x08, 0x18, 0xF4, 0x00, + 0x0C, 0x0C, 0xF8, 0xF8, 0x10, 0x0C, 0x10, 0xE4, 0xE8, 0xFC, 0x04, 0x18, 0x0C, 0x0C, 0x04, 0x18, + 0x18, 0x14, 0x04, 0x0C, 0x10, 0x20, 0x0C, 0x10, 0x28, 0x34, 0x30, 0x34, 0x2C, 0x20, 0x1C, 0x1C, + 0x2C, 0x40, 0x3C, 0x24, 0x24, 0x1C, 0x18, 0x14, 0x24, 0x14, 0xEC, 0xFC, 0x04, 0xF8, 0xF4, 0xE4, + 0xE4, 0xFC, 0x04, 0xF8, 0xEC, 0xF8, 0xF8, 0xF4, 0x00, 0xF0, 0x00, 0xF4, 0xEC, 0x10, 0x04, 0xFC, + 0x08, 0x04, 0x00, 0xEC, 0x00, 0x00, 0x00, 0x14, 0x10, 0x0C, 0x04, 0x20, 0x1C, 0x24, 0x14, 0xF8, + 0x08, 0x28, 0x14, 0x0C, 0x24, 0x2C, 0x18, 0x0C, 0x24, 0x34, 0x04, 0xF8, 0xEC, 0x0C, 0x1C, 0x18, + 0x00, 0x04, 0x28, 0x1C, 0x14, 0x24, 0x18, 0x14, 0x20, 0x10, 0x10, 0x24, 0x1C, 0x04, 0x0C, 0x14, + 0x1C, 0x1C, 0x1C, 0x28, 0x24, 0x20, 0x2C, 0x24, 0x14, 0x04, 0x1C, 0x2C, 0x24, 0x24, 0x00, 0xF8, + 0xFC, 0x18, 0xF4, 0xEC, 0xFC, 0x04, 0xE4, 0xE4, 0xF4, 0xF0, 0xF8, 0x1C, 0x14, 0x14, 0x04, 0x04, + 0x00, 0x04, 0x1C, 0x1C, 0x08, 0xF4, 0xF0, 0xF8, 0x14, 0xFC, 0xF4, 0x10, 0x10, 0x18, 0x20, 0x24, + 0x14, 0x1C, 0x38, 0x28, 0x24, 0x14, 0x34, 0x44, 0x20, 0x24, 0x14, 0x10, 0x28, 0x24, 0x0C, 0x18, + 0x04, 0xF4, 0xF8, 0x14, 0xF8, 0xDC, 0xE4, 0xEC, 0xE4, 0x04, 0xFC, 0xEC, 0xF4, 0xFC, 0xFC, 0xFC, + 0xE4, 0xE4, 0xF0, 0xE0, 0xD4, 0xE8, 0xE4, 0xE4, 0xF8, 0xF0, 0xE4, 0xEC, 0xE4, 0xE4, 0xF4, 0xF8, +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4, 0xEC, 0xE8, 0xFC, 0xF4, 0xF4, 0x0C, 0x0C, 0x04, 0x04, + 0x00, 0x00, 0x0C, 0x00, 0xFC, 0x00, 0x04, 0xEC, 0xEC, 0xEC, 0xF4, 0x04, 0x14, 0x0C, 0x04, 0xE0, + 0xE4, 0xF4, 0xDC, 0xE8, 0x08, 0xEC, 0xF4, 0xEC, 0xE4, 0xF4, 0x08, 0x0C, 0x08, 0xFC, 0xF0, 0xF0, + 0x00, 0xF8, 0xFC, 0xFC, 0xF8, 0xF8, 0x08, 0x0C, 0xFC, 0xF8, 0x04, 0x14, 0x18, 0x0C, 0x0C, 0x20, + 0x28, 0x34, 0x24, 0x24, 0x1C, 0x28, 0x34, 0x38, 0x2C, 0x28, 0x20, 0x1C, 0x1C, 0x1C, 0x20, 0x20, + 0x24, 0x18, 0x0C, 0x20, 0x28, 0x24, 0x0C, 0x0C, 0x2C, 0x1C, 0x14, 0x04, 0x08, 0x1C, 0x24, 0x10, + 0x04, 0x18, 0x18, 0x08, 0x04, 0x18, 0x24, 0x14, 0x04, 0xF8, 0xE4, 0x00, 0x00, 0x04, 0x08, 0xFC, + 0xF4, 0xFC, 0xF0, 0xF0, 0x00, 0x08, 0xF4, 0xE4, 0xF4, 0xEC, 0xEC, 0xEC, 0xE8, 0xF4, 0xE8, 0xD8, + 0xDC, 0xE4, 0xF0, 0xEC, 0xF0, 0x04, 0xF4, 0xE8, 0xFC, 0xFC, 0xE4, 0xE8, 0xF4, 0xF4, 0x04, 0xEC, + 0xF0, 0xE4, 0xE8, 0x10, 0x0C, 0xF4, 0xEC, 0x00, 0x14, 0x0C, 0x0C, 0x04, 0x04 +}; + +const uint8 SfxPlayer::_musicDataSample6[] = { + 0x09, 0x2E, 0x00, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x03, 0x03, 0x03, 0x06, 0x06, 0x0A, + 0x00, 0x10, 0x05, 0x0C, 0x04, 0x07, 0x08, 0xEF, 0xF4, 0xEB, 0xFC, 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xFF, 0xF8, 0xE6, 0xD6, 0xCF, 0xCD, 0xD5, 0xE3, 0xEB, 0xFB, 0x0F, 0x12, + 0x15, 0x19, 0x1F, 0x27, 0x34, 0x3F, 0x3F +}; + +const uint8 SfxPlayer::_musicDataSample7[] = { + 0x03, 0x46, 0x00, 0x40, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0F, 0x0A, 0x0F, 0x08, 0x15, 0x0D, + 0x11, 0x16, 0x08, 0x0B, 0x17, 0xFA, 0x0E, 0x17, 0x06, 0x0F, 0x0F, 0x13, 0x11, 0xFA, 0x28, 0xFF, + 0x0E, 0x23, 0xFD, 0x14, 0x1F, 0xF2, 0x1C, 0x0F, 0x00, 0x37, 0xF7, 0x04, 0x1B, 0xF3, 0x1C, 0x0F, + 0x06, 0x0F, 0x12, 0xFF, 0x14, 0x0D, 0x10, 0x0B, 0xF4, 0x4F, 0xCF, 0x28, 0xEA, 0x2B, 0xFF, 0x10, + 0x2F, 0xE4, 0x13, 0xFF, 0x12, 0x0F, 0x16, 0x07, 0x2F, 0xD4, 0x24, 0xFF, 0x00, 0x18, 0x11, 0x00, + 0x17, 0x02, 0x11, 0xFA, 0x2F, 0xEA, 0x18, 0xFF, 0x0C, 0x04, 0x30, 0xFF, 0x24, 0xE3, 0x30, 0xFF, + 0x00, 0x3F, 0xEF, 0x1C, 0xFC, 0x17, 0xEF, 0x28, 0xF7, 0x2B, 0x03, 0x07, 0x10, 0x22, 0xEF, 0x18, + 0x2F, 0xD9, 0x21, 0x08, 0x1F, 0xEC, 0x2C, 0xFC, 0x05, 0x0C, 0x2C, 0xF0, 0x1F, 0x0A, 0x02, 0x17, + 0x0C, 0xF2, 0x34, 0xFF, 0xF8, 0x19, 0x13, 0x09, 0xFC, 0x55, 0xAF, 0x10, 0x37, 0xD2, 0x31, 0x08, + 0x07, 0x09, 0x0C, 0x17, 0x04, 0xFE, 0x24, 0x00, 0x1D, 0x10, 0x10, 0x07, 0x19, 0x03, 0x05, 0x06, +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 0x1B, 0xFC, 0x07, 0x08, 0x1F, 0xE2, 0x40, 0xFB, 0x00, + 0x23, 0xFB, 0x10, 0x16, 0x05, 0x12, 0x06, 0x06, 0x2C, 0xEF, 0x10, 0x17, 0xF8, 0x20, 0xFF, 0x10, + 0x0A, 0x0B, 0x12, 0x05, 0x17, 0x0C, 0x0D, 0x08, 0x0E, 0x12, 0x08, 0x17, 0x05, 0x0C, 0x0F, 0x04, + 0x10, 0x15, 0x04, 0x1D, 0xEF, 0x2C, 0xFF, 0x00, 0x1F, 0x03, 0x12, 0x08, 0x09, 0x18, 0x0B, 0x00, + 0x1E, 0xFF, 0x08, 0xFF, 0x2C, 0xFD, 0x08, 0x1F, 0xF2, 0x14, 0x17, 0xF4, 0x2D, 0xFF, 0x02, 0x2F, + 0xF0, 0x07, 0x10, 0x17, 0xFD, 0x20, 0xFF, 0x0C, 0x0E, 0x06, 0x08, 0x19, 0xFB, 0x12, 0x17, 0xF8, + 0x18, 0x0B, 0x17, 0xF8, 0x16, 0x07, 0x0C, 0x13, 0x08, 0x07, 0x04, 0x0F, 0x09, 0x10, 0x08, 0x1F, + 0xEC, 0x18, 0x17, 0xF8, 0x1F, 0x05, 0x04, 0x17, 0xFF, 0x18, 0x0F, 0x08, 0x0C, 0x08, 0x10, 0x04, + 0x16, 0x09, 0x16, 0x02, 0x0E, 0x12, 0x0F, 0xF6, 0x32, 0xEF, 0x10, 0x1F, 0xF7, 0x16, 0x0C, 0x0E, + 0x16, 0xFB, 0x13, 0x04, 0x11, 0x11, 0x06, 0x1F, 0xFB, 0x12, 0x0F, 0x04, 0x14, 0x07, 0x04, 0x1F, + 0xF3, 0x18, 0x09, 0x16, 0x06, 0x0A, 0x13, 0xFC, 0x1A, 0x07, 0x0C, 0x1C, 0xEF, 0x14, 0x15, 0xF1, + 0x30, 0xFF, 0x08, 0x1C, 0xEF, 0x18, 0x08, 0x13, 0x09, 0x0C, 0x17, 0xF0, 0x28, 0x07, 0x08, 0x1D, + 0xFD, 0x10, 0x15, 0xFD, 0x28, 0xFF, 0x04, 0x1C, 0xF7, 0x18, 0x07, 0x1E, 0x07, 0x08, 0x17, 0xF4, + 0x1C, 0x07, 0x0B, 0x0C, 0x1A, 0x06, 0x06, 0x19, 0x04, 0x10, 0x04, 0x14, 0x07, 0x0A, 0x1F, 0xEE, + 0x28, 0xFF, 0x09, 0x0F, 0x10, 0x07, 0x08, 0x18, 0x02, 0x14, 0x00, 0x1C, 0x05, 0x0B, 0x06, 0x1F, + 0xEF, 0x18, 0x0F, 0x0C, 0x0E, 0x06, 0x13, 0x02, 0x0D, 0x14, 0x04, 0x13, 0x0B, 0x0F, 0x04, 0x1B, + 0xFF, 0x0C, 0x13, 0x06, 0x0E, 0x0E, 0x0F, 0x09, 0x0B, 0x0E, 0x06, 0x12, 0x0B, 0x0A, 0x11, 0x0B, + 0x09, 0x0C, 0x0E, 0x07, 0x11, 0x08, 0x11, 0x0F, 0x09, 0x0C, 0x17, 0xFA, 0x1A, 0x07, 0x16, 0xFF, + 0x18, 0x0F, 0x02, 0x17, 0x05, 0x10, 0x04, 0x19, 0x06, 0x11, 0x02, 0x1D, 0xFF, 0x08, 0x1B, 0xFE, + 0x18, 0x0A, 0x11, 0x07, 0x14, 0x0E, 0x0C, 0x0D, 0x0D, 0x0E, 0x03, 0x16, 0x09, 0x10, 0x03, 0x1A, + 0x06, 0x08, 0x1B, 0xFF, 0x11, 0x0B, 0x0A, 0x0E, 0x0A, 0x0F, 0x06, 0x16, 0x06, 0x06, 0x15, 0x05, + 0x14, 0x0B, 0x07, 0x12, 0x0A, 0x11, 0x02, 0x1C, 0x09, 0x07, 0x1E, 0x00, 0x10, 0x0D, 0x0C, 0x12, + 0x0A, 0x0E, 0x0D, 0x12, 0x07, 0x08, 0x0F, 0x0E, 0x11, 0x08, 0x17, 0x06, 0x0E, 0x0D, 0x0F, 0x10, + 0x07, 0x10, 0x10, 0x08, 0x0E, 0x09, 0x10, 0x0B, 0x10, 0x0A, 0x14, 0x06, 0x10, 0x0F, 0x0D, 0x09, + 0x0E, 0x0B, 0x12, 0x07, 0x0E, 0x13, 0x05, 0x15, 0x08, 0x0D, 0x0D, 0x0E, 0x0B, 0x12, 0x09, 0x0B, + 0x10, 0x0E, 0x0B, 0x0B, 0x10, 0x08, 0x17, 0x03, 0x13, 0x0A, 0x15, 0x03, 0x10, 0x0F, 0x05, 0x14, + 0x0D, 0x0E, 0x0B, 0x13, 0x0A, 0x0E, 0x10, 0x07, 0x10, 0x17, 0xFC, 0x1C, 0x0D, 0x02, 0x1A, 0x0B, + 0x0B, 0x0F, 0x0F, 0x0C, 0x0E, 0x0A, 0x11, 0x0A, 0x11, 0x09, 0x10, 0x0F, 0x0B, 0x17, 0x0B, 0x0C, + 0x0E, 0x0F, 0x0A, 0x11, 0x0B, 0x0E, 0x0C, 0x10, 0x0E, 0x08, 0x14, 0x0B, 0x0E, 0x14, 0x04, 0x16, + 0x0A, 0x10, 0x0E, 0x0C, 0x0F, 0x02, 0x1B, 0x07, 0x10, 0x13, 0x08, 0x14, 0x07, 0x12, 0x07, 0x10, + 0x0F, 0x08, 0x14, 0x0B, 0x0E, 0x0F, 0x0E, 0x10, 0x0B, 0x11, 0x10, 0x0E, 0x0D, 0x08, 0x14, 0x0B, + 0x0E, 0x0F, 0x10, 0x0D, 0x0C, 0x13, 0x0C, 0x10, 0x0F, 0x0C, 0x0E, 0x0E, 0x0F, 0x00, 0x00 +}; + +const uint8 SfxPlayer::_musicDataSample8[] = { + 0x00, 0x02, 0x00, 0x40, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 +}; + +const SfxPlayer::Module SfxPlayer::_module68 = { + { _musicDataSample1, _musicDataSample8, _musicDataSample3, _musicDataSample4, _musicDataSample8 }, + _musicData68 +}; + +const SfxPlayer::Module SfxPlayer::_module70 = { + { _musicDataSample1, _musicDataSample2, _musicDataSample3, _musicDataSample3, _musicDataSample8 }, + _musicData70 +}; + +const SfxPlayer::Module SfxPlayer::_module72 = { + { _musicDataSample1, _musicDataSample2, _musicDataSample5, _musicDataSample4, _musicDataSample8 }, + _musicData72 +}; + +const SfxPlayer::Module SfxPlayer::_module73 = { + { _musicDataSample1, _musicDataSample2, _musicDataSample4, _musicDataSample3, _musicDataSample8 }, + _musicData73 +}; + +const SfxPlayer::Module SfxPlayer::_module74 = { + { _musicDataSample1, _musicDataSample2, _musicDataSample5, _musicDataSample6, _musicDataSample7 }, + _musicData74 +}; + +const SfxPlayer::Module SfxPlayer::_module75 = { + { _musicDataSample1, _musicDataSample2, _musicDataSample5, _musicDataSample6, _musicDataSample7 }, + _musicData75 +}; + +const uint16 SfxPlayer::_periodTable[] = { + 0x434, 0x3F8, 0x3C0, 0x38A, 0x358, 0x328, 0x2FA, 0x2D0, 0x2A6, 0x280, + 0x25C, 0x23A, 0x21A, 0x1FC, 0x1E0, 0x1C5, 0x1AC, 0x194, 0x17D, 0x168, + 0x153, 0x140, 0x12E, 0x11D, 0x10D, 0x0FE, 0x0F0, 0x0E2, 0x0D6, 0x0CA, + 0x0BE, 0x0B4, 0x0AA, 0x0A0, 0x097, 0x08F, 0x087, 0x07F, 0x078, 0x071 +}; diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/sys.h b/project/jni/application/REminiscence/REminiscence-0.1.9/sys.h new file mode 100644 index 000000000..121d15719 --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/sys.h @@ -0,0 +1,49 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __SYS_H__ +#define __SYS_H__ + +typedef unsigned char uint8; +typedef signed char int8; +typedef unsigned short uint16; +typedef signed short int16; +typedef unsigned long uint32; +typedef signed long int32; + +inline uint16 READ_BE_UINT16(const void *ptr) { + const uint8 *b = (const uint8 *)ptr; + return (b[0] << 8) | b[1]; +} + +inline uint32 READ_BE_UINT32(const void *ptr) { + const uint8 *b = (const uint8 *)ptr; + return (b[0] << 24) | (b[1] << 16) | (b[2] << 8) | b[3]; +} + +inline uint16 READ_LE_UINT16(const void *ptr) { + const uint8 *b = (const uint8 *)ptr; + return (b[1] << 8) | b[0]; +} + +inline uint32 READ_LE_UINT32(const void *ptr) { + const uint8 *b = (const uint8 *)ptr; + return (b[3] << 24) | (b[2] << 16) | (b[1] << 8) | b[0]; +} + +#endif // __SYS_H__ diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/systemstub.h b/project/jni/application/REminiscence/REminiscence-0.1.9/systemstub.h new file mode 100644 index 000000000..fe2acf8a5 --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/systemstub.h @@ -0,0 +1,106 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __SYSTEMSTUB_H__ +#define __SYSTEMSTUB_H__ + +#include "intern.h" + +struct PlayerInput { + enum { + DIR_UP = 1 << 0, + DIR_DOWN = 1 << 1, + DIR_LEFT = 1 << 2, + DIR_RIGHT = 1 << 3 + }; + enum { + DF_FASTMODE = 1 << 0, + DF_DBLOCKS = 1 << 1, + DF_SETLIFE = 1 << 2 + }; + + uint8 dirMask; + bool enter; + bool space; + bool shift; + bool backspace; + bool escape; + + char lastChar; + + bool save; + bool load; + int stateSlot; + + bool inpRecord; + bool inpReplay; + + bool mirrorMode; + + uint8 dbgMask; + bool quit; +}; + +struct SystemStub { + typedef void (*AudioCallback)(void *param, uint8 *stream, int len); + + PlayerInput _pi; + + virtual ~SystemStub() {} + + virtual void init(const char *title, uint16 w, uint16 h) = 0; + virtual void destroy() = 0; + + virtual void setPalette(const uint8 *pal, uint16 n) = 0; + virtual void setPaletteEntry(uint8 i, const Color *c) = 0; + virtual void getPaletteEntry(uint8 i, Color *c) = 0; + virtual void setOverscanColor(uint8 i) = 0; + virtual void copyRect(int16 x, int16 y, uint16 w, uint16 h, const uint8 *buf, uint32 pitch) = 0; + virtual void updateScreen(uint8 shakeOffset) = 0; + + virtual void processEvents() = 0; + virtual void sleep(uint32 duration) = 0; + virtual uint32 getTimeStamp() = 0; + + virtual void startAudio(AudioCallback callback, void *param) = 0; + virtual void stopAudio() = 0; + virtual uint32 getOutputSampleRate() = 0; + + virtual void *createMutex() = 0; + virtual void destroyMutex(void *mutex) = 0; + virtual void lockMutex(void *mutex) = 0; + virtual void unlockMutex(void *mutex) = 0; +}; + +struct MutexStack { + SystemStub *_stub; + void *_mutex; + + MutexStack(SystemStub *stub, void *mutex) + : _stub(stub), _mutex(mutex) { + _stub->lockMutex(_mutex); + } + ~MutexStack() { + _stub->unlockMutex(_mutex); + } +}; + +extern SystemStub *SystemStub_SDL_create(); +extern SystemStub *SystemStub_Win32_create(); + +#endif // __SYSTEMSTUB_H__ diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/systemstub_sdl.cpp b/project/jni/application/REminiscence/REminiscence-0.1.9/systemstub_sdl.cpp new file mode 100644 index 000000000..9e83b3664 --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/systemstub_sdl.cpp @@ -0,0 +1,582 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include "scaler.h" +#include "systemstub.h" + + +struct SystemStub_SDL : SystemStub { + enum { + MAX_BLIT_RECTS = 200, + SOUND_SAMPLE_RATE = 11025, + JOYSTICK_COMMIT_VALUE = 3200 + }; + + uint8 *_offscreen; + SDL_Surface *_screen; + SDL_Surface *_sclscreen; + bool _fullscreen; + uint8 _scaler; + uint8 _overscanColor; + uint16 _pal[256]; + uint16 _screenW, _screenH; + SDL_Joystick *_joystick; + SDL_Rect _blitRects[MAX_BLIT_RECTS]; + uint16 _numBlitRects; + + virtual ~SystemStub_SDL() {} + virtual void init(const char *title, uint16 w, uint16 h); + virtual void destroy(); + virtual void setPalette(const uint8 *pal, uint16 n); + virtual void setPaletteEntry(uint8 i, const Color *c); + virtual void getPaletteEntry(uint8 i, Color *c); + virtual void setOverscanColor(uint8 i); + virtual void copyRect(int16 x, int16 y, uint16 w, uint16 h, const uint8 *buf, uint32 pitch); + virtual void updateScreen(uint8 shakeOffset); + virtual void processEvents(); + virtual void sleep(uint32 duration); + virtual uint32 getTimeStamp(); + virtual void startAudio(AudioCallback callback, void *param); + virtual void stopAudio(); + virtual uint32 getOutputSampleRate(); + virtual void *createMutex(); + virtual void destroyMutex(void *mutex); + virtual void lockMutex(void *mutex); + virtual void unlockMutex(void *mutex); + + void prepareGfxMode(); + void cleanupGfxMode(); + void switchGfxMode(bool fullscreen, uint8 scaler); + void flipGfx(); + void forceGfxRedraw(); + void drawRect(SDL_Rect *rect, uint8 color, uint16 *dst, uint16 dstPitch); +}; + +SystemStub *SystemStub_SDL_create() { + return new SystemStub_SDL(); +} + +void SystemStub_SDL::init(const char *title, uint16 w, uint16 h) { + SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK); + SDL_ShowCursor(SDL_DISABLE); + SDL_WM_SetCaption(title, NULL); + memset(&_pi, 0, sizeof(_pi)); + _screenW = w; + _screenH = h; + // allocate some extra bytes for the scaling routines + int size_offscreen = (w + 2) * (h + 2) * 2; + _offscreen = (uint8 *)malloc(size_offscreen); + if (!_offscreen) { + error("SystemStub_SDL::init() Unable to allocate offscreen buffer"); + } + memset(_offscreen, 0, size_offscreen); + _fullscreen = false; + _scaler = 0; + memset(_pal, 0, sizeof(_pal)); + prepareGfxMode(); + _joystick = NULL; + if (SDL_NumJoysticks() > 0) { + _joystick = SDL_JoystickOpen(0); + } +} + +void SystemStub_SDL::destroy() { + cleanupGfxMode(); + if (SDL_JoystickOpened(0)) { + SDL_JoystickClose(_joystick); + } + SDL_Quit(); +} + +void SystemStub_SDL::setPalette(const uint8 *pal, uint16 n) { + assert(n <= 256); + for (int i = 0; i < n; ++i) { + uint8 r = pal[i * 3 + 0]; + uint8 g = pal[i * 3 + 1]; + uint8 b = pal[i * 3 + 2]; + _pal[i] = SDL_MapRGB(_screen->format, r, g, b); + } +} + +void SystemStub_SDL::setPaletteEntry(uint8 i, const Color *c) { + uint8 r = (c->r << 2) | (c->r & 3); + uint8 g = (c->g << 2) | (c->g & 3); + uint8 b = (c->b << 2) | (c->b & 3); + _pal[i] = SDL_MapRGB(_screen->format, r, g, b); +} + +void SystemStub_SDL::getPaletteEntry(uint8 i, Color *c) { + SDL_GetRGB(_pal[i], _screen->format, &c->r, &c->g, &c->b); + c->r >>= 2; + c->g >>= 2; + c->b >>= 2; +} + +void SystemStub_SDL::setOverscanColor(uint8 i) { + _overscanColor = i; +} + +void SystemStub_SDL::copyRect(int16 x, int16 y, uint16 w, uint16 h, const uint8 *buf, uint32 pitch) { + if (_numBlitRects >= MAX_BLIT_RECTS) { + warning("SystemStub_SDL::copyRect() Too many blit rects, you may experience graphical glitches"); + } else { + // extend the dirty region by 1 pixel for scalers accessing 'outer' pixels + --x; + --y; + w += 2; + h += 2; + + if (x < 0) { + x = 0; + } + if (y < 0) { + y = 0; + } + if (x + w > _screenW) { + w = _screenW - x; + } + if (y + h > _screenH) { + h = _screenH - y; + } + + SDL_Rect *br = &_blitRects[_numBlitRects]; + + br->x = _pi.mirrorMode ? _screenW - (x + w) : x; + br->y = y; + br->w = w; + br->h = h; + ++_numBlitRects; + + uint16 *p = (uint16 *)_offscreen + (br->y + 1) * _screenW + (br->x + 1); + buf += y * pitch + x; + + if (_pi.mirrorMode) { + while (h--) { + for (int i = 0; i < w; ++i) { + p[i] = _pal[buf[w - 1 - i]]; + } + p += _screenW; + buf += pitch; + } + } else { + while (h--) { + for (int i = 0; i < w; ++i) { + p[i] = _pal[buf[i]]; + } + p += _screenW; + buf += pitch; + } + } + if (_pi.dbgMask & PlayerInput::DF_DBLOCKS) { + drawRect(br, 0xE7, (uint16 *)_offscreen + _screenW + 1, _screenW * 2); + } + } +} + +void SystemStub_SDL::updateScreen(uint8 shakeOffset) { + //SDL_Flip(_screen); + + const int mul = _scalers[_scaler].factor; + if (shakeOffset == 0) { + for (int i = 0; i < _numBlitRects; ++i) { + SDL_Rect *br = &_blitRects[i]; + int16 dx = br->x * mul; + int16 dy = br->y * mul; + SDL_LockSurface(_sclscreen); + uint16 *dst = (uint16 *)_sclscreen->pixels + dy * _sclscreen->pitch / 2 + dx; + const uint16 *src = (uint16 *)_offscreen + (br->y + 1) * _screenW + (br->x + 1); + (*_scalers[_scaler].proc)(dst, _sclscreen->pitch, src, _screenW, br->w, br->h); + SDL_UnlockSurface(_sclscreen); + br->x *= mul; + br->y *= mul; + br->w *= mul; + br->h *= mul; + SDL_BlitSurface(_sclscreen, br, _screen, br); + } + SDL_UpdateRects(_screen, _numBlitRects, _blitRects); + } else { + SDL_LockSurface(_sclscreen); + uint16 w = _screenW; + uint16 h = _screenH - shakeOffset; + uint16 *dst = (uint16 *)_sclscreen->pixels; + const uint16 *src = (uint16 *)_offscreen + _screenW + 1; + (*_scalers[_scaler].proc)(dst, _sclscreen->pitch, src, _screenW, w, h); + SDL_UnlockSurface(_sclscreen); + + SDL_Rect bsr, bdr; + bdr.x = 0; + bdr.y = 0; + bdr.w = _screenW * mul; + bdr.h = shakeOffset * mul; + SDL_FillRect(_screen, &bdr, _pal[_overscanColor]); + + bsr.x = 0; + bsr.y = 0; + bsr.w = _screenW * mul; + bsr.h = (_screenH - shakeOffset) * mul; + bdr.x = 0; + bdr.y = shakeOffset * mul; + bdr.w = bsr.w; + bdr.h = bsr.h; + SDL_BlitSurface(_sclscreen, &bsr, _screen, &bdr); + + bdr.x = 0; + bdr.y = 0; + bdr.w = _screenW * mul; + bdr.h = _screenH * mul; + SDL_UpdateRects(_screen, 1, &bdr); + } + _numBlitRects = 0; + +} + +void SystemStub_SDL::processEvents() { + SDL_Event ev; + while (SDL_PollEvent(&ev)) { + switch (ev.type) { + case SDL_QUIT: + _pi.quit = true; + break; + case SDL_JOYHATMOTION: + _pi.dirMask = 0; + if (ev.jhat.value & SDL_HAT_UP) { + _pi.dirMask |= PlayerInput::DIR_UP; + } + if (ev.jhat.value & SDL_HAT_DOWN) { + _pi.dirMask |= PlayerInput::DIR_DOWN; + } + if (ev.jhat.value & SDL_HAT_LEFT) { + _pi.dirMask |= PlayerInput::DIR_LEFT; + } + if (ev.jhat.value & SDL_HAT_RIGHT) { + _pi.dirMask |= PlayerInput::DIR_RIGHT; + } + break; + case SDL_JOYAXISMOTION: + switch (ev.jaxis.axis) { + case 0: + if (ev.jaxis.value > JOYSTICK_COMMIT_VALUE) { + _pi.dirMask |= PlayerInput::DIR_RIGHT; + if (_pi.dirMask & PlayerInput::DIR_LEFT) { + _pi.dirMask &= ~PlayerInput::DIR_LEFT; + } + } else if (ev.jaxis.value < -JOYSTICK_COMMIT_VALUE) { + _pi.dirMask |= PlayerInput::DIR_LEFT; + if (_pi.dirMask & PlayerInput::DIR_RIGHT) { + _pi.dirMask &= ~PlayerInput::DIR_RIGHT; + } + } else { + _pi.dirMask &= ~(PlayerInput::DIR_RIGHT | PlayerInput::DIR_LEFT); + } + break; + case 1: + if (ev.jaxis.value > JOYSTICK_COMMIT_VALUE) { + _pi.dirMask |= PlayerInput::DIR_DOWN; + if (_pi.dirMask & PlayerInput::DIR_UP) { + _pi.dirMask &= ~PlayerInput::DIR_UP; + } + } else if (ev.jaxis.value < -JOYSTICK_COMMIT_VALUE) { + _pi.dirMask |= PlayerInput::DIR_UP; + if (_pi.dirMask & PlayerInput::DIR_DOWN) { + _pi.dirMask &= ~PlayerInput::DIR_DOWN; + } + } else { + _pi.dirMask = 0; + } + break; + } + break; + case SDL_JOYBUTTONDOWN: + switch (ev.jbutton.button) { + case 0: + _pi.space = true; + break; + case 1: + _pi.shift = true; + break; + case 2: + _pi.enter = true; + break; + case 3: + _pi.backspace = true; + break; + } + break; + case SDL_JOYBUTTONUP: + switch (ev.jbutton.button) { + case 0: + _pi.space = false; + break; + case 1: + _pi.shift = false; + break; + case 2: + _pi.enter = false; + break; + case 3: + _pi.backspace = false; + break; + } + break; + case SDL_KEYUP: + switch (ev.key.keysym.sym) { + case SDLK_LEFT: + _pi.dirMask &= ~PlayerInput::DIR_LEFT; + break; + case SDLK_RIGHT: + _pi.dirMask &= ~PlayerInput::DIR_RIGHT; + break; + case SDLK_UP: + _pi.dirMask &= ~PlayerInput::DIR_UP; + break; + case SDLK_DOWN: + _pi.dirMask &= ~PlayerInput::DIR_DOWN; + break; + case SDLK_SPACE: + _pi.space = false; + break; + case SDLK_RSHIFT: + case SDLK_LSHIFT: + _pi.shift = false; + break; + case SDLK_RETURN: + _pi.enter = false; + break; + case SDLK_ESCAPE: + _pi.escape = false; + break; + default: + break; + } + break; + case SDL_KEYDOWN: + if (ev.key.keysym.mod & KMOD_ALT) { + if (ev.key.keysym.sym == SDLK_RETURN) { + switchGfxMode(!_fullscreen, _scaler); + } else if (ev.key.keysym.sym == SDLK_KP_PLUS) { + uint8 s = _scaler + 1; + if (s < NUM_SCALERS) { + switchGfxMode(_fullscreen, s); + } + } else if (ev.key.keysym.sym == SDLK_KP_MINUS) { + int8 s = _scaler - 1; + if (_scaler > 0) { + switchGfxMode(_fullscreen, s); + } + } + break; + } else if (ev.key.keysym.mod & KMOD_CTRL) { + if (ev.key.keysym.sym == SDLK_f) { + _pi.dbgMask ^= PlayerInput::DF_FASTMODE; + } else if (ev.key.keysym.sym == SDLK_b) { + _pi.dbgMask ^= PlayerInput::DF_DBLOCKS; + } else if (ev.key.keysym.sym == SDLK_i) { + _pi.dbgMask ^= PlayerInput::DF_SETLIFE; + } else if (ev.key.keysym.sym == SDLK_m) { + _pi.mirrorMode = !_pi.mirrorMode; + flipGfx(); + } else if (ev.key.keysym.sym == SDLK_s) { + _pi.save = true; + } else if (ev.key.keysym.sym == SDLK_l) { + _pi.load = true; + } else if (ev.key.keysym.sym == SDLK_KP_PLUS) { + _pi.stateSlot = 1; + } else if (ev.key.keysym.sym == SDLK_KP_MINUS) { + _pi.stateSlot = -1; + } else if (ev.key.keysym.sym == SDLK_r) { + _pi.inpRecord = true; + } else if (ev.key.keysym.sym == SDLK_p) { + _pi.inpReplay = true; + } + } + _pi.lastChar = ev.key.keysym.sym; + switch (ev.key.keysym.sym) { + case SDLK_LEFT: + _pi.dirMask |= PlayerInput::DIR_LEFT; + break; + case SDLK_RIGHT: + _pi.dirMask |= PlayerInput::DIR_RIGHT; + break; + case SDLK_UP: + _pi.dirMask |= PlayerInput::DIR_UP; + break; + case SDLK_DOWN: + _pi.dirMask |= PlayerInput::DIR_DOWN; + break; + case SDLK_BACKSPACE: + case SDLK_TAB: + _pi.backspace = true; + break; + case SDLK_SPACE: + _pi.space = true; + break; + case SDLK_RSHIFT: + case SDLK_LSHIFT: + _pi.shift = true; + break; + case SDLK_RETURN: + _pi.enter = true; + break; + case SDLK_ESCAPE: + _pi.escape = true; + break; + default: + break; + } + break; + default: + break; + } + } +} + +void SystemStub_SDL::sleep(uint32 duration) { + SDL_Delay(duration); +} + +uint32 SystemStub_SDL::getTimeStamp() { + return SDL_GetTicks(); +} + +void SystemStub_SDL::startAudio(AudioCallback callback, void *param) { + SDL_AudioSpec desired; + memset(&desired, 0, sizeof(desired)); + desired.freq = SOUND_SAMPLE_RATE; + desired.format = AUDIO_S8; + desired.channels = 1; + desired.samples = 2048; + desired.callback = callback; + desired.userdata = param; + if (SDL_OpenAudio(&desired, NULL) == 0) { + SDL_PauseAudio(0); + } else { + error("SystemStub_SDL::startAudio() Unable to open sound device"); + } +} + +void SystemStub_SDL::stopAudio() { + SDL_CloseAudio(); +} + +uint32 SystemStub_SDL::getOutputSampleRate() { + return SOUND_SAMPLE_RATE; +} + +void *SystemStub_SDL::createMutex() { + return SDL_CreateMutex(); +} + +void SystemStub_SDL::destroyMutex(void *mutex) { + SDL_DestroyMutex((SDL_mutex *)mutex); +} + +void SystemStub_SDL::lockMutex(void *mutex) { + SDL_mutexP((SDL_mutex *)mutex); +} + +void SystemStub_SDL::unlockMutex(void *mutex) { + SDL_mutexV((SDL_mutex *)mutex); +} + +void SystemStub_SDL::prepareGfxMode() { + + int w = _screenW * _scalers[_scaler].factor; + int h = _screenH * _scalers[_scaler].factor; + + //_screen = SDL_SetVideoMode(w, h, 16, _fullscreen ? (SDL_FULLSCREEN | SDL_HWSURFACE) : SDL_HWSURFACE); + debug(DBG_INFO, "Requesting video %dx%d", w, h); + _screen = SDL_SetVideoMode(w, h, 16, SDL_SWSURFACE); + if (!_screen) { + error("SystemStub_SDL::prepareGfxMode() Unable to allocate _screen buffer"); + } + const SDL_PixelFormat *pf = _screen->format; + // Android TODO: get rid of filthy scaler and draw directly to Android surface + _sclscreen = SDL_CreateRGBSurface(SDL_SWSURFACE, w, h, 16, pf->Rmask, pf->Gmask, pf->Bmask, pf->Amask); + //_sclscreen = _screen; // Android hack + if (!_sclscreen) { + error("SystemStub_SDL::prepareGfxMode() Unable to allocate _sclscreen buffer"); + } + forceGfxRedraw(); +} + +void SystemStub_SDL::cleanupGfxMode() { + if (_offscreen) { + free(_offscreen); + _offscreen = 0; + } + + if (_sclscreen) { + SDL_FreeSurface(_sclscreen); + _sclscreen = 0; + } + + if (_screen) { + // freed by SDL_Quit() + _screen = 0; + } +} + +void SystemStub_SDL::switchGfxMode(bool fullscreen, uint8 scaler) { + + SDL_Surface *prev_sclscreen = _sclscreen; + SDL_FreeSurface(_screen); + _fullscreen = fullscreen; + _scaler = scaler; + prepareGfxMode(); + SDL_BlitSurface(prev_sclscreen, NULL, _sclscreen, NULL); + SDL_FreeSurface(prev_sclscreen); +} + +void SystemStub_SDL::flipGfx() { + uint16 scanline[256]; + assert(_screenW <= 256); + uint16 *p = (uint16 *)_offscreen + _screenW + 1; + for (int y = 0; y < _screenH; ++y) { + p += _screenW; + for (int x = 0; x < _screenW; ++x) { + scanline[x] = *--p; + } + memcpy(p, scanline, _screenW * sizeof(uint16)); + p += _screenW; + } + forceGfxRedraw(); +} + +void SystemStub_SDL::forceGfxRedraw() { + _numBlitRects = 1; + _blitRects[0].x = 0; + _blitRects[0].y = 0; + _blitRects[0].w = _screenW; + _blitRects[0].h = _screenH; +} + +void SystemStub_SDL::drawRect(SDL_Rect *rect, uint8 color, uint16 *dst, uint16 dstPitch) { + dstPitch >>= 1; + int x1 = rect->x; + int y1 = rect->y; + int x2 = rect->x + rect->w - 1; + int y2 = rect->y + rect->h - 1; + assert(x1 >= 0 && x2 < _screenW && y1 >= 0 && y2 < _screenH); + for (int i = x1; i <= x2; ++i) { + *(dst + y1 * dstPitch + i) = *(dst + y2 * dstPitch + i) = _pal[color]; + } + for (int j = y1; j <= y2; ++j) { + *(dst + j * dstPitch + x1) = *(dst + j * dstPitch + x2) = _pal[color]; + } +} diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/unpack.cpp b/project/jni/application/REminiscence/REminiscence-0.1.9/unpack.cpp new file mode 100644 index 000000000..a93bc5f2c --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/unpack.cpp @@ -0,0 +1,103 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "unpack.h" + + +static int rcr(UnpackCtx *uc, int CF) { + int rCF = (uc->chk & 1); + uc->chk >>= 1; + if (CF) { + uc->chk |= 0x80000000; + } + return rCF; +} + +static int next_chunk(UnpackCtx *uc) { + int CF = rcr(uc, 0); + if (uc->chk == 0) { + uc->chk = READ_BE_UINT32(uc->src); uc->src -= 4; + uc->crc ^= uc->chk; + CF = rcr(uc, 1); + } + return CF; +} + +static uint16 get_code(UnpackCtx *uc, uint8 num_chunks) { + uint16 c = 0; + while (num_chunks--) { + c <<= 1; + if (next_chunk(uc)) { + c |= 1; + } + } + return c; +} + +static void dec_unk1(UnpackCtx *uc, uint8 num_chunks, uint8 add_count) { + uint16 count = get_code(uc, num_chunks) + add_count + 1; + uc->datasize -= count; + while (count--) { + *uc->dst = (uint8)get_code(uc, 8); + --uc->dst; + } +} + +static void dec_unk2(UnpackCtx *uc, uint8 num_chunks) { + uint16 i = get_code(uc, num_chunks); + uint16 count = uc->size + 1; + uc->datasize -= count; + while (count--) { + *uc->dst = *(uc->dst + i); + --uc->dst; + } +} + +bool delphine_unpack(uint8 *dst, const uint8 *src, int len) { + UnpackCtx uc; + uc.src = src + len - 4; + uc.datasize = READ_BE_UINT32(uc.src); uc.src -= 4; + uc.dst = dst + uc.datasize - 1; + uc.size = 0; + uc.crc = READ_BE_UINT32(uc.src); uc.src -= 4; + uc.chk = READ_BE_UINT32(uc.src); uc.src -= 4; + debug(DBG_UNPACK, "delphine_unpack() crc=0x%X datasize=0x%X", uc.crc, uc.datasize); + uc.crc ^= uc.chk; + do { + if (!next_chunk(&uc)) { + uc.size = 1; + if (!next_chunk(&uc)) { + dec_unk1(&uc, 3, 0); + } else { + dec_unk2(&uc, 8); + } + } else { + uint16 c = get_code(&uc, 2); + if (c == 3) { + dec_unk1(&uc, 8, 8); + } else if (c < 2) { + uc.size = c + 2; + dec_unk2(&uc, c + 9); + } else { + uc.size = get_code(&uc, 8); + dec_unk2(&uc, 12); + } + } + } while (uc.datasize > 0); + return uc.crc == 0; +} diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/unpack.h b/project/jni/application/REminiscence/REminiscence-0.1.9/unpack.h new file mode 100644 index 000000000..dc684cd81 --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/unpack.h @@ -0,0 +1,36 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __UNPACK_H__ +#define __UNPACK_H__ + +#include "intern.h" + + +struct UnpackCtx { + int size, datasize; + uint32 crc; + uint32 chk; + uint8 *dst; + const uint8 *src; +}; + +extern bool delphine_unpack(uint8 *dst, const uint8 *src, int len); + + +#endif // __UNPACK_H__ diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/util.cpp b/project/jni/application/REminiscence/REminiscence-0.1.9/util.cpp new file mode 100644 index 000000000..03346f173 --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/util.cpp @@ -0,0 +1,74 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include "util.h" +#include + + +uint16 g_debugMask; + +void debug(uint16 cm, const char *msg, ...) { + char buf[1024]; + if (cm & g_debugMask) { + va_list va; + va_start(va, msg); + vsprintf(buf, msg, va); + va_end(va); + printf("%s\n", buf); + fflush(stdout); + __android_log_print(ANDROID_LOG_INFO, "REminiscence", "%s", buf); + } +} + +void error(const char *msg, ...) { + char buf[1024]; + va_list va; + va_start(va, msg); + vsprintf(buf, msg, va); + va_end(va); + fprintf(stderr, "ERROR: %s!\n", buf); + __android_log_print(ANDROID_LOG_INFO, "REminiscence", "ERROR: %s", buf); + exit(-1); +} + +void warning(const char *msg, ...) { + char buf[1024]; + va_list va; + va_start(va, msg); + vsprintf(buf, msg, va); + va_end(va); + fprintf(stderr, "WARNING: %s!\n", buf); + __android_log_print(ANDROID_LOG_INFO, "REminiscence", "WARNING: %s", buf); +} + +void string_lower(char *p) { + for (; *p; ++p) { + if (*p >= 'A' && *p <= 'Z') { + *p += 'a' - 'A'; + } + } +} + +void string_upper(char *p) { + for (; *p; ++p) { + if (*p >= 'a' && *p <= 'z') { + *p += 'A' - 'a'; + } + } +} diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/util.h b/project/jni/application/REminiscence/REminiscence-0.1.9/util.h new file mode 100644 index 000000000..9fa22022d --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/util.h @@ -0,0 +1,48 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __UTIL_H__ +#define __UTIL_H__ + +#include "intern.h" + +enum { + DBG_INFO = 1 << 0, + DBG_RES = 1 << 1, + DBG_MENU = 1 << 2, + DBG_UNPACK = 1 << 3, + DBG_PGE = 1 << 4, + DBG_VIDEO = 1 << 5, + DBG_GAME = 1 << 6, + DBG_COL = 1 << 7, + DBG_SND = 1 << 8, + DBG_CUT = 1 << 9, + DBG_MOD = 1 << 10, + DBG_SFX = 1 << 11 +}; + +extern uint16 g_debugMask; + +extern void debug(uint16 cm, const char *msg, ...); +extern void error(const char *msg, ...); +extern void warning(const char *msg, ...); + +extern void string_lower(char *p); +extern void string_upper(char *p); + +#endif // __UTIL_H__ diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/video.cpp b/project/jni/application/REminiscence/REminiscence-0.1.9/video.cpp new file mode 100644 index 000000000..1325e8d6e --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/video.cpp @@ -0,0 +1,411 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "resource.h" +#include "systemstub.h" +#include "video.h" + + +Video::Video(Resource *res, SystemStub *stub) + : _res(res), _stub(stub) { + _frontLayer = (uint8 *)malloc(GAMESCREEN_W * GAMESCREEN_H); + memset(_frontLayer, 0, GAMESCREEN_W * GAMESCREEN_H); + _backLayer = (uint8 *)malloc(GAMESCREEN_W * GAMESCREEN_H); + memset(_backLayer, 0, GAMESCREEN_W * GAMESCREEN_H); + _tempLayer = (uint8 *)malloc(GAMESCREEN_W * GAMESCREEN_H); + memset(_tempLayer, 0, GAMESCREEN_W * GAMESCREEN_H); + _tempLayer2 = (uint8 *)malloc(GAMESCREEN_W * GAMESCREEN_H); + memset(_tempLayer2, 0, GAMESCREEN_W * GAMESCREEN_H); + _screenBlocks = (uint8 *)malloc((GAMESCREEN_W / SCREENBLOCK_W) * (GAMESCREEN_H / SCREENBLOCK_H)); + memset(_screenBlocks, 0, (GAMESCREEN_W / SCREENBLOCK_W) * (GAMESCREEN_H / SCREENBLOCK_H)); + _fullRefresh = true; + _shakeOffset = 0; + _charFrontColor = 0; + _charTransparentColor = 0; + _charShadowColor = 0; +} + +Video::~Video() { + free(_frontLayer); + free(_backLayer); + free(_tempLayer); + free(_tempLayer2); + free(_screenBlocks); +} + +void Video::markBlockAsDirty(int16 x, int16 y, uint16 w, uint16 h) { + debug(DBG_VIDEO, "Video::markBlockAsDirty(%d, %d, %d, %d)", x, y, w, h); + assert(x >= 0 && x + w <= GAMESCREEN_W && y >= 0 && y + h <= GAMESCREEN_H); + int bx1 = x / SCREENBLOCK_W; + int by1 = y / SCREENBLOCK_H; + int bx2 = (x + w - 1) / SCREENBLOCK_W; + int by2 = (y + h - 1) / SCREENBLOCK_H; + assert(bx2 < GAMESCREEN_W / SCREENBLOCK_W && by2 < GAMESCREEN_H / SCREENBLOCK_H); + for (; by1 <= by2; ++by1) { + for (int i = bx1; i <= bx2; ++i) { + _screenBlocks[by1 * (GAMESCREEN_W / SCREENBLOCK_W) + i] = 2; + } + } +} + +void Video::updateScreen() { + debug(DBG_VIDEO, "Video::updateScreen()"); +// _fullRefresh = true; + if (_fullRefresh) { + _stub->copyRect(0, 0, Video::GAMESCREEN_W, Video::GAMESCREEN_H, _frontLayer, 256); + _stub->updateScreen(_shakeOffset); + _fullRefresh = false; + } else { + int i, j; + int count = 0; + uint8 *p = _screenBlocks; + for (j = 0; j < GAMESCREEN_H / SCREENBLOCK_H; ++j) { + uint16 nh = 0; + for (i = 0; i < GAMESCREEN_W / SCREENBLOCK_W; ++i) { + if (p[i] != 0) { + --p[i]; + ++nh; + } else if (nh != 0) { + int16 x = (i - nh) * SCREENBLOCK_W; + _stub->copyRect(x, j * SCREENBLOCK_H, nh * SCREENBLOCK_W, SCREENBLOCK_H, _frontLayer, 256); + nh = 0; + ++count; + } + } + if (nh != 0) { + int16 x = (i - nh) * SCREENBLOCK_W; + _stub->copyRect(x, j * SCREENBLOCK_H, nh * SCREENBLOCK_W, SCREENBLOCK_H, _frontLayer, 256); + ++count; + } + p += GAMESCREEN_W / SCREENBLOCK_W; + } + if (count != 0) { + _stub->updateScreen(_shakeOffset); + } + } + if (_shakeOffset != 0) { + _shakeOffset = 0; + _fullRefresh = true; + } +} + +void Video::fullRefresh() { + debug(DBG_VIDEO, "Video::fullRefresh()"); + _fullRefresh = true; + memset(_screenBlocks, 0, (GAMESCREEN_W / SCREENBLOCK_W) * (GAMESCREEN_H / SCREENBLOCK_H)); +} + +void Video::fadeOut() { + debug(DBG_VIDEO, "Video::fadeOut()"); + for (int step = 16; step >= 0; --step) { + for (int c = 0; c < 256; ++c) { + Color col; + _stub->getPaletteEntry(c, &col); + col.r = col.r * step >> 4; + col.g = col.g * step >> 4; + col.b = col.b * step >> 4; + _stub->setPaletteEntry(c, &col); + } + fullRefresh(); + updateScreen(); + _stub->sleep(50); + } +} + +void Video::setPaletteSlotBE(int palSlot, int palNum) { + debug(DBG_VIDEO, "Video::setPaletteSlotBE()"); + const uint8 *p = _res->_pal + palNum * 0x20; + for (int i = 0; i < 16; ++i) { + uint16 color = READ_BE_UINT16(p); p += 2; + uint8 t = (color == 0) ? 0 : 3; + Color c; + c.r = ((color & 0x00F) << 2) | t; + c.g = ((color & 0x0F0) >> 2) | t; + c.b = ((color & 0xF00) >> 6) | t; + _stub->setPaletteEntry(palSlot * 0x10 + i, &c); + } +} + +void Video::setPaletteSlotLE(int palSlot, const uint8 *palData) { + debug(DBG_VIDEO, "Video::setPaletteSlotLE()"); + for (int i = 0; i < 16; ++i) { + uint16 color = READ_LE_UINT16(palData); palData += 2; + Color c; + c.b = (color & 0x00F) << 2; + c.g = (color & 0x0F0) >> 2; + c.r = (color & 0xF00) >> 6; + _stub->setPaletteEntry(palSlot * 0x10 + i, &c); + } +} + +void Video::setTextPalette() { + debug(DBG_VIDEO, "Video::setTextPalette()"); + const uint8 *p = _textPal; + for (int i = 0; i < 16; ++i) { + uint16 color = READ_LE_UINT16(p); p += 2; + Color c; + c.b = (color & 0x00F) << 2; + c.g = (color & 0x0F0) >> 2; + c.r = (color & 0xF00) >> 6; + _stub->setPaletteEntry(0xE0 + i, &c); + } +} + +void Video::setPalette0xF() { + debug(DBG_VIDEO, "Video::setPalette0xF()"); + const uint8 *p = _palSlot0xF; + for (int i = 0; i < 16; ++i) { + Color c; + c.r = *p++ >> 2; + c.g = *p++ >> 2; + c.b = *p++ >> 2; + _stub->setPaletteEntry(0xF0 + i, &c); + } +} + +void Video::copyLevelMap(uint16 room) { + debug(DBG_VIDEO, "Video::copyLevelMap(%d)", room); + assert(room < 0x40); + int32 off = READ_LE_UINT32(_res->_map + room * 6); + if (off == 0) { + error("Invalid room %d", room); + } + bool packed = true; + if (off < 0) { + off = -off; + packed = false; + } + const uint8 *p = _res->_map + off; + _mapPalSlot1 = *p++; + _mapPalSlot2 = *p++; + _mapPalSlot3 = *p++; + _mapPalSlot4 = *p++; + if (packed) { + uint8 *vid = _frontLayer; + for (int i = 0; i < 4; ++i) { + uint16 sz = READ_LE_UINT16(p); p += 2; + decodeLevelMap(sz, p, _res->_memBuf); p += sz; + memcpy(vid, _res->_memBuf, 256 * 56); + vid += 256 * 56; + } + } else { + for (int i = 0; i < 4; ++i) { + for (int y = 0; y < 224; ++y) { + for (int x = 0; x < 64; ++x) { + _frontLayer[i + x * 4 + 256 * y] = p[256 * 56 * i + x + 64 * y]; + } + } + } + } + memcpy(_backLayer, _frontLayer, Video::GAMESCREEN_W * Video::GAMESCREEN_H); +} + +void Video::decodeLevelMap(uint16 sz, const uint8 *src, uint8 *dst) { + debug(DBG_VIDEO, "Video::decodeLevelMap() sz = 0x%X", sz); + const uint8 *end = src + sz; + while (src < end) { + int16 code = (int8)*src++; + if (code < 0) { + int len = 1 - code; + memset(dst, *src++, len); + dst += len; + } else { + ++code; + memcpy(dst, src, code); + src += code; + dst += code; + } + } +} + +void Video::setLevelPalettes() { + debug(DBG_VIDEO, "Video::setLevelPalettes()"); + if (_unkPalSlot2 == 0) { + _unkPalSlot2 = _mapPalSlot3; + } + if (_unkPalSlot1 == 0) { + _unkPalSlot1 = _mapPalSlot3; + } + setPaletteSlotBE(0x0, _mapPalSlot1); + setPaletteSlotBE(0x1, _mapPalSlot2); + setPaletteSlotBE(0x2, _mapPalSlot3); + setPaletteSlotBE(0x3, _mapPalSlot4); + if (_unkPalSlot1 == _mapPalSlot3) { + setPaletteSlotLE(4, _conradPal1); + } else { + setPaletteSlotLE(4, _conradPal2); + } + // slot 5 is monster palette + setPaletteSlotBE(0x8, _mapPalSlot1); + setPaletteSlotBE(0x9, _mapPalSlot2); + setPaletteSlotBE(0xA, _unkPalSlot2); + setPaletteSlotBE(0xB, _mapPalSlot4); + // slots 0xC and 0xD are cutscene palettes + setTextPalette(); +} + +void Video::drawSpriteSub1(const uint8 *src, uint8 *dst, int pitch, int h, int w, uint8 colMask) { + debug(DBG_VIDEO, "Video::drawSpriteSub1(0x%X, 0x%X, 0x%X, 0x%X)", pitch, w, h, colMask); + while (h--) { + for (int i = 0; i < w; ++i) { + if (src[i] != 0) { + dst[i] = src[i] | colMask; + } + } + src += pitch; + dst += 256; + } +} + +void Video::drawSpriteSub2(const uint8 *src, uint8 *dst, int pitch, int h, int w, uint8 colMask) { + debug(DBG_VIDEO, "Video::drawSpriteSub2(0x%X, 0x%X, 0x%X, 0x%X)", pitch, w, h, colMask); + while (h--) { + for (int i = 0; i < w; ++i) { + if (src[-i] != 0) { + dst[i] = src[-i] | colMask; + } + } + src += pitch; + dst += 256; + } +} + +void Video::drawSpriteSub3(const uint8 *src, uint8 *dst, int pitch, int h, int w, uint8 colMask) { + debug(DBG_VIDEO, "Video::drawSpriteSub3(0x%X, 0x%X, 0x%X, 0x%X)", pitch, w, h, colMask); + while (h--) { + for (int i = 0; i < w; ++i) { + if (src[i] != 0 && !(dst[i] & 0x80)) { + dst[i] = src[i] | colMask; + } + } + src += pitch; + dst += 256; + } +} + +void Video::drawSpriteSub4(const uint8 *src, uint8 *dst, int pitch, int h, int w, uint8 colMask) { + debug(DBG_VIDEO, "Video::drawSpriteSub4(0x%X, 0x%X, 0x%X, 0x%X)", pitch, w, h, colMask); + while (h--) { + for (int i = 0; i < w; ++i) { + if (src[-i] != 0 && !(dst[i] & 0x80)) { + dst[i] = src[-i] | colMask; + } + } + src += pitch; + dst += 256; + } +} + +void Video::drawSpriteSub5(const uint8 *src, uint8 *dst, int pitch, int h, int w, uint8 colMask) { + debug(DBG_VIDEO, "Video::drawSpriteSub5(0x%X, 0x%X, 0x%X, 0x%X)", pitch, w, h, colMask); + while (h--) { + for (int i = 0; i < w; ++i) { + if (src[i * pitch] != 0 && !(dst[i] & 0x80)) { + dst[i] = src[i * pitch] | colMask; + } + } + ++src; + dst += 256; + } +} + +void Video::drawSpriteSub6(const uint8 *src, uint8 *dst, int pitch, int h, int w, uint8 colMask) { + debug(DBG_VIDEO, "Video::drawSpriteSub6(0x%X, 0x%X, 0x%X, 0x%X)", pitch, w, h, colMask); + while (h--) { + for (int i = 0; i < w; ++i) { + if (src[-i * pitch] != 0 && !(dst[i] & 0x80)) { + dst[i] = src[-i * pitch] | colMask; + } + } + ++src; + dst += 256; + } +} + +void Video::drawChar(uint8 c, int16 y, int16 x) { + debug(DBG_VIDEO, "Video::drawChar(0x%X, %d, %d)", c, y, x); + y *= 8; + x *= 8; + const uint8 *src = _res->_fnt + (c - 32) * 32; + uint8 *dst = _frontLayer + x + 256 * y; + for (int h = 0; h < 8; ++h) { + for (int i = 0; i < 4; ++i) { + uint8 c1 = (*src & 0xF0) >> 4; + uint8 c2 = (*src & 0x0F) >> 0; + ++src; + + if (c1 != 0) { + if (c1 != 2) { + *dst = _charFrontColor; + } else { + *dst = _charShadowColor; + } + } else if (_charTransparentColor != 0xFF) { + *dst = _charTransparentColor; + } + ++dst; + + if (c2 != 0) { + if (c2 != 2) { + *dst = _charFrontColor; + } else { + *dst = _charShadowColor; + } + } else if (_charTransparentColor != 0xFF) { + *dst = _charTransparentColor; + } + ++dst; + } + dst += 256 - 8; + } +} + +const char *Video::drawString(const char *str, int16 x, int16 y, uint8 col) { + debug(DBG_VIDEO, "Video::drawString('%s', %d, %d, 0x%X)", str, x, y, col); + int len = 0; + int offset = y * 256 + x; + uint8 *dst = _frontLayer + offset; + while (1) { + uint8 c = *str++; + if (c == 0 || c == 0xB || c == 0xA) { + break; + } + uint8 *dst_char = dst; + const uint8 *src = _res->_fnt + (c - 32) * 32; + for (int h = 0; h < 8; ++h) { + for (int w = 0; w < 4; ++w) { + uint8 c1 = (*src & 0xF0) >> 4; + uint8 c2 = (*src & 0x0F) >> 0; + ++src; + if (c1 != 0) { + *dst_char = (c1 == 0xF) ? col : (0xE0 + c1); + } + ++dst_char; + if (c2 != 0) { + *dst_char = (c2 == 0xF) ? col : (0xE0 + c2); + } + ++dst_char; + } + dst_char += 256 - 8; + } + dst += 8; // character width + ++len; + } + markBlockAsDirty(x, y, len * 8, 8); + return str - 1; +} diff --git a/project/jni/application/REminiscence/REminiscence-0.1.9/video.h b/project/jni/application/REminiscence/REminiscence-0.1.9/video.h new file mode 100644 index 000000000..534dbf5e9 --- /dev/null +++ b/project/jni/application/REminiscence/REminiscence-0.1.9/video.h @@ -0,0 +1,82 @@ +/* REminiscence - Flashback interpreter + * Copyright (C) 2005-2007 Gregory Montoir + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __VIDEO_H__ +#define __VIDEO_H__ + +#include "intern.h" + +struct Resource; +struct SystemStub; + +struct Video { + enum { + GAMESCREEN_W = 256, + GAMESCREEN_H = 224, + SCREENBLOCK_W = 8, + SCREENBLOCK_H = 8, + CHAR_W = 8, + CHAR_H = 8 + }; + + static const uint8 _conradPal1[]; + static const uint8 _conradPal2[]; + static const uint8 _textPal[]; + static const uint8 _palSlot0xF[]; + + Resource *_res; + SystemStub *_stub; + + uint8 *_frontLayer; + uint8 *_backLayer; + uint8 *_tempLayer; + uint8 *_tempLayer2; + uint8 _unkPalSlot1, _unkPalSlot2; + uint8 _mapPalSlot1, _mapPalSlot2, _mapPalSlot3, _mapPalSlot4; + uint8 _charFrontColor; + uint8 _charTransparentColor; + uint8 _charShadowColor; + uint8 *_screenBlocks; + bool _fullRefresh; + uint8 _shakeOffset; + + Video(Resource *res, SystemStub *stub); + ~Video(); + + void markBlockAsDirty(int16 x, int16 y, uint16 w, uint16 h); + void updateScreen(); + void fullRefresh(); + void fadeOut(); + void setPaletteSlotBE(int palSlot, int palNum); + void setPaletteSlotLE(int palSlot, const uint8 *palData); + void setTextPalette(); + void setPalette0xF(); + void copyLevelMap(uint16 room); + void decodeLevelMap(uint16 sz, const uint8 *src, uint8 *dst); + void setLevelPalettes(); + void drawSpriteSub1(const uint8 *src, uint8 *dst, int pitch, int h, int w, uint8 colMask); + void drawSpriteSub2(const uint8 *src, uint8 *dst, int pitch, int h, int w, uint8 colMask); + void drawSpriteSub3(const uint8 *src, uint8 *dst, int pitch, int h, int w, uint8 colMask); + void drawSpriteSub4(const uint8 *src, uint8 *dst, int pitch, int h, int w, uint8 colMask); + void drawSpriteSub5(const uint8 *src, uint8 *dst, int pitch, int h, int w, uint8 colMask); + void drawSpriteSub6(const uint8 *src, uint8 *dst, int pitch, int h, int w, uint8 colMask); + void drawChar(uint8 c, int16 y, int16 x); + const char *drawString(const char *str, int16 x, int16 y, uint8 col); +}; + +#endif // __VIDEO_H__ diff --git a/project/jni/application/REminiscence/icon.png b/project/jni/application/REminiscence/icon.png new file mode 100644 index 000000000..c0a759bed Binary files /dev/null and b/project/jni/application/REminiscence/icon.png differ