paragui-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paragui-cvs] CVS: paragui/src/core missing.cpp,NONE,1.2.2.1 pgtimerobje


From: Teunis Peters <address@hidden>
Subject: [paragui-cvs] CVS: paragui/src/core missing.cpp,NONE,1.2.2.1 pgtimerobject.cpp,NONE,1.2.2.1 physfsrwops.cpp,NONE,1.2.2.1 Makefile.am,1.4,1.4.2.1 pgapplication.cpp,1.10.2.3,1.10.2.4 pgcolors.cpp,1.1.2.1,1.1.2.2 pgdatacontainer.cpp,1.1,1.1.2.1 pgfile.cpp,1.1,1.1.2.1 pgfilearchive.cpp,1.4.2.1,1.4.2.2 pgfilelist.cpp,1.1,1.1.2.1 pglog.cpp,1.1,1.1.2.1 pgmain.cpp,1.1,1.1.2.1 pgmessageobject.cpp,1.8,1.8.2.1 pgnavigator.cpp,1.2,1.2.2.1 pgrectlist.cpp,1.2.2.1,1.2.2.2 pgsurfacecache.cpp,1.2.2.3,1.2.2.4
Date: Sat, 31 Aug 2002 00:01:55 -0400

Update of /cvsroot/paragui/paragui/src/core
In directory subversions:/tmp/cvs-serv4328/src/core

Modified Files:
      Tag: devel-opengl
        Makefile.am pgapplication.cpp pgcolors.cpp pgdatacontainer.cpp 
        pgfile.cpp pgfilearchive.cpp pgfilelist.cpp pglog.cpp 
        pgmain.cpp pgmessageobject.cpp pgnavigator.cpp pgrectlist.cpp 
        pgsurfacecache.cpp 
Added Files:
      Tag: devel-opengl
        missing.cpp pgtimerobject.cpp physfsrwops.cpp 
Log Message:
massive changes - updates from main trunk and various bugfixes


--- NEW FILE ---
#include "paragui.h"

#ifndef HAVE_STRDUP
char *strdup(char *s) {
        if(s == NULL) {
                return NULL;
        }
        
        int l = strlen(s) + 1;
        char *ret = (char *)malloc(l);
        if (ret) {
                strcpy(ret,s);
        }
        return ret;
}
#endif

#ifndef HAVE_FNMATCH
#include <errno.h>

/* Match STRING against the filename pattern PATTERN, returning zero
   if it matches, FNM_NOMATCH if not.  */
int fnmatch (const char *pattern, const char *string, int flags) {
  register const char *p = pattern, *n = string;
  register char c;

  if ((flags & ~__FNM_FLAGS) != 0) {
      errno = EINVAL;
      return (-1);
    }

  while ((c = *p++) != '\0')
    {
      switch (c)
        {
        case '?':
          if (*n == '\0')
            return (FNM_NOMATCH);
          else if ((flags & FNM_PATHNAME) && *n == '/')
            return (FNM_NOMATCH);
          else if ((flags & FNM_PERIOD) && *n == '.' &&
                   (n == string || ((flags & FNM_PATHNAME) && n[-1] == '/')))
            return (FNM_NOMATCH);
          break;

        case '\\':
          if (!(flags & FNM_NOESCAPE))
            c = *p++;
          if (*n != c)
            return (FNM_NOMATCH);
          break;

        case '*':
          if ((flags & FNM_PERIOD) && *n == '.' &&
              (n == string || ((flags & FNM_PATHNAME) && n[-1] == '/')))
            return (FNM_NOMATCH);

          for (c = *p++; c == '?' || c == '*'; c = *p++, ++n)
            if (((flags & FNM_PATHNAME) && *n == '/') ||
                (c == '?' && *n == '\0'))
              return (FNM_NOMATCH);

          if (c == '\0')
            return (0);

          {
            char c1 = (!(flags & FNM_NOESCAPE) && c == '\\') ? *p : c;
            for (--p; *n != '\0'; ++n)
              if ((c == '[' || *n == c1) &&
                  fnmatch (p, n, flags & ~FNM_PERIOD) == 0)
                return (0);
            return (FNM_NOMATCH);
          }

        case '[':
          {
            /* Nonzero if the sense of the character class is
               inverted.  */
            register int nott;

            if (*n == '\0')
              return (FNM_NOMATCH);

            if ((flags & FNM_PERIOD) && *n == '.' &&
                (n == string || ((flags & FNM_PATHNAME) && n[-1] == '/')))
              return (FNM_NOMATCH);

            /* Make sure there is a closing `]'.  If there isn't,
               the `[' is just a character to be matched.  */
            {
              register const char *np;

              for (np = p; np && *np && *np != ']'; np++);

              if (np && !*np)
                {
                  if (*n != '[')
                    return (FNM_NOMATCH);
                  goto next_char;
                }
            }

            nott = (*p == '!' || *p == '^');
            if (nott)
              ++p;

            c = *p++;
            while (1)
              {
                register char cstart = c, cend = c;

                if (!(flags & FNM_NOESCAPE) && c == '\\')
                  cstart = cend = *p++;

                if (c == '\0')
                  /* [ (unterminated) loses.  */
                  return (FNM_NOMATCH);

                c = *p++;

                if ((flags & FNM_PATHNAME) && c == '/')
                  /* [/] can never match.  */
                  return (FNM_NOMATCH);

                if (c == '-' && *p != ']')
                  {
                    cend = *p++;
                    if (!(flags & FNM_NOESCAPE) && cend == '\\')
                      cend = *p++;
                    if (cend == '\0')
                      return (FNM_NOMATCH);
                    c = *p++;
                  }

                if (*n >= cstart && *n <= cend)
                  goto matched;

                if (c == ']')
                  break;
              }
            if (!nott)
              return (FNM_NOMATCH);

          next_char:
            break;

          matched:
            /* Skip the rest of the [...] that already matched.  */
            while (c != ']')
              {
                if (c == '\0')
                  /* [... (unterminated) loses.  */
                  return (FNM_NOMATCH);

                c = *p++;
                if (!(flags & FNM_NOESCAPE) && c == '\\')
                  /* 1003.2d11 is unclear if this is right.  %%% */
                  ++p;
              }
            if (nott)
              return (FNM_NOMATCH);
          }
          break;

        default:
          if (c != *n)
            return (FNM_NOMATCH);
        }

      ++n;
    }

  if (*n == '\0')
    return (0);

  return (FNM_NOMATCH);
}
#endif

