Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
vor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0fa601a
)
now scrolling to center of ship, not its top-left corner
author
Joshua Grams
<josh@qualdan.com>
Thu, 22 Jun 2006 21:55:24 +0000
(21:55 +0000)
committer
Joshua Grams
<josh@qualdan.com>
Thu, 22 Jun 2006 21:55:24 +0000
(21:55 +0000)
main.c
patch
|
blob
|
history
diff --git
a/main.c
b/main.c
index
7c046dd
..
ba1c8b7
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-681,9
+681,9
@@
gameloop() {
}
// SCROLLING
}
// SCROLLING
- tmp = (ship.y+ship.dy*t_frame-YSCROLLTO)/25 + (ship.dy-screendy);
+ tmp = (ship.y+ship.h/2+ship.dy*t_frame-YSCROLLTO)/25 + (ship.dy-screendy);
screendy += tmp * t_frame/12;
screendy += tmp * t_frame/12;
- tmp = (ship.x+ship.dx*t_frame-XSCROLLTO)/25 + (ship.dx-screendx);
+ tmp = (ship.x+ship.w/2+ship.dx*t_frame-XSCROLLTO)/25 + (ship.dx-screendx);
screendx += tmp * t_frame/12;
// taper off so we don't hit the barrier abruptly.
// (if we would hit in < 2 seconds, adjust to 2 seconds).
screendx += tmp * t_frame/12;
// taper off so we don't hit the barrier abruptly.
// (if we would hit in < 2 seconds, adjust to 2 seconds).