MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / ProcessEvents

Method ProcessEvents

engine/Poseidon/Game/Editor.cpp:587–914  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

585};
586
587bool EditCursor::ProcessEvents()
588{
589 if (_ip.GetLength() == 0)
590 {
591 return false;
592 }
593 if (!_connected)
594 {
595 if (TryToConnect(_ip, _socketSend))
596 {
597 _connected = true;
598 }
599 else
600 {
601 return false;
602 }
603 }
604
605 GDebugger.NextAliveExpected(15 * 60 * 1000);
606
607 static TransferState lanscapeTransfer = TSNone;
608 static int objRegistered, objInstances, texRegistered;
609
610 SPosMessage event;
611 Landscape* land = GLOB_LAND;
612 bool retVal = false;
613 bool dataReady = false;
614
615 while ((dataReady = ReceiveMessage(event)) || lanscapeTransfer != TSNone)
616 {
617 if (!dataReady)
618 {
619 Sleep(10);
620 continue;
621 }
622
623 retVal = true;
624 GApp->m_forceRender = true;
625 switch (event.nMsgID)
626 {
627 case SYSTEM_QUIT:
628 land->Quit();
629 break;
630 case SYSTEM_INIT:
631 {
632 land->Dim(event.landRangeX, event.landRangeY, event.landRangeX, event.landRangeY, event.landGridX);
633 land->Init();
634 lanscapeTransfer = TSNone;
635 break;
636 }
637 case FILE_EXPORT:
638 land->SaveData(event.szFileName);
639 break;
640 case FILE_IMPORT:
641 land->Init();
642 land->LoadData(event.szFileName, 50.0);
643 {
644 SendEvent(FILE_IMPORT_BEGIN);

Callers

nothing calls this directly

Calls 15

TryToConnectFunction · 0.85
ProgressResetFunction · 0.85
ProgressStartFunction · 0.85
ProgressAddFunction · 0.85
ProgressFrameFunction · 0.85
ProgressFinishFunction · 0.85
ProgressSetRestFunction · 0.85
ProgressRefreshFunction · 0.85
ProgressAdvanceFunction · 0.85
NextAliveExpectedMethod · 0.80
QuitMethod · 0.80
SaveDataMethod · 0.80

Tested by

no test coverage detected