diff options
| author | Ben Beltran <ben@nsovocal.com> | 2014-02-03 09:55:31 -0600 |
|---|---|---|
| committer | Ben Beltran <ben@nsovocal.com> | 2014-02-03 09:55:31 -0600 |
| commit | 0cafec445af0a97d96feb1a1daefa1486142c73f (patch) | |
| tree | 818df31eec1895518ad805219b79bc63f9f616aa /src/actor_manager.c | |
| parent | 830829dec0596760d0cba38d959ab2646112f61b (diff) | |
Removes old stuff, adds mac proj
Diffstat (limited to 'src/actor_manager.c')
| -rw-r--r-- | src/actor_manager.c | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/src/actor_manager.c b/src/actor_manager.c deleted file mode 100644 index c9303d2..0000000 --- a/src/actor_manager.c +++ /dev/null @@ -1,57 +0,0 @@ -// -// actor_manager.c -// Super Polarity -// -// Created by Ruben Beltran del Rio on 8/14/13. -// Copyright (c) 2013 Abuguet. All rights reserved. -// - -#include <stdio.h> -#include "actor_manager.h" - -void actorManagerUpdate(ActorManager *this, Uint32 dt) { - ActorNode *head = this->actors; - - while (head != NULL) { - head->val->update(head->val, dt); - head = head->next; - } -} - -void actorManagerDraw(ActorManager *this) { - ActorNode *head = this->actors; - - while (head != NULL) { - head->val->draw(head->val); - head = head->next; - } -} - -void actorManagerAddActor(ActorManager *this, Actor *actor) { - ActorNode *actorNode = malloc(sizeof(ActorNode*)); - ActorNode **head = &this->actors; - ActorNode *temp; - actorNode->val = actor; - actorNode->next = NULL; - - if (*head == NULL) { - *head = actorNode; - } else { - temp = *head; - - while (temp->next != NULL) { - temp = temp->next; - } - temp->next = actorNode; - } -} - -ActorManager* createActorManager () { - ActorManager *actorManager = malloc(sizeof(ActorManager*)); - actorManager->actors = NULL; - actorManager->update = actorManagerUpdate; - actorManager->draw = actorManagerDraw; - actorManager->addActor = actorManagerAddActor; - - return actorManager; -}
\ No newline at end of file |