The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
December 14, 2024, 01:33:19 pm
Home Help Search Login Register
News: Celebrating 30 years of Star Control 2 - The Ur-Quan Masters

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  General UQM Discussion (Moderator: Death 999)
| | |-+  Patch to find a star system quickly
« previous next »
Pages: [1] 2 Print
Author Topic: Patch to find a star system quickly  (Read 8571 times)
kworces
Zebranky food
*
Offline Offline

Gender: Male
Posts: 9


jumping *peppers*!!


View Profile WWW
Patch to find a star system quickly
« on: July 17, 2005, 06:05:29 am »

I have a patch for uqm that allows you to search for a star system in the starmap.  For example, you can hit '/' and then type "cent" and press enter to jump to Alpha Centauri.  You can also press the Tab key to cycle between stars in a star system.

This is a source patch in unified diff format.  If anyone is interested you can get it here:

http://www.misfitcode.com/urquanmisfits/
Logged
Torch
Zebranky food
*
Offline Offline

Posts: 23



View Profile
Re: Patch to find a star system quickly
« Reply #1 on: July 17, 2005, 03:26:09 pm »

So, how do I apply that patch?
Logged
0xDEC0DE
*Many bubbles*
***
Offline Offline

Posts: 175



View Profile WWW
Re: Patch to find a star system quickly
« Reply #2 on: July 17, 2005, 05:12:44 pm »

So, how do I apply that patch?

You can find more information and instructions here.
Logged

"I’m not a robot like you. I don’t like having disks crammed into me… unless they’re Oreos, and then only in the mouth."  --Fry
kworces
Zebranky food
*
Offline Offline

Gender: Male
Posts: 9


jumping *peppers*!!


View Profile WWW
Re: Patch to find a star system quickly
« Reply #3 on: July 17, 2005, 05:45:54 pm »

So, how do I apply that patch?

On a Unix-based system (Linux, FreeBSD, etc) you can use the patch command.  I've updated the page with those instructions.  I'm not sure what your best option is on Windows (even after googling it).
Logged
0xDEC0DE
*Many bubbles*
***
Offline Offline

Posts: 175



View Profile WWW
Re: Patch to find a star system quickly
« Reply #4 on: July 17, 2005, 06:03:42 pm »

Huh.  Attempting to apply the patch against my sources yields this:
Code:
daedalus: patch -p0 < ~/Desktop/clustersearch.diff.txt
patching file content/starcon.key
patching file src/sc2code/controls.h
patching file src/sc2code/libs/input/sdl/input.c
patching file src/sc2code/planets/pstarmap.c
patch: **** malformed patch at line 81: @@ -609,12 +621,169 @@
                                                                               

Eyeballing the patch does little; it looks "normal" to me, and my local copy of pstarmap.c is the same as the repository version.  Did you do anything to the files after diff spit them out that might have caused such funny business? 
Logged

"I’m not a robot like you. I don’t like having disks crammed into me… unless they’re Oreos, and then only in the mouth."  --Fry
kworces
Zebranky food
*
Offline Offline

Gender: Male
Posts: 9


jumping *peppers*!!


View Profile WWW
Re: Patch to find a star system quickly
« Reply #5 on: July 17, 2005, 06:28:27 pm »

Huh.  Attempting to apply the patch against my sources yields this:

Bah.  I thought for sure I tried that on the website version before I uploaded it.  It's fixed now.
Logged
Megagun
Enlightened
*****
Offline Offline

Gender: Male
Posts: 580


Moo


View Profile
Re: Patch to find a star system quickly
« Reply #6 on: July 17, 2005, 06:54:34 pm »

Hey, this is nice!... Smiley
_O_
Logged
0xDEC0DE
*Many bubbles*
***
Offline Offline

Posts: 175



View Profile WWW
Re: Patch to find a star system quickly
« Reply #7 on: July 17, 2005, 07:01:45 pm »

[keanu]  Whoa.  [/keanu]

Unless you have any overt objections, I'll be including this in my next build of the "unofficial version".  Very well done.

