Skip to content

Commit

Permalink
JADE: Add method to create pc creature from character info
Browse files Browse the repository at this point in the history
  • Loading branch information
Nostritius committed Jul 21, 2019
1 parent 059b8fd commit a17df51
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/engines/jade/creature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,15 @@ void Creature::createFakePC() {
_isPC = true;
}

void Creature::createPC(const CharacterInfo &info) {
_appearance = info.getAppearance();
_name = info.getName();

loadAppearance();

_isPC = true;
}

void Creature::enter() {
highlight(true);
}
Expand Down
3 changes: 3 additions & 0 deletions src/engines/jade/creature.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "src/graphics/aurora/types.h"

#include "src/engines/jade/object.h"
#include "src/engines/jade/gui/chargen/characterinfo.h"

namespace Engines {

Expand All @@ -49,6 +50,8 @@ class Creature : public Object {

/** Create a fake player character creature for testing purposes. */
void createFakePC();
/** Create a player character from the given info from the character generation. */
void createPC(const CharacterInfo &info);

// Basic visuals

Expand Down

0 comments on commit a17df51

Please sign in to comment.