projects
/
dosdemo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
backported fixes from rtxon: BSP tree construction and mouse handling
[dosdemo]
/
src
/
demo.c
diff --git
a/src/demo.c
b/src/demo.c
index
072b6ce
..
2ff25a7
100644
(file)
--- a/
src/demo.c
+++ b/
src/demo.c
@@
-211,7
+211,7
@@
void mouse_orbit_update(float *theta, float *phi, float *dist)
int dy = mouse_y - prev_my;
if(dx || dy) {
int dy = mouse_y - prev_my;
if(dx || dy) {
- if(mouse_bmask & 1) {
+ if(mouse_bmask & MOUSE_LEFT) {
float p = *phi;
*theta += dx * 1.0;
p += dy * 1.0;
float p = *phi;
*theta += dx * 1.0;
p += dy * 1.0;
@@
-220,7
+220,7
@@
void mouse_orbit_update(float *theta, float *phi, float *dist)
if(p > 90) p = 90;
*phi = p;
}
if(p > 90) p = 90;
*phi = p;
}
- if(mouse_bmask & 4) {
+ if(mouse_bmask & MOUSE_RIGHT) {
*dist += dy * 0.5;
if(*dist < 0) *dist = 0;
*dist += dy * 0.5;
if(*dist < 0) *dist = 0;