--- NEW FILE ---
#include "pgtimerobject.h"

Uint32 PG_TimerObject::objectcount = 0;
PG_TimerID PG_TimerObject::globalTimerID = 0;
std::map<PG_TimerID, PG_TimerObject*> PG_TimerObject::timermap;
PG_TimerObject* PG_TimerObject::objSingleTimer = NULL;

PG_TimerObject::PG_TimerObject() {
        if(objectcount == 0) {
                SDL_InitSubSystem(SDL_INIT_TIMER);
        }
        
        objectcount++;
}

PG_TimerObject::~PG_TimerObject() {

        // stop single timers
        StopTimer();
        
        // remove all timers of this object
        std::map<PG_TimerID, SDL_TimerID>::iterator i;
        
        for(i = my_timermap.begin(); i != my_timermap.end(); ) {
                RemoveTimer((*i).first);
                i = my_timermap.begin();
        }
        
        objectcount--;

        if(objectcount == 0) {
                SDL_QuitSubSystem(SDL_INIT_TIMER);
        }
}
        
PG_TimerID PG_TimerObject::AddTimer(Uint32 interval) {
        SDL_TimerID id = SDL_AddTimer(interval, &PG_TimerObject::callbackTimer, 
(void*)(globalTimerID+1));

        if(id == 0) {
                return 0;
        }
        
        PG_TimerID pgid = ++globalTimerID;
        my_timermap[pgid] = id;
        timermap[pgid] = this;
        
        return pgid;
}
        
bool PG_TimerObject::RemoveTimer(PG_TimerID id) {
        SDL_TimerID sid = my_timermap[id];
        my_timermap.erase(id);
        timermap.erase(id);
        
        return SDL_RemoveTimer(sid);
}
        
Uint32 PG_TimerObject::eventTimer(PG_TimerID id, Uint32 interval) {
        return interval;
}

Uint32 PG_TimerObject::eventTimer(Uint32 interval) {
        return interval;
}

Uint32 PG_TimerObject::callbackTimer(Uint32 interval, void* data) {
        PG_TimerID id = reinterpret_cast<PG_TimerID>(data);
        return timermap[id]->eventTimer(id, interval);
}

Uint32 PG_TimerObject::callbackSingleTimer(Uint32 interval) {
        if(objSingleTimer != NULL) {
                return objSingleTimer->eventTimer(interval);
        }
        
        return 0;
}

int PG_TimerObject::SetTimer(Uint32 interval) {
        StopTimer();
        objSingleTimer = this;
        return SDL_SetTimer(interval, &PG_TimerObject::callbackSingleTimer);
}
        
void PG_TimerObject::StopTimer() {
        objSingleTimer = NULL;
        SDL_SetTimer(0, NULL);
}

--- NEW FILE ---
/*
 * This code provides a glue layer between PhysicsFS and Simple Directmedia
 *  Layer's (SDL) RWops i/o abstraction.
 *
 * License: this code is public domain. I make no warranty that it is useful,
 *  correct, harmless, or environmentally safe.
 *
 * This particular file may be used however you like, including copying it
 *  verbatim into a closed-source project, exploiting it commercially, and
 *  removing any trace of my name from the source (although I hope you won't
 *  do that). I welcome enhancements and corrections to this file, but I do
 *  not require you to send me patches if you make changes.
 *
 * Unless otherwise stated, the rest of PhysicsFS falls under the GNU Lesser
 *  General Public License: http://www.gnu.org/licenses/lgpl.txt
 *
 * SDL falls under the LGPL, too. You can get SDL at http://www.libsdl.org/
 *
 *  This file was written by Ryan C. Gordon. (address@hidden).
 */

#include <stdio.h>  /* used for SEEK_SET, SEEK_CUR, SEEK_END ... */
#include "physfsrwops.h"

static int physfsrwops_seek(SDL_RWops *rw, int offset, int whence)
{
    PHYSFS_file *handle = (PHYSFS_file *) rw->hidden.unknown.data1;
    int pos = 0;

    if (whence == SEEK_SET)
    {
        pos = offset;
    } /* if */

    else if (whence == SEEK_CUR)
    {
        PHYSFS_sint64 current = PHYSFS_tell(handle);
        if (current == -1)
        {
            SDL_SetError("Can't find position in file: %s",
                          PHYSFS_getLastError());
            return(-1);
        } /* if */

        pos = (int) current;
        if ( ((PHYSFS_sint64) pos) != current )
        {
            SDL_SetError("Can't fit current file position in an int!");
            return(-1);
        } /* if */

        if (offset == 0)  /* this is a "tell" call. We're done. */
            return(pos);

        pos += offset;
    } /* else if */

    else if (whence == SEEK_END)
    {
        PHYSFS_sint64 len = PHYSFS_fileLength(handle);
        if (len == -1)
        {
            SDL_SetError("Can't find end of file: %s", PHYSFS_getLastError());
            return(-1);
        } /* if */

        pos = (int) len;
        if ( ((PHYSFS_sint64) pos) != len )
        {
            SDL_SetError("Can't fit end-of-file position in an int!");
            return(-1);
        } /* if */

        pos += offset;
    } /* else if */

    else
    {
        SDL_SetError("Invalid 'whence' parameter.");
        return(-1);
    } /* else */

    if ( pos < 0 )
    {
        SDL_SetError("Attempt to seek past start of file.");
        return(-1);
    } /* if */
    
    if (!PHYSFS_seek(handle, (PHYSFS_uint64) pos))
    {
        SDL_SetError("PhysicsFS error: %s", PHYSFS_getLastError());
        return(-1);
    } /* if */

    return(pos);
} /* physfsrwops_seek */


static int physfsrwops_read(SDL_RWops *rw, void *ptr, int size, int maxnum)
{
    PHYSFS_file *handle = (PHYSFS_file *) rw->hidden.unknown.data1;
    PHYSFS_sint64 rc = PHYSFS_read(handle, ptr, size, maxnum);
    if (rc != maxnum)
    {
        if (!PHYSFS_eof(handle)) /* not EOF? Must be an error. */
            SDL_SetError("PhysicsFS error: %s", PHYSFS_getLastError());
    } /* if */

    return((int) rc);
} /* physfsrwops_read */


