#ifndef LIBRARIES_KRSNAKE_H
#define LIBRARIES_KRSNAKE_H

/*
** KRSNAke.h
**
** - includes for KRSNAke.library 1.4
**
*/

#ifndef EXEC_TYPES_H
#include <exec/types.h>
#endif

/* event codes */

#define SNAKE_QUIT      23
#define SNAKE_NEWSCORE  24
#define SNAKE_GAMEOVER  25
#define SNAKE_NEWGAME   26
#define SNAKE_PAUSED    27
#define SNAKE_RESTARTED 28
#define SNAKE_EATEN     29
#define SNAKE_MOVES     30
#define SNAKE_NEWCHUNK  31

/* fill type description */

struct FillDesc {
    WORD Type;
    LONG Red, Green, Blue;
    UBYTE File[256]
};

#define FILLTYPE_RGB        0   /* rgb value */
#define FILLTYPE_DATATYPE   1   /* bitmap, loaded with datatypes */
#define FILLTYPE_GRAPHICS   2   /* several bitmaps; not yet implemented */

#define FILL_BACK   0   /* the playing field */
#define FILL_LINK   1   /* each link of the snake */
#define FILL_HEAD   2   /* the snake's head */
#define FILL_FRUIT  3
#define FILL_FRUIT1 3   /* fruit type 1 */
#define FILL_FRUIT2 4   /* fruit type 2 */
#define FILL_FRUIT3 5   /* fruit type 3 */
#define FILL_FRUIT4 6   /* fruit type 4 */

/* preferences */

struct KPrefs {
    LONG Priority;
    ULONG Flags;
    UBYTE PubScreen[64];
    ULONG StartGameSound[256];
    ULONG EatFruitSound[256];
    ULONG CrashSound[256];
    struct FillDesc Fill[7];
};

#define KPF_LETHAL180   1   /* 180° turns fatal (if not set, 180° turns not possible) */
#define KPB_LETHAL180   0

#endif

