sm64

A Super Mario 64 decompilation
Log | Files | Refs | README | LICENSE

shadow.h (1306B)


      1 #ifndef SHADOW_H
      2 #define SHADOW_H
      3 
      4 #include <PR/ultratypes.h>
      5 #include <PR/gbi.h>
      6 
      7 /**
      8  * Shadow types. Shadows are circles, squares, or hardcoded rectangles, and
      9  * can be composed of either 4 or 9 vertices.
     10  */
     11 enum ShadowType {
     12     SHADOW_CIRCLE_9_VERTS = 0,
     13     SHADOW_CIRCLE_4_VERTS = 1,
     14     SHADOW_CIRCLE_4_VERTS_FLAT_UNUSED = 2,
     15     SHADOW_SQUARE_PERMANENT = 10,
     16     SHADOW_SQUARE_SCALABLE = 11,
     17     SHADOW_SQUARE_TOGGLABLE = 12,
     18     /**
     19      * This defines an offset after which rectangular shadows with custom
     20      * widths and heights can be defined.
     21      */
     22     SHADOW_RECTANGLE_HARDCODED_OFFSET = 50,
     23     SHADOW_CIRCLE_PLAYER = 99
     24 };
     25 
     26 /**
     27  * Flag for if Mario is on a flying carpet.
     28  */
     29 extern s8 sMarioOnFlyingCarpet;
     30 
     31 /**
     32  * The surface type below the current shadow.
     33  */
     34 extern s16 sSurfaceTypeBelowShadow;
     35 
     36 /**
     37  * Flag for if the current shadow is above water or lava.
     38  */
     39 extern s8 gShadowAboveWaterOrLava;
     40 
     41 /**
     42  * Flag for if Mario is on ice or a flying carpet.
     43  */
     44 extern s8 gMarioOnIceOrCarpet;
     45 
     46 /**
     47  * Given the (x, y, z) location of an object, create a shadow below that object
     48  * with the given initial solidity and "shadowType" (described above).
     49  */
     50 Gfx *create_shadow_below_xyz(f32 xPos, f32 yPos, f32 zPos, s16 shadowScale, u8 shadowSolidity, s8 shadowType);
     51 
     52 #endif // SHADOW_H