Skip to content

Commit

Permalink
Basically done.
Browse files Browse the repository at this point in the history
woo
  • Loading branch information
DrMelon committed May 16, 2013
1 parent 2de9475 commit 3d5278f
Show file tree
Hide file tree
Showing 71 changed files with 7,566 additions and 393 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,24 @@ OBJECTS = \
gameobjects.o \
player.o \
eyebots.o \
disk.o \
securitycam.o \
state_menu.o \
state_game.o \
state_pause.o \
state_win.o \
title_screen.o \
prototype_gfx.o \
pausestuff.o \
shadowtiles_simple.o \
status_good.o \
status_bad.o \
status_seen.o \
status_dead.o \
business.o \
visioncone.o \
gfx_eyebots.o \
level_data.o \
levels.o \
tonchelper.o \
libtonc.a
Expand Down
7 changes: 7 additions & 0 deletions TODO.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
PROPER LEVEL FORMAT [ ] (editor?) [ ]
DISK [ ]
NEXT LEVEL HANDLE [ ]
5 SET LEVELS [ ]
LEVEL RESETS (DEATH) [ ]
POSSIBLY DOORS [ ]
ALERT INDICATOR [ ]
2,759 changes: 2,759 additions & 0 deletions business.c

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions business.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

//{{BLOCK(business)

//======================================================================
//
// business, 240x160@8,
// + palette 256 entries, not compressed
// + bitmap not compressed
// Total size: 512 + 38400 = 38912
//
// Time-stamp: 2013-05-16, 15:28:40
// Exported by Cearn's GBA Image Transmogrifier, v0.8.6
// ( http://www.coranac.com/projects/#grit )
//
//======================================================================

#ifndef GRIT_BUSINESS_H
#define GRIT_BUSINESS_H

#define businessBitmapLen 38400
extern const unsigned short businessBitmap[19200];

#define businessPalLen 512
extern const unsigned short businessPal[256];

#endif // GRIT_BUSINESS_H

//}}BLOCK(business)
Binary file added business.o
Binary file not shown.
37 changes: 32 additions & 5 deletions depend.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
disk.o: disk.cpp disk.h gameobjects.h tonclib/include/tonc.h \
tonclib/include/tonc_types.h tonclib/include/tonc_memmap.h \
tonclib/include/tonc_memdef.h tonclib/include/tonc_bios.h \
tonclib/include/tonc_core.h tonclib/include/tonc_input.h \
tonclib/include/tonc_irq.h tonclib/include/tonc_math.h \
tonclib/include/tonc_oam.h tonclib/include/tonc_tte.h \
tonclib/include/tonc_surface.h tonclib/include/tonc_video.h \
tonclib/include/tonc_nocash.h tonclib/include/tonc_text.h tonchelper.h \
vectormath.h
eyebots.o: eyebots.cpp eyebots.h gameobjects.h tonclib/include/tonc.h \
tonclib/include/tonc_types.h tonclib/include/tonc_memmap.h \
tonclib/include/tonc_memdef.h tonclib/include/tonc_bios.h \
Expand All @@ -16,6 +25,14 @@ gameobjects.o: gameobjects.cpp gameobjects.h tonclib/include/tonc.h \
tonclib/include/tonc_surface.h tonclib/include/tonc_video.h \
tonclib/include/tonc_nocash.h tonclib/include/tonc_text.h tonchelper.h \
vectormath.h
level_data.o: level_data.cpp level_data.h tonclib/include/tonc.h \
tonclib/include/tonc_types.h tonclib/include/tonc_memmap.h \
tonclib/include/tonc_memdef.h tonclib/include/tonc_bios.h \
tonclib/include/tonc_core.h tonclib/include/tonc_input.h \
tonclib/include/tonc_irq.h tonclib/include/tonc_math.h \
tonclib/include/tonc_oam.h tonclib/include/tonc_tte.h \
tonclib/include/tonc_surface.h tonclib/include/tonc_video.h \
tonclib/include/tonc_nocash.h tonclib/include/tonc_text.h tonchelper.h
levels.o: levels.cpp levels.h tonclib/include/tonc.h \
tonclib/include/tonc_types.h tonclib/include/tonc_memmap.h \
tonclib/include/tonc_memdef.h tonclib/include/tonc_bios.h \
Expand All @@ -24,7 +41,7 @@ levels.o: levels.cpp levels.h tonclib/include/tonc.h \
tonclib/include/tonc_oam.h tonclib/include/tonc_tte.h \
tonclib/include/tonc_surface.h tonclib/include/tonc_video.h \
tonclib/include/tonc_nocash.h tonclib/include/tonc_text.h tonchelper.h \
vectormath.h eyebots.h gameobjects.h securitycam.h player.h
vectormath.h eyebots.h gameobjects.h securitycam.h player.h disk.h
main.o: main.cpp tonclib/include/tonc.h tonclib/include/tonc_types.h \
tonclib/include/tonc_memmap.h tonclib/include/tonc_memdef.h \
tonclib/include/tonc_bios.h tonclib/include/tonc_core.h \
Expand All @@ -35,7 +52,8 @@ main.o: main.cpp tonclib/include/tonc.h tonclib/include/tonc_types.h \
tonclib/include/tonc_text.h statestack.h state_menu.h statelist.h \
title_screen.h state_game.h tonchelper.h player.h vectormath.h \
gameobjects.h securitycam.h eyebots.h prototype_gfx.h \
shadowtiles_simple.h visioncone.h gfx_eyebots.h levels.h
shadowtiles_simple.h visioncone.h gfx_eyebots.h status_bad.h \
status_good.h status_dead.h status_seen.h level_data.h levels.h disk.h
objectmanager.o: objectmanager.cpp
player.o: player.cpp player.h tonclib/include/tonc.h \
tonclib/include/tonc_types.h tonclib/include/tonc_memmap.h \
Expand Down Expand Up @@ -65,7 +83,8 @@ state_game.o: state_game.cpp state_game.h tonclib/include/tonc.h \
tonclib/include/tonc_nocash.h tonclib/include/tonc_text.h tonchelper.h \
statelist.h statestack.h player.h vectormath.h gameobjects.h \
securitycam.h eyebots.h prototype_gfx.h shadowtiles_simple.h \
visioncone.h gfx_eyebots.h levels.h
visioncone.h gfx_eyebots.h status_bad.h status_good.h status_dead.h \
status_seen.h level_data.h levels.h disk.h
state_menu.o: state_menu.cpp state_menu.h tonclib/include/tonc.h \
tonclib/include/tonc_types.h tonclib/include/tonc_memmap.h \
tonclib/include/tonc_memdef.h tonclib/include/tonc_bios.h \
Expand All @@ -83,8 +102,16 @@ state_pause.o: state_pause.cpp state_pause.h tonclib/include/tonc.h \
tonclib/include/tonc_oam.h tonclib/include/tonc_tte.h \
tonclib/include/tonc_surface.h tonclib/include/tonc_video.h \
tonclib/include/tonc_nocash.h tonclib/include/tonc_text.h tonchelper.h \
levels.h vectormath.h eyebots.h gameobjects.h securitycam.h player.h \
statelist.h statestack.h pausestuff.h
level_data.h statelist.h statestack.h pausestuff.h
state_win.o: state_win.cpp state_win.h tonclib/include/tonc.h \
tonclib/include/tonc_types.h tonclib/include/tonc_memmap.h \
tonclib/include/tonc_memdef.h tonclib/include/tonc_bios.h \
tonclib/include/tonc_core.h tonclib/include/tonc_input.h \
tonclib/include/tonc_irq.h tonclib/include/tonc_math.h \
tonclib/include/tonc_oam.h tonclib/include/tonc_tte.h \
tonclib/include/tonc_surface.h tonclib/include/tonc_video.h \
tonclib/include/tonc_nocash.h tonclib/include/tonc_text.h statelist.h \
statestack.h business.h
tonchelper.o: tonchelper.cpp tonchelper.h tonclib/include/tonc.h \
tonclib/include/tonc_types.h tonclib/include/tonc_memmap.h \
tonclib/include/tonc_memdef.h tonclib/include/tonc_bios.h \
Expand Down
31 changes: 31 additions & 0 deletions disk.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#include "disk.h"

