~ubuntu-branches/ubuntu/wily/hedgewars/wily

« back to all changes in this revision

Viewing changes to hedgewars/uMobile.pas

  • Committer: Package Import Robot
  • Author(s): Dmitry E. Oboukhov
  • Date: 2011-09-23 10:16:55 UTC
  • mfrom: (1.2.11 upstream)
  • Revision ID: package-import@ubuntu.com-20110923101655-3977th2gc5n0a3pv
Tags: 0.9.16-1
* New upstream version.
 + Downloadable content! Simply click to install any content.
   New voices, hats, maps, themes, translations, music, scripts...
   Hedgewars is now more customisable than ever before! As time goes
   by we will be soliciting community content to feature on this page,
   so remember to check it from time to time. If you decide you want
   to go back to standard Hedgewars, just remove the Data directory
   from your Hedgewars config directory.
 + 3-D rendering! Diorama-like rendering of the game in a variety
   of 3D modes. Let us know which ones work best for you, we didn't
   really have the equipment to test them all.
 + Resizable game window.
 + New utilities! The Time Box will remove one of your hedgehogs
   from the game for a while, protecting from attack until it returns,
   somewhere else on the map. Land spray will allow you to build bridges,
   seal up holes, or just make life unpleasant for your enemies.
 + New single player: Bamboo Thicket, That Sinking Feeling, Newton and
   the Tree and multi-player: The Specialists, Space Invaders,
   Racer - scripts! And a ton more script hooks for scripters
 + New twists on old weapons. Drill strike, seduction and fire have
   been adjusted. Defective mines have been added, rope can attach to
   hogs/crates/barrels again, grenades now have variable bounce (use
   precise key + 1-5). Portal gun is now more usable in flight and
   all game actions are a lot faster.
 + New theme - Golf, dozens of new community hats and a new
   localised Default voice, Ukranian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
(*
2
2
 * Hedgewars, a free turn based strategy game
3
 
 * Copyright (c) 2004-2008 Andrey Korotaev <unC0Rr@gmail.com>
 
3
 * Copyright (c) 2004-2011 Andrey Korotaev <unC0Rr@gmail.com>
4
4
 *
5
5
 * This program is free software; you can redistribute it and/or modify
6
6
 * it under the terms of the GNU General Public License as published by
24
24
{$IFDEF IPHONEOS}
25
25
(*  iOS calls written in ObjcExports.m  *)
26
26
procedure clearView; cdecl; external;
27
 
procedure startSpinning; cdecl; external;
28
 
procedure stopSpinning; cdecl; external;
29
 
procedure replayBegan; cdecl; external;
30
 
procedure replayFinished; cdecl; external;
 
27
procedure startSpinningProgress; cdecl; external;
 
28
procedure stopSpinningProgress; cdecl; external;
 
29
procedure saveBeganSynching; cdecl; external;
 
30
procedure saveFinishedSynching; cdecl; external;
 
31
procedure setGameRunning(arg: boolean); cdecl; external;
31
32
procedure updateVisualsNewTurn; cdecl; external;
32
33
function  isApplePhone: Boolean; cdecl; external;
33
 
function  isAppleDeviceMuted: Boolean; cdecl; external;
34
34
procedure AudioServicesPlaySystemSound(num: LongInt); cdecl; external;
35
35
{$ENDIF}
36
36
function  isPhone: Boolean; inline;
37
 
function  isDeviceMute: Boolean; inline;
38
37
procedure performRumble; inline;
39
 
procedure perfExt_AddProgress; inline;
40
 
procedure perfExt_FinishProgress; inline;
41
 
procedure perfExt_AmmoUpdate; // don't inline
42
 
procedure perfExt_NewTurnBeginning; inline;
43
 
procedure perfExt_SaveBeganSynching; inline;
44
 
procedure perfExt_SaveFinishedSynching; inline;
 
38
 
 
39
procedure GameLoading; inline;
 
40
procedure GameLoaded; inline;
 
41
procedure AmmoUpdate; // don't inline
 
42
procedure NewTurnBeginning; inline;
 
43
procedure SaveBegan; inline;
 
44
procedure SaveFinished; inline;
45
45
 
46
46
implementation
47
47
uses uVariables;
54
54
    exit(false);
55
55
end;
56
56
 
57
 
function isDeviceMute: Boolean; inline;
58
 
begin
59
 
{$IFDEF IPHONEOS}
60
 
//    exit(isAppleDeviceMuted());
61
 
{$ENDIF}
62
 
    exit(false);
63
 
end;
64
 
 
65
57
procedure performRumble; inline;
66
 
begin
67
 
{$IFDEF IPHONEOS}
68
 
    // kSystemSoundID_Vibrate = $00000FFF
69
 
    AudioServicesPlaySystemSound($00000FFF);
70
 
{$ENDIF}
71
 
end;
72
 
 
73
 
procedure perfExt_AddProgress; inline;
74
 
begin
75
 
{$IFDEF IPHONEOS}
76
 
    startSpinning();
77
 
{$ENDIF}
78
 
end;
79
 
 
80
 
procedure perfExt_FinishProgress; inline;
81
 
begin
82
 
{$IFDEF IPHONEOS}
83
 
    stopSpinning();
84
 
{$ENDIF}
85
 
end;
86
 
 
87
 
procedure perfExt_AmmoUpdate; // don't inline
 
58
const kSystemSoundID_Vibrate = $00000FFF;
 
59
begin
 
60
{$IFDEF IPHONEOS}
 
61
    AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
 
62
{$ENDIF}
 
63
end;
 
64
 
 
65
procedure GameLoading; inline;
 
66
begin
 
67
{$IFDEF IPHONEOS}
 
68
    startSpinningProgress();
 
69
{$ENDIF}
 
70
end;
 
71
 
 
72
procedure GameLoaded; inline;
 
73
begin
 
74
{$IFDEF IPHONEOS}
 
75
    stopSpinningProgress();
 
76
{$ENDIF}
 
77
end;
 
78
 
 
79
procedure AmmoUpdate; // don't inline
88
80
begin
89
81
{$IFDEF IPHONEOS}
90
82
    if (CurrentTeam = nil) or
95
87
{$ENDIF}
96
88
end;
97
89
 
98
 
procedure perfExt_NewTurnBeginning; inline;
 
90
procedure NewTurnBeginning; inline;
99
91
begin
100
92
{$IFDEF IPHONEOS}
101
93
    clearView();
102
 
    perfExt_AmmoUpdate();
103
 
{$ENDIF}
104
 
end;
105
 
 
106
 
procedure perfExt_SaveBeganSynching; inline;
107
 
begin
108
 
{$IFDEF IPHONEOS}
109
 
    replayBegan();
110
 
{$ENDIF}
111
 
end;
112
 
 
113
 
procedure perfExt_SaveFinishedSynching; inline;
114
 
begin
115
 
{$IFDEF IPHONEOS}
116
 
    replayFinished();
 
94
{$ENDIF}
 
95
    AmmoUpdate();
 
96
end;
 
97
 
 
98
procedure SaveBegan; inline;
 
99
begin
 
100
{$IFDEF IPHONEOS}
 
101
    saveBeganSynching();
 
102
{$ENDIF}
 
103
end;
 
104
 
 
105
procedure SaveFinished; inline;
 
106
begin
 
107
{$IFDEF IPHONEOS}
 
108
    saveFinishedSynching();
117
109
{$ENDIF}
118
110
end;
119
111