diff options
author | pixel <pixel> | 2004-12-27 18:46:43 +0000 |
---|---|---|
committer | pixel <pixel> | 2004-12-27 18:46:43 +0000 |
commit | 8587b087d9c686dd4a35a4f90c56856249f704e6 (patch) | |
tree | 1bbeab0de30768433b5b6526e6596d3b74a73d42 | |
parent | dcd5161f4721d77d37e45f4281e8882bea2cd879 (diff) |
A few minor changes...
-rw-r--r-- | Dalos/Dalos.cc | 9 | ||||
-rw-r--r-- | MSVC/Baltisot - generic/Baltisot - generic.vcproj | 4 | ||||
-rw-r--r-- | MSVC/Dalos/Dalos.vcproj | 10 | ||||
-rw-r--r-- | cd-tool.cpp | 11 |
4 files changed, 24 insertions, 10 deletions
diff --git a/Dalos/Dalos.cc b/Dalos/Dalos.cc index 6ab2153..bbfdadf 100644 --- a/Dalos/Dalos.cc +++ b/Dalos/Dalos.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: Dalos.cc,v 1.12 2004-12-26 03:29:10 pixel Exp $ */
+/* $Id: Dalos.cc,v 1.13 2004-12-27 18:46:43 pixel Exp $ */
#include <SDL.h>
#include <SDL_thread.h>
@@ -48,6 +48,8 @@ #define main SDL_main
#endif
+
+// all these global variables are ugly...
bool auto_exec = true;
bool lua_started = false;
bool do_lua_break = false;
@@ -196,7 +198,7 @@ class myprinter : public printer_t { SDL_mutexP(lock);
- vsprintf(buffer, m, ap);
+ vsnprintf(buffer, 20479, m, ap);
if (level >= 0)
CurrentConsole->add_line("(" + heads[level] + ") " + buffer);
else
@@ -322,7 +324,8 @@ virtual int startup() throw (GeneralException) { CurrentConsole = new console(sh, Root, 0, 8);
console::create_console_thread();
CurrentConsole->move(0, Root->GetH() - CurrentConsole->GetH());
- CurrentConsole->add_line("Dalos v0.1 - LUA console");
+ CurrentConsole->add_line("Dalos v0.1 - LUA console - Press ESC to show/hide it.");
+ CurrentConsole->SetVisible(true);
printer = new myprinter();
locker = new threaded_locker();
diff --git a/MSVC/Baltisot - generic/Baltisot - generic.vcproj b/MSVC/Baltisot - generic/Baltisot - generic.vcproj index 11afd5e..eef7467 100644 --- a/MSVC/Baltisot - generic/Baltisot - generic.vcproj +++ b/MSVC/Baltisot - generic/Baltisot - generic.vcproj @@ -40,7 +40,7 @@ Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\generic\include;..\..\generic\lib\zlib\include;..\..\generic\lib\lua\includes;..\..\generic\lib\lua\include;..\dirent;..\regex"
- PreprocessorDefinitions="_WINDOWS;ZLIB_DLL;READLINE_STATIC;READLINE_LIBRARY;STDC_HEADERS"
+ PreprocessorDefinitions="_WINDOWS;ZLIB_DLL;READLINE_STATIC;READLINE_LIBRARY;STDC_HEADERS;STDC"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -107,7 +107,7 @@ InlineFunctionExpansion="1"
OmitFramePointers="TRUE"
AdditionalIncludeDirectories="..\..\generic\include;..\..\generic\lib\zlib\include;..\..\generic\lib\lua\includes;..\..\generic\lib\lua\include;..\dirent;..\regex"
- PreprocessorDefinitions="_WINDOWS;ZLIB_DLL;READLINE_STATIC;READLINE_LIBRARY;STDC_HEADERS"
+ PreprocessorDefinitions="_WINDOWS;ZLIB_DLL;READLINE_STATIC;READLINE_LIBRARY;STDC_HEADERS;STDC"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
diff --git a/MSVC/Dalos/Dalos.vcproj b/MSVC/Dalos/Dalos.vcproj index 57186c5..8cfc241 100644 --- a/MSVC/Dalos/Dalos.vcproj +++ b/MSVC/Dalos/Dalos.vcproj @@ -189,5 +189,15 @@ RelativePath="..\..\Dalos\Dalos.cc"
>
</File>
+ <File
+ RelativePath="..\..\Dalos\Hexview.cc"
+ >
+ </File>
+ <File
+ RelativePath="..\..\Dalos\Hexview.h"
+ >
+ </File>
</Files>
+ <Globals>
+ </Globals>
</VisualStudioProject>
diff --git a/cd-tool.cpp b/cd-tool.cpp index 85f4a8a..3774168 100644 --- a/cd-tool.cpp +++ b/cd-tool.cpp @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: cd-tool.cpp,v 1.38 2004-12-21 11:14:16 pixel Exp $ */ +/* $Id: cd-tool.cpp,v 1.39 2004-12-27 18:46:44 pixel Exp $ */ #define WIP @@ -279,10 +279,11 @@ int sLua_cdtool::cdtool_proceed_statics(Lua * L, int n, int caller) { case CDTOOL_PRINT: eol = "\n"; case CDTOOL_PRINTN: - if (n) - p = L->tostring(1) + eol; - else + if (n) { + p = L->tostring(1) + eol; + } else { p = eol; + } tc = p.strdup(); printm(M_BARE, "%s", tc); free(tc); @@ -567,7 +568,6 @@ virtual int startup() throw (GeneralException) { } catch (GeneralException e) { printm(M_WARNING, "There was an error loading built-in cd-tool.lua: %s\n", e.GetMsg()); - builtin = true; } } @@ -676,6 +676,7 @@ virtual int startup() throw (GeneralException) { /* If there was an error, ignore it, and free the stack */ while(L->gettop()) L->pop(); + printm(M_ERROR, "%s\n", e.GetMsg()); } catch (GeneralException e) { /* A more severe exception... */ |