- Timestamp:
- 02/10/14 17:07:20 (11 years ago)
- Location:
- cpp/common
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/common/2d.h
r109 r122 1 // This file is a part of the Framsticks GDK. 2 // Copyright (C) 2002-2014 Maciej Komosinski and Szymon Ulatowski. See LICENSE.txt for details. 3 // Refer to http://www.framsticks.com/ for further information. 4 1 5 #ifndef _2D_H_ 2 6 #define _2D_H_ -
cpp/common/Convert.cpp
r109 r122 1 // This file is a part of the Framsticks GDK. 2 // Copyright (C) 2002-2014 Maciej Komosinski and Szymon Ulatowski. See LICENSE.txt for details. 3 // Refer to http://www.framsticks.com/ for further information. 4 1 5 #include "Convert.h" 2 6 … … 18 22 int Convert::toInt(string s) {return atoi(s.c_str());} 19 23 float Convert::toFloat(string s) {return (float)atof(s.c_str());} 20 #ifndef __BORLANDC__ // szok: borland kompiluje ten plik w GUI i CLI ale nie w teatrze. Z jakichs powodow nie potrafi znalezc ::tolower i ::toupper, moze chodzi o pewne definy w <cctype> ale czemu tylko w teatrze?!24 #ifndef __BORLANDC__ //the borland compiler compiles this file in GUI and CLI, but not in the theater app. Somehow it cannot find ::tolower and ::toupper; maybe this is because of various #defines in <cctype>, but why only in the theater app?? 21 25 string Convert::toLowerCase(string s) {std::transform(s.begin(), s.end(), s.begin(), ::tolower); return s;} 22 26 string Convert::toUpperCase(string s) {std::transform(s.begin(), s.end(), s.begin(), ::toupper); return s;} … … 118 122 return string(ret,24); //24 znaki z pominieciem ostatniego \n 119 123 } 124 -
cpp/common/Convert.h
r109 r122 1 // This file is a part of the Framsticks GDK. 2 // Copyright (C) 2002-2014 Maciej Komosinski and Szymon Ulatowski. See LICENSE.txt for details. 3 // Refer to http://www.framsticks.com/ for further information. 4 1 5 #ifndef _CONVERT_H_ 2 6 #define _CONVERT_H_ -
cpp/common/framsg.cpp
r109 r122 1 // This file is a part of the Framsticks GDK. 2 // Copyright (C) 2002-2014 Maciej Komosinski and Szymon Ulatowski. See LICENSE.txt for details. 3 // Refer to http://www.framsticks.com/ for further information. 4 1 5 #include "framsg.h" 2 6 #include <common/nonstd_stdio.h> 3 7 #include "Convert.h" 4 8 5 c har* MSG_LEVEL[]={"DEBUG","INFO","WARN","ERROR","CRITICAL"};9 const char* MSG_LEVEL[]={"DEBUG","INFO","WARN","ERROR","CRITICAL"}; 6 10 7 11 void FMprintf_va(const char *o,const char *m,int w,const char *bl,va_list va) -
cpp/common/framsg.h
r109 r122 1 // This file is a part of the Framsticks GDK. 2 // Copyright (C) 2002-2014 Maciej Komosinski and Szymon Ulatowski. See LICENSE.txt for details. 3 // Refer to http://www.framsticks.com/ for further information. 4 1 5 #ifndef _FRAMSG_H_ 2 6 #define _FRAMSG_H_ … … 4 8 #include <stdarg.h> 5 9 6 extern c har* MSG_LEVEL[];10 extern const char* MSG_LEVEL[]; 7 11 8 12 void FMprintf(const char *o,const char *m,int w,const char *bl, ...); 9 void FMprintf_va(const char *o,const char *m,int w,const char *bl,va_list va); //inna nazwa bo bez tego nie odroznia parametru "string" od va_list i wywoluje zla wersje10 void printFM(const char *bl,...); // dla leniwych - zastepuje printf (zmieniona nazwa chociaz tutaj "prawdopodobienstwo" konfliktu jest niewielkie, musialoby byc wywolanie malego printa z kilkoma parametrami odpowiednich typow zeby niechcacy wywolal sie duzy print)13 void FMprintf_va(const char *o,const char *m,int w,const char *bl,va_list va); //a different name than FMprintf - otherwise the compiler could confuse the "string" parameter with va_list and could call the wrong function 14 void printFM(const char *bl,...); //a shorthand for printf (a different name again to avoid the risk of confusion with the two functions above. This would be unlikely but possible when the argument types would match) 11 15 void FramMessage(const char *o,const char *m,const char *bl,int w); 12 16 -
cpp/common/nonstd_dir.h
r109 r122 1 // This file is a part of the Framsticks GDK. 2 // Copyright (C) 2002-2014 Maciej Komosinski and Szymon Ulatowski. See LICENSE.txt for details. 3 // Refer to http://www.framsticks.com/ for further information. 4 1 5 #ifndef _NONSTD_DIR_H_ 2 6 #define _NONSTD_DIR_H_ -
cpp/common/nonstd_math.cpp
r109 r122 1 // This file is a part of the Framsticks GDK. 2 // Copyright (C) 2002-2014 Maciej Komosinski and Szymon Ulatowski. See LICENSE.txt for details. 3 // Refer to http://www.framsticks.com/ for further information. 4 1 5 #include "nonstd_math.h" 2 6 -
cpp/common/nonstd_math.h
r109 r122 1 // This file is a part of the Framsticks GDK. 2 // Copyright (C) 2002-2014 Maciej Komosinski and Szymon Ulatowski. See LICENSE.txt for details. 3 // Refer to http://www.framsticks.com/ for further information. 4 1 5 #ifndef _NONSTD_MATH_H_ 2 6 #define _NONSTD_MATH_H_ … … 28 32 #define setRandomRandomSeed() rndGetInstance().randomize() 29 33 34 30 35 //floating point specific numbers 31 36 #include "stdlib.h" … … 37 42 #endif 38 43 44 #ifdef LINUX 45 #define _isnan(a) isnan(a) 46 #endif 47 39 48 #ifdef IPHONE 40 49 #define finite(x) (!isinf(x)) 50 #define _isnan(a) isnan(a) 41 51 #endif 42 52 43 53 44 #if defined SHP && !defined TIZEN54 #if defined SHP 45 55 //#define __assert_func(a,b,c,d) 0 //Currently, we are sorry to inform you that assert() is not yet supported. We have considered your request for internal discussion. Na szczêcie jest w³asna (byle by by³a, bo i tak zak³adamy ze assert ktore przeciez dziala tylko w trybie debug nie jest potrzebne na bada) implementacja w "bada-assert.cpp" 46 56 #define isnan(x) false //isnan() sie nie linkuje -
cpp/common/nonstd_stdio.cpp
r109 r122 1 // This file is a part of the Framsticks GDK. 2 // Copyright (C) 2002-2014 Maciej Komosinski and Szymon Ulatowski. See LICENSE.txt for details. 3 // Refer to http://www.framsticks.com/ for further information. 4 1 5 #include "nonstd_stdio.h" 2 6 #if defined _WIN32 && !defined SHP -
cpp/common/nonstd_stdio.h
r109 r122 1 // This file is a part of the Framsticks GDK. 2 // Copyright (C) 2002-2014 Maciej Komosinski and Szymon Ulatowski. See LICENSE.txt for details. 3 // Refer to http://www.framsticks.com/ for further information. 4 1 5 #ifndef _NONSTD_STDIO_H_ 2 6 #define _NONSTD_STDIO_H_ -
cpp/common/nonstd_stl.h
r109 r122 1 // This file is a part of the Framsticks GDK. 2 // Copyright (C) 2002-2014 Maciej Komosinski and Szymon Ulatowski. See LICENSE.txt for details. 3 // Refer to http://www.framsticks.com/ for further information. 4 1 5 #ifndef _NONSTD_STL_H_ 2 6 #define _NONSTD_STL_H_ -
cpp/common/random.h
r109 r122 1 // This file is a part of the Framsticks GDK. 2 // Copyright (C) 2002-2014 Maciej Komosinski and Szymon Ulatowski. See LICENSE.txt for details. 3 // Refer to http://www.framsticks.com/ for further information. 4 1 5 #include "nonstd.h" //LONGLONG 2 6 #include <time.h> //time() -
cpp/common/threads.h
r109 r122 1 // This file is a part of the Framsticks GDK. 2 // Copyright (C) 2002-2014 Maciej Komosinski and Szymon Ulatowski. See LICENSE.txt for details. 3 // Refer to http://www.framsticks.com/ for further information. 4 1 5 #ifndef _THREADS_H_ 2 6 #define _THREADS_H_
Note: See TracChangeset
for help on using the changeset viewer.