-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsolids.h
164 lines (151 loc) · 7.34 KB
/
solids.h
1
/****************************************************************************************//* SOLIDS.H *//****************************************************************************************//* (c) 1995 by Magnet Interactive Studios, inc. All rights reserved. *//****************************************************************************************//* Revision History: *//* v5.6 5/5/95 Icebreaker Golden Master version. By Andrew Looney. *//* v6.1 8/23/95 Began making changes for Icebreaker Two. By Andrew Looney. *//****************************************************************************************/#define BLUE_PIECE_FILE "$boot/IceFiles/SolidsArt/blue.cel"#define RED_PIECE_FILE "$boot/IceFiles/SolidsArt/red.cel"#define GREEN_PIECE_FILE "$boot/IceFiles/SolidsArt/green.cel"#define PURPLE_PIECE_FILE "$boot/IceFiles/SolidsArt/purple.cel"#define BOULDER0_FILE "$boot/IceFiles/SolidsArt/rock0grey.cel"#define BOULDER1_FILE "$boot/IceFiles/SolidsArt/rock1white.cel"#define BOULDER2_FILE "$boot/IceFiles/SolidsArt/rock2brown.cel"#define BOULDER3_FILE "$boot/IceFiles/SolidsArt/rock3black.cel"#define BOULDER4_FILE "$boot/IceFiles/SolidsArt/rock4molten.cel"#define BOULDER5_FILE "$boot/IceFiles/SolidsArt/rock5ice.cel"#define BOULDER6_FILE "$boot/IceFiles/SolidsArt/rock6ice.cel"#define BOULDER7_FILE "$boot/IceFiles/SolidsArt/rock7ice.cel"#define BOULDER8_FILE "$boot/IceFiles/SolidsArt/rock8hotice.cel"#define BOULDER9_FILE "$boot/IceFiles/SolidsArt/rock9swamp.cel"#define BOULDERA_FILE "$boot/IceFiles/SolidsArt/RockAcoral.cel"#define BOULDERD_FILE "$boot/IceFiles/SolidsArt/RockDshell.cel"#define RAINBOW_ANIM "$boot/IceFiles/SolidsArt/rainbow.anim"#define SLIMY_ANIM "$boot/IceFiles/SolidsArt/slimy.anim"#define SLIMY_DEATH_ANIM "$boot/IceFiles/SolidsArt/slimydeath.anim"#define STEEL_ANIM "$boot/IceFiles/SolidsArt/steel.anim"#define STEEL_DEATH_ANIM "$boot/IceFiles/SolidsArt/steeldeath.anim"#define CONCRETE_ANIM "$boot/IceFiles/SolidsArt/concrete.anim"#define GREEN_MIRROR_FILE "$boot/IceFiles/SolidsArt/mirror.cel"#define BROWN_MIRROR_FILE "$boot/IceFiles/SolidsArt/mirror.cel"#define BLACK_MIRROR_FILE "$boot/IceFiles/SolidsArt/mirror.cel"#define WHITE_MIRROR_FILE "$boot/IceFiles/SolidsArt/mirror.cel"#define BLUE_DEATH_ANIM "$boot/IceFiles/SolidsArt/bluedeath.anim"#define RED_DEATH_ANIM "$boot/IceFiles/SolidsArt/reddeath.anim"#define GREEN_DEATH_ANIM "$boot/IceFiles/SolidsArt/greendeath.anim"#define PURPLE_DEATH_ANIM "$boot/IceFiles/SolidsArt/purplesplit.anim"#define CONCRETE_DEATH_ANIM "$boot/IceFiles/SolidsArt/endconcrete.anim"#define CONCRETE_PUFF_1 "$boot/IceFiles/SolidsArt/puff01.anim"#define CONCRETE_PUFF_2 "$boot/IceFiles/SolidsArt/puff02.anim"#define CONCRETE_PUFF_3 "$boot/IceFiles/SolidsArt/puff03.anim"#define MIRROR_DEATH_ANIM "$boot/IceFiles/SolidsArt/mirrordeath.anim"#define STEEL_COOLING_RATE 3#define STEEL_ANIM_FRAME_COUNT 21/****************************************************************************************/typedef struct solid_object{ CCB *cel; int32 object_type; int32 col_detect_x; /* number of pixels on x-axis from center of cel */ /* that constitute solidity */ int32 col_detect_y; /* number of pixels on y-axis from center of cel */ /* that constitute solidity */ solid_object *next; solid_object *previous;};typedef struct anisolid{ anim_user solid_anim; bool endless; solid_object *solids_entry; anisolid *next; int32 special; /* The use of this field is breed-specific. */};/****************************************************************************************/class solids { private: /*** variables for storage of master copies of artwork elements ***/ CCB *red_piece_cel; CCB *blue_piece_cel; CCB *purple_piece_cel; CCB *boulder0_cel; CCB *boulder1_cel; CCB *boulder2_cel; CCB *boulder3_cel; CCB *boulder4_cel; CCB *boulder5_cel; CCB *boulder6_cel; CCB *boulder7_cel; CCB *boulder8_cel; CCB *boulder9_cel; CCB *boulderA_cel; CCB *boulderD_cel; anim_source rainbow_piece_anim; anim_source slimy_piece_anim; anim_source steel_piece_anim; CCB *green_mirror_cel; CCB *brown_mirror_cel; CCB *black_mirror_cel; CCB *white_mirror_cel; /*** variables required for management of normal and animated solid objects ***/ CCB *inanimates_cel_database [ROWS_IN_LANDSCAPE] [COLUMNS_IN_LANDSCAPE]; public: /*** widely used variables for storage of master copies of artwork elements ***/ anim_source blue_death; anim_source red_death; anim_source purple_death; anim_source green_death; anim_source concrete_death; anim_source mirror_death; anim_source slimy_death; anim_source steel_death; anim_source concrete_puff[3]; anim_source concrete_piece_anim; CCB *green_piece_cel; solid_object *solids_list; solid_object *trash_can; anisolid *anisolid_list; void BootSolids(void); void LoadArtwork (int32 element_to_load); void PlaceSolidsInStartingPositions (void); void InitializeSolids (void); void AddToList (CCB *target, int32 object_type, int32 cd_x, int32 cd_y); void InsertAtProperPointInList(solid_object *new_solid); void TamperWithSorting (solid_object *first_solid, solid_object *second_solid, bool second_first); void RemoveFromList (solid_object *target_solid); solid_object* FindPointerIntoList (CCB *target); void EliminateObject (CCB *cel_to_eliminate); void EliminateObject (solid_object *object_to_eliminate); void EmptyTrash (void); void DisplaySolids (void); void FixPositionOnList (CCB *target_cel); void FixPositionOnList (solid_object *target); solid_object* DetectCollision (CCB *target, int32 target_cd_x,int32 target_cd_y, bool exclude_dudemeyer); solid_object* DetectCollision (solid_object *target, bool ignore_rocks); bool CompareForCollisions(solid_object *thing1, solid_object *thing2); void MoveWorld (int32 x_change, int32 y_change); void ChangeArt(CCB *target_cel, int32 solid_id); bool TransformSolid(void); void DumpList(solid_object *list_to_be_dumped); void CreateAnimatedSolid (anim_source *original, int32 frame_rate, solid_object *solids_entry, bool endless_value); void EliminateAnimatedObject(anisolid *target); void EliminateAnimatedObject(solid_object *target); anisolid* LocateAnimatedObject(solid_object *target); void MaintainAnimatedObjects(void); void ConcealChameleons (int32 how_many, int32 shell_color); void ResolveRainbowPyramid (solid_object *target); void RegisterRocksWithLandscape (void); void CheckForPotentialPits (void); void ConvertMirrorArt (void); void ShutdownForRestart(void); void ShutdownForExit(void); void ShutdownUnusedArtwork(void);};/*************************************** EOF ********************************************/