Пример #1
0
 void Opcode80AC::_run()
 {
     Logger::debug("SCRIPT") << "[80AC] [=] int roll_vs_skill(ObjectPtr who, int skill, int modifier)" << std::endl;
     auto dataStack = _script->dataStack();
     dataStack->popInteger();
     dataStack->popInteger();
     dataStack->popObject();
     dataStack->push(2);
 }
Пример #2
0
 void Opcode80AE::_run()
 {
     Logger::debug("SCRIPT") << "[80AE] [=] int do_check(ObjectPtr who, int check, int modifier)" << std::endl;
     auto dataStack = _script->dataStack();
     dataStack->popInteger();
     dataStack->popInteger();
     dataStack->popObject();
     dataStack->push(2);
 }
txStylesheetCompilerState::~txStylesheetCompilerState()
{
    while (!mObjectStack.isEmpty()) {
        delete popObject();
    }
    
    PRInt32 i;
    for (i = mInScopeVariables.Length() - 1; i >= 0; --i) {
        delete mInScopeVariables[i];
    }
}
Пример #4
0
void SimSet::clear()
{
   lock();
   
   while( !empty() )
      popObject();
      
   unlock();

   getSetModificationSignal().trigger( SetCleared, this, NULL );
}
Пример #5
0
            void Opcode80D0::_run()
            {
                Logger::debug("SCRIPT") << "[80D0] [=] void attack_complex(ObjectPtr who, int called_shot, int num_attacks, int bonus"
                                        ", int min_damage, int max_damage, int attacker_results, int target_results)" << std::endl;

                auto dataStack = _script->dataStack();

                dataStack->popInteger();
                dataStack->popInteger();
                dataStack->popInteger();
                dataStack->popInteger();
                dataStack->popInteger();
                dataStack->popInteger();
                dataStack->popInteger();
                dataStack->popObject();
            }
nsresult
txStylesheetCompiler::endElement()
{
    if (NS_FAILED(mStatus)) {
        // ignore content after failure
        // XXX reevaluate once expat stops on failure
        return NS_OK;
    }

    nsresult rv = flushCharacters();
    NS_ENSURE_SUCCESS(rv, rv);

    PRInt32 i;
    for (i = mInScopeVariables.Length() - 1; i >= 0; --i) {
        txInScopeVariable* var = mInScopeVariables[i];
        if (!--(var->mLevel)) {
            nsAutoPtr<txInstruction> instr(new txRemoveVariable(var->mName));
            NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);

            rv = addInstruction(instr);
            NS_ENSURE_SUCCESS(rv, rv);
            
            mInScopeVariables.RemoveElementAt(i);
            delete var;
        }
    }

    const txElementHandler* handler =
        const_cast<const txElementHandler*>
                  (static_cast<txElementHandler*>(popPtr()));
    rv = (handler->mEndFunction)(*this);
    NS_ENSURE_SUCCESS(rv, rv);

    if (!--mElementContext->mDepth) {
        // this will delete the old object
        mElementContext = static_cast<txElementContext*>(popObject());
    }

    return NS_OK;
}
void
txStylesheetCompilerState::popChooseGotoList()
{
    // this will delete the old value
    mChooseGotoList = static_cast<txList*>(popObject());
}