0

ported spawn render mode to C

This commit is contained in:
Aaron Griffith
2011-03-23 02:31:09 -04:00
parent 69bb56dcb4
commit ccddba2d81
5 changed files with 143 additions and 3 deletions

View File

@@ -82,6 +82,7 @@ typedef struct {
float (*calculate_darkness)(unsigned char, unsigned char);
} RenderModeLighting;
extern RenderModeInterface rendermode_lighting;
inline float get_lighting_coefficient(RenderModeLighting *self, RenderState *state, int x, int y, int z);
/* NIGHT */
typedef struct {
@@ -90,4 +91,16 @@ typedef struct {
} RenderModeNight;
extern RenderModeInterface rendermode_night;
/* SPAWN */
typedef struct {
/* inherits from night */
RenderModeNight parent;
/* used to figure out which blocks are spawnable */
PyObject *solid_blocks, *nospawn_blocks, *fluid_blocks;
/* replacement for black_color */
PyObject *red_color;
} RenderModeSpawn;
extern RenderModeInterface rendermode_spawn;
#endif /* __RENDERMODES_H_INCLUDED__ */