Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Stick.h"
- #include <allegro.h>
- #include <cstdlib>
- #include <ctime>
- Stick::Stick()
- {
- //ctor
- }
- Stick::~Stick()
- {
- //dtor
- }
- void Stick::GenerateNewCoords()
- {
- srand(time(NULL)); //initilize random seed.
- Xcoord = rand() % 608 + 1;
- Ycoord = rand() % 448 + 1;
- }
- void Stick::Draw(BITMAP *buffer, BITMAP *image)
- {
- masked_blit(image, buffer, 0, 0, Xcoord, Ycoord, 32, 32);
- }
- int Stick::ReturnX(void)
- {
- return Xcoord;
- }
- int Stick::ReturnY(void) {
- return Ycoord;
- }
- int ReturnBBw(void)
- {
- return 21;
- }
- int ReturnBBh(void)
- {
- return 29;
- }
Advertisement
Add Comment
Please, Sign In to add comment