static int physfsrwops_write(SDL_RWops *rw, const void *ptr, int size, int num)
{
    PHYSFS_file *handle = (PHYSFS_file *) rw->hidden.unknown.data1;
    PHYSFS_sint64 rc = PHYSFS_write(handle, ptr, size, num);
    if (rc != num)
        SDL_SetError("PhysicsFS error: %s", PHYSFS_getLastError());

    return((int) rc);
} /* physfsrwops_write */


static int physfsrwops_close(SDL_RWops *rw)
{
    PHYSFS_file *handle = (PHYSFS_file *) rw->hidden.unknown.data1;
    if (!PHYSFS_close(handle))
    {
        SDL_SetError("PhysicsFS error: %s", PHYSFS_getLastError());
        return(-1);
    } /* if */

    SDL_FreeRW(rw);
    return(0);
} /* physfsrwops_close */


static SDL_RWops *create_rwops(PHYSFS_file *handle)
{
    SDL_RWops *retval = NULL;

    if (handle == NULL)
        SDL_SetError("PhysicsFS error: %s", PHYSFS_getLastError());
    else
    {
        retval = SDL_AllocRW();
        if (retval != NULL)
        {
            retval->seek  = physfsrwops_seek;
            retval->read  = physfsrwops_read;
            retval->write = physfsrwops_write;
            retval->close = physfsrwops_close;
            retval->hidden.unknown.data1 = handle;
        } /* if */
    } /* else */

    return(retval);
} /* create_rwops */


SDL_RWops *PHYSFSRWOPS_makeRWops(PHYSFS_file *handle)
{
    SDL_RWops *retval = NULL;
    if (handle == NULL)
        SDL_SetError("NULL pointer passed to PHYSFSRWOPS_makeRWops().");
    else
        retval = create_rwops(handle);

    return(retval);
} /* PHYSFSRWOPS_makeRWops */


SDL_RWops *PHYSFSRWOPS_openRead(const char *fname)
{
    fprintf(stderr, "%s:%s:%i %s\n", __FILE__, __FUNCTION__, __LINE__, fname);
    return(create_rwops(PHYSFS_openRead(fname)));
} /* PHYSFSRWOPS_openRead */


SDL_RWops *PHYSFSRWOPS_openWrite(const char *fname)
{
    return(create_rwops(PHYSFS_openWrite(fname)));
} /* PHYSFSRWOPS_openWrite */


SDL_RWops *PHYSFSRWOPS_openAppend(const char *fname)
{
    return(create_rwops(PHYSFS_openAppend(fname)));
} /* PHYSFSRWOPS_openAppend */


/* end of physfsrwops.c ... */


Index: Makefile.am
===================================================================
RCS file: /cvsroot/paragui/paragui/src/core/Makefile.am,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -C2 -r1.4 -r1.4.2.1
*** Makefile.am 29 Apr 2002 11:44:22 -0000      1.4
--- Makefile.am 31 Aug 2002 04:01:22 -0000      1.4.2.1
***************
*** 2,6 ****
  
  libpgcore_la_SOURCES = \
!       physfsrwops.c \
        pgdatacontainer.cpp \
        pgapplication.cpp \
--- 2,7 ----
  
  libpgcore_la_SOURCES = \
!       physfsrwops.cpp \
!       missing.cpp \
        pgdatacontainer.cpp \
        pgapplication.cpp \
***************
*** 14,25 ****
        pgnavigator.cpp \
        pgrectlist.cpp \
!       pgsurfacecache.cpp
  
! libpgcore_la_LIBADD = 
  
  INCLUDES = \
        $(SIGC_CFLAGS) \
        $(SDL_CFLAGS) \
!       -I$(top_srcdir)/src/physfs \
        -I$(top_srcdir)/include
  
--- 15,31 ----
        pgnavigator.cpp \
        pgrectlist.cpp \
!       pgsurfacecache.cpp \
!       pgtimerobject.cpp
  
! libpgcore_la_LIBADD =
! 
! EXTRA_DIST = \
!       physfsrwops.h \
!       pgmsgmap.h
  
  INCLUDES = \
        $(SIGC_CFLAGS) \
        $(SDL_CFLAGS) \
!       $(PHYSFS_INCLUDE) \
        -I$(top_srcdir)/include
  
***************
*** 29,33 ****
  style_personal:
        astyle *.cpp
- 
- EXTRA_DIST = \
-       physfsrwops.h
--- 35,36 ----

Index: pgapplication.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/core/pgapplication.cpp,v
retrieving revision 1.10.2.3
retrieving revision 1.10.2.4
diff -C2 -r1.10.2.3 -r1.10.2.4
*** pgapplication.cpp   26 Jun 2002 08:47:51 -0000      1.10.2.3
--- pgapplication.cpp   31 Aug 2002 04:01:22 -0000      1.10.2.4
***************
*** 2,16 ****
      ParaGUI - crossplatform widgetset
      Copyright (C) 2000,2001,2002  Alexander Pipelka
!  
      This library is free software; you can redistribute it and/or
      modify it under the terms of the GNU Library General Public
      License as published by the Free Software Foundation; either
      version 2 of the License, or (at your option) any later version.
!  
      This library is distributed in the hope that it will be useful,
      but WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      Library General Public License for more details.
!  
      You should have received a copy of the GNU Library General Public
      License along with this library; if not, write to the Free
--- 2,16 ----
      ParaGUI - crossplatform widgetset
      Copyright (C) 2000,2001,2002  Alexander Pipelka
! 
      This library is free software; you can redistribute it and/or
      modify it under the terms of the GNU Library General Public
      License as published by the Free Software Foundation; either
      version 2 of the License, or (at your option) any later version.
! 
      This library is distributed in the hope that it will be useful,
      but WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      Library General Public License for more details.
! 
      You should have received a copy of the GNU Library General Public
      License along with this library; if not, write to the Free
***************
*** 19,23 ****
      Alexander Pipelka
      address@hidden
!  
      Last Update:      $Author$
      Update Date:      $Date$
--- 19,23 ----
      Alexander Pipelka
      address@hidden
! 
      Last Update:      $Author$
      Update Date:      $Date$