But of course, a few nitpicks:
  • SDL seems to map the backspace key on Macs to something weird, so that players need to hit Ctrl-H to correct typos.  This may be fixable by altering keys.cfg/starcon.key, or it may require code changes.  I'll post more info if/when I have it.
  • Players who use keys.cfg will not automagically get the key configs they need from starcon.key, which makes for some confusing times.  I'm not sure what the proper method would be for introducing new commands, perhaps a revision bump on starcon.key?
  • If you're looking for an additional challenge, it might be fun to have the star searcher draw "constellations" over the star groups that match; but this might be hard to get right algorithmically, i.e., the Lyncis constellation is supposed to look like "a snake that swallowed an elephant" (this is even a minor plot point) but the names of the stars would not leads one to draw it this way if playing connect-the-dots with the stars in order.  But it could still be fun, and I might take a crack at the task myself, time permitting.
Logged

"I’m not a robot like you. I don’t like having disks crammed into me… unless they’re Oreos, and then only in the mouth."  --Fry
kworces
Zebranky food
*
Offline Offline

Gender: Male
Posts: 9


jumping *peppers*!!


View Profile WWW
Re: Patch to find a star system quickly
« Reply #8 on: July 17, 2005, 11:26:07 pm »

Unless you have any overt objections, I'll be including this in my next build of the "unofficial version".  Very well done.

By all means, share and enjoy.

It also should probably have some sort of text cursor (since left/right will move the text insertion point, though this isn't obviously to the player).  But I'm not that ambitious.

The text entry code was stolen (and modified) from gameopt.c, so if you find a backspace fix for that you'll probably want to apply it there as well.

And yes, the new keys.cfg is an issue.  I specifically noted that on the website, but anyone who gets the patch through some other distribution means wouldn't have instructions for updating their key config.  Not sure what the proper method for updating it is.

Anyways, I actually implemented this back in the fall of 2002.  Then the input system was overhauled and broke my patch.  I just recently got around to redoing it.  After I got used to using this patch I now get too impatient trying to play the game without it.  :-)
Logged
Death 999
Global Moderator
Enlightened
*****
Offline Offline

Gender: Male
Posts: 3874


We did. You did. Yes we can. No.


View Profile
Re: Patch to find a star system quickly
« Reply #9 on: July 18, 2005, 06:01:57 pm »

The text entry code was stolen (and modified) from gameopt.c, so if you find a backspace fix for that you'll probably want to apply it there as well.

Hey, that would be nice -- being able to correct melee team names...
Logged
0xDEC0DE
*Many bubbles*
***
Offline Offline

Posts: 175



View Profile WWW
Re: Patch to find a star system quickly
« Reply #10 on: July 18, 2005, 06:13:08 pm »

Hey, that would be nice -- being able to correct melee team names...

On my iBook, Ctrl+H and Fn+Delete do the job.  On a full keyboard, I think the "normal" Delete key does nothing, but the "other" delete key works.

And all this time I thought it was just me.  Wink
Logged

"I’m not a robot like you. I don’t like having disks crammed into me… unless they’re Oreos, and then only in the mouth."  --Fry
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Patch to find a star system quickly
« Reply #11 on: July 18, 2005, 06:54:20 pm »

When I saw this patch I immediately thought back to a patch someone made in the beginning of the project. We didn't use bugzilla yet and so I haven't been able to find it again. It looks like that was probably your patch too.

It's actually a patch that has a good chance to make it into the official version in some form (with your permission). Even though it wasn't in the original, the consensus is that it still fits in our straight port doctrine as it compensates for the lack of a paper map, and does not change the gameplay.

Also, could someone who has problems with the backspace (and knows how to build the sources) try adding "case SDLK_BACKSPACE: return '\b';" to KBDtoUNICODE in src/sc2code/libs/input/sdl/input.c and tell me if that has any effect.

Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
Torch
Zebranky food
*
Offline Offline

Posts: 23



View Profile
Re: Patch to find a star system quickly
« Reply #12 on: July 18, 2005, 07:01:46 pm »

So, could someone post the patched files?
Logged
Megagun
Enlightened
*****
Offline Offline

Gender: Male
Posts: 580


Moo


View Profile
Re: Patch to find a star system quickly
« Reply #13 on: July 18, 2005, 10:13:52 pm »

I could provide you with a W32 compiled exe, if kworces doesn't mind...
Logged
Torch
Zebranky food
*
Offline Offline

Posts: 23



View Profile
Re: Patch to find a star system quickly
« Reply #14 on: July 19, 2005, 12:59:14 am »

Ok, coupld you please send it on email which is specified in my forum prfile?
Logged
Pages: [1] 2 Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!