Skip to content

Commit

Permalink
Commiting the last version
Browse files Browse the repository at this point in the history
  • Loading branch information
PotHix committed Aug 11, 2009
1 parent fc09b19 commit cdb4c88
Show file tree
Hide file tree
Showing 27 changed files with 2,784 additions and 2,704 deletions.
110 changes: 55 additions & 55 deletions include/AnimSprite.h
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
/*
*
* AnimSprite - By CrociDB
* http://crocidb.wordpress.com/
*
* Obrigado por usar ^^
*
*/

#include <allegro.h>

#include <iostream>
#include <vector>

#include <State.h>

class AnimSprite
{
private:
std::vector<BITMAP*> frames;
int frame_atual;
int delay;

int time;

std::vector<State*> states;
int curr_state;

int x, y;
public:
AnimSprite();

void run(BITMAP* bmp);

void SetDelay(int sdelay);
int GetDelay() const;

void SetX(int sx);
void SetY(int sy);
void SetPosition(int sx, int sy);

int GetX() const;
int GetY() const;

void AddFrame(const char* file);
void AddFrame(BITMAP* bmp);

int GetNumFrames() const;

void AddState(State* st);
void FitStates();

void SetCurrentState(int st);
int GetCurrentState() const;
};
/*
*
* AnimSprite - By CrociDB
* http://crocidb.wordpress.com/
*
* Obrigado por usar ^^
*
*/

#include <allegro.h>

#include <iostream>
#include <vector>

#include <State.h>

class AnimSprite
{
private:
std::vector<BITMAP*> frames;
int frame_atual;
int delay;

int time;

std::vector<State*> states;
int curr_state;

int x, y;
public:
AnimSprite();

void run(BITMAP* bmp);

void SetDelay(int sdelay);
int GetDelay() const;

void SetX(int sx);
void SetY(int sy);
void SetPosition(int sx, int sy);

int GetX() const;
int GetY() const;

void AddFrame(const char* file);
void AddFrame(BITMAP* bmp);

int GetNumFrames() const;

void AddState(State* st);
void FitStates();

void SetCurrentState(int st);
int GetCurrentState() const;
};
124 changes: 62 additions & 62 deletions include/CApp.h
Original file line number Diff line number Diff line change
@@ -1,62 +1,62 @@
/*
* Game developed by CrociDB on SpeedHack 2009
* http://speedhack.allegro.cc/
*
* CrociDBlog - http://crocidb.wordpress.com/
*
* The App Control class.
*
*/

#include <allegro.h>

class CApp
{
private:
/* Variaveis que guardam a resolucao */
int w, h;
/* Tamanho para programacao */
int tw, th;
/* Buffer */
BITMAP *buffer;
/* Wide */
int wide;
/* Bitmap do mouse */
BITMAP *bmpMouse;
public:
/* Funcao de Inicializacao */
void Init(int sw, int sh, char *title);
/* Funcao de Inicializacao (carrega info do arquivo) */
void Init(char *title);
/* Funcao de Desiniciacao */
void deInit();
/* Funcao que muda entre Fullscreen e Windowed */
void SwitchMode();
/* Funcao que muda entre Widescreen e normal */
void SwitchWide();
/* Limpa o Buffer */
void ClearBuffer();
void ClearBuffer(int col);
/* Funcao que atualiza o buffer */
void Refresh();
/* Mostra o cursor */
void ShowMouse();

/* Está em Widescreen? */
int isWide();

/* Seta o Buffer */
void SetBuffer(BITMAP *dbuffer);
/* Pega o Buffer */
BITMAP *GetBuffer();
/* Cria um Buffer */
void CreateBuffer();

/* Fade In */
void fade_in(BITMAP *bmp_orig, int speed);
void fadeInToColor(BITMAP *bmp_orig, int speed, int color);
/* Fade Out */
void fade_out(int speed);
void fadeOutToColor(int speed, int color);

};
/*
* Game developed by CrociDB on SpeedHack 2009
* http://speedhack.allegro.cc/
*
* CrociDBlog - http://crocidb.wordpress.com/
*
* The App Control class.
*
*/

#include <allegro.h>

class CApp
{
private:
/* Variaveis que guardam a resolucao */
int w, h;
/* Tamanho para programacao */
int tw, th;
/* Buffer */
BITMAP *buffer;
/* Wide */
int wide;
/* Bitmap do mouse */
BITMAP *bmpMouse;
public:
/* Funcao de Inicializacao */
void Init(int sw, int sh, char *title);
/* Funcao de Inicializacao (carrega info do arquivo) */
void Init(char *title);
/* Funcao de Desiniciacao */
void deInit();
/* Funcao que muda entre Fullscreen e Windowed */
void SwitchMode();
/* Funcao que muda entre Widescreen e normal */
void SwitchWide();
/* Limpa o Buffer */
void ClearBuffer();
void ClearBuffer(int col);
/* Funcao que atualiza o buffer */
void Refresh();
/* Mostra o cursor */
void ShowMouse();

/* Está em Widescreen? */
int isWide();

/* Seta o Buffer */
void SetBuffer(BITMAP *dbuffer);
/* Pega o Buffer */
BITMAP *GetBuffer();
/* Cria um Buffer */
void CreateBuffer();

/* Fade In */
void fade_in(BITMAP *bmp_orig, int speed);
void fadeInToColor(BITMAP *bmp_orig, int speed, int color);
/* Fade Out */
void fade_out(int speed);
void fadeOutToColor(int speed, int color);

};
134 changes: 67 additions & 67 deletions include/CArm.h
Original file line number Diff line number Diff line change
@@ -1,67 +1,67 @@
/**
* GameJam 2009 - GamePlay
*
* The Arm class file.
*/

#ifndef _CARM_H_
#define _CARM_H_

#define DEFAULT_X 800
#define DEFAULT_Y 0

#include <allegro.h>

#include "CMap.h"
#include "AnimSprite.h"

enum EArmState
{
EAS_NULL,
EAS_MOVE_GO,
EAS_MOVE_BA,
EAS_SET
};

class CArm
{
private:
int x, y;
int dx, dy;
int rx, ry;

int vel;

int curr;

CMap *map;

int type;

BITMAP *sprite[2];

EArmState state;

public:
CArm();

void getMap(CMap *map);

// Setters
void setX(int px);
void setY(int py);

// Getters
int getX();
int getY();

void armAction();

void show(BITMAP *buffer);
void update();
};



#endif

/**
* GameJam 2009 - GamePlay
*
* The Arm class file.
*/

#ifndef _CARM_H_
#define _CARM_H_

#define DEFAULT_X 800
#define DEFAULT_Y 0

#include <allegro.h>

#include "CMap.h"
#include "AnimSprite.h"

enum EArmState
{
EAS_NULL,
EAS_MOVE_GO,
EAS_MOVE_BA,
EAS_SET
};

class CArm
{
private:
int x, y;
int dx, dy;
int rx, ry;

int vel;

int curr;

CMap *map;

int type;

BITMAP *sprite[2];

EArmState state;

public:
CArm();

void getMap(CMap *map);

// Setters
void setX(int px);
void setY(int py);

// Getters
int getX();
int getY();

void armAction();

void show(BITMAP *buffer);
void update();
};



#endif

Loading

0 comments on commit cdb4c88

Please sign in to comment.