Carnivores 2 SAV

The Carnivores 2 *.SAV files are saved games, containing the hunter's name, points, settings, and trophies. These files are always exactly 1659 bytes long.

File name
All saved games are named according to the pattern "trophy0#.sav", where # is a number between 0 and 5, corresponding to each game slot.

Code
The following code in Hunt.h defines the structure of the sav files:

The following code in Game.cpp loads the sav files:

This code in Game.cpp (immediately following the above  function) saves the sav file:

This code in the function  in Game.cpp saves a trophy to the trophy room:

Format
The actual format is as follows:

(maximum name length is actually only 10 characters; the rest of the field is null-padded)
 * long     -   (corresponds to the position on the game sign-in screen; this doesn't actually have any effect and only seems to be written when an account is initially created)
 * long     - Total credits
 * long     - Rank (This is left over from the Carnivores ranking system. It is reset to 0 and recalculated every time the account is saved; if the player has more than 100 credits, it's set to 1; and if more than 300 credits, it's set to 2.)
 * long     - Shots made during the last hunt
 * long     - Shots succeeded during the last hunt (equal to the number of pointable animals downed)
 * float(4) - Path traveled during the last hunt
 * float(4) - Time hunted during the last hunt
 * long     - Total shots made
 * long     - Total shots succeeded (equal to the number of pointable animals downed)
 * float(4) - Total path traveled
 * float(4) - Total time hunted


 * // For each trophy (1-24)
 * long     - Animal,   (This is a number from 1 to n corresponding with the position in _RES.TXT (for instance, Parasaurolophus is the seventh animal listed in _RES.TXT, so the value in this field for a Parasaurolophus would be 7). When a trophy is removed, this field is actually just changed to 0, and the trophy information is not otherwise changed until another trophy gets saved in the same slot, making trophy unremoval possible.)
 * long     - Weapon (Similar to the animal field, this is a number from 0 to n-1 corresponding with the position in _RES.TXT, so the Rifle, which is fifth, has a value of 4.)
 * long     -   (the purpose of this field is unknown, but it is calculated via RealTime AND 3; RealTime is based on , which is how many milliseconds have passed since the system was last started up)
 * long     - Height (seems to never be used; scale is instead used to calculate a trophy's height)
 * long     - Weight (seems to never be used; scale is instead used to calculate a trophy's weight)
 * long     - Score
 * long     - Date (this is calculated by left-shifting the year by 20, left-shifting the month by 10, and adding them and the date together:   (in Game.cpp))
 * long     - Time (this is calculated by left-shifting the hour by 10 and adding it to the minute:   (in Game.cpp))
 * float(4) - Scale (as calculated from scaleO and scaleA in _RES.TXT)
 * float(4) - Range of kill
 * long     - r1 (unused; possibly meant to allow for future addition of trophy information)
 * long     - r2 (unused; possibly meant to allow for future addition of trophy information)
 * long     - r3 (unused; possibly meant to allow for future addition of trophy information)
 * long     - r4 (unused; possibly meant to allow for future addition of trophy information)


 * long     - Aggressivity
 * long     - Density
 * long     - Sensitivity
 * long     - Resolution
 * long     - Fog
 * long     - Textures
 * long     - View range
 * long     - 3D shadows
 * long     - Mouse sensitivity
 * long     - Brightness
 * long     - Forward
 * long     - Backward
 * long     - Turn up
 * long     - Turn down
 * long     - Turn left
 * long     - Turn right
 * long     - Fire
 * long     - Get weapon
 * long     - Step left
 * long     - Step right
 * long     - Strafe
 * long     - Jump
 * long     - Run
 * long     - Crouch
 * long     - Call
 * long     - Change call
 * long     - Binoculars
 * long     - Reverse mouse
 * long     - Cover scent
 * long     - Camouflage
 * long     - Radar
 * long     - Tranquilizer
 * long     - OPT_ALPHA_COLORKEY
 * long     - Measurement
 * long     - Audio driver
 * long     - Video driver