BOOL DlgProc(TimeValue t, IParamMap2* pm, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
    {
        switch (msg)
        {
        case WM_INITDIALOG:
            IInit(hWnd, pm->GetParamBlock());
            return TRUE;

        case WM_COMMAND:
            if (HIWORD(wParam) == BN_CLICKED && LOWORD(wParam) == IDC_MTL_BUTTON)
            {
                Mtl* pickedMtl = plPickMaterialMap::PickMaterial(plMtlCollector::kUsedOnly |
                                                                plMtlCollector::kPlasmaOnly);
                if (pickedMtl)
                {
                    pm->GetParamBlock()->SetValue(kMarkerMtl, 0, pickedMtl);
                    IInit(hWnd, pm->GetParamBlock());
                }

                return TRUE;
            }
            else if (HIWORD(wParam) == BN_CLICKED && LOWORD(wParam) == IDC_MTL_NODE_BUTTON)
            {
                if (plPick::MtlNodes(pm->GetParamBlock(), kMarkerMtlNode, pm->GetParamBlock()->GetMtl(kMarkerMtl)))
                    IInit(hWnd, pm->GetParamBlock());
            }
            else if (HIWORD(wParam) == BN_CLICKED && LOWORD(wParam) == IDC_BOUNCE_BUTTON)
            {
                plResponderGetComp::ClassIDs ids;
                ids.push_back(ANIM_COMP_CID);
                if (plResponderGetComp::Instance().GetComp(pm->GetParamBlock(), kMarkerBounceNode, kMarkerBounceComp, &ids))
                    IInit(hWnd, pm->GetParamBlock());

                return TRUE;
            }
            else if (HIWORD(wParam) == BN_CLICKED && (LOWORD(wParam) == IDC_PLACE_BUTTON || LOWORD(wParam) == IDC_HIT_BUTTON))
            {
                std::vector<Class_ID> cids;
                cids.push_back(SOUND_3D_COMPONENT_ID);

                int paramID = (LOWORD(wParam) == IDC_PLACE_BUTTON) ? kMarkerSndPlace : kMarkerSndHit;

                if (plPick::Node(pm->GetParamBlock(), paramID, &cids, true, false))
                    IInit(hWnd, pm->GetParamBlock());
                return TRUE;
            }
            else if (HIWORD(wParam) == CBN_SELCHANGE)
            {
                IComboChanged(hWnd, pm->GetParamBlock(), LOWORD(wParam));
                return TRUE;
            }
            break;
        }

        return FALSE;
    }
Example #2
0
plStatusLog::plStatusLog( uint8_t numDisplayLines, const plFileName &filename, uint32_t flags )
{
    fFileHandle = nil;
    fSema = nil;
    fSize = 0;
    fForceLog = false;

    fMaxNumLines = numDisplayLines;
    if (filename.IsValid())
    {
        fFilename = filename;
        fSema = new hsGlobalSemaphore(1, fFilename.AsString().c_str());
    }
    else
    {
        fFilename = "";
        flags |= kDontWriteFile;

        fSema = new hsGlobalSemaphore(1);
    }

    fOrigFlags = fFlags = flags;

    IInit();
}
Example #3
0
void plPageInfo::Read( hsStream *s )
{
    delete [] fAge;
    delete [] fPage;

    IInit();

    // 5 is the earliest version since we began working again on the P20 codebase in Sep 2005,
    // after Uru's online component was cancelled in Feb 2004, so I've removed support for
    // anything prior to that to clean things up a bit.
    uint32_t version = s->ReadLE32();
    if (version > sCurrPageInfoVersion || version < 5)
    {
        hsAssert( false, "Invalid header version in plPageInfo::Read()" );
        return;
    }
    if (version >= 5)
    {
        fLocation.Read( s );
        fAge = s->ReadSafeString();
        if (version < 6)
            delete s->ReadSafeString(); // fChapter was never used, and always "District".
        fPage = s->ReadSafeString();

        s->ReadLE( &fMajorVersion );

        if (version < 6)
        {
            uint16_t unusedMinorVersion;
            s->ReadLE(&unusedMinorVersion);
            int32_t unusedReleaseVersion;
            s->ReadLE(&unusedReleaseVersion); // This was always zero... yanked.
            uint32_t unusedFlags;
            s->ReadLE(&unusedFlags);
        }

        s->ReadLE( &fChecksum );
        s->ReadLE( &fDataStart );
        s->ReadLE( &fIndexStart );
    }

    if (version >= 6)
    {
        uint16_t numClassVersions = s->ReadLE16();
        fClassVersions.reserve(numClassVersions);
        for (uint16_t i = 0; i < numClassVersions; i++)
        {
            ClassVersion cv;
            cv.Class = s->ReadLE16();
            cv.Version = s->ReadLE16();
            fClassVersions.push_back(cv);
        }
    }
}
Example #4
0
void plAutoProfileImp::StartProfile(const char* ageName)
{
    if (ageName)
        fAgeName = ageName;
    else
        fAgeName = "";

    IInit();

    plProfileManagerFull::Instance().ActivateAllStats();
}
Example #5
0
plPageInfo::plPageInfo(const plString& age, const plString& page) {
    IInit();
    setAge(age);
    setPage(page);
}
Example #6
0
plPageInfo::plPageInfo( const plPageInfo &src )
{
    IInit();
    ISetFrom( src );
}
Example #7
0
plPageInfo::plPageInfo( const plLocation &loc )
{
    IInit();
    fLocation = loc;
}
Example #8
0
//// Constructor/Destructor //////////////////////////////////////////////////
plPageInfo::plPageInfo()
{
    IInit();
}
Example #9
0
pyDynamicText::pyDynamicText(plKey key) 
{
    IInit();
    fReceivers.Append(key);
}
Example #10
0
pyDynamicText::pyDynamicText(pyKey& key) 
{
    IInit();
    fReceivers.Append(key.getKey());
}
Example #11
0
pyDynamicText::pyDynamicText()
{
    IInit();
}
plDynSurfaceWriter::plDynSurfaceWriter( plDynamicTextMap *target, uint32_t flags )
{
    IInit();
    fFlags = flags;
    SwitchTarget( target );
}
plDynSurfaceWriter::plDynSurfaceWriter()
{
    IInit();
}
Example #14
0
void plAutoProfileImp::LinkToAllAges()
{
    fJustLinkToAges = true;
    IInit();
}