| 1 | /* ************************************************************************* * |
| 2 | SDL-Ball - DX-Ball/Breakout remake with openGL and SDL for Linux |
| 3 | Copyright (C) 2008 Jimmy Christensen ( dusted at dusted dot dk ) |
| 4 | |
| 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by |
| 7 | the Free Software Foundation, either version 3 of the License, or |
| 8 | (at your option) any later version. |
| 9 | |
| 10 | This program is distributed in the hope that it will be useful, |
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | GNU General Public License for more details. |
| 14 | |
| 15 | You should have received a copy of the GNU General Public License |
| 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 | * ************************************************************************* */ |
| 18 | |
| 19 | class powerupDescriptionClasscxx . . $ powerupDescriptionClass# : public moving_objectcxx . . $ moving_object# { |
| 20 | public: |
| 21 | powerupDescriptionClasscxx . . $ powerupDescriptionClass#powerupDescriptionClass(49f6e7a06ebc5aa8).(); |
| 22 | textureClasscxx . . $ textureClass# *texcxx . . $ powerupDescriptionClass#tex.; |
| 23 | void drawcxx . . $ powerupDescriptionClass#draw(49f6e7a06ebc5aa8).(); |
| 24 | stringcxx . . $ std/string# namecxx . . $ powerupDescriptionClass#name.; |
| 25 | stringcxx . . $ std/string# descriptioncxx . . $ powerupDescriptionClass#description.; |
| 26 | }; |
| 27 | |
| 28 | powerupDescriptionClasscxx . . $ powerupDescriptionClass#::powerupDescriptionClasscxx . . $ powerupDescriptionClass#powerupDescriptionClass(49f6e7a06ebc5aa8).() |
| 29 | { |
| 30 | widthcxx . . $ object#width.=0.055; |
| 31 | heightcxx . . $ object#height.=0.055; |
| 32 | } |
| 33 | |
| 34 | void powerupDescriptionClasscxx . . $ powerupDescriptionClass#::drawcxx . . $ powerupDescriptionClass#draw(49f6e7a06ebc5aa8).() |
| 35 | { |
| 36 | texcxx . . $ powerupDescriptionClass#tex.->playcxx . . $ textureClass#play(49f6e7a06ebc5aa8).(); |
| 37 | glBindTexture( GL_TEXTURE_2Dcxx . . $ `<external>/11565930711847777359/gl.h:611:9`!, texcxx . . $ powerupDescriptionClass#tex.->propcxx . . $ textureClass#prop..texturecxx . . $ texProp#texture.); |
| 38 | glColor4f(texcxx . . $ powerupDescriptionClass#tex.->propcxx . . $ textureClass#prop..glTexColorInfocxx . . $ texProp#glTexColorInfo.[0],texcxx . . $ powerupDescriptionClass#tex.->propcxx . . $ textureClass#prop..glTexColorInfocxx . . $ texProp#glTexColorInfo.[1],texcxx . . $ powerupDescriptionClass#tex.->propcxx . . $ textureClass#prop..glTexColorInfocxx . . $ texProp#glTexColorInfo.[2],texcxx . . $ powerupDescriptionClass#tex.->propcxx . . $ textureClass#prop..glTexColorInfocxx . . $ texProp#glTexColorInfo.[3]); |
| 39 | glBegin( GL_QUADScxx . . $ `<external>/11565930711847777359/gl.h:163:9`! ); |
| 40 | glTexCoord2f(texcxx . . $ powerupDescriptionClass#tex.->poscxx . . $ textureClass#pos.[0],texcxx . . $ powerupDescriptionClass#tex.->poscxx . . $ textureClass#pos.[1]);glVertex3f( -widthcxx . . $ object#width.+posxcxx . . $ object#posx., heightcxx . . $ object#height.+posycxx . . $ object#posy., 0.00 ); // øverst venst |
| 41 | glTexCoord2f(texcxx . . $ powerupDescriptionClass#tex.->poscxx . . $ textureClass#pos.[2],texcxx . . $ powerupDescriptionClass#tex.->poscxx . . $ textureClass#pos.[3]);glVertex3f( widthcxx . . $ object#width.+posxcxx . . $ object#posx., heightcxx . . $ object#height.+posycxx . . $ object#posy., 0.00 ); // øverst højre |
| 42 | glTexCoord2f(texcxx . . $ powerupDescriptionClass#tex.->poscxx . . $ textureClass#pos.[4],texcxx . . $ powerupDescriptionClass#tex.->poscxx . . $ textureClass#pos.[5]);glVertex3f( widthcxx . . $ object#width.+posxcxx . . $ object#posx.,-heightcxx . . $ object#height.+posycxx . . $ object#posy., 0.00 ); // nederst højre |
| 43 | glTexCoord2f(texcxx . . $ powerupDescriptionClass#tex.->poscxx . . $ textureClass#pos.[6],texcxx . . $ powerupDescriptionClass#tex.->poscxx . . $ textureClass#pos.[7]);glVertex3f( -widthcxx . . $ object#width.+posxcxx . . $ object#posx.,-heightcxx . . $ object#height.+posycxx . . $ object#posy., 0.00 ); // nederst venstre |
| 44 | glEnd( ); |
| 45 | |
| 46 | glColor4f(1.0, 1.0, 1.0, 1.0); |
| 47 | //Write her |
| 48 | glTextcxx . . $ glText.->writecxx . . $ glTextClass#write(e3805d4e487d2eea).(namecxx . . $ std/__cxx11/basic_string#basic_string(a47f53d4115f6ce5)., FONT_INTRODESCRIPTIONcxx . . $ `text.cpp:25:9`!, 0, 1.0, posxcxx . . $ object#posx.+widthcxx . . $ object#width., posycxx . . $ object#posy.+(glTextcxx . . $ glText.->getHeightcxx . . $ glTextClass#getHeight(5cde91ea12d43f46).(FONT_INTRODESCRIPTIONcxx . . $ `text.cpp:25:9`!)/2.0)); |
| 49 | glTextcxx . . $ glText.->writecxx . . $ glTextClass#write(e3805d4e487d2eea).(descriptioncxx . . $ std/__cxx11/basic_string#basic_string(a47f53d4115f6ce5)., FONT_INTRODESCRIPTIONcxx . . $ `text.cpp:25:9`!, 0, 1.0, posxcxx . . $ object#posx.+widthcxx . . $ object#width., posycxx . . $ object#posy.-(glTextcxx . . $ glText.->getHeightcxx . . $ glTextClass#getHeight(5cde91ea12d43f46).(FONT_INTRODESCRIPTIONcxx . . $ `text.cpp:25:9`!)/2.0)); |
| 50 | } |
| 51 | |
| 52 | class titleScreenClasscxx . . $ titleScreenClass# { |
| 53 | private: |
| 54 | effectManagercxx . . $ effectManager# *fxMancxx . . $ titleScreenClass#fxMan.; |
| 55 | int ticksSinceLastSpawncxx . . $ titleScreenClass#ticksSinceLastSpawn.; |
| 56 | textureManagercxx . . $ textureManager# texMgrcxx . . $ titleScreenClass#texMgr.; |
| 57 | textureClasscxx . . $ textureClass# texTitlecxx . . $ titleScreenClass#texTitle.; |
| 58 | textureClasscxx . . $ textureClass# *texPowerupscxx . . $ titleScreenClass#texPowerups.; |
| 59 | GLuint glTitleListcxx . . $ titleScreenClass#glTitleList.; |
| 60 | float rotcxx . . $ titleScreenClass#rot.; |
| 61 | bool rotDircxx . . $ titleScreenClass#rotDir.; |
| 62 | powerupDescriptionClasscxx . . $ powerupDescriptionClass# powerUpcxx . . $ titleScreenClass#powerUp.[MAXPOTEXTUREScxx . . $ `main.cpp:105:9`!]; |
| 63 | int numHighScorescxx . . $ titleScreenClass#numHighScores.; //Number of highscores to show in the intro |
| 64 | struct poscxx . . $ pos# runnerPoscxx . . $ titleScreenClass#runnerPos.; |
| 65 | menuClasscxx . . $ menuClass# *menucxx . . $ titleScreenClass#menu.; //Here is the highscore text |
| 66 | int runnerTimecxx . . $ titleScreenClass#runnerTime.; |
| 67 | float runnerVelXcxx . . $ titleScreenClass#runnerVelX.,runnerVelYcxx . . $ titleScreenClass#runnerVelY.; |
| 68 | int hilightcxx . . $ titleScreenClass#hilight.; |
| 69 | bool hilightDircxx . . $ titleScreenClass#hilightDir.; |
| 70 | int hilightTimecxx . . $ titleScreenClass#hilightTime.; |
| 71 | void readDescriptionscxx . . $ titleScreenClass#readDescriptions(3046940a70e99338).(powerupDescriptionClasscxx . . $ powerupDescriptionClass# po[]); |
| 72 | public: |
| 73 | titleScreenClasscxx . . $ titleScreenClass#titleScreenClass(a1505940727949d7).(effectManagercxx . . $ effectManager# *m, textureClasscxx . . $ textureClass# tp[], menuClasscxx . . $ menuClass# *me); |
| 74 | void drawcxx . . $ titleScreenClass#draw(ce8f7825f8908cfa).(int * frameAge, int * maxFrameAge); |
| 75 | }; |
| 76 | |
| 77 | titleScreenClasscxx . . $ titleScreenClass#::titleScreenClasscxx . . $ titleScreenClass#titleScreenClass(a1505940727949d7).(effectManagercxx . . $ effectManager# *m, textureClasscxx . . $ textureClass# tp[], menuClasscxx . . $ menuClass# *me) |
| 78 | { |
| 79 | menucxx . . $ titleScreenClass#menu. = me; |
| 80 | numHighScorescxx . . $ titleScreenClass#numHighScores.=7; |
| 81 | texPowerupscxx . . $ titleScreenClass#texPowerups. = tp; |
| 82 | fxMancxx . . $ titleScreenClass#fxMan. = m; |
| 83 | ticksSinceLastSpawncxx . . $ titleScreenClass#ticksSinceLastSpawn.=100; |
| 84 | texMgrcxx . . $ titleScreenClass#texMgr..loadcxx . . $ textureManager#load(48e1aaff0e117402).(useThemecxx . . $ useTheme(24764cae04130674).("/gfx/title/title.png"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).,settingcxx . . $ std/__cxx11/basic_string#basic_string(a47f53d4115f6ce5)..gfxThemecxx . . $ settings#gfxTheme.), texTitlecxx . . $ titleScreenClass#texTitle.); |
| 85 | glTitleListcxx . . $ titleScreenClass#glTitleList. = glGenLists(1); |
| 86 | glNewList(glTitleListcxx . . $ titleScreenClass#glTitleList., GL_COMPILEcxx . . $ `<external>/11565930711847777359/gl.h:252:9`!); |
| 87 | glBindTexture(GL_TEXTURE_2Dcxx . . $ `<external>/11565930711847777359/gl.h:611:9`!, texTitlecxx . . $ titleScreenClass#texTitle..propcxx . . $ textureClass#prop..texturecxx . . $ texProp#texture.); |
| 88 | glBegin( GL_QUADScxx . . $ `<external>/11565930711847777359/gl.h:163:9`! ); |
| 89 | for(int i=0; i < 32; i++) |
| 90 | { |
| 91 | glColor4f(1,1,1,0.1); |
| 92 | glTexCoord2f(0.0, 0.0); glVertex3f(-1.2,1.15, 0.005*i ); |
| 93 | glTexCoord2f(1.0, 0.0); glVertex3f( 1.2,1.15, 0.005*i ); |
| 94 | glColor4f(0,0,1,0.00); |
| 95 | glTexCoord2f(1.0, 1.0); glVertex3f( 1.2, 0.75, 0.005*i ); |
| 96 | glTexCoord2f(0.0, 1.0); glVertex3f(-1.2, 0.75, 0.005*i ); |
| 97 | } |
| 98 | glEnd( ); |
| 99 | glEndList(); |
| 100 | |
| 101 | |
| 102 | for(int ii = 0; ii < 3; ii++) |
| 103 | { |
| 104 | for(int i=0; i < 7; i++) |
| 105 | { |
| 106 | powerUpcxx . . $ titleScreenClass#powerUp.[i+(7*ii)].texcxx . . $ powerupDescriptionClass#tex. = &texPowerupscxx . . $ titleScreenClass#texPowerups.[i+(7*ii)]; |
| 107 | powerUpcxx . . $ titleScreenClass#powerUp.[i+(7*ii)].posxcxx . . $ object#posx. = -1.5 + (0.8*ii); |
| 108 | powerUpcxx . . $ titleScreenClass#powerUp.[i+(7*ii)].posycxx . . $ object#posy. = -0.35 - (0.135*i); |
| 109 | } |
| 110 | } |
| 111 | readDescriptionscxx . . $ titleScreenClass#readDescriptions(3046940a70e99338).(powerUpcxx . . $ titleScreenClass#powerUp.); |
| 112 | |
| 113 | |
| 114 | runnerPoscxx . . $ titleScreenClass#runnerPos..xcxx . . $ pos#x.=0.0; |
| 115 | runnerPoscxx . . $ titleScreenClass#runnerPos..ycxx . . $ pos#y.=0.66; |
| 116 | runnerVelXcxx . . $ titleScreenClass#runnerVelX. = rndfltcxx . . $ rndflt(d59a45cd3bfd2eda).(2,1)+2; |
| 117 | runnerVelYcxx . . $ titleScreenClass#runnerVelY. = rndfltcxx . . $ rndflt(d59a45cd3bfd2eda).(2,1)+2; |
| 118 | runnerTimecxx . . $ titleScreenClass#runnerTime.=0; |
| 119 | |
| 120 | hilightcxx . . $ titleScreenClass#hilight.=0; |
| 121 | hilightDircxx . . $ titleScreenClass#hilightDir.=1; |
| 122 | hilightTimecxx . . $ titleScreenClass#hilightTime.=0; |
| 123 | } |
| 124 | |
| 125 | int deltacxx . . $ delta(9b79fb6aee4c0440).(int a, int b) |
| 126 | { |
| 127 | if(a >= b) |
| 128 | { |
| 129 | return(a-b); |
| 130 | } else { |
| 131 | return(b-a); |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | void titleScreenClasscxx . . $ titleScreenClass#::drawcxx . . $ titleScreenClass#draw(ce8f7825f8908cfa).(int * frameAge, int * maxFrameAge) |
| 136 | { |
| 137 | poscxx . . $ pos# p,s; |
| 138 | if(*frameAge >= *maxFrameAge) |
| 139 | { |
| 140 | soundMancxx . . $ soundMan..playcxx . . $ soundClass#play(49f6e7a06ebc5aa8).(); |
| 141 | |
| 142 | if(varcxx . . $ var..clearScreencxx . . $ vars#clearScreen.) |
| 143 | { |
| 144 | glClear( GL_COLOR_BUFFER_BITcxx . . $ `<external>/11565930711847777359/gl.h:682:9`! | GL_DEPTH_BUFFER_BITcxx . . $ `<external>/11565930711847777359/gl.h:676:9`!); |
| 145 | } |
| 146 | glEnable(GL_TEXTURE_2Dcxx . . $ `<external>/11565930711847777359/gl.h:611:9`!); |
| 147 | |
| 148 | ticksSinceLastSpawncxx . . $ titleScreenClass#ticksSinceLastSpawn. +=globalTicksSinceLastDrawcxx . . $ globalTicksSinceLastDraw.; |
| 149 | if(ticksSinceLastSpawncxx . . $ titleScreenClass#ticksSinceLastSpawn. > 125) |
| 150 | { |
| 151 | s.xcxx . . $ pos#x. = 3.25; |
| 152 | s.ycxx . . $ pos#y. = 0.525; |
| 153 | p.xcxx . . $ pos#x. = 0; |
| 154 | p.ycxx . . $ pos#y. = 1; |
| 155 | |
| 156 | ticksSinceLastSpawncxx . . $ titleScreenClass#ticksSinceLastSpawn.=0; |
| 157 | fxMancxx . . $ titleScreenClass#fxMan.->setcxx . . $ effectManager#set(3e454b8ccf442868).(FX_VAR_TYPEcxx . . $ `declerations.h:26:9`!, FX_PARTICLEFIELDcxx . . $ `declerations.h:24:9`!); |
| 158 | fxMancxx . . $ titleScreenClass#fxMan.->setcxx . . $ effectManager#set(3e454b8ccf442868).(FX_VAR_COLDETcxx . . $ `declerations.h:34:9`!, 0); |
| 159 | fxMancxx . . $ titleScreenClass#fxMan.->setcxx . . $ effectManager#set(3e454b8ccf442868).(FX_VAR_LIFEcxx . . $ `declerations.h:32:9`!, 1500); |
| 160 | fxMancxx . . $ titleScreenClass#fxMan.->setcxx . . $ effectManager#set(3e454b8ccf442868).(FX_VAR_NUMcxx . . $ `declerations.h:28:9`!, 50); |
| 161 | fxMancxx . . $ titleScreenClass#fxMan.->setcxx . . $ effectManager#set(43c79ee2f1b9aefe).(FX_VAR_SIZEcxx . . $ `declerations.h:31:9`!, 0.01f); |
| 162 | fxMancxx . . $ titleScreenClass#fxMan.->setcxx . . $ effectManager#set(43c79ee2f1b9aefe).(FX_VAR_SPEEDcxx . . $ `declerations.h:29:9`!, 0.0f); |
| 163 | fxMancxx . . $ titleScreenClass#fxMan.->setcxx . . $ effectManager#set(43c79ee2f1b9aefe).(FX_VAR_GRAVITYcxx . . $ `declerations.h:33:9`!, 0.0f); |
| 164 | fxMancxx . . $ titleScreenClass#fxMan.->setcxx . . $ effectManager#set(44070346f71a048b).(FX_VAR_RECTANGLEcxx . . $ `declerations.h:37:9`!, s); |
| 165 | fxMancxx . . $ titleScreenClass#fxMan.->setcxx . . $ effectManager#set(a8f6e5be37b619e5).(FX_VAR_COLORcxx . . $ `declerations.h:35:9`!, 1.0f, 1.0f, 1.0f); |
| 166 | fxMancxx . . $ titleScreenClass#fxMan.->spawncxx . . $ effectManager#spawn(ea74e5119cae6502).(p); |
| 167 | } |
| 168 | fxMancxx . . $ titleScreenClass#fxMan.->drawcxx . . $ effectManager#draw(49f6e7a06ebc5aa8).(); |
| 169 | |
| 170 | int i; |
| 171 | glLoadIdentity(); |
| 172 | glTranslatef(0.0, 0.0, -3.0); |
| 173 | |
| 174 | for(i=0; i < MAXPOTEXTUREScxx . . $ `main.cpp:105:9`!; i++) |
| 175 | { |
| 176 | powerUpcxx . . $ titleScreenClass#powerUp.[i].drawcxx . . $ powerupDescriptionClass#draw(49f6e7a06ebc5aa8).(); |
| 177 | } |
| 178 | |
| 179 | runnerTimecxx . . $ titleScreenClass#runnerTime.+=globalTicksSinceLastDrawcxx . . $ globalTicksSinceLastDraw.; |
| 180 | if(runnerTimecxx . . $ titleScreenClass#runnerTime.>10) |
| 181 | { |
| 182 | fxMancxx . . $ titleScreenClass#fxMan.->setcxx . . $ effectManager#set(3e454b8ccf442868).(FX_VAR_TYPEcxx . . $ `declerations.h:26:9`!, FX_SPARKScxx . . $ `declerations.h:21:9`!); |
| 183 | fxMancxx . . $ titleScreenClass#fxMan.->setcxx . . $ effectManager#set(3e454b8ccf442868).(FX_VAR_COLDETcxx . . $ `declerations.h:34:9`!,0); |
| 184 | fxMancxx . . $ titleScreenClass#fxMan.->setcxx . . $ effectManager#set(3e454b8ccf442868).(FX_VAR_LIFEcxx . . $ `declerations.h:32:9`!, 250); |
| 185 | fxMancxx . . $ titleScreenClass#fxMan.->setcxx . . $ effectManager#set(3e454b8ccf442868).(FX_VAR_NUMcxx . . $ `declerations.h:28:9`!, 2); |
| 186 | fxMancxx . . $ titleScreenClass#fxMan.->setcxx . . $ effectManager#set(43c79ee2f1b9aefe).(FX_VAR_SIZEcxx . . $ `declerations.h:31:9`!, 0.09f); |
| 187 | fxMancxx . . $ titleScreenClass#fxMan.->setcxx . . $ effectManager#set(43c79ee2f1b9aefe).(FX_VAR_SPEEDcxx . . $ `declerations.h:29:9`!, 0.5f); |
| 188 | fxMancxx . . $ titleScreenClass#fxMan.->setcxx . . $ effectManager#set(43c79ee2f1b9aefe).(FX_VAR_GRAVITYcxx . . $ `declerations.h:33:9`!, -0.4f); |
| 189 | |
| 190 | fxMancxx . . $ titleScreenClass#fxMan.->setcxx . . $ effectManager#set(a8f6e5be37b619e5).(FX_VAR_COLORcxx . . $ `declerations.h:35:9`!, 1.0f, 0.7f, 0.0f); |
| 191 | fxMancxx . . $ titleScreenClass#fxMan.->spawncxx . . $ effectManager#spawn(ea74e5119cae6502).(runnerPoscxx . . $ titleScreenClass#runnerPos.); |
| 192 | fxMancxx . . $ titleScreenClass#fxMan.->setcxx . . $ effectManager#set(a8f6e5be37b619e5).(FX_VAR_COLORcxx . . $ `declerations.h:35:9`!, 1.0f, 0.8f, 0.0f); |
| 193 | fxMancxx . . $ titleScreenClass#fxMan.->spawncxx . . $ effectManager#spawn(ea74e5119cae6502).(runnerPoscxx . . $ titleScreenClass#runnerPos.); |
| 194 | fxMancxx . . $ titleScreenClass#fxMan.->setcxx . . $ effectManager#set(a8f6e5be37b619e5).(FX_VAR_COLORcxx . . $ `declerations.h:35:9`!, 1.0f, 0.9f, 0.0f); |
| 195 | fxMancxx . . $ titleScreenClass#fxMan.->spawncxx . . $ effectManager#spawn(ea74e5119cae6502).(runnerPoscxx . . $ titleScreenClass#runnerPos.); |
| 196 | fxMancxx . . $ titleScreenClass#fxMan.->setcxx . . $ effectManager#set(a8f6e5be37b619e5).(FX_VAR_COLORcxx . . $ `declerations.h:35:9`!, 1.0f, 1.0f, 0.0f); |
| 197 | fxMancxx . . $ titleScreenClass#fxMan.->spawncxx . . $ effectManager#spawn(ea74e5119cae6502).(runnerPoscxx . . $ titleScreenClass#runnerPos.); |
| 198 | |
| 199 | runnerPoscxx . . $ titleScreenClass#runnerPos..xcxx . . $ pos#x. += runnerVelXcxx . . $ titleScreenClass#runnerVelX.*(runnerTimecxx . . $ titleScreenClass#runnerTime./1000.0); |
| 200 | runnerPoscxx . . $ titleScreenClass#runnerPos..ycxx . . $ pos#y. += runnerVelYcxx . . $ titleScreenClass#runnerVelY.*(runnerTimecxx . . $ titleScreenClass#runnerTime./1000.0); |
| 201 | if(runnerPoscxx . . $ titleScreenClass#runnerPos..xcxx . . $ pos#x. > 1.64 && runnerVelXcxx . . $ titleScreenClass#runnerVelX. > 0) |
| 202 | { |
| 203 | runnerVelXcxx . . $ titleScreenClass#runnerVelX. *= -1; |
| 204 | } |
| 205 | if(runnerPoscxx . . $ titleScreenClass#runnerPos..xcxx . . $ pos#x. < -1.64 && runnerVelXcxx . . $ titleScreenClass#runnerVelX. < 0) |
| 206 | { |
| 207 | runnerVelXcxx . . $ titleScreenClass#runnerVelX. *= -1; |
| 208 | } |
| 209 | |
| 210 | if(runnerPoscxx . . $ titleScreenClass#runnerPos..ycxx . . $ pos#y. > 1.24 && runnerVelYcxx . . $ titleScreenClass#runnerVelY. > 0) |
| 211 | { |
| 212 | runnerVelYcxx . . $ titleScreenClass#runnerVelY. *= -1; |
| 213 | } |
| 214 | |
| 215 | if(runnerPoscxx . . $ titleScreenClass#runnerPos..ycxx . . $ pos#y. < -1.24 && runnerVelYcxx . . $ titleScreenClass#runnerVelY. < 0) |
| 216 | { |
| 217 | runnerVelYcxx . . $ titleScreenClass#runnerVelY. *= -1; |
| 218 | } |
| 219 | runnerTimecxx . . $ titleScreenClass#runnerTime.=0; |
| 220 | } |
| 221 | |
| 222 | hilightTimecxx . . $ titleScreenClass#hilightTime. += globalTicksSinceLastDrawcxx . . $ globalTicksSinceLastDraw.; |
| 223 | if(hilightTimecxx . . $ titleScreenClass#hilightTime. > 50) |
| 224 | { |
| 225 | if(hilightDircxx . . $ titleScreenClass#hilightDir.) |
| 226 | { |
| 227 | hilightcxx . . $ titleScreenClass#hilight.++; |
| 228 | if(hilightcxx . . $ titleScreenClass#hilight. == numHighScorescxx . . $ titleScreenClass#numHighScores.*3)//-1) |
| 229 | { |
| 230 | hilightcxx . . $ titleScreenClass#hilight.= numHighScorescxx . . $ titleScreenClass#numHighScores.-1; |
| 231 | hilightDircxx . . $ titleScreenClass#hilightDir.=0; |
| 232 | } |
| 233 | } else { |
| 234 | hilightcxx . . $ titleScreenClass#hilight.--; |
| 235 | if(hilightcxx . . $ titleScreenClass#hilight. == -numHighScorescxx . . $ titleScreenClass#numHighScores.*2) |
| 236 | { |
| 237 | hilightDircxx . . $ titleScreenClass#hilightDir.=1; |
| 238 | hilightcxx . . $ titleScreenClass#hilight.=0; |
| 239 | } |
| 240 | } |
| 241 | hilightTimecxx . . $ titleScreenClass#hilightTime.=0; |
| 242 | } |
| 243 | |
| 244 | glTranslatef(0.0, 0.59, 0.0); |
| 245 | float a; |
| 246 | for(i=0; i < numHighScorescxx . . $ titleScreenClass#numHighScores.; i++) |
| 247 | { |
| 248 | if((hilightDircxx . . $ titleScreenClass#hilightDir. && i < hilightcxx . . $ titleScreenClass#hilight.+1) || (!hilightDircxx . . $ titleScreenClass#hilightDir. && i > hilightcxx . . $ titleScreenClass#hilight.-1)) |
| 249 | { |
| 250 | a=1.0-((1.0/(float)(numHighScorescxx . . $ titleScreenClass#numHighScores.*2))*(deltacxx . . $ delta(9b79fb6aee4c0440).(hilightcxx . . $ titleScreenClass#hilight.,i))); |
| 251 | glColor4f(1,1,1,a); |
| 252 | glTextcxx . . $ glText.->writecxx . . $ glTextClass#write(e3805d4e487d2eea).(menucxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).->highScorescxx . . $ menuClass#highScores.[i], FONT_INTROHIGHSCOREcxx . . $ `text.cpp:24:9`!, 1, 1.0, 0.0, 0.0); |
| 253 | } |
| 254 | glTranslatef(0.0,-glTextcxx . . $ glText.->getHeightcxx . . $ glTextClass#getHeight(5cde91ea12d43f46).(FONT_INTROHIGHSCOREcxx . . $ `text.cpp:24:9`!),0.0); |
| 255 | } |
| 256 | |
| 257 | //Draw the info string with website and version |
| 258 | glColor4f(1,1,0,1); |
| 259 | glTextcxx . . $ glText.->writecxx . . $ glTextClass#write(e3805d4e487d2eea).("Visit http://sdl-ball.sf.net/ for info, help and updates!"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d)., FONT_INTROHIGHSCOREcxx . . $ `text.cpp:24:9`!, 1, 1.0, 0,0); |
| 260 | |
| 261 | if(!rotDircxx . . $ titleScreenClass#rotDir.) |
| 262 | { |
| 263 | rotcxx . . $ titleScreenClass#rot. += 0.01 * globalTicksSinceLastDrawcxx . . $ globalTicksSinceLastDraw.; |
| 264 | if(rotcxx . . $ titleScreenClass#rot. > 40) |
| 265 | { |
| 266 | rotDircxx . . $ titleScreenClass#rotDir.=1; |
| 267 | } |
| 268 | } else { |
| 269 | rotcxx . . $ titleScreenClass#rot. -= 0.01 * globalTicksSinceLastDrawcxx . . $ globalTicksSinceLastDraw.; |
| 270 | if(rotcxx . . $ titleScreenClass#rot. < -40) |
| 271 | { |
| 272 | rotDircxx . . $ titleScreenClass#rotDir.=0; |
| 273 | } |
| 274 | } |
| 275 | glLoadIdentity(); |
| 276 | |
| 277 | glTranslatef(0.0,0.0,-3.0); |
| 278 | |
| 279 | glRotatef(20, 1,0,0); |
| 280 | glRotatef(rotcxx . . $ titleScreenClass#rot., 0,1,0); |
| 281 | glCallList(glTitleListcxx . . $ titleScreenClass#glTitleList.); |
| 282 | |
| 283 | SDL_GL_SwapBuffers( ); |
| 284 | |
| 285 | globalTicksSinceLastDrawcxx . . $ globalTicksSinceLastDraw.=0; |
| 286 | globalMilliTicksSinceLastDrawcxx . . $ globalMilliTicksSinceLastDraw.=0; |
| 287 | *frameAge = 0; |
| 288 | |
| 289 | } |
| 290 | } |
| 291 | |
| 292 | |
| 293 | void titleScreenClasscxx . . $ titleScreenClass#::readDescriptionscxx . . $ titleScreenClass#readDescriptions(3046940a70e99338).(powerupDescriptionClasscxx . . $ powerupDescriptionClass# po[]) |
| 294 | { |
| 295 | ifstreamcxx . . $ std/ifstream# fcxx . . $ std/basic_ifstream#basic_ifstream(49f6e7a06ebc5aa8).; |
| 296 | stringcxx . . $ std/string# linecxx . . $ std/__cxx11/basic_string#basic_string(925dcc5e17f50391).; |
| 297 | int p=0; |
| 298 | bool flip=0; |
| 299 | |
| 300 | f.opencxx . . $ std/basic_ifstream#open(b8cd37071ce335df).( useThemecxx . . $ useTheme(24764cae04130674).("/powerupdescriptions.txt"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d)., settingcxx . . $ std/__cxx11/basic_string#basic_string(a47f53d4115f6ce5)..gfxThemecxx . . $ settings#gfxTheme.).datacxx . . $ std/__cxx11/basic_string#data(258ee1c9e0a18a5c).() ); |
| 301 | if(f.is_opencxx . . $ std/basic_ifstream#is_open(c9857a73d68e59ba).()) |
| 302 | { |
| 303 | while(!f.eofcxx . . $ std/basic_ios#eof(50ce9a9e25b4a850).()) |
| 304 | { |
| 305 | getlinecxx . . $ std/getline(4ec722ed0b69c2ab).(f, line); |
| 306 | if(!flip) |
| 307 | { |
| 308 | flip=1; |
| 309 | po[p].namecxx . . $ powerupDescriptionClass#name.=cxx . . $ std/__cxx11/basic_string#`operator=`(c0b47be1fddc0e75).line; |
| 310 | } else { |
| 311 | flip=0; |
| 312 | po[p].descriptioncxx . . $ powerupDescriptionClass#description.=cxx . . $ std/__cxx11/basic_string#`operator=`(c0b47be1fddc0e75).line; |
| 313 | p++; |
| 314 | } |
| 315 | if(p == MAXPOTEXTUREScxx . . $ `main.cpp:105:9`!) |
| 316 | break; |
| 317 | } |
| 318 | f.closecxx . . $ std/basic_ifstream#close(49f6e7a06ebc5aa8).(); |
| 319 | } else { |
| 320 | coutcxx . . $ std/cout. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "Could not open powerupdescriptions"<<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a).endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 321 | } |
| 322 | } |
| 323 |