[Fix] Somehow I forgot to do a fill of the rectangle in Rect::Draw(void)
This commit is contained in:
parent
943916ce8c
commit
63d78f6c45
BIN
Unuk-QT/Unuk-QT
Executable file
BIN
Unuk-QT/Unuk-QT
Executable file
Binary file not shown.
@ -56,7 +56,7 @@ AStarBase* AStar::Search(void) {
|
|||||||
// Put best on the closed list.
|
// Put best on the closed list.
|
||||||
_closedList[key] = best;
|
_closedList[key] = best;
|
||||||
|
|
||||||
// Check id best is our goal.
|
// Check if best is our goal.
|
||||||
if(best->isGoal())
|
if(best->isGoal())
|
||||||
return best;
|
return best;
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#define _NPC_H_
|
#define _NPC_H_
|
||||||
|
|
||||||
#include "Character.h"
|
#include "Character.h"
|
||||||
|
#include "AStar.h"
|
||||||
|
|
||||||
class NPC : public Character {
|
class NPC : public Character {
|
||||||
public:
|
public:
|
||||||
|
@ -46,6 +46,8 @@ void Rect::Draw(int xArg, int yArg) {
|
|||||||
offset.y = (Sint16)(yArg - camera.y);
|
offset.y = (Sint16)(yArg - camera.y);
|
||||||
offset.w = (Sint16)rect.w;
|
offset.w = (Sint16)rect.w;
|
||||||
offset.h = (Sint16)rect.h;
|
offset.h = (Sint16)rect.h;
|
||||||
|
|
||||||
|
SDL_FillRect(screen, &offset, SDL_MapRGB(screen->format, r, g, b));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Rect::DrawLiteral(void) {
|
void Rect::DrawLiteral(void) {
|
||||||
|
Loading…
Reference in New Issue
Block a user