aboutsummaryrefslogtreecommitdiff
path: root/src/actor.c
diff options
context:
space:
mode:
authorBen Beltran <ben@nsovocal.com>2014-02-03 09:55:31 -0600
committerBen Beltran <ben@nsovocal.com>2014-02-03 09:55:31 -0600
commit0cafec445af0a97d96feb1a1daefa1486142c73f (patch)
tree818df31eec1895518ad805219b79bc63f9f616aa /src/actor.c
parent830829dec0596760d0cba38d959ab2646112f61b (diff)
Removes old stuff, adds mac proj
Diffstat (limited to 'src/actor.c')
-rw-r--r--src/actor.c44
1 files changed, 0 insertions, 44 deletions
diff --git a/src/actor.c b/src/actor.c
deleted file mode 100644
index 32028a1..0000000
--- a/src/actor.c
+++ /dev/null
@@ -1,44 +0,0 @@
-//
-// actor.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.h"
-
-SDL_Renderer *renderer;
-
-void actorUpdate(Actor *this, Uint32 dt) {
- this->textureBox.x = this->pos.x;
- this->textureBox.y = this->pos.y;
- this->angle = (Uint32)(this->angle + dt / 5) % 360;
-}
-
-void actorDraw(Actor *this) {
- SDL_RenderCopyEx(renderer, this->texture, NULL, &this->textureBox, this->angle, NULL, SDL_FLIP_NONE);
-}
-
-// This constructor is pretty much dumb. So, don't take it as anything final.
-Actor* createActor () {
- Actor *actor = malloc(sizeof(Actor*));
- actor->pos.x = 0;
- actor->pos.y = 0;
- actor->update = actorUpdate;
- actor->draw = actorDraw;
- actor->angle = 0.0;
-
- // Load the surface.
- SDL_Surface *benSurface;
- benSurface = IMG_Load("data/img/static/ben.png");
- actor->texture = SDL_CreateTextureFromSurface(renderer, benSurface);
- actor->textureBox.x = 230;
- actor->textureBox.y = 150;
- actor->textureBox.w = 180;
- actor->textureBox.h = 180;
- SDL_FreeSurface(benSurface);
-
- return actor;
-} \ No newline at end of file