Changeset 48

Show
Ignore:
Timestamp:
04/13/10 17:06:34 (22 months ago)
Author:
Carsten
Message:

a) Changed the format of pts pointfiles to Lua. That is, pointfiles are now true, complete Lua programs:

  • CaBSP has been updated to write pointfiles in the new format as Lua programs,
  • CaWE has been updated to run pointfiles as Lua programs and to look into the generated Points table for the results.

b) Added a new recordPath() console function to the Cafu game client that allows recording the path of the player.

(This functionality has been asked for by Dennis Köhler from the FH Dortmund for running a new set of scientific tests.)
The recored paths are saved in the same pointfile format as those for leaks, and thus can uniformly be loaded into CaWE for visualization!

c) CaWE: Fixed occurrences of wxMessageBox(..., wxOK | wxICON_...) being called without the wxOK constant.

Some open issues for future consideration:
- Allow record-style initialization besides the existing list-style initialization.
- Support setting a custom line color in the pointfile.
- In CaWE, visualize not only the point coordinates, but also the time, heading, comments, ...

Example future pointfile:

Points=
{

-- color="blue", -- Any string that the wxColour() ctor recognizes.

-- Use record-style or list-style initialization.
{ 0; -1695, -498.692, -67.9358; 9874; "" },
{ 5.26625; -1697.05, -482.187, -67.9358; 64250; "" },
{ 5.77412; -1711.62, -364.583, -67.9358; 64250; "" },
{ t=6.30243; x=-1726.45, y=-243.117, z=-67.9358; hdg=64310; comment="" },
{ t=6.80414; -1740.28, -125.456, -43.9358; hdg=64640; "" }, -- mixed...

}

Location:
cafu/trunk
Files:
2 added
14 modified

Legend:

