sprite.h
changeset 413 36f14a6d63d7
parent 408 48da21eb9ff2
child 426 381172276dc6
equal deleted inserted replaced
412:3b10a6e44e7e 413:36f14a6d63d7
    74 	byte add_val;
    74 	byte add_val;
    75 	byte divmod_val;
    75 	byte divmod_val;
    76 	
    76 	
    77 	// And apply it to this:
    77 	// And apply it to this:
    78 	byte num_ranges;
    78 	byte num_ranges;
    79 	struct DeterministicSpriteGroupRanges *ranges; // Dynamically allocated
    79 	struct DeterministicSpriteGroupRange *ranges; // Dynamically allocated
    80 
    80 
    81 	// Dynamically allocated, this is the sole owner
    81 	// Dynamically allocated, this is the sole owner
    82 	struct SpriteGroup *default_group;
    82 	struct SpriteGroup *default_group;
    83 };
    83 };
    84 
    84 
    93 		struct RealSpriteGroup real;
    93 		struct RealSpriteGroup real;
    94 		struct DeterministicSpriteGroup determ;
    94 		struct DeterministicSpriteGroup determ;
    95 	} g;
    95 	} g;
    96 };
    96 };
    97 
    97 
    98 struct DeterministicSpriteGroupRanges {
    98 struct DeterministicSpriteGroupRange {
    99 	struct SpriteGroup group;
    99 	struct SpriteGroup group;
   100 	byte range_low;
   100 	byte low;
   101 	byte range_high;
   101 	byte high;
   102 };
   102 };
   103 
   103 
   104 /* This is a temporary helper for SpriteGroup users not supporting variational
   104 /* This is a temporary helper for SpriteGroup users not supporting variational
   105  * sprite groups yet - it just traverses those cowardly, always taking the
   105  * sprite groups yet - it just traverses those cowardly, always taking the
   106  * default choice until it hits a real sprite group, returning it. */
   106  * default choice until it hits a real sprite group, returning it. */
   107 static struct RealSpriteGroup *TriviallyGetRSG(struct SpriteGroup *sg);
   107 static struct RealSpriteGroup *TriviallyGetRSG(struct SpriteGroup *sg);
       
   108 /* This takes value (probably of the variable specified in the group) and
       
   109  * chooses corresponding SpriteGroup accordingly to the given
       
   110  * DeterministicSpriteGroup. */
       
   111 struct SpriteGroup *EvalDeterministicSpriteGroup(struct DeterministicSpriteGroup *dsg, int value);
       
   112 /* Get value of a common deterministic SpriteGroup variable. */
       
   113 int GetDeterministicSpriteValue(byte var);
   108 
   114 
   109 
   115 
   110 
   116 
   111 /**** Inline functions ****/
   117 /**** Inline functions ****/
   112 
   118