Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
openjazz
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
openjazz
Commits
bc47c7c2
Commit
bc47c7c2
authored
Jul 02, 2010
by
pickle136
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Duplicate int count declaration removed
parent
f1bbcd3a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
57 deletions
+57
-57
eventframe.cpp
src/level/event/eventframe.cpp
+57
-57
No files found.
src/level/event/eventframe.cpp
View file @
bc47c7c2
...
...
@@ -34,9 +34,9 @@
#include "io/gfx/video.h"
#include "io/sound.h"
#include "player/levelplayer.h"
#include "util.h"
#include <stdlib.h>
#include "util.h"
#include <stdlib.h>
signed
char
*
Event
::
prepareStep
(
unsigned
int
ticks
,
int
msps
)
{
...
...
@@ -82,7 +82,7 @@ signed char* Event::prepareStep (unsigned int ticks, int msps) {
Event
*
Event
::
step
(
unsigned
int
ticks
,
int
msps
)
{
LevelPlayer
*
levelPlayer
;
fixed
width
,
height
;
signed
char
*
set
;
...
...
@@ -95,9 +95,9 @@ Event* Event::step (unsigned int ticks, int msps) {
if
(
!
set
)
return
remove
();
levelPlayer
=
localPlayer
->
getLevelPlayer
();
// Find dimensions
width
=
getWidth
();
height
=
getHeight
();
...
...
@@ -161,7 +161,7 @@ Event* Event::step (unsigned int ticks, int msps) {
case
6
:
int
count
=
level
->
path
[
set
[
E_MULTIPURPOSE
]].
node
;
count
=
level
->
path
[
set
[
E_MULTIPURPOSE
]].
node
;
// Use the path from the level file
dx
=
TTOF
(
gridX
)
+
ITOF
(
level
->
path
[
set
[
E_MULTIPURPOSE
]].
x
[
count
])
-
x
;
...
...
@@ -873,15 +873,15 @@ Event* Event::step (unsigned int ticks, int msps) {
if
(
level
->
getStage
()
==
LS_END
)
return
this
;
if
((
animType
==
E_LFINISHANIM
)
||
(
animType
==
E_RFINISHANIM
))
return
this
;
if
((
animType
==
E_LFINISHANIM
)
||
(
animType
==
E_RFINISHANIM
))
return
this
;
// Handle contact with player
for
(
count
=
0
;
count
<
nPlayers
;
count
++
)
{
levelPlayer
=
players
[
count
].
getLevelPlayer
();
// Check if the player is touching the event
fixed
offset
=
0
;
...
...
@@ -932,9 +932,9 @@ void Event::draw (unsigned int ticks, int change) {
bool
drawExplosion
;
if
(
next
)
next
->
draw
(
ticks
,
change
);
if
(
next
)
next
->
draw
(
ticks
,
change
);
// Uncomment the following to see the area of the event
/*drawRect(FTOI(getDrawX(change) - viewX),
FTOI(getDrawY(change) - (viewY + getHeight())), FTOI(getWidth()),
...
...
@@ -1029,8 +1029,8 @@ void Event::draw (unsigned int ticks, int change) {
// In case an event can be drawn normally
if
(
ticks
<
flashTime
)
anim
->
flashPalette
(
0
);
if
(
ticks
<
flashTime
)
anim
->
flashPalette
(
0
);
anim
->
draw
(
changeX
,
changeY
);
}
...
...
@@ -1049,51 +1049,51 @@ void Event::draw (unsigned int ticks, int change) {
}
return
;
}
void
Event
::
drawEnergy
(
unsigned
int
ticks
)
{
Anim
*
anim
;
signed
char
*
set
;
int
hits
;
// Get the event properties
set
=
level
->
getEvent
(
gridX
,
gridY
);
if
(
set
[
E_MODIFIER
]
!=
8
)
{
if
(
next
)
next
->
drawEnergy
(
ticks
);
}
else
if
(
set
[
E_HITSTOKILL
])
{
// Draw boss energy bar
hits
=
level
->
getEventHits
(
gridX
,
gridY
)
*
100
/
set
[
E_HITSTOKILL
];
// Devan head
anim
=
level
->
getMiscAnim
(
1
);
anim
->
setFrame
(
0
,
true
);
if
(
ticks
<
flashTime
)
anim
->
flashPalette
(
0
);
anim
->
draw
(
ITOF
(
viewW
-
44
),
ITOF
(
hits
+
48
));
if
(
ticks
<
flashTime
)
anim
->
restorePalette
();
// Bar
drawRect
(
viewW
-
40
,
hits
+
40
,
12
,
100
-
hits
,
(
ticks
<
flashTime
)
?
0
:
32
);
}
return
;
void
Event
::
drawEnergy
(
unsigned
int
ticks
)
{
Anim
*
anim
;
signed
char
*
set
;
int
hits
;
// Get the event properties
set
=
level
->
getEvent
(
gridX
,
gridY
);
if
(
set
[
E_MODIFIER
]
!=
8
)
{
if
(
next
)
next
->
drawEnergy
(
ticks
);
}
else
if
(
set
[
E_HITSTOKILL
])
{
// Draw boss energy bar
hits
=
level
->
getEventHits
(
gridX
,
gridY
)
*
100
/
set
[
E_HITSTOKILL
];
// Devan head
anim
=
level
->
getMiscAnim
(
1
);
anim
->
setFrame
(
0
,
true
);
if
(
ticks
<
flashTime
)
anim
->
flashPalette
(
0
);
anim
->
draw
(
ITOF
(
viewW
-
44
),
ITOF
(
hits
+
48
));
if
(
ticks
<
flashTime
)
anim
->
restorePalette
();
// Bar
drawRect
(
viewW
-
40
,
hits
+
40
,
12
,
100
-
hits
,
(
ticks
<
flashTime
)
?
0
:
32
);
}
return
;
}
...
...
@@ -1121,4 +1121,4 @@ void Event::dontUseAnimOffset() {
return
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment