Codebase list bumprace / d3b5e37
Import Upstream version 1.5.2 Christian T. Steigies 5 years ago
17 changed file(s) with 648 addition(s) and 236 deletion(s). Raw diff Collapse all Expand all
11
22 Graphics and code by KARL BARTEL:
33 E-mail: karlb@gmx.net
4 Homepage: http://members.linuxstart.com/~karlb/
4 Homepage: http://www.linux-games.com
55
66 Particle code, ideas and other support by LION KIMBRO:
77 E-mail: SnowLion@sprynet.com
1515 Second level set by MEHDI YOUSFI-MONOD
1616 E-mail: tuxmym@gmail.com
1717
18 Backgounds grabbed from the "eterm-backgrounds_1.0-1.deb" the authors say about
19 it:
20 "NONE of these images are original work by either of the Eterm authors; they
21 have all been collected from various sites on the web. As far as I know, they
22 are all freely available for use.
23 However, should any person who can provide proof of ownership of any of these
24 pictures object to their inclusion, they will be IMMEDIATELY withdrawn. No
25 copyright infringement is intended. Inclusion here should be taken as a
26 compliment. :-)"
18 Background image by TOZZIE:
19 Homepage: http://www.tozzie-designs.com/
0 Version 1.5.2
1 -new background picture (thanks tozzie!)
2 -players collide in two player mode (thanks Christoph Sommer)
3 -minor fixes and cleanups (thanks Martin Michlmayr, Christoph Sommer)
4 -improved backspace handling in text input (fixes problem under Mac OS X)
5
06 Version 1.5.1
17 -updated autoconf files
28 -improved second level set and fixed a bug concerning alternate level
410 -removed more warnings
511 -fade in should behave identical on all systems now
612 -removed SDL_Image files from source and added SDL_Image as external dep
7 -slighly change configure.in
13 -slighly changed configure.in
814
915 Version 1.5.0
1016 -replaced old fadeout by a new one, which should be fast enough on every
2929
3030 --------------------------------< PARAMETER >-----------------------------------
3131
32 "--levelset 1" selects an alternative, hard level set
3233 "--nofullscreen" "-f" guess
3334 "--nosound" "-s" guess again
3435 "--notfinal" "-n" no title screen (nice for develolopers)
15451545
15461546 PACKAGE=$NAME
15471547
1548 VERSION=1.5.1
1548 VERSION=1.5.2
15491549
15501550 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
15511551 { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
77 ######## Setup for automake
88 NAME="bumprace"
99 SDL_VERSION=1.1.5
10 AM_INIT_AUTOMAKE($NAME, 1.5.1)
10 AM_INIT_AUTOMAKE($NAME, 1.5.2)
1111
1212 ######## Check for tools
1313 AC_PROG_CC
Binary diff not shown
data/gfx/background_by_cts.xcf less more
Binary diff not shown
316316 <key>_historyCapacity</key>
317317 <integer>0</integer>
318318 <key>bookmark</key>
319 <string>CBB512ED088CFAB100A155B8</string>
319 <string>CB2C264D0B31A39A00ACAC1F</string>
320320 <key>history</key>
321321 <array>
322322 <string>CBF14A630886CB82002B0459</string>
323 <string>CBF14A640886CB82002B0459</string>
324323 <string>CBF14A650886CB82002B0459</string>
325324 <string>CBF14A670886CB82002B0459</string>
326325 <string>CB94D1B80887D8BB0003B92F</string>
327 <string>CB94D1B90887D8BB0003B92F</string>
328326 <string>CB94D1BA0887D8BB0003B92F</string>
329 <string>CB94D1BB0887D8BB0003B92F</string>
330 <string>CBB512E9088CFAB100A155B8</string>
331 <string>CBB512EA088CFAB100A155B8</string>
327 <string>CB2C26370B31A39A00ACAC1F</string>
328 <string>CB2C26380B31A39A00ACAC1F</string>
329 <string>CB2C26390B31A39A00ACAC1F</string>
330 <string>CB2C263A0B31A39A00ACAC1F</string>
331 <string>CB2C263B0B31A39A00ACAC1F</string>
332 <string>CB2C263C0B31A39A00ACAC1F</string>
332333 </array>
333334 <key>prevStack</key>
334335 <array>
341342 <string>CB94D1C00887D8BB0003B92F</string>
342343 <string>CB94D3C80887E4570003B92F</string>
343344 <string>CBB512EB088CFAB100A155B8</string>
344 <string>CBB512EC088CFAB100A155B8</string>
345 <string>CB2C25F40B31942700ACAC1F</string>
346 <string>CB2C25F50B31942700ACAC1F</string>
347 <string>CB2C26010B31971E00ACAC1F</string>
348 <string>CB2C26020B31971E00ACAC1F</string>
349 <string>CB2C26030B31971E00ACAC1F</string>
350 <string>CB2C263D0B31A39A00ACAC1F</string>
351 <string>CB2C263E0B31A39A00ACAC1F</string>
352 <string>CB2C263F0B31A39A00ACAC1F</string>
353 <string>CB2C26400B31A39A00ACAC1F</string>
354 <string>CB2C26410B31A39A00ACAC1F</string>
355 <string>CB2C26420B31A39A00ACAC1F</string>
356 <string>CB2C26430B31A39A00ACAC1F</string>
357 <string>CB2C26440B31A39A00ACAC1F</string>
358 <string>CB2C26450B31A39A00ACAC1F</string>
359 <string>CB2C26460B31A39A00ACAC1F</string>
360 <string>CB2C26470B31A39A00ACAC1F</string>
361 <string>CB2C26480B31A39A00ACAC1F</string>
362 <string>CB2C26490B31A39A00ACAC1F</string>
363 <string>CB2C264A0B31A39A00ACAC1F</string>
364 <string>CB2C264B0B31A39A00ACAC1F</string>
365 <string>CB2C264C0B31A39A00ACAC1F</string>
345366 </array>
346367 </dict>
347368 <key>SplitCount</key>
353374 <key>GeometryConfiguration</key>
354375 <dict>
355376 <key>Frame</key>
356 <string>{{0, 0}, {948, 681}}</string>
377 <string>{{0, 0}, {948, 676}}</string>
357378 <key>RubberWindowFrame</key>
358379 <string>66 155 1156 858 0 0 1680 1028 </string>
359380 </dict>
360381 <key>Module</key>
361382 <string>PBXNavigatorGroup</string>
362383 <key>Proportion</key>
363 <string>681pt</string>
384 <string>676pt</string>
364385 </dict>
365386 <dict>
366387 <key>ContentConfiguration</key>
373394 <key>GeometryConfiguration</key>
374395 <dict>
375396 <key>Frame</key>
376 <string>{{0, 686}, {948, 131}}</string>
397 <string>{{0, 681}, {948, 136}}</string>
377398 <key>RubberWindowFrame</key>
378399 <string>66 155 1156 858 0 0 1680 1028 </string>
379400 </dict>
380401 <key>Module</key>
381402 <string>XCDetailModule</string>
382403 <key>Proportion</key>
383 <string>131pt</string>
404 <string>136pt</string>
384405 </dict>
385406 </array>
386407 <key>Proportion</key>
399420 </array>
400421 <key>TableOfContents</key>
401422 <array>
402 <string>CBB512E3088CFA8B00A155B8</string>
423 <string>CB2C25F70B31942700ACAC1F</string>
403424 <string>1CE0B1FE06471DED0097A5F4</string>
404 <string>CBB512E4088CFA8B00A155B8</string>
425 <string>CB2C25F80B31942700ACAC1F</string>
405426 <string>1CE0B20306471E060097A5F4</string>
406427 <string>1CE0B20506471E060097A5F4</string>
407428 </array>
535556 <integer>5</integer>
536557 <key>WindowOrderList</key>
537558 <array>
559 <string>CB06EA77086C166C001241D7</string>
560 <string>1C0AD2B3069F1EA900FABCE6</string>
538561 <string>/Users/karl/code/mygames/bumprace/macosx/bumprace.xcodeproj</string>
539562 </array>
540563 <key>WindowString</key>
581604 <key>ContentConfiguration</key>
582605 <dict>
583606 <key>PBXBuildLogShowsTranscriptDefaultKey</key>
584 <string>{{0, 106}, {874, 315}}</string>
607 <string>{{0, 97}, {874, 324}}</string>
585608 <key>PBXProjectModuleGUID</key>
586609 <string>XCMainBuildResultsModuleGUID</string>
587610 <key>PBXProjectModuleLabel</key>
619642 <key>TableOfContents</key>
620643 <array>
621644 <string>CB06EA77086C166C001241D7</string>
622 <string>CBF14A5F0886C86A002B0459</string>
645 <string>CB2C260C0B319C9A00ACAC1F</string>
623646 <string>1CD0528F0623707200166675</string>
624647 <string>XCMainBuildResultsModuleGUID</string>
625648 </array>
916939 <string>yes</string>
917940 <key>sizes</key>
918941 <array>
919 <string>{{0, 0}, {491, 168}}</string>
920 <string>{{0, 173}, {491, 270}}</string>
942 <string>{{0, 0}, {493, 168}}</string>
943 <string>{{0, 173}, {493, 270}}</string>
921944 </array>
922945 </dict>
923946 <key>VerticalSplitView</key>
943966 <key>Frame</key>
944967 <string>{{0, 0}, {459, 159}}</string>
945968 <key>RubberWindowFrame</key>
946 <string>139 756 459 200 0 0 1680 1028 </string>
969 <string>81 58 459 200 0 0 1680 1028 </string>
947970 </dict>
948971 <key>Module</key>
949972 <string>PBXRunSessionModule</string>
966989 <key>TableOfContents</key>
967990 <array>
968991 <string>1C0AD2B3069F1EA900FABCE6</string>
969 <string>CB94D1990887D4EF0003B92F</string>
992 <string>CB2C25F90B31942700ACAC1F</string>
970993 <string>1CD0528B0623707200166675</string>
971 <string>CB94D19A0887D4EF0003B92F</string>
994 <string>CB2C25FA0B31942700ACAC1F</string>
972995 </array>
973996 <key>ToolbarConfiguration</key>
974997 <string>xcode.toolbar.config.run</string>
975998 <key>WindowString</key>
976 <string>139 756 459 200 0 0 1680 1028 </string>
999 <string>81 58 459 200 0 0 1680 1028 </string>
9771000 <key>WindowToolGUID</key>
9781001 <string>1C0AD2B3069F1EA900FABCE6</string>
9791002 <key>WindowToolIsVisible</key>
980 <false/>
1003 <true/>
9811004 </dict>
9821005 <dict>
9831006 <key>Identifier</key>
00 // !$*UTF8*$!
11 {
22 29B97313FDCFA39411CA2CEA /* Project object */ = {
3 activeBuildConfigurationName = Development;
3 activeBuildConfigurationName = Deployment;
44 activeBuildStyle = 4A9504CCFFE6A4B311CA0CBA /* Development */;
55 activeExecutable = CBA4B177073141D4003EC668 /* BumpRace */;
66 activeTarget = 29B97326FDCFA39411CA2CEA /* BumpRace */;
110110 PBXFileDataSource_Warnings_ColumnID,
111111 );
112112 };
113 PBXPerProjectTemplateStateSaveDate = 143456890;
113 PBXPerProjectTemplateStateSaveDate = 187798388;
114114 PBXPrepackagedSmartGroups_v2 = (
115115 {
116116 PBXTransientLocationAtTop = bottom;
650650 PBXModuleWindowStatusBarHidden = YES;
651651 RubberWindowFrame = "110 272 745 464 0 0 1024 746 ";
652652 };
653 PBXWorkspaceStateSaveDate = 143456890;
653 PBXWorkspaceStateSaveDate = 187798388;
654654 };
655655 perUserProjectItems = {
656656 CB06E93C086BFC96001241D7 = CB06E93C086BFC96001241D7 /* PBXTextBookmark */;
657657 CB06EA6D086C1628001241D7 = CB06EA6D086C1628001241D7 /* PBXTextBookmark */;
658 CB2C25480B3192FF00ACAC1F = CB2C25480B3192FF00ACAC1F /* PBXTextBookmark */;
659 CB2C25F20B31942700ACAC1F /* PBXTextBookmark */ = CB2C25F20B31942700ACAC1F /* PBXTextBookmark */;
660 CB2C25F30B31942700ACAC1F /* PBXTextBookmark */ = CB2C25F30B31942700ACAC1F /* PBXTextBookmark */;
661 CB2C25F40B31942700ACAC1F /* PBXTextBookmark */ = CB2C25F40B31942700ACAC1F /* PBXTextBookmark */;
662 CB2C25F50B31942700ACAC1F /* PBXTextBookmark */ = CB2C25F50B31942700ACAC1F /* PBXTextBookmark */;
663 CB2C25F60B31942700ACAC1F /* PBXTextBookmark */ = CB2C25F60B31942700ACAC1F /* PBXTextBookmark */;
664 CB2C25FF0B31971E00ACAC1F /* PBXTextBookmark */ = CB2C25FF0B31971E00ACAC1F /* PBXTextBookmark */;
665 CB2C26000B31971E00ACAC1F /* PBXTextBookmark */ = CB2C26000B31971E00ACAC1F /* PBXTextBookmark */;
666 CB2C26010B31971E00ACAC1F /* PBXTextBookmark */ = CB2C26010B31971E00ACAC1F /* PBXTextBookmark */;
667 CB2C26020B31971E00ACAC1F /* PBXTextBookmark */ = CB2C26020B31971E00ACAC1F /* PBXTextBookmark */;
668 CB2C26030B31971E00ACAC1F /* PBXTextBookmark */ = CB2C26030B31971E00ACAC1F /* PBXTextBookmark */;
669 CB2C26040B31971E00ACAC1F /* PBXTextBookmark */ = CB2C26040B31971E00ACAC1F /* PBXTextBookmark */;
670 CB2C26370B31A39A00ACAC1F /* PBXTextBookmark */ = CB2C26370B31A39A00ACAC1F /* PBXTextBookmark */;
671 CB2C26380B31A39A00ACAC1F /* PBXTextBookmark */ = CB2C26380B31A39A00ACAC1F /* PBXTextBookmark */;
672 CB2C26390B31A39A00ACAC1F /* PBXTextBookmark */ = CB2C26390B31A39A00ACAC1F /* PBXTextBookmark */;
673 CB2C263A0B31A39A00ACAC1F /* PBXTextBookmark */ = CB2C263A0B31A39A00ACAC1F /* PBXTextBookmark */;
674 CB2C263B0B31A39A00ACAC1F /* PBXTextBookmark */ = CB2C263B0B31A39A00ACAC1F /* PBXTextBookmark */;
675 CB2C263C0B31A39A00ACAC1F /* PBXTextBookmark */ = CB2C263C0B31A39A00ACAC1F /* PBXTextBookmark */;
676 CB2C263D0B31A39A00ACAC1F /* PBXTextBookmark */ = CB2C263D0B31A39A00ACAC1F /* PBXTextBookmark */;
677 CB2C263E0B31A39A00ACAC1F /* PBXTextBookmark */ = CB2C263E0B31A39A00ACAC1F /* PBXTextBookmark */;
678 CB2C263F0B31A39A00ACAC1F /* PBXTextBookmark */ = CB2C263F0B31A39A00ACAC1F /* PBXTextBookmark */;
679 CB2C26400B31A39A00ACAC1F /* PBXTextBookmark */ = CB2C26400B31A39A00ACAC1F /* PBXTextBookmark */;
680 CB2C26410B31A39A00ACAC1F /* PBXTextBookmark */ = CB2C26410B31A39A00ACAC1F /* PBXTextBookmark */;
681 CB2C26420B31A39A00ACAC1F /* PBXTextBookmark */ = CB2C26420B31A39A00ACAC1F /* PBXTextBookmark */;
682 CB2C26430B31A39A00ACAC1F /* PBXTextBookmark */ = CB2C26430B31A39A00ACAC1F /* PBXTextBookmark */;
683 CB2C26440B31A39A00ACAC1F /* PBXTextBookmark */ = CB2C26440B31A39A00ACAC1F /* PBXTextBookmark */;
684 CB2C26450B31A39A00ACAC1F /* PBXTextBookmark */ = CB2C26450B31A39A00ACAC1F /* PBXTextBookmark */;
685 CB2C26460B31A39A00ACAC1F /* PBXTextBookmark */ = CB2C26460B31A39A00ACAC1F /* PBXTextBookmark */;
686 CB2C26470B31A39A00ACAC1F /* PBXTextBookmark */ = CB2C26470B31A39A00ACAC1F /* PBXTextBookmark */;
687 CB2C26480B31A39A00ACAC1F /* PBXTextBookmark */ = CB2C26480B31A39A00ACAC1F /* PBXTextBookmark */;
688 CB2C26490B31A39A00ACAC1F /* PBXTextBookmark */ = CB2C26490B31A39A00ACAC1F /* PBXTextBookmark */;
689 CB2C264A0B31A39A00ACAC1F /* PBXTextBookmark */ = CB2C264A0B31A39A00ACAC1F /* PBXTextBookmark */;
690 CB2C264B0B31A39A00ACAC1F /* PBXTextBookmark */ = CB2C264B0B31A39A00ACAC1F /* PBXTextBookmark */;
691 CB2C264C0B31A39A00ACAC1F /* PBXTextBookmark */ = CB2C264C0B31A39A00ACAC1F /* PBXTextBookmark */;
692 CB2C264D0B31A39A00ACAC1F /* PBXTextBookmark */ = CB2C264D0B31A39A00ACAC1F /* PBXTextBookmark */;
658693 CB94D1B80887D8BB0003B92F = CB94D1B80887D8BB0003B92F /* PBXTextBookmark */;
659694 CB94D1B90887D8BB0003B92F = CB94D1B90887D8BB0003B92F /* PBXTextBookmark */;
660695 CB94D1BA0887D8BB0003B92F = CB94D1BA0887D8BB0003B92F /* PBXTextBookmark */;
661696 CB94D1BB0887D8BB0003B92F = CB94D1BB0887D8BB0003B92F /* PBXTextBookmark */;
662 CB94D1BC0887D8BB0003B92F = CB94D1BC0887D8BB0003B92F /* PBXTextBookmark */;
663697 CB94D1BE0887D8BB0003B92F = CB94D1BE0887D8BB0003B92F /* PBXTextBookmark */;
664698 CB94D1C00887D8BB0003B92F = CB94D1C00887D8BB0003B92F /* PBXTextBookmark */;
665 CB94D3C70887E4570003B92F = CB94D3C70887E4570003B92F /* PBXTextBookmark */;
666699 CB94D3C80887E4570003B92F = CB94D3C80887E4570003B92F /* PBXTextBookmark */;
667 CB94D3DE08883D7E0003B92F = CB94D3DE08883D7E0003B92F /* PBXTextBookmark */;
668 CBB512E2088CFA8B00A155B8 /* PBXTextBookmark */ = CBB512E2088CFA8B00A155B8 /* PBXTextBookmark */;
669 CBB512E9088CFAB100A155B8 /* PBXTextBookmark */ = CBB512E9088CFAB100A155B8 /* PBXTextBookmark */;
670 CBB512EA088CFAB100A155B8 /* PBXTextBookmark */ = CBB512EA088CFAB100A155B8 /* PBXTextBookmark */;
671 CBB512EB088CFAB100A155B8 /* PBXTextBookmark */ = CBB512EB088CFAB100A155B8 /* PBXTextBookmark */;
672 CBB512EC088CFAB100A155B8 /* PBXTextBookmark */ = CBB512EC088CFAB100A155B8 /* PBXTextBookmark */;
673 CBB512ED088CFAB100A155B8 /* PBXTextBookmark */ = CBB512ED088CFAB100A155B8 /* PBXTextBookmark */;
700 CBB512E9088CFAB100A155B8 = CBB512E9088CFAB100A155B8 /* PBXTextBookmark */;
701 CBB512EB088CFAB100A155B8 = CBB512EB088CFAB100A155B8 /* PBXTextBookmark */;
702 CBD1B8910AA20BB400C0A9B6 = CBD1B8910AA20BB400C0A9B6 /* PBXTextBookmark */;
674703 CBF14A4E0886C78C002B0459 = CBF14A4E0886C78C002B0459 /* PBXTextBookmark */;
675704 CBF14A630886CB82002B0459 = CBF14A630886CB82002B0459 /* PBXTextBookmark */;
676705 CBF14A640886CB82002B0459 = CBF14A640886CB82002B0459 /* PBXTextBookmark */;
716745 vrLen = 2674;
717746 vrLoc = 0;
718747 };
748 CB2C25480B3192FF00ACAC1F /* PBXTextBookmark */ = {
749 isa = PBXTextBookmark;
750 fRef = CBA4B1FA0731431B003EC668 /* bumprace.c */;
751 name = "bumprace.c: 25";
752 rLen = 0;
753 rLoc = 1568;
754 rType = 0;
755 vrLen = 1995;
756 vrLoc = 0;
757 };
758 CB2C25F20B31942700ACAC1F /* PBXTextBookmark */ = {
759 isa = PBXTextBookmark;
760 fRef = CBA4B1FB0731431B003EC668 /* bumprace.h */;
761 name = "bumprace.h: BlitMenu";
762 rLen = 0;
763 rLoc = 1528;
764 rType = 0;
765 vrLen = 1403;
766 vrLoc = 189;
767 };
768 CB2C25F30B31942700ACAC1F /* PBXTextBookmark */ = {
769 isa = PBXTextBookmark;
770 fRef = CBA4B1FA0731431B003EC668 /* bumprace.c */;
771 name = "bumprace.c: 1225";
772 rLen = 0;
773 rLoc = 39022;
774 rType = 0;
775 vrLen = 1995;
776 vrLoc = 0;
777 };
778 CB2C25F40B31942700ACAC1F /* PBXTextBookmark */ = {
779 isa = PBXTextBookmark;
780 fRef = CBA4B1FA0731431B003EC668 /* bumprace.c */;
781 name = "bumprace.c: 1225";
782 rLen = 0;
783 rLoc = 39022;
784 rType = 0;
785 vrLen = 1995;
786 vrLoc = 0;
787 };
788 CB2C25F50B31942700ACAC1F /* PBXTextBookmark */ = {
789 isa = PBXTextBookmark;
790 fRef = CBA4B1FB0731431B003EC668 /* bumprace.h */;
791 name = "bumprace.h: BlitMenu";
792 rLen = 0;
793 rLoc = 1528;
794 rType = 0;
795 vrLen = 1403;
796 vrLoc = 189;
797 };
798 CB2C25F60B31942700ACAC1F /* PBXTextBookmark */ = {
799 isa = PBXTextBookmark;
800 fRef = CBA4B1FA0731431B003EC668 /* bumprace.c */;
801 name = "bumprace.c: 1225";
802 rLen = 0;
803 rLoc = 39022;
804 rType = 0;
805 vrLen = 1995;
806 vrLoc = 0;
807 };
808 CB2C25FF0B31971E00ACAC1F /* PBXTextBookmark */ = {
809 isa = PBXTextBookmark;
810 fRef = CBA4B1FA0731431B003EC668 /* bumprace.c */;
811 name = "bumprace.c: 590";
812 rLen = 0;
813 rLoc = 19704;
814 rType = 0;
815 vrLen = 1731;
816 vrLoc = 662;
817 };
818 CB2C26000B31971E00ACAC1F /* PBXTextBookmark */ = {
819 isa = PBXTextBookmark;
820 fRef = CBA4B1FB0731431B003EC668 /* bumprace.h */;
821 name = "bumprace.h: BlitMenu";
822 rLen = 0;
823 rLoc = 1528;
824 rType = 0;
825 vrLen = 1296;
826 vrLoc = 0;
827 };
828 CB2C26010B31971E00ACAC1F /* PBXTextBookmark */ = {
829 isa = PBXTextBookmark;
830 fRef = CBA4B1FA0731431B003EC668 /* bumprace.c */;
831 name = "bumprace.c: 590";
832 rLen = 0;
833 rLoc = 19704;
834 rType = 0;
835 vrLen = 1731;
836 vrLoc = 662;
837 };
838 CB2C26020B31971E00ACAC1F /* PBXTextBookmark */ = {
839 isa = PBXTextBookmark;
840 fRef = CBA4B1FB0731431B003EC668 /* bumprace.h */;
841 name = "bumprace.h: BlitMenu";
842 rLen = 0;
843 rLoc = 1528;
844 rType = 0;
845 vrLen = 1296;
846 vrLoc = 0;
847 };
848 CB2C26030B31971E00ACAC1F /* PBXTextBookmark */ = {
849 isa = PBXTextBookmark;
850 fRef = CBA4B1FA0731431B003EC668 /* bumprace.c */;
851 name = "bumprace.c: 590";
852 rLen = 0;
853 rLoc = 19704;
854 rType = 0;
855 vrLen = 1731;
856 vrLoc = 662;
857 };
858 CB2C26040B31971E00ACAC1F /* PBXTextBookmark */ = {
859 isa = PBXTextBookmark;
860 fRef = CBA4B1FB0731431B003EC668 /* bumprace.h */;
861 name = "bumprace.h: SDL_SetAlpha";
862 rLen = 0;
863 rLoc = 114;
864 rType = 0;
865 vrLen = 1289;
866 vrLoc = 0;
867 };
868 CB2C26370B31A39A00ACAC1F /* PBXTextBookmark */ = {
869 isa = PBXTextBookmark;
870 fRef = CBA4B1FB0731431B003EC668 /* bumprace.h */;
871 name = "bumprace.h: SDL_SetAlpha";
872 rLen = 0;
873 rLoc = 114;
874 rType = 0;
875 vrLen = 1289;
876 vrLoc = 0;
877 };
878 CB2C26380B31A39A00ACAC1F /* PBXTextBookmark */ = {
879 isa = PBXTextBookmark;
880 fRef = CBA4B1FD0731431B003EC668 /* font.h */;
881 name = "void SFont_Input ( SDL_Surface *Destination, int x, int y, int Width, char *text);";
882 rLen = 84;
883 rLoc = 3273;
884 rType = 0;
885 vrLen = 1572;
886 vrLoc = 1943;
887 };
888 CB2C26390B31A39A00ACAC1F /* PBXTextBookmark */ = {
889 isa = PBXTextBookmark;
890 fRef = CBA4B1FC0731431B003EC668 /* font.c */;
891 name = "font.c: SFont_InternalInput";
892 rLen = 2263;
893 rLoc = 5528;
894 rType = 0;
895 vrLen = 1669;
896 vrLoc = 6439;
897 };
898 CB2C263A0B31A39A00ACAC1F /* PBXTextBookmark */ = {
899 isa = PBXTextBookmark;
900 fRef = CBA4B2030731431B003EC668 /* options.c */;
901 name = "options.c: 80";
902 rLen = 0;
903 rLoc = 1797;
904 rType = 0;
905 vrLen = 1224;
906 vrLoc = 1239;
907 };
908 CB2C263B0B31A39A00ACAC1F /* PBXTextBookmark */ = {
909 isa = PBXTextBookmark;
910 fRef = CBA4B2010731431B003EC668 /* menu.c */;
911 name = "menu.c: 51";
912 rLen = 0;
913 rLoc = 1254;
914 rType = 0;
915 vrLen = 1557;
916 vrLoc = 210;
917 };
918 CB2C263C0B31A39A00ACAC1F /* PBXTextBookmark */ = {
919 isa = PBXTextBookmark;
920 fRef = CBA4B1FA0731431B003EC668 /* bumprace.c */;
921 name = "bumprace.c: 22";
922 rLen = 0;
923 rLoc = 1408;
924 rType = 0;
925 vrLen = 1731;
926 vrLoc = 662;
927 };
928 CB2C263D0B31A39A00ACAC1F /* PBXTextBookmark */ = {
929 isa = PBXTextBookmark;
930 fRef = CBA4B1FB0731431B003EC668 /* bumprace.h */;
931 name = "bumprace.h: SDL_SetAlpha";
932 rLen = 0;
933 rLoc = 114;
934 rType = 0;
935 vrLen = 1289;
936 vrLoc = 0;
937 };
938 CB2C263E0B31A39A00ACAC1F /* PBXTextBookmark */ = {
939 isa = PBXTextBookmark;
940 fRef = CBA4B2030731431B003EC668 /* options.c */;
941 name = "options.c: 57";
942 rLen = 0;
943 rLoc = 1258;
944 rType = 0;
945 vrLen = 1088;
946 vrLoc = 0;
947 };
948 CB2C263F0B31A39A00ACAC1F /* PBXTextBookmark */ = {
949 isa = PBXTextBookmark;
950 fRef = CBA4B1FC0731431B003EC668 /* font.c */;
951 name = "font.c: GetPixel";
952 rLen = 0;
953 rLoc = 1595;
954 rType = 0;
955 vrLen = 2112;
956 vrLoc = 0;
957 };
958 CB2C26400B31A39A00ACAC1F /* PBXTextBookmark */ = {
959 isa = PBXTextBookmark;
960 fRef = CBA4B1FD0731431B003EC668 /* font.h */;
961 name = "font.h: SFont_TextWidth";
962 rLen = 0;
963 rLoc = 2815;
964 rType = 0;
965 vrLen = 1572;
966 vrLoc = 1943;
967 };
968 CB2C26410B31A39A00ACAC1F /* PBXTextBookmark */ = {
969 isa = PBXTextBookmark;
970 fRef = CBA4B1FC0731431B003EC668 /* font.c */;
971 name = "font.c: 224";
972 rLen = 0;
973 rLoc = 1595;
974 rType = 0;
975 vrLen = 1626;
976 vrLoc = 6343;
977 };
978 CB2C26420B31A39A00ACAC1F /* PBXTextBookmark */ = {
979 isa = PBXTextBookmark;
980 fRef = CBA4B1FD0731431B003EC668 /* font.h */;
981 name = "font.h: PutString";
982 rLen = 0;
983 rLoc = 2681;
984 rType = 0;
985 vrLen = 1572;
986 vrLoc = 1943;
987 };
988 CB2C26430B31A39A00ACAC1F /* PBXTextBookmark */ = {
989 isa = PBXTextBookmark;
990 fRef = CBA4B1FC0731431B003EC668 /* font.c */;
991 name = "font.c: 206";
992 rLen = 0;
993 rLoc = 6419;
994 rType = 0;
995 vrLen = 1447;
996 vrLoc = 5319;
997 };
998 CB2C26440B31A39A00ACAC1F /* PBXTextBookmark */ = {
999 isa = PBXTextBookmark;
1000 fRef = CBA4B2030731431B003EC668 /* options.c */;
1001 name = "options.c: 80";
1002 rLen = 0;
1003 rLoc = 1754;
1004 rType = 0;
1005 vrLen = 1303;
1006 vrLoc = 1430;
1007 };
1008 CB2C26450B31A39A00ACAC1F /* PBXTextBookmark */ = {
1009 isa = PBXTextBookmark;
1010 fRef = CBA4B1FD0731431B003EC668 /* font.h */;
1011 name = "void SFont_Input ( SDL_Surface *Destination, int x, int y, int Width, char *text);";
1012 rLen = 84;
1013 rLoc = 3273;
1014 rType = 0;
1015 vrLen = 1572;
1016 vrLoc = 1943;
1017 };
1018 CB2C26460B31A39A00ACAC1F /* PBXTextBookmark */ = {
1019 isa = PBXTextBookmark;
1020 fRef = CBA4B2030731431B003EC668 /* options.c */;
1021 name = "options.c: 80";
1022 rLen = 0;
1023 rLoc = 1794;
1024 rType = 0;
1025 vrLen = 1344;
1026 vrLoc = 1430;
1027 };
1028 CB2C26470B31A39A00ACAC1F /* PBXTextBookmark */ = {
1029 isa = PBXTextBookmark;
1030 fRef = CBA4B1FC0731431B003EC668 /* font.c */;
1031 name = "font.c: 215";
1032 rLen = 0;
1033 rLoc = 6716;
1034 rType = 0;
1035 vrLen = 1414;
1036 vrLoc = 5637;
1037 };
1038 CB2C26480B31A39A00ACAC1F /* PBXTextBookmark */ = {
1039 isa = PBXTextBookmark;
1040 fRef = CBA4B2030731431B003EC668 /* options.c */;
1041 name = "options.c: 80";
1042 rLen = 0;
1043 rLoc = 1797;
1044 rType = 0;
1045 vrLen = 1224;
1046 vrLoc = 1239;
1047 };
1048 CB2C26490B31A39A00ACAC1F /* PBXTextBookmark */ = {
1049 isa = PBXTextBookmark;
1050 fRef = CBA4B1FC0731431B003EC668 /* font.c */;
1051 name = "font.c: SFont_InternalInput";
1052 rLen = 2263;
1053 rLoc = 5528;
1054 rType = 0;
1055 vrLen = 1669;
1056 vrLoc = 6439;
1057 };
1058 CB2C264A0B31A39A00ACAC1F /* PBXTextBookmark */ = {
1059 isa = PBXTextBookmark;
1060 fRef = CBA4B1FA0731431B003EC668 /* bumprace.c */;
1061 name = "bumprace.c: 22";
1062 rLen = 0;
1063 rLoc = 1408;
1064 rType = 0;
1065 vrLen = 1731;
1066 vrLoc = 662;
1067 };
1068 CB2C264B0B31A39A00ACAC1F /* PBXTextBookmark */ = {
1069 isa = PBXTextBookmark;
1070 fRef = CBA4B2030731431B003EC668 /* options.c */;
1071 name = "options.c: 80";
1072 rLen = 0;
1073 rLoc = 1797;
1074 rType = 0;
1075 vrLen = 1224;
1076 vrLoc = 1239;
1077 };
1078 CB2C264C0B31A39A00ACAC1F /* PBXTextBookmark */ = {
1079 isa = PBXTextBookmark;
1080 fRef = CBA4B2010731431B003EC668 /* menu.c */;
1081 name = "menu.c: 51";
1082 rLen = 0;
1083 rLoc = 1254;
1084 rType = 0;
1085 vrLen = 1557;
1086 vrLoc = 210;
1087 };
1088 CB2C264D0B31A39A00ACAC1F /* PBXTextBookmark */ = {
1089 isa = PBXTextBookmark;
1090 fRef = CBA4B1FA0731431B003EC668 /* bumprace.c */;
1091 name = "bumprace.c: VERSION";
1092 rLen = 0;
1093 rLoc = 1931;
1094 rType = 0;
1095 vrLen = 1731;
1096 vrLoc = 662;
1097 };
7191098 CB94D1B80887D8BB0003B92F /* PBXTextBookmark */ = {
7201099 isa = PBXTextBookmark;
7211100 fRef = CB06EA61086C159B001241D7 /* levels2.h */;
7311110 fRef = CBA4B2010731431B003EC668 /* menu.c */;
7321111 name = "menu.c: 184";
7331112 rLen = 0;
734 rLoc = 5301;
1113 rLoc = 5310;
7351114 rType = 0;
7361115 vrLen = 1349;
7371116 vrLoc = 4211;
7511130 fRef = CBA4B1FB0731431B003EC668 /* bumprace.h */;
7521131 name = "bumprace.h: BlitMenu";
7531132 rLen = 0;
754 rLoc = 1535;
1133 rLoc = 1528;
7551134 rType = 0;
7561135 vrLen = 1402;
7571136 vrLoc = 190;
7581137 };
759 CB94D1BC0887D8BB0003B92F /* PBXTextBookmark */ = {
760 isa = PBXTextBookmark;
761 fRef = CBA4B1FA0731431B003EC668 /* bumprace.c */;
762 name = "bumprace.c: 165";
763 rLen = 0;
764 rLoc = 6265;
765 rType = 0;
766 vrLen = 2848;
767 vrLoc = 5425;
768 };
7691138 CB94D1BE0887D8BB0003B92F /* PBXTextBookmark */ = {
7701139 isa = PBXTextBookmark;
7711140 fRef = CBA4B2010731431B003EC668 /* menu.c */;
7721141 name = "menu.c: 184";
7731142 rLen = 0;
774 rLoc = 5301;
1143 rLoc = 5310;
7751144 rType = 0;
7761145 vrLen = 1418;
7771146 vrLoc = 4142;
7861155 vrLen = 79;
7871156 vrLoc = 0;
7881157 };
789 CB94D3C70887E4570003B92F /* PBXTextBookmark */ = {
1158 CB94D3C80887E4570003B92F /* PBXTextBookmark */ = {
7901159 isa = PBXTextBookmark;
7911160 fRef = CBA4B2030731431B003EC668 /* options.c */;
7921161 name = "options.c: Player";
7951164 rType = 0;
7961165 vrLen = 1088;
7971166 vrLoc = 0;
798 };
799 CB94D3C80887E4570003B92F /* PBXTextBookmark */ = {
800 isa = PBXTextBookmark;
801 fRef = CBA4B2030731431B003EC668 /* options.c */;
802 name = "options.c: Player";
803 rLen = 0;
804 rLoc = 82;
805 rType = 0;
806 vrLen = 1088;
807 vrLoc = 0;
808 };
809 CB94D3DE08883D7E0003B92F /* PBXTextBookmark */ = {
810 isa = PBXTextBookmark;
811 fRef = CBA4B1FA0731431B003EC668 /* bumprace.c */;
812 name = "bumprace.c: 165";
813 rLen = 0;
814 rLoc = 6265;
815 rType = 0;
816 vrLen = 1404;
817 vrLoc = 32327;
8181167 };
8191168 CBA4B177073141D4003EC668 /* BumpRace */ = {
8201169 isa = PBXExecutable;
8571206 };
8581207 CBA4B1FA0731431B003EC668 /* bumprace.c */ = {
8591208 uiCtxt = {
860 sepNavIntBoundsRect = "{{0, 0}, {907, 16310}}";
1209 sepNavIntBoundsRect = "{{0, 0}, {907, 17738}}";
8611210 sepNavSelRange = "{1931, 0}";
862 sepNavVisRect = "{{0, 0}, {907, 664}}";
1211 sepNavVisRect = "{{0, 140}, {907, 659}}";
8631212 sepNavWindowFrame = "{{74, 183}, {750, 558}}";
8641213 };
8651214 };
8661215 CBA4B1FB0731431B003EC668 /* bumprace.h */ = {
8671216 uiCtxt = {
8681217 sepNavIntBoundsRect = "{{0, 0}, {907, 826}}";
869 sepNavSelRange = "{1535, 0}";
870 sepNavVisRect = "{{0, 162}, {907, 664}}";
1218 sepNavSelRange = "{114, 0}";
1219 sepNavVisRect = "{{0, 0}, {907, 664}}";
8711220 };
8721221 };
8731222 CBA4B1FC0731431B003EC668 /* font.c */ = {
8741223 uiCtxt = {
875 sepNavIntBoundsRect = "{{0, 0}, {742, 3541}}";
876 sepNavSelRange = "{1702, 0}";
877 sepNavVisRect = "{{0, 383}, {742, 470}}";
1224 sepNavIntBoundsRect = "{{0, 0}, {907, 3570}}";
1225 sepNavSelRange = "{5528, 2263}";
1226 sepNavVisRect = "{{0, 2911}, {907, 659}}";
8781227 sepNavWindowFrame = "{{15, 183}, {750, 558}}";
8791228 };
8801229 };
8811230 CBA4B1FD0731431B003EC668 /* font.h */ = {
8821231 uiCtxt = {
8831232 sepNavIntBoundsRect = "{{0, 0}, {907, 1218}}";
884 sepNavSelRange = "{2815, 0}";
885 sepNavVisRect = "{{0, 543}, {907, 664}}";
1233 sepNavSelRange = "{3273, 84}";
1234 sepNavVisRect = "{{0, 559}, {907, 659}}";
8861235 };
8871236 };
8881237 CBA4B1FE0731431B003EC668 /* gfx.c */ = {
9101259 CBA4B2010731431B003EC668 /* menu.c */ = {
9111260 uiCtxt = {
9121261 sepNavIntBoundsRect = "{{0, 0}, {907, 4046}}";
913 sepNavSelRange = "{5301, 0}";
914 sepNavVisRect = "{{0, 2066}, {907, 664}}";
1262 sepNavSelRange = "{1254, 0}";
1263 sepNavVisRect = "{{0, 225}, {907, 659}}";
9151264 };
9161265 };
9171266 CBA4B2020731431B003EC668 /* menu.h */ = {
9231272 };
9241273 CBA4B2030731431B003EC668 /* options.c */ = {
9251274 uiCtxt = {
926 sepNavIntBoundsRect = "{{0, 0}, {907, 2296}}";
927 sepNavSelRange = "{1258, 0}";
928 sepNavVisRect = "{{0, 333}, {907, 664}}";
1275 sepNavIntBoundsRect = "{{0, 0}, {907, 2016}}";
1276 sepNavSelRange = "{1797, 0}";
1277 sepNavVisRect = "{{0, 784}, {907, 659}}";
9291278 };
9301279 };
9311280 CBA4B2040731431B003EC668 /* options.h */ = {
9491298 sepNavVisRect = "{{0, 0}, {742, 455}}";
9501299 };
9511300 };
952 CBB512E2088CFA8B00A155B8 /* PBXTextBookmark */ = {
1301 CBB512E9088CFAB100A155B8 /* PBXTextBookmark */ = {
1302 isa = PBXTextBookmark;
1303 fRef = CBA4B2030731431B003EC668 /* options.c */;
1304 name = "options.c: 57";
1305 rLen = 0;
1306 rLoc = 1258;
1307 rType = 0;
1308 vrLen = 1016;
1309 vrLoc = 525;
1310 };
1311 CBB512EB088CFAB100A155B8 /* PBXTextBookmark */ = {
9531312 isa = PBXTextBookmark;
9541313 fRef = CBA4B1FA0731431B003EC668 /* bumprace.c */;
9551314 name = "bumprace.c: 165";
9591318 vrLen = 1404;
9601319 vrLoc = 32327;
9611320 };
962 CBB512E9088CFAB100A155B8 /* PBXTextBookmark */ = {
963 isa = PBXTextBookmark;
964 fRef = CBA4B2030731431B003EC668 /* options.c */;
965 name = "options.c: 57";
966 rLen = 0;
967 rLoc = 1258;
968 rType = 0;
969 vrLen = 1016;
970 vrLoc = 525;
971 };
972 CBB512EA088CFAB100A155B8 /* PBXTextBookmark */ = {
1321 CBD1B8910AA20BB400C0A9B6 /* PBXTextBookmark */ = {
9731322 isa = PBXTextBookmark;
9741323 fRef = CBA4B1FA0731431B003EC668 /* bumprace.c */;
975 name = "bumprace.c: 165";
976 rLen = 0;
977 rLoc = 6265;
978 rType = 0;
979 vrLen = 1404;
980 vrLoc = 32327;
981 };
982 CBB512EB088CFAB100A155B8 /* PBXTextBookmark */ = {
983 isa = PBXTextBookmark;
984 fRef = CBA4B1FA0731431B003EC668 /* bumprace.c */;
985 name = "bumprace.c: 165";
986 rLen = 0;
987 rLoc = 6265;
988 rType = 0;
989 vrLen = 1404;
990 vrLoc = 32327;
991 };
992 CBB512EC088CFAB100A155B8 /* PBXTextBookmark */ = {
993 isa = PBXTextBookmark;
994 fRef = CBA4B2030731431B003EC668 /* options.c */;
995 name = "options.c: 57";
996 rLen = 0;
997 rLoc = 1258;
998 rType = 0;
999 vrLen = 1016;
1000 vrLoc = 525;
1001 };
1002 CBB512ED088CFAB100A155B8 /* PBXTextBookmark */ = {
1003 isa = PBXTextBookmark;
1004 fRef = CBA4B1FA0731431B003EC668 /* bumprace.c */;
1005 name = "bumprace.c: VERSION";
1006 rLen = 0;
1007 rLoc = 1931;
1324 name = "bumprace.c: 28";
1325 rLen = 0;
1326 rLoc = 1629;
10081327 rType = 0;
10091328 vrLen = 1995;
10101329 vrLoc = 0;
202202 || cp -p $$d/$$file $(distdir)/$$file || :; \
203203 fi; \
204204 done
205
206205 info-am:
207206 info: info-am
208207 dvi-am:
00 /* BumpRace: an easy-to-learn arcade game for up to two players
1 Copyright (C) 2000 Karl Bartel
1 Copyright (C) 2006 Karl Bartel
22
33 This program is free software; you can redistribute it and/or modify
44 it under the terms of the GNU General Public License as published by
4141 #include "options.h"
4242
4343 #ifndef VERSION
44 #define VERSION "1.5.1"
44 #define VERSION "1.5.2"
4545 #endif
4646 #define MAX_PLAYER_NUM 2
4747 #define FOREGROUND_TILE_NUM 8
141141 }
142142 }
143143
144 /**
145 * If players p1 and p2 collide, moves them out of the collision and makes them bounce.
146 */
147 void player_collision(int p1, int p2) {
148 const float radius = 12; /**< assumed radius of ships */
149
150 // calculate distance between ships
151 float dist_x = user[p1].realx - user[p2].realx;
152 float dist_y = user[p1].realy - user[p2].realy;
153 float dist = sqrt((dist_x * dist_x) + (dist_y * dist_y));
154
155 // abort if ships do not touch/intersect
156 if (dist > (radius + radius)) return;
157
158 // calculate penetration depth
159 float depth = (radius + radius) - dist;
160
161 // calculate unity vector of hit direction
162 float hit_x = dist_x / sqrt((dist_x * dist_x) + (dist_y * dist_y));
163 float hit_y = dist_y / sqrt((dist_x * dist_x) + (dist_y * dist_y));
164
165 // calculate fraction of speeds in direction of hit vector
166 float scalar1 = (user[p1].xspeed * hit_x) + (user[p1].yspeed * hit_y);
167 float scalar2 = (user[p2].xspeed * hit_x) + (user[p2].yspeed * hit_y);
168
169 // abort if nobody seems to have caused the collision
170 if (fabsf(scalar1) + fabsf(scalar2) == 0) return;
171
172 // calculate "contribution" of each ship to the collision as a fraction of 1, judging by its speed
173 // TODO: this penalizes a ship moving *out* of the collision, too
174 float contrib1 = fabsf(scalar1) / (fabsf(scalar1) + fabsf(scalar2));
175 float contrib2 = 1-contrib1;
176
177 // move ships just out of collision with total distance based on "contribution" figure
178 user[p1].realx += hit_x * (depth * contrib1);
179 user[p1].realy += hit_y * (depth * contrib1);
180 user[p2].realx -= hit_x * (depth * contrib2);
181 user[p2].realy -= hit_y * (depth * contrib2);
182
183 // calculate changes in speed
184 float delta1_x = scalar1 * hit_x;
185 float delta1_y = scalar1 * hit_y;
186 float delta2_x = scalar2 * hit_x;
187 float delta2_y = scalar2 * hit_y;
188
189 // modify speeds
190 user[p1].xspeed -= delta1_x;
191 user[p1].yspeed -= delta1_y;
192 user[p1].xspeed += delta2_x;
193 user[p1].yspeed += delta2_y;
194 user[p2].xspeed += delta1_x;
195 user[p2].yspeed += delta1_y;
196 user[p2].xspeed -= delta2_x;
197 user[p2].yspeed -= delta2_y;
198 }
199
144200 void kollision() //calcualtes all collisions
145201 {
146202 Uint8 x,y,x2,y2,sticky;
147203 SDL_Rect reblit_back;
148204 if (( keys[user[pl].extra] == SDL_PRESSED )&&(user[pl].sticky_possible)) sticky=1; else sticky=0;
205
206 // handle collisions with other players
207 // TODO: does this belong here?
208 int pl2;
209 for (pl2 = pl+1; pl2 < playernum; pl2++) {
210 player_collision(pl, pl2);
211 }
212
149213 if (already) {already=0;} else
150214 for (y=0;y<=14;y++) {
151215 for (x=0;x<=19;x++) {
238302 }
239303 }
240304
241 void thrust()
242 {
243 float deltaspeedx, deltaspeedy;
244
245 deltaspeedy = -cos(user[pl].turn*0.01745)*(game_speed/precision); // 0.01745=(2*PI)/360 thats RAD to DEG
246 deltaspeedx = sin(user[pl].turn*0.01745)*(game_speed/precision);
247 user[pl].yspeed+=deltaspeedy;
248 user[pl].xspeed+=deltaspeedx;
249 NextParticle-=game_speed;
250 while (NextParticle<0) {
251 NewParticles(user[pl].turn, user[pl].realx, user[pl].realy);
252 NextParticle+=350;
253 }
254 }
305 /**
306 * Add forward thrust to active player's ship.
307 * Set turbo_factor to 1 for normal acceleration
308 */
309 void thrust(float turbo_factor)
310 {
311 float deltaspeedx, deltaspeedy;
312
313 deltaspeedy = -cos(user[pl].turn*0.01745)*turbo_factor*(game_speed/precision); // 0.01745=(2*PI)/360 thats RAD to DEG
314 deltaspeedx = sin(user[pl].turn*0.01745)*turbo_factor*(game_speed/precision);
315 user[pl].yspeed+=deltaspeedy;
316 user[pl].xspeed+=deltaspeedx;
317 NextParticle-=game_speed;
318
319 float spread_percent;
320 switch( user[pl].racernum ) {
321 case 0: // SlowPoke
322 spread_percent = 100;
323 break;
324 case 1: // Normal
325 spread_percent = 50;
326 break;
327 case 2: // Speedy
328 spread_percent = 10;
329 break;
330 case 3: // Spinny
331 spread_percent = 120;
332 break;
333 default: // OOPS!
334 spread_percent = 0;
335 }
336 if (turbo_factor > 1) spread_percent = 100;
337
338 while (NextParticle<0) {
339 NewParticles(user[pl].turn, user[pl].realx, user[pl].realy, spread_percent);
340 NextParticle+=350;
341 }
342 }
343
344 //void thrust()
345 //{
346 // float deltaspeedx, deltaspeedy;
347 //
348 // deltaspeedy = -cos(user[pl].turn*0.01745)*(game_speed/precision); // 0.01745=(2*PI)/360 thats RAD to DEG
349 // deltaspeedx = sin(user[pl].turn*0.01745)*(game_speed/precision);
350 // user[pl].yspeed+=deltaspeedy;
351 // user[pl].xspeed+=deltaspeedx;
352 // NextParticle-=game_speed;
353 // while (NextParticle<0) {
354 // NewParticles(user[pl].turn, user[pl].realx, user[pl].realy);
355 // NextParticle+=350;
356 // }
357 //}
255358
256359 void HandleRacer() //reads keys and sets new coordinates
257360 {
264367 SDL_PollEvent(&event);
265368 keys = SDL_GetKeyState(NULL);
266369 if ( keys[user[pl].up] == SDL_PRESSED ) {
267 thrust();
370 thrust(1);
268371 }
269372 if ( keys[user[pl].right] == SDL_PRESSED ) {
270373 user[pl].turn+=turn_speed;
273376 user[pl].turn-=turn_speed;
274377 }
275378 if (( keys[user[pl].extra] == SDL_PRESSED )&&(user[pl].turbo_possible)) {
276 user[pl].yspeed-=cos(user[pl].turn*0.01745)*turbo*(game_speed/precision);
277 user[pl].xspeed+=sin(user[pl].turn*0.01745)*turbo*(game_speed/precision);
379 thrust(turbo);
278380 }
279381 user[pl].realx=user[pl].realx+user[pl].xspeed/accel_speed;
280382 user[pl].realy=user[pl].realy+user[pl].yspeed/accel_speed;
9441046 // printf(" successfully **\n");
9451047 }
9461048
947 void StartText() //bl means brightness loss
1049 void StartText()
9481050 {
9491051 SDL_Rect rect;
9501052
951 sprintf(text,"BumpRace Version %s (C) 2000 Karl Bartel", VERSION);
1053 sprintf(text,"BumpRace Version %s (C) 2006 Karl Bartel", VERSION);
9521054 PutString(Screen,170, 380, text);
9531055 PutString(Screen,170, 402, "BumpRace comes with ABSOLUTELY NO WARRANTY");
9541056 PutString(Screen,170, 424, "This is free software, and you are welcome to");
66
77 void BlitMenu();
88
9 #define SDL_SetAlpha($1,$2,$3) SDL_SetAlpha($1,0,0);SDL_SetAlpha($1,$2,$3)
9 #define SDL_SetAlpha(A,B,C) SDL_SetAlpha(A,0,0);SDL_SetAlpha(A,B,C)
1010
1111 typedef struct{
1212 float slowdown,turbo_possible,sticky_possible,extra_time;
179179 long blinktimer=0;
180180 SDL_Surface *Back;
181181 SDL_Rect rect;
182 SDLKey sym;
182183 int previous;
183184 // int ofs=(text[0]-33)*2+1;
184185 // int leftshift=(Font->CharPos[ofs]-Font->CharPos[ofs-1])/2;
202203 previous=SDL_EnableUNICODE(1);
203204 blinktimer=SDL_GetTicks();
204205 while (ch!=SDLK_RETURN) {
205 if (event.type==SDL_KEYDOWN) {
206 ch=event.key.keysym.unicode;
207 if (((ch>31)||(ch=='\b')) && (ch<128)) {
208 if ((ch=='\b')&&(strlen(text)>0))
209 text[strlen(text)-1]='\0';
210 else if (ch!='\b')
211 sprintf(text,"%s%c",text,ch);
212 if (SFont_TextWidth2(Font,text)>PixelWidth) text[strlen(text)-1]='\0';
213 SDL_BlitSurface( Back, NULL, Dest, &rect);
214 PutString2(Dest, Font, x, y, text);
215 SDL_UpdateRects(Dest, 1, &rect);
216 // printf("%s ## %d\n",text,strlen(text));
217 SDL_WaitEvent(&event);
218 }
219 }
220 if (SDL_GetTicks()>blinktimer) {
221 blink=1-blink;
222 blinktimer=SDL_GetTicks()+500;
223 if (blink) {
224 PutString2(Dest, Font, x+SFont_TextWidth2(Font,text), y, "|");
225 SDL_UpdateRects(Dest, 1, &rect);
226 // SDL_UpdateRect(Dest, x+SFont_TextWidth2(Font,text), y, SFont_TextWidth2(Font,"|"), Font->Surface->h);
227 } else {
228 SDL_BlitSurface( Back, NULL, Dest, &rect);
229 PutString2(Dest, Font, x, y, text);
230 SDL_UpdateRects(Dest, 1, &rect);
231 // SDL_UpdateRect(Dest, x-(Font->CharPos[ofs]-Font->CharPos[ofs-1])/2, y, PixelWidth, Font->Surface->h);
232 }
233 }
234 SDL_Delay(1);
235 SDL_PollEvent(&event);
206 printf("%d\n", ch);
207 printf("%s\n", text);
208 if (event.type == SDL_KEYDOWN) {
209 ch = event.key.keysym.unicode;
210 sym = event.key.keysym.sym;
211 if (((ch>31)||(sym==SDLK_BACKSPACE)) && (ch<128)) {
212 if ((sym==SDLK_BACKSPACE)&&(strlen(text)>0))
213 text[strlen(text)-1]='\0';
214 else if (sym!=SDLK_BACKSPACE)
215 sprintf(text,"%s%c",text,ch);
216 if (SFont_TextWidth2(Font,text)>PixelWidth) text[strlen(text)-1]='\0';
217 SDL_BlitSurface( Back, NULL, Dest, &rect);
218 PutString2(Dest, Font, x, y, text);
219 SDL_UpdateRects(Dest, 1, &rect);
220 // printf("%s ## %d\n",text,strlen(text));
221 SDL_WaitEvent(&event);
222 }
223 }
224 if (SDL_GetTicks()>blinktimer) {
225 blink=1-blink;
226 blinktimer=SDL_GetTicks()+500;
227 if (blink) {
228 PutString2(Dest, Font, x+SFont_TextWidth2(Font,text), y, "|");
229 SDL_UpdateRects(Dest, 1, &rect);
230 // SDL_UpdateRect(Dest, x+SFont_TextWidth2(Font,text), y, SFont_TextWidth2(Font,"|"), Font->Surface->h);
231 } else {
232 SDL_BlitSurface( Back, NULL, Dest, &rect);
233 PutString2(Dest, Font, x, y, text);
234 SDL_UpdateRects(Dest, 1, &rect);
235 // SDL_UpdateRect(Dest, x-(Font->CharPos[ofs]-Font->CharPos[ofs-1])/2, y, PixelWidth, Font->Surface->h);
236 }
237 }
238 SDL_Delay(1);
239 SDL_PollEvent(&event);
236240 }
237241 text[strlen(text)]='\0';
238242 SDL_FreeSurface(Back);
4646 PutString(Screen, 350, 195, "Lion Kimbro (particles) <SnowLion@sprynet.com>");
4747 PutString(Screen, 350, 220, "Graphics:");
4848 PutString(Screen, 350, 235, "Karl Bartel");
49 PutString(Screen, 500, 220, "Backgrounds:");
50 PutString(Screen, 500, 235, "Unknown (see AUTHORS)");
49 PutString(Screen, 500, 220, "Background:");
50 PutString(Screen, 500, 235, "tozzie (www.tozzie-designs.com)");
5151
5252 PutString(Screen, 350, 265, "Packaging:");
5353 PutString(Screen, 350, 280, "Christian T. Steigies (debian)"),
6565 void FinalScore()
6666 {
6767 char Name[200]="",text[200];
68 int ch=SDLK_a,a;
69 SDL_Rect rect;
68 int a;
7069 FILE *file;
7170
7271 if (Score>Hiscore[9]) {
7675 XCenteredString(Screen, 250, text);
7776 XCenteredString(Screen, 300, "Enter Your Name:");
7877 Update();
79 rect.x=0;
80 rect.y=350;
81 rect.w=800;
82 rect.h=100;
83 SDL_EventState(SDL_KEYDOWN, SDL_ENABLE);
84 while ((ch!=SDLK_RETURN)&&(SDL_WaitEvent(&event))) {
85 SDL_PollEvent(&event);
86 if (event.type==SDL_KEYDOWN) {
87 ch=event.key.keysym.unicode;
88 sprintf(Name,"%s%c",Name,ch);
89 if (ch=='\b') Name[strlen(Name)-2]='\0';
90 //printf("%s - %c\n",Name,ch);
91 SDL_BlitSurface( back, &rect, Screen, &rect);
92 PutString(Screen,400-SFont_TextWidth(Name)/2,350,Name);
93 AddThisRect(rect);
94 Update();
95 }
96 SDL_Delay(10);
97 }
98 Name[strlen(Name)-1]='\0';
78 SFont_Input(Screen, 350, 350, 200, Name);
9979 if (strcmp(Name,"")==0) strcpy(Name,"Anonymous Coward");
10080 for (i=0;i<10;i++) {
10181 if (Score>Hiscore[i]) {
111111 unlock();
112112 }
113113
114 void NewParticles(float turn, int X, int Y)
114 void NewParticles(float turn, int X, int Y, float spread_percent)
115115 {
116116 if(( NullParticle < PARTICLES_OF_EXHAUST )&&(particle))
117117 {
128128 ThisParticle->G = ParticleColorsG[ ColorIndex ];
129129 ThisParticle->B = ParticleColorsB[ ColorIndex ];
130130 // Introduce Orthogonal (y, -x) Component
131 switch( user[pl].racernum ) {
132 case 0: // SlowPoke
133 Percent = abrand( -50, 50 );
134 break;
135 case 1: // Normal
136 Percent = abrand( -25, 25 );
137 break;
138 case 2: // Speedy
139 Percent = abrand( -5, 5 );
140 break;
141 case 3: // Spinny
142 Percent = abrand( -60, 60 );
143 break;
144 default: // OOPS!
145 Percent = 0;
146 }
131 Percent = abrand( -spread_percent/2, spread_percent/2 );
147132 turn+=190;
148133 turn+=Percent;
149134 if (turn>360) turn-=360;
77 void UndrawParticles();
88 void HandleParticles();
99 void DisplayParticles();
10 void NewParticles(float turn, int X, int Y);
10 void NewParticles(float turn, int X, int Y, float spread_percent);