Author Topic: Any program that can create .sp2 files?  (Read 3891 times)

Offline decino

  • Full Member
  • ***
  • Posts: 191
  • Yeah.
    • View Profile
  • Rated:
Any program that can create .sp2 files?
« on: April 09, 2010, 01:44:05 PM »
It should be possible, WODX and Gloom use custom .sp2 files (animated sprites), but I can't find anything on Google or w/e.
I know a .sp2 contains x sprite.pcx files located in the sprites folder, just don't know how to merge them into a .sp2.

Anyone knows a program?

:shifteyes:
« Last Edit: April 09, 2010, 01:45:51 PM by decino »
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline peewee_RotA

  • Brobdingnagian Member
  • ***
  • Posts: 4152
  • Hi, I'm from the gov'ment and I'm here to help you
    • View Profile
  • Rated:
Re: Any program that can create .sp2 files?
« Reply #1 on: April 09, 2010, 02:25:15 PM »
Wasn't it the same tool that makes .cin files?

qtool?

Paril knows all this. He even started a new sp2 editor once. Don't think he finished that program.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
GOTO ROTAMODS (rocketgib)
GOTO ROTAMAPS (fireworks)
HappyFriar- q2server.fuzzylogicinc.com
 Tune in to the Tastycast!!!!  http://dna.zeliepa.net

Offline r1

  • Full Member
  • ***
  • Posts: 238
    • View Profile
  • Rated:
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline |iR|Focalor

  • Irrepressibly Profuse Member
  • *
  • Posts: 15767
  • Help Destroy America: VOTE DEMOCRAT
    • View Profile
    • Focalor's Horrible Website: We Rape You Til The Room Stinks
  • Rated:
Re: Any program that can create .sp2 files?
« Reply #3 on: April 18, 2010, 01:05:35 AM »
Last pak I made, I edited the BFG blast sprite to make it red. Basically I used GIMP and the colorize function to change the color to red. It took a bit of work to hand edit the pcx files to where I could make the alpha color stay the same. Saved all the new ones to PCX. Then converted the PCX ones to PNG and made the pinkish alpha color transparent since I use R1Q2 that can handle PNG images.

I'm not exactly sure what all an SP2 file would contain. Is that basically the open_gl rather than software version of the graphics? Would such a file also contain data for a BFG blast like the green laser beams and little green particles that come from the BFG ball? Reason why I ask... I'd like to be able to change whatever I need to change in order to make those red as well.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline X7

  • Sr. Member
  • ****
  • Posts: 447
  • Quake II
    • View Profile
  • Rated:
Re: Any program that can create .sp2 files?
« Reply #4 on: April 18, 2010, 07:00:53 AM »
The SP2 editor, is a easy to use PCX (to) SP2 maker..

hgspr2_v0.2b.zip        A Windows SP2 maker

http://files.volved.com/qsr/qoole250_cd/progs/q2_grafx/hgspr2_v0.2b.zip


http://files.volved.com/qsr/qoole250_cd/progs/q2_grafx/



 :beer:


X7
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
Quake II

Offline QwazyWabbit

  • Carpal Tunnel Member
  • ******
  • Posts: 1373
    • View Profile
  • Rated:
Re: Any program that can create .sp2 files?
« Reply #5 on: April 18, 2010, 08:24:47 PM »
An sp2 file just references the .pcx files that define the sprite over time. It's kind of an index into the sprite files the engine needs to animate them. Create your sprite .pcx files and then use the tool pointed to by Ruiner and X7 to create the .SP2 file. Note you will have to place the .sp2 and the .pcx files into the appropriate sprites folder or install them together into a .pak
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline Slayer :D

  • Sr. Member
  • ****
  • Posts: 426
    • View Profile
  • Rated:
Re: Any program that can create .sp2 files?
« Reply #6 on: April 19, 2010, 05:49:42 AM »
Heheheh. I had looked all over the net for a .sp2 editor but couldn't find one, so eventually I programmed my own. The file structure is really very simple, like this:

