From eross@disc.ucn.cl Sat Aug 17 17:39:14 2002 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17gBHu-0004lL-00 for paragui-cvs@mail.freesoftware.fsf.org; Sat, 17 Aug 2002 17:39:14 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17gBHn-0004jp-00 for paragui-cvs@mail.freesoftware.fsf.org; Sat, 17 Aug 2002 17:39:13 -0400 Received: from subversions.gnu.org ([199.232.41.2]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17gBHm-0004jk-00 for paragui-cvs@mail.freesoftware.fsf.org; Sat, 17 Aug 2002 17:39:06 -0400 Received: from eross by subversions.gnu.org with local (Exim 3.35 #1 (Debian)) id 17gBHm-0005bq-00; Sat, 17 Aug 2002 17:39:06 -0400 To: paragui-cvs@mail.freesoftware.fsf.org Message-Id: From: "Eric Ross " Date: Sat, 17 Aug 2002 17:39:06 -0400 Subject: [paragui-cvs] CVS: paragui/include pgfilearchive.h,1.3.6.3,1.3.6.4 Sender: paragui-cvs-admin@mail.freesoftware.fsf.org Errors-To: paragui-cvs-admin@mail.freesoftware.fsf.org X-BeenThere: paragui-cvs@mail.freesoftware.fsf.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: paragui-cvs@mail.freesoftware.fsf.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Update of /cvsroot/paragui/paragui/include In directory subversions:/tmp/cvs-serv21558 Modified Files: Tag: devel-1-0 pgfilearchive.h Log Message: Fixed little error in the coments for LoadSurface (convert defaults to false) Index: pgfilearchive.h =================================================================== RCS file: /cvsroot/paragui/paragui/include/pgfilearchive.h,v retrieving revision 1.3.6.3 retrieving revision 1.3.6.4 diff -C2 -r1.3.6.3 -r1.3.6.4 *** pgfilearchive.h 7 Jun 2002 07:29:30 -0000 1.3.6.3 --- pgfilearchive.h 17 Aug 2002 21:39:04 -0000 1.3.6.4 *************** *** 256,260 **** all loaded surface will be cached @param filename imagefile to load ! @param convert convert the loaded surface into screen format (default = true) @return pointer to loaded SDL_Surface or NULL */ --- 256,260 ---- all loaded surface will be cached @param filename imagefile to load ! @param convert convert the loaded surface into screen format (default = false) @return pointer to loaded SDL_Surface or NULL */ From eross@disc.ucn.cl Sat Aug 17 17:53:22 2002 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17gBVa-0006eT-00 for paragui-cvs@mail.freesoftware.fsf.org; Sat, 17 Aug 2002 17:53:22 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17gBVR-0006e4-00 for paragui-cvs@mail.freesoftware.fsf.org; Sat, 17 Aug 2002 17:53:21 -0400 Received: from subversions.gnu.org ([199.232.41.2]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17gBVR-0006dy-00 for paragui-cvs@mail.freesoftware.fsf.org; Sat, 17 Aug 2002 17:53:13 -0400 Received: from eross by subversions.gnu.org with local (Exim 3.35 #1 (Debian)) id 17gBVR-0005my-00; Sat, 17 Aug 2002 17:53:13 -0400 To: paragui-cvs@mail.freesoftware.fsf.org Message-Id: From: "Eric Ross " Date: Sat, 17 Aug 2002 17:53:13 -0400 Subject: [paragui-cvs] CVS: paragui/src/core pgfilearchive.cpp,1.2.4.8,1.2.4.9 Sender: paragui-cvs-admin@mail.freesoftware.fsf.org Errors-To: paragui-cvs-admin@mail.freesoftware.fsf.org X-BeenThere: paragui-cvs@mail.freesoftware.fsf.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: paragui-cvs@mail.freesoftware.fsf.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Update of /cvsroot/paragui/paragui/src/core In directory subversions:/tmp/cvs-serv22247 Modified Files: Tag: devel-1-0 pgfilearchive.cpp Log Message: Change SDL_DisplayFormat to SDL_DisplayFormatAlpha to avoid destroying the alfa channel when converting the surface to display format (Guillaume Schmid) Index: pgfilearchive.cpp =================================================================== RCS file: /cvsroot/paragui/paragui/src/core/pgfilearchive.cpp,v retrieving revision 1.2.4.8 retrieving revision 1.2.4.9 diff -C2 -r1.2.4.8 -r1.2.4.9 *** pgfilearchive.cpp 30 Jul 2002 20:50:26 -0000 1.2.4.8 --- pgfilearchive.cpp 17 Aug 2002 21:53:11 -0000 1.2.4.9 *************** *** 39,42 **** --- 39,44 ---- #include "physfsrwops.h" + extern "C" { int fnmatch(const char *pattern, const char *string, int flags);} + Uint32 PG_FileArchive::my_instance_count = 0; PG_SurfaceCache PG_FileArchive::my_cache; *************** *** 302,306 **** if(convert && !PG_Application::GetGLMode()) { ! SDL_Surface* tmpsrf = SDL_DisplayFormat(surface); if(tmpsrf) { SDL_FreeSurface(surface); --- 304,308 ---- if(convert && !PG_Application::GetGLMode()) { ! SDL_Surface* tmpsrf = SDL_DisplayFormatAlpha(surface); if(tmpsrf) { SDL_FreeSurface(surface); From eross@disc.ucn.cl Sat Aug 17 21:14:17 2002 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17gEe0-00059P-00 for paragui-cvs@mail.freesoftware.fsf.org; Sat, 17 Aug 2002 21:14:16 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17gEdt-000591-00 for paragui-cvs@mail.freesoftware.fsf.org; Sat, 17 Aug 2002 21:14:16 -0400 Received: from subversions.gnu.org ([199.232.41.2]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17gEdt-00058w-00 for paragui-cvs@mail.freesoftware.fsf.org; Sat, 17 Aug 2002 21:14:09 -0400 Received: from eross by subversions.gnu.org with local (Exim 3.35 #1 (Debian)) id 17gEdt-0004Ha-00; Sat, 17 Aug 2002 21:14:09 -0400 To: paragui-cvs@mail.freesoftware.fsf.org Message-Id: From: "Eric Ross " Date: Sat, 17 Aug 2002 21:14:09 -0400 Subject: [paragui-cvs] CVS: paragui/include pgfilearchive.h,1.5,1.6 Sender: paragui-cvs-admin@mail.freesoftware.fsf.org Errors-To: paragui-cvs-admin@mail.freesoftware.fsf.org X-BeenThere: paragui-cvs@mail.freesoftware.fsf.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: paragui-cvs@mail.freesoftware.fsf.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Update of /cvsroot/paragui/paragui/include In directory subversions:/tmp/cvs-serv16459 Modified Files: pgfilearchive.h Log Message: Fixed little error in the coments for LoadSurface (convert defaults to false) Index: pgfilearchive.h =================================================================== RCS file: /cvsroot/paragui/paragui/include/pgfilearchive.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** pgfilearchive.h 29 Apr 2002 11:44:21 -0000 1.5 --- pgfilearchive.h 18 Aug 2002 01:14:07 -0000 1.6 *************** *** 234,238 **** all loaded surface will be cached @param filename imagefile to load ! @param convert convert the loaded surface into screen format (default = true) @return pointer to loaded SDL_Surface or NULL */ --- 234,238 ---- all loaded surface will be cached @param filename imagefile to load ! @param convert convert the loaded surface into screen format (default = false) @return pointer to loaded SDL_Surface or NULL */ From eross@disc.ucn.cl Sat Aug 17 21:14:51 2002 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17gEeZ-0005AD-00 for paragui-cvs@mail.freesoftware.fsf.org; Sat, 17 Aug 2002 21:14:51 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17gEeS-00059z-00 for paragui-cvs@mail.freesoftware.fsf.org; Sat, 17 Aug 2002 21:14:50 -0400 Received: from subversions.gnu.org ([199.232.41.2]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17gEeS-00059q-00 for paragui-cvs@mail.freesoftware.fsf.org; Sat, 17 Aug 2002 21:14:44 -0400 Received: from eross by subversions.gnu.org with local (Exim 3.35 #1 (Debian)) id 17gEeR-0004Hu-00; Sat, 17 Aug 2002 21:14:43 -0400 To: paragui-cvs@mail.freesoftware.fsf.org Message-Id: From: "Eric Ross " Date: Sat, 17 Aug 2002 21:14:43 -0400 Subject: [paragui-cvs] CVS: paragui/src/core pgfilearchive.cpp,1.4,1.5 Sender: paragui-cvs-admin@mail.freesoftware.fsf.org Errors-To: paragui-cvs-admin@mail.freesoftware.fsf.org X-BeenThere: paragui-cvs@mail.freesoftware.fsf.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: paragui-cvs@mail.freesoftware.fsf.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Update of /cvsroot/paragui/paragui/src/core In directory subversions:/tmp/cvs-serv16474 Modified Files: pgfilearchive.cpp Log Message: Change SDL_DisplayFormat to SDL_DisplayFormatAlpha to avoid destroying the alfa channel when converting the surface to display format (Guillaume Schmid) Index: pgfilearchive.cpp =================================================================== RCS file: /cvsroot/paragui/paragui/src/core/pgfilearchive.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** pgfilearchive.cpp 29 Apr 2002 11:44:22 -0000 1.4 --- pgfilearchive.cpp 18 Aug 2002 01:14:41 -0000 1.5 *************** *** 247,251 **** if(convert) { ! SDL_Surface* tmpsrf = SDL_DisplayFormat(surface); if(tmpsrf) { SDL_FreeSurface(surface); --- 247,251 ---- if(convert) { ! SDL_Surface* tmpsrf = SDL_DisplayFormatAlpha(surface); if(tmpsrf) { SDL_FreeSurface(surface); From eross@disc.ucn.cl Sat Aug 17 21:16:13 2002 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17gEft-0005D2-00 for paragui-cvs@mail.freesoftware.fsf.org; Sat, 17 Aug 2002 21:16:13 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17gEfm-0005CZ-00 for paragui-cvs@mail.freesoftware.fsf.org; Sat, 17 Aug 2002 21:16:12 -0400 Received: from subversions.gnu.org ([199.232.41.2]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17gEfm-0005CU-00 for paragui-cvs@mail.freesoftware.fsf.org; Sat, 17 Aug 2002 21:16:06 -0400 Received: from eross by subversions.gnu.org with local (Exim 3.35 #1 (Debian)) id 17gEfm-0004Ji-00; Sat, 17 Aug 2002 21:16:06 -0400 To: paragui-cvs@mail.freesoftware.fsf.org Message-Id: From: "Eric Ross " Date: Sat, 17 Aug 2002 21:16:06 -0400 Subject: [paragui-cvs] CVS: paragui/src/core pgfilearchive.cpp,1.2.4.9,1.2.4.10 Sender: paragui-cvs-admin@mail.freesoftware.fsf.org Errors-To: paragui-cvs-admin@mail.freesoftware.fsf.org X-BeenThere: paragui-cvs@mail.freesoftware.fsf.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: paragui-cvs@mail.freesoftware.fsf.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Update of /cvsroot/paragui/paragui/src/core In directory subversions:/tmp/cvs-serv16587 Modified Files: Tag: devel-1-0 pgfilearchive.cpp Log Message: Sorry.. i forgot to delete a line i use here. Index: pgfilearchive.cpp =================================================================== RCS file: /cvsroot/paragui/paragui/src/core/pgfilearchive.cpp,v retrieving revision 1.2.4.9 retrieving revision 1.2.4.10 diff -C2 -r1.2.4.9 -r1.2.4.10 *** pgfilearchive.cpp 17 Aug 2002 21:53:11 -0000 1.2.4.9 --- pgfilearchive.cpp 18 Aug 2002 01:16:04 -0000 1.2.4.10 *************** *** 39,44 **** #include "physfsrwops.h" - extern "C" { int fnmatch(const char *pattern, const char *string, int flags);} - Uint32 PG_FileArchive::my_instance_count = 0; PG_SurfaceCache PG_FileArchive::my_cache; --- 39,42 ---- From pipelka@teleweb.at Sun Aug 18 04:13:07 2002 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17gLBK-0002Vd-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:13:06 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17gLB8-0002Rm-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:13:01 -0400 Received: from subversions.gnu.org ([199.232.41.2]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17gLB8-0002Rc-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:12:54 -0400 Received: from braindead by subversions.gnu.org with local (Exim 3.35 #1 (Debian)) id 17gLB7-0003H7-00; Sun, 18 Aug 2002 04:12:53 -0400 To: paragui-cvs@mail.freesoftware.fsf.org Message-Id: From: "Alexander Pipelka " Date: Sun, 18 Aug 2002 04:12:53 -0400 Subject: [paragui-cvs] CVS: paragui/VisualC/paragui_static paragui_static.dsp,1.1.1.1,NONE paragui_static.mak,1.1.1.1,NONE Sender: paragui-cvs-admin@mail.freesoftware.fsf.org Errors-To: paragui-cvs-admin@mail.freesoftware.fsf.org X-BeenThere: paragui-cvs@mail.freesoftware.fsf.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: paragui-cvs@mail.freesoftware.fsf.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Update of /cvsroot/paragui/paragui/VisualC/paragui_static In directory subversions:/tmp/cvs-serv12482/VisualC/paragui_static Removed Files: paragui_static.dsp paragui_static.mak Log Message: synced with the devel-1-0-x tree. --- paragui_static.dsp DELETED --- --- paragui_static.mak DELETED --- From pipelka@teleweb.at Sun Aug 18 04:13:09 2002 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17gLBM-0002Vy-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:13:08 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17gLB8-0002Ry-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:13:01 -0400 Received: from subversions.gnu.org ([199.232.41.2]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17gLB8-0002Rr-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:12:54 -0400 Received: from braindead by subversions.gnu.org with local (Exim 3.35 #1 (Debian)) id 17gLB8-0003Hm-00; Sun, 18 Aug 2002 04:12:54 -0400 To: paragui-cvs@mail.freesoftware.fsf.org Message-Id: From: "Alexander Pipelka " Date: Sun, 18 Aug 2002 04:12:54 -0400 Subject: [paragui-cvs] CVS: paragui/lib .cvsignore,1.1,1.2 Sender: paragui-cvs-admin@mail.freesoftware.fsf.org Errors-To: paragui-cvs-admin@mail.freesoftware.fsf.org X-BeenThere: paragui-cvs@mail.freesoftware.fsf.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: paragui-cvs@mail.freesoftware.fsf.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Update of /cvsroot/paragui/paragui/lib In directory subversions:/tmp/cvs-serv12482/lib Added Files: .cvsignore Log Message: synced with the devel-1-0-x tree. From pipelka@teleweb.at Sun Aug 18 04:13:10 2002 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17gLBM-0002Vz-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:13:08 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17gLB9-0002S8-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:13:03 -0400 Received: from subversions.gnu.org ([199.232.41.2]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17gLB8-0002Rt-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:12:54 -0400 Received: from braindead by subversions.gnu.org with local (Exim 3.35 #1 (Debian)) id 17gLB8-0003Ht-00; Sun, 18 Aug 2002 04:12:54 -0400 To: paragui-cvs@mail.freesoftware.fsf.org Message-Id: From: "Alexander Pipelka " Date: Sun, 18 Aug 2002 04:12:54 -0400 Subject: [paragui-cvs] CVS: paragui/mlz build,1.2,1.3 Sender: paragui-cvs-admin@mail.freesoftware.fsf.org Errors-To: paragui-cvs-admin@mail.freesoftware.fsf.org X-BeenThere: paragui-cvs@mail.freesoftware.fsf.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: paragui-cvs@mail.freesoftware.fsf.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Update of /cvsroot/paragui/paragui/mlz In directory subversions:/tmp/cvs-serv12482/mlz Modified Files: build Log Message: synced with the devel-1-0-x tree. Index: build =================================================================== RCS file: /cvsroot/paragui/paragui/mlz/build,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** build 15 Apr 2002 13:31:30 -0000 1.2 --- build 18 Aug 2002 08:12:52 -0000 1.3 *************** *** 11,15 **** ! CONFIGOPTIONS="--prefix=$TOOLS --libdir=$TOOLS/lib --with-sdl-prefix=$TOOLS --with-themedir=/usr/share/paragui --disable-sdltest --disable-static --disable-rtti --target=$TARGETARCH" COMPILEOPTIONS= --- 11,15 ---- ! CONFIGOPTIONS="--prefix=$TOOLS --libdir=$TOOLS/lib --enable-internalphysfs --with-sdl-prefix=$TOOLS --with-themedir=/usr/share/paragui --disable-sdltest --disable-static --disable-rtti --target=$TARGETARCH" COMPILEOPTIONS= From pipelka@teleweb.at Sun Aug 18 04:13:11 2002 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17gLBO-0002WP-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:13:10 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17gLB9-0002SH-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:13:04 -0400 Received: from subversions.gnu.org ([199.232.41.2]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17gLB8-0002S3-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:12:55 -0400 Received: from braindead by subversions.gnu.org with local (Exim 3.35 #1 (Debian)) id 17gLB8-0003I2-00; Sun, 18 Aug 2002 04:12:54 -0400 To: paragui-cvs@mail.freesoftware.fsf.org Message-Id: From: "Alexander Pipelka " Date: Sun, 18 Aug 2002 04:12:54 -0400 Subject: [paragui-cvs] CVS: paragui/src paragui.cpp,1.3,1.4 Sender: paragui-cvs-admin@mail.freesoftware.fsf.org Errors-To: paragui-cvs-admin@mail.freesoftware.fsf.org X-BeenThere: paragui-cvs@mail.freesoftware.fsf.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: paragui-cvs@mail.freesoftware.fsf.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Update of /cvsroot/paragui/paragui/src In directory subversions:/tmp/cvs-serv12482/src Modified Files: paragui.cpp Log Message: synced with the devel-1-0-x tree. Index: paragui.cpp =================================================================== RCS file: /cvsroot/paragui/paragui/src/paragui.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** paragui.cpp 15 Apr 2002 13:35:35 -0000 1.3 --- paragui.cpp 18 Aug 2002 08:12:52 -0000 1.4 *************** *** 29,37 **** #include "pginfo.h" #include "paragui.h" - #ifdef WIN32 - #include "paraconfig_win32.h" - #else - #include "paraconfig_gnu.h" - #endif #include "pglog.h" --- 29,32 ---- From pipelka@teleweb.at Sun Aug 18 04:13:11 2002 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17gLBO-0002WR-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:13:10 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17gLBA-0002Sx-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:13:04 -0400 Received: from subversions.gnu.org ([199.232.41.2]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17gLB9-0002SP-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:12:55 -0400 Received: from braindead by subversions.gnu.org with local (Exim 3.35 #1 (Debian)) id 17gLB8-0003Ii-00; Sun, 18 Aug 2002 04:12:54 -0400 To: paragui-cvs@mail.freesoftware.fsf.org Message-Id: From: "Alexander Pipelka " Date: Sun, 18 Aug 2002 04:12:54 -0400 Subject: [paragui-cvs] CVS: paragui/src/expat expat.h,1.1,1.2 Sender: paragui-cvs-admin@mail.freesoftware.fsf.org Errors-To: paragui-cvs-admin@mail.freesoftware.fsf.org X-BeenThere: paragui-cvs@mail.freesoftware.fsf.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: paragui-cvs@mail.freesoftware.fsf.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Update of /cvsroot/paragui/paragui/src/expat In directory subversions:/tmp/cvs-serv12482/src/expat Modified Files: expat.h Log Message: synced with the devel-1-0-x tree. Index: expat.h =================================================================== RCS file: /cvsroot/paragui/paragui/src/expat/expat.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** expat.h 15 Apr 2002 14:53:56 -0000 1.1 --- expat.h 18 Aug 2002 08:12:52 -0000 1.2 *************** *** 9,19 **** #include ! #ifndef XMLPARSEAPI ! # if defined(__declspec) && !defined(__BEOS__) ! # define XMLPARSEAPI(type) __declspec(dllimport) type __cdecl ! # else ! # define XMLPARSEAPI(type) type ! # endif ! #endif /* not defined XMLPARSEAPI */ #ifdef __cplusplus --- 9,23 ---- #include ! // This block messes up with Win32 & mingw -- Alex ! ! //#ifndef XMLPARSEAPI ! //# if defined(__declspec) && !defined(__BEOS__) ! //# define XMLPARSEAPI(type) __declspec(dllimport) type __cdecl ! //# else ! //# define XMLPARSEAPI(type) type ! //# endif ! //#endif /* not defined XMLPARSEAPI */ ! ! #define XMLPARSEAPI(type) type #ifdef __cplusplus From pipelka@teleweb.at Sun Aug 18 04:13:11 2002 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17gLBO-0002WO-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:13:10 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17gLB9-0002Sl-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:13:04 -0400 Received: from subversions.gnu.org ([199.232.41.2]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17gLB9-0002SR-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:12:55 -0400 Received: from braindead by subversions.gnu.org with local (Exim 3.35 #1 (Debian)) id 17gLB9-0003In-00; Sun, 18 Aug 2002 04:12:55 -0400 To: paragui-cvs@mail.freesoftware.fsf.org Message-Id: From: "Alexander Pipelka " Date: Sun, 18 Aug 2002 04:12:55 -0400 Subject: [paragui-cvs] CVS: paragui/src/font facecache.h,1.1.1.1,1.2 pgfont.cpp,1.3,1.4 Sender: paragui-cvs-admin@mail.freesoftware.fsf.org Errors-To: paragui-cvs-admin@mail.freesoftware.fsf.org X-BeenThere: paragui-cvs@mail.freesoftware.fsf.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: paragui-cvs@mail.freesoftware.fsf.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Update of /cvsroot/paragui/paragui/src/font In directory subversions:/tmp/cvs-serv12482/src/font Modified Files: facecache.h pgfont.cpp Log Message: synced with the devel-1-0-x tree. Index: facecache.h =================================================================== RCS file: /cvsroot/paragui/paragui/src/font/facecache.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** facecache.h 15 Apr 2002 13:22:11 -0000 1.1.1.1 --- facecache.h 18 Aug 2002 08:12:52 -0000 1.2 *************** *** 1,2 **** --- 1,3 ---- + #include "paragui.h" #include "pgdatacontainer.h" *************** *** 30,34 **** }; ! typedef STL_MAP PG_GlyphCache; class PG_FontFaceCacheItem { --- 31,35 ---- }; ! typedef std::map PG_GlyphCache; class PG_FontFaceCacheItem { Index: pgfont.cpp =================================================================== RCS file: /cvsroot/paragui/paragui/src/font/pgfont.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** pgfont.cpp 15 Apr 2002 13:35:35 -0000 1.3 --- pgfont.cpp 18 Aug 2002 08:12:52 -0000 1.4 *************** *** 146,150 **** Uint32 src_pitch = Bitmap->pitch; register Uint8* src_pixels = Bitmap->buffer + x0 + y0*Bitmap->pitch; ! register Uint8* dst_pixels = (Uint8*)pixels + (PosX+x0)*bpp + (PosY+y0)*pitch; Uint8* line; --- 146,150 ---- Uint32 src_pitch = Bitmap->pitch; register Uint8* src_pixels = Bitmap->buffer + x0 + y0*Bitmap->pitch; ! register Uint8* dst_pixels = (Uint8*)pixels + (PosX+x0)*bpp + (PosY+y0)*pitch /*+ Surface->offset*/; Uint8* line; *************** *** 487,490 **** --- 487,494 ---- FT_Vector delta; + if(SDL_MUSTLOCK(Surface)) { + SDL_LockSurface(Surface); + } + //Go thu text and draw characters for (unsigned char *c = (unsigned char*) Text;*c != 0; c++) { *************** *** 553,556 **** --- 557,564 ---- } + if(SDL_MUSTLOCK(Surface)) { + SDL_UnlockSurface(Surface); + } + return true; } From pipelka@teleweb.at Sun Aug 18 04:13:12 2002 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17gLBP-0002Wd-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:13:11 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17gLBA-0002Si-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:13:05 -0400 Received: from subversions.gnu.org ([199.232.41.2]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17gLB9-0002SN-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:12:55 -0400 Received: from braindead by subversions.gnu.org with local (Exim 3.35 #1 (Debian)) id 17gLB8-0003Iq-00; Sun, 18 Aug 2002 04:12:54 -0400 To: paragui-cvs@mail.freesoftware.fsf.org Message-Id: From: "Alexander Pipelka " Date: Sun, 18 Aug 2002 04:12:54 -0400 Subject: [paragui-cvs] CVS: paragui/src/layout layoutparsers.cpp,1.4,1.5 pgxmllayoutloader.cpp,1.5,1.6 Sender: paragui-cvs-admin@mail.freesoftware.fsf.org Errors-To: paragui-cvs-admin@mail.freesoftware.fsf.org X-BeenThere: paragui-cvs@mail.freesoftware.fsf.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: paragui-cvs@mail.freesoftware.fsf.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Update of /cvsroot/paragui/paragui/src/layout In directory subversions:/tmp/cvs-serv12482/src/layout Modified Files: layoutparsers.cpp pgxmllayoutloader.cpp Log Message: synced with the devel-1-0-x tree. Index: layoutparsers.cpp =================================================================== RCS file: /cvsroot/paragui/paragui/src/layout/layoutparsers.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** layoutparsers.cpp 28 Jun 2002 10:33:50 -0000 1.4 --- layoutparsers.cpp 18 Aug 2002 08:12:52 -0000 1.5 *************** *** 4,7 **** --- 4,9 ---- #include "pgbutton.h" #include "pglabel.h" + #include "pglistboxitem.h" + #include "pglog.h" *************** *** 9,19 **** --- 11,46 ---- PG_LogMSG("PG_XMLLayoutObject::ParseXMLAttributes()"); + int w, h; + SetText(xmltag.GetString("text").c_str()); PG_Rect pos = xmltag.GetRect("pos", GetParent()); + + w = xmltag.GetInt("width"); + h = xmltag.GetInt("height"); + + if(w > 0) { + pos.w = w; + } + + if(h > 0) { + pos.h = h; + } + MoveWidget(pos); + + int x = xmltag.GetInt("id"); + if(x > 0) { + SetID(x); + } + + x = xmltag.GetInt("fsize"); + if(x > 0) { + SetFontSize(x); + } } void PG_Label::ParseXMLAttributes(PG_XMLTag& xmltag) { + PG_LogMSG("PG_XMLLayoutObject::ParseXMLAttributes()"); PG_Widget::ParseXMLAttributes(xmltag); *************** *** 22,26 **** void PG_Button::ParseXMLAttributes(PG_XMLTag& xmltag) { - PG_Widget::ParseXMLAttributes(xmltag); PG_LogMSG("PG_XMLLayoutObject::ParseXMLAttributes()"); } --- 49,58 ---- void PG_Button::ParseXMLAttributes(PG_XMLTag& xmltag) { PG_LogMSG("PG_XMLLayoutObject::ParseXMLAttributes()"); + PG_Widget::ParseXMLAttributes(xmltag); + } + + void PG_ListBoxItem::ParseXMLAttributes(PG_XMLTag& xmltag) { + PG_LogMSG("PG_XMLLayoutObject::ParseXMLAttributes()"); + PG_ListBoxBaseItem::ParseXMLAttributes(xmltag); } Index: pgxmllayoutloader.cpp =================================================================== RCS file: /cvsroot/paragui/paragui/src/layout/pgxmllayoutloader.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** pgxmllayoutloader.cpp 28 Jun 2002 10:33:50 -0000 1.5 --- pgxmllayoutloader.cpp 18 Aug 2002 08:12:52 -0000 1.6 *************** *** 283,286 **** --- 283,287 ---- // fac-to-ry if(xmltag.section == BODY || xmltag.section == WIDGET) { + PG_LogDBG("createobject (parent = 0x%08x)", parser->parent); parser->currentwidget = PG_Factory::CreateObject(xmltag.name, parser->parent); From pipelka@teleweb.at Sun Aug 18 04:13:14 2002 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17gLBQ-0002Ww-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:13:12 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17gLBB-0002TS-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:13:06 -0400 Received: from subversions.gnu.org ([199.232.41.2]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17gLB9-0002SV-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:12:56 -0400 Received: from braindead by subversions.gnu.org with local (Exim 3.35 #1 (Debian)) id 17gLB9-0003Ix-00; Sun, 18 Aug 2002 04:12:55 -0400 To: paragui-cvs@mail.freesoftware.fsf.org Message-Id: From: "Alexander Pipelka " Date: Sun, 18 Aug 2002 04:12:55 -0400 Subject: [paragui-cvs] CVS: paragui/src/draw gradient.cpp,1.3,1.4 rotozoom.cpp,1.3,1.4 stretch.cpp,1.3,1.4 surface.cpp,1.3,1.4 Sender: paragui-cvs-admin@mail.freesoftware.fsf.org Errors-To: paragui-cvs-admin@mail.freesoftware.fsf.org X-BeenThere: paragui-cvs@mail.freesoftware.fsf.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: paragui-cvs@mail.freesoftware.fsf.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Update of /cvsroot/paragui/paragui/src/draw In directory subversions:/tmp/cvs-serv12482/src/draw Modified Files: gradient.cpp rotozoom.cpp stretch.cpp surface.cpp Log Message: synced with the devel-1-0-x tree. Index: gradient.cpp =================================================================== RCS file: /cvsroot/paragui/paragui/src/draw/gradient.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** gradient.cpp 15 Apr 2002 13:35:35 -0000 1.3 --- gradient.cpp 18 Aug 2002 08:12:52 -0000 1.4 *************** *** 29,36 **** */ #include #include - #include "pgdraw.h" SDL_Surface* PG_Draw::CreateGradient(const PG_Rect& r, PG_Gradient& gradient) { return CreateGradient( --- 29,37 ---- */ + #include "pgdraw.h" + #include #include SDL_Surface* PG_Draw::CreateGradient(const PG_Rect& r, PG_Gradient& gradient) { return CreateGradient( *************** *** 104,107 **** --- 105,112 ---- int oy = drawrect.y - rect.y; + if(SDL_MUSTLOCK(surface)) { + SDL_LockSurface(surface); + } + // color space vectors v00 = ((ur.r - ul.r) * 256) / w; *************** *** 164,168 **** for (register Sint32 y = 0; y < drawrect.h; y++) { ! if ( bpp == 1 ) pixel = SDL_MapRGB ( surface->format, r>>8, g>>8, b>>8 ); else --- 169,173 ---- for (register Sint32 y = 0; y < drawrect.h; y++) { ! /* if ( bpp == 1 ) pixel = SDL_MapRGB ( surface->format, r>>8, g>>8, b>>8 ); else *************** *** 171,186 **** | (b>>Bloss) << Bshift; //| Amask; /* Set the pixel */ switch (bpp) { case 1: *((Uint8 *) (bits)) = (Uint8) pixel; break; case 2: *((Uint16 *) (bits)) = (Uint16) pixel; break; ! case 3: { /* Format/endian independent */ Uint8 ri = (pixel >> surface->format->Rshift) & 0xFF; Uint8 gi = (pixel >> surface->format->Gshift) & 0xFF; --- 176,201 ---- | (b>>Bloss) << Bshift; //| Amask; + */ /* Set the pixel */ switch (bpp) { case 1: + pixel = SDL_MapRGB ( surface->format, r>>8, g>>8, b>>8 ); *((Uint8 *) (bits)) = (Uint8) pixel; break; case 2: + pixel = (r>>Rloss) << Rshift + | (g>>Gloss) << Gshift + | (b>>Bloss) << Bshift; + *((Uint16 *) (bits)) = (Uint16) pixel; break; ! case 3: { ! pixel = (r>>Rloss) << Rshift ! | (g>>Gloss) << Gshift ! | (b>>Bloss) << Bshift; ! Uint8 ri = (pixel >> surface->format->Rshift) & 0xFF; Uint8 gi = (pixel >> surface->format->Gshift) & 0xFF; *************** *** 193,196 **** --- 208,215 ---- case 4: + pixel = (r>>Rloss) << Rshift + | (g>>Gloss) << Gshift + | (b>>Bloss) << Bshift; + *((Uint32 *) (bits)) = (Uint32) pixel; break; *************** *** 215,217 **** --- 234,239 ---- } + if(SDL_MUSTLOCK(surface)) { + SDL_UnlockSurface(surface); + } } Index: rotozoom.cpp =================================================================== RCS file: /cvsroot/paragui/paragui/src/draw/rotozoom.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** rotozoom.cpp 15 Apr 2002 13:35:35 -0000 1.3 --- rotozoom.cpp 18 Aug 2002 08:12:52 -0000 1.4 *************** *** 29,38 **** */ #include #include #include - - #include "paragui.h" - #include "pgdraw.h" #define MAX(a,b) (((a) > (b)) ? (a) : (b)) --- 29,38 ---- */ + #include "paragui.h" + #include "pgdraw.h" + #include #include #include #define MAX(a,b) (((a) > (b)) ? (a) : (b)) Index: stretch.cpp =================================================================== RCS file: /cvsroot/paragui/paragui/src/draw/stretch.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** stretch.cpp 15 Apr 2002 13:35:35 -0000 1.3 --- stretch.cpp 18 Aug 2002 08:12:52 -0000 1.4 *************** *** 27,36 **** */ #include #include #include #include - - #include "pgdraw.h" #if ! defined( macintosh ) && ! defined( __MWERKS__ ) --- 27,36 ---- */ + #include "pgdraw.h" + #include #include #include #include #if ! defined( macintosh ) && ! defined( __MWERKS__ ) Index: surface.cpp =================================================================== RCS file: /cvsroot/paragui/paragui/src/draw/surface.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** surface.cpp 15 Apr 2002 13:35:35 -0000 1.3 --- surface.cpp 18 Aug 2002 08:12:52 -0000 1.4 *************** *** 64,68 **** --- 64,74 ---- if((background == NULL) || (background && (blend > 0))) { if(gradient != NULL) { + if(SDL_MUSTLOCK(surface)) { + SDL_LockSurface(surface); + } DrawGradient(surface, r, *gradient); + if(SDL_MUSTLOCK(surface)) { + SDL_UnlockSurface(surface); + } } } From pipelka@teleweb.at Sun Aug 18 04:13:15 2002 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17gLBS-0002X1-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:13:14 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17gLBD-0002UB-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:13:08 -0400 Received: from subversions.gnu.org ([199.232.41.2]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17gLBC-0002To-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:12:59 -0400 Received: from braindead by subversions.gnu.org with local (Exim 3.35 #1 (Debian)) id 17gLB9-0003Ju-00; Sun, 18 Aug 2002 04:12:55 -0400 To: paragui-cvs@mail.freesoftware.fsf.org Message-Id: From: "Alexander Pipelka " Date: Sun, 18 Aug 2002 04:12:55 -0400 Subject: [paragui-cvs] CVS: paragui/src/physfs/test Makefile.am,1.2,1.3 test_physfs.c,1.2,1.3 Sender: paragui-cvs-admin@mail.freesoftware.fsf.org Errors-To: paragui-cvs-admin@mail.freesoftware.fsf.org X-BeenThere: paragui-cvs@mail.freesoftware.fsf.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: paragui-cvs@mail.freesoftware.fsf.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Update of /cvsroot/paragui/paragui/src/physfs/test In directory subversions:/tmp/cvs-serv12482/src/physfs/test Modified Files: Makefile.am test_physfs.c Log Message: synced with the devel-1-0-x tree. Index: Makefile.am =================================================================== RCS file: /cvsroot/paragui/paragui/src/physfs/test/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** Makefile.am 26 Jun 2002 08:30:11 -0000 1.2 --- Makefile.am 18 Aug 2002 08:12:53 -0000 1.3 *************** *** 1,5 **** bin_PROGRAMS = test_physfs ! test_physfs_INCLUDES = -I$(top_srcdir) test_physfs_LDADD = ../libphysfs.la test_physfs_SOURCES = test_physfs.c --- 1,10 ---- + if BUILD_TEST_PHYSFS + bin_PROGRAMS = test_physfs ! INCLUDES = -I$(top_srcdir) ! test_physfs_LDADD = ../libphysfs.la test_physfs_SOURCES = test_physfs.c + + endif Index: test_physfs.c =================================================================== RCS file: /cvsroot/paragui/paragui/src/physfs/test/test_physfs.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** test_physfs.c 26 Jun 2002 08:30:11 -0000 1.2 --- test_physfs.c 18 Aug 2002 08:12:53 -0000 1.3 *************** *** 32,36 **** #define TEST_VERSION_MAJOR 0 #define TEST_VERSION_MINOR 1 ! #define TEST_VERSION_PATCH 6 static FILE *history_file = NULL; --- 32,36 ---- #define TEST_VERSION_MAJOR 0 #define TEST_VERSION_MINOR 1 ! #define TEST_VERSION_PATCH 7 static FILE *history_file = NULL; *************** *** 627,630 **** --- 627,631 ---- { "removearchive", cmd_removearchive, 1, "" }, { "enumerate", cmd_enumerate, 1, "" }, + { "ls", cmd_enumerate, 1, "" }, { "getlasterror", cmd_getlasterror, 0, NULL }, { "getdirsep", cmd_getdirsep, 0, NULL }, *************** *** 829,833 **** printf("\n"); ! if (!PHYSFS_init("dummy")) { printf("PHYSFS_init() failed!\n reason: %s.\n", PHYSFS_getLastError()); --- 830,834 ---- printf("\n"); ! if (!PHYSFS_init(argv[0])) { printf("PHYSFS_init() failed!\n reason: %s.\n", PHYSFS_getLastError()); From pipelka@teleweb.at Sun Aug 18 04:13:16 2002 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17gLBT-0002XC-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:13:15 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17gLBB-0002TB-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:13:09 -0400 Received: from subversions.gnu.org ([199.232.41.2]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17gLBA-0002SZ-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:12:56 -0400 Received: from braindead by subversions.gnu.org with local (Exim 3.35 #1 (Debian)) id 17gLB9-0003JP-00; Sun, 18 Aug 2002 04:12:55 -0400 To: paragui-cvs@mail.freesoftware.fsf.org Message-Id: From: "Alexander Pipelka " Date: Sun, 18 Aug 2002 04:12:55 -0400 Subject: [paragui-cvs] CVS: paragui/src/physfs/extras Makefile.am,1.2,1.3 Sender: paragui-cvs-admin@mail.freesoftware.fsf.org Errors-To: paragui-cvs-admin@mail.freesoftware.fsf.org X-BeenThere: paragui-cvs@mail.freesoftware.fsf.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: paragui-cvs@mail.freesoftware.fsf.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Update of /cvsroot/paragui/paragui/src/physfs/extras In directory subversions:/tmp/cvs-serv12482/src/physfs/extras Modified Files: Makefile.am Log Message: synced with the devel-1-0-x tree. Index: Makefile.am =================================================================== RCS file: /cvsroot/paragui/paragui/src/physfs/extras/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** Makefile.am 26 Jun 2002 08:30:11 -0000 1.2 --- Makefile.am 18 Aug 2002 08:12:53 -0000 1.3 *************** *** 1,4 **** EXTRA_DIST = \ ! physfshttpd.c \ ! physfsrwops.c \ ! physfsrwops.h --- 1,6 ---- EXTRA_DIST = \ ! physfsrwops.c \ ! physfsrwops.h \ ! physfshttpd.c ! ! From pipelka@teleweb.at Sun Aug 18 04:13:18 2002 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17gLBW-0002XV-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:13:18 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17gLBF-0002Uk-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:13:12 -0400 Received: from subversions.gnu.org ([199.232.41.2]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17gLBE-0002U0-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:13:00 -0400 Received: from braindead by subversions.gnu.org with local (Exim 3.35 #1 (Debian)) id 17gLBA-0003KG-00; Sun, 18 Aug 2002 04:12:57 -0400 To: paragui-cvs@mail.freesoftware.fsf.org Message-Id: From: "Alexander Pipelka " Date: Sun, 18 Aug 2002 04:12:57 -0400 Subject: [paragui-cvs] CVS: paragui/src/themes theme_priv.cpp,1.3,1.4 theme_priv.h,1.4,1.5 themeloader.cpp,1.3,1.4 Sender: paragui-cvs-admin@mail.freesoftware.fsf.org Errors-To: paragui-cvs-admin@mail.freesoftware.fsf.org X-BeenThere: paragui-cvs@mail.freesoftware.fsf.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: paragui-cvs@mail.freesoftware.fsf.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Update of /cvsroot/paragui/paragui/src/themes In directory subversions:/tmp/cvs-serv12482/src/themes Modified Files: theme_priv.cpp theme_priv.h themeloader.cpp Log Message: synced with the devel-1-0-x tree. Index: theme_priv.cpp =================================================================== RCS file: /cvsroot/paragui/paragui/src/themes/theme_priv.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** theme_priv.cpp 15 Apr 2002 13:35:36 -0000 1.3 --- theme_priv.cpp 18 Aug 2002 08:12:53 -0000 1.4 *************** *** 220,223 **** --- 220,225 ---- } strings.clear(); + + delete font; } Index: theme_priv.h =================================================================== RCS file: /cvsroot/paragui/paragui/src/themes/theme_priv.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 Index: themeloader.cpp =================================================================== RCS file: /cvsroot/paragui/paragui/src/themes/themeloader.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** themeloader.cpp 15 Apr 2002 13:35:36 -0000 1.3 --- themeloader.cpp 18 Aug 2002 08:12:53 -0000 1.4 *************** *** 28,33 **** --- 28,36 ---- #include "paragui.h" + + #include "theme_priv.h" #include "pglog.h" + #include "pgfilearchive.h" #include *************** *** 58,65 **** THEME_WIDGET* p_currentWidget; THEME_OBJECT* p_currentObject; - const char* path; std::string themename; - int xml_file_size; - PG_FileArchive archive; } PARSE_INFO; --- 61,65 ---- *************** *** 192,196 **** // load the image file ! filename->surface = info->archive.LoadSurface(filename->value.c_str()); if(filename->surface == NULL) { --- 192,196 ---- // load the image file ! filename->surface = PG_FileArchive::LoadSurface(filename->value.c_str()); if(filename->surface == NULL) { *************** *** 415,428 **** // and add it to the searchpath ! if(info.archive.Exists(filename.c_str())) { ! const char* path = info.archive.GetRealDir(filename.c_str()); ! std::string fullpath = (std::string)path + (std::string)"/" + filename; ! bool rc = info.archive.AddArchive(fullpath.c_str()); if(rc) { PG_LogMSG("added '%s' to the searchpath", fullpath.c_str()); } else { PG_LogWRN("failed to add '%s'", fullpath.c_str()); ! PG_LogWRN("%s", info.archive.GetLastError()); } } --- 415,434 ---- // and add it to the searchpath ! if(PG_FileArchive::Exists(filename.c_str())) { ! const char* path = PG_FileArchive::GetRealDir(filename.c_str()); ! char sep = PG_FileArchive::GetDirSeparator()[0]; ! ! std::string fullpath = (std::string)path; ! if(fullpath[fullpath.size()-1] != sep) { ! fullpath += sep; ! } ! fullpath += filename; ! bool rc = PG_FileArchive::AddArchive(fullpath.c_str()); if(rc) { PG_LogMSG("added '%s' to the searchpath", fullpath.c_str()); } else { PG_LogWRN("failed to add '%s'", fullpath.c_str()); ! PG_LogWRN("%s", PG_FileArchive::GetLastError()); } } *************** *** 431,435 **** filename = (std::string)xmltheme + (std::string)THEME_SUFFIX; ! if(!info.archive.Exists(filename.c_str())) { PG_LogERR("theme '%s' not found !", filename.c_str()); return NULL; --- 437,441 ---- filename = (std::string)xmltheme + (std::string)THEME_SUFFIX; ! if(!PG_FileArchive::Exists(filename.c_str())) { PG_LogERR("theme '%s' not found !", filename.c_str()); return NULL; *************** *** 447,451 **** // create an input-stream ! PG_File* file = info.archive.OpenFile(filename.c_str()); if(!file) { --- 453,457 ---- // create an input-stream ! PG_File* file = PG_FileArchive::OpenFile(filename.c_str()); if(!file) { *************** *** 480,486 **** PG_LogMSG("theme '%s' loaded sucessfully", filename.c_str()); - - //PG_Theme *theme = info.theme; - //return theme; return info.theme; --- 486,489 ---- From pipelka@teleweb.at Sun Aug 18 04:13:19 2002 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17gLBW-0002XW-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:13:18 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17gLBF-0002Ur-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:13:14 -0400 Received: from subversions.gnu.org ([199.232.41.2]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17gLBD-0002U3-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:13:00 -0400 Received: from braindead by subversions.gnu.org with local (Exim 3.35 #1 (Debian)) id 17gLBB-0003KM-00; Sun, 18 Aug 2002 04:12:57 -0400 To: paragui-cvs@mail.freesoftware.fsf.org Message-Id: From: "Alexander Pipelka " Date: Sun, 18 Aug 2002 04:12:57 -0400 Subject: [paragui-cvs] CVS: paragui/src/physfs/zlib114 Makefile.am,1.2,1.3 adler32.c,1.2,1.3 compress.c,1.2,1.3 crc32.c,1.2,1.3 deflate.c,1.2,1.3 deflate.h,1.2,1.3 trees.c,1.2,1.3 uncompr.c,1.2,1.3 zconf.h,1.2,1.3 zutil.c,1.2,1.3 zutil.h,1.2,1.3 Sender: paragui-cvs-admin@mail.freesoftware.fsf.org Errors-To: paragui-cvs-admin@mail.freesoftware.fsf.org X-BeenThere: paragui-cvs@mail.freesoftware.fsf.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: paragui-cvs@mail.freesoftware.fsf.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Update of /cvsroot/paragui/paragui/src/physfs/zlib114 In directory subversions:/tmp/cvs-serv12482/src/physfs/zlib114 Modified Files: Makefile.am adler32.c compress.c crc32.c deflate.c deflate.h trees.c uncompr.c zconf.h zutil.c zutil.h Log Message: synced with the devel-1-0-x tree. Index: Makefile.am =================================================================== RCS file: /cvsroot/paragui/paragui/src/physfs/zlib114/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** Makefile.am 26 Jun 2002 08:30:11 -0000 1.2 --- Makefile.am 18 Aug 2002 08:12:53 -0000 1.3 *************** *** 1,29 **** ! noinst_LTLIBRARIES = libz.la ! libz_la_SOURCES = \ ! adler32.c \ ! compress.c \ ! crc32.c \ ! deflate.c \ ! infblock.c \ ! infcodes.c \ ! inffast.c \ ! inflate.c \ ! inftrees.c \ ! infutil.c \ ! trees.c \ ! uncompr.c \ ! zutil.c - EXTRA_DIST = \ - deflate.h \ - infblock.h \ - infcodes.h \ - inffast.h \ - inffixed.h \ - inftrees.h \ - infutil.h \ - trees.h \ - zconf.h \ - zlib.h \ - zutil.h --- 1,32 ---- ! X = adler32.c \ ! compress.c \ ! crc32.c \ ! deflate.c \ ! deflate.h \ ! infblock.c \ ! infblock.h \ ! infcodes.c \ ! infcodes.h \ ! inffast.c \ ! inffast.h \ ! inffixed.h \ ! inflate.c \ ! inftrees.c \ ! inftrees.h \ ! infutil.c \ ! infutil.h \ ! trees.c \ ! trees.h \ ! uncompr.c \ ! zconf.h \ ! zlib.h \ ! zutil.c \ ! zutil.h ! if BUILD_ZLIB ! noinst_LTLIBRARIES = libz.la ! libz_la_SOURCES = $(X) ! else ! EXTRA_DIST = $(X) ! endif Index: adler32.c =================================================================== RCS file: /cvsroot/paragui/paragui/src/physfs/zlib114/adler32.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 Index: compress.c =================================================================== RCS file: /cvsroot/paragui/paragui/src/physfs/zlib114/compress.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 Index: crc32.c =================================================================== RCS file: /cvsroot/paragui/paragui/src/physfs/zlib114/crc32.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 Index: deflate.c =================================================================== RCS file: /cvsroot/paragui/paragui/src/physfs/zlib114/deflate.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 Index: deflate.h =================================================================== RCS file: /cvsroot/paragui/paragui/src/physfs/zlib114/deflate.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 Index: trees.c =================================================================== RCS file: /cvsroot/paragui/paragui/src/physfs/zlib114/trees.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 Index: uncompr.c =================================================================== RCS file: /cvsroot/paragui/paragui/src/physfs/zlib114/uncompr.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 Index: zconf.h =================================================================== RCS file: /cvsroot/paragui/paragui/src/physfs/zlib114/zconf.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 Index: zutil.c =================================================================== RCS file: /cvsroot/paragui/paragui/src/physfs/zlib114/zutil.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 Index: zutil.h =================================================================== RCS file: /cvsroot/paragui/paragui/src/physfs/zlib114/zutil.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 From pipelka@teleweb.at Sun Aug 18 04:13:30 2002 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17gLBg-0002aZ-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:13:28 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17gLBC-0002Tg-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:13:22 -0400 Received: from subversions.gnu.org ([199.232.41.2]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17gLBA-0002Se-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:12:56 -0400 Received: from braindead by subversions.gnu.org with local (Exim 3.35 #1 (Debian)) id 17gLB9-0003Ja-00; Sun, 18 Aug 2002 04:12:55 -0400 To: paragui-cvs@mail.freesoftware.fsf.org Message-Id: From: "Alexander Pipelka " Date: Sun, 18 Aug 2002 04:12:55 -0400 Subject: [paragui-cvs] CVS: paragui/src/physfs/archivers Makefile.am,1.3,1.4 dir.c,1.3,1.4 grp.c,1.3,1.4 zip.c,1.3,1.4 unzip.h,1.1.1.1,NONE Sender: paragui-cvs-admin@mail.freesoftware.fsf.org Errors-To: paragui-cvs-admin@mail.freesoftware.fsf.org X-BeenThere: paragui-cvs@mail.freesoftware.fsf.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: paragui-cvs@mail.freesoftware.fsf.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Update of /cvsroot/paragui/paragui/src/physfs/archivers In directory subversions:/tmp/cvs-serv12482/src/physfs/archivers Modified Files: Makefile.am dir.c grp.c zip.c Removed Files: unzip.h Log Message: synced with the devel-1-0-x tree. Index: Makefile.am =================================================================== RCS file: /cvsroot/paragui/paragui/src/physfs/archivers/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** Makefile.am 26 Jun 2002 08:30:11 -0000 1.3 --- Makefile.am 18 Aug 2002 08:12:53 -0000 1.4 *************** *** 1,12 **** noinst_LTLIBRARIES = libarchivers.la ! libarchivers_la_SOURCES = \ ! dir.c \ ! grp.c \ ! unzip.c \ ! zip.c ! EXTRA_DIST = \ ! unzip.h - INCLUDES = -I$(top_srcdir) --- 1,13 ---- noinst_LTLIBRARIES = libarchivers.la ! if BUILD_ZLIB ! INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/zlib114 ! else ! INCLUDES = -I$(top_srcdir) ! endif ! libarchivers_la_SOURCES = \ ! dir.c \ ! grp.c \ ! zip.c Index: dir.c =================================================================== RCS file: /cvsroot/paragui/paragui/src/physfs/archivers/dir.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** dir.c 26 Jun 2002 08:30:11 -0000 1.3 --- dir.c 18 Aug 2002 08:12:53 -0000 1.4 *************** *** 47,59 **** static const FileFunctions __PHYSFS_FileFunctions_DIR = { ! DIR_read, /* read() method */ ! NULL, /* write() method */ ! DIR_eof, /* eof() method */ ! DIR_tell, /* tell() method */ ! DIR_seek, /* seek() method */ DIR_fileLength, /* fileLength() method */ ! DIR_fileClose /* fileClose() method */ }; --- 47,68 ---- + const PHYSFS_ArchiveInfo __PHYSFS_ArchiveInfo_DIR = + { + "", + DIR_ARCHIVE_DESCRIPTION, + "Ryan C. Gordon ", + "http://icculus.org/physfs/", + }; + + static const FileFunctions __PHYSFS_FileFunctions_DIR = { ! DIR_read, /* read() method */ ! NULL, /* write() method */ ! DIR_eof, /* eof() method */ ! DIR_tell, /* tell() method */ ! DIR_seek, /* seek() method */ DIR_fileLength, /* fileLength() method */ ! DIR_fileClose /* fileClose() method */ }; *************** *** 73,76 **** --- 82,86 ---- const DirFunctions __PHYSFS_DirFunctions_DIR = { + &__PHYSFS_ArchiveInfo_DIR, DIR_isArchive, /* isArchive() method */ DIR_openArchive, /* openArchive() method */ *************** *** 87,102 **** DIR_dirClose /* dirClose() method */ }; - - - /* This doesn't get listed, since it's technically not an archive... */ - #if 0 - const PHYSFS_ArchiveInfo __PHYSFS_ArchiveInfo_DIR = - { - "DIR", - "non-archive directory I/O", - "Ryan C. Gordon ", - "http://www.icculus.org/physfs/", - }; - #endif --- 97,100 ---- Index: grp.c =================================================================== RCS file: /cvsroot/paragui/paragui/src/physfs/archivers/grp.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** grp.c 26 Jun 2002 08:30:11 -0000 1.3 --- grp.c 18 Aug 2002 08:12:53 -0000 1.4 *************** *** 20,27 **** * (That info is from http://www.advsys.net/ken/build.htm ...) * - * As it was never a concern in the DOS-based Duke Nukem days, I treat these - * archives as CASE-INSENSITIVE. Opening "myfile.txt" and "MYFILE.TXT" both - * work, and get the same file. - * * Please see the file LICENSE in the source's root directory. * --- 20,23 ---- *************** *** 46,54 **** #include "physfs_internal.h" typedef struct { - void *handle; char *filename; ! PHYSFS_uint32 totalEntries; } GRPinfo; --- 42,65 ---- #include "physfs_internal.h" + /* + * When sorting the grp entries in an archive, we use a modified QuickSort. + * When there are less then GRP_QUICKSORT_THRESHOLD entries left to sort, + * we switch over to an InsertionSort for the remainder. Tweak to taste. + */ + #define GRP_QUICKSORT_THRESHOLD 4 + + typedef struct + { + char name[13]; + PHYSFS_uint64 startPos; + PHYSFS_uint64 size; + } GRPentry; + typedef struct { char *filename; ! PHYSFS_sint64 last_mod_time; ! PHYSFS_uint32 entryCount; ! GRPentry *entries; } GRPinfo; *************** *** 56,61 **** { void *handle; ! PHYSFS_uint64 startPos; ! PHYSFS_uint64 size; } GRPfileinfo; --- 67,72 ---- { void *handle; ! GRPentry *entry; ! PHYSFS_sint64 curPos; } GRPfileinfo; *************** *** 80,83 **** --- 91,103 ---- static FileHandle *GRP_openRead(DirHandle *h, const char *name); + const PHYSFS_ArchiveInfo __PHYSFS_ArchiveInfo_GRP = + { + "GRP", + GRP_ARCHIVE_DESCRIPTION, + "Ryan C. Gordon ", + "http://icculus.org/physfs/", + }; + + static const FileFunctions __PHYSFS_FileFunctions_GRP = { *************** *** 94,97 **** --- 114,118 ---- const DirFunctions __PHYSFS_DirFunctions_GRP = { + &__PHYSFS_ArchiveInfo_GRP, GRP_isArchive, /* isArchive() method */ GRP_openArchive, /* openArchive() method */ *************** *** 109,127 **** }; - const PHYSFS_ArchiveInfo __PHYSFS_ArchiveInfo_GRP = - { - "GRP", - "Build engine Groupfile format", - "Ryan C. Gordon ", - "http://www.icculus.org/physfs/", - }; - static void GRP_dirClose(DirHandle *h) { ! __PHYSFS_platformClose( ((GRPinfo *) h->opaque)->handle ); ! free(((GRPinfo *) h->opaque)->filename); ! free(h->opaque); free(h); } /* GRP_dirClose */ --- 130,141 ---- }; static void GRP_dirClose(DirHandle *h) { ! GRPinfo *info = ((GRPinfo *) h->opaque); ! free(info->filename); ! free(info->entries); ! free(info); free(h); } /* GRP_dirClose */ *************** *** 132,144 **** { GRPfileinfo *finfo = (GRPfileinfo *) (handle->opaque); ! void *fh = finfo->handle; ! PHYSFS_sint64 curPos = __PHYSFS_platformTell(fh); ! PHYSFS_uint64 bytesLeft = (finfo->startPos + finfo->size) - curPos; PHYSFS_uint64 objsLeft = (bytesLeft / objSize); if (objsLeft < objCount) objCount = (PHYSFS_uint32) objsLeft; ! return(__PHYSFS_platformRead(fh, buffer, objSize, objCount)); } /* GRP_read */ --- 146,162 ---- { GRPfileinfo *finfo = (GRPfileinfo *) (handle->opaque); ! GRPentry *entry = finfo->entry; ! PHYSFS_uint64 bytesLeft = entry->size - finfo->curPos; PHYSFS_uint64 objsLeft = (bytesLeft / objSize); + PHYSFS_sint64 rc; if (objsLeft < objCount) objCount = (PHYSFS_uint32) objsLeft; ! rc = __PHYSFS_platformRead(finfo->handle, buffer, objSize, objCount); ! if (rc > 0) ! finfo->curPos += (rc * objSize); ! ! return(rc); } /* GRP_read */ *************** *** 147,154 **** { GRPfileinfo *finfo = (GRPfileinfo *) (handle->opaque); ! void *fh = finfo->handle; ! PHYSFS_sint64 pos = __PHYSFS_platformTell(fh); ! BAIL_IF_MACRO(pos < 0, NULL, 1); /* (*shrug*) */ ! return(pos >= (PHYSFS_sint64) (finfo->startPos + finfo->size)); } /* GRP_eof */ --- 165,170 ---- { GRPfileinfo *finfo = (GRPfileinfo *) (handle->opaque); ! GRPentry *entry = finfo->entry; ! return(finfo->curPos >= (PHYSFS_sint64) entry->size); } /* GRP_eof */ *************** *** 156,161 **** static PHYSFS_sint64 GRP_tell(FileHandle *handle) { ! GRPfileinfo *finfo = (GRPfileinfo *) (handle->opaque); ! return(__PHYSFS_platformTell(finfo->handle) - finfo->startPos); } /* GRP_tell */ --- 172,176 ---- static PHYSFS_sint64 GRP_tell(FileHandle *handle) { ! return(((GRPfileinfo *) (handle->opaque))->curPos); } /* GRP_tell */ *************** *** 164,172 **** { GRPfileinfo *finfo = (GRPfileinfo *) (handle->opaque); ! PHYSFS_uint64 newPos = (finfo->startPos + offset); BAIL_IF_MACRO(offset < 0, ERR_INVALID_ARGUMENT, 0); ! BAIL_IF_MACRO(newPos > finfo->startPos + finfo->size, ERR_PAST_EOF, 0); ! return(__PHYSFS_platformSeek(finfo->handle, newPos)); } /* GRP_seek */ --- 179,193 ---- { GRPfileinfo *finfo = (GRPfileinfo *) (handle->opaque); ! GRPentry *entry = finfo->entry; ! PHYSFS_uint64 newPos = (entry->startPos + offset); ! int rc; BAIL_IF_MACRO(offset < 0, ERR_INVALID_ARGUMENT, 0); ! BAIL_IF_MACRO(newPos > entry->startPos + entry->size, ERR_PAST_EOF, 0); ! rc = __PHYSFS_platformSeek(finfo->handle, newPos); ! if (rc) ! finfo->curPos = offset; ! ! return(rc); } /* GRP_seek */ *************** *** 174,179 **** static PHYSFS_sint64 GRP_fileLength(FileHandle *handle) { ! GRPfileinfo *finfo = (GRPfileinfo *) (handle->opaque); ! return(finfo->size); } /* GRP_fileLength */ --- 195,199 ---- static PHYSFS_sint64 GRP_fileLength(FileHandle *handle) { ! return(((GRPfileinfo *) handle->opaque)->entry->size); } /* GRP_fileLength */ *************** *** 181,188 **** static int GRP_fileClose(FileHandle *handle) { ! GRPfileinfo *finfo = (GRPfileinfo *) (handle->opaque); ! BAIL_IF_MACRO(__PHYSFS_platformClose(finfo->handle), NULL, 0); ! ! free(handle->opaque); free(handle); return(1); --- 201,207 ---- static int GRP_fileClose(FileHandle *handle) { ! GRPfileinfo *finfo = ((GRPfileinfo *) handle->opaque); ! BAIL_IF_MACRO(!__PHYSFS_platformClose(finfo->handle), NULL, 0); ! free(finfo); free(handle); return(1); *************** *** 190,195 **** ! static int openGrp(const char *filename, int forWriting, ! void **fh, PHYSFS_sint32 *count) { PHYSFS_uint8 buf[12]; --- 209,214 ---- ! static int grp_open(const char *filename, int forWriting, ! void **fh, PHYSFS_uint32 *count) { PHYSFS_uint8 buf[12]; *************** *** 210,217 **** } /* if */ ! if (__PHYSFS_platformRead(*fh, count, sizeof (PHYSFS_sint32), 1) != 1) goto openGrp_failed; ! *count = PHYSFS_swapSLE32(*count); return(1); --- 229,236 ---- } /* if */ ! if (__PHYSFS_platformRead(*fh, count, sizeof (PHYSFS_uint32), 1) != 1) goto openGrp_failed; ! *count = PHYSFS_swapULE32(*count); return(1); *************** *** 224,228 **** *fh = NULL; return(0); ! } /* openGrp */ --- 243,247 ---- *fh = NULL; return(0); ! } /* grp_open */ *************** *** 230,235 **** { void *fh; ! int fileCount; ! int retval = openGrp(filename, forWriting, &fh, &fileCount); if (fh != NULL) --- 249,254 ---- { void *fh; ! PHYSFS_uint32 fileCount; ! int retval = grp_open(filename, forWriting, &fh, &fileCount); if (fh != NULL) *************** *** 240,252 **** ! static DirHandle *GRP_openArchive(const char *name, int forWriting) { void *fh = NULL; ! int fileCount; DirHandle *retval = malloc(sizeof (DirHandle)); BAIL_IF_MACRO(retval == NULL, ERR_OUT_OF_MEMORY, NULL); ! retval->opaque = malloc(sizeof (GRPinfo)); ! if (retval->opaque == NULL) { __PHYSFS_setError(ERR_OUT_OF_MEMORY); --- 259,394 ---- ! static void grp_entry_swap(GRPentry *a, PHYSFS_uint32 one, PHYSFS_uint32 two) ! { ! GRPentry tmp; ! memcpy(&tmp, &a[one], sizeof (GRPentry)); ! memcpy(&a[one], &a[two], sizeof (GRPentry)); ! memcpy(&a[two], &tmp, sizeof (GRPentry)); ! } /* grp_entry_swap */ ! ! ! static void grp_quick_sort(GRPentry *a, PHYSFS_uint32 lo, PHYSFS_uint32 hi) ! { ! PHYSFS_uint32 i; ! PHYSFS_uint32 j; ! GRPentry *v; ! ! if ((hi - lo) > GRP_QUICKSORT_THRESHOLD) ! { ! i = (hi + lo) / 2; ! ! if (strcmp(a[lo].name, a[i].name) > 0) grp_entry_swap(a, lo, i); ! if (strcmp(a[lo].name, a[hi].name) > 0) grp_entry_swap(a, lo, hi); ! if (strcmp(a[i].name, a[hi].name) > 0) grp_entry_swap(a, i, hi); ! ! j = hi - 1; ! grp_entry_swap(a, i, j); ! i = lo; ! v = &a[j]; ! while (1) ! { ! while(strcmp(a[++i].name, v->name) < 0) {} ! while(strcmp(a[--j].name, v->name) > 0) {} ! if (j < i) ! break; ! grp_entry_swap(a, i, j); ! } /* while */ ! grp_entry_swap(a, i, hi-1); ! grp_quick_sort(a, lo, j); ! grp_quick_sort(a, i+1, hi); ! } /* if */ ! } /* grp_quick_sort */ ! ! ! static void grp_insertion_sort(GRPentry *a, PHYSFS_uint32 lo, PHYSFS_uint32 hi) ! { ! PHYSFS_uint32 i; ! PHYSFS_uint32 j; ! GRPentry tmp; ! ! for (i = lo + 1; i <= hi; i++) ! { ! memcpy(&tmp, &a[i], sizeof (GRPentry)); ! j = i; ! while ((j > lo) && (strcmp(a[j - 1].name, tmp.name) > 0)) ! { ! memcpy(&a[j], &a[j - 1], sizeof (GRPentry)); ! j--; ! } /* while */ ! memcpy(&a[j], &tmp, sizeof (GRPentry)); ! } /* for */ ! } /* grp_insertion_sort */ ! ! ! static void grp_sort_entries(GRPentry *entries, PHYSFS_uint32 max) ! { ! /* ! * Fast Quicksort algorithm inspired by code from here: ! * http://www.cs.ubc.ca/spider/harrison/Java/sorting-demo.html ! */ ! if (max <= GRP_QUICKSORT_THRESHOLD) ! grp_quick_sort(entries, 0, max - 1); ! grp_insertion_sort(entries, 0, max - 1); ! } /* grp_sort_entries */ ! ! ! static int grp_load_entries(const char *name, int forWriting, GRPinfo *info) { void *fh = NULL; ! PHYSFS_uint32 fileCount; ! PHYSFS_uint32 location = 16; /* sizeof sig. */ ! GRPentry *entry; ! char *ptr; ! ! BAIL_IF_MACRO(!grp_open(name, forWriting, &fh, &fileCount), NULL, 0); ! info->entryCount = fileCount; ! info->entries = (GRPentry *) malloc(sizeof (GRPentry) * fileCount); ! if (info->entries == NULL) ! { ! __PHYSFS_platformClose(fh); ! BAIL_MACRO(ERR_OUT_OF_MEMORY, 0); ! } /* if */ ! ! location += (16 * fileCount); ! ! for (entry = info->entries; fileCount > 0; fileCount--, entry++) ! { ! if (__PHYSFS_platformRead(fh, &entry->name, 12, 1) != 1) ! { ! __PHYSFS_platformClose(fh); ! return(0); ! } /* if */ ! ! entry->name[12] = '\0'; /* name isn't null-terminated in file. */ ! if ((ptr = strchr(entry->name, ' ')) != NULL) ! *ptr = '\0'; /* trim extra spaces. */ ! ! if (__PHYSFS_platformRead(fh, &entry->size, 4, 1) != 1) ! { ! __PHYSFS_platformClose(fh); ! return(0); ! } /* if */ ! ! entry->size = PHYSFS_swapULE32(entry->size); ! entry->startPos = location; ! location += entry->size; ! } /* for */ ! ! __PHYSFS_platformClose(fh); ! ! grp_sort_entries(info->entries, info->entryCount); ! return(1); ! } /* grp_load_entries */ ! ! ! static DirHandle *GRP_openArchive(const char *name, int forWriting) ! { ! GRPinfo *info; DirHandle *retval = malloc(sizeof (DirHandle)); + PHYSFS_sint64 modtime = __PHYSFS_platformGetLastModTime(name); BAIL_IF_MACRO(retval == NULL, ERR_OUT_OF_MEMORY, NULL); ! info = retval->opaque = malloc(sizeof (GRPinfo)); ! if (info == NULL) { __PHYSFS_setError(ERR_OUT_OF_MEMORY); *************** *** 254,259 **** } /* if */ ! ((GRPinfo *) retval->opaque)->filename = (char *) malloc(strlen(name) + 1); ! if (((GRPinfo *) retval->opaque)->filename == NULL) { __PHYSFS_setError(ERR_OUT_OF_MEMORY); --- 396,403 ---- } /* if */ ! memset(info, '\0', sizeof (GRPinfo)); ! ! info->filename = (char *) malloc(strlen(name) + 1); ! if (info->filename == NULL) { __PHYSFS_setError(ERR_OUT_OF_MEMORY); *************** *** 261,270 **** } /* if */ ! if (!openGrp(name, forWriting, &fh, &fileCount)) goto GRP_openArchive_failed; ! strcpy(((GRPinfo *) retval->opaque)->filename, name); ! ((GRPinfo *) retval->opaque)->handle = fh; ! ((GRPinfo *) retval->opaque)->totalEntries = fileCount; retval->funcs = &__PHYSFS_DirFunctions_GRP; return(retval); --- 405,413 ---- } /* if */ ! if (!grp_load_entries(name, forWriting, info)) goto GRP_openArchive_failed; ! strcpy(info->filename, name); ! info->last_mod_time = modtime; retval->funcs = &__PHYSFS_DirFunctions_GRP; return(retval); *************** *** 275,288 **** if (retval->opaque != NULL) { ! if ( ((GRPinfo *) retval->opaque)->filename != NULL ) ! free( ((GRPinfo *) retval->opaque)->filename ); ! free(retval->opaque); } /* if */ free(retval); } /* if */ - if (fh != NULL) - __PHYSFS_platformClose(fh); - return(NULL); } /* GRP_openArchive */ --- 418,430 ---- if (retval->opaque != NULL) { ! if (info->filename != NULL) ! free(info->filename); ! if (info->entries != NULL) ! free(info->entries); ! free(info); } /* if */ free(retval); } /* if */ return(NULL); } /* GRP_openArchive */ *************** *** 293,338 **** int omitSymLinks) { ! PHYSFS_uint8 buf[16]; ! GRPinfo *g = (GRPinfo *) (h->opaque); ! void *fh = g->handle; PHYSFS_uint32 i; - LinkedStringList *retval = NULL; - LinkedStringList *l = NULL; - LinkedStringList *prev = NULL; - - /* !!! FIXME: Does this consider "/" ? */ - if (*dirname != '\0') /* no directories in GRP files. */ - return(NULL); ! /* jump to first file entry... */ ! BAIL_IF_MACRO(!__PHYSFS_platformSeek(fh, 16), NULL, NULL); ! for (i = 0; i < g->totalEntries; i++) ! { ! BAIL_IF_MACRO(__PHYSFS_platformRead(fh, buf, 16, 1) != 1, NULL, retval); ! ! buf[12] = '\0'; /* FILENAME.EXT is all you get. */ ! ! l = (LinkedStringList *) malloc(sizeof (LinkedStringList)); ! if (l == NULL) ! break; ! ! l->str = (char *) malloc(strlen((const char *) buf) + 1); ! if (l->str == NULL) ! { ! free(l); ! break; ! } /* if */ ! ! strcpy(l->str, (const char *) buf); ! ! if (retval == NULL) ! retval = l; ! else ! prev->next = l; ! ! prev = l; ! l->next = NULL; ! } /* for */ return(retval); --- 435,449 ---- int omitSymLinks) { ! GRPinfo *info = ((GRPinfo *) h->opaque); ! GRPentry *entry = info->entries; ! LinkedStringList *retval = NULL, *p = NULL; ! PHYSFS_uint32 max = info->entryCount; PHYSFS_uint32 i; ! /* no directories in GRP files. */ ! BAIL_IF_MACRO(*dirname != '\0', ERR_NOT_A_DIR, NULL); ! for (i = 0; i < max; i++, entry++) ! retval = __PHYSFS_addToLinkedStringList(retval, &p, entry->name, -1); return(retval); *************** *** 340,394 **** ! static PHYSFS_sint32 getFileEntry(DirHandle *h, const char *name, ! PHYSFS_uint32 *size) { ! PHYSFS_uint8 buf[16]; ! GRPinfo *g = (GRPinfo *) (h->opaque); ! void *fh = g->handle; ! PHYSFS_uint32 i; ! char *ptr; ! int retval = (g->totalEntries + 1) * 16; /* offset of raw file data */ ! /* Rule out filenames to avoid unneeded file i/o... */ ! if (strchr(name, '/') != NULL) /* no directories in groupfiles. */ ! return(-1); ! ! ptr = strchr(name, '.'); ! if ((ptr) && (strlen(ptr) > 4)) /* 3 char extension at most. */ ! return(-1); ! ! if (strlen(name) > 12) ! return(-1); ! ! /* jump to first file entry... */ ! BAIL_IF_MACRO(!__PHYSFS_platformSeek(fh, 16), NULL, -1); ! ! for (i = 0; i < g->totalEntries; i++) { ! PHYSFS_sint32 l = 0; ! ! BAIL_IF_MACRO(__PHYSFS_platformRead(fh, buf, 12, 1) != 1, NULL, -1); ! BAIL_IF_MACRO(__PHYSFS_platformRead(fh, &l, sizeof (l), 1) != 1, NULL, -1); ! l = PHYSFS_swapSLE32(l); ! ! buf[12] = '\0'; /* FILENAME.EXT is all you get. */ ! ! if (__PHYSFS_platformStricmp((const char *) buf, name) == 0) ! { ! if (size != NULL) ! *size = l; ! return(retval); ! } /* if */ ! ! retval += l; ! } /* for */ ! return(-1); /* not found. */ ! } /* getFileEntry */ static int GRP_exists(DirHandle *h, const char *name) { ! return(getFileEntry(h, name, NULL) != -1); } /* GRP_exists */ --- 451,490 ---- ! static GRPentry *grp_find_entry(GRPinfo *info, const char *name) { ! char *ptr = strchr(name, '.'); ! GRPentry *a = info->entries; ! PHYSFS_sint32 lo = 0; ! PHYSFS_sint32 hi = (PHYSFS_sint32) (info->entryCount - 1); ! PHYSFS_sint32 middle; ! int rc; ! ! /* ! * Rule out filenames to avoid unneeded processing...no dirs, ! * big filenames, or extensions > 3 chars. ! */ ! BAIL_IF_MACRO((ptr) && (strlen(ptr) > 4), ERR_NO_SUCH_FILE, NULL); ! BAIL_IF_MACRO(strlen(name) > 12, ERR_NO_SUCH_FILE, NULL); ! BAIL_IF_MACRO(strchr(name, '/') != NULL, ERR_NO_SUCH_FILE, NULL); ! while (lo <= hi) { ! middle = lo + ((hi - lo) / 2); ! rc = strcmp(name, a[middle].name); ! if (rc == 0) /* found it! */ ! return(&a[middle]); ! else if (rc > 0) ! lo = middle + 1; ! else ! hi = middle - 1; ! } /* while */ ! BAIL_MACRO(ERR_NO_SUCH_FILE, NULL); ! } /* grp_find_entry */ static int GRP_exists(DirHandle *h, const char *name) { ! return(grp_find_entry(((GRPinfo *) h->opaque), name) != NULL); } /* GRP_exists */ *************** *** 408,413 **** static PHYSFS_sint64 GRP_getLastModTime(DirHandle *h, const char *name) { /* Just return the time of the GRP itself in the physical filesystem. */ ! return(__PHYSFS_platformGetLastModTime(((GRPinfo *) h->opaque)->filename)); } /* GRP_getLastModTime */ --- 504,513 ---- static PHYSFS_sint64 GRP_getLastModTime(DirHandle *h, const char *name) { + GRPinfo *info = ((GRPinfo *) h->opaque); + if (grp_find_entry(info, name) == NULL) + return(-1); /* no such entry. */ + /* Just return the time of the GRP itself in the physical filesystem. */ ! return(((GRPinfo *) h->opaque)->last_mod_time); } /* GRP_getLastModTime */ *************** *** 415,426 **** static FileHandle *GRP_openRead(DirHandle *h, const char *name) { ! const char *filename = ((GRPinfo *) h->opaque)->filename; FileHandle *retval; GRPfileinfo *finfo; ! PHYSFS_uint32 size; ! PHYSFS_sint32 offset; ! offset = getFileEntry(h, name, &size); ! BAIL_IF_MACRO(offset == -1, ERR_NO_SUCH_FILE, NULL); retval = (FileHandle *) malloc(sizeof (FileHandle)); --- 515,525 ---- static FileHandle *GRP_openRead(DirHandle *h, const char *name) { ! GRPinfo *info = ((GRPinfo *) h->opaque); FileHandle *retval; GRPfileinfo *finfo; ! GRPentry *entry; ! entry = grp_find_entry(info, name); ! BAIL_IF_MACRO(entry == NULL, NULL, NULL); retval = (FileHandle *) malloc(sizeof (FileHandle)); *************** *** 430,439 **** { free(retval); ! BAIL_IF_MACRO(1, ERR_OUT_OF_MEMORY, NULL); } /* if */ ! finfo->handle = __PHYSFS_platformOpenRead(filename); if ( (finfo->handle == NULL) || ! (!__PHYSFS_platformSeek(finfo->handle, offset)) ) { free(finfo); --- 529,538 ---- { free(retval); ! BAIL_MACRO(ERR_OUT_OF_MEMORY, NULL); } /* if */ ! finfo->handle = __PHYSFS_platformOpenRead(info->filename); if ( (finfo->handle == NULL) || ! (!__PHYSFS_platformSeek(finfo->handle, entry->startPos)) ) { free(finfo); *************** *** 442,447 **** } /* if */ ! finfo->startPos = offset; ! finfo->size = size; retval->opaque = (void *) finfo; retval->funcs = &__PHYSFS_FileFunctions_GRP; --- 541,546 ---- } /* if */ ! finfo->curPos = 0; ! finfo->entry = entry; retval->opaque = (void *) finfo; retval->funcs = &__PHYSFS_FileFunctions_GRP; Index: zip.c =================================================================== RCS file: /cvsroot/paragui/paragui/src/physfs/archivers/zip.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** zip.c 26 Jun 2002 08:30:11 -0000 1.3 --- zip.c 18 Aug 2002 08:12:53 -0000 1.4 *************** *** 4,8 **** * Please see the file LICENSE in the source's root directory. * ! * This file written by Ryan C. Gordon. */ --- 4,9 ---- * Please see the file LICENSE in the source's root directory. * ! * This file written by Ryan C. Gordon, with some peeking at "unzip.c" ! * by Gilles Vollant. [...2018 lines suppressed...] ! ZIP_fileClose(retval); ! BAIL_MACRO(ERR_OUT_OF_MEMORY, NULL); ! } /* if */ } /* if */ return(retval); } /* ZIP_openRead */ *************** *** 696,700 **** { ZIPinfo *zi = (ZIPinfo *) (h->opaque); ! freeEntries(zi, zi->global.number_entry, NULL); free(zi->archiveName); free(zi); --- 1423,1427 ---- { ZIPinfo *zi = (ZIPinfo *) (h->opaque); ! zip_free_entries(zi->entries, zi->entryCount); free(zi->archiveName); free(zi); --- unzip.h DELETED --- From pipelka@teleweb.at Sun Aug 18 04:13:30 2002 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17gLBh-0002ay-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:13:29 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17gLBB-0002TO-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:13:23 -0400 Received: from subversions.gnu.org ([199.232.41.2]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17gLB9-0002SU-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:12:55 -0400 Received: from braindead by subversions.gnu.org with local (Exim 3.35 #1 (Debian)) id 17gLB9-0003J0-00; Sun, 18 Aug 2002 04:12:55 -0400 To: paragui-cvs@mail.freesoftware.fsf.org Message-Id: From: "Alexander Pipelka " Date: Sun, 18 Aug 2002 04:12:55 -0400 Subject: [paragui-cvs] CVS: paragui/src/core missing.cpp,1.1,1.2 pgtimerobject.cpp,1.1,1.2 physfsrwops.cpp,1.1,1.2 Makefile.am,1.4,1.5 pgapplication.cpp,1.11,1.12 pgdatacontainer.cpp,1.1,1.2 pgfile.cpp,1.1,1.2 pgfilearchive.cpp,1.5,1.6 pgfilelist.cpp,1.1,1.2 pglog.cpp,1.1,1.2 pgmain.cpp,1.1,1.2 pgmessageobject.cpp,1.8,1.9 pgnavigator.cpp,1.2,1.3 pgrectlist.cpp,1.2,1.3 pgsurfacecache.cpp,1.3,1.4 physfsrwops.c,1.1,NONE Sender: paragui-cvs-admin@mail.freesoftware.fsf.org Errors-To: paragui-cvs-admin@mail.freesoftware.fsf.org X-BeenThere: paragui-cvs@mail.freesoftware.fsf.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: paragui-cvs@mail.freesoftware.fsf.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Update of /cvsroot/paragui/paragui/src/core In directory subversions:/tmp/cvs-serv12482/src/core Modified Files: Makefile.am pgapplication.cpp pgdatacontainer.cpp pgfile.cpp pgfilearchive.cpp pgfilelist.cpp pglog.cpp pgmain.cpp pgmessageobject.cpp pgnavigator.cpp pgrectlist.cpp pgsurfacecache.cpp Added Files: missing.cpp pgtimerobject.cpp physfsrwops.cpp Removed Files: physfsrwops.c Log Message: synced with the devel-1-0-x tree. Index: Makefile.am =================================================================== RCS file: /cvsroot/paragui/paragui/src/core/Makefile.am,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** Makefile.am 29 Apr 2002 11:44:22 -0000 1.4 --- Makefile.am 18 Aug 2002 08:12:52 -0000 1.5 *************** *** 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 Index: pgapplication.cpp =================================================================== RCS file: /cvsroot/paragui/paragui/src/core/pgapplication.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** pgapplication.cpp 25 Jun 2002 20:38:42 -0000 1.11 --- pgapplication.cpp 18 Aug 2002 08:12:52 -0000 1.12 *************** *** 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 pipelka@teleweb.at ! Last Update: $Author$ Update Date: $Date$ --- 19,23 ---- Alexander Pipelka pipelka@teleweb.at ! Last Update: $Author$ Update Date: $Date$ *************** *** 27,35 **** */ - #include - #include - #include - #include - #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 + #include + #include + #include + // 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; *************** *** 57,72 **** bool PG_Application::enableBackground = true; bool PG_Application::enableAppIdleCalls = false; ! SDL_Surface *PG_Application::my_mouse_pointer; PG_Rect PG_Application::my_mouse_position = PG_Rect(0,0,0,0); PG_CURSOR_MODE PG_Application::my_mouse_mode = PG_CURSOR_HARDWARE; PG_Font* PG_Application::DefaultFont = NULL; ! SDL_Surface* PG_Application::my_background; ! SDL_Surface* 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_Application::objectList; PG_Widget* PG_Application::lastwidget = NULL; ! /** new shutdown procedure (called at application termination --- 60,75 ---- bool PG_Application::enableBackground = true; bool PG_Application::enableAppIdleCalls = false; ! SDL_Surface *PG_Application::my_mouse_pointer = NULL; PG_Rect PG_Application::my_mouse_position = PG_Rect(0,0,0,0); PG_CURSOR_MODE PG_Application::my_mouse_mode = PG_CURSOR_HARDWARE; PG_Font* PG_Application::DefaultFont = NULL; ! SDL_Surface* PG_Application::my_background = NULL; ! SDL_Surface* PG_Application::my_scaled_background = NULL; SDL_Color PG_Application::my_backcolor; ! int PG_Application::my_backmode = BKMODE_TILE; ! bool PG_Application::disableDirtyUpdates = false; std::vector PG_Application::objectList; PG_Widget* PG_Application::lastwidget = NULL; ! bool PG_Application::my_quitEventLoop = false; /** new shutdown procedure (called at application termination *************** *** 76,85 **** PG_LogConsole::Done(); - // remove all archives from PG_FileArchive - PG_FileArchive::RemoveAllArchives(); - - // shutdown PhysFS - PG_FileArchive::Deinit(); - // shutdown SDL SDL_Quit(); --- 79,82 ---- *************** *** 108,112 **** /* Initialize the SDL library */ if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE) < 0) { ! PG_LogERR("Could not initialize SDL: %s", SDL_GetError()); exit(-1); } --- 105,109 ---- /* Initialize the SDL library */ if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE) < 0) { ! std::cerr << "Could not initialize SDL: " << SDL_GetError() << std::endl; exit(-1); } *************** *** 119,122 **** --- 116,122 ---- my_freeBackground = false; my_backmode = BKMODE_TILE; + + // add our base dir to the searchpath + AddArchive(GetBaseDir()); } *************** *** 124,127 **** --- 124,130 ---- //pGlobalApp = NULL; Shutdown(); + + // remove all archives from PG_FileArchive + PG_FileArchive::RemoveAllArchives(); } *************** *** 255,260 **** /** */ bool PG_Application::eventKeyDown(const SDL_KeyboardEvent* key) { ! ! if (key->keysym.sym == PG_LOGCONSOLE_KEY) { PG_LogConsole::Update(); PG_LogConsole::Toggle(); --- 258,268 ---- /** */ 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(); *************** *** 412,421 **** PG_Rect fillrect = rect; - //PG_Application::LockScreen(); if(!my_background) { SDL_Color c = my_backcolor; SDL_FillRect(screen, (SDL_Rect*)&fillrect, SDL_MapRGB(screen->format, c.r, c.g, c.b)); - PG_Application::UnlockScreen(); return; } --- 420,427 ---- *************** *** 436,440 **** SDL_GetClipRect(screen, (SDL_Rect*)&fillrect); SDL_SetClipRect(screen, (SDL_Rect*)&rect); ! SDL_BlitSurface(my_scaled_background, 0, screen, 0); SDL_SetClipRect(screen, (SDL_Rect*)&fillrect); --- 442,446 ---- SDL_GetClipRect(screen, (SDL_Rect*)&fillrect); SDL_SetClipRect(screen, (SDL_Rect*)&rect); ! SDL_BlitSurface(my_scaled_background, (SDL_Rect*)&rect, screen, (SDL_Rect*)&rect); SDL_SetClipRect(screen, (SDL_Rect*)&fillrect); *************** *** 442,447 **** PG_Draw::DrawTile(screen, screenrect, rect, my_background); } - - //PG_Application::UnlockScreen(); } --- 448,451 ---- *************** *** 537,550 **** 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 - // 01/05/06 - - // add paths to the archive - - //#ifndef macintosh - if(searchpath != NULL) { if(AddArchive(searchpath)) { --- 541,544 ---- *************** *** 553,556 **** --- 547,574 ---- } + #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"); *************** *** 575,578 **** --- 593,598 ---- } + #endif // __MACOS__ + if(AddArchive(PARAGUI_THEMEDIR)) { PG_LogDBG("'"PARAGUI_THEMEDIR "' added to searchpath"); *************** *** 947,954 **** case SDL_SYSWMEVENT: return eventSysWM(&event->syswm); ! case SDL_USEREVENT: return false; ! case SDL_QUIT: return eventQuit(&event->quit); --- 967,974 ---- case SDL_SYSWMEVENT: return eventSysWM(&event->syswm); ! case SDL_USEREVENT: return false; ! case SDL_QUIT: return eventQuit(&event->quit); *************** *** 963,967 **** break; } ! // events related to objects/widgets switch(event->type) { --- 983,987 ---- break; } ! // events related to objects/widgets switch(event->type) { *************** *** 1012,1020 **** bool PG_Application::UnregisterObject(PG_MessageObject* obj) { ! if (lastwidget == obj) { lastwidget = NULL; } ! std::vector::iterator list = objectList.begin(); --- 1032,1040 ---- bool PG_Application::UnregisterObject(PG_MessageObject* obj) { ! if (lastwidget == obj) { lastwidget = NULL; } ! std::vector::iterator list = objectList.begin(); *************** *** 1196,1199 **** --- 1216,1227 ---- } } + } + + void PG_Application::DisableDirtyUpdates(bool disable) { + disableDirtyUpdates = disable; + } + + bool PG_Application::GetDirtyUpdatesDisabled() { + return disableDirtyUpdates; } Index: pgdatacontainer.cpp =================================================================== RCS file: /cvsroot/paragui/paragui/src/core/pgdatacontainer.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pgdatacontainer.cpp 15 Apr 2002 14:53:56 -0000 1.1 --- pgdatacontainer.cpp 18 Aug 2002 08:12:52 -0000 1.2 *************** *** 30,33 **** --- 30,38 ---- PG_DataContainer::PG_DataContainer(Uint32 size) { + if(size == 0) { + my_data = NULL; + my_size = 0; + } + my_data = new char[size]; my_size = size; *************** *** 35,39 **** PG_DataContainer::~PG_DataContainer() { ! delete[] my_data; } --- 40,46 ---- 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.2 diff -C2 -r1.1 -r1.2 *** pgfile.cpp 15 Apr 2002 14:53:56 -0000 1.1 --- pgfile.cpp 18 Aug 2002 08:12:52 -0000 1.2 *************** *** 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.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** pgfilearchive.cpp 18 Aug 2002 01:14:41 -0000 1.5 --- pgfilearchive.cpp 18 Aug 2002 08:12:52 -0000 1.6 *************** *** 2,20 **** 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 pipelka@teleweb.at --- 2,20 ---- 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 pipelka@teleweb.at *************** *** 38,41 **** --- 38,43 ---- #endif + #include "physfsrwops.h" + Uint32 PG_FileArchive::my_instance_count = 0; PG_SurfaceCache PG_FileArchive::my_cache; *************** *** 49,53 **** if(my_instance_count == 1) { if(PHYSFS_init("paragui") == 0) { ! PG_LogERR("Unable to initialize PhysicsFS !"); return; } --- 51,55 ---- if(my_instance_count == 1) { if(PHYSFS_init("paragui") == 0) { ! std::cerr << "Unable to initialize PhysicsFS !" << std::endl; return; } *************** *** 71,75 **** void PG_FileArchive::Deinit() { ! //PHYSFS_deinit(); } --- 73,77 ---- void PG_FileArchive::Deinit() { ! PHYSFS_deinit(); } *************** *** 83,87 **** --- 85,93 ---- 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; *************** *** 113,116 **** --- 119,139 ---- } + 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); *************** *** 165,168 **** --- 188,208 ---- } + SDL_RWops* PG_FileArchive::OpenFileRWops(const char* filename, PG_OPEN_MODE mode) { + SDL_RWops* file = NULL; + switch(mode) { + case PG_OPEN_READ: + file = PHYSFSRWOPS_openRead(filename); + break; + case PG_OPEN_WRITE: + file = PHYSFSRWOPS_openWrite(filename); + break; + case PG_OPEN_APPEND: + file = PHYSFSRWOPS_openAppend(filename); + break; + } + + return file; + } + bool PG_FileArchive::MakeDir(const char* dir) { return PHYSFS_mkdir(dir) == 1; *************** *** 238,243 **** surface = NULL; ! SDL_RWops *rw = PHYSFSRWOPS_openRead(filename); ! #ifdef HAVE_SDLIMAGE surface = IMG_Load_RW(rw, 1); --- 278,288 ---- surface = NULL; ! SDL_RWops *rw = OpenFileRWops(filename); ! ! if(rw == NULL) { ! PG_LogWRN("Unable to open '%s' !", filename); ! return NULL; ! } ! #ifdef HAVE_SDLIMAGE surface = IMG_Load_RW(rw, 1); *************** *** 245,249 **** surface = SDL_LoadBMP_RW(rw, 1); #endif ! if(convert) { SDL_Surface* tmpsrf = SDL_DisplayFormatAlpha(surface); --- 290,305 ---- surface = SDL_LoadBMP_RW(rw, 1); #endif ! ! 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()); ! } ! if(convert) { SDL_Surface* tmpsrf = SDL_DisplayFormatAlpha(surface); *************** *** 284,287 **** --- 340,368 ---- 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.2 diff -C2 -r1.1 -r1.2 *** pgfilelist.cpp 29 Apr 2002 11:44:22 -0000 1.1 --- pgfilelist.cpp 18 Aug 2002 08:12:52 -0000 1.2 *************** *** 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.2 diff -C2 -r1.1 -r1.2 *** pglog.cpp 15 Apr 2002 14:53:56 -0000 1.1 --- pglog.cpp 18 Aug 2002 08:12:52 -0000 1.2 *************** *** 27,30 **** --- 27,35 ---- */ + #include "pgapplication.h" + #include "pgwindow.h" + #include "pgrichedit.h" + #include "pglog.h" + #include #include *************** *** 34,45 **** #include - #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 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.2 diff -C2 -r1.1 -r1.2 *** pgmain.cpp 15 Apr 2002 14:53:56 -0000 1.1 --- pgmain.cpp 18 Aug 2002 08:12:52 -0000 1.2 *************** *** 29,36 **** #define _GNU_SOURCE #endif - #include #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 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.9 diff -C2 -r1.8 -r1.9 *** pgmessageobject.cpp 6 May 2002 11:18:03 -0000 1.8 --- pgmessageobject.cpp 18 Aug 2002 08:12:52 -0000 1.9 *************** *** 31,34 **** --- 31,37 ---- #include "pgapplication.h" + #include + #include + // 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.3 diff -C2 -r1.2 -r1.3 *** pgnavigator.cpp 16 Apr 2002 07:43:30 -0000 1.2 --- pgnavigator.cpp 18 Aug 2002 08:12:52 -0000 1.3 *************** *** 27,34 **** */ #include #include - - #include "pgnavigator.h" PG_Widget* PG_Navigator::my_currentWidget = NULL; --- 27,34 ---- */ + #include "pgnavigator.h" + #include #include PG_Widget* PG_Navigator::my_currentWidget = NULL; Index: pgrectlist.cpp =================================================================== RCS file: /cvsroot/paragui/paragui/src/core/pgrectlist.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** pgrectlist.cpp 29 Apr 2002 11:44:22 -0000 1.2 --- pgrectlist.cpp 18 Aug 2002 08:12:52 -0000 1.3 *************** *** 54,58 **** testwidget = (*this)[i]; ! if(!testwidget->IsVisible()) { continue; } --- 54,58 ---- testwidget = (*this)[i]; ! if(!testwidget->IsVisible() || testwidget->IsHidden()) { continue; } *************** *** 78,82 **** // check if the tested rect is visible ! if(!testrect->IsVisible()) { continue; } --- 78,82 ---- // 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.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** pgsurfacecache.cpp 25 Jun 2002 20:38:42 -0000 1.3 --- pgsurfacecache.cpp 18 Aug 2002 08:12:52 -0000 1.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 pipelka@teleweb.at ! 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 pipelka@teleweb.at ! Last Update: $Author$ Update Date: $Date$ *************** *** 30,33 **** --- 30,34 ---- #include "pgsurfacecache.h" #include "pglog.h" + #include #include *************** *** 131,135 **** gradient->colors[i].b ); ! strcat(tmpkey, colorkey); } --- 132,136 ---- gradient->colors[i].b ); ! strcat(tmpkey, colorkey); } --- physfsrwops.c DELETED --- From pipelka@teleweb.at Sun Aug 18 04:13:30 2002 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17gLBh-0002ap-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:13:29 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17gLBF-0002UZ-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:13:23 -0400 Received: from subversions.gnu.org ([199.232.41.2]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17gLBD-0002U2-00 for paragui-cvs@mail.freesoftware.fsf.org; Sun, 18 Aug 2002 04:12:59 -0400 Received: from braindead by subversions.gnu.org with local (Exim 3.35 #1 (Debian)) id 17gLBB-0003Kq-00; Sun, 18 Aug 2002 04:12:57 -0400 To: paragui-cvs@mail.freesoftware.fsf.org Message-Id: From: "Alexander Pipelka " Date: Sun, 18 Aug 2002 04:12:57 -0400 Subject: [paragui-cvs] CVS: paragui/test stress1.cpp,1.1,1.2 stress2.cpp,1.1,1.2 writefile.cpp,1.1,1.2 .cvsignore,1.2,1.3 Makefile.am,1.9,1.10 animation.cpp,1.3,1.4 dblbuffer.cpp,1.5,1.6 layouttest.cpp,1.2,1.3 list.cpp,1.3,1.4 paratest.cpp,1.12,1.13 pokus.xml,1.3,1.4 windowtest.cpp,1.1.1.1,1.2 autogen.sh,1.1.1.1,NONE Sender: paragui-cvs-admin@mail.freesoftware.fsf.org Errors-To: paragui-cvs-admin@mail.freesoftware.fsf.org X-BeenThere: paragui-cvs@mail.freesoftware.fsf.org X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: paragui-cvs@mail.freesoftware.fsf.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Update of /cvsroot/paragui/paragui/test In directory subversions:/tmp/cvs-serv12482/test Modified Files: .cvsignore Makefile.am animation.cpp dblbuffer.cpp layouttest.cpp list.cpp paratest.cpp pokus.xml windowtest.cpp Added Files: stress1.cpp stress2.cpp writefile.cpp Removed Files: autogen.sh Log Message: synced with the devel-1-0-x tree. Index: .cvsignore =================================================================== RCS file: /cvsroot/paragui/paragui/test/.cvsignore,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** .cvsignore 15 Apr 2002 13:35:36 -0000 1.2 --- .cvsignore 18 Aug 2002 08:12:53 -0000 1.3 *************** *** 16,18 **** layouttest windowtest dropdown windowresize ! --- 16,20 ---- layouttest windowtest dropdown windowresize ! listbox ! stress1 ! stress2 Index: Makefile.am =================================================================== RCS file: /cvsroot/paragui/paragui/test/Makefile.am,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** Makefile.am 27 Jun 2002 14:37:12 -0000 1.9 --- Makefile.am 18 Aug 2002 08:12:53 -0000 1.10 *************** *** 1,5 **** AUTOMAKE_OPTIONS = foreign ! noinst_PROGRAMS = xmlloader factory listbox tabbar animation dropdown paratest dblbuffer navtest layouttest windowresize xmlloader_SOURCES = xmlloader.cpp --- 1,7 ---- + #SUBDIRS = keyboard fireworks colorselector + AUTOMAKE_OPTIONS = foreign ! bin_PROGRAMS = writefile stress1 stress2 tabbar xmlloader listbox factory animation dropdown paratest dblbuffer navtest windowresize xmlloader_SOURCES = xmlloader.cpp *************** *** 15,56 **** tabbar_LDADD = $(PARAGUI_LIBS) windowresize_SOURCES = windowresize.cpp ! windowresize_LDADD = $(PARAGUI_LIBS) dropdown_SOURCES = dropdown.cpp ! dropdown_LDADD = $(PARAGUI_LIBS) animation_SOURCES = animation.cpp ! animation_LDADD = $(PARAGUI_LIBS) dblbuffer_SOURCES = dblbuffer.cpp ! dblbuffer_LDADD = $(PARAGUI_LIBS) paratest_SOURCES = paratest.cpp ! paratest_LDADD = $(PARAGUI_LIBS) navtest_SOURCES = navtest.cpp ! navtest_LDADD = $(PARAGUI_LIBS) ! #windowtest_SOURCES = windowtest.cpp ! #windowtest_LDADD = $(PARAGUI_LIBS) ! ! layouttest_SOURCES = layouttest.cpp ! layouttest_LDADD = $(PARAGUI_LIBS) ! ! INCLUDES = $(PARAGUI_CFLAGS) $(PACKAGE)-$(VERSION).tar.gz: dist EXTRA_DIST = \ pokus.xml \ icon.bmp - - dist-hook: - rm -rf `find $(distdir) -type d -name CVS -print` - - rpm: $(PACKAGE)-$(VERSION).tar.gz - cp $(PACKAGE)-$(VERSION).tar.gz /usr/src/redhat/SOURCES - rpm -ba $(PACKAGE).spec mlz: $(PACKAGE)-$(VERSION).tar.gz --- 17,55 ---- tabbar_LDADD = $(PARAGUI_LIBS) + writefile_SOURCES = writefile.cpp + writefile_LDADD = -L../src $(PARAGUI_LIBS) + + stress1_SOURCES = stress1.cpp + stress1_LDADD = -L../src $(PARAGUI_LIBS) + + stress2_SOURCES = stress2.cpp + stress2_LDADD = -L../src $(PARAGUI_LIBS) + windowresize_SOURCES = windowresize.cpp ! windowresize_LDADD = -L../src $(PARAGUI_LIBS) dropdown_SOURCES = dropdown.cpp ! dropdown_LDADD = -L../src $(PARAGUI_LIBS) animation_SOURCES = animation.cpp ! animation_LDADD = -L../src $(PARAGUI_LIBS) dblbuffer_SOURCES = dblbuffer.cpp ! dblbuffer_LDADD = -L../src $(PARAGUI_LIBS) paratest_SOURCES = paratest.cpp ! paratest_LDADD = -L../src $(PARAGUI_LIBS) navtest_SOURCES = navtest.cpp ! navtest_LDADD = -L../src $(PARAGUI_LIBS) ! INCLUDES = $(PARAGUI_CFLAGS) -I$(top_srcdir)/include $(PACKAGE)-$(VERSION).tar.gz: dist EXTRA_DIST = \ + dblbuffer.xml \ pokus.xml \ icon.bmp mlz: $(PACKAGE)-$(VERSION).tar.gz Index: animation.cpp =================================================================== RCS file: /cvsroot/paragui/paragui/test/animation.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** animation.cpp 25 Jun 2002 20:38:42 -0000 1.3 --- animation.cpp 18 Aug 2002 08:12:53 -0000 1.4 *************** *** 11,19 **** */ ! #include ! #include ! #include ! #include ! #include #define ID_APP_EXIT 1 --- 11,21 ---- */ ! #include "pgapplication.h" ! #include "pgpopupmenu.h" ! #include "pgbutton.h" ! #include "pgmenubar.h" ! #include "pgscrollbar.h" ! #include "pgtimerobject.h" ! #include "pglog.h" #define ID_APP_EXIT 1 *************** *** 40,44 **** } ! class PlayField : public PG_ThemeWidget { public: --- 42,46 ---- } ! class PlayField : public PG_ThemeWidget, public PG_TimerObject { public: *************** *** 49,53 **** ~PlayField(); ! void timer_callback(void); protected: --- 51,55 ---- ~PlayField(); ! Uint32 eventTimer(PG_TimerID id, Uint32 interval); protected: *************** *** 113,134 **** 1 ); } else if (tickstate == 1) { DrawHLine(0, my_height/2, my_width-1, my_color.r, my_color.g, my_color.b); } } ! void PlayField::timer_callback(void) { ! ! int prev_tickstate = tickstate; ! ! tickstate = (SDL_GetTicks()/1000)%3; ! ! if (tickstate != prev_tickstate) { ! Update(); ! } } ! class PlayField2 : public PG_ThemeWidget { public: --- 115,132 ---- 1 ); + tickstate = 1; } else if (tickstate == 1) { DrawHLine(0, my_height/2, my_width-1, my_color.r, my_color.g, my_color.b); + tickstate = 0; } } ! Uint32 PlayField::eventTimer(PG_TimerID id, Uint32 interval) { ! Update(); ! PG_TimerObject::eventTimer(id, interval); } ! class PlayField2 : public PG_ThemeWidget, public PG_TimerObject { public: *************** *** 140,144 **** ~PlayField2(); ! void timer_callback(void); protected: --- 138,142 ---- ~PlayField2(); ! Uint32 eventTimer(PG_TimerID id, Uint32 interval); protected: *************** *** 211,233 **** } ! void PlayField2::timer_callback(void) { ! ! int prev_tickstate = tickstate; ! ! tickstate = (SDL_GetTicks()%1000)/25; ! ! if (tickstate != prev_tickstate) { ! Update(); } - } - - Uint32 timer_callback(Uint32 interval, void* parameter) { - ((PlayField2 *)parameter)->timer_callback(); - return interval; - } ! bool appidle_handler(PG_MessageObject* object, PG_Pointer* data) { ! ((PlayField *)data)->timer_callback(); ! return true; } --- 209,223 ---- } ! Uint32 PlayField2::eventTimer(PG_TimerID id, Uint32 interval) { ! tickstate++; ! ! PG_LogDBG("eventTimer(%i, %i)", id, interval); ! ! if(tickstate >= 40) { ! tickstate = 0; } ! Update(); ! PG_TimerObject::eventTimer(id, interval); } *************** *** 310,315 **** ); ! // show me your .... lines ;-) ! anim_test.Show(); --- 300,304 ---- ); ! anim_test.AddTimer(400); anim_test.Show(); *************** *** 318,328 **** PG_Rect(260, 300, 120, 100) ); anim_test2.Show(); - - SDL_Init(SDL_INIT_TIMER); - SDL_AddTimer(20, timer_callback, (void *)&anim_test2); - - app.sigAppIdle.connect(slot(appidle_handler), &anim_test); - app.EnableAppIdleCalls(); app.Run(); --- 307,314 ---- PG_Rect(260, 300, 120, 100) ); + + anim_test2.AddTimer(40); + anim_test2.AddTimer(20); anim_test2.Show(); app.Run(); Index: dblbuffer.cpp =================================================================== RCS file: /cvsroot/paragui/paragui/test/dblbuffer.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** dblbuffer.cpp 25 Jun 2002 20:38:42 -0000 1.5 --- dblbuffer.cpp 18 Aug 2002 08:12:53 -0000 1.6 *************** *** 36,43 **** int LoadSprite(SDL_Surface *screen, char *file) { - SDL_Surface *temp; - /* Load the sprite image */ ! sprite = SDL_LoadBMP(file); if ( sprite == NULL ) { PG_LogMSG( "Couldn't load %s: %s", file, SDL_GetError()); --- 36,41 ---- int LoadSprite(SDL_Surface *screen, char *file) { /* Load the sprite image */ ! sprite = PG_FileArchive::LoadSurface(file, false); if ( sprite == NULL ) { PG_LogMSG( "Couldn't load %s: %s", file, SDL_GetError()); *************** *** 51,64 **** } - /* Convert sprite to video format */ - temp = SDL_DisplayFormat(sprite); - SDL_FreeSurface(sprite); - if ( temp == NULL ) { - PG_LogMSG( "Couldn't convert background: %s", - SDL_GetError()); - return(-1); - } - sprite = temp; - /* We're ready to roll. :) */ return(0); --- 49,52 ---- *************** *** 72,75 **** --- 60,65 ---- nupdates = 0; + SDL_SetAlpha(sprite, 0, 0); + /* Move the sprite, bounce at the wall, and draw */ for ( i=0; i(app.GetWidgetByName("fps")); - /* - if ( ! screen ) { - fprintf( "Couldn't set %dx%d video mode: %s", - width, height, SDL_GetError()); - exit(2); - } - */ screen = app.GetScreen(); - /* - screen = SDL_SetVideoMode(width, height, video_bpp, videoflags); - */ - /* Load the sprite */ if ( LoadSprite(screen, "icon.bmp") < 0 ) { --- 199,205 ---- *************** *** 229,233 **** mem = (Uint8 *)malloc(4*sizeof(SDL_Rect)*numsprites); if ( mem == NULL ) { - SDL_FreeSurface(sprite); PG_LogMSG("Out of memory!"); exit(2); --- 210,213 ---- *************** *** 289,314 **** done = 0; sprites_visible = 0; while ( !done ) { /* Check for events */ ++frames; while ( SDL_PollEvent(&event) ) { - /* - switch (event.type) { - case SDL_KEYDOWN: - // Any keypress quits the app... - case SDL_QUIT: - done = 1; - break; - default: - break; - } - */ app.PumpIntoEventQueue(&event); } now = SDL_GetTicks(); ! if ( now > then ) { fps->SetTextFormat("%2.2f FPS", ((double)frames*1000)/(now-then)); ! if((now-then) > 2000) { then = now; frames=0; --- 269,285 ---- done = 0; sprites_visible = 0; + while ( !done ) { /* Check for events */ ++frames; + while ( SDL_PollEvent(&event) ) { app.PumpIntoEventQueue(&event); } now = SDL_GetTicks(); ! if ( now > then+1000 ) { fps->SetTextFormat("%2.2f FPS", ((double)frames*1000)/(now-then)); ! if((now-then) > 1000) { then = now; frames=0; *************** *** 329,341 **** PG_Widget::BulkBlit(); } /* Update the screen! */ ! if ( (screen->flags & SDL_DOUBLEBUF) == SDL_DOUBLEBUF ) { ! SDL_Flip(screen); ! } else { ! SDL_UpdateRect(screen, 0,0,0,0); ! //SDL_UpdateRects(screen, nupdates, sprite_rects); ! } } - SDL_FreeSurface(sprite); free(mem); --- 300,307 ---- PG_Widget::BulkBlit(); } + /* Update the screen! */ ! SDL_Flip(screen); } free(mem); Index: layouttest.cpp =================================================================== RCS file: /cvsroot/paragui/paragui/test/layouttest.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** layouttest.cpp 26 Jun 2002 08:03:53 -0000 1.2 --- layouttest.cpp 18 Aug 2002 08:12:53 -0000 1.3 *************** *** 1,5 **** #include "paragui.h" - #include #include "pgapplication.h" int main() { --- 1,5 ---- #include "paragui.h" #include "pgapplication.h" + #include "pgwindow.h" int main() { *************** *** 17,22 **** } ! app.LoadLayout("pokus.xml"); // Enter main loop app.Run(); --- 17,26 ---- } ! PG_Window wnd(NULL, PG_Rect(0,0,400,300), "Test"); ! wnd.LoadLayout("pokus.xml"); + SDL_Delay(2000); + wnd.Show(); + // Enter main loop app.Run(); Index: list.cpp =================================================================== RCS file: /cvsroot/paragui/paragui/test/list.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** list.cpp 26 Jun 2002 16:00:21 -0000 1.3 --- list.cpp 18 Aug 2002 08:12:53 -0000 1.4 *************** *** 27,30 **** --- 27,32 ---- listbox.sigSelectItem.connect(slot(handleListBoxItem)); + listbox.Show(); + new PG_ListBoxItem(&listbox, 25, "Item1"); new PG_ListBoxItem(&listbox, 25, "Item2"); *************** *** 37,43 **** new PG_ListBoxItem(&listbox, 25, "Item9"); new PG_ListBoxItem(&listbox, 25, "Item10"); - - listbox.Show(); - app.Run(); --- 39,42 ---- Index: paratest.cpp =================================================================== RCS file: /cvsroot/paragui/paragui/test/paratest.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** paratest.cpp 26 Jun 2002 16:00:21 -0000 1.12 --- paratest.cpp 18 Aug 2002 08:12:53 -0000 1.13 *************** *** 29,34 **** void Splash() { PG_ThemeWidget splash(NULL, PG_Rect(100,100,600,400), true); splash.Show(); ! SDL_Delay(1000); splash.Hide(); } --- 29,39 ---- void Splash() { PG_ThemeWidget splash(NULL, PG_Rect(100,100,600,400), true); + PG_ThemeWidget splash1(&splash, PG_Rect(10,10,580,380)); + PG_ThemeWidget splash2(&splash1, PG_Rect(10,10,560,340)); + PG_Label l(&splash2, PG_Rect(10,10,540,320), "I'm a splash screen"); + l.SetAlignment(PG_TA_CENTER); + splash.Show(); ! SDL_Delay(5000); splash.Hide(); } *************** *** 285,289 **** // construct the application object PG_Application& app = PG_Application::GetInstance(); ! for(int c=1; cFindSurface("Pointer", "Pointer", "normal")); + //Splash(); + SDL_Color color; color.r = 255; *************** *** 351,360 **** wnd1.SetID(101); - //PG_Draw::DrawLine(0,0, app.GetScreenWidth()-1, app.GetScreenHeight()-1, color,1, app.GetScreen()); - // create 2 radiobutton groups PG_RadioButton radio1(NULL, 1, PG_Rect(50,0,200,25), "RadioButton 1"); PG_RadioButton radio2(NULL, 2, PG_Rect(50,25,200,25), "RadioButton 2", &radio1); PG_RadioButton radio3(NULL, 3, PG_Rect(50,50,200,25), "RadioButton 3", &radio1); PG_RadioButton radio4(NULL, 4, PG_Rect(50,90,200,25), "RadioButton 4"); --- 363,371 ---- wnd1.SetID(101); // create 2 radiobutton groups PG_RadioButton radio1(NULL, 1, PG_Rect(50,0,200,25), "RadioButton 1"); PG_RadioButton radio2(NULL, 2, PG_Rect(50,25,200,25), "RadioButton 2", &radio1); PG_RadioButton radio3(NULL, 3, PG_Rect(50,50,200,25), "RadioButton 3", &radio1); + radio1.SetAlignment(PG_TA_RIGHT); PG_RadioButton radio4(NULL, 4, PG_Rect(50,90,200,25), "RadioButton 4"); *************** *** 481,487 **** PG_LogMSG("'100' found by ID (name '%s')", tmp->GetName()); ! tmp = PG_Application::GetWidgetByName("WindowTwo"); ! if (tmp) ! PG_LogMSG("'WindowTwo' found by name (id %d)", tmp->GetID()); tmp = PG_Application::GetWidgetById(101); --- 492,498 ---- PG_LogMSG("'100' found by ID (name '%s')", tmp->GetName()); ! PG_Window* tempw = PG_Application::GetWidgetByName("WindowTwo"); ! if (tempw) ! PG_LogMSG("'WindowTwo' found by name (id %d)", tempw->GetID()); tmp = PG_Application::GetWidgetById(101); Index: pokus.xml =================================================================== RCS file: /cvsroot/paragui/paragui/test/pokus.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** pokus.xml 28 Jun 2002 10:33:50 -0000 1.3 --- pokus.xml 18 Aug 2002 08:12:53 -0000 1.4 *************** *** 26,30 **** !