-
Notifications
You must be signed in to change notification settings - Fork 0
/
solids.h
169 lines (157 loc) · 8.79 KB
/
solids.h
1
/****************************************************************************************//* SOLIDS.H *//****************************************************************************************//* (c) 1995 by Magnet Interactive Studios, inc. All rights reserved. *//****************************************************************************************//* Revision History: *//* 7/6/94 File first created. By Andrew Looney. *//* v1.0 8/4/94 First polished version. By Andrew Looney. *//* v2.0 8/24/94 Seven level version burned onto CD-ROM. By Andrew Looney. *//* v2.1 8/29/94 Comments brought back up to date. By Andrew Looney. *//* v2.2 9/7/94 Sixteen level version. By Andrew Looney. *//* v2.3 9/23/94 Thirty level version burned onto CD-ROM. By Andrew Looney. *//* v2.4 10/19/94 Fifty level version. By Andrew Looney. *//* v2.5 10/31/94 Sixty level version burned onto CD-ROM. By Andrew Looney. *//* v3.0 10/31/94 Began switching over to real artwork. By Andrew Looney. *//* v3.1 11/11/94 COMDEX version. By Andrew Looney. *//* v3.2 12/2/94 Seventy-five level version. By Andrew Looney. *//* v3.3 12/14/94 Ack! Zombies! By Andrew Looney. *//* v3.4 12/23/94 Orange Meanies! By Andrew Looney. *//* v3.5 1/3/95 100 Levels! By Andrew Looney. *//* v3.6 1/5/95 101 Levels. By Andrew Looney. *//* v3.7 1/16/95 New, improved Brainy Seeker logic! By Andrew Looney. *//* v3.8 1/27/95 114 level version burned onto CD-ROM. By Andrew Looney. *//* v3.9 2/3/95 New CD-ROM burned for shipment to 3DO. By Andrew Looney. *//* v4.0 2/9/95 New CD-ROM featuring the big level grid. By Andrew Looney. *//* v4.1 2/22/95 New CD-ROM with rough draft of full interface. By Andrew Looney. *//* v4.2 3/17/95 The St. Patrick's Day Version. By Andrew Looney. *//* v4.3 3/20/95 The last version before the movies get added. By Andrew Looney. *//* v4.4 3/21/95 First version with movies integrated. By Andrew Looney. *//* v4.5 3/22/95 Second version with movies integrated. By Andrew Looney. *//* v4.6 3/27/95 Third version with movies integrated. By Andrew Looney. *//* v5.0 3/28/95 Newest version sent to QA. By Andrew Looney. *//* v5.1 3/28/95 Now, with Easter Eggs! By Andrew Looney. *//* v5.2 3/29/95 Could this be the final version? By Andrew Looney. *//* v5.3 3/30/95 OK, now maybe THIS is the final version! By Andrew Looney. *//* v5.4 4/3/95 Made a couple more minor changes. 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 CONCRETE_ANIM "$boot/IceFiles/SolidsArt/concrete.anim"#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"/****************************************************************************************/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;};/****************************************************************************************/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; /*** variables required for management of normal and animated solid objects ***/ CCB *inanimates_cel_database [ROWS_IN_LANDSCAPE] [COLUMNS_IN_LANDSCAPE]; anisolid *anisolid_list; solid_object *solids_list; solid_object *trash_can; 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 concrete_puff[3]; anim_source concrete_piece_anim; CCB *green_piece_cel; 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); void ResolveRainbowPyramid (solid_object *target); void RegisterRocksWithLandscape (void); void CheckForPotentialPits (void); void ShutdownForRestart(void); void ShutdownForExit(void); void ShutdownUnusedArtwork(void);};/*************************************** EOF ********************************************/