Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 1, 2006, 10:12:43 PM (18 years ago)
Author:
snellen
Message:

did some cleanup and added getFileName function to script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/script_engine/src/lib/script_engine/example.cc

    r8103 r8104  
    2828    const char Account::className[] = "Account";
    2929
    30 
    31     #define method(class, name) {#name, &class::name}
    32 
    3330    Lunar<Account>::RegType Account::methods[] = {
    3431      {"deposit", new ExecutorLua1<Account, float>(&Account::deposit)},
     
    4845        ~Object() { printf("deleted Object (%p)\n", this); }
    4946
    50         //lua Interface
    51         //function that returns a value to lua
    52         int getCallCount(lua_State* L)
    53         {
    54          int calls = getCallCount();
    55          lua_pushnumber(L,(lua_Number)calls);
    56          return 1; // return number of values that the function wants to return to lua
    57         }
    58 
    59          //function that takes an argument from lua
    60          int takeParam(lua_State* L)
    61          {
    62           int param = (int)lua_tonumber(L,-1);
    63           takeParam(param);
    64           return 0;
    65          }
    66 
    67         //meber functions
    6847        void takeParam(int i)
    6948        {
Note: See TracChangeset for help on using the changeset viewer.