- Timestamp:
- 09/29/05 22:07:33 (5 years ago)
- Location:
- trunk/map
- Files:
-
- 4 modified
-
configure (modified) (3 diffs, 1 prop)
-
include/pimp.h (modified) (5 diffs, 1 prop)
-
src/pimp.cpp (modified) (6 diffs, 1 prop)
-
src/test.cpp (modified) (5 diffs, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
trunk/map/configure
- Property cvs2svn:cvs-rev changed from 1.7 to 1.8
r2354 r2553 22 22 23 23 SRCDIRS="src" 24 LIBS= ""25 LIBLIBS=" "26 INCLUDES="-I \$(TOPDIR)/include/"24 LIBS=-lpthread 25 LIBLIBS="-L/sw/lib/ -liwear_core -liwear_output -lSDL -lSDL_mixer" 26 INCLUDES="-I/sw/include/ -I \$(TOPDIR)/include/" 27 27 28 28 EXTRACLEANFILES="test doxygen.log libiw*" … … 43 43 MIN_GCC="3.3.0" 44 44 MIN_GPP="3.3.1" 45 46 MIN_SDL_BASE="1.2.7" 47 MIN_SDL_MIX="1.2.6" 45 48 46 49 # … … 228 231 fi 229 232 233 ##################################################################### 234 # Perform SDL checks 235 ##################################################################### 236 237 check_SDL $MIN_SDL_BASE 238 if [ $BAIL == "yes" ] 239 then 240 cleanup; exit 1 241 fi 242 230 243 check_doxygen 231 244 -
trunk/map/include/pimp.h
- Property cvs2svn:cvs-rev changed from 1.19 to 1.20
r2459 r2553 50 50 namespace map{ 51 51 52 class Directory { 52 /*class Directory { 53 53 54 public: 54 55 Directory(const char *name);//Konstruktor uebergebene Parameter ist der Pfad … … 58 59 const string &operator()() const;//gibt den Namen der aktuellen Datei zurueck 59 60 Directory& operator++();// Objekt zeigt anschliessend auf die naechste Datei/Verzeichnis 61 60 62 private: 61 63 DIR* dir; 62 64 string here; 63 65 }; 64 66 */ 65 67 class FileStatus { 66 68 public: … … 79 81 80 82 // number of instances of this module 81 //static int num_of_uids = 0;83 static int num_of_uids = 0; 82 84 83 85 struct point_coords { /*{{{*/ … … 596 598 *divers bulidings in the vicinity. 597 599 */ 598 PoI get_poi(int i);600 PoI * get_poi(int i); 599 601 600 602 }; … … 663 665 /** 664 666 * $Log$ 667 * Revision 1.20 2005/09/29 20:07:33 marius 668 * sdl zeugs 669 * 665 670 * Revision 1.19 2005/09/26 14:01:16 marius 666 671 * updates bugfixes -
trunk/map/src/pimp.cpp
- Property cvs2svn:cvs-rev changed from 1.17 to 1.18
r2459 r2553 183 183 // (4215,-2345)==(8,82481,53,08435) 184 184 185 //Pimp::Pimp() { /*{{{*/186 //num_of_uids++;187 //uid = num_of_uids;188 //} /*}}}*/189 190 //Pimp::~Pimp(void) { /*{{{*/191 //num_of_uids--;192 //} /*}}}*/185 Pimp::Pimp() { /*{{{*/ 186 num_of_uids++; 187 uid = num_of_uids; 188 } /*}}}*/ 189 190 Pimp::~Pimp(void) { /*{{{*/ 191 num_of_uids--; 192 } /*}}}*/ 193 193 194 194 void View::refresh_degree() … … 206 206 double my_x=compass.current_pos_x(); 207 207 double my_y=compass.current_pos_y(); 208 double x=pimp.get_poi(i) .x;209 double y=pimp.get_poi(i) .y;208 double x=pimp.get_poi(i)->x; 209 double y=pimp.get_poi(i)->y; 210 210 double a=(my_x-x); 211 211 double b=(my_y-y); … … 391 391 void Pimp::delOldfiles() 392 392 { 393 Directory dir("./temp");393 /* Directory dir("./temp"); 394 394 string name = dir(); 395 395 FileStatus file(name); … … 411 411 exec_cmd(params[0], params); 412 412 } 413 } 413 }*/ 414 414 } 415 415 /*=====================*/ … … 499 499 /*}}}*/ 500 500 501 PoI * Pimp::get_poi(int i) 502 { 503 return poi[i]; 504 } 505 506 double Compass::get_news() 507 { 508 return 90; 509 } 510 511 double Compass::current_pos_x() 512 { 513 return 10; 514 } 515 516 double Compass::current_pos_y() 517 { 518 return 10; 519 } 520 501 521 } // namespace iwearmap 502 522 } // namespace iwear … … 504 524 /** 505 525 * $Log$ 526 * Revision 1.18 2005/09/29 20:07:33 marius 527 * sdl zeugs 528 * 506 529 * Revision 1.17 2005/09/26 14:01:16 marius 507 530 * updates bugfixes -
trunk/map/src/test.cpp
- Property cvs2svn:cvs-rev changed from 1.5 to 1.6
r2459 r2553 28 28 #include <unistd.h> 29 29 #include "iwear-iwearmap/pimp.h" 30 30 #include "/usr/include/SDL/SDL.h" 31 32 31 33 using namespace std; 32 34 using namespace iwear; … … 44 46 params[0] = "wget"; 45 47 params[1] = "-O"; 48 //sprintf(params[2], "%s/%s", tempdir, filename) 46 49 params[2] = filename; 47 50 … … 72 75 73 76 int main() { /*{{{*/ 74 75 cout << "Testklasse f�itag" << endl; 77 MapTest * test = new MapTest(); 78 79 test->set_tempdir("~/temp"); 80 test->set_mapserver("http://www.siriusdd.de/cgi-bin/mapserver-4.2.3"); 81 test->set_mapserver_options("mode=map&map=/srv/www/htdocs/mapserver/hb.map&layers=uni1+uni2+uni3+uni4"); 82 test->get_tile(5800.0, 0.0, 6600.0, 800.0, 640, 480, "test.jpg"); 83 84 SDL_Surface * screen; 85 86 if (SDL_Init(SDL_INIT_VIDEO) == -1 ) 87 { 88 cout << "fehler"; 89 exit(-1); 90 } 91 92 screen = SDL_SetVideoMode(640, 480, 8, SDL_SWSURFACE); 93 if (screen == NULL) 94 { 95 cout << "Fehler keine Graphik"; 96 exit(-1); 97 } 98 99 SDL_Surface * image; 100 101 image = SDL_LoadBMP("test.jpg"); 102 if (image == NULL) 103 { 104 cout << "Fehler kein Bild"; 105 exit(-1); 106 } 107 108 if (image->format->palette && screen->format->palette) 109 { 110 SDL_SetColors(screen, image->format->palette->colors, 0, image->format->palette->ncolors); 111 } 112 113 if (SDL_BlitSurface(image, NULL, screen, NULL) < 0) 114 { 115 cout << "Fehler blid Surface"; 116 exit(-1); 117 } 118 119 SDL_UpdateRect(screen, 0, 0, image->w, image->h); 120 121 SDL_FreeSurface(image); 122 123 SDL_Quit(); 124 exit(0); 125 126 /*cout << "Testklasse f�itag" << endl; 76 127 cout << "Geben Sie einen Betrachtungswinkel ein, in dessen Richtung sie schauen." << endl; 77 128 cout << "0 Grad ist Norden, 90 Grad ist Osten, 180 Grad ist S�nd 270 Grad ist Westen." << endl; … … 83 134 cin >> a; 84 135 } 85 136 */ 86 137 } /*}}}*/ 87 138 … … 89 140 /** 90 141 * $Log$ 142 * Revision 1.6 2005/09/29 20:07:33 marius 143 * sdl zeugs 144 * 91 145 * Revision 1.5 2005/09/26 14:01:16 marius 92 146 * updates bugfixes
