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: monst.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 ************************************************************************/
33 enum GegnerType
{ GEGNER1
, GEGNER2
, GEGNER3
, GEGNER4
, GEGNER5
};
34 enum GegnerMode
{ MOVE1
, MOVE2
, MOVE3
, MOVE4
, MOVE5
, DELETED
, HIDE
};
42 #include <tools/list.hxx>
43 #include <vcl/image.hxx>
44 #include <tools/gen.hxx>
45 #include <vcl/outdev.hxx>
62 DECLARE_LIST(GegnerListe
,Gegner_Impl
*)
68 class Gegner
: public GegnerListe
96 Gegner(Fighter
* pFighter
, Bombe
* pBombe
, ResMgr
* pRes
);
99 void InsertGegner(long nType
, long x
, long y
);
100 void DrawGegner(OutputDevice
* pDev
, Point
* pStart
);
102 void SetRandWert(long nWert
) { nRandWert
= nWert
; }
103 long GetRandWert() { return nRandWert
; }
104 long GegnerX(long nWert
) { return GetObject(nWert
)->aXY
.X(); }
105 long GegnerXStart(long nWert
) { return GetObject(nWert
)->aX
; }
106 long GegnerY(long nWert
) { return GetObject(nWert
)->aXY
.Y(); }
107 GegnerType
GegType(long nWert
)
108 { return GetObject(nWert
)->aType
; }
109 GegnerMode
GegMode(long nWert
)
110 { return GetObject(nWert
)->aMode
; }
111 void SetMode(long nWert
, enum GegnerMode nMode
)
112 { GetObject(nWert
)->aMode
= nMode
; }
113 void SetGegnerPos(long nWert
, const Point
& rPoint
)
114 { GetObject(nWert
)->aXY
= rPoint
;}
115 long GegnerDiffX(long nWert
) { return GetObject(nWert
)->nDiffX
; }
116 Rectangle
& GegnerKoll(long nWert
) { return GetObject(nWert
)->aKoll
; }
117 Rectangle
GetKoll(long nWert
);
118 void SetKoll(long nWert
, const Rectangle
& rRect
)
119 { GetObject(nWert
)->aKoll
= rRect
; }
120 long Kollision(Rectangle
& rRect
, Explosion
* pExplosion
);
121 Point
& GegnerPos(long nWert
) { return GetObject(nWert
)->aXY
; }
124 long GegnerPoints(long nWert
) { return GetObject(nWert
)->nPoints
; }
125 void GegnerHit(long nWert
) { GetObject(nWert
)->nHits
++; }
126 BOOL
GegnerDest(long nWert
);
127 void SetDown(long nWert
) { nDown
= nWert
; }
128 long GetDown() { return nDown
; }
129 void SetAuseMode(BOOL bFlag
) { bAuseMode
= bFlag
; }
130 void SetDelay(long nWert
) { GetObject(nWert
)->nDelay
= 3; }
131 long GetDelay(long nWert
) { return GetObject(nWert
)->nDelay
; }
132 void DecDelay(long nWert
) { GetObject(nWert
)->nDelay
--; }