Show
Ignore:
Timestamp:
04/13/10 17:06:34 (2 years 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...

}

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • 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            }