* Draws and centers the hand sprite on a surface * according to its dimensions. * @param texture Pointer to the surface set to get the sprite from. * @param surface Pointer to the surface to draw to. */
| 500 | * @param surface Pointer to the surface to draw to. |
| 501 | */ |
| 502 | void RuleItem::drawHandSprite(SurfaceSet *texture, Surface *surface) const |
| 503 | { |
| 504 | Surface *frame = texture->getFrame(this->getBigSprite()); |
| 505 | frame->setX((RuleInventory::HAND_W - this->getInventoryWidth()) * RuleInventory::SLOT_W/2); |
| 506 | frame->setY((RuleInventory::HAND_H - this->getInventoryHeight()) * RuleInventory::SLOT_H/2); |
| 507 | texture->getFrame(this->getBigSprite())->blit(surface); |
| 508 | } |
| 509 | |
| 510 | /** |
| 511 | * Gets the heal quantity of the item. |
no test coverage detected