Changeset 2066 in orxonox.OLD for orxonox/branches
- Timestamp:
- Jul 3, 2004, 5:36:35 PM (20 years ago)
- Location:
- orxonox/branches/chris/src
- Files:
-
- 5 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/chris/src/ini_parser.cc
r2065 r2066 17 17 #include "ini_parser.h" 18 18 19 #include <stdio.h>20 #include <strings.h>21 22 19 using namespace std; 23 20 … … 26 23 stream = NULL; 27 24 bInSection = false; 28 open File (filename);25 open_file (filename); 29 26 } 30 27 … … 34 31 } 35 32 36 int IniParser::open File( char* filename)33 int IniParser::open_file( char* filename) 37 34 { 38 35 if( filename == NULL) return -1; … … 47 44 } 48 45 49 int IniParser::get Section( char* section)46 int IniParser::get_section( char* section) 50 47 { 51 48 bInSection = false; … … 80 77 } 81 78 82 int IniParser::next Var( char* name, char* value)79 int IniParser::next_var( char* name, char* value) 83 80 { 84 81 if( stream == NULL) … … 114 111 } 115 112 116 char* IniParser::get Var( char* name, char* section, char* defvalue = "")113 char* IniParser::get_var( char* name, char* section, char* defvalue = "") 117 114 { 118 115 strcpy (internbuf, defvalue); 119 if( get Section (section) == -1) return internbuf;116 if( get_section (section) == -1) return internbuf; 120 117 121 118 char namebuf[PARSELINELENGHT]; 122 119 char valuebuf[PARSELINELENGHT]; 123 120 124 while( next Var (namebuf, valuebuf) != -1)121 while( next_var (namebuf, valuebuf) != -1) 125 122 { 126 123 if( !strcmp (name, namebuf)) -
orxonox/branches/chris/src/ini_parser.h
r2065 r2066 9 9 #define INI_PARSER_H 10 10 11 #include "stdincl.h" 11 #include <stdio.h> 12 #include <strings.h> 13 #include <stdlib.h> 12 14 13 15 #define PARSELINELENGHT 512 … … 23 25 ~IniParser (); 24 26 25 char* get Var( char* name, char* section, char* defvalue);26 int open File( char* name);27 int get Section( char* section);28 int next Var( char* name, char* value);27 char* get_var( char* name, char* section, char* defvalue); 28 int open_file( char* name); 29 int get_section( char* section); 30 int next_var( char* name, char* value); 29 31 }; 30 32 -
orxonox/branches/chris/src/stdincl.h
r1982 r2066 5 5 #define null 0 6 6 7 #ifdef __WIN32__ 8 #include <windows.h> 7 9 #endif 10 #include <SDL/SDL.h> 11 12 #include "list.h" 13 #include "message_structures.h" 14 #include "orxonox.h" 15 #include "world_entity.h" 16 17 #endif -
orxonox/branches/chris/src/world_entity.h
r2058 r2066 3 3 #define WORLD_ENTITY_H 4 4 5 #include "data_tank.h" 5 #include "stdincl.h" 6 //#include "data_tank.h" 6 7 7 8 class Vector; … … 34 35 virtual void hit(WorldEntity* weapon, Vector loc); 35 36 virtual void destroy(); 37 virtual void command (Command* cmd); 36 38 37 39 virtual void entityPreEnter();
Note: See TracChangeset
for help on using the changeset viewer.