Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
50 changes: 50 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
*.pyc

# Numerous always-ignore extensions
###################
*.diff
*.err
*.orig
*.log
*.rej
*.swo
*.swp
*.vi
*~

*.sass-cache
# Folders to ignore
###################
.hg
.svn
.CVS
# OS or Editor folders
###################
.DS_Store
Icon?
Thumbs.db
ehthumbs.db
nbproject
.cache
.project
.settings
.tmproj
*.esproj
*.sublime-project
*.sublime-workspace
# Dreamweaver added files
###################
_notes
dwsync.xml
# Komodo
###################
*.komodoproject
.komodotools
2 changes: 1 addition & 1 deletion Include/Pxf/Base/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// Windows
# if defined (WIN64) || defined (_WIN64)
# define CONF_FAMILY_WINDOWS
# define CONF_FAMILY_STRING "windows"
# define CONF_FAMILY_STRING "windows"
# define CONF_PLATFORM_WIN64
# define CONF_PLATFORM_STRING "win64"
# elif defined (WIN32) || defined (_WIN32) || defined(__CYGWIN32__) || defined (__MINGW32__)
Expand Down
2 changes: 1 addition & 1 deletion Include/Pxf/Base/Debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace Pxf
#define PXFASSERT(_Expression, _Message, ...) do{}while(0)
#endif
bool Assert(bool _Expression, int _Line, char* _File, const char* _Message, ...);

/* Simple message reporting */
void Message(const char* _SubSystem, const char* _Message, ...);

Expand Down
2 changes: 1 addition & 1 deletion Include/Pxf/Base/Platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace Pxf
s_TimeInitialized = true;
}
}

static int64 GetTime();
};
}
Expand Down
4 changes: 2 additions & 2 deletions Include/Pxf/Base/Stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Stream
template<typename T> void WriteNE(T v) { Write(&v, sizeof(T)); }
template<typename T> void WriteBE(T v) { T t = ByteswapNtoB(v); Write(&t, sizeof(T)); }
template<typename T> void WriteLE(T v) { T t = ByteswapNtoL(v); Write(&t, sizeof(T)); }

};

class FileStream : public Stream
Expand Down Expand Up @@ -85,7 +85,7 @@ class FileStream : public Stream
}

bool Close();

uint Read(void* _Buffer, uint _Count);
uint Write(const void* _Buffer, uint _Count);

Expand Down
16 changes: 8 additions & 8 deletions Include/Pxf/Base/Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ namespace Pxf
{

// safe deletion of ptr
template<typename T>
template<typename T>
inline void SafeDelete(T& _Ptr)
{
if(_Ptr != 0)
{
if(_Ptr != 0)
{
delete _Ptr;
_Ptr = 0;
}
}

// safe deletion of array
template<typename T>
template<typename T>
inline void SafeDeleteArray(T& _Ptr)
{
if(_Ptr != 0)
Expand All @@ -39,7 +39,7 @@ namespace Pxf
int Format(char* _Dest, const char* _Format, ...);

// Swaps the content of a and b
template <typename T>
template <typename T>
inline void Swap(T& a, T& b)
{
T t; t = a; a = b; b = t;
Expand Down Expand Up @@ -87,8 +87,8 @@ namespace Pxf
return ((v>>24) | ((v&0xFF0000)>>8) | ((v&0xFF00)<<8) | ((v&0xFF)<<24));
}

// Swaps endianess for arbitrary data type
template<typename T>
// Swaps endianess for arbitrary data type
template<typename T>
static T ByteswapArb(const T& t)
{
if (sizeof(T) > 1)
Expand Down Expand Up @@ -124,7 +124,7 @@ namespace Pxf
template <typename T> inline T ByteswapLtoN(const T& t) { return t; }
template <typename T> inline T ByteswapNtoL(const T& t) { return t; }
#endif

} // namespace Pxf

#endif //__PXF_BASE_UTILS_H__
Expand Down
2 changes: 1 addition & 1 deletion Include/Pxf/Engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace Pxf
}

void SuperTest();

class Engine
{
public:
Expand Down
12 changes: 6 additions & 6 deletions Include/Pxf/Extra/LuaGUI/Callbacks.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@ namespace LuaGUI
GUIWidget* widget = (GUIWidget*)lua_touserdata(L, 1);

(*g_CurrentScript.top()).AddQuad(widget, &quad, &texcoord);

return 0;
} else {
Message(PXF_LUAGUI_MESSAGE_ID, "Wrong number (%i instead of 6) of parameters to AddWidget(...).", n);
}
return 0;
}

static int _guicb_AddText(lua_State *L)
{
int n = lua_gettop(L); // arguments
Expand All @@ -153,14 +153,14 @@ namespace LuaGUI
GUIWidget* widget = (GUIWidget*)lua_touserdata(L, 1);

(*g_CurrentScript.top()).AddText(widget, lua_tostring(L, 2), _pos);

return 0;
} else {
Message(PXF_LUAGUI_MESSAGE_ID, "Wrong number (%i instead of 4) of parameters to AddText(...).", n);
}
return 0;
}

