pacman-10.orig/ 40755 1747 1750 0 6261602244 13300 5ustar clameterclameterpacman-10.orig/COPYING100644 1747 1750 43070 6000072642 14446 0ustar clameterclameter GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, 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) 19yy 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., 675 Mass Ave, Cambridge, MA 02139, 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) 19yy 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. pacman-10.orig/Copyright100644 1747 1750 1477 6000113606 15267 0ustar clameterclameter PACMAN Copyright (C) 1995 Roar Thronaes email: roart@nvg.unit.no Copyright applies to *.h and *.cc files, even though no copyright is stated in them. 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., 675 Mass Ave, Cambridge, MA 02139, USA. (see COPYING) pacman-10.orig/Imakefile100644 1747 1750 2350 6005241260 15177 0ustar clameterclameterSRCS = arg.cc blank.cc board.cc bonus.cc bonuslif.cc bonuspnt.cc \ colour.cc corner.cc corner1.cc corner2.cc corner3.cc \ corner4.cc cross.cc direc.cc dynamiel.cc e0.cc e180.cc e270.cc \ e90.cc element.cc food.cc gamedata.cc gblank.cc gboard.cc \ gbonlife.cc gbonpnt.cc gdynelem.cc gfood.cc gghost.cc ghost.cc \ gpacman.cc graphele.cc gspecwal.cc gsupfood.cc horiwall.cc \ pac.cc pacman.cc point.cc specwall.cc supefood.cc t0.cc \ t180.cc t270.cc t90.cc timing.cc usrinter.cc vertwall.cc \ walls.cc OBJS = arg.o blank.o board.o bonus.o bonuslif.o bonuspnt.o \ colour.o corner.o corner1.o corner2.o corner3.o \ corner4.o cross.o direc.o dynamiel.o e0.o e180.o e270.o \ e90.o element.o food.o gamedata.o gblank.o gboard.o \ gbonlife.o gbonpnt.o gdynelem.o gfood.o gghost.o ghost.o \ gpacman.o graphele.o gspecwal.o gsupfood.o horiwall.o \ pac.o pacman.o point.o specwall.o supefood.o t0.o \ t180.o t270.o t90.o timing.o usrinter.o vertwall.o \ walls.o CURSES = -lcurses -ltermcap /* most X11 screens are rather large, you might wisht to use "double" mode */ /* CXXEXTRA_DEFINES = -DDOUBLE */ NormalProgramTarget(pacman,$(OBJS),$(DEPXLIB),$(CURSES),$(XLIB)) InstallProgram(pacman,$(BINDIR)) InstallManPage(pacman,$(MANDIR)) DependTarget() pacman-10.orig/README100644 1747 1750 3605 6007243666 14270 0ustar clameterclameterPACMAN You are Pacman, and you are supposed to eat all the small dots to get to the next level. You are also supposed to keep away from the ghosts, if they take you, you lose one life, unless you have eaten a large dot, then you can, for a limited amount of time, chase and eat the ghosts. There is also bonus available, for a limited amount of time. An X gives just points, but a little pacman gives an extra life. You use either keyboard or mouse. Default from start is keyboard. Keyboard mode: To move use arrows, to quit, press q, to use mouse, press m Mouse mode: To move, move mouse, to quit, press RButton, to use keyboard, press LButton Details: When pacman has moved to a new place, if you want it to change it's moving direction, hit key/move mouse until it has moved. STARTUP BW/COLOURS Colouring is default, it may alse work on grey monitors If it don't work, and you got to use grey, write pacman grey NOTE (The mentioned #defines is in basis.h.) The pacman window puts itself on top, comment out #define RAISE if you don't like it. The pacman program can deal with exposing, that is, redrawing itself after overlapping with other windows, but it's naive, primitive and far from perfect, comment out #define XPOSSE if you don't need it. If you want the game to run smooth, don't use a loaded machine/server. And if you want a larger window, uncomment #define DOUBLE (you can also do the same by uncommenting in the Imakefile). COMPILING Two possibilities: use xmkmf or if that doesn't work, gen: xmkmf: xmkmf -a # this makes the Makefile and the dependencies # continue and # try ordinary make even if xmkmf gives errors make; make install; make clean #this uses Imakefile, which I am very fresh at... gen: #Program gen uses makeg to make the makefile. #then use ordinary make. #It may have to be customized because of #individual compiler configurations. gen make pacman-10.orig/arg.cc100644 1747 1750 224 5737136232 14441 0ustar clameterclameter#include"arg.h" int Argument::argc=0; //resetters char** Argument::args=0; Argument::Argument(int c, char **s) { //initializes; argc=c; args=s; } pacman-10.orig/arg.h100644 1747 1750 367 5737136150 14312 0ustar clameterclameter#ifndef __arg_h_ #define __arg_h_ #include"object.h" class Argument : public Object { public: static int argc; //number of argument static char **args; //pointer to argument strings Argument(int, char **); //argument constructor }; #endif pacman-10.orig/basis.h100644 1747 1750 231 6003545220 14615 0ustar clameterclameter#define XWIN //#define MSWIN //#define VTX #ifdef VTX #define UNIX #endif #ifdef XWIN #define UNIX #endif #define RAISE #define XPOSSE //#define DOUBLE pacman-10.orig/blank.cc100644 1747 1750 73 5734660204 14737 0ustar clameterclameter#include"blank.h" #include"gblank.h" Blank::Blank() { } pacman-10.orig/blank.h100644 1747 1750 345 5737136306 14627 0ustar clameterclameter#ifndef __blank_h_ #define __blank_h_ #include"staticel.h" class Blank : public StaticElement { public: Blank(); //constructor typ is_a(void) {return classBlank;} //what it is }; #endif pacman-10.orig/board.cc100644 1747 1750 12661 6002773552 15025 0ustar clameterclameter#include"board.h" #include"pac.h" #include #include #include Board* Board::_instance=0; //initializers liststruct* Board::list=0; liststruct* Board::oldlist=0; Element* Board::board[BOARDWIDTH][BOARDHEIGHT]=initen; G_Board* Board::gboard=0; UserInterface* Board::u=0; Board* Board::instance() { //returns the pointer to the instance if (_instance==0) _instance=new Board; return _instance; } Board::Board() { //constructor gboard=G_Board::instance(); //get instances of what we need u=UserInterface::instance(); if (!u) { pacexit("no userinterface"); } list=0; //initializers to null int i,j; for(j=0;jgset(gboard->graphele(boards[level-1],i,j)); if (board[i][j]) delete board[i][j]; board[i][j]=g; } } void Board::replace(Element*e) {} int i,j; Board::~Board() { //destructor delete gboard; for(j=0;jdraw(i,j); list=oldlist=0; //reset spritelists u->waitsync(); //don't return until everything is drawn } void Board::delta_draw(void) { //draw changes of the board int xx,yy; //coordinates int zero; liststruct *next, *oldnext, *temp, *oldtemp; //pointers to liststruct/element, current and to be displayed, and belonging temporaries oldtemp=oldlist; while (oldtemp) { //traverse the list of last sprites displayed xx=oldtemp->x; //get coordinates of current element yy=oldtemp->y; temp=list; // traverse the list of sprites to be display and check coordinates while (temp && (xx!=temp->x || yy!=temp->y)) temp=temp->next; zero=(xx==0 && yy==0); //if coordinates are both zero if (!temp) board[xx][yy]->draw(xx,yy); //if temp==0, that is, if there is no //new sprite to be displayed where //a sprite now is display, then //redraw the element from the board oldtemp=oldtemp->next; } temp=list; while (temp) { //traverse the list of sprites to be displayed xx=temp->x; //get coordinates of current element yy=temp->y; oldtemp=oldlist; // traverse the list of sprites currently display and check coordinates and if equal if the current and new grafical ids are the equal while (oldtemp && (xx!=oldtemp->x || yy!=oldtemp->y || temp->gid!=oldtemp->gid)) oldtemp=oldtemp->next; //if (oldtemp) printf("xxx%d %d %d\n",oldtemp->g,oldtemp->x,oldtemp->y); if (!oldtemp) temp->g->draw();//if old temp==0, that //is, if there is no identical //new sprite to be displayed where //a sprite now is display, then //display the new sprite temp=temp->next; } oldtemp=oldlist; while (oldtemp) { //delete elements in the now previous sprite list oldnext=oldtemp->next; delete oldnext; oldtemp=oldnext; } if (zero && oldlist) { //personal thingie used for debug, not useful oldtemp=oldlist; while (oldtemp) { pacwarning("zero"); // printf("%d %d %d ",oldtemp->gid,oldtemp->x,oldtemp->y); oldtemp=oldtemp->next; } // printf("\n"); temp=list; while (temp) { pacwarning("zero"); // printf("%d %d %d ",temp->gid,temp->x,temp->y); temp=temp->next; } // printf("\n\n"); } oldlist=list; list=0; //printf("here4\n"); u->waitsync(); //don't return until everything is drawn } typ Board::what_is(int xx,int yy) {//what "class" element at coordinates is return board[xx][yy]->is_a(); //return what kind of element is at xx,yy } void Board::eat(int xx,int yy) { //removes whats at coordinates if (board[xx][yy]) delete board[xx][yy];//delete the element board[xx][yy]=new Blank;//get a new one board[xx][yy]->gset(gboard->graphele(' '));//set it to space=blank } void Board::sprite(DynamicElement *g) { //let dynamicelement be a sprite liststruct *temp=0,*last=0; //resets to null liststruct *ny=new liststruct; //get a new liststruct ny->g=g; //get pointer to element ny->gid=g->getgid(); //get it's grafical id g->getxy(&ny->x,&ny->y); //and coordinates temp=list; while (temp && (temp->x!=ny->x || temp->y!=ny->y)) {//try to find next last last=temp; temp=temp->next; } //insert at last place if (!temp) { //if the list was null it must be first ny->next=temp; if (temp==list) list=ny; else //put at back last->next=ny; } /* ny->next=list; list=ny; */ /* temp=list; while (temp) { printf("%d %d\n",temp,temp->g); // temp->g->draw(); printf("%d %d\n",temp->x,temp->y); printf("hehere\n"); temp=temp->next; } printf("\n\n"); */ } pacman-10.orig/board.h100644 1747 1750 47446 5746576654 14722 0ustar clameterclameter#ifndef __board_h_ #define __board_h_ //#define LEVELS 3 #include"object.h" #include"gboard.h" class Board; #include"pac.h" #include"types.h" #include"element.h" #include"blank.h" #include"walls.h" #include"specwall.h" #include"food.h" #include"supefood.h" #include"sizes.h" #include"usrinter.h" #include"dynamiel.h" static int foods=168; //how many food items there are on each board #define initen {0} static char boards[LEVELS][BOARDHEIGHT+1][BOARDWIDTH+1]= {{{"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}, {"Oo . . .O. . . . . . . .O. . . oO"}, {"O OOOOO O OOOOOOOOOOOOO O OOOOO O"}, {"O.O. . . . . . . . . . . . . .O.O"}, {"O O O O OOO OOOOOOOOO OOO O O O O"}, {"O. .O.O. . . . . . . . . .O.O. .O"}, {"OOO O O OOOOO OOOOO OOOOO O O OOO"}, {"O. .O. . . .O. . . .O. . . .O. .O"}, {"O O O OOOOO O O___O O OOOOO O O O"}, {"O.O. . . .O.O.O O.O.O. . . .O.O"}, {"O O OOOOO O O O O O O OOOOO O O"}, {"O.O. . . .O.O.O O.O.O. . . .O.O"}, {"O OOO O O O O OOOOO O O O O OOO O"}, {"O. . .O.O. . . . . . . .O.O. . .O"}, {"O OOOOO O O OOOOOOOOO O O OOOOO O"}, {"O. . . . .O. . . . . .O. . . . .O"}, {"O OOOOOOO O OOOOOOOOO O OOOOOOO O"}, {"O. .O. . . . . . . . . . . .O. .O"}, {"OOO O OOO O OOOOOOOOO O OOO O OOO"}, {"O. .O. . .O. . . . . .O. . .O. .O"}, {"O OOOOOOO O OOOOOOOOO O OOOOOOO O"}, {"Oo . . . .O. . . . . .O. . . . oO"}, {"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}}, {{"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}, {"Oo . . .O. . . . . . . .O. . . oO"}, {"O OOOOO O O OOOOOOOOO O O OOOOO O"}, {"O.O. .O. .O. . . . . .O. .O. .O.O"}, {"O O O O OOO OOO O OOO OOO O O O O"}, {"O. .O.O. . . . .O. . . . .O.O. .O"}, {"OOO O O O OOO OOOOO OOO O O O OOO"}, {"O. .O. .O. .O. . . .O. .O. .O. .O"}, {"O OOOOO O O O O___O O O O OOOOO O"}, {"O.O. . . .O.O.O O.O.O. . . .O.O"}, {"O O OOOOO O O O O O O OOOOO O O"}, {"O.O. . . .O.O.O O.O.O. . . .O.O"}, {"O OOO O O O O OOOOO O O O O OOO O"}, {"O. . .O.O. . . . . . . .O.O. . .O"}, {"OOOOOOO O O OOOOOOOOO O O OOOOOOO"}, {"O. . . . .O. . . . . .O. . . . .O"}, {"O OOOOOOO O OOOOOOOOO O OOOOOOO O"}, {"O. .O. . . . . . . . . . . .O. .O"}, {"OOO O OOO O OOOOOOOOO O OOO O OOO"}, {"O. .O. . .O. . . . . .O. . .O. .O"}, {"O OOOOOOO O OOOOOOOOO O OOOOOOO O"}, {"Oo . . . .O. . . . . .O. . . . oO"}, {"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}}, {{"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}, {"Oo . . .O. . . . . . . .O. . . oO"}, {"O OOOOO O OOOOO O OOOOO O OOOOO O"}, {"O.O. .O. . . . .O. . . . .O. .O.O"}, {"O O O OOOOOOO O O O OOOOOOO O O O"}, {"O. .O.O. . . .O. .O. . . .O.O. .O"}, {"OOO O O O OOO OOOOO OOO O O O OOO"}, {"O. .O. .O. . . . . . . .O. .O. .O"}, {"O O OOO OOO O O___O O OOO OOO O O"}, {"O.O. . . .O.O.O O.O.O. . . .O.O"}, {"O O OOOOO O O O O O O OOOOO O O"}, {"O.O. . . .O.O.O O.O.O. . . .O.O"}, {"O OOO O O O O OOOOO O O O O OOO O"}, {"O. . .O.O. . . . . . . .O.O. . .O"}, {"O OOOOO O O OOOOOOOOO O O OOOOO O"}, {"O. . . . .O. . . . . .O. . . . .O"}, {"O OOOOOOO O OOOOOOOOO O OOOOOOO O"}, {"O. .O. . .O. . . . . .O. . .O. .O"}, {"OOO O OOO O OOOOOOOOO O OOO O OOO"}, {"O. .O. . .O. . . . . .O. . .O. .O"}, {"O OOOOOOO O OOOOOOOOO O OOOOOOO O"}, {"Oo . . . .O. . . . . .O. . . . oO"}, {"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}}, {{"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}, {"Oo . . .O. . . . . . . .O. . . oO"}, {"O OOOOO O O OOOOOOOOO O O OOOOO O"}, {"O.O. .O. .O. . .O. . .O. .O. .O.O"}, {"O O O O OOOOO O O O OOOOO O O O O"}, {"O. .O.O. . . .O. .O. . . .O.O. .O"}, {"OOO O O OOOOO OOOOO OOOOO O O OOO"}, {"O. .O. . . .O. . . .O. . . .O. .O"}, {"O OOO OOOOO O O___O O OOOOO OOO O"}, {"O.O. . . .O.O.O O.O.O. . . .O.O"}, {"O O OOOOO O O O O O O OOOOO O O"}, {"O.O.O. . .O.O.O O.O.O. . .O.O.O"}, {"O O O O O O O OOOOO O O O O O O O"}, {"O.O. .O.O. . . . . . . .O.O. .O.O"}, {"O OOOOO O O OOOOOOOOO O O OOOOO O"}, {"O. . . . .O. . . . . .O. . . . .O"}, {"O OOOOOOO O OOOOOOOOO O OOOOOOO O"}, {"O. .O. . . . . . . . . . . .O. .O"}, {"OOO O OOOOO OOOOOOOOO OOOOO O OOO"}, {"O. .O. . .O. . . . . .O. . .O. .O"}, {"O OOOOOOO O OOOOOOOOO O OOOOOOO O"}, {"Oo . . . .O. . . . . .O. . . . oO"}, {"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}}, {{"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}, {"Oo . . .O. . . .O. . . .O. . . oO"}, {"O OOOOO O O OOO O OOO O O OOOOO O"}, {"O.O. .O. .O. . .O. . .O. .O. .O.O"}, {"O O O OOOOOOO O O O OOOOOOO O O O"}, {"O. .O. . . . .O. .O. . . . .O. .O"}, {"OOO O O OOOOO OOOOO OOOOO O O OOO"}, {"O. .O.O. . .O. . . .O. . .O.O. .O"}, {"O OOO OOOOO O O___O O OOOOO OOO O"}, {"O. . . . .O.O.O O.O.O. . . . .O"}, {"O OOOOOOO O O O O O O OOOOOOO O"}, {"O. .O. . .O.O.O O.O.O. . .O. .O"}, {"O O O O O O O OOOOO O O O O O O O"}, {"O.O. .O.O. . . .O. . . .O.O. .O.O"}, {"O OOOOO O O OOO O OOO O O OOOOO O"}, {"O. . . . .O.O. . . .O.O. . . . .O"}, {"O OOOOOOO O O OOOOO O O OOOOOOO O"}, {"O. .O. . . .O. . . .O. . . .O. .O"}, {"OOO O OOOOOOO OOOOO OOOOOOO O OOO"}, {"O. .O. . . .O. .O. .O. . . .O. .O"}, {"O OOOOOOO O OOO O OOO O OOOOOOO O"}, {"Oo . . . .O. . .O. . .O. . . . oO"}, {"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}}, {{"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}, {"Oo . . .O. . . . . . . .O. . . oO"}, {"O OOOOO O O O OOOOO O O O OOOOO O"}, {"O.O. .O. .O.O. .O. .O.O. .O. .O.O"}, {"O O O OOOOO O O O O O OOOOO O O O"}, {"O. .O.O. . . .O.O.O. . . .O.O. .O"}, {"OOO O O OOOOO O O O OOOOO O O OOO"}, {"O. .O.O. . . .O. .O. . . .O.O. .O"}, {"O OOO O OOO O O___O O OOO O OOO O"}, {"O. . . . .O.O.O O.O.O. . . . .O"}, {"O OOOOOOO O O O O O O OOOOOOO O"}, {"O. .O. . .O.O.O O.O.O. . .O. .O"}, {"O O O O O O O OOOOO O O O O O O O"}, {"O.O. .O.O. .O. .O. .O. .O.O. .O.O"}, {"O OOOOO OOO OOO O OOO OOO OOOOO O"}, {"O.O. . . .O. . . . . .O. . . .O.O"}, {"O O OOOOO O O OOOOO O O OOOOO O O"}, {"O. . . . . .O. . . .O. . . . . .O"}, {"OOOOOOO O OOO OOOOO OOO O OOOOOOO"}, {"O. . . .O. . . .O. . . .O. . . .O"}, {"O OOOOO O OOOOO O OOOOO O OOOOO O"}, {"Oo . . .O. . . .O. . . .O. . . oO"}, {"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}}, {{"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}, {"Oo . . .O. . . . . . . .O. . . oO"}, {"O OOOOO O OOOOOOOOOOOOO O OOOOO O"}, {"O.O. .O. .O. . .O. . .O. .O. .O.O"}, {"O O O OOOOO O O O O O OOOOO O O O"}, {"O. .O.O. . .O.O. .O.O. . .O.O. .O"}, {"OOOOO O OOOOO OOOOO OOOOO O OOOOO"}, {"O. . .O. . .O. . . .O. . .O. . .O"}, {"O OOO O OOO O O___O O OOO O OOO O"}, {"O. . . . .O.O.O O.O.O. . . . .O"}, {"OOOOOOOOO O O O O O O OOOOOOOOO"}, {"O. . . .O.O.O.O O.O.O.O. . . .O"}, {"O O OOO O O O OOOOO O O O OOO O O"}, {"O.O. .O. . .O. .O. .O. . .O. .O.O"}, {"O OOO OOOOO OOO O OOO OOOOO OOO O"}, {"O.O. . . .O. . . . . .O. . . .O.O"}, {"O O OOOOO O O OOOOO O O OOOOO O O"}, {"O. .O. . . .O. . . .O. . . .O. .O"}, {"OOOOO O O OOO OOOOO OOO O O OOOOO"}, {"O. . .O.O. . . .O. . . .O.O. . .O"}, {"O OOOOO O OOOOO O OOOOO O OOOOO O"}, {"Oo . . .O. . . .O. . . .O. . . oO"}, {"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}}, {{"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}, {"Oo . . .O. . . .O. . . .O. . . oO"}, {"O OOOOO O O OOO O OOO O O OOOOO O"}, {"O.O. .O. .O. . .O. . .O. .O. .O.O"}, {"O O O OOOOO O O O O O OOOOO O O O"}, {"O. .O.O. . .O.O. .O.O. . .O.O. .O"}, {"OOOOO O OOOOO OOOOO OOOOO O OOOOO"}, {"O. . .O. . .O. . . .O. . .O. . .O"}, {"O OOO O OOO O O___O O OOO O OOO O"}, {"O. . . . .O.O.O O.O.O. . . . .O"}, {"OOOOOOOOO O O O O O O OOOOOOOOO"}, {"O. . . .O.O.O.O O.O.O.O. . . .O"}, {"O O OOO O O O OOOOO O O O OOO O O"}, {"O.O. .O. . .O. .O. .O. . .O. .O.O"}, {"O OOO OOOOO OOO O OOO OOOOO OOO O"}, {"O.O. . . .O. . . . . .O. . . .O.O"}, {"O O OOOOO O O OOOOO O O OOOOO O O"}, {"O. .O. . . .O. . . .O. . . .O. .O"}, {"OOOOO O O OOO OOOOO OOO O O OOOOO"}, {"O. . .O.O. . . .O. . . .O.O. . .O"}, {"O OOOOO O OOOOO O OOOOO O OOOOO O"}, {"Oo . . .O. . . .O. . . .O. . . oO"}, {"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}}, {{"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}, {"Oo . . . . . . . . . . . . . . oO"}, {"O O OOOOOOOOOOOOOOOOOOOOOOOOO O O"}, {"O.O. .O. . . . .O. . . . .O. .O.O"}, {"O O O O OOO O O O O O OOO O O O O"}, {"O. .O.O. . .O.O. .O.O. . .O.O. .O"}, {"OOO O O OOOOO OOOOO OOOOO O O OOO"}, {"O. .O.O. . .O. . . .O. . .O.O. .O"}, {"O OOO O OOO O O___O O OOO O OOO O"}, {"O. . .O. .O.O.O O.O.O. .O. . .O"}, {"O OOO OOO O O O O O O OOO OOO O"}, {"O. .O. .O.O.O.O O.O.O.O. .O. .O"}, {"O O OOO O O O OOOOO O O O OOO O O"}, {"O.O. .O. . .O. .O. .O. . .O. .O.O"}, {"O OOO OOOOO OOO O OOO OOOOO OOO O"}, {"O. . . . .O. . . . . .O. . . . .O"}, {"O OOOOOOO O OOOOOOOOO O OOOOOOO O"}, {"O. .O. . .O. . . . . .O. . .O. .O"}, {"OOO O O O O OOOOOOOOO O O O O OOO"}, {"O. . .O.O.O. .O. .O. .O.O.O. . .O"}, {"O OOOOO O O O O O O O O O OOOOO O"}, {"Oo . . .O. .O. .O. .O. .O. . . oO"}, {"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}}, {{"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}, {"Oo . . . .O. . . . . .O. . . . oO"}, {"O OOOOO O O O O O O O O O OOOOO O"}, {"O.O. .O.O. .O.O.O.O.O. .O.O. .O.O"}, {"O O O O OOO O O O O O OOO O O O O"}, {"O. .O.O. . .O.O. .O.O. . .O.O. .O"}, {"OOO O O OOOOO OOOOO OOOOO O O OOO"}, {"O. .O.O. . .O. . . .O. . .O.O. .O"}, {"O OOO O OOO O O___O O OOO O OOO O"}, {"O. . .O. .O.O.O O.O.O. .O. . .O"}, {"OOOOO OOO O O O O O O OOO OOOOO"}, {"O. .O. .O.O.O.O O.O.O.O. .O. .O"}, {"O O OOO O O O OOOOO O O O OOO O O"}, {"O.O. .O.O. .O. .O. .O. . .O. .O.O"}, {"O OOO O OOO OOO O OOO OOO O OOO O"}, {"O.O. .O. .O. . . . . .O. .O. .O.O"}, {"O O OOOOO O OOOOOOOOO O OOOOO O O"}, {"O.O.O. . . . . . . . . . . .O.O.O"}, {"O O O O O OOOOOOOOOOOOO O O O O O"}, {"O.O. .O.O.O. .O. .O. .O.O.O. .O.O"}, {"O OOOOO O O O O O O O O O OOOOO O"}, {"Oo . . .O. .O. .O. .O. .O. . . oO"}, {"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}}, {{"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}, {"Oo . . . .O. . .O. . .O. . . . oO"}, {"O OOOOO O O O O O O O O O OOOOO O"}, {"O.O. . .O. .O.O.O.O.O. .O. . .O.O"}, {"O O O OOOOOOO O O O OOOOOOO O O O"}, {"O. .O.O. . . .O. .O. . . .O.O. .O"}, {"OOO O O OOOOO OOOOO OOOOO O O OOO"}, {"O. .O.O. . .O. . . .O. . .O.O. .O"}, {"O OOO O OOO O O___O O OOO O OOO O"}, {"O. . .O. .O.O.O O.O.O. .O. . .O"}, {"OOOOO OOO O O O O O O OOO OOOOO"}, {"O. .O. .O.O.O.O O.O.O.O. .O. .O"}, {"O O OOO O O O OOOOO O O O OOO O O"}, {"O.O. .O.O.O. . . . . .O.O.O. .O.O"}, {"O OOO O O O OOOOOOOOO O O O OOO O"}, {"O.O. . .O.O. . . . . .O.O. . .O.O"}, {"O O OOOOO O OOOOOOOOO O OOOOO O O"}, {"O.O.O. . .O. . . . . .O. . .O.O.O"}, {"O O O O O OOOOOOOOOOOOO O O O O O"}, {"O.O. .O.O.O. .O. .O. .O.O.O. .O.O"}, {"O OOOOO O O O O O O O O O OOOOO O"}, {"Oo . . .O. .O. .O. .O. .O. . . oO"}, {"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}}, {{"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}, {"Oo . . . .O. . .O. . .O. . . . oO"}, {"O OOOOO O O O O O O O O O OOOOO O"}, {"O.O. . .O. .O.O.O.O.O. .O. . .O.O"}, {"O O O OOOOOOO O O O OOOOOOO O O O"}, {"O. .O.O. . . .O. .O. . . .O.O. .O"}, {"OOOOO O OOOOO OOOOO OOOOO O OOOOO"}, {"O. . .O. . .O. . . .O. . .O. . .O"}, {"O OOO O OOO O O___O O OOO O OOO O"}, {"O. . .O. .O.O.O O.O.O. .O. . .O"}, {"OOOOO OOO O O O O O O OOO OOOOO"}, {"O. .O. . .O.O.O O.O.O. . .O. .O"}, {"O O OOOOO O O OOOOO O O OOOOO O O"}, {"O.O. .O. .O. . . . . .O. .O. .O.O"}, {"O OOO O OOO OOOOOOOOO OOO O OOO O"}, {"O. . . . .O. . . . . .O. . . . .O"}, {"O O OOOOO O OOOOOOOOO O OOOOO O O"}, {"O.O.O. . .O. . . . . .O. . .O.O.O"}, {"O O O O O OOOOOOOOOOOOO O O O O O"}, {"O.O. .O.O.O. .O. .O. .O.O.O. .O.O"}, {"O OOOOO O O O O O O O O O OOOOO O"}, {"Oo . . .O. .O. .O. .O. .O. . . oO"}, {"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}}, {{"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}, {"Oo . . . . .O. .O. .O. . . . . oO"}, {"O OOOOOOOOO O O O O O OOOOOOOOO O"}, {"O.O. .O. . . .O.O.O. . . .O. .O.O"}, {"O O O O O O OOO O OOO O O O O O O"}, {"O. .O. .O.O. . .O. . .O.O. .O. .O"}, {"OOOOOOO O O O OOOOO O O O OOOOOOO"}, {"O. . .O. .O.O. . . .O.O. .O. . .O"}, {"O OOO OOO O O O___O O O OOO OOO O"}, {"O. . .O. .O.O.O O.O.O. .O. . .O"}, {"OOOOO O O O O O O O O O O OOOOO"}, {"O. .O. .O.O.O.O O.O.O.O. .O. .O"}, {"O O OOOOO O O OOOOO O O OOOOO O O"}, {"O.O. .O. .O.O. . . .O.O. .O. .O.O"}, {"O OOO O OOO OOOOOOOOO OOO O OOO O"}, {"O.O. .O. .O. . . . . .O. .O. .O.O"}, {"O O OOO O O OOOOOOOOO O O OOO O O"}, {"O.O.O. .O.O. . . . . .O.O. .O.O.O"}, {"O O O O O OOOOOOOOOOOOO O O O O O"}, {"O.O. .O.O.O. .O. .O. .O.O.O. .O.O"}, {"O OOOOO O O O O O O O O O OOOOO O"}, {"Oo . . .O. .O. .O. .O. .O. . . oO"}, {"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}}, {{"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}, {"Oo . . . . .O. .O. .O. . . . . oO"}, {"O OOOOOOOOO O O O O O OOOOOOOOO O"}, {"O.O. .O. . . .O.O.O. . . .O. .O.O"}, {"O O O O OOOOOOO O OOOOOOO O O O O"}, {"O. .O.O. . . .O. .O. . . .O.O. .O"}, {"OOOOO O OOO O OOOOO O OOO O OOOOO"}, {"O. . .O. .O.O. . . .O.O. .O. . .O"}, {"O OOOOOOO O O O___O O O OOOOOOO O"}, {"O. . .O. . .O.O O.O. . .O. . .O"}, {"OOOOO O OOOOO O O OOOOO O OOOOO"}, {"O. .O. . . .O.O O.O. . . .O. .O"}, {"O O O OOO O O OOOOO O O OOO O O O"}, {"O.O. . . .O.O. . . .O.O. . . .O.O"}, {"O OOOOO OOO OOOOOOOOO OOO OOOOO O"}, {"O.O. .O. . . . . . . . . .O. .O.O"}, {"O O O OOOOO OOOOOOOOO OOOOO O O O"}, {"O.O.O. . .O. . . . . .O. . .O.O.O"}, {"O O O OOO OOOOOOOOOOOOO OOO O O O"}, {"O.O. . .O. . . . . . . .O. . .O.O"}, {"O OOO O OOOOOOOOOOOOOOOOO O OOO O"}, {"Oo . .O. . . . . . . . . .O. . oO"}, {"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}}, {{"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}, {"Oo . . . . .O. .O. .O. . . . . oO"}, {"O OOOOOOOOO O O O O O OOOOOOOOO O"}, {"O.O. .O. . . .O.O.O. . . .O. .O.O"}, {"O O O O O O OOO O OOO O O O O O O"}, {"O. .O. .O.O. . .O. . .O.O. .O. .O"}, {"OOOOOOO O O O OOOOO O O O OOOOOOO"}, {"O. . . . .O.O. . . .O.O. . . . .O"}, {"O OOO OOO O O O___O O O OOO OOO O"}, {"O. . .O. .O.O.O O.O.O. .O. . .O"}, {"OOOOOOO OOO O O O O OOO OOOOOOO"}, {"O. . .O. .O.O.O O.O.O. .O. . .O"}, {"O O O OOO O O OOOOO O O OOO O O O"}, {"O.O.O.O. .O.O. . . .O.O. .O.O.O.O"}, {"O O O O OOO OOOOOOOOO OOO O O O O"}, {"O.O. .O. .O. . . . . .O. .O. .O.O"}, {"O O OOOOO O OOOOOOOOO O OOOOO O O"}, {"O.O.O. . .O. . . . . .O. . .O.O.O"}, {"O O O OOO O OOOOOOOOO O OOO O O O"}, {"O.O. . . .O. . . . . .O. . . .O.O"}, {"O OOO O OOOOOOOOOOOOOOOOO O OOO O"}, {"Oo . .O. . . . . . . . . .O. . oO"}, {"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}}, {{"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}, {"Oo . . . . .O. .O. .O. . . . . oO"}, {"O OOOOOOOOO O O O O O OOOOOOOOO O"}, {"O.O. . . . . .O.O.O. . . . . .O.O"}, {"O O OOOOOOOOOOO O OOOOOOOOOOO O O"}, {"O. . .O. . . .O. .O. . . .O. . .O"}, {"OOOOO O OOOOO OOOOO OOOOO O OOOOO"}, {"O. .O. . .O. . . . . .O. . .O. .O"}, {"O O O OOO O O O___O O O OOO O O O"}, {"O.O. .O. .O.O.O O.O.O. .O. .O.O"}, {"O OOO O O O O O O O O O O OOO O"}, {"O. . . .O. .O.O O.O. .O. . . .O"}, {"OOOOO OOOOOOO OOOOO OOOOOOO OOOOO"}, {"O. . .O. . .O. . . .O. . .O. . .O"}, {"O OOO O OOO OOOOOOOOO OOO O OOO O"}, {"O.O. .O. .O. . . . . .O. .O. .O.O"}, {"O O OOOOO O OOOOOOOOO O OOOOO O O"}, {"O.O.O. . .O. . . . . .O. . .O.O.O"}, {"O O O O OOOOOOOOOOOOOOOOO O O O O"}, {"O.O. .O. . . . . . . . . .O. .O.O"}, {"O OOOOO O OOOOOOOOOOOOO O OOOOO O"}, {"Oo . . .O. . . . . . . .O. . . oO"}, {"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}} }; class DynamicElement; class G_Board; //the following is the list structure for the DynamicElements, the sprites. //it includes a pointer to the element, what graphical id it has //the coordinates and a pointer to the next element of the structure struct liststruct {DynamicElement/* Moveables*/ *g; GID_TYPE gid; int x,y; struct liststruct*next;}; class Board : public Object { static liststruct* list; //pointer to list of recently display sprites static liststruct* oldlist; //pointer to list of next most recently static Element *board[BOARDWIDTH][BOARDHEIGHT]; //matrix pointer to elements static G_Board* gboard; //pointer to the class which handles //the graphical elements of the board static void replace(Element*); //????????? static UserInterface* u; //pointer to the user interface static Board* _instance; //pointer to the instance of the board protected: Board(); //constructor public: static Board* instance(); //returns the pointer to the instance ~Board(); //destructor static void start(int); //initialize board for a given level static void draw(void); //draw entire board static void delta_draw(void); //draw changes of the board static void sprite(DynamicElement *); //let dynamicelement be a sprite static void eat(int,int); //removes whats at coordinates static typ what_is(int,int); //what "class" element at coordinates is }; #endif pacman-10.orig/bonus.cc100644 1747 1750 715 5741604164 15022 0ustar clameterclameter#include"bonus.h" #include"pac.h" void Bonus::getxy(int *xx,int *yy) { //get it's coordinates *xx=x; *yy=y; } Bonus::Bonus() { //constructor x=BONUSX; y=BONUSY; //just set the coordinates } Bonus::~Bonus() { //destructor delete g; } int Bonus::code() { //code to be done while it exists return lifetime--; //just countdown the lifetime } void Bonus::start() { //reset the bonus lifetime=BONUSTIME; //set lifetime to a certain amount } pacman-10.orig/bonus.h100644 1747 1750 1056 5741600236 14677 0ustar clameterclameter#ifndef __bonus_h_ #define __bonus_h_ #include"gamedata.h" #include"board.h" #include"usrinter.h" #include"unmovele.h" #include"gamedata.h" #include"gbonus.h" class Bonus : public UnmoveableElement { protected: int lifetime; //the lifetime of the bonus public: virtual void start(); //reset the bonus void getxy(int *,int*); //get it's coordinates virtual void eat(Gamedata*)=0; //a virtual for when pacman eats it int code(); //code to be done while it exists virtual ~Bonus()=0; //destructor Bonus(); //constructor }; #endif pacman-10.orig/bonuslif.cc100644 1747 1750 333 5741604232 15505 0ustar clameterclameter#include"bonuslif.h" #include"gbonlife.h" #include"pac.h" BonusLife::BonusLife():Bonus() { g=new G_BonusLife; //new one } void BonusLife::eat(Gamedata* da) { da->livesup(); //specific action: increment lives } pacman-10.orig/bonuslif.h100644 1747 1750 334 5741600462 15351 0ustar clameterclameter#ifndef __bonuslif_h_ #define __bonuslif_h_ #include"bonus.h" class BonusLife : public Bonus { public: BonusLife(); //constructor typ is_a(void) {return classBonusLife;} void eat(Gamedata*); }; #endif pacman-10.orig/bonuspnt.cc100644 1747 1750 354 5741610200 15527 0ustar clameterclameter#include"bonuspnt.h" #include"gbonpnt.h" #include"pac.h" BonusPoint::BonusPoint():Bonus() { g=new G_BonusPoint; //new one } void BonusPoint::eat(Gamedata* da) { da->scorepluss(BONUSSCORE); //specific action: increase score } pacman-10.orig/bonuspnt.h100644 1747 1750 341 5741600504 15373 0ustar clameterclameter#ifndef __bonuspnt_h_ #define __bonuspnt_h_ #include"bonus.h" class BonusPoint : public Bonus { public: BonusPoint(); //constructor typ is_a(void) {return classBonusPoint;} void eat(Gamedata*); }; #endif pacman-10.orig/colour.cc100644 1747 1750 22266 5741607636 15253 0ustar clameterclameter#include #include"colour.h" #include #include #include"arg.h" #include"pac.h" COLOURTYPE Colour::MYFOREGROUND=0; //initializers COLOURTYPE Colour::MYBACKGROUND=0; COLOURTYPE Colour::WALLCOLOUR=0; COLOURTYPE Colour::PACMANCOLOUR=0; COLOURTYPE Colour::GHOSTCOLOUR1=0; COLOURTYPE Colour::GHOSTCOLOUR2=0; COLOURTYPE Colour::GHOSTCOLOUR3=0; COLOURTYPE Colour::GHOSTCOLOUR4=0; COLOURTYPE Colour::RUNGHOSTCOLOUR=0; COLOURTYPE Colour::FOODCOLOUR=0; COLOURTYPE Colour::SUPERFOODCOLOUR=0; COLOURTYPE Colour::BONUSPOINTCOLOUR=0; COLOURTYPE Colour::BONUSLIFECOLOUR=0; //plain colour names static COLOURNAME black,white,cyan,lightblue,yellow,red,violetred,violet,orangered,deepskyblue,gold,lightyellow,grey,lightgrey,dimgrey,slategrey,darkslategrey,lightslategrey; Colour::Colour(UserInterface* u) { //constructor static int starts=0; //to make sure only one construction #ifdef XWIN //X-Win only Window window; //our window int screen; //our screen #endif if (starts) { //make sure it is initialized just once pacwarning("Colour is just initialized once\n"); return; } starts=1; //to make sure only one construction #ifdef XWIN display=u->getdisplay(); //get pointer to display connection screen=u->getscreen(); //get the screen Visual *vis=DefaultVisual(display,screen); //get the visual type class int colour=0; //colour? //if it is not grayish then it is colour (only maybe) if (Argument::argc==1 && vis->c_class!=GrayScale && vis->c_class!=StaticGray) colour=1; //the following picks the first argument matching grey or colour //in none given, no colour is assumed if (Argument::argc>1) { //if there are arguments char** temp=Argument::args; //initial pointer to strings char* s; //argument string while(s=*temp) { //while there is still an argument left if (!strcmp(s,"grey")) //if argument is grey then no colours {colour=0; break; } if (!strcmp(s,"colour")) //if argument is colour then colours {colour=1; break; } temp++; //increment to next string } } if (colour) { //if colour chosen cmap=DefaultColormap(display,DefaultScreen(display)); //get colourmap //the colour initializing is almost straightforward, you set the RGB //mark flags according to what attribute members were set //then you allocate the colour, which you get with ?????.pixel cyan.red=0; cyan.green=65535; cyan.blue=65535; cyan.flags=DoRed|DoGreen|DoBlue; if(XAllocColor(display,cmap,&cyan)==0) pacexit("Colour initialization error"); black.red=0; black.green=0; black.blue=0; black.flags=DoRed|DoGreen|DoBlue; if(XAllocColor(display,cmap,&black)==0) pacexit("Colour initialization error"); white.red=65535; white.green=65535; white.blue=65535; white.flags=DoRed|DoGreen|DoBlue; if(XAllocColor(display,cmap,&white)==0) pacexit("Colour initialization error"); lightblue.red=173*256; lightblue.green=216*256; lightblue.blue=230*256; lightblue.flags=DoRed|DoGreen|DoBlue; if(XAllocColor(display,cmap,&lightblue)==0) pacexit("Colour initialization error"); yellow.red=65535; yellow.green=65535; yellow.blue=0; yellow.flags=DoRed|DoGreen|DoBlue; if(XAllocColor(display,cmap,&yellow)==0) pacexit("Colour initialization error"); red.red=65535; red.green=0; red.blue=0; red.flags=DoRed|DoGreen|DoBlue; if(XAllocColor(display,cmap,&red)==0) pacexit("Colour initialization error"); orangered.red=65535; orangered.green=69*256; orangered.blue=0; orangered.flags=DoRed|DoGreen|DoBlue; if(XAllocColor(display,cmap,&orangered)==0) pacexit("Colour initialization error"); violetred.red=208*256; violetred.green=32*256; violetred.blue=144*256; violetred.flags=DoRed|DoGreen|DoBlue; if(XAllocColor(display,cmap,&violetred)==0) pacexit("Colour initialization error"); violet.red=238*256; violet.green=130*256; violet.blue=238*256; violet.flags=DoRed|DoGreen|DoBlue; if(XAllocColor(display,cmap,&violet)==0) pacexit("Colour initialization error"); deepskyblue.red=0; deepskyblue.green=192*256-1; deepskyblue.blue=65535; deepskyblue.flags=DoRed|DoGreen|DoBlue; if(XAllocColor(display,cmap,&deepskyblue)==0) pacexit("Colour initialization error"); gold.red=65535; gold.green=216*256-1; gold.blue=0; gold.flags=DoRed|DoGreen|DoBlue; if(XAllocColor(display,cmap,&gold)==0) pacexit("Colour initialization error"); lightyellow.red=65535; lightyellow.green=65535; lightyellow.blue=0; lightyellow.flags=DoRed|DoGreen|DoBlue; if(XAllocColor(display,cmap,&lightyellow)==0) pacexit("Colour initialization error"); MYFOREGROUND =cyan.pixel; MYBACKGROUND =black.pixel; WALLCOLOUR =deepskyblue.pixel; PACMANCOLOUR =yellow.pixel; GHOSTCOLOUR1 =red.pixel; GHOSTCOLOUR2 =violetred.pixel; GHOSTCOLOUR3 =violet.pixel; GHOSTCOLOUR4 =orangered.pixel; RUNGHOSTCOLOUR =lightblue.pixel; FOODCOLOUR =lightyellow.pixel; SUPERFOODCOLOUR =gold.pixel; BONUSPOINTCOLOUR =gold.pixel; BONUSLIFECOLOUR =gold.pixel; /* #define MYFOREGROUND cyan.pixel #define MYBACKGROUND black.pixel #define WALLCOLOUR deepskyblue.pixel #define PACMANCOLOUR yellow.pixel #define GHOSTCOLOUR1 red.pixel #define GHOSTCOLOUR2 violetred.pixel #define GHOSTCOLOUR3 violet.pixel #define GHOSTCOLOUR4 orangered.pixel #define RUNGHOSTCOLOUR lightblue.pixel #define FOODCOLOUR lightyellow.pixel #define SUPERFOODCOLOUR gold.pixel #define BONUSPOINTCOLOUR gold.pixel #define BONUSLIFECOLOUR gold.pixel */ } else { //if no colours chosen cmap=DefaultColormap(display,DefaultScreen(display)); grey.red=192*256; grey.green=192*256; grey.blue=192*256; grey.flags=DoRed|DoGreen|DoBlue; if(XAllocColor(display,cmap,&grey)==0) pacexit("Colour initialization error"); dimgrey.red=105*256; dimgrey.green=105*256; dimgrey.blue=105*256; dimgrey.flags=DoRed|DoGreen|DoBlue; if(XAllocColor(display,cmap,&dimgrey)==0) pacexit("Colour initialization error"); lightgrey.red=211*256; lightgrey.green=211*256; lightgrey.blue=211*256; lightgrey.flags=DoRed|DoGreen|DoBlue; if(XAllocColor(display,cmap,&lightgrey)==0) pacexit("Colour initialization error"); lightslategrey.red=119*256; lightslategrey.green=136*256; lightslategrey.blue=153*256; lightslategrey.flags=DoRed|DoGreen|DoBlue; if(XAllocColor(display,cmap,&lightslategrey)==0) pacexit("Colour initialization error"); slategrey.red=112*256; slategrey.green=128*256; slategrey.blue=144*256; slategrey.flags=DoRed|DoGreen|DoBlue; if(XAllocColor(display,cmap,&slategrey)==0) pacexit("Colour initialization error"); darkslategrey.red=47*256; darkslategrey.green=79*256; darkslategrey.blue=79*256; darkslategrey.flags=DoRed|DoGreen|DoBlue; if(XAllocColor(display,cmap,&darkslategrey)==0) pacexit("Colour initialization error"); MYFOREGROUND =WhitePixel(display,screen); MYBACKGROUND =BlackPixel(display,screen); WALLCOLOUR =darkslategrey.pixel; PACMANCOLOUR =WhitePixel(display,screen); GHOSTCOLOUR1 =slategrey.pixel; GHOSTCOLOUR2 =slategrey.pixel; GHOSTCOLOUR3 =slategrey.pixel; GHOSTCOLOUR4 =slategrey.pixel; RUNGHOSTCOLOUR =lightgrey.pixel; FOODCOLOUR =lightgrey.pixel; SUPERFOODCOLOUR =grey.pixel; BONUSPOINTCOLOUR =dimgrey.pixel; BONUSLIFECOLOUR =WhitePixel(display,screen); /* #define MYFOREGROUND WhitePixel(display,screen) #define MYBACKGROUND BlackPixel(display,screen) #define WALLCOLOUR darkslategrey.pixel #define PACMANCOLOUR WhitePixel(display,screen) #define GHOSTCOLOUR1 slategrey.pixel #define GHOSTCOLOUR2 slategrey.pixel #define GHOSTCOLOUR3 slategrey.pixel #define GHOSTCOLOUR4 slategrey.pixel #define RUNGHOSTCOLOUR =lightgrey.pixel #define FOODCOLOUR lightgrey.pixel #define SUPERFOODCOLOUR grey.pixel #define BONUSPOINTCOLOUR dimgrey.pixel #define BONUSLIFECOLOUR WhitePixel(display,screen) */ } /* .red=; .green=; .blue=; .flags=DoRed|DoGreen|DoBlue; if(XAllocColor(display,cmap,&)==0) pacexit("Colour initialization error"); */ #elif defined MSWIN //MS-Win only cyan=(RGB(0,255,255)); black=(RGB(0,0,0)); white=(RGB(255,255,255)); lightblue=(RGB(173,216,230)); yellow=(RGB(255,255,0)); red=(RGB(255,0,0)); orangered=(RGB(255,69,0)); violetred=(RGB(208,32,144)); violet=(RGB(238,130,238)); deepskyblue=(RGB(0,191,255)); gold=(RGB(255,215,0)); lightyellow=(RGB(255,255,0)); MYFOREGROUND =cyan; MYBACKGROUND =black; WALLCOLOUR =deepskyblue; PACMANCOLOUR =yellow; GHOSTCOLOUR1 =red; GHOSTCOLOUR2 =violetred; GHOSTCOLOUR3 =violet; GHOSTCOLOUR4 =orangered; RUNGHOSTCOLOUR =lightblue; FOODCOLOUR =lightyellow; SUPERFOODCOLOUR =gold; BONUSPOINTCOLOUR =gold; BONUSLIFECOLOUR =gold; /* #define MYFOREGROUND RGB(0,255,255) #define MYBACKGROUND RGB(0,0,0) #define WALLCOLOUR RGB(0,191,255) #define PACMANCOLOUR RGB(255,255,0) #define GHOSTCOLOUR1 RGB(255,0,0) #define GHOSTCOLOUR2 RGB(208,32,144) #define GHOSTCOLOUR3 RGB(238,130,238) #define GHOSTCOLOUR4 RGB(255,69,0) #define RUNGHOSTCOLOUR RGB(173,216,230) #define FOODCOLOUR RGB(255,255,0) #define SUPERFOODCOLOUR RGB(255,215,0) #define BONUSPOINTCOLOUR RGB(255,215,0) #define BONUSLIFECOLOUR RGB(255,215,0) */ #endif } Colour::~Colour() { #ifdef XWIN //X-Win only XFreeColormap(display,cmap); //free the colourmap #elif defined MSWIN //MS-Win only /* DeleteObject(cyan); DeleteObject(black); DeleteObject(white); DeleteObject(lightblue); DeleteObject(yellow); DeleteObject(lightyellow); DeleteObject(red); DeleteObject(orangered); DeleteObject(violetred); DeleteObject(violet); DeleteObject(deepskyblue); DeleteObject(gold); */ #endif } pacman-10.orig/colour.h100644 1747 1750 3504 5741577656 15077 0ustar clameterclameter#ifndef __colour_h_ #define __colour_h_ #include"systspec.h" #include"usrinter.h" #include"object.h" //defines the type of the colour types #ifdef XWIN #define COLOURTYPE unsigned long #define COLOURNAME XColor #elif defined MSWIN #define COLOURTYPE COLORREF #define COLOURNAME COLORREF #elif defined VTX #define COLOURTYPE int #define COLOURNAME int #endif class Colour : public Object { #ifdef XWIN //X-Win only Display* display; //pointer to display connection Colormap cmap; //a colourmap #endif public: Colour(UserInterface*); //constructor and initializer ~Colour(); //destructor static COLOURTYPE MYFOREGROUND; //foreground colour static COLOURTYPE MYBACKGROUND; //background colour static COLOURTYPE WALLCOLOUR; //colour for wall static COLOURTYPE PACMANCOLOUR; //colour for pacman static COLOURTYPE GHOSTCOLOUR1; //colour for ghost 1 static COLOURTYPE GHOSTCOLOUR2; //colour for ghost 2 static COLOURTYPE GHOSTCOLOUR3; //colour for ghost 3 static COLOURTYPE GHOSTCOLOUR4; //colour for ghost 4 static COLOURTYPE RUNGHOSTCOLOUR; //colour for running ghosts static COLOURTYPE FOODCOLOUR; //colour of the food static COLOURTYPE SUPERFOODCOLOUR; //colour of the superfood static COLOURTYPE BONUSPOINTCOLOUR;//colour of the bonuspoint bonus static COLOURTYPE BONUSLIFECOLOUR; //colour of the bonuslife bonus /* #define MYFOREGROUND cyan.pixel #define MYBACKGROUND black.pixel #define WALLCOLOUR deepskyblue.pixel #define PACMANCOLOUR yellow.pixel #define GHOSTCOLOUR1 red.pixel #define GHOSTCOLOUR2 violetred.pixel #define GHOSTCOLOUR3 violet.pixel #define GHOSTCOLOUR4 orangered.pixel #define RUNGHOSTCOLOUR lightblue.pixel #define FOODCOLOUR lightyellow.pixel #define SUPERFOODCOLOUR gold.pixel #define BONUSPOINTCOLOUR gold.pixel #define BONUSLIFECOLOUR gold.pixel */ }; #endif pacman-10.orig/corner.cc100644 1747 1750 25 5724676122 15142 0ustar clameterclameter#include"corner.h" pacman-10.orig/corner.h100644 1747 1750 165 5724676110 15026 0ustar clameterclameter#ifndef __corner_h_ #define __corner_h_ #include"gwalls.h" class Corner : public G_Walls { }; #endif pacman-10.orig/corner1.cc100644 1747 1750 177 5734660160 15247 0ustar clameterclameter#include"corner1.h" Corner1::Corner1() { consfn(); pix(&pixmap,corner1_bits,Colour::WALLCOLOUR,Colour::MYBACKGROUND); }; pacman-10.orig/corner1.h100644 1747 1750 251 5734660176 15111 0ustar clameterclameter#ifndef __corner1_h_ #define __corner1_h_ #include"corner.h" class Corner1 : public Corner { public: Corner1(); }; #endif pacman-10.orig/corner2.cc100644 1747 1750 177 5734660160 15250 0ustar clameterclameter#include"corner2.h" Corner2::Corner2() { consfn(); pix(&pixmap,corner2_bits,Colour::WALLCOLOUR,Colour::MYBACKGROUND); }; pacman-10.orig/corner2.h100644 1747 1750 251 5734660176 15112 0ustar clameterclameter#ifndef __corner2_h_ #define __corner2_h_ #include"corner.h" class Corner2 : public Corner { public: Corner2(); }; #endif pacman-10.orig/corner3.cc100644 1747 1750 177 5734660156 15256 0ustar clameterclameter#include"corner3.h" Corner3::Corner3() { consfn(); pix(&pixmap,corner3_bits,Colour::WALLCOLOUR,Colour::MYBACKGROUND); }; pacman-10.orig/corner3.h100644 1747 1750 251 5734660176 15113 0ustar clameterclameter#ifndef __corner3_h_ #define __corner3_h_ #include"corner.h" class Corner3 : public Corner { public: Corner3(); }; #endif pacman-10.orig/corner4.cc100644 1747 1750 177 5734660156 15257 0ustar clameterclameter#include"corner4.h" Corner4::Corner4() { consfn(); pix(&pixmap,corner4_bits,Colour::WALLCOLOUR,Colour::MYBACKGROUND); }; pacman-10.orig/corner4.h100644 1747 1750 251 5734660174 15112 0ustar clameterclameter#ifndef __corner4_h_ #define __corner4_h_ #include"corner.h" class Corner4 : public Corner { public: Corner4(); }; #endif pacman-10.orig/cross.cc100644 1747 1750 170 5734660164 15024 0ustar clameterclameter#include"cross.h" Cross::Cross() { consfn(); pix(&pixmap,cross_bits,Colour::WALLCOLOUR,Colour::MYBACKGROUND); }; pacman-10.orig/cross.h100644 1747 1750 244 5734660174 14671 0ustar clameterclameter#ifndef __cross_h_ #define __cross_h_ #include"gwalls.h" class Cross : public G_Walls { public: Cross(); }; #endif pacman-10.orig/direc.cc100644 1747 1750 452 5741604402 14753 0ustar clameterclameter#include"direc.h" //get next coordinates going in a certain direction void next(int* x,int* y,direction d,int xx,int yy) { *x=xx; *y=yy; switch (d) { case none: break; case still: break; case up: (*y)--; break; case down: (*y)++; break; case left: (*x)--; break; case right: (*x)++; break; }} pacman-10.orig/direc.h100644 1747 1750 336 5741600666 14626 0ustar clameterclameter#ifndef __direc_h_ #define __direc_h_ //defines possible directions typedef enum {up,down,left,right,none,still} direction; //get next coordinates with a certain direction void next(int*,int*,direction,int,int); #endif pacman-10.orig/dynamiel.cc100644 1747 1750 412 5741604452 15470 0ustar clameterclameter#include"dynamiel.h" void DynamicElement::getxy(int *xx,int *yy) { //get it's coordinates *xx=x; *yy=y; } void DynamicElement::draw() { //for drawing the sprite g->draw(x,y); } GID_TYPE DynamicElement::getgid() { //get it's grahical id return g->getgid(); } pacman-10.orig/dynamiel.h100644 1747 1750 1014 5741600772 15352 0ustar clameterclameter#ifndef __dynamiel_h_ #define __dynamiel_h_ #include"element.h" #include"gdynelem.h" #include"usrinter.h" #include"board.h" #include"usrinter.h" class Board; class DynamicElement : public Element { //from now on it is a sprite protected: int x,y; //the sprites coordinates DynamicGraphElement *g; //pointer to the sprite's graphic element public: virtual void draw(); //for drawing the sprite void getxy(int*,int*); //get it's coordinates virtual GID_TYPE getgid(); //get it's grahical id }; #endif pacman-10.orig/e0.cc100644 1747 1750 152 5734660156 14200 0ustar clameterclameter#include"e0.h" E0::E0() { consfn(); pix(&pixmap,e0_bits,Colour::WALLCOLOUR,Colour::MYBACKGROUND); } pacman-10.orig/e0.h100644 1747 1750 214 5734660174 14041 0ustar clameterclameter#ifndef __e0_h_ #define __e0_h_ #include"endwall.h" class E0 : public EndWall { public: E0(); }; #endif pacman-10.orig/e180.cc100644 1747 1750 162 5734660156 14352 0ustar clameterclameter#include"e180.h" E180::E180() { consfn(); pix(&pixmap,e180_bits,Colour::WALLCOLOUR,Colour::MYBACKGROUND); } pacman-10.orig/e180.h100644 1747 1750 224 5734660174 14213 0ustar clameterclameter#ifndef __e180_h_ #define __e180_h_ #include"endwall.h" class E180 : public EndWall { public: E180(); }; #endif pacman-10.orig/e270.cc100644 1747 1750 162 5734660156 14352 0ustar clameterclameter#include"e270.h" E270::E270() { consfn(); pix(&pixmap,e270_bits,Colour::WALLCOLOUR,Colour::MYBACKGROUND); } pacman-10.orig/e270.h100644 1747 1750 224 5734660174 14213 0ustar clameterclameter#ifndef __e270_h_ #define __e270_h_ #include"endwall.h" class E270 : public EndWall { public: E270(); }; #endif pacman-10.orig/e90.cc100644 1747 1750 155 5734660156 14274 0ustar clameterclameter#include"e90.h" E90::E90() { consfn(); pix(&pixmap,e90_bits,Colour::WALLCOLOUR,Colour::MYBACKGROUND); } pacman-10.orig/e90.h100644 1747 1750 220 5734660174 14127 0ustar clameterclameter#ifndef __e90_h_ #define __e90_h_ #include"endwall.h" class E90 : public EndWall { public: E90(); }; #endif pacman-10.orig/edible.h100644 1747 1750 202 5724676110 14752 0ustar clameterclameter#ifndef __edible_h_ #define __edible_h_ #include"staticel.h" class Edible : public StaticElement { public: }; #endif pacman-10.orig/element.cc100644 1747 1750 275 5741604536 15331 0ustar clameterclameter#include"element.h" void Element::draw(int xx,int yy) { //for drawing the element g->draw(xx,yy); } void Element::gset(GraphElement *gg) {//set the pointer to the graphic element g=gg; } pacman-10.orig/element.h100644 1747 1750 714 5740344322 15162 0ustar clameterclameter#ifndef __element_h_ #define __element_h_ #include"object.h" #include"types.h" #include"usrinter.h" #include"graphele.h" class Element : public Object { protected: GraphElement *g; //pointer to it's graphic element public: virtual void draw(int,int); //for drawing the element virtual typ is_a(void)=0; //abstract for returning what it is void gset(GraphElement*); //set the pointer to the graphic element }; #endif pacman-10.orig/endwall.h100644 1747 1750 245 5735342542 15164 0ustar clameterclameter#ifndef __EndWall_h_ #define __EndWall_h_ #include"gwalls.h" class EndWall : public G_Walls { public: void draw(void); }; #endif pacman-10.orig/food.cc100644 1747 1750 46 5734660204 14577 0ustar clameterclameter#include"food.h" Food::Food() { } pacman-10.orig/food.h100644 1747 1750 275 5734660204 14465 0ustar clameterclameter#ifndef __food_h_ #define __food_h_ #include"edible.h" class Food : public Edible { public: typ is_a(void) {return classFood;} Food(); }; #endif pacman-10.orig/gamedata.cc100644 1747 1750 3367 6002776450 15464 0ustar clameterclameter#include"gamedata.h" #include"board.h" #include"pac.h" Gamedata* Gamedata::_instance=0; long int Gamedata::hiscore=0; long int Gamedata::score=0; long int Gamedata::bonus=0; int Gamedata::level=0; int Gamedata::boardlevel=0; int Gamedata::lives=0; int Gamedata::eats=0; Gamedata::Gamedata() { setlevel(0); lives=0; hiscore=0; score=0; bonus=0; eats=foods;} Gamedata* Gamedata::instance() { //returns the pointer to the instance if (_instance==0) _instance=new Gamedata; return _instance; } //initializing of gamedata before game starts void Gamedata::start(void) { level=1; setboardlevel(); lives=3; score=0; bonus=5000; eats=foods;} //initializing of gamedata after completed level void Gamedata::start2(void) { levelup(); bonus=5000; eats=foods;} void Gamedata::scorepluss(int sc) {score+=sc; if (score>hiscore) hiscore=score;} void Gamedata::bondwn() {if (bonus) bonus-=5;} void Gamedata::levelup() {level++; setboardlevel(); } void Gamedata::livesdwn() {if (lives) lives--;} void Gamedata::livesup() {lives++;} long int Gamedata::getscore() {return score;} long int Gamedata::gethiscore() {return hiscore;} long int Gamedata::getbonus() {return bonus;} int Gamedata::getlives() {return lives;} int Gamedata::getlevel() {return level;} void Gamedata::resetscore() {score=0;} void Gamedata::setbonus(long int b) {bonus=b;} void Gamedata::setlevel(int l) {level=l; setboardlevel();} void Gamedata::setboardlevel() { if (level>LEVELS) boardlevel=1+(random()%LEVELS); else boardlevel=level; } int Gamedata::getboardlevel() { return boardlevel; } void Gamedata::setlives(int l) {lives=l;} void Gamedata::reseteats() {eats=foods; } int Gamedata::eatenall() {return !eats; } void Gamedata::foodeat() {if (eats) eats--; else pacexit("food"); } pacman-10.orig/gamedata.h100644 1747 1750 2055 6002776266 15324 0ustar clameterclameter#ifndef __gamedata_h_ #define __gamedata_h_ #include"object.h" class Gamedata : public Object { static Gamedata* _instance; static long int hiscore,score,bonus; static int level,boardlevel,lives,eats; /* static */ void setboardlevel(); protected: Gamedata(); public: static Gamedata* instance(); /* static */ void start(void); //initializing of gamedata before game starts /* static */ void start2(void); //initializing of gamedata after completed level /* static */ void scorepluss(int); //the rest if simple /* static */ void bondwn(); /* static */ void levelup(); /* static */ void livesdwn(); /* static */ void livesup(); /* static */ void foodeat(); /* static */ long int getscore(); /* static */ long int gethiscore(); /* static */ long int getbonus(); /* static */ int getlevel(); /* static */ int getboardlevel(); /* static */ int getlives(); /* static */ int eatenall(); /* static */ void resetscore(); /* static */ void reseteats(); /* static */ void setbonus(long int); /* static */ void setlevel(int); /* static */ void setlives(int); }; #endif pacman-10.orig/gblank.cc100644 1747 1750 172 5734660164 15133 0ustar clameterclameter#include"gblank.h" G_Blank::G_Blank() { consfn(); pix(&pixmap,blank_bits,Colour::WALLCOLOUR,Colour::MYBACKGROUND); } pacman-10.orig/gblank.h100644 1747 1750 241 5734660200 14761 0ustar clameterclameter#ifndef __gblank_h_ #define __gblank_h_ #include"gstatele.h" class G_Blank : public StaticGraphElement { public: G_Blank(); }; #endif pacman-10.orig/gboard.cc100644 1747 1750 11227 5741314604 15167 0ustar clameterclameter#include"gboard.h" #include #include #include #include"pac.h" G_Board* G_Board::_instance=0; G_Blank* G_Board::blank=0; //initializers VerticalWall* G_Board::vertical=0; HorizontalWall* G_Board::horizontal=0; Cross* G_Board::cross=0; G_SpecialWall* G_Board::specwall=0; G_Food* G_Board::food=0; G_SuperFood* G_Board::superfood=0; E0* G_Board::e0=0; E90* G_Board::e90=0; E180* G_Board::e180=0; E270* G_Board::e270=0; T0* G_Board::t0=0; T90* G_Board::t90=0; T180* G_Board::t180=0; T270* G_Board::t270=0; Corner1* G_Board::corner1=0; Corner2* G_Board::corner2=0; Corner3* G_Board::corner3=0; Corner4* G_Board::corner4=0; G_Board* G_Board::instance() {//returns the pointer to the instance if (_instance==0) _instance=new G_Board; return _instance; } int G_Board::eqpat(char pat[3][3],char en[10]){ //equality with wildcard int i; for(i=0;i<9;i++) if (en[i]!='?') if ((*pat)[i]!=en[i]) return 0; return 1; } //in:board with coordinates, out: the belonging code for the graphic element char G_Board::pattern(char brett1[BOARDHEIGHT+1][BOARDWIDTH+1],int y,int x) { char t,u, //some temps pat[3][3]; //to contain the pattern to be compared int i,j; //plain counters switch (t=brett1[y][x]) { //get the code for the Element //if it is simple enough, it don't need translation, just return it case '_': case '.': case 'o': case' ': return t; break;} for(i=-1;i<=1;i++) //traverse the elements around x,y for(j=-1;j<=1;j++) { t='\0';//null if (i+x==-1 || i+x==BOARDWIDTH) t=' '; //if x,y is on border if (j+y==-1 || j+y==BOARDHEIGHT) t=' '; //then space is what's beyond it u=brett1[y+j][x+i]; //what's at x+i,y+j coordinates if (u=='_') u='O'; //if u is a specialwall then //it is just a wall switch (u) { //if it's a food or superfood //(but not at x,y) it //counts as space case '.': case 'o': u=' '; break; } if (t=='\0') pat[j+1][i+1]=u; else pat[j+1][i+1]=t; //if if not beyond border then it is u else it is t, space } if (eqpat(pat,"? ?OOO? ?")) return '-';//check if patterns matches and return if (eqpat(pat,"?O? O ?O?")) return '|'; if (eqpat(pat," ? OO?O ")) return 'n'; if (eqpat(pat,"? OO O?")) return 'b'; if (eqpat(pat," O?OO ? ")) return 'v'; if (eqpat(pat,"?O OO ?")) return 'c'; if (eqpat(pat," O ?O?")) return 'e'; if (eqpat(pat," ? OO ?")) return 's'; if (eqpat(pat,"? OO ? ")) return 'd'; if (eqpat(pat,"?O? O ")) return 'x'; if (eqpat(pat,"? ?OOO O ")) return 't'; if (eqpat(pat,"?O OO?O ")) return 'y'; if (eqpat(pat," O OOO? ?")) return 'u'; if (eqpat(pat," O?OO O?")) return 'i'; if (eqpat(pat," O OOO O ")) return '+'; pacwarning("pattern"); //give warning if not returned yet pacwarning(*pat); return '|'; //just to return something } G_Board::G_Board() { //constructor if (!UserInterface::instance()) { pacexit("no userinterface"); } cross=new Cross; //make a lot of new graphical elements vertical=new VerticalWall; horizontal=new HorizontalWall; blank=new G_Blank; food=new G_Food; superfood=new G_SuperFood; corner1=new Corner1; corner2=new Corner2; corner3=new Corner3; corner4=new Corner4; specwall=new G_SpecialWall; e0=new E0; e90=new E90; e180=new E180; e270=new E270; t0=new T0; t90=new T90; t180=new T180; t270=new T270; } //translate element on board to graphic element depending on context GraphElement *G_Board::graphele(char brett[BOARDHEIGHT+1][BOARDWIDTH+1],int i,int j) { char t; t=pattern(brett,j,i); return chartograph(t); } //translate element on board to graphic element depending on context GraphElement *G_Board::graphele(char c) { return chartograph(c); } G_Board::~G_Board() { //destructor delete blank; delete cross; delete horizontal; delete vertical; delete food; delete superfood; delete specwall; delete corner1; delete corner2; delete corner3; delete corner4; delete e0; delete e90; delete e180; delete e270; delete t0; delete t90; delete t180; delete t270; } GraphElement *G_Board::chartograph(char c) { //return translated code GraphElement *g; switch (c) { case ' ':g=blank; break; case '+':g=cross; break; case '|':g=vertical; break; case '-':g=horizontal; break; case '.':g=food; break; case 'o':g=superfood; break; case '_':g=specwall; break; case 'e':g=e90; break; case 's':g=e180; break; case 'd':g=e0; break; case 'x':g=e270; break; case 't':g=t0; break; case 'y':g=t90; break; case 'u':g=t180; break; case 'i':g=t270; break; case 'c':g=corner1; break; case 'v':g=corner2; break; case 'b':g=corner3; break; case 'n':g=corner4; break; default: { g=blank; /*printf("error%d\n",c);*/} break; } return g; } pacman-10.orig/gboard.h100644 1747 1750 3311 5741314444 15006 0ustar clameterclameter#ifndef __gboard_h_ #define __gboard_h_ #include"object.h" #include"graphele.h" #include"gblank.h" #include"vertwall.h" #include"horiwall.h" #include"cross.h" #include"gspecwal.h" #include"gfood.h" #include"gsupfood.h" #include"e0.h" #include"e90.h" #include"e180.h" #include"e270.h" #include"t0.h" #include"t90.h" #include"t180.h" #include"t270.h" #include"corner1.h" #include"corner2.h" #include"corner3.h" #include"corner4.h" #include"sizes.h" #include"usrinter.h" #include"types.h" #include"element.h" #include"dynamiel.h" class G_Board : public Object { //pointers to the graphic elements static G_Blank* blank; static VerticalWall* vertical; static HorizontalWall* horizontal; static Cross* cross; static G_SpecialWall* specwall; static G_Food* food; static G_SuperFood* superfood; static E0* e0; static E90* e90; static E180* e180; static E270* e270; static T0* t0; static T90* t90; static T180* t180; static T270* t270; static Corner1* corner1; static Corner2* corner2; static Corner3* corner3; static Corner4* corner4; int eqpat(char [3][3],char[10]); //equality with wildcard char pattern(char [BOARDHEIGHT+1][BOARDWIDTH+1],int,int); //in:board with coordinates, out: the belonging code for the graphic element GraphElement *chartograph(char); //"translates" graphic element code to pointer to it static G_Board* _instance; //pointer to the instance of the board protected: G_Board(); //constructor public: static G_Board* instance(); //returns the pointer to the instance ~G_Board(); //destructor GraphElement *graphele(char [BOARDHEIGHT+1][BOARDWIDTH+1],int,int); //translates board info to pointer to graphic element GraphElement *graphele(char); //the same }; #endif pacman-10.orig/gbonlife.cc100644 1747 1750 220 5734660164 15454 0ustar clameterclameter#include"gbonlife.h" G_BonusLife::G_BonusLife() { consfn(); pix(&pixmap,bonuslife_bits,Colour::BONUSLIFECOLOUR,Colour::MYBACKGROUND); }; pacman-10.orig/gbonlife.h100644 1747 1750 222 5734660200 15307 0ustar clameterclameter#ifndef __gbonlife_h_ #define __gbonlife_h_ #include"gbonus.h" class G_BonusLife : public G_Bonus { public: G_BonusLife(); }; #endif pacman-10.orig/gbonpnt.cc100644 1747 1750 225 5734661006 15337 0ustar clameterclameter#include"gbonpnt.h" G_BonusPoint::G_BonusPoint() { consfn(); pix(&pixmap,bonuspoint_bits,Colour::BONUSPOINTCOLOUR,Colour::MYBACKGROUND); }; pacman-10.orig/gbonpnt.h100644 1747 1750 224 5734661010 15173 0ustar clameterclameter#ifndef __gbonpnt_h_ #define __gbonpnt_h_ #include"gbonus.h" class G_BonusPoint : public G_Bonus { public: G_BonusPoint(); }; #endif pacman-10.orig/gbonus.h100644 1747 1750 236 5724676110 15032 0ustar clameterclameter#ifndef __gbonus_h_ #define __gbonus_h_ #include"gunmovel.h" class G_Bonus : public G_UnmoveableElement { public: }; #endif pacman-10.orig/gdynelem.cc100644 1747 1750 120 5724676124 15474 0ustar clameterclameter#include"gdynelem.h" GID_TYPE DynamicGraphElement::getgid() {return pixmap;} pacman-10.orig/gdynelem.h100644 1747 1750 312 5741602244 15330 0ustar clameterclameter#ifndef __gdynelem_h_ #define __gdynelem_h_ #include"graphele.h" class DynamicGraphElement : public GraphElement { public: virtual GID_TYPE getgid(); //return the graphical id }; #endif pacman-10.orig/gedible.h100644 1747 1750 213 5724676112 15125 0ustar clameterclameter#ifndef __gedible_h_ #define __gedible_h_ #include"gstatele.h" class G_Edible : public StaticGraphElement { public: }; #endif pacman-10.orig/gen100755 1747 1750 27 6001031664 14025 0ustar clameterclametermakeg pacman>makefile pacman-10.orig/gfood.cc100644 1747 1750 173 5734660160 14770 0ustar clameterclameter#include"gfood.h" G_Food::G_Food() { consfn(); pix(&pixmap,food_bits,Colour::FOODCOLOUR,Colour::MYBACKGROUND); }; pacman-10.orig/gfood.h100644 1747 1750 223 5734660200 14621 0ustar clameterclameter#ifndef __gfood_h_ #define __gfood_h_ #include"gedible.h" class G_Food : public G_Edible { public: G_Food(); }; #endif pacman-10.orig/gghost.cc100644 1747 1750 1157 5741605132 15204 0ustar clameterclameter#include"gghost.h" G_Ghost::G_Ghost(COLOURTYPE farge) { consfn(); pix(&pixmapn,ghost_bits,farge,Colour::MYBACKGROUND); pix(&pixmapr,ghost_bits,Colour::RUNGHOSTCOLOUR,Colour::MYBACKGROUND); pixmap=pixmapn; }; G_Ghost::~G_Ghost(void) { #ifdef XWIN if (pixmap!=pixmapr) XFreePixmap(display,pixmapr); if (pixmap!=pixmapn) XFreePixmap(display,pixmapn); #elif defined MSWIN if (pixmap!=pixmapr) DeleteObject(pixmapr); if (pixmap!=pixmapn) DeleteObject(pixmapn); #endif } void G_Ghost::draw(int x,int y,int run) {//draw at x,y with running boolean if (!run) pixmap=pixmapn; else pixmap=pixmapr; GraphElement::draw(x,y); } pacman-10.orig/gghost.h100644 1747 1750 504 5741601474 15026 0ustar clameterclameter#ifndef __gghost_h_ #define __gghost_h_ #include"gmoveabl.h" class G_Ghost : public G_Moveables { PIXMAPTYPE pixmapn,pixmapr; //pixmaps for normal and running colours public: G_Ghost(COLOURTYPE); //normal colours ~G_Ghost(); void draw(int,int,int); //draw at x,y with running boolean }; #endif pacman-10.orig/ghost.cc100644 1747 1750 20377 6004043722 15054 0ustar clameterclameter#include"ghost.h" #include #include"types.h" #include"pac.h" int Ghost::ghostseaten=0; //initializing Ghost::Ghost(COLOURTYPE farge,int xx,int yy) { //constructor b=Board::instance(); //get the instance of the board d=up; //direction to move is up g=new G_Ghost(farge); //a new one startx=x=xx; //set initial coordinates starty=y=yy; st=randm; //move at random randmv=4; randmv=random()%8 +4;//a random number about changing direction when randoming } Ghost::~Ghost() { delete g; } void Ghost::start() { //reset ghost x=startx; //set initial coordinates y=starty; st=randm; //move at random d=up; //direction is up ghostseaten=0; //number of ghosts eaten is zero } GID_TYPE Ghost::getgid() { return g->getgid(); } void Ghost::die(Gamedata* da) { //when pacman eats ghost int i, //plain counter sc; //score temporary ghostseaten++; //another ghost eaten by pacman for(i=ghostseaten,sc=GHOSTSCORE;i>1;i--,sc*=2); da->scorepluss(sc); deadtime=DEADTIME; //set time to be dead st=eaten; //set status to eaten x=startx; //set initial coordinates y=starty; d=still; //direction is still } void Ghost::getxy(int *xx,int *yy) { *xx=x; *yy=y; } void Ghost::draw(void) { //draw the ghost g->draw(x,y,st==hunted);//3rd parameter is about colour: ghost hunted or not } void Ghost::eat(void) { //when pacman eats ghost deadtime=DEADTIME; //set time to be dead st=eaten; //set status to eaten x=startx; //set initial coordinates y=starty; } int Ghost::otherdir(int xx,int yy,direction dd) {//is there an other direction to go int xxx,yyy; //coordinates direction goleft,goright; //the relative left/right to where a ghost goes switch (dd) { //find out relative direction case up: {goleft=left; goright=right; } break; case down: {goleft=right; goright=left; } break; case left: {goleft=up; goright=down; } break; case right: {goleft=down; goright=up; } break; } next(&xxx,&yyy,goleft,xx,yy); //next coordinates if left if (b->what_is(xxx,yyy)==classWall) goleft=none;//set none if a wall is left next(&xxx,&yyy,goright,xx,yy);//next coordinates if right if (b->what_is(xxx,yyy)==classWall) goright=none;//set none if a wall is right // printf("%d\n",goleft!=none && goright!=none); return (goleft!=none || goright!=none);//whether left or right is not a wall } void Ghost::newdir(int xx,int yy,direction* dd) {//gets a new direction to go int xxx,yyy; //coordinates direction goleft,goright; //the relative left/right to where a ghost goes switch (*dd) { //find out relative direction case up: {goleft=left; goright=right; } break; case down: {goleft=right; goright=left; } break; case left: {goleft=up; goright=down; } break; case right: {goleft=down; goright=up; } break; } next(&xxx,&yyy,goleft,xx,yy); //next coordinates if left if (b->what_is(xxx,yyy)==classWall) goleft=none;//set none if a wall is left next(&xxx,&yyy,goright,xx,yy);//next coordinates if right if (b->what_is(xxx,yyy)==classWall) goright=none;//set none if a wall is right //if (goleft==none && goright==none) exit(1); //if either is none return the other // if (startx==15 && starty==9) printf("change at %d %d\n",x,y); if (goleft==none) { *dd=goright; return; } if (goright==none) { *dd=goleft; return; } //if both is not none then choose one at random if (random()%2)*dd=goright; else *dd=goleft; } int Ghost::searchpac(direction *dd,int *gox,int *goy,Pacman *pac) {//look for pacman int xx,yy, //coordinates dx,dy, //delta goto coordinates goxx,goyy; //goto coordinates pac->getxy(&goxx,&goyy); //get pacman coordinates if (goxx==x || goyy==y) { //if either x or y coordinates same dx=goxx-x; dy=goyy-y; //set deltas dx dy to add to x,y to get to goxx goyy if (dx<0) dx=-1; if (dx>0) dx=1; if (dy<0) dy=-1; if (dy>0) dy=1; xx=x; yy=y; while (!(xx==goxx && yy==goyy) && b->what_is(xx,yy)!=classWall) { xx+=dx; yy+=dy; } //checks whether there is a wall between pacman and ghost if (xx==goxx && yy==goyy) {//if no wall hunt pacman *gox=goxx; *goy=goyy; if (st==hunted) { dx=-dx; dy=-dy; } //if pacman is super then run if (dx==0 && dy==-1) *dd=up; if (dx==0 && dy==1) *dd=down; if (dx==1 && dy==0) *dd=right; if (dx==-1 && dy==0) *dd=left; return 1; } } return 0; } void Ghost::lookforpac(Pacman *pac) {//look for pacman int i=1; //ghost moved? int xx,yy; //coordinates if (pac->is_super()) // if pacman is super { if (st!=eaten) st=hunted; } //then if ghost is not eaten then it is hunted else { //if pacman not super if (st==hunted) { //if ghost is (was) hunted it must now be random st=randm; //must be random ghostseaten=0; //set number of ghosts eaten back to zero } } switch (st) { //case ghost status of case hunter: { //if ghost is hunter i=searchpac(&d,&go_x,&go_y,pac);//then search for pacman if (i) { //if found pac->getxy(&xx,&yy); //and pacman coordinates if (x==xx && y==yy) d=still; //are equal to ghosts's: stand still } } break; case randm: { i=searchpac(&d,&go_x,&go_y,pac); //then search for pacman if (i) { //if found st=hunter; //then ghost is a hunter } else { } } break; case hunted: { i=searchpac(&d,&go_x,&go_y,pac); //then search for pacman } break; case eaten: { } break; } } Ghost::go(Pacman *pac) { //go for pacman: do ghost code typ w; //what type is at next coordinates int i=1; //moved or not? int xx,yy; //coordinates if (pac->is_super()) //if pacman is super { if (st!=eaten) st=hunted; } //if st is not eaten then ghost is hunted else { if (st==hunted) st=randm; } //else if pacman is not and ghost //is still hunted then it is now random switch (st) { //if ghost status is case hunter: { //hunter i=searchpac(&d,&go_x,&go_y,pac);//then search for pacman if (i) { //if found pac->getxy(&xx,&yy); //and pacman coordinates if (x==xx && y==yy) d=still; //are equal to ghosts's: stand still break; } if (go_x==x && go_y==y) {//if ghost has reached pacman last known coordinates pac->getxy(&xx,&yy); //get pacman coordinates //if (!otherdir(x,y,d)) //and if there is not an other possible l/r direction newdir(x,y,&d); //change direction st=randm; //and do random movements. } } break; case randm: { //if ghost moves at random i=searchpac(&d,&go_x,&go_y,pac); //then search for pacman if (i) { //if found st=hunter; //then ghost is hunter } else { if (otherdir(x,y,d)) {//and if there is an other possible l/r direction if (!(random()%randmv)) //if random "hits" newdir(x,y,&d); //then change direction } } } break; case hunted: { //if the ghost is hunted i=searchpac(&d,&go_x,&go_y,pac);//then search for pacman } break; case eaten: { //if ghost is eaten if (deadtime) //is > 0 deadtime--; //decrement it by one else { st=randm; //else, if it is zero, then it's status is random d=up; //and direction is up } } break; } //if (dd!=none) d=dd; next(&xx,&yy,d,x,y); //find next coordinates w=b->what_is(xx,yy); //what's at those new coordinates then //if (x==xx && y==yy) printf("%d %d\n\n",st,d); //printf("%d %d %d %d %d %d %d %d %d //%d\n\n",up,down,left,right,none,still,randm,hunter,hunted,eaten); //exit(1); switch (w) {//if w is a // case SpecialWall: { x=xx; y=yy; } break; case classWall: { i=0; //can not go through walls newdir(x,y,&d); //find a new direction next(&xx,&yy,d,x,y); //find next coordinates x=xx; y=yy; //set to new coordinates } break; // case Food: { x=xx; y=yy; } break; // case SuperFood: { x=xx; y=yy; } break; // case Blank: { x=xx; y=yy; } break; // case BonusLife: { x=xx; y=yy; } break; // case BonusPoint: { x=xx; y=yy; } break; default: { x=xx; y=yy; } break;//this is the standard: set to new coordinates // default: printf("caseerror\n"); break; } //printf("%s",w); return i; } // if (otherdir(x,y,d)) {//and if there is an other possible l/r direction // if (!(random()%randmv)) //if random "hits" // newdir(x,y,&d); //then change direction // if (go_x==x && go_y==y) {//if ghost has reached pacman last known coordinates // pac->getxy(&xx,&yy); //get pacman coordinates //if (!otherdir(x,y,d)); //and if there is an other possible l/r direction // newdir(x,y,&d); //change direction // st=randm; //and do random movements. pacman-10.orig/ghost.h100644 1747 1750 3135 5741367272 14707 0ustar clameterclameter#ifndef __ghost_h_ #define __ghost_h_ #include"moveable.h" #include"board.h" #include"usrinter.h" #include"gghost.h" #include"direc.h" class Pacman; #include"pacman.h" typedef enum {randm,hunter,hunted,eaten} gstat; //the status: whether the ghost is going at random, it has seen pacman and is hunting him down, if pacman is super and hunting the ghosts, and whether the ghost itself is eaten by the pacman class Ghost : public Moveables { int startx,starty, //starting coordinates go_x,go_y, //if it hunts pacman, this is were it was last seen dx,dy; //increments to get go where pacman was last seen gstat st; //the ghost's status direction d; //the direction the ghost is going int deadtime; //the remaing time for the ghost to be dead if it's eaten int randmv; //a random number for changing direction when moving at random G_Ghost *g; //a pointer to the ghost graphical element static int ghostseaten; //the number of ghosts eaten by pacman while super void newdir(int,int,direction*); //gets a new direction to go int otherdir(int,int,direction); //is there an other direction to go int searchpac(direction *,int *,int *,Pacman *); //look for pacman public: Ghost(COLOURTYPE,int,int); //constructor with coordinates ~Ghost(); //destructor void draw(void); //draw the ghost go(Pacman*); //go for pacman: do ghost code typ is_a(void) {return classGhost;} void eat(void); //when pacman eats ghost void getxy(int*,int*); void die(Gamedata*); //when pacman eats ghost void start(); //reset ghost GID_TYPE getgid(); void lookforpac(Pacman *pac); //look for pacman }; #endif pacman-10.orig/gmoveabl.h100644 1747 1750 233 5724676112 15330 0ustar clameterclameter#ifndef __gmoveabl_h_ #define __gmoveabl_h_ #include"gdynelem.h" class G_Moveables : public DynamicGraphElement { public: }; #endif pacman-10.orig/gpacman.cc100644 1747 1750 3552 5741605550 15324 0ustar clameterclameter#include"gpacman.h" #include"pac.h" G_Pacman::G_Pacman() { consfn(); pix(&pix0,pacman0_bits,Colour::PACMANCOLOUR,Colour::MYBACKGROUND); pix(&pixl,pacmanleft_bits,Colour::PACMANCOLOUR,Colour::MYBACKGROUND); pix(&pixr,pacmanright_bits,Colour::PACMANCOLOUR,Colour::MYBACKGROUND); pix(&pixu,pacmanup_bits,Colour::PACMANCOLOUR,Colour::MYBACKGROUND); pix(&pixd,pacmandown_bits,Colour::PACMANCOLOUR,Colour::MYBACKGROUND); pixmap=pixr; look=right; mouth=1; }; G_Pacman::~G_Pacman(void) { #ifdef XWIN if (pixmap!=pix0) XFreePixmap(display,pix0); if (pixmap!=pixl) XFreePixmap(display,pixl); if (pixmap!=pixr) XFreePixmap(display,pixr); if (pixmap!=pixd) XFreePixmap(display,pixd); if (pixmap!=pixu) XFreePixmap(display,pixu); #elif defined MSWIN if (pixmap!=pix0) DeleteObject(pix0); if (pixmap!=pixl) DeleteObject(pixl); if (pixmap!=pixr) DeleteObject(pixr); if (pixmap!=pixd) DeleteObject(pixd); if (pixmap!=pixu) DeleteObject(pixu); #endif } void G_Pacman::draw(int x,int y,direction d,direction try_d) { if (d==still) mouth=1; if (try_d!=still) look=try_d; //if (d==still) mouth=1; else look=d; if (mouth) { switch (look) { case up: pixmap=pixu; break; case down: pixmap=pixd; break; case left: pixmap=pixl; break; case right: pixmap=pixr; break; default: pacwarning("Gpac"); } } else pixmap=pix0; mouth=1-mouth; //if moving, mouth opens/closing alternating GraphElement::draw(x,y); } //returns graphical id according whether mouth is open or which direction GID_TYPE G_Pacman::getgid(direction d,direction try_d) { PIXMAPTYPE pixmap; if (d==still) mouth=1; if (try_d!=still) look=try_d; //if (d==still) mouth=1; else look=d; if (mouth) { switch (look) { case up: pixmap=pixu; break; case down: pixmap=pixd; break; case left: pixmap=pixl; break; case right: pixmap=pixr; break; default: pacwarning("Gpac"); } } else pixmap=pix0; return pixmap; } pacman-10.orig/gpacman.h100644 1747 1750 1040 5741602176 15155 0ustar clameterclameter#ifndef __gpacman_h_ #define __gpacman_h_ #include"gmoveabl.h" #include"usrinter.h" #include"colour.h" #include"direc.h" class G_Pacman : public G_Moveables { PIXMAPTYPE pix0,pixl,pixr,pixu,pixd; //pixmaps for mouth shut, and mouth //open in left right up down direction direction look; //direction to look int mouth; //mouth open? public: G_Pacman(); //constructor ~G_Pacman(); //destructor void draw(int,int,direction,direction); //draw pacman x,y direction and try_d GID_TYPE getgid(direction,direction); }; #endif pacman-10.orig/graphele.cc100644 1747 1750 11627 5753225604 15530 0ustar clameterclameter#include"graphele.h" #include #include #ifdef XWIN //for X-Win only void GraphElement::draw(int x,int y) { //draw graphical element XCopyArea(display,pixmap,window,gc,0,0,UNITWIDTH,UNITHEIGHT,TEXTSPACE+UNITWIDTH*x,UNITWIDTH*y); //copy pixmap to window } void GraphElement::consfn() { //function to help with constructing UserInterface* u=UserInterface::instance(); //get UserInterface instance display=u->getdisplay(); //get pointer to display connection window=u->getwindow(); //get window screen=u->getscreen(); //get screen gc=u->getgc(); //get graphic context int wx,wy; //dummies Window root; //dummy unsigned int wwidth,wheight,wdepth,wborder,width,height,status; //dummies, except wdepth XGetGeometry(display,window,&root,&wx,&wy,&wwidth,&wheight, &wborder,&wdepth); //get X data depth=wdepth; //setting depth } GraphElement::~GraphElement(void) { //destructor XFreePixmap(display,pixmap); //freeing pixmap } //create pixmap void GraphElement::pix(Pixmap *p,char map[],unsigned long myforeground, unsigned long mybackground) { *p=XCreatePixmapFromBitmapData(display,window,map,UNITWIDTH,UNITHEIGHT, myforeground,mybackground,depth); } #elif defined MSWIN //for MS-Win only void GraphElement::draw(int x,int y) { //draw graphical element HDC hdcDest; //destination device context HBITMAP hbmpOld; //previously selected bitmap hdcDest=GetDC(hwnd); //select device context hbmpOld=SelectObject(hdcMemory,pixmap); //select our pixmap BitBlt(hdcDest,TEXTSPACE+UNITWIDTH*x,UNITHEIGHT*y,UNITWIDTH,UNITHEIGHT,hdcMemory,0,0, SRCCOPY); //copy pixmap to window SelectObject(hdcMemory, hbmpOld); //select back previous bitmap ReleaseDC(hwnd,hdcDest); //release device context } void GraphElement::consfn() { //function to help with constructing UserInterface* u=UserInterface::instance(); //get userinterface instance HDC hdcDest; //destination device context hwnd=u->gethwnd(); //get handle to window hdcMemory = u->gethdcmem(); //get and set device context memory //cbBits=16; } GraphElement::~GraphElement(void) { //destructor DeleteObject(pixmap); //delete the pixmap } void GraphElement::pix(HBITMAP *p,short map[],COLOURNAME foreground, COLOURNAME background) { //create pixmap HDC hdcDest; //destination device context HDC hDC; //device context HDC hMemoryDC; //memory device context HBITMAP hBitmap; //current bitmap HBITMAP hOldBitmap; //previous bitmap HBRUSH hForeBrush; //foreground colour brush HBRUSH hBackBrush; //background colour brush HBRUSH hOldBrush; //previous brush hDC = GetDC(hwnd); //get device context for window hMemoryDC = CreateCompatibleDC(hDC);//create a compatible device context hBitmap = CreateCompatibleBitmap(hDC, UNITWIDTH, UNITHEIGHT); //create a compatible bitmap hOldBitmap = SelectObject(hMemoryDC, hBitmap); //select our bitmap hForeBrush = CreateSolidBrush(foreground); //create fore brush hBackBrush = CreateSolidBrush(background); //create back brush hOldBrush = SelectObject(hMemoryDC, hForeBrush); //select fore brush PatBlt(hMemoryDC, 0, 0, UNITWIDTH,UNITHEIGHT, BLACKNESS); //set pixmap to all blackness int x,y, //counters bitno=0; //bit number short* mapptr=map; //initial source counter short byte=*mapptr; //initial content for(y=0; y&2 # Only one argument exit 1 ;; esac # Create make file: echo "#" echo "# Makefile" echo "#" # Heading lines echo "#" echo "TARGET = $TARGET" # TARGET line OS=`uname -s` OSV=`uname -r` case $OS in SunOS) case $OSV in 5*) echo "#Solaris " MYTYPE=1 ;; *) echo "#SunOS" MYTYPE=2 ;; esac ;; ULTRIX) echo "#ULTRIX" MYTYPE=3 ;; Linux) echo "#Linux" MYTYPE==4 ;; *) echo "#unknown" ;; esac echo "" echo "CFLAGS =-g" # C compiler flags echo "CC=gcc" CC="gcc" echo "LIBS = -lX11 -lcurses -ltermcap" case $MYTYPE in 1) echo "MORELIBS = -lucb -lsocket" ;; 2) echo "MOREINCL="#-I/usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.5.8/include ;; esac echo "" # Libraries echo "" # Print entries for header files: awk ' $1 ~/#include/ && $2 ~ /"/ { print $2 }' *.cc | sort -u | awk '{ split($1, H, "\"") # Puts "file.h" into H NH++ HH[NH]=H[2] # Puts file.h into HH } END { printf("HFILES= \\\n") for (i = 1; i < NH; i++) printf("\t%s\\\n", HH[i]) # Prints file.h\ printf("\t%s\n", HH[NH]) # Prints file.h }' # Print eNtries for object files: ls *.cc | # List all C source files awk -F. '{ CC[NR]=$1 # Store file name without suffix } END { printf("OFILES= \\\n") for (i = 1; i < NR; i++) printf("\t%s.o\\\n", CC[i]) # Prints file.o\ printf("\t%s.o\n", CC[NR]) # Prints file.o # Print entry to make TARGET: printf("\n$(TARGET): $(OFILES)\n") printf("\t$(CC) -o $@ $(CFLAGS) $(OFILES) $(LIBS) $(MORELIBS)\n\n") printf("%%.o :\n") printf("\t$(CC) -o $@ -c $(MOREINCL) $*.cc\n\n") }' #%.d: %.c for ff in *.cc ; do ${CC} -MM ${ff} ${MOREINCL} done echo "" echo "clean: " echo " rm *.o core #*" echo "" exit 0 pacman-10.orig/moveable.h100644 1747 1750 515 5741602442 15323 0ustar clameterclameter#ifndef __moveable_h_ #define __moveable_h_ #include"gamedata.h" #include"dynamiel.h" #include"gamedata.h" class Moveables : public DynamicElement { protected: UserInterface* u; //pointer to the userinterface Board* b; //pointer to the board public: virtual void die(Gamedata*)=0; //virtual die function }; #endif pacman-10.orig/object.h100644 1747 1750 124 5724676112 15001 0ustar clameterclameter#ifndef __object_ #define __object_ #include"basis.h" class Object { }; #endif pacman-10.orig/pac.cc100644 1747 1750 20743 6003550710 14467 0ustar clameterclameter#include #include #include"pac.h" #include"gamedata.h" #include"usrinter.h" #include"pacman.h" #include"board.h" #include"direc.h" #include"ghost.h" #include"bonuslif.h" #include"bonuspnt.h" #include"timing.h" #include"arg.h" // routine to make the game exit if there was a previous detected error void pacexit(char *s) { #ifdef XWIN printf("%s\n",s); exit(1); #endif } // routine do display a warning if it should be void pacwarning(char *s) { #ifdef XWIN printf("Warning: %s\n",s); #endif } // checks whether pacman has eaten the bonus, or pacman or some ghost // have met and one of them must "die" void check(Board* bo,Gamedata *da,Pacman* pa,Ghost *gh[GHOSTS],Bonus *&bon) { int i; //counter int alive; //is pacman still alive int x1, y1; //pacman coordinates int x2, y2; //coordinates for bonus or a ghost pa->getxy(&x1,&y1); //get pacman coordinates if (bon) { //if there is a bonus on the board bon->getxy(&x2,&y2); //get bonus coordinates if (x1==x2 && y1==y2) { //if pacman and bonus coordinates the same bon->eat(da); //then bonus is eaten bon=0;} //and gone } for(i=0,alive=1;alive && igetxy(&x2,&y2); //get coordinates if (x1==x2 && y1==y2) { //if pacman and ghost coordinates the same if (pa->is_super()) //if pacman is super { gh[i]->die(da); //then ghost dies } else { pa->die(da); //else pacman dies alive=0; //set not alive } } } } void writetext() { //just draw text UserInterface *u=UserInterface::instance(); Gamedata *da=Gamedata::instance(); u->write(1,1,"Hiscore"); //print to userinterface at x, y, something u->write(1,2,da->gethiscore(),8); u->write(1,4,"Score"); u->write(1,5,da->getscore(),8); u->write(1,7,"Lives"); u->write(1,8,da->getlives(),8); u->write(1,10,"Level"); u->write(1,11,da->getlevel(),8); u->write(1,13,"Bonus"); u->write(1,14,da->getbonus(),8); u->write(1,16,"Supertime"); } #ifdef MSWIN int PASCAL WinMain(HANDLE hInstance, HANDLE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { UserInterface::sethInstance(hInstance); //storing info from MS Window Manager UserInterface::sethPrevInstance(hPrevInstance); UserInterface::setlpCmdLine(lpCmdLine); UserInterface::setnCmdShow(nCmdShow); #else main(int argc,char **argv) { Argument(argc, argv); // storing the command line arguments #endif int i,j; //plain counters Gamedata *da=Gamedata::instance(); //gamedata like score, hiscore, lives, levels etc Bonus *bon=0; //the bonus, it can be bonuslife or bonuspoint int g; //whether pacman moved int inp; //the result of getinput: whether the game is done int done; //whether game is done direction d; //the direction pacman moved UserInterface* u=UserInterface::instance(Keyboard); //the userinterface to the user srandom(rand()); //reset random number generator Board* board=Board::instance(); //the pacman board matrix Pacman pac; //the pacman itself Ghost *gh[GHOSTS]; //the ghosts BonusLife *bonl=new BonusLife; //a bonuslife not connected to bonus yet BonusPoint *bonp=new BonusPoint;//a bonuspoint not connected to bonus yet gh[0]= new Ghost(Colour::GHOSTCOLOUR1,GHOST1X,GHOST1Y); //initializing ghost 1 gh[1]= new Ghost(Colour::GHOSTCOLOUR2,GHOST2X,GHOST2Y); //initializing ghost 2 gh[2]= new Ghost(Colour::GHOSTCOLOUR3,GHOST3X,GHOST3Y); //initializing ghost 3 gh[3]= new Ghost(Colour::GHOSTCOLOUR4,GHOST4X,GHOST4Y); //initializing ghost 4 inp=u->getinput(); //gets whether the game is done writetext(); done=0; //means not done while (!done) { //while not done da->start(); //total initialization of the gamedata u->write(1,8,da->getlives(),8); u->write(1,11,da->getlevel(),8); u->write(1,14,da->getbonus(),8); while (!done && da->getlives()) { //while game not done and pacman still alive board->start(da->getboardlevel());//resets board to a certain level pac.start(); //reset pacman for(i=0;istart(); board->draw(); //draw entire board d=still; //pacman got direction still, no moving board->delta_draw(); //draw just the changes of the board timingstart(); //reset the timer while (done==0 && da->getlives() && !da->eatenall()) { //while game not done and pacman still alive // and while not all food eaten u->write(1,8,da->getlives(),8); for(i=0;ilookforpac(&pac); g=pac.go(d,da); //let pacman go direction d for(i=0;igo(&pac); //let the ghosts move check(board,da,&pac,gh,bon); // checks whether pacman has eaten the bonus, or pacman or some ghost have met and one of them must "die" board->sprite(&pac); //let it be a sprite for(i=0;isprite(gh[i]); //let it be a sprite if (bon) board->sprite(bon); //let it be a sprite board->delta_draw(); //draw just the changes of the board timing(pac.is_super()); //do timing: make the game go smooth enough d=u->stick(); //pacman got direction if (!bon) { // if no bonus if "on" if ((random() & 4095)==0) { if (random() & 61440) bon=bonp; //if seldom start a bonuspoint else bon=bonl; //if very seldom start a bonuslife bon->start(); } //reset the spesific bonus thing } if (bon) { //if bonus exists if (!bon->code()) //returns whether the bonus has lived it's time bon=0; } // "remove" bonus if (pac.is_super()) { //if pac has eaten superfood do an extra run u->write(1,17,pac.getsupertime(),8); g=pac.go(d,da); //let pacman go direction d check(board,da,&pac,gh,bon); // checks whether pacman has eaten the bonus, or pacman or some ghost have met and one of them must "die" board->sprite(&pac); //let it be a sprite for(i=0;isprite(gh[i]); //let it be a sprite if (bon) board->sprite(bon); //let it be a sprite board->delta_draw(); //draw just the changes of the board timing(pac.is_super()); //do timing: make the game go smooth enough d=u->stick(); //pacman got direction } if (pac.is_dead()) { // do this if pacman died bon=0; //no more bonus, is gone u->write(1,8,da->getlives(),8); board->sprite(&pac); //let it be a sprite board->delta_draw(); //draw just the changes of the board timing(0); //do timing pac.go(right,da); //let pacman point right board->sprite(&pac); //let it be a sprite board->delta_draw(); //draw just the changes of the board timing(0); //do timing pac.go(up,da); //let pacman point up board->sprite(&pac); //let it be a sprite board->delta_draw(); //draw just the changes of the board timing(0); //do timing pac.go(left,da); //let pacman point left board->sprite(&pac); //let it be a sprite board->delta_draw(); //draw just the changes of the board timing(0); //do timing pac.go(down,da); //let pacman point down board->sprite(&pac); //let it be a sprite board->delta_draw(); //draw just the changes of the board timing(0); //do timing pac.go(right,da); //let pacman point right board->sprite(&pac); //let it be a sprite board->delta_draw(); //draw just the changes of the board timing(0); //do timing pac.start(); //reset pacman for(i=0;istart(); //reset ghosts } da->bondwn(); //countdown bonus u->write(1,2,da->gethiscore(),8); u->write(1,5,da->getscore(),8); u->write(1,14,da->getbonus(),8); if (pac.is_super()) //if pac is super u->write(1,17,pac.getsupertime(),8); //write remaining supertime else u->write(1,17," "); //write nothing inp=u->getinput(); //get whether the game is wanted to end done=inp; } if (!done) //if not done if (!da->eatenall()) { //if not all food eaten u->write(1,20,"GAME OVER"); //then the game must be over u->waitsync(); //wait til everything is printed to screen for(i=0;i<4;i++,timing(0)); //wait a sec or something u->write(1,20," "); //then write nothing da->start(); //reset gamedata u->write(1,8,da->getlives(),8); u->write(1,11,da->getlevel(),8); u->write(1,14,da->getbonus(),8); } else { //all food must have been eaten da->scorepluss(da->getbonus()); //add score with bonus da->start2(); //prepare gamedata for next level u->write(1,11,da->getlevel(),8); u->write(1,14,da->getbonus(),8); } } } // all the rest of this is end of game cleanup delete bonp; delete bonl; for(i=0;ilivesdwn(); //decrement a life } int Pacman::getsupertime() { //get the remaning time pacman is super return supertime;} int Pacman::is_super() { //is pacman super? return st==super; } void Pacman::draw(void) { //specific draw for pacman g->draw(x,y,d,try_d); //draw pacman direction it was going and was tried } GID_TYPE Pacman::getgid() { return g->getgid(d,try_d); } void Pacman::getxy(int *xx,int *yy) { *xx=x; *yy=y; } int Pacman::go(direction dd,Gamedata *da) {//what direction to try to move it typ w; //what's at new coordinates int i=1; //this i is returned: it is whether pacman moved or not. int xx,yy; //possible next coordinates if (dd!=none) try_d=d=dd;//if a direction!=none given, set the two directions if (st==dead) { //if pacman died d=still; //then actual moving direction is still return 0; //and return not moved } switch (st) { case super: { //if super if (supertime) //if supertime is > 0 supertime--; //decrement supertime else st=normal; //if supertime is zero then status is normal } break; case normal: break; } next(&xx,&yy,d,x,y); //compute next coordinates w=b->what_is(xx,yy); //what's at new coordinates switch (w) { //if it's case classSpecialWall: case classWall: //can't move through walls { i=0; d=still; } break; case classFood: { x=xx; y=yy; //set to new coordinates b->eat(x,y); //eat food at board coordinates da->foodeat(); //let gamedata know a food is eaten da->scorepluss(FOODSCORE); //increase the score } break; case classSuperFood: { x=xx; y=yy; //set to new coordinates b->eat(x,y); //eat superfood at board coordinates st=super; //set status to super supertime=SUPERTIME; //set supertime, too } break; case classBlank: { x=xx; y=yy; //set to new coordinates } break; // case BonusLife: { x=xx; y=yy; b->eat(x,y); } break; // case BonusPoint: { x=xx; y=yy; b->eat(x,y); } break; default: /*printf("caseerror\n");*/ break; } //printf("%d\n",d); //printf("%s",w); return i; //this i is returned: it is whether pacman moved or not. } pacman-10.orig/pacman.h100644 1747 1750 1650 5741367112 15013 0ustar clameterclameter#ifndef __pacman_h_ #define __pacman_h_ #include"moveable.h" #include"board.h" #include"usrinter.h" #include"gpacman.h" #include"direc.h" typedef enum {dead,normal,super} stat; class Pacman : public Moveables { G_Pacman *g; //pointer to the pacman graphic element stat st; //what't it's state: dead, normal or super int supertime; //the remaning time pacman is super direction d,try_d; //what direction is it going, what direction was tried public: int getsupertime(); //get the remaning time pacman is super void start(); //reset pacman int is_dead(); //is pacman dead? void die(Gamedata*); //let pacman die a life Pacman(); //constructon ~Pacman(); //destructor void draw(void); //specific draw for pacman int go(direction,Gamedata*); //what direction to try to move pacman void getxy(int*,int*); typ is_a(void) {return classPacman;} int is_super(void); //is pacman super? GID_TYPE getgid(); }; #endif pacman-10.orig/pacman.man100644 1747 1750 2573 6005241260 15331 0ustar clameterclameter.\" pacman.man .\" .\" This program is free software. See the file COPYING for a list .\" of conditions. .\" .TH PACMAN 1 .SH NAME pacman - the game of pacman .SH SYNOPSIS .B "pacman" [grey] .SH DESCRIPTION .PP .I Pacman is an old action game. .PP You are Pacman, and you are supposed to eat all the small dots to get to the next level. You are also supposed to keep away from the ghosts, if they take you, you lose one life, unless you have eaten a large dot, then you can, for a limited amount of time, chase and eat the ghosts. There is also bonus available, for a limited amount of time. An X gives just points, but a little pacman gives an extra life. .PP You use either keyboard or mouse. Default from start is keyboard. .PP Keyboard mode: To move use \fIarrows\fP, to quit, press \fIq\fP, to use mouse, press \fIm\fP. .PP Mouse mode: To move, \fImove mouse\fP, to quit, press \fIRButton\fP, to use keyboard, press \fILButton\fP. .PP Details: When pacman has moved to a new place, if you want it to change it's moving direction, hit key/move mouse until it has moved. .SH OPTIONS .PP .TP 8 .B "grey" To start in grey mode instead of the default \fBcolor\fP. .SH ENVIRONMENT .PP .TP 8 .B DISPLAY To get default display. .SH AUTHOR .if t Roar Thron\(aes, .if n Roar Thronaes, roart@nvg.unit.no. .br This man page written by .if t J\(:org Wunsch, .if n Joerg Wunsch, joerg_wunsch@uriah.heep.sax.de. pacman-10.orig/point.cc100644 1747 1750 375 5724676124 15035 0ustar clameterclameter#include"point.h" Point::Point(int xx=0,int yy=0) { x=xx; y=yy; }; Point::val_x() { return x; }; Point::val_y() { return y; }; void Point::set_x(int xx) { x=xx; }; void Point::set_y(int yy) { y=yy; }; void Point::set_xy(int xx,int yy) { x=xx; y=yy; }; pacman-10.orig/point.h100644 1747 1750 520 5724676112 14664 0ustar clameterclameter#ifndef __point_h_ #define __point_h_ #include"object.h" class Point : public Object { int x,y; public: Point(int,int); int val_x(void); int val_y(void); void set_x(int x); void set_y(int y); void set_xy(int x,int y); //Point& operator=(const Point& from) { //this->x=from.x; //this->y=from.y; //} }; #endif pacman-10.orig/shapes.h100644 1747 1750 26637 6001304304 15053 0ustar clameterclameter#include"basis.h" #ifdef XWIN #define SHAPETYPE char //the bits in the char (8 bits) #elif defined MSWIN #define SHAPETYPE short //2 bytes, 16 bits needed #elif defined VTX #define SHAPETYPE char //the actual character #endif #ifdef XWIN //X-Win only, seems to want it mirrored about Y-axis #ifndef DOUBLE static SHAPETYPE pacman0_bits[]= {0x3c,0x7e,0xff,0xff,0xff,0xff,0x7e,0x3c}; static SHAPETYPE pacmanleft_bits[]= {0x3c,0x68,0xf0,0xe0,0xe0,0xf0,0x78,0x3c}; static SHAPETYPE pacmanright_bits[]={0x3c,0x16,0x0f,0x07,0x07,0x0f,0x1e,0x3c}; static SHAPETYPE pacmanup_bits[]= {0x00,0x00,0x81,0xc3,0xa7,0xff,0x7e,0x3c}; static SHAPETYPE pacmandown_bits[]= {0x3c,0x7e,0xff,0xa7,0xc3,0x81,0x00,0x00}; static SHAPETYPE vertwall_bits[]={0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c}; static SHAPETYPE horiwall_bits[]={0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00}; static SHAPETYPE blank_bits[]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; static SHAPETYPE cross_bits[]={0x3c,0x3c,0xff,0xff,0xff,0xff,0x3c,0x3c}; static SHAPETYPE food_bits[]={0x00,0x00,0x18,0x3c,0x3c,0x18,0x00,0x00}; static SHAPETYPE superfood_bits[]={0x00,0x3c,0x7e,0x7e,0x7e,0x7e,0x3c,0x00}; static SHAPETYPE ghost_bits[]={0x18,0x7e,0xff,0xdb,0xff,0xff,0xff,0xa5}; static SHAPETYPE corner2_bits[]={0x3c,0x3e,0x3f,0x3f,0x3f,0x1f,0x00,0x00}; static SHAPETYPE corner3_bits[]={0x00,0x00,0x1f,0x3f,0x3f,0x3f,0x3e,0x3c}; static SHAPETYPE corner4_bits[]={0x00,0x00,0xf8,0xfc,0xfc,0xfc,0x7c,0x3c}; static SHAPETYPE corner1_bits[]={0x3c,0x7c,0xfc,0xfc,0xfc,0xf8,0x00,0x00}; static SHAPETYPE specwall_bits[]={0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00}; static SHAPETYPE bonuspoint_bits[]={0x00,0x00,0x24,0x18,0x18,0x24,0x00,0x00}; static SHAPETYPE bonuslife_bits[]={0x00,0x00,0x1c,0x38,0x38,0x1c,0x00,0x00}; static SHAPETYPE e180_bits[]={0x00,0x00,0xf8,0xfc,0xfc,0xf8,0x00,0x00}; static SHAPETYPE e90_bits[]={0x00,0x00,0x18,0x3c,0x3c,0x3c,0x3c,0x3c}; static SHAPETYPE e0_bits[]={0x00,0x00,0x1f,0x3f,0x3f,0x1f,0x00,0x00}; static SHAPETYPE e270_bits[]={0x3c,0x3c,0x3c,0x3c,0x3c,0x18,0x00,0x00}; static SHAPETYPE t0_bits[]={0x00,0x00,0xff,0xff,0xff,0xff,0x7e,0x3c}; static SHAPETYPE t270_bits[]={0x3c,0x3e,0x3f,0x3f,0x3f,0x3f,0x3e,0x3c}; static SHAPETYPE t180_bits[]={0x3c,0x7e,0xff,0xff,0xff,0xff,0x00,0x00}; static SHAPETYPE t90_bits[]={0x3c,0x7c,0xfc,0xfc,0xfc,0xfc,0x7c,0x3c}; #else static SHAPETYPE pacman0_bits[]= {0xf0, 0x0f, 0xf0, 0x0f, 0xfc, 0x3f, 0xfc, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x3f, 0xfc, 0x3f, 0xf0, 0x0f, 0xf0, 0x0f}; static SHAPETYPE pacmanleft_bits[]= {0xf0, 0x0f, 0xf0, 0x0f, 0xc0, 0x3c, 0xc0, 0x3c, 0x00, 0xff, 0x00, 0xff, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xff, 0x00, 0xff, 0xc0, 0x3f, 0xc0, 0x3f, 0xf0, 0x0f, 0xf0, 0x0f}; static SHAPETYPE pacmanright_bits[]={0xf0, 0x0f, 0xf0, 0x0f, 0x3c, 0x03, 0x3c, 0x03, 0xff, 0x00, 0xff, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0xff, 0x00, 0xff, 0x00, 0xfc, 0x03, 0xfc, 0x03, 0xf0, 0x0f, 0xf0, 0x0f}; static SHAPETYPE pacmanup_bits[]= {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x03, 0xc0, 0x0f, 0xf0, 0x0f, 0xf0, 0x33, 0xfc, 0x33, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x3f, 0xfc, 0x3f, 0xf0, 0x0f, 0xf0, 0x0f}; static SHAPETYPE pacmandown_bits[]= {0xf0, 0x0f, 0xf0, 0x0f, 0xfc, 0x3f, 0xfc, 0x3f, 0xff, 0xff, 0xff, 0xff, 0x33, 0xfc, 0x33, 0xfc, 0x0f, 0xf0, 0x0f, 0xf0, 0x03, 0xc0, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; static SHAPETYPE vertwall_bits[]={0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f}; static SHAPETYPE horiwall_bits[]={0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; static SHAPETYPE blank_bits[]={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}; static SHAPETYPE cross_bits[]={0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f}; static SHAPETYPE food_bits[]={0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0xc0, 0x03, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xc0, 0x03, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; static SHAPETYPE superfood_bits[]={0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0xf0, 0x0f, 0xfc, 0x3f, 0xfc, 0x3f, 0xfc, 0x3f, 0xfc, 0x3f, 0xfc, 0x3f, 0xfc, 0x3f, 0xfc, 0x3f, 0xfc, 0x3f, 0xf0, 0x0f, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00}; static SHAPETYPE ghost_bits[]={0xc0, 0x03, 0xc0, 0x03, 0xfc, 0x3f, 0xfc, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xcf, 0xf3, 0xcf, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x33, 0xcc, 0x33, 0xcc}; static SHAPETYPE corner2_bits[]={0xf0, 0x0f, 0xf0, 0x0f, 0xfc, 0x0f, 0xfc, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x03, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; static SHAPETYPE corner3_bits[]={0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x03, 0xff, 0x03, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xfc, 0x0f, 0xfc, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f}; static SHAPETYPE corner4_bits[]={0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xc0, 0xff, 0xf0, 0xff, 0xf0, 0xff, 0xf0, 0xff, 0xf0, 0xff, 0xf0, 0xff, 0xf0, 0xff, 0xf0, 0x3f, 0xf0, 0x3f, 0xf0, 0x0f, 0xf0, 0x0f}; static SHAPETYPE corner1_bits[]={0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x3f, 0xf0, 0x3f, 0xf0, 0xff, 0xf0, 0xff, 0xf0, 0xff, 0xf0, 0xff, 0xf0, 0xff, 0xf0, 0xff, 0xc0, 0xff, 0xc0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; static SHAPETYPE specwall_bits[]={0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; static SHAPETYPE bonuspoint_bits[]={0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x0c, 0x30, 0x0c, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0x30, 0x0c, 0x30, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; static SHAPETYPE bonuslife_bits[]={0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x03, 0xf0, 0x03, 0xc0, 0x0f, 0xc0, 0x0f, 0xc0, 0x0f, 0xc0, 0x0f, 0xf0, 0x03, 0xf0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; static SHAPETYPE e180_bits[]={0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xc0, 0xff, 0xf0, 0xff, 0xf0, 0xff, 0xf0, 0xff, 0xf0, 0xff, 0xc0, 0xff, 0xc0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; static SHAPETYPE e90_bits[]={0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0xc0, 0x03, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f}; static SHAPETYPE e0_bits[]={0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x03, 0xff, 0x03, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x03, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; static SHAPETYPE e270_bits[]={0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xc0, 0x03, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; static SHAPETYPE t0_bits[]={0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x3f, 0xfc, 0x3f, 0xf0, 0x0f, 0xf0, 0x0f}; static SHAPETYPE t270_bits[]={0xf0, 0x0f, 0xf0, 0x0f, 0xfc, 0x0f, 0xfc, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xfc, 0x0f, 0xfc, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f}; static SHAPETYPE t180_bits[]={0xf0, 0x0f, 0xf0, 0x0f, 0xfc, 0x3f, 0xfc, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; static SHAPETYPE t90_bits[]={0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x3f, 0xf0, 0x3f, 0xf0, 0xff, 0xf0, 0xff, 0xf0, 0xff, 0xf0, 0xff, 0xf0, 0xff, 0xf0, 0xff, 0xf0, 0xff, 0xf0, 0xff, 0xf0, 0x3f, 0xf0, 0x3f, 0xf0, 0x0f, 0xf0, 0x0f}; #endif #elif defined MSWIN //MS-Win only static SHAPETYPE pacman0_bits[]= {0x3c,0x7e,0xff,0xff,0xff,0xff,0x7e,0x3c}; static SHAPETYPE pacmanright_bits[]= {0x3c,0x68,0xf0,0xe0,0xe0,0xf0,0x78,0x3c}; static SHAPETYPE pacmanleft_bits[]={0x3c,0x16,0x0f,0x07,0x07,0x0f,0x1e,0x3c}; static SHAPETYPE pacmanup_bits[]= {0x00,0x00,0x81,0xc3,0xa7,0xff,0x7e,0x3c}; static SHAPETYPE pacmandown_bits[]= {0x3c,0x7e,0xff,0xa7,0xc3,0x81,0x00,0x00}; static SHAPETYPE vertwall_bits[]={0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c}; static SHAPETYPE horiwall_bits[]={0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00}; static SHAPETYPE blank_bits[]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; static SHAPETYPE cross_bits[]={0x3c,0x3c,0xff,0xff,0xff,0xff,0x3c,0x3c}; static SHAPETYPE food_bits[]={0x00,0x00,0x18,0x3c,0x3c,0x18,0x00,0x00}; static SHAPETYPE superfood_bits[]={0x00,0x3c,0x7e,0x7e,0x7e,0x7e,0x3c,0x00}; static SHAPETYPE ghost_bits[]={0x18,0x7e,0xff,0xdb,0xff,0xff,0xff,0xa5}; static SHAPETYPE corner1_bits[]={0x3c,0x3e,0x3f,0x3f,0x3f,0x1f,0x00,0x00}; static SHAPETYPE corner4_bits[]={0x00,0x00,0x1f,0x3f,0x3f,0x3f,0x3e,0x3c}; static SHAPETYPE corner3_bits[]={0x00,0x00,0xf8,0xfc,0xfc,0xfc,0x7c,0x3c}; static SHAPETYPE corner2_bits[]={0x3c,0x7c,0xfc,0xfc,0xfc,0xf8,0x00,0x00}; static SHAPETYPE specwall_bits[]={0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00}; static SHAPETYPE bonuspoint_bits[]={0x00,0x00,0x24,0x18,0x18,0x24,0x00,0x00}; static SHAPETYPE bonuslife_bits[]={0x00,0x00,0x1c,0x38,0x38,0x1c,0x00,0x00}; static SHAPETYPE e0_bits[]={0x00,0x00,0xf8,0xfc,0xfc,0xf8,0x00,0x00}; static SHAPETYPE e90_bits[]={0x00,0x00,0x18,0x3c,0x3c,0x3c,0x3c,0x3c}; static SHAPETYPE e180_bits[]={0x00,0x00,0x1f,0x3f,0x3f,0x1f,0x00,0x00}; static SHAPETYPE e270_bits[]={0x3c,0x3c,0x3c,0x3c,0x3c,0x18,0x00,0x00}; static SHAPETYPE t0_bits[]={0x00,0x00,0xff,0xff,0xff,0xff,0x7e,0x3c}; static SHAPETYPE t90_bits[]={0x3c,0x3e,0x3f,0x3f,0x3f,0x3f,0x3e,0x3c}; static SHAPETYPE t180_bits[]={0x3c,0x7e,0xff,0xff,0xff,0xff,0x00,0x00}; static SHAPETYPE t270_bits[]={0x3c,0x7c,0xfc,0xfc,0xfc,0xfc,0x7c,0x3c}; #elif defined VTX //vt??? unix only static SHAPETYPE pacman0_bits[]={'P'}; static SHAPETYPE pacmanleft_bits[]={'P'}; static SHAPETYPE pacmanright_bits[]={'P'}; static SHAPETYPE pacmanup_bits[]= {'P'}; static SHAPETYPE pacmandown_bits[]= {'P'}; static SHAPETYPE vertwall_bits[]={'|'}; static SHAPETYPE horiwall_bits[]={'-'}; static SHAPETYPE blank_bits[]={' '}; static SHAPETYPE cross_bits[]={'+'}; static SHAPETYPE food_bits[]={'.'}; static SHAPETYPE superfood_bits[]={'o'}; static SHAPETYPE ghost_bits[]={'G'}; static SHAPETYPE corner2_bits[]={'X'}; static SHAPETYPE corner3_bits[]={'X'}; static SHAPETYPE corner4_bits[]={'X'}; static SHAPETYPE corner1_bits[]={'X'}; static SHAPETYPE specwall_bits[]={'_'}; static SHAPETYPE bonuspoint_bits[]={'?'}; static SHAPETYPE bonuslife_bits[]={'p'}; static SHAPETYPE e180_bits[]={'-'}; static SHAPETYPE e90_bits[]={'|'}; static SHAPETYPE e0_bits[]={'-'}; static SHAPETYPE e270_bits[]={'|'}; static SHAPETYPE t0_bits[]={'-'}; static SHAPETYPE t270_bits[]={'|'}; static SHAPETYPE t180_bits[]={'-'}; static SHAPETYPE t90_bits[]={'|'}; #endif pacman-10.orig/sizes.h100644 1747 1750 2025 6001306236 14674 0ustar clameterclameter#include"basis.h" #define BOARDWIDTH 33 #define BOARDHEIGHT 23 #ifndef VTX //if not vt??? unix #if defined(MSWIN) || !defined(DOUBLE) #define UNITWIDTH 8 //pixmaps is 8x8 #define UNITHEIGHT 8 #else #define UNITWIDTH 16 #define UNITHEIGHT 16 #endif #else //if vt??? unix #define UNITWIDTH 1 //character 1x1 contains "pixmaps" #define UNITHEIGHT 1 #endif //defines different sizes for different fonts #ifdef XWIN #ifndef DOUBLE #define TEXTWIDTH 8 #define TEXTHEIGHT 8 #define FONT1 "5x8" #define FONT2 "5x7" #else #define TEXTWIDTH 8 #define TEXTHEIGHT 16 #define FONT1 "8x16" #define FONT2 "7x14" #endif //#define PFONT "clR6x8.fb"/*clR8x8" "6x10"*/ #elif defined MSWIN #define TEXTWIDTH 6 #define TEXTHEIGHT 10 //#define PFONT 0 #elif defined VTX #define TEXTWIDTH 1 //character 1x1 contain lots #define TEXTHEIGHT 1 #endif #define TEXTCHARSINLINE 15 //text characters befors board begins #define TEXTSPACE TEXTWIDTH*TEXTCHARSINLINE #define WINWIDTH BOARDWIDTH*UNITWIDTH+TEXTSPACE+20 #define WINHEIGHT BOARDHEIGHT*UNITHEIGHT+40 pacman-10.orig/specwall.cc100644 1747 1750 70 5734660202 15455 0ustar clameterclameter#include"specwall.h" SpecialWall::SpecialWall() { } pacman-10.orig/specwall.h100644 1747 1750 347 5734660204 15350 0ustar clameterclameter#ifndef __specwall_h_ #define __specwall_h_ #include"staticel.h" class SpecialWall : public StaticElement { public: SpecialWall(); typ is_a(void) {return classSpecialWall;} }; #endif pacman-10.orig/staticel.h100644 1747 1750 234 5724676112 15345 0ustar clameterclameter#ifndef __staticel_h_ #define __staticel_h_ #include"element.h" class StaticElement : public Element { public: }; #endif pacman-10.orig/strawall.h100644 1747 1750 254 5735342556 15374 0ustar clameterclameter#ifndef __strawall_h_ #define __strawall_h_ #include"gwalls.h" class StraightWall : public G_Walls { public: void draw(void); }; #endif pacman-10.orig/supefood.cc100644 1747 1750 62 5734660204 15472 0ustar clameterclameter#include"supefood.h" SuperFood::SuperFood() { } pacman-10.orig/supefood.h100644 1747 1750 312 5734660204 15352 0ustar clameterclameter#ifndef __supefood_h_ #define __supefood_h_ #include"edible.h" class SuperFood : public Edible { public: SuperFood(); typ is_a(void) {return classSuperFood;} }; #endif pacman-10.orig/systspec.h100644 1747 1750 661 5727671210 15413 0ustar clameterclameter#include"basis.h" #ifdef XWIN #include #include #include //#elif defined MAC // #include // #include // #include #elif defined MSWIN #include #elif defined VTX // #ifndef MYCURSES_H // #define MYCURSES_H #include // #endif #else #error UNKNOWN TYPE DEFINED #endif #ifdef UNIX #include #include #endif pacman-10.orig/t0.cc100644 1747 1750 152 5734660154 14215 0ustar clameterclameter#include"t0.h" T0::T0() { consfn(); pix(&pixmap,t0_bits,Colour::WALLCOLOUR,Colour::MYBACKGROUND); } pacman-10.orig/t0.h100644 1747 1750 211 5734660172 14053 0ustar clameterclameter#ifndef __t0_h_ #define __t0_h_ #include"twall.h" class T0 : public T_Wall { public: T0(); }; #endif pacman-10.orig/t180.cc100644 1747 1750 162 5734660152 14365 0ustar clameterclameter#include"t180.h" T180::T180() { consfn(); pix(&pixmap,t180_bits,Colour::WALLCOLOUR,Colour::MYBACKGROUND); } pacman-10.orig/t180.h100644 1747 1750 221 5734660170 14223 0ustar clameterclameter#ifndef __t180_h_ #define __t180_h_ #include"twall.h" class T180 : public T_Wall { public: T180(); }; #endif pacman-10.orig/t270.cc100644 1747 1750 162 5734660152 14365 0ustar clameterclameter#include"t270.h" T270::T270() { consfn(); pix(&pixmap,t270_bits,Colour::WALLCOLOUR,Colour::MYBACKGROUND); } pacman-10.orig/t270.h100644 1747 1750 221 5734660166 14230 0ustar clameterclameter#ifndef __t270_h_ #define __t270_h_ #include"twall.h" class T270 : public T_Wall { public: T270(); }; #endif pacman-10.orig/t90.cc100644 1747 1750 157 5734660154 14313 0ustar clameterclameter#include"t90.h" T90::T90() { consfn(); pix(&pixmap,t90_bits,Colour::WALLCOLOUR,Colour::MYBACKGROUND); } pacman-10.orig/t90.h100644 1747 1750 215 5734660170 14146 0ustar clameterclameter#ifndef __t90_h_ #define __t90_h_ #include"twall.h" class T90 : public T_Wall { public: T90(); }; #endif pacman-10.orig/timing.cc100644 1747 1750 7666 5755170110 15211 0ustar clameterclameter#include"timing.h" //#include #include #include"pac.h" #ifdef UNIX static struct timeval *tp1,*tp2; //current and previous time static struct tms *tmsp; //time struct static double tot_tid; //time diffenence static clock_t cl; //clock time static int toTid; //time #elif defined MSWIN static DWORD *tp1,*tp2; //current and previous time static double tot_tid; //time diffenence #endif #ifdef UNIX #include //write a such struct void printtp(struct timeval tp) { #ifdef XWIN printf("%d s %d u\n",tp.tv_sec,tp.tv_usec); #endif } //write a tms void printtms(struct tms t) { #ifdef XWIN double k=.016666666; printf("%f usr, %f sys\n",k*t.tms_utime,k*t.tms_stime); printf("%f usr, %f sys : children\n",k*t.tms_cutime,k*t.tms_cstime); #endif } #endif #ifdef UNIX //difference between two times double difftime(struct timeval tp1,struct timeval tp2) { long a,b; a=tp1.tv_sec-tp2.tv_sec; b=tp1.tv_usec-tp2.tv_usec; if (b<0) { a--; b+= 1000000; } return (b*0.000001)+a; } #elif defined MSWIN double difftime(DWORD tp1,DWORD tp2) { //difference between two times return (tp1-tp2)*0.001; } #endif void timingstart() { //initialize timing #ifdef UNIX tp1=new timeval; //allocate structures tp2=new timeval; tmsp=new tms; //initialize (*tp1).tv_sec=0; (*tp1).tv_usec=0; (*tp2).tv_sec=0; (*tp2).tv_usec=0; gettimeofday(tp1,NULL); //get the time //printtp(*tp1); //printf("start\n"); #elif defined MSWIN tp1=new DWORD; //allocate structures tp2=new DWORD; *tp1=GetCurrentTime(); //get the time #endif } // ---------------- void timing(int super){ //do timing/synchronization super++; //divisor if (!super) pacexit("super zero"); //if would then be division be zero do { #ifdef UNIX gettimeofday(tp2,NULL); //get the time now #elif defined MSWIN *tp2=GetCurrentTime(); //get the time now #endif //printtp(*tp2); tot_tid=difftime(*tp2,*tp1); //compute difference between moments if (tot_tid<(0.25/super)) //if time interval not yet used up #ifdef UNIX sleep(0); //sleep #elif MSWIN MSG msg; if (PeekMessage(&msg, NULL, NULL, NULL,PM_NOREMOVE)) //if there is msg if (GetMessage(&msg, NULL, NULL, NULL)) { //if message got TranslateMessage(&msg); //else tranlate and DispatchMessage(&msg); //dispatch the message } #else ; //nothing #endif //if mswin::peek/getmessage } while (tot_tid<(0.25/super)); //while time interval not used up //printf("\n\n\n"); //printf("The end. : %f\n",tot_tid); #ifdef UNIX cl=times(tmsp); //get the time #endif //printf("%d \n",cl); //printtms(*tmsp); //printf("-----\n"); *tp1=*tp2; //current time will be previous time } pacman-10.orig/timing.h100644 1747 1750 1007 5741606110 15031 0ustar clameterclameter#ifndef __timing_h_ #define __timing_h_ #include "systspec.h" void printtp(struct timeval); //write a such struct #ifdef UNIX void printtms(struct tms); //write a tms double difftime(struct timeval,struct timeval); //difference between two times #elif defined MSWIN double difftime(DWORD , DWORD); //difference between two times #endif void timingstart(void); //initialize timing void timing(int); //do timing/synchronization #endif pacman-10.orig/twall.h100644 1747 1750 240 5735342570 14655 0ustar clameterclameter#ifndef __twall_h_ #define __twall_h_ #include"gwalls.h" class T_Wall : public G_Walls { public: void draw(void); }; #endif pacman-10.orig/types.h100644 1747 1750 303 5724676114 14700 0ustar clameterclameter#ifndef __types_h_ #define __types_h_ typedef enum {classSpecialWall,classWall,classFood,classSuperFood,classBlank,classBonusPoint,classBonusLife,classPacman,classGhost,classOther} typ; #endif pacman-10.orig/unmovele.h100644 1747 1750 257 5724676114 15376 0ustar clameterclameter#ifndef __unmovele_h_ #define __unmovele_h_ #include"dynamiel.h" class UnmoveableElement : public DynamicElement { public: }; #endif pacman-10.orig/usrinter.cc100644 1747 1750 45447 6003554716 15621 0ustar clameterclameter#include"usrinter.h" #include #include"gpacman.h" #include"colour.h" #include #include"arg.h" #include"pac.h" #include #include"board.h" static GC back; inp_type UserInterface::in=Keyboard; //initializers int UserInterface::x=0; int UserInterface::y=0; int UserInterface::last_x=0; int UserInterface::last_y=0; UserInterface* UserInterface::_instance=0; //returns the pointer to the instance UserInterface* UserInterface::instance(inp_type inp) { if (_instance==0) _instance=new UserInterface; in=inp; return _instance; } inline void UserInterface::setinp(inp_type i) { in=i; } #ifdef XWIN //for X-Win only Display* UserInterface::mydisplay=0; //more initializers Window UserInterface::mywindow=0; GC UserInterface::mygc=0; XEvent UserInterface::myevent={0}; KeySym UserInterface::mykey=0; XSizeHints UserInterface::myhint={0}; XWMHints UserInterface::mywmhint={0}; int UserInterface::myscreen=0; unsigned long UserInterface::myforeground=0; unsigned long UserInterface::mybackground=0; Font UserInterface::font=0; #elif defined MSWIN //for MS-Win only int UserInterface::quit=0; //even more initializers HANDLE UserInterface::my_hInst=0; HWND UserInterface::my_hwnd=0; HFONT UserInterface::hfont=0; HFONT UserInterface::hfontOld=0; int UserInterface::MapModePrevious=0; HANDLE UserInterface::my_hInstance=0; HANDLE UserInterface::my_hPrevInstance=0; LPSTR UserInterface::my_lpCmdLine=0; int UserInterface::my_nCmdShow=0; HDC UserInterface::hdcMemory=0; HBRUSH UserInterface::back=0; static UserInterface *ui=0; #endif #ifdef XWIN //for X-Win only UserInterface::UserInterface() { //constructor setinp(in); //sets the input type mydisplay = XOpenDisplay(""); //connects to a display if (!mydisplay) pacexit("no display possible"); //if it was not possible, exit myscreen = DefaultScreen(mydisplay); //get the default screen Colour(this); //initialize the colours mybackground=Colour::MYBACKGROUND; //set background colour myforeground=Colour::MYFOREGROUND; //set foreground colour myhint.x=WINSTARTX; myhint.y=WINSTARTY; //set window's initial coordinates myhint.width=WINWIDTH; //set window's width and height myhint.height=WINHEIGHT; //myhint.width_inc=100; //myhint.height_inc=100; //myhint.base_height=WINWIDTH; //myhint.base_width=WINHEIGHT; myhint.min_width=WINWIDTH; //set window's width and height myhint.min_height=WINHEIGHT; myhint.max_width=WINWIDTH; //set window's width and height myhint.max_height=WINHEIGHT; myhint.flags=PPosition|PSize|PMinSize|PMaxSize;//|PResizeInc|PBaseSize; //what myhint members were set mywmhint.flags=InputHint;//|StateHint; //say we want to have input mywmhint.input=True; //that we set inputflag mywmhint.initial_state=NormalState; mywindow=XCreateSimpleWindow(mydisplay, DefaultRootWindow(mydisplay), myhint.x,myhint.y,myhint.width,myhint.height,5, myforeground,mybackground); //created the window XSetStandardProperties(mydisplay,mywindow,PACTITLE,PACTITLE,None,Argument::args,Argument::argc,&myhint); //some properties were set XSetWMHints(mydisplay,mywindow,&mywmhint); //give window manager hints mygc=XCreateGC(mydisplay,mywindow,0,0); //create a graphic context XSetBackground(mydisplay,mygc,mybackground); //set window background XSetForeground(mydisplay,mygc,myforeground); //set window foreground font=XLoadFont(mydisplay,FONT1); //load the font if (!font) font=XLoadFont(mydisplay,FONT2); XSetFont(mydisplay,mygc,font); //set the font XSelectInput(mydisplay,mywindow,ExposureMask);//|VisibilityChangeMask);//,ButtonPressMask|KeyPressMask|ExposureMask|VisibilityChangeMask); //select what we want as input XSetGraphicsExposures(mydisplay,mygc,False); XMapRaised(mydisplay,mywindow); //raise the window, that is, show it do XNextEvent(mydisplay,&myevent); //wait until window is exposed while (myevent.type!=Expose); Window root,child;int dumx,dumy;unsigned int keys_buttons; //dummies XQueryPointer(mydisplay,mywindow,&root,&child,&dumx,&dumy,&x,&y,&keys_buttons); //get the initial mouse coordinates XSelectInput(mydisplay,mywindow,ExposureMask|VisibilityChangeMask);//,ButtonPressMask|KeyPressMask|ExposureMask|VisibilityChangeMask); //select what we want as input } UserInterface::~UserInterface(void) { //destructor XUnloadFont(mydisplay,font); //unload the font XFreeGC(mydisplay, mygc); //destroy gc XDestroyWindow(mydisplay, mywindow); //destroy window XCloseDisplay(mydisplay); //close the display connection } void UserInterface::waitsync(void) { XSync(mydisplay,0); //returns when output complete: synchronized } int UserInterface::getinput(void) { //get input whether quit or not, //it may also change input type if (QLength(mydisplay)>0) { XNextEvent(mydisplay, &myevent); //get next event from the queue //printf("%d \n",myevent.type); switch (myevent.type) { //what kind of event was it? case Expose: { // Window root,child;int dumx,dumy;unsigned int keys_buttons; //dummies // if (myevent.xexpose.count==0) //if this is first expose // XQueryPointer(mydisplay,mywindow,&root,&child,&dumx,&dumy,&x,&y,&keys_buttons); // //get the initial mouse coordinates // XRaiseWindow(mydisplay,mywindow); //let window stay on top #ifdef XPOSSE writetext(); Board::instance()->draw(); // printf("XPOSSE\n"); waitsync(); #endif } break; #ifdef RAISE case VisibilityNotify: if (myevent.xvisibility.state!=VisibilityUnobscured) XRaiseWindow(mydisplay,mywindow); //let window stay on top break; #endif case MappingNotify: //something about the keyboard mapping XRefreshKeyboardMapping(&myevent.xmapping); break; case MapNotify: // XRaiseWindow(mydisplay,mywindow); //let window stay on top break; } } if (in==Mouse) { //if input is from mouse Window root,child;int dumx,dumy,xx,yy; //dummies unsigned int keys_buttons; //what keys/buttons hit/pressed XQueryPointer(mydisplay,mywindow,&root,&child,&dumx,&dumy,&xx,&yy,&keys_buttons); if (keys_buttons & Button1Mask) //if left mouse button down in=Keyboard; //input type is keyboard if ((keys_buttons & Button2Mask) || (keys_buttons & Button3Mask)) return 1; //if middle or right is down quit } else { //else if input is from keyboard char key_vector[32]; //denotes 256 possible keys XQueryKeymap(mydisplay,key_vector); //queries and gets data for all keys //int kkk; for (kkk=0;kkk<32;kkk++) //printf("%x ",key_vector[kkk]); //printf("\n"); if (check(key_vector,XK_m)) //if m is pressed input type is mouse { in=Mouse; return 0; } if (check(key_vector,XK_M)) //if m is pressed input is keyboard { in=Mouse; return 0; } if (check(key_vector,XK_Q)) return 1; //if q is pressed quit if (check(key_vector,XK_q)) return 1; //if q is pressed quit } //} return 0; } //checks whether certain key is pressed int UserInterface::check(char key_vector[32], KeySym key) { unsigned int byteindex, bitindex; //byte and bit number KeyCode code; //keykode code=XKeysymToKeycode(mydisplay,key); //get the code of the wanted key if (code==NoSymbol) pacexit("NoSymbol\n"); //if no such, exit byteindex=(code/8); //what's it's index number bitindex=code & 7; //what's it's bit number return (1 & (key_vector[byteindex]>>bitindex)); //has it been hit? } direction UserInterface::stick(void) { if (in==Mouse) { //mouse input Window root,child;int dumx,dumy; unsigned int keys_buttons; //dummies last_x=x; last_y=y; //present is past XQueryPointer(mydisplay,mywindow,&root,&child,&dumx,&dumy,&x,&y,&keys_buttons); //get new coordinates if (x==last_x && y==last_y) return none; //if not moved then none int dx=x-last_x;int dy=y-last_y; //get changes of coordinates if (dx>=dy && dx>-dy) return right; //destine directions if (dx>=dy && dx<=-dy) return up; if (dx-dy) return down; if (dx=dy && dx>-dy) return right; //destine directions if (dx>=dy && dx<=-dy) return up; if (dx-dy) return down; if (dxsetinp(Keyboard); //if left button input type is keyboard if (!strcmp(s,"RIGHT")) quit=1; //if right butten, set quit } } void UserInterface::start(int xx,int yy) { x=xx; y=yy; //setting current mouse coordinates and telling SetFocus(my_hwnd); //MS-Win to take input from our window } void UserInterface::setquit(void) { quit=1; } //set quit static long FAR PASCAL MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { //what type of message it is case WM_CREATE: { // message: create window POINT p; //a point GetCursorPos(&p); //get position of mouse cursor ui->start(p.x,p.y); //initialize userinterface with that point } break; case WM_LBUTTONDOWN: { // message: left mouse button pressed ui->do_inp("LEFT"); //process code for left mouse button } break; case WM_RBUTTONDOWN: { // message: right mouse button pressed ui->do_inp("RIGHT"); //process code for left mouse button } break; case WM_KEYDOWN : { // message: keys pressed ui->do_inp(wParam); //process code for keyboard keys } break; case WM_DESTROY: { // message: destroy from window manager ui->setquit(); //set quit PostQuitMessage(0); } //post a message that says we quit break; default: return (DefWindowProc(hWnd, message, wParam, lParam)); //message must be processed } return (NULL); //or whatever, just a return value } /**************************************************************************** FUNCTION: InitApplication(HANDLE) PURPOSE: Initializes window data and registers window class ****************************************************************************/ BOOL UserInterface::InitApplication(HANDLE hInstance) { WNDCLASS wc; //a window class (not oo) back=CreateSolidBrush(Colour::MYBACKGROUND);//background brush wc.style = CS_BYTEALIGNWINDOW | CS_CLASSDC | CS_VREDRAW | CS_HREDRAW; wc.lpfnWndProc = MainWndProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = hInstance; wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.hbrBackground = back;/*COLOR_BACKGROUND+1;*/ wc.lpszMenuName = "PacmanMenu"; //name wc.lpszClassName = "PacmanWClass"; //name return (RegisterClass(&wc)); //try to register and //return success boolean } /**************************************************************************** FUNCTION: InitInstance(HANDLE, int) PURPOSE: Saves instance handle and creates main window ****************************************************************************/ BOOL UserInterface::InitInstance(HANDLE hInstance, int nCmdShow) { HWND hwnd; //handle to window my_hInst = hInstance; //sets handle to instance hwnd = CreateWindow("PacmanWClass", PACTITLE, WS_OVERLAPPEDWINDOW, WINSTARTX, WINSTARTY, WINWIDTH, WINHEIGHT, NULL, NULL, hInstance, NULL ); //creates the window if (!hwnd) //if no handle return error return (FALSE); ShowWindow(hwnd, nCmdShow); //show and UpdateWindow(hwnd); //update window my_hwnd=hwnd; //set the handle return (TRUE); //return ok } #elif defined VTX //vt??? unix only UserInterface::UserInterface() { //constructor setinp(in=Keyboard); //set input type stdscr=initscr(); //initialize screen raw(); //an input mode cbreak(); //set to break mode noecho(); //don't cho to screen nonl(); //no newline intrflush(stdscr,FALSE); //flushing mode keypad(stdscr,TRUE); //keypadding nodelay(stdscr,TRUE); //no input delay clear(); //clear screen Colour(this); //initialize colours } UserInterface::~UserInterface(void) { //destructor clear(); //clear screen refresh(); //refresh it endwin(); //end it } void UserInterface::waitsync(void) { //returns when output completed move(0,0); //move to 0,0 refresh(); //refresh screen } int UserInterface::getinput(void) { //get input whether quit or not, //it may also change input type int c; (c=(getch())); if (c=='Q' || c=='q') return 1; //if q pressed then do quit return 0; } direction UserInterface::stick(void) { //get inputted direction int key=0,i; key=getch(); //get input character if (key==/*ACS_UARROW*/KEY_UP) return up; //if up key pressed, up if (key==/*ACS_DARROW*/KEY_DOWN) return down; //etc if (key==/*ACS_LARROW*/KEY_LEFT) return left; if (key==/*ACS_RARROW*/KEY_RIGHT) return right; return none; //if none of these, then none } //write string at x,y void UserInterface::write(int x,int y,char* str) { mvaddstr(TEXTHEIGHT*y,TEXTWIDTH*x,str);//outputting } //write number long int at x,y format z void UserInterface::write(int x,int y,long int v,int l) { char* str; //string str = (char*) malloc (l+1); //allocate memory for string sprintf (str, "%.*d", l,v); //formatted print to string mvaddstr(TEXTHEIGHT*y,TEXTWIDTH*x,str);//outputting } #endif pacman-10.orig/usrinter.h100644 1747 1750 7460 5741610070 15426 0ustar clameterclameter#ifndef __usrinter_h_ #define __usrinter_h_ #include"object.h" #include"sizes.h" #include"direc.h" #include"systspec.h" #define WINSTARTX 200 #define WINSTARTY 300 //is the input from mouse or keyboard typedef enum {Mouse,Keyboard} inp_type; //here is the graphical id type defined #ifdef XWIN #define GID_TYPE Pixmap #elif defined MSWIN #define GID_TYPE HBITMAP #elif defined VTX #define GID_TYPE char #endif class UserInterface : public Object { static UserInterface* _instance;//pointer to the instance of this class static inp_type in; //is the input from mouse or keyboard? static int x,y, //current mouse coordinates last_x,last_y; //previous mouse coordinates #ifdef XWIN //for X-Win only static Display *mydisplay; //pointer to display connection static Window mywindow; //the window itself static GC mygc; //the graphic context static XEvent myevent; //an event static KeySym mykey; //a key pressed static XSizeHints myhint; //hints about sizes in X static XWMHints mywmhint; //hints to the X Window Manager static int myscreen; //the screen static unsigned long myforeground, //foreground and mybackground; //background colour in window static Font font; //font used static int check(char *,KeySym); //checks whether certain key is pressed #elif defined MSWIN //for MS-Win only static int quit; //shall application quit? static HANDLE my_hInst; //handle to this instance of the application static HWND my_hwnd; //handle to the window itself static HFONT hfont, hfontOld; //current and previous font static int MapModePrevious; //what's the previous mapping mode. static HANDLE my_hInstance; //handle to this instance of the application static HANDLE my_hPrevInstance; //handle to previous instance of application static LPSTR my_lpCmdLine; //command line give static int my_nCmdShow; //about showing command? static BOOL InitApplication(HANDLE); //initializing the application static BOOL InitInstance(HANDLE, int); //init. of this instance of application static HDC hdcMemory; //handle to the device context memory static HBRUSH back; //the brush for the background colour #endif protected: UserInterface(); //constructor public: static UserInterface* instance(inp_type = Keyboard); //returns the pointer to the instance, //with keyboard as default ~UserInterface(void); //destructor #ifdef XWIN //for MS-Win only static Display* getdisplay() //all those are returning corresponding values {return mydisplay;} static Window getwindow() {return mywindow;} static int getscreen() {return myscreen;} static GC getgc() {return mygc;} static XEvent getevent() {return myevent;} #elif defined MSWIN //for MS-Win only static HANDLE gethInst(void); //all those are returning corresponding values static HWND gethwnd(void); static HDC gethdcmem(void); static HANDLE gethInstance(void); static HANDLE gethPrevInstance(void); static LPSTR getlpCmdLine(void); static int getnCmdShow(void); static void sethInst(HANDLE); //all those are setting corresponding values static void sethwnd(HWND); static void sethInstance(HANDLE); static void sethPrevInstance(HANDLE); static void setlpCmdLine(LPSTR); static void setnCmdShow(int); static void start(int,int); //setting current mouse coordinates and telling //MS-Win to take input from our window static void do_inp(char); //processes input from keyboard static void do_inp(char *); //processes input from mouse static void setquit(void); //set quit true #endif static direction stick(void); //returns the inputted direction static void write(int,int,char*); //write string at x,y static void write(int,int,long int,int);//write number long int at x,y format z static int getinput(void); //return whether quit or not static void waitsync(void); //returns when output complete: synchronized static void setinp(inp_type); //sets the input type }; #endif pacman-10.orig/vertwall.cc100644 1747 1750 213 5734660154 15530 0ustar clameterclameter#include"vertwall.h" VerticalWall::VerticalWall() { consfn(); pix(&pixmap,vertwall_bits,Colour::WALLCOLOUR,Colour::MYBACKGROUND); }; pacman-10.orig/vertwall.h100644 1747 1750 262 5734660172 15376 0ustar clameterclameter#ifndef __vertwall_h_ #define __vertwall_h_ #include"strawall.h" class VerticalWall : public StraightWall { public: VerticalWall(); }; #endif pacman-10.orig/walls.cc100644 1747 1750 51 5734660202 14764 0ustar clameterclameter#include"walls.h" Walls::Walls() { } pacman-10.orig/walls.h100644 1747 1750 301 5734660202 14644 0ustar clameterclameter#ifndef __walls_h_ #define __walls_h_ #include"staticel.h" class Walls : public StaticElement { public: Walls(); typ is_a(void) {return classWall;} }; #endif