/*
 * The file header for the .SP2 file.
 */
typedef struct
{
char * type;   /* magic string, must be "IDS2" */
unsigned long fver;   /* file version, must be 2 */
unsigned long frnum;   /* number of frames in the sprite */
frame_t frames[];   /* the frames of the sprite (stack declaration because not normally very big) */
} sp2hdr_t;

/*
 * Each frame of the .SP2 file (80 bytes)
 */
typedef struct
{
signed long width;   /* width of the part of the image you want to use */
signed long height;   /* height of the part of the image you want to use */
signed long xorig;   /* x-position of where the upper-left corner of the image is */
signed long yorig;   /* y-position of where the upper-left corner of the image is */
char * q2path;   /* string telling where the .pcx file is (must be 64 bytes long, 0x00 terminated)
                               for example : "sprites/blorb/borb_1.pcx" */
} frame_t;


This is also in the order in which the data gets written out/read in.
Also, it is little-endian on Windows machines; unsure about others.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline QwazyWabbit

  • Carpal Tunnel Member
  • ******
  • Posts: 1373
    • View Profile
  • Rated:
Re: Any program that can create .sp2 files?
« Reply #7 on: April 19, 2010, 01:16:01 PM »
The struct is found in qfiles.h in the original quake2 v3.21 source release.

/*
========================================================================

.SP2 sprite file format

========================================================================
*/

#define IDSPRITEHEADER   (('2'<< 24 )+('S'<< 16 )+('D'<< 8 )+'I')
      // little-endian "IDS2"
#define SPRITE_VERSION   2

typedef struct
{
   int      width, height;
   int      origin_x, origin_y;      // raster coordinates inside pic
   char   name[MAX_SKINNAME];      // name of pcx file
} dsprframe_t;

typedef struct {
   int         ident;
   int         version;
   int         numframes;
   dsprframe_t   frames[1];         // variable sized
} dsprite_t;


MAX_SKINNAME is 64.
« Last Edit: April 19, 2010, 01:45:05 PM by QwazyWabbit »
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline decino

  • Full Member
  • ***
  • Posts: 191
  • Yeah.
    • View Profile
  • Rated:
Re: Any program that can create .sp2 files?
« Reply #8 on: April 21, 2010, 01:32:27 AM »
Thanks all, I figured it out a week ago.
I still think hex editing is the most easy way to 'create' sp2 files.

:beer:
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

 

El Box de Shoutamente

Last 10 Shouts:

Costigan_Q2

November 11, 2024, 06:41:06 AM
"Stay cozy folks.

Everything is gonna be fine."

There'll be no excuses for having TDS after January 20th, there'll be no excuses AT ALL!!!
 

|iR|Focalor

November 06, 2024, 03:28:50 AM
 

RailWolf

November 05, 2024, 03:13:44 PM
Nice :)

Tom Servo

November 04, 2024, 05:05:24 PM
The Joe Rogan Experience episode 223 that dropped a couple hours ago with Musk, they're talking about Quake lol.

Costigan_Q2

November 04, 2024, 03:37:55 PM
Stay cozy folks.

Everything is gonna be fine.
 

|iR|Focalor

October 31, 2024, 08:56:37 PM

Costigan_Q2

October 17, 2024, 06:31:53 PM
Not activated your account yet?

Activate it now! join in the fun!

Tom Servo

October 11, 2024, 03:35:36 PM
HAHAHAHAHAHA
 

|iR|Focalor

October 10, 2024, 12:19:41 PM
I don't worship the devil. Jesus is Lord, friend. He died for your sins. He will forgive you if you just ask.
 

rikwad

October 09, 2024, 07:57:21 PM
Sorry, I couldn't resist my inner asshole.

Show 50 latest
Welcome, Guest. Please login or register.
November 22, 2024, 07:05:36 PM

Login with username, password and session length