-
Notifications
You must be signed in to change notification settings - Fork 10
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
joystick support #189
Comments
Hi Peter, Thanks for the hard work. I have not done much myself in the last month, but I am continuing the work on a windows installer. If you make a pull request on my branch https://github.com/thobbsinteractive/magic-carpet-2-hd I will test it out this week. Joystick support is also one of my open enhancements. When you launch the game it looks at the the config.ini file and uses windowResWidth and windowResHeight to create the SDL Window. After that the render buffer rendered to a texture and scaled. So Videos run at 320x200 and are scaled up. The menus are displayed at 640x480 and also scaled. The in game resolution (by default) uses gameResWidth and gameResHeight from the config.ini file. windowResWidth and windowResHeight should be global maybe they can be used to center the joystick in game? |
Good evening, sending a non (320,2x0) rest coord to the flight window will send me in an infinite spin since it looks like the roll and yaw calculation is also somehow hardcodedly centered on 320. I have a solution for this, by using two separate linear interpolation equations for each axis. so whatever the rest position is given to any size window I can still reach the canvas edges. it works great. my only problem now is the stone main menu and the level selection windows - since they are not gameResWH as my 'joystick canvas' is set up. but I'm sure you'll have an elegant solution for that :) I will send you a pull request tomorrow so you can check it out. many thanks, |
hello!
I'm working on a patch that would add joystick support for the game.
I'm confronted with the following facts:
none of these inconsistencies are noticeable when using a mouse - since the mouse can be moved to infinity in any direction, but a joystick has a limited movement arc. and ideally the entire arc has to map perfectly to the virtual canvas it controls.
so how should I treat the window size differences? and the hardcoded window center in flight mode?
what part of the reversed code can I force into submission?
dazed and confused,
peter
you can add a mouse coord debug output if you patch engine/Basic.cpp thusly:
The text was updated successfully, but these errors were encountered: