Author Topic: Use Ship or Weapon as CBAnim - DONE - Get the DIFF while its hot!  (Read 5036 times)

0 Members and 1 Guest are viewing this topic.

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Re: Feature Request: Use Ship or Weapon as CBAnim
This is one of those dragons den moments. One of those things i wished i'd thought of. Any chance of using the briefing icons system too?
Campaigns I've added my distinctiveness to-
- Blue Planet: Battle Captains
-Battle of Neptune
-Between the Ashes 2
-Blue planet: Age of Aquarius
-FOTG?
-Inferno R1
-Ribos: The aftermath / -Retreat from Deneb
-Sol: A History
-TBP EACW teaser
-Earth Brakiri war
-TBP Fortune Hunters (I think?)
-TBP Relic
-Trancsend (Possibly?)
-Uncharted Territory
-Vassagos Dirge
-War Machine
(Others lost to the mists of time and no discernible audit trail)

Your friendly Orestes tactical controller.

Secret bomb God.
That one time I got permabanned and got to read who was being bitxhy about me :p....
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Feature Request: Use Ship or Weapon as CBAnim
I don't think it's very hard to call the source code used by loadout screen for command briefing.
Really?  This is excellent news.  I'm so glad someone took the time to examine the code and evaluate the difficulty level for us.  Do you think you could send us a feature patch while you're at it?

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Re: Feature Request: Use Ship or Weapon as CBAnim
I got it to stop screwing up the interface, thanks to gr_reset_clip (you forgot to tell me about this WMC :shaking:), but now it just doesn't do anything.  I've just been testing with fighter01.pof, but it displays nothing out of the ordinary...
« Last Edit: June 11, 2008, 01:24:57 pm by blowfish »

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Feature Request: Use Ship or Weapon as CBAnim
I don't think it's very hard to call the source code used by loadout screen for command briefing.
Really?  This is excellent news.  I'm so glad someone took the time to examine the code and evaluate the difficulty level for us.  Do you think you could send us a feature patch while you're at it?

Well he did say he'd check the source code so he might not actually be doing the talking out his hat that most people do when they say something is easy. I wouldn't bet money on it though.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: Feature Request: Use Ship or Weapon as CBAnim
Here's a quick working patch; I recommend you apply dmr_fix.diff to your codebase. This puts gr_reset_clip into draw_rotating_model, where it should be, and fixes a minor problem where the function assumed it was rendering a missile if you didn't specify a closeup pos. It'll change three files but you'll have to revise your missioncmdbrief.cpp to take into account the gr_reset_clip change (ie just get rid of the one you added).

The other patch is for a quick working test I made.

[attachment deleted by admin]
-C

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Re: Feature Request: Use Ship or Weapon as CBAnim
I never learned how to incorporate a diff into your local source :nervous: how do you do it?

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: Feature Request: Use Ship or Weapon as CBAnim
TortoiseSVN includes a patch application utility. If you have it installed, you right-click on the file, go to the TortoiseSVN menu, and then go to 'apply patch' and select your missionui directory.
-C

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Re: Feature Request: Use Ship or Weapon as CBAnim
What if I am not using windows and 'svn patch' is not available?

  

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: Feature Request: Use Ship or Weapon as CBAnim
Then I don't know. :p Or at least I can't give you any definite solutions. There is a patch utility under Linux, that might be available under Mac OS X, that might be able to use the diff files.

If nothing else, you can always crack open the diff files and do the changes manually; there's not more than ~20-30 lines changed. "+" indicates a line that was added, "-" indicates a line that was removed. Neither +/- indicates that the line was not changed, and can be used to locate where the change was made. The line numbers above each 'chunk' indicate where that change occurred, although since you are changing the relative position of things in the file, the line number may not be accurate, and I generally avoid using it when patching manually. (It might come in handy for duplicate code sections, though)
-C

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Re: Feature Request: Use Ship or Weapon as CBAnim
I know how to read a diff file!

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Re: Feature Request: Use Ship or Weapon as CBAnim
Thanks for the code, WMC.  This works now.  I should be able to do the rest pretty easily ;)

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: Feature Request: Use Ship or Weapon as CBAnim
:D
-C

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Re: Feature Request: Use Ship or Weapon as CBAnim
What? I'm SCP now?  Anyway:

Command, those coordinates you gave us are bogus.  Its x, y, width, height, not corner, other corner ;)  Spent a lot of tim trying to figure that out...

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Feature Request: Use Ship or Weapon as CBAnim
You have access to the internal forum, by recommendation. :) Check it out.

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Re: Feature Request: Use Ship or Weapon as CBAnim
Well, after wrestling with Console, making many stupid mistakes, and discovering that I had the wrong coordinates, I finally got this finished.  I've tested it a bunch, but whoever commits it should probably look it over and you might want to test it a little yourself.  Also, someone will have to add this to FRED, as I can't.  So basically how it works is in the mission, after the ani filename, it looks for "+Ship Class:", "+Weapon Class:", or "+Model Name:" (only one of the three).  Defining a ship or weapon sets some special behavior.  For ships, it uses the table-defined closeup position and zoom values.  For weapons, it uses the tech model if available, if not it uses the regular POF file (unless the weapon is a primary - flak behaves weirdly), assumed to be a missile so that the center is set up correctly.  I removed the 1.7 multiplier from the closeup zoom, because I thought it looked better that way in a longer rectangle.  I guess that's pretty much it.  So here's the diff.

And BTW, we should really be able to attach diff files.

EDIT: Darn!  Forgot to add code to deal with when a ship class doesn't exist.  Appears to be a fatal error.

EDIT2: Fixed and reuploaded.  Forgot to mention that using a ship causes a slight, but noticeable pause when initializing a briefing stage.

EDIT3: And forgot to thank WMCoolmon for showing me how to get this to work in the first place!  How could I forget that?

[attachment deleted by admin]
« Last Edit: June 13, 2008, 12:32:40 am by blowfish »

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Feature Request: Use Ship or Weapon as CBAnim
Actually I think it's better to use an archive than a plain text file attachment anyway.  I just prefer having those types of things archived, even if it's not compressed.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays