]> git.mxchange.org Git - flightgear.git/commitdiff
screenPrint() is obsolete. Use screen.log.write() for the same purpose,
authormfranz <mfranz>
Mon, 13 Feb 2006 20:08:04 +0000 (20:08 +0000)
committermfranz <mfranz>
Mon, 13 Feb 2006 20:08:04 +0000 (20:08 +0000)
or write to the color properties in /sim/screen/. If this Nasal/GUI
implementation turns out to be too slow, we'll write a generic OpenGL/plib
version simliar to the ATCdisplay code.  (OK'ed by Andy and Stuart)

src/Scripting/NasalSys.cxx
src/Scripting/NasalSys.hxx

index 8951df67c4f239fc37ee12ae7b161b2a456530b0..2222bcf1758b79eaf048dc6265c5370d5ca6784b 100644 (file)
@@ -16,7 +16,6 @@
 #include <Main/fg_props.hxx>
 
 #include "NasalSys.hxx"
-#include "NasalDisplay.hxx"
 
 // Read and return file contents in a single buffer.  Note use of
 // stat() to get the file size.  This is a win32 function, believe it
@@ -294,17 +293,6 @@ static naRef f_srand(naContext c, naRef me, int argc, naRef* args)
     return naNum(0);
 }
 
-// Wrapper function for screenPrint
-static naRef f_screenPrint(naContext c, naRef me, int argc, naRef* args)
-{
-    if(argc != 1 || !naIsString(args[0]))
-        naRuntimeError(c, "bad arguments to screenPrint()");
-    naRef lmsg = args[0];
-    FGNasalSys* nasal = (FGNasalSys*)globals->get_subsystem("nasal");
-    nasal->screenPrint(naStr_data(lmsg));
-    return naNil();
-}
-
 // Return an array listing of all files in a directory
 static naRef f_directory(naContext c, naRef me, int argc, naRef* args)
 {
@@ -334,7 +322,6 @@ static struct { char* name; naCFunction func; } funcs[] = {
     { "_interpolate",  f_interpolate },
     { "rand",  f_rand },
     { "srand",  f_srand },
-    { "screenPrint", f_screenPrint },
     { "directory", f_directory },
     { 0, 0 }
 };
@@ -621,8 +608,3 @@ void FGNasalSys::setListener(int argc, naRef* args)
     node->addChangeListener(new FGNasalListener(handler, this, gcSave(handler)), initial);
 }
 
-// functions providing access to the NasalDisplay - used to display text directly on the screen
-void FGNasalSys::screenPrint(const char* src)
-{
-  globals->get_Nasal_display()->RegisterSingleMessage(src, 0);
-}
index b67e108fb8822cc42376705c8be885b4e4a69b8d..d6209ee96ad1032c20c1d8d276eb4f84712d4c69 100644 (file)
@@ -41,15 +41,13 @@ public:
 
     // Returns a ghost wrapper for the current _cmdArg
     naRef cmdArgGhost();
-    
+
     // Callbacks for command and timer bindings
     virtual bool handleCommand(const SGPropertyNode* arg);
 
     void createModule(const char* moduleName, const char* fileName,
                     const char* src, int len);
-                   
-    void screenPrint(const char* src);
-     
+
 private:
     friend class FGNasalScript;
     friend class FGNasalListener;