***************
*** 27,35 ****
  */
  
- #include <iostream>
- #include <cstring>
- #include <cassert>
- #include <cmath>
- 
  #include "pgapplication.h"
  #include "pgwidget.h"
--- 27,30 ----
***************
*** 39,49 ****
  #include "pgtheme.h"
  
  // usually PARAGUI_THEMEDIR is defined by the configure script
  // or passed to the compiler. This is just a kind of last resort.
  
  #ifndef PARAGUI_THEMEDIR
! #define PARAGUI_THEMEDIR      "./"
! #endif        // PARAGUI_THEMEDIR
! 
  
  SDL_mutex* PG_Application::mutexScreen = NULL;
--- 34,52 ----
  #include "pgtheme.h"
  
+ #include <iostream>
+ #include <cstring>
+ #include <cassert>
+ #include <cmath>
+ 
  // usually PARAGUI_THEMEDIR is defined by the configure script
  // or passed to the compiler. This is just a kind of last resort.
  
  #ifndef PARAGUI_THEMEDIR
! #ifdef __MACOS__
! #define PARAGUI_THEMEDIR        ""
! #else
! #define PARAGUI_THEMEDIR        "./"
! #endif  // macintosh
! #endif  // PARAGUI_THEMEDIR
  
  SDL_mutex* PG_Application::mutexScreen = NULL;
***************
*** 64,71 ****
  PG_Draw::PG_DrawableSurface* PG_Application::my_scaled_background;
  SDL_Color PG_Application::my_backcolor;
! int PG_Application::my_backmode;
! bool PG_Application::my_quitEventLoop = false;
  std::vector<PG_MessageObject*> PG_Application::objectList;
  PG_Widget* PG_Application::lastwidget = NULL;
  PG_Draw::PG_Draw* PG_Application::drawable = NULL;
  
--- 67,75 ----
  PG_Draw::PG_DrawableSurface* PG_Application::my_scaled_background;
  SDL_Color PG_Application::my_backcolor;
! int PG_Application::my_backmode = BKMODE_TILE;
! bool PG_Application::disableDirtyUpdates = false;
  std::vector<PG_MessageObject*> PG_Application::objectList;
  PG_Widget* PG_Application::lastwidget = NULL;
+ bool PG_Application::my_quitEventLoop = false;
  PG_Draw::PG_Draw* PG_Application::drawable = NULL;
  
***************
*** 77,86 ****
        PG_LogConsole::Done();
  
-       // remove all archives from PG_FileArchive
-       PG_FileArchive::RemoveAllArchives();
- 
-       // shutdown PhysFS
-       PG_FileArchive::Deinit();
- 
        // shutdown SDL
        SDL_Quit();
--- 81,84 ----
***************
*** 95,99 ****
        }
  */
- 
        atexit(PARAGUI_ShutDownCode);
  
--- 93,96 ----
***************
*** 128,131 ****
--- 125,131 ----
        my_freeBackground = false;
        my_backmode = BKMODE_TILE;
+       
+       // add our base dir to the searchpath
+       AddArchive(GetBaseDir());
  }
  
***************
*** 133,136 ****
--- 133,139 ----
        //pGlobalApp = NULL;
        Shutdown();
+       
+       // remove all archives from PG_FileArchive
+       PG_FileArchive::RemoveAllArchives();
  }
  
***************
*** 200,203 ****
--- 203,207 ----
                SDL_Delay(0);
  #endif
