INNER CODE UNIT · C
ai
acoto87/war1 · src/war_ai.c:36
WarAI* ai = aiPlayer->ai;
assert(ai);
WarAICommand* command = (WarAICommand*)wm_alloc(sizeof(WarAICommand));
command->id = ++ai->staticCommandId;
command->type = type;
command->status = WAR_AI_COMMAND_STATUS_CREATED;
return command;
}
WarAICommand* wai_createUnitRequest(WarContext* context, WarPlayerInfo* aiPlayer, WarUnitType unitType, s32 count)
{
WarAICommand* request = wai_createAICommand(context, aiPlayer, WAR_AI_COMMAND_REQUEST);
request->request.unitType = unitType;
request->request.count = count;
return request;
}