65 // HHHandlers.inc |
65 // HHHandlers.inc |
66 // SinTable.inc |
66 // SinTable.inc |
67 // proto.inc |
67 // proto.inc |
68 |
68 |
69 {$IFDEF IPHONEOS} |
69 {$IFDEF IPHONEOS} |
|
70 type arrayofpchar = array[0..6] of PChar; |
70 procedure DoTimer(Lag: LongInt); |
71 procedure DoTimer(Lag: LongInt); |
71 procedure OnDestroy; |
72 procedure OnDestroy; |
72 procedure MainLoop; |
73 procedure MainLoop; |
73 procedure ShowMainWindow; |
74 procedure ShowMainWindow; |
74 procedure Game; cdecl; export; |
75 procedure Game(gameArgs: arrayofpchar); cdecl; export; |
75 procedure initEverything; |
76 procedure initEverything; |
76 procedure freeEverything; |
77 procedure freeEverything; |
77 |
78 |
78 implementation |
79 implementation |
79 |
80 |
131 end; |
132 end; |
132 end; |
133 end; |
133 |
134 |
134 SDL_GL_SwapBuffers(); |
135 SDL_GL_SwapBuffers(); |
135 {$IFNDEF IPHONEOS} |
136 {$IFNDEF IPHONEOS} |
136 // not going to make captures on the iPhone |
137 // not going to make captures on the iPhone |
137 if flagMakeCapture then |
138 if flagMakeCapture then |
138 begin |
139 begin |
139 flagMakeCapture:= false; |
140 flagMakeCapture:= false; |
140 s:= 'hw_' + cSeed + '_' + inttostr(GameTicks) + '.tga'; |
141 s:= 'hw_' + cSeed + '_' + inttostr(GameTicks) + '.tga'; |
141 WriteLnToConsole('Saving ' + s); |
142 WriteLnToConsole('Saving ' + s); |
226 |
231 |
227 val('320', cScreenWidth); |
232 val('320', cScreenWidth); |
228 val('480', cScreenHeight); |
233 val('480', cScreenHeight); |
229 cInitWidth:= cScreenWidth; |
234 cInitWidth:= cScreenWidth; |
230 cInitHeight:= cScreenHeight; |
235 cInitHeight:= cScreenHeight; |
231 cBitsStr:= '16'; |
236 cBitsStr:= '32'; |
232 val(cBitsStr, cBits); |
237 val(cBitsStr, cBits); |
233 val('51432', ipcPort); |
|
234 cFullScreen:= true; |
238 cFullScreen:= true; |
235 isSoundEnabled:= false; |
|
236 cVSyncInUse:= true; |
239 cVSyncInUse:= true; |
237 cLocaleFName:= 'en.txt'; |
|
238 val('100', cInitVolume); |
|
239 val('8', cTimerInterval); |
240 val('8', cTimerInterval); |
240 PathPrefix:= 'Data'; |
241 PathPrefix:= 'Data'; |
|
242 cReducedQuality:= false; |
241 cShowFPS:= true; |
243 cShowFPS:= true; |
242 cAltDamage:= false; |
244 |
243 UserNick:= 'Koda'; //DecodeBase64(ParamStr(15)); |
245 UserNick:= gameArgs[0]; |
244 isMusicEnabled:= false; |
246 val(gameArgs[1], ipcPort); |
245 cReducedQuality:= false; |
247 isSoundEnabled:= gameArgs[2] = '1'; |
|
248 isMusicEnabled:= gameArgs[3] = '1'; |
|
249 cLocaleFName:= gameArgs[4]; |
|
250 val(gameArgs[5], cInitVolume); |
|
251 cAltDamage:= gameArgs[6] = '1'; |
246 {$ENDIF} |
252 {$ENDIF} |
247 |
253 |
248 for p:= Succ(Low(TPathType)) to High(TPathType) do |
254 for p:= Succ(Low(TPathType)) to High(TPathType) do |
249 if p <> ptMapCurrent then Pathz[p]:= PathPrefix + '/' + Pathz[p]; |
255 if p <> ptMapCurrent then Pathz[p]:= PathPrefix + '/' + Pathz[p]; |
250 |
256 |