~ubuntu-branches/ubuntu/quantal/hedgewars/quantal

« back to all changes in this revision

Viewing changes to hedgewars/uMobile.pas

  • Committer: Bazaar Package Importer
  • Author(s): Dmitry E. Oboukhov
  • Date: 2010-11-14 22:45:48 UTC
  • mfrom: (1.2.9 upstream)
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: james.westby@ubuntu.com-20101114224548-tntbfzxa8qo9lhpn
* New upstream version.
 + New audio tracks
 + New forts: EvilChicken, Tank
 + New game modes: AI Survival Mode, Per Hedgehog Ammo,
   Reset Health, Reset Weapons, Unlimited Attacks
 + New grave: ring
 + Over 30 new hats
 + New themes: Art, Brick, Jungle, Stage
 + New maps: ShoppaKing, Sticks, TrophyRace (Mission)
 + New utilities: Portal Gun, Resurrector
 + New weapons: Flamethrower, Hammer, Old Limburger,
   Piano Strike, Sticky Mines
 + Weapons' projectiles will how be launched from their
   barrels instead of the hog's center
 + Flying Saucers may be used for moving below the water surface
 + New default game schemes: Clean Slate, Fort Mode, Timeless,
   Thinking with Portals, King Mode
 + New default weapon set: Clean Slate, Thinking with Portals
 + Bomb clusters/Melon parts inherit some of the original bomb's speed
 + Extended game statistics
 + Improved health bar updating
 + Hogs that blow themselves up will use triggers in they team color
 + Settings allow better control over the level of details/effects
 + Improved Lua support
 + On empty ammo switch to no weapon rather than the first available
   one (to avoid shooting by accident)
 + Display of hints in the frontend
 + Some improvements of existing Themes of Maps
 + Land destruction effects added
 + Improved fire effects
 + Improved Melon explosion effects
 + Online game lobby now features game filters
 + Other Frontend enhancements
 + Additional sounds
 + Show special game rules in Esc screen
 + Updated translation
 + Speed optimizations
 + Hedgewars will now use a sub directory of "My Documents"
   like other games instead of "%userprofile%/.hedgewars" under Windows
 + Added support for graphics cards/drivers that have a 512x512
   pixel textures limit
 + Team colors are more distinguishable from each other now
 * Fixed bug that allowed charging a weapon while on rope,
   leading to frozen timer
 * Various bug fixes
* Switched to 3.0 source format.
* Switched to cdbs build system.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
(*
 
2
 * Hedgewars, a free turn based strategy game
 
3
 * Copyright (c) 2004-2008 Andrey Korotaev <unC0Rr@gmail.com>
 
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; version 2 of the License
 
8
 *
 
9
 * This program is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 * GNU General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU General Public License
 
15
 * along with this program; if not, write to the Free Software
 
16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
 
17
 *)
 
18
 
 
19
{$INCLUDE "options.inc"}
 
20
 
 
21
unit uMobile;
 
22
interface
 
23
 
 
24
{$IFDEF IPHONEOS}
 
25
(*  iOS calls written in ObjcExports.m  *)
 
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;
 
31
procedure updateVisualsNewTurn; cdecl; external;
 
32
function  isApplePhone: Boolean; cdecl; external;
 
33
procedure AudioServicesPlaySystemSound(num: LongInt); cdecl; external;
 
34
{$ENDIF}
 
35
function  isPhone: Boolean; inline;
 
36
procedure performRumble; inline;
 
37
procedure perfExt_AddProgress; inline;
 
38
procedure perfExt_FinishProgress; inline;
 
39
procedure perfExt_AmmoUpdate; // don't inline
 
40
procedure perfExt_NewTurnBeginning; inline;
 
41
procedure perfExt_SaveBeganSynching; inline;
 
42
procedure perfExt_SaveFinishedSynching; inline;
 
43
 
 
44
implementation
 
45
uses uTeams, uConsole;
 
46
 
 
47
function isPhone: Boolean; inline;
 
48
begin
 
49
{$IFDEF IPHONEOS}
 
50
    exit(isApplePhone());
 
51
{$ENDIF}
 
52
    exit(false);
 
53
end;
 
54
 
 
55
procedure performRumble; inline;
 
56
begin
 
57
{$IFDEF IPHONEOS}
 
58
    // kSystemSoundID_Vibrate = $00000FFF
 
59
    AudioServicesPlaySystemSound($00000FFF);
 
60
{$ENDIF}
 
61
end;
 
62
 
 
63
procedure perfExt_AddProgress; inline;
 
64
begin
 
65
{$IFDEF IPHONEOS}
 
66
    startSpinning();
 
67
{$ENDIF}
 
68
end;
 
69
 
 
70
procedure perfExt_FinishProgress; inline;
 
71
begin
 
72
{$IFDEF IPHONEOS}
 
73
    stopSpinning();
 
74
{$ENDIF}
 
75
end;
 
76
 
 
77
procedure perfExt_AmmoUpdate; // don't inline
 
78
begin
 
79
{$IFDEF IPHONEOS}
 
80
    if (CurrentTeam^.ExtDriven) or (CurrentTeam^.Hedgehogs[0].BotLevel <> 0) then
 
81
        exit(); // the other way around throws a compiler error
 
82
    updateVisualsNewTurn();
 
83
{$ENDIF}
 
84
end;
 
85
 
 
86
procedure perfExt_NewTurnBeginning; inline;
 
87
begin
 
88
{$IFDEF IPHONEOS}
 
89
    clearView();
 
90
    perfExt_AmmoUpdate();
 
91
{$ENDIF}
 
92
end;
 
93
 
 
94
procedure perfExt_SaveBeganSynching; inline;
 
95
begin
 
96
{$IFDEF IPHONEOS}
 
97
    replayBegan();
 
98
{$ENDIF}
 
99
end;
 
100
 
 
101
procedure perfExt_SaveFinishedSynching; inline;
 
102
begin
 
103
{$IFDEF IPHONEOS}
 
104
    replayFinished();
 
105
{$ENDIF}
 
106
end;
 
107
 
 
108
 
 
109
end.