- Timestamp:
- 01/31/11 23:18:54 (14 years ago)
- Location:
- cpp/gdk
- Files:
-
- 16 added
- 6 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/gdk/3d.cpp
r66 r68 3 3 // Refer to http://www.framsticks.com/ for further information. 4 4 5 #include "nonstd.h" 5 6 #include <math.h> 6 7 #include <string.h> 7 #include "nonstd.h"8 8 #include "3d.h" 9 9 #include "framsg.h" -
cpp/gdk/gdktest.cpp
r66 r68 185 185 printf("Neuro::getClass() gives you information about basic characteristic\n" 186 186 "of the class, that can be analyzed automatically.\n"); 187 printf("For the current object we can get know, that this object likes to have");187 printf("For the current object we can learn that it supports "); 188 188 if (cl->getPreferredInputs()<0) printf("any number of inputs"); 189 189 else if (cl->getPreferredInputs()==0) printf("no inputs"); 190 190 else printf("%d inputs",cl->getPreferredInputs()); 191 191 printf(" (getPreferredInputs()) "); 192 printf(cl->getPreferredOutput()?"and provides meaningful output signal (getPreferredOutput ==1).\n":"and doesn't provide useful output signal (getPreferredOutput==0).\n");192 printf(cl->getPreferredOutput()?"and provides meaningful output signal (getPreferredOutput()==1).\n":"and doesn't provide useful output signal (getPreferredOutput()==0).\n"); 193 193 194 194 SyntParam p=n->classProperties(); … … 335 335 "Hints:\n" 336 336 " 1. You can redirect output: gdktest >filename.txt\n" 337 " 2. Each run can yield different results because some\n"337 " 2. Each run can yield different results, because some\n" 338 338 " values are randomly generated.\n" 339 " 3. Application will use custom genotype passed as\n"340 " a commandline parameter: gdktest X \n"339 " 3. This application will use custom genotype passed as\n" 340 " a commandline parameter: gdktest XX\n" 341 341 "\n"); 342 342 return 0; -
cpp/gdk/neuroimpl.cpp
r66 r68 5 5 #include "neuroimpl.h" 6 6 #include "neurofactory.h" 7 #ifndef NOCREATUREOBJECT 7 #ifdef NOCREATUREOBJECT 8 #include "neuroclsobject.h" 9 #else 8 10 #include "creature.h" 9 11 #include "creatmechobj.h" -
cpp/gdk/nonstd.h
r66 r68 26 26 #include <stdarg.h> 27 27 #define vsnprintf _vsnprintf 28 #define _USE_MATH_DEFINES 29 30 #ifndef M_PI 31 #define M_PI 3.1415926535897932384626433832795 32 #endif 33 #ifndef M_PI_2 34 #define M_PI_2 (M_PI/2) 35 #endif 28 #define _USE_MATH_DEFINES //after this is defined, the next #include <math.h> or <cmath> will define: 29 //#ifndef M_PI 30 //#define M_PI 3.1415926535897932384626433832795 31 //#endif 32 //#ifndef M_PI_2 33 //#define M_PI_2 (M_PI/2) 34 //#endif 36 35 37 36 #endif … … 43 42 #define PATHSEPARATORSTRING "\\" 44 43 #define FPU_THROWS_EXCEPTIONS 44 #define FOPEN_READ "rt" 45 #define FOPEN_WRITE "wt" 46 #define FOPEN_APPEND "at" 45 47 #else 46 48 #define LONGLONG long long int … … 52 54 #define fileExists(f) (!access(f,0)) 53 55 #include "stdlib.h" //random 54 #define FOPEN_READ "rt"55 #define FOPEN_WRITE "wt"56 #define FOPEN_APPEND "at"57 56 #define rnd01 ((double)((double)_lrand()/(double)(LRAND_MAX+1))) 58 57 //#define rnd01 ((double)((double)rand()/(RAND_MAX+1))) … … 66 65 #endif 67 66 68 #define FOPEN_WRITE "wa"69 #define FOPEN_APPEND "aa"70 #define FOPEN_READ "ra"71 67 //#define FLOATRAND 72 68 #ifdef FLOATRAND -
cpp/gdk/nonstd_io.h
r66 r68 1 1 // int access(const char *pathname, int mode); 2 2 3 #ifdef _Windows 4 5 6 #ifndef _MSC_VER 3 7 #include <dir.h> 4 #include <io.h> //include io.h przed dir.h powoduje ze w simul.h nie poznaje klasy SimWorld - szokujacy i niewyjasniony blad. co wiecej w projekcie GUI go nie ma a w CLI jest - moze wplyw tych globalnych definicji typu NOVCL, NO_STRICT itp? 8 #endif 9 #include <io.h> //borland compiler: include <io.h> before <dir.h> causes the SimWorld class in "simul.h" be unrecognized, for unknown reason :O moreover, this problem is only pertinent to the CLI project, not GUI. Maybe this is caused by global defines like NOVCL, NO_STRICT etc.? 5 10 #define makeDirectory(name) mkdir(name) 11 12 6 13 #else 14 15 7 16 #include <unistd.h> 8 17 #include <sys/stat.h> 9 18 #define makeDirectory(name) mkdir(name,0777) 19 10 20 #endif 11
Note: See TracChangeset
for help on using the changeset viewer.