1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: shapes.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
34 #include <vcl/image.hxx>
35 #include <vcl/outdev.hxx>
44 Image
* ImplLoadImage( USHORT nId
, ResMgr
* pRes
);
46 enum FighterMode
{ FIGHT_NORM
, FIGHT_RIGHT
, FIGHT_LEFT
, FIGHT_DEST
};
67 Fighter(Size
& rOut
, ResMgr
* pRes
);
69 void Paint(OutputDevice
& pDev
);
70 void Move(long nDirect
);
71 Point
& GetPoint() { return aOut
; }
72 BOOL
Kollision(Rectangle
, Explosion
* pExpl
);
74 void NoFighter() { eMode
= FIGHT_DEST
; }
75 long GetHalf() { return aOut
.X()+aSize
.Width()/2; }
78 enum MuniMode
{ MUNI_DEL
, MUNI_MODE1
, MUNI_MODE2
};
90 DECLARE_LIST(MunitionListe
,Munition_Impl
*)
92 class Munition
: public MunitionListe
102 Munition(ResMgr
* pRes
);
104 void Paint(OutputDevice
& rDev
);
105 void Start(Point
& rPoint
);
106 void SetDelete(long nWert
) { GetObject(nWert
)->eMode
= MUNI_DEL
; }
107 Rectangle
GetKoll(long nWert
) { return GetObject(nWert
)->aKoll
; }
108 void SetKoll(long nWert
, Rectangle aRect
)
109 { GetObject(nWert
)->aKoll
= aRect
; }
110 MuniMode
GetMode(long nWert
) { return GetObject(nWert
)->eMode
; }
111 void SetMode(long nWert
, enum MuniMode mode
)
112 { GetObject(nWert
)->eMode
= mode
; }
113 void SetPoint(long nWert
, const Point
& rPoint
)
114 { GetObject(nWert
)->aPoint
= rPoint
; }
115 Point
GetPoint(long nWert
) { return GetObject(nWert
)->aPoint
; }
116 long RemoveMunition();
127 DECLARE_LIST(BombenListe
, Bombe_Impl
*)
129 class Bombe
: public BombenListe
139 void Paint(OutputDevice
& rDev
);
140 Point
& GetPoint(long nWert
) { return GetObject(nWert
)->aXY
; }
141 void SetPoint(long nWert
, const Point
& rPoint
)
142 { GetObject(nWert
)->aXY
= rPoint
; }
143 void InsertBombe(const Point
& rPoint
);
144 Rectangle
GetKoll(long nWert
) { return GetObject(nWert
)->aKoll
; }
145 void SetKoll(long nWert
, Rectangle aRect
)
146 { GetObject(nWert
)->aKoll
= aRect
; }
147 void SetDelete(long nWert
) { GetObject(nWert
)->bDelete
= TRUE
; }
149 void SetSpeed(long nWert
) { nSpeed
= nWert
; }
151 BOOL
Kollision(Rectangle aRect
, Explosion
* pExpl
);
154 enum WallMode
{ WALL_MOD1
, WALL_MOD2
, WALL_MOD3
, WALL_MOD4
, WALL_MOD5
,
155 WALL_MOD6
, WALL_MOD7
, WALL_MOD8
, WALL_MOD9
, WALL_MOD10
,
163 DECLARE_LIST(WallListe
, Wall_Impl
*)
165 class Wall
: public WallListe
184 void Paint(OutputDevice
& pDev
);
185 WallMode
GetMode(long nWert
) { return GetObject(nWert
)->eMode
; }
186 void SetMode(long nWert
, enum WallMode Mode
)
187 { GetObject(nWert
)->eMode
= Mode
; }
188 Point
GetPoint(long nWert
) { return GetObject(nWert
)->aXY
; }
189 void InsertWall(const Point
& rPoint
);
191 BOOL
Kollision(Rectangle
& rRect
, BOOL bDel
);