-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hardware keyboard & mice input #29
Conversation
include/ace/managers/mouse.h
Outdated
* @param uwHiY Maximum cursor X position. | ||
* @param uwHiY Maximum cursor Y position. | ||
*/ | ||
void mouseSetBounds( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we have support for "multiple" simultaneous mouse handling... We should be able to set bounds for specific mouse.
Think about possibility to make split screen games with 2 connected mouses.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 776fae8
include/ace/utils/custom.h
Outdated
/** | ||
* Bit value macro - useful for setting & testing bits. | ||
*/ | ||
#define BV(x) (1 << (x)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be moved to more generic file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 7ba50f5
src/ace/managers/mouse.c
Outdated
// determine mouse movement direction which takes into account joyxdat | ||
// underflows and overflows. | ||
|
||
if(g_sMouseManager.ubPortFlags & MOUSE_PORT_1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This IFs should be totally a function with few variables. Only 4 hardcoded elements varies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in dab7e1d
src/ace/managers/mouse.c
Outdated
UWORD uwPotMask = 0; | ||
|
||
// Enable RMB & MMB | ||
if(ubPortFlags & MOUSE_PORT_1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This IFs should be totally a function with few variables. Only 1 hardcoded element varies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really, since there is no need for that. Also, mouseCreate()
is short enough to have this stuff written as it is right now. No need for moving every repetitive code to separate fn.
483434c
to
b985981
Compare
This pull requests closes pull request #13 and does some work for #24 . Also, it brings as closer to abandoning intuition.