mirror of
https://github.com/glest/glest-source.git
synced 2025-08-20 23:21:19 +02:00
- updated for debian compliance
This commit is contained in:
@@ -77,7 +77,7 @@ find_library(LIBVLCCORE_LIBRARY NAMES ${LIBVLC_LIB_CORE_NAMES})
|
||||
|
||||
set(LIBVLC_VERSION ${PC_LIBVLC_VERSION})
|
||||
if (NOT LIBVLC_VERSION)
|
||||
# TODO: implement means to detect version on windows (vlc --version && regex? ... ultimately we would get it from a header though...)
|
||||
# implement means to detect version on windows (vlc --version && regex? ... ultimately we would get it from a header though...)
|
||||
endif (NOT LIBVLC_VERSION)
|
||||
|
||||
if (LIBVLC_INCLUDE_DIR AND LIBVLC_LIBRARY AND LIBVLCCORE_LIBRARY)
|
||||
@@ -86,7 +86,7 @@ endif (LIBVLC_INCLUDE_DIR AND LIBVLC_LIBRARY AND LIBVLCCORE_LIBRARY)
|
||||
|
||||
if (LIBVLC_VERSION STRLESS "${LIBVLC_MIN_VERSION}")
|
||||
message(WARNING "LibVLC version not found: version searched: ${LIBVLC_MIN_VERSION}, found ${LIBVLC_VERSION}\nUnless you are on Windows this is bound to fail.")
|
||||
# TODO: only activate once version detection can be garunteed (which is currently not the case on windows)
|
||||
# only activate once version detection can be garunteed (which is currently not the case on windows)
|
||||
# set(LIBVLC_FOUND FALSE)
|
||||
endif (LIBVLC_VERSION STRLESS "${LIBVLC_MIN_VERSION}")
|
||||
|
||||
|
@@ -115,7 +115,6 @@
|
||||
# Jan Woetzel (FindwxWindows.cmake),
|
||||
# Jorgen Bodde and Jerry Fath (FindwxWin.cmake).
|
||||
|
||||
# TODO/ideas
|
||||
#
|
||||
# (1) Option/Setting to use all available wx libs
|
||||
# In contrast to expert developer who lists the
|
||||
|
@@ -1170,7 +1170,6 @@ void MenuStateCustomGame::mouseClick(int x, int y, MouseButton mouseButton) {
|
||||
}
|
||||
}
|
||||
else if (checkBoxAdvanced.mouseClick(x, y)) {
|
||||
//TODO
|
||||
}
|
||||
else if(listBoxTileset.mouseClick(x, y,advanceToItemStartingWith)) {
|
||||
MutexSafeWrapper safeMutex((publishToMasterserverThread != NULL ? publishToMasterserverThread->getMutexThreadObjectAccessor() : NULL),string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
|
@@ -1595,7 +1595,6 @@ MsgDialog::MsgDialog(wxWindow *parent,
|
||||
const wxPoint& pos) {
|
||||
|
||||
m_sizerText = NULL;
|
||||
// TODO: should we use main frame as parent by default here?
|
||||
if ( !wxDialog::Create(parent, wxID_ANY, caption,
|
||||
pos, wxDefaultSize,
|
||||
style) ) {
|
||||
|
@@ -180,7 +180,6 @@ int Program::getResource(int x, int y) {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: move editor-specific code from shared_lib to here.
|
||||
void Program::glestChangeMapHeight(int x, int y, int Height, int radius) {
|
||||
if(map) map->glestChangeHeight((x - ofsetX) / cellSize, (y + ofsetY) / cellSize, Height, radius);
|
||||
}
|
||||
|
@@ -48,7 +48,7 @@ class UndoPoint {
|
||||
private:
|
||||
// Only keep a certain number of undo points in memory otherwise
|
||||
// Big projects could hog a lot of memory
|
||||
const static int MAX_UNDO_LIST_SIZE = 100; // TODO get feedback on this value
|
||||
const static int MAX_UNDO_LIST_SIZE = 100;
|
||||
static int undoCount;
|
||||
|
||||
ChangeType change;
|
||||
|
@@ -148,7 +148,7 @@ static inline T* readFromFileReaders(vector<FileReader<T> const *>* readers, con
|
||||
#else
|
||||
ifstream file(filepath.c_str(), ios::in | ios::binary);
|
||||
#endif
|
||||
if (!file.is_open()) { //An error occured; TODO: Which one - throw an exception, print error message?
|
||||
if (!file.is_open()) {
|
||||
throw megaglest_runtime_error("[#1] Could not open file " + filepath);
|
||||
}
|
||||
for (typename vector<FileReader<T> const *>::const_iterator i = readers->begin(); i != readers->end(); ++i) {
|
||||
@@ -158,10 +158,10 @@ static inline T* readFromFileReaders(vector<FileReader<T> const *>* readers, con
|
||||
FileReader<T> const * reader = *i;
|
||||
ret = reader->read(file, filepath); //It is guaranteed that at least the filepath matches ...
|
||||
}
|
||||
catch (megaglest_runtime_error &ex) { //TODO: Specific exceptions
|
||||
catch (megaglest_runtime_error &ex) {
|
||||
throw;
|
||||
}
|
||||
catch (...) { //TODO: Specific exceptions
|
||||
catch (...) {
|
||||
continue;
|
||||
}
|
||||
if (ret != NULL) {
|
||||
@@ -191,7 +191,7 @@ static inline T* readFromFileReaders(vector<FileReader<T> const *>* readers, con
|
||||
#else
|
||||
ifstream file(filepath.c_str(), ios::in | ios::binary);
|
||||
#endif
|
||||
if (!file.is_open()) { //An error occured; TODO: Which one - throw an exception, print error message?
|
||||
if (!file.is_open()) {
|
||||
#if defined(WIN32) && !defined(__MINGW32__)
|
||||
DWORD error = GetLastError();
|
||||
throw megaglest_runtime_error("[#2] Could not open file, result: " + intToStr(error) + " - " + intToStr(fileErrno) + " [" + filepath + "]");
|
||||
@@ -206,10 +206,10 @@ static inline T* readFromFileReaders(vector<FileReader<T> const *>* readers, con
|
||||
FileReader<T> const * reader = *i;
|
||||
ret = reader->read(file, filepath, object); //It is guaranteed that at least the filepath matches ...
|
||||
}
|
||||
catch (megaglest_runtime_error &ex) { //TODO: Specific exceptions
|
||||
catch (megaglest_runtime_error &ex) {
|
||||
throw;
|
||||
}
|
||||
catch (...) { //TODO: Specific exceptions
|
||||
catch (...) {
|
||||
continue;
|
||||
}
|
||||
if (ret != NULL) {
|
||||
@@ -329,7 +329,7 @@ bool FileReader<T>::canRead(ifstream& file) const {
|
||||
delete wouldRead;
|
||||
return ret;
|
||||
}
|
||||
catch (megaglest_runtime_error &ex) { //TODO: Specific exceptions
|
||||
catch (megaglest_runtime_error &ex) {
|
||||
throw;
|
||||
}
|
||||
catch (...) {
|
||||
@@ -350,7 +350,7 @@ T* FileReader<T>::read(const string& filepath) const {
|
||||
#else
|
||||
ifstream file(filepath.c_str(), ios::in | ios::binary);
|
||||
#endif
|
||||
if (!file.is_open()) { //An error occured; TODO: Which one - throw an exception, print error message?
|
||||
if (!file.is_open()) {
|
||||
throw megaglest_runtime_error("[#3] Could not open file " + filepath);
|
||||
}
|
||||
T* ret = read(file,filepath);
|
||||
@@ -375,7 +375,7 @@ T* FileReader<T>::read(const string& filepath, T* object) const {
|
||||
#else
|
||||
ifstream file(filepath.c_str(), ios::in | ios::binary);
|
||||
#endif
|
||||
if (!file.is_open()) { //An error occured; TODO: Which one - throw an exception, print error message?
|
||||
if (!file.is_open()) {
|
||||
throw megaglest_runtime_error("[#4] Could not open file " + filepath);
|
||||
}
|
||||
T* ret = read(file,filepath,object);
|
||||
|
@@ -41,7 +41,7 @@
|
||||
#define MG_I64_SPECIFIER "%" PRId64""
|
||||
#define MG_I64U_SPECIFIER "%" PRIu64""
|
||||
#else
|
||||
// TODO figure out which to use.
|
||||
|
||||
#if NUMBITS == 32
|
||||
#define MG_SIZE_T_SPECIFIER "%lu"
|
||||
#define MG_SSIZE_T_SPECIFIER "%ld"
|
||||
|
@@ -13,4 +13,3 @@ ADD_LIBRARY(streflop STATIC EXCLUDE_FROM_ALL
|
||||
${libm_flt32_source}
|
||||
)
|
||||
set_target_properties(streflop PROPERTIES COMPILE_FLAGS "${PIC_FLAG}")
|
||||
#TODO do not use -fPIC for streflop (decreases performance)
|
||||
|
@@ -19,7 +19,7 @@
|
||||
#define __BYTE_ORDER 1234
|
||||
#define __FLOAT_WORD_ORDER 1234
|
||||
|
||||
// Softfloat or other unknown FPU. TODO: Try some header autodetect?
|
||||
// Softfloat or other unknown FPU.
|
||||
#else
|
||||
|
||||
#define __BYTE_ORDER 1234
|
||||
|
@@ -1519,7 +1519,7 @@ namespace rapidxml
|
||||
if (Flags & parse_no_utf8)
|
||||
{
|
||||
// Insert 8-bit ASCII character
|
||||
// Todo: possibly verify that code is less than 256 and use replacement char otherwise?
|
||||
// possibly verify that code is less than 256 and use replacement char otherwise?
|
||||
text[0] = static_cast<unsigned char>(code);
|
||||
text += 1;
|
||||
}
|
||||
|
@@ -232,8 +232,6 @@ LOCAL int ftpCmdPort(int sessionId, const char* args, int len)
|
||||
break;
|
||||
}
|
||||
}
|
||||
// TODO Derzeit wird die übergebene IP nicht beachtet, sondern nur die IP des Control-Sockets verwendet
|
||||
//clientIp[0] = clientIp[0];
|
||||
if(ftpGetSession(sessionId)->passiveDataSocket >= 0)
|
||||
{
|
||||
if(VERBOSE_MODE_ENABLED) printf("In ftpCmdPort about to Close socket = %d for sessionId = %d\n",ftpGetSession(sessionId)->passiveDataSocket,sessionId);
|
||||
|
@@ -480,7 +480,6 @@ int ftpUntrackSocket(socket_t s)
|
||||
{
|
||||
FD_CLR(s, &watchedSockets);
|
||||
}
|
||||
// TODO hier sollte eine Möglichkeit geschaffen werden um maxSockNr anzupassen
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@@ -514,7 +514,6 @@ int ftpUntrackSocket(socket_t s)
|
||||
{
|
||||
FD_CLR(s, &watchedSockets);
|
||||
}
|
||||
// TODO hier sollte eine Möglichkeit geschaffen werden um maxSockNr anzupassen
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@@ -139,8 +139,8 @@ Pixmap2D* JPGReader::read(ifstream& is, const string& path, Pixmap2D* ret) const
|
||||
int picComponents = (ret->getComponents() == -1)?cinfo.num_components:ret->getComponents();
|
||||
//std::cout << "JPG-Components: Pic: " << picComponents << " old: " << (ret->getComponents()) << " File: " << cinfo.num_components << std::endl;
|
||||
//picComponents = 4;
|
||||
//TODO: Irrlicht has some special CMYK-handling - maybe needed too?
|
||||
/* Start decompression jpeg here */
|
||||
|
||||
// Start decompression jpeg here
|
||||
jpeg_start_decompress( &cinfo );
|
||||
ret->init(cinfo.image_width, cinfo.image_height, picComponents);
|
||||
uint8* pixels = ret->getPixels();
|
||||
@@ -175,7 +175,7 @@ Pixmap2D* JPGReader::read(ifstream& is, const string& path, Pixmap2D* ret) const
|
||||
a = row_pointer[0][xFile+3];
|
||||
break;
|
||||
default:
|
||||
//TODO: Error
|
||||
// Possible Error
|
||||
case 1:
|
||||
r = g = b = l = row_pointer[0][xFile];
|
||||
a = 255;
|
||||
@@ -198,7 +198,7 @@ Pixmap2D* JPGReader::read(ifstream& is, const string& path, Pixmap2D* ret) const
|
||||
pixels[location+xPic+i] = l;
|
||||
}
|
||||
break;
|
||||
//TODO: Error
|
||||
// Possible Error
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -165,7 +165,7 @@ Pixmap2D* PNGReader::read(ifstream& is, const string& path, Pixmap2D* ret) const
|
||||
a = row_pointers[y][xFile+3];
|
||||
break;
|
||||
default:
|
||||
//TODO: Error
|
||||
// Possible Error
|
||||
case 1:
|
||||
r = g = b = l = row_pointers[y][xFile];
|
||||
a = 255;
|
||||
@@ -188,7 +188,7 @@ Pixmap2D* PNGReader::read(ifstream& is, const string& path, Pixmap2D* ret) const
|
||||
pixels[location+xPic+i] = l;
|
||||
}
|
||||
break;
|
||||
//TODO: Error
|
||||
// Possible Error
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -322,7 +322,7 @@ Pixmap3D* PNGReader3D::read(ifstream& is, const string& path, Pixmap3D* ret) con
|
||||
a = row_pointers[y][xFile+3];
|
||||
break;
|
||||
default:
|
||||
//TODO: Error
|
||||
// Possible Error
|
||||
case 1:
|
||||
r = g = b = l = row_pointers[y][xFile];
|
||||
a = 255;
|
||||
@@ -345,7 +345,7 @@ Pixmap3D* PNGReader3D::read(ifstream& is, const string& path, Pixmap3D* ret) con
|
||||
pixels[location+xPic+i] = l;
|
||||
}
|
||||
break;
|
||||
//TODO: Error
|
||||
// Possible Error
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -86,7 +86,7 @@ void computegradient(double *img, int w, int h, double *gx, double *gy)
|
||||
}
|
||||
}
|
||||
}
|
||||
// TODO: Compute reasonable values for gx, gy also around the image edges.
|
||||
// Compute reasonable values for gx, gy also around the image edges.
|
||||
// (These are zero now, which reduces the accuracy for a 1-pixel wide region
|
||||
// around the image edge.) 2x2 kernels would be suitable for this.
|
||||
}
|
||||
|
@@ -60,7 +60,7 @@ void Texture1D::load(const string &path){
|
||||
this->path= path;
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] this->path = [%s]\n",__FILE__,__FUNCTION__,__LINE__,this->path.c_str());
|
||||
|
||||
if (pixmap.getComponents() == -1) { //TODO: look where you really need that
|
||||
if (pixmap.getComponents() == -1) {
|
||||
pixmap.init(defaultComponents);
|
||||
}
|
||||
pixmap.load(path);
|
||||
@@ -179,8 +179,9 @@ std::pair<SDL_Surface*,unsigned char*> Texture2D::CreateSDLSurface(bool newPixel
|
||||
int ybegin = 0;
|
||||
int yend = image->h - 1;
|
||||
|
||||
// TODO: consider if this lock is legal/appropriate
|
||||
if (SDL_MUSTLOCK(image)) { SDL_LockSurface(image); }
|
||||
if (SDL_MUSTLOCK(image)) {
|
||||
SDL_LockSurface(image);
|
||||
}
|
||||
while (ybegin < yend) {
|
||||
memcpy(line, pixels + pitch*ybegin, pitch);
|
||||
memcpy(pixels + pitch*ybegin, pixels + pitch*yend, pitch);
|
||||
@@ -188,7 +189,9 @@ std::pair<SDL_Surface*,unsigned char*> Texture2D::CreateSDLSurface(bool newPixel
|
||||
ybegin++;
|
||||
yend--;
|
||||
}
|
||||
if (SDL_MUSTLOCK(image)) { SDL_UnlockSurface(image); }
|
||||
if (SDL_MUSTLOCK(image)) {
|
||||
SDL_UnlockSurface(image);
|
||||
}
|
||||
|
||||
// if (freeSource) {
|
||||
// SDL_FreeSurface(surface);
|
||||
|
@@ -1754,7 +1754,6 @@ bool isKeyDown(int virtualKey) {
|
||||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] key = %d\n",__FILE__,__FUNCTION__,__LINE__,key);
|
||||
|
||||
// kinda hack and wrong...
|
||||
if(key >= 0) {
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] keystate[key] = %d\n",__FILE__,__FUNCTION__,__LINE__,keystate[(unsigned char)key]);
|
||||
|
||||
|
@@ -37,9 +37,8 @@ namespace Shared{ namespace Platform{
|
||||
// WINDOW
|
||||
// =======================================
|
||||
|
||||
// ========== STATIC INICIALIZATIONS ==========
|
||||
// ========== STATIC INITIALIZATIONS ==========
|
||||
|
||||
// Matze: hack for now...
|
||||
static Window* global_window = 0;
|
||||
static int oldX=0,oldY=0;
|
||||
int64 Window::lastMouseEvent = 0; /** for use in mouse hover calculations */
|
||||
|
@@ -18,13 +18,13 @@ namespace streflop {
|
||||
const Simple SimpleZero(0.0f);
|
||||
const Simple SimplePositiveInfinity = Simple(1.0f) / SimpleZero;
|
||||
const Simple SimpleNegativeInfinity = Simple(-1.0f) / SimpleZero;
|
||||
// TODO: non-signaling version
|
||||
// non-signaling version
|
||||
const Simple SimpleNaN = SimplePositiveInfinity + SimpleNegativeInfinity;
|
||||
|
||||
const Double DoubleZero(0.0f);
|
||||
const Double DoublePositiveInfinity = Double(1.0f) / DoubleZero;
|
||||
const Double DoubleNegativeInfinity = Double(-1.0f) / DoubleZero;
|
||||
// TODO: non-signaling version
|
||||
// non-signaling version
|
||||
const Double DoubleNaN = DoublePositiveInfinity + DoubleNegativeInfinity;
|
||||
|
||||
// Extended are not always available
|
||||
@@ -33,7 +33,7 @@ namespace streflop {
|
||||
const Extended ExtendedZero(0.0f);
|
||||
const Extended ExtendedPositiveInfinity = Extended(1.0f) / ExtendedZero;
|
||||
const Extended ExtendedNegativeInfinity = Extended(-1.0f) / ExtendedZero;
|
||||
// TODO: non-signaling version
|
||||
// non-signaling version
|
||||
const Extended ExtendedNaN = ExtendedPositiveInfinity + ExtendedNegativeInfinity;
|
||||
|
||||
#endif
|
||||
|
@@ -102,10 +102,8 @@ namespace Shared { namespace Util {
|
||||
// Empty the container
|
||||
if (emptyBefore)
|
||||
out.clear();
|
||||
// TODO This method should be rewritten for better performance
|
||||
String s(*this);
|
||||
while (!s.empty())
|
||||
{
|
||||
while (!s.empty()) {
|
||||
String::size_type i = s.find_first_of(separators);
|
||||
if (i == std::string::npos)
|
||||
{
|
||||
@@ -126,10 +124,8 @@ namespace Shared { namespace Util {
|
||||
// Empty the container
|
||||
if (emptyBefore)
|
||||
out.clear();
|
||||
// TODO This method should be rewritten for better performance
|
||||
String s(*this);
|
||||
while (!s.empty())
|
||||
{
|
||||
while (!s.empty()) {
|
||||
String::size_type i = s.find_first_of(separators);
|
||||
if (i == std::string::npos)
|
||||
{
|
||||
@@ -488,7 +484,7 @@ namespace Shared { namespace Util {
|
||||
char* ret = ConvertToUTF8(s.c_str(), s.size());
|
||||
if (ret)
|
||||
{
|
||||
String s(ret); // TODO Find a way to not use a temporary string
|
||||
String s(ret);
|
||||
delete[] ret;
|
||||
return s;
|
||||
}
|
||||
|
Reference in New Issue
Block a user