static int _guicb_AddTextCentered(lua_State *L)
{
int n = lua_gettop(L); // arguments
Expand All @@ -170,7 +170,7 @@ namespace LuaGUI
GUIWidget* widget = (GUIWidget*)lua_touserdata(L, 1);

(*g_CurrentScript.top()).AddTextCentered(widget, lua_tostring(L, 2), _pos);

return 0;
} else {
Message(PXF_LUAGUI_MESSAGE_ID, "Wrong number (%i instead of 4) of parameters to AddTextCentered(...).", n);
Expand Down Expand Up @@ -249,7 +249,7 @@ namespace LuaGUI
}
return 0;
}

static int _guicb_Message(lua_State *L)
{
int n = lua_gettop(L); // arguments
Expand Down
6 changes: 3 additions & 3 deletions Include/Pxf/Extra/LuaGUI/GUIHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ namespace Pxf
namespace LuaGUI
{
enum ScriptMessageID { SCRIPT_MESSAGE_TEST = 1 };

struct ScriptMessage
{
int id;
GUIScript* script;
void* data;
};

class GUIHandler
{
public:
Expand All @@ -50,7 +50,7 @@ namespace Pxf
Pxf::Graphics::Device* m_Device;
std::list<GUIScript*> m_Scripts;
};

} // LuaGUI

} // Extra
Expand Down
10 changes: 5 additions & 5 deletions Include/Pxf/Extra/LuaGUI/GUIScript.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace Pxf

namespace LuaGUI
{

class GUIScript
{
public:
Expand All @@ -50,14 +50,14 @@ namespace Pxf
void AddText(GUIWidget* _widget, Util::String _text, Math::Vec3f _pos);
void AddTextCentered(GUIWidget* _widget, Util::String _text, Math::Vec3f _pos);
void SendMessageInternal(GUIWidget* _widget, int _messageid, void* _data);

// Messages from script to engine
bool MessagePump(ScriptMessage* _pmessage);

// Send messages from engine to script
void SendMessage(int _messageid, char* _data);
//void SendMessage(int _messageid, Math::Vec2f);

private:
Graphics::Device* m_Device;
Graphics::QuadBatch* m_QuadBatch;
Expand All @@ -72,15 +72,15 @@ namespace Pxf

bool m_Running;
bool m_ShouldReload;

// Messages from script to engine
std::list<ScriptMessage*> m_Messages;

// Lua specific functions
void CallLuaFunc(const char* _funcname);
bool HandleLuaErrors(int _error);
};

} // LuaGUI

} // Extra
Expand Down
2 changes: 1 addition & 1 deletion Include/Pxf/Extra/LuaGUI/GUIWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace Pxf
bool m_MousePushedLast;
Math::Vec2f m_MouseHit;
};

} // LuaGUI

} // Extra
Expand Down
Loading