- Main Page
- Classes
- Files

- File List
- File Members

# C:/Users/Public/AGS Final Folder/BFLETCHER D4010283/Source/Game/Source/BreakoutLocationArray.h

Go to the documentation of this file.

    00001 #ifndef _BREAKOUTLOCATIONARRAY_H_
    00002 #define _BREAKOUTLOCATIONARRAY_H_
    00003
    00004 #include "AABB.h"
    00005 #include "Vector2.h"
    00006
    00007 class BreakoutLocationArray
    00008 {
    00009         public:
    00010         BreakoutLocationArray(const AABBi &boxArea, const Vector2i &boxSize, int padding = 1);
    00011         ~BreakoutLocationArray();
    00012
    00013         Vector2i GetLocation(const int &x, const int &y)
    00014         {
    00015                 if(m_pLocationArray)
    00016                         return m_pLocationArray[(y * m_width) + x];
    00017                 else
    00018                         return Vector2i(-100,-100); //Somewhere offscreen so it doesn't appear before it is deleted.
    00019         }
    00020
    00021         int GetWidth() { return m_width; }
    00022         int GetHeight() { return m_height; }
    00023
    00024         protected:
    00025         Vector2i* m_pLocationArray;
    00026         int m_width, m_height;
    00027 };
    00028
    00029 #endif