Changeset 68


Ignore:
Timestamp:
01/31/11 23:18:54 (12 years ago)
Author:
Maciej Komosinski
Message:

added missing sources; updated sources for compatibility with vs2008 and added project files

Location:
cpp/gdk
Files:
16 added
6 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • cpp/gdk/3d.cpp

    r66 r68  
    33// Refer to http://www.framsticks.com/ for further information.
    44
     5#include "nonstd.h"
    56#include <math.h>
    67#include <string.h>
    7 #include "nonstd.h"
    88#include "3d.h"
    99#include "framsg.h"
  • cpp/gdk/gdktest.cpp

    r66 r68  
    185185printf("Neuro::getClass() gives you information about basic characteristic\n"
    186186       "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 ");
     187printf("For the current object we can learn that it supports ");
    188188if (cl->getPreferredInputs()<0) printf("any number of inputs");
    189189  else if (cl->getPreferredInputs()==0) printf("no inputs");
    190190  else printf("%d inputs",cl->getPreferredInputs());
    191191printf(" (getPreferredInputs()) ");
    192 printf(cl->getPreferredOutput()?"and provides meaningful output signal (getPreferredOutput==1).\n":"and doesn't provide useful output signal (getPreferredOutput==0).\n");
     192printf(cl->getPreferredOutput()?"and provides meaningful output signal (getPreferredOutput()==1).\n":"and doesn't provide useful output signal (getPreferredOutput()==0).\n");
    193193
    194194SyntParam p=n->classProperties();
     
    335335       "Hints:\n"
    336336       "  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"
    338338       "     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"
    341341       "\n");
    342342return 0;
  • cpp/gdk/neuroimpl.cpp

    r66 r68  
    55#include "neuroimpl.h"
    66#include "neurofactory.h"
    7 #ifndef NOCREATUREOBJECT
     7#ifdef NOCREATUREOBJECT
     8#include "neuroclsobject.h"
     9#else
    810#include "creature.h"
    911#include "creatmechobj.h"
  • cpp/gdk/nonstd.h

    r66 r68  
    2626 #include <stdarg.h>
    2727 #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
    3635
    3736#endif
     
    4342        #define PATHSEPARATORSTRING "\\"
    4443        #define FPU_THROWS_EXCEPTIONS
     44        #define FOPEN_READ "rt"
     45        #define FOPEN_WRITE "wt"
     46        #define FOPEN_APPEND "at"
    4547#else
    4648        #define LONGLONG long long int
     
    5254        #define fileExists(f) (!access(f,0))
    5355        #include "stdlib.h" //random
    54         #define FOPEN_READ "rt"
    55         #define FOPEN_WRITE "wt"
    56         #define FOPEN_APPEND "at"
    5756        #define rnd01 ((double)((double)_lrand()/(double)(LRAND_MAX+1)))
    5857        //#define rnd01 ((double)((double)rand()/(RAND_MAX+1)))
     
    6665        #endif
    6766
    68         #define FOPEN_WRITE "wa"
    69         #define FOPEN_APPEND "aa"
    70         #define FOPEN_READ "ra"
    7167        //#define FLOATRAND
    7268        #ifdef FLOATRAND
  • cpp/gdk/nonstd_io.h

    r66 r68  
    11// int access(const char *pathname, int mode);
     2
    23#ifdef _Windows
     4
     5
     6#ifndef _MSC_VER
    37 #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.?
    510 #define makeDirectory(name) mkdir(name)
     11
     12
    613#else
     14
     15
    716 #include <unistd.h>
    817 #include <sys/stat.h>
    918 #define makeDirectory(name) mkdir(name,0777)
     19
    1020#endif
    11 
Note: See TracChangeset for help on using the changeset viewer.