Steven Mahasin / Mbed 2 deprecated DreamDungeon

Dependencies:   mbed MotionSensor

Entity/Mobs/Headless/Headless.h

Committer:
el17sm
Date:
2019-05-09
Revision:
56:ef9521b7ed78
Parent:
34:1d5b4da3935e
Child:
58:c8d90bb7404a

File content as of revision 56:ef9521b7ed78:

#ifndef HEADLESS_H
#define HEADLESS_H
#include "Entity.h"

class Headless : public Entity
{

public:
    // Constructor
    Headless(float, float);

    // Functions
    virtual void move(float player_x, float player_y, char * map, bool * doorways);
    virtual void draw(N5110 &lcd);
    virtual void take_damage(int damage);

private:
    // Methods
    char * get_frame();
    void increment_frame();
};

const char sprite_headless[4][4][9][6] = {   // Player [Face][SpriteAnimationFrame][Size_Y][Size_X]
    {
        // Up
        {
            {0,0,0,0,0,0,},
            {1,0,0,0,0,0,},
            {0,1,1,1,1,0,},
            {1,0,1,1,0,1,},
            {0,0,1,1,0,0,},
            {0,0,1,1,0,0,},
            {0,1,0,0,1,0,},
            {0,1,0,0,1,0,},
            {0,1,0,0,1,0,}
        },
        {
            {0,0,0,0,0,0,},
            {0,0,0,1,0,0,},
            {0,1,1,1,1,0,},
            {1,0,1,1,0,1,},
            {0,0,1,1,0,0,},
            {0,0,1,1,0,0,},
            {0,1,0,0,1,0,},
            {0,1,0,0,1,0,},
            {0,0,0,0,1,0,}
        },
        {
            {0,0,0,0,1,0,},
            {0,0,1,0,0,0,},
            {0,1,1,1,1,0,},
            {1,0,1,1,0,1,},
            {0,0,1,1,0,0,},
            {0,0,1,1,0,0,},
            {0,1,0,0,1,0,},
            {0,1,0,0,1,0,},
            {0,1,0,0,1,0,}
        },
        {
            {0,1,0,0,0,0,},
            {0,0,0,0,0,0,},
            {0,1,1,1,1,0,},
            {1,0,1,1,0,1,},
            {0,0,1,1,0,0,},
            {0,0,1,1,0,0,},
            {0,1,0,0,1,0,},
            {0,1,0,0,1,0,},
            {0,1,0,0,0,0,}
        }
    },
    {
        // Right
        {
            {0,0,0,0,0,0,},
            {0,0,1,0,0,0,},
            {0,0,1,1,0,0,},
            {0,0,1,1,1,1,},
            {0,0,1,1,0,0,},
            {0,0,1,1,0,0,},
            {0,0,1,0,0,0,},
            {0,0,1,0,0,0,},
            {0,0,1,1,0,0,}
        },
        {
            {0,1,0,0,0,0,},
            {0,0,0,1,0,0,},
            {0,0,1,1,0,0,},
            {0,0,1,1,1,1,},
            {0,0,1,1,0,0,},
            {0,0,1,1,0,0,},
            {0,0,1,0,1,0,},
            {0,0,1,0,1,0,},
            {0,1,0,0,0,1,}
        },
        {
            {0,0,0,0,1,0,},
            {0,0,0,0,0,0,},
            {0,0,1,1,0,0,},
            {0,0,1,1,1,1,},
            {0,0,1,1,0,0,},
            {0,0,1,1,0,0,},
            {0,0,1,0,0,0,},
            {0,0,1,0,0,0,},
            {0,0,1,1,0,0,}
        },
        {
            {0,0,0,0,0,0,},
            {0,0,0,0,0,1,},
            {0,0,1,1,0,0,},
            {0,0,1,1,1,1,},
            {0,0,1,1,0,0,},
            {0,0,1,1,0,0,},
            {0,0,1,0,1,0,},
            {0,0,1,0,1,0,},
            {0,1,0,0,0,1,}
        }
    },
    {
        // Down
        {
            {0,0,0,0,0,0,},
            {1,0,0,0,0,0,},
            {0,1,1,1,1,0,},
            {1,0,1,1,0,1,},
            {0,0,1,1,0,0,},
            {0,0,1,1,0,0,},
            {0,1,0,0,1,0,},
            {0,1,0,0,1,0,},
            {0,1,0,0,1,0,}
        },
        {
            {0,0,0,0,0,0,},
            {0,0,0,1,0,0,},
            {0,1,1,1,1,0,},
            {1,0,1,1,0,1,},
            {0,0,1,1,0,0,},
            {0,0,1,1,0,0,},
            {0,1,0,0,1,0,},
            {0,1,0,0,1,0,},
            {0,0,0,0,1,0,}
        },
        {
            {0,0,0,0,1,0,},
            {0,0,1,0,0,0,},
            {0,1,1,1,1,0,},
            {1,0,1,1,0,1,},
            {0,0,1,1,0,0,},
            {0,0,1,1,0,0,},
            {0,1,0,0,1,0,},
            {0,1,0,0,1,0,},
            {0,1,0,0,1,0,}
        },
        {
            {0,1,0,0,0,0,},
            {0,0,0,0,0,0,},
            {0,1,1,1,1,0,},
            {1,0,1,1,0,1,},
            {0,0,1,1,0,0,},
            {0,0,1,1,0,0,},
            {0,1,0,0,1,0,},
            {0,1,0,0,1,0,},
            {0,1,0,0,0,0,}
        }
    },
    {
        // Left
        {
            {0,0,0,0,0,0,},
            {0,0,0,1,0,0,},
            {0,0,1,1,0,0,},
            {1,1,1,1,0,0,},
            {0,0,1,1,0,0,},
            {0,0,1,1,0,0,},
            {0,0,0,1,0,0,},
            {0,0,0,1,0,0,},
            {0,0,1,1,0,0,}
        },
        {
            {0,0,0,0,1,0,},
            {0,0,1,0,0,0,},
            {0,0,1,1,0,0,},
            {1,1,1,1,0,0,},
            {0,0,1,1,0,0,},
            {0,0,1,1,0,0,},
            {0,1,0,1,0,0,},
            {0,1,0,1,0,0,},
            {1,0,0,0,1,0,}
        },
        {
            {0,1,0,0,0,0,},
            {0,0,0,0,0,0,},
            {0,0,1,1,0,0,},
            {1,1,1,1,0,0,},
            {0,0,1,1,0,0,},
            {0,0,1,1,0,0,},
            {0,0,0,1,0,0,},
            {0,0,0,1,0,0,},
            {0,0,1,1,0,0,}
        },
        {
            {0,0,0,0,0,0,},
            {1,0,0,0,0,0,},
            {0,0,1,1,0,0,},
            {1,1,1,1,0,0,},
            {0,0,1,1,0,0,},
            {0,0,1,1,0,0,},
            {0,1,0,1,0,0,},
            {0,1,0,1,0,0,},
            {1,0,0,0,1,0,}
        }
    }
};

#endif