Disk::Disk(int x, int y, int width, int height, int objID) : super(x, y, width, height, objID)
{
diskAnim = new Animation(1, 1);
diskAnim->Frames[0] = 12*2;

currentAnimation = diskAnim;

}

void Disk::Draw()
{
super::Draw();

// Check to make sure we haven't gone offscreen:

// Check to see if we're on screen or not...
if(ScreenPositionX < 0 || ScreenPositionX > 248 || ScreenPositionY < 0 || ScreenPositionY > 160)
{
SetObject(objectID, ATTR0_SHAPE(Shape) | ATTR0_8BPP | ATTR0_HIDE | ATTR0_REG | ATTR0_Y(32),
ATTR1_SIZE(Size) | ATTR1_X(32),
ATTR2_ID(currentAnimation->Frames[currentAnimation->CurrentFrame]));
}

}

void Disk::Update()
{
//nada
}
21 changes: 21 additions & 0 deletions disk.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#pragma once

#include "gameobjects.h"

class Disk : public GameObject // the data disk, our main objective!
{
public:

typedef GameObject super; // Lets me use super() or super::Foo() for parent-class stuff.

Animation* diskAnim;

//Main Functions
Disk(int x, int y, int width, int height, int objID);
void Update();
void Draw();




};
Binary file added disk.o
Binary file not shown.
10 changes: 8 additions & 2 deletions eyebots.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ EyeBot::EyeBot(int x, int y, int width, int height, int objID, Player* _thePlaye
// Default Pattern of Movement is just sitting in-place.
Vector3D p1;
p1.X = x;
p1.Y = x;
p1.Y = y;
pathPoints.push_back(p1);


Expand Down Expand Up @@ -116,7 +116,7 @@ void EyeBot::Update()
}


// There is no drag or collision
// There is no drag or level collision


//Update Position using Velocity.
Expand All @@ -131,6 +131,12 @@ void EyeBot::Update()
frameCounter = 0;
}

// If we collide with the player, we kill him!
if(Position.X + HalfWidth > thePlayer->Position.X && Position.Y + HalfWidth > thePlayer->Position.Y && Position.X + HalfWidth < thePlayer->Position.X + thePlayer->Width && Position.Y + HalfWidth < thePlayer->Position.Y + thePlayer->Height)
{
thePlayer->Dead = true;
}



}
Expand Down
Binary file modified eyebots.o
Binary file not shown.
Loading

0 comments on commit 3d5278f

Please sign in to comment.