Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | removed the fixangle functions as they are now obsolete |
---|---|
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
5d032bf7253e935d4a3398a5da7fb8d3 |
User & Date: | donnyjward@gmail.com 2010-11-11 06:12:47.000 |
Context
2010-11-12
| ||
05:34 | made it so that the angle calculation for the paddle is rounded now. ball class cleaned up a little bit and renamed Aircraft check-in: 3e5da8e2c2 user: donnyjward@gmail.com tags: trunk | |
2010-11-11
| ||
06:12 | removed the fixangle functions as they are now obsolete check-in: 5d032bf725 user: donnyjward@gmail.com tags: trunk | |
05:26 | machien gun bullets now collide with balls and destroy them. I will now base an airplane class off of the ball with the intention of it flying back and forth on the top of the screen. the player can destroy it by hitting it a few times check-in: efcb02db80 user: donnyjward@gmail.com tags: trunk | |
Changes
Changes to breach.cpp.
︙ | ︙ | |||
66 67 68 69 70 71 72 | void b_getUnitVector(const int & x1, const int & y1, double & x2, double & y2); //weapon cooldown in seconds //FIXME: make it so these values are read from a file instead of h4rd c0ded extern const double weaponCoolDowns[] = { 0.1, //machine gun | | | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | void b_getUnitVector(const int & x1, const int & y1, double & x2, double & y2); //weapon cooldown in seconds //FIXME: make it so these values are read from a file instead of h4rd c0ded extern const double weaponCoolDowns[] = { 0.1, //machine gun 0.4, //flak 2 //rocket }; extern const double MGUN_SPEED = 5; //10 pixels per frame //target frame rate |
︙ | ︙ |
Changes to g_gameobject.cpp.
︙ | ︙ | |||
213 214 215 216 217 218 219 | } int GameObject::GetAngle() { } | < < < | < < < < | 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 | } int GameObject::GetAngle() { } /************************************************ * * * Item * * * ************************************************/ Item::Item() { |
︙ | ︙ | |||
313 314 315 316 317 318 319 | //int GetAngle(); Block::~Block() { } | < > > > > > | 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 | //int GetAngle(); Block::~Block() { } //bool TryMove(); /************************************************ * * * Projectile * * * ************************************************/ Projectile::Projectile(int startX, int startY, int velocityX, int velocityY, weaponType_t weaponType) : xVelocity(velocityX), yVelocity(velocityY) { SetLoc(startX, startY); //FIXME: determine radius, image, etc by weaponType. values // will be stored in a .dat file |
︙ | ︙ | |||
455 456 457 458 459 460 461 | Kill(); else SetLoc(xDest, yDest); return !blocked; } | < < < < < | 452 453 454 455 456 457 458 459 460 461 462 463 464 465 | Kill(); else SetLoc(xDest, yDest); return !blocked; } /************************************************ * * * Ball * * * ************************************************/ Ball::Ball() { |
︙ | ︙ | |||
547 548 549 550 551 552 553 | int Ball::getRadius() { return radius; } //int Ball::GetSpeed(); //int Ball::GetAngle(); | < | 539 540 541 542 543 544 545 546 547 548 549 550 551 552 | int Ball::getRadius() { return radius; } //int Ball::GetSpeed(); //int Ball::GetAngle(); bool Ball::TryMove(int mouseX, int mouseY) { int xDest, yDest; GetLoc(xDest, yDest); int xBallCenter, yBallCenter; double distance; |
︙ | ︙ | |||
598 599 600 601 602 603 604 | } } else { //cout << fileID << "safe...\n"; } SetLoc(xDest, yDest); | < < < < < | 589 590 591 592 593 594 595 596 597 598 599 600 601 602 | } } else { //cout << fileID << "safe...\n"; } SetLoc(xDest, yDest); } /************************************************ * * * Wall Section * * * ************************************************/ |
︙ | ︙ | |||
761 762 763 764 765 766 767 | { return OBJECT_PADDLE; } //int GetSpeed(); //int GetAngle(); | < < < < < < < < | 747 748 749 750 751 752 753 754 755 756 757 758 759 760 | { return OBJECT_PADDLE; } //int GetSpeed(); //int GetAngle(); //takes the position of the mouse cursor and points the paddle // at it. does nothing if the cursor is inside the radius // of the paddle. bool Paddle::TryMove(int xAbsolute, int yAbsolute) { //FIXME: for some reason the paddle doesnt point |
︙ | ︙ |
Changes to g_gameobject.h.
︙ | ︙ | |||
32 33 34 35 36 37 38 | bool ShouldDie(); virtual int GetSpeed(); virtual int GetAngle(); virtual int getRadius() { }; virtual ~GameObject() { }; | | < < | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | bool ShouldDie(); virtual int GetSpeed(); virtual int GetAngle(); virtual int getRadius() { }; virtual ~GameObject() { }; virtual bool TryMove(int x, int y) =0; private: //current location int x; int y; |
︙ | ︙ | |||
67 68 69 70 71 72 73 | int getRadius(); //int GetSpeed(); //int GetAngle(); ~Projectile(); | | < | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | int getRadius(); //int GetSpeed(); //int GetAngle(); ~Projectile(); bool TryMove(int x, int y); private: weaponType_t weaponType; int radius; |
︙ | ︙ | |||
105 106 107 108 109 110 111 | int getRadius(); //int GetSpeed(); //int GetAngle(); ~Ball(); | | < | 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | int getRadius(); //int GetSpeed(); //int GetAngle(); ~Ball(); bool TryMove(int x, int y); private: int radius; //in pixels per frame, cartesian coords int xVelocity; |
︙ | ︙ | |||
135 136 137 138 139 140 141 | objectType_t GetObjectType(); //int GetSpeed(); //int GetAngle(); ~Item(); | < | 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | objectType_t GetObjectType(); //int GetSpeed(); //int GetAngle(); ~Item(); //bool TryMove(); private: itemType_t itemType; }; class Block : public GameObject |
︙ | ︙ | |||
158 159 160 161 162 163 164 | //void SetLoc(int & xloc, int & yloc); objectType_t GetObjectType(); //int GetSpeed(); //int GetAngle(); ~Block(); | | < | 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | //void SetLoc(int & xloc, int & yloc); objectType_t GetObjectType(); //int GetSpeed(); //int GetAngle(); ~Block(); //bool TryMove(); private: bool isSoft; Item * containedItem; }; |
︙ | ︙ | |||
191 192 193 194 195 196 197 | objectType_t GetObjectType(); //int GetSpeed(); //int GetAngle(); ~Paddle(); | < | 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | objectType_t GetObjectType(); //int GetSpeed(); //int GetAngle(); ~Paddle(); bool TryMove(int xAbsolute, int yAbsolute); void requestShooting(bool request); //left click void requestMissleLaunch(bool request); //right click private: //positive angle direction is counter clockwise |
︙ | ︙ | |||
234 235 236 237 238 239 240 | objectType_t GetObjectType(); //int GetSpeed(); //int GetAngle(); ~WallSection(); | < | 227 228 229 230 231 232 233 234 235 236 237 238 239 240 | objectType_t GetObjectType(); //int GetSpeed(); //int GetAngle(); ~WallSection(); bool TryMove(); private: bool isSpiky; }; //manages all the game objects on a level |
︙ | ︙ |