xwelltris-1.0.1/0040755000175300014110000000000007642314522012104 5ustar leoguysxwelltris-1.0.1/Changelog0100644000175300014110000000046207605543562013724 0ustar leoguys============================================================================ Changes for XWelltris project ============================================================================ Version is 1.0.0 (11-03-2002): -Initial public release 31-03-2002 Leo xwelltris-1.0.1/AUTHORS0100644000175300014110000000043507605543562013162 0ustar leoguys X Welltris Project (tetris like game). Main programmer, maintainer and author: Leonid V. Khramov Additional help from: Irina V. Khramova Designer and Web-master: Leonid V. Khramov xwelltris-1.0.1/Makefile.in0100644000175300014110000000235507605543562014162 0ustar leoguys# XWelltris - tetris like popular game # # Copyright (C) 2002 by Leo Khramov # email: leo@xnc.dubna.su # # # 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. # @MCOMMON@ DATAFILES= \ data/polyomino.dat \ data/board2.gif \ data/font2.gif \ data/topnine.gif \ data/wellcuts.gif \ data/wellintro.gif SHARE_DATAFILES= \ data/welltris.scores PROGRAM = xwelltris all:: $(PROGRAM) $(PROGRAM): FORCE -(cd src && make) install: $(INSD) $(INSTLIB) $(INSTALL_DATA) $(DATAFILES) $(INSTLIB) $(INSTALL_SHARE_DATA) $(SHARE_DATAFILES) $(INSTLIB) $(INSTALL_PROGRAM) $(PROGRAM) $(INSTDIR) uninstall: $(RM) -f $(INSTDIR)/$(PROGRAM) $(RM) -rf $(INSTLIB) clean: $(RM) -f $(PROGRAM) -(cd src && make clean) FORCE: xwelltris-1.0.1/INSTALL0100644000175300014110000000336407605543562013147 0ustar leoguys============================================================================== XWelltris Project - tetris like game ============================================================================== 1. Installation from source tarball (xwelltris-version.src.tar.gz): First of all you need to unpack tarball, use this command : gunzip -c xwelltris-version.src.tar.gz | tar xvf - After that you can see directory named 'xwelltris-version', change your current dir to it: cd xwelltris-version Then you need to configure and make the game: ./configure make The default installation path is in /usr/bin and /usr/share/xwelltris dirs. If you want to install to another dirs, for example in your home subdirs, you need to say about this in configure: ./configure --prefix=/home/user make After make is done with no errors, then install the game: make install Be sure that your $prefix/bin directory is in your $PATH environment variable. That's all, now you can enjoy the game by typing: xwelltris P.S: XWelltris is the X Window game so it needs Xlibs and X headers to compile Be shure that you have it installed. ============================================================================== 2. Installation from binaries tarball. You need to gain root account, then change you dir to '/': cd / gunzip -c /dir_of_xwelltris_tarball/xwelltris-version.tar.gz | tar xvf - That's it! Now type 'xwelltris' under X Window for playing. ============================================================================== P.S: If You like xwelltris, please, send me a letter with names of country and city where you are playing the game. It's for my collection. Thank you. Leo (31-03-2002) xwelltris-1.0.1/LICENSE0100644000175300014110000004307607605543562013127 0ustar leoguys 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 Appendix: 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. xwelltris-1.0.1/README.keys0100644000175300014110000000132707605543562013745 0ustar leoguys========================================================================= Here are the keys in game XWelltris: Move figure right: -Right Arrow -Num pad '6' -Main keyboard 'L' key Move figure left: -Left Arrow -Num pad '4' -Main keyboard 'J' key Rotate figure: -Up or Down Arrow -Num pad '5' -Main keyboard 'K' key Drop figure down: -Space -Num pad 'Insert' Pause/Unpause game: -Main keyboard 'P' key -Pause key Quit game: -Main keyboard 'Q' key -F10 key -Escape key That's all. xwelltris-1.0.1/README0100644000175300014110000000712007605543562012770 0ustar leoguys ============================================================================ XWelltris - tetris like game ============================================================================ 1. Introduction XWelltris is a tetris like popular game. The idea of this game was by Pogitnov russian programmer. Imaging that you are looking into the glass from the top. You see four walls and the bottom. The flat 2d figures falling down from the walls one by one. You can move these figures from one wall to another or rotate the figure. If the figure leave the wall it moves on the bottom while another figure is pushed. You need to form full rows and/or columns on the bottom. When you form such row it disappear and you receive additional empty space on the bottom and scores :). The more rows disappear at a time, the more scores you have. If you can't place the whole figure on the bottom, then it stays on the wall and this wall became frozen (you can't place figures on it) for a while. After n-th rows were successfuly cleared, you will receive binus figure and goto to the next level - game speed will be increased. You task is to play more longer and earn more scores. ============================================================================ 2. Installation of the game ./configure make make install More detail installation process described in 'INSTALL' file in this directory. ============================================================================ 3. Playing Type 'xwelltris' from the X Window for playing the game. First of all you see the options screen, where you can customize you game. The options are: - Dutris, Tritris, Tetris, Pentris, Sixtris - game type that define a number of piece the figure is. Dutris - figures from two pieces only. Tritris from three pieces. Tetris from four and so on... - Mixed. Turn it on and you will play with mixed figures. For example if you choose tetris type below, then you will play with figure from two, three and four piece. If thhis option will be off then figures will be only from four pieces. This option gives you easier game but less scores. - Rotation. This option turn on inner rotation of the game board, one by one on each level up. This is very funny and more harder to play. And of couse if harder then more scores at a time :) - Next piece. This option turn on showing of next figure that will fall down on the game board. It's allow you to know and have additional time for thinking. Of couse if you turn it on you will have less scores. Press 'New game' for playing, then type you name and enjoy playing. 'Top nine' :) key shows high scores table of current game type (dutris,...) And 'Exit' will kill the game. ============================================================================ 4. Additional info XWelltris stores high scores table in the file named 'welltris.scores'. First of all it search global welltris.scores in /usr/share/xwelltris. If this file exists and writable then xwelltris uses it. Otherwise it create your own welltris.scores in ~/.xwelltris directory (in your home dir). If you want to clear scores table simple remove welltris.scores file and xwelltris create it again. ============================================================================ This game implementation is under GNU GPL2 license, so you can modify and redistribute it with the rules described in 'LICENSE' file in this dir. (c) 2002 by Leonid V. Khramov aka Leo xwelltris-1.0.1/data/0040755000175300014110000000000007642314522013015 5ustar leoguysxwelltris-1.0.1/data/board2.gif0100755000175300014110000003775707605543562014707 0ust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*|** jjq ܤp*Rά++_&jNƍ>k@8ܕVRPTa(i-Ar+$|Hظj洚+$HX@g+^O櫧 , Hd2v",:L,*b(6l>,kXDb>[vE$b Oz(xj,+*{b@a"lĆbB(>Rc  ʅm#\+iӖPS".lSXj꿖4=*ʭ:E6ڶ-;BVfW)rl~:bײBM.]4m6Iklc:.mch2|4ioQP| eжEc."k. . oF/jIpF sj+noB/f/Ӟ"Fvζ1k`~/n,y/>G//.&6Z-^w0k0 Pw& b p6g o o7k 0n/p o#qWq;q gXYyc@EEPk]mH1B1Ė0dAD1`H,TN`C2aT G@#W4[@a4B@ K'w>1m15&PA2D\4&$T&EYbCDȀ(8e( `B(`B# 'R "q+SD0)-?(22)'1B(@1&)q2O C,WsCC(zU3@?3D%`0rD/Aq`BUV$Gr&` &(Ub21t`7(a}'B~2\2CGi'B$@)n³O 33=7D-/!4(߳R2UD*3D(7iZ5% r)002Y4B$VbA@b{^YPY+8?ttSMnBtCX Ta 0@P@TuC(/+ScD6de]AB׌59"CtVǕECD_N6j}rsB`4iONH3*)D4UY(Mq oqp2 7L'rtP B+4 (du2 Uet;@HAKqL'rS(Ԙ7B}#B5-7E231}'“^k0o?x J<_xLxG8_WoG@;xwelltris-1.0.1/data/font2.gif0100755000175300014110000014330307605543562014547 0ustar leoguysGIF89aP -8Q" )' $ *'* #'2 1*/64/J(%3%::??/II>EA=: D;:[K83| DMR2I4JS-8&d! M RYs s T [ ,GH-F$GZR c \ ]c dUl`8alHHg#l%[ d< 'nsi s4V(hes$>Z u{#r RL5|u;q|"" 3|$U2xFOmu@dvE^yY4~sWol~{ׄ !,P X*\p2g\4Cg\P-ll"G9,BtF'3592C"mare*; 3J+^tdC!EhajB56&0J#3f&Jim!Rc5uzVYT'kUE*-6,cNwmY~q8U 592Y(Oz e+jRMY14a"YTa3Lb [dp|!DNk"nY 㹠 TW{ 8HgY YDPv,Ez т@BITf `C,HFu zFB$eKEбS^-4EQ8ㆦDRAd#O9 _QD7SY QWFL\P`4d1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WS!&|-!+Oe+eZvjrOLjRq1"aA ;sRl63QSB rW wT<0/ThY&;p)~1.C:ST"@"A$crQ^$%[1 )PQ +1/dĖ$diN'kµbrT% e E<ꁀI%mar*y0[Bi [T$ʱFg aA[j,.gnAC`^@Ms`wW5Xw(>?W˳0N\3=b;L4h@ni;{ HSw_6ܑM#(me3#5 Ho YV!YGv}kevjw^'E Bա S"q[4Og<~m[[MPQ/U"GcQ2z$;:)Y1ޕFJxV~1a"Txf0E;!lRì\OWtfCY%O|PHjBHq鑯Tm T(k00" EOsY K"rCMHO83Ɠ%N5QՌ&c*PSf?!GK5dzPwL4Tt{VkX'8{ȣy'}h2jHi@:NkKm[dA q|` ƷZz?u9W3# VaZJ}ؔU8s8ܡQ/y~48q=7#eLeC02[CYG{|X(m$K 222@j0jL2!ѕZh6R+v̗& <>Kx hryH:r\ivX`I*t˙9sgʜ 9Ǡ =Tb҃KN)TY(6 &ZŎ%[Yiծe[qΥ[]y Ӆ%Jts A< Se9yN;xwelltris-1.0.1/data/polyomino.dat0100644000175300014110000005123207605543562015543 0ustar leoguys/* polyomino.dat -- polyominoes for tetris & welltris */ /* Maximum number of squares was chosen to be 6 because if 7, it leaves a */ /* hole: @@@ */ /* @ @ */ /* @@ */ /* likewise, 3 was chosen for diagonal mode because if 4, it leaves a hole: */ /* @ */ /* @ @ */ /* @ */ /* '+' Prelude part */ /* 1st number = number of squares in a polyomino */ /* 2nd number = number of distinct polyominoes & rotations & reflections */ /* 3rd number = number of distinct polyominoes & reflections */ /* 4th number = number of distinct polyominoes */ /* 5th number = O do not allow rotation and reflection */ /* 1 allow rotation but not reflection */ /* 2 allow rotation and reflection */ /* 6th number = diagonal mode to consider? 0 or 1 (if 0, no 7-10) */ /* 7th number = diagonal number of distinct polyominoes & rots & refls */ /* 8th number = diagonal number of distinct polyominoes & reflections */ /* 9th number = diagonal number of distinct polyominoes */ /* 10th number = O do not allow rotation and reflection for diagonal mode */ /* 1 allow rotation but not reflection for diagonal mode */ /* 2 allow rotation and reflection for diagonal mode */ /* '*' Main parts */ /* 1st number = n-> consider an n^2 square */ /* '#' polyomino group (follows a '*') */ /* 1st number = number of squares in a polyomino */ /* 2nd number = number of polyominoes (incl rot & refl) in a n^2 square */ /* 3rd number = if it is there, number of polyominoes (incl rot & refl) */ /* in a n^2 square with diagonal mode */ /* The polyomino (follows a '#') */ /* 1st number = numbered polyomino (there for your benefit) */ /* 2nd number = rotation pointer (usually the next polyomino) */ /* 3rd number = reflection pointer */ /* 4th number = number of rows down to start */ /* 5th number = start number (0, 1, or 2) */ /* 0=> starter for no turns permitted (no reflections or rotations) */ /* 1=> starter for allow rotations and no turns permitted */ /* 2=> starter for reflections, rotations, and no turns permitted */ /* Next number (if diagonal mode) = start number for diagonal mode */ /* The proceeding 2 or 3 numbers are repeated for gradual appearance */ /* Pieces either JUMPIN or appear GRADUALly */ /* The last group of n^2 numbers is the actual polyomino */ /* 0=> empty square */ /* 1..16=> used square */ /* '~' debug (preceeds a '#') */ /* 1st number = number of polyominoes to skip */ /* PRELUDE */ /* + Polyomino States(None Rot Refl) Style Diagonal [States(N R R) Style] */ /* + 1 1 1 1 0 1 1 1 1 0 */ + 2 2 1 1 0 1 4 2 2 0 + 3 6 2 2 0 1 20 6 5 1 + 4 19 7 5 1 0 + 5 63 18 12 2 0 + 6 216 60 35 2 0 /* MAIN */ /* * X (polyomino fills X^2 square) */ /* # Polyomino Number_of_Polyominoes_Normal [Number_of_Polyominoes_Diagonal] */ /* Ref_Num Ptr_Rot Ptr_Refl (Start_Location Start_N [Start_D])J&G Shape_Array */ /* * 1 */ /* # 1 1 */ /* 0 0 0 0 2 2 1 2 2 16 */ * 2 # 2 2 4 0 1 0 1 2 2 1 0 0 0 0 4 1 1 0 1 0 0 0 1 2 2 0 2 0 8 2 3 3 0 0 2 1 0 2 0 16 16 0 3 2 2 0 0 0 1 0 0 16 0 0 16 # 3 4 4 0 1 3 0 2 2 1 2 2 6 1 8 0 1 2 2 0 0 0 1 0 0 2 0 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12 3 0 0 12 1 27 24 26 0 0 2 0 0 0 2 0 6 9 4 9 0 28 29 32 0 2 2 0 0 2 0 6 13 1 8 0 0 29 30 35 0 0 2 0 0 2 0 4 11 0 0 12 1 30 31 34 0 0 2 0 0 0 2 4 7 9 0 8 0 31 28 33 0 0 2 2 4 3 0 0 14 1 0 8 0 32 33 28 0 1 2 0 0 2 0 4 13 3 0 0 8 33 34 31 0 0 2 1 0 6 1 4 11 0 0 8 0 34 35 30 0 0 2 0 2 0 0 12 7 1 0 8 0 35 32 29 0 0 2 0 0 2 0 0 14 1 4 9 0 36 36 36 0 2 2 2 0 2 0 4 15 1 0 8 0 # 6 46 0 1 4 0 2 2 0 6 5 3 10 0 8 8 0 0 1 2 7 0 0 2 0 6 1 0 10 0 0 12 5 1 2 3 6 0 0 2 0 0 0 2 2 0 10 12 5 9 3 0 5 0 0 2 2 4 5 3 0 0 10 0 4 9 4 5 0 0 1 2 0 6 5 3 8 0 10 0 0 8 5 6 3 0 0 2 1 6 5 1 10 0 0 12 1 0 6 7 2 0 0 2 0 2 0 0 10 0 2 12 5 9 7 4 1 0 0 2 0 0 4 3 0 0 10 4 5 9 8 9 12 0 2 2 2 6 7 1 12 11 0 0 8 0 9 10 15 0 0 2 0 2 0 0 14 7 1 12 9 0 10 11 14 0 0 2 0 0 2 0 0 14 3 4 13 9 11 8 13 0 0 2 0 0 6 3 4 13 11 0 0 8 12 13 8 0 1 2 1 4 7 3 0 14 9 0 8 0 13 14 11 0 0 2 0 6 3 0 14 13 1 8 0 0 14 15 10 0 0 2 0 0 2 0 6 11 0 12 13 1 15 12 9 0 0 2 0 0 0 2 4 7 11 0 12 9 16 17 20 0 2 2 0 6 3 0 12 13 3 0 0 8 17 18 23 0 0 2 0 0 6 1 6 11 0 12 9 0 18 19 22 0 0 2 0 2 0 0 12 7 3 0 12 9 19 16 21 0 0 2 2 0 6 3 0 14 9 4 9 0 20 21 16 0 1 2 0 0 6 3 6 13 9 8 0 0 21 22 19 0 0 2 1 6 3 0 12 11 0 0 12 1 22 23 18 0 0 2 0 0 0 2 6 7 9 12 9 0 23 20 17 0 0 2 0 4 3 0 0 14 3 0 12 9 24 25 28 0 2 2 2 4 7 1 0 10 0 4 9 0 25 26 31 0 0 2 0 2 0 0 14 5 3 8 0 8 26 27 30 0 0 2 0 0 6 1 0 10 0 4 13 1 27 24 29 0 0 2 0 2 0 2 12 5 11 0 0 8 28 29 24 0 1 2 1 4 7 1 0 10 0 0 12 1 29 30 27 0 0 2 0 2 0 2 14 5 9 8 0 0 30 31 26 0 0 2 0 4 3 0 0 10 0 4 13 1 31 28 25 0 0 2 0 0 0 2 6 5 11 8 0 8 32 33 32 0 2 2 0 2 0 2 12 7 9 0 8 0 33 34 35 0 0 2 2 4 3 0 0 14 1 4 9 0 34 35 34 0 0 2 0 0 2 0 6 13 3 8 0 8 35 32 33 0 0 2 0 0 6 1 4 11 0 0 12 1 36 37 39 0 2 2 2 6 7 1 14 9 0 8 0 0 37 38 38 0 0 2 0 2 0 0 14 3 0 12 13 1 38 39 37 0 0 2 0 0 0 2 0 6 11 4 13 9 39 36 36 0 0 2 0 4 7 3 0 12 11 0 0 8 40 41 43 0 2 2 2 6 3 0 12 15 1 0 8 0 41 42 42 0 0 2 0 0 2 0 6 15 1 12 9 0 42 43 41 0 0 2 0 0 2 0 4 15 3 0 12 9 43 40 40 0 0 2 0 0 6 3 4 15 9 0 8 0 44 45 44 1 2 2 0 0 0 0 6 7 3 12 13 9 45 44 45 0 0 2 2 0 6 3 0 14 11 0 12 9 * 4 # 4 2 0 1 0 2 2 2 0 0 0 0 0 0 0 0 0 4 5 5 1 0 0 0 0 1 0 1 0 0 3 2 0 0 2 0 0 0 10 0 0 0 10 0 0 0 8 0 # 5 24 0 1 4 1 2 2 0 0 0 0 0 6 5 5 1 8 0 0 0 0 0 0 0 1 2 7 0 0 3 0 0 2 0 0 0 10 0 0 0 10 0 0 0 12 1 0 2 3 6 1 0 2 0 0 0 0 0 0 0 0 2 4 5 5 9 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90 91 94 1 0 3 0 0 0 0 0 0 2 0 0 4 13 3 0 0 0 12 1 91 88 93 0 0 3 2 0 0 0 2 0 0 6 9 0 4 11 0 0 0 8 0 92 93 88 1 1 3 0 0 0 0 0 0 0 6 1 4 7 9 0 0 8 0 0 93 94 91 0 0 3 1 0 2 0 0 0 12 3 0 0 0 14 1 0 0 8 0 94 95 90 1 0 3 0 0 0 0 0 0 0 2 0 0 6 13 1 4 9 0 0 95 92 89 0 0 3 0 0 0 2 0 0 4 11 0 0 0 12 3 0 0 0 8 96 97 100 1 2 3 0 0 0 0 0 4 3 0 0 0 12 5 3 0 0 0 8 97 98 103 0 0 3 2 0 0 6 1 0 0 10 0 0 6 9 0 0 8 0 0 98 99 102 1 0 3 0 0 0 0 0 2 0 0 0 12 5 3 0 0 0 12 1 99 96 101 0 0 3 0 0 0 0 2 0 0 6 9 0 0 10 0 0 4 9 0 100 101 96 1 1 3 0 0 0 0 0 0 0 6 1 6 5 9 0 8 0 0 0 101 102 99 0 0 3 0 0 2 0 0 0 12 3 0 0 0 10 0 0 0 12 1 102 103 98 1 0 3 0 0 0 0 0 0 0 0 2 0 6 5 9 4 9 0 0 103 100 97 0 0 3 1 0 4 3 0 0 0 10 0 0 0 12 3 0 0 0 8 104 105 104 1 2 2 0 0 0 0 0 4 7 7 1 0 12 9 0 0 0 0 0 105 106 107 0 0 3 2 0 2 0 0 0 14 3 0 0 14 9 0 0 8 0 0 106 107 106 1 0 2 0 0 0 0 0 0 6 3 0 4 13 13 1 0 0 0 0 107 104 105 0 0 3 0 0 0 2 0 0 6 11 0 0 12 11 0 0 0 8 0 108 109 108 1 2 2 0 0 0 0 0 6 5 5 3 8 0 0 8 0 0 0 0 109 110 111 0 0 3 2 0 6 1 0 0 10 0 0 0 10 0 0 0 12 1 0 110 111 110 1 0 2 0 0 0 0 0 2 0 0 2 12 5 5 9 0 0 0 0 111 108 109 0 0 3 0 0 4 3 0 0 0 10 0 0 0 10 0 0 4 9 0 112 113 114 1 2 2 0 0 0 0 0 4 7 3 0 0 12 13 1 0 0 0 0 113 112 115 0 0 3 2 0 0 2 0 0 6 11 0 0 14 9 0 0 8 0 0 114 115 112 1 1 2 0 0 0 0 0 0 6 7 1 4 13 9 0 0 0 0 0 115 114 113 0 0 3 1 0 2 0 0 0 14 3 0 0 12 11 0 0 0 8 0 116 117 118 1 2 3 0 0 0 0 0 4 3 0 0 0 12 3 0 0 0 12 1 117 116 119 0 0 3 2 0 0 0 2 0 0 6 9 0 6 9 0 0 8 0 0 118 119 116 1 1 3 0 0 0 0 0 0 0 6 1 0 6 9 0 4 9 0 0 119 118 117 0 0 3 1 0 2 0 0 0 12 3 0 0 0 12 3 0 0 0 8 120 121 122 1 2 3 0 0 0 0 0 2 0 0 0 14 5 5 1 8 0 0 0 121 122 121 0 0 3 0 0 0 2 0 0 0 10 0 0 0 10 0 0 4 13 1 122 123 120 1 0 3 0 0 0 0 0 0 0 0 2 4 5 5 11 0 0 0 8 123 120 123 0 0 3 2 0 4 7 1 0 0 10 0 0 0 10 0 0 0 8 0 124 125 126 1 2 3 0 0 0 0 0 0 2 0 0 4 15 5 1 0 8 0 0 125 126 125 0 0 3 0 0 0 2 0 0 0 10 0 0 4 15 1 0 0 8 0 126 127 124 1 0 3 0 0 0 0 0 0 0 2 0 4 5 15 1 0 0 8 0 127 124 127 0 0 3 2 0 0 2 0 0 4 15 1 0 0 10 0 0 0 8 0 128 129 130 1 2 3 0 0 0 0 0 0 2 0 0 4 13 7 1 0 0 8 0 129 128 131 0 0 3 2 0 0 2 0 0 0 14 1 0 4 11 0 0 0 8 0 130 131 128 1 1 3 0 0 0 0 0 0 0 2 0 4 7 13 1 0 8 0 0 131 128 129 0 0 3 1 0 0 2 0 0 4 11 0 0 0 14 1 0 0 8 0 132 133 134 1 2 3 0 0 0 0 0 2 0 0 0 12 5 5 3 0 0 0 8 133 132 135 0 0 3 2 0 0 6 1 0 0 10 0 0 0 10 0 0 4 9 0 134 135 132 1 1 3 0 0 0 0 0 0 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`[╢lJ!.c:n lEwR@% E "AKK܍ekc$8=6K ڄQb-*Uʁ`=vE(-VyX;LT UgNLUkUr׺ե*X"zfE\qFR/q@3x0FAJ9FTE Ƈ"ucc" ,EU C蕑%&J#nb&h+PG8gmL2 [Zv `6Т .As;qY+P7M`si]fL.x,(SYM&r1Jrl ArBRĤ EAdFdq#l57ED b@ SJ=bsqV ?Ӹl\ F/a| E JDڳ^3%P:ү HW لfCrqlr8w"iS־6ms;$^6!b+}ΐ&DΝH9.>OVrUv :ZlϺVQ¸J{R^8E}cc)xr(FJJxWȉ~ϚzΘ?.%[WT2nB|@F8ME*)Ofy=򒁎ՠD?Г];ٗ~[/*.`$@3jYU CVJ!™dcV gKT}LEB2.=dK![l@%O2Vye`nhe+䐿_dۻX@6$e=%#}oљB ON3U#"[o)K ֧kZ1 |M,ek^@R RQ~0,'!|^PԦ,wxKԟ97b&PJ\&Efz&ji~hfj&bj&kfivn&oo&pp'qGr.g~s>'t@@;xwelltris-1.0.1/data/welltris.scores0100644000175300014110000000546107627346007016113 0ustar leoguys1; ;2002-03-07; 0; 0; 0;0;0;0;0 1; ;2002-03-07; 0; 0; 0;0;0;0;0 1; ;2002-03-07; 0; 0; 0;0;0;0;0 1; ;2002-03-07; 0; 0; 0;0;0;0;0 1; ;2002-03-07; 0; 0; 0;0;0;0;0 1; ;2002-03-07; 0; 0; 0;0;0;0;0 1; ;2002-03-07; 0; 0; 0;0;0;0;0 1; ;2002-03-07; 0; 0; 0;0;0;0;0 1; ;2002-03-07; 0; 0; 0;0;0;0;0 2;Leo ;2002-03-18; 50; 2; 7;1;1;136;0 2; ;2002-03-16; 0; 0; 3;1;1;356;0 2; ;2002-03-14; 0; 0; 6;1;0;55;0 2; ;2002-03-14; 0; 0; 2;1;1;126;1 2; ;2002-03-07; 0; 0; 0;0;0;0;0 2; ;2002-03-07; 0; 0; 0;0;0;0;0 2; ;2002-03-07; 0; 0; 0;0;0;0;0 2; ;2002-03-07; 0; 0; 0;0;0;0;0 2; ;2002-03-07; 0; 0; 0;0;0;0;0 3;Leo ;2002-03-30; 71; 3; 8;1;1;939;0 3; ;2002-03-30; 0; 0; 8;1;1;223;0 3; ;2002-03-30; 0; 0; 9;1;1;121;0 3; ;2002-03-07; 0; 0; 0;0;0;0;0 3; ;2002-03-07; 0; 0; 0;0;0;0;0 3; ;2002-03-07; 0; 0; 0;0;0;0;0 3; ;2002-03-07; 0; 0; 0;0;0;0;0 3; ;2002-03-07; 0; 0; 0;0;0;0;0 3; ;2002-03-07; 0; 0; 0;0;0;0;0 4;Irina ;2002-03-30; 10; 1;11;1;1;2301;0 4; ;2002-03-29; 0; 0; 0;1;1;2130;0 4; ;2002-03-22; 0; 0; 0;1;1;2114;0 4; ;2002-03-29; 0; 0; 0;1;1;1771;0 4; ;2002-03-29; 0; 0; 0;1;1;1623;0 4; ;2002-03-22; 0; 0; 0;1;1;2103;0 4; ;2002-03-16; 0; 0; 0;1;1;2223;0 4; ;2002-03-16; 0; 0; 0;1;1;1972;0 4; ;2002-03-14; 0; 0; 0;1;1;2468;1 5;Leo ;2002-03-14; 10; 10; 6;1;1;120;1 5; ;2002-03-14; 0; 0; 5;0;0;36;0 5; ;2002-03-14; 0; 0; 2;1;1;147;1 5; ;2002-03-14; 0; 0; 3;0;1;26;1 5; ;2002-03-14; 0; 0; 3;1;1;29;1 5; ;2002-03-14; 0; 0; 1;0;1;65;1 5; ;2002-03-07; 0; 0; 0;0;0;0;0 5; ;2002-03-07; 0; 0; 0;0;0;0;0 5; ;2002-03-07; 0; 0; 0;0;0;0;0 6;leo ;2003-02-20; 10405; 3; 7;0;0;28;1 6;leo ;2003-02-20; 6787; 2; 6;0;0;37;1 6;leo ;2003-02-20; 6118; 4; 7;0;1;46;1 6;leo ;2003-02-27; 4482; 3; 7;0;1;56;1 6;leo ;2003-02-20; 3149; 2; 7;0;1;26;1 6;leo ;2003-02-20; 1810; 1; 7;0;1;27;1 6;leo ;2003-02-20; 1778; 1; 6;0;1;17;1 6;leo ;2003-02-20; 1565; 1; 7;0;0;19;1 6;leo ;2003-02-20; 1037; 0;10;0;0;20;1 xwelltris-1.0.1/docs/0040755000175300014110000000000007642314522013034 5ustar leoguysxwelltris-1.0.1/docs/srcdoc/0040755000175300014110000000000007642314522014311 5ustar leoguysxwelltris-1.0.1/docs/srcdoc/sources0100644000175300014110000000011407605543562015717 0ustar leoguys../../src/*.cxx ../../src/include/*.h ../../src/x11/*.cxx ../../src/x11/*.h xwelltris-1.0.1/config.guess0100755000175300014110000011461707605543562014442 0ustar leoguys#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. timestamp='2001-04-20' # This file 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Written by Per Bothner . # Please send patches to . # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi dummy=dummy-$$ trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int dummy(){}" > $dummy.c for c in cc gcc c89 ; do ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 if test $? = 0 ; then CC_FOR_BUILD="$c"; break fi done rm -f $dummy.c $dummy.o $dummy.rel if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 8/24/94.) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # Netbsd (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # Determine the machine/vendor (is the vendor relevant). case "${UNAME_MACHINE}" in amiga) machine=m68k-unknown ;; arm32) machine=arm-unknown ;; atari*) machine=m68k-atari ;; sun3*) machine=m68k-sun ;; mac68k) machine=m68k-apple ;; macppc) machine=powerpc-apple ;; hp3[0-9][05]) machine=m68k-hp ;; ibmrt|romp-ibm) machine=romp-ibm ;; *) machine=${UNAME_MACHINE}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE}" in i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. cat <$dummy.s .data \$Lformat: .byte 37,100,45,37,120,10,0 # "%d-%x\n" .text .globl main .align 4 .ent main main: .frame \$30,16,\$26,0 ldgp \$29,0(\$27) .prologue 1 .long 0x47e03d80 # implver \$0 lda \$2,-1 .long 0x47e20c21 # amask \$2,\$1 lda \$16,\$Lformat mov \$0,\$17 not \$1,\$18 jsr \$26,printf ldgp \$29,0(\$26) mov 0,\$16 jsr \$26,exit .end main EOF $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then case `./$dummy` in 0-0) UNAME_MACHINE="alpha" ;; 1-0) UNAME_MACHINE="alphaev5" ;; 1-1) UNAME_MACHINE="alphaev56" ;; 1-101) UNAME_MACHINE="alphapca56" ;; 2-303) UNAME_MACHINE="alphaev6" ;; 2-307) UNAME_MACHINE="alphaev67" ;; esac fi rm -f $dummy.s $dummy echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; arc64:OpenBSD:*:*) echo mips64el-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hkmips:OpenBSD:*:*) echo mips-unknown-openbsd${UNAME_RELEASE} exit 0 ;; pmax:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mips-unknown-openbsd${UNAME_RELEASE} exit 0 ;; wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; atari*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; sun3*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD $dummy.c -o $dummy \ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit 0 ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) case "${HPUX_REV}" in 11.[0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; esac ;; esac fi ;; esac if [ "${HP_ARCH}" = "" ]; then sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi rm -f $dummy.c $dummy fi ;; esac echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; *9??*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; hppa*:OpenBSD:*:*) echo hppa-unknown-openbsd exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*X-MP:*:*:*) echo xmp-cray-unicos exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3D:*:*:*) echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i386-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) cat >$dummy.c < /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #ifdef __MIPSEB__ printf ("%s-unknown-linux-gnu\n", argv[1]); #endif #ifdef __MIPSEL__ printf ("%sel-unknown-linux-gnu\n", argv[1]); #endif return 0; } EOF $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy ;; ppc:Linux:*:*) # Determine Lib Version cat >$dummy.c < #if defined(__GLIBC__) extern char __libc_version[]; extern char __libc_release[]; #endif main(argc, argv) int argc; char *argv[]; { #if defined(__GLIBC__) printf("%s %s\n", __libc_version, __libc_release); #else printf("unknown\n"); #endif return 0; } EOF LIBC="" $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null if test "$?" = 0 ; then ./$dummy | grep 1\.99 > /dev/null if test "$?" = 0 ; then LIBC="libc1" ; fi fi rm -f $dummy.c $dummy echo powerpc-unknown-linux-gnu${LIBC} exit 0 ;; alpha:Linux:*:*) cat <$dummy.s .data \$Lformat: .byte 37,100,45,37,120,10,0 # "%d-%x\n" .text .globl main .align 4 .ent main main: .frame \$30,16,\$26,0 ldgp \$29,0(\$27) .prologue 1 .long 0x47e03d80 # implver \$0 lda \$2,-1 .long 0x47e20c21 # amask \$2,\$1 lda \$16,\$Lformat mov \$0,\$17 not \$1,\$18 jsr \$26,printf ldgp \$29,0(\$26) mov 0,\$16 jsr \$26,exit .end main EOF LIBC="" $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then case `./$dummy` in 0-0) UNAME_MACHINE="alpha" ;; 1-0) UNAME_MACHINE="alphaev5" ;; 1-1) UNAME_MACHINE="alphaev56" ;; 1-101) UNAME_MACHINE="alphapca56" ;; 2-303) UNAME_MACHINE="alphaev6" ;; 2-307) UNAME_MACHINE="alphaev67" ;; esac objdump --private-headers $dummy | \ grep ld.so.1 > /dev/null if test "$?" = 0 ; then LIBC="libc1" fi fi rm -f $dummy.s $dummy echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit 0 ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit 0 ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. ld_supported_emulations=`cd /; ld --help 2>&1 \ | sed -ne '/supported emulations:/!d s/[ ][ ]*/ /g s/.*supported emulations: *// s/ .*// p'` case "$ld_supported_emulations" in i*86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit 0 ;; elf_i*86) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; i*86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; esac # Either a pre-BFD a.out linker (linux-gnuoldld) # or one that does not give us useful --help. # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. # If ld does not provide *any* "supported emulations:" # that means it is gnuoldld. test -z "$ld_supported_emulations" && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 case "${UNAME_MACHINE}" in i*86) VENDOR=pc; ;; *) VENDOR=unknown; ;; esac # Determine whether the default compiler is a.out or elf cat >$dummy.c < #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); # else printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); # endif # else printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); # endif #else printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); #endif return 0; } EOF $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions # are messed up and put the nodename in both sysname and nodename. i*86:DYNIX/ptx:4*:*) echo i386-sequent-sysv4 exit 0 ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; i*86:*:5:7*) # Fixed at (any) Pentium or better UNAME_MACHINE=i586 if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} fi exit 0 ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4.3${OS_REL} && exit 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit 0 ;; PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) echo `uname -p`-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) if test "${UNAME_MACHINE}" = "x86pc"; then UNAME_MACHINE=pc fi echo `uname -p`-${UNAME_MACHINE}-nto-qnx exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSR-[KW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: xwelltris-1.0.1/config.status0100755000175300014110000003362507627346007014635 0ustar leoguys#! /bin/sh # Generated automatically by configure. # Run this file to recreate the current configuration. # This directory was configured as follows, # on host condor.solvo.ru: # # ./configure --enable-debug --with-sdl # # Compiler output produced by configure, useful for debugging # configure, is in ./config.log if it exists. ac_cs_usage="Usage: ./config.status [--recheck] [--version] [--help]" for ac_option do case "$ac_option" in -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) echo "running ${CONFIG_SHELL-/bin/sh} ./configure --enable-debug --with-sdl --no-create --no-recursion" exec ${CONFIG_SHELL-/bin/sh} ./configure --enable-debug --with-sdl --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) echo "./config.status generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) echo "$ac_cs_usage"; exit 0 ;; *) echo "$ac_cs_usage"; exit 1 ;; esac done ac_given_srcdir=. ac_given_INSTALL="/usr/bin/install -c" trap 'rm -fr src/Make.common src/makefile src/include/globals.h src/image/makefile Makefile src/include/config.h conftest*; exit 1' 1 2 15 # Protect against being on the right side of a sed subst in config.status. sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\&%]/\\&/g; s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF /^[ ]*VPATH[ ]*=[^:]*$/d s%@SHELL@%/bin/sh%g s%@CFLAGS@%-O%g s%@CPPFLAGS@%%g s%@CXXFLAGS@%-g -O2%g s%@FFLAGS@%%g s%@DEFS@%-DHAVE_CONFIG_H%g s%@LDFLAGS@%-O%g s%@LIBS@%-lm %g s%@exec_prefix@%${prefix}%g s%@prefix@%/usr%g s%@program_transform_name@%s,x,x,%g s%@bindir@%${exec_prefix}/bin%g s%@sbindir@%${exec_prefix}/sbin%g s%@libexecdir@%${exec_prefix}/libexec%g s%@datadir@%${prefix}/share%g s%@sysconfdir@%${prefix}/etc%g s%@sharedstatedir@%${prefix}/com%g s%@localstatedir@%${prefix}/var%g s%@libdir@%${exec_prefix}/lib%g s%@includedir@%${prefix}/include%g s%@oldincludedir@%/usr/include%g s%@infodir@%${prefix}/info%g s%@mandir@%${prefix}/man%g s%@host@%i686-pc-linux-gnu%g s%@host_alias@%i686-pc-linux-gnu%g s%@host_cpu@%i686%g s%@host_vendor@%pc%g s%@host_os@%linux-gnu%g s%@CC@%gcc%g s%@CPP@%gcc -E%g s%@CXX@%c++%g s%@INSTALL_PROGRAM@%${INSTALL}%g s%@INSTALL_SCRIPT@%${INSTALL_PROGRAM}%g s%@INSTALL_DATA@%${INSTALL} -m 644%g s%@LN_S@%ln -s%g s%@SET_MAKE@%%g s%@RANLIB@%ranlib%g s%@RM@%/bin/rm%g s%@CP@%/bin/cp%g s%@SHAREFLAGS@%%g s%@LD_SHAREFLAGS@%%g s%@PLUGINS@%%g s%@DEB@%-g -DDEBUG_XNC%g s%@IFACEOBJS@%$(SDLOBJS)%g s%@IFACELIBS@%`sdl-config --libs` -lSDL_image%g s%@IFACEINC@%`sdl-config --cflags` -I./sdl%g s%@X_CFLAGS@%%g s%@X_PRE_LIBS@%%g s%@X_LIBS@%%g s%@X_EXTRA_LIBS@%%g s%@LIBOBJS@%%g /@MCOMMON@/r ./src/Make.common s%@MCOMMON@%%g CEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. ac_file=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_cmds # Line after last line for current file. ac_more_lines=: ac_sed_cmds="" while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file else sed "${ac_end}q" conftest.subs > conftest.s$ac_file fi if test ! -s conftest.s$ac_file; then ac_more_lines=false rm -f conftest.s$ac_file else if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f conftest.s$ac_file" else ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" fi ac_file=`expr $ac_file + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_cmds` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi CONFIG_FILES=${CONFIG_FILES-" src/Make.common src/makefile src/include/globals.h src/image/makefile Makefile"} for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" # A "../" for each directory in $ac_dir_suffix. ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` else ac_dir_suffix= ac_dots= fi case "$ac_given_srcdir" in .) srcdir=. if test -z "$ac_dots"; then top_srcdir=. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; *) # Relative path. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" top_srcdir="$ac_dots$ac_given_srcdir" ;; esac case "$ac_given_INSTALL" in [/$]*) INSTALL="$ac_given_INSTALL" ;; *) INSTALL="$ac_dots$ac_given_INSTALL" ;; esac echo creating "$ac_file" rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." case "$ac_file" in *Makefile*) ac_comsub="1i\\ # $configure_input" ;; *) ac_comsub= ;; esac ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g s%@INSTALL@%$INSTALL%g " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file fi; done rm -f conftest.s* # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' ac_dC='\3' ac_dD='%g' # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='\([ ]\)%\1#\2define\3' ac_uC=' ' ac_uD='\4%g' # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_eB='$%\1#\2define\3' ac_eC=' ' ac_eD='%g' if test "${CONFIG_HEADERS+set}" != set; then CONFIG_HEADERS="src/include/config.h" fi for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac echo creating $ac_file rm -f conftest.frag conftest.in conftest.out ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` cat $ac_file_inputs > conftest.in cat > conftest.frag < conftest.out rm -f conftest.in mv conftest.out conftest.in cat > conftest.frag < conftest.out rm -f conftest.in mv conftest.out conftest.in cat > conftest.frag < conftest.out rm -f conftest.in mv conftest.out conftest.in cat > conftest.frag < conftest.out rm -f conftest.in mv conftest.out conftest.in cat > conftest.frag < conftest.out rm -f conftest.in mv conftest.out conftest.in cat > conftest.frag < conftest.out rm -f conftest.in mv conftest.out conftest.in cat > conftest.frag < conftest.out rm -f conftest.in mv conftest.out conftest.in cat > conftest.frag < conftest.out rm -f conftest.in mv conftest.out conftest.in rm -f conftest.frag conftest.h echo "/* $ac_file. Generated automatically by configure. */" > conftest.h cat conftest.in >> conftest.h rm -f conftest.in if cmp -s $ac_file conftest.h 2>/dev/null; then echo "$ac_file is unchanged" rm -f conftest.h else # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" fi rm -f $ac_file mv conftest.h $ac_file fi fi; done exit 0 xwelltris-1.0.1/config.sub0100755000175300014110000006571207605543562014106 0ustar leoguys#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. timestamp='2001-04-20' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file 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., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit 0;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | storm-chaos* | os2-emx*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \ | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \ | pyramid | mn10200 | mn10300 | tron | a29k \ | 580 | i960 | h8300 \ | x86 | ppcbe | mipsbe | mipsle | shbe | shle \ | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ | hppa64 \ | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ | alphaev6[78] \ | we32k | ns16k | clipper | i370 | sh | sh[34] \ | powerpc | powerpcle \ | 1750a | dsp16xx | pdp10 | pdp11 \ | mips16 | mips64 | mipsel | mips64el \ | mips64orion | mips64orionel | mipstx39 | mipstx39el \ | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ | mips64vr5000 | miprs64vr5000el | mcore | s390 | s390x \ | sparc | sparclet | sparclite | sparc64 | sparcv9 | sparcv9b \ | v850 | c4x \ | thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \ | pj | pjl | h8500) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | w65) ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. # FIXME: clean up the formatting here. vax-* | tahoe-* | i*86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \ | arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ | xmp-* | ymp-* \ | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \ | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ | hppa2.0n-* | hppa64-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ | alphaev6[78]-* \ | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ | clipper-* | orion-* \ | sparclite-* | pdp10-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ | sparc64-* | sparcv9-* | sparcv9b-* | sparc86x-* \ | mips16-* | mips64-* | mipsel-* \ | mips64el-* | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ | mipstx39-* | mipstx39el-* | mcore-* \ | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \ | [cjt]90-* \ | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \ | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | ymp) basic_machine=ymp-cray os=-unicos ;; cray2) basic_machine=cray2-cray os=-unicos ;; [cjt]90) basic_machine=${basic_machine}-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mipsel*-linux*) basic_machine=mipsel-unknown os=-linux-gnu ;; mips*-linux*) basic_machine=mips-unknown os=-linux-gnu ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; mmix*) basic_machine=mmix-knuth os=-mmixware ;; monitor) basic_machine=m68k-rom68k os=-coff ;; msdos) basic_machine=i386-pc os=-msdos ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexgen) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon) basic_machine=i686-pc ;; pentiumii | pentium2) basic_machine=i686-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sparclite-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=t3e-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; tower | tower-32) basic_machine=m68k-ncr ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xmp) basic_machine=xmp-cray os=-unicos ;; xps | xps100) basic_machine=xps100-honeywell ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; mips) if [ x$os = x-linux-gnu ]; then basic_machine=mips-unknown else basic_machine=mips-mips fi ;; romp) basic_machine=romp-ibm ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh3 | sh4) basic_machine=sh-unknown ;; sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; c4x*) basic_machine=c4x-none os=-coff ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto*) os=-nto-qnx ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-ibm) os=-aix ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -ptx*) vendor=sequent ;; -vxsim* | -vxworks*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: xwelltris-1.0.1/configure0100755000175300014110000032614507627346007014031 0ustar leoguys#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # Defaults: ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: ac_default_prefix=/usr ac_help="$ac_help --enable-debug Turn on debugging output" ac_help="$ac_help --with-sdl Turn on SDL support instead of X11" ac_help="$ac_help --with-x use the X Window System" # Initialize some variables set by options. # The variables have the same names as the options, with # dashes changed to underlines. build=NONE cache_file=./config.cache exec_prefix=NONE host=NONE no_create= nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= target=NONE verbose= x_includes=NONE x_libraries=NONE bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. ac_max_here_lines=12 ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi case "$ac_option" in -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) ac_optarg= ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case "$ac_option" in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir="$ac_optarg" ;; -build | --build | --buil | --bui | --bu) ac_prev=build ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build="$ac_optarg" ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file="$ac_optarg" ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir="$ac_optarg" ;; -disable-* | --disable-*) ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` eval "enable_${ac_feature}=no" ;; -enable-* | --enable-*) ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "enable_${ac_feature}='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix="$ac_optarg" ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he) # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat << EOF Usage: configure [options] [host] Options: [defaults in brackets after descriptions] Configuration: --cache-file=FILE cache test results in FILE --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [same as prefix] --bindir=DIR user executables in DIR [EPREFIX/bin] --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] --libexecdir=DIR program executables in DIR [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data in DIR [PREFIX/share] --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data in DIR [PREFIX/com] --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] --libdir=DIR object code libraries in DIR [EPREFIX/lib] --includedir=DIR C header files in DIR [PREFIX/include] --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] --infodir=DIR info documentation in DIR [PREFIX/info] --mandir=DIR man documentation in DIR [PREFIX/man] --srcdir=DIR find the sources in DIR [configure dir or ..] --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names EOF cat << EOF Host type: --build=BUILD configure for building on BUILD [BUILD=HOST] --host=HOST configure for HOST [guessed] --target=TARGET configure for TARGET [TARGET=HOST] Features and packages: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR EOF if test -n "$ac_help"; then echo "--enable and --with options recognized:$ac_help" fi exit 0 ;; -host | --host | --hos | --ho) ac_prev=host ;; -host=* | --host=* | --hos=* | --ho=*) host="$ac_optarg" ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir="$ac_optarg" ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir="$ac_optarg" ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir="$ac_optarg" ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir="$ac_optarg" ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir="$ac_optarg" ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir="$ac_optarg" ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir="$ac_optarg" ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix="$ac_optarg" ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix="$ac_optarg" ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix="$ac_optarg" ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name="$ac_optarg" ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir="$ac_optarg" ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir="$ac_optarg" ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site="$ac_optarg" ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir="$ac_optarg" ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir="$ac_optarg" ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target="$ac_optarg" ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers) echo "configure generated by autoconf version 2.13" exit 0 ;; -with-* | --with-*) ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "with_${ac_package}='$ac_optarg'" ;; -without-* | --without-*) ac_package=`echo $ac_option|sed -e 's/-*without-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` eval "with_${ac_package}=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes="$ac_optarg" ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries="$ac_optarg" ;; -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } ;; *) if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then echo "configure: warning: $ac_option: invalid host type" 1>&2 fi if test "x$nonopt" != xNONE; then { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } fi nonopt="$ac_option" ;; esac done if test -n "$ac_prev"; then { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } fi trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 # File descriptor usage: # 0 standard input # 1 file creation # 2 errors and warnings # 3 some systems may open it to /dev/tty # 4 used on the Kubota Titan # 6 checking for... messages and results # 5 compiler messages saved in config.log if test "$silent" = yes; then exec 6>/dev/null else exec 6>&1 fi exec 5>./config.log echo "\ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. " 1>&5 # Strip out --no-create and --no-recursion so they do not pile up. # Also quote any args containing shell metacharacters. ac_configure_args= for ac_arg do case "$ac_arg" in -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) ac_configure_args="$ac_configure_args '$ac_arg'" ;; *) ac_configure_args="$ac_configure_args $ac_arg" ;; esac done # NLS nuisances. # Only set these to C if already set. These must not be set unconditionally # because not all systems understand e.g. LANG=C (notably SCO). # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! # Non-C LC_CTYPE values break the ctype check. if test "${LANG+set}" = set; then LANG=C; export LANG; fi if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo > confdefs.h # A filename unique to this package, relative to the directory that # configure is in, which we can look for to find out if srcdir is correct. ac_unique_file=src/main.cxx # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_prog=$0 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } else { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } fi fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then echo "loading site script $ac_site_file" . "$ac_site_file" fi done if test -r "$cache_file"; then echo "loading cache $cache_file" . $cache_file else echo "creating cache $cache_file" > $cache_file fi ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross ac_exeext= ac_objext=o if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then ac_n= ac_c=' ' ac_t=' ' else ac_n=-n ac_c= ac_t= fi else ac_n= ac_c='\c' ac_t= fi if test -z "${CFLAGS}"; then if test -z "${CCOPTS}"; then CCOPTS='-O' fi CFLAGS="$CCOPTS" fi ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break fi done if test -z "$ac_aux_dir"; then { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } fi ac_config_guess=$ac_aux_dir/config.guess ac_config_sub=$ac_aux_dir/config.sub ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # Make sure we can run config.sub. if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 echo "configure:567: checking host system type" >&5 host_alias=$host case "$host_alias" in NONE) case $nonopt in NONE) if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } fi ;; *) host_alias=$nonopt ;; esac ;; esac host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 ARCH=`echo $host | sed 's/\([^-]*\)-[^-]*-\([^-]*\)/\1-\2/'` # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:593: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="gcc" break fi done IFS="$ac_save_ifs" fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:623: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" break fi done IFS="$ac_save_ifs" if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# -gt 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift set dummy "$ac_dir/$ac_word" "$@" shift ac_cv_prog_CC="$@" fi fi fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi if test -z "$CC"; then case "`uname -s`" in *win32* | *WIN32*) # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:674: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="cl" break fi done IFS="$ac_save_ifs" fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi ;; esac fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 echo "configure:706: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF #line 717 "configure" #include "confdefs.h" main(){return(0);} EOF if { (eval echo configure:722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then ac_cv_prog_cc_cross=no else ac_cv_prog_cc_cross=yes fi else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_prog_cc_works=no fi rm -fr conftest* ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 echo "configure:748: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 echo "configure:753: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no fi fi echo "$ac_t""$ac_cv_prog_gcc" 1>&6 if test $ac_cv_prog_gcc = yes; then GCC=yes else GCC= fi ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 echo "configure:781: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ac_cv_prog_cc_g=yes else ac_cv_prog_cc_g=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 if test "$ac_test_CFLAGS" = set; then CFLAGS="$ac_save_CFLAGS" elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 echo "configure:813: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then echo "$ac_t""yes" 1>&6 ISC=yes # If later tests want to check for ISC. cat >> confdefs.h <<\EOF #define _POSIX_SOURCE 1 EOF if test "$GCC" = yes; then CC="$CC -posix" else CC="$CC -Xp" fi else echo "$ac_t""no" 1>&6 ISC= fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 echo "configure:834: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # This must be in double quotes, not single quotes, because CPP may get # substituted into the Makefile and "${CC-cc}" will confuse make. CPP="${CC-cc} -E" # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:872: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP=/lib/cpp fi rm -f conftest* fi rm -f conftest* fi rm -f conftest* ac_cv_prog_CPP="$CPP" fi CPP="$ac_cv_prog_CPP" else ac_cv_prog_CPP="$CPP" fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for AIX""... $ac_c" 1>&6 echo "configure:914: checking for AIX" >&5 cat > conftest.$ac_ext <&5 | egrep "yes" >/dev/null 2>&1; then rm -rf conftest* echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF #define _ALL_SOURCE 1 EOF else rm -rf conftest* echo "$ac_t""no" 1>&6 fi rm -f conftest* ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 echo "configure:939: checking for minix/config.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 MINIX=yes else echo "$ac_t""no" 1>&6 MINIX= fi if test "$MINIX" = yes; then cat >> confdefs.h <<\EOF #define _POSIX_SOURCE 1 EOF cat >> confdefs.h <<\EOF #define _POSIX_1_SOURCE 2 EOF cat >> confdefs.h <<\EOF #define _MINIX 1 EOF fi for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:991: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CXX="$ac_prog" break fi done IFS="$ac_save_ifs" fi fi CXX="$ac_cv_prog_CXX" if test -n "$CXX"; then echo "$ac_t""$CXX" 1>&6 else echo "$ac_t""no" 1>&6 fi test -n "$CXX" && break done test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 echo "configure:1023: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF #line 1034 "configure" #include "confdefs.h" int main(){return(0);} EOF if { (eval echo configure:1039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then ac_cv_prog_cxx_cross=no else ac_cv_prog_cxx_cross=yes fi else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_prog_cxx_works=no fi rm -fr conftest* ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 if test $ac_cv_prog_cxx_works = no; then { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 echo "configure:1065: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 echo "configure:1070: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.C <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no fi fi echo "$ac_t""$ac_cv_prog_gxx" 1>&6 if test $ac_cv_prog_gxx = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 echo "configure:1098: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.cc if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then ac_cv_prog_cxx_g=yes else ac_cv_prog_cxx_g=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6 if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS="$ac_save_CXXFLAGS" elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi for ac_declaration in \ ''\ '#include ' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat > conftest.$ac_ext < $ac_declaration int main() { exit (42); ; return 0; } EOF if { (eval echo configure:1147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* continue fi rm -f conftest* cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* break else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* done if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 echo "configure:1192: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" for ac_dir in $PATH; do # Account for people who put trailing slashes in PATH elements. case "$ac_dir/" in /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do if test -f $ac_dir/$ac_prog; then if test $ac_prog = install && grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 fi fi done ;; esac done IFS="$ac_save_IFS" fi if test "${ac_cv_path_install+set}" = set; then INSTALL="$ac_cv_path_install" else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL="$ac_install_sh" fi fi echo "$ac_t""$INSTALL" 1>&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 echo "configure:1245: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftestdata if ln -s X conftestdata 2>/dev/null then rm -f conftestdata ac_cv_prog_LN_S="ln -s" else ac_cv_prog_LN_S=ln fi fi LN_S="$ac_cv_prog_LN_S" if test "$ac_cv_prog_LN_S" = "ln -s"; then echo "$ac_t""yes" 1>&6 else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 echo "configure:1266: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftestmake <<\EOF all: @echo 'ac_maketemp="${MAKE}"' EOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftestmake fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$ac_t""yes" 1>&6 SET_MAKE= else echo "$ac_t""no" 1>&6 SET_MAKE="MAKE=${MAKE-make}" fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:1295: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_RANLIB="ranlib" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" fi fi RANLIB="$ac_cv_prog_RANLIB" if test -n "$RANLIB"; then echo "$ac_t""$RANLIB" 1>&6 else echo "$ac_t""no" 1>&6 fi # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:1325: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$RM" in /*) ac_cv_path_RM="$RM" # Let the user override the test with a path. ;; ?:/*) ac_cv_path_RM="$RM" # Let the user override the test with a dos path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_RM="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_RM" && ac_cv_path_RM="rm" ;; esac fi RM="$ac_cv_path_RM" if test -n "$RM"; then echo "$ac_t""$RM" 1>&6 else echo "$ac_t""no" 1>&6 fi # Extract the first word of "cp", so it can be a program name with args. set dummy cp; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:1361: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_CP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$CP" in /*) ac_cv_path_CP="$CP" # Let the user override the test with a path. ;; ?:/*) ac_cv_path_CP="$CP" # Let the user override the test with a dos path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_CP="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_CP" && ac_cv_path_CP="cp" ;; esac fi CP="$ac_cv_path_CP" if test -n "$CP"; then echo "$ac_t""$CP" 1>&6 else echo "$ac_t""no" 1>&6 fi case "$ARCH" in *sco*|*SCO*) echo $ac_n "checking "SCO-Unix. See if we need -belf"""... $ac_c" 1>&6 echo "configure:1407: checking "SCO-Unix. See if we need -belf"" >&5 old_cflags="$CFLAGS" CFLAGS="$CFLAGS -belf" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* CMFLAGS="$CMFLAGS -belf" echo "$ac_t""yes" 1>&6 else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* echo "$ac_t""no" 1>&6 CFLAGS="$old_cflags" fi rm -f conftest* ;; esac ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 echo "configure:1441: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> int main() { DIR *dirp = 0; ; return 0; } EOF if { (eval echo configure:1454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 echo "configure:1479: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 LIBS="$LIBS -ldir" else echo "$ac_t""no" 1>&6 fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 echo "configure:1520: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 LIBS="$LIBS -lx" else echo "$ac_t""no" 1>&6 fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 echo "configure:1562: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #include #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* ac_cv_header_stdc=yes else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "memchr" >/dev/null 2>&1; then : else rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "free" >/dev/null 2>&1; then : else rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF if { (eval echo configure:1642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_header_stdc=no fi rm -fr conftest* fi fi fi echo "$ac_t""$ac_cv_header_stdc" 1>&6 if test $ac_cv_header_stdc = yes; then cat >> confdefs.h <<\EOF #define STDC_HEADERS 1 EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 echo "configure:1666: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #ifndef WEXITSTATUS #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) #endif #ifndef WIFEXITED #define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main() { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF if { (eval echo configure:1687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_sys_wait_h=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 if test $ac_cv_header_sys_wait_h = yes; then cat >> confdefs.h <<\EOF #define HAVE_SYS_WAIT_H 1 EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 echo "configure:1708: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #include int main() { struct tm *tp; ; return 0; } EOF if { (eval echo configure:1722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_time=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_header_time" 1>&6 if test $ac_cv_header_time = yes; then cat >> confdefs.h <<\EOF #define TIME_WITH_SYS_TIME 1 EOF fi for ac_hdr in fcntl.h \ sys/select.h \ sys/time.h \ sys/sigevent.h \ sys/types.h \ sys/stat.h \ sys/utsname.h \ sys/param.h \ sys/wait.h \ limits.h \ unistd.h \ errno.h \ strings.h \ math.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1759: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6 echo "configure:1798: checking for pow in -lm" >&5 ac_lib_var=`echo m'_'pow | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi for ac_func in setlocale do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:1847: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else $ac_func(); #endif ; return 0; } EOF if { (eval echo configure:1875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi done # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" xncdebug=yes else xncdebug=no fi if test "$xncdebug" = "yes"; then DEB="-g -DDEBUG_XNC" else DEB="" fi # Check whether --with-sdl or --without-sdl was given. if test "${with_sdl+set}" = set; then withval="$with_sdl" sdl_support=yes else sdl_support=no fi if test "x$sdl_support" = "xyes"; then echo "SDL is ENABLED *******************" IFACEOBJS='$(SDLOBJS)' IFACELIBS='`sdl-config --libs` -lSDL_image' IFACEINC='`sdl-config --cflags` -I./sdl' else echo "X11 is ENABLED *******************" # If we find X, set shell vars x_includes and x_libraries to the # paths, otherwise set no_x=yes. # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 echo "configure:1938: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then withval="$with_x" : fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then # Both variables are already set. have_x=yes else if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=NO ac_x_libraries=NO rm -fr conftestdir if mkdir conftestdir; then cd conftestdir # Make sure to not put "make" in the Imakefile rules, since we grep it out. cat > Imakefile <<'EOF' acfindx: @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' EOF if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl; do if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && test -f $ac_im_libdir/libX11.$ac_extension; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case "$ac_im_incroot" in /usr/include) ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; esac case "$ac_im_usrlibdir" in /usr/lib | /lib) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; esac fi cd .. rm -fr conftestdir fi if test "$ac_x_includes" = NO; then # Guess where to find include files, by looking for this one X11 .h file. test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:2005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* # We can compile using X headers with no special include directory. ac_x_includes= else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* # Look for the header file in a standard set of common directories. # Check X11 before X11Rn because it is often a symlink to the current release. for ac_dir in \ /usr/X11/include \ /usr/X11R6/include \ /usr/X11R5/include \ /usr/X11R4/include \ \ /usr/include/X11 \ /usr/include/X11R6 \ /usr/include/X11R5 \ /usr/include/X11R4 \ \ /usr/local/X11/include \ /usr/local/X11R6/include \ /usr/local/X11R5/include \ /usr/local/X11R4/include \ \ /usr/local/include/X11 \ /usr/local/include/X11R6 \ /usr/local/include/X11R5 \ /usr/local/include/X11R4 \ \ /usr/X386/include \ /usr/x386/include \ /usr/XFree86/include/X11 \ \ /usr/include \ /usr/local/include \ /usr/unsupported/include \ /usr/athena/include \ /usr/local/x11r5/include \ /usr/lpp/Xamples/include \ \ /usr/openwin/include \ /usr/openwin/share/include \ ; \ do if test -r "$ac_dir/$x_direct_test_include"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest* fi # $ac_x_includes = NO if test "$ac_x_libraries" = NO; then # Check for the libraries. test -z "$x_direct_test_library" && x_direct_test_library=Xt test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. ac_x_libraries= else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* LIBS="$ac_save_LIBS" # First see if replacing the include by lib works. # Check X11 before X11Rn because it is often a symlink to the current release. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ /usr/X11/lib \ /usr/X11R6/lib \ /usr/X11R5/lib \ /usr/X11R4/lib \ \ /usr/lib/X11 \ /usr/lib/X11R6 \ /usr/lib/X11R5 \ /usr/lib/X11R4 \ \ /usr/local/X11/lib \ /usr/local/X11R6/lib \ /usr/local/X11R5/lib \ /usr/local/X11R4/lib \ \ /usr/local/lib/X11 \ /usr/local/lib/X11R6 \ /usr/local/lib/X11R5 \ /usr/local/lib/X11R4 \ \ /usr/X386/lib \ /usr/x386/lib \ /usr/XFree86/lib/X11 \ \ /usr/lib \ /usr/local/lib \ /usr/unsupported/lib \ /usr/athena/lib \ /usr/local/x11r5/lib \ /usr/lpp/Xamples/lib \ /lib/usr/lib/X11 \ \ /usr/openwin/lib \ /usr/openwin/share/lib \ ; \ do for ac_extension in a so sl; do if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f conftest* fi # $ac_x_libraries = NO if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then # Didn't find X anywhere. Cache the known absence of X. ac_cv_have_x="have_x=no" else # Record where we found X for the cache. ac_cv_have_x="have_x=yes \ ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" fi fi fi eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then echo "$ac_t""$have_x" 1>&6 no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes \ ac_x_includes=$x_includes ac_x_libraries=$x_libraries" echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 fi if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. cat >> confdefs.h <<\EOF #define X_DISPLAY_MISSING 1 EOF X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else if test -n "$x_includes"; then X_CFLAGS="$X_CFLAGS -I$x_includes" fi # It would also be nice to do this for all -L options, not just this one. if test -n "$x_libraries"; then X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 echo "configure:2187: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_R_nospace=no fi rm -f conftest* if test $ac_R_nospace = yes; then echo "$ac_t""no" 1>&6 X_LIBS="$X_LIBS -R$x_libraries" else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_R_space=no fi rm -f conftest* if test $ac_R_space = yes; then echo "$ac_t""yes" 1>&6 X_LIBS="$X_LIBS -R $x_libraries" else echo "$ac_t""neither works" 1>&6 fi fi LIBS="$ac_xsave_LIBS" esac fi # Check for system-dependent libraries X programs must link with. # Do this before checking for the system-independent R6 libraries # (-lICE), since we may need -lsocket or whatever for X linking. if test "$ISC" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" else # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 echo "configure:2252: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" else echo "$ac_t""no" 1>&6 fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 echo "configure:2293: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" else echo "$ac_t""no" 1>&6 fi fi # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 echo "configure:2341: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) choke me #else gethostbyname(); #endif ; return 0; } EOF if { (eval echo configure:2369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_gethostbyname=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 echo "configure:2390: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" else echo "$ac_t""no" 1>&6 fi fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary # on later versions), says simon@lia.di.epfl.ch: it contains # gethostby* variants that don't use the nameserver (or something). # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 echo "configure:2439: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char connect(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_connect) || defined (__stub___connect) choke me #else connect(); #endif ; return 0; } EOF if { (eval echo configure:2467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_connect=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 echo "configure:2488: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" else echo "$ac_t""no" 1>&6 fi fi # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 echo "configure:2531: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char remove(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_remove) || defined (__stub___remove) choke me #else remove(); #endif ; return 0; } EOF if { (eval echo configure:2559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_remove=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_remove=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 echo "configure:2580: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" else echo "$ac_t""no" 1>&6 fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 echo "configure:2623: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shmat(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_shmat) || defined (__stub___shmat) choke me #else shmat(); #endif ; return 0; } EOF if { (eval echo configure:2651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_shmat=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 echo "configure:2672: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" else echo "$ac_t""no" 1>&6 fi fi fi # Check for libraries that X11R6 Xt/Xaw programs need. ac_save_LDFLAGS="$LDFLAGS" test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to # check for ICE first), but we must link in the order -lSM -lICE or # we get undefined symbols. So assume we have SM if we have ICE. # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 echo "configure:2724: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" else echo "$ac_t""no" 1>&6 fi LDFLAGS="$ac_save_LDFLAGS" fi IFACEOBJS='$(X11OBJS) $(X11IMAGE)' IFACELIBS='$(XLIBS)' IFACEINC='$(XINC) -I./x11' fi out_lib=${LIBS} echo $ac_n "checking for working const""... $ac_c" 1>&6 echo "configure:2777: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; } ; return 0; } EOF if { (eval echo configure:2831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_c_const=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_c_const" 1>&6 if test $ac_cv_c_const = no; then cat >> confdefs.h <<\EOF #define const EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 echo "configure:2852: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "uid_t" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_uid_t=yes else rm -rf conftest* ac_cv_type_uid_t=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_uid_t" 1>&6 if test $ac_cv_type_uid_t = no; then cat >> confdefs.h <<\EOF #define uid_t int EOF cat >> confdefs.h <<\EOF #define gid_t int EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 echo "configure:2886: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* done fi echo "$ac_t""$ac_cv_c_inline" 1>&6 case "$ac_cv_c_inline" in inline | yes) ;; no) cat >> confdefs.h <<\EOF #define inline EOF ;; *) cat >> confdefs.h <&6 echo "configure:2926: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS #include #include #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_mode_t=yes else rm -rf conftest* ac_cv_type_mode_t=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_mode_t" 1>&6 if test $ac_cv_type_mode_t = no; then cat >> confdefs.h <<\EOF #define mode_t int EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 echo "configure:2959: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS #include #include #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_pid_t=yes else rm -rf conftest* ac_cv_type_pid_t=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_pid_t" 1>&6 if test $ac_cv_type_pid_t = no; then cat >> confdefs.h <<\EOF #define pid_t int EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 echo "configure:2992: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS #include #include #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_size_t=yes else rm -rf conftest* ac_cv_type_size_t=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_size_t" 1>&6 if test $ac_cv_type_size_t = no; then cat >> confdefs.h <<\EOF #define size_t unsigned EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 echo "configure:3025: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF if { (eval echo configure:3038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_struct_tm=sys/time.h fi rm -f conftest* fi echo "$ac_t""$ac_cv_struct_tm" 1>&6 if test $ac_cv_struct_tm = sys/time.h; then cat >> confdefs.h <<\EOF #define TM_IN_SYS_TIME 1 EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 echo "configure:3059: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #ifdef signal #undef signal #endif #ifdef __cplusplus extern "C" void (*signal (int, void (*)(int)))(int); #else void (*signal ()) (); #endif int main() { int i; ; return 0; } EOF if { (eval echo configure:3081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_type_signal=int fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_signal" 1>&6 cat >> confdefs.h <&6 echo "configure:3106: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "$ac_pattern" >/dev/null 2>&1; then rm -rf conftest* ac_cv_prog_gcc_traditional=yes else rm -rf conftest* ac_cv_prog_gcc_traditional=no fi rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "$ac_pattern" >/dev/null 2>&1; then rm -rf conftest* ac_cv_prog_gcc_traditional=yes fi rm -f conftest* fi fi echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6 if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 echo "configure:3152: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_func_memcmp_clean=no fi rm -fr conftest* fi fi echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 echo "configure:3188: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #ifdef signal #undef signal #endif #ifdef __cplusplus extern "C" void (*signal (int, void (*)(int)))(int); #else void (*signal ()) (); #endif int main() { int i; ; return 0; } EOF if { (eval echo configure:3210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_type_signal=int fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_signal" 1>&6 cat >> confdefs.h <&6 echo "configure:3240: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else $ac_func(); #endif ; return 0; } EOF if { (eval echo configure:3268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi done CFLAGS=${CFLAGS--O} LDFLAGS=${LDFLAGS--O} CPPFLAGS="$CPPFLAGS" MCOMMON=./src/Make.common case "$ARCH" in *hppa*|*hpux*) # do nothing ;; *solaris*) if test "$GCC" = "yes"; then echo $ac_n "checking "whether we need -fpermissive"""... $ac_c" 1>&6 echo "configure:3314: checking "whether we need -fpermissive"" >&5 old_cflags="$CFLAGS" CFLAGS="-fpermissive $CFLAGS" if test "$cross_compiling" = yes; then echo "$ac_t""no" 1>&6 CFLAGS="$old_cflags" else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then if grep 'option `-fpermissive'"'" config.log >/dev/null; then echo "$ac_t""no" 1>&6 CFLAGS="$old_cflags" else CFLAGS="$old_cflags -fpermissive" echo "$ac_t""yes" 1>&6 fi else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* echo "$ac_t""no" 1>&6 CFLAGS="$old_cflags" fi rm -fr conftest* fi fi ;; *aix*) # do nothing ;; *darwin*) # do nothing ;; *) # do nothing ;; esac trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs. It is not useful on other systems. # If it contains results you don't want to keep, you may remove or edit it. # # By default, configure uses ./config.cache as the cache file, # creating it if it does not exist already. You can give configure # the --cache-file=FILE option to use a different cache file; that is # what configure does when it calls configure scripts in # subdirectories, so they share the cache. # Giving --cache-file=/dev/null disables caching, for debugging configure. # config.status only pays attention to the cache file if you give it the # --recheck option to rerun configure. # EOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). sed -n \ -e "s/'/'\\\\''/g" \ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ;; esac >> confcache if cmp -s $cache_file confcache; then : else if test -w $cache_file; then echo "updating cache $cache_file" cat confcache > $cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Any assignment to VPATH causes Sun make to only execute # the first set of double-colon rules, so remove it if not needed. # If there is a colon in the path, we need to keep it. if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' fi trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 DEFS=-DHAVE_CONFIG_H # Without the "./", some shells look in PATH for config.status. : ${CONFIG_STATUS=./config.status} echo creating $CONFIG_STATUS rm -f $CONFIG_STATUS cat > $CONFIG_STATUS </dev/null | sed 1q`: # # $0 $ac_configure_args # # Compiler output produced by configure, useful for debugging # configure, is in ./config.log if it exists. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" for ac_option do case "\$ac_option" in -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; *) echo "\$ac_cs_usage"; exit 1 ;; esac done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" trap 'rm -fr `echo "\ src/Make.common \ src/makefile \ src/include/globals.h \ src/image/makefile \ Makefile src/include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF $ac_vpsub $extrasub s%@SHELL@%$SHELL%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g s%@FFLAGS@%$FFLAGS%g s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g s%@exec_prefix@%$exec_prefix%g s%@prefix@%$prefix%g s%@program_transform_name@%$program_transform_name%g s%@bindir@%$bindir%g s%@sbindir@%$sbindir%g s%@libexecdir@%$libexecdir%g s%@datadir@%$datadir%g s%@sysconfdir@%$sysconfdir%g s%@sharedstatedir@%$sharedstatedir%g s%@localstatedir@%$localstatedir%g s%@libdir@%$libdir%g s%@includedir@%$includedir%g s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g s%@host@%$host%g s%@host_alias@%$host_alias%g s%@host_cpu@%$host_cpu%g s%@host_vendor@%$host_vendor%g s%@host_os@%$host_os%g s%@CC@%$CC%g s%@CPP@%$CPP%g s%@CXX@%$CXX%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@LN_S@%$LN_S%g s%@SET_MAKE@%$SET_MAKE%g s%@RANLIB@%$RANLIB%g s%@RM@%$RM%g s%@CP@%$CP%g s%@SHAREFLAGS@%$SHAREFLAGS%g s%@LD_SHAREFLAGS@%$LD_SHAREFLAGS%g s%@PLUGINS@%$PLUGINS%g s%@DEB@%$DEB%g s%@IFACEOBJS@%$IFACEOBJS%g s%@IFACELIBS@%$IFACELIBS%g s%@IFACEINC@%$IFACEINC%g s%@X_CFLAGS@%$X_CFLAGS%g s%@X_PRE_LIBS@%$X_PRE_LIBS%g s%@X_LIBS@%$X_LIBS%g s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g s%@LIBOBJS@%$LIBOBJS%g /@MCOMMON@/r $MCOMMON s%@MCOMMON@%%g CEOF EOF cat >> $CONFIG_STATUS <<\EOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. ac_file=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_cmds # Line after last line for current file. ac_more_lines=: ac_sed_cmds="" while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file else sed "${ac_end}q" conftest.subs > conftest.s$ac_file fi if test ! -s conftest.s$ac_file; then ac_more_lines=false rm -f conftest.s$ac_file else if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f conftest.s$ac_file" else ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" fi ac_file=`expr $ac_file + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_cmds` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" # A "../" for each directory in $ac_dir_suffix. ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` else ac_dir_suffix= ac_dots= fi case "$ac_given_srcdir" in .) srcdir=. if test -z "$ac_dots"; then top_srcdir=. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; *) # Relative path. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" top_srcdir="$ac_dots$ac_given_srcdir" ;; esac case "$ac_given_INSTALL" in [/$]*) INSTALL="$ac_given_INSTALL" ;; *) INSTALL="$ac_dots$ac_given_INSTALL" ;; esac echo creating "$ac_file" rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." case "$ac_file" in *Makefile*) ac_comsub="1i\\ # $configure_input" ;; *) ac_comsub= ;; esac ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g s%@INSTALL@%$INSTALL%g " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file fi; done rm -f conftest.s* # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' ac_dC='\3' ac_dD='%g' # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='\([ ]\)%\1#\2define\3' ac_uC=' ' ac_uD='\4%g' # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_eB='$%\1#\2define\3' ac_eC=' ' ac_eD='%g' if test "${CONFIG_HEADERS+set}" != set; then EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF fi for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac echo creating $ac_file rm -f conftest.frag conftest.in conftest.out ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` cat $ac_file_inputs > conftest.in EOF # Transform confdefs.h into a sed script conftest.vals that substitutes # the proper values into config.h.in to produce config.h. And first: # Protect against being on the right side of a sed subst in config.status. # Protect against being in an unquoted here document in config.status. rm -f conftest.vals cat > conftest.hdr <<\EOF s/[\\&%]/\\&/g s%[\\$`]%\\&%g s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp s%ac_d%ac_u%gp s%ac_u%ac_e%gp EOF sed -n -f conftest.hdr confdefs.h > conftest.vals rm -f conftest.hdr # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >> conftest.vals <<\EOF s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% EOF # Break up conftest.vals because some shells have a limit on # the size of here documents, and old seds have small limits too. rm -f conftest.tail while : do ac_lines=`grep -c . conftest.vals` # grep -c gives empty output for an empty file on some AIX systems. if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi # Write a limited-size here document to conftest.frag. echo ' cat > conftest.frag <> $CONFIG_STATUS sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS echo 'CEOF sed -f conftest.frag conftest.in > conftest.out rm -f conftest.in mv conftest.out conftest.in ' >> $CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail rm -f conftest.vals mv conftest.tail conftest.vals done rm -f conftest.vals cat >> $CONFIG_STATUS <<\EOF rm -f conftest.frag conftest.h echo "/* $ac_file. Generated automatically by configure. */" > conftest.h cat conftest.in >> conftest.h rm -f conftest.in if cmp -s $ac_file conftest.h 2>/dev/null; then echo "$ac_file is unchanged" rm -f conftest.h else # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" fi rm -f $ac_file mv conftest.h $ac_file fi fi; done EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF exit 0 EOF chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 echo "ZINC=" >>src/make.conf echo "ZLIB=" >>src/make.conf echo "ZDEP=" >>src/make.conf echo "PNG=" >>src/make.conf echo "OPNGS=" >>src/make.conf echo "PNGINC=" >>src/make.conf echo "PNGLIB=" >>src/make.conf echo "PNGDEP=" >>src/make.conf echo "PSEUDO=-DPSEUDOCOLOR" >>src/make.conf echo "OPSEUDO=" >>src/make.conf pse="PseudoColor; TrueColor;" echo "XBM=" >>src/make.conf echo "OXBM=" >>src/make.conf xbm="" echo "BMP=" >>src/make.conf echo "OBMP=" >>src/make.conf bmp="" echo "XPM=" >>src/make.conf echo "OXPM=" >>src/make.conf xpm="" echo "PCX=" >>src/make.conf echo "OPCX=" >>src/make.conf pcx="" echo "TGA=" >>src/make.conf echo "OTGA=" >>src/make.conf targa="" echo "TIFF=" >>src/make.conf echo "OTIFF=" >>src/make.conf echo "TLIB=" >>src/make.conf tiff="" echo "PCD=" >>src/make.conf echo "OPCDS=" >>src/make.conf pcd="" echo "--------------- X Welltris Project ----------------------" echo " Configuration: Source code location: ${srcdir} C Compiler: ${CC} C Compiler flags: ${CFLAGS} C++ Compiler: ${CXX} Libraries: ${out_lib} Install path: ${prefix}/bin Man pages path: ${prefix}/man X11 versions: ${X_LIBS} X Visuals: ${pse} Image library: GIF " echo "-----------------------------------------------------------" echo "" echo "Type 'make' for building XWelltris binaries, and after that" echo "do 'make install' as 'root'." echo "" echo "Thank you..." xwelltris-1.0.1/configure.in0100644000175300014110000001330507627346007014422 0ustar leoguysdnl# -*- sh -*- dnl# dnl# $Id: configure.in,v 1.4 2003/02/27 08:27:51 leo Exp $ dnl# dnl# Process this file with autoconf to produce a configure script. dnl# AC_INIT(src/main.cxx) if test -z "${CFLAGS}"; then if test -z "${CCOPTS}"; then CCOPTS='-O' fi CFLAGS="$CCOPTS" fi dnl# Checks for programs. dnl AC_MAKE_SET AC_CANONICAL_HOST changequote(,)dnl ARCH=`echo $host | sed 's/\([^-]*\)-[^-]*-\([^-]*\)/\1-\2/'` changequote([,])dnl dnl Checks for programs. AC_PREFIX_DEFAULT(/usr) AC_ISC_POSIX AC_AIX AC_MINIX dnl AC_PROG_CC AC_PROG_CXX AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET AC_PROG_RANLIB AC_PATH_PROG(RM, rm, rm) AC_PATH_PROG(CP, cp, cp) AC_SUBST(SHAREFLAGS) AC_SUBST(LD_SHAREFLAGS) AC_SUBST(PLUGINS) AC_SUBST(DEB) AC_SUBST(IFACEOBJS) AC_SUBST(IFACELIBS) AC_SUBST(IFACEINC) dnl **************************************************************** dnl On SCO Unix, there are ELF and COFF binaries. We want elf to dnl provide for dlopen() and friends. With help from Tamas Laufer! dnl **************************************************************** case "$ARCH" in *sco*|*SCO*) AC_MSG_CHECKING("SCO-Unix. See if we need -belf") old_cflags="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_TRY_COMPILE( [ ], [ ], CMFLAGS="$CMFLAGS -belf" AC_MSG_RESULT(yes), AC_MSG_RESULT(no) CFLAGS="$old_cflags") ;; esac dnl Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_HEADER_TIME AC_CHECK_HEADERS(fcntl.h \ sys/select.h \ sys/time.h \ sys/sigevent.h \ sys/types.h \ sys/stat.h \ sys/utsname.h \ sys/param.h \ sys/wait.h \ limits.h \ unistd.h \ errno.h \ strings.h \ math.h) AC_CHECK_LIB(m, pow) AC_CHECK_FUNCS(setlocale) dnl -------------------------------------------------------------------------- dnl Additional configure options added for xnc AC_ARG_ENABLE(debug, [ --enable-debug Turn on debugging output], xncdebug=yes, xncdebug=no) if test "$xncdebug" = "yes"; then DEB="-g -DDEBUG_XNC" else DEB="" fi AC_ARG_WITH(sdl, [ --with-sdl Turn on SDL support instead of X11], sdl_support=yes, sdl_support=no) if test "x$sdl_support" = "xyes"; then echo "SDL is ENABLED *******************" IFACEOBJS='$(SDLOBJS)' IFACELIBS='`sdl-config --libs` -lSDL_image' IFACEINC='`sdl-config --cflags` -I./sdl' else echo "X11 is ENABLED *******************" AC_PATH_X AC_PATH_XTRA IFACEOBJS='$(X11OBJS) $(X11IMAGE)' IFACELIBS='$(XLIBS)' IFACEINC='$(XINC) -I./x11' fi out_lib=${LIBS} dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_UID_T AC_C_INLINE AC_TYPE_MODE_T AC_TYPE_PID_T AC_TYPE_SIZE_T AC_STRUCT_TM AC_TYPE_SIGNAL dnl ---------------------- Checks for library functions ----------------- AC_PROG_GCC_TRADITIONAL AC_FUNC_MEMCMP AC_TYPE_SIGNAL AC_CHECK_FUNCS( getcwd \ mkdir \ putenv \ select \ socket \ seteuid \ unsetenv \ setutent \ atexit ) CFLAGS=${CFLAGS--O} LDFLAGS=${LDFLAGS--O} CPPFLAGS="$CPPFLAGS" AC_SUBST(CFLAGS) AC_SUBST(CPPFLAGS) AC_SUBST(LDFLAGS) AC_SUBST(LIBS) dnl# common parts of the Makefile MCOMMON=./src/Make.common AC_SUBST_FILE(MCOMMON) dnl Some specific OS stuff case "$ARCH" in *hppa*|*hpux*) # do nothing ;; *solaris*) if test "$GCC" = "yes"; then AC_MSG_CHECKING("whether we need -fpermissive") old_cflags="$CFLAGS" CFLAGS="-fpermissive $CFLAGS" AC_TRY_RUN( main() { exit(0); }, if grep 'option `-fpermissive'"'" config.log >/dev/null; then AC_MSG_RESULT(no) CFLAGS="$old_cflags" else CFLAGS="$old_cflags -fpermissive" AC_MSG_RESULT(yes) fi, AC_MSG_RESULT(no) CFLAGS="$old_cflags", AC_MSG_RESULT(no) CFLAGS="$old_cflags") fi ;; *aix*) # do nothing ;; *darwin*) # do nothing ;; *) # do nothing ;; esac AC_CONFIG_HEADER(src/include/config.h) AC_OUTPUT( \ src/Make.common \ src/makefile \ src/include/globals.h \ src/image/makefile \ Makefile) echo "ZINC=" >>src/make.conf echo "ZLIB=" >>src/make.conf echo "ZDEP=" >>src/make.conf echo "PNG=" >>src/make.conf echo "OPNGS=" >>src/make.conf echo "PNGINC=" >>src/make.conf echo "PNGLIB=" >>src/make.conf echo "PNGDEP=" >>src/make.conf echo "PSEUDO=-DPSEUDOCOLOR" >>src/make.conf echo "OPSEUDO=" >>src/make.conf pse="PseudoColor; TrueColor;" echo "XBM=" >>src/make.conf echo "OXBM=" >>src/make.conf xbm="" echo "BMP=" >>src/make.conf echo "OBMP=" >>src/make.conf bmp="" echo "XPM=" >>src/make.conf echo "OXPM=" >>src/make.conf xpm="" echo "PCX=" >>src/make.conf echo "OPCX=" >>src/make.conf pcx="" echo "TGA=" >>src/make.conf echo "OTGA=" >>src/make.conf targa="" echo "TIFF=" >>src/make.conf echo "OTIFF=" >>src/make.conf echo "TLIB=" >>src/make.conf tiff="" echo "PCD=" >>src/make.conf echo "OPCDS=" >>src/make.conf pcd="" echo "--------------- X Welltris Project ----------------------" echo " Configuration: Source code location: ${srcdir} C Compiler: ${CC} C Compiler flags: ${CFLAGS} C++ Compiler: ${CXX} Libraries: ${out_lib} Install path: ${prefix}/bin Man pages path: ${prefix}/man X11 versions: ${X_LIBS} X Visuals: ${pse} Image library: GIF " echo "-----------------------------------------------------------" echo "" echo "Type 'make' for building XWelltris binaries, and after that" echo "do 'make install' as 'root'." echo "" echo "Thank you..." xwelltris-1.0.1/install-sh0100755000175300014110000001273607605543562014125 0ustar leoguys#!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else true fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: chmodcmd="" else instcmd=mkdir fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then true else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else true fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else true fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else true fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else true fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 xwelltris-1.0.1/makedist0100755000175300014110000001552507605543562013647 0ustar leoguys#! /bin/sh #Making distribution for XWELLTRIS #Using this dir as temporary for package creation tmpdir="/tmp" ourname=$0 instdir=usr create_binaries () { #Binary package creation vers="$1" mkdir $tmpdir/xwelltris-$vers echo -n "Copying binaries to "$tmpdir/xwelltris-$vers" directory....." curdir=`pwd` cdr=$curdir cd $tmpdir/xwelltris-$vers mkdir -p $instdir/bin mkdir -p $instdir/doc/xwelltris-$vers mkdir -p $instdir/share/xwelltris cp -f $cdr/xwelltris $instdir/bin/ cp -f $cdr/data/polyomino.dat \ $cdr/data/board2.gif \ $cdr/data/font2.gif \ $cdr/data/topnine.gif \ $cdr/data/wellcuts.gif \ $cdr/data/wellintro.gif \ $instdir/share/xwelltris cp -f $cdr/README \ $cdr/README.keys \ $cdr/AUTHORS \ $cdr/LICENSE \ $cdr/Changelog $instdir/doc/xwelltris-$vers echo "...OK" echo -n "Creating TAR Gzipped $2 package...." tar -cf $curdir/xwelltris-$vers.$2.tar . echo -n "......." gzip $curdir/xwelltris-$vers.$2.tar cd .. echo "....OK" cd $curdir echo -n "Cleaning tmp directory...." rm -rf $tmpdir/xwelltris-$vers echo "OK" echo "Package was created succesfully." echo "" echo "Package name: "$curdir/xwelltris-$vers.$2.tar.gz } create_prompted_binaries () { echo -n "Enter platform: " read platform create_binaries $1 "$platform" } create_binaries_for_rpm () { vers="$1" mkdir $tmpdir/xwelltris-$vers echo -n "Copying all files to "$tmpdir/xwelltris-$vers" directory....." cp -rf * $tmpdir/xwelltris-$vers cp -rf ./.xlaunch $tmpdir/xwelltris-$vers echo "OK" curdir=`pwd` cd $tmpdir/xwelltris-$vers echo -n "Cleaning directories...." ./makebinclean-rpm echo "OK" cd $tmpdir echo -n "Creating TAR Gzipped package for RPM...." tar cf $curdir/xwelltris-$vers.elf.tar xwelltris-$vers echo -n "....." gzip $curdir/xwelltris-$vers.elf.tar echo "....OK" cd $curdir echo -n "Cleaning tmp directory...." rm -rf $tmpdir/xwelltris-$vers echo "OK" echo "Package was created succesfully." echo "Package name: "$curdir/xwelltris-$vers.elf.tar.gz } extract_rpm () { vers="$1" echo "Extracting rpm spec file to 'xwelltris-$vers.spec' from $ourname" a=`grep -n 'RPM Spec File' $ourname | grep -v grep | tr ':' ' ' \ | awk '{print $1}'` b=`wc -l $ourname | awk '{print $1}'` tail -n `expr $b - $a + 1` $ourname | sed \ -e "s/^Version:[^\n]*/Version: $vers/" >xwelltris-$vers.spec } echo "-----------------------------------------------------------------" echo "XWelltris distribution package creator." echo "Welcome to creation script v2.2.4" echo "-----------------------------------------------------------------" echo -n "Enter XWelltris version: " read vers while : do echo "" echo "Choose one of the following:" echo "" echo " 1. Create Linux x86 binaries package.......(Linux.x86.tar.gz)." echo " 2. Create Linux Alpha binaries package.....(Linux.alpha.tar.gz)." echo " 3. Create Linux PPC binaries package.......(Linux.PPC.tar.gz)." echo " 4. Create FreeBSD binaries package.........(FreeBSD.tar.gz)." echo " 5. Create NetBSD x86 binaries package......(NetBSD.x86.tar.gz)." echo " 6. Create OpenBSD x86 binaries package.....(OpenBSD.x86.tar.gz)." echo " 7. Create Solaris x86 binaries package.....(Solaris.x86.tar.gz)." echo " 8. Create Solaris SPARC binaries package...(Solaris.SPARC.tar.gz)." echo " 9. Create AIX binaries package.............(AIX.tar.gz)." echo " 10. Create HP-UX binaries package...........(HP-UX.tar.gz)." echo " 11. Create DUNIX (OSF1) binaries package....(DUnix.tar.gz)." echo " 12. Create IRIX binaries package............(IRIX.tar.gz)." echo " 13. Create QNX binaries package.............(QNX.tar.gz)." echo " 14. Create prompted binaries package." echo "" echo " 19. Extract RPM spec file...................(xwelltris-$vers.spec)." echo "" echo " 0. Exit" echo "" echo -n "Your choice: " read choice case "$choice" in 1) create_binaries "$vers" "Linux.x86";; 2) create_binaries "$vers" "Linux.alpha";; 3) create_binaries "$vers" "Linux.PPC";; 4) create_binaries "$vers" "FreeBSD";; 5) create_binaries "$vers" "NetBSD.x86";; 6) create_binaries "$vers" "OpenBSD.x86";; 7) create_binaries "$vers" "Solaris.x86";; 8) create_binaries "$vers" "Solaris.SPARC";; 9) create_binaries "$vers" "AIX";; 10) create_binaries "$vers" "HP-UX";; 11) create_binaries "$vers" "DUnix";; 12) create_binaries "$vers" "IRIX";; 13) create_binaries "$vers" "QNX";; 14) create_prompted_binaries "$vers";; 19) extract_rpm "$vers";; 0) exit 0;; esac done echo "-----------------------------------------------------------------" exit #----------------------Cut from this line------------------------------- #---------------RPM Spec File for XWelltris-------------------- %define prefix /usr Summary: XWelltris - a tetris like popular game for X Window Name: xwelltris Version: Release: 1 Copyright: GPL Packager: Leonid Khramov Group: X11/Applications Source0: %{name}-%{version}.src.tar.gz #Icon: BuildRoot: /tmp/%{name}-%{version}-root %description This is a small tetris like game for X Window. Imaging that you are looking into the glass from the top. You see four walls and the bottom. The flat 2d figures falling down from the walls one by one. You can move these figures from one wall to another or rotate them... %prep %setup %build CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure \ --prefix=%{prefix} --with-x make %install rm -rf $RPM_BUILD_ROOT install -d "$RPM_BUILD_ROOT"/%{prefix}/{bin,share/xwelltris} install xwelltris "$RPM_BUILD_ROOT"/%{prefix}/bin mkdir -p "$RPM_BUILD_ROOT"/etc/X11/wmconfig cat > "$RPM_BUILD_ROOT"/etc/X11/wmconfig/xwelltris < $RPM_BUILD_DIR/file.list-%{name}-%{version} echo "%attr(-,root,root) %doc README README.keys AUTHORS LICENSE Changelog" \ >> $RPM_BUILD_DIR/file.list-%{name}-%{version} %clean rm -rf $RPM_BUILD_ROOT rm -f ../file.list-%{name}-%{version} %files -f ../file.list-%{name}-%{version} xwelltris-1.0.1/src/0040755000175300014110000000000007642314524012675 5ustar leoguysxwelltris-1.0.1/src/image/0040755000175300014110000000000007642314523013756 5ustar leoguysxwelltris-1.0.1/src/image/convert.cxx0100644000175300014110000006700607605543562016176 0ustar leoguys #define JPEG_IMAGES #include "picinfo.h" #include "accel.h" static int im_check_for_small_amount_of_colors(PICINFO& pic, int max_colors, byte* pic8_buf) { unsigned long colors[256],color; int i, num_color, j; byte *p, *pix; if (max_colors>256) max_colors = 256; num_color = 0; for (i=pic.w*pic.h,p=pic.pic; i>0; i--) { //construct RGB 24 bit color color = (((u_long) *p++) << 16); color += (((u_long) *p++) << 8); color += *p++; for(j=0;j goto next pixel continue; if (num_color >= max_colors) return 0; colors[num_color++]=color; } //Now convert pixmap with our pallete for (i=pic.w*pic.h,p=pic.pic,pix=pic8_buf; i>0; i--,pix++) { color = (((u_long) *p++) << 16); color += (((u_long) *p++) << 8); color += *p++; for(j=0;j>16; pic.pal[i*3+1] = (colors[i]>>8) & 0xff; pic.pal[i*3+2] = colors[i] & 0xff; } pic.pic=pic8_buf; return 1; } static int slow_quant(byte* pic24, int w, int h, byte* pic8, byte* rm,byte *gm,byte *bm, int max_colors); static int im_do_convertion_to_num_colors(PICINFO& pic, int max_colors, byte* pic8_buf) { byte *redmap,*greenmap,*bluemap; int i; redmap= new byte[256]; greenmap= new byte[256]; bluemap= new byte[256]; slow_quant(pic.pic,pic.w,pic.h,pic8_buf, redmap, greenmap, bluemap, max_colors); for(i=0;i 0) { /* get pixel value and index into the histogram */ histp = & histogram[pic24[0] >> C0_SHIFT] [pic24[1] >> C1_SHIFT] [pic24[2] >> C2_SHIFT]; /* increment, check for overflow and undo increment if so. */ if (++(*histp) <= 0) (*histp)--; pic24 += 3; } } static boxptr find_biggest_color_pop (boxptr boxlist, int numboxes) { register boxptr boxp; register int i; register long maxc = 0; boxptr which = NULL; for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) { if (boxp->colorcount > maxc && boxp->volume > 0) { which = boxp; maxc = boxp->colorcount; } } return which; } static boxptr find_biggest_volume (boxptr boxlist, int numboxes) { register boxptr boxp; register int i; register INT32 maxv = 0; boxptr which = NULL; for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) { if (boxp->volume > maxv) { which = boxp; maxv = boxp->volume; } } return which; } static void update_box (boxptr boxp) { hist2d * histogram = sl_histogram; histptr histp; int c0,c1,c2; int c0min,c0max,c1min,c1max,c2min,c2max; INT32 dist0,dist1,dist2; long ccount; c0min = boxp->c0min; c0max = boxp->c0max; c1min = boxp->c1min; c1max = boxp->c1max; c2min = boxp->c2min; c2max = boxp->c2max; if (c0max > c0min) for (c0 = c0min; c0 <= c0max; c0++) for (c1 = c1min; c1 <= c1max; c1++) { histp = & histogram[c0][c1][c2min]; for (c2 = c2min; c2 <= c2max; c2++) if (*histp++ != 0) { boxp->c0min = c0min = c0; goto have_c0min; } } have_c0min: if (c0max > c0min) for (c0 = c0max; c0 >= c0min; c0--) for (c1 = c1min; c1 <= c1max; c1++) { histp = & histogram[c0][c1][c2min]; for (c2 = c2min; c2 <= c2max; c2++) if (*histp++ != 0) { boxp->c0max = c0max = c0; goto have_c0max; } } have_c0max: if (c1max > c1min) for (c1 = c1min; c1 <= c1max; c1++) for (c0 = c0min; c0 <= c0max; c0++) { histp = & histogram[c0][c1][c2min]; for (c2 = c2min; c2 <= c2max; c2++) if (*histp++ != 0) { boxp->c1min = c1min = c1; goto have_c1min; } } have_c1min: if (c1max > c1min) for (c1 = c1max; c1 >= c1min; c1--) for (c0 = c0min; c0 <= c0max; c0++) { histp = & histogram[c0][c1][c2min]; for (c2 = c2min; c2 <= c2max; c2++) if (*histp++ != 0) { boxp->c1max = c1max = c1; goto have_c1max; } } have_c1max: if (c2max > c2min) for (c2 = c2min; c2 <= c2max; c2++) for (c0 = c0min; c0 <= c0max; c0++) { histp = & histogram[c0][c1min][c2]; for (c1 = c1min; c1 <= c1max; c1++, histp += HIST_C2_ELEMS) if (*histp != 0) { boxp->c2min = c2min = c2; goto have_c2min; } } have_c2min: if (c2max > c2min) for (c2 = c2max; c2 >= c2min; c2--) for (c0 = c0min; c0 <= c0max; c0++) { histp = & histogram[c0][c1min][c2]; for (c1 = c1min; c1 <= c1max; c1++, histp += HIST_C2_ELEMS) if (*histp != 0) { boxp->c2max = c2max = c2; goto have_c2max; } } have_c2max: dist0 = ((c0max - c0min) << C0_SHIFT) * C0_SCALE; dist1 = ((c1max - c1min) << C1_SHIFT) * C1_SCALE; dist2 = ((c2max - c2min) << C2_SHIFT) * C2_SCALE; boxp->volume = dist0*dist0 + dist1*dist1 + dist2*dist2; ccount = 0; for (c0 = c0min; c0 <= c0max; c0++) for (c1 = c1min; c1 <= c1max; c1++) { histp = & histogram[c0][c1][c2min]; for (c2 = c2min; c2 <= c2max; c2++, histp++) if (*histp != 0) { ccount++; } } boxp->colorcount = ccount; } static int median_cut (boxptr boxlist, int numboxes, int desired_colors) { int n,lb; int c0,c1,c2,cmax; register boxptr b1,b2; while (numboxes < desired_colors) { /* Select box to split. * Current algorithm: by population for first half, then by volume. */ if (numboxes*2 <= desired_colors) { b1 = find_biggest_color_pop(boxlist, numboxes); } else { b1 = find_biggest_volume(boxlist, numboxes); } if (b1 == NULL) /* no splittable boxes left! */ break; b2 = &boxlist[numboxes]; /* where new box will go */ /* Copy the color bounds to the new box. */ b2->c0max = b1->c0max; b2->c1max = b1->c1max; b2->c2max = b1->c2max; b2->c0min = b1->c0min; b2->c1min = b1->c1min; b2->c2min = b1->c2min; /* Choose which axis to split the box on. */ c0 = ((b1->c0max - b1->c0min) << C0_SHIFT) * C0_SCALE; c1 = ((b1->c1max - b1->c1min) << C1_SHIFT) * C1_SCALE; c2 = ((b1->c2max - b1->c2min) << C2_SHIFT) * C2_SCALE; cmax = c1; n = 1; if (c0 > cmax) { cmax = c0; n = 0; } if (c2 > cmax) { n = 2; } switch (n) { case 0: lb = (b1->c0max + b1->c0min) / 2; b1->c0max = lb; b2->c0min = lb+1; break; case 1: lb = (b1->c1max + b1->c1min) / 2; b1->c1max = lb; b2->c1min = lb+1; break; case 2: lb = (b1->c2max + b1->c2min) / 2; b1->c2max = lb; b2->c2min = lb+1; break; } /* Update stats for boxes */ update_box(b1); update_box(b2); numboxes++; } return numboxes; } static void compute_color (boxptr boxp,int icolor) { /* Current algorithm: mean weighted by pixels (not colors) */ /* Note it is important to get the rounding correct! */ hist2d * histogram = sl_histogram; histptr histp; int c0,c1,c2; int c0min,c0max,c1min,c1max,c2min,c2max; long count; long total = 0; long c0total = 0; long c1total = 0; long c2total = 0; c0min = boxp->c0min; c0max = boxp->c0max; c1min = boxp->c1min; c1max = boxp->c1max; c2min = boxp->c2min; c2max = boxp->c2max; for (c0 = c0min; c0 <= c0max; c0++) for (c1 = c1min; c1 <= c1max; c1++) { histp = & histogram[c0][c1][c2min]; for (c2 = c2min; c2 <= c2max; c2++) { if ((count = *histp++) != 0) { total += count; c0total += ((c0 << C0_SHIFT) + ((1<>1)) * count; c1total += ((c1 << C1_SHIFT) + ((1<>1)) * count; c2total += ((c2 << C2_SHIFT) + ((1<>1)) * count; } } } sl_colormap[0][icolor] = (JSAMPLE) ((c0total + (total>>1)) / total); sl_colormap[1][icolor] = (JSAMPLE) ((c1total + (total>>1)) / total); sl_colormap[2][icolor] = (JSAMPLE) ((c2total + (total>>1)) / total); } static void slow_select_colors (int descolors) /* Master routine for color selection */ { box boxlist[MAXNUMCOLORS]; int numboxes; int i; /* Initialize one box containing whole space */ numboxes = 1; boxlist[0].c0min = 0; boxlist[0].c0max = 255 >> C0_SHIFT; boxlist[0].c1min = 0; boxlist[0].c1max = 255 >> C1_SHIFT; boxlist[0].c2min = 0; boxlist[0].c2max = 255 >> C2_SHIFT; /* Shrink it to actually-used volume and set its statistics */ update_box(& boxlist[0]); /* Perform median-cut to produce final box list */ numboxes = median_cut(boxlist, numboxes, descolors); /* Compute the representative color for each box, fill colormap */ for (i = 0; i < numboxes; i++) compute_color(& boxlist[i], i); sl_num_colors = numboxes; } /* log2(histogram cells in update box) for each axis; this can be adjusted */ #define BOX_C0_LOG (HIST_C0_BITS-3) #define BOX_C1_LOG (HIST_C1_BITS-3) #define BOX_C2_LOG (HIST_C2_BITS-3) #define BOX_C0_ELEMS (1<> 1; maxc1 = minc1 + ((1 << BOX_C1_SHIFT) - (1 << C1_SHIFT)); centerc1 = (minc1 + maxc1) >> 1; maxc2 = minc2 + ((1 << BOX_C2_SHIFT) - (1 << C2_SHIFT)); centerc2 = (minc2 + maxc2) >> 1; minmaxdist = 0x7FFFFFFFL; for (i = 0; i < numcolors; i++) { /* We compute the squared-c0-distance term, then add in the other two. */ x = sl_colormap[0][i]; if (x < minc0) { tdist = (x - minc0) * C0_SCALE; min_dist = tdist*tdist; tdist = (x - maxc0) * C0_SCALE; max_dist = tdist*tdist; } else if (x > maxc0) { tdist = (x - maxc0) * C0_SCALE; min_dist = tdist*tdist; tdist = (x - minc0) * C0_SCALE; max_dist = tdist*tdist; } else { /* within cell range so no contribution to min_dist */ min_dist = 0; if (x <= centerc0) { tdist = (x - maxc0) * C0_SCALE; max_dist = tdist*tdist; } else { tdist = (x - minc0) * C0_SCALE; max_dist = tdist*tdist; } } x = sl_colormap[1][i]; if (x < minc1) { tdist = (x - minc1) * C1_SCALE; min_dist += tdist*tdist; tdist = (x - maxc1) * C1_SCALE; max_dist += tdist*tdist; } else if (x > maxc1) { tdist = (x - maxc1) * C1_SCALE; min_dist += tdist*tdist; tdist = (x - minc1) * C1_SCALE; max_dist += tdist*tdist; } else { /* within cell range so no contribution to min_dist */ if (x <= centerc1) { tdist = (x - maxc1) * C1_SCALE; max_dist += tdist*tdist; } else { tdist = (x - minc1) * C1_SCALE; max_dist += tdist*tdist; } } x = sl_colormap[2][i]; if (x < minc2) { tdist = (x - minc2) * C2_SCALE; min_dist += tdist*tdist; tdist = (x - maxc2) * C2_SCALE; max_dist += tdist*tdist; } else if (x > maxc2) { tdist = (x - maxc2) * C2_SCALE; min_dist += tdist*tdist; tdist = (x - minc2) * C2_SCALE; max_dist += tdist*tdist; } else { /* within cell range so no contribution to min_dist */ if (x <= centerc2) { tdist = (x - maxc2) * C2_SCALE; max_dist += tdist*tdist; } else { tdist = (x - minc2) * C2_SCALE; max_dist += tdist*tdist; } } mindist[i] = min_dist; /* save away the results */ if (max_dist < minmaxdist) minmaxdist = max_dist; } ncolors = 0; for (i = 0; i < numcolors; i++) { if (mindist[i] <= minmaxdist) colorlist[ncolors++] = (JSAMPLE) i; } return ncolors; } static void find_best_colors (int minc0,int minc1,int minc2,int numcolors, JSAMPLE colorlist[], JSAMPLE bestcolor[]) { int ic0, ic1, ic2; int i, icolor; register INT32 * bptr; /* pointer into bestdist[] array */ JSAMPLE * cptr; /* pointer into bestcolor[] array */ INT32 dist0, dist1; /* initial distance values */ register INT32 dist2; /* current distance in inner loop */ INT32 xx0, xx1; /* distance increments */ register INT32 xx2; INT32 inc0, inc1, inc2; /* initial values for increments */ /* This array holds the distance to the nearest-so-far color for each cell */ INT32 bestdist[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS]; /* Initialize best-distance for each cell of the update box */ bptr = bestdist; for (i = BOX_C0_ELEMS*BOX_C1_ELEMS*BOX_C2_ELEMS-1; i >= 0; i--) *bptr++ = 0x7FFFFFFFL; /* Nominal steps between cell centers ("x" in Thomas article) */ #define STEP_C0 ((1 << C0_SHIFT) * C0_SCALE) #define STEP_C1 ((1 << C1_SHIFT) * C1_SCALE) #define STEP_C2 ((1 << C2_SHIFT) * C2_SCALE) for (i = 0; i < numcolors; i++) { icolor = colorlist[i]; /* Compute (square of) distance from minc0/c1/c2 to this color */ inc0 = (minc0 - (int) sl_colormap[0][icolor]) * C0_SCALE; dist0 = inc0*inc0; inc1 = (minc1 - (int) sl_colormap[1][icolor]) * C1_SCALE; dist0 += inc1*inc1; inc2 = (minc2 - (int) sl_colormap[2][icolor]) * C2_SCALE; dist0 += inc2*inc2; /* Form the initial difference increments */ inc0 = inc0 * (2 * STEP_C0) + STEP_C0 * STEP_C0; inc1 = inc1 * (2 * STEP_C1) + STEP_C1 * STEP_C1; inc2 = inc2 * (2 * STEP_C2) + STEP_C2 * STEP_C2; /* Now loop over all cells in box, updating distance per Thomas method */ bptr = bestdist; cptr = bestcolor; xx0 = inc0; for (ic0 = BOX_C0_ELEMS-1; ic0 >= 0; ic0--) { dist1 = dist0; xx1 = inc1; for (ic1 = BOX_C1_ELEMS-1; ic1 >= 0; ic1--) { dist2 = dist1; xx2 = inc2; for (ic2 = BOX_C2_ELEMS-1; ic2 >= 0; ic2--) { if (dist2 < *bptr) { *bptr = dist2; *cptr = (JSAMPLE) icolor; } dist2 += xx2; xx2 += 2 * STEP_C2 * STEP_C2; bptr++; cptr++; } dist1 += xx1; xx1 += 2 * STEP_C1 * STEP_C1; } dist0 += xx0; xx0 += 2 * STEP_C0 * STEP_C0; } } } static void fill_inverse_cmap (int c0, int c1, int c2) { hist2d * histogram = sl_histogram; int minc0, minc1, minc2; /* lower left corner of update box */ int ic0, ic1, ic2; register JSAMPLE * cptr; /* pointer into bestcolor[] array */ register histptr cachep; /* pointer into main cache array */ /* This array lists the candidate colormap indexes. */ JSAMPLE colorlist[MAXNUMCOLORS]; int numcolors; /* number of candidate colors */ /* This array holds the actually closest colormap index for each cell. */ JSAMPLE bestcolor[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS]; /* Convert cell coordinates to update box ID */ c0 >>= BOX_C0_LOG; c1 >>= BOX_C1_LOG; c2 >>= BOX_C2_LOG; minc0 = (c0 << BOX_C0_SHIFT) + ((1 << C0_SHIFT) >> 1); minc1 = (c1 << BOX_C1_SHIFT) + ((1 << C1_SHIFT) >> 1); minc2 = (c2 << BOX_C2_SHIFT) + ((1 << C2_SHIFT) >> 1); numcolors = find_nearby_colors(minc0, minc1, minc2, colorlist); /* Determine the actually nearest colors. */ find_best_colors(minc0, minc1, minc2, numcolors, colorlist, bestcolor); /* Save the best color numbers (plus 1) in the main cache array */ c0 <<= BOX_C0_LOG; /* convert ID back to base cell indexes */ c1 <<= BOX_C1_LOG; c2 <<= BOX_C2_LOG; cptr = bestcolor; for (ic0 = 0; ic0 < BOX_C0_ELEMS; ic0++) { for (ic1 = 0; ic1 < BOX_C1_ELEMS; ic1++) { cachep = & histogram[c0+ic0][c1+ic1][c2]; for (ic2 = 0; ic2 < BOX_C2_ELEMS; ic2++) { *cachep++ = (histcell) (*cptr++ + 1); } } } } static void slow_map_pixels (byte *pic24,int width,int height, byte* pic8) { register LOCFSERROR cur0, cur1, cur2; /* current error or pixel value */ LOCFSERROR belowerr0, belowerr1, belowerr2; /* error for pixel below cur */ LOCFSERROR bpreverr0, bpreverr1, bpreverr2; /* error for below/prev col */ register FSERRPTR errorptr; /* => fserrors[] at column before current */ JSAMPROW inptr; /* => current input pixel */ JSAMPROW outptr; /* => current output pixel */ histptr cachep; int dir; /* +1 or -1 depending on direction */ int dir3; /* 3*dir, for advancing inptr & errorptr */ int row, col; int *error_limit = sl_error_limiter; JSAMPROW colormap0 = sl_colormap[0]; JSAMPROW colormap1 = sl_colormap[1]; JSAMPROW colormap2 = sl_colormap[2]; hist2d * histogram = sl_histogram; for (row = 0; row < height; row++) { /* if ((row&0x3f) == 0) WaitCursor(); ProgressMeter(0, height-1, row, "Dither");*/ inptr = & pic24[row * width * 3]; outptr = & pic8[row * width]; if (sl_on_odd_row) { /* work right to left in this row */ inptr += (width-1) * 3; /* so point to rightmost pixel */ outptr += width-1; dir = -1; dir3 = -3; errorptr = sl_fserrors + (width+1)*3; /* => entry after last column */ sl_on_odd_row = FALSE; /* flip for next time */ } else { /* work left to right in this row */ dir = 1; dir3 = 3; errorptr = sl_fserrors; /* => entry before first real column */ sl_on_odd_row = TRUE; /* flip for next time */ } /* Preset error values: no error propagated to first pixel from left */ cur0 = cur1 = cur2 = 0; /* and no error propagated to row below yet */ belowerr0 = belowerr1 = belowerr2 = 0; bpreverr0 = bpreverr1 = bpreverr2 = 0; for (col = width; col > 0; col--) { cur0 = (cur0 + errorptr[dir3+0] + 8) >> 4; cur1 = (cur1 + errorptr[dir3+1] + 8) >> 4; cur2 = (cur2 + errorptr[dir3+2] + 8) >> 4; cur0 = error_limit[cur0]; cur1 = error_limit[cur1]; cur2 = error_limit[cur2]; cur0 += inptr[0]; cur1 += inptr[1]; cur2 += inptr[2]; RANGE(cur0, 0, 255); RANGE(cur1, 0, 255); RANGE(cur2, 0, 255); /* Index into the cache with adjusted pixel value */ cachep = & histogram[cur0>>C0_SHIFT][cur1>>C1_SHIFT][cur2>>C2_SHIFT]; /* If we have not seen this color before, find nearest colormap */ /* entry and update the cache */ if (*cachep == 0) fill_inverse_cmap(cur0>>C0_SHIFT, cur1>>C1_SHIFT, cur2>>C2_SHIFT); /* Now emit the colormap index for this cell */ { register int pixcode = *cachep - 1; *outptr = (JSAMPLE) pixcode; /* Compute representation error for this pixel */ cur0 -= (int) colormap0[pixcode]; cur1 -= (int) colormap1[pixcode]; cur2 -= (int) colormap2[pixcode]; } /* Compute error fractions to be propagated to adjacent pixels. * Add these into the running sums, and simultaneously shift the * next-line error sums left by 1 column. */ { register LOCFSERROR bnexterr, delta; bnexterr = cur0; /* Process component 0 */ delta = cur0 * 2; cur0 += delta; /* form error * 3 */ errorptr[0] = (FSERROR) (bpreverr0 + cur0); cur0 += delta; /* form error * 5 */ bpreverr0 = belowerr0 + cur0; belowerr0 = bnexterr; cur0 += delta; /* form error * 7 */ bnexterr = cur1; /* Process component 1 */ delta = cur1 * 2; cur1 += delta; /* form error * 3 */ errorptr[1] = (FSERROR) (bpreverr1 + cur1); cur1 += delta; /* form error * 5 */ bpreverr1 = belowerr1 + cur1; belowerr1 = bnexterr; cur1 += delta; /* form error * 7 */ bnexterr = cur2; /* Process component 2 */ delta = cur2 * 2; cur2 += delta; /* form error * 3 */ errorptr[2] = (FSERROR) (bpreverr2 + cur2); cur2 += delta; /* form error * 5 */ bpreverr2 = belowerr2 + cur2; belowerr2 = bnexterr; cur2 += delta; /* form error * 7 */ } /* At this point curN contains the 7/16 error value to be propagated * to the next pixel on the current line, and all the errors for the * next line have been shifted over. We are therefore ready to move on. */ inptr += dir3; /* Advance pixel pointers to next column */ outptr += dir; errorptr += dir3; /* advance errorptr to current column */ } /* Post-loop cleanup: we must unload the final error values into the * final fserrors[] entry. Note we need not unload belowerrN because * it is for the dummy column before or after the actual array. */ errorptr[0] = (FSERROR) bpreverr0; /* unload prev errs into array */ errorptr[1] = (FSERROR) bpreverr1; errorptr[2] = (FSERROR) bpreverr2; } } static void init_error_limit () /* Allocate and fill in the error_limiter table */ /* Note this should be done only once. */ { int * table; int in, out; table = (int *) malloc((size_t) ((255*2+1) * sizeof(int))); if (! table) return; table += 255; /* so can index -255 .. +255 */ sl_error_limiter = table; #define STEPSIZE ((255+1)/16) /* Map errors 1:1 up to +- 255/16 */ out = 0; for (in = 0; in < STEPSIZE; in++, out++) { table[in] = out; table[-in] = -out; } /* Map errors 1:2 up to +- 3*255/16 */ for (; in < STEPSIZE*3; in++, out += (in&1) ? 0 : 1) { table[in] = out; table[-in] = -out; } /* Clamp the rest to final out value (which is (255+1)/8) */ for (; in <= 255; in++) { table[in] = out; table[-in] = -out; } #undef STEPSIZE } xwelltris-1.0.1/src/image/accel.c0100644000175300014110000000444407605543562015202 0ustar leoguys/**************************************************************************** * Copyright (C) 1996 by Leo Khramov * email: old@sunct2.jinr.dubna.su * * 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. ****************************************************************************/ #include "accel.h" #include char *imd; void (*im_coding)(unsigned int,unsigned int,unsigned int,char**); void im_truetruecoding(unsigned int ir,unsigned int ig,unsigned int ib,char **imdata) { int j; imd=*imdata; ir>>=red_rsh; ir<<=red_lsh; ig>>=green_rsh; ig<<=green_lsh; ib>>=blue_rsh; ib<<=blue_lsh; ir=ir | ig | ib; imd+=bdep; for(j=0;j>=8; } (*imdata)+=bdep; } void im_truenocoding(unsigned int ir,unsigned int ig,unsigned int ib,char **imdata) { *((*imdata)++)=ir&0xff; *((*imdata)++)=ig&0xff; *((*imdata)++)=ib&0xff; } char *im_alloc_true(int l,int h) { if (bdep == 1) { l *= 3; } else { l *= bdep; if (l % b_pad) l += b_pad - l % b_pad; } return (char*) malloc(l*h); } void im_setzero(char* s,int len) { for ( ; len>0; len--) *s++ = 0; } void im_memcopy(char *src, char* dest, int len) { if (src==dest || len<=0) return; /* nothin' to do */ if (srcdest) { /* do backward copy */ src = src + len - 1; dest = dest + len - 1; for ( ; len>0; len--, src--, dest--) *dest = *src; } else { for ( ; len>0; len--, src++, dest++) *dest = *src; } } extern int vclass; unsigned int im_get_linew_true(unsigned int w) { unsigned line_w; if(vclass==TrueColor) { line_w = w * bdep; if (line_w % b_pad) line_w += b_pad - line_w % b_pad; } else line_w=w*3; //24 bit non-converted images in PseudoColor before convertion. return line_w; } xwelltris-1.0.1/src/image/accel.h0100644000175300014110000000155207605543562015204 0ustar leoguys#ifndef ACCEL_H #define ACCEL_H #include extern int depth,bdep,b_pad,translation; extern unsigned int rmask,gmask,bmask,rsh,bsh,gsh; extern unsigned int red_rsh,green_rsh,blue_rsh,red_lsh,green_lsh,blue_lsh; #ifdef __cplusplus extern "C" char *im_alloc_true(int l,int h); extern "C" void im_memcopy(char*,char*,int); extern "C" void im_setzero(char*,int); extern "C" unsigned int im_get_linew_true(unsigned int w); #else extern char *im_alloc_true(int l,int h); extern void im_memcopy(char*,char*,int); extern void im_setzero(char*,int); #endif extern void (*im_coding)(unsigned int,unsigned int,unsigned int,char**); extern void im_truetruecoding(unsigned int ir,unsigned int ig,unsigned int ib,char **imdata); extern void im_truenocoding(unsigned int ir,unsigned int ig,unsigned int ib,char **imdata); #endif /* ------------ End of file -------------- */ xwelltris-1.0.1/src/image/sublib/0040755000175300014110000000000007642314523015236 5ustar leoguysxwelltris-1.0.1/src/image/sublib/IMG_gif.c0100644000175300014110000003416007605543562016652 0ustar leoguys/* SDL_image: An example image loading library for use with SDL Copyright (C) 1999, 2000, 2001 Sam Lantinga This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Sam Lantinga slouken@libsdl.org */ /* $Id: IMG_gif.c,v 1.1.1.1 2003/01/04 11:37:22 leo Exp $ */ /* This is a GIF image file loading framework */ #include #include #include "SDL_image.h" #define LOAD_GIF #ifdef LOAD_GIF /* See if an image is contained in a data source */ int IMG_isGIF(SDL_RWops *src) { int is_GIF; char magic[6]; is_GIF = 0; if ( SDL_RWread(src, magic, 6, 1) ) { if ( (strncmp(magic, "GIF", 3) == 0) && ((memcmp(magic + 3, "87a", 3) == 0) || (memcmp(magic + 3, "89a", 3) == 0)) ) { is_GIF = 1; } } return(is_GIF); } /* Code from here to end of file has been adapted from XPaint: */ /* +-------------------------------------------------------------------+ */ /* | Copyright 1990, 1991, 1993 David Koblas. | */ /* | Copyright 1996 Torsten Martinsen. | */ /* | Permission to use, copy, modify, and distribute this software | */ /* | and its documentation for any purpose and without fee is hereby | */ /* | granted, provided that the above copyright notice appear in all | */ /* | copies and that both that copyright notice and this permission | */ /* | notice appear in supporting documentation. This software is | */ /* | provided "as is" without express or implied warranty. | */ /* +-------------------------------------------------------------------+ */ /* Adapted for use in SDL by Sam Lantinga -- 7/20/98 */ #define USED_BY_SDL #include #include #ifdef USED_BY_SDL /* Changes to work with SDL: Include SDL header file Use SDL_Surface rather than xpaint Image structure Define SDL versions of RWSetMsg(), ImageNewCmap() and ImageSetCmap() */ #include "SDL.h" #define Image SDL_Surface #define RWSetMsg IMG_SetError #define ImageNewCmap(w, h, s) SDL_AllocSurface(SDL_SWSURFACE,w,h,8,0,0,0,0) #define ImageSetCmap(s, i, R, G, B) do { \ s->format->palette->colors[i].r = R; \ s->format->palette->colors[i].g = G; \ s->format->palette->colors[i].b = B; \ } while (0) /* * * * * */ #else /* Original XPaint sources */ #include "image.h" #include "rwTable.h" #define SDL_RWops FILE #define SDL_RWclose fclose #endif /* USED_BY_SDL */ #define MAXCOLORMAPSIZE 256 #define TRUE 1 #define FALSE 0 #define CM_RED 0 #define CM_GREEN 1 #define CM_BLUE 2 #define MAX_LWZ_BITS 12 #define INTERLACE 0x40 #define LOCALCOLORMAP 0x80 #define BitSet(byte, bit) (((byte) & (bit)) == (bit)) #define ReadOK(file,buffer,len) SDL_RWread(file, buffer, len, 1) #define LM_to_uint(a,b) (((b)<<8)|(a)) static struct { unsigned int Width; unsigned int Height; unsigned char ColorMap[3][MAXCOLORMAPSIZE]; unsigned int BitPixel; unsigned int ColorResolution; unsigned int Background; unsigned int AspectRatio; int GrayScale; } GifScreen; static struct { int transparent; int delayTime; int inputFlag; int disposal; } Gif89; static int ReadColorMap(SDL_RWops * src, int number, unsigned char buffer[3][MAXCOLORMAPSIZE], int *flag); static int DoExtension(SDL_RWops * src, int label); static int GetDataBlock(SDL_RWops * src, unsigned char *buf); static int GetCode(SDL_RWops * src, int code_size, int flag); static int LWZReadByte(SDL_RWops * src, int flag, int input_code_size); static Image *ReadImage(SDL_RWops * src, int len, int height, int, unsigned char cmap[3][MAXCOLORMAPSIZE], int gray, int interlace, int ignore); Image * IMG_LoadGIF_RW(SDL_RWops *src) { unsigned char buf[16]; unsigned char c; unsigned char localColorMap[3][MAXCOLORMAPSIZE]; int grayScale; int useGlobalColormap; int bitPixel; int imageCount = 0; char version[4]; int imageNumber = 1; Image *image = NULL; if ( src == NULL ) { goto done; } if (!ReadOK(src, buf, 6)) { RWSetMsg("error reading magic number"); goto done; } if (strncmp((char *) buf, "GIF", 3) != 0) { RWSetMsg("not a GIF file"); goto done; } strncpy(version, (char *) buf + 3, 3); version[3] = '\0'; if ((strcmp(version, "87a") != 0) && (strcmp(version, "89a") != 0)) { RWSetMsg("bad version number, not '87a' or '89a'"); goto done; } Gif89.transparent = -1; Gif89.delayTime = -1; Gif89.inputFlag = -1; Gif89.disposal = 0; if (!ReadOK(src, buf, 7)) { RWSetMsg("failed to read screen descriptor"); goto done; } GifScreen.Width = LM_to_uint(buf[0], buf[1]); GifScreen.Height = LM_to_uint(buf[2], buf[3]); GifScreen.BitPixel = 2 << (buf[4] & 0x07); GifScreen.ColorResolution = (((buf[4] & 0x70) >> 3) + 1); GifScreen.Background = buf[5]; GifScreen.AspectRatio = buf[6]; if (BitSet(buf[4], LOCALCOLORMAP)) { /* Global Colormap */ if (ReadColorMap(src, GifScreen.BitPixel, GifScreen.ColorMap, &GifScreen.GrayScale)) { RWSetMsg("error reading global colormap"); goto done; } } do { if (!ReadOK(src, &c, 1)) { RWSetMsg("EOF / read error on image data"); goto done; } if (c == ';') { /* GIF terminator */ if (imageCount < imageNumber) { RWSetMsg("only %d image%s found in file", imageCount, imageCount > 1 ? "s" : ""); goto done; } } if (c == '!') { /* Extension */ if (!ReadOK(src, &c, 1)) { RWSetMsg("EOF / read error on extention function code"); goto done; } DoExtension(src, c); continue; } if (c != ',') { /* Not a valid start character */ continue; } ++imageCount; if (!ReadOK(src, buf, 9)) { RWSetMsg("couldn't read left/top/width/height"); goto done; } useGlobalColormap = !BitSet(buf[8], LOCALCOLORMAP); bitPixel = 1 << ((buf[8] & 0x07) + 1); if (!useGlobalColormap) { if (ReadColorMap(src, bitPixel, localColorMap, &grayScale)) { RWSetMsg("error reading local colormap"); goto done; } image = ReadImage(src, LM_to_uint(buf[4], buf[5]), LM_to_uint(buf[6], buf[7]), bitPixel, localColorMap, grayScale, BitSet(buf[8], INTERLACE), imageCount != imageNumber); } else { image = ReadImage(src, LM_to_uint(buf[4], buf[5]), LM_to_uint(buf[6], buf[7]), GifScreen.BitPixel, GifScreen.ColorMap, GifScreen.GrayScale, BitSet(buf[8], INTERLACE), imageCount != imageNumber); } } while (image == NULL); #ifdef USED_BY_SDL if ( Gif89.transparent >= 0 ) { SDL_SetColorKey(image, SDL_SRCCOLORKEY, Gif89.transparent); } #endif done: return image; } static int ReadColorMap(SDL_RWops *src, int number, unsigned char buffer[3][MAXCOLORMAPSIZE], int *gray) { int i; unsigned char rgb[3]; int flag; flag = TRUE; for (i = 0; i < number; ++i) { if (!ReadOK(src, rgb, sizeof(rgb))) { RWSetMsg("bad colormap"); return 1; } buffer[CM_RED][i] = rgb[0]; buffer[CM_GREEN][i] = rgb[1]; buffer[CM_BLUE][i] = rgb[2]; flag &= (rgb[0] == rgb[1] && rgb[1] == rgb[2]); } #if 0 if (flag) *gray = (number == 2) ? PBM_TYPE : PGM_TYPE; else *gray = PPM_TYPE; #else *gray = 0; #endif return FALSE; } static int DoExtension(SDL_RWops *src, int label) { static unsigned char buf[256]; char *str; switch (label) { case 0x01: /* Plain Text Extension */ str = "Plain Text Extension"; break; case 0xff: /* Application Extension */ str = "Application Extension"; break; case 0xfe: /* Comment Extension */ str = "Comment Extension"; while (GetDataBlock(src, (unsigned char *) buf) != 0); return FALSE; case 0xf9: /* Graphic Control Extension */ str = "Graphic Control Extension"; (void) GetDataBlock(src, (unsigned char *) buf); Gif89.disposal = (buf[0] >> 2) & 0x7; Gif89.inputFlag = (buf[0] >> 1) & 0x1; Gif89.delayTime = LM_to_uint(buf[1], buf[2]); if ((buf[0] & 0x1) != 0) Gif89.transparent = buf[3]; while (GetDataBlock(src, (unsigned char *) buf) != 0); return FALSE; default: str = (char *)buf; sprintf(str, "UNKNOWN (0x%02x)", label); break; } while (GetDataBlock(src, (unsigned char *) buf) != 0); return FALSE; } static int ZeroDataBlock = FALSE; static int GetDataBlock(SDL_RWops *src, unsigned char *buf) { unsigned char count; if (!ReadOK(src, &count, 1)) { /* pm_message("error in getting DataBlock size" ); */ return -1; } ZeroDataBlock = count == 0; if ((count != 0) && (!ReadOK(src, buf, count))) { /* pm_message("error in reading DataBlock" ); */ return -1; } return count; } static int GetCode(SDL_RWops *src, int code_size, int flag) { static unsigned char buf[280]; static int curbit, lastbit, done, last_byte; int i, j, ret; unsigned char count; if (flag) { curbit = 0; lastbit = 0; done = FALSE; return 0; } if ((curbit + code_size) >= lastbit) { if (done) { if (curbit >= lastbit) RWSetMsg("ran off the end of my bits"); return -1; } buf[0] = buf[last_byte - 2]; buf[1] = buf[last_byte - 1]; if ((count = GetDataBlock(src, &buf[2])) == 0) done = TRUE; last_byte = 2 + count; curbit = (curbit - lastbit) + 16; lastbit = (2 + count) * 8; } ret = 0; for (i = curbit, j = 0; j < code_size; ++i, ++j) ret |= ((buf[i / 8] & (1 << (i % 8))) != 0) << j; curbit += code_size; return ret; } static int LWZReadByte(SDL_RWops *src, int flag, int input_code_size) { static int fresh = FALSE; int code, incode; static int code_size, set_code_size; static int max_code, max_code_size; static int firstcode, oldcode; static int clear_code, end_code; static int table[2][(1 << MAX_LWZ_BITS)]; static int stack[(1 << (MAX_LWZ_BITS)) * 2], *sp; register int i; if (flag) { set_code_size = input_code_size; code_size = set_code_size + 1; clear_code = 1 << set_code_size; end_code = clear_code + 1; max_code_size = 2 * clear_code; max_code = clear_code + 2; GetCode(src, 0, TRUE); fresh = TRUE; for (i = 0; i < clear_code; ++i) { table[0][i] = 0; table[1][i] = i; } for (; i < (1 << MAX_LWZ_BITS); ++i) table[0][i] = table[1][0] = 0; sp = stack; return 0; } else if (fresh) { fresh = FALSE; do { firstcode = oldcode = GetCode(src, code_size, FALSE); } while (firstcode == clear_code); return firstcode; } if (sp > stack) return *--sp; while ((code = GetCode(src, code_size, FALSE)) >= 0) { if (code == clear_code) { for (i = 0; i < clear_code; ++i) { table[0][i] = 0; table[1][i] = i; } for (; i < (1 << MAX_LWZ_BITS); ++i) table[0][i] = table[1][i] = 0; code_size = set_code_size + 1; max_code_size = 2 * clear_code; max_code = clear_code + 2; sp = stack; firstcode = oldcode = GetCode(src, code_size, FALSE); return firstcode; } else if (code == end_code) { int count; unsigned char buf[260]; if (ZeroDataBlock) return -2; while ((count = GetDataBlock(src, buf)) > 0); if (count != 0) { /* * pm_message("missing EOD in data stream (common occurence)"); */ } return -2; } incode = code; if (code >= max_code) { *sp++ = firstcode; code = oldcode; } while (code >= clear_code) { *sp++ = table[1][code]; if (code == table[0][code]) RWSetMsg("circular table entry BIG ERROR"); code = table[0][code]; } *sp++ = firstcode = table[1][code]; if ((code = max_code) < (1 << MAX_LWZ_BITS)) { table[0][code] = oldcode; table[1][code] = firstcode; ++max_code; if ((max_code >= max_code_size) && (max_code_size < (1 << MAX_LWZ_BITS))) { max_code_size *= 2; ++code_size; } } oldcode = incode; if (sp > stack) return *--sp; } return code; } static Image * ReadImage(SDL_RWops * src, int len, int height, int cmapSize, unsigned char cmap[3][MAXCOLORMAPSIZE], int gray, int interlace, int ignore) { Image *image; unsigned char c; int i, v; int xpos = 0, ypos = 0, pass = 0; /* ** Initialize the compression routines */ if (!ReadOK(src, &c, 1)) { RWSetMsg("EOF / read error on image data"); return NULL; } if (LWZReadByte(src, TRUE, c) < 0) { RWSetMsg("error reading image"); return NULL; } /* ** If this is an "uninteresting picture" ignore it. */ if (ignore) { while (LWZReadByte(src, FALSE, c) >= 0); return NULL; } image = ImageNewCmap(len, height, cmapSize); for (i = 0; i < cmapSize; i++) ImageSetCmap(image, i, cmap[CM_RED][i], cmap[CM_GREEN][i], cmap[CM_BLUE][i]); while ((v = LWZReadByte(src, FALSE, c)) >= 0) { #ifdef USED_BY_SDL ((Uint8 *)image->pixels)[xpos + ypos * image->pitch] = v; #else image->data[xpos + ypos * len] = v; #endif ++xpos; if (xpos == len) { xpos = 0; if (interlace) { switch (pass) { case 0: case 1: ypos += 8; break; case 2: ypos += 4; break; case 3: ypos += 2; break; } if (ypos >= height) { ++pass; switch (pass) { case 1: ypos = 4; break; case 2: ypos = 2; break; case 3: ypos = 1; break; default: goto fini; } } } else { ++ypos; } } if (ypos >= height) break; } fini: return image; } #else /* See if an image is contained in a data source */ int IMG_isGIF(SDL_RWops *src) { return(0); } /* Load a GIF type image from an SDL datasource */ SDL_Surface *IMG_LoadGIF_RW(SDL_RWops *src) { return(NULL); } #endif /* LOAD_GIF */ xwelltris-1.0.1/src/image/sublib/SDL.h0100644000175300014110000000026507605543562016037 0ustar leoguys#ifndef SDL_H #define SDL_H // SDL main header (dummy file) for compatibility #include "SDL_types.h" #include "SDL_error.h" #include "SDL_rwops.h" #include "SDL_video.h" #endif xwelltris-1.0.1/src/image/sublib/SDL_error.c0100644000175300014110000000341107605543562017237 0ustar leoguys/* Copyright (C) 1999, 2000, 2001 Sam Lantinga This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Sam Lantinga slouken@libsdl.org Modified for using with XNC image engine by Leo 26-03-2002. */ #include "SDL.h" /* Very common errors go here */ void SDL_Error(SDL_errorcode code) { switch (code) { case SDL_ENOMEM: SDL_SetError("Out of memory"); break; case SDL_EFREAD: SDL_SetError("Error reading from datastream"); break; case SDL_EFWRITE: SDL_SetError("Error writing to datastream"); break; case SDL_EFSEEK: SDL_SetError("Error seeking in datastream"); break; default: SDL_SetError("Unknown SDL error"); break; } } void SDL_SetError (const char *fmt, ...) { fprintf(stderr, "SDL_error: %s\n",fmt); } void SDL_ClearError(void) { } xwelltris-1.0.1/src/image/sublib/SDL_error.h0100644000175300014110000000333007605543562017244 0ustar leoguys/* SDL - Simple DirectMedia Layer Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Sam Lantinga slouken@devolution.com */ #ifdef SAVE_RCSID static char rcsid = "@(#) $Id: SDL_error.h,v 1.1.1.1 2003/01/04 11:37:22 leo Exp $"; #endif /* Simple error message routines for SDL */ #ifndef _SDL_error_h #define _SDL_error_h #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus extern "C" { #endif /* Public functions */ extern DECLSPEC void SDL_SetError(const char *fmt, ...); extern DECLSPEC char * SDL_GetError(void); extern DECLSPEC void SDL_ClearError(void); /* Private error message function - used internally */ #define SDL_OutOfMemory() SDL_Error(SDL_ENOMEM) typedef enum { SDL_ENOMEM, SDL_EFREAD, SDL_EFWRITE, SDL_EFSEEK, SDL_LASTERROR } SDL_errorcode; extern void SDL_Error(SDL_errorcode code); /* Ends C function definitions when using C++ */ #ifdef __cplusplus } #endif #include "close_code.h" #endif /* _SDL_error_h */ xwelltris-1.0.1/src/image/sublib/SDL_image.h0100644000175300014110000000670507605543562017206 0ustar leoguys/* SDL_image: An example image loading library for use with SDL Copyright (C) 1999, 2000, 2001 Sam Lantinga This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Sam Lantinga slouken@libsdl.org */ /* $Id: SDL_image.h,v 1.1.1.1 2003/01/04 11:37:22 leo Exp $ */ /* A simple library to load images of various formats as SDL surfaces */ #ifndef _IMG_h #define _IMG_h #include "SDL.h" #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus extern "C" { #endif /* Load an image from an SDL data source. The 'type' may be one of: "BMP", "GIF", "PNG", etc. If the image format supports a transparent pixel, SDL will set the colorkey for the surface. You can enable RLE acceleration on the surface afterwards by calling: SDL_SetColorKey(image, SDL_RLEACCEL, image->format->colorkey); */ extern DECLSPEC SDL_Surface *IMG_LoadTyped_RW(SDL_RWops *src, int freesrc, char *type); /* Convenience functions */ extern DECLSPEC SDL_Surface *IMG_Load(const char *file); extern DECLSPEC SDL_Surface *IMG_Load_RW(SDL_RWops *src, int freesrc); /* Invert the alpha of a surface for use with OpenGL This function is now a no-op, and only provided for backwards compatibility. */ extern DECLSPEC int IMG_InvertAlpha(int on); /* Functions to detect a file type, given a seekable source */ extern DECLSPEC int IMG_isBMP(SDL_RWops *src); extern DECLSPEC int IMG_isPNM(SDL_RWops *src); extern DECLSPEC int IMG_isXPM(SDL_RWops *src); extern DECLSPEC int IMG_isXCF(SDL_RWops *src); extern DECLSPEC int IMG_isPCX(SDL_RWops *src); extern DECLSPEC int IMG_isGIF(SDL_RWops *src); extern DECLSPEC int IMG_isJPG(SDL_RWops *src); extern DECLSPEC int IMG_isTIF(SDL_RWops *src); extern DECLSPEC int IMG_isPNG(SDL_RWops *src); extern DECLSPEC int IMG_isLBM(SDL_RWops *src); /* Individual loading functions */ extern DECLSPEC SDL_Surface *IMG_LoadBMP_RW(SDL_RWops *src); extern DECLSPEC SDL_Surface *IMG_LoadPNM_RW(SDL_RWops *src); extern DECLSPEC SDL_Surface *IMG_LoadXPM_RW(SDL_RWops *src); extern DECLSPEC SDL_Surface *IMG_LoadXCF_RW(SDL_RWops *src); extern DECLSPEC SDL_Surface *IMG_LoadPCX_RW(SDL_RWops *src); extern DECLSPEC SDL_Surface *IMG_LoadGIF_RW(SDL_RWops *src); extern DECLSPEC SDL_Surface *IMG_LoadJPG_RW(SDL_RWops *src); extern DECLSPEC SDL_Surface *IMG_LoadTIF_RW(SDL_RWops *src); extern DECLSPEC SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *src); extern DECLSPEC SDL_Surface *IMG_LoadTGA_RW(SDL_RWops *src); extern DECLSPEC SDL_Surface *IMG_LoadLBM_RW(SDL_RWops *src); extern DECLSPEC SDL_Surface *IMG_ReadXPMFromArray(char **xpm); /* We'll use SDL for reporting errors */ #define IMG_SetError SDL_SetError #define IMG_GetError SDL_GetError /* Ends C function definitions when using C++ */ #ifdef __cplusplus } #endif #include "close_code.h" #endif /* _IMG_h */ xwelltris-1.0.1/src/image/sublib/SDL_mutex.h0100644000175300014110000000024007605543562017252 0ustar leoguys#ifndef SDL_MUTEX_H #define SDL_MUTEX_H // Dummy file created by Leo for compatibility // Need for compile SDL part of files for XNC // Leo 25-03-2002 #endif xwelltris-1.0.1/src/image/sublib/SDL_rwops.c0100644000175300014110000001457707605543562017277 0ustar leoguys/* SDL - Simple DirectMedia Layer Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Sam Lantinga slouken@devolution.com */ #ifdef SAVE_RCSID static char rcsid = "@(#) $Id: SDL_rwops.c,v 1.1.1.1 2003/01/04 11:37:22 leo Exp $"; #endif /* This file provides a general interface for SDL to read and write data sources. It can easily be extended to files, memory, etc. */ #include #include #include #include "SDL_error.h" #include "SDL_rwops.h" /* Functions to read/write stdio file pointers */ static int stdio_seek(SDL_RWops *context, int offset, int whence) { if ( fseek(context->hidden.stdio.fp, offset, whence) == 0 ) { return(ftell(context->hidden.stdio.fp)); } else { SDL_Error(SDL_EFSEEK); return(-1); } } static int stdio_read(SDL_RWops *context, void *ptr, int size, int maxnum) { size_t nread; nread = fread(ptr, size, maxnum, context->hidden.stdio.fp); if ( nread == 0 && ferror(context->hidden.stdio.fp) ) { SDL_Error(SDL_EFREAD); } return(nread); } static int stdio_write(SDL_RWops *context, const void *ptr, int size, int num) { size_t nwrote; nwrote = fwrite(ptr, size, num, context->hidden.stdio.fp); if ( nwrote == 0 && ferror(context->hidden.stdio.fp) ) { SDL_Error(SDL_EFWRITE); } return(nwrote); } static int stdio_close(SDL_RWops *context) { if ( context ) { if ( context->hidden.stdio.autoclose ) { /* WARNING: Check the return value here! */ fclose(context->hidden.stdio.fp); } free(context); } return(0); } /* Functions to read/write memory pointers */ static int mem_seek(SDL_RWops *context, int offset, int whence) { Uint8 *newpos; switch (whence) { case SEEK_SET: newpos = context->hidden.mem.base+offset; break; case SEEK_CUR: newpos = context->hidden.mem.here+offset; break; case SEEK_END: newpos = context->hidden.mem.stop+offset; break; default: SDL_SetError("Unknown value for 'whence'"); return(-1); } if ( newpos < context->hidden.mem.base ) { newpos = context->hidden.mem.base; } if ( newpos > context->hidden.mem.stop ) { newpos = context->hidden.mem.stop; } context->hidden.mem.here = newpos; return(context->hidden.mem.here-context->hidden.mem.base); } static int mem_read(SDL_RWops *context, void *ptr, int size, int maxnum) { int num; num = maxnum; if ( (context->hidden.mem.here + (num*size)) > context->hidden.mem.stop ) { num = (context->hidden.mem.stop-context->hidden.mem.here)/size; } memcpy(ptr, context->hidden.mem.here, num*size); context->hidden.mem.here += num*size; return(num); } static int mem_write(SDL_RWops *context, const void *ptr, int size, int num) { if ( (context->hidden.mem.here + (num*size)) > context->hidden.mem.stop ) { num = (context->hidden.mem.stop-context->hidden.mem.here)/size; } memcpy(context->hidden.mem.here, ptr, num*size); context->hidden.mem.here += num*size; return(num); } static int mem_close(SDL_RWops *context) { if ( context ) { free(context); } return(0); } /* Functions to create SDL_RWops structures from various data sources */ #ifdef WIN32 /* Aggh. You can't (apparently) open a file in an application and read from it in a DLL. */ static int in_sdl = 0; #endif #ifdef macintosh /* * translate unix-style slash-separated filename to mac-style colon-separated * name; return malloced string */ static char *unix_to_mac(const char *file) { int flen = strlen(file); char *path = malloc(flen + 2); const char *src = file; char *dst = path; if(*src == '/') { /* really depends on filesystem layout, hope for the best */ src++; } else { /* Check if this is a MacOS path to begin with */ if(*src != ':') *dst++ = ':'; /* relative paths begin with ':' */ } while(src < file + flen) { const char *end = strchr(src, '/'); int len; if(!end) end = file + flen; /* last component */ len = end - src; if(len == 0 || (len == 1 && src[0] == '.')) { /* remove repeated slashes and . */ } else { if(len == 2 && src[0] == '.' && src[1] == '.') { /* replace .. with the empty string */ } else { memcpy(dst, src, len); dst += len; } if(end < file + flen) *dst++ = ':'; } src = end + 1; } *dst++ = '\0'; return path; } #endif /* macintosh */ SDL_RWops *SDL_RWFromFile(const char *file, const char *mode) { FILE *fp; SDL_RWops *rwops; rwops = NULL; #ifdef macintosh { char *mpath = unix_to_mac(file); fp = fopen(mpath, mode); free(mpath); } #else fp = fopen(file, mode); #endif if ( fp == NULL ) { SDL_SetError("Couldn't open %s", file); } else { #ifdef WIN32 in_sdl = 1; rwops = SDL_RWFromFP(fp, 1); in_sdl = 0; #else rwops = SDL_RWFromFP(fp, 1); #endif } return(rwops); } SDL_RWops *SDL_RWFromFP(FILE *fp, int autoclose) { SDL_RWops *rwops; #ifdef WIN32 if ( ! in_sdl ) { SDL_SetError("You can't pass a FILE pointer to a DLL (??)"); /*return(NULL);*/ } #endif rwops = SDL_AllocRW(); if ( rwops != NULL ) { rwops->seek = stdio_seek; rwops->read = stdio_read; rwops->write = stdio_write; rwops->close = stdio_close; rwops->hidden.stdio.fp = fp; rwops->hidden.stdio.autoclose = autoclose; } return(rwops); } SDL_RWops *SDL_RWFromMem(void *mem, int size) { SDL_RWops *rwops; rwops = SDL_AllocRW(); if ( rwops != NULL ) { rwops->seek = mem_seek; rwops->read = mem_read; rwops->write = mem_write; rwops->close = mem_close; rwops->hidden.mem.base = (Uint8 *)mem; rwops->hidden.mem.here = rwops->hidden.mem.base; rwops->hidden.mem.stop = rwops->hidden.mem.base+size; } return(rwops); } SDL_RWops *SDL_AllocRW(void) { SDL_RWops *area; area = (SDL_RWops *)malloc(sizeof *area); if ( area == NULL ) { SDL_OutOfMemory(); } return(area); } void SDL_FreeRW(SDL_RWops *area) { free(area); } xwelltris-1.0.1/src/image/sublib/SDL_rwops.h0100644000175300014110000000645507605543562017300 0ustar leoguys/* SDL - Simple DirectMedia Layer Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Sam Lantinga slouken@devolution.com */ #ifdef SAVE_RCSID static char rcsid = "@(#) $Id: SDL_rwops.h,v 1.1.1.1 2003/01/04 11:37:22 leo Exp $"; #endif /* This file provides a general interface for SDL to read and write data sources. It can easily be extended to files, memory, etc. */ #ifndef _SDL_RWops_h #define _SDL_RWops_h #include #include "SDL_types.h" #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus extern "C" { #endif /* This is the read/write operation structure -- very basic */ typedef struct SDL_RWops { /* Seek to 'offset' relative to whence, one of stdio's whence values: SEEK_SET, SEEK_CUR, SEEK_END Returns the final offset in the data source. */ int (*seek)(struct SDL_RWops *context, int offset, int whence); /* Read up to 'num' objects each of size 'objsize' from the data source to the area pointed at by 'ptr'. Returns the number of objects read, or -1 if the read failed. */ int (*read)(struct SDL_RWops *context, void *ptr, int size, int maxnum); /* Write exactly 'num' objects each of size 'objsize' from the area pointed at by 'ptr' to data source. Returns 'num', or -1 if the write failed. */ int (*write)(struct SDL_RWops *context, const void *ptr, int size, int num); /* Close and free an allocated SDL_FSops structure */ int (*close)(struct SDL_RWops *context); Uint32 type; union { struct { int autoclose; FILE *fp; } stdio; struct { Uint8 *base; Uint8 *here; Uint8 *stop; } mem; struct { void *data1; } unknown; } hidden; } SDL_RWops; /* Functions to create SDL_RWops structures from various data sources */ extern DECLSPEC SDL_RWops * SDL_RWFromFile(const char *file, const char *mode); extern DECLSPEC SDL_RWops * SDL_RWFromFP(FILE *fp, int autoclose); extern DECLSPEC SDL_RWops * SDL_RWFromMem(void *mem, int size); extern DECLSPEC SDL_RWops * SDL_AllocRW(void); extern DECLSPEC void SDL_FreeRW(SDL_RWops *area); /* Macros to easily read and write from an SDL_RWops structure */ #define SDL_RWseek(ctx, offset, whence) (ctx)->seek(ctx, offset, whence) #define SDL_RWtell(ctx) (ctx)->seek(ctx, 0, SEEK_CUR) #define SDL_RWread(ctx, ptr, size, n) (ctx)->read(ctx, ptr, size, n) #define SDL_RWwrite(ctx, ptr, size, n) (ctx)->write(ctx, ptr, size, n) #define SDL_RWclose(ctx) (ctx)->close(ctx) /* Ends C function definitions when using C++ */ #ifdef __cplusplus } #endif #include "close_code.h" #endif /* _SDL_RWops_h */ xwelltris-1.0.1/src/image/sublib/SDL_surface.c0100644000175300014110000001713707605543562017550 0ustar leoguys #include "SDL.h" /* * Calculate the pad-aligned scanline width of a surface */ Uint16 SDL_CalculatePitch(SDL_Surface *surface) { Uint16 pitch; /* Surface should be 4-byte aligned for speed */ pitch = surface->w*surface->format->BytesPerPixel; switch (surface->format->BitsPerPixel) { case 1: pitch = (pitch+7)/8; break; case 4: pitch = (pitch+1)/2; break; default: break; } pitch = (pitch + 3) & ~3; /* 4-byte aligning */ return(pitch); } /* * Free a previously allocated format structure */ void SDL_FreeFormat(SDL_PixelFormat *format) { if ( format ) { if ( format->palette ) { if ( format->palette->colors ) { free(format->palette->colors); } free(format->palette); } free(format); } } /* Helper functions */ /* * Allocate a pixel format structure and fill it according to the given info. */ SDL_PixelFormat *SDL_AllocFormat(int bpp, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask) { SDL_PixelFormat *format; Uint32 mask; /* Allocate an empty pixel format structure */ format = (SDL_PixelFormat*)malloc(sizeof(*format)); if ( format == NULL ) { SDL_OutOfMemory(); return(NULL); } memset(format, 0, sizeof(*format)); format->alpha = SDL_ALPHA_OPAQUE; /* Set up the format */ format->BitsPerPixel = bpp; format->BytesPerPixel = (bpp+7)/8; switch (bpp) { case 1: /* Create the 2 color black-white palette */ format->palette = (SDL_Palette *)malloc( sizeof(SDL_Palette)); if ( format->palette == NULL ) { SDL_FreeFormat(format); SDL_OutOfMemory(); return(NULL); } (format->palette)->ncolors = 2; (format->palette)->colors = (SDL_Color *)malloc( (format->palette)->ncolors*sizeof(SDL_Color)); if ( (format->palette)->colors == NULL ) { SDL_FreeFormat(format); SDL_OutOfMemory(); return(NULL); } format->palette->colors[0].r = 0xFF; format->palette->colors[0].g = 0xFF; format->palette->colors[0].b = 0xFF; format->palette->colors[1].r = 0x00; format->palette->colors[1].g = 0x00; format->palette->colors[1].b = 0x00; format->Rloss = 8; format->Gloss = 8; format->Bloss = 8; format->Aloss = 8; format->Rshift = 0; format->Gshift = 0; format->Bshift = 0; format->Ashift = 0; format->Rmask = 0; format->Gmask = 0; format->Bmask = 0; format->Amask = 0; break; case 4: /* Create the 16 color VGA palette */ format->palette = (SDL_Palette *)malloc( sizeof(SDL_Palette)); if ( format->palette == NULL ) { SDL_FreeFormat(format); SDL_OutOfMemory(); return(NULL); } (format->palette)->ncolors = 16; (format->palette)->colors = (SDL_Color *)malloc( (format->palette)->ncolors*sizeof(SDL_Color)); if ( (format->palette)->colors == NULL ) { SDL_FreeFormat(format); SDL_OutOfMemory(); return(NULL); } /* Punt for now, will this ever be used? */ memset((format->palette)->colors, 0, (format->palette)->ncolors*sizeof(SDL_Color)); /* Palettized formats have no mask info */ format->Rloss = 8; format->Gloss = 8; format->Bloss = 8; format->Aloss = 8; format->Rshift = 0; format->Gshift = 0; format->Bshift = 0; format->Ashift = 0; format->Rmask = 0; format->Gmask = 0; format->Bmask = 0; format->Amask = 0; break; case 8: /* Create an empty 256 color palette */ format->palette = (SDL_Palette *)malloc( sizeof(SDL_Palette)); if ( format->palette == NULL ) { SDL_FreeFormat(format); SDL_OutOfMemory(); return(NULL); } (format->palette)->ncolors = 256; (format->palette)->colors = (SDL_Color *)malloc( (format->palette)->ncolors*sizeof(SDL_Color)); if ( (format->palette)->colors == NULL ) { SDL_FreeFormat(format); SDL_OutOfMemory(); return(NULL); } memset((format->palette)->colors, 0, (format->palette)->ncolors*sizeof(SDL_Color)); /* Palettized formats have no mask info */ format->Rloss = 8; format->Gloss = 8; format->Bloss = 8; format->Aloss = 8; format->Rshift = 0; format->Gshift = 0; format->Bshift = 0; format->Ashift = 0; format->Rmask = 0; format->Gmask = 0; format->Bmask = 0; format->Amask = 0; break; default: /* No palette, just packed pixel info */ format->palette = NULL; format->Rshift = 0; format->Rloss = 8; if ( Rmask ) { for ( mask = Rmask; !(mask&0x01); mask >>= 1 ) ++format->Rshift; for ( ; (mask&0x01); mask >>= 1 ) --format->Rloss; } format->Gshift = 0; format->Gloss = 8; if ( Gmask ) { for ( mask = Gmask; !(mask&0x01); mask >>= 1 ) ++format->Gshift; for ( ; (mask&0x01); mask >>= 1 ) --format->Gloss; } format->Bshift = 0; format->Bloss = 8; if ( Bmask ) { for ( mask = Bmask; !(mask&0x01); mask >>= 1 ) ++format->Bshift; for ( ; (mask&0x01); mask >>= 1 ) --format->Bloss; } format->Ashift = 0; format->Aloss = 8; if ( Amask ) { for ( mask = Amask; !(mask&0x01); mask >>= 1 ) ++format->Ashift; for ( ; (mask&0x01); mask >>= 1 ) --format->Aloss; } format->Rmask = Rmask; format->Gmask = Gmask; format->Bmask = Bmask; format->Amask = Amask; break; } /* Calculate some standard bitmasks, if necessary * Note: This could conflict with an alpha mask, if given. */ if ( (bpp > 8) && !format->Rmask && !format->Gmask && !format->Bmask ) { /* R-G-B */ if ( bpp > 24 ) bpp = 24; format->Rloss = 8-(bpp/3); format->Gloss = 8-(bpp/3)-(bpp%3); format->Bloss = 8-(bpp/3); format->Rshift = ((bpp/3)+(bpp%3))+(bpp/3); format->Gshift = (bpp/3); format->Bshift = 0; format->Rmask = ((0xFF>>format->Rloss)<Rshift); format->Gmask = ((0xFF>>format->Gloss)<Gshift); format->Bmask = ((0xFF>>format->Bloss)<Bshift); } return(format); } /* * Free a surface created by the above function. */ void SDL_FreeSurface (SDL_Surface *surface) { /* Free anything that's not NULL, and not the screen surface */ if (surface == NULL) { return; } if ( --surface->refcount > 0 ) { return; } if ( surface->format ) { SDL_FreeFormat(surface->format); surface->format = NULL; } if ( surface->pixels && ((surface->flags & SDL_PREALLOC) != SDL_PREALLOC) ) { free(surface->pixels); } free(surface); } /* Public routines */ /* * Create an empty RGB surface of the appropriate depth */ SDL_Surface * SDL_CreateRGBSurface (Uint32 flags, int width, int height, int depth, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask) { SDL_Surface *surface; flags &= ~SDL_HWSURFACE; /* Allocate the surface */ surface = (SDL_Surface *)malloc(sizeof(*surface)); if ( surface == NULL ) { return(NULL); } surface->flags = SDL_SWSURFACE; surface->format = SDL_AllocFormat(depth, Rmask, Gmask, Bmask, Amask); if ( surface->format == NULL ) { free(surface); return(NULL); } if ( Amask ) { surface->flags |= SDL_SRCALPHA; } surface->w = width; surface->h = height; surface->pitch = SDL_CalculatePitch(surface); surface->pixels = NULL; surface->offset = 0; // surface->hwdata = NULL; // surface->locked = 0; // surface->map = NULL; surface->format_version = 0; if ( surface->w && surface->h ) { surface->pixels = (void*)malloc(surface->h*surface->pitch); if ( surface->pixels == NULL ) { SDL_FreeSurface(surface); return(NULL); } /* This is important for bitmaps */ memset(surface->pixels, 0, surface->h*surface->pitch); } /* The surface is ready to go */ surface->refcount = 1; return(surface); } int SDL_SetColorKey(SDL_Surface *surface, Uint32 flag, Uint32 key) { return 0; } xwelltris-1.0.1/src/image/sublib/SDL_to_picinfo.c0100644000175300014110000000251007605543562020236 0ustar leoguys#define JPEG_IMAGES #include "SDL.h" #include "picinfo.h" #include "SDL_image.h" void im_sdl_surface_to_picinfo(SDL_Surface* surface, PICINFO* pic) { int i; pic->w=surface->w; pic->h=surface->h; if(surface->format->BytesPerPixel==1) { pic->type=PIC8; pic->pic=(byte*)surface->pixels; surface->pixels=0; for(i=0;i<256;i++) { pic->pal[i*3] =surface->format->palette->colors[i].r; pic->pal[i*3+1]=surface->format->palette->colors[i].g; pic->pal[i*3+2]=surface->format->palette->colors[i].b; } SDL_FreeSurface(surface); } else { pic->type=PIC24; pic->pic=(byte*)surface->pixels; surface->pixels=0; SDL_FreeSurface(surface); } } int im_load_image_through_loader(char* fname, PICINFO* to_pic, int from_mem_size, SDL_Surface* (*img_loader)(SDL_RWops*)) { SDL_RWops *rw; SDL_Surface *surface; if(!from_mem_size) rw=SDL_RWFromFile(fname,"rb"); else rw=SDL_RWFromMem((void*)fname, from_mem_size); surface=img_loader(rw); SDL_FreeRW(rw); im_sdl_surface_to_picinfo(surface,to_pic); return 1; } /******************************************************************/ int im_load_gif(char* fname, PICINFO* to_pic, int from_mem_size) { return im_load_image_through_loader(fname,to_pic, from_mem_size,IMG_LoadGIF_RW); } xwelltris-1.0.1/src/image/sublib/SDL_types.h0100644000175300014110000000551207605543562017263 0ustar leoguys/* SDL - Simple DirectMedia Layer Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Sam Lantinga slouken@devolution.com */ #ifdef SAVE_RCSID static char rcsid = "@(#) $Id: SDL_types.h,v 1.1.1.1 2003/01/04 11:37:22 leo Exp $"; #endif /* General data types used by the SDL library */ #ifndef _SDL_types_h #define _SDL_types_h /* The number of elements in a table */ #define SDL_TABLESIZE(table) (sizeof(table)/sizeof(table[0])) /* Basic data types */ typedef enum { SDL_FALSE = 0, SDL_TRUE = 1 } SDL_bool; typedef unsigned char Uint8; typedef signed char Sint8; typedef unsigned short Uint16; typedef signed short Sint16; typedef unsigned int Uint32; typedef signed int Sint32; /* Figure out how to support 64-bit datatypes */ #if !defined(__STRICT_ANSI__) #if defined(__GNUC__) || defined(__MWERKS__) || defined(__SUNPRO_C) #define SDL_HAS_64BIT_TYPE long long #elif defined(_MSC_VER) /* VC++ */ #define SDL_HAS_64BIT_TYPE __int64 #endif #endif /* !__STRICT_ANSI__ */ /* The 64-bit type isn't available on EPOC/Symbian OS */ #ifdef __SYMBIAN32__ #undef SDL_HAS_64BIT_TYPE #endif /* The 64-bit datatype isn't supported on all platforms */ #ifdef SDL_HAS_64BIT_TYPE typedef unsigned SDL_HAS_64BIT_TYPE Uint64; typedef SDL_HAS_64BIT_TYPE Sint64; #else /* This is really just a hack to prevent the compiler from complaining */ typedef struct { Uint32 hi; Uint32 lo; } Uint64, Sint64; #endif /* Make sure the types really have the right sizes */ #define SDL_COMPILE_TIME_ASSERT(name, x) \ typedef int SDL_dummy_ ## name[(x) * 2 - 1] SDL_COMPILE_TIME_ASSERT(uint8, sizeof(Uint8) == 1); SDL_COMPILE_TIME_ASSERT(sint8, sizeof(Sint8) == 1); SDL_COMPILE_TIME_ASSERT(uint16, sizeof(Uint16) == 2); SDL_COMPILE_TIME_ASSERT(sint16, sizeof(Sint16) == 2); SDL_COMPILE_TIME_ASSERT(uint32, sizeof(Uint32) == 4); SDL_COMPILE_TIME_ASSERT(sint32, sizeof(Sint32) == 4); SDL_COMPILE_TIME_ASSERT(uint64, sizeof(Uint64) == 8); SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8); #undef SDL_COMPILE_TIME_ASSERT /* General keyboard/mouse state definitions */ enum { SDL_PRESSED = 0x01, SDL_RELEASED = 0x00 }; #endif xwelltris-1.0.1/src/image/sublib/SDL_video.h0100644000175300014110000010714307605543562017230 0ustar leoguys/* SDL - Simple DirectMedia Layer Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Sam Lantinga slouken@devolution.com */ #ifdef SAVE_RCSID static char rcsid = "@(#) $Id: SDL_video.h,v 1.1.1.1 2003/01/04 11:37:22 leo Exp $"; #endif /* Header file for access to the SDL raw framebuffer window */ #ifndef _SDL_video_h #define _SDL_video_h #include #include "SDL_types.h" #include "SDL_mutex.h" #include "SDL_rwops.h" #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus extern "C" { #endif /* Transparency definitions: These define alpha as the opacity of a surface */ #define SDL_ALPHA_OPAQUE 255 #define SDL_ALPHA_TRANSPARENT 0 /* Useful data types */ typedef struct { Sint16 x, y; Uint16 w, h; } SDL_Rect; typedef struct { Uint8 r; Uint8 g; Uint8 b; Uint8 unused; } SDL_Color; typedef struct { int ncolors; SDL_Color *colors; } SDL_Palette; /* Everything in the pixel format structure is read-only */ typedef struct SDL_PixelFormat { SDL_Palette *palette; Uint8 BitsPerPixel; Uint8 BytesPerPixel; Uint8 Rloss; Uint8 Gloss; Uint8 Bloss; Uint8 Aloss; Uint8 Rshift; Uint8 Gshift; Uint8 Bshift; Uint8 Ashift; Uint32 Rmask; Uint32 Gmask; Uint32 Bmask; Uint32 Amask; /* RGB color key information */ Uint32 colorkey; /* Alpha value information (per-surface alpha) */ Uint8 alpha; } SDL_PixelFormat; /* typedef for private surface blitting functions */ struct SDL_Surface; typedef int (*SDL_blit)(struct SDL_Surface *src, SDL_Rect *srcrect, struct SDL_Surface *dst, SDL_Rect *dstrect); /* This structure should be treated as read-only, except for 'pixels', which, if not NULL, contains the raw pixel data for the surface. */ typedef struct SDL_Surface { Uint32 flags; /* Read-only */ SDL_PixelFormat *format; /* Read-only */ int w, h; /* Read-only */ Uint16 pitch; /* Read-only */ void *pixels; /* Read-write */ int offset; /* Private */ /* Hardware-specific surface info */ // struct private_hwdata *hwdata; /* clipping information */ // SDL_Rect clip_rect; /* Read-only */ Uint32 unused1; /* for binary compatibility */ /* Allow recursive locks */ // Uint32 locked; /* Private */ /* info for fast blit mapping to other surfaces */ // struct SDL_BlitMap *map; /* Private */ /* format version, bumped at every change to invalidate blit maps */ unsigned int format_version; /* Private */ /* Reference count -- used when freeing surface */ int refcount; /* Read-mostly */ } SDL_Surface; /* These are the currently supported flags for the SDL_surface */ /* Available for SDL_CreateRGBSurface() or SDL_SetVideoMode() */ #define SDL_SWSURFACE 0x00000000 /* Surface is in system memory */ #define SDL_HWSURFACE 0x00000001 /* Surface is in video memory */ #define SDL_ASYNCBLIT 0x00000004 /* Use asynchronous blits if possible */ /* Available for SDL_SetVideoMode() */ #define SDL_ANYFORMAT 0x10000000 /* Allow any video depth/pixel-format */ #define SDL_HWPALETTE 0x20000000 /* Surface has exclusive palette */ #define SDL_DOUBLEBUF 0x40000000 /* Set up double-buffered video mode */ #define SDL_FULLSCREEN 0x80000000 /* Surface is a full screen display */ #define SDL_OPENGL 0x00000002 /* Create an OpenGL rendering context */ #define SDL_OPENGLBLIT 0x0000000A /* Create an OpenGL rendering context and use it for blitting */ #define SDL_RESIZABLE 0x00000010 /* This video mode may be resized */ #define SDL_NOFRAME 0x00000020 /* No window caption or edge frame */ /* Used internally (read-only) */ #define SDL_HWACCEL 0x00000100 /* Blit uses hardware acceleration */ #define SDL_SRCCOLORKEY 0x00001000 /* Blit uses a source color key */ #define SDL_RLEACCELOK 0x00002000 /* Private flag */ #define SDL_RLEACCEL 0x00004000 /* Surface is RLE encoded */ #define SDL_SRCALPHA 0x00010000 /* Blit uses source alpha blending */ #define SDL_PREALLOC 0x01000000 /* Surface uses preallocated memory */ /* Evaluates to true if the surface needs to be locked before access */ #define SDL_MUSTLOCK(surface) \ (surface->offset || \ ((surface->flags & (SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_RLEACCEL)) != 0)) /* Useful for determining the video hardware capabilities */ typedef struct { Uint32 hw_available :1; /* Flag: Can you create hardware surfaces? */ Uint32 wm_available :1; /* Flag: Can you talk to a window manager? */ Uint32 UnusedBits1 :6; Uint32 UnusedBits2 :1; Uint32 blit_hw :1; /* Flag: Accelerated blits HW --> HW */ Uint32 blit_hw_CC :1; /* Flag: Accelerated blits with Colorkey */ Uint32 blit_hw_A :1; /* Flag: Accelerated blits with Alpha */ Uint32 blit_sw :1; /* Flag: Accelerated blits SW --> HW */ Uint32 blit_sw_CC :1; /* Flag: Accelerated blits with Colorkey */ Uint32 blit_sw_A :1; /* Flag: Accelerated blits with Alpha */ Uint32 blit_fill :1; /* Flag: Accelerated color fill */ Uint32 UnusedBits3 :16; Uint32 video_mem; /* The total amount of video memory (in K) */ SDL_PixelFormat *vfmt; /* Value: The format of the video surface */ } SDL_VideoInfo; /* The most common video overlay formats. For an explanation of these pixel formats, see: http://www.webartz.com/fourcc/indexyuv.htm For information on the relationship between color spaces, see: http://www.neuro.sfc.keio.ac.jp/~aly/polygon/info/color-space-faq.html */ #define SDL_YV12_OVERLAY 0x32315659 /* Planar mode: Y + V + U (3 planes) */ #define SDL_IYUV_OVERLAY 0x56555949 /* Planar mode: Y + U + V (3 planes) */ #define SDL_YUY2_OVERLAY 0x32595559 /* Packed mode: Y0+U0+Y1+V0 (1 plane) */ #define SDL_UYVY_OVERLAY 0x59565955 /* Packed mode: U0+Y0+V0+Y1 (1 plane) */ #define SDL_YVYU_OVERLAY 0x55595659 /* Packed mode: Y0+V0+Y1+U0 (1 plane) */ /* The YUV hardware video overlay */ typedef struct SDL_Overlay { Uint32 format; /* Read-only */ int w, h; /* Read-only */ int planes; /* Read-only */ Uint16 *pitches; /* Read-only */ Uint8 **pixels; /* Read-write */ /* Hardware-specific surface info */ struct private_yuvhwfuncs *hwfuncs; struct private_yuvhwdata *hwdata; /* Special flags */ Uint32 hw_overlay :1; /* Flag: This overlay hardware accelerated? */ Uint32 UnusedBits :31; } SDL_Overlay; /* Public enumeration for setting the OpenGL window attributes. */ typedef enum { SDL_GL_RED_SIZE, SDL_GL_GREEN_SIZE, SDL_GL_BLUE_SIZE, SDL_GL_ALPHA_SIZE, SDL_GL_BUFFER_SIZE, SDL_GL_DOUBLEBUFFER, SDL_GL_DEPTH_SIZE, SDL_GL_STENCIL_SIZE, SDL_GL_ACCUM_RED_SIZE, SDL_GL_ACCUM_GREEN_SIZE, SDL_GL_ACCUM_BLUE_SIZE, SDL_GL_ACCUM_ALPHA_SIZE } SDL_GLattr; /* flags for SDL_SetPalette() */ #define SDL_LOGPAL 0x01 #define SDL_PHYSPAL 0x02 /* Function prototypes */ /* These functions are used internally, and should not be used unless you * have a specific need to specify the video driver you want to use. * You should normally use SDL_Init() or SDL_InitSubSystem(). * * SDL_VideoInit() initializes the video subsystem -- sets up a connection * to the window manager, etc, and determines the current video mode and * pixel format, but does not initialize a window or graphics mode. * Note that event handling is activated by this routine. * * If you use both sound and video in your application, you need to call * SDL_Init() before opening the sound device, otherwise under Win32 DirectX, * you won't be able to set full-screen display modes. */ extern DECLSPEC int SDL_VideoInit(const char *driver_name, Uint32 flags); extern DECLSPEC void SDL_VideoQuit(void); /* This function fills the given character buffer with the name of the * video driver, and returns a pointer to it if the video driver has * been initialized. It returns NULL if no driver has been initialized. */ extern DECLSPEC char *SDL_VideoDriverName(char *namebuf, int maxlen); /* * This function returns a pointer to the current display surface. * If SDL is doing format conversion on the display surface, this * function returns the publicly visible surface, not the real video * surface. */ extern DECLSPEC SDL_Surface * SDL_GetVideoSurface(void); /* * This function returns a read-only pointer to information about the * video hardware. If this is called before SDL_SetVideoMode(), the 'vfmt' * member of the returned structure will contain the pixel format of the * "best" video mode. */ extern DECLSPEC const SDL_VideoInfo * SDL_GetVideoInfo(void); /* * Check to see if a particular video mode is supported. * It returns 0 if the requested mode is not supported under any bit depth, * or returns the bits-per-pixel of the closest available mode with the * given width and height. If this bits-per-pixel is different from the * one used when setting the video mode, SDL_SetVideoMode() will succeed, * but will emulate the requested bits-per-pixel with a shadow surface. * * The arguments to SDL_VideoModeOK() are the same ones you would pass to * SDL_SetVideoMode() */ extern DECLSPEC int SDL_VideoModeOK(int width, int height, int bpp, Uint32 flags); /* * Return a pointer to an array of available screen dimensions for the * given format and video flags, sorted largest to smallest. Returns * NULL if there are no dimensions available for a particular format, * or (SDL_Rect **)-1 if any dimension is okay for the given format. * * If 'format' is NULL, the mode list will be for the format given * by SDL_GetVideoInfo()->vfmt */ extern DECLSPEC SDL_Rect ** SDL_ListModes(SDL_PixelFormat *format, Uint32 flags); /* * Set up a video mode with the specified width, height and bits-per-pixel. * * If 'bpp' is 0, it is treated as the current display bits per pixel. * * If SDL_ANYFORMAT is set in 'flags', the SDL library will try to set the * requested bits-per-pixel, but will return whatever video pixel format is * available. The default is to emulate the requested pixel format if it * is not natively available. * * If SDL_HWSURFACE is set in 'flags', the video surface will be placed in * video memory, if possible, and you may have to call SDL_LockSurface() * in order to access the raw framebuffer. Otherwise, the video surface * will be created in system memory. * * If SDL_ASYNCBLIT is set in 'flags', SDL will try to perform rectangle * updates asynchronously, but you must always lock before accessing pixels. * SDL will wait for updates to complete before returning from the lock. * * If SDL_HWPALETTE is set in 'flags', the SDL library will guarantee * that the colors set by SDL_SetColors() will be the colors you get. * Otherwise, in 8-bit mode, SDL_SetColors() may not be able to set all * of the colors exactly the way they are requested, and you should look * at the video surface structure to determine the actual palette. * If SDL cannot guarantee that the colors you request can be set, * i.e. if the colormap is shared, then the video surface may be created * under emulation in system memory, overriding the SDL_HWSURFACE flag. * * If SDL_FULLSCREEN is set in 'flags', the SDL library will try to set * a fullscreen video mode. The default is to create a windowed mode * if the current graphics system has a window manager. * If the SDL library is able to set a fullscreen video mode, this flag * will be set in the surface that is returned. * * If SDL_DOUBLEBUF is set in 'flags', the SDL library will try to set up * two surfaces in video memory and swap between them when you call * SDL_Flip(). This is usually slower than the normal single-buffering * scheme, but prevents "tearing" artifacts caused by modifying video * memory while the monitor is refreshing. It should only be used by * applications that redraw the entire screen on every update. * * If SDL_RESIZABLE is set in 'flags', the SDL library will allow the * window manager, if any, to resize the window at runtime. When this * occurs, SDL will send a SDL_VIDEORESIZE event to you application, * and you must respond to the event by re-calling SDL_SetVideoMode() * with the requested size (or another size that suits the application). * * If SDL_NOFRAME is set in 'flags', the SDL library will create a window * without any title bar or frame decoration. Fullscreen video modes have * this flag set automatically. * * This function returns the video framebuffer surface, or NULL if it fails. * * If you rely on functionality provided by certain video flags, check the * flags of the returned surface to make sure that functionality is available. * SDL will fall back to reduced functionality if the exact flags you wanted * are not available. */ extern DECLSPEC SDL_Surface *SDL_SetVideoMode (int width, int height, int bpp, Uint32 flags); /* * Makes sure the given list of rectangles is updated on the given screen. * If 'x', 'y', 'w' and 'h' are all 0, SDL_UpdateRect will update the entire * screen. * These functions should not be called while 'screen' is locked. */ extern DECLSPEC void SDL_UpdateRects (SDL_Surface *screen, int numrects, SDL_Rect *rects); extern DECLSPEC void SDL_UpdateRect (SDL_Surface *screen, Sint32 x, Sint32 y, Uint32 w, Uint32 h); /* * On hardware that supports double-buffering, this function sets up a flip * and returns. The hardware will wait for vertical retrace, and then swap * video buffers before the next video surface blit or lock will return. * On hardware that doesn not support double-buffering, this is equivalent * to calling SDL_UpdateRect(screen, 0, 0, 0, 0); * The SDL_DOUBLEBUF flag must have been passed to SDL_SetVideoMode() when * setting the video mode for this function to perform hardware flipping. * This function returns 0 if successful, or -1 if there was an error. */ extern DECLSPEC int SDL_Flip(SDL_Surface *screen); /* * Set the gamma correction for each of the color channels. * The gamma values range (approximately) between 0.1 and 10.0 * * If this function isn't supported directly by the hardware, it will * be emulated using gamma ramps, if available. If successful, this * function returns 0, otherwise it returns -1. */ extern DECLSPEC int SDL_SetGamma(float red, float green, float blue); /* * Set the gamma translation table for the red, green, and blue channels * of the video hardware. Each table is an array of 256 16-bit quantities, * representing a mapping between the input and output for that channel. * The input is the index into the array, and the output is the 16-bit * gamma value at that index, scaled to the output color precision. * * You may pass NULL for any of the channels to leave it unchanged. * If the call succeeds, it will return 0. If the display driver or * hardware does not support gamma translation, or otherwise fails, * this function will return -1. */ extern DECLSPEC int SDL_SetGammaRamp(Uint16 *red, Uint16 *green, Uint16 *blue); /* * Retrieve the current values of the gamma translation tables. * * You must pass in valid pointers to arrays of 256 16-bit quantities. * Any of the pointers may be NULL to ignore that channel. * If the call succeeds, it will return 0. If the display driver or * hardware does not support gamma translation, or otherwise fails, * this function will return -1. */ extern DECLSPEC int SDL_GetGammaRamp(Uint16 *red, Uint16 *green, Uint16 *blue); /* * Sets a portion of the colormap for the given 8-bit surface. If 'surface' * is not a palettized surface, this function does nothing, returning 0. * If all of the colors were set as passed to SDL_SetColors(), it will * return 1. If not all the color entries were set exactly as given, * it will return 0, and you should look at the surface palette to * determine the actual color palette. * * When 'surface' is the surface associated with the current display, the * display colormap will be updated with the requested colors. If * SDL_HWPALETTE was set in SDL_SetVideoMode() flags, SDL_SetColors() * will always return 1, and the palette is guaranteed to be set the way * you desire, even if the window colormap has to be warped or run under * emulation. */ extern DECLSPEC int SDL_SetColors(SDL_Surface *surface, SDL_Color *colors, int firstcolor, int ncolors); /* * Sets a portion of the colormap for a given 8-bit surface. * 'flags' is one or both of: * SDL_LOGPAL -- set logical palette, which controls how blits are mapped * to/from the surface, * SDL_PHYSPAL -- set physical palette, which controls how pixels look on * the screen * Only screens have physical palettes. Separate change of physical/logical * palettes is only possible if the screen has SDL_HWPALETTE set. * * The return value is 1 if all colours could be set as requested, and 0 * otherwise. * * SDL_SetColors() is equivalent to calling this function with * flags = (SDL_LOGPAL|SDL_PHYSPAL). */ extern DECLSPEC int SDL_SetPalette(SDL_Surface *surface, int flags, SDL_Color *colors, int firstcolor, int ncolors); /* * Maps an RGB triple to an opaque pixel value for a given pixel format */ extern DECLSPEC Uint32 SDL_MapRGB (SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b); /* * Maps an RGBA quadruple to a pixel value for a given pixel format */ extern DECLSPEC Uint32 SDL_MapRGBA(SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* * Maps a pixel value into the RGB components for a given pixel format */ extern DECLSPEC void SDL_GetRGB(Uint32 pixel, SDL_PixelFormat *fmt, Uint8 *r, Uint8 *g, Uint8 *b); /* * Maps a pixel value into the RGBA components for a given pixel format */ extern DECLSPEC void SDL_GetRGBA(Uint32 pixel, SDL_PixelFormat *fmt, Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a); /* * Allocate and free an RGB surface (must be called after SDL_SetVideoMode) * If the depth is 4 or 8 bits, an empty palette is allocated for the surface. * If the depth is greater than 8 bits, the pixel format is set using the * flags '[RGB]mask'. * If the function runs out of memory, it will return NULL. * * The 'flags' tell what kind of surface to create. * SDL_SWSURFACE means that the surface should be created in system memory. * SDL_HWSURFACE means that the surface should be created in video memory, * with the same format as the display surface. This is useful for surfaces * that will not change much, to take advantage of hardware acceleration * when being blitted to the display surface. * SDL_ASYNCBLIT means that SDL will try to perform asynchronous blits with * this surface, but you must always lock it before accessing the pixels. * SDL will wait for current blits to finish before returning from the lock. * SDL_SRCCOLORKEY indicates that the surface will be used for colorkey blits. * If the hardware supports acceleration of colorkey blits between * two surfaces in video memory, SDL will try to place the surface in * video memory. If this isn't possible or if there is no hardware * acceleration available, the surface will be placed in system memory. * SDL_SRCALPHA means that the surface will be used for alpha blits and * if the hardware supports hardware acceleration of alpha blits between * two surfaces in video memory, to place the surface in video memory * if possible, otherwise it will be placed in system memory. * If the surface is created in video memory, blits will be _much_ faster, * but the surface format must be identical to the video surface format, * and the only way to access the pixels member of the surface is to use * the SDL_LockSurface() and SDL_UnlockSurface() calls. * If the requested surface actually resides in video memory, SDL_HWSURFACE * will be set in the flags member of the returned surface. If for some * reason the surface could not be placed in video memory, it will not have * the SDL_HWSURFACE flag set, and will be created in system memory instead. */ #define SDL_AllocSurface SDL_CreateRGBSurface extern DECLSPEC SDL_Surface *SDL_CreateRGBSurface (Uint32 flags, int width, int height, int depth, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask); extern DECLSPEC SDL_Surface *SDL_CreateRGBSurfaceFrom(void *pixels, int width, int height, int depth, int pitch, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask); extern DECLSPEC void SDL_FreeSurface(SDL_Surface *surface); /* * SDL_LockSurface() sets up a surface for directly accessing the pixels. * Between calls to SDL_LockSurface()/SDL_UnlockSurface(), you can write * to and read from 'surface->pixels', using the pixel format stored in * 'surface->format'. Once you are done accessing the surface, you should * use SDL_UnlockSurface() to release it. * * Not all surfaces require locking. If SDL_MUSTLOCK(surface) evaluates * to 0, then you can read and write to the surface at any time, and the * pixel format of the surface will not change. In particular, if the * SDL_HWSURFACE flag is not given when calling SDL_SetVideoMode(), you * will not need to lock the display surface before accessing it. * * No operating system or library calls should be made between lock/unlock * pairs, as critical system locks may be held during this time. * * SDL_LockSurface() returns 0, or -1 if the surface couldn't be locked. */ extern DECLSPEC int SDL_LockSurface(SDL_Surface *surface); extern DECLSPEC void SDL_UnlockSurface(SDL_Surface *surface); /* * Load a surface from a seekable SDL data source (memory or file.) * If 'freesrc' is non-zero, the source will be closed after being read. * Returns the new surface, or NULL if there was an error. * The new surface should be freed with SDL_FreeSurface(). */ extern DECLSPEC SDL_Surface * SDL_LoadBMP_RW(SDL_RWops *src, int freesrc); /* Convenience macro -- load a surface from a file */ #define SDL_LoadBMP(file) SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1) /* * Save a surface to a seekable SDL data source (memory or file.) * If 'freedst' is non-zero, the source will be closed after being written. * Returns 0 if successful or -1 if there was an error. */ extern DECLSPEC int SDL_SaveBMP_RW (SDL_Surface *surface, SDL_RWops *dst, int freedst); /* Convenience macro -- save a surface to a file */ #define SDL_SaveBMP(surface, file) \ SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, "wb"), 1) /* * Sets the color key (transparent pixel) in a blittable surface. * If 'flag' is SDL_SRCCOLORKEY (optionally OR'd with SDL_RLEACCEL), * 'key' will be the transparent pixel in the source image of a blit. * SDL_RLEACCEL requests RLE acceleration for the surface if present, * and removes RLE acceleration if absent. * If 'flag' is 0, this function clears any current color key. * This function returns 0, or -1 if there was an error. */ extern DECLSPEC int SDL_SetColorKey (SDL_Surface *surface, Uint32 flag, Uint32 key); /* * This function sets the alpha value for the entire surface, as opposed to * using the alpha component of each pixel. This value measures the range * of transparency of the surface, 0 being completely transparent to 255 * being completely opaque. An 'alpha' value of 255 causes blits to be * opaque, the source pixels copied to the destination (the default). Note * that per-surface alpha can be combined with colorkey transparency. * * If 'flag' is 0, alpha blending is disabled for the surface. * If 'flag' is SDL_SRCALPHA, alpha blending is enabled for the surface. * OR:ing the flag with SDL_RLEACCEL requests RLE acceleration for the * surface; if SDL_RLEACCEL is not specified, the RLE accel will be removed. */ extern DECLSPEC int SDL_SetAlpha(SDL_Surface *surface, Uint32 flag, Uint8 alpha); /* * Sets the clipping rectangle for the destination surface in a blit. * * If the clip rectangle is NULL, clipping will be disabled. * If the clip rectangle doesn't intersect the surface, the function will * return SDL_FALSE and blits will be completely clipped. Otherwise the * function returns SDL_TRUE and blits to the surface will be clipped to * the intersection of the surface area and the clipping rectangle. * * Note that blits are automatically clipped to the edges of the source * and destination surfaces. */ extern DECLSPEC SDL_bool SDL_SetClipRect(SDL_Surface *surface, const SDL_Rect *rect); /* * Gets the clipping rectangle for the destination surface in a blit. * 'rect' must be a pointer to a valid rectangle which will be filled * with the correct values. */ extern DECLSPEC void SDL_GetClipRect(SDL_Surface *surface, SDL_Rect *rect); /* * Creates a new surface of the specified format, and then copies and maps * the given surface to it so the blit of the converted surface will be as * fast as possible. If this function fails, it returns NULL. * * The 'flags' parameter is passed to SDL_CreateRGBSurface() and has those * semantics. You can also pass SDL_RLEACCEL in the flags parameter and * SDL will try to RLE accelerate colorkey and alpha blits in the resulting * surface. * * This function is used internally by SDL_DisplayFormat(). */ extern DECLSPEC SDL_Surface *SDL_ConvertSurface (SDL_Surface *src, SDL_PixelFormat *fmt, Uint32 flags); /* * This performs a fast blit from the source surface to the destination * surface. It assumes that the source and destination rectangles are * the same size. If either 'srcrect' or 'dstrect' are NULL, the entire * surface (src or dst) is copied. The final blit rectangles are saved * in 'srcrect' and 'dstrect' after all clipping is performed. * If the blit is successful, it returns 0, otherwise it returns -1. * * The blit function should not be called on a locked surface. * * The blit semantics for surfaces with and without alpha and colorkey * are defined as follows: * * RGBA->RGB: * SDL_SRCALPHA set: * alpha-blend (using alpha-channel). * SDL_SRCCOLORKEY ignored. * SDL_SRCALPHA not set: * copy RGB. * if SDL_SRCCOLORKEY set, only copy the pixels matching the * RGB values of the source colour key, ignoring alpha in the * comparison. * * RGB->RGBA: * SDL_SRCALPHA set: * alpha-blend (using the source per-surface alpha value); * set destination alpha to opaque. * SDL_SRCALPHA not set: * copy RGB, set destination alpha to opaque. * both: * if SDL_SRCCOLORKEY set, only copy the pixels matching the * source colour key. * * RGBA->RGBA: * SDL_SRCALPHA set: * alpha-blend (using the source alpha channel) the RGB values; * leave destination alpha untouched. [Note: is this correct?] * SDL_SRCCOLORKEY ignored. * SDL_SRCALPHA not set: * copy all of RGBA to the destination. * if SDL_SRCCOLORKEY set, only copy the pixels matching the * RGB values of the source colour key, ignoring alpha in the * comparison. * * RGB->RGB: * SDL_SRCALPHA set: * alpha-blend (using the source per-surface alpha value). * SDL_SRCALPHA not set: * copy RGB. * both: * if SDL_SRCCOLORKEY set, only copy the pixels matching the * source colour key. * * If either of the surfaces were in video memory, and the blit returns -2, * the video memory was lost, so it should be reloaded with artwork and * re-blitted: while ( SDL_BlitSurface(image, imgrect, screen, dstrect) == -2 ) { while ( SDL_LockSurface(image) < 0 ) Sleep(10); -- Write image pixels to image->pixels -- SDL_UnlockSurface(image); } * This happens under DirectX 5.0 when the system switches away from your * fullscreen application. The lock will also fail until you have access * to the video memory again. */ /* You should call SDL_BlitSurface() unless you know exactly how SDL blitting works internally and how to use the other blit functions. */ #define SDL_BlitSurface SDL_UpperBlit /* This is the public blit function, SDL_BlitSurface(), and it performs rectangle validation and clipping before passing it to SDL_LowerBlit() */ extern DECLSPEC int SDL_UpperBlit (SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect); /* This is a semi-private blit function and it performs low-level surface blitting only. */ extern DECLSPEC int SDL_LowerBlit (SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect); /* * This function performs a fast fill of the given rectangle with 'color' * The given rectangle is clipped to the destination surface clip area * and the final fill rectangle is saved in the passed in pointer. * If 'dstrect' is NULL, the whole surface will be filled with 'color' * The color should be a pixel of the format used by the surface, and * can be generated by the SDL_MapRGB() function. * This function returns 0 on success, or -1 on error. */ extern DECLSPEC int SDL_FillRect (SDL_Surface *dst, SDL_Rect *dstrect, Uint32 color); /* * This function takes a surface and copies it to a new surface of the * pixel format and colors of the video framebuffer, suitable for fast * blitting onto the display surface. It calls SDL_ConvertSurface() * * If you want to take advantage of hardware colorkey or alpha blit * acceleration, you should set the colorkey and alpha value before * calling this function. * * If the conversion fails or runs out of memory, it returns NULL */ extern DECLSPEC SDL_Surface * SDL_DisplayFormat(SDL_Surface *surface); /* * This function takes a surface and copies it to a new surface of the * pixel format and colors of the video framebuffer (if possible), * suitable for fast alpha blitting onto the display surface. * The new surface will always have an alpha channel. * * If you want to take advantage of hardware colorkey or alpha blit * acceleration, you should set the colorkey and alpha value before * calling this function. * * If the conversion fails or runs out of memory, it returns NULL */ extern DECLSPEC SDL_Surface * SDL_DisplayFormatAlpha(SDL_Surface *surface); /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* YUV video surface overlay functions */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* This function creates a video output overlay Calling the returned surface an overlay is something of a misnomer because the contents of the display surface underneath the area where the overlay is shown is undefined - it may be overwritten with the converted YUV data. */ extern DECLSPEC SDL_Overlay *SDL_CreateYUVOverlay(int width, int height, Uint32 format, SDL_Surface *display); /* Lock an overlay for direct access, and unlock it when you are done */ extern DECLSPEC int SDL_LockYUVOverlay(SDL_Overlay *overlay); extern DECLSPEC void SDL_UnlockYUVOverlay(SDL_Overlay *overlay); /* Blit a video overlay to the display surface. The contents of the video surface underneath the blit destination are not defined. The width and height of the destination rectangle may be different from that of the overlay, but currently only 2x scaling is supported. */ extern DECLSPEC int SDL_DisplayYUVOverlay(SDL_Overlay *overlay, SDL_Rect *dstrect); /* Free a video overlay */ extern DECLSPEC void SDL_FreeYUVOverlay(SDL_Overlay *overlay); /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* OpenGL support functions. */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * Dynamically load a GL driver, if SDL is built with dynamic GL. * * SDL links normally with the OpenGL library on your system by default, * but you can compile it to dynamically load the GL driver at runtime. * If you do this, you need to retrieve all of the GL functions used in * your program from the dynamic library using SDL_GL_GetProcAddress(). * * This is disabled in default builds of SDL. */ extern DECLSPEC int SDL_GL_LoadLibrary(const char *path); /* * Get the address of a GL function (for extension functions) */ extern DECLSPEC void *SDL_GL_GetProcAddress(const char* proc); /* * Set an attribute of the OpenGL subsystem before intialization. */ extern DECLSPEC int SDL_GL_SetAttribute(SDL_GLattr attr, int value); /* * Get an attribute of the OpenGL subsystem from the windowing * interface, such as glX. This is of course different from getting * the values from SDL's internal OpenGL subsystem, which only * stores the values you request before initialization. * * Developers should track the values they pass into SDL_GL_SetAttribute * themselves if they want to retrieve these values. */ extern DECLSPEC int SDL_GL_GetAttribute(SDL_GLattr attr, int* value); /* * Swap the OpenGL buffers, if double-buffering is supported. */ extern DECLSPEC void SDL_GL_SwapBuffers(void); /* * Internal functions that should not be called unless you have read * and understood the source code for these functions. */ extern DECLSPEC void SDL_GL_UpdateRects(int numrects, SDL_Rect* rects); extern DECLSPEC void SDL_GL_Lock(void); extern DECLSPEC void SDL_GL_Unlock(void); /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* These functions allow interaction with the window manager, if any. */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * Sets/Gets the title and icon text of the display window */ extern DECLSPEC void SDL_WM_SetCaption(const char *title, const char *icon); extern DECLSPEC void SDL_WM_GetCaption(char **title, char **icon); /* * Sets the icon for the display window. * This function must be called before the first call to SDL_SetVideoMode(). * It takes an icon surface, and a mask in MSB format. * If 'mask' is NULL, the entire icon surface will be used as the icon. */ extern DECLSPEC void SDL_WM_SetIcon(SDL_Surface *icon, Uint8 *mask); /* * This function iconifies the window, and returns 1 if it succeeded. * If the function succeeds, it generates an SDL_APPACTIVE loss event. * This function is a noop and returns 0 in non-windowed environments. */ extern DECLSPEC int SDL_WM_IconifyWindow(void); /* * Toggle fullscreen mode without changing the contents of the screen. * If the display surface does not require locking before accessing * the pixel information, then the memory pointers will not change. * * If this function was able to toggle fullscreen mode (change from * running in a window to fullscreen, or vice-versa), it will return 1. * If it is not implemented, or fails, it returns 0. * * The next call to SDL_SetVideoMode() will set the mode fullscreen * attribute based on the flags parameter - if SDL_FULLSCREEN is not * set, then the display will be windowed by default where supported. * * This is currently only implemented in the X11 video driver. */ extern DECLSPEC int SDL_WM_ToggleFullScreen(SDL_Surface *surface); /* * This function allows you to set and query the input grab state of * the application. It returns the new input grab state. */ typedef enum { SDL_GRAB_QUERY = -1, SDL_GRAB_OFF = 0, SDL_GRAB_ON = 1, SDL_GRAB_FULLSCREEN /* Used internally */ } SDL_GrabMode; /* * Grabbing means that the mouse is confined to the application window, * and nearly all keyboard input is passed directly to the application, * and not interpreted by a window manager, if any. */ extern DECLSPEC SDL_GrabMode SDL_WM_GrabInput(SDL_GrabMode mode); /* Not in public API at the moment - do not use! */ extern DECLSPEC int SDL_SoftStretch(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect); /* Ends C function definitions when using C++ */ #ifdef __cplusplus } #endif #include "close_code.h" #endif /* _SDL_video_h */ xwelltris-1.0.1/src/image/sublib/begin_code.h0100644000175300014110000000603007605543562017467 0ustar leoguys/* SDL - Simple DirectMedia Layer Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Sam Lantinga slouken@devolution.com */ /* This file sets things up for C dynamic library function definitions, static inlined functions, and structures aligned at 4-byte alignment. If you don't like ugly C preprocessor code, don't look at this file. :) */ /* This shouldn't be nested -- included it around code only. */ #ifdef _begin_code_h #error Nested inclusion of begin_code.h #endif #define _begin_code_h /* Some compilers use a special export keyword */ #ifndef DECLSPEC # ifdef __BEOS__ # if defined(__GNUC__) # define DECLSPEC __declspec(dllexport) # else # define DECLSPEC __declspec(export) # endif # else # ifdef WIN32 # define DECLSPEC __declspec(dllexport) # else # define DECLSPEC # endif # endif #endif /* Removed DECLSPEC on Symbian OS because SDL cannot be a DLL in EPOC */ #ifdef __SYMBIAN32__ #undef DECLSPEC #define DECLSPEC #endif /* __SYMBIAN32__ */ /* Force structure packing at 4 byte alignment. This is necessary if the header is included in code which has structure packing set to an alternate value, say for loading structures from disk. The packing is reset to the previous value in close_code.h */ #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__WATCOMC__) || defined(__BORLANDC__) #ifdef _MSC_VER #pragma warning(disable: 4103) #endif #ifdef __BORLANDC__ #pragma nopackwarning #endif #pragma pack(push,4) #elif (defined(__MWERKS__) && defined(macintosh)) #pragma options align=mac68k4byte #pragma enumsalwaysint on #endif /* Compiler needs structure packing set */ /* Set up compiler-specific options for inlining functions */ #ifndef SDL_INLINE_OKAY #ifdef __GNUC__ #define SDL_INLINE_OKAY #else /* Add any special compiler-specific cases here */ #if defined(_MSC_VER) #define __inline__ __inline #define SDL_INLINE_OKAY #else #if !defined(__MRC__) && !defined(_SGI_SOURCE) #define __inline__ inline #define SDL_INLINE_OKAY #endif /* Not a funky compiler */ #endif /* Visual C++ */ #endif /* GNU C */ #endif /* SDL_INLINE_OKAY */ /* If inlining isn't supported, remove "__inline__", turning static inlined functions into static functions (resulting in code bloat in all files which include the offending header files) */ #ifndef SDL_INLINE_OKAY #define __inline__ #endif xwelltris-1.0.1/src/image/sublib/close_code.h0100644000175300014110000000264707605543562017522 0ustar leoguys/* SDL - Simple DirectMedia Layer Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Sam Lantinga slouken@devolution.com */ /* This file reverses the effects of begin_code.h and should be included after you finish any function and structure declarations in your headers */ #undef _begin_code_h /* Reset structure packing at previous byte alignment */ #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__WATCOMC__) || defined(__BORLANDC__) #ifdef __BORLANDC__ #pragma nopackwarning #endif #if (defined(__MWERKS__) && defined(macintosh)) #pragma options align=reset #pragma enumsalwaysint reset #else #pragma pack(pop) #endif #endif /* Compiler needs structure packing set */ xwelltris-1.0.1/src/image/sublib/im_exp.h0100644000175300014110000000035107605543562016672 0ustar leoguys#ifndef IM_EXP_H #define IM_EXP_H #include "globals.h" #include "picinfo.h" #ifdef __cplusplus extern "C" { #endif extern int im_load_gif(char* fname, PICINFO* to_pic, int from_mem_size); #ifdef __cplusplus } #endif #endif xwelltris-1.0.1/src/image/sublib/makefile.in0100644000175300014110000000444707605543562017357 0ustar leoguys# Image Engine for X Window # # Copyright (C) 1996 by Leo Khramov # email: leo@pop.convey.ru # Fido: 2:5030/627.15 # # 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. # include ../../make.conf @MCOMMON@ IOBJS = SDL_surface.o SDL_rwops.o SDL_error.o SDL_to_picinfo.o \ IMG_gif.o CXXINCLUDES=$(XINC) $(JINC) CXXOPT=-I../.. -I../../include $(CFLAGS) $(DEFS) $(DEB) $(PSEUDO) $(PCX) $(TIFF) $(BMP) $(XBM) $(XPM) $(TGA) $(PCD) $(PNG) all:: $(IOBJS) SDL_surface.o: SDL_surface.c $(CC) -c SDL_surface.c $(CXXOPT) $(INCLUDES) $(CPPFLAGS) SDL_error.o: SDL_error.c $(CC) -c SDL_error.c $(CXXOPT) $(INCLUDES) $(CPPFLAGS) SDL_to_picinfo.o: SDL_to_picinfo.c $(CC) -c SDL_to_picinfo.c $(CXXOPT) $(INCLUDES) $(CPPFLAGS) SDL_rwops.o: SDL_rwops.c $(CC) -c SDL_rwops.c $(CXXOPT) $(INCLUDES) $(CPPFLAGS) IMG_gif.o: IMG_gif.c $(CC) -c IMG_gif.c $(CXXOPT) $(INCLUDES) $(CPPFLAGS) jpeg.o: jpeg.c $(CC) -c jpeg.c $(CXXOPT) $(INCLUDES) $(CPPFLAGS) accel.o: accel.c $(CC) -c accel.c $(CXXOPT) $(CXXINCLUDES) $(CPPFLAGS) pcdr.o: pcdr.c $(CC) -c pcdr.c $(CXXOPT) $(INCLUDES) $(CPPFLAGS) inter.o: inter.c $(CC) -c inter.c $(CXXOPT) $(INCLUDES) $(CPPFLAGS) huff.o: huff.c $(CC) -c huff.c $(CXXOPT) $(INCLUDES) $(CPPFLAGS) file.o: file.c $(CC) -c file.c $(CXXOPT) $(INCLUDES) $(CPPFLAGS) yuv2rgb.o: yuv2rgb.c $(CC) -c yuv2rgb.c $(CXXOPT) $(INCLUDES) $(CPPFLAGS) tiffr.o: tiffr.c $(CC) -c tiffr.c $(CXXOPT) $(INCLUDES) $(CPPFLAGS) png.o: png.c $(CC) -c png.c $(CXXOPT) $(INCLUDES) $(ZINC) $(PNGINC) $(CPPFLAGS) ../zlib/libz.a: cd ../zlib && make ../libpng/libpng.a: cd ../libpng && make pcxr.o: pcxr.c $(CC) -c pcxr.c $(CXXOPT) $(INCLUDES) $(CPPFLAGS) libie.a: $(IOBJS) $(RM) -f libie.a ar rc libie.a $(IOBJS) @RANLIB@ libie.a clean: $(RM) -f libie.a $(RM) -f *.o FORCE: xwelltris-1.0.1/src/image/image.cxx0100644000175300014110000005437607605543562015606 0ustar leoguys/**************************************************************************** * Copyright (C) 1996-98 by Leo Khramov * email: leo@xnc.dubna.su * * 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. ****************************************************************************/ #include "image.h" #include "im_exp.h" #define ACCEL_H #define ABS(x) ((x) > 0 ? (x) : (-(x))) extern "C" void (*im_coding)(unsigned int,unsigned int,unsigned int,char**); extern "C" void im_truetruecoding(unsigned int ir,unsigned int ig,unsigned int ib,char **imdata); extern "C" void im_truenocoding(unsigned int ir,unsigned int ig,unsigned int ib,char **imdata); XColor col; int vclass; Visual *vis; int pcd_resolution=3; int depth,bdep,translation,b_pad=1; int fromMem=0; Colormap defc; PICINFO im; char *trans; uint rmask,gmask,bmask,rsh,bsh,gsh; uint red_rsh,green_rsh,blue_rsh,red_lsh,green_lsh,blue_lsh; XColor *XColorTable; Colormap lcmp; int ptnum,cmptype; char check[256]; int conv24; void (*im_coding256)(char **,int); void im_256truecoding(char**,int); void im_256nocoding(char**,int); void im_256256coding(char**,int); unsigned long *global_pal=NULL; #ifdef PSEUDOCOLOR unsigned long XPixelTable[256]; unsigned long Xfreepix[256]; byte rpart[256]; byte gpart[256]; byte bpart[256]; #endif int im_getpixels(unsigned long* pt) { #ifdef PSEUDOCOLOR if(vclass==PseudoColor) for(int i=0;ibyte_order=MSBFirst; return xim; } #endif char *getpicinfo() { char *tmp=new char[strlen(im.fullInfo)+1]; strcpy(tmp,im.fullInfo); return tmp; } void do_masks(uint mask,uint &lsh,uint &rsh) { lsh=rsh=0; while((mask & 1)==0) {lsh++;mask>>=1;}; while(mask & 1) {rsh++;mask>>=1;}; rsh=8-rsh; } void im_reset_coding() { im_coding256=im_256nocoding; translation=0; } void im_set_coding() { im_coding256=im_256truecoding; translation=1; } long cmap_distance[256]; int XCmapNumColors; XColor *XCmapColorTable=NULL; Colormap XCmapCmap; long im_calc_weight(unsigned short red, unsigned short green, unsigned short blue) { double r=(double)red; double g=(double)green; double b=(double)blue; return (long)sqrt(r*r+g*g+b*b); } void im_init_cmap(Colormap XColorMap) { int i, XNumOfColors; int screen=DefaultScreen(disp); depth=DefaultDepth(disp,screen); vis=DefaultVisual(disp,screen); defc=DefaultColormap(disp,screen); vclass=vis->c_class; XNumOfColors = DisplayCells(disp,DefaultScreen(disp)); if(XCmapColorTable == NULL) XCmapColorTable = (XColor *) malloc(sizeof(XColor) * XNumOfColors); for (i = 0; i < XNumOfColors; i++) XCmapColorTable[i].pixel = i; XQueryColors(disp, XColorMap, XCmapColorTable, XNumOfColors); for(i=0;i< XNumOfColors;i++) { cmap_distance[i]=im_calc_weight(XCmapColorTable[i].red, XCmapColorTable[i].green, XCmapColorTable[i].blue); } XCmapNumColors=XNumOfColors; XCmapCmap=XColorMap; } int im_find_closest_color(XColor* orig, XColor* tocol) { unsigned long weight,distance, Red, Green, Blue, D; int idx=0,i; if(vclass==TrueColor) { *tocol=*orig; return 0; } Red=orig->red; Green=orig->green; Blue=orig->blue; distance=0xffffffff; for(i=0;iflags = DoGreen | DoRed | DoBlue; return 1; } int im_find_closest_color2(XColor* orig, XColor* tocol) { long weight,distance; int idx=0,i; if(vclass==TrueColor) { *tocol=*orig; return 0; } weight=im_calc_weight(orig->red, orig->green, orig->blue); distance=ABS(cmap_distance[idx]-weight); for(i=1;iABS(cmap_distance[i]-weight)) { idx=i; distance=ABS(cmap_distance[i]-weight); } *tocol=XCmapColorTable[idx]; tocol->flags = DoGreen | DoRed | DoBlue; return 1; } Status im_AllocColor(Display* d, Colormap cmap, XColor *cl) { XColor cl2; Status st; if((st=XAllocColor(disp, cmap, cl))!=0) return st; if(cmap!=XCmapCmap || XCmapColorTable==NULL) im_init_cmap(cmap); im_find_closest_color2(cl, &cl2); *cl=cl2; return XAllocColor(disp, cmap, cl); } Status (*pim_AllocColor)(Display*, Colormap, XColor*)=im_AllocColor; void init_imagengine() { XImage* xim; XPixmapFormatValues *pixformat; int i, count; int screen=DefaultScreen(disp); depth=DefaultDepth(disp,screen); vis=DefaultVisual(disp,screen); defc=DefaultColormap(disp,screen); vclass=vis->c_class; fprintf(stderr, "**********Image Engine**********\n"); fprintf(stderr,"* *\n"); switch(vclass) { case TrueColor: pixformat = XListPixmapFormats(disp, &count); for (i=0; ired_mask; gmask=xim->green_mask; bmask=xim->blue_mask; #ifdef PCD_SUPPORT x11_create_lut(rmask,gmask,bmask); #endif do_masks(rmask,red_lsh,red_rsh); do_masks(gmask,green_lsh,green_rsh); do_masks(bmask,blue_lsh,blue_rsh); im_coding=im_truetruecoding; im_coding256=im_256truecoding; fprintf(stderr,"*Visual: TrueColor *\n"); fprintf(stderr,"*Depth: %-3d (%d bytes/pixel) *\n",depth,bdep); fprintf(stderr,"*RGB: %d:%d:%d *\n",8-red_rsh,8-green_rsh,8-blue_rsh); fprintf(stderr,"*Colors: %-9d *\n",1<=0;j--) { trans[i2-j-1]=(char)((col.pixel>>(j<<3))& 0xff); } } } } XImage *LoadXImage(char *file,int cmptype,int type) { int i,j,l,lw,x,y; ulong mask; char *imdata,*imdat; int ind; XImage *xim; ::cmptype=cmptype; if(vclass==DirectColor) return NULL; #ifndef PSEUDOCOLOR if(vclass==PseudoColor) return NULL; #endif if(type==F_AUTO) type=autodetect(file); switch(type) { case F_GIF: translation=0; im_clear_pic(); im_load_gif(file,&im,fromMem); break; case F_JPEG: #ifdef JPEGSUPPORT im_clear_pic(); if(vclass==PseudoColor) translation= 0; else translation= 1; if(LoadJFIF(file,&im)) break; else { fprintf(stderr,"Image Engine: LoadJpeg\n"); return NULL; }; #else return NULL; #endif case F_TIFF: #ifdef TIFFSUPPORT im_clear_pic(); translation= 0; if(LoadTIFF(file,&im)) break;else {fprintf(stderr,"Image Engine: LoadTiff\n");return NULL;}; #else return NULL; #endif case F_PNG: #ifdef PNG_SUPPORT im_clear_pic(); translation= 0; if(LoadPNG(file,&im)) break;else {fprintf(stderr,"Image Engine: LoadPNG\n");return NULL;}; #else return NULL; #endif case F_PCX: #ifdef PCXSUPPORT im_clear_pic(); translation= 0; if(LoadPCX(file,&im)) break;else {fprintf(stderr,"Image Engine: LoadPcx\n");return NULL;}; #else return NULL; #endif case F_PCD: #ifdef PCD_SUPPORT im_clear_pic(); if(vclass==PseudoColor) translation=0; else translation= 1; if(LoadPCD(file,&im)) break;else {fprintf(stderr,"Image Engine: LoadPcd\n");return NULL;}; #else return NULL; #endif case F_XBM: #ifdef XBMSUPPORT im_clear_pic(); translation=0; if(LoadXBM(file,&im)) break;else {fprintf(stderr,"Image Engine: LoadXBM\n");return NULL;}; #else return NULL; #endif case F_XPM: #ifdef XPMSUPPORT im_clear_pic(); translation=0; if(LoadXPM(file,&im)) break;else {fprintf(stderr,"Image Engine: LoadXPM\n");return NULL;}; #else return NULL; #endif case F_BMP: #ifdef BMPSUPPORT im_clear_pic(); translation= 1; if(LoadBMP(file,&im)) break;else {fprintf(stderr,"Image Engine: LoadBmp\n");return NULL;}; #else return NULL; #endif case F_TARGA: #ifdef TGASUPPORT im_clear_pic(); translation=0; if(LoadTarga(file,&im)) break;else {fprintf(stderr,"Image Engine: LoadTGA\n");return NULL;}; #else return NULL; #endif default: return NULL; }; #ifdef PSEUDOCOLOR if(vclass==PseudoColor) { if(im.type==PIC8) return im_process_pseudo_256(im_get_checked()); else { im_convert_true_to_pseudo(im,256); translation=0; return im_process_pseudo_256(conv24!=CONV24_FAST ? 230:256); } } #endif if(im.type==PIC8 && vclass==TrueColor) { if(translation==0) { translation=1; im_init_translation(); translation=0; lw = im.w * bdep; if (lw % b_pad) lw += b_pad - lw % b_pad; l=im.h*im.w; imdata=new char[lw*im.h]; i = 0; for (y=0; ybyte_order=MSBFirst; return xim; } else if(im.type==PIC24 && vclass==TrueColor) { if(translation==0) { lw = im.w * bdep; if (lw % b_pad) lw += b_pad - lw % b_pad; imdata = new char[lw*im.h]; mask = 0xff; i = 0; for (y=0; y < im.h; y++) { imdat = imdata + y * lw; for (x=0; x < im.w; x++, i+=3) im_truetruecoding(im.pic[i],im.pic[i+1],im.pic[i+2],&imdat); } free(im.pic); } else imdata=(char*)im.pic; if((xim=XCreateImage(disp,vis,depth,ZPixmap,0,imdata,im.w,im.h,b_pad*8,0))==NULL) { fprintf(stderr,"Image Engine Error: XCreateImage\n"); delete imdata; return NULL; } xim->byte_order=MSBFirst; return xim; } return NULL; } XImage* encoding256(PICINFO& im,int ncol) { int i,j,l,k,lw; ulong mask; char *trans; char *imdata; int ind,delta; XImage *xim; trans=new char[256*bdep]; col.flags=DoRed | DoGreen | DoBlue; ptnum=0; for(i=0;i=0;j--) { trans[mask-j-1]=(char)((col.pixel>>(j<<3))& 0xff); } } l=im.h*im.w; lw = im.w * bdep; if (lw % b_pad) { lw += b_pad - lw % b_pad; } imdata=new char[im.h*lw]; for (i=0; ibyte_order=MSBFirst; return xim; } void im_256truecoding(char **data,int ind) { char *ltrans=trans+ind*bdep; for(int i=0;iwidth,iim->height,depth); gcw=XCreateGC(disp,im,0,NULL); l=iim->width;h=iim->height; XPutImage(disp,im,gcw,iim,0,0,0,0,l,h); XFreeGC(disp,gcw); delete iim->data;iim->data=NULL;XDestroyImage(iim); return im; } return 0; } Pixmap LoadPixmapFromMem(char *fname,int type,int& l,int& h, int cmptype,int siz) { XImage *iim; Pixmap im; GC gcw; fromMem=siz; iim=LoadXImage(fname,cmptype,type); fromMem=0; if(iim) { im=XCreatePixmap(disp,DefaultRootWindow(disp), iim->width,iim->height,depth); gcw=XCreateGC(disp,im,0,NULL); l=iim->width;h=iim->height; XPutImage(disp,im,gcw,iim,0,0,0,0,l,h); XFreeGC(disp,gcw); delete iim->data;iim->data=NULL;XDestroyImage(iim); return im; } return 0; } void im_populate_pallete(unsigned long* pal) { global_pal=pal; } void im_clear_global_pal() { global_pal=NULL; } xwelltris-1.0.1/src/image/image.h0100644000175300014110000000364407605543562015223 0ustar leoguys#ifndef IMAGE_H #define IMAGE_H #ifdef HAVE_CONFIG_H #include #endif #include "globals.h" #include #include #include "picinfo.h" #include extern Display* disp; extern Colormap defcmp; extern int conv24; extern int vclass; void init_imagengine(); int im_convert_true_to_pseudo(PICINFO& pic,int max_colors); int im_getpixels(unsigned long* pt); Colormap im_get_colormap(); void im_freecmp(Colormap XColorMap,unsigned long *pt,int iptnum); void im_populate_pallete(unsigned long* pal); void im_clear_global_pal(); char *getpicinfo(); Pixmap LoadPixmap(char *fname,int type,int& l,int& h,int cmptype=CMP_AUTO); Pixmap LoadPixmapFromMem(char *fname,int type,int& l,int& h,int cmptype=CMP_AUTO,int siz=0); XImage *LoadXImage(char *file,int cmptype,int type); XImage* encoding256(PICINFO& im,int ncol); int LoadGIF(char* fname,PICINFO* pinfo); int deGIF(char* fbu,PICINFO* pinfo,int fsiz); extern "C" int LoadPCD(char* fname,PICINFO* pinfo); extern "C" int LoadPNG(char *fname,PICINFO* pinfo); int LoadXBM(char* fname,PICINFO* pinfo); int LoadXPM(char* fname,PICINFO* pinfo); int LoadTarga(char* fname,PICINFO* pinfo); extern "C" int LoadTIFF(char* ,PICINFO*); int autodetect(char*); void im_reset_coding(); void im_set_coding(); extern int im_find_closest_color(XColor* orig, XColor* tocol); extern Status im_AllocColor(Display* d, Colormap cmap, XColor *cl); extern void (*im_coding256)(char **,int); extern void im_256truecoding(char**,int); extern void im_init_translation(); extern "C" int LoadJFIF(char *fname, PICINFO *pinfo); extern "C" int LoadPCX(char *fname, PICINFO *pinfo); extern int LoadBMP(char *fname, PICINFO *pinfo); extern "C" void x11_create_lut(unsigned long, unsigned long, unsigned long); extern "C" void set_method(int method); #endif //////////////////////////////////////////End of file/////////////////////////////////////////// /* ------------ End of file -------------- */ xwelltris-1.0.1/src/image/jpeg.c0100644000175300014110000002505407605543562015060 0ustar leoguys/* * example.c * * This file illustrates how to use the IJG code as a subroutine library * to read or write JPEG image files. You should look at this code in * conjunction with the documentation file libjpeg.doc. * * This code will not do anything useful as-is, but it may be helpful as a * skeleton for constructing routines that call the JPEG library. * * We present these routines in the same coding style used in the JPEG code * (ANSI function definitions, etc); but you are of course free to code your * routines in a different style if you prefer. */ #include #define JPEG_IMAGES #include "picinfo.h" #include "accel.h" int myfp; /* * Include file for users of JPEG library. * You will need to have included system headers that define at least * the typedefs FILE and size_t before you can include jpeglib.h. * (stdio.h is sufficient on ANSI-conforming systems.) * You may also wish to include "jerror.h". */ #include /* * is used for the optional error recovery mechanism shown in * the second part of the example. */ #include /******************** JPEG DECOMPRESSION SAMPLE INTERFACE *******************/ /* This half of the example shows how to read data from the JPEG decompressor. * It's a bit more refined than the above, in that we show: * (a) how to modify the JPEG library's standard error-reporting behavior; * (b) how to allocate workspace using the library's memory manager. * * Just to make this example a little different from the first one, we'll * assume that we do not intend to put the whole image into an in-memory * buffer, but to send it line-by-line someplace else. We need a one- * scanline-high JSAMPLE array as a work buffer, and we will let the JPEG * memory manager allocate it for us. This approach is actually quite useful * because we don't need to remember to deallocate the buffer separately: it * will go away automatically when the JPEG object is cleaned up. */ /* * ERROR HANDLING: * * The JPEG library's standard error handler (jerror.c) is divided into * several "methods" which you can override individually. This lets you * adjust the behavior without duplicating a lot of code, which you might * have to update with each future release. * * Our example here shows how to override the "error_exit" method so that * control is returned to the library's caller when a fatal error occurs, * rather than calling exit() as the standard error_exit method does. * * We use C's setjmp/longjmp facility to return control. This means that the * routine which calls the JPEG library must first execute a setjmp() call to * establish the return point. We want the replacement error_exit to do a * longjmp(). But we need to make the setjmp buffer accessible to the * error_exit routine. To do this, we make a private extension of the * standard JPEG error handler object. (If we were using C++, we'd say we * were making a subclass of the regular error handler.) * * Here's the extended error handler struct: */ struct my_error_mgr { struct jpeg_error_mgr pub; /* "public" fields */ jmp_buf setjmp_buffer; /* for return to caller */ }; typedef struct my_error_mgr * my_error_ptr; /* * Here's the routine that will replace the standard error_exit method: */ static void my_error_exit (j_common_ptr cinfo) { /* cinfo->err really points to a my_error_mgr struct, so coerce pointer */ my_error_ptr myerr = (my_error_ptr) cinfo->err; /* Always display the message. */ /* We could postpone this until after returning, if we chose. */ (*cinfo->err->output_message) (cinfo); /* Return control to the setjmp point */ longjmp(myerr->setjmp_buffer, 1); } /* * Sample routine for JPEG decompression. We assume that the source file name * is passed in. We want to return 1 on success, 0 on error. */ int jy=0; char *mybuf; int jgray=0; static int line_w; void put_jpegdata(unsigned char* b,int l) { int i; char *buf; buf = mybuf; if(jgray) for(i=0;iw=cinfo.image_width; pc->h=cinfo.image_height; pc->pic=(byte*) im_alloc_true(pc->w,pc->h); pc->type=PIC24; mybuf=(char*) pc->pic; line_w = im_get_linew_true(pc->w); if(jgray) sprintf(pc->fullInfo,"%d x %d JPEG image (Grayscale format)",pc->w,pc->h); else sprintf(pc->fullInfo,"%d x %d JPEG image (RGB format)",pc->w,pc->h); /* Step 4: set parameters for decompression */ /* In this example, we don't need to change any of the defaults set by * jpeg_read_header(), so we do nothing here. */ /* Step 5: Start decompressor */ (void) jpeg_start_decompress(&cinfo); /* We can ignore the return value since suspension is not possible * with the stdio data source. */ /* We may need to do some setup of our own at this point before reading * the data. After jpeg_start_decompress() we have the correct scaled * output image dimensions available, as well as the output colormap * if we asked for color quantization. * In this example, we need to make an output work buffer of the right size. */ /* JSAMPLEs per row in output buffer */ row_stride = cinfo.output_width * cinfo.output_components; /* Make a one-row-high sample array that will go away when done with image */ buffer = (*cinfo.mem->alloc_sarray) ((j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1); /* Step 6: while (scan lines remain to be read) */ /* jpeg_read_scanlines(...); */ /* Here we use the library's state variable cinfo.output_scanline as the * loop counter, so that we don't have to keep track ourselves. */ while (cinfo.output_scanline < cinfo.output_height) { /* jpeg_read_scanlines expects an array of pointers to scanlines. * Here the array is only one element long, but you could ask for * more than one scanline at a time if that's more convenient. */ (void) jpeg_read_scanlines(&cinfo, buffer, 1); /* Assume put_scanline_someplace wants a pointer and sample count. */ put_jpegdata((unsigned char*) buffer[0], row_stride); } /* Step 7: Finish decompression */ (void) jpeg_finish_decompress(&cinfo); /* We can ignore the return value since suspension is not possible * with the stdio data source. */ /* Step 8: Release JPEG decompression object */ /* This is an important step since it will release a good deal of memory. */ jpeg_destroy_decompress(&cinfo); /* After finish_decompress, we can close the input file. * Here we postpone it until after no more JPEG errors are possible, * so as to simplify the setjmp error logic above. (Actually, I don't * think that jpeg_destroy can do an error exit, but why assume anything...) */ fclose(infile); /* At this point you may want to check to see whether any corrupt-data * warnings occurred (test whether jerr.pub.num_warnings is nonzero). */ /* And we're done! */ return 1; } /* * SOME FINE POINTS: * * In the above code, we ignored the return value of jpeg_read_scanlines, * which is the number of scanlines actually read. We could get away with * this because we asked for only one line at a time and we weren't using * a suspending data source. See libjpeg.doc for more info. * * We cheated a bit by calling alloc_sarray() after jpeg_start_decompress(); * we should have done it beforehand to ensure that the space would be * counted against the JPEG max_memory setting. In some systems the above * code would risk an out-of-memory error. However, in general we don't * know the output image dimensions before jpeg_start_decompress(), unless we * call jpeg_calc_output_dimensions(). See libjpeg.doc for more about this. * * Scanlines are returned in the same order as they appear in the JPEG file, * which is standardly top-to-bottom. If you must emit data bottom-to-top, * you can use one of the virtual arrays provided by the JPEG memory manager * to invert the data. See wrbmp.c for an example. * * As with compression, some operating modes may require temporary files. * On some systems you may need to set up a signal handler to ensure that * temporary files are deleted if the program is interrupted. See libjpeg.doc. */ /* void main(int argc,char **argv) { PICINFO ppp; LoadJFIF(argv[1],&ppp); } */ xwelltris-1.0.1/src/image/makefile.in0100644000175300014110000000215207605543562016066 0ustar leoguys# Image Engine for X Window # # Copyright (C) 1996 by Leo Khramov # email: leo@pop.convey.ru # Fido: 2:5030/627.15 # # 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. # include ../make.conf @MCOMMON@ .SUFFIXES: .c .c.o: $(CC) -c $(CXXOPT) $(CPPFLAGS) -o $@ $< IOBJS= \ sublib/SDL_error.o \ sublib/SDL_rwops.o \ sublib/SDL_surface.o \ sublib/SDL_to_picinfo.o \ sublib/IMG_gif.o \ image.o \ convert.o \ accel.o CXXINCLUDES=$(XINC) -I./sublib CXXOPT=$(CFLAGS) $(DEFS) $(DEB) $(XINC) -I. -I../include -I./sublib all:: $(IOBJS) clean: $(RM) -f *.o $(RM) -f sublib/*.o FORCE: xwelltris-1.0.1/src/image/picinfo.h0100644000175300014110000000570107605543562015564 0ustar leoguys#ifndef PICINFO_H #define PICINFO_H #include "config.h" #include "globdef.h" #ifdef HAVE_SYS_SIGEVENT_H #include #endif #include #include #include #include #include #include #ifndef __FreeBSD__ #elif ! defined __OpenBSD__ #include #endif #include #include /* #undef PARM #ifdef __STDC__ # define PARM(a) a #else # define PARM(a) () # define const #endif */ #define MONO(rr,gg,bb) (((rr)*11+(gg)*16+(bb)*5)>>5) /*0.33r+0.5g+0.17b*/ #ifndef PCD_DEFS #define RANGE(a,b,c) {if(ac) a=c;} #endif #define GETWD(x) getcwd(x,sizeof(x)) #define True 1 #define False 0 #define TRUE 1 #define FALSE 0 #define F_COLORS 0 #define F_FORMAT 1 #define PIC8 0 #define PIC24 1 #define F_FULLCOLOR 0 #define F_GREYSCALE 1 #define F_BWDITHER 2 #define F_REDUCED 3 #define CMP_AUTO 0 #define CMP_OWN 1 #define CMP_COM 2 #define F_GIF 0 #define F_PM 1 #define F_PBMRAW 2 #define F_PBMASCII 3 #define F_XBM 4 #define F_SUNRAS 5 #define F_BMP 6 #define F_PS 7 #define F_IRIS 8 #define F_JPEG 9 #define F_AUTO 11 #define F_TIFF 10 #define F_PCX 12 #define F_TARGA 13 #define F_XPM 14 #define F_PCD 15 #define F_PNG 16 #define CONV24_FAST 5 #define CONV24_SLOW 6 #define CONV24_BEST 7 #define ALG_NONE 0 #define ALG_BLUR3 2 #define ALG_BLUR5 3 #define ALG_BLUR7 4 #define ALG_BLUR9 1 #define ALG_EDGE 5 #define ALG_TINF 6 #define ALG_OIL 7 #define ALG_GRAY 8 typedef unsigned char byte; #ifndef JPEG_IMAGES #ifndef PCD_DEFS #ifndef u_short typedef unsigned short u_short; #endif #ifndef u_char typedef unsigned char u_char; #endif #ifndef u_int typedef unsigned int u_int; #endif #ifndef u_long typedef unsigned long u_long; #endif #endif #endif extern int numcols; extern float normaspect; extern int conv24; extern int noqcheck; extern int picType,pWIDE,pHIGH,ncols; extern byte bMap[256],gMap[256],rMap[256]; extern byte* pic; extern byte colAllocOrder[256]; typedef struct { byte *pic; /* image data */ int w, h; /* size */ int type; /* PIC8 or PIC24 */ byte pal[768]; /* colormap, if PIC8 */ int frmType; /* def. Format type to save in */ int colType; /* def. Color type to save in */ char fullInfo[128]; /* Format: field in info box */ char shrtInfo[128]; /* short format info */ char *comment; /* comment text */ int numpages; /* # of page files, if >1 */ char pagebname[64]; /* basename of page files */ } PICINFO; #endif /* ------------ End of file -------------- */ xwelltris-1.0.1/src/Make.common.in0100644000175300014110000000244607625410061015366 0ustar leoguys# ./Make.common.in -*- Makefile -*- # Makefile common definisions for XNC Project # srcdir = @srcdir@ VPATH = @srcdir@ SHELL = /bin/sh # Installation target directories & other installation stuff prefix = @prefix@ exec_prefix = @exec_prefix@ binprefix = manprefix = bindir = @bindir@ mandir = @mandir@/man1 manext = 1 # Tools & program stuff CC = @CC@ CXX = @CXX@ CPP = @CPP@ RM = @RM@ RMF = @RM@ -f CP = @CP@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL@ -s -m 755 INSTALL_DATA = @INSTALL@ -m 644 INSTALL_SHARE_DATA = @INSTALL@ -m 666 INS=@INSTALL@ -m 755 INSM=@INSTALL@ -m 644 INSD=@INSTALL@ -d -m 755 INSOWN=@INSTALL@ INSTDIR=@prefix@/bin INSTLIB=@prefix@/share/xwelltris INSTMAN=@prefix@/man DEB=@DEB@ STRIPPING= XINC=@X_CFLAGS@ XLIBS=@X_PRE_LIBS@ @X_LIBS@ @X_EXTRA_LIBS@ -lX11 -lXext CFLAGS = @CFLAGS@ $(PLUGINFLAGS) CPPFLAGS = @CPPFLAGS@ #-DHAVE_LIBXPM LDFLAGS = @LDFLAGS@ SHAREFLAGS = @SHAREFLAGS@ LD_SHAREFLAGS= @LD_SHAREFLAGS@ PLUGINS = @PLUGINS@ DEFS = @DEFS@ LIBS = @LIBS@ INCLUDES=-DHAVE_CONFIG_H -I. -I./.. -I./image -I./include -I../include # extra libraries needed by X on some systems, X library location XLIB = @X_LIBS@ @X_PRE_LIBS@ -lX11 @X_EXTRA_LIBS@ #-L/usr/local/lib -lXpm .SUFFIXES: .cxx .c .cxx.o: $(CXX) -c $(CXXINCLUDES) $(INCLUDES) $(CXXOPT) $< -o $@ # End of Make.common xwelltris-1.0.1/src/commonfuncs.cxx0100644000175300014110000000446407627346007015761 0ustar leoguys// docm_prefix(///) /**************************************************************************** * Copyright (C) 2002 by Leo Khramov * email: leo@xnc.dubna.su * * 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. ****************************************************************************/ // $Id: commonfuncs.cxx,v 1.3 2003/02/27 08:27:51 leo Exp $ #include "commonfuncs.h" //=========================================================================== /// global find_full_path_for_file(char* fname, char* ret_full_pathname, FMode mode) /// find file in global and local dirs and return full pathname /// tags common_funcs bool find_full_path_for_file(char* name, char* ret_full_pathname, FMode mode) { #ifndef WIN32 int fd; char *home=getenv("HOME"); mode_t fmode=O_RDONLY; switch(mode) { case ReadOnly: fmode=O_RDONLY; break; case ReadWrite: fmode=O_RDWR; break; } do { sprintf(ret_full_pathname,"%s/%s",GLOBAL_SEARCH,name); //First check in GLOBAL_SEARCH dir fd=open(ret_full_pathname,fmode); if(fd>0) break; sprintf(ret_full_pathname,"%s/%s/%s",home,LOCAL_SEARCH,name); //Then in LOCAL one fd=open(ret_full_pathname,fmode); if(fd>0) break; sprintf(ret_full_pathname,"./%s",name); //Then in current dir fd=open(ret_full_pathname,fmode); if(fd>0) break; sprintf(ret_full_pathname,"./data/%s",name); //And finally in ./data fd=open(ret_full_pathname,fmode); if(fd>0) break; fprintf(stderr,"ERROR: Can't find file %s in:\n\t./\n\t./data\n\t%s/%s\n\t%s\n", name,home,LOCAL_SEARCH,GLOBAL_SEARCH); return false; } while(0); close(fd); return true; #else FILE *fp; sprintf(ret_full_pathname,"data\\%s",name); //And finally in ./data fp=fopen(ret_full_pathname, "r"); if(fp) { fclose(fp); return true; } return false; #endif } xwelltris-1.0.1/src/geometry.cxx0100644000175300014110000001542607605543562015266 0ustar leoguys// docm_prefix(///) /**************************************************************************** * Copyright (C) 2002 by Leo Khramov * email: leo@xnc.dubna.su * * 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. ****************************************************************************/ // $Id: geometry.cxx,v 1.1.1.1 2003/01/04 11:37:22 leo Exp $ #include "globals.h" #include "geometry.h" //imNone means simple clear this area with background image :) Geo top_key_exit[]= { // image srcx srcy dstx dsty len hei { imNone, 0, 0, 734, 550, 57, 40 }, //Normal view { imCuts, 0, 365, 734, 550, 57, 39 }, //Highlighted { imNone, 0, 0, 734, 550, 57, 40 }, //Pressed }; Geo intro_key_exit[]= { // image srcx srcy dstx dsty len hei { imNone, 0, 0, 734, 550, 57, 40 }, //Normal view { imCuts, 0, 365, 734, 550, 57, 40 }, //Highlighted { imNone, 0, 0, 734, 550, 57, 40 }, //Pressed }; Geo intro_key_new_game[]= { // image srcx srcy dstx dsty len hei { imNone, 0, 0, 332, 500, 130, 40 }, //Normal view { imCuts, 0, 215, 332, 500, 130, 40 }, //Highlighted { imNone, 0, 0, 332, 500, 130, 40 }, //Pressed }; Geo intro_key_top_nine[]= { // image srcx srcy dstx dsty len hei { imNone, 0, 0, 333, 544, 123, 41 }, //Normal view { imCuts, 0, 255, 333, 544, 123, 41 }, //Highlighted { imNone, 0, 0, 333, 544, 123, 41 }, //Pressed }; Geo intro_key_plus[]= { // image srcx srcy dstx dsty len hei { imNone, 0, 0, 720, 400, 25, 25 }, //Normal view { imNone, 0, 0, 720, 400, 25, 25 }, //Highlighted { imNone, 0, 0, 720, 400, 25, 25 }, //Pressed }; Geo intro_key_minus[]= { // image srcx srcy dstx dsty len hei { imNone, 0, 0, 640, 405, 25, 17 }, //Normal view { imNone, 0, 0, 640, 405, 25, 17 }, //Highlighted { imNone, 0, 0, 640, 405, 25, 17 }, //Pressed }; Geo game_elements[]= { // image srcx srcy dstx dsty len hei { imCuts, 160, 0, 130, 120, 296, 215 }, //Pause image { imCuts, 120, 0, 603, 469, 30, 26 }, //Rotation image { imCuts, 120, 38, 608, 509, 26, 16 }, //Next piece image { imCuts, 120, 76, 610, 539, 22, 24 }, //Mixed image }; Geo top_nine_elements[]= { // image srcx srcy dstx dsty len hei { imCuts, 90, 365, 704, 119, 25, 26 }, //Rotation image { imCuts, 115, 365, 729, 119, 33, 26 }, //Next piece image { imCuts, 148, 365, 762, 119, 18, 26 }, //Mixed image }; Geo intro_sw_rotation[]= { // image srcx srcy dstx dsty len hei { imNone, 0, 0, 640, 225, 93, 34 }, //Normal view { imCuts, 0, 298, 640, 225, 93, 34 }, //Highlighted { imCuts, 120, 296, 739, 228, 25, 25 }, //Pressed }; Geo intro_sw_next_piece[]= { // image srcx srcy dstx dsty len hei { imNone, 0, 0, 616, 268, 116, 35 }, //Normal view { imCuts, 0, 330, 616, 268, 116, 35 }, //Highlighted { imCuts, 120, 330, 739, 270, 25, 25 }, //Pressed }; Geo intro_sw_mixed[]= { // image srcx srcy dstx dsty len hei { imNone, 0, 0, 65, 379, 71, 35 }, //Normal view { imCuts, 0, 180, 65, 379, 71, 35 }, //Highlighted { imCuts, 90, 180, 35, 385, 25, 25 }, //Pressed }; Geo intro_sw_square0[]= { // image srcx srcy dstx dsty len hei { imNone, 0, 0, 65, 115, 75, 38 }, //Normal view { imCuts, 0, 0, 65, 115, 75, 38 }, //Highlighted { imCuts, 90, 0, 35, 122, 25, 25 }, //Pressed }; Geo intro_sw_square1[]= { // image srcx srcy dstx dsty len hei { imNone, 0, 0, 65, 158, 77, 38 }, //Normal view { imCuts, 0, 38, 65, 158, 77, 38 }, //Highlighted { imCuts, 90, 38, 35, 167, 25, 25 }, //Pressed }; Geo intro_sw_square2[]= { // image srcx srcy dstx dsty len hei { imNone, 0, 0, 65, 205, 70, 34 }, //Normal view { imCuts, 0, 76, 65, 205, 70, 34 }, //Highlighted { imCuts, 90, 76, 35, 209, 25, 25 }, //Pressed }; Geo intro_sw_square3[]= { // image srcx srcy dstx dsty len hei { imNone, 0, 0, 65, 248, 89, 35 }, //Normal view { imCuts, 0, 109, 65, 248, 89, 35 }, //Highlighted { imCuts, 90, 109, 35, 254, 25, 25 }, //Pressed }; Geo intro_sw_square4[]= { // image srcx srcy dstx dsty len hei { imNone, 0, 0, 65, 292, 78, 35 }, //Normal view { imCuts, 0, 145, 65, 292, 78, 35 }, //Highlighted { imCuts, 90, 145, 35, 296, 25, 25 }, //Pressed }; Geo intro_sw_square5[]= { // image srcx srcy dstx dsty len hei { imNone, 0, 0, 65, 392, 78, 35 }, //Normal view { imCuts, 0, 145, 65, 392, 78, 35 }, //Highlighted { imCuts, 90, 145, 35, 396, 25, 25 }, //Pressed }; Geo intro_inp_player_name[]= { // image srcx srcy dstx dsty len hei { imCuts, 170, 215, 211, 205, 357, 154 }, //full view { imCuts, 0, 0, 240, 297, 299, 30 }, //input area { imCuts, 90, 145, 35, 296, 25, 25 }, //Pressed }; // Array of all objects geometry GeoObject all_objects[]= { { "top_key_exit" , top_key_exit }, { "intro_key_exit" , intro_key_exit }, { "intro_key_new_game", intro_key_new_game }, { "intro_key_top_nine", intro_key_top_nine }, { "intro_key_minus" , intro_key_minus }, { "intro_key_plus" , intro_key_plus }, { "the_game" , game_elements }, { "top_nine_elements" , top_nine_elements }, { "intro_sw_rotation" , intro_sw_rotation }, { "intro_sw_next" , intro_sw_next_piece }, { "intro_sw_mixed" , intro_sw_mixed }, { "intro_sw_square0" , intro_sw_square0 }, { "intro_sw_square1" , intro_sw_square1 }, { "intro_sw_square2" , intro_sw_square2 }, { "intro_sw_square3" , intro_sw_square3 }, { "intro_sw_square4" , intro_sw_square4 }, { "intro_sw_square5" , intro_sw_square5 }, { "intro_inp_player" , intro_inp_player_name }, { "empty", 0} }; //=========================================================================== /// global get_geo_by_name(char* fname) /// find geometry structures for object by given name /// tags geometry Geo* get_geo_by_name(char* name) { int i=0; while(all_objects[i].geo) { if(!strcmp(all_objects[i].name,name)) return all_objects[i].geo; i++; } return 0; } xwelltris-1.0.1/src/main.cxx0100644000175300014110000000431307624651653014352 0ustar leoguys// docm_prefix(///) /**************************************************************************** * Copyright (C) 2002 by Leo Khramov * email: leo@xnc.dubna.su * * 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. ****************************************************************************/ // $Id: main.cxx,v 1.3 2003/02/19 09:51:39 leo Exp $ /// module description /// Main module - init the game, create main objects and entering in event loop #include "wellengine.h" #include "wellclass.h" #include "wellintro.h" WellBase *game_object; WellIntro *game_intro; //=========================================================================== /// global main(int, char**) /// main function - start of the game /// tags main int main(int argc, char** argv) { default_well_engine=new_well_engine(argc,argv); game_intro= default_well_engine->new_well_intro(); default_top_nine=default_well_engine->new_well_top_nine(); game_object= default_well_engine->new_well_base(); default_top_nine->load_scores(); game_intro->set_well_base(game_object); game_object->init(default_well_engine); game_object->set_object_on_game_over(ObjectCaller(default_top_nine, &WellObject::show_by_call)); game_intro->set_object_on_new_game(ObjectCaller(game_object, &WellObject::process_event)); game_intro->set_object_on_top_nine(ObjectCaller(default_top_nine, &WellObject::show_by_call)); default_top_nine->set_object_on_exit(ObjectCaller(game_intro, &WellObject::show_by_call)); default_well_engine->show_main(); game_intro->show(); default_well_engine->event_loop(); default_top_nine->save_scores(); game_intro->save_options(); delete game_object; delete default_top_nine; delete default_well_engine; return 0; } xwelltris-1.0.1/src/makefile.in0100644000175300014110000000526007642322776015012 0ustar leoguys# XWelltris - a tetris like game # # Copyright (C) 2002 by Leo Khramov # email: leo@xnc.dubna.su # # # 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 2 for more details. # include make.conf @MCOMMON@ .c.o: $(CC) -c $(CXXINCLUDES) $(INCLUDES) $(CXXOPT) $< -o $@ IFACELIBS=@IFACELIBS@ IFACEINC=@IFACEINC@ IFACEOBJS=@IFACEOBJS@ X11IMAGE = \ image/sublib/SDL_error.o \ image/sublib/SDL_rwops.o \ image/sublib/SDL_surface.o \ image/sublib/SDL_to_picinfo.o \ image/sublib/IMG_gif.o \ image/image.o \ image/convert.o \ image/accel.o X11OBJS = \ x11/xwellengine.o \ x11/xwelldrawing.o \ x11/xwellinput.o \ x11/xwellimagefont.o SDLOBJS = \ sdl/sdl_gfxprimitives.o \ sdl/sdlwellengine.o \ sdl/sdlwellimagefont.o \ sdl/sdlwellinput.o \ sdl/sdlwelldrawing.o OBJS = \ mydebug.o \ main.o \ rndgen.o \ geometry.o \ commonfuncs.o \ wellclass.o \ welldrawing.o \ wellengine.o \ wellsimpledraw.o \ wellimagefont.o \ welltopnine.o \ wellintro.o \ wellkey.o \ wellswitch.o \ wellinput.o \ $(IFACEOBJS) CXXINCLUDES=$(IFACEINC) CXXOPT=$(DEFS) $(DEB) $(CFLAGS) LOCAL_LIBRARIES=$(IFACELIBS) $(LIBS) PROGRAM =../xwelltris all:: $(PROGRAM) image/sublib/SDL_error.o: image/sublib/SDL_error.c cd image && make sublib/SDL_error.o image/sublib/SDL_surface.o: image/sublib/SDL_surface.c cd image && make sublib/SDL_surface.o image/sublib/SDL_rwops.o: image/sublib/SDL_rwops.c cd image && make sublib/SDL_rwops.o image/sublib/SDL_to_picinfo.o: image/sublib/SDL_to_picinfo.c cd image && make sublib/SDL_to_picinfo.o image/sublib/IMG_gif.o: image/sublib/IMG_gif.c cd image && make sublib/IMG_gif.o image/accel.o: image/accel.c cd image && make accel.o image/image.o: image/image.cxx cd image && make image.o image/convert.o: image/convert.cxx cd image && make convert.o $(JLOC): FORCE -(cd jpeg && make) $(PROGRAM): $(OBJS) $(CXX) -o $@ $(OBJS) $(DEB) $(STRIPPING) $(CFLAGS) $(LDFLAGS) $(LOCAL_LIBRARIES) mydebug.o: mydebug.c $(CC) -c $< $(CXXOPT) $(CXXINCLUDES) $(INCLUDES) $(CPPFLAGS) clean: $(RM) -f *.o $(RM) -f */*.o (cd image && make clean) tags: FORCE etags *.cxx x11/*.cxx sdl/*.cxx include/*.h FORCE: xwelltris-1.0.1/src/mydebug.c0100644000175300014110000000201707605543562014477 0ustar leoguys/**************************************************************************** * Copyright (C) 2001 by Leo Khramov * email: leo@xnc.dubna.su * * 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. ****************************************************************************/ //This file contains C functions useful for debugging xnc -> printing. #include "mydebug.h" int debprintf(const char *format,...) { va_list args; int n; va_start(args, format); n = fprintf(stderr, "[dbg] "); n += vfprintf(stderr, format, args); va_end(args); fflush(stderr); return (n); } xwelltris-1.0.1/src/rndgen.cxx0100644000175300014110000000325107605543562014701 0ustar leoguys// docm_prefix(///) /**************************************************************************** * Copyright (C) 2002 by Leo Khramov * email: leo@xnc.dubna.su * * 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. ****************************************************************************/ // $Id: rndgen.cxx,v 1.1.1.1 2003/01/04 11:37:22 leo Exp $ /// module description /// Dr. Park's algorithm published in the Oct. '88 ACM /// "Random Number Generators: Good Ones Are Hard To Find" /// His version available at ftp://cs.wm.edu/pub/rngs.tar /// Present form by many authors. static int Seed = 1; /* This is required to be 32 bits long */ //=========================================================================== /// global SetRNG(long) /// Set random seed generator, /// Given an integer, this routine initializes the RNG seed. /// tags random_gen void SetRNG(long s) { Seed = (int) s; } //=========================================================================== /// global LongRNG() /// Returns an pseudo random integer between 0 and 2147483647, inclusive. /// tags random_gen long LongRNG() { if ((Seed = Seed % 44488 * 48271 - Seed / 44488 * 3399) < 0) Seed += 2147483647; return (long) (Seed - 1); } xwelltris-1.0.1/src/wellclass.cxx0100644000175300014110000012727707625410061015421 0ustar leoguys// docm_prefix(///) /**************************************************************************** * Copyright (C) 2002 by Leo Khramov * email: leo@xnc.dubna.su * * 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. ****************************************************************************/ /* # Original algorithm with polyominoes by # # David A. Bagley, bagleyd@bigfoot.com # # Q. Alex Zhao, azhao@cc.gatech.edu # $Id: wellclass.cxx,v 1.3 2003/02/21 11:40:33 leo Exp $ */ /// module description /// Main class that is the game itself - contains game board, generate figures /// drop it to the field, and interacts with the user. #include "wellclass.h" #include "wellengine.h" #include "welldrawing.h" #include "commonfuncs.h" static int speeds[NUM_LEVELS] = { 100, 92, 84, 76, 68, 60, 53, 46, 39, 32, 26, 20, 15, 11, 8, 5, 3, 1, 0}; //=========================================================================== /// global WellBase() /// Constructor of base class - loads polyominoes and init structs /// tags WellBase WellBase::WellBase() : WellObject() { int turn_style, number_polyominoes; dre=0; level=0; rows=score=0; pause=steps_to_rotate=0; player_name[0]=0; set_default_options(); SRAND(time(NULL)); read_polyominoes(); turn_style = tris[squares - MIN_SQUARES].mode[diagonal].turn_style; if (turn_style < 0 || turn_style >= MAX_TYPES) { fprintf(stderr, "Welltris: corrupted input file %s\n", POLYOMINOFILE); fprintf(stderr, "\tturn_style = %d.\n", turn_style); exit(1); } number_polyominoes = tris[squares - MIN_SQUARES].mode[diagonal].number[mixed][turn_style]; if (number_polyominoes <= 0 || number_polyominoes > MAX_START_POLYOMINOES) { fprintf(stderr, "Welltris: corrupted input file %s\n", POLYOMINOFILE); fprintf(stderr, "\tnumber_polyominoes = %d.\n", number_polyominoes); exit(1); } geo=get_geo_by_name("the_game"); } //=========================================================================== /// global new_game() /// set params for new game /// tags WellBase void WellBase::new_game() { int i,j; for (j = 0; j < MAX_DEPTH; j++) for (i = 0; i < MAX_PERIMETER; i++) { wall[j][i].pmid = EMPTY; wall[j][i].cid = 0; } for (j = 0; j < MAX_WIDTH; j++) for (i = 0; i < MAX_WIDTH; i++) { base[j][i].pmid = EMPTY; base[j][i].cid = 0; } for (i = 0; i < MAX_SIDES; i++) frozen_wall[i] = 0; dre->set_inner_alpha(30); dre->set_outer_alpha(0); dre->set_field_sizes(20,20,14,18); dre->calc_grid_points(); dre->set_field_id(0); rows=score=0; if(rotation) steps_to_rotate=level; else steps_to_rotate=0; new_level_calc(); new_thing(); check_freeze(); new_thing(); player_score=new Score; player_score->set_player(player_name); player_score->squares=squares; player_score->set_params(score,rows,level); player_score->next_piece=showNext; player_score->rotation=rotation; player_score->mixed=mixed; } //=========================================================================== /// global init(WellEngine*) /// init class and other related stuff /// tags WellBase void WellBase::init(WellEngine* we) { //Additional init's such as read defaults.... dbgprintf(("WellBase: game board size: %dx%d\n",VIEW_L,VIEW_H)); //And Draw Engine inits if(dre==0) dre=we->new_well_drawing_engine(); dre->init(NUM_ROT_STEPS,VIEW_X,VIEW_Y,VIEW_L,VIEW_H); txt_score=we->new_well_image_font(imFont1,FONT2_L,FONT2_H,FONT2_DX,FONT2_DY); txt_score->set_screen_region(SCORE_REG_X,SCORE_REG_Y, SCORE_REG_L,SCORE_REG_H); txt_lines=we->new_well_image_font(imFont1,FONT1_L,FONT1_H,FONT1_DX,FONT1_DY); txt_lines->set_screen_region(LINES_REG_X,LINES_REG_Y, LINES_REG_L,LINES_REG_H); txt_levelup=we->new_well_image_font(imFont1,FONT1_L,FONT1_H,FONT1_DX,FONT1_DY); txt_levelup->set_screen_region(LEVUP_REG_X,LEVUP_REG_Y, LEVUP_REG_L,LEVUP_REG_H); txt_level=we->new_well_image_font(imFont1,FONT1_L,FONT1_H,FONT1_DX,FONT1_DY); txt_level->set_screen_region(LEVEL_REG_X,LEVEL_REG_Y, LEVEL_REG_L,LEVEL_REG_H); txt_first=we->new_well_image_font(imFont1,FONT1_L,FONT1_H,FONT1_DX,FONT1_DY); txt_first->set_screen_region(CHAL1_REG_X,CHAL1_REG_Y, CHAL_REG_L,CHAL_REG_H); txt_second=we->new_well_image_font(imFont1,FONT1_L,FONT1_H,FONT1_DX,FONT1_DY); txt_second->set_screen_region(CHAL2_REG_X,CHAL2_REG_Y, CHAL_REG_L,CHAL_REG_H); txt_third=we->new_well_image_font(imFont1,FONT1_L,FONT1_H,FONT1_DX,FONT1_DY); txt_third->set_screen_region(CHAL3_REG_X,CHAL3_REG_Y, CHAL_REG_L,CHAL_REG_H); } //=========================================================================== /// global new_level_calc() /// calculate params for new level /// tags WellBase void WellBase::new_level_calc() { rows_levelup=THRESHOLD(level); if(shown) { if(rotation) make_rotation(); default_well_engine->del_timer(this); default_well_engine->add_timer(this,speeds[level]); } } //========================================================================== /// global set_default_option() /// set options needed by the game to its default values /// tags WellBase void WellBase::set_default_options() { bonusNow=false; showNext=true; beep=false; diagonal=false; mixed=true; bonus=true; grid=true; cw=true; gradualAppear=false; squares=4; rotation=true; } //=========================================================================== /// global read_polyominoes() /// reading polyominoes (our game figures) info from file /// tags WellBase void WellBase::read_polyominoes() { char fname[L_MAXPATH]; int c, i, j, k, sq, polyomino, sum, start, n, size, height, diag, game, toss = 0; int counter[MAX_SQUARES - MIN_SQUARES + 1]; int start_counter[MAX_SQUARES - MIN_SQUARES + 1][MAX_MODES][MAX_TYPES]; FILE *fp; find_full_path_for_file(POLYOMINOFILE,fname,ReadOnly); for (sq = 0; sq <= MAX_SQUARES - MIN_SQUARES; sq++) { counter[sq] = 0; for (polyomino = 0; polyomino < MAX_POLYOMINOES; polyomino++) for (j = 0; j < MAX_SQUARES; j++) for (i = 0; i < MAX_SQUARES; i++) tris[sq].polyomino[polyomino].shape[j][i] = 0; for (j = 0; j < MAX_TYPES; j++) { for (polyomino = 0; polyomino < MAX_START_POLYOMINOES; polyomino++) { tris[sq].mode[NODIAG].start[polyomino][j] = 0; tris[sq].mode[DIAGONAL].start[polyomino][j] = 0; } start_counter[sq][NODIAG][j] = 0; start_counter[sq][DIAGONAL][j] = 0; tris[sq].mode[NODIAG].number[NOMIX][j] = 0; tris[sq].mode[DIAGONAL].number[NOMIX][j] = 0; tris[sq].mode[NODIAG].number[MIXED][j] = 0; tris[sq].mode[DIAGONAL].number[MIXED][j] = 0; } tris[sq].mode[NODIAG].turn_style = NONE; tris[sq].mode[DIAGONAL].turn_style = NONE; } if ((fp = fopen(fname, "r")) == (FILE *)NULL) { (void) fprintf(stderr, "Can not open input file, %s\n.", POLYOMINOFILE); exit(1); } else { while ((c = getc(fp)) != EOF) { if (c == '/') { while ((c = getc(fp)) != '/') {} c = getc(fp); } if (c == '+') { (void) fscanf(fp, "%d", &k); sq = k - MIN_SQUARES; for (i = 0; i < MAX_TYPES; i++) { (void) fscanf(fp, "%d", &k); tris[sq].mode[NODIAG].number[NOMIX][i] = k; } (void) fscanf(fp, "%d", &k); tris[sq].mode[NODIAG].turn_style = k; (void) fscanf(fp, "%d", &k); tris[sq].diagonal_switch = k; if (tris[sq].diagonal_switch == true) { for (i = 0; i < MAX_TYPES; i++) { (void) fscanf(fp, "%d", &k); tris[sq].mode[DIAGONAL].number[NOMIX][i] = k; } (void) fscanf(fp, "%d", &k); tris[sq].mode[DIAGONAL].turn_style = k; } c = getc(fp); } if (c == '*') { (void) fscanf (fp, "%d", &size); c = getc(fp); } if (c == '~') /* Useful for debugging Things */ { (void) fscanf (fp, "%d", &toss); c = getc(fp); } if (c == '#') { (void) fscanf(fp, "%d", &k); sq = k - MIN_SQUARES; (void) fscanf(fp, "%d", &n); if (tris[sq].diagonal_switch == true) (void) fscanf(fp, "%d", &n); for (polyomino = 0; polyomino <= toss; polyomino++) while ((c = getc(fp)) != EOF && c != '\n'); for (polyomino = 0; polyomino < n - toss; polyomino++) { sum = polyomino + counter[sq]; /* This is only there to "read" input file */ (void) fscanf(fp, "%d", &k); (void) fscanf(fp, "%d", &k); tris[sq].polyomino[sum].rotation = k + counter[sq] - toss; (void) fscanf(fp, "%d", &k); tris[sq].polyomino[sum].reflection = k + counter[sq] - toss; for (game = JUMPIN; game <= GRADUAL; game++) { (void) fscanf(fp, "%d", &height); if (!gradualAppear && game == JUMPIN) tris[sq].polyomino[sum].start_height = height; else if (gradualAppear && game == GRADUAL) tris[sq].polyomino[sum].start_height = height; for (diag = NODIAG; diag <= tris[sq].diagonal_switch; diag++) { (void) fscanf(fp, "%d", &start); if (game == JUMPIN) { if (sq == 0 || tris[sq - 1].mode[diag].turn_style == NONE) { i = start_counter[sq][diag][NONE]; tris[sq].mode[diag].start[i][NONE] = sum; start_counter[sq][diag][NONE]++; } if ((sq == 0 || tris[sq - 1].mode[diag].turn_style < ALL) && start != NONE) { i = start_counter[sq][diag][NOREFL]; tris[sq].mode[diag].start[i][NOREFL] = sum; start_counter[sq][diag][NOREFL]++; } if (start == ALL) { i= start_counter[sq][diag][ALL]; tris[sq].mode[diag].start[i][ALL] = sum; start_counter[sq][diag][ALL]++; } } } } tris[sq].polyomino[sum].size = size; for (j = 0; j < size; j++) for (i = 0; i < size; i++) { (void) fscanf(fp, "%d", &k); tris[sq].polyomino[sum].shape[j][i] = k; } } counter[sq] += n - toss; toss = 0; } } (void) fclose(fp); for (i = 0; i <= MAX_SQUARES - MIN_SQUARES; i++) for (j = 0; j < MAX_TYPES; j++) for (k = 0; k <= i; k++) { tris[i].mode[NODIAG].number[MIXED][j] += tris[k].mode[NODIAG].number[NOMIX][j]; if (tris[i].diagonal_switch == true) /*since k & i are not independent*/ tris[i].mode[DIAGONAL].number[MIXED][j] += tris[k].mode[DIAGONAL].number[NOMIX][j]; } } } //=========================================================================== /// global show() /// install itself in lists for proper processing events, draw itself. /// tags WellBase void WellBase::show() { default_well_engine->set_main_background_image(imBoardBG); dbgprintf(("WellBase registering event handlers\n")); shown=true; default_well_engine->add_timer(this,speeds[level]); default_well_engine->add_object(this); dre->clear_field(0); draw_field(); draw_thing(); redraw_all(); } //=========================================================================== /// global hide() /// unregister itself from any events /// tags WellBase void WellBase::hide() { shown=false; dbgprintf(("WellBase unregistering from engine\n")); default_well_engine->del_timer(this); default_well_engine->del_object(this); } //=========================================================================== /// global new_thing() /// Generate new figure random gen for field /// tags WellBase void WellBase::new_thing() { curThing = nextThing; nextThing.random_number = LRAND(); nextThing.random_rotation = NRAND(MAX_SIDES); nextThing.random_reflection = NRAND(2); nextThing.bonus = bonusNow; bonusNow = false; redo_next(); } //=========================================================================== /// global redo_next() /// fill nextThing vars with data from polyomino /// tags WellBase void WellBase::redo_next() { int turn_style = tris[squares - MIN_SQUARES].mode[diagonal].turn_style; int next_start, i; nextThing.squares = squares - MIN_SQUARES + nextThing.bonus; nextThing.squares = nextThing.squares > MAX_SQUARES - MIN_SQUARES ? MAX_SQUARES - MIN_SQUARES: nextThing.squares; next_start = nextThing.random_number % tris[nextThing.squares]. mode[diagonal].number[(nextThing.bonus) ? NOMIX : mixed][turn_style]; nextThing.color_number = next_start; dbgprintf(("NEXT COLOR number is %d\n",next_start)); if (mixed && !nextThing.bonus) { nextThing.squares = 0; while (next_start >= tris[nextThing.squares].mode[diagonal].number[NOMIX][turn_style]) { next_start -= tris[nextThing.squares].mode[diagonal].number[NOMIX][turn_style]; nextThing.squares++; } } nextThing.polyomino_number = tris[nextThing.squares].mode[diagonal].start[next_start][turn_style]; if (tris[nextThing.squares].mode[diagonal].turn_style > NONE) for (i = 0; i < nextThing.random_rotation; i++) nextThing.polyomino_number = tris[nextThing.squares].polyomino [nextThing.polyomino_number].rotation; if (tris[nextThing.squares].mode[diagonal].turn_style == ALL) for (i = 0; i < nextThing.random_reflection; i++) nextThing.polyomino_number = tris[nextThing.squares].polyomino [nextThing.polyomino_number].reflection; nextThing.size = tris[nextThing.squares].polyomino[nextThing.polyomino_number].size; nextThing.ypos = -tris[nextThing.squares].polyomino [nextThing.polyomino_number].start_height; } //=========================================================================== /// global put_box() /// Putting figure into game field /// tags WellBase void WellBase::put_box() { int i, j, xi, yj; int x = curThing.xpos, y = curThing.ypos; for (i = 0; i < curThing.size; i++) for (j = 0; j < curThing.size; j++) if ((y + j >= 0) && tris[curThing.squares].polyomino [curThing.polyomino_number].shape[j][i]) { xi = (x + i) % MAX_PERIMETER; yj = y + j; if (yj < MAX_DEPTH) { // Draw on the wall of glass wall[yj][xi].pmid = tris[curThing.squares].polyomino [curThing.polyomino_number].shape[j][i]; wall[yj][xi].cid = curThing.color_number; frozen_wall[xi / MAX_WIDTH] = MAX_SIDES; } else { // Draw on the floor (base) int base_i, base_j; wall_to_base(&base_i, &base_j, xi, yj); base[base_j][base_i].pmid = tris[curThing.squares].polyomino [curThing.polyomino_number].shape[j][i]; base[base_j][base_i].cid = curThing.color_number; } } } //=========================================================================== /// global overlapping() /// check overlapping our figure in current position with another ones /// on game field /// tags WellBase bool WellBase::overlapping() { int i, j, xi, yj; int x = curThing.xpos, y = curThing.ypos; for (i = 0; i < curThing.size; i++) for (j = 0; j < curThing.size; j++) if (tris[curThing.squares].polyomino [curThing.polyomino_number].shape[j][i]) { xi = (x + i) % MAX_PERIMETER; yj = y + j; if (yj < MAX_DEPTH) { if (frozen_wall[xi / MAX_WIDTH]) return true; if (gradualAppear) { /* This method one can turn polyomino to an area above of screen, also part of the polyomino may not be visible initially */ if ((yj >= 0) && (wall[yj][xi].pmid >= 0)) return true; } else { /* This method does not allow turning polyomino to an area above screen */ if ((yj < 0) || (wall[yj][xi].pmid >= 0)) return true; } } else if (yj < MAX_DEPTH + MAX_WIDTH) { int base_i, base_j; wall_to_base(&base_i, &base_j, xi, yj); if (base[base_j][base_i].pmid >= 0) return true; } else return true; } return false; } //=========================================================================== /// global wall_to_base(int* base_x,int* base_y,int wall_x,int wall_y) /// Translate wall coordinates to floor (base) one. /// tags WellBase void WellBase::wall_to_base(int* base_x,int* base_y,int wall_x,int wall_y) { switch (wall_x / MAX_WIDTH) { case 0: *base_x = wall_x; *base_y = wall_y - MAX_DEPTH; break; case 1: *base_x = MAX_WIDTH - 1 + MAX_DEPTH - wall_y; *base_y = wall_x - MAX_WIDTH; break; case 2: *base_x = MAX_PERIMETER - 1 - MAX_WIDTH - wall_x; *base_y = MAX_WIDTH - 1 + MAX_DEPTH - wall_y; break; case 3: *base_x = wall_y - MAX_DEPTH; *base_y = MAX_PERIMETER - 1 - wall_x; break; default: (void) fprintf (stderr, "wall_to_base kinds range 0-3, got %d.\n", wall_x / MAX_WIDTH); exit(-1); } } //=========================================================================== /// global at_bottom() /// Do we at bottom of the glass? (any piece of our figure) /// tags WellBase bool WellBase::at_bottom() { int i, j, xi, yj; int x = curThing.xpos, y = curThing.ypos; for (i = 0; i < curThing.size; i++) for (j = 0; j < curThing.size; j++) if (tris[curThing.squares].polyomino [curThing.polyomino_number].shape[j][i]) { xi = (x + i) % MAX_PERIMETER; yj = y + j; if (yj < -1) return false; if (yj < MAX_DEPTH - 1) { if (frozen_wall[xi / MAX_WIDTH]) return true; if (wall[yj + 1][xi].pmid >= 0) return true; } else if (yj < MAX_DEPTH + MAX_WIDTH - 1) { int base_i, base_j; wall_to_base(&base_i, &base_j, xi, yj + 1); if (base[base_j][base_i].pmid >= 0) return true; } else return true; } return false; } //=========================================================================== /// global at_base_fully() /// Do we fully on the floor? (all pieces of our figure) /// tags WellBase bool WellBase::at_base_fully() { int i, j; for (i = 0; i < curThing.size; i++) for (j = 0; j < curThing.size; j++) if (curThing.ypos + j < MAX_DEPTH && tris[curThing.squares].polyomino [curThing.polyomino_number].shape[j][i]) return false; return true; } //=========================================================================== /// global at_base_partially() /// Do we on the floor? (at least one of our piece) /// tags WellBase bool WellBase::at_base_partially() { int i, j; for (i = 0; i < curThing.size; i++) for (j = 0; j < curThing.size; j++) if (curThing.ypos + j >= MAX_DEPTH && tris[curThing.squares].polyomino [curThing.polyomino_number].shape[j][i]) return true; return false; } //=========================================================================== /// global wall_change(thing_t old,thing_t new_t) /// Do we change the wall from last position? /// tags WellBase bool WellBase::wall_change(thing_t old,thing_t new_t) { int w = -1, i, j; int x = curThing.xpos; for (i = 0; i < old.size; i++) for (j = 0; j < old.size; j++) if (tris[old.squares].polyomino[old.polyomino_number].shape[j][i]) { if (w == -1) w = ((x + i) % MAX_PERIMETER) / MAX_WIDTH; else if (w != ((x + i) % MAX_PERIMETER) / MAX_WIDTH) return true; } for (i = 0; i < new_t.size; i++) for (j = 0; j < new_t.size; j++) if (tris[new_t.squares].polyomino[new_t.polyomino_number].shape[j][i]) if (w != ((x + i) % MAX_PERIMETER) / MAX_WIDTH) return true; return false; } //=========================================================================== /// global try_move(Actions move) /// Trying to move/rotate/fall our figure according to the given move action /// tags WellBase void WellBase::try_move(Actions move) { thing_t old; int i; bool skip = false; old = curThing; switch (move) { case FALL: curThing.ypos ++; break; case DROP: do { curThing.ypos ++; score += level; } while (!overlapping()); curThing.ypos --; break; case LEFT: curThing.xpos = (curThing.xpos + MAX_PERIMETER - 1) % MAX_PERIMETER; if (at_base_fully() || (at_base_partially() && wall_change(old, curThing))) skip = true; break; case RIGHT: curThing.xpos = (curThing.xpos + 1) % MAX_PERIMETER; if (at_base_fully() || (at_base_partially() && wall_change(old, curThing))) skip = true; break; case ROTATE: if (tris[squares - MIN_SQUARES].mode[diagonal].turn_style > NONE) { if (cw) for (i = 0; i < MAX_SIDES - 1; i++) curThing.polyomino_number = tris[curThing.squares].polyomino [curThing.polyomino_number].rotation; else /* ccw */ curThing.polyomino_number = tris[curThing.squares].polyomino [curThing.polyomino_number].rotation; curThing.xpos = old.xpos; curThing.ypos = old.ypos; if (at_base_partially() && wall_change(old, curThing)) skip = true; } break; case REFLECT: /* reflect on y axis */ if (tris[squares - MIN_SQUARES].mode[diagonal].turn_style == ALL) { curThing.polyomino_number = tris[curThing.squares].polyomino [curThing.polyomino_number].reflection; curThing.xpos = old.xpos; curThing.ypos = old.ypos; if (at_base_partially() && wall_change(old, curThing)) skip = true; } break; default: skip=true; break; } if (!skip && !overlapping()) draw_thing_diff(&old); else curThing = old; } //=========================================================================== /// global draw_box(int color,int i,int j) /// Draw our box (piece of figure) on our virtual square (walls + floor) /// tags WellBase void WellBase::draw_box(int color,int i,int j) { if (j < MAX_DEPTH) { //Draw trapazoid on the wall dre->draw_trapazoid(color, i, j); } else { // Draw square on the floor int base_i, base_j; wall_to_base(&base_i, &base_j, i, j); dre->draw_square(color, base_i, base_j); } } //=========================================================================== /// global draw_thing() /// for all squares in figure do draw_box -> draw whole figure on the field /// tags WellBase void WellBase::draw_thing() { int i, j, xi; for (i = 0; i < curThing.size; i++) for (j = 0; j < curThing.size; j++) if (tris[curThing.squares].polyomino [curThing.polyomino_number].shape[j][i]) { xi = (curThing.xpos + i) % MAX_PERIMETER; draw_box(curThing.color_number,xi, curThing.ypos + j); } } //=========================================================================== /// global draw_thing_diff(thing_t* old) /// Make diff between old and new position on figure and Draw its /// actually Draw new one and clear empty old pieces :) /// tags WellBase void WellBase::draw_thing_diff(thing_t* old) { int i, j, ox, oy; for (i = 0; i < curThing.size; i++) for (j = 0; j < curThing.size; j++) if ((curThing.ypos + j >= 0) && tris[curThing.squares].polyomino [curThing.polyomino_number].shape[j][i]) { draw_box(curThing.color_number, (curThing.xpos + i) % MAX_PERIMETER, curThing.ypos + j); } for (i = 0; i < curThing.size; i++) for (j = 0; j < curThing.size; j++) { ox = (old->xpos + i - curThing.xpos + MAX_PERIMETER) % MAX_PERIMETER; oy = old->ypos + j - curThing.ypos; if (tris[old->squares].polyomino[old->polyomino_number].shape[j][i] && ((ox >= curThing.size) || (oy < 0) || (oy >= curThing.size) || !tris[curThing.squares].polyomino [curThing.polyomino_number].shape[oy][ox])) { draw_box(BackColor,(old->xpos + i) % MAX_PERIMETER, old->ypos + j); } } } //=========================================================================== /// global fill_lines() /// Fill all glass with random squares. Just for test only /// tags WellBase void WellBase::fill_lines() { int i, j; int turn_style = tris[squares - MIN_SQUARES].mode[diagonal].turn_style; for (j = 0; j < MAX_DEPTH + MAX_WIDTH; j++) for (i = 0; i < MAX_PERIMETER; i++) { draw_box(NRAND(tris[squares - MIN_SQUARES].mode [diagonal].number[mixed][turn_style]), i, j); } } //=========================================================================== /// global freeze_wall(int w) /// Freeze wall - make some blinks while freezing :) /// tags WellBase void WellBase::freeze_wall(int w) { int i, j; for (j = 0; j < MAX_DEPTH; j++) for (i = 0; i < MAX_WIDTH; i++) { if (wall[j][i+w*MAX_WIDTH].pmid < 0) dre->draw_trapazoid(FreezeColor, w * MAX_WIDTH + i, j); } dre->sync(); udelay(FLUSH_DELAY); for (j = 0; j < MAX_DEPTH; j++) for (i = 0; i < MAX_WIDTH; i++) { if (wall[j][i+w*MAX_WIDTH].pmid < 0) dre->draw_trapazoid (BackColor, w * MAX_WIDTH + i, j); } dre->sync(); udelay(FLUSH_DELAY); for (j = 0; j < MAX_DEPTH; j++) for (i = 0; i < MAX_WIDTH; i++) { if (wall[j][i+w*MAX_WIDTH].pmid < 0) dre->draw_trapazoid (FreezeColor, w * MAX_WIDTH + i, j); } if (beep) dre->bell(BVOLUME); dre->sync(); } //=========================================================================== /// global defreeze_wall(int w) /// Return wall to normal state /// tags WellBase void WellBase::defreeze_wall(int w) { int i, j; for (j = 0; j < MAX_DEPTH; j++) for (i = 0; i < MAX_WIDTH; i++) { if (wall[j][i+w*MAX_WIDTH].pmid < 0) dre->draw_trapazoid (BackColor, w * MAX_WIDTH + i, j); } if (beep) dre->bell(BVOLUME); dre->sync(); } void WellBase::udelay(int msec) { default_well_engine->udelay(msec); } //=========================================================================== /// global draw_field() /// Draw field with squares and frozen walls /// tags WellBase void WellBase::draw_field() { int i, j; for (i = 0; i < MAX_PERIMETER; i++) for (j = 0; j < MAX_DEPTH; j++) { if (wall[j][i].pmid >= 0) dre->draw_trapazoid(wall[j][i].cid, i, j); else { if (frozen_wall[i / MAX_WIDTH]) dre->draw_trapazoid(FreezeColor, i, j); else dre->draw_trapazoid(BackColor, i, j); } } for (i = 0; i < MAX_WIDTH; i++) for (j = 0; j < MAX_WIDTH; j++) if (base[j][i].pmid >= 0) dre->draw_square(base[j][i].cid, i, j); else dre->draw_square(BackColor, i, j); dre->clear_dirty_list(); dre->field_sync(); } //=========================================================================== /// global draw_next() /// Draw next figure (cheating?) /// Currently not implemented /// tags WellBase void WellBase::draw_next() { int x, y; int i, j; Colors color= nextThing.bonus ? BonusColor : GridColor; Colors color2= nextThing.bonus ? BonusColor2 : GridColor2; dbgprintf(("Next color: %d, size: %d\n",nextThing.color_number, nextThing.size)); x=NEXT_CENTER_X - nextThing.size*(NEXT_BOX_SIZE+2)/2; y=NEXT_CENTER_Y - nextThing.size*(NEXT_BOX_SIZE+2)/2; for (i = 0; i < nextThing.size; i++) for (j = 0; j < nextThing.size; j++) if (tris[nextThing.squares].polyomino [nextThing.polyomino_number].shape[j][i]) { dre->draw_rect(x+ (NEXT_BOX_SIZE+2)*i, y+ (NEXT_BOX_SIZE+2)*j, NEXT_BOX_SIZE, NEXT_BOX_SIZE, color); dre->draw_rect(x+ (NEXT_BOX_SIZE+2)*i +1, y+ (NEXT_BOX_SIZE+2)*j +1, NEXT_BOX_SIZE-2, NEXT_BOX_SIZE-2, color2); } dre->sync(); } //=========================================================================== /// global clear_next() /// Clear next figure /// Currently not implemented /// tags WellBase void WellBase::clear_next() { dre->fill_rect(NEXT_CENTER_X-NEXT_X_SIZE/2+1,NEXT_CENTER_Y-NEXT_Y_SIZE/2+1, NEXT_X_SIZE-1,NEXT_Y_SIZE-1,BackColor); } //=========================================================================== /// global draw_status() /// draw status of the game, i.e. scores, lines... /// Currently not implemented /// tags WellBase void WellBase::draw_status() { int delta_score; Score *pscore2=0,*pscore1=0; char buf[L_MAXPATH]; char buf2[PLAYER_NAME_LEN]; if(!shown) return; dbgprintf(("score: %d, lines: %d, level %d, levelup at: +%d\n", score, rows, level, rows_levelup - rows)); sprintf(buf,"%d",score); txt_score->set_text(buf); txt_score->draw_text(RightJust); sprintf(buf,"%d",rows); txt_lines->set_text(buf); txt_lines->draw_text(RightJust); sprintf(buf,"+%d",rows_levelup - rows + 1); txt_levelup->set_text(buf); txt_levelup->draw_text(RightJust); sprintf(buf,"%d",level); txt_level->set_text(buf); txt_level->draw_text(RightJust); dbgprintf(("score done\n")); pscore2=default_top_nine->find_challenger(player_score); if(pscore2) pscore1=default_top_nine->find_challenger(pscore2); do { if(pscore1) { delta_score=pscore1->score - player_score->score; delta_score= delta_score>=100000 ? 99999 : delta_score; strncpy(buf2,pscore1->player,CHAL_NAME_LEN); buf2[CHAL_NAME_LEN]=0; sprintf(buf,"%d.%-9s+%05d",pscore1->place,buf2, delta_score); dbgprintf(("draw_status: %s\n",buf)); txt_first->set_text(buf); txt_first->draw_text(); strncpy(buf2,pscore2->player,CHAL_NAME_LEN); buf2[CHAL_NAME_LEN]=0; delta_score=pscore2->score - player_score->score; delta_score= delta_score>=100000 ? 99999 : delta_score; sprintf(buf,"%d.%-9s+%05d",pscore2->place,buf2, delta_score); txt_second->set_text(buf); txt_second->draw_text(); sprintf(buf,"%d.You are here",pscore2->place+1); txt_third->set_text(buf); txt_third->draw_text(); break; } if(pscore2) { strncpy(buf2,pscore2->player,CHAL_NAME_LEN); buf2[CHAL_NAME_LEN]=0; delta_score=pscore2->score - player_score->score; delta_score= delta_score>=100000 ? 99999 : delta_score; sprintf(buf,"%d.%-9s+%05d",pscore2->place,buf2, delta_score); txt_first->set_text(buf); txt_first->draw_text(); sprintf(buf,"%d.You are here",pscore2->place+1); txt_second->set_text(buf); txt_second->draw_text(); txt_third->clear_region(); break; } sprintf(buf,"%d.You are here",1); txt_first->set_text(buf); txt_first->draw_text(); txt_second->clear_region(); txt_third->clear_region(); } while(0); if(rotation) default_well_engine->screen_copy(&geo[GEO_ROT_IDX]); if(showNext) default_well_engine->screen_copy(&geo[GEO_NEXT_IDX]); if(mixed) default_well_engine->screen_copy(&geo[GEO_MIXED_IDX]); dre->sync(); } //=========================================================================== /// global draw_grid() /// draw grid of the field /// tags WellBase void WellBase::draw_grid() { dre->draw_grid(); } //=========================================================================== /// global drop_wall(int wall_num) /// Drop all squres on the wall to the floor after row is cleared /// tags WellBase void WellBase::drop_wall(int w) { int i, j, k, l, fits, lines, base_x, base_y; lines = 0; for (j = MAX_DEPTH - 1; j >= 0 && lines == 0; j--) for (i = 0; i < MAX_WIDTH; i++) if (wall[j][w * MAX_WIDTH + i].pmid != EMPTY) lines = MAX_DEPTH - j; if (lines > 0) { fits = true; j = 0; while (j < (MAX_WIDTH / 2 + lines - 1) && fits) { j++; for (l = MAX_DEPTH - j; l < MAX_DEPTH; l++) for (i = 0; i < MAX_WIDTH; i++) if (wall[l][w * MAX_WIDTH + i].pmid != EMPTY) { wall_to_base(&base_x, &base_y, w * MAX_WIDTH + i, l + j); if (base[base_y][base_x].pmid != EMPTY) fits = false; } } if (!fits) j--; if (j > 0) { for (l = MAX_DEPTH - 1; l >= 0; l--) for (i = 0; i < MAX_WIDTH; i++) if (wall[l][w * MAX_WIDTH + i].pmid != EMPTY) { k = w * MAX_WIDTH + i; if (l + j >= MAX_DEPTH) { wall_to_base(&base_x, &base_y, k, l + j); base[base_y][base_x] = wall[l][k]; wall[l][k].pmid = EMPTY; dre->draw_trapazoid(BackColor, k, l); dre->draw_square(wall[l][k].cid, base_x, base_y); } else { wall[l + j][k] = wall[l][k]; wall[l][k].pmid = EMPTY; dre->draw_trapazoid(BackColor, k, l); dre->draw_trapazoid(wall[l][k].cid, k, l + j); } dre->sync(); } if (beep) dre->bell(BVOLUME); dre->sync(); } } } //=========================================================================== /// global all_frozen() /// True if all walls are frozen -> end of the game /// tags WellBase bool WellBase::all_frozen() { int w; for (w = 0; w < MAX_SIDES; w++) if (frozen_wall[w] == MAX_SIDES) { freeze_wall(w); } for (w = 0; w < MAX_SIDES; w++) if (frozen_wall[w] == 0) return false; return true; } //=========================================================================== /// global check_freeze() /// Check frozen walls - decrease frozen counter and do defreeze // and dropwall /// tags WellBase void WellBase::check_freeze() { int w; bool all_frozen=true; for (w = 0; w < MAX_SIDES; w++) { if (frozen_wall[w] == 0) { all_frozen=false; drop_wall(w); } else { frozen_wall[w]--; if (frozen_wall[w] == 0) { defreeze_wall(w); drop_wall(w); all_frozen=false; } } } if(all_frozen) { dbgprintf(("check_freeze - all frozen - doing game_over\n")); throw aGameOver; } /* not all frozen else this is an infinite loop */ /* curThing.xpos = (MAX_WIDTH - curThing.size) / 2; */ curThing.xpos = NRAND(MAX_WIDTH - curThing.size + 1); do { w = NRAND(MAX_SIDES); } while (frozen_wall[w]); //Hmm, very strange method of choosing the wall??? curThing.xpos += w * MAX_WIDTH; } //=========================================================================== /// global check_lines() /// Checking for full lines on the floor and deleting it - make free space /// tags WellBase int WellBase::check_lines() { int lSet[2][MAX_WIDTH], nset[2]; int i, j, k; nset[0] = nset[1] = 0; //First check horizontal lines, increase nset[0] and lSet[0][line] for (j = 0; j < MAX_WIDTH; j++) { lSet[0][j] = 0; for (i = 0; i < MAX_WIDTH; i++) if (base[j][i].pmid >= 0) lSet[0][j] ++; if (lSet[0][j] == MAX_WIDTH) nset[0] ++; } //Then the same for vertical ones for (i = 0; i < MAX_WIDTH; i++) { lSet[1][i] = 0; for (j = 0; j < MAX_WIDTH; j++) if (base[j][i].pmid >= 0) lSet[1][i] ++; if (lSet[1][i] == MAX_WIDTH) nset[1] ++; } if (nset[0] || nset[1]) //If we have full lines { // Now flashing full lines awhile for (k = 0; k < NUM_FLASHES; k++) { int color; color=(k%2) ? BackColor : FlashColor; for (j = 0; j < MAX_WIDTH; j++) { if (lSet[0][j] == MAX_WIDTH) { for (i = 0; i < MAX_WIDTH; i++) dre->draw_square(color, i, j); } if (lSet[1][j] == MAX_WIDTH) { for (i = 0; i < MAX_WIDTH; i++) dre->draw_square(color, j, i); } } dre->flush_dirty(); dre->sync(); udelay(FLUSH_DELAY/2); } if (nset[0] > 0) //Now delete full horizontal lines for (j = 0; j < MAX_WIDTH; j++) if (lSet[0][j] == MAX_WIDTH) { if (j < MAX_WIDTH / 2) //If upper part of field then move other lines down to center for (i = 0; i < MAX_WIDTH; i++) { for (k = j; k > 0; k--) base[k][i] = base[k - 1][i]; base[0][i].pmid = EMPTY; } else //else move them up { for (i = 0; i < MAX_WIDTH; i++) { for (k = j; k < MAX_WIDTH - 1; k++) base[k][i] = base[k + 1][i]; base[MAX_WIDTH - 1][i].pmid = EMPTY; } for (k = j; k < MAX_WIDTH - 1; k++) //Fixing lSet position of moved lines lSet[0][k]=lSet[0][k+1]; lSet[0][MAX_WIDTH-1]=0; j--; //Fixing index } } if (nset[1] > 0) //Do the same for vertical lines for (i = 0; i < MAX_WIDTH; i++) if (lSet[1][i] == MAX_WIDTH) { if (i < MAX_WIDTH / 2) for (j = 0; j < MAX_WIDTH; j++) { for (k = i; k > 0; k--) base[j][k] = base[j][k - 1]; base[j][0].pmid = EMPTY; } else { for (j = 0; j < MAX_WIDTH; j++) { for (k = i; k < MAX_WIDTH - 1; k++) base[j][k] = base[j][k + 1]; base[j][MAX_WIDTH - 1].pmid = EMPTY; } for (k = i; k < MAX_WIDTH - 1; k++) lSet[1][k]=lSet[1][k+1]; lSet[1][MAX_WIDTH-1]=0; i--; } } //Now reDraw new field for (j = 0; j < MAX_WIDTH; j++) for (i = 0; i < MAX_WIDTH; i++) { if (base[j][i].pmid >= 0) dre->draw_square(base[j][i].cid, i, j); else dre->draw_square(BackColor, i, j); } //All done, beeping... if (beep) dre->bell(BVOLUME); dre->flush_dirty(); dre->sync(); } return (nset[0] + nset[1]); } //=========================================================================== /// global check_update_lines() /// Calculating statistics ans SCORES! :) And redraw status /// tags WellBase void WellBase::check_update_lines() { int lines,mult; int oldrows=rows; lines = check_lines(); score += lines + !gradualAppear + !grid; mult= showNext ? 5 : 7; mult += (rotation ? 1 : 0); score += mult * level * level * lines * lines * lines * squares * squares * (bonus + diagonal + 1) / (16 * (1 + mixed)); rows += lines; player_score->set_params(score,rows,level); if (rows > rows_levelup) { level++; new_level_calc(); if (bonus) bonusNow = true; player_score->set_params(score,rows,level); draw_status(); } else if(oldrows!=rows) draw_status(); } //=========================================================================== /// global move_one_step(Actions move) /// Move figure one step down/left/right /// tags WellBase bool WellBase::move_one_step(Actions move) { if ((move == DROP) || ((move == FALL) && at_bottom())) { try_move(move); put_box(); check_update_lines(); new_thing(); if (showNext) { clear_next(); draw_next(); } dre->sync(); /* discard all events */ if (all_frozen()) throw aGameOver; check_freeze(); if (overlapping()) throw aGameOver; check_update_lines(); draw_thing(); return true; } else { try_move(move); if (rows > THRESHOLD(level)) { level++; draw_status(); if (bonus) bonusNow = true; } } return false; } //=========================================================================== /// global game_over() /// game is over :( you are looser /// tags WellBase void WellBase::game_over() { dbgprintf(("WellBase::game_over() called\n")); hide(); player_score->calc_play_time(); player_score=default_top_nine->try_add_to_table(player_score); delete player_score; game_over_object.call(wEvent(aGameOver,this)); } //=========================================================================== /// global redraw_all() /// redraw all game /// tags WellBase void WellBase::redraw_all() { if(!shown) return; draw_status(); dre->flush_all(); clear_next(); if(showNext) draw_next(); dre->flush_all(); while(steps_to_rotate>0) { make_rotation(); steps_to_rotate--; udelay(FLUSH_DELAY/10); } dre->sync(); } //=========================================================================== /// global make_pause() /// set/uset game pause /// tags WellBase void WellBase::make_pause() { pause^=1; if(pause) { default_well_engine->del_timer(this); dre->clear_field(0); dre->pixmap_copy(&geo[GEO_PAUSE_IDX]); dre->flush_all(); dre->sync(); } else { default_well_engine->add_timer(this,speeds[level]); dre->clear_field(0); draw_field(); draw_thing(); redraw_all(); } } //=========================================================================== /// global make_rotation() /// rotate field step by step /// tags WellBase void WellBase::make_rotation() { dre->outer_rotation(); dre->clear_field(0); draw_field(); draw_thing(); dre->flush_all(); dre->sync(); } //=========================================================================== /// global process_event() /// process all events for this game object /// return false if we don't want to process this event for other objects /// tags WellBase bool WellBase::process_event(wEvent ev) { Actions action; switch(ev.type) { case eTimeOut: dbgprintf(("WellBase got time out event\n")); try { move_one_step(FALL); dre->flush_dirty(); } catch(EvType) { game_over(); return false; } break; case eExpose: dbgprintf(("WellBase got expose event\n")); redraw_all(); break; case eFocusOut: if(!pause) make_pause(); return false; case eKeyPress: action=dre->key_to_action(ev.data); try { return process_action(action); } catch(EvType) { game_over(); return false; } case eDelete: hide(); break; case aIntroExit: new_game(); show(); break; } return true; } //=========================================================================== /// global process_action(Actions) /// process actions - moves/drops/other /// tags WellBase bool WellBase::process_action(Actions action) { switch(action) { case LEFT: case RIGHT: case ROTATE: case FALL: case DROP: if(pause) return false; move_one_step(action); dre->flush_dirty(); return false; case PAUSE_GAME: make_pause(); return false; case OUTER_ROTATION: if(pause) return false; make_rotation(); return false; case END_GAME: game_over(); return false; case LEVEL_UP: if(pause) return false; if(level+10) { level--; new_level_calc(); draw_status(); } return false; } return true; } xwelltris-1.0.1/src/welldrawing.cxx0100644000175300014110000001324207605543562015744 0ustar leoguys// docm_prefix(///) /**************************************************************************** * Copyright (C) 2002 by Leo Khramov * email: leo@xnc.dubna.su * * 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. ****************************************************************************/ // $Id: welldrawing.cxx,v 1.1.1.1 2003/01/04 11:37:22 leo Exp $ #include "globals.h" #include "welldrawing.h" //=========================================================================== /// global init(int n_fields, int dx, int dy, unsigned l, unsigned h) /// init indexes and allocate FieldPoints /// tags WellDrawingEngine void WellDrawingEngine::init(int inum_fields, int idx, int idy, unsigned int il, unsigned int ih) { l=il;h=ih; delta_x=idx; delta_y=idy; current_id=0; num_fields=inum_fields; points=new FieldPoints[num_fields]; inner_max_alpha=0.0; f_step=1; } //=========================================================================== /// global flush_dirty() /// pseudo function that need flush dirty rec to the screen, /// here it only delete dirty rect from queue /// tags WellDrawingEngine void WellDrawingEngine::flush_dirty() { DirtyList *plist; do { plist=dirty_list.get_next(); if(plist) { //Here we need to draw dirty rec on the screen -> will be in overloaded childs plist->del_self(); delete plist; } } while(plist); } void WellDrawingEngine::draw_square(int color, int x, int y) { } void WellDrawingEngine::draw_trapazoid(int color, int x, int y) { } void WellDrawingEngine::sync() { } void WellDrawingEngine::flush_all() { } void WellDrawingEngine::bell(int) { } //=========================================================================== /// global outer_rotation() /// make shift current field id -> switch to next field -> rotate it /// tags WellDrawingEngine void WellDrawingEngine::outer_rotation() { current_id+=f_step; if(current_id>=num_fields) { f_step*=-1; current_id+=(f_step+f_step); } if(current_id<0) { f_step*=-1; current_id+=(f_step+f_step); } } //=========================================================================== /// global set_field_sizes(int dx, int dy, int wall_delta, int base_delta) /// set and calculate base vars /// tags WellDrawingEngine void WellDrawingEngine::set_field_sizes(int idx, int idy, int ipix_wall_delta, int ipix_base_delta) { pix_dx=idx; pix_dy=idy; pix_wall_delta=ipix_wall_delta; pix_base_delta=ipix_base_delta; pix_base_width=pix_base_delta*MAX_WIDTH; pix_max_delta=pix_wall_delta*MAX_DEPTH; pix_max_width=pix_base_width + 2*pix_max_delta; } //=========================================================================== /// global calc_grid_points() /// calculate all points for each field, rotate it with inner and /// outer alpha angle /// tags WellDrawingEngine void WellDrawingEngine::calc_grid_points() { int gi,i,j,w,x,y,n; float alpha; center_x=pix_dx+pix_max_width/2; center_y=pix_dy+pix_max_width/2; for(n=0;n x=%4d, y=%4d\n",i,j,x,y)); x+=pix_dx; y+=pix_dy; alpha= inner_max_alpha*float(j)/float(MAX_DEPTH)*float(n)/float(num_fields-1)+ float(n)*outer_max_alpha/float(num_fields-1); if(alpha!=0.0) //lets make rotation { points[n].wall_points[gi][j].x=int( float((x-center_x))*cos(alpha) - float((y-center_y))*sin(alpha) + center_x); points[n].wall_points[gi][j].y=int( float((x-center_x))*sin(alpha) + float((y-center_y))*cos(alpha) + center_y); } else { points[n].wall_points[gi][j].x=x; points[n].wall_points[gi][j].y=y; } } for(j=0;jget_object(); obj.ticks_left--; if(obj.ticks_left<=0) { processed=true; obj.restart_ticks(); if(!obj.obj->process_event(wEvent(eTimeOut))) //if we return false -> don't process any objects break; } ptimelist=ptimelist->get_next(); } return processed; } //=========================================================================== /// global add_timer(WellObject*, int N_ticks) /// add object to time list for ticking every N_ticks /// tags WellEngine bool WellEngine::add_timer(WellObject* wo, int ticks) { TimeObject obj(wo,ticks); TimeList *ptobject=new TimeList(obj); timelist.add(ptobject); return true; } //=========================================================================== /// global del_timer(WellObject*) /// delete object from time list /// tags WellEngine bool WellEngine::del_timer(WellObject* wo) { TimeObject obj(wo); TimeList *plist=timelist.del(obj); if(plist) { delete plist; return true; } return false; } //=========================================================================== /// global new_well_drawing_engine() /// creates drawing engine for well board - must be overloaded in childs /// tags WellEngine WellDrawingEngine* WellEngine::new_well_drawing_engine() { return 0; } //=========================================================================== /// global process_event_for_all(wEvent) /// go throuht the list of objects, and call process_event for each /// if object return false -> break the loop /// tags WellEngine bool WellEngine::process_event_for_all(wEvent ev) { bool processed=true; ObjectList* plist=objectlist.get_next(); while(plist) { if(!plist->get_object()->process_event(ev)) //if we return false -> don't process any objects return false; plist=plist->get_next(); } return processed; } //=========================================================================== /// global add_object(WellObject*) /// add object to list of objects that want events /// tags WellEngine bool WellEngine::add_object(WellObject* wo) { ObjectList *ptobject=new ObjectList(wo); objectlist.add(ptobject); return true; } //=========================================================================== /// global del_object(WellObject*, int N_ticks) /// delete object from list of objects that want events /// tags WellEngine bool WellEngine::del_object(WellObject* wo) { ObjectList *plist=objectlist.del(wo); if(plist) { delete plist; return true; } return false; } //=========================================================================== /// global clear_objectlist() /// clear all list of objects /// tags WellEngine void WellEngine::clear_objectlist() { ObjectList *plist; do { plist=objectlist.get_next(); if(plist) { plist->del_self(); delete plist; } } while(plist); } //=========================================================================== /// global load_images() /// load all images for the game /// tags WellEngine void WellEngine::load_images() { fprintf(stderr, "Loading resources.."); load_image(imBoardBG, "board2.gif"); fprintf(stderr, ".."); load_image(imFont1, "font2.gif"); fprintf(stderr, ".."); load_image(imIntroBG, "wellintro.gif"); fprintf(stderr, ".."); load_image(imScoreBG, "topnine.gif"); fprintf(stderr, ".."); load_image(imCuts, "wellcuts.gif"); fprintf(stderr, "..done\n"); } //=========================================================================== /// global new_well_intro() /// creates new introduction object - version for SDL Window /// tags WellEngine WellIntro* WellEngine::new_well_intro() { return new WellIntro; } //=========================================================================== /// global new_well_top_nine() /// creates new top nine object /// tags WellEngine WellTopNine* WellEngine::new_well_top_nine() { return new WellTopNine; } //=========================================================================== /// global new_well_key(char*) /// creates new key object /// tags WellEngine WellKey* WellEngine::new_well_key(char* name) { return new WellKey(name); } //=========================================================================== /// global new_well_switch(char*) /// creates new switch object /// tags WellEngine WellSwitch* WellEngine::new_well_switch(char* name) { return new WellSwitch(name); } //=========================================================================== /// global new_well_base() /// creates new game object /// tags WellEngine WellBase* WellEngine::new_well_base() { return new WellBase; } xwelltris-1.0.1/src/wellimagefont.cxx0100644000175300014110000000737407605543562016273 0ustar leoguys// docm_prefix(///) /**************************************************************************** * Copyright (C) 2002 by Leo Khramov * email: leo@xnc.dubna.su * * 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. ****************************************************************************/ // $Id: wellimagefont.cxx,v 1.1.1.1 2003/01/04 11:37:22 leo Exp $ #include "wellimagefont.h" //=========================================================================== /// global WellImageFont(Images id, unsigned int ifl, unsigned int ifh, int idx, int idy) /// Constructor of base draw text class /// tags WellImageFont WellImageFont::WellImageFont(Images id, unsigned int ifl, unsigned int ifh, int idx, int idy) { font_id=id; font_l=ifl; font_h=ifh; dx=idx; dy=idy; text_l=0; } //=========================================================================== /// global set_font(...) /// setting font params /// tags WellImageFont void WellImageFont::set_font(unsigned int ifl, unsigned int ifh, int idx, int idy) { font_l=ifl; font_h=ifh; dx=idx; dy=idy; } //=========================================================================== /// global set_text(char*) /// setting text for output /// tags WellImageFont void WellImageFont::set_text(char* itext) { strcpy(text,itext); text_l=strlen(text); } //=========================================================================== /// global set_screen_region(int ix, int iy, int il, int ih) /// setting text for output /// tags WellImageFont void WellImageFont::set_screen_region(int ix, int iy, int il, int ih) { screen_x=ix; screen_y=iy; screen_l=il; screen_h=ih; } //=========================================================================== /// global draw_text(Justify just) /// draw text with given justification /// tags WellImageFont void WellImageFont::draw_text(Justify just) { draw_text(text,text_l,just); } //=========================================================================== /// global draw_text(char *text, int text_l, Justify just) /// draw text with given justification /// tags WellImageFont void WellImageFont::draw_text(char* txt, int txt_l, Justify just) { int i,draw_x; unsigned int draw_h; clear_region(); if(txt_l<=0) return; switch(just) { case LeftJust: draw_x=screen_x; break; case RightJust: draw_x=screen_x+screen_l-txt_l*font_l; break; case CenterJust: draw_x=screen_x+(screen_l-txt_l*font_l)/2; break; } draw_h=(screen_hnew_well_image_font(imFont1,FONT2_L,FONT2_H, FONT2_DX,FONT2_DY); fnt->set_screen_region(geo[1].tox, geo[1].toy, geo[1].l, geo[1].h); } //=========================================================================== /// global process_event(wEvent) /// stub that process events /// tags WellInput bool WellInput::process_event(wEvent ev) { switch(ev.type) { case eKeyPress: dbgprintf(("WellInput - done\n")); object_on_enter.call(wEvent(aInputDone,this)); return false; } return true; } //=========================================================================== /// global highlight(int mx, int my) /// highlights key /// tags WellInput void WellInput::set_text(char* txt) { if(txt) { strcpy(buf,txt); buflen=strlen(buf); if(buflen>maxlen) buflen=maxlen; buf[buflen]=0; pos=buflen; } else { buflen=pos=0; buf[buflen]=0; } } //=========================================================================== /// global draw_text() /// draw text on the screen /// tags WellInput void WellInput::draw_text() { fnt->draw_text(buf,buflen,BackColor); } //=========================================================================== /// global show() /// show object /// tags WellInput void WellInput::show() { shown=true; redraw(); default_well_engine->add_object(this); } //=========================================================================== /// global redraw() /// redraw object /// tags WellInput void WellInput::redraw() { if(shown) { default_well_engine->screen_copy(&geo[0]); draw_text(); } } //=========================================================================== /// global hide() /// hide object /// tags WellInput void WellInput::hide() { shown=false; default_well_engine->screen_clear(&geo[0]); default_well_engine->del_object(this); } xwelltris-1.0.1/src/wellintro.cxx0100644000175300014110000002755207627346007015454 0ustar leoguys// docm_prefix(///) /**************************************************************************** * Copyright (C) 2002 by Leo Khramov * email: leo@xnc.dubna.su * * 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. ****************************************************************************/ // $Id: wellintro.cxx,v 1.3 2003/02/27 08:27:51 leo Exp $ /// module description /// WellIntro class - implements Introduction screen with options switches /// new game, top nine and exit keys #include "wellclass.h" #include "wellintro.h" #include "wellengine.h" #include "welltopnine.h" #include "version.h" //=========================================================================== /// global WellIntro() /// constructor - fill table /// tags WellIntro WellIntro::WellIntro() : WellObject() { int i; char buf[L_MAXPATH]; start_level=0; txt_level=default_well_engine->new_well_image_font(imFont1,FONT3_L,FONT3_H, FONT3_DX,FONT3_DY); txt_level->set_screen_region(674,403,34,20); key_exit=default_well_engine->new_well_key("intro_key_exit"); key_new_game=default_well_engine->new_well_key("intro_key_new_game"); key_top_nine=default_well_engine->new_well_key("intro_key_top_nine"); key_plus=default_well_engine->new_well_key("intro_key_plus"); key_minus=default_well_engine->new_well_key("intro_key_minus"); key_exit->set_object_on_press(ObjectCaller(this,&WellObject::hide_by_call)); key_new_game->set_object_on_press(ObjectCaller(this,&WellObject::hide_by_call)); key_top_nine->set_object_on_press(ObjectCaller(this,&WellObject::hide_by_call)); key_plus->set_object_on_press(ObjectCaller(this,&WellObject::process_event)); key_minus->set_object_on_press(ObjectCaller(this,&WellObject::process_event)); sw_rotation=default_well_engine->new_well_switch("intro_sw_rotation"); sw_rotation->set_object_on_switch(ObjectCaller(this, &WellObject::process_event)); sw_next_piece=default_well_engine->new_well_switch("intro_sw_next"); sw_next_piece->set_object_on_switch(ObjectCaller(this, &WellObject::process_event)); sw_mixed=default_well_engine->new_well_switch("intro_sw_mixed"); sw_mixed->set_object_on_switch(ObjectCaller(this, &WellObject::process_event)); for(i=0;inew_well_switch(buf); sw_squares[i]->set_object_on_switch(ObjectCaller(this, &WellObject::process_event)); sw_squares[i]->set_mode(OnlySet); } inp_player=default_well_engine->new_well_input("intro_inp_player"); inp_player->set_object_on_enter(ObjectCaller(this, &WellObject::hide_by_call)); inp_player->set_max_len(PLAYER_NAME_LEN-1); } //=========================================================================== /// global process_event(wEvent) /// stub that process events /// tags WellIntro bool WellIntro::process_event(wEvent ev) { int i; WellObject* wo=(WellObject*)ev.data; switch(ev.type) { case eExpose: redraw(); break; case eKeyPress: hide_by_call(wEvent(aKeyPressed,key_new_game)); return false; case aKeyPressed: if(wo==key_plus && start_level+10) { start_level--; draw_start_level(); return true; } break; case aSwitchChanged: if(wo==sw_rotation) { well->set_rotation(sw_rotation->get_value()); break; } if(wo==sw_next_piece) { well->set_next_piece(sw_next_piece->get_value()); break; } if(wo==sw_mixed) { well->set_mixed(sw_mixed->get_value()); break; } for(i=0;iset_squares(MIN_SQUARES+i); } else sw_squares[i]->set_value(false); break; } return true; } //=========================================================================== /// global show() /// show object /// tags WellIntro void WellIntro::show() { dbgprintf(("WellIntro::show() called\n")); default_well_engine->set_main_background_image(imIntroBG); default_well_engine->add_object(this); key_exit->show(); key_new_game->show(); key_top_nine->show(); key_plus->show(); key_minus->show(); sw_rotation->show(); sw_next_piece->show(); sw_mixed->show(); for(int i=0;ishow(); draw_start_level(); shown=true; } //=========================================================================== /// global hide() /// hide object (empty) /// tags WellIntro void WellIntro::hide() { if(shown) { shown=false; default_well_engine->del_object(this); key_exit->hide(); key_new_game->hide(); key_top_nine->hide(); key_plus->hide(); key_minus->hide(); sw_rotation->hide(); sw_next_piece->hide(); sw_mixed->hide(); for(int i=0;ihide(); } } //=========================================================================== /// global hide_by_call() /// hide object /// tags WellIntro bool WellIntro::hide_by_call(wEvent ev) { WellObject* wo=(WellObject*)ev.data; hide(); put_all_to_game(); save_options(); if(wo==inp_player) { inp_player->hide(); return object_on_new_game.call(wEvent(aIntroExit,this)); } if(wo==key_exit) { default_well_engine->done_loop(); return true; } if(wo==key_new_game) { inp_player->show(); } if(wo==key_top_nine) { return object_on_top_nine.call(wEvent(aIntroExit,this)); } return true; } //=========================================================================== /// global draw_start_level() /// draw start level on the screen /// tags WellIntro void WellIntro::draw_start_level() { char buf[L_MAXPATH]; sprintf(buf,"%02d",start_level); txt_level->set_text(buf); txt_level->draw_text(); well->set_level(start_level); } //=========================================================================== /// global redraw() /// redraw all scene object /// tags WellIntro void WellIntro::redraw() { draw_start_level(); key_exit->redraw(); key_new_game->redraw(); key_top_nine->redraw(); key_plus->redraw(); key_minus->redraw(); sw_rotation->redraw(); sw_next_piece->redraw(); sw_mixed->redraw(); for(int i=0;iredraw(); } //=========================================================================== /// global put_all_to_game() /// put all values to the game /// tags WellIntro void WellIntro::put_all_to_game() { int i; well->set_rotation(sw_rotation->get_value()); well->set_mixed(sw_mixed->get_value()); well->set_next_piece(sw_next_piece->get_value()); well->set_level(start_level); for(i=0;iget_value()) { well->set_squares(i+MIN_SQUARES); default_top_nine->set_page(i+1); dbgprintf(("Set top_nine page to %d\n",i+1)); } well->set_player_name(inp_player->get_text()); } //=========================================================================== /// global load_defaults() /// set default values and try to load it from file /// tags WellIntro void WellIntro::load_defaults() { sw_rotation->set_value(true); sw_mixed->set_value(true); sw_next_piece->set_value(true); start_level=0; sw_squares[4-MIN_SQUARES]->set_value(true); inp_player->set_text(getenv("USER")); load_options(); put_all_to_game(); } //=========================================================================== /// global set_well_base(WellBase*) /// set pointer to the game object, loads and set default values /// tags WellIntro void WellIntro::set_well_base(WellBase* o) { well=o; load_defaults(); } //=========================================================================== /// global save_options() /// save options to file /// tags WellIntro void WellIntro::save_options() { int i; char fname[L_MAXPATH]; FILE *fp; #ifndef WIN32 sprintf(fname,"%s/%s",getenv("HOME"),XWELL_DIR); mkdir(fname,0755); sprintf(fname,"%s/%s/%s",getenv("HOME"),XWELL_DIR,RC_FILE); #else sprintf(fname,"data\\%s", RC_FILE); #endif fp=fopen(fname, "w"); if(fp==0) { fprintf(stderr,"Error in opening resource file for writing:\n\t%s\n", strerror(errno)); return; } fprintf(fp,"#--------------- Options file for xwelltris %s ----------------#\n",VERSION); fprintf(fp,"#This file generated automatically, so don't edit it by hands\n\n"); fprintf(fp, "last_player: %s\n",inp_player->get_text()); if(sw_rotation->get_value()) fprintf(fp,"use_rotation: yes\n"); else fprintf(fp,"use_rotation: no\n"); if(sw_mixed->get_value()) fprintf(fp,"use_mixed: yes\n"); else fprintf(fp,"use_mixed: no\n"); if(sw_next_piece->get_value()) fprintf(fp,"use_next_piece: yes\n"); else fprintf(fp,"use_next_piece: no\n"); fprintf(fp, "start_level: %d\n",start_level); for(i=0;iget_value()) break; fprintf(fp, "tris_squares: %d\n", i+MIN_SQUARES); fprintf(fp,"#------------------ End of file ---------------------#\n"); fclose(fp); } //=========================================================================== /// global load_options() /// load options from file /// tags WellIntro void WellIntro::load_options() { int i,n; char fname[L_MAXPATH]; char buf[L_MAXPATH]; char tok[L_MAXPATH], *pbuf; FILE* fp; #ifndef WIN32 sprintf(fname,"%s/%s/%s",getenv("HOME"),XWELL_DIR,RC_FILE); #else sprintf(fname,"data\\%s",RC_FILE); #endif fp=fopen(fname, "r"); if(fp==0) return; while(fgets(buf,L_MAXPATH-1,fp)) { if(buf[0]=='#') continue; pbuf=get_next_token(buf,tok); if(!strcmp(tok,"use_rotation")) { get_next_token(pbuf,tok); if(!strcmp(tok,"yes")) sw_rotation->set_value(true); else sw_rotation->set_value(false); continue; } if(!strcmp(tok,"use_mixed")) { get_next_token(pbuf,tok); if(!strcmp(tok,"yes")) sw_mixed->set_value(true); else sw_mixed->set_value(false); continue; } if(!strcmp(tok,"use_next_piece")) { get_next_token(pbuf,tok); if(!strcmp(tok,"yes")) sw_next_piece->set_value(true); else sw_next_piece->set_value(false); continue; } if(!strcmp(tok,"last_player")) { get_next_token(pbuf,tok); inp_player->set_text(tok); continue; } if(!strcmp(tok,"start_level")) { get_next_token(pbuf,tok); start_level=atoi(tok); if(start_level<0 || start_level>=NUM_LEVELS) start_level=0; continue; } if(!strcmp(tok,"tris_squares")) { get_next_token(pbuf,tok); n=atoi(tok); n-=MIN_SQUARES; if(n<0 || n>=TOTAL_SQUARES) n=0; for(i=0;iset_value(n==i ? true : false); continue; } } fclose(fp); } //=========================================================================== /// global get_next_token(char* from, char* to) /// cut buffer by tokens /// tags WellIntro char* WellIntro::get_next_token(char* from, char* to) { int delta=0; char *orig_to=to; *to=0; if(*from==':') from++; while(*from==' ') from++; while(*from!=0 && *from!=':' && *from!='\n' && *from!='\r' && *from!=0) *to++=*from++; while(to!=orig_to && *to==' ') { to--; delta=1; } to+=delta; *to=0; return from; } xwelltris-1.0.1/src/wellkey.cxx0100644000175300014110000000764007605543562015106 0ustar leoguys// docm_prefix(///) /**************************************************************************** * Copyright (C) 2002 by Leo Khramov * email: leo@xnc.dubna.su * * 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. ****************************************************************************/ // $Id: wellkey.cxx,v 1.1.1.1 2003/01/04 11:37:22 leo Exp $ /// module description /// WellKey class implements key (or button) GUI element. It draw key with /// given images (uses geometry module) then catches mouse events and calls /// ObjectCaller on press. #include "globals.h" #include "wellkey.h" #include "wellengine.h" //////////////////////////////WellKey class/////////////////////////////// //=========================================================================== /// global WellKey(char*) /// constructor - fill name and get geometry /// tags WellKey WellKey::WellKey(char* iname) : WellObject() { strncpy(object_name,iname,GEO_NAME); object_name[GEO_NAME]=0; geo=get_geo_by_name(object_name); } //=========================================================================== /// global process_event(wEvent) /// stub that process events /// tags WellKey bool WellKey::process_event(wEvent ev) { MouseEvent *pmev; switch(ev.type) { case eKeyPress: dbgprintf(("WellKey - pressed\n")); object_on_press.call(wEvent(aKeyPressed,this)); return false; case eMousePress: pmev=(MouseEvent*)ev.data; return !press(pmev->mx,pmev->my); case eMouseMove: pmev=(MouseEvent*)ev.data; return !highlight(pmev->mx,pmev->my); } return true; } //=========================================================================== /// global highlight(int mx, int my) /// highlights key /// tags WellKey bool WellKey::highlight(int mx, int my) { if(mx>=geo[1].tox && my>=geo[1].toy && mxscreen_copy(&geo[1]); //highlighted state return true; } } else { if(highlighted) { highlighted=false; dbgprintf(("WellKey DEhighlighted via mouse\n")); default_well_engine->screen_copy(&geo[0]); //normal state return true; } } return false; } //=========================================================================== /// global press(int mx, int my) /// press key and call object /// tags WellKey bool WellKey::press(int mx, int my) { if(mx>=geo[2].tox && my>=geo[2].toy && mxscreen_copy(&geo[2]); //highlighted state object_on_press.call(wEvent(aKeyPressed,this)); return true; } return false; } //=========================================================================== /// global show() /// show object /// tags WellKey void WellKey::show() { shown=true; redraw(); default_well_engine->add_object(this); } //=========================================================================== /// global redraw() /// redraw object /// tags WellKey void WellKey::redraw() { if(shown) default_well_engine->screen_copy(&geo[0]); } //=========================================================================== /// global hide() /// hide object /// tags WellKey void WellKey::hide() { shown=false; default_well_engine->screen_clear(&geo[0]); default_well_engine->del_object(this); } xwelltris-1.0.1/src/wellsimpledraw.cxx0100644000175300014110000000651107624651653016463 0ustar leoguys// docm_prefix(///) /**************************************************************************** * Copyright (C) 2002 by Leo Khramov * email: leo@xnc.dubna.su * * 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. ****************************************************************************/ // $Id: wellsimpledraw.cxx,v 1.2 2003/02/19 09:51:39 leo Exp $ /// module description /// WellSimpleDrawing - class that implements simple drawing algorithm /// with dirty rectangles #include "wellsimpledraw.h" //=========================================================================== /// global WellSimpleDraw() /// constructor of the class - init's variables. /// tags WellSimpleDraw WellSimpleDraw::WellSimpleDraw() { max_dirties=0; } //=========================================================================== /// global ~WellSimpleDraw() /// destructor of the class. /// tags WellSimpleDraw WellSimpleDraw::~WellSimpleDraw() { clear_dirty_list(); } //=========================================================================== /// global new_dirty_rec(int dx, int dy) /// create new dirty rec and remember delta position for main screen /// tags WellSimpleDraw void WellSimpleDraw::new_dirty_rec(int dx, int dy) { current_dirty.delta_x=dx; current_dirty.delta_y=dy; max_x=max_y=-1; min_x=min_y=99999; //Hope we will never have screen bigger :) } //=========================================================================== /// global dirty_add_xy(int x, int y) /// we add dot to current dirty rec - need detect max and min corners /// tags WellSimpleDraw void WellSimpleDraw::dirty_add_xy(int x, int y) { if(xmax_x) max_x=x; if(ymax_y) max_y=y; } //=========================================================================== /// global finish_dirty_rec() /// finish dots definition of current dirty rec - add it to the dirty queue /// tags WellSimpleDraw void WellSimpleDraw::finish_dirty_rec() { current_dirty.x=min_x; current_dirty.y=min_y; current_dirty.l=max_x-min_x+1; current_dirty.h=max_y-min_y+1; DirtyList *plist=new DirtyList(current_dirty); dirty_list.add(plist); max_dirties++; } //=========================================================================== /// global clear_dirty_list() /// clear all the list and free allocated memory /// tags WellSimpleDraw void WellSimpleDraw::clear_dirty_list() { DirtyList *plist; do { plist=dirty_list.get_next(); if(plist) { plist->del_self(); delete plist; } } while(plist); max_dirties=0; } //=========================================================================== /// global dirty_add_rec(DirtyRect r) /// directly add the whole rec to the dirty queue /// tags WellSimpleDraw void WellSimpleDraw::dirty_add_rec(DirtyRect r) { DirtyList *plist=new DirtyList(r); dirty_list.add(plist); max_dirties++; } xwelltris-1.0.1/src/wellswitch.cxx0100644000175300014110000001005107605543562015605 0ustar leoguys// docm_prefix(///) /**************************************************************************** * Copyright (C) 2002 by Leo Khramov * email: leo@xnc.dubna.su * * 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. ****************************************************************************/ // $Id: wellswitch.cxx,v 1.1.1.1 2003/01/04 11:37:22 leo Exp $ /// module description /// WellSwitch class implements Switch GUI element, it can be set or reset, /// uses for switching options #include "globals.h" #include "wellswitch.h" #include "wellengine.h" //////////////////////////////WellSwitch class/////////////////////////////// //=========================================================================== /// global WellSwitch(char*) /// constructor - fill name and get geometry /// tags WellSwitch WellSwitch::WellSwitch(char* iname) : WellObject() { strncpy(object_name,iname,GEO_NAME); object_name[GEO_NAME]=0; geo=get_geo_by_name(object_name); value=false; mode=SetReset; } //=========================================================================== /// global process_event(wEvent) /// stub that process events /// tags WellSwitch bool WellSwitch::process_event(wEvent ev) { MouseEvent *pmev; switch(ev.type) { case eMousePress: pmev=(MouseEvent*)ev.data; return !press(pmev->mx,pmev->my); case eMouseMove: pmev=(MouseEvent*)ev.data; return !highlight(pmev->mx,pmev->my); } return true; } //=========================================================================== /// global highlight(int mx, int my) /// highlights key /// tags WellSwitch bool WellSwitch::highlight(int mx, int my) { if(mx>=geo[1].tox && my>=geo[1].toy && mxscreen_copy(&geo[1]); //highlighted state return true; } } else { if(highlighted) { highlighted=false; dbgprintf(("WellSwitch DEhighlighted via mouse\n")); redraw(); return true; } } return false; } //=========================================================================== /// global press(int mx, int my) /// press key and call object /// tags WellSwitch bool WellSwitch::press(int mx, int my) { if(mx>=geo[1].tox && my>=geo[1].toy && mxadd_object(this); } //=========================================================================== /// global redraw() /// redraw object /// tags WellSwitch void WellSwitch::redraw() { if(shown) { default_well_engine->screen_copy(&geo[0]); //normal state if(value) default_well_engine->screen_copy(&geo[2]); //value state else default_well_engine->screen_clear(&geo[2]); //value state } } //=========================================================================== /// global hide() /// hide object /// tags WellSwitch void WellSwitch::hide() { shown=false; default_well_engine->screen_clear(&geo[0]); default_well_engine->del_object(this); } xwelltris-1.0.1/src/welltopnine.cxx0100644000175300014110000003002607626065504015762 0ustar leoguys// docm_prefix(///) /**************************************************************************** * Copyright (C) 2002 by Leo Khramov * email: leo@xnc.dubna.su * * 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. ****************************************************************************/ // $Id: welltopnine.cxx,v 1.3 2003/02/23 06:33:40 leo Exp $ #include "welltopnine.h" #include "wellengine.h" #include "commonfuncs.h" WellTopNine *default_top_nine; //=========================================================================== /// global Score() /// constructor, set all to zeros and current date /// tags Score Score::Score() { player[0]=date_time[0]=0; level=score=lines=squares=play_time=0; mixed=rotation=next_piece=false; set_current_time(); } //=========================================================================== /// global get_next_token(char* from, char* to) /// cut buffer by tokens /// tags Score char* Score::get_next_token(char* from, char* to) { int delta=0; char *orig_to=to; *to=0; if(*from==';') from++; while(*from==' ') from++; while(*from!=0 && *from!=';' && *from!='\n' && *from!='\r' && *from!=0) *to++=*from++; while(to!=orig_to && *to==' ') { to--; delta=1; } to+=delta; *to=0; return from; } //=========================================================================== /// global save(FILE*) /// save score_line to file /// tags Score void Score::save(FILE* fp) { fprintf(fp,"%d;%-12s;%s;%8d;%5d;%2d;%d;%d;%d;%d\n", squares,player,date_time,score,lines,level, mixed ? 1 : 0, rotation ? 1 : 0,play_time, next_piece ? 1 : 0); } //=========================================================================== /// global load(FILE*) /// load score_line from file /// tags Score bool Score::load(FILE* fp) { char buf[L_MAXPATH]; char *ptr=buf; char token[L_MAXPATH]; while(1) { if(fgets(buf,L_MAXPATH-1,fp)==0) return false; if(buf[0]=='#') //Skipping comments continue; //squares ptr=get_next_token(ptr,token); squares=atoi(token); //player ptr=get_next_token(ptr,token); strncpy(player,token,PLAYER_NAME_LEN-1); player[PLAYER_NAME_LEN-1]=0; //date_time ptr=get_next_token(ptr,token); strncpy(date_time,token,L_DATE-1); date_time[L_DATE-1]=0; //score ptr=get_next_token(ptr,token); score=atoi(token); //lines ptr=get_next_token(ptr,token); lines=atoi(token); //level ptr=get_next_token(ptr,token); level=atoi(token); //mixed ptr=get_next_token(ptr,token); mixed= atoi(token) ? true : false; //rotation ptr=get_next_token(ptr,token); rotation= atoi(token) ? true : false; //play_time ptr=get_next_token(ptr,token); play_time=atoi(token); //rotation ptr=get_next_token(ptr,token); next_piece= atoi(token) ? true : false; break; } dbgprintf(("scores: %d;%s;%s;%8d;%5d;%2d;%d;%d\n", squares,player,date_time,score,lines,level, mixed ? 1 : 0, rotation ? 1 : 0)); return true; } //=========================================================================== /// global set_current_time() /// set current date and time to date (format YYYY-MM-DD HH:MI) /// tags Score void Score::set_current_time() { struct tm *time_str; time(&start_t); time_str=localtime(&start_t); strftime(date_time,L_DATE,"%Y-%m-%d",time_str); } //=========================================================================== /// global calc_play_time() /// calculate playing time from start_t till now /// tags Score void Score::calc_play_time() { time_t now_t; time(&now_t); play_time=now_t - start_t; } //=========================================================================== /// global set_player(char* pl) /// set player name /// tags Score void Score::set_player(char* name) { if(name) strncpy(player,name,PLAYER_NAME_LEN); else strcpy(player,"unknown"); player[PLAYER_NAME_LEN-1]=0; } //////////////////////////ScoreTable struct methods///////////////////////// //=========================================================================== /// global ScoreTable() /// constructor of scoretable /// tags ScoreTable ScoreTable::ScoreTable() { int i; for(i=0;iplace=i+1; } } //=========================================================================== /// global ~ScoreTable() /// destructor of scoretable /// tags ScoreTable ScoreTable::~ScoreTable() { int i; for(i=0;iplace=i+1; for(j=0;jscorescore) { ptr=table[i]; table[i]=table[j]; table[j]=ptr; table[j]->place=j+1; table[i]->place=i+1; } } //=========================================================================== /// global save(FILE* fp) /// save table to give file descr /// tags ScoreTable void ScoreTable::save(FILE* fp) { int i; for(i=0;isave(fp); } //=========================================================================== /// global set_squares(int isquare) /// set squares to given number /// tags ScoreTable void ScoreTable::set_squares(int isquares) { int i; for(i=0;isquares=isquares; } //=========================================================================== /// global set_and_get(int idx,Score*) /// set new Score and get old one. If new == 0 just return old /// tags ScoreTable Score* ScoreTable::set_and_get(int idx, Score* new_one) { Score *old_one; if(idx<0 || idx>=TOP_NINE) return new_one; old_one=table[idx]; if(new_one) { table[idx]=new_one; table[idx]->place=idx+1; } return old_one; } //////////////////////////////WellTopNine class/////////////////////////////// //=========================================================================== /// global WellTopNine() /// constructor - fill table /// tags WellTopNine WellTopNine::WellTopNine() : WellObject() { int i; current_score=0; page=3; geo=get_geo_by_name("top_nine_elements"); for(i=0;inew_well_image_font(imFont1, FONT3_L,FONT3_H, FONT3_DX,FONT3_DY); text_lines[i]->set_screen_region(TOPNINE_TXT_X, TOPNINE_TXT_Y + i*TOPNINE_TXT_STEPY, TOPNINE_TXT_L,TOPNINE_TXT_H); } key_exit=default_well_engine->new_well_key("top_key_exit"); key_exit->set_object_on_press(ObjectCaller(this,&WellObject::hide_by_call)); } //=========================================================================== /// global save_scores() /// save score table to file /// tags WellTopNine bool WellTopNine::save_scores() { int i; char fname[L_MAXPATH]; if(!find_full_path_for_file(SCOREFILE,fname,ReadWrite)) { #ifndef WIN32 sprintf(fname, "%s/.xwelltris",getenv("HOME")); mkdir(fname,0755); strcat(fname,"/"); strcat(fname,SCOREFILE); #endif } FILE* fp=fopen(fname,"w"); if(!fp) { fprintf(stderr,"PANIC: can't save scores file: %s - %s\n", fname,strerror(errno)); return false; } for(i=0;iload(fp)) { i=pscore->squares-1; pscore=tables[i].set_and_get(idx[i],pscore); idx[i]++; } fclose(fp); for(i=0;isquares-1; current_score=new_one; if(tables[page].table[TOP_NINE-1]->score < new_one->score) { pscore=tables[page].table[TOP_NINE-1]; tables[page].table[TOP_NINE-1]=new_one; tables[page].sort_by_score(); return pscore; } return new_one; } //=========================================================================== /// global find_challenger(Score* me) /// Find challenger, whose score > than mine // return 0 if you are the first /// tags WellTopNine Score* WellTopNine::find_challenger(Score* me) { int i; ScoreTable *pcur; if(me==0) return 0; pcur= &tables[me->squares-1]; for(i=TOP_NINE-1;i>=0;i--) if(pcur->table[i]->score > me->score) return pcur->table[i]; return 0; } //=========================================================================== /// global process_event(wEvent) /// stub that process events (empty here) /// tags WellTopNine bool WellTopNine::process_event(wEvent) { return true; } //=========================================================================== /// global show() /// stub that show object (empty) /// tags WellTopNine void WellTopNine::show() { key_exit->show(); default_well_engine->set_main_background_image(imScoreBG); default_well_engine->add_object(this); redraw_table(); shown=true; save_scores(); } //=========================================================================== /// global hide() /// stub that hide object (empty) /// tags WellTopNine void WellTopNine::hide() { shown=false; default_well_engine->del_object(this); key_exit->hide(); object_on_exit.call(wEvent(aEmpty,this)); } //=========================================================================== /// global redraw_table() /// redraw all data for score table according to current_score and page /// tags WellTopNine void WellTopNine::redraw_table() { int i,j; char buf[L_MAXPATH]; Score *pscore; for(i=0;iplace,pscore->player,pscore->date_time, pscore->score,pscore->lines,pscore->level); if(pscore!=current_score) { text_lines[i]->set_font(FONT3_L,FONT3_H, FONT3_DX,FONT3_DY); text_lines[i]->set_screen_region(TOPNINE_TXT_X, TOPNINE_TXT_Y + i*TOPNINE_TXT_STEPY, TOPNINE_TXT_L,TOPNINE_TXT_H); } else { dbgprintf(("Highlighting item %d\n",i)); text_lines[i]->set_font(FONT5_L,FONT5_H, FONT5_DX,FONT5_DY); text_lines[i]->set_screen_region(TOPNINE_TXT_X, TOPNINE_TXT_Y + i*TOPNINE_TXT_STEPY, TOPNINE_TXT_L,TOPNINE_TXT_H); } text_lines[i]->set_text(buf); text_lines[i]->draw_text(); for(j=0;j<3;j++) { geo[j].toy=TOPNINE_TXT_Y + i*TOPNINE_TXT_STEPY - 2; } if(pscore->rotation) default_well_engine->screen_copy(&geo[0]); if(pscore->next_piece) default_well_engine->screen_copy(&geo[1]); if(pscore->mixed) default_well_engine->screen_copy(&geo[2]); } } xwelltris-1.0.1/src/include/0040755000175300014110000000000007642314524014320 5ustar leoguysxwelltris-1.0.1/src/include/bilist.h0100644000175300014110000000236007605543562015762 0ustar leoguys#ifndef BILIST_H #define BILIST_H template < class TC > class bilist { TC object; bool usable; bilist *next,*prev; public: bilist() { next=prev=0;usable=false;}; bilist(TC& obj) { next=prev=0;object=obj;usable=true;}; bool add(bilist *plist); bilist* del(TC& obj); bool del_self() { if(next) next->set_prev(prev); if(prev) prev->set_next(next); return true; }; bool is_last() {return next==0;}; bool is_first() {return prev==0;}; bilist *get_next() { return next;}; bilist *get_prev() { return prev;}; void set_prev(bilist *plist) { prev=plist;}; void set_next(bilist *plist) { next=plist;}; TC& get_object() { return object;}; }; //here we are using while for searching end of list template bool bilist::add(bilist *plist) { bilist *ptr=this; while(ptr->get_next()!=0) ptr=ptr->get_next(); ptr->set_next(plist); plist->set_prev(ptr); return true; } //and here lets make recursion for diff :) template bilist* bilist::del(TC& obj) { if(obj==object) { del_self(); return this; } if(next) return next->del(obj); return 0; //Can't find object in list. } #endif xwelltris-1.0.1/src/include/commonfuncs.h0100644000175300014110000000032707605543562017024 0ustar leoguys#ifndef COMMONFUNCS_H #define COMMONFUNCS_H #include "globals.h" enum FMode { ReadOnly, ReadWrite }; extern bool find_full_path_for_file(char* fname, char* ret_full_pathname, FMode fm=ReadOnly); #endif xwelltris-1.0.1/src/include/config.h0100644000175300014110000000757307627346007015753 0ustar leoguys/* src/include/config.h. Generated automatically by configure. */ /* src/include/config.h.in. Generated automatically from configure.in by autoheader. */ /* Define if on AIX 3. System headers sometimes define this. We just want to avoid a redefinition error message. */ #ifndef _ALL_SOURCE /* #undef _ALL_SOURCE */ #endif /* Define to empty if the keyword does not work. */ /* #undef const */ /* Define to `int' if doesn't define. */ /* #undef gid_t */ /* Define if you have that is POSIX.1 compatible. */ #define HAVE_SYS_WAIT_H 1 /* Define as __inline if that's what the C compiler calls it. */ /* #undef inline */ /* Define if on MINIX. */ /* #undef _MINIX */ /* Define to `int' if doesn't define. */ /* #undef mode_t */ /* Define to `int' if doesn't define. */ /* #undef pid_t */ /* Define if the system does not provide POSIX.1 features except with this defined. */ /* #undef _POSIX_1_SOURCE */ /* Define if you need to in order for stat and other things to work. */ /* #undef _POSIX_SOURCE */ /* Define as the return type of signal handlers (int or void). */ #define RETSIGTYPE void /* Define to `unsigned' if doesn't define. */ /* #undef size_t */ /* Define if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Define if you can safely include both and . */ #define TIME_WITH_SYS_TIME 1 /* Define if your declares struct tm. */ /* #undef TM_IN_SYS_TIME */ /* Define to `int' if doesn't define. */ /* #undef uid_t */ /* Define if the X Window System is missing or not being used. */ /* #undef X_DISPLAY_MISSING */ /* Define if you have the atexit function. */ #define HAVE_ATEXIT 1 /* Define if you have the getcwd function. */ #define HAVE_GETCWD 1 /* Define if you have the mkdir function. */ #define HAVE_MKDIR 1 /* Define if you have the putenv function. */ #define HAVE_PUTENV 1 /* Define if you have the select function. */ #define HAVE_SELECT 1 /* Define if you have the seteuid function. */ #define HAVE_SETEUID 1 /* Define if you have the setlocale function. */ #define HAVE_SETLOCALE 1 /* Define if you have the setutent function. */ #define HAVE_SETUTENT 1 /* Define if you have the socket function. */ #define HAVE_SOCKET 1 /* Define if you have the unsetenv function. */ #define HAVE_UNSETENV 1 /* Define if you have the header file. */ #define HAVE_DIRENT_H 1 /* Define if you have the header file. */ #define HAVE_ERRNO_H 1 /* Define if you have the header file. */ #define HAVE_FCNTL_H 1 /* Define if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define if you have the header file. */ #define HAVE_MATH_H 1 /* Define if you have the header file. */ /* #undef HAVE_NDIR_H */ /* Define if you have the header file. */ #define HAVE_STRINGS_H 1 /* Define if you have the header file. */ /* #undef HAVE_SYS_DIR_H */ /* Define if you have the header file. */ /* #undef HAVE_SYS_NDIR_H */ /* Define if you have the header file. */ #define HAVE_SYS_PARAM_H 1 /* Define if you have the header file. */ #define HAVE_SYS_SELECT_H 1 /* Define if you have the header file. */ /* #undef HAVE_SYS_SIGEVENT_H */ /* Define if you have the header file. */ #define HAVE_SYS_STAT_H 1 /* Define if you have the header file. */ #define HAVE_SYS_TIME_H 1 /* Define if you have the header file. */ #define HAVE_SYS_TYPES_H 1 /* Define if you have the header file. */ #define HAVE_SYS_UTSNAME_H 1 /* Define if you have the header file. */ #define HAVE_SYS_WAIT_H 1 /* Define if you have the header file. */ #define HAVE_UNISTD_H 1 /* Define if you have the m library (-lm). */ #define HAVE_LIBM 1 xwelltris-1.0.1/src/include/config.h.in0100644000175300014110000000716707627346007016357 0ustar leoguys/* src/include/config.h.in. Generated automatically from configure.in by autoheader. */ /* Define if on AIX 3. System headers sometimes define this. We just want to avoid a redefinition error message. */ #ifndef _ALL_SOURCE #undef _ALL_SOURCE #endif /* Define to empty if the keyword does not work. */ #undef const /* Define to `int' if doesn't define. */ #undef gid_t /* Define if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define as __inline if that's what the C compiler calls it. */ #undef inline /* Define if on MINIX. */ #undef _MINIX /* Define to `int' if doesn't define. */ #undef mode_t /* Define to `int' if doesn't define. */ #undef pid_t /* Define if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE /* Define if you need to in order for stat and other things to work. */ #undef _POSIX_SOURCE /* Define as the return type of signal handlers (int or void). */ #undef RETSIGTYPE /* Define to `unsigned' if doesn't define. */ #undef size_t /* Define if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Define if your declares struct tm. */ #undef TM_IN_SYS_TIME /* Define to `int' if doesn't define. */ #undef uid_t /* Define if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING /* Define if you have the atexit function. */ #undef HAVE_ATEXIT /* Define if you have the getcwd function. */ #undef HAVE_GETCWD /* Define if you have the mkdir function. */ #undef HAVE_MKDIR /* Define if you have the putenv function. */ #undef HAVE_PUTENV /* Define if you have the select function. */ #undef HAVE_SELECT /* Define if you have the seteuid function. */ #undef HAVE_SETEUID /* Define if you have the setlocale function. */ #undef HAVE_SETLOCALE /* Define if you have the setutent function. */ #undef HAVE_SETUTENT /* Define if you have the socket function. */ #undef HAVE_SOCKET /* Define if you have the unsetenv function. */ #undef HAVE_UNSETENV /* Define if you have the header file. */ #undef HAVE_DIRENT_H /* Define if you have the header file. */ #undef HAVE_ERRNO_H /* Define if you have the header file. */ #undef HAVE_FCNTL_H /* Define if you have the header file. */ #undef HAVE_LIMITS_H /* Define if you have the header file. */ #undef HAVE_MATH_H /* Define if you have the header file. */ #undef HAVE_NDIR_H /* Define if you have the header file. */ #undef HAVE_STRINGS_H /* Define if you have the header file. */ #undef HAVE_SYS_DIR_H /* Define if you have the header file. */ #undef HAVE_SYS_NDIR_H /* Define if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define if you have the header file. */ #undef HAVE_SYS_SELECT_H /* Define if you have the header file. */ #undef HAVE_SYS_SIGEVENT_H /* Define if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define if you have the header file. */ #undef HAVE_SYS_UTSNAME_H /* Define if you have the header file. */ #undef HAVE_SYS_WAIT_H /* Define if you have the header file. */ #undef HAVE_UNISTD_H /* Define if you have the m library (-lm). */ #undef HAVE_LIBM xwelltris-1.0.1/src/include/geometry.h0100644000175300014110000000050007605543562016321 0ustar leoguys#ifndef GEOMETRY_H #define GEOMETRY_H #include "welltris.h" struct Geo { Images im; int fromx, fromy; int tox,toy; unsigned int l,h; }; struct GeoObject { char name[GEO_NAME]; Geo *geo; }; extern Geo* get_geo_by_name(char* name); #endif xwelltris-1.0.1/src/include/globals.h0100644000175300014110000000245007627346007016116 0ustar leoguys#ifndef XNC_GLOBALS_H #define XNC_GLOBALS_H #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #ifdef HAVE_SYS_SIGEVENT_H #include #endif #include #include #ifdef HAVE_STRINGS_H #include #endif #include #include #ifdef HAVE_LIMITS_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_SYS_STAT_H #include #endif #ifdef HAVE_SYS_UTSNAME_H #include #endif #ifdef TIME_WITH_SYS_TIME #include #include #else #ifdef HAVE_SYS_TIME_H #include #else #include #endif #endif #ifdef HAVE_SYS_PARAM_H #include #endif #ifdef HAVE_SYS_WAIT_H #include #endif #ifdef HAVE_SYS_SELECT_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_FCNTL_H #include #endif #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_MATH_H #include #endif #include "types.h" #include "mydebug.h" #define MAX2(x1,x2) (x1 #endif #include #ifdef HAVE_SYS_SIGEVENT_H #include #endif #include #include #ifdef HAVE_STRINGS_H #include #endif #include #include #ifdef HAVE_LIMITS_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_SYS_STAT_H #include #endif #ifdef HAVE_SYS_UTSNAME_H #include #endif #ifdef TIME_WITH_SYS_TIME #include #include #else #ifdef HAVE_SYS_TIME_H #include #else #include #endif #endif #ifdef HAVE_SYS_PARAM_H #include #endif #ifdef HAVE_SYS_WAIT_H #include #endif #ifdef HAVE_SYS_SELECT_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_FCNTL_H #include #endif #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_MATH_H #include #endif #include "types.h" #include "mydebug.h" #define MAX2(x1,x2) (x1 #ifdef HAVE_SYS_SIGEVENT_H #include #endif #include #include #ifdef __cplusplus extern "C" int debprintf(const char *format,...); #else extern int debprintf(const char *format,...); #endif #ifdef DEBUG_XNC #ifdef __FILE__ #ifdef __LINE__ #define __DEBUG() fprintf(stderr, "%-17s:%4d ", __FILE__, __LINE__) #endif #endif #ifndef __DEBUG #define __DEBUG() ((void)0) #endif # define dbgprintf(x) do {__DEBUG(); debprintf x;} while(0) #else # define dbgprintf(x) ((void)0) #endif #endif xwelltris-1.0.1/src/include/sysheaders.h0100644000175300014110000000026307605543562016646 0ustar leoguys #include #include #include #include #include #include #include #include #include xwelltris-1.0.1/src/include/types.h0100644000175300014110000000046707605543562015646 0ustar leoguys#ifndef MYTYPES_H #define MYTYPES_H #ifndef uchar typedef unsigned char uchar; #endif #ifndef ulong typedef unsigned long ulong; #endif #ifndef uint typedef unsigned int uint; #endif #define L_MAXPATH 2048 #define YES 1 #define NO 0 #endif /* ------------ End of file -------------- */ xwelltris-1.0.1/src/include/version.h0100644000175300014110000000011607605543562016156 0ustar leoguys#ifndef WELL_VERSION_H #define WELL_VERSION_H #define VERSION "1.0.0" #endif xwelltris-1.0.1/src/include/wellclass.h0100644000175300014110000001026607605543562016471 0ustar leoguys#ifndef WELLCLASS_H #define WELLCLASS_H #include "globals.h" #include "welltris.h" #include "wellobject.h" #include "welldrawing.h" #include "wellengine.h" #include "wellimagefont.h" #include "welltopnine.h" //define structures for work with figures struct thing_t { int squares, polyomino_number; int xpos, ypos; int size, color_number; int bonus, random_rotation, random_reflection; long random_number; thing_t() { squares=polyomino_number=xpos=ypos=size=0; color_number=bonus=random_rotation=random_reflection=0; random_number=0; }; }; struct Polyominoes { int rotation; int reflection; int start_height; int shape[MAX_SQUARES][MAX_SQUARES]; int size; }; struct Mode { int number[MAX_MODES][MAX_TYPES]; int start[MAX_START_POLYOMINOES][MAX_TYPES]; int turn_style; }; struct Polytris { Polyominoes polyomino[MAX_POLYOMINOES]; Mode mode[MAX_MODES]; int diagonal_switch; }; struct Field { int pmid, cid; }; class WellBase: public WellObject { protected: Polytris tris[MAX_SQUARES - MIN_SQUARES + 1]; int frozen_wall[MAX_SIDES]; thing_t curThing, nextThing; Field wall[MAX_DEPTH+MAX_WIDTH][MAX_PERIMETER]; Field base[MAX_WIDTH][MAX_WIDTH]; int level, score, rows, rows_levelup; bool bonusNow; //Options bool showNext; bool beep; bool diagonal; bool mixed; bool bonus; bool grid; bool cw; bool gradualAppear; bool rotation; int squares, pause, steps_to_rotate; //Drawing Engine WellDrawingEngine *dre; WellImageFont *txt_score; WellImageFont *txt_lines; WellImageFont *txt_levelup; WellImageFont *txt_level; WellImageFont *txt_first; WellImageFont *txt_second; WellImageFont *txt_third; Score *player_score; ObjectCaller game_over_object; char player_name[PLAYER_NAME_LEN]; void set_default_options(); void read_polyominoes(); void new_thing(); void redo_next(); void put_box(); bool overlapping(); bool at_bottom(); bool at_base_fully(); bool at_base_partially(); bool wall_change(thing_t old,thing_t new_t); bool all_frozen(); void wall_to_base(int* base_x,int* base_y,int wall_x,int wall_y); void try_move(Actions move); void draw_thing_diff(thing_t* old); void draw_thing(); void draw_field(); void fill_lines(); void freeze_wall(int w); void defreeze_wall(int w); void drop_wall(int); void check_freeze(); int check_lines(); void check_update_lines(); bool process_action(Actions action); void make_pause(); void make_rotation(); virtual void draw_status(); virtual void draw_next(); virtual void clear_next(); virtual void draw_grid(); virtual void draw_box(int color, int x, int y); public: WellBase(); void init(WellEngine*); void udelay(int msec); bool move_one_step(Actions); void game_over(); void new_game(); void new_level_calc(); void redraw_all(); void set_level(int il) { level=il; dbgprintf(("Level now is %d\n",level));}; void set_rotation(bool r) { rotation=r;}; void set_mixed(bool r) { mixed=r;}; void set_next_piece(bool r) { showNext=r;}; void set_squares(int i) { squares=i;}; void set_object_on_game_over(ObjectCaller obj) { game_over_object=obj; }; void set_player_name(char *pn) { strcpy(player_name,pn); }; virtual bool process_event(wEvent); virtual void show(); virtual void hide(); }; #endif xwelltris-1.0.1/src/include/welldrawing.h0100644000175300014110000000337207625410061017004 0ustar leoguys#ifndef DRAWING_H #define DRAWING_H #include "globals.h" #include "welltris.h" #include "wellsimpledraw.h" #include "geometry.h" struct FieldPoints { WPoint wall_points[MAX_PERIMETER+1][MAX_DEPTH+1]; WPoint base_points[MAX_WIDTH+1][MAX_WIDTH+1]; }; class WellDrawingEngine: public WellSimpleDraw { protected: int num_fields; unsigned int l,h; int delta_x,delta_y; int current_id; int pix_max_width; int pix_base_width; int pix_base_delta; int pix_wall_delta; int pix_max_delta; int pix_dx,pix_dy; int center_x,center_y; int f_step; float inner_max_alpha,outer_max_alpha; FieldPoints *points; public: virtual void init(int,int,int,unsigned int,unsigned int); virtual void draw_square(int color, int x, int y); virtual void draw_trapazoid(int color, int x, int y); virtual void sync(); virtual void field_sync() {}; virtual void bell(int); virtual void flush_all(); virtual void flush_dirty(); virtual void clear_field(int i) {}; virtual void set_field_id(int id) { current_id=id;}; virtual void draw_grid() {}; virtual Actions key_to_action(void* event) { return NOTHING; }; virtual void calc_grid_points(); virtual void set_field_sizes(int idx, int idy, int ipix_wall_delta, int ipix_base_delta); virtual void set_inner_alpha(float ialpha) { inner_max_alpha= ialpha*float(W_PI/180.0);}; virtual void set_outer_alpha(float ialpha) { outer_max_alpha= ialpha*float(W_PI/180.0);}; virtual void outer_rotation(); virtual void pixmap_copy(Geo *pgeo) {}; }; #endif xwelltris-1.0.1/src/include/wellengine.h0100644000175300014110000000512207624463352016623 0ustar leoguys#ifndef WELLENGINE_H #define WELLENGINE_H #include "wellobject.h" #include "bilist.h" #include "welldrawing.h" #include "wellimagefont.h" #include "welltopnine.h" #include "wellintro.h" #include "wellkey.h" #include "wellswitch.h" #include "wellinput.h" class WellBase; //Class used in Time queue for delivering time events to objects struct TimeObject { WellObject* obj; int ticks_left; int ticks; TimeObject() {ticks=ticks_left=0; obj=0;}; TimeObject(WellObject* wo, int t=1) { obj=wo;ticks_left=ticks=t;}; void restart_ticks() { ticks_left=ticks; }; bool operator == (TimeObject& o2) {return o2.obj==obj;}; }; typedef bilist TimeList; //List of objects that want timers typedef bilist ObjectList; //List of all objects that waht events struct WellImage { Images id; //Image id int l,h; //Size of image WellImage() { id=imNone; l=h=0;}; }; class WellEngine { protected: TimeList timelist; ObjectList objectlist; unsigned int mainl,mainh; // size of main window bool done_loop_var; WellImage images[MAX_IMAGES]; virtual void init_mainwindow(int,char**)=0; virtual int wait_for_timers()=0; virtual bool process_time_event(); virtual bool process_event_for_all(wEvent); public: WellEngine(int,char**); ~WellEngine(); virtual void show_main()=0; virtual void event_loop()=0; virtual bool add_timer(WellObject* wo, int ticks); virtual bool del_timer(WellObject* wo); virtual bool add_object(WellObject* wo); virtual bool del_object(WellObject* wo); virtual void clear_objectlist(); virtual void done_loop() { done_loop_var=true;}; virtual WellDrawingEngine* new_well_drawing_engine(); virtual WellTopNine* new_well_top_nine(); virtual WellIntro* new_well_intro(); virtual WellKey* new_well_key(char*); virtual WellInput* new_well_input(char*) { return 0;}; virtual WellSwitch* new_well_switch(char*); virtual WellImageFont* new_well_image_font(Images id, unsigned int ifl, unsigned int ifh, int idx, int idy) { return 0;}; virtual WellBase* new_well_base(); virtual bool load_image(Images id, char* name) { return false;}; virtual void set_main_background_image(Images id) {}; virtual void screen_copy(Geo*) {}; virtual void screen_clear(Geo*) {}; virtual void load_images(); virtual void udelay(int msec) {}; }; extern WellEngine* default_well_engine; extern WellEngine* new_well_engine(int argc, char** argv); #endif xwelltris-1.0.1/src/include/wellimagefont.h0100644000175300014110000000216607605543562017335 0ustar leoguys#ifndef WELLIMAGEFONT_H #define WELLIMAGEFONT_H #include "globals.h" #include "welltris.h" #include "wellsimpledraw.h" enum Justify { RightJust, CenterJust, LeftJust }; class WellImageFont: public WellSimpleDraw { protected: Images font_id; unsigned int font_l, font_h; int dx,dy; char text[L_MAXPATH]; int text_l; int screen_x,screen_y,screen_l,screen_h; virtual void draw_symbol(int ix, int iy, unsigned int il, unsigned int ih, char symb)=0; public: WellImageFont(Images id, unsigned int ifl, unsigned int ifh, int idx, int idy); virtual void set_text(char* itext); virtual void set_font(unsigned int ifl, unsigned int ifh, int idx, int idy); virtual void set_screen_region(int ix, int iy, int il, int ih); virtual void draw_text(Justify just=LeftJust); virtual void draw_text(char* text, int text_l, Justify just=LeftJust); virtual void draw_text(char* text, int text_l, Colors idx, Justify just=LeftJust); virtual void clear_region()=0; virtual void clear_region(Colors idx)=0; }; #endif xwelltris-1.0.1/src/include/wellinput.h0100644000175300014110000000133707605543562016522 0ustar leoguys#ifndef WELLINPUT_H #define WELLINPUT_H #include "globals.h" #include "wellobject.h" #include "wellimagefont.h" class WellInput: public WellObject { protected: ObjectCaller object_on_enter; char buf[L_MAXPATH]; int buflen,pos,maxlen; WellImageFont *fnt; virtual void draw_text(); public: WellInput(char* keyname); void set_object_on_enter(ObjectCaller o) { object_on_enter=o;}; virtual bool process_event(wEvent); virtual void show(); virtual void hide(); virtual void redraw(); void set_text(char* txt); void set_max_len(int ml) { maxlen=ml;}; virtual char* get_text() { return buf;}; }; #endif xwelltris-1.0.1/src/include/wellintro.h0100644000175300014110000000276307605543562016522 0ustar leoguys#ifndef WELLINTRO_H #define WELLINTRO_H #include "welltris.h" #include "wellobject.h" #include "wellkey.h" #include "wellimagefont.h" #include "wellswitch.h" #include "wellinput.h" class WellBase; class WellIntro: public WellObject { protected: ObjectCaller object_on_exit, object_on_new_game, object_on_top_nine; WellKey *key_exit, *key_new_game, *key_top_nine, *key_plus, *key_minus; WellImageFont *txt_level; WellBase *well; WellSwitch *sw_rotation, *sw_mixed, *sw_next_piece, *sw_squares[TOTAL_SQUARES]; WellInput *inp_player; int start_level; void draw_start_level(); char* get_next_token(char* from, char* to); public: WellIntro(); virtual bool process_event(wEvent); virtual void show(); virtual void redraw(); virtual void hide(); virtual bool hide_by_call(wEvent); void set_object_on_exit(ObjectCaller obj) { object_on_exit=obj; }; void set_object_on_new_game(ObjectCaller obj) { object_on_new_game=obj; }; void set_object_on_top_nine(ObjectCaller obj) { object_on_top_nine=obj; }; void set_well_base(WellBase* o); void put_all_to_game(); void load_defaults(); void load_options(); void save_options(); }; #endif xwelltris-1.0.1/src/include/wellkey.h0100644000175300014110000000101507605543562016144 0ustar leoguys#ifndef WELLKEY_H #define WELLKEY_H #include "wellobject.h" class WellKey: public WellObject { protected: ObjectCaller object_on_press; bool highlighted; bool press(int mx, int my); bool highlight(int mx, int my); public: WellKey(char* keyname); void set_object_on_press(ObjectCaller o) { object_on_press=o;}; virtual bool process_event(wEvent); virtual void show(); virtual void hide(); virtual void redraw(); }; #endif xwelltris-1.0.1/src/include/wellobject.h0100644000175300014110000000253407605543562016631 0ustar leoguys#ifndef WELLOBJECT_H #define WELLOBJECT_H #include "geometry.h" enum EvType { eTimeOut, eKeyPress, eMouseMove, eMousePress, eExpose, eDelete, eFocusOut, aEmpty, aGameOver, aIntroExit, aKeyPressed, aSwitchChanged, aInputDone }; enum ButtonState { But1Press, But2Press, But3Press }; struct wEvent { EvType type; void *data; wEvent(EvType t,void *idata=0) { type=t;data=idata;}; }; struct MouseEvent { int mx,my; ButtonState bstate; }; //Basic class of all game objects class WellObject { protected: bool shown; Geo *geo; char object_name[GEO_NAME+1]; public: WellObject() { shown=false; geo=0; object_name[0]=0;}; virtual bool process_event(wEvent)=0; virtual void show() { shown=true;}; virtual bool show_by_call(wEvent) { show(); return true;}; virtual void hide() { shown=false;}; virtual bool hide_by_call(wEvent) { hide(); return true;}; virtual void redraw() {}; virtual bool redraw_by_call(wEvent) { redraw(); return true;}; }; class ObjectCaller { WellObject *object; bool (WellObject::*method)(wEvent); public: ObjectCaller() { object=0; method=0;}; ObjectCaller(WellObject* o,bool (WellObject::*m)(wEvent)) { object=o; method=m;}; bool call(wEvent ev) { if(!object) return false; return (object->*method)(ev); }; }; #endif xwelltris-1.0.1/src/include/wellsimpledraw.h0100644000175300014110000000301307624651653017525 0ustar leoguys#ifndef WELLSIMPLEDRAW_H #define WELLSIMPLEDRAW_H #include "bilist.h" enum Canvas { screen=0, pixmap=1 }; struct WPoint { int x,y; WPoint() { x=y=0;}; }; struct DirtyRect { int delta_x,delta_y; //here is the delta between dest screen and our dirty screen int x,y; unsigned int l,h; DirtyRect() { x=y=delta_x=delta_y=0;l=h=0;}; DirtyRect(int dx, int dy, int ix=0, int iy=0, unsigned int il=0, unsigned int ih=0) { delta_x=dx; delta_y=dy; x=ix; y=iy; l=il; h=ih; }; int get_src_x() { return x;}; int get_src_y() { return y;}; int get_dest_x() { return delta_x+x;}; int get_dest_y() { return delta_y+y;}; }; typedef bilist DirtyList; class WellSimpleDraw { protected: DirtyList dirty_list; int max_x,max_y,min_x,min_y; DirtyRect current_dirty; int max_dirties; public: WellSimpleDraw(); ~WellSimpleDraw(); virtual void new_dirty_rec(int dx=0, int dy=0); virtual void dirty_add_xy(int,int); virtual void dirty_add_rec(DirtyRect); virtual void finish_dirty_rec(); virtual void clear_dirty_list(); virtual void draw_line(int x1, int y1, int x2, int y2, int color_idx, Canvas where=screen) {}; virtual void draw_rect(int x1, int y1, unsigned int il, unsigned int ih, int color_idx, Canvas where=screen) {}; virtual void fill_rect(int x1, int y1, unsigned int il, unsigned int ih, int color_idx, Canvas where=screen) {}; int get_max_dirties() { return max_dirties;}; }; #endif xwelltris-1.0.1/src/include/wellswitch.h0100644000175300014110000000146307605543562016664 0ustar leoguys#ifndef WELLSWITCH_H #define WELLSWITCH_H #include "wellobject.h" enum SwitchMode { OnlySet, OnlyReset, SetReset}; class WellSwitch: public WellObject { protected: ObjectCaller object_on_switch; bool highlighted; bool value; SwitchMode mode; bool press(int mx, int my); bool highlight(int mx, int my); public: WellSwitch(char* keyname); void set_object_on_switch(ObjectCaller o) { object_on_switch=o;}; virtual bool process_event(wEvent); virtual void show(); virtual void hide(); virtual void redraw(); void set_value(bool v) { value=v; if(shown) redraw();}; bool get_value() { return value;}; void set_mode(SwitchMode m) { mode=m;}; }; #endif xwelltris-1.0.1/src/include/welltopnine.h0100644000175300014110000000351407605543562017036 0ustar leoguys#ifndef WELLTOPNINE_H #define WELLTOPNINE_H #include "globals.h" #include "welltris.h" #include "wellobject.h" #include "wellimagefont.h" #include "wellkey.h" struct Score { int place; char player[PLAYER_NAME_LEN+1]; char date_time[L_DATE]; int score; int lines; int level; int squares; bool mixed; bool rotation; bool next_piece; time_t start_t; int play_time; Score(); void save(FILE* fp); bool load(FILE* fp); void set_current_time(); char* get_next_token(char* from, char* to); void calc_play_time(); void set_player(char* pl); void set_params(int iscore, int ilines, int ilevel) { score=iscore; lines=ilines; level=ilevel; }; }; struct ScoreTable { Score *table[TOP_NINE]; ScoreTable(); ~ScoreTable(); void sort_by_score(); void save(FILE* fp); void set_squares(int isquares); Score* set_and_get(int idx, Score *toset); }; class WellTopNine: public WellObject { protected: ScoreTable tables[MAX_SQUARES]; WellImageFont* text_lines[TOP_NINE]; ObjectCaller object_on_exit; Score* current_score; int page; WellKey *key_exit; public: WellTopNine(); virtual bool process_event(wEvent); virtual void show(); virtual void hide(); virtual void redraw_table(); bool save_scores(); bool load_scores(); Score* try_add_to_table(Score* new_one); Score* find_challenger(Score* me); void set_object_on_exit(ObjectCaller o) { object_on_exit=o; }; void set_page(int pg) { page=pg;}; }; extern WellTopNine *default_top_nine; #endif xwelltris-1.0.1/src/include/welltris.h0100644000175300014110000001175207605543562016346 0ustar leoguys#ifndef WELLTRIS_H #define WELLTRIS_H /* # GENERIC X-BASED WELLTRIS # # welltris.h # # # C++ implementation by Leo Khramov, leo@xnc.dubna.su # */ /*** random number generator ***/ /* insert your favorite */ extern void SetRNG(long); extern long LongRNG(); #define SRAND(X) SetRNG((long) X) #define LRAND() LongRNG() #define NRAND(X) ((int)(LRAND()%(X))) /*** macros ***/ #define ZLIM(X, Y) (((int) X) < (Y) ? ((int) X) : (Y)) /*** constants ***/ #ifndef SCOREFILE #define SCOREFILE "welltris.scores" #endif #ifndef POLYOMINOFILE #define POLYOMINOFILE "polyomino.dat" #endif #define XWELL_DIR ".xwelltris" #define RC_FILE "xwelltris.rc" #define BVOLUME -90 #define NUM_FLASHES 5 #define SAMPLERATE 5000000 #define FLUSH_DELAY 100000 #define MILLION 1000000 #define PLAYER_NAME_LEN 15 #define TOP_NINE 9 #define L_DATE 11 #define NUM_LEVELS 19 #define MAX_WIDTH 8 #define MAX_DEPTH 12 #define MAX_SIDES 4 #define MAX_PERIMETER (MAX_SIDES*MAX_WIDTH) #define EMPTY (-1) #define NODIAG 0 /* Normal, ie no diagonals */ #define DIAGONAL 1 /* Normal and diagonal */ #define NOMIX 0 /* Do not mix lowered number squares with current */ #define MIXED 1 #define MAX_MODES 2 #define NONE 0 /* No rotation or reflection */ #define NOREFL 1 /* Normal, no reflection allow rotation */ #define ALL 2 /* Allow reflection or rotation */ #define MAX_TYPES 3 #define DEFAULT_SQUARES 4 #define MIN_SQUARES 2 /* Why not 1 you say? */ #define MAX_SQUARES 6 #define TOTAL_SQUARES (MAX_SQUARES - MIN_SQUARES + 1) #define DEFAULT_DIAGONAL 3 #define MIN_DIAGONAL 2 #define MAX_DIAGONAL 3 #define MAX_POLYOMINOES 216 #define MAX_START_POLYOMINOES 55 #define JUMPIN 0 #define GRADUAL 1 #define LEGAL(n,g,m,o) ((n>=MIN_SQUARES+m)&&\ (n<=((g)?MAX_DIAGONAL:MAX_SQUARES)-o)) #define THRESHOLD(x) ((x)*(x)*4-(x)+1) #define CHECKUP(x) ((x)%8) #define CHECKRIGHT(x) (((x)/8)*8+(x)%4) #define CHECKDOWN(x) (((x)/4)*4+(x)%2) #define CHECKLEFT(x) (((x)/2)*2) /*** types ***/ enum Actions { NOTHING, FALL, DROP, LEFT, RIGHT, ROTATE, REFLECT, PAUSE_GAME, END_GAME, OUTER_ROTATION, INNER_ROTATION, LEVEL_UP, LEVEL_DOWN }; #define SYSCOLORS 7 #define MAX_GAME_COLORS (MAX_START_POLYOMINOES+SYSCOLORS) #define COLOR_DELTA MAX_START_POLYOMINOES #define FREE_COLORS (255 - 211 - SYSCOLORS) enum Colors {BackColor=COLOR_DELTA, GridColor=COLOR_DELTA+1, GridColor2=COLOR_DELTA+2, FreezeColor=COLOR_DELTA+3, FlashColor=COLOR_DELTA+4, BonusColor=COLOR_DELTA+5, BonusColor2=COLOR_DELTA+6}; enum Images { imNone=-1, imBoardBG=0, imIntroBG=1, imCuts=2, imScoreBG=3, imFont1=4 }; #define MAX_IMAGES 20 #define NEXT_CENTER_X 700 #define NEXT_CENTER_Y 519 #define NEXT_BOX_SIZE 15 #define NEXT_X_SIZE 120 #define NEXT_Y_SIZE 120 //scores region in the game #define SCORE_REG_X 638 #define SCORE_REG_Y 112 #define SCORE_REG_L 126 #define SCORE_REG_H 30 //Lines region in the game #define LINES_REG_X 775-5*11 #define LINES_REG_Y 172 #define LINES_REG_L 55 #define LINES_REG_H 17 //Level up region in the game #define LEVUP_REG_X 775-4*11 #define LEVUP_REG_Y 212 #define LEVUP_REG_L 44 #define LEVUP_REG_H 17 //Level region in the game #define LEVEL_REG_X 775-3*11 #define LEVEL_REG_Y 252 #define LEVEL_REG_L 33 #define LEVEL_REG_H 17 //Challengers region in the game #define CHAL1_REG_X 613 #define CHAL1_REG_Y 333 #define CHAL2_REG_X 613 #define CHAL2_REG_Y 358 #define CHAL3_REG_X 613 #define CHAL3_REG_Y 382 #define CHAL_REG_L 12*15 #define CHAL_REG_H 17 //Top nine text #define TOPNINE_TXT_X 30 #define TOPNINE_TXT_Y 140 #define TOPNINE_TXT_L 750 #define TOPNINE_TXT_H 22 #define TOPNINE_TXT_STEPY 42 //challengers display name len in symbols #define CHAL_NAME_LEN 9 //game view and other #define VIEW_X 30 #define VIEW_Y 30 #define VIEW_L 540 #define VIEW_H 540 #define NUM_ROT_STEPS 8 //Font sizes, delta ... #define FONT1_L 10 #define FONT1_H 18 #define FONT1_DX 0 #define FONT1_DY 0 #define FONT2_L 19 #define FONT2_H 30 #define FONT2_DX 12 #define FONT2_DY 0 #define FONT3_L 15 #define FONT3_H 23 #define FONT3_DX 30 #define FONT3_DY 0 #define FONT4_L 15 #define FONT4_H 24 #define FONT4_DX 45 #define FONT4_DY 0 #define FONT5_L 15 #define FONT5_H 24 #define FONT5_DX 65 #define FONT5_DY 0 #define GEO_NAME 20 //Game geo idexes for wellbase #define GEO_PAUSE_IDX 0 #define GEO_ROT_IDX 1 #define GEO_NEXT_IDX 2 #define GEO_MIXED_IDX 3 #endif xwelltris-1.0.1/src/include/xheaders.h0100644000175300014110000000017307605543562016277 0ustar leoguys #include #include #include #include #include xwelltris-1.0.1/src/sdl/0040755000175300014110000000000007642314524013457 5ustar leoguysxwelltris-1.0.1/src/sdl/sdl_gfxprimitives.c0100644000175300014110000021526707624651653017406 0ustar leoguys/* SDL_gfxPrimitives - Graphics primitives for SDL surfaces LGPL (c) A. Schiffler */ #include #include #include #include #include "SDL.h" #include "sdl_gfxprimitives.h" #include "sdl_gfxprimitives_font.h" /* -===================- */ /* Define this flag to use surface blits for alpha blended drawing. */ /* This is usually slower that direct surface calculations. */ #undef SURFACE_ALPHA_PIXEL /* ----- Defines for pixel clipping tests */ #define clip_xmin(surface) surface->clip_rect.x #define clip_xmax(surface) surface->clip_rect.x+surface->clip_rect.w-1 #define clip_ymin(surface) surface->clip_rect.y #define clip_ymax(surface) surface->clip_rect.y+surface->clip_rect.h-1 /* ----- Pixel - fast, no blending, no locking, clipping */ int fastPixelColorNolock(SDL_Surface * dst, Sint16 x, Sint16 y, Uint32 color) { int bpp; Uint8 *p; /* * Honor clipping setup at pixel level */ if ((x >= clip_xmin(dst)) && (x <= clip_xmax(dst)) && (y >= clip_ymin(dst)) && (y <= clip_ymax(dst))) { /* * Get destination format */ bpp = dst->format->BytesPerPixel; p = (Uint8 *) dst->pixels + y * dst->pitch + x * bpp; switch (bpp) { case 1: *p = color; break; case 2: *(Uint16 *) p = color; break; case 3: if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { p[0] = (color >> 16) & 0xff; p[1] = (color >> 8) & 0xff; p[2] = color & 0xff; } else { p[0] = color & 0xff; p[1] = (color >> 8) & 0xff; p[2] = (color >> 16) & 0xff; } break; case 4: *(Uint32 *) p = color; break; } /* switch */ } return (0); } /* ----- Pixel - fast, no blending, no locking, no clipping */ /* (faster but dangerous, make sure we stay in surface bounds) */ int fastPixelColorNolockNoclip(SDL_Surface * dst, Sint16 x, Sint16 y, Uint32 color) { int bpp; Uint8 *p; /* * Get destination format */ bpp = dst->format->BytesPerPixel; p = (Uint8 *) dst->pixels + y * dst->pitch + x * bpp; switch (bpp) { case 1: *p = color; break; case 2: *(Uint16 *) p = color; break; case 3: if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { p[0] = (color >> 16) & 0xff; p[1] = (color >> 8) & 0xff; p[2] = color & 0xff; } else { p[0] = color & 0xff; p[1] = (color >> 8) & 0xff; p[2] = (color >> 16) & 0xff; } break; case 4: *(Uint32 *) p = color; break; } /* switch */ return (0); } /* ----- Pixel - fast, no blending, locking, clipping */ int fastPixelColor(SDL_Surface * dst, Sint16 x, Sint16 y, Uint32 color) { int result; /* * Lock the surface */ if (SDL_MUSTLOCK(dst)) { if (SDL_LockSurface(dst) < 0) { return (-1); } } result = fastPixelColorNolock(dst, x, y, color); /* * Unlock surface */ if (SDL_MUSTLOCK(dst)) { SDL_UnlockSurface(dst); } return (result); } /* ----- Pixel - fast, no blending, locking, RGB input */ int fastPixelRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { Uint32 color; /* * Setup color */ color = SDL_MapRGBA(dst->format, r, g, b, a); /* * Draw */ return (fastPixelColor(dst, x, y, color)); } /* ----- Pixel - fast, no blending, no locking RGB input */ int fastPixelRGBANolock(SDL_Surface * dst, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { Uint32 color; /* * Setup color */ color = SDL_MapRGBA(dst->format, r, g, b, a); /* * Draw */ return (fastPixelColorNolock(dst, x, y, color)); } #ifdef SURFACE_ALPHA_PIXEL /* ----- Pixel - using single pixel blit with blending enabled if a<255 */ /* Old, slower routine - normally disabled */ static SDL_Surface *gfxPrimitivesSinglePixel = NULL; int pixelColor(SDL_Surface * dst, Sint16 x, Sint16 y, Uint32 color) { SDL_Rect srect; SDL_Rect drect; int result; /* * Setup source rectangle for pixel */ srect.x = 0; srect.y = 0; srect.w = 1; srect.h = 1; /* * Setup destination rectangle for pixel */ drect.x = x; drect.y = y; drect.w = 1; drect.h = 1; /* * Create single pixel in 32bit RGBA format */ if (gfxPrimitivesSinglePixel == NULL) { gfxPrimitivesSinglePixel = SDL_CreateRGBSurface(SDL_SWSURFACE | SDL_HWSURFACE | SDL_SRCALPHA, 1, 1, 32, 0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF); } /* * Draw color into pixel */ SDL_FillRect(gfxPrimitivesSinglePixel, &srect, color); /* * Draw pixel onto destination surface */ result = SDL_BlitSurface(gfxPrimitivesSinglePixel, &srect, dst, &drect); return (result); } #else /* PutPixel routine with alpha blending, input color in destination format */ /* New, faster routine - default blending pixel */ int _putPixelAlpha(SDL_Surface * surface, Sint16 x, Sint16 y, Uint32 color, Uint8 alpha) { Uint32 Rmask = surface->format->Rmask, Gmask = surface->format->Gmask, Bmask = surface->format->Bmask, Amask = surface->format->Amask; Uint32 R, G, B, A = 0; if (x >= clip_xmin(surface) && x <= clip_xmax(surface) && y >= clip_ymin(surface) && y <= clip_ymax(surface)) { switch (surface->format->BytesPerPixel) { case 1:{ /* Assuming 8-bpp */ if (alpha == 255) { *((Uint8 *) surface->pixels + y * surface->pitch + x) = color; } else { Uint8 *pixel = (Uint8 *) surface->pixels + y * surface->pitch + x; Uint8 dR = surface->format->palette->colors[*pixel].r; Uint8 dG = surface->format->palette->colors[*pixel].g; Uint8 dB = surface->format->palette->colors[*pixel].b; Uint8 sR = surface->format->palette->colors[color].r; Uint8 sG = surface->format->palette->colors[color].g; Uint8 sB = surface->format->palette->colors[color].b; dR = dR + ((sR - dR) * alpha >> 8); dG = dG + ((sG - dG) * alpha >> 8); dB = dB + ((sB - dB) * alpha >> 8); *pixel = SDL_MapRGB(surface->format, dR, dG, dB); } } break; case 2:{ /* Probably 15-bpp or 16-bpp */ if (alpha == 255) { *((Uint16 *) surface->pixels + y * surface->pitch / 2 + x) = color; } else { Uint16 *pixel = (Uint16 *) surface->pixels + y * surface->pitch / 2 + x; Uint32 dc = *pixel; R = ((dc & Rmask) + (((color & Rmask) - (dc & Rmask)) * alpha >> 8)) & Rmask; G = ((dc & Gmask) + (((color & Gmask) - (dc & Gmask)) * alpha >> 8)) & Gmask; B = ((dc & Bmask) + (((color & Bmask) - (dc & Bmask)) * alpha >> 8)) & Bmask; if (Amask) A = ((dc & Amask) + (((color & Amask) - (dc & Amask)) * alpha >> 8)) & Amask; *pixel = R | G | B | A; } } break; case 3:{ /* Slow 24-bpp mode, usually not used */ Uint8 *pix = (Uint8 *) surface->pixels + y * surface->pitch + x * 3; Uint8 rshift8 = surface->format->Rshift / 8; Uint8 gshift8 = surface->format->Gshift / 8; Uint8 bshift8 = surface->format->Bshift / 8; Uint8 ashift8 = surface->format->Ashift / 8; if (alpha == 255) { *(pix + rshift8) = color >> surface->format->Rshift; *(pix + gshift8) = color >> surface->format->Gshift; *(pix + bshift8) = color >> surface->format->Bshift; *(pix + ashift8) = color >> surface->format->Ashift; } else { Uint8 dR, dG, dB, dA = 0; Uint8 sR, sG, sB, sA = 0; pix = (Uint8 *) surface->pixels + y * surface->pitch + x * 3; dR = *((pix) + rshift8); dG = *((pix) + gshift8); dB = *((pix) + bshift8); dA = *((pix) + ashift8); sR = (color >> surface->format->Rshift) & 0xff; sG = (color >> surface->format->Gshift) & 0xff; sB = (color >> surface->format->Bshift) & 0xff; sA = (color >> surface->format->Ashift) & 0xff; dR = dR + ((sR - dR) * alpha >> 8); dG = dG + ((sG - dG) * alpha >> 8); dB = dB + ((sB - dB) * alpha >> 8); dA = dA + ((sA - dA) * alpha >> 8); *((pix) + rshift8) = dR; *((pix) + gshift8) = dG; *((pix) + bshift8) = dB; *((pix) + ashift8) = dA; } } break; case 4:{ /* Probably 32-bpp */ if (alpha == 255) { *((Uint32 *) surface->pixels + y * surface->pitch / 4 + x) = color; } else { Uint32 *pixel = (Uint32 *) surface->pixels + y * surface->pitch / 4 + x; Uint32 dc = *pixel; R = ((dc & Rmask) + (((color & Rmask) - (dc & Rmask)) * alpha >> 8)) & Rmask; G = ((dc & Gmask) + (((color & Gmask) - (dc & Gmask)) * alpha >> 8)) & Gmask; B = ((dc & Bmask) + (((color & Bmask) - (dc & Bmask)) * alpha >> 8)) & Bmask; if (Amask) A = ((dc & Amask) + (((color & Amask) - (dc & Amask)) * alpha >> 8)) & Amask; *pixel = R | G | B | A; } } break; } } return (0); } /* ----- Pixel - pixel draw with blending enabled if a<255 */ int pixelColor(SDL_Surface * dst, Sint16 x, Sint16 y, Uint32 color) { Uint8 alpha; Uint32 mcolor; int result = 0; /* * Lock the surface */ if (SDL_MUSTLOCK(dst)) { if (SDL_LockSurface(dst) < 0) { return (-1); } } /* * Setup color */ alpha = color & 0x000000ff; mcolor = SDL_MapRGBA(dst->format, (color & 0xff000000) >> 24, (color & 0x00ff0000) >> 16, (color & 0x0000ff00) >> 8, alpha); /* * Draw */ result = _putPixelAlpha(dst, x, y, mcolor, alpha); /* * Unlock the surface */ if (SDL_MUSTLOCK(dst)) { SDL_UnlockSurface(dst); } return (result); } int pixelColorNolock(SDL_Surface * dst, Sint16 x, Sint16 y, Uint32 color) { Uint8 alpha; Uint32 mcolor; int result = 0; /* * Setup color */ alpha = color & 0x000000ff; mcolor = SDL_MapRGBA(dst->format, (color & 0xff000000) >> 24, (color & 0x00ff0000) >> 16, (color & 0x0000ff00) >> 8, alpha); /* * Draw */ result = _putPixelAlpha(dst, x, y, mcolor, alpha); return (result); } /* Filled rectangle with alpha blending, color in destination format */ int _filledRectAlpha(SDL_Surface * surface, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color, Uint8 alpha) { Uint32 Rmask = surface->format->Rmask, Gmask = surface->format->Gmask, Bmask = surface->format->Bmask, Amask = surface->format->Amask; Uint32 R, G, B, A = 0; Sint16 x, y; switch (surface->format->BytesPerPixel) { case 1:{ /* Assuming 8-bpp */ Uint8 *row, *pixel; Uint8 dR, dG, dB; Uint8 sR = surface->format->palette->colors[color].r; Uint8 sG = surface->format->palette->colors[color].g; Uint8 sB = surface->format->palette->colors[color].b; for (y = y1; y <= y2; y++) { row = (Uint8 *) surface->pixels + y * surface->pitch; for (x = x1; x <= x2; x++) { pixel = row + x; dR = surface->format->palette->colors[*pixel].r; dG = surface->format->palette->colors[*pixel].g; dB = surface->format->palette->colors[*pixel].b; dR = dR + ((sR - dR) * alpha >> 8); dG = dG + ((sG - dG) * alpha >> 8); dB = dB + ((sB - dB) * alpha >> 8); *pixel = SDL_MapRGB(surface->format, dR, dG, dB); } } } break; case 2:{ /* Probably 15-bpp or 16-bpp */ Uint16 *row, *pixel; Uint32 dR = (color & Rmask), dG = (color & Gmask), dB = (color & Bmask), dA = (color & Amask); for (y = y1; y <= y2; y++) { row = (Uint16 *) surface->pixels + y * surface->pitch / 2; for (x = x1; x <= x2; x++) { pixel = row + x; R = ((*pixel & Rmask) + ((dR - (*pixel & Rmask)) * alpha >> 8)) & Rmask; G = ((*pixel & Gmask) + ((dG - (*pixel & Gmask)) * alpha >> 8)) & Gmask; B = ((*pixel & Bmask) + ((dB - (*pixel & Bmask)) * alpha >> 8)) & Bmask; if (Amask) A = ((*pixel & Amask) + ((dA - (*pixel & Amask)) * alpha >> 8)) & Amask; *pixel = R | G | B | A; } } } break; case 3:{ /* Slow 24-bpp mode, usually not used */ Uint8 *row, *pix; Uint8 dR, dG, dB, dA; Uint8 rshift8 = surface->format->Rshift / 8; Uint8 gshift8 = surface->format->Gshift / 8; Uint8 bshift8 = surface->format->Bshift / 8; Uint8 ashift8 = surface->format->Ashift / 8; Uint8 sR = (color >> surface->format->Rshift) & 0xff; Uint8 sG = (color >> surface->format->Gshift) & 0xff; Uint8 sB = (color >> surface->format->Bshift) & 0xff; Uint8 sA = (color >> surface->format->Ashift) & 0xff; for (y = y1; y <= y2; y++) { row = (Uint8 *) surface->pixels + y * surface->pitch; for (x = x1; x <= x2; x++) { pix = row + x * 3; dR = *((pix) + rshift8); dG = *((pix) + gshift8); dB = *((pix) + bshift8); dA = *((pix) + ashift8); dR = dR + ((sR - dR) * alpha >> 8); dG = dG + ((sG - dG) * alpha >> 8); dB = dB + ((sB - dB) * alpha >> 8); dA = dA + ((sA - dA) * alpha >> 8); *((pix) + rshift8) = dR; *((pix) + gshift8) = dG; *((pix) + bshift8) = dB; *((pix) + ashift8) = dA; } } } break; case 4:{ /* Probably 32-bpp */ Uint32 *row, *pixel; Uint32 dR = (color & Rmask), dG = (color & Gmask), dB = (color & Bmask), dA = (color & Amask); for (y = y1; y <= y2; y++) { row = (Uint32 *) surface->pixels + y * surface->pitch / 4; for (x = x1; x <= x2; x++) { pixel = row + x; R = ((*pixel & Rmask) + ((dR - (*pixel & Rmask)) * alpha >> 8)) & Rmask; G = ((*pixel & Gmask) + ((dG - (*pixel & Gmask)) * alpha >> 8)) & Gmask; B = ((*pixel & Bmask) + ((dB - (*pixel & Bmask)) * alpha >> 8)) & Bmask; if (Amask) A = ((*pixel & Amask) + ((dA - (*pixel & Amask)) * alpha >> 8)) & Amask; *pixel = R | G | B | A; } } } break; } return (0); } /* Draw rectangle with alpha enabled from RGBA color. */ int filledRectAlpha(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color) { Uint8 alpha; Uint32 mcolor; int result = 0; /* * Lock the surface */ if (SDL_MUSTLOCK(dst)) { if (SDL_LockSurface(dst) < 0) { return (-1); } } /* * Setup color */ alpha = color & 0x000000ff; mcolor = SDL_MapRGBA(dst->format, (color & 0xff000000) >> 24, (color & 0x00ff0000) >> 16, (color & 0x0000ff00) >> 8, alpha); /* * Draw */ result = _filledRectAlpha(dst, x1, y1, x2, y2, mcolor, alpha); /* * Unlock the surface */ if (SDL_MUSTLOCK(dst)) { SDL_UnlockSurface(dst); } return (result); } /* Draw horizontal line with alpha enabled from RGBA color */ int HLineAlpha(SDL_Surface * dst, Sint16 x1, Sint16 x2, Sint16 y, Uint32 color) { return (filledRectAlpha(dst, x1, y, x2, y, color)); } /* Draw vertical line with alpha enabled from RGBA color */ int VLineAlpha(SDL_Surface * dst, Sint16 x, Sint16 y1, Sint16 y2, Uint32 color) { return (filledRectAlpha(dst, x, y1, x, y2, color)); } #endif /* Pixel - using alpha weight on color for AA-drawing */ int pixelColorWeight(SDL_Surface * dst, Sint16 x, Sint16 y, Uint32 color, Uint32 weight) { Uint32 a; /* * Get alpha */ a = (color & (Uint32) 0x000000ff); /* * Modify Alpha by weight */ a = ((a * weight) >> 8); return (pixelColor(dst, x, y, (color & (Uint32) 0xffffff00) | (Uint32) a)); } /* Pixel - using alpha weight on color for AA-drawing - no locking */ int pixelColorWeightNolock(SDL_Surface * dst, Sint16 x, Sint16 y, Uint32 color, Uint32 weight) { Uint32 a; /* * Get alpha */ a = (color & (Uint32) 0x000000ff); /* * Modify Alpha by weight */ a = ((a * weight) >> 8); return (pixelColorNolock(dst, x, y, (color & (Uint32) 0xffffff00) | (Uint32) a)); } int pixelRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { Uint32 color; /* * Check Alpha */ if (a == 255) { /* * No alpha blending required */ /* * Setup color */ color = SDL_MapRGBA(dst->format, r, g, b, a); /* * Draw */ return (fastPixelColor(dst, x, y, color)); } else { /* * Alpha blending required */ /* * Draw */ return (pixelColor(dst, x, y, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } } /* ----- Horizontal line */ #ifdef SURFACE_ALPHA_PIXEL static SDL_Surface *gfxPrimitivesHline = NULL; #endif int hlineColor(SDL_Surface * dst, Sint16 x1, Sint16 x2, Sint16 y, Uint32 color) { Sint16 left, right, top, bottom; Uint8 *pixel, *pixellast; int dx; int pixx, pixy; Sint16 w; Sint16 xtmp; int result = -1; Uint8 *colorptr; #ifdef SURFACE_ALPHA_PIXEL Uint32 a; SDL_Rect srect; SDL_Rect drect; #endif /* * Get clipping boundary */ left = dst->clip_rect.x; right = dst->clip_rect.x + dst->clip_rect.w - 1; top = dst->clip_rect.y; bottom = dst->clip_rect.y + dst->clip_rect.h - 1; /* * Swap x1, x2 if required */ if (x1 > x2) { xtmp = x1; x1 = x2; x2 = xtmp; } /* * Visible */ if ((x1 > right) || (x2 < left) || (y < top) || (y > bottom)) { return (0); } /* * Clip x */ if (x1 < left) { x1 = left; } if (x2 > right) { x2 = right; } /* * Calculate width */ w = x2 - x1; /* * Sanity check on width */ if (w < 0) { return (0); } /* * Alpha check */ if ((color & 255) == 255) { /* * No alpha-blending required */ /* * Setup color */ colorptr = (Uint8 *) & color; if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { color = SDL_MapRGBA(dst->format, colorptr[0], colorptr[1], colorptr[2], colorptr[3]); } else { color = SDL_MapRGBA(dst->format, colorptr[3], colorptr[2], colorptr[1], colorptr[0]); } /* * Lock surface */ SDL_LockSurface(dst); /* * More variable setup */ dx = w; pixx = dst->format->BytesPerPixel; pixy = dst->pitch; pixel = ((Uint8 *) dst->pixels) + pixx * (int) x1 + pixy * (int) y; /* * Draw */ switch (dst->format->BytesPerPixel) { case 1: memset(pixel, color, dx); break; case 2: pixellast = pixel + dx + dx; for (; pixel <= pixellast; pixel += pixx) { *(Uint16 *) pixel = color; } break; case 3: pixellast = pixel + dx + dx + dx; for (; pixel <= pixellast; pixel += pixx) { if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { pixel[0] = (color >> 16) & 0xff; pixel[1] = (color >> 8) & 0xff; pixel[2] = color & 0xff; } else { pixel[0] = color & 0xff; pixel[1] = (color >> 8) & 0xff; pixel[2] = (color >> 16) & 0xff; } } break; default: /* case 4 */ dx = dx + dx; pixellast = pixel + dx + dx; for (; pixel <= pixellast; pixel += pixx) { *(Uint32 *) pixel = color; } break; } /* * Unlock surface */ SDL_UnlockSurface(dst); /* * Set result code */ result = 0; } else { /* * Alpha blending blit */ #ifdef SURFACE_ALPHA_PIXEL /* * Adjust width for Rect setup */ w++; /* * Setup source rectangle for pixel */ srect.x = 0; srect.y = 0; srect.w = w; srect.h = 1; /* * Setup rectangle for destination line */ drect.x = x1; drect.y = y; drect.w = w; drect.h = 1; /* * Maybe deallocate existing surface if size is too small */ if ((gfxPrimitivesHline != NULL) && (gfxPrimitivesHline->w < w)) { SDL_FreeSurface(gfxPrimitivesHline); gfxPrimitivesHline = NULL; } /* * Create horizontal line surface in destination format if necessary */ if (gfxPrimitivesHline == NULL) { gfxPrimitivesHline = SDL_CreateRGBSurface(SDL_SWSURFACE | SDL_HWSURFACE | SDL_SRCALPHA, w, 1, 32, 0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF); } /* * Get alpha */ a = (color & (Uint32) 0x000000ff); /* * Toggle alpha blending if necessary, reset otherwise */ if (a != 255) { SDL_SetAlpha(gfxPrimitivesHline, SDL_SRCALPHA, 255); } else { SDL_SetAlpha(gfxPrimitivesHline, 0, 255); } /* * Draw color into pixel */ SDL_FillRect(gfxPrimitivesHline, &srect, color); /* * Draw pixel onto destination surface */ result = SDL_BlitSurface(gfxPrimitivesHline, &srect, dst, &drect); #else result = HLineAlpha(dst, x1, x1 + w, y, color); #endif } return (result); } int hlineRGBA(SDL_Surface * dst, Sint16 x1, Sint16 x2, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (hlineColor(dst, x1, x2, y, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } /* ----- Vertical line */ #ifdef SURFACE_ALPHA_PIXEL static SDL_Surface *gfxPrimitivesVline = NULL; #endif int vlineColor(SDL_Surface * dst, Sint16 x, Sint16 y1, Sint16 y2, Uint32 color) { Sint16 left, right, top, bottom; Uint8 *pixel, *pixellast; int dy; int pixx, pixy; Sint16 h; Sint16 ytmp; int result = -1; Uint8 *colorptr; #ifdef SURFACE_ALPHA_PIXEL SDL_Rect srect; SDL_Rect drect; Uint32 a; #endif /* * Get clipping boundary */ left = dst->clip_rect.x; right = dst->clip_rect.x + dst->clip_rect.w - 1; top = dst->clip_rect.y; bottom = dst->clip_rect.y + dst->clip_rect.h - 1; /* * Swap y1, y2 if required */ if (y1 > y2) { ytmp = y1; y1 = y2; y2 = ytmp; } /* * Visible */ if ((y2 < top) || (y1 > bottom) || (x < left) || (x > right)) { return (0); } /* * Clip y */ if (y1 < top) { y1 = top; } if (y2 > bottom) { y2 = bottom; } /* * Calculate height */ h = y2 - y1; /* * Sanity check on height */ if (h < 0) { return (0); } /* * Alpha check */ if ((color & 255) == 255) { /* * No alpha-blending required */ /* * Setup color */ colorptr = (Uint8 *) & color; if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { color = SDL_MapRGBA(dst->format, colorptr[0], colorptr[1], colorptr[2], colorptr[3]); } else { color = SDL_MapRGBA(dst->format, colorptr[3], colorptr[2], colorptr[1], colorptr[0]); } /* * Lock surface */ SDL_LockSurface(dst); /* * More variable setup */ dy = h; pixx = dst->format->BytesPerPixel; pixy = dst->pitch; pixel = ((Uint8 *) dst->pixels) + pixx * (int) x + pixy * (int) y1; pixellast = pixel + pixy * dy; /* * Draw */ switch (dst->format->BytesPerPixel) { case 1: for (; pixel <= pixellast; pixel += pixy) { *(Uint8 *) pixel = color; } break; case 2: for (; pixel <= pixellast; pixel += pixy) { *(Uint16 *) pixel = color; } break; case 3: for (; pixel <= pixellast; pixel += pixy) { if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { pixel[0] = (color >> 16) & 0xff; pixel[1] = (color >> 8) & 0xff; pixel[2] = color & 0xff; } else { pixel[0] = color & 0xff; pixel[1] = (color >> 8) & 0xff; pixel[2] = (color >> 16) & 0xff; } } break; default: /* case 4 */ for (; pixel <= pixellast; pixel += pixy) { *(Uint32 *) pixel = color; } break; } /* * Unlock surface */ SDL_UnlockSurface(dst); /* * Set result code */ result = 0; } else { /* * Alpha blending blit */ #ifdef SURFACE_ALPHA_PIXEL /* * Adjust height for Rect setup */ h++; /* * Setup source rectangle for pixel */ srect.x = 0; srect.y = 0; srect.w = 1; srect.h = h; /* * Setup rectangle for line */ drect.x = x; drect.y = y1; drect.w = 1; drect.h = h; /* * Maybe deallocate existing surface if size is too small */ if ((gfxPrimitivesVline != NULL) && (gfxPrimitivesVline->h < h)) { SDL_FreeSurface(gfxPrimitivesVline); gfxPrimitivesVline = NULL; } /* * Create horizontal line surface in destination format if necessary */ if (gfxPrimitivesVline == NULL) { gfxPrimitivesVline = SDL_CreateRGBSurface(SDL_SWSURFACE | SDL_HWSURFACE | SDL_SRCALPHA, 1, h, 32, 0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF); } /* * Get alpha */ a = (color & (Uint32) 0x000000ff); /* * Toggle alpha blending if necessary, reset otherwise */ if (a != 255) { SDL_SetAlpha(gfxPrimitivesVline, SDL_SRCALPHA, 255); } else { SDL_SetAlpha(gfxPrimitivesVline, 0, 255); } /* * Draw color into pixel */ SDL_FillRect(gfxPrimitivesVline, &srect, color); /* * Draw Vline onto destination surface */ result = SDL_BlitSurface(gfxPrimitivesVline, &srect, dst, &drect); #else result = VLineAlpha(dst, x, y1, y1 + h, color); #endif } return (result); } int vlineRGBA(SDL_Surface * dst, Sint16 x, Sint16 y1, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (vlineColor(dst, x, y1, y2, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } /* ----- Rectangle */ int rectangleColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color) { int result; Sint16 w, h, xtmp, ytmp; /* * Swap x1, x2 if required */ if (x1 > x2) { xtmp = x1; x1 = x2; x2 = xtmp; } /* * Swap y1, y2 if required */ if (y1 > y2) { ytmp = y1; y1 = y2; y2 = ytmp; } /* * Calculate width&height */ w = x2 - x1; h = y2 - y1; /* * Sanity check */ if ((w < 0) || (h < 0)) { return (0); } /* * Test for special cases of straight lines or single point */ if (x1 == x2) { if (y1 == y2) { return (pixelColor(dst, x1, y1, color)); } else { return (vlineColor(dst, x1, y1, y2, color)); } } else { if (y1 == y2) { return (hlineColor(dst, x1, x2, y1, color)); } } /* * Draw rectangle */ result = 0; result |= vlineColor(dst, x1, y1, y2, color); result |= vlineColor(dst, x2, y1, y2, color); result |= hlineColor(dst, x1, x2, y1, color); result |= hlineColor(dst, x1, x2, y2, color); return (result); } int rectangleRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (rectangleColor (dst, x1, y1, x2, y2, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } /* --------- Clipping routines for box/line */ /* Clipping based heavily on code from */ /* http://www.ncsa.uiuc.edu/Vis/Graphics/src/clipCohSuth.c */ #define CLIP_LEFT_EDGE 0x1 #define CLIP_RIGHT_EDGE 0x2 #define CLIP_BOTTOM_EDGE 0x4 #define CLIP_TOP_EDGE 0x8 #define CLIP_INSIDE(a) (!a) #define CLIP_REJECT(a,b) (a&b) #define CLIP_ACCEPT(a,b) (!(a|b)) static int clipEncode(Sint16 x, Sint16 y, Sint16 left, Sint16 top, Sint16 right, Sint16 bottom) { int code = 0; if (x < left) { code |= CLIP_LEFT_EDGE; } else if (x > right) { code |= CLIP_RIGHT_EDGE; } if (y < top) { code |= CLIP_TOP_EDGE; } else if (y > bottom) { code |= CLIP_BOTTOM_EDGE; } return code; } static int clipLine(SDL_Surface * dst, Sint16 * x1, Sint16 * y1, Sint16 * x2, Sint16 * y2) { Sint16 left, right, top, bottom; int code1, code2; int draw = 0; Sint16 swaptmp; float m; /* * Get clipping boundary */ left = dst->clip_rect.x; right = dst->clip_rect.x + dst->clip_rect.w - 1; top = dst->clip_rect.y; bottom = dst->clip_rect.y + dst->clip_rect.h - 1; while (1) { code1 = clipEncode(*x1, *y1, left, top, right, bottom); code2 = clipEncode(*x2, *y2, left, top, right, bottom); if (CLIP_ACCEPT(code1, code2)) { draw = 1; break; } else if (CLIP_REJECT(code1, code2)) break; else { if (CLIP_INSIDE(code1)) { swaptmp = *x2; *x2 = *x1; *x1 = swaptmp; swaptmp = *y2; *y2 = *y1; *y1 = swaptmp; swaptmp = code2; code2 = code1; code1 = swaptmp; } if (*x2 != *x1) { m = (*y2 - *y1) / (float) (*x2 - *x1); } else { m = 1.0f; } if (code1 & CLIP_LEFT_EDGE) { *y1 += (Sint16) ((left - *x1) * m); *x1 = left; } else if (code1 & CLIP_RIGHT_EDGE) { *y1 += (Sint16) ((right - *x1) * m); *x1 = right; } else if (code1 & CLIP_BOTTOM_EDGE) { if (*x2 != *x1) { *x1 += (Sint16) ((bottom - *y1) / m); } *y1 = bottom; } else if (code1 & CLIP_TOP_EDGE) { if (*x2 != *x1) { *x1 += (Sint16) ((top - *y1) / m); } *y1 = top; } } } return draw; } /* ----- Filled rectangle (Box) */ #ifdef SURFACE_ALPHA_PIXEL static SDL_Surface *gfxPrimitivesBox = NULL; #endif int boxColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color) { Uint8 *pixel, *pixellast; int x, dx; int dy; int pixx, pixy; Sint16 w, h, tmp; int result; Uint8 *colorptr; #ifdef SURFACE_ALPHA_PIXEL Uint32 a; SDL_Rect srect; SDL_Rect drect; #endif /* * Clip diagonal and test if we have to draw */ if (!(clipLine(dst, &x1, &y1, &x2, &y2))) { return (0); } /* * Test for special cases of straight lines or single point */ if (x1 == x2) { if (y1 < y2) { return (vlineColor(dst, x1, y1, y2, color)); } else if (y1 > y2) { return (vlineColor(dst, x1, y2, y1, color)); } else { return (pixelColor(dst, x1, y1, color)); } } if (y1 == y2) { if (x1 < x2) { return (hlineColor(dst, x1, x2, y1, color)); } else if (x1 > x2) { return (hlineColor(dst, x2, x1, y1, color)); } } /* * Order coordinates */ if (x1 > x2) { tmp = x1; x1 = x2; x2 = tmp; } if (y1 > y2) { tmp = y1; y1 = y2; y2 = tmp; } /* * Calculate width&height */ w = x2 - x1; h = y2 - y1; /* * Alpha check */ if ((color & 255) == 255) { /* * No alpha-blending required */ /* * Setup color */ colorptr = (Uint8 *) & color; if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { color = SDL_MapRGBA(dst->format, colorptr[0], colorptr[1], colorptr[2], colorptr[3]); } else { color = SDL_MapRGBA(dst->format, colorptr[3], colorptr[2], colorptr[1], colorptr[0]); } /* * Lock surface */ SDL_LockSurface(dst); /* * More variable setup */ dx = w; dy = h; pixx = dst->format->BytesPerPixel; pixy = dst->pitch; pixel = ((Uint8 *) dst->pixels) + pixx * (int) x1 + pixy * (int) y1; pixellast = pixel + pixx * dx + pixy * dy; /* * Draw */ switch (dst->format->BytesPerPixel) { case 1: for (; pixel <= pixellast; pixel += pixy) { memset(pixel, (Uint8) color, dx); } break; case 2: pixy -= (pixx * dx); for (; pixel <= pixellast; pixel += pixy) { for (x = 0; x < dx; x++) { *(Uint16 *) pixel = color; pixel += pixx; } } break; case 3: pixy -= (pixx * dx); for (; pixel <= pixellast; pixel += pixy) { for (x = 0; x < dx; x++) { if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { pixel[0] = (color >> 16) & 0xff; pixel[1] = (color >> 8) & 0xff; pixel[2] = color & 0xff; } else { pixel[0] = color & 0xff; pixel[1] = (color >> 8) & 0xff; pixel[2] = (color >> 16) & 0xff; } pixel += pixx; } } break; default: /* case 4 */ pixy -= (pixx * dx); for (; pixel <= pixellast; pixel += pixy) { for (x = 0; x < dx; x++) { *(Uint32 *) pixel = color; pixel += pixx; } } break; } /* * Unlock surface */ SDL_UnlockSurface(dst); result = 0; } else { #ifdef SURFACE_ALPHA_PIXEL /* * Setup source rectangle for pixel */ srect.x = 0; srect.y = 0; srect.w = w; srect.h = h; /* * Setup rectangle for line */ drect.x = x1; drect.y = y1; drect.w = w; drect.h = h; /* * Maybe deallocate existing surface if size is too small */ if ((gfxPrimitivesBox != NULL) && ((gfxPrimitivesBox->w < w) || (gfxPrimitivesBox->h < h))) { SDL_FreeSurface(gfxPrimitivesBox); gfxPrimitivesBox = NULL; } /* * Create box surface in destination format if necessary */ if (gfxPrimitivesBox == NULL) { gfxPrimitivesBox = SDL_CreateRGBSurface(SDL_SWSURFACE | SDL_HWSURFACE | SDL_SRCALPHA, w, h, 32, 0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF); } /* * Get alpha */ a = (color & (Uint32) 0x000000ff); /* * Toggle alpha blending if necessary, reset otherwise */ if (a != 255) { SDL_SetAlpha(gfxPrimitivesBox, SDL_SRCALPHA, 255); } else { SDL_SetAlpha(gfxPrimitivesBox, 0, 255); } /* * Draw color into pixel */ SDL_FillRect(gfxPrimitivesBox, &srect, color); /* * Draw pixel onto destination surface */ result = SDL_BlitSurface(gfxPrimitivesBox, &srect, dst, &drect); #else result = filledRectAlpha(dst, x1, y1, x1 + w, y1 + h, color); #endif } return (result); } int boxRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (boxColor(dst, x1, y1, x2, y2, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } /* ----- Line */ /* Non-alpha line drawing code adapted from routine */ /* by Pete Shinners, pete@shinners.org */ /* Originally from pygame, http://pygame.seul.org */ #define ABS(a) (((a)<0) ? -(a) : (a)) int lineColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color) { int pixx, pixy; int x, y; int dx, dy; int ax, ay; int sx, sy; int swaptmp; Uint8 *pixel; Uint8 *colorptr; /* * Clip line and test if we have to draw */ if (!(clipLine(dst, &x1, &y1, &x2, &y2))) { return (0); } /* * Test for special cases of straight lines or single point */ if (x1 == x2) { if (y1 < y2) { return (vlineColor(dst, x1, y1, y2, color)); } else if (y1 > y2) { return (vlineColor(dst, x1, y2, y1, color)); } else { return (pixelColor(dst, x1, y1, color)); } } if (y1 == y2) { if (x1 < x2) { return (hlineColor(dst, x1, x2, y1, color)); } else if (x1 > x2) { return (hlineColor(dst, x2, x1, y1, color)); } } /* * Variable setup */ dx = x2 - x1; dy = y2 - y1; sx = (dx >= 0) ? 1 : -1; sy = (dy >= 0) ? 1 : -1; /* Lock surface */ if (SDL_MUSTLOCK(dst)) { if (SDL_LockSurface(dst) < 0) { return (-1); } } /* * Check for alpha blending */ if ((color & 255) == 255) { /* * No alpha blending - use fast pixel routines */ /* * Setup color */ colorptr = (Uint8 *) & color; if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { color = SDL_MapRGBA(dst->format, colorptr[0], colorptr[1], colorptr[2], colorptr[3]); } else { color = SDL_MapRGBA(dst->format, colorptr[3], colorptr[2], colorptr[1], colorptr[0]); } /* * More variable setup */ dx = sx * dx + 1; dy = sy * dy + 1; pixx = dst->format->BytesPerPixel; pixy = dst->pitch; pixel = ((Uint8 *) dst->pixels) + pixx * (int) x1 + pixy * (int) y1; pixx *= sx; pixy *= sy; if (dx < dy) { swaptmp = dx; dx = dy; dy = swaptmp; swaptmp = pixx; pixx = pixy; pixy = swaptmp; } /* * Draw */ x = 0; y = 0; switch (dst->format->BytesPerPixel) { case 1: for (; x < dx; x++, pixel += pixx) { *pixel = color; y += dy; if (y >= dx) { y -= dx; pixel += pixy; } } break; case 2: for (; x < dx; x++, pixel += pixx) { *(Uint16 *) pixel = color; y += dy; if (y >= dx) { y -= dx; pixel += pixy; } } break; case 3: for (; x < dx; x++, pixel += pixx) { if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { pixel[0] = (color >> 16) & 0xff; pixel[1] = (color >> 8) & 0xff; pixel[2] = color & 0xff; } else { pixel[0] = color & 0xff; pixel[1] = (color >> 8) & 0xff; pixel[2] = (color >> 16) & 0xff; } y += dy; if (y >= dx) { y -= dx; pixel += pixy; } } break; default: /* case 4 */ for (; x < dx; x++, pixel += pixx) { *(Uint32 *) pixel = color; y += dy; if (y >= dx) { y -= dx; pixel += pixy; } } break; } } else { /* * Alpha blending required - use single-pixel blits */ ax = ABS(dx) << 1; ay = ABS(dy) << 1; x = x1; y = y1; if (ax > ay) { int d = ay - (ax >> 1); while (x != x2) { pixelColorNolock (dst, x, y, color); if (d > 0 || (d == 0 && sx == 1)) { y += sy; d -= ax; } x += sx; d += ay; } } else { int d = ax - (ay >> 1); while (y != y2) { pixelColorNolock (dst, x, y, color); if (d > 0 || ((d == 0) && (sy == 1))) { x += sx; d -= ay; } y += sy; d += ax; } } pixelColorNolock (dst, x, y, color); } /* Unlock surface */ if (SDL_MUSTLOCK(dst)) { SDL_UnlockSurface(dst); } return (0); } int lineRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (lineColor(dst, x1, y1, x2, y2, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } /* AA Line */ #define AAlevels 256 #define AAbits 8 /* This implementation of the Wu antialiasing code is based on Mike Abrash's DDJ article which was reprinted as Chapter 42 of his Graphics Programming Black Book, but has been optimized to work with SDL and utilizes 32-bit fixed-point arithmetic. (A. Schiffler). */ int aalineColorInt(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color, int draw_endpoint) { Sint32 xx0, yy0, xx1, yy1; int result; Uint32 intshift, erracc, erradj; Uint32 erracctmp, wgt, wgtcompmask; int dx, dy, tmp, xdir, y0p1, x0pxdir; /* * Clip line and test if we have to draw */ if (!(clipLine(dst, &x1, &y1, &x2, &y2))) { return (0); } /* * Keep on working with 32bit numbers */ xx0 = x1; yy0 = y1; xx1 = x2; yy1 = y2; /* * Reorder points if required */ if (yy0 > yy1) { tmp = yy0; yy0 = yy1; yy1 = tmp; tmp = xx0; xx0 = xx1; xx1 = tmp; } /* * Calculate distance */ dx = xx1 - xx0; dy = yy1 - yy0; /* * Adjust for negative dx and set xdir */ if (dx >= 0) { xdir = 1; } else { xdir = -1; dx = (-dx); } /* * Check for special cases */ if (dx == 0) { /* * Vertical line */ return (vlineColor(dst, x1, y1, y2, color)); } else if (dy == 0) { /* * Horizontal line */ return (hlineColor(dst, x1, x2, y1, color)); } else if (dx == dy) { /* * Diagonal line */ return (lineColor(dst, x1, y1, x2, y2, color)); } /* * Line is not horizontal, vertical or diagonal */ result = 0; /* * Zero accumulator */ erracc = 0; /* * # of bits by which to shift erracc to get intensity level */ intshift = 32 - AAbits; /* * Mask used to flip all bits in an intensity weighting */ wgtcompmask = AAlevels - 1; /* Lock surface */ if (SDL_MUSTLOCK(dst)) { if (SDL_LockSurface(dst) < 0) { return (-1); } } /* * Draw the initial pixel in the foreground color */ result |= pixelColorNolock(dst, x1, y1, color); /* * x-major or y-major? */ if (dy > dx) { /* * y-major. Calculate 16-bit fixed point fractional part of a pixel that * X advances every time Y advances 1 pixel, truncating the result so that * we won't overrun the endpoint along the X axis */ /* * Not-so-portable version: erradj = ((Uint64)dx << 32) / (Uint64)dy; */ erradj = ((dx << 16) / dy) << 16; /* * draw all pixels other than the first and last */ x0pxdir = xx0 + xdir; while (--dy) { erracctmp = erracc; erracc += erradj; if (erracc <= erracctmp) { /* * rollover in error accumulator, x coord advances */ xx0 = x0pxdir; x0pxdir += xdir; } yy0++; /* y-major so always advance Y */ /* * the AAbits most significant bits of erracc give us the intensity * weighting for this pixel, and the complement of the weighting for * the paired pixel. */ wgt = (erracc >> intshift) & 255; result |= pixelColorWeightNolock (dst, xx0, yy0, color, 255 - wgt); result |= pixelColorWeightNolock (dst, x0pxdir, yy0, color, wgt); } } else { /* * x-major line. Calculate 16-bit fixed-point fractional part of a pixel * that Y advances each time X advances 1 pixel, truncating the result so * that we won't overrun the endpoint along the X axis. */ /* * Not-so-portable version: erradj = ((Uint64)dy << 32) / (Uint64)dx; */ erradj = ((dy << 16) / dx) << 16; /* * draw all pixels other than the first and last */ y0p1 = yy0 + 1; while (--dx) { erracctmp = erracc; erracc += erradj; if (erracc <= erracctmp) { /* * Accumulator turned over, advance y */ yy0 = y0p1; y0p1++; } xx0 += xdir; /* x-major so always advance X */ /* * the AAbits most significant bits of erracc give us the intensity * weighting for this pixel, and the complement of the weighting for * the paired pixel. */ wgt = (erracc >> intshift) & 255; result |= pixelColorWeightNolock (dst, xx0, yy0, color, 255 - wgt); result |= pixelColorWeightNolock (dst, xx0, y0p1, color, wgt); } } /* * Do we have to draw the endpoint */ if (draw_endpoint) { /* * Draw final pixel, always exactly intersected by the line and doesn't * need to be weighted. */ result |= pixelColorNolock (dst, x2, y2, color); } /* Unlock surface */ if (SDL_MUSTLOCK(dst)) { SDL_UnlockSurface(dst); } return (result); } int aalineColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color) { return (aalineColorInt(dst, x1, y1, x2, y2, color, 1)); } int aalineRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { return (aalineColorInt (dst, x1, y1, x2, y2, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a, 1)); } /* ----- Circle */ /* Note: Based on algorithm from sge library, modified by A. Schiffler */ /* with multiple pixel-draw removal and other minor speedup changes. */ int circleColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 r, Uint32 color) { int result; Sint16 x1, y1, x2, y2; Sint16 cx = 0; Sint16 cy = r; Sint16 ocx = (Sint16) 0xffff; Sint16 ocy = (Sint16) 0xffff; Sint16 df = 1 - r; Sint16 d_e = 3; Sint16 d_se = -2 * r + 5; Sint16 xpcx, xmcx, xpcy, xmcy; Sint16 ypcy, ymcy, ypcx, ymcx; Uint8 *colorptr; /* * Sanity check radius */ if (r < 0) { return (-1); } /* * Special case for r=0 - draw a point */ if (r == 0) { return (pixelColor(dst, x, y, color)); } /* * Test if bounding box of circle is visible */ x1 = x - r; y1 = y - r; x2 = x + r; y2 = y + r; if (!(clipLine(dst, &x1, &y1, &x2, &y2))) { return (0); } /* * Draw circle */ result = 0; /* Lock surface */ if (SDL_MUSTLOCK(dst)) { if (SDL_LockSurface(dst) < 0) { return (-1); } } /* * Alpha Check */ if ((color & 255) == 255) { /* * No Alpha - direct memory writes */ /* * Setup color */ colorptr = (Uint8 *) & color; if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { color = SDL_MapRGBA(dst->format, colorptr[0], colorptr[1], colorptr[2], colorptr[3]); } else { color = SDL_MapRGBA(dst->format, colorptr[3], colorptr[2], colorptr[1], colorptr[0]); } /* * Draw */ do { if ((ocy != cy) || (ocx != cx)) { xpcx = x + cx; xmcx = x - cx; if (cy > 0) { ypcy = y + cy; ymcy = y - cy; result |= fastPixelColorNolock(dst, xmcx, ypcy, color); result |= fastPixelColorNolock(dst, xpcx, ypcy, color); result |= fastPixelColorNolock(dst, xmcx, ymcy, color); result |= fastPixelColorNolock(dst, xpcx, ymcy, color); } else { result |= fastPixelColorNolock(dst, xmcx, y, color); result |= fastPixelColorNolock(dst, xpcx, y, color); } ocy = cy; xpcy = x + cy; xmcy = x - cy; if (cx > 0) { ypcx = y + cx; ymcx = y - cx; result |= fastPixelColorNolock(dst, xmcy, ypcx, color); result |= fastPixelColorNolock(dst, xpcy, ypcx, color); result |= fastPixelColorNolock(dst, xmcy, ymcx, color); result |= fastPixelColorNolock(dst, xpcy, ymcx, color); } else { result |= fastPixelColorNolock(dst, xmcy, y, color); result |= fastPixelColorNolock(dst, xpcy, y, color); } ocx = cx; } /* * Update */ if (df < 0) { df += d_e; d_e += 2; d_se += 2; } else { df += d_se; d_e += 2; d_se += 4; cy--; } cx++; } while (cx <= cy); /* * Unlock surface */ SDL_UnlockSurface(dst); } else { /* * Using Alpha - blended pixel blits */ do { /* * Draw */ if ((ocy != cy) || (ocx != cx)) { xpcx = x + cx; xmcx = x - cx; if (cy > 0) { ypcy = y + cy; ymcy = y - cy; result |= pixelColorNolock (dst, xmcx, ypcy, color); result |= pixelColorNolock (dst, xpcx, ypcy, color); result |= pixelColorNolock (dst, xmcx, ymcy, color); result |= pixelColorNolock (dst, xpcx, ymcy, color); } else { result |= pixelColorNolock (dst, xmcx, y, color); result |= pixelColorNolock (dst, xpcx, y, color); } ocy = cy; xpcy = x + cy; xmcy = x - cy; if (cx > 0) { ypcx = y + cx; ymcx = y - cx; result |= pixelColorNolock (dst, xmcy, ypcx, color); result |= pixelColorNolock (dst, xpcy, ypcx, color); result |= pixelColorNolock (dst, xmcy, ymcx, color); result |= pixelColorNolock (dst, xpcy, ymcx, color); } else { result |= pixelColorNolock (dst, xmcy, y, color); result |= pixelColorNolock (dst, xpcy, y, color); } ocx = cx; } /* * Update */ if (df < 0) { df += d_e; d_e += 2; d_se += 2; } else { df += d_se; d_e += 2; d_se += 4; cy--; } cx++; } while (cx <= cy); } /* Alpha check */ /* Unlock surface */ if (SDL_MUSTLOCK(dst)) { SDL_UnlockSurface(dst); } return (result); } int circleRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (circleColor(dst, x, y, rad, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } /* ----- AA Circle */ /* AA circle is based on AAellipse */ int aacircleColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 r, Uint32 color) { return (aaellipseColor(dst, x, y, r, r, color)); } int aacircleRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (aaellipseColor (dst, x, y, rad, rad, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } /* ----- Filled Circle */ /* Note: Based on algorithm from sge library with multiple-hline draw removal */ /* and other speedup changes. */ int filledCircleColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 r, Uint32 color) { int result; Sint16 x1, y1, x2, y2; Sint16 cx = 0; Sint16 cy = r; Sint16 ocx = (Sint16) 0xffff; Sint16 ocy = (Sint16) 0xffff; Sint16 df = 1 - r; Sint16 d_e = 3; Sint16 d_se = -2 * r + 5; Sint16 xpcx, xmcx, xpcy, xmcy; Sint16 ypcy, ymcy, ypcx, ymcx; /* * Sanity check radius */ if (r < 0) { return (-1); } /* * Special case for r=0 - draw a point */ if (r == 0) { return (pixelColor(dst, x, y, color)); } /* * Test bounding box */ x1 = x - r; y1 = y - r; x2 = x + r; y2 = y + r; if (!(clipLine(dst, &x1, &y1, &x2, &y2))) { return (0); } /* * Draw */ result = 0; do { xpcx = x + cx; xmcx = x - cx; xpcy = x + cy; xmcy = x - cy; if (ocy != cy) { if (cy > 0) { ypcy = y + cy; ymcy = y - cy; result |= hlineColor(dst, xmcx, xpcx, ypcy, color); result |= hlineColor(dst, xmcx, xpcx, ymcy, color); } else { result |= hlineColor(dst, xmcx, xpcx, y, color); } ocy = cy; } if (ocx != cx) { if (cx != cy) { if (cx > 0) { ypcx = y + cx; ymcx = y - cx; result |= hlineColor(dst, xmcy, xpcy, ymcx, color); result |= hlineColor(dst, xmcy, xpcy, ypcx, color); } else { result |= hlineColor(dst, xmcy, xpcy, y, color); } } ocx = cx; } /* * Update */ if (df < 0) { df += d_e; d_e += 2; d_se += 2; } else { df += d_se; d_e += 2; d_se += 4; cy--; } cx++; } while (cx <= cy); return (result); } int filledCircleRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (filledCircleColor (dst, x, y, rad, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } /* ----- Ellipse */ /* Note: Based on algorithm from sge library with multiple-hline draw removal */ /* and other speedup changes. */ int ellipseColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color) { int result; Sint16 x1, y1, x2, y2; int ix, iy; int h, i, j, k; int oh, oi, oj, ok; int xmh, xph, ypk, ymk; int xmi, xpi, ymj, ypj; int xmj, xpj, ymi, ypi; int xmk, xpk, ymh, yph; Uint8 *colorptr; /* * Sanity check radii */ if ((rx < 0) || (ry < 0)) { return (-1); } /* * Special case for rx=0 - draw a vline */ if (rx == 0) { return (vlineColor(dst, x, y - ry, y + ry, color)); } /* * Special case for ry=0 - draw a hline */ if (ry == 0) { return (hlineColor(dst, x - rx, x + rx, y, color)); } /* * Test bounding box */ x1 = x - rx; y1 = y - ry; x2 = x + rx; y2 = y + ry; if (!(clipLine(dst, &x1, &y1, &x2, &y2))) { return (0); } /* * Init vars */ oh = oi = oj = ok = 0xFFFF; /* * Draw */ result = 0; /* Lock surface */ if (SDL_MUSTLOCK(dst)) { if (SDL_LockSurface(dst) < 0) { return (-1); } } /* * Check alpha */ if ((color & 255) == 255) { /* * No Alpha - direct memory writes */ /* * Setup color */ colorptr = (Uint8 *) & color; if (SDL_BYTEORDER == SDL_BIG_ENDIAN) { color = SDL_MapRGBA(dst->format, colorptr[0], colorptr[1], colorptr[2], colorptr[3]); } else { color = SDL_MapRGBA(dst->format, colorptr[3], colorptr[2], colorptr[1], colorptr[0]); } if (rx > ry) { ix = 0; iy = rx * 64; do { h = (ix + 32) >> 6; i = (iy + 32) >> 6; j = (h * ry) / rx; k = (i * ry) / rx; if (((ok != k) && (oj != k)) || ((oj != j) && (ok != j)) || (k != j)) { xph = x + h; xmh = x - h; if (k > 0) { ypk = y + k; ymk = y - k; result |= fastPixelColorNolock(dst, xmh, ypk, color); result |= fastPixelColorNolock(dst, xph, ypk, color); result |= fastPixelColorNolock(dst, xmh, ymk, color); result |= fastPixelColorNolock(dst, xph, ymk, color); } else { result |= fastPixelColorNolock(dst, xmh, y, color); result |= fastPixelColorNolock(dst, xph, y, color); } ok = k; xpi = x + i; xmi = x - i; if (j > 0) { ypj = y + j; ymj = y - j; result |= fastPixelColorNolock(dst, xmi, ypj, color); result |= fastPixelColorNolock(dst, xpi, ypj, color); result |= fastPixelColorNolock(dst, xmi, ymj, color); result |= fastPixelColorNolock(dst, xpi, ymj, color); } else { result |= fastPixelColorNolock(dst, xmi, y, color); result |= fastPixelColorNolock(dst, xpi, y, color); } oj = j; } ix = ix + iy / rx; iy = iy - ix / rx; } while (i > h); } else { ix = 0; iy = ry * 64; do { h = (ix + 32) >> 6; i = (iy + 32) >> 6; j = (h * rx) / ry; k = (i * rx) / ry; if (((oi != i) && (oh != i)) || ((oh != h) && (oi != h) && (i != h))) { xmj = x - j; xpj = x + j; if (i > 0) { ypi = y + i; ymi = y - i; result |= fastPixelColorNolock(dst, xmj, ypi, color); result |= fastPixelColorNolock(dst, xpj, ypi, color); result |= fastPixelColorNolock(dst, xmj, ymi, color); result |= fastPixelColorNolock(dst, xpj, ymi, color); } else { result |= fastPixelColorNolock(dst, xmj, y, color); result |= fastPixelColorNolock(dst, xpj, y, color); } oi = i; xmk = x - k; xpk = x + k; if (h > 0) { yph = y + h; ymh = y - h; result |= fastPixelColorNolock(dst, xmk, yph, color); result |= fastPixelColorNolock(dst, xpk, yph, color); result |= fastPixelColorNolock(dst, xmk, ymh, color); result |= fastPixelColorNolock(dst, xpk, ymh, color); } else { result |= fastPixelColorNolock(dst, xmk, y, color); result |= fastPixelColorNolock(dst, xpk, y, color); } oh = h; } ix = ix + iy / ry; iy = iy - ix / ry; } while (i > h); } } else { if (rx > ry) { ix = 0; iy = rx * 64; do { h = (ix + 32) >> 6; i = (iy + 32) >> 6; j = (h * ry) / rx; k = (i * ry) / rx; if (((ok != k) && (oj != k)) || ((oj != j) && (ok != j)) || (k != j)) { xph = x + h; xmh = x - h; if (k > 0) { ypk = y + k; ymk = y - k; result |= pixelColorNolock (dst, xmh, ypk, color); result |= pixelColorNolock (dst, xph, ypk, color); result |= pixelColorNolock (dst, xmh, ymk, color); result |= pixelColorNolock (dst, xph, ymk, color); } else { result |= pixelColorNolock (dst, xmh, y, color); result |= pixelColorNolock (dst, xph, y, color); } ok = k; xpi = x + i; xmi = x - i; if (j > 0) { ypj = y + j; ymj = y - j; result |= pixelColorNolock (dst, xmi, ypj, color); result |= pixelColorNolock (dst, xpi, ypj, color); result |= pixelColorNolock (dst, xmi, ymj, color); result |= pixelColor(dst, xpi, ymj, color); } else { result |= pixelColorNolock (dst, xmi, y, color); result |= pixelColorNolock (dst, xpi, y, color); } oj = j; } ix = ix + iy / rx; iy = iy - ix / rx; } while (i > h); } else { ix = 0; iy = ry * 64; do { h = (ix + 32) >> 6; i = (iy + 32) >> 6; j = (h * rx) / ry; k = (i * rx) / ry; if (((oi != i) && (oh != i)) || ((oh != h) && (oi != h) && (i != h))) { xmj = x - j; xpj = x + j; if (i > 0) { ypi = y + i; ymi = y - i; result |= pixelColorNolock (dst, xmj, ypi, color); result |= pixelColorNolock (dst, xpj, ypi, color); result |= pixelColorNolock (dst, xmj, ymi, color); result |= pixelColorNolock (dst, xpj, ymi, color); } else { result |= pixelColorNolock (dst, xmj, y, color); result |= pixelColorNolock (dst, xpj, y, color); } oi = i; xmk = x - k; xpk = x + k; if (h > 0) { yph = y + h; ymh = y - h; result |= pixelColorNolock (dst, xmk, yph, color); result |= pixelColorNolock (dst, xpk, yph, color); result |= pixelColorNolock (dst, xmk, ymh, color); result |= pixelColorNolock (dst, xpk, ymh, color); } else { result |= pixelColorNolock (dst, xmk, y, color); result |= pixelColorNolock (dst, xpk, y, color); } oh = h; } ix = ix + iy / ry; iy = iy - ix / ry; } while (i > h); } } /* Alpha check */ /* Unlock surface */ if (SDL_MUSTLOCK(dst)) { SDL_UnlockSurface(dst); } return (result); } int ellipseRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (ellipseColor(dst, x, y, rx, ry, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } /* ----- AA Ellipse */ /* Based on code from Anders Lindstroem, based on code from SGE, based on code from TwinLib */ int aaellipseColor(SDL_Surface * dst, Sint16 xc, Sint16 yc, Sint16 rx, Sint16 ry, Uint32 color) { int i; int a2, b2, ds, dt, dxt, t, s, d; Sint16 x, y, xs, ys, dyt, xx, yy, xc2, yc2; float cp; Uint8 weight, iweight; int result; /* Sanity check radius */ if (rx < 1) rx = 1; if (ry < 1) ry = 1; /* Variable setup */ a2 = rx * rx; b2 = ry * ry; ds = 2 * a2; dt = 2 * b2; xc2 = 2 * xc; yc2 = 2 * yc; dxt = (int) (a2 / sqrt(a2 + b2)); t = 0; s = -2 * a2 * ry; d = 0; x = xc; y = yc - ry; /* Draw */ result = 0; /* Lock surface */ if (SDL_MUSTLOCK(dst)) { if (SDL_LockSurface(dst) < 0) { return (-1); } } /* "End points" */ result |= pixelColorNolock(dst, x, y, color); result |= pixelColorNolock(dst, xc2 - x, y, color); result |= pixelColorNolock(dst, x, yc2 - y, color); result |= pixelColorNolock(dst, xc2 - x, yc2 - y, color); for (i = 1; i <= dxt; i++) { x--; d += t - b2; if (d >= 0) ys = y - 1; else if ((d - s - a2) > 0) { if ((2 * d - s - a2) >= 0) ys = y + 1; else { ys = y; y++; d -= s + a2; s += ds; } } else { y++; ys = y + 1; d -= s + a2; s += ds; } t -= dt; /* Calculate alpha */ if (s != 0.0) { cp = (float) abs(d) / (float) abs(s); if (cp > 1.0) { cp = 1.0; } } else { cp = 1.0; } /* Calculate weights */ weight = (Uint8) (cp * 255); iweight = 255 - weight; /* Upper half */ xx = xc2 - x; result |= pixelColorWeightNolock(dst, x, y, color, iweight); result |= pixelColorWeightNolock(dst, xx, y, color, iweight); result |= pixelColorWeightNolock(dst, x, ys, color, weight); result |= pixelColorWeightNolock(dst, xx, ys, color, weight); /* Lower half */ yy = yc2 - y; result |= pixelColorWeightNolock(dst, x, yy, color, iweight); result |= pixelColorWeightNolock(dst, xx, yy, color, iweight); yy = yc2 - ys; result |= pixelColorWeightNolock(dst, x, yy, color, weight); result |= pixelColorWeightNolock(dst, xx, yy, color, weight); } dyt = abs(y - yc); for (i = 1; i <= dyt; i++) { y++; d -= s + a2; if (d <= 0) xs = x + 1; else if ((d + t - b2) < 0) { if ((2 * d + t - b2) <= 0) xs = x - 1; else { xs = x; x--; d += t - b2; t -= dt; } } else { x--; xs = x - 1; d += t - b2; t -= dt; } s += ds; /* Calculate alpha */ if (t != 0.0) { cp = (float) abs(d) / (float) abs(t); if (cp > 1.0) { cp = 1.0; } } else { cp = 1.0; } /* Calculate weight */ weight = (Uint8) (cp * 255); iweight = 255 - weight; /* Left half */ xx = xc2 - x; yy = yc2 - y; result |= pixelColorWeightNolock(dst, x, y, color, iweight); result |= pixelColorWeightNolock(dst, xx, y, color, iweight); result |= pixelColorWeightNolock(dst, x, yy, color, iweight); result |= pixelColorWeightNolock(dst, xx, yy, color, iweight); /* Right half */ xx = 2 * xc - xs; result |= pixelColorWeightNolock(dst, xs, y, color, weight); result |= pixelColorWeightNolock(dst, xx, y, color, weight); result |= pixelColorWeightNolock(dst, xs, yy, color, weight); result |= pixelColorWeightNolock(dst, xx, yy, color, weight); } /* Unlock surface */ if (SDL_MUSTLOCK(dst)) { SDL_UnlockSurface(dst); } return (result); } int aaellipseRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (aaellipseColor (dst, x, y, rx, ry, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } /* ---- Filled Ellipse */ /* Note: */ /* Based on algorithm from sge library with multiple-hline draw removal */ /* and other speedup changes. */ int filledEllipseColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color) { int result; Sint16 x1, y1, x2, y2; int ix, iy; int h, i, j, k; int oh, oi, oj, ok; int xmh, xph; int xmi, xpi; int xmj, xpj; int xmk, xpk; /* * Sanity check radii */ if ((rx < 0) || (ry < 0)) { return (-1); } /* * Special case for rx=0 - draw a vline */ if (rx == 0) { return (vlineColor(dst, x, y - ry, y + ry, color)); } /* * Special case for ry=0 - draw a hline */ if (ry == 0) { return (hlineColor(dst, x - rx, x + rx, y, color)); } /* * Test bounding box */ x1 = x - rx; y1 = y - ry; x2 = x + rx; y2 = y + ry; if (!(clipLine(dst, &x1, &y1, &x2, &y2))) { return (0); } /* * Init vars */ oh = oi = oj = ok = 0xFFFF; /* * Draw */ result = 0; if (rx > ry) { ix = 0; iy = rx * 64; do { h = (ix + 32) >> 6; i = (iy + 32) >> 6; j = (h * ry) / rx; k = (i * ry) / rx; if ((ok != k) && (oj != k)) { xph = x + h; xmh = x - h; if (k > 0) { result |= hlineColor(dst, xmh, xph, y + k, color); result |= hlineColor(dst, xmh, xph, y - k, color); } else { result |= hlineColor(dst, xmh, xph, y, color); } ok = k; } if ((oj != j) && (ok != j) && (k != j)) { xmi = x - i; xpi = x + i; if (j > 0) { result |= hlineColor(dst, xmi, xpi, y + j, color); result |= hlineColor(dst, xmi, xpi, y - j, color); } else { result |= hlineColor(dst, xmi, xpi, y, color); } oj = j; } ix = ix + iy / rx; iy = iy - ix / rx; } while (i > h); } else { ix = 0; iy = ry * 64; do { h = (ix + 32) >> 6; i = (iy + 32) >> 6; j = (h * rx) / ry; k = (i * rx) / ry; if ((oi != i) && (oh != i)) { xmj = x - j; xpj = x + j; if (i > 0) { result |= hlineColor(dst, xmj, xpj, y + i, color); result |= hlineColor(dst, xmj, xpj, y - i, color); } else { result |= hlineColor(dst, xmj, xpj, y, color); } oi = i; } if ((oh != h) && (oi != h) && (i != h)) { xmk = x - k; xpk = x + k; if (h > 0) { result |= hlineColor(dst, xmk, xpk, y + h, color); result |= hlineColor(dst, xmk, xpk, y - h, color); } else { result |= hlineColor(dst, xmk, xpk, y, color); } oh = h; } ix = ix + iy / ry; iy = iy - ix / ry; } while (i > h); } return (result); } int filledEllipseRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (filledEllipseColor (dst, x, y, rx, ry, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } /* ----- filled pie */ /* Low-speed float pie-calc implementation by drawing polygons. */ int filledpieColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color) { int result; Sint16 x1, y1, x2, y2; double angle, start_angle, end_angle; double deltaAngle; double dr; int posX, posY; int numpoints, i; Sint16 *vx, *vy; /* * Sanity check radii */ if (rad < 0) { return (-1); } /* * Fixup angles */ start = start % 360; end = end % 360; /* * Special case for rad=0 - draw a point */ if (rad == 0) { return (pixelColor(dst, x, y, color)); } /* * Test bounding box for visibility */ x1 = x - rad; y1 = y - rad; x2 = x + rad; y2 = y + rad; if (!(clipLine(dst, &x1, &y1, &x2, &y2))) { return (0); } /* * Variable setup */ dr = (double) rad; deltaAngle = 3.0 / dr; start_angle = (double) start *(2.0 * M_PI / 360.0); end_angle = (double) end *(2.0 * M_PI / 360.0); if (start > end) { end_angle += (2.0 * M_PI); } /* Count points (rather than calculate it) */ numpoints = 1; angle = start_angle; while (angle <= end_angle) { angle += deltaAngle; numpoints++; } /* Check size of array */ if (numpoints == 1) { return (pixelColor(dst, x, y, color)); } else if (numpoints == 2) { posX = x + (int) (dr * cos(start_angle)); posY = y + (int) (dr * sin(start_angle)); return (lineColor(dst, x, y, posX, posY, color)); } /* Allocate vertex array */ vx = vy = (Uint16 *) malloc(2 * sizeof(Uint16) * numpoints); if (vx == NULL) { return (-1); } vy += numpoints; /* Center */ vx[0] = x; vy[0] = y; /* Calculate and store vertices */ i = 1; angle = start_angle; while (angle <= end_angle) { vx[i] = x + (int) (dr * cos(angle)); vy[i] = y + (int) (dr * sin(angle)); angle += deltaAngle; i++; } /* Draw */ result = filledPolygonColor(dst, vx, vy, numpoints, color); /* Free vertex */ free(vx); return (result); } int filledpieRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { return (filledpieColor(dst, x, y, rad, start, end, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } /* ---- Polygon */ int polygonColor(SDL_Surface * dst, Sint16 * vx, Sint16 * vy, int n, Uint32 color) { int result; int i; Sint16 *x1, *y1, *x2, *y2; /* * Sanity check */ if (n < 3) { return (-1); } /* * Pointer setup */ x1 = x2 = vx; y1 = y2 = vy; x2++; y2++; /* * Draw */ result = 0; for (i = 1; i < n; i++) { result |= lineColor(dst, *x1, *y1, *x2, *y2, color); x1 = x2; y1 = y2; x2++; y2++; } result |= lineColor(dst, *x1, *y1, *vx, *vy, color); return (result); } int polygonRGBA(SDL_Surface * dst, Sint16 * vx, Sint16 * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (polygonColor(dst, vx, vy, n, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } /* ---- AA-Polygon */ int aapolygonColor(SDL_Surface * dst, Sint16 * vx, Sint16 * vy, int n, Uint32 color) { int result; int i; Sint16 *x1, *y1, *x2, *y2; /* * Sanity check */ if (n < 3) { return (-1); } /* * Pointer setup */ x1 = x2 = vx; y1 = y2 = vy; x2++; y2++; /* * Draw */ result = 0; for (i = 1; i < n; i++) { result |= aalineColorInt(dst, *x1, *y1, *x2, *y2, color, 0); x1 = x2; y1 = y2; x2++; y2++; } result |= aalineColorInt(dst, *x1, *y1, *vx, *vy, color, 0); return (result); } int aapolygonRGBA(SDL_Surface * dst, Sint16 * vx, Sint16 * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (aapolygonColor(dst, vx, vy, n, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } /* ---- Filled Polygon */ int gfxPrimitivesCompareInt(const void *a, const void *b); static int *gfxPrimitivesPolyInts = NULL; static int gfxPrimitivesPolyAllocated = 0; int filledPolygonColor(SDL_Surface * dst, Sint16 * vx, Sint16 * vy, int n, int color) { int result; int i; int y; int miny, maxy; int x1, y1; int x2, y2; int ind1, ind2; int ints; /* * Sanity check */ if (n < 3) { return -1; } /* * Allocate temp array, only grow array */ if (!gfxPrimitivesPolyAllocated) { gfxPrimitivesPolyInts = (int *) malloc(sizeof(int) * n); gfxPrimitivesPolyAllocated = n; } else { if (gfxPrimitivesPolyAllocated < n) { gfxPrimitivesPolyInts = (int *) realloc(gfxPrimitivesPolyInts, sizeof(int) * n); gfxPrimitivesPolyAllocated = n; } } /* * Determine Y maxima */ miny = vy[0]; maxy = vy[0]; for (i = 1; (i < n); i++) { if (vy[i] < miny) { miny = vy[i]; } else if (vy[i] > maxy) { maxy = vy[i]; } } /* * Draw, scanning y */ result = 0; for (y = miny; (y <= maxy); y++) { ints = 0; for (i = 0; (i < n); i++) { if (!i) { ind1 = n - 1; ind2 = 0; } else { ind1 = i - 1; ind2 = i; } y1 = vy[ind1]; y2 = vy[ind2]; if (y1 < y2) { x1 = vx[ind1]; x2 = vx[ind2]; } else if (y1 > y2) { y2 = vy[ind1]; y1 = vy[ind2]; x2 = vx[ind1]; x1 = vx[ind2]; } else { continue; } if ((y >= y1) && (y < y2)) { gfxPrimitivesPolyInts[ints++] = (y - y1) * (x2 - x1) / (y2 - y1) + x1; } else if ((y == maxy) && (y > y1) && (y <= y2)) { gfxPrimitivesPolyInts[ints++] = (y - y1) * (x2 - x1) / (y2 - y1) + x1; } } qsort(gfxPrimitivesPolyInts, ints, sizeof(int), gfxPrimitivesCompareInt); for (i = 0; (i < ints); i += 2) { result |= hlineColor(dst, gfxPrimitivesPolyInts[i], gfxPrimitivesPolyInts[i + 1], y, color); } } return (result); } int filledPolygonRGBA(SDL_Surface * dst, Sint16 * vx, Sint16 * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (filledPolygonColor (dst, vx, vy, n, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } int gfxPrimitivesCompareInt(const void *a, const void *b) { return (*(const int *) a) - (*(const int *) b); } /* ---- Character (8x8 internal font) */ static SDL_Surface *gfxPrimitivesFont[256]; static Uint32 gfxPrimitivesFontColor[256]; int characterColor(SDL_Surface * dst, Sint16 x, Sint16 y, char c, Uint32 color) { SDL_Rect srect; SDL_Rect drect; int result; int ix, iy, k; unsigned char *charpos; unsigned char bits[8] = { 128, 64, 32, 16, 8, 4, 2, 1 }; unsigned char *bitpos; Uint8 *curpos; int forced_redraw; /* * Setup source rectangle for 8x8 bitmap */ srect.x = 0; srect.y = 0; srect.w = 8; srect.h = 8; /* * Setup destination rectangle for 8x8 bitmap */ drect.x = x; drect.y = y; drect.w = 8; drect.h = 8; /* * Create new 8x8 bitmap surface if not already present */ if (gfxPrimitivesFont[(unsigned char) c] == NULL) { gfxPrimitivesFont[(unsigned char) c] = SDL_CreateRGBSurface(SDL_SWSURFACE | SDL_HWSURFACE | SDL_SRCALPHA, 8, 8, 32, 0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF); /* * Check pointer */ if (gfxPrimitivesFont[(unsigned char) c] == NULL) { return (-1); } /* * Definitely redraw */ forced_redraw = 1; } else { forced_redraw = 0; } /* * Check if color has changed */ if ((gfxPrimitivesFontColor[(unsigned char) c] != color) || (forced_redraw)) { /* * Redraw character */ SDL_SetAlpha(gfxPrimitivesFont[(unsigned char) c], SDL_SRCALPHA, 255); gfxPrimitivesFontColor[(unsigned char) c] = color; /* * Variable setup */ k = (unsigned char) c; k *= 8; charpos = gfxPrimitivesFontdata; charpos += k; /* * Clear bitmap */ curpos = (Uint8 *) gfxPrimitivesFont[(unsigned char) c]->pixels; memset(curpos, 0, 8 * 8 * 4); /* * Drawing loop */ for (iy = 0; iy < 8; iy++) { bitpos = bits; for (ix = 0; ix < 8; ix++) { if ((*charpos & *bitpos) == *bitpos) { memcpy(curpos, &color, 4); } bitpos++; curpos += 4;; } charpos++; } } /* * Draw bitmap onto destination surface */ result = SDL_BlitSurface(gfxPrimitivesFont[(unsigned char) c], &srect, dst, &drect); return (result); } int characterRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, char c, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (characterColor(dst, x, y, c, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } int stringColor(SDL_Surface * dst, Sint16 x, Sint16 y, char *c, Uint32 color) { int result; int i, length; char *curchar; int curx; length = strlen(c); curchar = c; curx = x; result = 0; for (i = 0; i < length; i++) { result |= characterColor(dst, curx, y, *curchar, color); curchar++; curx += 8; } return (result); } int stringRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, char *c, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return (stringColor(dst, x, y, c, ((Uint32) r << 24) | ((Uint32) g << 16) | ((Uint32) b << 8) | (Uint32) a)); } xwelltris-1.0.1/src/sdl/sdl_gfxprimitives.h0100644000175300014110000001306707624651653017405 0ustar leoguys /* SDL_gfxPrimitives: graphics primitives for SDL LGPL (c) A. Schiffler */ #ifndef _SDL_gfxPrimitives_h #define _SDL_gfxPrimitives_h #include #ifndef M_PI #define M_PI 3.141592654 #endif #include "SDL.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus extern "C" { #endif /* ----- Versioning */ #define SDL_GFXPRIMITIVES_MAJOR 1 #define SDL_GFXPRIMITIVES_MINOR 5 /* ----- W32 DLL interface */ #ifdef WIN32 #ifdef BUILD_DLL #define DLLINTERFACE __declspec(dllexport) #else #define DLLINTERFACE __declspec(dllimport) #endif #else #define DLLINTERFACE #endif /* ----- Prototypes */ /* Note: all ___Color routines expect the color to be in format 0xRRGGBBAA */ /* Pixel */ DLLINTERFACE int pixelColor(SDL_Surface * dst, Sint16 x, Sint16 y, Uint32 color); DLLINTERFACE int pixelRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Horizontal line */ DLLINTERFACE int hlineColor(SDL_Surface * dst, Sint16 x1, Sint16 x2, Sint16 y, Uint32 color); DLLINTERFACE int hlineRGBA(SDL_Surface * dst, Sint16 x1, Sint16 x2, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Vertical line */ DLLINTERFACE int vlineColor(SDL_Surface * dst, Sint16 x, Sint16 y1, Sint16 y2, Uint32 color); DLLINTERFACE int vlineRGBA(SDL_Surface * dst, Sint16 x, Sint16 y1, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Rectangle */ DLLINTERFACE int rectangleColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color); DLLINTERFACE int rectangleRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Filled rectangle (Box) */ DLLINTERFACE int boxColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color); DLLINTERFACE int boxRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Line */ DLLINTERFACE int lineColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color); DLLINTERFACE int lineRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* AA Line */ DLLINTERFACE int aalineColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color); DLLINTERFACE int aalineRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Circle */ DLLINTERFACE int circleColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 r, Uint32 color); DLLINTERFACE int circleRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* AA Circle */ DLLINTERFACE int aacircleColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 r, Uint32 color); DLLINTERFACE int aacircleRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Filled Circle */ DLLINTERFACE int filledCircleColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 r, Uint32 color); DLLINTERFACE int filledCircleRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Ellipse */ DLLINTERFACE int ellipseColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color); DLLINTERFACE int ellipseRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* AA Ellipse */ DLLINTERFACE int aaellipseColor(SDL_Surface * dst, Sint16 xc, Sint16 yc, Sint16 rx, Sint16 ry, Uint32 color); DLLINTERFACE int aaellipseRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Filled Ellipse */ DLLINTERFACE int filledEllipseColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color); DLLINTERFACE int filledEllipseRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Filled Pie */ DLLINTERFACE int filledpieColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color); DLLINTERFACE int filledpieRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Polygon */ DLLINTERFACE int polygonColor(SDL_Surface * dst, Sint16 * vx, Sint16 * vy, int n, Uint32 color); DLLINTERFACE int polygonRGBA(SDL_Surface * dst, Sint16 * vx, Sint16 * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* AA-Polygon */ DLLINTERFACE int aapolygonColor(SDL_Surface * dst, Sint16 * vx, Sint16 * vy, int n, Uint32 color); DLLINTERFACE int aapolygonRGBA(SDL_Surface * dst, Sint16 * vx, Sint16 * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Filled Polygon */ DLLINTERFACE int filledPolygonColor(SDL_Surface * dst, Sint16 * vx, Sint16 * vy, int n, int color); DLLINTERFACE int filledPolygonRGBA(SDL_Surface * dst, Sint16 * vx, Sint16 * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* 8x8 Characters/Strings */ DLLINTERFACE int characterColor(SDL_Surface * dst, Sint16 x, Sint16 y, char c, Uint32 color); DLLINTERFACE int characterRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, char c, Uint8 r, Uint8 g, Uint8 b, Uint8 a); DLLINTERFACE int stringColor(SDL_Surface * dst, Sint16 x, Sint16 y, char *c, Uint32 color); DLLINTERFACE int stringRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, char *c, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Ends C function definitions when using C++ */ #ifdef __cplusplus }; #endif #endif /* _SDL_gfxPrimitives_h */ xwelltris-1.0.1/src/sdl/sdl_gfxprimitives_font.h0100644000175300014110000017653307624651653020443 0ustar leoguys /* ---- 8x8 font definition ---- */ /* LGPL (c) A. Schiffler */ #define GFX_FONTDATAMAX (8*256) static unsigned char gfxPrimitivesFontdata[GFX_FONTDATAMAX] = { /* * 0 0x00 '^@' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 1 0x01 '^A' */ 0x7e, /* 01111110 */ 0x81, /* 10000001 */ 0xa5, /* 10100101 */ 0x81, /* 10000001 */ 0xbd, /* 10111101 */ 0x99, /* 10011001 */ 0x81, /* 10000001 */ 0x7e, /* 01111110 */ /* * 2 0x02 '^B' */ 0x7e, /* 01111110 */ 0xff, /* 11111111 */ 0xdb, /* 11011011 */ 0xff, /* 11111111 */ 0xc3, /* 11000011 */ 0xe7, /* 11100111 */ 0xff, /* 11111111 */ 0x7e, /* 01111110 */ /* * 3 0x03 '^C' */ 0x6c, /* 01101100 */ 0xfe, /* 11111110 */ 0xfe, /* 11111110 */ 0xfe, /* 11111110 */ 0x7c, /* 01111100 */ 0x38, /* 00111000 */ 0x10, /* 00010000 */ 0x00, /* 00000000 */ /* * 4 0x04 '^D' */ 0x10, /* 00010000 */ 0x38, /* 00111000 */ 0x7c, /* 01111100 */ 0xfe, /* 11111110 */ 0x7c, /* 01111100 */ 0x38, /* 00111000 */ 0x10, /* 00010000 */ 0x00, /* 00000000 */ /* * 5 0x05 '^E' */ 0x38, /* 00111000 */ 0x7c, /* 01111100 */ 0x38, /* 00111000 */ 0xfe, /* 11111110 */ 0xfe, /* 11111110 */ 0xd6, /* 11010110 */ 0x10, /* 00010000 */ 0x38, /* 00111000 */ /* * 6 0x06 '^F' */ 0x10, /* 00010000 */ 0x38, /* 00111000 */ 0x7c, /* 01111100 */ 0xfe, /* 11111110 */ 0xfe, /* 11111110 */ 0x7c, /* 01111100 */ 0x10, /* 00010000 */ 0x38, /* 00111000 */ /* * 7 0x07 '^G' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 8 0x08 '^H' */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xe7, /* 11100111 */ 0xc3, /* 11000011 */ 0xc3, /* 11000011 */ 0xe7, /* 11100111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ /* * 9 0x09 '^I' */ 0x00, /* 00000000 */ 0x3c, /* 00111100 */ 0x66, /* 01100110 */ 0x42, /* 01000010 */ 0x42, /* 01000010 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 10 0x0a '^J' */ 0xff, /* 11111111 */ 0xc3, /* 11000011 */ 0x99, /* 10011001 */ 0xbd, /* 10111101 */ 0xbd, /* 10111101 */ 0x99, /* 10011001 */ 0xc3, /* 11000011 */ 0xff, /* 11111111 */ /* * 11 0x0b '^K' */ 0x0f, /* 00001111 */ 0x07, /* 00000111 */ 0x0f, /* 00001111 */ 0x7d, /* 01111101 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0x78, /* 01111000 */ /* * 12 0x0c '^L' */ 0x3c, /* 00111100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ /* * 13 0x0d '^M' */ 0x3f, /* 00111111 */ 0x33, /* 00110011 */ 0x3f, /* 00111111 */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x70, /* 01110000 */ 0xf0, /* 11110000 */ 0xe0, /* 11100000 */ /* * 14 0x0e '^N' */ 0x7f, /* 01111111 */ 0x63, /* 01100011 */ 0x7f, /* 01111111 */ 0x63, /* 01100011 */ 0x63, /* 01100011 */ 0x67, /* 01100111 */ 0xe6, /* 11100110 */ 0xc0, /* 11000000 */ /* * 15 0x0f '^O' */ 0x18, /* 00011000 */ 0xdb, /* 11011011 */ 0x3c, /* 00111100 */ 0xe7, /* 11100111 */ 0xe7, /* 11100111 */ 0x3c, /* 00111100 */ 0xdb, /* 11011011 */ 0x18, /* 00011000 */ /* * 16 0x10 '^P' */ 0x80, /* 10000000 */ 0xe0, /* 11100000 */ 0xf8, /* 11111000 */ 0xfe, /* 11111110 */ 0xf8, /* 11111000 */ 0xe0, /* 11100000 */ 0x80, /* 10000000 */ 0x00, /* 00000000 */ /* * 17 0x11 '^Q' */ 0x02, /* 00000010 */ 0x0e, /* 00001110 */ 0x3e, /* 00111110 */ 0xfe, /* 11111110 */ 0x3e, /* 00111110 */ 0x0e, /* 00001110 */ 0x02, /* 00000010 */ 0x00, /* 00000000 */ /* * 18 0x12 '^R' */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ /* * 19 0x13 '^S' */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x00, /* 00000000 */ 0x66, /* 01100110 */ 0x00, /* 00000000 */ /* * 20 0x14 '^T' */ 0x7f, /* 01111111 */ 0xdb, /* 11011011 */ 0xdb, /* 11011011 */ 0x7b, /* 01111011 */ 0x1b, /* 00011011 */ 0x1b, /* 00011011 */ 0x1b, /* 00011011 */ 0x00, /* 00000000 */ /* * 21 0x15 '^U' */ 0x3e, /* 00111110 */ 0x61, /* 01100001 */ 0x3c, /* 00111100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ 0x86, /* 10000110 */ 0x7c, /* 01111100 */ /* * 22 0x16 '^V' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x7e, /* 01111110 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ /* * 23 0x17 '^W' */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0xff, /* 11111111 */ /* * 24 0x18 '^X' */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ /* * 25 0x19 '^Y' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ /* * 26 0x1a '^Z' */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0xfe, /* 11111110 */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 27 0x1b '^[' */ 0x00, /* 00000000 */ 0x30, /* 00110000 */ 0x60, /* 01100000 */ 0xfe, /* 11111110 */ 0x60, /* 01100000 */ 0x30, /* 00110000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 28 0x1c '^\' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 29 0x1d '^]' */ 0x00, /* 00000000 */ 0x24, /* 00100100 */ 0x66, /* 01100110 */ 0xff, /* 11111111 */ 0x66, /* 01100110 */ 0x24, /* 00100100 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 30 0x1e '^^' */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x7e, /* 01111110 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 31 0x1f '^_' */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0x7e, /* 01111110 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 32 0x20 ' ' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 33 0x21 '!' */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ /* * 34 0x22 '"' */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x24, /* 00100100 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 35 0x23 '#' */ 0x6c, /* 01101100 */ 0x6c, /* 01101100 */ 0xfe, /* 11111110 */ 0x6c, /* 01101100 */ 0xfe, /* 11111110 */ 0x6c, /* 01101100 */ 0x6c, /* 01101100 */ 0x00, /* 00000000 */ /* * 36 0x24 '$' */ 0x18, /* 00011000 */ 0x3e, /* 00111110 */ 0x60, /* 01100000 */ 0x3c, /* 00111100 */ 0x06, /* 00000110 */ 0x7c, /* 01111100 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ /* * 37 0x25 '%' */ 0x00, /* 00000000 */ 0xc6, /* 11000110 */ 0xcc, /* 11001100 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x66, /* 01100110 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ /* * 38 0x26 '&' */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0x38, /* 00111000 */ 0x76, /* 01110110 */ 0xdc, /* 11011100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 39 0x27 ''' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 40 0x28 '(' */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0x00, /* 00000000 */ /* * 41 0x29 ')' */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0x0c, /* 00001100 */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x00, /* 00000000 */ /* * 42 0x2a '*' */ 0x00, /* 00000000 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ 0xff, /* 11111111 */ 0x3c, /* 00111100 */ 0x66, /* 01100110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 43 0x2b '+' */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 44 0x2c ',' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ /* * 45 0x2d '-' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 46 0x2e '.' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ /* * 47 0x2f '/' */ 0x06, /* 00000110 */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x60, /* 01100000 */ 0xc0, /* 11000000 */ 0x80, /* 10000000 */ 0x00, /* 00000000 */ /* * 48 0x30 '0' */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0xc6, /* 11000110 */ 0xd6, /* 11010110 */ 0xc6, /* 11000110 */ 0x6c, /* 01101100 */ 0x38, /* 00111000 */ 0x00, /* 00000000 */ /* * 49 0x31 '1' */ 0x18, /* 00011000 */ 0x38, /* 00111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ /* * 50 0x32 '2' */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0x06, /* 00000110 */ 0x1c, /* 00011100 */ 0x30, /* 00110000 */ 0x66, /* 01100110 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ /* * 51 0x33 '3' */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0x06, /* 00000110 */ 0x3c, /* 00111100 */ 0x06, /* 00000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 52 0x34 '4' */ 0x1c, /* 00011100 */ 0x3c, /* 00111100 */ 0x6c, /* 01101100 */ 0xcc, /* 11001100 */ 0xfe, /* 11111110 */ 0x0c, /* 00001100 */ 0x1e, /* 00011110 */ 0x00, /* 00000000 */ /* * 53 0x35 '5' */ 0xfe, /* 11111110 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0xfc, /* 11111100 */ 0x06, /* 00000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 54 0x36 '6' */ 0x38, /* 00111000 */ 0x60, /* 01100000 */ 0xc0, /* 11000000 */ 0xfc, /* 11111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 55 0x37 '7' */ 0xfe, /* 11111110 */ 0xc6, /* 11000110 */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x00, /* 00000000 */ /* * 56 0x38 '8' */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 57 0x39 '9' */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7e, /* 01111110 */ 0x06, /* 00000110 */ 0x0c, /* 00001100 */ 0x78, /* 01111000 */ 0x00, /* 00000000 */ /* * 58 0x3a ':' */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ /* * 59 0x3b ';' */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ /* * 60 0x3c '<' */ 0x06, /* 00000110 */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0x06, /* 00000110 */ 0x00, /* 00000000 */ /* * 61 0x3d '=' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 62 0x3e '>' */ 0x60, /* 01100000 */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x60, /* 01100000 */ 0x00, /* 00000000 */ /* * 63 0x3f '?' */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ /* * 64 0x40 '@' */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xde, /* 11011110 */ 0xde, /* 11011110 */ 0xde, /* 11011110 */ 0xc0, /* 11000000 */ 0x78, /* 01111000 */ 0x00, /* 00000000 */ /* * 65 0x41 'A' */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ /* * 66 0x42 'B' */ 0xfc, /* 11111100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x7c, /* 01111100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0xfc, /* 11111100 */ 0x00, /* 00000000 */ /* * 67 0x43 'C' */ 0x3c, /* 00111100 */ 0x66, /* 01100110 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 68 0x44 'D' */ 0xf8, /* 11111000 */ 0x6c, /* 01101100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x6c, /* 01101100 */ 0xf8, /* 11111000 */ 0x00, /* 00000000 */ /* * 69 0x45 'E' */ 0xfe, /* 11111110 */ 0x62, /* 01100010 */ 0x68, /* 01101000 */ 0x78, /* 01111000 */ 0x68, /* 01101000 */ 0x62, /* 01100010 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ /* * 70 0x46 'F' */ 0xfe, /* 11111110 */ 0x62, /* 01100010 */ 0x68, /* 01101000 */ 0x78, /* 01111000 */ 0x68, /* 01101000 */ 0x60, /* 01100000 */ 0xf0, /* 11110000 */ 0x00, /* 00000000 */ /* * 71 0x47 'G' */ 0x3c, /* 00111100 */ 0x66, /* 01100110 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0xce, /* 11001110 */ 0x66, /* 01100110 */ 0x3a, /* 00111010 */ 0x00, /* 00000000 */ /* * 72 0x48 'H' */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ /* * 73 0x49 'I' */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 74 0x4a 'J' */ 0x1e, /* 00011110 */ 0x0c, /* 00001100 */ 0x0c, /* 00001100 */ 0x0c, /* 00001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0x78, /* 01111000 */ 0x00, /* 00000000 */ /* * 75 0x4b 'K' */ 0xe6, /* 11100110 */ 0x66, /* 01100110 */ 0x6c, /* 01101100 */ 0x78, /* 01111000 */ 0x6c, /* 01101100 */ 0x66, /* 01100110 */ 0xe6, /* 11100110 */ 0x00, /* 00000000 */ /* * 76 0x4c 'L' */ 0xf0, /* 11110000 */ 0x60, /* 01100000 */ 0x60, /* 01100000 */ 0x60, /* 01100000 */ 0x62, /* 01100010 */ 0x66, /* 01100110 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ /* * 77 0x4d 'M' */ 0xc6, /* 11000110 */ 0xee, /* 11101110 */ 0xfe, /* 11111110 */ 0xfe, /* 11111110 */ 0xd6, /* 11010110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ /* * 78 0x4e 'N' */ 0xc6, /* 11000110 */ 0xe6, /* 11100110 */ 0xf6, /* 11110110 */ 0xde, /* 11011110 */ 0xce, /* 11001110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ /* * 79 0x4f 'O' */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 80 0x50 'P' */ 0xfc, /* 11111100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x7c, /* 01111100 */ 0x60, /* 01100000 */ 0x60, /* 01100000 */ 0xf0, /* 11110000 */ 0x00, /* 00000000 */ /* * 81 0x51 'Q' */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xce, /* 11001110 */ 0x7c, /* 01111100 */ 0x0e, /* 00001110 */ /* * 82 0x52 'R' */ 0xfc, /* 11111100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x7c, /* 01111100 */ 0x6c, /* 01101100 */ 0x66, /* 01100110 */ 0xe6, /* 11100110 */ 0x00, /* 00000000 */ /* * 83 0x53 'S' */ 0x3c, /* 00111100 */ 0x66, /* 01100110 */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 84 0x54 'T' */ 0x7e, /* 01111110 */ 0x7e, /* 01111110 */ 0x5a, /* 01011010 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 85 0x55 'U' */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 86 0x56 'V' */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x6c, /* 01101100 */ 0x38, /* 00111000 */ 0x00, /* 00000000 */ /* * 87 0x57 'W' */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xd6, /* 11010110 */ 0xd6, /* 11010110 */ 0xfe, /* 11111110 */ 0x6c, /* 01101100 */ 0x00, /* 00000000 */ /* * 88 0x58 'X' */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x6c, /* 01101100 */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ /* * 89 0x59 'Y' */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 90 0x5a 'Z' */ 0xfe, /* 11111110 */ 0xc6, /* 11000110 */ 0x8c, /* 10001100 */ 0x18, /* 00011000 */ 0x32, /* 00110010 */ 0x66, /* 01100110 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ /* * 91 0x5b '[' */ 0x3c, /* 00111100 */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 92 0x5c '\' */ 0xc0, /* 11000000 */ 0x60, /* 01100000 */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0x06, /* 00000110 */ 0x02, /* 00000010 */ 0x00, /* 00000000 */ /* * 93 0x5d ']' */ 0x3c, /* 00111100 */ 0x0c, /* 00001100 */ 0x0c, /* 00001100 */ 0x0c, /* 00001100 */ 0x0c, /* 00001100 */ 0x0c, /* 00001100 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 94 0x5e '^' */ 0x10, /* 00010000 */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 95 0x5f '_' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ /* * 96 0x60 '`' */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 97 0x61 'a' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x78, /* 01111000 */ 0x0c, /* 00001100 */ 0x7c, /* 01111100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 98 0x62 'b' */ 0xe0, /* 11100000 */ 0x60, /* 01100000 */ 0x7c, /* 01111100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0xdc, /* 11011100 */ 0x00, /* 00000000 */ /* * 99 0x63 'c' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc0, /* 11000000 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 100 0x64 'd' */ 0x1c, /* 00011100 */ 0x0c, /* 00001100 */ 0x7c, /* 01111100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 101 0x65 'e' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0xc0, /* 11000000 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 102 0x66 'f' */ 0x3c, /* 00111100 */ 0x66, /* 01100110 */ 0x60, /* 01100000 */ 0xf8, /* 11111000 */ 0x60, /* 01100000 */ 0x60, /* 01100000 */ 0xf0, /* 11110000 */ 0x00, /* 00000000 */ /* * 103 0x67 'g' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x76, /* 01110110 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0x7c, /* 01111100 */ 0x0c, /* 00001100 */ 0xf8, /* 11111000 */ /* * 104 0x68 'h' */ 0xe0, /* 11100000 */ 0x60, /* 01100000 */ 0x6c, /* 01101100 */ 0x76, /* 01110110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0xe6, /* 11100110 */ 0x00, /* 00000000 */ /* * 105 0x69 'i' */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x38, /* 00111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 106 0x6a 'j' */ 0x06, /* 00000110 */ 0x00, /* 00000000 */ 0x06, /* 00000110 */ 0x06, /* 00000110 */ 0x06, /* 00000110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ /* * 107 0x6b 'k' */ 0xe0, /* 11100000 */ 0x60, /* 01100000 */ 0x66, /* 01100110 */ 0x6c, /* 01101100 */ 0x78, /* 01111000 */ 0x6c, /* 01101100 */ 0xe6, /* 11100110 */ 0x00, /* 00000000 */ /* * 108 0x6c 'l' */ 0x38, /* 00111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 109 0x6d 'm' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xec, /* 11101100 */ 0xfe, /* 11111110 */ 0xd6, /* 11010110 */ 0xd6, /* 11010110 */ 0xd6, /* 11010110 */ 0x00, /* 00000000 */ /* * 110 0x6e 'n' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xdc, /* 11011100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x00, /* 00000000 */ /* * 111 0x6f 'o' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 112 0x70 'p' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xdc, /* 11011100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x7c, /* 01111100 */ 0x60, /* 01100000 */ 0xf0, /* 11110000 */ /* * 113 0x71 'q' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x76, /* 01110110 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0x7c, /* 01111100 */ 0x0c, /* 00001100 */ 0x1e, /* 00011110 */ /* * 114 0x72 'r' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xdc, /* 11011100 */ 0x76, /* 01110110 */ 0x60, /* 01100000 */ 0x60, /* 01100000 */ 0xf0, /* 11110000 */ 0x00, /* 00000000 */ /* * 115 0x73 's' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0xc0, /* 11000000 */ 0x7c, /* 01111100 */ 0x06, /* 00000110 */ 0xfc, /* 11111100 */ 0x00, /* 00000000 */ /* * 116 0x74 't' */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0xfc, /* 11111100 */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x36, /* 00110110 */ 0x1c, /* 00011100 */ 0x00, /* 00000000 */ /* * 117 0x75 'u' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 118 0x76 'v' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x6c, /* 01101100 */ 0x38, /* 00111000 */ 0x00, /* 00000000 */ /* * 119 0x77 'w' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xc6, /* 11000110 */ 0xd6, /* 11010110 */ 0xd6, /* 11010110 */ 0xfe, /* 11111110 */ 0x6c, /* 01101100 */ 0x00, /* 00000000 */ /* * 120 0x78 'x' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xc6, /* 11000110 */ 0x6c, /* 01101100 */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ /* * 121 0x79 'y' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7e, /* 01111110 */ 0x06, /* 00000110 */ 0xfc, /* 11111100 */ /* * 122 0x7a 'z' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x4c, /* 01001100 */ 0x18, /* 00011000 */ 0x32, /* 00110010 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ /* * 123 0x7b '{' */ 0x0e, /* 00001110 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x70, /* 01110000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x0e, /* 00001110 */ 0x00, /* 00000000 */ /* * 124 0x7c '|' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ /* * 125 0x7d '}' */ 0x70, /* 01110000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x0e, /* 00001110 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x70, /* 01110000 */ 0x00, /* 00000000 */ /* * 126 0x7e '~' */ 0x76, /* 01110110 */ 0xdc, /* 11011100 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 127 0x7f '' */ 0x00, /* 00000000 */ 0x10, /* 00010000 */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ /* * 128 0x80 '' */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x0c, /* 00001100 */ 0x78, /* 01111000 */ /* * 129 0x81 '' */ 0xcc, /* 11001100 */ 0x00, /* 00000000 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 130 0x82 '' */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0xc0, /* 11000000 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 131 0x83 '' */ 0x7c, /* 01111100 */ 0x82, /* 10000010 */ 0x78, /* 01111000 */ 0x0c, /* 00001100 */ 0x7c, /* 01111100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 132 0x84 '' */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ 0x78, /* 01111000 */ 0x0c, /* 00001100 */ 0x7c, /* 01111100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 133 0x85 '' */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x78, /* 01111000 */ 0x0c, /* 00001100 */ 0x7c, /* 01111100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 134 0x86 '' */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x78, /* 01111000 */ 0x0c, /* 00001100 */ 0x7c, /* 01111100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 135 0x87 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0x7e, /* 01111110 */ 0x0c, /* 00001100 */ 0x38, /* 00111000 */ /* * 136 0x88 '' */ 0x7c, /* 01111100 */ 0x82, /* 10000010 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0xc0, /* 11000000 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 137 0x89 '' */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0xc0, /* 11000000 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 138 0x8a '' */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0xc0, /* 11000000 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 139 0x8b '' */ 0x66, /* 01100110 */ 0x00, /* 00000000 */ 0x38, /* 00111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 140 0x8c '' */ 0x7c, /* 01111100 */ 0x82, /* 10000010 */ 0x38, /* 00111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 141 0x8d '' */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x38, /* 00111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 142 0x8e '' */ 0xc6, /* 11000110 */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ /* * 143 0x8f '' */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ /* * 144 0x90 '' */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0xfe, /* 11111110 */ 0xc0, /* 11000000 */ 0xf8, /* 11111000 */ 0xc0, /* 11000000 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ /* * 145 0x91 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ 0xd8, /* 11011000 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ /* * 146 0x92 '' */ 0x3e, /* 00111110 */ 0x6c, /* 01101100 */ 0xcc, /* 11001100 */ 0xfe, /* 11111110 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xce, /* 11001110 */ 0x00, /* 00000000 */ /* * 147 0x93 '' */ 0x7c, /* 01111100 */ 0x82, /* 10000010 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 148 0x94 '' */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 149 0x95 '' */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 150 0x96 '' */ 0x78, /* 01111000 */ 0x84, /* 10000100 */ 0x00, /* 00000000 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 151 0x97 '' */ 0x60, /* 01100000 */ 0x30, /* 00110000 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 152 0x98 '' */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7e, /* 01111110 */ 0x06, /* 00000110 */ 0xfc, /* 11111100 */ /* * 153 0x99 '' */ 0xc6, /* 11000110 */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x6c, /* 01101100 */ 0x38, /* 00111000 */ 0x00, /* 00000000 */ /* * 154 0x9a '' */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 155 0x9b '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 156 0x9c '' */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0x64, /* 01100100 */ 0xf0, /* 11110000 */ 0x60, /* 01100000 */ 0x66, /* 01100110 */ 0xfc, /* 11111100 */ 0x00, /* 00000000 */ /* * 157 0x9d '' */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 158 0x9e '' */ 0xf8, /* 11111000 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xfa, /* 11111010 */ 0xc6, /* 11000110 */ 0xcf, /* 11001111 */ 0xc6, /* 11000110 */ 0xc7, /* 11000111 */ /* * 159 0x9f '' */ 0x0e, /* 00001110 */ 0x1b, /* 00011011 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0xd8, /* 11011000 */ 0x70, /* 01110000 */ 0x00, /* 00000000 */ /* * 160 0xa0 '' */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x78, /* 01111000 */ 0x0c, /* 00001100 */ 0x7c, /* 01111100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 161 0xa1 '' */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x38, /* 00111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 162 0xa2 '' */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 163 0xa3 '' */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 164 0xa4 '' */ 0x76, /* 01110110 */ 0xdc, /* 11011100 */ 0x00, /* 00000000 */ 0xdc, /* 11011100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x00, /* 00000000 */ /* * 165 0xa5 '' */ 0x76, /* 01110110 */ 0xdc, /* 11011100 */ 0x00, /* 00000000 */ 0xe6, /* 11100110 */ 0xf6, /* 11110110 */ 0xde, /* 11011110 */ 0xce, /* 11001110 */ 0x00, /* 00000000 */ /* * 166 0xa6 '' */ 0x3c, /* 00111100 */ 0x6c, /* 01101100 */ 0x6c, /* 01101100 */ 0x3e, /* 00111110 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 167 0xa7 '' */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0x6c, /* 01101100 */ 0x38, /* 00111000 */ 0x00, /* 00000000 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 168 0xa8 '' */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x63, /* 01100011 */ 0x3e, /* 00111110 */ 0x00, /* 00000000 */ /* * 169 0xa9 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xfe, /* 11111110 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 170 0xaa '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xfe, /* 11111110 */ 0x06, /* 00000110 */ 0x06, /* 00000110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 171 0xab '' */ 0x63, /* 01100011 */ 0xe6, /* 11100110 */ 0x6c, /* 01101100 */ 0x7e, /* 01111110 */ 0x33, /* 00110011 */ 0x66, /* 01100110 */ 0xcc, /* 11001100 */ 0x0f, /* 00001111 */ /* * 172 0xac '' */ 0x63, /* 01100011 */ 0xe6, /* 11100110 */ 0x6c, /* 01101100 */ 0x7a, /* 01111010 */ 0x36, /* 00110110 */ 0x6a, /* 01101010 */ 0xdf, /* 11011111 */ 0x06, /* 00000110 */ /* * 173 0xad '' */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ /* * 174 0xae '' */ 0x00, /* 00000000 */ 0x33, /* 00110011 */ 0x66, /* 01100110 */ 0xcc, /* 11001100 */ 0x66, /* 01100110 */ 0x33, /* 00110011 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 175 0xaf '' */ 0x00, /* 00000000 */ 0xcc, /* 11001100 */ 0x66, /* 01100110 */ 0x33, /* 00110011 */ 0x66, /* 01100110 */ 0xcc, /* 11001100 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 176 0xb0 '' */ 0x22, /* 00100010 */ 0x88, /* 10001000 */ 0x22, /* 00100010 */ 0x88, /* 10001000 */ 0x22, /* 00100010 */ 0x88, /* 10001000 */ 0x22, /* 00100010 */ 0x88, /* 10001000 */ /* * 177 0xb1 '' */ 0x55, /* 01010101 */ 0xaa, /* 10101010 */ 0x55, /* 01010101 */ 0xaa, /* 10101010 */ 0x55, /* 01010101 */ 0xaa, /* 10101010 */ 0x55, /* 01010101 */ 0xaa, /* 10101010 */ /* * 178 0xb2 '' */ 0x77, /* 01110111 */ 0xdd, /* 11011101 */ 0x77, /* 01110111 */ 0xdd, /* 11011101 */ 0x77, /* 01110111 */ 0xdd, /* 11011101 */ 0x77, /* 01110111 */ 0xdd, /* 11011101 */ /* * 179 0xb3 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 180 0xb4 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0xf8, /* 11111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 181 0xb5 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0xf8, /* 11111000 */ 0x18, /* 00011000 */ 0xf8, /* 11111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 182 0xb6 '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0xf6, /* 11110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 183 0xb7 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xfe, /* 11111110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 184 0xb8 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xf8, /* 11111000 */ 0x18, /* 00011000 */ 0xf8, /* 11111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 185 0xb9 '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0xf6, /* 11110110 */ 0x06, /* 00000110 */ 0xf6, /* 11110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 186 0xba '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 187 0xbb '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xfe, /* 11111110 */ 0x06, /* 00000110 */ 0xf6, /* 11110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 188 0xbc '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0xf6, /* 11110110 */ 0x06, /* 00000110 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 189 0xbd '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 190 0xbe '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0xf8, /* 11111000 */ 0x18, /* 00011000 */ 0xf8, /* 11111000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 191 0xbf '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xf8, /* 11111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 192 0xc0 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x1f, /* 00011111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 193 0xc1 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 194 0xc2 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 195 0xc3 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x1f, /* 00011111 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 196 0xc4 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 197 0xc5 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0xff, /* 11111111 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 198 0xc6 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x1f, /* 00011111 */ 0x18, /* 00011000 */ 0x1f, /* 00011111 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 199 0xc7 '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x37, /* 00110111 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 200 0xc8 '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x37, /* 00110111 */ 0x30, /* 00110000 */ 0x3f, /* 00111111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 201 0xc9 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x3f, /* 00111111 */ 0x30, /* 00110000 */ 0x37, /* 00110111 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 202 0xca '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0xf7, /* 11110111 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 203 0xcb '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0xf7, /* 11110111 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 204 0xcc '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x37, /* 00110111 */ 0x30, /* 00110000 */ 0x37, /* 00110111 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 205 0xcd '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 206 0xce '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0xf7, /* 11110111 */ 0x00, /* 00000000 */ 0xf7, /* 11110111 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 207 0xcf '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 208 0xd0 '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 209 0xd1 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 210 0xd2 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 211 0xd3 '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x3f, /* 00111111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 212 0xd4 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x1f, /* 00011111 */ 0x18, /* 00011000 */ 0x1f, /* 00011111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 213 0xd5 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x1f, /* 00011111 */ 0x18, /* 00011000 */ 0x1f, /* 00011111 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 214 0xd6 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x3f, /* 00111111 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 215 0xd7 '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0xff, /* 11111111 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 216 0xd8 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0xff, /* 11111111 */ 0x18, /* 00011000 */ 0xff, /* 11111111 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 217 0xd9 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0xf8, /* 11111000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 218 0xda '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x1f, /* 00011111 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 219 0xdb '' */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ /* * 220 0xdc '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ /* * 221 0xdd '' */ 0xf0, /* 11110000 */ 0xf0, /* 11110000 */ 0xf0, /* 11110000 */ 0xf0, /* 11110000 */ 0xf0, /* 11110000 */ 0xf0, /* 11110000 */ 0xf0, /* 11110000 */ 0xf0, /* 11110000 */ /* * 222 0xde '' */ 0x0f, /* 00001111 */ 0x0f, /* 00001111 */ 0x0f, /* 00001111 */ 0x0f, /* 00001111 */ 0x0f, /* 00001111 */ 0x0f, /* 00001111 */ 0x0f, /* 00001111 */ 0x0f, /* 00001111 */ /* * 223 0xdf '' */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 224 0xe0 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x76, /* 01110110 */ 0xdc, /* 11011100 */ 0xc8, /* 11001000 */ 0xdc, /* 11011100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 225 0xe1 '' */ 0x78, /* 01111000 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xd8, /* 11011000 */ 0xcc, /* 11001100 */ 0xc6, /* 11000110 */ 0xcc, /* 11001100 */ 0x00, /* 00000000 */ /* * 226 0xe2 '' */ 0xfe, /* 11111110 */ 0xc6, /* 11000110 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0x00, /* 00000000 */ /* * 227 0xe3 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xfe, /* 11111110 */ 0x6c, /* 01101100 */ 0x6c, /* 01101100 */ 0x6c, /* 01101100 */ 0x6c, /* 01101100 */ 0x00, /* 00000000 */ /* * 228 0xe4 '' */ 0xfe, /* 11111110 */ 0xc6, /* 11000110 */ 0x60, /* 01100000 */ 0x30, /* 00110000 */ 0x60, /* 01100000 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ /* * 229 0xe5 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0xd8, /* 11011000 */ 0xd8, /* 11011000 */ 0xd8, /* 11011000 */ 0x70, /* 01110000 */ 0x00, /* 00000000 */ /* * 230 0xe6 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x7c, /* 01111100 */ 0xc0, /* 11000000 */ /* * 231 0xe7 '' */ 0x00, /* 00000000 */ 0x76, /* 01110110 */ 0xdc, /* 11011100 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ /* * 232 0xe8 '' */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ /* * 233 0xe9 '' */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0xc6, /* 11000110 */ 0x6c, /* 01101100 */ 0x38, /* 00111000 */ 0x00, /* 00000000 */ /* * 234 0xea '' */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x6c, /* 01101100 */ 0x6c, /* 01101100 */ 0xee, /* 11101110 */ 0x00, /* 00000000 */ /* * 235 0xeb '' */ 0x0e, /* 00001110 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0x3e, /* 00111110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 236 0xec '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0xdb, /* 11011011 */ 0xdb, /* 11011011 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 237 0xed '' */ 0x06, /* 00000110 */ 0x0c, /* 00001100 */ 0x7e, /* 01111110 */ 0xdb, /* 11011011 */ 0xdb, /* 11011011 */ 0x7e, /* 01111110 */ 0x60, /* 01100000 */ 0xc0, /* 11000000 */ /* * 238 0xee '' */ 0x1e, /* 00011110 */ 0x30, /* 00110000 */ 0x60, /* 01100000 */ 0x7e, /* 01111110 */ 0x60, /* 01100000 */ 0x30, /* 00110000 */ 0x1e, /* 00011110 */ 0x00, /* 00000000 */ /* * 239 0xef '' */ 0x00, /* 00000000 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ /* * 240 0xf0 '' */ 0x00, /* 00000000 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 241 0xf1 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ /* * 242 0xf2 '' */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ /* * 243 0xf3 '' */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ /* * 244 0xf4 '' */ 0x0e, /* 00001110 */ 0x1b, /* 00011011 */ 0x1b, /* 00011011 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 245 0xf5 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0xd8, /* 11011000 */ 0xd8, /* 11011000 */ 0x70, /* 01110000 */ /* * 246 0xf6 '' */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 247 0xf7 '' */ 0x00, /* 00000000 */ 0x76, /* 01110110 */ 0xdc, /* 11011100 */ 0x00, /* 00000000 */ 0x76, /* 01110110 */ 0xdc, /* 11011100 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 248 0xf8 '' */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0x6c, /* 01101100 */ 0x38, /* 00111000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 249 0xf9 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 250 0xfa '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 251 0xfb '' */ 0x0f, /* 00001111 */ 0x0c, /* 00001100 */ 0x0c, /* 00001100 */ 0x0c, /* 00001100 */ 0xec, /* 11101100 */ 0x6c, /* 01101100 */ 0x3c, /* 00111100 */ 0x1c, /* 00011100 */ /* * 252 0xfc '' */ 0x6c, /* 01101100 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 253 0xfd '' */ 0x78, /* 01111000 */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 254 0xfe '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x3c, /* 00111100 */ 0x3c, /* 00111100 */ 0x3c, /* 00111100 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 255 0xff '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ }; xwelltris-1.0.1/src/sdl/sdlwelldrawing.cxx0100644000175300014110000004021507625410061017216 0ustar leoguys// docm_prefix(///) /**************************************************************************** * Copyright (C) 2002 by Leo Khramov * email: leo@xnc.dubna.su * * 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. ****************************************************************************/ // $Id: sdlwelldrawing.cxx,v 1.4 2003/02/21 11:40:33 leo Exp $ /// module description /// SDL implementation of WellDrawing class - drawing routines for the game. /// Draw field on pixmap, then maps it to the screen. Uses dirty rectangles /// algorithm for mapping areas to screen from pixmap #include "sdlwelldrawing.h" #include "sdlwellengine.h" #include "sdl_gfxprimitives.h" //=========================================================================== /// global SDLWellDrawingEngine() /// constructor of the class - init's variables. /// tags SDLWellDrawingEngine SDLWellDrawingEngine::SDLWellDrawingEngine(SDLWellEngine* myengine) { engine=myengine; if(engine==0) engine=static_cast(default_well_engine); mainw=engine->get_main_window(); colors=engine->get_colors(); RGBA=engine->get_RGBA(); } //=========================================================================== /// global init(int n_fields, int idx, int idy, unsigned il, unsigned ih) /// init fields - creates x pixmaps and gcs /// tags SDLWellDrawingEngine void SDLWellDrawingEngine::init(int inum_fields, int idx, int idy, unsigned int il, unsigned int ih) { int i; SDL_Surface *surface; WellDrawingEngine::init(inum_fields,idx,idy,il,ih); fields=new SDL_Surface*; fg_color=colors[GridColor]; for(i=0;i<1;i++) { #if SDL_BYTEORDER == SDL_BIG_ENDIAN surface = SDL_CreateRGBSurface(SDL_SWSURFACE, l, h, 32, 0xff000000, 0x00ff0000, 0x0000ff00, 0x000000ff); #else surface = SDL_CreateRGBSurface(SDL_SWSURFACE, l, h, 32, 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000); #endif fields[i]=SDL_DisplayFormat(surface); SDL_FreeSurface(surface); if(fields[i]>0) clear_field(i); } bg_color=colors[BackColor]; fg_color=colors[GridColor]; } //=========================================================================== /// global draw_square(int color_idx, int i, int j) /// Draw square (floor polygon) on all fields with given color /// tags SDLWellDrawingEngine void SDLWellDrawingEngine::draw_square(int color, int i, int j) { int idx=current_id,sign_x13,sign_y13,sign_x24,sign_y24; Uint8 *rcolor=&RGBA[color*4]; sign_x13= points[idx].base_points[i+1][j+1].x - points[idx].base_points[i][j].x; sign_x13= sign_x13 ? (sign_x13>0 ? 1 : -1) : 0; sign_y13= points[idx].base_points[i+1][j+1].y - points[idx].base_points[i][j].y; sign_y13= sign_y13 ? (sign_y13>0 ? 1 : -1) : 0; sign_x24= points[idx].base_points[i][j+1].x - points[idx].base_points[i+1][j].x; sign_x24= sign_x24 ? (sign_x24>0 ? 1 : -1) : 0; sign_y24= points[idx].base_points[i][j+1].y - points[idx].base_points[i+1][j].y; sign_y24= sign_y24 ? (sign_y24>0 ? 1 : -1) : 0; trap_x[0] = points[idx].base_points[i][j].x+sign_x13; trap_y[0] = points[idx].base_points[i][j].y+sign_y13; trap_x[1] = points[idx].base_points[i+1][j].x+sign_x24; trap_y[1] = points[idx].base_points[i+1][j].y+sign_y24; trap_x[2] = points[idx].base_points[i+1][j+1].x-sign_x13; trap_y[2] = points[idx].base_points[i+1][j+1].y-sign_y13; trap_x[3] = points[idx].base_points[i][j+1].x-sign_x24; trap_y[3] = points[idx].base_points[i][j+1].y-sign_y24; filledPolygonRGBA(*fields, trap_x, trap_y, MAX_SIDES, rcolor[0], rcolor[1], rcolor[2], rcolor[3] ); //Now draw the grid trap_x[0] = points[idx].base_points[i][j].x; trap_y[0] = points[idx].base_points[i][j].y; trap_x[1] = points[idx].base_points[i+1][j].x; trap_y[1] = points[idx].base_points[i+1][j].y; trap_x[2] = points[idx].base_points[i+1][j+1].x; trap_y[2] = points[idx].base_points[i+1][j+1].y; trap_x[3] = points[idx].base_points[i][j+1].x; trap_y[3] = points[idx].base_points[i][j+1].y; polygonRGBA(*fields, trap_x, trap_y, MAX_SIDES, RGBA[GridColor2*4], RGBA[GridColor2*4+1], RGBA[GridColor2*4+2], RGBA[GridColor2*4+3] ); new_dirty_rec(delta_x,delta_y); dirty_add_xy(trap_x[0],trap_y[0]); dirty_add_xy(trap_x[1],trap_y[1]); dirty_add_xy(trap_x[2],trap_y[2]); dirty_add_xy(trap_x[3],trap_y[3]); finish_dirty_rec(); } //=========================================================================== /// global draw_trapazoid(int color_idx, int i,int j) /// draw trapazoid - wall polygon with given color /// tags SDLWellDrawingEngine void SDLWellDrawingEngine::draw_trapazoid(int color, int i, int j) { SDL_Surface *win=*fields; int idx=current_id,sign_x13,sign_y13,sign_x24,sign_y24; Uint8 *rcolor=&RGBA[color*4]; sign_x13= points[idx].wall_points[i+1][j+1].x - points[idx].wall_points[i][j].x; sign_x13= sign_x13 ? (sign_x13>0 ? 1 : -1) : 0; sign_y13= points[idx].wall_points[i+1][j+1].y - points[idx].wall_points[i][j].y; sign_y13= sign_y13 ? (sign_y13>0 ? 1 : -1) : 0; sign_x24= points[idx].wall_points[i][j+1].x - points[idx].wall_points[i+1][j].x; sign_x24= sign_x24 ? (sign_x24>0 ? 1 : -1) : 0; sign_y24= points[idx].wall_points[i][j+1].y - points[idx].wall_points[i+1][j].y; sign_y24= sign_y24 ? (sign_y24>0 ? 1 : -1) : 0; /* w=i/MASDL_WIDTH; dbgprintf(("trapazoid [%2d][%2d] = [%d - %d],[%d - %d]\n",i,j, points[idx].wall_points[i+1][j+1].x, points[idx].wall_points[i][j].x, points[idx].wall_points[i+1][j+1].y, points[idx].wall_points[i][j].y)); dbgprintf(("trapazoid2[%2d][%2d] = [%d - %d],[%d - %d]\n",i,j, points[idx].wall_points[i][j+1].x, points[idx].wall_points[i+1][j].x, points[idx].wall_points[i][j+1].y, points[idx].wall_points[i+1][j].y)); dbgprintf(("trapazoid [%2d][%2d] = [%d][%d],[%d][%d]\n",i,j, sign_x13,sign_y13,sign_x24,sign_y24)); */ trap_x[0] = points[idx].wall_points[i][j].x+sign_x13; trap_y[0] = points[idx].wall_points[i][j].y+sign_y13; trap_x[1] = points[idx].wall_points[i+1][j].x+sign_x24; trap_y[1] = points[idx].wall_points[i+1][j].y+sign_y24; trap_x[2] = points[idx].wall_points[i+1][j+1].x-sign_x13; trap_y[2] = points[idx].wall_points[i+1][j+1].y-sign_y13; trap_x[3] = points[idx].wall_points[i][j+1].x-sign_x24; trap_y[3] = points[idx].wall_points[i][j+1].y-sign_y24; filledPolygonRGBA(win, trap_x, trap_y, MAX_SIDES, rcolor[0], rcolor[1], rcolor[2], rcolor[3] ); //Now draw the grid trap_x[0] = points[idx].wall_points[i][j].x; trap_y[0] = points[idx].wall_points[i][j].y; trap_x[1] = points[idx].wall_points[i+1][j].x; trap_y[1] = points[idx].wall_points[i+1][j].y; trap_x[2] = points[idx].wall_points[i+1][j+1].x; trap_y[2] = points[idx].wall_points[i+1][j+1].y; trap_x[3] = points[idx].wall_points[i][j+1].x; trap_y[3] = points[idx].wall_points[i][j+1].y; polygonRGBA(win, trap_x, trap_y, MAX_SIDES, RGBA[GridColor*4], RGBA[GridColor*4+1], RGBA[GridColor*4+2], RGBA[GridColor*4+3] ); if(idx==current_id) { new_dirty_rec(delta_x,delta_y); dirty_add_xy(trap_x[0],trap_y[0]); dirty_add_xy(trap_x[1],trap_y[1]); dirty_add_xy(trap_x[2],trap_y[2]); dirty_add_xy(trap_x[3],trap_y[3]); finish_dirty_rec(); } } //=========================================================================== /// global draw_grid() /// draw grid - all wall and floor polygons /// tags SDLWellDrawingEngine void SDLWellDrawingEngine::draw_grid() { int idx,i,j; SDL_Surface* win; idx=current_id; win=*fields; for(i=0;iget_object(); //Here we need to draw dirty rec on the screen -> will be in overloaded childs from[idx].x=drec.get_src_x(); from[idx].y=drec.get_src_y(); from[idx].w=to[idx].w=drec.l; from[idx].h=to[idx].h=drec.h; to[idx].x=drec.get_dest_x(); to[idx].y=drec.get_dest_y(); SDL_BlitSurface(*fields, &from[idx], mainw, &to[idx]); plist->del_self(); delete plist; idx++; } } while(plist); SDL_UpdateRects(mainw, idx, to); delete from; delete to; } //=========================================================================== /// global key_to_action(void* event) /// convert keys to actions in the game /// tags SDLWellDrawingEngine Actions SDLWellDrawingEngine::key_to_action(void* event) { SDL_Event *ev=(SDL_Event*)event; switch(ev->key.keysym.sym) { case SDLK_KP4: case SDLK_LEFT: case SDLK_j: return RIGHT; case SDLK_KP6: case SDLK_RIGHT: case SDLK_l: return LEFT; case SDLK_UP: case SDLK_DOWN: case SDLK_KP5: case SDLK_k: return ROTATE; case SDLK_SPACE: case SDLK_KP0: return DROP; case SDLK_BREAK: case SDLK_PAUSE: case SDLK_p: return PAUSE_GAME; case SDLK_F10: case SDLK_q: case SDLK_ESCAPE: return END_GAME; case SDLK_KP_MULTIPLY: return OUTER_ROTATION; case SDLK_KP_PLUS: return LEVEL_UP; case SDLK_KP_MINUS: return LEVEL_DOWN; } return NOTHING; } //=========================================================================== /// global draw_line(...) /// draw line with given coords and color /// tags SDLWellDrawingEngine void SDLWellDrawingEngine::draw_line(int x1, int y1, int x2, int y2, int color_idx, Canvas where) { Uint8 *color=&RGBA[color_idx*4]; switch(where) { case screen: lineRGBA(mainw,x1,y1,x2,y2, color[0], color[1], color[2], color[3] ); break; case pixmap: lineRGBA(*fields,x1,y1,x2,y2, color[0], color[1], color[2], color[3] ); break; } } //=========================================================================== /// global draw_rect(...) /// draw rectangle with given coords and color /// tags SDLWellDrawingEngine void SDLWellDrawingEngine::draw_rect(int x1, int y1, unsigned int il, unsigned int ih, int color_idx, Canvas where) { Uint8 *color=&RGBA[color_idx*4]; switch(where) { case screen: rectangleRGBA(mainw,x1,y1,x1+il-1,y1+ih-1, color[0], color[1], color[2], color[3] ); flush_field(mainw, x1,y1, il, ih); break; case pixmap: rectangleRGBA(*fields,x1,y1,x1+il-1,y1+ih-1, color[0], color[1], color[2], color[3] ); flush_field(*fields, x1,y1, il, ih); break; } } //=========================================================================== /// global fill_rect(...) /// fill rectangle with given coords and color /// tags SDLWellDrawingEngine void SDLWellDrawingEngine::fill_rect(int x1, int y1, unsigned int il, unsigned int ih, int color_idx, Canvas where) { Uint8 *color=&RGBA[color_idx*4]; switch(where) { case screen: boxRGBA(mainw,x1,y1,x1+il-1,y1+ih-1, color[0], color[1], color[2], color[3] ); flush_field(mainw, x1,y1, il, ih); break; case pixmap: boxRGBA(*fields,x1,y1,x1+il-1,y1+ih-1, color[0], color[1], color[2], color[3] ); flush_field(*fields, x1,y1, il, ih); break; } } //=========================================================================== /// global pixmap_copy(Geo*) /// copy part of image to the screen /// tags SDLWellDrawingEngine void SDLWellDrawingEngine::pixmap_copy(Geo *pgeo) { SDL_Rect src,dest; if(pgeo->im==imNone) return; src.x=pgeo->fromx; src.y=pgeo->fromy; src.w=dest.w=pgeo->l; src.h=dest.h=pgeo->h; dest.x=pgeo->tox; dest.y=pgeo->toy; SDL_BlitSurface(engine->get_pixmap_of_image(pgeo->im), &src, *fields, &dest); SDL_UpdateRects(*fields, 1, &dest); } xwelltris-1.0.1/src/sdl/sdlwelldrawing.h0100644000175300014110000000304307625167665016664 0ustar leoguys// docm_prefix(///) #ifndef SDLWELLDRAWING_H #define SDLWELLDRAWING_H #include "globals.h" #include "SDL.h" #include "welldrawing.h" class SDLWellEngine; struct SDLPoint { int x,y; }; /// module description /// Definition of the SDLWellDrawingEngine class, /// public child from WellDrawingEngine -> engine for drawing game field class SDLWellDrawingEngine:public WellDrawingEngine { protected: SDLWellEngine *engine; SDL_Surface **fields; SDL_Surface *mainw; Uint32 *colors; Uint8 *RGBA; Uint32 bg_color, fg_color; Sint16 trap_x[MAX_SIDES]; Sint16 trap_y[MAX_SIDES]; void flush_field(SDL_Surface* win, int ix, int iy, int il, int ih); public: SDLWellDrawingEngine(SDLWellEngine* myengine); virtual void init(int,int,int,unsigned int,unsigned int); virtual void flush_all(); virtual void flush_dirty(); virtual void field_sync(); virtual void draw_grid(); virtual void draw_square(int color, int i, int j); virtual void draw_trapazoid(int color, int i, int j); virtual void sync(); virtual void clear_field(int i); virtual Actions key_to_action(void* event); virtual void draw_line(int x1, int y1, int x2, int y2, int color_idx, Canvas where=screen); virtual void draw_rect(int x1, int y1, unsigned int il, unsigned int ih, int color_idx, Canvas where=screen); virtual void fill_rect(int x1, int y1, unsigned int il, unsigned int ih, int color_idx, Canvas where=screen); virtual void pixmap_copy(Geo *pgeo); }; #endif xwelltris-1.0.1/src/sdl/sdlwellengine.cxx0100644000175300014110000003046007625410061017031 0ustar leoguys// docm_prefix(///) /**************************************************************************** * Copyright (C) 2002-2003 by Leo Khramov * email: leo@xnc.dubna.su * * 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. ****************************************************************************/ // $Id: sdlwellengine.cxx,v 1.5 2003/02/21 11:40:33 leo Exp $ /// module description /// This module contains methods of class SDLWellEngine which implements SDL calls /// for the game. So this is SDL dependent part. It receives Events, /// make convertions, many initions and calls. #include "version.h" #include "globals.h" #include "sdlwellengine.h" #include "sdlwellimagefont.h" #include "sdlwellinput.h" #include "sdlwelldrawing.h" #include "SDL_image.h" #include "sdl_gfxprimitives.h" #include "commonfuncs.h" //Colors for welltris pieces and grid (x color names) static Uint8 game_color_names[MAX_GAME_COLORS][3] = { /* 0 "Red" */ { 255, 0, 0}, /* 1 "Green" */ { 0,255, 0}, /* 2 "Blue" */ { 0, 0,255}, /* 3 "Yellow" */ { 255,255, 0}, /* 4 "Magenta" */ { 255, 0,255}, /* 5 "Cyan" */ { 0,255,255}, /* 6 "FireBrick" */ { 178, 34, 34}, /* 7 "SpringGreen", */ { 0,255,127}, /* 8 "CornflowerBlue" */ { 100,149,237}, /* 9 "Khaki" */ { 240,230,140}, /*10 "Plum" */ { 221,160,221}, /*11 "Violet" */ { 238,130,238}, /*12 "DarkTurquoise" */ { 0,206,209}, /*13 "Gold" */ { 255,215, 0}, /*14 "Orchid" */ { 218,112,214}, /*15 "Turquoise" */ { 64,224,208}, /*16 "Orange" */ { 255,165, 0}, /*17 "OrangeRed" */ { 255, 69, 0}, /*18 "VioletRed" */ { 208, 32,144}, /*19 "BlueViolet" */ { 138, 43,226}, /*20 "SeaGreen" */ { 46,139, 87}, /*21 "Pink" */ { 255,192,203}, /*22 "ForestGreen" */ { 34,139, 34}, /*23 "SkyBlue" */ { 135,206,235}, /*24 "Coral" */ { 255,127, 80}, /*25 "Wheat" */ { 245,222,179}, /*26 "GoldenRod" */ { 218,165, 32}, /*27 "IndianRed" */ { 205, 92, 92}, /*28 "SpringGreen" */ { 0,255,127}, /*29 "CornflowerBlue" */ { 100,149,237}, /*30 "Thistle" */ { 216,191,216}, /*31 "Aquamarine" */ { 127,255,212}, /*32 "CadetBlue" */ { 95,158,160}, /*33 "LightSteelBlue" */ { 176,196,222}, /*34 "NavyBlue" */ { 0, 0,128}, /*35 "SteelBlue" */ { 70,130,180}, /*36 "YellowGreen" */ { 154,205, 50}, /*37 "DarkViolet" */ { 148, 0,211}, /*38 "MediumSeaGreen" */ { 60,179,113}, /*39 "DarkSlateGray" */ { 47, 79, 79}, /*40 "LightGray" */ { 211,211,211}, /*41 "MediumVioletRed" */ { 199, 21,133}, /*42 "Sienna" */ { 160, 82, 45}, /*43 "MediumAquamarine"*/ { 102,205,170}, /*44 "MediumBlue" */ { 0, 0,205}, /*45 "Navy" */ { 0, 0,128}, /*46 "DarkOliveGreen" */ { 85,107, 47}, /*47 "DarkGreen" */ { 0,100, 0}, /*48 "DimGray" */ { 105,105,105}, /*49 "Tan" */ { 210,180,140}, /*50 "MediumTurquoise" */ { 72,209,204}, /*51 "DarkSlateBlue" */ { 72, 61,139}, /*52 "Maroon" */ { 176, 48, 96}, /*53 "Gray" */ { 190,190,190}, /*54 "#303030" */ {0x30,0x30,0x30}, /*55 "Black" */ { 0, 0, 0}, /*56 "#00aa00" */ { 0,0xaa, 0}, /*56 "#00ee00" */ { 0,0xee, 0}, /*57 "#aa0000" */ {0xaa, 0, 0}, /*58 "#aaaaaa" */ {0xaa,0xaa,0xaa}, /*59 "#cccc00" */ {0xcc,0xcc, 0}, /*60 "#eeee00" */ {0xee,0xee, 0} }; const unsigned long TIMESTEP=5000l; const int KEY_TICKS=5; const int FIRST_KEY_TICKS=25; //=========================================================================== /// global new_well_engine(argc,argv) /// Creates new WellEngine object, SDL realization (create SDLWellEngine) /// tags new_well_engine WellEngine* new_well_engine(int argc, char** argv) { return new SDLWellEngine(argc,argv); } //=========================================================================== /// global SDLWellEngine(argc,argv) /// Constructor of class that incupsulates work with SDL window /// This class must always be allocated through 'new' /// args /// +argc: number of commanline args /// +argv: command line args /// tags SDLWellEngine SDLWellEngine::SDLWellEngine(int argc, char** argv):WellEngine(argc,argv) { if( SDL_Init(SDL_INIT_VIDEO) < 0 ) { fprintf(stderr, "Unable to init SDL: %s\n", SDL_GetError()); exit(1); } init_mainwindow(argc,argv); init_colors(); load_images(); SDL_EnableUNICODE(1); bg_image=0; } //=========================================================================== /// global SDLWellEngine(argc,argv) /// Destructor of class that incupsulates work with SDL window /// tags SDLWellEngine SDLWellEngine::~SDLWellEngine() { SDL_Quit(); } //=========================================================================== /// global init_mainwindow(argc,argv) /// create main game window and all other stuff around it /// tags SDLWellEngine void SDLWellEngine::init_mainwindow(int argc,char **argv) { mainw = SDL_SetVideoMode(mainl, mainh, 16, SDL_ANYFORMAT); if( mainw == 0 ) { fprintf(stderr, "Unable to set %dx%dx16 video: %s\n",mainl, mainh, SDL_GetError()); SDL_Quit(); exit(1); } dbgprintf(("VIDEO_INIT: Set 800x600x%d video mode\n", mainw->format->BitsPerPixel)); } //=========================================================================== /// global show_main() /// show main window /// tags SDLWellEngine void SDLWellEngine::show_main() { SDL_UpdateRect(mainw, 0,0, mainl, mainh); } void SDLWellEngine::set_key_event(SDL_Event& event) { key_event=event; key_event_got=true; process_event_for_all(wEvent(eKeyPress,&key_event)); key_ticks=FIRST_KEY_TICKS; } void SDLWellEngine::reset_key_event() { key_event_got=false; } void SDLWellEngine::process_key_event() { if(key_ticks) { key_ticks--; return; } process_event_for_all(wEvent(eKeyPress,&key_event)); key_ticks=KEY_TICKS; } //=========================================================================== /// global event_loop() /// main event loop - process all events and make game moves /// tags SDLWellEngine void SDLWellEngine::event_loop() { SDL_Event event; MouseEvent mev; done_loop_var=false; key_event_got=false; dbgprintf(("Entered in event_loop\n")); while(!done_loop_var) { while(SDL_PollEvent(&event)) { switch (event.type) { case SDL_VIDEOEXPOSE: dbgprintf(("Got expose event - processing\n")); process_event_for_all(wEvent(eExpose,&event)); break; case SDL_KEYDOWN: dbgprintf(("The '%s' key was pressed!\n", SDL_GetKeyName(event.key.keysym.sym))); set_key_event(event); key_event=event; key_event_got=true; break; case SDL_KEYUP: reset_key_event(); break; case SDL_MOUSEMOTION: mev.mx=event.motion.x; mev.my=event.motion.y; mev.bstate=event.motion.state==SDL_BUTTON_LEFT ? But1Press : But2Press; process_event_for_all(wEvent(eMouseMove,&mev)); dbgprintf(("Mouse moved by to (%d,%d) with state: %d\n", event.motion.x, event.motion.y, event.motion.state)); break; case SDL_MOUSEBUTTONDOWN: dbgprintf(("MouseButtonPress event\n")); mev.mx=event.button.x; mev.my=event.button.y; mev.bstate=event.button.button==SDL_BUTTON_LEFT ? But1Press : But2Press; process_event_for_all(wEvent(eMousePress,&mev)); break; case SDL_QUIT: done_loop_var=true; } } if(key_event_got) process_key_event(); udelay(TIMESTEP); process_time_event(); } } //=========================================================================== /// global wait_for_timers() /// calculate delay and wait for events and timers /// tags SDLWellEngine int SDLWellEngine::wait_for_timers() { return 0; } //=========================================================================== /// global load_image(Images id, char* name) /// Load image into memory and register it with given id for use /// tags SDLWellEngine bool SDLWellEngine::load_image(Images id, char* name) { char buf[L_MAXPATH]; if(id>=MAX_IMAGES) return false; find_full_path_for_file(name,buf); pics[id]=IMG_Load(buf); images[id].id=id; dbgprintf(("Loaded image: %s\n",buf)); return true; } //=========================================================================== /// global set_main_background_image(Images id) /// set image with given id to background of main window /// tags SDLWellEngine void SDLWellEngine::set_main_background_image(Images id) { SDL_Rect dest; if(images[id].id!=imNone) { dest.x = 0; dest.y = 0; dest.w = pics[id]->w; dest.h = pics[id]->h; SDL_BlitSurface(pics[id], 0, mainw, &dest); /* Update the changed portion of the screen */ SDL_UpdateRects(mainw, 1, &dest); bg_image=pics[id]; } } //=========================================================================== /// local init_colors() /// allocate all nessesary colors /// tags SDLWellEngine void SDLWellEngine::init_colors() { int i; for(i=0;iformat, game_color_names[i][0], game_color_names[i][1], game_color_names[i][2], 255); game_RGBA[i*4+0]=game_color_names[i][0]; game_RGBA[i*4+1]=game_color_names[i][1]; game_RGBA[i*4+2]=game_color_names[i][2]; game_RGBA[i*4+3]=255; } } //=========================================================================== /// global new_well_image_font() /// creates image font object - version for SDL Window /// tags SDLWellEngine WellImageFont* SDLWellEngine::new_well_image_font(Images id, unsigned int ifl, unsigned int ifh, int idx, int idy) { return new SDLWellImageFont(id,ifl,ifh,idx,idy); } //=========================================================================== /// global new_well_input(char*) /// creates new input object - version for SDL Window /// tags SDLWellEngine WellInput* SDLWellEngine::new_well_input(char* name) { return new SDLWellInput(name); } //=========================================================================== /// global new_well_drawing_engine() /// creates drawing engine for well board - version for SDL Window /// tags SDLWellEngine WellDrawingEngine* SDLWellEngine::new_well_drawing_engine() { return new SDLWellDrawingEngine(this); } //=========================================================================== /// global udelay(int msec) /// Portable delay :) /// tags XWellEngine void SDLWellEngine::udelay(int msec) { SDL_Delay(msec/1000); } //=========================================================================== /// global screen_copy(Geo*) /// copy part of image to the screen /// tags SDLWellEngine void SDLWellEngine::screen_copy(Geo *pgeo) { SDL_Rect src,dest; if(pgeo->im==imNone) { screen_clear(pgeo); return; } src.x=pgeo->fromx; src.y=pgeo->fromy; src.w=dest.w=pgeo->l; src.h=dest.h=pgeo->h; dest.x=pgeo->tox; dest.y=pgeo->toy; SDL_BlitSurface(pics[pgeo->im], &src, mainw, &dest); SDL_UpdateRects(mainw, 1, &dest); } //=========================================================================== /// global screen_clear(Geo*) /// clear part of screen /// tags SDLWellEngine void SDLWellEngine::screen_clear(Geo *pgeo) { SDL_Rect dest; dest.x=pgeo->tox; dest.y=pgeo->toy; dest.w=pgeo->l; dest.h=pgeo->h; if(!bg_image) SDL_FillRect(mainw, &dest, game_colors[BackColor]); else SDL_BlitSurface(bg_image, &dest, mainw, &dest); SDL_UpdateRects(mainw, 1, &dest); } xwelltris-1.0.1/src/sdl/sdlwellengine.h0100644000175300014110000000315607625167665016503 0ustar leoguys#ifndef SDLWELLENGINE_H #define SDLWELLENGINE_H #include "globals.h" #include "welltris.h" #include "SDL.h" #include "wellengine.h" class SDLWellEngine:public WellEngine { protected: SDL_Surface *mainw; SDL_Surface *pics[MAX_IMAGES]; Uint32 game_colors[MAX_GAME_COLORS]; Uint8 game_RGBA[MAX_GAME_COLORS*4]; SDL_Surface *bg_image; SDL_Event key_event; bool key_event_got; int key_ticks; virtual void init_mainwindow(int,char**); virtual int wait_for_timers(); virtual void init_colors(); void set_key_event(SDL_Event&); void reset_key_event(); void process_key_event(); public: SDLWellEngine(int argc,char** argv); ~SDLWellEngine(); virtual void show_main(); virtual void event_loop(); virtual bool load_image(Images id, char* name); virtual void set_main_background_image(Images id); virtual WellImageFont* new_well_image_font(Images id, unsigned int ifl, unsigned int ifh, int idx, int idy); virtual WellInput* new_well_input(char*); virtual WellDrawingEngine* new_well_drawing_engine(); SDL_Surface* get_pixmap_of_image(Images id) { return pics[id];}; SDL_Surface* get_main_window() { return mainw;}; Uint32* get_colors() { return game_colors;}; Uint8* get_RGBA() { return game_RGBA;}; virtual void udelay(int msec); virtual void screen_copy(Geo*); virtual void screen_clear(Geo*); }; #endif xwelltris-1.0.1/src/sdl/sdlwellimagefont.cxx0100644000175300014110000000577407625167665017572 0ustar leoguys// docm_prefix(///) /**************************************************************************** * Copyright (C) 2002-2003 by Leo Khramov * email: leo@xnc.dubna.su * * 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. ****************************************************************************/ // $Id: sdlwellimagefont.cxx,v 1.2 2003/02/20 15:09:41 leo Exp $ /// module description /// SDL version of imagefont - displays text with SDL calls, work with pixmaps /// loaded thought XWellEngine class #include "sdlwellimagefont.h" //=========================================================================== /// global WellImageFont(Images id, unsigned int ifl, unsigned int ifh, int idx, int idy) /// Constructor of base draw text class /// tags WellImageFont SDLWellImageFont::SDLWellImageFont(Images id, unsigned int ifl, unsigned int ifh, int idx, int idy): WellImageFont(id,ifl,ifh,idx,idy) { engine=(SDLWellEngine*) default_well_engine; font_surf=engine->get_pixmap_of_image(id); mainw=engine->get_main_window(); } //=========================================================================== /// global clear_region() /// clear region on screen for making output /// tags SDLWellImageFont void SDLWellImageFont::clear_region() { SDL_Rect dest; dest.x = screen_x; dest.y = screen_y; dest.w = screen_l; dest.h = screen_h; SDL_FillRect(mainw, &dest, 0); SDL_UpdateRects(mainw, 1, &dest); } //=========================================================================== /// global clear_region() /// clear region on screen for making output /// tags SDLWellImageFont void SDLWellImageFont::clear_region(Colors idx) { SDL_Rect dest; Uint32 *cols=engine->get_colors(); dest.x = screen_x; dest.y = screen_y; dest.w = screen_l; dest.h = screen_h; SDL_FillRect(mainw, &dest, cols[idx]); SDL_UpdateRects(mainw, 1, &dest); } //=========================================================================== /// global draw_symbol(...) /// draw one symbol from font image to screen /// tags SDLWellImageFont void SDLWellImageFont::draw_symbol(int ix, int iy, unsigned int il, unsigned int ih, char symb) { SDL_Rect src,dest; if(symb<=32 || symb>=127) return; symb-=33; //Translate to our indexation dest.x = ix; dest.y = iy; dest.w = il; dest.h = ih; src.x = dx; src.y = dy+(int)symb*font_h; src.w = il; src.h = ih; SDL_BlitSurface(font_surf, &src, mainw, &dest); /* Update the changed portion of the screen */ SDL_UpdateRects(mainw, 1, &dest); } xwelltris-1.0.1/src/sdl/sdlwellimagefont.h0100644000175300014110000000105407624463352017171 0ustar leoguys#ifndef SDLWELLIMAGEFONT_H #define SDLWELLIMAGEFONT_H #include "wellimagefont.h" #include "sdlwellengine.h" class SDLWellImageFont: public WellImageFont { protected: SDLWellEngine *engine; SDL_Surface *font_surf; SDL_Surface *mainw; virtual void draw_symbol(int ix, int iy, unsigned int il, unsigned int ih, char symb); public: SDLWellImageFont(Images id, unsigned int ifl, unsigned int ifh, int idx, int idy); virtual void clear_region(); virtual void clear_region(Colors); }; #endif xwelltris-1.0.1/src/sdl/sdlwellinput.cxx0100644000175300014110000000704007625167665016744 0ustar leoguys// docm_prefix(///) /**************************************************************************** * Copyright (C) 2002-2003 by Leo Khramov * email: leo@xnc.dubna.su * * 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. ****************************************************************************/ // $Id: sdlwellinput.cxx,v 1.2 2003/02/20 15:09:41 leo Exp $ /// module description /// SDL implementation of WellInput class - make input text from user /// display it through WellImageFont, convert SDL Key event to symbols #include "sdlwellinput.h" #include "sdl_gfxprimitives.h" //=========================================================================== /// global SDLWellInput(char*) /// constructor - fill name and get geometry /// tags SDLWellInput SDLWellInput::SDLWellInput(char* iname) : WellInput(iname) { engine=(SDLWellEngine*) default_well_engine; mainw=engine->get_main_window(); } //=========================================================================== /// global process_event(wEvent) /// stub that process events /// tags SDLWellInput bool SDLWellInput::process_event(wEvent ev) { SDL_Event *xev=(SDL_Event*)ev.data; switch(ev.type) { case eKeyPress: process_key(xev); return false; } return true; } //=========================================================================== /// global draw_text() /// draw text on the screen /// tags SDLWellInput void SDLWellInput::draw_text() { fnt->draw_text(buf,buflen,BackColor); show_cursor(); } //=========================================================================== /// global show_cursor() /// draw cursor on the screen /// tags SDLWellInput void SDLWellInput::show_cursor() { SDL_Rect dest; Uint32 *colors=engine->get_colors(); dest.x = geo[1].tox+buflen*FONT2_L; dest.y = geo[1].toy; dest.w = FONT2_L; dest.h = FONT2_H; SDL_FillRect(mainw, &dest, colors[BonusColor2]); SDL_UpdateRects(mainw, 1, &dest); } //=========================================================================== /// global hide_cursor() /// hide cursor on the screen /// tags SDLWellInput void SDLWellInput::hide_cursor() { SDL_Rect dest; Uint32 *colors=engine->get_colors(); dest.x = geo[1].tox+buflen*FONT2_L; dest.y = geo[1].toy; dest.w = FONT2_L; dest.h = FONT2_H; SDL_FillRect(mainw, &dest, colors[BackColor]); SDL_UpdateRects(mainw, 1, &dest); } //=========================================================================== /// global process_key(SDLEvent) /// draw text on the screen /// tags SDLWellInput void SDLWellInput::process_key(SDL_Event *xev) { switch(xev->key.keysym.sym) { case SDLK_RETURN: if(buflen) object_on_enter.call(wEvent(aInputDone,this)); break; case SDLK_DELETE: case SDLK_BACKSPACE: if(buflen>0) { hide_cursor(); buflen--; buf[buflen]=0; draw_text(); } break; default: if(buflenkey.keysym.unicode>=32 && xev->key.keysym.unicode<128) { hide_cursor(); buf[buflen++]=(char)xev->key.keysym.unicode; buf[buflen]=0; draw_text(); } } } xwelltris-1.0.1/src/sdl/sdlwellinput.h0100644000175300014110000000070107625167665016366 0ustar leoguys#ifndef SDLWELLINPUT_H #define SDLWELLINPUT_H #include "wellinput.h" #include "sdlwellengine.h" class SDLWellInput:public WellInput { SDLWellEngine *engine; SDL_Surface *mainw; virtual void draw_text(); void process_key(SDL_Event *xev); void show_cursor(); void hide_cursor(); public: SDLWellInput(char *iname); virtual bool process_event(wEvent); }; #endif xwelltris-1.0.1/src/x11/0040755000175300014110000000000007642314525013307 5ustar leoguysxwelltris-1.0.1/src/x11/xheaders.h0100644000175300014110000000017307624651653015267 0ustar leoguys #include #include #include #include #include xwelltris-1.0.1/src/x11/xwelldrawing.cxx0100644000175300014110000003407707605543562016556 0ustar leoguys// docm_prefix(///) /**************************************************************************** * Copyright (C) 2002 by Leo Khramov * email: leo@xnc.dubna.su * * 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. ****************************************************************************/ // $Id: xwelldrawing.cxx,v 1.1.1.1 2003/01/04 11:37:22 leo Exp $ /// module description /// X11 implementation of WellDrawing class - drawing routines for the game. /// Draw field on pixmap, then maps it to the screen. Uses dirty rectangles /// algorithm for mapping areas to screen from pixmap #include "xwelldrawing.h" #include "xwellengine.h" //=========================================================================== /// global XWellDrawingEngine() /// constructor of the class - init's variables. /// tags XWellDrawingEngine XWellDrawingEngine::XWellDrawingEngine(XWellEngine* myengine) { xengine=myengine; if(xengine==0) xengine=static_cast(default_well_engine); mainw=xengine->get_main_window(); colors=xengine->get_colors(); scr=DefaultScreen(disp); } //=========================================================================== /// global init(int n_fields, int idx, int idy, unsigned il, unsigned ih) /// init fields - creates x pixmaps and gcs /// tags XWellDrawingEngine void XWellDrawingEngine::init(int inum_fields, int idx, int idy, unsigned int il, unsigned int ih) { int i; WellDrawingEngine::init(inum_fields,idx,idy,il,ih); fields=new Pixmap; gcs=new GC; maingc=XCreateGC(disp,mainw,0,0); XSetBackground(disp,maingc,colors[BackColor]); XSetForeground(disp,maingc,colors[GridColor]); XSetGraphicsExposures(disp,maingc,False); for(i=0;i<1;i++) { fields[i]=XCreatePixmap(disp,mainw,l,h,DefaultDepth(disp,scr)); if(fields[i]>0) { gcs[i]=XCreateGC(disp,fields[i],0,0); XSetBackground(disp,gcs[i],colors[FreezeColor]); clear_field(i); } } } //=========================================================================== /// global draw_square(int color_idx, int i, int j) /// Draw square (floor polygon) on all fields with given color /// tags XWellDrawingEngine void XWellDrawingEngine::draw_square(int color, int i, int j) { int idx=current_id,sign_x13,sign_y13,sign_x24,sign_y24; XSetForeground(disp,*gcs,colors[color]); sign_x13= points[idx].base_points[i+1][j+1].x - points[idx].base_points[i][j].x; sign_x13= sign_x13 ? (sign_x13>0 ? 1 : -1) : 0; sign_y13= points[idx].base_points[i+1][j+1].y - points[idx].base_points[i][j].y; sign_y13= sign_y13 ? (sign_y13>0 ? 1 : -1) : 0; sign_x24= points[idx].base_points[i][j+1].x - points[idx].base_points[i+1][j].x; sign_x24= sign_x24 ? (sign_x24>0 ? 1 : -1) : 0; sign_y24= points[idx].base_points[i][j+1].y - points[idx].base_points[i+1][j].y; sign_y24= sign_y24 ? (sign_y24>0 ? 1 : -1) : 0; trapazoid_list[0].x = points[idx].base_points[i][j].x+sign_x13; trapazoid_list[0].y = points[idx].base_points[i][j].y+sign_y13; trapazoid_list[1].x = points[idx].base_points[i+1][j].x+sign_x24; trapazoid_list[1].y = points[idx].base_points[i+1][j].y+sign_y24; trapazoid_list[2].x = points[idx].base_points[i+1][j+1].x-sign_x13; trapazoid_list[2].y = points[idx].base_points[i+1][j+1].y-sign_y13; trapazoid_list[3].x = points[idx].base_points[i][j+1].x-sign_x24; trapazoid_list[3].y = points[idx].base_points[i][j+1].y-sign_y24; XFillPolygon (disp, *fields, *gcs, trapazoid_list, MAX_SIDES, Convex, CoordModeOrigin); //Now draw the grid trapazoid_list[0].x = points[idx].base_points[i][j].x; trapazoid_list[0].y = points[idx].base_points[i][j].y; trapazoid_list[1].x = points[idx].base_points[i+1][j].x; trapazoid_list[1].y = points[idx].base_points[i+1][j].y; trapazoid_list[2].x = points[idx].base_points[i+1][j+1].x; trapazoid_list[2].y = points[idx].base_points[i+1][j+1].y; trapazoid_list[3].x = points[idx].base_points[i][j+1].x; trapazoid_list[3].y = points[idx].base_points[i][j+1].y; XSetForeground(disp,*gcs,colors[GridColor2]); XDrawLines(disp, *fields, *gcs, trapazoid_list, MAX_SIDES, CoordModeOrigin); new_dirty_rec(delta_x,delta_y); dirty_add_xy(trapazoid_list[0].x,trapazoid_list[0].y); dirty_add_xy(trapazoid_list[1].x,trapazoid_list[1].y); dirty_add_xy(trapazoid_list[2].x,trapazoid_list[2].y); dirty_add_xy(trapazoid_list[3].x,trapazoid_list[3].y); finish_dirty_rec(); } //=========================================================================== /// global draw_trapazoid(int color_idx, int i,int j) /// draw trapazoid - wall polygon with given color /// tags XWellDrawingEngine void XWellDrawingEngine::draw_trapazoid(int color, int i, int j) { Window win; GC gc; int idx=current_id,w,sign_x13,sign_y13,sign_x24,sign_y24; unsigned long rcolor=colors[color]; win=*fields; gc=*gcs; XSetForeground(disp,gc,rcolor); sign_x13= points[idx].wall_points[i+1][j+1].x - points[idx].wall_points[i][j].x; sign_x13= sign_x13 ? (sign_x13>0 ? 1 : -1) : 0; sign_y13= points[idx].wall_points[i+1][j+1].y - points[idx].wall_points[i][j].y; sign_y13= sign_y13 ? (sign_y13>0 ? 1 : -1) : 0; sign_x24= points[idx].wall_points[i][j+1].x - points[idx].wall_points[i+1][j].x; sign_x24= sign_x24 ? (sign_x24>0 ? 1 : -1) : 0; sign_y24= points[idx].wall_points[i][j+1].y - points[idx].wall_points[i+1][j].y; sign_y24= sign_y24 ? (sign_y24>0 ? 1 : -1) : 0; /* w=i/MAX_WIDTH; dbgprintf(("trapazoid [%2d][%2d] = [%d - %d],[%d - %d]\n",i,j, points[idx].wall_points[i+1][j+1].x, points[idx].wall_points[i][j].x, points[idx].wall_points[i+1][j+1].y, points[idx].wall_points[i][j].y)); dbgprintf(("trapazoid2[%2d][%2d] = [%d - %d],[%d - %d]\n",i,j, points[idx].wall_points[i][j+1].x, points[idx].wall_points[i+1][j].x, points[idx].wall_points[i][j+1].y, points[idx].wall_points[i+1][j].y)); dbgprintf(("trapazoid [%2d][%2d] = [%d][%d],[%d][%d]\n",i,j, sign_x13,sign_y13,sign_x24,sign_y24)); */ trapazoid_list[0].x = points[idx].wall_points[i][j].x+sign_x13; trapazoid_list[0].y = points[idx].wall_points[i][j].y+sign_y13; trapazoid_list[1].x = points[idx].wall_points[i+1][j].x+sign_x24; trapazoid_list[1].y = points[idx].wall_points[i+1][j].y+sign_y24; trapazoid_list[2].x = points[idx].wall_points[i+1][j+1].x-sign_x13; trapazoid_list[2].y = points[idx].wall_points[i+1][j+1].y-sign_y13; trapazoid_list[3].x = points[idx].wall_points[i][j+1].x-sign_x24; trapazoid_list[3].y = points[idx].wall_points[i][j+1].y-sign_y24; XFillPolygon (disp, win, gc, trapazoid_list, MAX_SIDES, Convex, CoordModeOrigin); //Now draw the grid trapazoid_list[0].x = points[idx].wall_points[i][j].x; trapazoid_list[0].y = points[idx].wall_points[i][j].y; trapazoid_list[1].x = points[idx].wall_points[i+1][j].x; trapazoid_list[1].y = points[idx].wall_points[i+1][j].y; trapazoid_list[2].x = points[idx].wall_points[i+1][j+1].x; trapazoid_list[2].y = points[idx].wall_points[i+1][j+1].y; trapazoid_list[3].x = points[idx].wall_points[i][j+1].x; trapazoid_list[3].y = points[idx].wall_points[i][j+1].y; XSetForeground(disp,gc,colors[GridColor]); XDrawLines(disp, win, gc, trapazoid_list, MAX_SIDES, CoordModeOrigin); if(idx==current_id) { new_dirty_rec(delta_x,delta_y); dirty_add_xy(trapazoid_list[0].x,trapazoid_list[0].y); dirty_add_xy(trapazoid_list[1].x,trapazoid_list[1].y); dirty_add_xy(trapazoid_list[2].x,trapazoid_list[2].y); dirty_add_xy(trapazoid_list[3].x,trapazoid_list[3].y); finish_dirty_rec(); } } //=========================================================================== /// global draw_grid() /// draw grid - all wall and floor polygons /// tags XWellDrawingEngine void XWellDrawingEngine::draw_grid() { int idx,i,j,k; Window win; GC gc; idx=current_id; gc=*gcs; win=*fields; XSetForeground(disp,gc,colors[GridColor]); for(i=0;iget_object(); //Here we need to draw dirty rec on the screen -> will be in overloaded childs XCopyArea(disp,win,mainw,maingc,drec.get_src_x(),drec.get_src_y(), drec.l,drec.h, drec.get_dest_x(),drec.get_dest_y()); plist->del_self(); delete plist; } } while(plist); XFlush(disp); } //=========================================================================== /// global key_to_action(void* event) /// convert keys to actions in the game /// tags XWellDrawingEngine Actions XWellDrawingEngine::key_to_action(void* event) { XEvent *ev=(XEvent*)event; KeySym ks; ks=XLookupKeysym(&ev->xkey, 0); switch(ks) { case XK_KP_Left: case XK_KP_4: case XK_Left: case XK_j: case XK_J: return RIGHT; case XK_KP_Right: case XK_KP_6: case XK_Right: case XK_l: case XK_L: return LEFT; case XK_Up: case XK_Down: case XK_KP_Begin: case XK_KP_5: case XK_k: case XK_K: return ROTATE; case XK_space: case XK_KP_0: case XK_KP_Insert: return DROP; case XK_Pause: case XK_p: case XK_P: return PAUSE_GAME; case XK_F10: case XK_q: case XK_Q: case XK_Escape: return END_GAME; case XK_KP_Multiply: return OUTER_ROTATION; case XK_KP_Add: return LEVEL_UP; case XK_KP_Subtract: return LEVEL_DOWN; } return NOTHING; } //=========================================================================== /// global draw_line(...) /// draw line with given coords and color /// tags XWellDrawingEngine void XWellDrawingEngine::draw_line(int x1, int y1, int x2, int y2, int color_idx, Canvas where) { switch(where) { case screen: XSetForeground(disp,maingc,colors[color_idx]); XDrawLine(disp,mainw,maingc,x1,y1,x2,y2); break; case pixmap: XSetForeground(disp,*gcs,colors[color_idx]); XDrawLine(disp,*fields,*gcs,x1,y1,x2,y2); break; } } //=========================================================================== /// global draw_rect(...) /// draw rectangle with given coords and color /// tags XWellDrawingEngine void XWellDrawingEngine::draw_rect(int x1, int y1, unsigned int il, unsigned int ih, int color_idx, Canvas where) { switch(where) { case screen: XSetForeground(disp,maingc,colors[color_idx]); XDrawRectangle(disp,mainw,maingc,x1,y1,il,ih); break; case pixmap: XSetForeground(disp,*gcs,colors[color_idx]); XDrawRectangle(disp,*fields,*gcs,x1,y1,il,ih); break; } } //=========================================================================== /// global fill_rect(...) /// fill rectangle with given coords and color /// tags XWellDrawingEngine void XWellDrawingEngine::fill_rect(int x1, int y1, unsigned int il, unsigned int ih, int color_idx, Canvas where) { switch(where) { case screen: XSetForeground(disp,maingc,colors[color_idx]); XFillRectangle(disp,mainw,maingc,x1,y1,il,ih); break; case pixmap: XSetForeground(disp,*gcs,colors[color_idx]); XFillRectangle(disp,*fields,*gcs,x1,y1,il,ih); break; } } //=========================================================================== /// global pixmap_copy(Geo*) /// copy part of image to the screen /// tags XWellDrawingEngine void XWellDrawingEngine::pixmap_copy(Geo *pgeo) { if(pgeo->im==imNone) return; XCopyArea(disp,xengine->get_pixmap_of_image(pgeo->im),*fields,*gcs, pgeo->fromx,pgeo->fromy,pgeo->l,pgeo->h, pgeo->tox,pgeo->toy); } xwelltris-1.0.1/src/x11/xwelldrawing.h0100644000175300014110000000252707605543562016176 0ustar leoguys// docm_prefix(///) #ifndef XWELLDRAWING_H #define XWELLDRAWING_H #include "globals.h" #include "xheaders.h" #include "welldrawing.h" class XWellEngine; /// module description /// Definition of the XWellDrawingEngine class, /// public child from WellDrawingEngine -> engine for drawing game field class XWellDrawingEngine:public WellDrawingEngine { protected: XWellEngine *xengine; Pixmap *fields; GC *gcs,maingc; Window mainw; unsigned long *colors; int scr; XPoint trapazoid_list[MAX_SIDES]; public: XWellDrawingEngine(XWellEngine* myengine); virtual void init(int,int,int,unsigned int,unsigned int); virtual void flush_all(); virtual void flush_dirty(); virtual void draw_grid(); virtual void draw_square(int color, int i, int j); virtual void draw_trapazoid(int color, int i, int j); virtual void sync(); virtual void clear_field(int i); virtual Actions key_to_action(void* event); virtual void draw_line(int x1, int y1, int x2, int y2, int color_idx, Canvas where=screen); virtual void draw_rect(int x1, int y1, unsigned int il, unsigned int ih, int color_idx, Canvas where=screen); virtual void fill_rect(int x1, int y1, unsigned int il, unsigned int ih, int color_idx, Canvas where=screen); virtual void pixmap_copy(Geo *pgeo); }; #endif xwelltris-1.0.1/src/x11/xwellengine.cxx0100644000175300014110000003772007625167665016376 0ustar leoguys// docm_prefix(///) /**************************************************************************** * Copyright (C) 2002 by Leo Khramov * email: leo@xnc.dubna.su * * 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. ****************************************************************************/ // $Id: xwellengine.cxx,v 1.3 2003/02/20 15:09:41 leo Exp $ /// module description /// This module contains methods of class XWellEngine which implements X11 calls /// for the game. So this is X11 dependent part. It receives XEvents, /// make convertions, many initions and calls. #include "version.h" #include "globals.h" #include "xwellengine.h" #include "xwellinput.h" #include "image/image.h" #include "bilist.h" #include "commonfuncs.h" #include "wellclass.h" Display *disp; Colormap defcmp; const unsigned long TIMESTEP=10000l; //Colors for welltris pieces and grid (x color names) static char *game_color_names[MAX_GAME_COLORS] = { /* 0*/ "Red", /* 1*/ "Green", /* 2*/ "Blue", /* 3*/ "Yellow", /* 4*/ "Magenta", /* 5*/ "Cyan", /* 6*/ "FireBrick", /* 7*/ "SpringGreen", /* 8*/ "CornflowerBlue", /* 9*/ "Khaki", /*10*/ "Plum", /*11*/ "Violet", /*12*/ "DarkTurquoise", /*13*/ "Gold", /*14*/ "Orchid", /*15*/ "Turquoise", /*16*/ "Orange", /*17*/ "OrangeRed", /*18*/ "VioletRed", /*19*/ "BlueViolet", /*20*/ "SeaGreen", /*21*/ "Pink", /*22*/ "ForestGreen", /*23*/ "SkyBlue", /*24*/ "Coral", /*25*/ "Wheat", /*26*/ "GoldenRod", /*27*/ "IndianRed", /*28*/ "SpringGreen", /*29*/ "CornflowerBlue", /*30*/ "Thistle", /*31*/ "Aquamarine", /*32*/ "CadetBlue", /*33*/ "LightSteelBlue", /*34*/ "NavyBlue", /*35*/ "SteelBlue", /*36*/ "YellowGreen", /*37*/ "DarkViolet", /*38*/ "MediumSeaGreen", /*39*/ "DarkSlateGray", /*40*/ "LightGray", /*41*/ "MediumVioletRed", /*42*/ "Sienna", /*43*/ "MediumAquamarine", /*44*/ "MediumBlue", /*45*/ "Navy", /*46*/ "DarkOliveGreen", /*47*/ "DarkGreen", /*48*/ "DimGray", /*49*/ "Tan", /*50*/ "MediumTurquoise", /*51*/ "DarkSlateBlue", /*52*/ "Maroon", /*53*/ "Gray", /*54*/ "#303030", /*55*/ "Black", /*56*/ "#00aa00", /*56*/ "#00ee00", /*57*/ "#aa0000", /*58*/ "#aaaaaa", /*59*/ "#cccc00", /*60*/ "#eeee00" }; //=========================================================================== /// global new_well_engine(argc,argv) /// Creates new WellEngine object, X11 realization (create XWellEngine) /// tags new_well_engine WellEngine* new_well_engine(int argc, char** argv) { return new XWellEngine(argc,argv); } //=========================================================================== /// global XWellEngine(argc,argv) /// Constructor of class that incupsulates work with X window /// This class must always be allocated through 'new' /// args /// +argc: number of commanline args /// +argv: command line args /// tags XWellEngine XWellEngine::XWellEngine(int argc, char** argv):WellEngine(argc,argv) { int i; char *dispchr=0; for(i=1;iflags=(USSize | PSize | PMinSize | PMaxSize); pxsh->height=mainh; pxsh->width=mainl; pxsh->min_width=pxsh->width; pxsh->min_height=pxsh->height; pxsh->max_width=pxsh->width; pxsh->max_height=pxsh->height; mainw=XCreateSimpleWindow(disp,DefaultRootWindow(disp), 0,0,pxsh->width,pxsh->height, 0,whitepixel,blackpixel); if((pch=XAllocClassHint())==NULL) { fprintf(stderr,"xwelltris: Error allocating ClassHint\n"); exit(1); } pch->res_name="xwelltris"; pch->res_class="XWELLTRIS"; if(XStringListToTextProperty(&winname,1,&wname)==0) { fprintf(stderr,"xwelltris: Error creating TextProperty\n"); exit(1); } if(XStringListToTextProperty(&pch->res_name,1,&iname)==0) { fprintf(stderr,"xwelltris: Error creating TextProperty\n"); exit(1); } if((pxwmh=XAllocWMHints())==NULL) { fprintf(stderr,"welltris: Error allocating WMHints\n"); exit(0); } pxwmh->flags=(InputHint|StateHint); pxwmh->input=True; pxwmh->initial_state=NormalState; XSetWMProperties(disp,mainw,&wname,&iname,argv,argc,pxsh,pxwmh,pch); gcv.foreground=whitepixel; gcv.background=blackpixel; maingc=XCreateGC(disp,mainw,(GCForeground | GCBackground),&gcv); xswa.colormap=defcmp; xswa.bit_gravity=CenterGravity; XChangeWindowAttributes(disp,mainw,(CWColormap | CWBitGravity),&xswa); XSelectInput(disp,mainw, ExposureMask | FocusChangeMask | StructureNotifyMask | KeyPressMask | ButtonPressMask | PointerMotionMask | ButtonReleaseMask | FocusChangeMask); wmDeleteWindow = XInternAtom(disp, "WM_DELETE_WINDOW", False); XSetWMProtocols(disp, mainw, &wmDeleteWindow, 1); XSetGraphicsExposures(disp,maingc,False); } //=========================================================================== /// global show_main() /// show main window /// tags XWellEngine void XWellEngine::show_main() { XMapRaised(disp,mainw); XFlush(disp); } //=========================================================================== /// global load_image(Images id, char* name) /// Load image into memory and register it with given id for use /// tags XWellEngine bool XWellEngine::load_image(Images id, char* name) { char buf[L_MAXPATH]; if(id>=MAX_IMAGES) return false; find_full_path_for_file(name,buf); image_pixmaps[id]=LoadPixmap(buf,F_AUTO,images[id].l,images[id].h,CMP_OWN); images[id].id=id; return true; } //=========================================================================== /// global screen_copy(Geo*) /// copy part of image to the screen /// tags XWellEngine void XWellEngine::screen_copy(Geo *pgeo) { if(pgeo->im==imNone) { screen_clear(pgeo); return; } XCopyArea(disp,image_pixmaps[pgeo->im],mainw,maingc, pgeo->fromx,pgeo->fromy,pgeo->l,pgeo->h, pgeo->tox,pgeo->toy); } //=========================================================================== /// global screen_clear(Geo*) /// clear part of screen /// tags XWellEngine void XWellEngine::screen_clear(Geo *pgeo) { XClearArea(disp,mainw,pgeo->tox,pgeo->toy,pgeo->l,pgeo->h,False); } //=========================================================================== /// global set_main_background_image(Images id) /// set image with given id to background of main window /// tags XWellEngine void XWellEngine::set_main_background_image(Images id) { if(images[id].id!=imNone) { XSetWindowBackgroundPixmap(disp,mainw, image_pixmaps[id]); XClearWindow(disp,mainw); } } //=========================================================================== /// global event_loop() /// main event loop - process all events and make game moves /// tags XWellEngine void XWellEngine::event_loop() { MouseEvent mev; struct timezone tzone; int count=0; done_loop_var=false; dbgprintf(("Entered in event_loop\n")); gettimeofday(&now, &tzone); gettimeofday(&nexttime, &tzone); while(!done_loop_var) { if(wait_for_timers()==0) //Time out { process_time_event(); } if(XPending(disp)) { dbgprintf(("Got xevent: %d for window 0x%x\n",xev.type,xev.xany.window)); XNextEvent(disp,&xev); switch(xev.type) { case Expose: dbgprintf(("Expose event\n")); process_event_for_all(wEvent(eExpose,&xev)); break; case KeyPress: dbgprintf(("KeyPressed event\n")); process_event_for_all(wEvent(eKeyPress,&xev)); break; case ButtonPress: dbgprintf(("MouseButtonPress event\n")); mev.mx=xev.xbutton.x; mev.my=xev.xbutton.y; mev.bstate=xev.xbutton.button==Button1 ? But1Press : But2Press; process_event_for_all(wEvent(eMousePress,&mev)); break; case MotionNotify: dbgprintf(("MouseMotion event\n")); mev.mx=xev.xmotion.x; mev.my=xev.xmotion.y; mev.bstate=xev.xbutton.button==Button1 ? But1Press : But2Press; process_event_for_all(wEvent(eMouseMove,&mev)); break; case ClientMessage: dbgprintf(("ClientMessage event\n")); if (xev.xclient.format == 32 && xev.xclient.data.l[0] == wmDeleteWindow) { dbgprintf(("Got WM_DELETE_WINDOW\n")); process_event_for_all(wEvent(eDelete)); done_loop_var=true; } break; case FocusOut: dbgprintf(("FocusOut event\n")); process_event_for_all(wEvent(eFocusOut)); break; } } } dbgprintf(("Exiting from event_loop\n")); } //=========================================================================== /// global wait_for_timers() /// calculate delay and wait for events and timers /// tags XWellEngine int XWellEngine::wait_for_timers() { struct timeval delayt; struct timezone tzone; int ret=0; fd_set writefd, exceptfd, readfd; FD_ZERO(&writefd); FD_ZERO(&exceptfd); FD_ZERO(&readfd); FD_SET(xcon, &readfd); gettimeofday(&now, &tzone); delayt.tv_sec = nexttime.tv_sec - now.tv_sec; delayt.tv_usec = nexttime.tv_usec - now.tv_usec; correct_to_real_time(delayt); if (((long) delayt.tv_sec > 0) || (((long) delayt.tv_sec == 0) && ((long) delayt.tv_usec > 0))) { ret=select(xcon + 1, &readfd, &writefd, &exceptfd, &delayt); } if(ret==0) //Timed out gettimeofday(&now, &tzone); nexttime.tv_sec=now.tv_sec; nexttime.tv_usec=now.tv_usec + TIMESTEP; correct_to_real_time(nexttime); return ret; } //=========================================================================== /// global correct_to_real_time(struct timeval&) /// corrects timval to real values /// tags XWellEngine void XWellEngine::correct_to_real_time(struct timeval& tv) { while (tv.tv_usec < 0) { tv.tv_sec --; tv.tv_usec += MILLION; } while (tv.tv_usec >= MILLION) { tv.tv_sec ++; tv.tv_usec -= MILLION; } } //=========================================================================== /// global udelay(int msec) /// Unix portable delay :) /// tags XWellEngine void XWellEngine::udelay(int msec) { struct timeval tout; tout.tv_sec=0; tout.tv_usec=msec; select(0,0,0,0,&tout); } //=========================================================================== /// local init_colors() /// allocate all nessesary colors /// tags XWellEngine void XWellEngine::init_colors() { XColor tmp; int i; colormap=im_get_colormap(); if(!colormap) colormap=defcmp; else XSetWindowColormap(disp,mainw,colormap); for(i=COLOR_DELTA;iget_pixmap_of_image(id); mainw=xengine->get_main_window(); maingc=xengine->get_main_gc(); } //=========================================================================== /// global clear_region() /// clear region on screen for making output /// tags XWellImageFont void XWellImageFont::clear_region() { XClearArea(disp,mainw,screen_x,screen_y,screen_l,screen_h,False); } //=========================================================================== /// global clear_region() /// clear region on screen for making output /// tags XWellImageFont void XWellImageFont::clear_region(Colors idx) { unsigned long *cols=xengine->get_colors(); XSetForeground(disp,maingc,cols[idx]); XFillRectangle(disp,mainw,maingc,screen_x,screen_y,screen_l,screen_h); } //=========================================================================== /// global draw_symbol(...) /// draw one symbol from font image to screen /// tags XWellImageFont void XWellImageFont::draw_symbol(int ix, int iy, unsigned int il, unsigned int ih, char symb) { if(symb<=32 || symb>=127) return; symb-=33; //Translate to our indexation XCopyArea(disp,font_pixmap,mainw,maingc, dx,dy+(int)symb*font_h, il,ih,ix,iy); } xwelltris-1.0.1/src/x11/xwellimagefont.h0100644000175300014110000000104507605543562016506 0ustar leoguys#ifndef XWELLIMAGEFONT_H #define XWELLIMAGEFONT_H #include "wellimagefont.h" #include "xwellengine.h" class XWellImageFont: public WellImageFont { protected: Pixmap font_pixmap; XWellEngine *xengine; Window mainw; GC maingc; virtual void draw_symbol(int ix, int iy, unsigned int il, unsigned int ih, char symb); public: XWellImageFont(Images id, unsigned int ifl, unsigned int ifh, int idx, int idy); virtual void clear_region(); virtual void clear_region(Colors); }; #endif xwelltris-1.0.1/src/x11/xwellinput.cxx0100644000175300014110000000543207605543562016253 0ustar leoguys// docm_prefix(///) /**************************************************************************** * Copyright (C) 2002 by Leo Khramov * email: leo@xnc.dubna.su * * 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. ****************************************************************************/ // $Id: xwellinput.cxx,v 1.1.1.1 2003/01/04 11:37:22 leo Exp $ /// module description /// X11 implementation of WellInput class - make input text from user /// display it through WellImageFont, convert X11 Key event to symbols #include "xwellinput.h" #include "xwellengine.h" //=========================================================================== /// global XWellInput(char*) /// constructor - fill name and get geometry /// tags XWellInput XWellInput::XWellInput(char* iname) : WellInput(iname) { xengine=(XWellEngine*) default_well_engine; mainw=xengine->get_main_window(); maingc=xengine->get_main_gc(); } //=========================================================================== /// global process_event(wEvent) /// stub that process events /// tags XWellInput bool XWellInput::process_event(wEvent ev) { XEvent *xev=(XEvent*)ev.data; switch(ev.type) { case eKeyPress: process_key(xev); return false; } return true; } //=========================================================================== /// global draw_text() /// draw text on the screen /// tags XWellInput void XWellInput::draw_text() { unsigned long *colors=xengine->get_colors(); fnt->draw_text(buf,buflen,BackColor); XSetForeground(disp,maingc,colors[BonusColor2]); XFillRectangle(disp,mainw,maingc,geo[1].tox+buflen*FONT2_L,geo[1].toy, FONT2_L,FONT2_H); } //=========================================================================== /// global process_key(XEvent) /// draw text on the screen /// tags XWellInput void XWellInput::process_key(XEvent *xev) { KeySym ks; XComposeStatus cs; char sym[4]=""; XLookupString(&xev->xkey, sym, 4, &ks, &cs); switch(ks) { case XK_Return: if(buflen) object_on_enter.call(wEvent(aInputDone,this)); break; case XK_Delete: case XK_BackSpace: if(buflen>0) { buflen--; buf[buflen]=0; draw_text(); } break; default: if(buflen=32 && sym[0]<127) { buf[buflen++]=sym[0]; buf[buflen]=0; draw_text(); } } } xwelltris-1.0.1/src/x11/xwellinput.h0100644000175300014110000000063607605543562015701 0ustar leoguys#ifndef XWELLINPUT_H #define XWELLINPUT_H #include "wellinput.h" #include "xheaders.h" #include "xwellengine.h" class XWellInput:public WellInput { XWellEngine *xengine; Window mainw; GC maingc; virtual void draw_text(); void process_key(XEvent *xev); public: XWellInput(char *iname); virtual bool process_event(wEvent); }; #endif