equal
deleted
inserted
replaced
116 OnDestroy; |
116 OnDestroy; |
117 end; |
117 end; |
118 end; |
118 end; |
119 |
119 |
120 SDL_GL_SwapBuffers(); |
120 SDL_GL_SwapBuffers(); |
|
121 {$IFNDEF IPHONEOS} |
|
122 //not going to make captures on the iPhone |
121 if flagMakeCapture then |
123 if flagMakeCapture then |
122 begin |
124 begin |
123 flagMakeCapture:= false; |
125 flagMakeCapture:= false; |
124 s:= 'hw_' + cSeed + '_' + inttostr(GameTicks) + '.tga'; |
126 s:= 'hw_' + cSeed + '_' + inttostr(GameTicks) + '.tga'; |
125 WriteLnToConsole('Saving ' + s); |
127 WriteLnToConsole('Saving ' + s); |
126 MakeScreenshot(s); |
128 MakeScreenshot(s); |
127 // SDL_SaveBMP_RW(SDLPrimSurface, SDL_RWFromFile(Str2PChar(s), 'wb'), 1) |
129 // SDL_SaveBMP_RW(SDLPrimSurface, SDL_RWFromFile(Str2PChar(s), 'wb'), 1) |
128 end; |
130 end; |
|
131 {$ENDIF} |
129 end; |
132 end; |
130 |
133 |
131 //////////////////// |
134 //////////////////// |
132 procedure OnDestroy; |
135 procedure OnDestroy; |
133 begin |
136 begin |
136 StoreRelease; |
139 StoreRelease; |
137 FreeLand; |
140 FreeLand; |
138 SendKB; |
141 SendKB; |
139 CloseIPC; |
142 CloseIPC; |
140 TTF_Quit; |
143 TTF_Quit; |
|
144 {$IFNDEF IPHONEOS} |
|
145 //i know it is not clean but it is better than a crash |
141 SDL_Quit; |
146 SDL_Quit; |
|
147 {$ENDIF} |
142 halt |
148 halt |
143 end; |
149 end; |
144 |
150 |
145 //////////////////////////////// |
151 //////////////////////////////// |
146 procedure Resize(w, h: LongInt); |
152 procedure Resize(w, h: LongInt); |