Major overhaul and simplification of the construction method for
costumes. I also added a bit of documentation on the design of the costume class, along with how I think the bitmap objects should be handled.
This commit is contained in:
parent
0c4d511b29
commit
63178ba191
7 changed files with 153 additions and 161 deletions
6
lua.cpp
6
lua.cpp
|
@ -323,8 +323,7 @@ static void TurnActor() {
|
|||
static void PushActorCostume() {
|
||||
Actor *act = check_actor(1);
|
||||
const char *costumeName = luaL_check_string(2);
|
||||
Costume *c = ResourceLoader::instance()->loadCostume(costumeName);
|
||||
act->pushCostume(c);
|
||||
act->pushCostume(costumeName);
|
||||
}
|
||||
|
||||
static void SetActorCostume() {
|
||||
|
@ -333,8 +332,7 @@ static void SetActorCostume() {
|
|||
act->clearCostumes();
|
||||
else {
|
||||
const char *costumeName = luaL_check_string(2);
|
||||
Costume *c = ResourceLoader::instance()->loadCostume(costumeName);
|
||||
act->setCostume(c);
|
||||
act->setCostume(costumeName);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue