05.02.2016, 15:51
Check this out:
Код:
#define AREA_TYPE_BUSINESS 1; #define AREA_TYPE_BLAHBLAH 2; enum areas_info { Type, AreaID } new Areas[MAX_AREAS][areas_info]; AreasInt() { Areas[0][Type] = AREA_TYPE_BUSINESS; Areas[0][AreaID] = CreateDynamicRectangle(...); Areas[1][Type] = AREA_TYPE_BUSINESS; Areas[1][AreaID] = CreateDynamicRectangle(...); Areas[2][Type] = AREAY_TYPE_BLAHBLAH; Areas[2][AreaID] = CreateDynamicRectangle(...); } IsBusinessArea(areaid) { // If is business if (Areas[10][Type] == AREA_TYPE_BUSINESS) return true; // If not return false; }