equal
deleted
inserted
replaced
80 GameTicks : LongInt; {xymeng:originally LongWord} |
80 GameTicks : LongInt; {xymeng:originally LongWord} |
81 GameState : TGameState; |
81 GameState : TGameState; |
82 GameType : TGameType; |
82 GameType : TGameType; |
83 InputMask : LongWord; |
83 InputMask : LongWord; |
84 GameFlags : Longword; |
84 GameFlags : Longword; |
|
85 WorldEdge : TWorldEdge; |
85 TurnTimeLeft : Longword; |
86 TurnTimeLeft : Longword; |
86 TagTurnTimeLeft : Longword; |
87 TagTurnTimeLeft : Longword; |
87 ReadyTimeLeft : Longword; |
88 ReadyTimeLeft : Longword; |
88 cSuddenDTurns : LongInt; |
89 cSuddenDTurns : LongInt; |
89 cDamagePercent : LongInt; |
90 cDamagePercent : LongInt; |
2342 procedure preInitModule; |
2343 procedure preInitModule; |
2343 procedure initModule; |
2344 procedure initModule; |
2344 procedure freeModule; |
2345 procedure freeModule; |
2345 |
2346 |
2346 implementation |
2347 implementation |
2347 |
2348 uses strutils; |
2348 |
2349 |
2349 procedure preInitModule; |
2350 procedure preInitModule; |
2350 begin |
2351 begin |
2351 // initialisation flags - they are going to be overwritten by program args |
2352 // initialisation flags - they are going to be overwritten by program args |
2352 |
2353 |
2384 cAudioCodec := ''; |
2385 cAudioCodec := ''; |
2385 {$ENDIF} |
2386 {$ENDIF} |
2386 end; |
2387 end; |
2387 |
2388 |
2388 procedure initModule; |
2389 procedure initModule; |
2389 var s: ShortString; |
|
2390 begin |
2390 begin |
2391 cLocale:= cLocaleFName; |
2391 {$IFDEF PAS2C} |
2392 SplitByChar(cLocale, s, '.'); |
2392 cLocale:= 'en'; |
|
2393 {$ELSE} |
|
2394 // TODO: we could just have one cLocale variables and drop strutils |
|
2395 cLocale:= ExtractDelimited(1, cLocaleFName, StdWordDelims); |
|
2396 {$ENDIF} |
2393 |
2397 |
2394 cFlattenFlakes := false; |
2398 cFlattenFlakes := false; |
2395 cFlattenClouds := false; |
2399 cFlattenClouds := false; |
2396 lastVisualGearByUID := nil; |
2400 lastVisualGearByUID := nil; |
2397 lastGearByUID := nil; |
2401 lastGearByUID := nil; |
2433 IceColor:= ($44 shl RShift) or ($97 shl GShift) or ($A9 shl BShift) or ($A0 shl AShift); |
2437 IceColor:= ($44 shl RShift) or ($97 shl GShift) or ($A9 shl BShift) or ($A0 shl AShift); |
2434 IceEdgeColor:= ($8A shl RShift) or ($AF shl GShift) or ($B2 shl BShift) or ($FF shl AShift); |
2438 IceEdgeColor:= ($8A shl RShift) or ($AF shl GShift) or ($B2 shl BShift) or ($FF shl AShift); |
2435 |
2439 |
2436 WaterOpacity:= $80; |
2440 WaterOpacity:= $80; |
2437 |
2441 |
2438 cDrownSpeed.QWordValue := 257698038; // 0.06 |
2442 cDrownSpeed.QWordValue := 257698038; // 0.06 |
2439 cDrownSpeedf := 0.06; |
2443 cDrownSpeedf := 0.06; |
2440 cMaxWindSpeed.QWordValue:= 1073742; // 0.00025 |
2444 cMaxWindSpeed.QWordValue:= 1073742; // 0.00025 |
2441 cWindSpeed.QWordValue := 0; // 0.0 |
2445 cWindSpeed.QWordValue := 0; // 0.0 |
2442 cWindSpeedf := 0.0; |
2446 cWindSpeedf := 0.0; |
2443 cGravity := cMaxWindSpeed * 2; |
2447 cGravity := cMaxWindSpeed * 2; |
2444 cGravityf := 0.00025 * 2; |
2448 cGravityf := 0.00025 * 2; |
2445 cDamageModifier := _1; |
2449 cDamageModifier := _1; |
2446 TargetPoint := cTargetPointRef; |
2450 TargetPoint := cTargetPointRef; |
2465 cWaterLine := LAND_HEIGHT; |
2469 cWaterLine := LAND_HEIGHT; |
2466 cGearScrEdgesDist := 240; |
2470 cGearScrEdgesDist := 240; |
2467 |
2471 |
2468 InputMask := $FFFFFFFF; |
2472 InputMask := $FFFFFFFF; |
2469 GameFlags := 0; |
2473 GameFlags := 0; |
|
2474 WorldEdge := weNone; |
2470 TurnTimeLeft := 0; |
2475 TurnTimeLeft := 0; |
2471 TagTurnTimeLeft := 0; |
2476 TagTurnTimeLeft := 0; |
2472 cSuddenDTurns := 15; |
2477 cSuddenDTurns := 15; |
2473 cDamagePercent := 100; |
2478 cDamagePercent := 100; |
2474 cRopePercent := 100; |
2479 cRopePercent := 100; |
2484 cHealthCaseProb := 35; |
2489 cHealthCaseProb := 35; |
2485 cHealthCaseAmount := 25; |
2490 cHealthCaseAmount := 25; |
2486 cWaterRise := 47; |
2491 cWaterRise := 47; |
2487 cHealthDecrease := 5; |
2492 cHealthDecrease := 5; |
2488 |
2493 |
2489 cTagsMask := 0; |
|
2490 InitStepsFlags := 0; |
2494 InitStepsFlags := 0; |
2491 RealTicks := 0; |
2495 RealTicks := 0; |
2492 AttackBar := 0; // 0 - none, 1 - just bar at the right-down corner, 2 - from weapon |
2496 AttackBar := 0; // 0 - none, 1 - just bar at the right-down corner, 2 - from weapon |
2493 cCaseFactor := 5; {0..9} |
2497 cCaseFactor := 5; {0..9} |
2494 cLandMines := 4; |
2498 cLandMines := 4; |
2563 // MatrixLoadIdentity(mModelview); |
2567 // MatrixLoadIdentity(mModelview); |
2564 // MatrixLoadIdentity(mProjection); |
2568 // MatrixLoadIdentity(mProjection); |
2565 aVertex:= 0; |
2569 aVertex:= 0; |
2566 aTexCoord:= 1; |
2570 aTexCoord:= 1; |
2567 aColor:= 2; |
2571 aColor:= 2; |
2568 |
|
2569 mobileRecord.getScreenDPI:= @getScreenDPI; //TODO: define external function. |
|
2570 {$IFDEF IPHONEOS} |
|
2571 mobileRecord.PerformRumble:= @AudioServicesPlaySystemSound; |
|
2572 mobileRecord.GameLoading:= @startLoadingIndicator; |
|
2573 mobileRecord.GameLoaded:= @stopLoadingIndicator; |
|
2574 mobileRecord.SaveLoadingEnded:= @saveFinishedSynching; |
|
2575 {$ELSE} |
|
2576 mobileRecord.PerformRumble:= nil; |
|
2577 mobileRecord.GameLoading:= nil; |
|
2578 mobileRecord.GameLoaded:= nil; |
|
2579 mobileRecord.SaveLoadingEnded:= nil; |
|
2580 {$ENDIF} |
|
2581 end; |
2572 end; |
2582 |
2573 |
2583 procedure freeModule; |
2574 procedure freeModule; |
2584 begin |
2575 begin |
2585 end; |
2576 end; |