Unmodified
Added
Removed
  • cafu/trunk/Ca3DE/Client/ClientStateInGame.cpp

    r36 r48  
    2525#include "Client.hpp" 
    2626#include "ClientWorld.hpp" 
     27#include "PathRecorder.hpp" 
     28 
    2729#include "../NetConst.hpp" 
    2830#include "GuiSys/Gui.hpp" 
     
    116118 
    117119 
     120int ClientStateInGameT::ConFunc_recordPath_Callback(lua_State* LuaState) 
     121{ 
     122    if (!ClientIGSPtr) return 0; 
     123 
     124    PathRecorderT*& Recorder=ClientIGSPtr->m_PathRecorder; 
     125    const char*     FileName=lua_tostring(LuaState, 1); 
     126 
     127    if (FileName) 
     128    { 
     129        // Already recording to the file with the given name? Continue recording. 
     130        // If we were not recording before, or are recording to a different file, start recording. 
     131        if (!Recorder || Recorder->GetFileName()!=FileName) 
     132        { 
     133            delete Recorder; 
     134            Recorder=new PathRecorderT(FileName); 
     135        } 
     136    } 
     137    else 
     138    { 
     139        // Stop recording. 
     140        delete Recorder; 
     141        Recorder=NULL; 
     142    } 
     143 
     144    return 0; 
     145} 
     146 
     147static ConFuncT ConFunc_recordPath("recordPath", ClientStateInGameT::ConFunc_recordPath_Callback, ConFuncT::FLAG_MAIN_EXE, "Records the players path into a pointfile (load into CaWE to view)."); 
     148 
     149 
    118150ClientStateInGameT::ClientStateInGameT(ClientT& Client_) 
    119151    : Client(Client_), 
     
    123155      IsLoadingWorld(false), 
    124156      WasLMBOnceUp(false), 
    125       ClientFrameNr(0) 
     157      ClientFrameNr(0), 
     158      m_PathRecorder(NULL) 
    126159{ 
    127160    assert(Client.Socket!=INVALID_SOCKET); 
     
    134167ClientStateInGameT::~ClientStateInGameT() 
    135168{ 
     169    delete m_PathRecorder; 
     170    m_PathRecorder=NULL; 
     171 
    136172    if (Client.MainMenuGui!=NULL) 
    137173    { 
     
    824860        World->OurEntity_Predict(PlayerCommand, PlayerCommand.Nr /* next outgoing sequence number */); 
    825861 
     862        if (m_PathRecorder) 
     863            m_PathRecorder->WritePath(World->OurEntity_GetState(UsePrediction.GetValueBool()), FrameTime); 
     864 
    826865        PlayerCommand=PlayerCommandT();     // Clear the PlayerCommand. 
    827866    } 
  • cafu/trunk/Ca3DE/Client/ClientStateInGame.hpp

    r36 r48  
    3838struct CaMouseEventT; 
    3939class  ClientT; 
     40class  PathRecorderT; 
    4041 
    4142 
     
    6061    static int ConFunc_chatPrint_Callback(lua_State* LuaState); 
    6162    static int ConFunc_showPath_Callback(lua_State* LuaState); 
     63    static int ConFunc_recordPath_Callback(lua_State* LuaState); 
    6264 
    6365 
     
    7274 
    7375 
    74     ClientT&                 Client; 
     76    ClientT&               Client; 
    7577 
    76     GameProtocol1T           GameProtocol; 
    77     ArrayT< ArrayT<char> >   ReliableDatas; 
    78     NetDataT                 UnreliableData; 
     78    GameProtocol1T         GameProtocol; 
     79    ArrayT< ArrayT<char> > ReliableDatas; 
     80    NetDataT               UnreliableData; 
    7981 
    80     FontT                    Font_v; 
    81     FontT                    Font_f; 
    82     CaClientWorldT*          World; 
    83     bool                     IsLoadingWorld;    ///< True while the world is loaded, false at all other times. This is relevant only because cf::GuiSys::GuiMan->Yield() is called while loading, which in turn calls our Render() method. 
    84     bool                     WasLMBOnceUp;      ///< The left mouse button must be in the released (non-pressed, up) state after the world has been loaded. This variable is false until this has been the case! 
     82    FontT                  Font_v; 
     83    FontT                  Font_f; 
     84    CaClientWorldT*        World; 
     85    bool                   IsLoadingWorld;      ///< True while the world is loaded, false at all other times. This is relevant only because cf::GuiSys::GuiMan->Yield() is called while loading, which in turn calls our Render() method. 
     86    bool                   WasLMBOnceUp;        ///< The left mouse button must be in the released (non-pressed, up) state after the world has been loaded. This variable is false until this has been the case! 
    8587 
    86     ScrollInfoT              ChatScrollInfo; 
    87     ScrollInfoT              SystemScrollInfo; 
    88     GraphsT                  Graphs; 
    89     unsigned long            ClientFrameNr; 
    90     PlayerCommandT           PlayerCommand;     ///< The player command structure that collects the input until the next call to MainLoop(). 
     88    ScrollInfoT            ChatScrollInfo; 
     89    ScrollInfoT            SystemScrollInfo; 
     90    GraphsT                Graphs; 
     91    unsigned long          ClientFrameNr; 
     92    PlayerCommandT         PlayerCommand;       ///< The player command structure that collects the input until the next call to MainLoop(). 
     93    PathRecorderT*         m_PathRecorder;      ///< Records the path of this client in a pointfile that can be loaded into CaWE. 
    9194}; 
    9295 
  • cafu/trunk/CaBSP/BspTreeBuilder/LeakDetection.cpp

    r36 r48  
    137137    Console->Print("\n### LEAK DETECTED! ###\n\n"); 
    138138    Console->Print("A leak is a hole in the world, where the inside of it is exposed to the\n"); 
    139     Console->Print("(unwanted) outside region. Thus, I generated a leak pointfile.\n"); 
    140     Console->Print("Load this file into your world editor, and find the beginning of the line.\n"); 
     139    Console->Print("(unwanted) outside region. Thus, a leak pointfile has been generated.\n"); 
     140    Console->Print("Load this file into the world editor CaWE, and find the beginning of the line.\n"); 
    141141    Console->Print("Hint: The beginning is always near one of the \"info_player_start\" entities.\n"); 
    142142    Console->Print("Then find and fix the leak by tracing the line until you reach the outside.\n"); 
    143     Console->Print("(I always take the shortest path, so this should be easy.)\n"); 
     143    Console->Print("(The line always takes the shortest path, so this should be easy.)\n"); 
    144144    Console->Print("\nNotes:\n"); 
    145145    Console->Print("- Leaks can be *very* small. Use a close-up view, if necessary.\n"); 
    146146    Console->Print("- Use the grid. The grid is useful to fix leaks + to avoid them from the start.\n"); 
    147147    Console->Print("- Make sure that *all* \"info_player_start\" entities are inside the world!\n"); 
    148     Console->Print("- The pointfile assumes that WcMap2Ca.exe scaled the world by factor 25.4.\n"); 
    149148    Console->Print("- Be aware that both the clip hull and the draw hull must be sealed.\n"); 
    150149    Console->Print("- Please refer to the documentation for additional information.\n"); 
     
    154153    ComputeLeakPathByBFS(InfoPlayerStartOrigin); 
    155154 
    156     FILE* PointFile=fopen(PointFileName.c_str(), "w"); 
     155    std::ofstream PointFile(PointFileName.c_str()); 
     156    unsigned long PointCount=0; 
     157 
    157158    if (!PointFile) Error("Could not open pointfile \"%s\" for writing!", PointFileName.c_str()); 
    158159 
    159     // The following is also possible in a single big for-loop that does not require the 'Points' array. 
    160     // However, it would then be much more complicated to consider all the special cases when something goes wrong (see below). 
    161     // Thus, for clarity, I keep it simple, even at the cost of sub-optimal efficiency. 
    162     ArrayT<VectorT> Points; 
     160    PointFile << "Points=\n"; 
     161    PointFile << "{\n"; 
    163162 
    164163    // Let "S" be the start leaf that contains the 'InfoPlayerStartOrigin'. 
    165     // The following loop puts all the path points into the 'Points' array, including the 'InfoPlayerStartOrigin' of leaf "S". 
    166     // Three cases are possible, and all of them are gracefully handled (that is much harder with a big loop!): 
     164    // The following loop writes all the path points, including the 'InfoPlayerStartOrigin' of leaf "S". 
     165    // Three cases are possible, and all of them are gracefully handled: 
    167166    // a) If "S" is NOT reachable from LeafNr, something is wrong (this is a bug!). 
    168167    //    The predecessor of LeafNr is -1, and therefore only a single point (0, 0, 0) gets written. 
     
    171170    // c) In the normal case, as least two points are written into the 'Points' array. 
    172171    for (unsigned long CurrentLeaf=LeafNr; CurrentLeaf!=(unsigned long)-1; CurrentLeaf=BFS_Tree[CurrentLeaf]) 
    173         Points.PushBack(scale(BFS_TreePoints[CurrentLeaf], 1.0/25.4)); 
    174  
    175     for (unsigned long PointNr=0; PointNr+1<Points.Size(); PointNr++) 
    176     { 
    177         VectorT V1=Points[PointNr  ]; 
    178         VectorT d =Points[PointNr+1]-V1; 
    179         double  l =length(d); 
    180  
    181         // Console->Print(cf::va("%5u %5u    %f %f %f   -   %f %f %f\n", CurrentLeaf, NextLeaf, V1.x, V1.y, V1.z, V2.x, V2.y, V2.z)); 
    182         if (l<1.0) continue; 
    183         d=scale(normalize(d, 0.0), 2.0); 
    184  
    185         while (l>=0.0) 
    186         { 
    187             fprintf(PointFile, "%f %f %f\n", V1.x, V1.y, V1.z); 
    188             V1=V1+d; 
    189             l-=2.0; 
    190         } 
    191     } 
    192  
    193     fclose(PointFile); 
    194  
    195     if (Points.Size()<2) 
     172    { 
     173        const Vector3dT Point=BFS_TreePoints[CurrentLeaf]/25.4; 
     174 
     175        PointFile << "  { "; 
     176        PointFile << PointCount << "; " << "  ";                    // Time 
     177        PointFile << Point.x    << ", "; 
     178        PointFile << Point.y    << ", "; 
     179        PointFile << Point.z    << "; " << "  "; 
     180        PointFile << 0          << "; ";                            // Heading 
     181        PointFile << "\"leaf " << int(CurrentLeaf) << "\" },\n";    // Comment 
     182 
     183        PointCount++; 
     184    } 
     185 
     186    PointFile << "}\n"; 
     187 
     188    if (PointCount<2) 
    196189    { 
    197190        Console->Print("\nSorry, I have ANOTHER WARNING:\n"); 
     
    199192        Console->Print(">> Did you really place all your \"info_player_start\" entities INSIDE the world?\n"); 
    200193        Console->Print("If you did, and you still see this message, please send an email to\n"); 
    201         Console->Print("CarstenFuchs@T-Online.de\n"); 
    202         Console->Print("Tell him about this message (best is to use copy & paste, or a screen-shot),\n"); 
     194        Console->Print("info@cafu.de\n"); 
     195        Console->Print("Tell them about this message (best is to use copy & paste, or a screen-shot),\n"); 
    203196        Console->Print("and ideally, include this map as an attachment.\n"); 
    204197    } 
  • cafu/trunk/CaWE/AppCaWE.cpp

    r41 r48  
    197197    else 
    198198    { 
    199         wxMessageBox(wxString("Could not open auto-save directory ")+UserDataDir, "WARNING", wxICON_ERROR); 
     199        wxMessageBox(wxString("Could not open auto-save directory ")+UserDataDir, "WARNING", wxOK | wxICON_ERROR); 
    200200    } 
    201201 
  • cafu/trunk/CaWE/ChildFrame.cpp

    r36 r48  
    744744                // The save was successful, but maybe it was a map export rather than a native cmap save. 
    745745                // In this case, also keep the window open. 
    746                 wxMessageBox("The map was exported, not saved. Please save the map before leaving.", "Map not closed.", wxICON_INFORMATION); 
     746                wxMessageBox("The map was exported, not saved. Please save the map before leaving.", "Map not closed.", wxOK | wxICON_INFORMATION); 
    747747                CE.Veto(); 
    748748                return; 
  • cafu/trunk/CaWE/EditorMaterialManager.cpp

    r36 r48  
    5353        wxMessageBox("WARNING: No materials found in directory\n"+GameConfig.ModDir+"/Materials\n" 
    5454                     "We can continue, but the materials will NOT work.\n" 
    55                      "Something is wrong that really should be fixed!", "Missing Materials", wxICON_ERROR); 
     55                     "Something is wrong that really should be fixed!", "Missing Materials", wxOK | wxICON_ERROR); 
    5656 
    5757        m_Materials.PushBack(new DummyMaterialT("Error: Materials not loaded!")); 
  • cafu/trunk/CaWE/FontWizard/FontGenerator.cpp

    r36 r48  
    168168    if (!m_FTInited && FT_Init_FreeType(&m_FTLib)!=0) 
    169169    { 
    170         wxMessageBox("Could not init the FreeType library.", "Error", wxICON_ERROR); 
     170        wxMessageBox("Could not init the FreeType library.", "Error", wxOK | wxICON_ERROR); 
    171171        return false; 
    172172    } 
     
    181181        if (FT_New_Face(m_FTLib, FontFile.c_str(), 0, &m_FontData[SizeNr].FTFontFace)!=0) 
    182182        { 
    183             wxMessageBox("Could not load the font face from \""+FontFile+"\".", "Error", wxICON_ERROR); 
     183            wxMessageBox("Could not load the font face from \""+FontFile+"\".", "Error", wxOK | wxICON_ERROR); 
    184184            ClearFontData(); 
    185185            return false; 
     
    191191        if (FT_Set_Char_Size(m_FontData[SizeNr].FTFontFace, SizeInPoints*64, 0, 72, 72)!=0) 
    192192        { 
    193             wxMessageBox(wxString::Format("Error: Could not set the character size to %i pt.", SizeInPoints), "Error", wxICON_ERROR); 
     193            wxMessageBox(wxString::Format("Error: Could not set the character size to %i pt.", SizeInPoints), "Error", wxOK | wxICON_ERROR); 
    194194            continue; 
    195195        } 
     
    217217            if (FT_Load_Glyph(m_FontData[SizeNr].FTFontFace, GlyphIndex, FT_LOAD_RENDER)!=0) 
    218218            { 
    219                 wxMessageBox(wxString::Format("Error: Could not obtain the glyph at index %lu.", GlyphIndex), "Error", wxICON_ERROR); 
     219                wxMessageBox(wxString::Format("Error: Could not obtain the glyph at index %lu.", GlyphIndex), "Error", wxOK | wxICON_ERROR); 
    220220                continue;   // TODO: Is this proper error handling??? 
    221221            } 
  • cafu/trunk/CaWE/GameConfig.cpp

    r36 r48  
    8181            wxMessageBox("Entity class definitions script could not be processed,\n"+ 
    8282                         wxString(lua_tostring(LuaState, -1))+".\n", 
    83                          "Error while initializing game configuration \""+Name+"\"", wxICON_ERROR); 
     83                         "Error while initializing game configuration \""+Name+"\"", wxOK | wxICON_ERROR); 
    8484 
    8585            lua_pop(LuaState, 1); 
     
    129129            { 
    130130                wxMessageBox("Non-string entity class name in EntityClassDefs table.\n", 
    131                     "Error while initializing game configuration \""+Name+"\"", wxICON_ERROR); 
     131                    "Error while initializing game configuration \""+Name+"\"", wxOK | wxICON_ERROR); 
    132132                throw InitErrorT(); 
    133133            } 
     
    220220    } 
    221221 
    222     // wxMessageBox(out, "Entity Classes Overview", wxICON_INFORMATION); 
     222    // wxMessageBox(out, "Entity Classes Overview", wxOK | wxICON_INFORMATION); 
    223223    wxLogDebug(out); 
    224224#endif 
  • cafu/trunk/CaWE/GuiEditor/ChildFrame.cpp

    r36 r48  
    362362        wxMessageBox(wxString("I was not able to backup file '")+FileName+"' to '"+FileName+"_bak"+"'.\n" 
    363363                     "Please make sure that there is enough disk space left and that the path still exists,\n" 
    364                      "or use 'File -> Save As...' to save the current GUI elsewhere.", "File not saved!", wxICON_ERROR); 
     364                     "or use 'File -> Save As...' to save the current GUI elsewhere.", "File not saved!", wxOK | wxICON_ERROR); 
    365365        return false; 
    366366    } 
     
    667667                                 "This is most likely a problem in your custom script code that you should look into.\n"+ 
    668668                                 "We will proceed anyway, using the script portions that were loaded before the error occurred.", 
    669                                  MainScriptFileName, wxICON_EXCLAMATION); 
     669                                 MainScriptFileName, wxOK | wxICON_EXCLAMATION); 
    670670                } 
    671671 
     
    676676            { 
    677677                // Getting here means the GUI has no root window set, but this should never happen within CaWE. 
    678                 wxMessageBox("There was an error initializing the live preview from script\n"+MainScriptFileName, "Live Preview", wxICON_ERROR); 
     678                wxMessageBox("There was an error initializing the live preview from script\n"+MainScriptFileName, "Live Preview", wxOK | wxICON_ERROR); 
    679679            } 
    680680 
  • cafu/trunk/CaWE/MapDocument.cpp

    r36 r48  
    8686#include "wx/numdlg.h" 
    8787 
     88extern "C" 
     89{ 
     90    #include <lua.h> 
     91    #include <lualib.h> 
     92    #include <lauxlib.h> 
     93} 
     94 
    8895 
    8996#if defined(_WIN32) && defined(_MSC_VER) 
     
    525532            wxMessageBox("Sorry, creating the backup file \""+FileName+"_bak\" before saving the map to \""+FileName+"\" didn't work out.\n" 
    526533                         "Please check the path and file permissions, " 
    527                          "or use 'File -> Save As...' to save the current map elsewhere.", "File not saved!", wxICON_ERROR); 
     534                         "or use 'File -> Save As...' to save the current map elsewhere.", "File not saved!", wxOK | wxICON_ERROR); 
    528535            return false; 
    529536        } 
     
    536543        { 
    537544            wxMessageBox("The file \""+FileName+"\" could not be opened for writing.\nPlease check the path and file permissions, " 
    538                          "or use 'File -> Save As...' to save the current map elsewhere.", "File not saved!", wxICON_ERROR); 
     545                         "or use 'File -> Save As...' to save the current map elsewhere.", "File not saved!", wxOK | wxICON_ERROR); 
    539546            return false; 
    540547        } 
     
    568575        if (OutFile.fail()) 
    569576        { 
    570             wxMessageBox("There was an error when saving the file. Please try again.", "File not saved!", wxICON_ERROR); 
     577            wxMessageBox("There was an error when saving the file. Please try again.", "File not saved!", wxOK | wxICON_ERROR); 
    571578            return false; 
    572579        } 
     
    11761183    } 
    11771184 
    1178     if (!wxFileExists(PointFileName)) 
    1179     { 
    1180         wxMessageBox("Couldn't load the pointfile."); 
    1181         return; 
    1182     } 
    1183  
    1184     TextParserT TP(PointFileName); 
    1185  
    1186     while (!TP.IsAtEOF()) 
    1187     { 
    1188         const float x=TP.GetNextTokenAsFloat(); if (TP.IsAtEOF()) break; 
    1189         const float y=TP.GetNextTokenAsFloat(); if (TP.IsAtEOF()) break; 
    1190         const float z=TP.GetNextTokenAsFloat(); if (TP.IsAtEOF()) break; 
    1191  
    1192         m_PointFilePoints.PushBack(Vector3fT(x, y, z)); 
    1193     } 
    1194  
    1195     UpdateAllObservers(UPDATE_POINTFILE); 
     1185 
     1186    // Create a new Lua state. 
     1187    lua_State* LuaState=lua_open(); 
     1188 
     1189    try 
     1190    { 
     1191        if (LuaState==NULL) throw wxString("Couldn't open Lua state."); 
     1192        if (!wxFileExists(PointFileName)) throw wxString("The file does not exist."); 
     1193 
     1194        lua_pushcfunction(LuaState, luaopen_base);    lua_pushstring(LuaState, "");              lua_call(LuaState, 1, 0);  // Opens the basic library. 
     1195        lua_pushcfunction(LuaState, luaopen_package); lua_pushstring(LuaState, LUA_LOADLIBNAME); lua_call(LuaState, 1, 0);  // Opens the package library. 
     1196        lua_pushcfunction(LuaState, luaopen_table);   lua_pushstring(LuaState, LUA_TABLIBNAME);  lua_call(LuaState, 1, 0);  // Opens the table library. 
     1197        lua_pushcfunction(LuaState, luaopen_io);      lua_pushstring(LuaState, LUA_IOLIBNAME);   lua_call(LuaState, 1, 0);  // Opens the I/O library. 
     1198        lua_pushcfunction(LuaState, luaopen_os);      lua_pushstring(LuaState, LUA_OSLIBNAME);   lua_call(LuaState, 1, 0);  // Opens the OS library. 
     1199        lua_pushcfunction(LuaState, luaopen_string);  lua_pushstring(LuaState, LUA_STRLIBNAME);  lua_call(LuaState, 1, 0);  // Opens the string lib. 
     1200        lua_pushcfunction(LuaState, luaopen_math);    lua_pushstring(LuaState, LUA_MATHLIBNAME); lua_call(LuaState, 1, 0);  // Opens the math lib. 
     1201 
     1202        // Load and process the Lua script file with the entity class definitions. 
     1203        if (luaL_loadfile(LuaState, PointFileName.c_str())!=0 || lua_pcall(LuaState, 0, 0, 0)!=0) 
     1204            throw wxString("Couldn't load the file:\n")+lua_tostring(LuaState, -1); 
     1205 
     1206        wxASSERT(lua_gettop(LuaState)==0); 
     1207        m_PointFilePoints.Clear(); 
     1208        lua_getglobal(LuaState, "Points"); 
     1209        const size_t NumPoints=lua_objlen(LuaState, 1); 
     1210 
     1211        for (size_t PointNr=1; PointNr<=NumPoints; PointNr++) 
     1212        { 
     1213            // Put that table of the current point onto the stack (at index 2). 
     1214            lua_rawgeti(LuaState, 1, PointNr); 
     1215            m_PointFilePoints.PushBackEmpty(); 
     1216 
     1217            for (size_t i=2; i<=4; i++) 
     1218            { 
     1219                lua_rawgeti(LuaState, 2, i); 
     1220                m_PointFilePoints[PointNr-1][i-2]=lua_tonumber(LuaState, 3); 
     1221                lua_pop(LuaState, 1); 
     1222            } 
     1223 
     1224            // Remove the processed points table from the stack again. 
     1225            lua_pop(LuaState, 1); 
     1226        } 
     1227 
     1228        wxASSERT(lua_gettop(LuaState)==1); 
     1229        lua_pop(LuaState, 1); 
     1230 
     1231        UpdateAllObservers(UPDATE_POINTFILE); 
     1232    } 
     1233    catch (const wxString& msg) 
     1234    { 
     1235        wxMessageBox(msg, "Error loading "+PointFileName, wxOK | wxICON_ERROR); 
     1236    } 
     1237 
     1238    // Close the Lua state. 
     1239    if (LuaState) lua_close(LuaState); 
    11961240} 
    11971241 
  • cafu/trunk/CaWE/ModelEditor/SceneSetup.cpp

    r36 r48  
    144144        // Don't uncomment this: 
    145145        // Changing child properties (e.g. "Pos.x" to "5") also generates events for the composite parent (e.g. "Pos" to "(5, 0, 0)")! 
    146         // wxMessageBox("Unknown property label \""+Name+"\".", "Warning", wxICON_ERROR); 
     146        // wxMessageBox("Unknown property label \""+Name+"\".", "Warning", wxOK | wxICON_ERROR); 
    147147    } 
    148148} 
  • cafu/trunk/CaWE/Options.cpp

    r36 r48  
    139139            // Just do nothing but warn the user if there was an error initializing the game config, 
    140140            // that is, the game config will not be pushed back to the GameConfigs array. 
    141             wxMessageBox("Configuration for game \""+GameName+"\" could not be loaded!", "Warning", wxICON_EXCLAMATION); 
     141            wxMessageBox("Configuration for game \""+GameName+"\" could not be loaded!", "Warning", wxOK | wxICON_EXCLAMATION); 
    142142        } 
    143143 
     
    152152                     "You need to have at least one game configuration inside your\n" 
    153153                     "Games directory for the editor to work.\n" 
    154                      "Please re-install Cafu or contact the Cafu forums for help.", "No game configurations found", wxICON_ERROR); 
     154                     "Please re-install Cafu or contact the Cafu forums for help.", "No game configurations found", wxOK | wxICON_ERROR); 
    155155    } */ 
    156156} 
  • cafu/trunk/CaWE/ParentFrame.cpp

    r41 r48  
    425425                     "You need to have at least one game configuration inside your\n" 
    426426                     "Games directory for the editor to work.\n" 
    427                      "Please re-install Cafu or contact the Cafu forums for help.", "No game configurations found", wxICON_ERROR); 
     427                     "Please re-install Cafu or contact the Cafu forums for help.", "No game configurations found", wxOK | wxICON_ERROR); 
    428428 
    429429        return NULL; 
     
    656656                    { 
    657657                        if (FileName.EndsWith("_init.cgui")) new GuiEditor::ChildFrameT(this, FileName, new GuiEditor::GuiDocumentT(GameConfig, FileName)); 
    658                                                         else wxMessageBox("Only GUI initialization scripts (_init.cgui extension) can be opened by CaWE", "Error", wxICON_ERROR); 
     658                                                        else wxMessageBox("Only GUI initialization scripts (_init.cgui extension) can be opened by CaWE", "Error", wxOK | wxICON_ERROR); 
    659659                    } 
    660660                    else 
  • cafu/trunk/SConscript

    r36 r48  
    124124envCafu.Program('Ca3DE/Cafu', 
    125125    CafuMainObj + EngineCommonAndServerObjs + CommonWorldObject + ["Common/WorldMan.cpp"] + WinResource + 
    126     Split("""Ca3DE/Client/Client.cpp Ca3DE/Client/ClientStateConnecting.cpp Ca3DE/Client/ClientStateIdle.cpp Ca3DE/Client/ClientStateInGame.cpp 
    127              Ca3DE/Client/ClientWindow.cpp Ca3DE/Client/ClientWorld.cpp Ca3DE/Client/Graphs.cpp Ca3DE/Client/ScrlInfo.cpp""")) 
     126    Glob("Ca3DE/Client/*.cpp")) 
    128127 
    129128# Build an explicit dedicated server currently only under Linux.