- sq_pushstring(v, "set_bonus", -1);
- sq_newclosure(v, &Player_set_bonus_wrapper, 0);
- if(SQ_FAILED(sq_createslot(v, -3))) {
- std::ostringstream msg;
- msg << "Couldn't register function'set_bonus'";
- throw SquirrelError(v, msg.str());
- }
-
- sq_pushstring(v, "make_invincible", -1);
- sq_newclosure(v, &Player_make_invincible_wrapper, 0);
- if(SQ_FAILED(sq_createslot(v, -3))) {
- std::ostringstream msg;
- msg << "Couldn't register function'make_invincible'";
- throw SquirrelError(v, msg.str());
- }
-
- sq_pushstring(v, "add_life", -1);
- sq_newclosure(v, &Player_add_life_wrapper, 0);
- if(SQ_FAILED(sq_createslot(v, -3))) {
- std::ostringstream msg;
- msg << "Couldn't register function'add_life'";
- throw SquirrelError(v, msg.str());
- }
-
- sq_pushstring(v, "add_coins", -1);
- sq_newclosure(v, &Player_add_coins_wrapper, 0);
- if(SQ_FAILED(sq_createslot(v, -3))) {
- std::ostringstream msg;
- msg << "Couldn't register function'add_coins'";
- throw SquirrelError(v, msg.str());
- }
-