This commit is contained in:
2024-09-06 17:17:53 +02:00
commit de44ead6db
23 changed files with 1001 additions and 0 deletions

16
src/Hero.cpp Executable file
View File

@ -0,0 +1,16 @@
/**
* Copyright (C) David Wolfe, 1999. All rights reserved.
* Ported to Qt and adapted for TDDD86, 2015.
*/
#include "Hero.h"
#include "constants.h"
void Hero::draw(QGraphicsScene *scene) const {
Point corner = asPoint();
scene->addRect(QRectF(corner.x * UNIT_WIDTH, corner.y * UNIT_HEIGHT,
UNIT_WIDTH, UNIT_HEIGHT), Qt::NoPen, QBrush(HERO_COLOR));
}