+ 
                if(enableAppIdleCalls) {
                        if (SDL_PollEvent(&event) == 0) {
***************
*** 265,270 ****
  /**  */
  bool PG_Application::eventKeyDown(const SDL_KeyboardEvent* key) {
! 
!       if (key->keysym.sym == PG_LOGCONSOLE_KEY) {
                PG_LogConsole::Update();
                PG_LogConsole::Toggle();
--- 269,279 ----
  /**  */
  bool PG_Application::eventKeyDown(const SDL_KeyboardEvent* key) {
!       SDLKey ckey = PG_LogConsole::GetConsoleKey();
!       
!       if(ckey == 0) {
!               return false;
!       }
!       
!       if (key->keysym.sym == ckey) {
                PG_LogConsole::Update();
                PG_LogConsole::Toggle();
***************
*** 296,300 ****
                     screen->getScreen()->flags);
  
!         PG_Rect r = PG_Rect(0,0,event->w,event->h);
        PG_Widget::UpdateRect(r);
        drawable->UpdateRects(1, &r);
--- 305,309 ----
                     screen->getScreen()->flags);
  
!       PG_Rect r = PG_Rect(0,0,event->w,event->h);
        PG_Widget::UpdateRect(r);
        drawable->UpdateRects(1, &r);
***************
*** 382,386 ****
                // Destroyed scaled background if present
                delete my_scaled_background; // 
SDL_FreeSurface(my_scaled_background);
!               my_scaled_background = 0;
        }               
        if(my_background != NULL) {
--- 391,395 ----
                // Destroyed scaled background if present
                delete my_scaled_background; // 
SDL_FreeSurface(my_scaled_background);
!               my_scaled_background = NULL;
        }               
        if(my_background != NULL) {
***************
*** 548,564 ****
  PG_Theme* PG_Application::LoadTheme(const char* xmltheme, bool asDefault, 
const char* searchpath) {
        PG_Theme* theme = NULL;
  
        PG_LogDBG("Locating theme '%s' ...", xmltheme);
  
!       // MacOS does not use file path separator '/', instead ':' is used
!       // There could be clever solution for this, but for a while...
!       // let's assume that "data" directory must exist in working directory 
on MacOS.
!       // Masahiro Minami<address@hidden>
!       // 01/05/06
!     
!       // add paths to the archive
! 
!       //#ifndef macintosh
! 
        if(searchpath != NULL) {
                if(AddArchive(searchpath)) {
--- 557,565 ----
  PG_Theme* PG_Application::LoadTheme(const char* xmltheme, bool asDefault, 
const char* searchpath) {
        PG_Theme* theme = NULL;
+   fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
  
        PG_LogDBG("Locating theme '%s' ...", xmltheme);
  
!   fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        if(searchpath != NULL) {
                if(AddArchive(searchpath)) {
***************
*** 567,570 ****
--- 568,596 ----
        }
  
+   fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
+ #ifdef __MACOS__
+ 
+       if(AddArchive("")) {
+               PG_LogDBG("'' added to searchpath");
+       }
+ 
+       if(AddArchive(":")) {
+               PG_LogDBG("':' added to searchpath");
+       }
+ 
+       if(AddArchive(":data:")) {
+               PG_LogDBG("':data:' added to searchpath");
+       }
+ 
+       if(AddArchive("::data:")) {
+               PG_LogDBG("'::data:' added to searchpath");
+       }
+ 
+       if(PARAGUI_THEMEDIR != NULL) {
+               PG_LogDBG("'"PARAGUI_THEMEDIR"' added to searchpath");
+       }
+ 
+ #else 
+ 
        if(AddArchive("./")) {
                PG_LogDBG("'./' added to searchpath");
***************
*** 589,597 ****
--- 615,627 ----
        }
  
+ #endif // __MACOS__
+ 
        if(AddArchive(PARAGUI_THEMEDIR)) {
                PG_LogDBG("'"PARAGUI_THEMEDIR "' added to searchpath");
        }
  
+   fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        theme = PG_Theme::Load(xmltheme);
+   fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
  
        if(theme && asDefault) {
***************
*** 610,613 ****
--- 640,644 ----
                PG_LogMSG("size: %i", DefaultFont->GetSize());
  
+   fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
                my_background = theme->FindSurface("Background", "Background", 
"background");
                my_backmode = theme->FindProperty("Background", "Background", 
"backmode");
***************
*** 625,628 ****
--- 656,660 ----
                PG_LogWRN("Failed to load !");
        }
+   fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
  
        if((my_Theme != NULL) && asDefault) {
***************
*** 631,637 ****
--- 663,671 ----
        }
  
+   fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        if(asDefault && theme) {
                my_Theme = theme;
        }
+   fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
  
        return theme;
***************
*** 961,968 ****
                case SDL_SYSWMEVENT:
                        return eventSysWM(&event->syswm);
!               
                case SDL_USEREVENT:
                        return false;
!               
                case SDL_QUIT:
                        return eventQuit(&event->quit);
--- 995,1002 ----
                case SDL_SYSWMEVENT:
                        return eventSysWM(&event->syswm);
! 
                case SDL_USEREVENT:
                        return false;
! 
                case SDL_QUIT:
                        return eventQuit(&event->quit);
***************
*** 977,981 ****
                        break;
        }
!       
        // events related to objects/widgets
        switch(event->type) {
--- 1011,1015 ----
                        break;
        }
! 
        // events related to objects/widgets
        switch(event->type) {
***************
*** 1026,1034 ****
  
  bool PG_Application::UnregisterObject(PG_MessageObject* obj) {
!       
        if (lastwidget == obj) {
                lastwidget = NULL;
        }
!       
        std::vector<PG_MessageObject*>::iterator list = objectList.begin();
  
--- 1060,1068 ----
  
  bool PG_Application::UnregisterObject(PG_MessageObject* obj) {
! 
        if (lastwidget == obj) {
                lastwidget = NULL;
        }
! 
        std::vector<PG_MessageObject*>::iterator list = objectList.begin();
  
***************
*** 1210,1213 ****
--- 1244,1255 ----
                }
        }
+ }
+ 
+ void PG_Application::DisableDirtyUpdates(bool disable) {
+       disableDirtyUpdates = disable;
+ }
+ 
+ bool PG_Application::GetDirtyUpdatesDisabled() {
+       return disableDirtyUpdates;
  }
  

Index: pgcolors.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/core/pgcolors.cpp,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -r1.1.2.1 -r1.1.2.2
*** pgcolors.cpp        26 Jun 2002 03:25:04 -0000      1.1.2.1
--- pgcolors.cpp        31 Aug 2002 04:01:23 -0000      1.1.2.2
***************
*** 408,412 ****
        colors["magenta1"] = magenta1;
        colors["VioletRed2"] = VioletRed2;
!       colors["tan"] = tan1;
        colors["SeaGreen2"] = SeaGreen2;
        colors["gray59"] = gray59;
--- 408,412 ----
        colors["magenta1"] = magenta1;
        colors["VioletRed2"] = VioletRed2;
!       colors["tan1"] = tan1;
        colors["SeaGreen2"] = SeaGreen2;
        colors["gray59"] = gray59;

Index: pgdatacontainer.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/core/pgdatacontainer.cpp,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C2 -r1.1 -r1.1.2.1
*** pgdatacontainer.cpp 15 Apr 2002 14:53:56 -0000      1.1
--- pgdatacontainer.cpp 31 Aug 2002 04:01:23 -0000      1.1.2.1
***************
*** 30,39 ****
  
  PG_DataContainer::PG_DataContainer(Uint32 size) {
        my_data = new char[size];
        my_size = size;
  }
  
  PG_DataContainer::~PG_DataContainer() {
!       delete[] my_data;
  }
  
--- 30,46 ----
  
  PG_DataContainer::PG_DataContainer(Uint32 size) {
+       if(size == 0) {
+               my_data = NULL;
+               my_size = 0;
+       } else {
        my_data = new char[size];
        my_size = size;
+       }
  }
  
  PG_DataContainer::~PG_DataContainer() {
!       if(my_data != NULL) {
!               delete[] my_data;
!       }
  }
  

Index: pgfile.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/core/pgfile.cpp,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C2 -r1.1 -r1.1.2.1
*** pgfile.cpp  15 Apr 2002 14:53:56 -0000      1.1
--- pgfile.cpp  31 Aug 2002 04:01:23 -0000      1.1.2.1
***************
*** 78,79 ****
--- 78,111 ----
        return PHYSFS_fileLength((PHYSFS_file*)file);
  }
+ 
+ char PG_File::getc() {
+       char buffer = 0;
+       
+       if(read(&buffer, 1) == 1) {
+               return buffer;
+       }
+       return 0;
+ }
+       
+ std::string PG_File::getline() {
+       std::string result;
+       char c = 0;
+ 
+       c = getc();
+       while(!eof() && (c != 0x0A)) {
+               if(c != 0x0D) {
+                       result += c;
+               }
+               c = getc();
+       }
+       
+       return result;
+ }
+ 
+ void PG_File::putline(const std::string& line) {
+       // write characters
+       write((void*)line.c_str(), line.size());
+       
+       // write CR (LF?)
+       write((void*)"\n", strlen("\n"));
+ }

Index: pgfilearchive.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/core/pgfilearchive.cpp,v
retrieving revision 1.4.2.1
retrieving revision 1.4.2.2
diff -C2 -r1.4.2.1 -r1.4.2.2
*** pgfilearchive.cpp   18 Jun 2002 22:40:38 -0000      1.4.2.1
--- pgfilearchive.cpp   31 Aug 2002 04:01:23 -0000      1.4.2.2
***************
*** 2,23 ****
      ParaGUI - crossplatform widgetset
      Copyright (C) 2000,2001,2002  Alexander Pipelka
!  
      This library is free software; you can redistribute it and/or
      modify it under the terms of the GNU Library General Public
      License as published by the Free Software Foundation; either
      version 2 of the License, or (at your option) any later version.
!  
      This library is distributed in the hope that it will be useful,
      but WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      Library General Public License for more details.
!  
      You should have received a copy of the GNU Library General Public
      License along with this library; if not, write to the Free
      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
!  
      Alexander Pipelka
      address@hidden
!  
      Last Update:      $Author$
      Update Date:      $Date$
--- 2,23 ----
      ParaGUI - crossplatform widgetset
      Copyright (C) 2000,2001,2002  Alexander Pipelka
! 
      This library is free software; you can redistribute it and/or
      modify it under the terms of the GNU Library General Public
      License as published by the Free Software Foundation; either
      version 2 of the License, or (at your option) any later version.
! 
      This library is distributed in the hope that it will be useful,
      but WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      Library General Public License for more details.
! 
      You should have received a copy of the GNU Library General Public
      License along with this library; if not, write to the Free
      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
! 
      Alexander Pipelka
      address@hidden
! 
      Last Update:      $Author$
      Update Date:      $Date$
***************
*** 39,42 ****
--- 39,44 ----
  #endif
  
+ #include "physfsrwops.h"
+ 
  Uint32 PG_FileArchive::my_instance_count = 0;
  PG_SurfaceCache PG_FileArchive::my_cache;
***************
*** 50,54 ****
        if(my_instance_count == 1) {
                if(PHYSFS_init("paragui") == 0) {
!                       PG_LogERR("Unable to initialize PhysicsFS !");
                        return;
                }
--- 52,57 ----
        if(my_instance_count == 1) {
                if(PHYSFS_init("paragui") == 0) {
!                       std::cerr << "Unable to initialize PhysicsFS !" << 
std::endl;
!                       // PG_LogERR("Unable to initialize PhysicsFS !");
                        return;
                }
***************
*** 72,76 ****
  
  void PG_FileArchive::Deinit() {
!       //PHYSFS_deinit();
  }
  
--- 75,79 ----
  
  void PG_FileArchive::Deinit() {
!       PHYSFS_deinit();
  }
  
***************
*** 84,88 ****
--- 87,95 ----
                return newpath;
  
+ #ifdef __MACOS__
+       while( (pos = newpath->find(":", pos)) != std::string::npos) {
+ #else
        while( (pos = newpath->find("/", pos)) != std::string::npos) {
+ #endif
                newpath->replace(pos, 1, sep);
                pos += incr;
***************
*** 114,117 ****
--- 121,141 ----
  }
  
+ PG_FileList PG_FileArchive::EnumerateFiles(const char *dir, const char* 
wildcard) {
+       PG_FileList list = EnumerateFiles(dir);
+       PG_FileList result;
+       
+       if( list.size() == 0 ) {
+               return result;
+       }
+ 
+       for( PG_FileList::iterator i = list.begin(); i != list.end(); i++) {
+               if(fnmatch(wildcard, (*i).c_str(), FNM_PATHNAME) == 0) {
+                       result.push_back(std::string(*i));
+               }
+       }
+       
+       return result;
+ }
+ 
  bool PG_FileArchive::Exists(const char *filename) {
        return PHYSFS_exists(filename);
***************
*** 166,169 ****
--- 190,215 ----
  }
  
+ SDL_RWops* PG_FileArchive::OpenFileRWops(const char* filename, PG_OPEN_MODE 
mode) {
+   fprintf(stderr, "%s:%s:%i %s\n", __FILE__, __FUNCTION__, __LINE__, 
filename);
+       SDL_RWops* file = NULL;
+       switch(mode) {
+       case PG_OPEN_READ:
+   fprintf(stderr, "%s:%s:%i %s\n", __FILE__, __FUNCTION__, __LINE__, 
filename);
+               file = PHYSFSRWOPS_openRead(filename);
+               break;
+       case PG_OPEN_WRITE:
+   fprintf(stderr, "%s:%s:%i %s\n", __FILE__, __FUNCTION__, __LINE__, 
filename);
+               file = PHYSFSRWOPS_openWrite(filename);
+               break;
+       case PG_OPEN_APPEND:
+   fprintf(stderr, "%s:%s:%i %s\n", __FILE__, __FUNCTION__, __LINE__, 
filename);
+               file = PHYSFSRWOPS_openAppend(filename);
+               break;
+       }
+       
+   fprintf(stderr, "%s:%s:%i %s\n", __FILE__, __FUNCTION__, __LINE__, 
filename);
+       return file;
+ }
+ 
  bool PG_FileArchive::MakeDir(const char* dir) {
        return PHYSFS_mkdir(dir) == 1;
***************
*** 192,195 ****
--- 238,242 ----
  
  PG_DataContainer* PG_FileArchive::ReadFile(const char* filename) {
+       fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        PG_File *file = OpenFile(filename);
  
***************
*** 220,229 ****
--- 267,279 ----
  PG_Draw::PG_DrawableSurface* PG_FileArchive::LoadSurface(const char* 
filename, bool convert) {
        PG_Draw::PG_Draw* draw = PG_Draw::PG_Draw::GetDefaultDrawable();
+       fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        if(filename == NULL) {
                return NULL;
        }
+       fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
  
        std::string fn = filename;
  
+       fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        if(fn == "none") {
                return NULL;
***************
*** 231,247 ****
  
        // take a look into the cache
        PG_Draw::PG_DrawableSurface* surface = my_cache.FindSurface(fn);
  
        // return the cache surface if it has been found
        if(surface != NULL) {
                my_cache.IncRef(fn);
                return surface;
        }
! 
        surface = NULL;
!       SDL_RWops *rw = PHYSFSRWOPS_openRead(filename);
        
        {
                SDL_Surface* t;
  #ifdef HAVE_SDLIMAGE
                t = IMG_Load_RW(rw, 1);
--- 281,310 ----
  
        // take a look into the cache
+       fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        PG_Draw::PG_DrawableSurface* surface = my_cache.FindSurface(fn);
+       fprintf(stderr, "%s:%s:%i %p\n", __FILE__, __FUNCTION__, __LINE__, 
surface);
  
        // return the cache surface if it has been found
        if(surface != NULL) {
+               fprintf(stderr, "%s:%s:%i %p\n", __FILE__, __FUNCTION__, 
__LINE__, surface);
                my_cache.IncRef(fn);
+               fprintf(stderr, "%s:%s:%i %p\n", __FILE__, __FUNCTION__, 
__LINE__, surface);
                return surface;
        }
!       fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
!       
        surface = NULL;
!       fprintf(stderr, "%s:%s:%i %s\n", __FILE__, __FUNCTION__, __LINE__, 
filename);
!       SDL_RWops *rw = OpenFileRWops(filename);
! 
!       if(rw == NULL) {
!               PG_LogWRN("Unable to open '%s' !", filename);
!               return NULL;
!       }
!       fprintf(stderr, "%s:%s:%i %p\n", __FILE__, __FUNCTION__, __LINE__, rw);
        
        {
                SDL_Surface* t;
+   fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
  #ifdef HAVE_SDLIMAGE
                t = IMG_Load_RW(rw, 1);
***************
*** 249,254 ****
--- 312,330 ----
                t = SDL_LoadBMP_RW(rw, 1);
  #endif
+               fprintf(stderr, "%s:%s:%i %p\n", __FILE__, __FUNCTION__, 
__LINE__, t);
                surface = new PG_Draw::PG_DrawableSurface(t);
+ 
+               if(surface == NULL) {
+                       PG_LogWRN("Failed to load imagedata from '%s' !", 
filename);
+                       return NULL;
+               }
+ 
+               if(surface == NULL) {
+                       PG_LogERR("Unable to load imagedata from '%s'", 
filename);
+                       PG_LogERR("PhysFS reported: '%s'", 
PG_FileArchive::GetLastError());
+                       PG_LogERR("SDL reported: '%s'", SDL_GetError());
+               }
        };
+       fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        
        if(convert) {
***************
*** 260,263 ****
--- 336,340 ----
                }
        }
+       fprintf(stderr, "%s:%s:%i %p\n", __FILE__, __FUNCTION__, __LINE__, 
surface);
  
        // add the loaded surface to the cache
***************
*** 291,294 ****
--- 368,396 ----
  char** PG_FileArchive::GetSearchPath() {
        return PHYSFS_getSearchPath();
+ }
+ 
+ PG_FileList PG_FileArchive::GetSearchPathList() {
+       char **tempList = PHYSFS_getSearchPath();
+       
+       if( tempList == NULL ) {
+               return NULL;
+       }
+       
+       PG_FileList retVal;
+       
+       // Scan through to get the length of the listing to get the proper 
vector size.
+       Uint32 size = 0;
+       for(; tempList[ size ] != NULL; ++size) {}
+       
+       // Now we're ready to initialize everything.
+       retVal.reserve( size );
+       for( Uint32 i = 0; i < size; ++i ) {
+               retVal.push_back(std::string(tempList[ i ]));
+       }
+       
+       // Clean up.
+       PHYSFS_freeList(tempList);
+       
+       return retVal;
  }
  

Index: pgfilelist.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/core/pgfilelist.cpp,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C2 -r1.1 -r1.1.2.1
*** pgfilelist.cpp      29 Apr 2002 11:44:22 -0000      1.1
--- pgfilelist.cpp      31 Aug 2002 04:01:23 -0000      1.1.2.1
***************
*** 1,4 ****
--- 1,7 ----
  #include "pgfilelist.h"
  
+ PG_FileList::PG_FileList() {
+ }
+ 
  PG_FileList::PG_FileList(char** list) {
        while(*list) {

Index: pglog.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/core/pglog.cpp,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C2 -r1.1 -r1.1.2.1
*** pglog.cpp   15 Apr 2002 14:53:56 -0000      1.1
--- pglog.cpp   31 Aug 2002 04:01:23 -0000      1.1.2.1
***************
*** 27,30 ****
--- 27,35 ----
  */
  
+ #include "pgapplication.h"
+ #include "pgwindow.h"
+ #include "pgrichedit.h"
+ #include "pglog.h"
+ 
  #include <iostream>
  #include <string>
***************
*** 34,45 ****
  #include <ctime>
  
- #include "pgapplication.h"
- #include "pgwindow.h"
- #include "pgrichedit.h"
- #include "pglog.h"
- 
  Uint32 PG_LogMaxMessages = 200;
  int PG_LogMethod = PG_LOGMTH_STDOUT;
  static PG_LOG_LEVEL PG_LogLevel = PG_LOG_DBG;
  
  struct PG_LogMessage_t {
--- 39,46 ----
  #include <ctime>
  
  Uint32 PG_LogMaxMessages = 200;
  int PG_LogMethod = PG_LOGMTH_STDOUT;
  static PG_LOG_LEVEL PG_LogLevel = PG_LOG_DBG;
+ static SDLKey PG_LogConsoleKey = SDLK_F12;
  
  struct PG_LogMessage_t {
***************
*** 244,247 ****
--- 245,256 ----
  int PG_LogConsole::GetMethod() {
        return PG_LogMethod;
+ }
+ 
+ void PG_LogConsole::SetConsoleKey(SDLKey key) {
+       PG_LogConsoleKey = key;
+ }
+ 
+ SDLKey PG_LogConsole::GetConsoleKey() {
+       return PG_LogConsoleKey;
  }
  

Index: pgmain.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/core/pgmain.cpp,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C2 -r1.1 -r1.1.2.1
*** pgmain.cpp  15 Apr 2002 14:53:56 -0000      1.1
--- pgmain.cpp  31 Aug 2002 04:01:23 -0000      1.1.2.1
***************
*** 29,36 ****
  #define _GNU_SOURCE
  #endif
- #include <cstdlib>
  
  #include "pgapplication.h"
  #include "pglog.h"
  
  int PG_main(int argc, char **argv, PG_Application *app)
--- 29,37 ----
  #define _GNU_SOURCE
  #endif
  
  #include "pgapplication.h"
  #include "pglog.h"
+ 
+ #include <cstdlib>
  
  int PG_main(int argc, char **argv, PG_Application *app)

Index: pgmessageobject.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/core/pgmessageobject.cpp,v
retrieving revision 1.8
retrieving revision 1.8.2.1
diff -C2 -r1.8 -r1.8.2.1
*** pgmessageobject.cpp 6 May 2002 11:18:03 -0000       1.8
--- pgmessageobject.cpp 31 Aug 2002 04:01:23 -0000      1.8.2.1
***************
*** 31,34 ****
--- 31,37 ----
  #include "pgapplication.h"
  
+ #include <iostream>
+ #include <algorithm>
+ 
  // static variables for message processing
  PG_MessageObject* PG_MessageObject::captureObject = NULL;
***************
*** 71,75 ****
  bool PG_MessageObject::ProcessEvent(const SDL_Event* event) {
        SDL_Event e;
!       
        // check if we are able to process messages
        if(!my_canReceiveMessages) {
--- 74,78 ----
  bool PG_MessageObject::ProcessEvent(const SDL_Event* event) {
        SDL_Event e;
! 
        // check if we are able to process messages
        if(!my_canReceiveMessages) {

Index: pgnavigator.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/core/pgnavigator.cpp,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -r1.2 -r1.2.2.1
*** pgnavigator.cpp     16 Apr 2002 07:43:30 -0000      1.2
--- pgnavigator.cpp     31 Aug 2002 04:01:23 -0000      1.2.2.1
***************
*** 27,34 ****
  */
  
  #include <algorithm>
  #include <cmath>
- 
- #include "pgnavigator.h"
  
  PG_Widget* PG_Navigator::my_currentWidget = NULL;
--- 27,34 ----
  */
  
+ #include "pgnavigator.h"
+ 
  #include <algorithm>
  #include <cmath>
  
  PG_Widget* PG_Navigator::my_currentWidget = NULL;

Index: pgrectlist.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/core/pgrectlist.cpp,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -C2 -r1.2.2.1 -r1.2.2.2
*** pgrectlist.cpp      18 Jun 2002 22:40:38 -0000      1.2.2.1
--- pgrectlist.cpp      31 Aug 2002 04:01:23 -0000      1.2.2.2
***************
*** 55,59 ****
                testwidget = (*this)[i];
  
!               if(!testwidget->IsVisible()) {
                        continue;
                }
--- 55,59 ----
                testwidget = (*this)[i];
  
!               if(!testwidget->IsVisible() || testwidget->IsHidden()) {
                        continue;
                }
***************
*** 79,83 ****
  
                // check if the tested rect is visible
!               if(!testrect->IsVisible()) {
                        continue;
                }
--- 79,83 ----
  
                // check if the tested rect is visible
!               if(!testrect->IsVisible() || testrect->IsHidden()) {
                        continue;
                }

Index: pgsurfacecache.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/core/pgsurfacecache.cpp,v
retrieving revision 1.2.2.3
retrieving revision 1.2.2.4
diff -C2 -r1.2.2.3 -r1.2.2.4
*** pgsurfacecache.cpp  26 Jun 2002 16:24:57 -0000      1.2.2.3
--- pgsurfacecache.cpp  31 Aug 2002 04:01:23 -0000      1.2.2.4
***************
*** 2,23 ****
      ParaGUI - crossplatform widgetset
      Copyright (C) 2000,2001,2002  Alexander Pipelka
!  
      This library is free software; you can redistribute it and/or
      modify it under the terms of the GNU Library General Public
      License as published by the Free Software Foundation; either
      version 2 of the License, or (at your option) any later version.
!  
      This library is distributed in the hope that it will be useful,
      but WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      Library General Public License for more details.
!  
      You should have received a copy of the GNU Library General Public
      License along with this library; if not, write to the Free
      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
!  
      Alexander Pipelka
      address@hidden
!  
      Last Update:      $Author$
      Update Date:      $Date$
--- 2,23 ----
      ParaGUI - crossplatform widgetset
      Copyright (C) 2000,2001,2002  Alexander Pipelka
! 
      This library is free software; you can redistribute it and/or
      modify it under the terms of the GNU Library General Public
      License as published by the Free Software Foundation; either
      version 2 of the License, or (at your option) any later version.
! 
      This library is distributed in the hope that it will be useful,
      but WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      Library General Public License for more details.
! 
      You should have received a copy of the GNU Library General Public
      License along with this library; if not, write to the Free
      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
! 
      Alexander Pipelka
      address@hidden
! 
      Last Update:      $Author$
      Update Date:      $Date$
***************
*** 31,34 ****
--- 31,35 ----
  #include "pglog.h"
  #include "pgdraw.h"
+ 
  #include <iostream>
  #include <cstring>
***************
*** 75,78 ****
--- 76,80 ----
  
  PG_SurfaceCache::PG_SurfaceCache() {
+   fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        my_surfacemap = (void*)new(pg_surfacemap_t);
        my_surfacemap_index = (void*)new(pg_surfacemap_index_t);
***************
*** 117,120 ****
--- 119,123 ----
        int i=0;
  
+   fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        assert(w != 0 && h != 0);
        
***************
*** 132,136 ****
                                gradient->colors[i].b
                                );
!                               
                        strcat(tmpkey, colorkey);
                }
--- 135,139 ----
                                gradient->colors[i].b
                                );
! 
                        strcat(tmpkey, colorkey);
                }
***************
*** 180,187 ****
--- 183,192 ----
        pg_surface_cache_t* t = (*MY_SURFACEMAP)[key];
  
+   fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        if(t == NULL) {
                return NULL;
        }
  
+   fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        return t->surface;
  }
***************
*** 194,197 ****
--- 199,203 ----
        }
  
+   fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        t = FindByKey(key);
        if(t != NULL) {
***************
*** 221,224 ****
--- 227,231 ----
                return;
        }
+       //  fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
  
        pg_surface_cache_t* t = FindBySurface(surface);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]