Released on xbins :)
Oh, here's the controller code i was talking about in the nfo:
CODE |
int i; xleft=yleft=xright=yright=0; for(i=0;i xleft=SDL_JoystickGetAxis(joy, 0); yleft=SDL_JoystickGetAxis(joy, 1); xright=SDL_JoystickGetAxis(joy, 2); yright=SDL_JoystickGetAxis(joy, 3); if(xright>100||xright<-100||yright>100||yright<-100||xleft>100||xleft<-100||yleft>100||yleft<-100) break; }
if((xleft>100||xleft<-100||yleft>100||yleft<-100)&&++jscount>=3) { int dx=0,dy=0; jscount=0; if(xleft>22000||xleft<-22000||yleft>22000||yleft<-22000) { xleft=xleft > 22000 ? 22000 : xleft < -22000 ? -22000 : xleft; yleft=yleft > 22000 ? 22000 : yleft < -22000 ? -22000 : yleft; } if(xleft>20000||xleft<-20000||yleft>20000||yleft<-20000) { dx=xleft/1500; dy=yleft/1500; } else if(xleft>15000||xleft<-15000||yleft>15000||yleft<-15000) { dx=xleft/3000; dy=yleft/3000; } else { if(xleft>10000) dx=2; else if (xleft<-10000) dx=-2; if(yleft>10000) dy=2; else if(yleft<-10000) dy=-2; if(dy!=0||dx!=0) jscount=-3; } ev.motion.type=SDL_MOUSEMOTION; ev.motion.x=_cursor.pos.x+dx; ev.motion.y=_cursor.pos.y+dy; if((_cursor.pos.x+dx)<2) ev.motion.x=1; if(ev.motion.x>_screen.width-2) ev.motion.x=_screen.width-1; if((_cursor.pos.y+dy)<2) ev.motion.y=1; if(ev.motion.y>_screen.height-2) ev.motion.y=_screen.height-1; ev.motion.state=0; ev.motion.which=5; ev.motion.xrel=dx; ev.motion.yrel=dy; }
|
If anyone feels like / is willing to write a better joystick-> mouse function, please,
be my guest... joystick axes range from -32000 to +32000, but on the xbox with my s controllers i noticed they mostly go from around 10000 to around 24000 (-24000 to -10000 for opposite direction) (they go up to +32k and -32k if you pull them all left, all right, or all down/all up, but if you move them to the bottom left or bottom right, they only get to -24000, 24000 and 24000,24000 (handling controller movement without mimicking a mousemovement is also possible, but requires different changes (for if you want to use absolute movement, for example))
This post has been edited by HCl on Oct 21 2004, 10:28 AM
and again it doesnt work with me :(
it just goes to evox :blink:
works here
nice work :)
Thats very nice, only problems I had were on my crappy tv I couldnt see the menu or the status bar. Also the controls were very sensitive.
Would it be possible to add a sensitivity slider to reduce it?
Also, rather than worrying about scaling, is it possible to adjust the offset of the menu at the top and the status at the bottom? That may be a simpler way to fix it.
wolfblade, read the readme, there are some files you need to install before it'll work.
(And it writes a logfile which should say what went wrong)
offset is the same thing, they can't be adjusted..
i'm gonna try to alter the graphic routines of openttd so it'll fit..
And about the controllers; see my post about the controller -> mouse port,
i fiddled with it quite a while to see what would work somewhat nicely...
after 3 hours of fiddling, i just went with the best i've come up with.
People are free to write a better controller -> mouseevent function..
I'll prolly be working on dosxbox for a while so don't expect too fast an update
on xottd...
PS.
Here is the controllermapping of xottd, forgot to put it in the nfo:
A button,Left Trigger - left mouse click
B button,Right Trigger - right mouse click
Y button - info click
Left controlstick - mouse
Right controlstick - viewport scroll
This post has been edited by HCl: Oct 21 2004, 03:49 PM
sorry double post :o
This post has been edited by Wolfblade12: Oct 21 2004, 05:55 PM
works thanks :rolleyes: nice game btw
QUOTE (HCl @ Oct 21 2004, 04:11 PM) |
wolfblade, read the readme, there are some files you need to install before it'll work. (And it writes a logfile which should say what went wrong)
offset is the same thing, they can't be adjusted.. i'm gonna try to alter the graphic routines of openttd so it'll fit.. And about the controllers; see my post about the controller -> mouse port, i fiddled with it quite a while to see what would work somewhat nicely... after 3 hours of fiddling, i just went with the best i've come up with. People are free to write a better controller -> mouseevent function..
I'll prolly be working on dosxbox for a while so don't expect too fast an update on xottd...
PS.
Here is the controllermapping of xottd, forgot to put it in the nfo:
A button,Left Trigger - left mouse click B button,Right Trigger - right mouse click Y button - info click
Left controlstick - mouse Right controlstick - viewport scroll |
Are you planning to make a menu for Dosbox??It would be much easier and Controller support would also be nice
I love this game, Thanks for this excellent release.
btw. i dont have sound, do you have?
edit: i do have sound but i meant the BGM
edit2: fixed it... i did read the readme but i thought that was for custom soundtracks :P
This post has been edited by Wolfblade12: Oct 23 2004, 04:12 PM
Hi,
got this from Xbins but having trouble downloading - reading the readme; can someone interpret this for me lol?
'Read the original openttd's readme.txt for installation notes
(you need to have the original transport tycoon deluxe datafiles and copy them to data/)'
Does this mean I have to have the game for the PC? or anything else I can do?
heres the part of the readme you didnt read :rolleyes:
QUOTE |
4.0) Running OpenTTD: ---- ----------------
Before you run OpenTTD, you need to put the game's datafiles into the data/ subdirectory. You need the following files from the original Windows version of TTD as OpenTTD makes use of the original TTD artwork.
IMPORTANT! You need the files from the WINDOWS version of TTD.
List of the required files: sample.cat trg1r.grf trgcr.grf trghr.grf trgir.grf trgtr.grf
If you want music you need to copy the gm/ folder from Windows TTD into your OpenTTD folder, not your data folder.
|
If you copy the music over you need to rename the files .mid instead of .gm. Unfortunatly at the moment you are unable to see the menu/status bars which makes the game virtually impossible to play :( Once this is sorted it will the #1 game of choice for me on the xbox :D
QUOTE (Boff @ Oct 31 2004, 09:33 PM) |
If you copy the music over you need to rename the files .mid instead of .gm. Unfortunatly at the moment you are unable to see the menu/status bars which makes the game virtually impossible to play :( Once this is sorted it will the #1 game of choice for me on the xbox :D |
Right this game is basicly unplayable in this form, everything is setup and ready to roll once the screen problems are corrected.
fixed, finally figured out how to use the sdl_xbox_setscreen* functions
(wasn't sure whether it was wanting a percentage, a 0.80 (for 80 percent), or something else, turns out it wants a negative amount of pixels)
(why on earth did lantus make it use floats?)
anyways, i'm too lazy to add a nice config thing, so expect 1.1 on xbins soon
(when i get a hold of h3inrich)
i'll prolly release the source soon as well, along with the source of libsdlx 0.11-HCl
(fixed keyboard, and fixed memory leak, working sdlnet)
(dosbox needed the memory leak fix, xottd needed the keyboard fix)
This post has been edited by HCl: Nov 1 2004, 02:53 PM
excellent news HCl, thanks for all your work on this :beer:
As I said earlier, once screen is fixed this will be my xbox game of choice for a long time :D
Published the source, wait a while till i can catch the xbins staff awake for the
binaries.
http://titania.student.utwente.nl/xbox/