You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(35) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(37) |
Feb
(10) |
Mar
|
Apr
(2) |
May
(17) |
Jun
(1) |
Jul
(14) |
Aug
(14) |
Sep
(4) |
Oct
|
Nov
(14) |
Dec
(4) |
2005 |
Jan
(6) |
Feb
|
Mar
|
Apr
(6) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
(92) |
Dec
(12) |
2006 |
Jan
(3) |
Feb
(4) |
Mar
|
Apr
(5) |
May
(3) |
Jun
(15) |
Jul
(3) |
Aug
(1) |
Sep
(29) |
Oct
(1) |
Nov
(6) |
Dec
(5) |
2007 |
Jan
(2) |
Feb
(2) |
Mar
|
Apr
(3) |
May
(14) |
Jun
(2) |
Jul
(16) |
Aug
(73) |
Sep
(12) |
Oct
(9) |
Nov
(27) |
Dec
(3) |
2008 |
Jan
(4) |
Feb
(4) |
Mar
(3) |
Apr
(8) |
May
(23) |
Jun
(4) |
Jul
(1) |
Aug
(3) |
Sep
(7) |
Oct
(5) |
Nov
(1) |
Dec
(1) |
2009 |
Jan
|
Feb
(10) |
Mar
|
Apr
(4) |
May
(4) |
Jun
(10) |
Jul
|
Aug
(1) |
Sep
|
Oct
(7) |
Nov
|
Dec
(1) |
2010 |
Jan
|
Feb
(1) |
Mar
|
Apr
(6) |
May
|
Jun
(3) |
Jul
(11) |
Aug
(1) |
Sep
|
Oct
(15) |
Nov
(1) |
Dec
(5) |
2011 |
Jan
(4) |
Feb
(1) |
Mar
(6) |
Apr
|
May
(22) |
Jun
|
Jul
(8) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
2012 |
Jan
|
Feb
(10) |
Mar
(1) |
Apr
(6) |
May
(27) |
Jun
(48) |
Jul
(30) |
Aug
(4) |
Sep
|
Oct
(3) |
Nov
(1) |
Dec
(11) |
2013 |
Jan
(4) |
Feb
(7) |
Mar
(6) |
Apr
(18) |
May
(28) |
Jun
(20) |
Jul
|
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
(2) |
Dec
(7) |
2014 |
Jan
(3) |
Feb
(2) |
Mar
(4) |
Apr
(9) |
May
(11) |
Jun
(10) |
Jul
|
Aug
(18) |
Sep
(12) |
Oct
(17) |
Nov
(10) |
Dec
(16) |
2015 |
Jan
(5) |
Feb
(1) |
Mar
(5) |
Apr
(4) |
May
(28) |
Jun
(2) |
Jul
|
Aug
|
Sep
(6) |
Oct
|
Nov
(2) |
Dec
(1) |
2016 |
Jan
(14) |
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
(3) |
Jul
(4) |
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
(1) |
2017 |
Jan
(11) |
Feb
|
Mar
(21) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(2) |
Sep
(4) |
Oct
(4) |
Nov
|
Dec
(1) |
2019 |
Jan
(1) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(13) |
Sep
(4) |
Oct
|
Nov
|
Dec
|
2020 |
Jan
(10) |
Feb
(9) |
Mar
(5) |
Apr
(4) |
May
(3) |
Jun
(18) |
Jul
(4) |
Aug
(2) |
Sep
(20) |
Oct
(2) |
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
2022 |
Jan
(1) |
Feb
(2) |
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(5) |
Sep
|
Oct
(1) |
Nov
|
Dec
(1) |
2023 |
Jan
(10) |
Feb
(7) |
Mar
(29) |
Apr
(31) |
May
(29) |
Jun
(34) |
Jul
(3) |
Aug
(24) |
Sep
(22) |
Oct
(10) |
Nov
(38) |
Dec
(27) |
2024 |
Jan
(15) |
Feb
(8) |
Mar
(4) |
Apr
(20) |
May
(33) |
Jun
(18) |
Jul
(15) |
Aug
(23) |
Sep
(26) |
Oct
(32) |
Nov
(6) |
Dec
(4) |
2025 |
Jan
(7) |
Feb
(1) |
Mar
(1) |
Apr
(4) |
May
(46) |
Jun
(19) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <at...@us...> - 2007-10-25 23:42:46
|
Revision: 515 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=515&view=rev Author: atani Date: 2007-10-25 16:42:44 -0700 (Thu, 25 Oct 2007) Log Message: ----------- misc updates for DS functionality Modified Paths: -------------- tiki/examples/Makefile tiki/examples/TikiTest/tikitest.cbp tiki/examples/net/basic/src/main.cpp tiki/examples/net/chat/src/main.cpp tiki/examples/net/chatd/src/main.cpp tiki/examples/net/httpclient/src/main.cpp tiki/nds/src/init_shutdown.cpp tiki/nds/src/platgl.cpp tiki/nds/tiki.cbp tiki/nds/tikiarm7/source/arm7main.c tiki/nds/tikiarm7/source/sound7.c tiki/sdl/src/platgl.cpp tiki/src/gl/gl.cpp tiki/src/gl/texture.cpp Added Paths: ----------- tiki/examples/nehe/ tiki/examples/nehe/Makefile tiki/examples/nehe/lesson01/ tiki/examples/nehe/lesson01/Makefile tiki/examples/nehe/lesson01/src/ tiki/examples/nehe/lesson01/src/main.cpp tiki/examples/nehe/lesson02/ tiki/examples/nehe/lesson02/Makefile tiki/examples/nehe/lesson02/src/ tiki/examples/nehe/lesson02/src/main.cpp Modified: tiki/examples/Makefile =================================================================== --- tiki/examples/Makefile 2007-09-11 17:57:54 UTC (rev 514) +++ tiki/examples/Makefile 2007-10-25 23:42:44 UTC (rev 515) @@ -1,5 +1,5 @@ -SUBDIRS = TikiTest console net +SUBDIRS = TikiTest console net nehe TIKI_DIR ?= $(CURDIR)/../ include $(TIKI_DIR)$(TIKI_PLAT)/Makefile.rules Modified: tiki/examples/TikiTest/tikitest.cbp =================================================================== --- tiki/examples/TikiTest/tikitest.cbp 2007-09-11 17:57:54 UTC (rev 514) +++ tiki/examples/TikiTest/tikitest.cbp 2007-10-25 23:42:44 UTC (rev 515) @@ -1,57 +1,42 @@ -<?xml version="1.0"?> -<!DOCTYPE CodeBlocks_project_file> +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_project_file> - <FileVersion major="1" minor="1"/> + <FileVersion major="1" minor="6" /> <Project> - <Option title="TikiTest"/> - <Option makefile="Makefile"/> - <Option makefile_is_custom="0"/> - <Option compiler="0"/> + <Option title="TikiTest" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> <Build> <Target title="default"> - <Option output="C:\projects\tiki\examples\TikiTest\tikitest.exe"/> - <Option working_dir="."/> - <Option object_output=".objs"/> - <Option deps_output=".deps"/> - <Option type="0"/> - <Option compiler="0"/> - <Option projectResourceIncludeDirsRelation="0"/> + <Option output="C:/projects/tiki/examples/TikiTest/tikitest.exe" prefix_auto="0" extension_auto="0" /> + <Option type="0" /> + <Option compiler="gcc" /> + <Option projectResourceIncludeDirsRelation="0" /> </Target> </Build> + <VirtualTargets> + <Add alias="All" targets="default;" /> + </VirtualTargets> <Compiler> - <Add directory="..\..\include"/> - <Add directory="..\..\win32\include"/> + <Add directory="../../include" /> + <Add directory="../../win32/include" /> </Compiler> <Linker> - <Add library="gdi32"/> - <Add library="user32"/> - <Add library="kernel32"/> - <Add library="tiki"/> - <Add library="opengl32"/> - <Add library="alut"/> - <Add directory="..\..\win32"/> - <Add directory="C:\Program Files\OpenAL 1.1 SDK\libs\Win32"/> + <Add library="gdi32" /> + <Add library="user32" /> + <Add library="kernel32" /> + <Add library="tiki" /> + <Add library="opengl32" /> + <Add library="alut" /> + <Add directory="../../win32" /> + <Add directory="C:/Program Files/OpenAL 1.1 SDK/libs/Win32" /> </Linker> - <Unit filename="src\TikiTest.cpp"> - <Option compilerVar="CPP"/> - <Option objectName="TikiTest.obj"/> - <Option target="default"/> - </Unit> - <Unit filename="src\test.cpp"> - <Option compilerVar="CPP"/> - <Option objectName="test.obj"/> - <Option target="default"/> - </Unit> - <Unit filename="src\testobj.cpp"> - <Option compilerVar="CPP"/> - <Option objectName="testobj.obj"/> - <Option target="default"/> - </Unit> - <Unit filename="src\testobj.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> + <Unit filename="src/TikiTest.cpp" /> + <Unit filename="src/test.cpp" /> + <Unit filename="src/testobj.cpp" /> + <Unit filename="src/testobj.h" /> + <Extensions> + <code_completion /> + <debugger /> + </Extensions> </Project> </CodeBlocks_project_file> Added: tiki/examples/nehe/Makefile =================================================================== --- tiki/examples/nehe/Makefile (rev 0) +++ tiki/examples/nehe/Makefile 2007-10-25 23:42:44 UTC (rev 515) @@ -0,0 +1,8 @@ + +SUBDIRS = lesson01 lesson02 + +TIKI_DIR ?= $(CURDIR)/../../ +include $(TIKI_DIR)$(TIKI_PLAT)/Makefile.rules + +all: subdirs +clean: clean_subdirs Added: tiki/examples/nehe/lesson01/Makefile =================================================================== --- tiki/examples/nehe/lesson01/Makefile (rev 0) +++ tiki/examples/nehe/lesson01/Makefile 2007-10-25 23:42:44 UTC (rev 515) @@ -0,0 +1,27 @@ + + +CFLAGS=-I$(TIKI_DIR)$(TIKI_PLAT)/include -I$(TIKI_DIR)include +OBJS = $(patsubst %.cpp,%.o,$(wildcard src/*.cpp)) + +ifeq ($(TIKI_PLAT),nds) +NDS_CART_CODE ?= NH01 +NDS_CART_ID ?= NH +NDS_CART_NAME ?= NeHe01 +NDS_CART_VERSION ?= 1 +endif + +all: nehe_lesson01 +nehe_lesson01: $(OBJS) + $(build_romdisk) + $(CXX) $(LDFLAGS) -L$(TIKI_DIR)$(TIKI_PLAT) -L$(TIKI_DIR)$(TIKI_PLAT)/lib $(OBJS) $(TIKI_BASE_LIBS) -o nehe_lesson01$(PLATFORM_BINARY_EXT) $(ROMDISK_OBJ) + $(post_build) + +clean: + -rm -f $(OBJS) nehe_lesson01$(PLATFORM_BINARY_EXT) $(ROMDISK_OBJ) +ifeq ($(TIKI_PLAT),nds) + -rm -f nehe_lesson01.nds nehe_lesson01.ds.gba +endif + +TIKI_DIR ?= $(CURDIR)/../../../ +DEPSDIR=$(CURDIR) +include $(TIKI_DIR)$(TIKI_PLAT)/Makefile.rules Property changes on: tiki/examples/nehe/lesson01/Makefile ___________________________________________________________________ Name: svn:executable + * Added: tiki/examples/nehe/lesson01/src/main.cpp =================================================================== --- tiki/examples/nehe/lesson01/src/main.cpp (rev 0) +++ tiki/examples/nehe/lesson01/src/main.cpp 2007-10-25 23:42:44 UTC (rev 515) @@ -0,0 +1,46 @@ +/**************************************** + * NDS NeHe Lesson 01 * + * Author: Dovoto * + ****************************************/ + +#include <Tiki/tiki.h> +#include <Tiki/gl.h> + +using namespace Tiki; +using namespace Tiki::GL; + +void DrawGLScene(); + +int main(int argc, char *argv[]) +{ + Tiki::init(argc, argv); + + while (1) + { + Frame::begin(); + + // Set the current matrix to be the model matrix + glMatrixMode(GL_MODELVIEW); + + // Set the color..not in nehe source...ds gl default will be black + glColor3f(1, 1, 1); + + //Push our original Matrix onto the stack (save state) + //glPushMatrix(); + + DrawGLScene(); + + // Pop our Matrix from the stack (restore state) + //glPopMatrix(); + + Frame::finish(); + } + + return 0; +} + +void DrawGLScene(void) +{ + //this is where the magic happens + glLoadIdentity(); +} Added: tiki/examples/nehe/lesson02/Makefile =================================================================== --- tiki/examples/nehe/lesson02/Makefile (rev 0) +++ tiki/examples/nehe/lesson02/Makefile 2007-10-25 23:42:44 UTC (rev 515) @@ -0,0 +1,27 @@ + + +CFLAGS=-I$(TIKI_DIR)$(TIKI_PLAT)/include -I$(TIKI_DIR)include +OBJS = $(patsubst %.cpp,%.o,$(wildcard src/*.cpp)) + +ifeq ($(TIKI_PLAT),nds) +NDS_CART_CODE ?= NH02 +NDS_CART_ID ?= NH +NDS_CART_NAME ?= NeHe02 +NDS_CART_VERSION ?= 1 +endif + +all: nehe_lesson02 +nehe_lesson02: $(OBJS) + $(build_romdisk) + $(CXX) $(LDFLAGS) -L$(TIKI_DIR)$(TIKI_PLAT) -L$(TIKI_DIR)$(TIKI_PLAT)/lib $(OBJS) $(TIKI_BASE_LIBS) -o nehe_lesson02$(PLATFORM_BINARY_EXT) $(ROMDISK_OBJ) + $(post_build) + +clean: + -rm -f $(OBJS) nehe_lesson02$(PLATFORM_BINARY_EXT) $(ROMDISK_OBJ) +ifeq ($(TIKI_PLAT),nds) + -rm -f nehe_lesson02.nds nehe_lesson02.ds.gba +endif + +TIKI_DIR ?= $(CURDIR)/../../../ +DEPSDIR=$(CURDIR) +include $(TIKI_DIR)$(TIKI_PLAT)/Makefile.rules Property changes on: tiki/examples/nehe/lesson02/Makefile ___________________________________________________________________ Name: svn:executable + * Added: tiki/examples/nehe/lesson02/src/main.cpp =================================================================== --- tiki/examples/nehe/lesson02/src/main.cpp (rev 0) +++ tiki/examples/nehe/lesson02/src/main.cpp 2007-10-25 23:42:44 UTC (rev 515) @@ -0,0 +1,59 @@ +/**************************************** + * NDS NeHe Lesson 02 * + * Author: Dovoto * + ****************************************/ + +#include <Tiki/tiki.h> +#include <Tiki/gl.h> + +using namespace Tiki; +using namespace Tiki::GL; + +void DrawGLScene(); + +int main(int argc, char *argv[]) +{ + Tiki::init(argc, argv); + + while (1) + { + + Frame::begin(); + Frame::set3d(); + + // Set the current matrix to be the model matrix + glMatrixMode(GL_MODELVIEW); + + //Push our original Matrix onto the stack (save state) + //glPushMatrix(); + + DrawGLScene(); + + // Pop our Matrix from the stack (restore state) + //glPopMatrix(); + + Frame::finish(); + + } + + return 0; +} + +void DrawGLScene() // Here's Where We Do All The Drawing +{ + + glLoadIdentity(); // Reset The Current Modelview Matrix + glTranslatef(-1.5f,0.0f,-6.0f); // Move Left 1.5 Units And Into The Screen 6.0 + glBegin(GL_TRIANGLES); // Drawing Using Triangles + glVertex3f( 0.0f, 1.0f, 0.0f); // Top + glVertex3f(-1.0f,-1.0f, 0.0f); // Bottom Left + glVertex3f( 1.0f,-1.0f, 0.0f); // Bottom Right + glEnd(); // Finished Drawing The Triangle + glTranslatef(3.0f,0.0f,0.0f); // Move Right 3 Units + glBegin(GL_QUADS); // Draw A Quad + glVertex3f(-1.0f, 1.0f, 0.0f); // Top Left + glVertex3f( 1.0f, 1.0f, 0.0f); // Top Right + glVertex3f( 1.0f,-1.0f, 0.0f); // Bottom Right + glVertex3f(-1.0f,-1.0f, 0.0f); // Bottom Left + glEnd(); // Done Drawing The Quad +} Modified: tiki/examples/net/basic/src/main.cpp =================================================================== --- tiki/examples/net/basic/src/main.cpp 2007-09-11 17:57:54 UTC (rev 514) +++ tiki/examples/net/basic/src/main.cpp 2007-10-25 23:42:44 UTC (rev 515) @@ -21,6 +21,8 @@ Tiki::Net::init(); + Tiki::Net::connect(); + RefPtr<Address> address = new Address(); address->setHostName("www.example.com"); address->setPort(80); @@ -50,6 +52,8 @@ socket->close(); + Tiki::Net::disconnect(); + Tiki::Net::shutdown(); return 0; } Modified: tiki/examples/net/chat/src/main.cpp =================================================================== --- tiki/examples/net/chat/src/main.cpp 2007-09-11 17:57:54 UTC (rev 514) +++ tiki/examples/net/chat/src/main.cpp 2007-10-25 23:42:44 UTC (rev 515) @@ -40,6 +40,7 @@ extern "C" int tiki_main( int argc, char **argv) { Tiki::init(argc, argv); Tiki::Net::init(); + Tiki::Net::connect(); Hid::callbackReg( tkCallback, NULL ); RefPtr<Address> remote = new Address(); @@ -59,6 +60,7 @@ } g_remoteconn->close(); + Tiki::Net::disconnect(); Tiki::Net::shutdown(); return 0; Modified: tiki/examples/net/chatd/src/main.cpp =================================================================== --- tiki/examples/net/chatd/src/main.cpp 2007-09-11 17:57:54 UTC (rev 514) +++ tiki/examples/net/chatd/src/main.cpp 2007-10-25 23:42:44 UTC (rev 515) @@ -114,6 +114,7 @@ Tiki::Net::init(); Hid::callbackReg( tkCallback, NULL ); + Tiki::Net::connect(); loadCommandHandlers(); @@ -148,6 +149,7 @@ } } + Tiki::Net::disconnect(); Tiki::Net::shutdown(); return 0; } Modified: tiki/examples/net/httpclient/src/main.cpp =================================================================== --- tiki/examples/net/httpclient/src/main.cpp 2007-09-11 17:57:54 UTC (rev 514) +++ tiki/examples/net/httpclient/src/main.cpp 2007-10-25 23:42:44 UTC (rev 515) @@ -37,6 +37,8 @@ Tiki::Net::init(); Hid::callbackReg( tkCallback, NULL ); + Tiki::Net::connect(); + HttpUserAgent *useragent = new HttpUserAgent(); useragent->setCookieJar(new CookieJar()); useragent->setIgnoreCookies(false); @@ -46,7 +48,6 @@ Request *request = new Request(); request->setUrl("http://www.google.com/"); - #if TIKI_PLAT == TIKI_DC RefPtr<Texture> cf = new Texture("/rd/pc-ascii.png", true); @@ -66,7 +67,7 @@ console->printf("Sending request: %s\n", request->getUrl().c_str()); Response *response = useragent->get(request); - + console->printf("response code: %d\n", response->getResultCode()); std::list<Cookie *> cookies = useragent->getCookieJar()->getCookies(); for(std::list<Cookie *>::iterator iter = cookies.begin(); @@ -109,6 +110,8 @@ delete request; delete useragent; + Tiki::Net::disconnect(); + Tiki::Net::shutdown(); Tiki::shutdown(); Modified: tiki/nds/src/init_shutdown.cpp =================================================================== --- tiki/nds/src/init_shutdown.cpp 2007-09-11 17:57:54 UTC (rev 514) +++ tiki/nds/src/init_shutdown.cpp 2007-10-25 23:42:44 UTC (rev 515) @@ -38,21 +38,51 @@ // Setup the Main screen for 3D videoSetMode( MODE_0_3D ); - vramSetBankA( VRAM_A_TEXTURE ); + + //vramSetBankA( VRAM_A_TEXTURE ); Tiki::Debug::printf("Enabling IRQs\n"); // IRQ basic setup - irqInit(); + irqInit(); + irqSet(IRQ_VBLANK, 0); Tiki::Debug::printf("Enabling GL\n"); // initialize the geometry engine glInit(); - glEnable(GL_TEXTURE_2D); + glEnable(GL_TEXTURE_2D); + + // Set our viewport to be the same size as the screen + glViewport(0,0,255,191); + + // enable antialiasing + glEnable(GL_ANTIALIAS); + glClearColor(0,0,0,31); // BG must be opaque for AA to work + glClearPolyID(63); // BG must have a unique polygon ID for AA to work + glClearDepth( 0x7FFFF ); + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluPerspective(70, 256.0 / 192.0, 0.1, 100); + glMatrixMode(GL_MODELVIEW); + + //need to set up some material properties since DS does not have them set by default + glMaterialf(GL_AMBIENT, RGB15(16,16,16)); + glMaterialf(GL_DIFFUSE, RGB15(16,16,16)); + glMaterialf(GL_SPECULAR, BIT(15) | RGB15(8,8,8)); + glMaterialf(GL_EMISSION, RGB15(16,16,16)); + + //ds uses a table for shinyness..this generates a half-ass one + glMaterialShinyness(); + + glPolyFmt(POLY_ALPHA(31) | POLY_CULL_NONE ); + + // set a default color. + glColor3f(1, 1, 1); - //Tiki::Debug::printf("Enabling libFAT\n"); + Tiki::Debug::printf("Enabling libFAT\n"); // initialize libfat - //fatInitDefault(); + fatInitDefault(); // initialize parallax GL::Plxcompat::plx_mat3d_init( 256, 192 ); Modified: tiki/nds/src/platgl.cpp =================================================================== --- tiki/nds/src/platgl.cpp 2007-09-11 17:57:54 UTC (rev 514) +++ tiki/nds/src/platgl.cpp 2007-10-25 23:42:44 UTC (rev 515) @@ -14,28 +14,54 @@ #include <unistd.h> #include <sys/time.h> + +static uint64 lastFrame = 0; +static uint64 firstFrame = 0; +static uint64 frameCnt = 0, totalFrameCnt = 0; + namespace Tiki { namespace GL { namespace Frame { + float getFrameRate() { - return 0.0f; + uint64 cur = Tiki::Time::gettime(); + + // Avoid divzero + if ( cur == firstFrame ) + return 0.0f; + + return ( float ) ( ( frameCnt * 1000000.0 ) / ( cur - firstFrame ) ); } -void setFrameRateLimit( int rate ) {} +void setFrameRateLimit( int rate ) { +} } extern "C" { - void tiki_wait_if_needed() {} - void tiki_scene_begin_hook() {} + void tiki_scene_begin_hook() { + if ( frameCnt >= 500 ) { + firstFrame = 0; + frameCnt = 0; + } + // Update frame counters. + if ( !firstFrame ) + firstFrame = Tiki::Time::gettime(); + frameCnt++; + totalFrameCnt++; + if ( frameCnt && !( frameCnt % 250 ) ) { + Debug::printf( "frame %d, fps = %.2f\n", ( int ) frameCnt, + ( double ) Tiki::GL::Frame::getFrameRate() ); + } + } + void tiki_scene_finish_hook() { glFlush( 0 ); - //swiWaitForVBlank(); - Tiki::Debug::printf("Frame::finish()\n"); + swiWaitForVBlank(); } void tiki_scene_begin_opaque_hook() {} Modified: tiki/nds/tiki.cbp =================================================================== --- tiki/nds/tiki.cbp 2007-09-11 17:57:54 UTC (rev 514) +++ tiki/nds/tiki.cbp 2007-10-25 23:42:44 UTC (rev 515) @@ -1,1537 +1,544 @@ -<?xml version="1.0"?> -<!DOCTYPE CodeBlocks_project_file> +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_project_file> - <FileVersion major="1" minor="1"/> + <FileVersion major="1" minor="6" /> <Project> - <Option title="Tiki"/> - <Option makefile="Makefile"/> - <Option makefile_is_custom="1"/> - <Option compiler="0"/> + <Option title="Tiki" /> + <Option makefile_is_custom="1" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> <Build> <Target title="default"> - <Option output="libtiki.a"/> - <Option working_dir=""/> - <Option object_output=".objs"/> - <Option deps_output=".deps"/> - <Option type="2"/> - <Option compiler="6"/> - <Option projectResourceIncludeDirsRelation="2"/> + <Option output="libtiki.a" prefix_auto="0" extension_auto="0" /> + <Option working_dir="" /> + <Option type="2" /> + <Option compiler="ppcgcc" /> + <Option projectResourceIncludeDirsRelation="2" /> </Target> </Build> + <VirtualTargets> + <Add alias="All" targets="default;" /> + </VirtualTargets> <Compiler> - <Add option="-O2"/> - <Add option="-MMD -MP -MF -march=armv5te -mtune=arm946e-s -fomit-frame-pointer -ffast-math -mthumb -mthumb-interwork -fno-rtti"/> - <Add option="-DARM9"/> - <Add directory="..\3rdparty\libjpeg"/> - <Add directory="..\3rdparty\libogg\include"/> - <Add directory="..\3rdparty\libogg\src"/> - <Add directory="..\3rdparty\libpng"/> - <Add directory="..\3rdparty\libvorbis\include"/> - <Add directory="..\3rdparty\libvorbis\lib"/> - <Add directory="..\3rdparty\tinyxml"/> - <Add directory="..\3rdparty\zlib"/> - <Add directory="..\include"/> - <Add directory="include"/> + <Add option="-O2" /> + <Add option="-MMD -MP -MF -march=armv5te -mtune=arm946e-s -fomit-frame-pointer -ffast-math -mthumb -mthumb-interwork -fno-rtti" /> + <Add option="-DARM9" /> + <Add directory="../3rdparty/libjpeg" /> + <Add directory="../3rdparty/libogg/include" /> + <Add directory="../3rdparty/libogg/src" /> + <Add directory="../3rdparty/libpng" /> + <Add directory="../3rdparty/libvorbis/include" /> + <Add directory="../3rdparty/libvorbis/lib" /> + <Add directory="../3rdparty/tinyxml" /> + <Add directory="../3rdparty/zlib" /> + <Add directory="../include" /> + <Add directory="include" /> </Compiler> - <Unit filename="..\3rdparty\libjpeg\jcapimin.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jcapimin.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jcapistd.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jcapistd.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jccoefct.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jccoefct.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jccolor.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jccolor.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jcdctmgr.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jcdctmgr.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jchuff.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jchuff.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jchuff.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jchuff.h" /> + <Unit filename="../3rdparty/libjpeg/jcinit.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jcinit.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jcmainct.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jcmainct.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jcmarker.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jcmarker.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jcmaster.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jcmaster.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jcomapi.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jcomapi.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jconfig.h" /> + <Unit filename="../3rdparty/libjpeg/jcparam.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jconfig.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jcphuff.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jcparam.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jcprepct.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jcphuff.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jcsample.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jcprepct.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jctrans.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jcsample.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jdapimin.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jctrans.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jdapistd.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jdapimin.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jdatadst.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jdapistd.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jdatasrc.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jdatadst.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jdcoefct.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jdatasrc.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jdcolor.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jdcoefct.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jdct.h" /> + <Unit filename="../3rdparty/libjpeg/jddctmgr.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jdcolor.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jdhuff.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jdct.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jdhuff.h" /> + <Unit filename="../3rdparty/libjpeg/jdinput.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jddctmgr.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jdmainct.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jdhuff.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jdmarker.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jdhuff.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jdmaster.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jdinput.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jdmerge.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jdmainct.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jdphuff.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jdmarker.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jdpostct.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jdmaster.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jdsample.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jdmerge.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jdtrans.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jdphuff.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jerror.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jdpostct.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jerror.h" /> + <Unit filename="../3rdparty/libjpeg/jfdctflt.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jdsample.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jfdctfst.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jdtrans.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jfdctint.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jerror.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jidctflt.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jerror.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jidctfst.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jfdctflt.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jidctint.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jfdctfst.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jidctred.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jfdctint.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jinclude.h" /> + <Unit filename="../3rdparty/libjpeg/jmemmgr.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jidctflt.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jmemnobs.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jidctfst.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jmemsys.h" /> + <Unit filename="../3rdparty/libjpeg/jmorecfg.h" /> + <Unit filename="../3rdparty/libjpeg/jpegint.h" /> + <Unit filename="../3rdparty/libjpeg/jpeglib.h" /> + <Unit filename="../3rdparty/libjpeg/jquant1.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jidctint.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jquant2.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jidctred.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jutils.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jinclude.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> + <Unit filename="../3rdparty/libjpeg/jversion.h" /> + <Unit filename="../3rdparty/libogg/include/ogg/ogg.h" /> + <Unit filename="../3rdparty/libogg/include/ogg/os_types.h" /> + <Unit filename="../3rdparty/libogg/src/bitwise.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jmemmgr.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libogg/src/framing.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jmemnobs.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libpng/png.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jmemsys.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> + <Unit filename="../3rdparty/libpng/png.h" /> + <Unit filename="../3rdparty/libpng/pngconf.h" /> + <Unit filename="../3rdparty/libpng/pngerror.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jmorecfg.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> + <Unit filename="../3rdparty/libpng/pnggccrd.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jpegint.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> + <Unit filename="../3rdparty/libpng/pngget.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jpeglib.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> + <Unit filename="../3rdparty/libpng/pngmem.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jquant1.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libpng/pngpread.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jquant2.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libpng/pngread.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jutils.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libpng/pngrio.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jversion.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> + <Unit filename="../3rdparty/libpng/pngrtran.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libogg\include\ogg\ogg.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> + <Unit filename="../3rdparty/libpng/pngrutil.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libogg\include\ogg\os_types.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> + <Unit filename="../3rdparty/libpng/pngset.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libogg\src\bitwise.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libpng/pngtrans.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libogg\src\framing.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libpng/pngvcrd.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libpng\png.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libpng/pngwio.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libpng\png.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> + <Unit filename="../3rdparty/libpng/pngwrite.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libpng\pngconf.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> + <Unit filename="../3rdparty/libpng/pngwtran.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libpng\pngerror.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libpng/pngwutil.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libpng\pnggccrd.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libvorbis/include/vorbis/codec.h" /> + <Unit filename="../3rdparty/libvorbis/include/vorbis/vorbisenc.h" /> + <Unit filename="../3rdparty/libvorbis/include/vorbis/vorbisfile.h" /> + <Unit filename="../3rdparty/libvorbis/lib/analysis.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libpng\pngget.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libvorbis/lib/backends.h" /> + <Unit filename="../3rdparty/libvorbis/lib/barkmel.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libpng\pngmem.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libvorbis/lib/bitrate.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libpng\pngpread.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libvorbis/lib/bitrate.h" /> + <Unit filename="../3rdparty/libvorbis/lib/block.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libpng\pngread.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libvorbis/lib/books/coupled/res_books_stereo.h" /> + <Unit filename="../3rdparty/libvorbis/lib/books/floor/floor_books.h" /> + <Unit filename="../3rdparty/libvorbis/lib/books/uncoupled/res_books_uncoupled.h" /> + <Unit filename="../3rdparty/libvorbis/lib/codebook.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libpng\pngrio.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libvorbis/lib/codebook.h" /> + <Unit filename="../3rdparty/libvorbis/lib/codec_internal.h" /> + <Unit filename="../3rdparty/libvorbis/lib/envelope.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libpng\pngrtran.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libvorbis/lib/envelope.h" /> + <Unit filename="../3rdparty/libvorbis/lib/floor0.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libpng\pngrutil.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libvorbis/lib/floor1.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libpng\pngset.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libvorbis/lib/highlevel.h" /> + <Unit filename="../3rdparty/libvorbis/lib/info.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libpng\pngtrans.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libvorbis/lib/lookup.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libpng\pngvcrd.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libvorbis/lib/lookup.h" /> + <Unit filename="../3rdparty/libvorbis/lib/lookup_data.h" /> + <Unit filename="../3rdparty/libvorbis/lib/lpc.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libpng\pngwio.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libvorbis/lib/lpc.h" /> + <Unit filename="../3rdparty/libvorbis/lib/lsp.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libpng\pngwrite.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libvorbis/lib/lsp.h" /> + <Unit filename="../3rdparty/libvorbis/lib/mapping0.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libpng\pngwtran.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libvorbis/lib/masking.h" /> + <Unit filename="../3rdparty/libvorbis/lib/mdct.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libpng\pngwutil.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libvorbis/lib/mdct.h" /> + <Unit filename="../3rdparty/libvorbis/lib/misc.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/floor_all.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/psych_11.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/psych_16.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/psych_44.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/psych_8.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/residue_16.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/residue_44.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/residue_44u.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/residue_8.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/setup_11.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/setup_16.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/setup_22.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/setup_32.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/setup_44.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/setup_44u.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/setup_8.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/setup_X.h" /> + <Unit filename="../3rdparty/libvorbis/lib/os.h" /> + <Unit filename="../3rdparty/libvorbis/lib/psy.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libvorbis\include\vorbis\codec.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> + <Unit filename="../3rdparty/libvorbis/lib/psy.h" /> + <Unit filename="../3rdparty/libvorbis/lib/registry.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libvorbis\include\vorbis\vorbisenc.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> + <Unit filename="../3rdparty/libvorbis/lib/registry.h" /> + <Unit filename="../3rdparty/libvorbis/lib/res0.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libvorbis\include\vorbis\vorbisfile.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> + <Unit filename="../3rdparty/libvorbis/lib/scales.h" /> + <Unit filename="../3rdparty/libvorbis/lib/sharedbook.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\analysis.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libvorbis/lib/smallft.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\backends.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> + <Unit filename="../3rdparty/libvorbis/lib/smallft.h" /> + <Unit filename="../3rdparty/libvorbis/lib/synthesis.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\barkmel.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libvorbis/lib/vorbisenc.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\bitrate.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libvorbis/lib/vorbisfile.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\bitrate.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> + <Unit filename="../3rdparty/libvorbis/lib/window.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\block.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/libvorbis/lib/window.h" /> + <Unit filename="../3rdparty/tinyxml/tinyxml.cpp" /> + <Unit filename="../3rdparty/tinyxml/tinyxml.h" /> + <Unit filename="../3rdparty/tinyxml/tinyxmlerror.cpp" /> + <Unit filename="../3rdparty/tinyxml/tinyxmlparser.cpp" /> + <Unit filename="../3rdparty/zlib/adler32.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\books\coupled\res_books_stereo.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> + <Unit filename="../3rdparty/zlib/compress.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\books\floor\floor_books.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> + <Unit filename="../3rdparty/zlib/crc32.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\books\uncoupled\res_books_uncoupled.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> + <Unit filename="../3rdparty/zlib/crc32.h" /> + <Unit filename="../3rdparty/zlib/deflate.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\codebook.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/zlib/deflate.h" /> + <Unit filename="../3rdparty/zlib/gzio.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\codebook.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> + <Unit filename="../3rdparty/zlib/infback.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\codec_internal.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> + <Unit filename="../3rdparty/zlib/inffast.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\envelope.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/zlib/inffast.h" /> + <Unit filename="../3rdparty/zlib/inffixed.h" /> + <Unit filename="../3rdparty/zlib/inflate.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\envelope.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> + <Unit filename="../3rdparty/zlib/inflate.h" /> + <Unit filename="../3rdparty/zlib/inftrees.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\floor0.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/zlib/inftrees.h" /> + <Unit filename="../3rdparty/zlib/trees.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\floor1.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Unit filename="../3rdparty/zlib/trees.h" /> + <Unit filename="../3rdparty/zlib/uncompr.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\highlevel.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> + <Unit filename="../3rdparty/zlib/zconf.h" /> + <Unit filename="../3rdparty/zlib/zlib.h" /> + <Unit filename="../3rdparty/zlib/zutil.c"> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\info.c"> - <Option compilerVar="CC"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\lookup.c"> - <Option compilerVar="CC"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\lookup.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\lookup_data.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\lpc.c"> - <Option compilerVar="CC"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\lpc.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\lsp.c"> - <Option compilerVar="CC"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\lsp.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\mapping0.c"> - <Option compilerVar="CC"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\masking.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\mdct.c"> - <Option compilerVar="CC"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\mdct.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\misc.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\modes\floor_all.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\modes\psych_11.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\modes\psych_16.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\modes\psych_44.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\modes\psych_8.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\modes\residue_16.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\modes\residue_44.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\modes\residue_44u.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\modes\residue_8.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\modes\setup_11.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\modes\setup_16.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\modes\setup_22.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\modes\setup_32.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\modes\setup_44.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\modes\setup_44u.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\modes\setup_8.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\modes\setup_X.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\os.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\psy.c"> - <Option compilerVar="CC"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\psy.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\registry.c"> - <Option compilerVar="CC"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\registry.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\res0.c"> - <Option compilerVar="CC"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\scales.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\sharedbook.c"> - <Option compilerVar="CC"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\smallft.c"> - <Option compilerVar="CC"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\smallft.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\synthesis.c"> - <Option compilerVar="CC"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\vorbisenc.c"> - <Option compilerVar="CC"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\vorbisfile.c"> - <Option compilerVar="CC"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\window.c"> - <Option compilerVar="CC"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\libvorbis\lib\window.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\tinyxml\tinyxml.cpp"> - <Option compilerVar="CPP"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\tinyxml\tinyxml.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\tinyxml\tinyxmlerror.cpp"> - <Option compilerVar="CPP"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\tinyxml\tinyxmlparser.cpp"> - <Option compilerVar="CPP"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\zlib\adler32.c"> - <Option compilerVar="CC"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\zlib\compress.c"> - <Option compilerVar="CC"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\zlib\crc32.c"> - <Option compilerVar="CC"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\zlib\crc32.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\zlib\deflate.c"> - <Option compilerVar="CC"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\zlib\deflate.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\zlib\gzio.c"> - <Option compilerVar="CC"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\zlib\infback.c"> - <Option compilerVar="CC"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\zlib\inffast.c"> - <Option compilerVar="CC"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\zlib\inffast.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\zlib\inffixed.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\zlib\inflate.c"> - <Option compilerVar="CC"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\zlib\inflate.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\zlib\inftrees.c"> - <Option compilerVar="CC"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\zlib\inftrees.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\zlib\trees.c"> - <Option compilerVar="CC"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\zlib\trees.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\zlib\uncompr.c"> - <Option compilerVar="CC"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\zlib\zconf.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\zlib\zlib.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\zlib\zutil.c"> - <Option compilerVar="CC"/> - <Option target="default"/> - </Unit> - <Unit filename="..\3rdparty\zlib\zutil.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\include\Tiki\TikiAll.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\include\Tiki\animation.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\include\Tiki\anims\alphafader.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\include\Tiki\anims\alpharotate.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\include\Tiki\anims\expxymover.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\include\Tiki\anims\logxymover.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\include\Tiki\anims\sleep.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\include\Tiki\anims\tintfader.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\include\Tiki\bspline.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\include\Tiki\color.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\include\Tiki\color3.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\include\Tiki\debug.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\include\Tiki\drawable.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\include\Tiki\drawables\banner.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\include\Tiki\drawables\console.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\include\Tiki\drawables\cursor.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\include\Tiki\drawables\label.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\include\Tiki\drawables\layer.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\include\Tiki\drawables\pointerArrow.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\include\Tiki\drawables\texturetile.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\include\Tiki\endian.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\include\Tiki\eventcollector.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\include\Tiki\file.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> - <Unit filename="..\include\Tiki\font.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <O... [truncated message content] |
From: <at...@us...> - 2007-09-11 17:57:58
|
Revision: 514 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=514&view=rev Author: atani Date: 2007-09-11 10:57:54 -0700 (Tue, 11 Sep 2007) Log Message: ----------- change init flags to be TIKI_INIT_* to prevent conflicts with KOS Modified Paths: -------------- tiki/examples/net/chatd/src/ChatServer.cpp tiki/examples/net/httpclient/src/HttpClient.cpp tiki/include/Tiki/tiki.h tiki/sdl/src/init_shutdown.cpp tiki/sdl/src/plathid.cpp tiki/src/base/init_flags_default.cpp tiki/win32/src/init_shutdown.cpp tiki/win32/src/platgl.cpp Property Changed: ---------------- tiki/examples/TikiTest/ tiki/examples/console/TikiSnake/ Property changes on: tiki/examples/TikiTest ___________________________________________________________________ Name: svn:ignore - Debug Release *.user *.nds *.ds.gba + Debug Release *.user *.nds *.ds.gba *.elf Property changes on: tiki/examples/console/TikiSnake ___________________________________________________________________ Name: svn:ignore - Debug Release *.user *.nds *.ds.gba + Debug Release *.user *.nds *.ds.gba *.elf Modified: tiki/examples/net/chatd/src/ChatServer.cpp =================================================================== --- tiki/examples/net/chatd/src/ChatServer.cpp 2007-09-11 16:37:50 UTC (rev 513) +++ tiki/examples/net/chatd/src/ChatServer.cpp 2007-09-11 17:57:54 UTC (rev 514) @@ -9,7 +9,7 @@ #include <Tiki/tiki.h> #include <pch.h> -TIKI_INIT_FLAGS(INIT_NONE); +TIKI_INIT_FLAGS(TIKI_INIT_NOTHING); #if TIKI_PLAT == TIKI_WIN32 #include <windows.h> Modified: tiki/examples/net/httpclient/src/HttpClient.cpp =================================================================== --- tiki/examples/net/httpclient/src/HttpClient.cpp 2007-09-11 16:37:50 UTC (rev 513) +++ tiki/examples/net/httpclient/src/HttpClient.cpp 2007-09-11 17:57:54 UTC (rev 514) @@ -9,6 +9,11 @@ #include <Tiki/tiki.h> #include <pch.h> +#if TIKI_PLAT == TIKI_DC +extern uint8 romdisk[]; +KOS_INIT_ROMDISK(romdisk); +#endif + #if TIKI_PLAT == TIKI_WIN32 #include <windows.h> Modified: tiki/include/Tiki/tiki.h =================================================================== --- tiki/include/Tiki/tiki.h 2007-09-11 16:37:50 UTC (rev 513) +++ tiki/include/Tiki/tiki.h 2007-09-11 17:57:54 UTC (rev 514) @@ -64,27 +64,27 @@ #define TIKI_INIT_FLAGS(flags) uint32 Tiki::g_tiki_init_flags = (flags); typedef enum { // HID options - INIT_HID_KEYBOARD = 0x00000001, - INIT_HID_MOUSE = 0x00000002, - INIT_HID_JOYSTICK = 0x00000004, - INIT_HID_DEFAULT = INIT_HID_KEYBOARD | INIT_HID_MOUSE | INIT_HID_JOYSTICK, - INIT_HID_MASK = 0x000000FF, + TIKI_INIT_HID_KEYBOARD = 0x00000001, + TIKI_INIT_HID_MOUSE = 0x00000002, + TIKI_INIT_HID_JOYSTICK = 0x00000004, + TIKI_INIT_HID_DEFAULT = TIKI_INIT_HID_KEYBOARD | TIKI_INIT_HID_MOUSE | TIKI_INIT_HID_JOYSTICK, + TIKI_INIT_HID_MASK = 0x000000FF, // Graphic related options - INIT_VIDEO_WINDOWED = 0x00000100, - INIT_VIDEO_FULLSCREEN = 0x00000200, - INIT_VIDEO_CENTERED = 0x00000400, - INIT_VIDEO_DEFAULT = INIT_VIDEO_WINDOWED | INIT_VIDEO_CENTERED, - INIT_VIDEO_MASK = 0x0000FF00, + TIKI_INIT_VIDEO_WINDOWED = 0x00000100, + TIKI_INIT_VIDEO_FULLSCREEN = 0x00000200, + TIKI_INIT_VIDEO_CENTERED = 0x00000400, + TIKI_INIT_VIDEO_DEFAULT = TIKI_INIT_VIDEO_WINDOWED | TIKI_INIT_VIDEO_CENTERED, + TIKI_INIT_VIDEO_MASK = 0x0000FF00, // Audio related options - INIT_AUDIO_STREAM = 0x00010000, - INIT_AUDIO_SFX = 0x00020000, - INIT_AUDIO_DEFAULT = INIT_AUDIO_STREAM | INIT_AUDIO_SFX, - INIT_AUDIO_MASK = 0x00FF0000, + TIKI_INIT_AUDIO_STREAM = 0x00010000, + TIKI_INIT_AUDIO_SFX = 0x00020000, + TIKI_INIT_AUDIO_DEFAULT = TIKI_INIT_AUDIO_STREAM | TIKI_INIT_AUDIO_SFX, + TIKI_INIT_AUDIO_MASK = 0x00FF0000, - INIT_NONE = 0x00000000, - INIT_DEFAULT = INIT_HID_DEFAULT | INIT_VIDEO_DEFAULT | INIT_AUDIO_DEFAULT, + TIKI_INIT_NOTHING = 0x00000000, + TIKI_INIT_DEFAULTS = TIKI_INIT_HID_DEFAULT | TIKI_INIT_VIDEO_DEFAULT | TIKI_INIT_AUDIO_DEFAULT, } TIKI_INIT_FLAGS_ENUM; } Modified: tiki/sdl/src/init_shutdown.cpp =================================================================== --- tiki/sdl/src/init_shutdown.cpp 2007-09-11 16:37:50 UTC (rev 513) +++ tiki/sdl/src/init_shutdown.cpp 2007-09-11 17:57:54 UTC (rev 514) @@ -23,7 +23,7 @@ fprintf( stderr, "Unable to initialize SDL: %s\n", SDL_GetError() ); return false; } - if(g_tiki_init_flags & INIT_AUDIO_MASK) { + if(g_tiki_init_flags & TIKI_INIT_AUDIO_MASK) { // OpenAL team doesnt seem to increment version numbers when they make signature changes // use the header ifdef/endif flag to figure out version since this seems to have changed // between the compatible versions @@ -43,14 +43,14 @@ alcProcessContext( context ); } } - if(g_tiki_init_flags & INIT_AUDIO_SFX) { + if(g_tiki_init_flags & TIKI_INIT_AUDIO_SFX) { Audio::Sound::initGlobal(); } - if(g_tiki_init_flags & INIT_AUDIO_STREAM) { + if(g_tiki_init_flags & TIKI_INIT_AUDIO_STREAM) { Audio::Stream::initGlobal(); } } - if(g_tiki_init_flags & INIT_VIDEO_MASK) { + if(g_tiki_init_flags & TIKI_INIT_VIDEO_MASK) { if ( SDL_SetVideoMode( 640, 480, 16, SDL_OPENGL ) == NULL ) { fprintf( stderr, "Unable to Create OpenGL Window: %s\n", SDL_GetError() ); return false; @@ -72,10 +72,10 @@ } void shutdown() { - if(g_tiki_init_flags & INIT_AUDIO_SFX) { + if(g_tiki_init_flags & TIKI_INIT_AUDIO_SFX) { Audio::Sound::shutdownGlobal(); } - if(g_tiki_init_flags & INIT_AUDIO_STREAM) { + if(g_tiki_init_flags & TIKI_INIT_AUDIO_STREAM) { Audio::Stream::shutdownGlobal(); } Hid::shutdown(); Modified: tiki/sdl/src/plathid.cpp =================================================================== --- tiki/sdl/src/plathid.cpp 2007-09-11 16:37:50 UTC (rev 513) +++ tiki/sdl/src/plathid.cpp 2007-09-11 17:57:54 UTC (rev 514) @@ -64,7 +64,7 @@ bool Hid::platInit() { char junk = '0'; - if(g_tiki_init_flags & INIT_HID_KEYBOARD) { + if(g_tiki_init_flags & TIKI_INIT_HID_KEYBOARD) { Tiki::Debug::printf("Initializing Keyboard\n"); SDLkb = new KbDevice(); keybd_thread = SDL_CreateThread( HandleKeyboard, &junk ); @@ -73,7 +73,7 @@ evtKB.dev = SDLkb; sendEvent( evtKB ); } - if(g_tiki_init_flags & INIT_HID_MOUSE) { + if(g_tiki_init_flags & TIKI_INIT_HID_MOUSE) { Tiki::Debug::printf("Initializing Mouse\n"); SDLMouse = new MouseDevice(); SDLMouse->setXY( 0, 0 ); @@ -91,14 +91,14 @@ void Hid::platShutdown() { done = 1; SDL_Delay( 20 ); - if(g_tiki_init_flags & INIT_HID_MOUSE) { + if(g_tiki_init_flags & TIKI_INIT_HID_MOUSE) { Tiki::Debug::printf("Detaching Mouse\n"); SDL_WaitThread( mouse_thread, NULL ); Event evtMouse( Event::EvtDetach ); evtMouse.dev = SDLMouse; sendEvent( evtMouse ); } - if(g_tiki_init_flags & INIT_HID_KEYBOARD) { + if(g_tiki_init_flags & TIKI_INIT_HID_KEYBOARD) { Tiki::Debug::printf("Detaching Keyboard\n"); SDL_WaitThread( keybd_thread, NULL ); Event evtKB( Event::EvtDetach ); Modified: tiki/src/base/init_flags_default.cpp =================================================================== --- tiki/src/base/init_flags_default.cpp 2007-09-11 16:37:50 UTC (rev 513) +++ tiki/src/base/init_flags_default.cpp 2007-09-11 17:57:54 UTC (rev 514) @@ -9,4 +9,4 @@ #include "pch.h" #include "Tiki/tiki.h" -TIKI_INIT_FLAGS(INIT_DEFAULT); +TIKI_INIT_FLAGS(TIKI_INIT_DEFAULTS); Modified: tiki/win32/src/init_shutdown.cpp =================================================================== --- tiki/win32/src/init_shutdown.cpp 2007-09-11 16:37:50 UTC (rev 513) +++ tiki/win32/src/init_shutdown.cpp 2007-09-11 17:57:54 UTC (rev 514) @@ -16,7 +16,7 @@ // Let us run with millisecond precision if possible. timeBeginPeriod( 1 ); - if(g_tiki_init_flags & INIT_AUDIO_MASK) { + if(g_tiki_init_flags & TIKI_INIT_AUDIO_MASK) { ALCdevice *dev = NULL; ALCcontext *ctx = NULL; @@ -28,15 +28,15 @@ alcProcessContext( ctx ); } // if } // if - if(g_tiki_init_flags & INIT_AUDIO_SFX) { + if(g_tiki_init_flags & TIKI_INIT_AUDIO_SFX) { Audio::Sound::initGlobal(); } - if(g_tiki_init_flags & INIT_AUDIO_STREAM) { + if(g_tiki_init_flags & TIKI_INIT_AUDIO_STREAM) { Audio::Stream::initGlobal(); } } - if(g_tiki_init_flags & INIT_AUDIO_STREAM) { + if(g_tiki_init_flags & TIKI_INIT_VIDEO_MASK) { GL::Plxcompat::plx_mat3d_init( 640, 480 ); } @@ -45,10 +45,10 @@ void Tiki::shutdown() { Hid::shutdown(); - if(g_tiki_init_flags & INIT_AUDIO_STREAM) { + if(g_tiki_init_flags & TIKI_INIT_AUDIO_STREAM) { Audio::Stream::shutdownGlobal(); } - if(g_tiki_init_flags & INIT_AUDIO_SFX) { + if(g_tiki_init_flags & TIKI_INIT_AUDIO_SFX) { Audio::Sound::shutdownGlobal(); } Modified: tiki/win32/src/platgl.cpp =================================================================== --- tiki/win32/src/platgl.cpp 2007-09-11 16:37:50 UTC (rev 513) +++ tiki/win32/src/platgl.cpp 2007-09-11 17:57:54 UTC (rev 514) @@ -109,12 +109,12 @@ UINT min = WM_KEYFIRST, max = WM_MOUSELAST; - if(g_tiki_init_flags & INIT_HID_KEYBOARD && - !(g_tiki_init_flags & INIT_HID_MOUSE)) { + if(g_tiki_init_flags & TIKI_INIT_HID_KEYBOARD && + !(g_tiki_init_flags & TIKI_INIT_HID_MOUSE)) { max = WM_KEYLAST; } - else if(g_tiki_init_flags & INIT_HID_MOUSE && - !(g_tiki_init_flags & INIT_HID_KEYBOARD)) { + else if(g_tiki_init_flags & TIKI_INIT_HID_MOUSE && + !(g_tiki_init_flags & TIKI_INIT_HID_KEYBOARD)) { min = WM_MOUSEFIRST; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-09-11 16:37:55
|
Revision: 513 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=513&view=rev Author: atani Date: 2007-09-11 09:37:50 -0700 (Tue, 11 Sep 2007) Log Message: ----------- fix openal version check crap Modified Paths: -------------- tiki/sdl/src/init_shutdown.cpp Modified: tiki/sdl/src/init_shutdown.cpp =================================================================== --- tiki/sdl/src/init_shutdown.cpp 2007-09-11 01:50:14 UTC (rev 512) +++ tiki/sdl/src/init_shutdown.cpp 2007-09-11 16:37:50 UTC (rev 513) @@ -24,7 +24,10 @@ return false; } if(g_tiki_init_flags & INIT_AUDIO_MASK) { -#ifdef AL_LINUX +// OpenAL team doesnt seem to increment version numbers when they make signature changes +// use the header ifdef/endif flag to figure out version since this seems to have changed +// between the compatible versions +#ifndef ALC_CONTEXT_H_ ALCdevice * dev = alcOpenDevice( (ALCchar *)("sdl") ); #else ALCdevice * dev = alcOpenDevice( (ALCubyte *)("sdl") ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-09-11 01:50:15
|
Revision: 512 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=512&view=rev Author: atani Date: 2007-09-10 18:50:14 -0700 (Mon, 10 Sep 2007) Log Message: ----------- init flags support on win32 Modified Paths: -------------- tiki/win32/src/init_shutdown.cpp tiki/win32/src/platgl.cpp tiki/win32/src/plathid.cpp tiki/win32/tiki.vcproj Property Changed: ---------------- tiki/examples/net/httpclient/resources/ Property changes on: tiki/examples/net/httpclient/resources ___________________________________________________________________ Name: svn:ignore + cookies.xml Modified: tiki/win32/src/init_shutdown.cpp =================================================================== --- tiki/win32/src/init_shutdown.cpp 2007-09-10 23:35:51 UTC (rev 511) +++ tiki/win32/src/init_shutdown.cpp 2007-09-11 01:50:14 UTC (rev 512) @@ -16,31 +16,41 @@ // Let us run with millisecond precision if possible. timeBeginPeriod( 1 ); - ALCdevice *dev = NULL; - ALCcontext *ctx = NULL; + if(g_tiki_init_flags & INIT_AUDIO_MASK) { + ALCdevice *dev = NULL; + ALCcontext *ctx = NULL; - dev = alcOpenDevice( getenv( "OPENAL_DEVICE" ) ); // getenv()==NULL is okay. - if ( dev != NULL ) { - ctx = alcCreateContext( dev, 0 ); - if ( ctx != NULL ) { - alcMakeContextCurrent( ctx ); - alcProcessContext( ctx ); + dev = alcOpenDevice( getenv( "OPENAL_DEVICE" ) ); // getenv()==NULL is okay. + if ( dev != NULL ) { + ctx = alcCreateContext( dev, 0 ); + if ( ctx != NULL ) { + alcMakeContextCurrent( ctx ); + alcProcessContext( ctx ); + } // if } // if - } // if + if(g_tiki_init_flags & INIT_AUDIO_SFX) { + Audio::Sound::initGlobal(); + } + if(g_tiki_init_flags & INIT_AUDIO_STREAM) { + Audio::Stream::initGlobal(); + } + } - Audio::Stream::initGlobal(); - Audio::Sound::initGlobal(); - - GL::Plxcompat::plx_mat3d_init( 640, 480 ); - Hid::init(); - - return true; + if(g_tiki_init_flags & INIT_AUDIO_STREAM) { + GL::Plxcompat::plx_mat3d_init( 640, 480 ); + } + + return Hid::init(); } void Tiki::shutdown() { Hid::shutdown(); - Audio::Sound::shutdownGlobal(); - Audio::Stream::shutdownGlobal(); + if(g_tiki_init_flags & INIT_AUDIO_STREAM) { + Audio::Stream::shutdownGlobal(); + } + if(g_tiki_init_flags & INIT_AUDIO_SFX) { + Audio::Sound::shutdownGlobal(); + } timeEndPeriod( 1 ); } Modified: tiki/win32/src/platgl.cpp =================================================================== --- tiki/win32/src/platgl.cpp 2007-09-10 23:35:51 UTC (rev 511) +++ tiki/win32/src/platgl.cpp 2007-09-11 01:50:14 UTC (rev 512) @@ -107,15 +107,26 @@ m_hThread = CreateThread( NULL, 0, GameThread, lpCmdLine, 0, &m_dwThreadID ); - while ( m_hThread != NULL ) { - do { - if ( GetMessage( &msg, NULL, NULL, NULL ) ) { - TranslateMessage( &msg ); - DispatchMessage( &msg ); - } + UINT min = WM_KEYFIRST, max = WM_MOUSELAST; - } while ( ::PeekMessage( &msg, NULL, NULL, NULL, PM_REMOVE ) ); + if(g_tiki_init_flags & INIT_HID_KEYBOARD && + !(g_tiki_init_flags & INIT_HID_MOUSE)) { + max = WM_KEYLAST; + } + else if(g_tiki_init_flags & INIT_HID_MOUSE && + !(g_tiki_init_flags & INIT_HID_KEYBOARD)) { + min = WM_MOUSEFIRST; + } + while ( m_hThread != NULL ) { + if ( ::PeekMessage( &msg, m_hWndMain, WM_NULL, WM_KEYFIRST - 1, PM_REMOVE ) ) { + TranslateMessage( &msg ); + DispatchMessage( &msg ); + } + else if ( ::PeekMessage( &msg, m_hWndMain, min, max, PM_REMOVE ) ) { + TranslateMessage( &msg ); + DispatchMessage( &msg ); + } Sleep( 2 ); } @@ -138,23 +149,22 @@ case WM_RBUTTONDOWN: case WM_RBUTTONUP: #if (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400) //WM_MOUSEWHEEL requires Windows 98 or above - case WM_MOUSEWHEEL: #endif - - Tiki::RecvEvent( iMsg, wParam, lParam ); - break; + Tiki::RecvEvent( iMsg, wParam, lParam ); + break; case WM_CLOSE: - Tiki::RecvQuit(); - return 0; - break; + case WM_QUIT: + Tiki::RecvQuit(); + return 0; + break; case WM_DESTROY: - DestroyApplication(); - PostQuitMessage( 0 ); - break; + DestroyApplication(); + PostQuitMessage( 0 ); + break; default: - return DefWindowProc( hWnd, iMsg, wParam, lParam ); + return DefWindowProc( hWnd, iMsg, wParam, lParam ); } return 0L; } @@ -326,7 +336,6 @@ totalFrameCnt++; #ifdef _DEBUG - if ( frameCnt && !( frameCnt % 250 ) ) { Debug::printf( "frame %d, fps = %.2f\n", ( int ) frameCnt, ( double ) Tiki::GL::Frame::getFrameRate() ); Modified: tiki/win32/src/plathid.cpp =================================================================== --- tiki/win32/src/plathid.cpp 2007-09-10 23:35:51 UTC (rev 511) +++ tiki/win32/src/plathid.cpp 2007-09-11 01:50:14 UTC (rev 512) @@ -28,17 +28,16 @@ } }; -static RefPtr<KbDevice> win32kb; -static RefPtr<MouseDevice> win32mouse; +static RefPtr<KbDevice> win32kb = NULL; +static RefPtr<MouseDevice> win32mouse = NULL; bool Hid::platInit() { win32kb = new KbDevice(); - win32mouse = new MouseDevice(); - Event evt( Event::EvtAttach ); evt.dev = win32kb; sendEvent( evt ); + win32mouse = new MouseDevice(); evt.dev = win32mouse; sendEvent( evt ); return true; @@ -229,7 +228,6 @@ } break; #if (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400) //WM_MOUSEWHEEL requires Windows 98 or above - case WM_MOUSEWHEEL: { Event evt( Event::EvtBtnPress ); evt.dev = win32mouse; Modified: tiki/win32/tiki.vcproj =================================================================== --- tiki/win32/tiki.vcproj 2007-09-10 23:35:51 UTC (rev 511) +++ tiki/win32/tiki.vcproj 2007-09-11 01:50:14 UTC (rev 512) @@ -43,7 +43,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories=""$(ProjectDir)\include";"$(ProjectDir)\..\include";"C:\Program Files\OpenAL 1.1 SDK\include";"$(ProjectDir)\..\3rdparty\libjpeg";"$(ProjectDir)\..\3rdparty\libogg\include";"$(ProjectDir)\..\3rdparty\libpng";"$(ProjectDir)\..\3rdparty\libvorbis\include";"$(ProjectDir)\..\3rdparty\zlib";"$(ProjectDir)\..\3rdparty\tinyxml"" - PreprocessorDefinitions="_WIN32_WINNT=0x0500;_CRT_SECURE_NO_WARNINGS=1" + PreprocessorDefinitions="_WIN32_WINNT=0x0500;_CRT_SECURE_NO_WARNINGS=1;_DEBUG=1" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -228,6 +228,10 @@ > </File> <File + RelativePath="..\src\base\init_flags_default.cpp" + > + </File> + <File RelativePath="..\src\base\object.cpp" > </File> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-09-10 23:35:54
|
Revision: 511 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=511&view=rev Author: atani Date: 2007-09-10 16:35:51 -0700 (Mon, 10 Sep 2007) Log Message: ----------- adding initialization flags. Modified Paths: -------------- tiki/examples/net/chatd/src/ChatServer.cpp tiki/include/Tiki/tiki.h tiki/sdl/src/init_shutdown.cpp tiki/sdl/src/platgl.cpp tiki/sdl/src/plathid.cpp Added Paths: ----------- tiki/src/base/init_flags_default.cpp Modified: tiki/examples/net/chatd/src/ChatServer.cpp =================================================================== --- tiki/examples/net/chatd/src/ChatServer.cpp 2007-09-10 17:03:45 UTC (rev 510) +++ tiki/examples/net/chatd/src/ChatServer.cpp 2007-09-10 23:35:51 UTC (rev 511) @@ -9,6 +9,8 @@ #include <Tiki/tiki.h> #include <pch.h> +TIKI_INIT_FLAGS(INIT_NONE); + #if TIKI_PLAT == TIKI_WIN32 #include <windows.h> Modified: tiki/include/Tiki/tiki.h =================================================================== --- tiki/include/Tiki/tiki.h 2007-09-10 17:03:45 UTC (rev 510) +++ tiki/include/Tiki/tiki.h 2007-09-10 23:35:51 UTC (rev 511) @@ -56,8 +56,39 @@ uint32 swaple( uint32 src ); uint16 swapbe( uint16 src ); uint32 swapbe( uint32 src ); + + // Tiki initialization flags + // defaults to INIT_HID_DEFAULT | INIT_VIDEO_DEFAULT | INIT_AUDIO_DEFAULT + extern uint32 g_tiki_init_flags; + + #define TIKI_INIT_FLAGS(flags) uint32 Tiki::g_tiki_init_flags = (flags); + typedef enum { + // HID options + INIT_HID_KEYBOARD = 0x00000001, + INIT_HID_MOUSE = 0x00000002, + INIT_HID_JOYSTICK = 0x00000004, + INIT_HID_DEFAULT = INIT_HID_KEYBOARD | INIT_HID_MOUSE | INIT_HID_JOYSTICK, + INIT_HID_MASK = 0x000000FF, + + // Graphic related options + INIT_VIDEO_WINDOWED = 0x00000100, + INIT_VIDEO_FULLSCREEN = 0x00000200, + INIT_VIDEO_CENTERED = 0x00000400, + INIT_VIDEO_DEFAULT = INIT_VIDEO_WINDOWED | INIT_VIDEO_CENTERED, + INIT_VIDEO_MASK = 0x0000FF00, + + // Audio related options + INIT_AUDIO_STREAM = 0x00010000, + INIT_AUDIO_SFX = 0x00020000, + INIT_AUDIO_DEFAULT = INIT_AUDIO_STREAM | INIT_AUDIO_SFX, + INIT_AUDIO_MASK = 0x00FF0000, + + INIT_NONE = 0x00000000, + INIT_DEFAULT = INIT_HID_DEFAULT | INIT_VIDEO_DEFAULT | INIT_AUDIO_DEFAULT, + } TIKI_INIT_FLAGS_ENUM; } + // Bring in debug stuff, we'll use it everywhere. #include "Tiki/debug.h" Modified: tiki/sdl/src/init_shutdown.cpp =================================================================== --- tiki/sdl/src/init_shutdown.cpp 2007-09-10 17:03:45 UTC (rev 510) +++ tiki/sdl/src/init_shutdown.cpp 2007-09-10 23:35:51 UTC (rev 511) @@ -18,38 +18,63 @@ #include <SDL/SDL.h> namespace Tiki { - bool init( int argc, char **argv ) { - ALCdevice * dev; - ALCcontext *context; if ( SDL_Init( SDL_INIT_EVERYTHING | SDL_INIT_EVENTTHREAD | SDL_INIT_NOPARACHUTE ) < 0 ) { - fprintf( stderr, "Unable to initialize SDL: %s\n", SDL_GetError() ); - return false; - } - -#ifdef ALCchar - dev = alcOpenDevice( const_cast<ALCchar *>("sdl") ); + fprintf( stderr, "Unable to initialize SDL: %s\n", SDL_GetError() ); + return false; + } + if(g_tiki_init_flags & INIT_AUDIO_MASK) { +#ifdef AL_LINUX + ALCdevice * dev = alcOpenDevice( (ALCchar *)("sdl") ); #else - dev = alcOpenDevice( (ALCubyte *)("sdl") ); + ALCdevice * dev = alcOpenDevice( (ALCubyte *)("sdl") ); #endif - if ( dev == NULL ) { + if ( dev == NULL ) { fprintf( stderr, "Unable to initialize OpenAL: %s\n", alGetString( alGetError() ) ); } else { - context = alcCreateContext( dev, NULL ); + ALCcontext *context = alcCreateContext( dev, NULL ); if ( context == NULL ) { - fprintf( stderr, "alcCreateContext returned NULL: %s\n", alGetString( alGetError() ) ); - } else { - alcMakeContextCurrent( context ); - alcProcessContext( context ); - Audio::Sound::initGlobal(); - Audio::Stream::initGlobal(); - } + fprintf( stderr, "alcCreateContext returned NULL: %s\n", alGetString( alGetError() ) ); + } else { + alcMakeContextCurrent( context ); + alcProcessContext( context ); + } } - GL::Plxcompat::plx_mat3d_init( 640, 480 ); + if(g_tiki_init_flags & INIT_AUDIO_SFX) { + Audio::Sound::initGlobal(); + } + if(g_tiki_init_flags & INIT_AUDIO_STREAM) { + Audio::Stream::initGlobal(); + } + } + if(g_tiki_init_flags & INIT_VIDEO_MASK) { + if ( SDL_SetVideoMode( 640, 480, 16, SDL_OPENGL ) == NULL ) { + fprintf( stderr, "Unable to Create OpenGL Window: %s\n", SDL_GetError() ); + return false; + } + + glEnable( GL_TEXTURE_2D ); + glEnable( GL_BLEND ); + glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); + glShadeModel( GL_SMOOTH ); // Enable Smooth Shading + glClearColor( 0.0f, 0.0f, 0.0f, 0.0f ); // Black Background + glClearDepth( 1.0f ); // Depth Buffer Setup + glEnable( GL_DEPTH_TEST ); // Enables Depth Testing + glDepthFunc( GL_LEQUAL ); // The Type Of Depth Testing To Do + + glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST ); // Really Nice Perspective Calculations + GL::Plxcompat::plx_mat3d_init( 640, 480 ); + } return Hid::init(); } void shutdown() { + if(g_tiki_init_flags & INIT_AUDIO_SFX) { + Audio::Sound::shutdownGlobal(); + } + if(g_tiki_init_flags & INIT_AUDIO_STREAM) { + Audio::Stream::shutdownGlobal(); + } Hid::shutdown(); } Modified: tiki/sdl/src/platgl.cpp =================================================================== --- tiki/sdl/src/platgl.cpp 2007-09-10 17:03:45 UTC (rev 510) +++ tiki/sdl/src/platgl.cpp 2007-09-10 23:35:51 UTC (rev 511) @@ -46,9 +46,9 @@ // Every so often we should reset the frame counters, to avoid // having a super long term averaging effect. if ( frameCnt >= 500 ) { - firstFrame = 0; - frameCnt = 0; - } + firstFrame = 0; + frameCnt = 0; + } // Update frame counters. if ( !firstFrame ) @@ -57,9 +57,9 @@ totalFrameCnt++; if ( lastFrame.tv_sec == 0 ) { - gettimeofday( &lastFrame, NULL ); - return ; - } + gettimeofday( &lastFrame, NULL ); + return ; + } struct timeval now; gettimeofday( &now, NULL ); @@ -67,8 +67,8 @@ long long lastu = (( long long ) lastFrame.tv_sec ) * 1000 * 1000 + lastFrame.tv_usec; long long diffu = nowu - lastu; if ( diffu < ( 1000 * 1000 / targetFrameRate ) ) { - usleep(( 1000 * 1000 / targetFrameRate ) - diffu ); - } + usleep(( 1000 * 1000 / targetFrameRate ) - diffu ); + } gettimeofday( &lastFrame, NULL ); } Modified: tiki/sdl/src/plathid.cpp =================================================================== --- tiki/sdl/src/plathid.cpp 2007-09-10 17:03:45 UTC (rev 510) +++ tiki/sdl/src/plathid.cpp 2007-09-10 23:35:51 UTC (rev 511) @@ -49,8 +49,8 @@ int abs_x, abs_y; }; -static RefPtr<KbDevice> SDLkb; -static RefPtr<MouseDevice> SDLMouse; +static RefPtr<KbDevice> SDLkb = NULL; +static RefPtr<MouseDevice> SDLMouse = NULL; int HandleMouse( void *unused ); int HandleKeyboard( void *unused ); @@ -62,60 +62,51 @@ SDL_Thread *wm_thread; bool Hid::platInit() { - SDLkb = new KbDevice(); - SDLMouse = new MouseDevice(); - SDLMouse->setXY( 0, 0 ); - - Event evtKB( Event::EvtAttach ); - evtKB.dev = SDLkb; - sendEvent( evtKB ); - - Event evtMouse( Event::EvtAttach ); - evtMouse.dev = SDLMouse; - sendEvent( evtMouse ); - - if ( SDL_SetVideoMode( 640, 480, 16, SDL_OPENGL ) == NULL ) { - fprintf( stderr, "Unable to Create OpenGL Window: %s\n", SDL_GetError() ); - return false; - } - - SDL_WarpMouse( 0, 0 ); - char junk = '0'; - mouse_thread = SDL_CreateThread( HandleMouse, &junk ); - keybd_thread = SDL_CreateThread( HandleKeyboard, &junk ); - wm_thread = SDL_CreateThread( HandleWM, &junk ); + if(g_tiki_init_flags & INIT_HID_KEYBOARD) { + Tiki::Debug::printf("Initializing Keyboard\n"); + SDLkb = new KbDevice(); + keybd_thread = SDL_CreateThread( HandleKeyboard, &junk ); - glEnable( GL_TEXTURE_2D ); - glEnable( GL_BLEND ); - glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); - glShadeModel( GL_SMOOTH ); // Enable Smooth Shading - glClearColor( 0.0f, 0.0f, 0.0f, 0.0f ); // Black Background - glClearDepth( 1.0f ); // Depth Buffer Setup - glEnable( GL_DEPTH_TEST ); // Enables Depth Testing - glDepthFunc( GL_LEQUAL ); // The Type Of Depth Testing To Do + Event evtKB( Event::EvtAttach ); + evtKB.dev = SDLkb; + sendEvent( evtKB ); + } + if(g_tiki_init_flags & INIT_HID_MOUSE) { + Tiki::Debug::printf("Initializing Mouse\n"); + SDLMouse = new MouseDevice(); + SDLMouse->setXY( 0, 0 ); + mouse_thread = SDL_CreateThread( HandleMouse, &junk ); - glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST ); // Really Nice Perspective Calculations + Event evtMouse( Event::EvtAttach ); + evtMouse.dev = SDLMouse; + sendEvent( evtMouse ); + } + wm_thread = SDL_CreateThread( HandleWM, &junk ); return true; } void Hid::platShutdown() { done = 1; SDL_Delay( 20 ); - SDL_WaitThread( mouse_thread, NULL ); - SDL_WaitThread( keybd_thread, NULL ); + if(g_tiki_init_flags & INIT_HID_MOUSE) { + Tiki::Debug::printf("Detaching Mouse\n"); + SDL_WaitThread( mouse_thread, NULL ); + Event evtMouse( Event::EvtDetach ); + evtMouse.dev = SDLMouse; + sendEvent( evtMouse ); + } + if(g_tiki_init_flags & INIT_HID_KEYBOARD) { + Tiki::Debug::printf("Detaching Keyboard\n"); + SDL_WaitThread( keybd_thread, NULL ); + Event evtKB( Event::EvtDetach ); + evtKB.dev = SDLkb; + sendEvent( evtKB ); + } SDL_WaitThread( wm_thread, NULL ); - Event evtKB( Event::EvtDetach ); - evtKB.dev = SDLkb; - sendEvent( evtKB ); - - Event evtMouse( Event::EvtDetach ); - evtMouse.dev = SDLMouse; - sendEvent( evtMouse ); - SDL_Quit(); } Added: tiki/src/base/init_flags_default.cpp =================================================================== --- tiki/src/base/init_flags_default.cpp (rev 0) +++ tiki/src/base/init_flags_default.cpp 2007-09-10 23:35:51 UTC (rev 511) @@ -0,0 +1,12 @@ +/* + Tiki + + init_flags_default.cpp + + Copyright (C)2007 Atani Software +*/ + +#include "pch.h" +#include "Tiki/tiki.h" + +TIKI_INIT_FLAGS(INIT_DEFAULT); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-09-10 17:03:47
|
Revision: 510 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=510&view=rev Author: atani Date: 2007-09-10 10:03:45 -0700 (Mon, 10 Sep 2007) Log Message: ----------- allow compilation against newer/older OpenAL libs Modified Paths: -------------- tiki/sdl/src/init_shutdown.cpp Modified: tiki/sdl/src/init_shutdown.cpp =================================================================== --- tiki/sdl/src/init_shutdown.cpp 2007-09-05 07:29:05 UTC (rev 509) +++ tiki/sdl/src/init_shutdown.cpp 2007-09-10 17:03:45 UTC (rev 510) @@ -27,7 +27,11 @@ return false; } - dev = alcOpenDevice( "sdl" ); +#ifdef ALCchar + dev = alcOpenDevice( const_cast<ALCchar *>("sdl") ); +#else + dev = alcOpenDevice( (ALCubyte *)("sdl") ); +#endif if ( dev == NULL ) { fprintf( stderr, "Unable to initialize OpenAL: %s\n", alGetString( alGetError() ) ); } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-09-05 07:29:11
|
Revision: 509 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=509&view=rev Author: atani Date: 2007-09-05 00:29:05 -0700 (Wed, 05 Sep 2007) Log Message: ----------- * Wired Tiki::Debug::printf on NDS to render to sub-screen * disabled libfat (hangs NO$GBA, need to verify real hardware) * reworked NDS init/glhooks, still not 100% functional, but seems to get further Modified Paths: -------------- tiki/include/Tiki/plxcompat.h tiki/nds/Makefile.rules tiki/nds/src/init_shutdown.cpp tiki/nds/src/platgl.cpp tiki/nds/src/platnet.cpp tiki/src/base/debug.cpp tiki/src/net/util/base64.cpp Added Paths: ----------- tiki/nds/tiki.cbp Removed Paths: ------------- tiki/examples/TikiTest/tikitest.layout tiki/win32/tiki.layout Property Changed: ---------------- tiki/nds/ tiki/win32/ Deleted: tiki/examples/TikiTest/tikitest.layout =================================================================== --- tiki/examples/TikiTest/tikitest.layout 2007-09-05 00:49:00 UTC (rev 508) +++ tiki/examples/TikiTest/tikitest.layout 2007-09-05 07:29:05 UTC (rev 509) @@ -1,10 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE CodeBlocks_layout_file> -<CodeBlocks_layout_file> - <File name="src\TikiTest.cpp" open="0" top="0"> - <Cursor position="147" topLine="0"/> - </File> - <File name="src\test.cpp" open="0" top="0"> - <Cursor position="5471" topLine="217"/> - </File> -</CodeBlocks_layout_file> Modified: tiki/include/Tiki/plxcompat.h =================================================================== --- tiki/include/Tiki/plxcompat.h 2007-09-05 00:49:00 UTC (rev 508) +++ tiki/include/Tiki/plxcompat.h 2007-09-05 07:29:05 UTC (rev 509) @@ -257,7 +257,6 @@ // Incoming Z coords will be divided by this number, to ensure they // stay inside the ortho depth limits. static const float zscale = 1000.0f; - #define PRIMPRE() do { \ if (!stripping) \ glBegin(GL_TRIANGLE_STRIP); \ @@ -270,19 +269,17 @@ } else { \ stripping = true; \ } \ -} while(0) +} while(0) static inline void glColoru32( uint32 argb ) { uint8 r = ( uint8 ) ( ( argb >> 16 ) & 0xff ); uint8 g = ( uint8 ) ( ( argb >> 8 ) & 0xff ); uint8 b = ( uint8 ) ( ( argb >> 0 ) & 0xff ); - uint8 a = ( uint8 ) ( ( argb >> 24 ) & 0xff ); #if TIKI_PLAT != TIKI_NDS - + uint8 a = ( uint8 ) ( ( argb >> 24 ) & 0xff ); glColor4ub( r, g, b, a ); #else - - glColor3f( r, g, b ); + glColor3b( r, g, b ); #endif } @@ -291,10 +288,10 @@ // within a single strip, but that generally shouldn't be happening anyway. static bool stripping = false; static inline void plx_prim( plx_vertex_t * vert, int size = 0 ) { - PRIMPRE(); - glColoru32( vert->argb ); + PRIMPRE(); + glColoru32( vert->argb ); glTexCoord2f( vert->u, vert->v ); - glVertex3f( vert->x, vert->y, vert->z / zscale ); + glVertex3f( vert->x, vert->y, vert->z / zscale ); PRIMPOST( vert->flags ); } @@ -376,14 +373,11 @@ */ static inline void plx_vert_fnp( int flags, float x, float y, float z, float a, float r, float g, float b ) { PRIMPRE(); -#if TIKI_PLAT != TIKI_NDS - - glColor4f( r, g, b, a ); -#else - - glColor3f( r, g, b ); +#if TIKI_PLAT != TIKI_NDS + glColor4f( r, g, b, a ); +#else + glColor3f( r, g, b ); #endif - glVertex3f( x, y, z / zscale ); PRIMPOST( flags ); } @@ -394,7 +388,7 @@ static inline void plx_vert_inp( int flags, float x, float y, float z, uint32 color ) { PRIMPRE(); glColoru32( color ); - glVertex3f( x, y, z / zscale ); + glVertex3f( x, y, z / zscale ); PRIMPOST( flags ); } @@ -405,7 +399,7 @@ PRIMPRE(); glColoru32( color ); plx_xform( x, y, z ); - glVertex3f( x, y, z / zscale ); + glVertex3f( x, y, z / zscale ); PRIMPOST( flags ); } @@ -426,16 +420,13 @@ static inline void plx_vert_ffp( int flags, float x, float y, float z, float a, float r, float g, float b, float u, float v ) { PRIMPRE(); -#if TIKI_PLAT != TIKI_NDS - - glColor4f( r, g, b, a ); -#else - - glColor3f( r, g, b ); -#endif - - glTexCoord2f( u, v ); - glVertex3f( x, y, z / zscale ); +#if TIKI_PLAT != TIKI_NDS + glColor4f( r, g, b, a ); +#else + glColor3f( r, g, b ); +#endif + glTexCoord2f( u, v ); + glVertex3f( x, y, z / zscale ); PRIMPOST( flags ); } @@ -445,8 +436,8 @@ static inline void plx_vert_ifp( int flags, float x, float y, float z, uint32 color, float u, float v ) { PRIMPRE(); glColoru32( color ); - glTexCoord2f( u, v ); - glVertex3f( x, y, z / zscale ); + glTexCoord2f( u, v ); + glVertex3f( x, y, z / zscale ); PRIMPOST( flags ); } Property changes on: tiki/nds ___________________________________________________________________ Name: svn:ignore - libtiki.a + libtiki.a tiki.depend tiki.layout .objs Modified: tiki/nds/Makefile.rules =================================================================== --- tiki/nds/Makefile.rules 2007-09-05 00:49:00 UTC (rev 508) +++ tiki/nds/Makefile.rules 2007-09-05 07:29:05 UTC (rev 509) @@ -28,7 +28,7 @@ CXXFLAGS+=-I$(TIKI_DIR)/3rdparty/libvorbis/lib CXXFLAGS+=-I$(TIKI_DIR)/3rdparty/tinyxml CXXFLAGS+=-DARM9 -CXXFLAGS+=-march=armv5te -mtune=arm946e-s -fomit-frame-pointer -ffast-math -mthumb -mthumb-interwork -O2 +CXXFLAGS+=-march=armv5te -mtune=arm946e-s -fomit-frame-pointer -ffast-math -mthumb -mthumb-interwork -O2 -g CFLAGS=$(CXXFLAGS) CXXFLAGS+=-fno-rtti Modified: tiki/nds/src/init_shutdown.cpp =================================================================== --- tiki/nds/src/init_shutdown.cpp 2007-09-05 00:49:00 UTC (rev 508) +++ tiki/nds/src/init_shutdown.cpp 2007-09-05 07:29:05 UTC (rev 509) @@ -30,35 +30,45 @@ bool init( int argc, char **argv ) { // Turn on everything - powerON( POWER_ALL ); + powerON( POWER_ALL ); + + lcdMainOnTop(); - // Setup the Main screen for 3D - videoSetMode( MODE_0_3D ); - vramSetBankA( VRAM_A_TEXTURE ); - lcdMainOnBottom(); - + consoleDemoInit(); + + // Setup the Main screen for 3D + videoSetMode( MODE_0_3D ); + vramSetBankA( VRAM_A_TEXTURE ); + + Tiki::Debug::printf("Enabling IRQs\n"); // IRQ basic setup - irqInit(); + irqInit(); + + Tiki::Debug::printf("Enabling GL\n"); // initialize the geometry engine - glInit(); - + glInit(); + glEnable(GL_TEXTURE_2D); + + //Tiki::Debug::printf("Enabling libFAT\n"); // initialize libfat - fatInitDefault(); + //fatInitDefault(); // initialize parallax - GL::Plxcompat::plx_mat3d_init( 256, 192 ); + GL::Plxcompat::plx_mat3d_init( 256, 192 ); + Tiki::Debug::printf("Enabling Sound\n"); Audio::Stream::initGlobal(); - Hid::init(); + Hid::init(); + irqSet( IRQ_TIMER3, Timer_50ms ); // setup timer IRQ - irqEnable( IRQ_TIMER3 ); + irqEnable( IRQ_TIMER3 ); + Tiki::Debug::printf("Enabling Wifi\n"); { // send fifo message to initialize the arm7 wifi REG_IPC_FIFO_CR = IPC_FIFO_ENABLE | IPC_FIFO_SEND_CLEAR; // enable & clear FIFO u32 Wifi_pass = Wifi_Init( WIFIINIT_OPTION_USELED ); REG_IPC_FIFO_TX = 0x12345678; - REG_IPC_FIFO_TX = Wifi_pass; - + REG_IPC_FIFO_TX = Wifi_pass; irqEnable( IRQ_FIFO_NOT_EMPTY ); REG_IPC_FIFO_CR = IPC_FIFO_ENABLE | IPC_FIFO_RECV_IRQ; // enable FIFO IRQ Modified: tiki/nds/src/platgl.cpp =================================================================== --- tiki/nds/src/platgl.cpp 2007-09-05 00:49:00 UTC (rev 508) +++ tiki/nds/src/platgl.cpp 2007-09-05 07:29:05 UTC (rev 509) @@ -34,7 +34,8 @@ void tiki_scene_finish_hook() { glFlush( 0 ); - swiWaitForVBlank(); + //swiWaitForVBlank(); + Tiki::Debug::printf("Frame::finish()\n"); } void tiki_scene_begin_opaque_hook() {} Modified: tiki/nds/src/platnet.cpp =================================================================== --- tiki/nds/src/platnet.cpp 2007-09-05 00:49:00 UTC (rev 508) +++ tiki/nds/src/platnet.cpp 2007-09-05 07:29:05 UTC (rev 509) @@ -20,7 +20,8 @@ } bool connect() { - if(!isConnected()) { + if(!isConnected()) { + Tiki::Debug::printf("Connecting to Wifi\n"); Wifi_AutoConnect(); while(1) { switch(Wifi_AssocStatus()) { @@ -40,7 +41,8 @@ } void disconnect() { - if(isConnected()) { + if(isConnected()) { + Tiki::Debug::printf("Disconnecting Wifi\n"); Wifi_DisconnectAP(); } } Added: tiki/nds/tiki.cbp =================================================================== --- tiki/nds/tiki.cbp (rev 0) +++ tiki/nds/tiki.cbp 2007-09-05 07:29:05 UTC (rev 509) @@ -0,0 +1,1537 @@ +<?xml version="1.0"?> +<!DOCTYPE CodeBlocks_project_file> +<CodeBlocks_project_file> + <FileVersion major="1" minor="1"/> + <Project> + <Option title="Tiki"/> + <Option makefile="Makefile"/> + <Option makefile_is_custom="1"/> + <Option compiler="0"/> + <Build> + <Target title="default"> + <Option output="libtiki.a"/> + <Option working_dir=""/> + <Option object_output=".objs"/> + <Option deps_output=".deps"/> + <Option type="2"/> + <Option compiler="6"/> + <Option projectResourceIncludeDirsRelation="2"/> + </Target> + </Build> + <Compiler> + <Add option="-O2"/> + <Add option="-MMD -MP -MF -march=armv5te -mtune=arm946e-s -fomit-frame-pointer -ffast-math -mthumb -mthumb-interwork -fno-rtti"/> + <Add option="-DARM9"/> + <Add directory="..\3rdparty\libjpeg"/> + <Add directory="..\3rdparty\libogg\include"/> + <Add directory="..\3rdparty\libogg\src"/> + <Add directory="..\3rdparty\libpng"/> + <Add directory="..\3rdparty\libvorbis\include"/> + <Add directory="..\3rdparty\libvorbis\lib"/> + <Add directory="..\3rdparty\tinyxml"/> + <Add directory="..\3rdparty\zlib"/> + <Add directory="..\include"/> + <Add directory="include"/> + </Compiler> + <Unit filename="..\3rdparty\libjpeg\jcapimin.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jcapistd.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jccoefct.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jccolor.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jcdctmgr.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jchuff.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jchuff.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jcinit.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jcmainct.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jcmarker.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jcmaster.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jcomapi.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jconfig.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jcparam.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jcphuff.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jcprepct.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jcsample.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jctrans.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jdapimin.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jdapistd.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jdatadst.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jdatasrc.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jdcoefct.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jdcolor.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jdct.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jddctmgr.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jdhuff.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jdhuff.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jdinput.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jdmainct.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jdmarker.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jdmaster.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jdmerge.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jdphuff.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jdpostct.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jdsample.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jdtrans.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jerror.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jerror.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jfdctflt.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jfdctfst.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jfdctint.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jidctflt.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jidctfst.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jidctint.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jidctred.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jinclude.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jmemmgr.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jmemnobs.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jmemsys.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jmorecfg.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jpegint.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jpeglib.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jquant1.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jquant2.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jutils.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libjpeg\jversion.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libogg\include\ogg\ogg.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libogg\include\ogg\os_types.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libogg\src\bitwise.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libogg\src\framing.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libpng\png.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libpng\png.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libpng\pngconf.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libpng\pngerror.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libpng\pnggccrd.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libpng\pngget.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libpng\pngmem.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libpng\pngpread.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libpng\pngread.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libpng\pngrio.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libpng\pngrtran.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libpng\pngrutil.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libpng\pngset.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libpng\pngtrans.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libpng\pngvcrd.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libpng\pngwio.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libpng\pngwrite.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libpng\pngwtran.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libpng\pngwutil.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\include\vorbis\codec.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\include\vorbis\vorbisenc.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\include\vorbis\vorbisfile.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\analysis.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\backends.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\barkmel.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\bitrate.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\bitrate.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\block.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\books\coupled\res_books_stereo.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\books\floor\floor_books.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\books\uncoupled\res_books_uncoupled.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\codebook.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\codebook.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\codec_internal.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\envelope.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\envelope.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\floor0.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\floor1.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\highlevel.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\info.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\lookup.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\lookup.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\lookup_data.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\lpc.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\lpc.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\lsp.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\lsp.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\mapping0.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\masking.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\mdct.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\mdct.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\misc.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\modes\floor_all.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\modes\psych_11.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\modes\psych_16.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\modes\psych_44.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\modes\psych_8.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\modes\residue_16.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\modes\residue_44.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\modes\residue_44u.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\modes\residue_8.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\modes\setup_11.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\modes\setup_16.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\modes\setup_22.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\modes\setup_32.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\modes\setup_44.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\modes\setup_44u.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\modes\setup_8.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\modes\setup_X.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\os.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\psy.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\psy.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\registry.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\registry.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\res0.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\scales.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\sharedbook.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\smallft.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\smallft.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\synthesis.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\vorbisenc.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\vorbisfile.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\window.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\libvorbis\lib\window.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\tinyxml\tinyxml.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\tinyxml\tinyxml.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\tinyxml\tinyxmlerror.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\tinyxml\tinyxmlparser.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\zlib\adler32.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\zlib\compress.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\zlib\crc32.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\zlib\crc32.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\zlib\deflate.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\zlib\deflate.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\zlib\gzio.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\zlib\infback.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\zlib\inffast.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\zlib\inffast.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\zlib\inffixed.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\zlib\inflate.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\zlib\inflate.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\zlib\inftrees.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\zlib\inftrees.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\zlib\trees.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\zlib\trees.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\zlib\uncompr.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\zlib\zconf.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\zlib\zlib.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\zlib\zutil.c"> + <Option compilerVar="CC"/> + <Option target="default"/> + </Unit> + <Unit filename="..\3rdparty\zlib\zutil.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\TikiAll.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\animation.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\anims\alphafader.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\anims\alpharotate.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\anims\expxymover.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\anims\logxymover.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\anims\sleep.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\anims\tintfader.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\bspline.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\color.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\color3.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\debug.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\drawable.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\drawables\banner.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\drawables\console.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\drawables\cursor.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\drawables\label.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\drawables\layer.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\drawables\pointerArrow.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\drawables\texturetile.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\endian.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\eventcollector.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\file.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\font.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\genmenu.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\gl.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\hid.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\image.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\imgjpg.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\imgpng.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\list.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\matrix.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\net.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\net\address.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\net\buffer.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\net\http\cookie.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\net\http\cookiejar.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\net\http\request.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\net\http\response.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\net\http\useragent.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\net\socket.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\net\tcpserversocket.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\net\tcpsocket.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\net\udpsocket.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\net\util\base64.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\net\util\date.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\object.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\oggvorbis.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\plxcompat.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\refcnt.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\scene.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\sound.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\stream.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\tee.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\texture.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\thread.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\tiki.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\tikimath.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\tikitime.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\timeline.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\timepoint.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\trigger.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\triggers\birth.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\triggers\chainanim.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\triggers\death.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\triggers\oneshot.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\vector.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\vector3.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="include\Tiki\glhdrs.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="include\Tiki\platnet.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="include\Tiki\platthread.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="include\Tiki\tikitypes.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="include\dssoundstream.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="include\ogg\config_types.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="include\pch.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="src\audio\sound.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="src\audio\stream.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="src\init_shutdown.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="src\platgl.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="src\plathid.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="src\platnet.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="src\platthread.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="src\tikitime.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\audio\oggvorbis\misc.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\audio\oggvorbis\sndoggvorbis.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\base\debug.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\base\endian.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\base\file.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\base\object.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\base\timeline.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\base\timepoint.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\gl\animation.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\gl\anims\alphafader.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\gl\anims\expxymover.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\gl\anims\logxymover.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\gl\anims\tintfader.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\gl\drawable.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\gl\drawables\banner.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\gl\drawables\console.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\gl\drawables\cursor.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\gl\drawables\label.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\gl\drawables\pointerArrow.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\gl\drawables\texturetile.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\gl\font.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\gl\genmenu.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\gl\gl.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\gl\plxcompat.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\gl\texture.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\gl\trigger.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\gl\triggers\birth.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\gl\triggers\death.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\hid\eventcollector.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\hid\hid.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\image\image.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\image\loadjpg.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\image\loadpng.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\math\bspline.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\math\math.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\math\matrix.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\math\vector.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\math\vector3.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\net\address.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\net\http\cookiejar.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\net\http\request.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\net\http\response.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\net\http\useragent.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\net\socket.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\net\tcpserversocket.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\net\tcpsocket.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\net\util\base64.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\net\util\date.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\thread\thread.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + </Project> +</CodeBlocks_project_file> Modified: tiki/src/base/debug.cpp =================================================================== --- tiki/src/base/debug.cpp 2007-09-05 00:49:00 UTC (rev 508) +++ tiki/src/base/debug.cpp 2007-09-05 07:29:05 UTC (rev 509) @@ -27,6 +27,15 @@ OutputDebugString( buffer ); return i; +#elif TIKI_PLAT == TIKI_NDS + va_list args; + char buffer[ 1024 ]; + va_start( args, fmt ); + int i = vsprintf( buffer, fmt, args ); + va_end( args ); + + iprintf(buffer); + return i; #else va_list args; Modified: tiki/src/net/util/base64.cpp =================================================================== --- tiki/src/net/util/base64.cpp 2007-09-05 00:49:00 UTC (rev 508) +++ tiki/src/net/util/base64.cpp 2007-09-05 07:29:05 UTC (rev 509) @@ -14,7 +14,6 @@ #include <stdlib.h> #include <math.h> -#include <memory.h> namespace Tiki { Property changes on: tiki/win32 ___________________________________________________________________ Name: svn:ignore - tiki.depend tiki.ncb tiki.suo libtiki.a Debug Release *.user + tiki.depend tiki.layout tiki.ncb tiki.suo libtiki.a Debug Release *.user Deleted: tiki/win32/tiki.layout =================================================================== --- tiki/win32/tiki.layout 2007-09-05 00:49:00 UTC (rev 508) +++ tiki/win32/tiki.layout 2007-09-05 07:29:05 UTC (rev 509) @@ -1,9 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE CodeBlocks_layout_file> -<CodeBlocks_layout_file> - <Expand folder="/Sources/src/net/util"/> - <Expand folder="/Sources/src/net"/> - <Expand folder="/Sources/src"/> - <Expand folder="/Sources"/> - <Expand folder="/Headers"/> -</CodeBlocks_layout_file> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-09-05 00:49:02
|
Revision: 508 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=508&view=rev Author: atani Date: 2007-09-04 17:49:00 -0700 (Tue, 04 Sep 2007) Log Message: ----------- * moving arm7_template to tikiarm7 * more svn:ignore prop edits (ignore *.nds, *.ds.gba) * proper sizing for nds in examples Modified Paths: -------------- tiki/examples/TikiTest/src/test.cpp tiki/examples/console/TikiSnake/src/snake.cpp tiki/examples/net/httpclient/src/main.cpp tiki/nds/Makefile tiki/nds/Makefile.rules tiki/nds/tikiarm7/Makefile Added Paths: ----------- tiki/nds/tikiarm7/ Removed Paths: ------------- tiki/nds/arm7_template/ Property Changed: ---------------- tiki/examples/TikiTest/ tiki/examples/console/TikiSnake/ tiki/examples/net/basic/ tiki/examples/net/chat/ tiki/examples/net/chatd/ tiki/examples/net/httpclient/ Property changes on: tiki/examples/TikiTest ___________________________________________________________________ Name: svn:ignore - Debug Release *.user + Debug Release *.user *.nds *.ds.gba Modified: tiki/examples/TikiTest/src/test.cpp =================================================================== --- tiki/examples/TikiTest/src/test.cpp 2007-09-04 17:56:07 UTC (rev 507) +++ tiki/examples/TikiTest/src/test.cpp 2007-09-05 00:49:00 UTC (rev 508) @@ -259,7 +259,11 @@ plx_mat3d_mode( PLX_MAT_PROJECTION ); plx_mat3d_identity(); +#if TIKI_PLAT != TIKI_NDS plx_mat3d_perspective( 45.0f, 640.0f / 480.0f, 0.1f, 100.0f ); +#else + plx_mat3d_perspective( 45.0f, 256.0f / 192.0f, 0.1f, 100.0f ); +#endif plx_mat3d_mode( PLX_MAT_MODELVIEW ); while ( !quitting ) Property changes on: tiki/examples/console/TikiSnake ___________________________________________________________________ Name: svn:ignore - Debug Release *.user + Debug Release *.user *.nds *.ds.gba Modified: tiki/examples/console/TikiSnake/src/snake.cpp =================================================================== --- tiki/examples/console/TikiSnake/src/snake.cpp 2007-09-04 17:56:07 UTC (rev 507) +++ tiki/examples/console/TikiSnake/src/snake.cpp 2007-09-05 00:49:00 UTC (rev 508) @@ -71,8 +71,13 @@ //initialize the screen ConsoleText *ct = new ConsoleText( 80, 25, new Texture( "pc-ascii.png", true ) ); +#if TIKI_PLAT != TIKI_NDS ct->setSize( 640, 480 ); ct->translate( Vector( 320, 240, 0 ) ); +#else + ct->setSize( 256, 192); + ct->translate( Vector( 128, 96, 0 ) ); +#endif ct->setAutoScroll( 0 ); ct->setAutoWrap( 0 ); Property changes on: tiki/examples/net/basic ___________________________________________________________________ Name: svn:ignore - Debug Release *.user + Debug Release *.user *.nds *.ds.gba Property changes on: tiki/examples/net/chat ___________________________________________________________________ Name: svn:ignore - Debug Release *.user + Debug Release *.user *.nds *.ds.gba Property changes on: tiki/examples/net/chatd ___________________________________________________________________ Name: svn:ignore - Debug Release *.user + Debug Release *.user *.nds *.ds.gba Property changes on: tiki/examples/net/httpclient ___________________________________________________________________ Name: svn:ignore - Debug Release *.user + Debug Release *.user *.nds *.ds.gba Modified: tiki/examples/net/httpclient/src/main.cpp =================================================================== --- tiki/examples/net/httpclient/src/main.cpp 2007-09-04 17:56:07 UTC (rev 507) +++ tiki/examples/net/httpclient/src/main.cpp 2007-09-05 00:49:00 UTC (rev 508) @@ -54,8 +54,13 @@ RefPtr<Texture> cf = new Texture("pc-ascii.png", true); #endif ConsoleText *console = new ConsoleText(80, 25, cf); +#if TIKI_PLAT != TIKI_NDS console->setSize(640, 480); console->setTranslate( Vector( 320, 240, 0 ) ); +#else + console->setSize(256, 192); + console->setTranslate( Vector( 128, 96, 0 ) ); +#endif console->setAutoWrap( true ); console->setAutoScroll( true ); Modified: tiki/nds/Makefile =================================================================== --- tiki/nds/Makefile 2007-09-04 17:56:07 UTC (rev 507) +++ tiki/nds/Makefile 2007-09-05 00:49:00 UTC (rev 508) @@ -56,23 +56,20 @@ clean: clean_subdirs -rm -f $(BASE_OBJS) $(THIRD_PARTY_OBJS) libtiki.a - $(MAKE) -C arm7_template clean TOPDIR=$(CURDIR) + $(MAKE) -C tikiarm7 clean TOPDIR=$(CURDIR) $(MAKE) TIKI_PLAT=nds -C$(CURDIR)/../examples clean examples: $(MAKE) TIKI_PLAT=nds -C$(CURDIR)/../examples clean all package: - zip -9r ../dist/$(SVN_VERSION)/tiki-$(SVN_VERSION)-nds.zip \ - libtiki.a \ - arm7_template \ - -x "*/.svn/*" cd .. && \ zip -9ru dist/$(SVN_VERSION)/tiki-$(SVN_VERSION)-nds.zip \ include \ nds/include \ - nds/Makefile.rules \ - -x "*/.svn/*" + nds/libtiki.a \ + nds/tikiarm7 \ + nds/Makefile.rules cp ../examples/console/TikiSnake/resources/pc-ascii.png \ ../examples/console/TikiSnake cp ../examples/net/httpclient/resources/pc-ascii.png \ @@ -92,9 +89,10 @@ examples/net/chatd/chatd.ds.gba \ examples/net/httpclient/pc-ascii.png \ examples/net/httpclient/httpclient.nds \ - examples/net/httpclient/httpclient.ds.gba \ - -x "*/.svn/*" + examples/net/httpclient/httpclient.ds.gba rm -f ../examples/console/TikiSnake/pc-ascii.png ../examples/net/httpclient/pc-ascii.png + zip ../dist/$(SVN_VERSION)/tiki-$(SVN_VERSION)-nds.zip \ + -d '*.svn*' DEPSDIR=$(CURDIR) include Makefile.rules Modified: tiki/nds/Makefile.rules =================================================================== --- tiki/nds/Makefile.rules 2007-09-04 17:56:07 UTC (rev 507) +++ tiki/nds/Makefile.rules 2007-09-05 00:49:00 UTC (rev 508) @@ -47,7 +47,7 @@ NDS_CART_VERSION ?= 1 define post_build - @$(MAKE) -C $(TIKI_DIR)/$(TIKI_PLAT)/arm7_template TOPDIR=$(CURDIR) + @$(MAKE) -C $(TIKI_DIR)/$(TIKI_PLAT)/tikiarm7 TOPDIR=$(CURDIR) @$(DEVKITARM)/bin/arm-eabi-objcopy -O binary $@.arm9.elf $@.arm9 @ndstool -c $@.nds -g $(NDS_CART_CODE) $(NDS_CART_ID) "$(NDS_CART_NAME)" $(NDS_CART_VERSION) -7 tikiarm7.arm7 -9 $@.arm9 @dsbuild $@.nds Copied: tiki/nds/tikiarm7 (from rev 507, tiki/nds/arm7_template) Property changes on: tiki/nds/tikiarm7 ___________________________________________________________________ Name: svn:ignore + build tikiarm7.arm7.elf Modified: tiki/nds/tikiarm7/Makefile =================================================================== --- tiki/nds/arm7_template/Makefile 2007-09-04 17:56:07 UTC (rev 507) +++ tiki/nds/tikiarm7/Makefile 2007-09-05 00:49:00 UTC (rev 508) @@ -19,6 +19,11 @@ INCLUDES := include build DATA := TARGET := tikiarm7 + +#--------------------------------------------------------------------------------- +# set default for TOPDIR so it doesnt try to write to / (root) +#--------------------------------------------------------------------------------- +TOPDIR := $(CURDIR) #--------------------------------------------------------------------------------- # options for code generation This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-09-04 17:56:13
|
Revision: 507 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=507&view=rev Author: atani Date: 2007-09-04 10:56:07 -0700 (Tue, 04 Sep 2007) Log Message: ----------- fix paths for DEVKITPRO/DEVKITARM Modified Paths: -------------- tiki/nds/Makefile.rules Modified: tiki/nds/Makefile.rules =================================================================== --- tiki/nds/Makefile.rules 2007-09-04 17:24:54 UTC (rev 506) +++ tiki/nds/Makefile.rules 2007-09-04 17:56:07 UTC (rev 507) @@ -11,10 +11,13 @@ ifeq ($(strip $(DEVKITARM)),) $(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM) endif +ifeq ($(strip $(DEVKITPRO)),) +$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPRO) +endif -TIKI_BASE_LIBS=-ltiki -L$(DEVKITARM)/libnds/lib -ldswifi9 -lfat -lnds9 +TIKI_BASE_LIBS=-ltiki -L$(DEVKITPRO)/libnds/lib -ldswifi9 -lfat -lnds9 -CXXFLAGS=-I$(DEVKITARM)/libnds/include +CXXFLAGS=-I$(DEVKITPRO)/libnds/include CXXFLAGS+=-I$(TIKI_DIR)/include CXXFLAGS+=-I$(TIKI_DIR)/nds/include -g CXXFLAGS+=-I$(TIKI_DIR)/3rdparty/zlib This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-09-04 17:24:56
|
Revision: 506 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=506&view=rev Author: atani Date: 2007-09-04 10:24:54 -0700 (Tue, 04 Sep 2007) Log Message: ----------- * various updates to svn:ignore props * platforms now use proper filenames (dc -> elf, nds -> nds and ds.gba) * platforms now able to build romdisk and post_build steps * package targets updated to include new names for example files Modified Paths: -------------- tiki/Makefile tiki/dc/Makefile tiki/dc/Makefile.rules tiki/examples/TikiTest/Makefile tiki/examples/console/TikiSnake/Makefile tiki/examples/console/TikiSnake/src/TikiSnake.cpp tiki/examples/net/basic/Makefile tiki/examples/net/chat/Makefile tiki/examples/net/chatd/Makefile tiki/examples/net/httpclient/Makefile tiki/examples/net/httpclient/src/main.cpp tiki/nds/Makefile tiki/nds/Makefile.rules tiki/sdl/Makefile tiki/sdl/Makefile.rules Added Paths: ----------- tiki/examples/Makefile tiki/examples/console/Makefile tiki/examples/net/Makefile Property Changed: ---------------- tiki/ tiki/3rdparty/libjpeg/ tiki/3rdparty/libogg/src/ tiki/3rdparty/libpng/ tiki/3rdparty/libvorbis/lib/ tiki/3rdparty/tinyxml/ tiki/3rdparty/zlib/ tiki/dc/ tiki/examples/TikiTest/src/ tiki/examples/console/TikiSnake/src/ tiki/examples/net/basic/src/ tiki/examples/net/chat/src/ tiki/examples/net/chatd/src/ tiki/examples/net/httpclient/src/ tiki/nds/ tiki/nds/src/ tiki/nds/src/audio/ tiki/sdl/ tiki/src/audio/ tiki/src/audio/oggvorbis/ tiki/src/base/ tiki/src/gl/ tiki/src/gl/anims/ tiki/src/gl/drawables/ tiki/src/gl/triggers/ tiki/src/hid/ tiki/src/image/ tiki/src/math/ tiki/src/net/ tiki/src/net/http/ tiki/src/net/util/ tiki/src/thread/ Property changes on: tiki ___________________________________________________________________ Name: svn:ignore + dist Property changes on: tiki/3rdparty/libjpeg ___________________________________________________________________ Name: svn:ignore + *.d Property changes on: tiki/3rdparty/libogg/src ___________________________________________________________________ Name: svn:ignore + *.d Property changes on: tiki/3rdparty/libpng ___________________________________________________________________ Name: svn:ignore + *.d Property changes on: tiki/3rdparty/libvorbis/lib ___________________________________________________________________ Name: svn:ignore + *.d Property changes on: tiki/3rdparty/tinyxml ___________________________________________________________________ Name: svn:ignore + *.d Property changes on: tiki/3rdparty/zlib ___________________________________________________________________ Name: svn:ignore + *.d Modified: tiki/Makefile =================================================================== --- tiki/Makefile 2007-09-03 18:44:28 UTC (rev 505) +++ tiki/Makefile 2007-09-04 17:24:54 UTC (rev 506) @@ -23,4 +23,4 @@ dist_copy: scp -rq dist/$(SVN_VERSION) tr...@at...:public_html/snapshots/tiki -.PHONY: win32 dc gp2x osx sdl nds +.PHONY: win32 dc osx sdl nds Property changes on: tiki/dc ___________________________________________________________________ Name: svn:ignore + libtiki.a Modified: tiki/dc/Makefile =================================================================== --- tiki/dc/Makefile 2007-09-03 18:44:28 UTC (rev 505) +++ tiki/dc/Makefile 2007-09-04 17:24:54 UTC (rev 506) @@ -22,10 +22,10 @@ clean: clean_subdirs -rm -f $(BASE_OBJS) libtiki.a + $(MAKE) TIKI_PLAT=dc -C$(CURDIR)/../examples clean examples: - $(MAKE) TIKI_PLAT=dc TIKI_DIR=$(CURDIR)/../ -C$(CURDIR)/../examples/TikiTest - $(MAKE) TIKI_PLAT=dc TIKI_DIR=$(CURDIR)/../ -C$(CURDIR)/../examples/console/TikiSnake + $(MAKE) TIKI_PLAT=dc -C$(CURDIR)/../examples clean all package: zip -9r ../dist/$(SVN_VERSION)/tiki-$(SVN_VERSION)-dc.zip libtiki.a @@ -37,8 +37,8 @@ -x "*/.svn/*" cd .. && \ zip -9ru dist/$(SVN_VERSION)/tiki-$(SVN_VERSION)-dc.zip \ - examples/TikiTest/tikitest \ - examples/console/TikiSnake/tikisnake \ + examples/TikiTest/tikitest.elf \ + examples/console/TikiSnake/tikisnake.elf \ -x "*/.svn/*" include Makefile.rules Modified: tiki/dc/Makefile.rules =================================================================== --- tiki/dc/Makefile.rules 2007-09-03 18:44:28 UTC (rev 505) +++ tiki/dc/Makefile.rules 2007-09-04 17:24:54 UTC (rev 506) @@ -23,3 +23,21 @@ TIKI_BASE_LIBS=-ltiki -ljpeg -loggvorbisplay -lpng -lz -lgl -lm CXX=kos-c++ CC=kos-cc + +PLATFORM_BINARY_EXT=.elf +ROMDISK_OBJ= + +ifdef ROMDISK_DIR +define build_romdisk + $(KOS_GENROMFS) -f romdisk.img -d $(ROMDISK_DIR) -v -x .svn + $(KOS_BASE)/utils/bin2o/bin2o romdisk.img romdisk romdisk.o + @rm -f romdisk.img +endef +ROMDISK_OBJ := romdisk.o +else +define build_romdisk +endef +endif + +define post_build +endef Added: tiki/examples/Makefile =================================================================== --- tiki/examples/Makefile (rev 0) +++ tiki/examples/Makefile 2007-09-04 17:24:54 UTC (rev 506) @@ -0,0 +1,8 @@ + +SUBDIRS = TikiTest console net + +TIKI_DIR ?= $(CURDIR)/../ +include $(TIKI_DIR)$(TIKI_PLAT)/Makefile.rules + +all: subdirs +clean: clean_subdirs Modified: tiki/examples/TikiTest/Makefile =================================================================== --- tiki/examples/TikiTest/Makefile 2007-09-03 18:44:28 UTC (rev 505) +++ tiki/examples/TikiTest/Makefile 2007-09-04 17:24:54 UTC (rev 506) @@ -1,13 +1,27 @@ -TIKI_DIR=../../ + CFLAGS=-I$(TIKI_DIR)$(TIKI_PLAT)/include -I$(TIKI_DIR)include OBJS = $(patsubst %.cpp,%.o,$(wildcard src/*.cpp)) -all: $(OBJS) - $(CXX) $(LDFLAGS) -L$(TIKI_DIR)$(TIKI_PLAT) -L$(TIKI_DIR)$(TIKI_PLAT)/lib $(OBJS) $(TIKI_BASE_LIBS) -o tikitest +ifeq ($(TIKI_PLAT),nds) +NDS_CART_CODE ?= TKTS +NDS_CART_ID ?= TK +NDS_CART_NAME ?= TikiTest +NDS_CART_VERSION ?= 1 +endif +all: tikitest +tikitest: $(OBJS) + $(build_romdisk) + $(CXX) $(LDFLAGS) -L$(TIKI_DIR)$(TIKI_PLAT) -L$(TIKI_DIR)$(TIKI_PLAT)/lib $(OBJS) $(TIKI_BASE_LIBS) -o tikitest$(PLATFORM_BINARY_EXT) $(ROMDISK_OBJ) + $(post_build) + clean: - -rm -f $(OBJS) tikitest + -rm -f $(OBJS) tikitest$(PLATFORM_BINARY_EXT) $(ROMDISK_OBJ) +ifeq ($(TIKI_PLAT),nds) + -rm -f tikitest.nds tikitest.ds.gba +endif +TIKI_DIR ?= $(CURDIR)/../../ DEPSDIR=$(CURDIR) include $(TIKI_DIR)$(TIKI_PLAT)/Makefile.rules Property changes on: tiki/examples/TikiTest/src ___________________________________________________________________ Name: svn:ignore + *.d Added: tiki/examples/console/Makefile =================================================================== --- tiki/examples/console/Makefile (rev 0) +++ tiki/examples/console/Makefile 2007-09-04 17:24:54 UTC (rev 506) @@ -0,0 +1,8 @@ + +SUBDIRS = TikiSnake + +TIKI_DIR ?= $(CURDIR)/../../ +include $(TIKI_DIR)$(TIKI_PLAT)/Makefile.rules + +all: subdirs +clean: clean_subdirs Modified: tiki/examples/console/TikiSnake/Makefile =================================================================== --- tiki/examples/console/TikiSnake/Makefile 2007-09-03 18:44:28 UTC (rev 505) +++ tiki/examples/console/TikiSnake/Makefile 2007-09-04 17:24:54 UTC (rev 506) @@ -1,12 +1,28 @@ -CFLAGS=-I../../../$(TIKI_PLAT)/include -I../../../include +TIKI_DIR ?= ../../../ +CFLAGS = -I../../../$(TIKI_PLAT)/include -I../../../include OBJS = $(patsubst %.cpp,%.o,$(wildcard src/*.cpp)) +ROMDISK_DIR = resources -all: $(OBJS) - $(CXX) $(LDFLAGS) -L$(TIKI_DIR)$(TIKI_PLAT) -L$(TIKI_DIR)$(TIKI_PLAT)/lib $(OBJS) $(TIKI_BASE_LIBS) -o tikisnake +ifeq ($(TIKI_PLAT),nds) +NDS_CART_CODE ?= TKSK +NDS_CART_ID ?= TK +NDS_CART_NAME ?= TikiSnake +NDS_CART_VERSION ?= 1 +endif +all: tikisnake + +tikisnake: $(OBJS) + $(build_romdisk) + $(CXX) $(LDFLAGS) -L$(TIKI_DIR)$(TIKI_PLAT) -L$(TIKI_DIR)$(TIKI_PLAT)/lib $(OBJS) $(TIKI_BASE_LIBS) -o tikisnake$(PLATFORM_BINARY_EXT) $(ROMDISK_OBJ) + $(post_build) + clean: - -rm -f $(OBJS) tikisnake + -rm -f $(OBJS) tikisnake$(PLATFORM_BINARY_EXT) $(ROMDISK_OBJ) +ifeq ($(TIKI_PLAT),nds) + -rm -f tikisnake.nds tikisnake.ds.gba +endif DEPSDIR=$(CURDIR) -include ../../../$(TIKI_PLAT)/Makefile.rules +include $(TIKI_DIR)/$(TIKI_PLAT)/Makefile.rules Property changes on: tiki/examples/console/TikiSnake/src ___________________________________________________________________ Name: svn:ignore + *.d Modified: tiki/examples/console/TikiSnake/src/TikiSnake.cpp =================================================================== --- tiki/examples/console/TikiSnake/src/TikiSnake.cpp 2007-09-03 18:44:28 UTC (rev 505) +++ tiki/examples/console/TikiSnake/src/TikiSnake.cpp 2007-09-04 17:24:54 UTC (rev 506) @@ -8,6 +8,11 @@ #include <Tiki/tiki.h> +#if TIKI_PLAT == TIKI_DC +extern uint8 romdisk[]; +KOS_INIT_ROMDISK(romdisk); +#endif + #if TIKI_PLAT == TIKI_WIN32 #include <windows.h> #include "pch.h" Added: tiki/examples/net/Makefile =================================================================== --- tiki/examples/net/Makefile (rev 0) +++ tiki/examples/net/Makefile 2007-09-04 17:24:54 UTC (rev 506) @@ -0,0 +1,12 @@ + +ifneq ($(TIKI_PLAT),dc) +SUBDIRS = basic chat chatd httpclient +else +SUBDIRS = +endif + +TIKI_DIR ?= $(CURDIR)/../../ +include $(TIKI_DIR)$(TIKI_PLAT)/Makefile.rules + +all: subdirs +clean: clean_subdirs Modified: tiki/examples/net/basic/Makefile =================================================================== --- tiki/examples/net/basic/Makefile 2007-09-03 18:44:28 UTC (rev 505) +++ tiki/examples/net/basic/Makefile 2007-09-04 17:24:54 UTC (rev 506) @@ -1,13 +1,26 @@ -TIKI_DIR=../../../ -CFLAGS=-I$(TIKI_DIR)$(TIKI_PLAT)/include -I$(TIKI_DIR)include +TIKI_DIR ?= ../../../ +CFLAGS = -I$(TIKI_DIR)$(TIKI_PLAT)/include -I$(TIKI_DIR)include OBJS = $(patsubst %.cpp,%.o,$(wildcard src/*.cpp)) -all: $(OBJS) - $(CXX) $(LDFLAGS) -L$(TIKI_DIR)$(TIKI_PLAT) -L$(TIKI_DIR)$(TIKI_PLAT)/lib $(OBJS) $(TIKI_BASE_LIBS) -o basic +ifeq ($(TIKI_PLAT),nds) +NDS_CART_CODE ?= TKNB +NDS_CART_ID ?= TK +NDS_CART_NAME ?= TikiBasicNet +NDS_CART_VERSION ?= 1 +endif +all: basic +basic: $(OBJS) + $(build_romdisk) + $(CXX) $(LDFLAGS) -L$(TIKI_DIR)$(TIKI_PLAT) -L$(TIKI_DIR)$(TIKI_PLAT)/lib $(OBJS) $(TIKI_BASE_LIBS) -o basic$(PLATFORM_BINARY_EXT) $(ROMDISK_OBJ) + $(post_build) + clean: - -rm -f $(OBJS) basic + -rm -f $(OBJS) basic$(PLATFORM_BINARY_EXT) $(ROMDISK_OBJ) +ifeq ($(TIKI_PLAT),nds) + -rm -f basic.nds basic.ds.gba +endif DEPSDIR=$(CURDIR) include $(TIKI_DIR)$(TIKI_PLAT)/Makefile.rules Property changes on: tiki/examples/net/basic/src ___________________________________________________________________ Name: svn:ignore + *.d Modified: tiki/examples/net/chat/Makefile =================================================================== --- tiki/examples/net/chat/Makefile 2007-09-03 18:44:28 UTC (rev 505) +++ tiki/examples/net/chat/Makefile 2007-09-04 17:24:54 UTC (rev 506) @@ -1,13 +1,26 @@ -TIKI_DIR=../../../ -CFLAGS=-I$(TIKI_DIR)$(TIKI_PLAT)/include -I$(TIKI_DIR)include +TIKI_DIR ?= ../../../ +CFLAGS = -I$(TIKI_DIR)$(TIKI_PLAT)/include -I$(TIKI_DIR)include OBJS = $(patsubst %.cpp,%.o,$(wildcard src/*.cpp)) -all: $(OBJS) - $(CXX) $(LDFLAGS) -L$(TIKI_DIR)$(TIKI_PLAT) -L$(TIKI_DIR)$(TIKI_PLAT)/lib $(OBJS) $(TIKI_BASE_LIBS) -o chat +ifeq ($(TIKI_PLAT),nds) +NDS_CART_CODE ?= TKCH +NDS_CART_ID ?= TK +NDS_CART_NAME ?= TikiChat +NDS_CART_VERSION ?= 1 +endif +all: chat +chat: $(OBJS) + $(build_romdisk) + $(CXX) $(LDFLAGS) -L$(TIKI_DIR)$(TIKI_PLAT) -L$(TIKI_DIR)$(TIKI_PLAT)/lib $(OBJS) $(TIKI_BASE_LIBS) -o chat$(PLATFORM_BINARY_EXT) $(ROMDISK_OBJ) + $(post_build) + clean: - -rm -f $(OBJS) chat + -rm -f $(OBJS) chat$(PLATFORM_BINARY_EXT) $(ROMDISK_OBJ) +ifeq ($(TIKI_PLAT),nds) + -rm -f chat.nds chat.ds.gba +endif DEPSDIR=$(CURDIR) include $(TIKI_DIR)$(TIKI_PLAT)/Makefile.rules Property changes on: tiki/examples/net/chat/src ___________________________________________________________________ Name: svn:ignore + *.d Modified: tiki/examples/net/chatd/Makefile =================================================================== --- tiki/examples/net/chatd/Makefile 2007-09-03 18:44:28 UTC (rev 505) +++ tiki/examples/net/chatd/Makefile 2007-09-04 17:24:54 UTC (rev 506) @@ -1,13 +1,26 @@ -TIKI_DIR=../../../ -CFLAGS=-I$(TIKI_DIR)$(TIKI_PLAT)/include -I$(TIKI_DIR)include +TIKI_DIR ?= ../../../ +CFLAGS = -I$(TIKI_DIR)$(TIKI_PLAT)/include -I$(TIKI_DIR)include OBJS = $(patsubst %.cpp,%.o,$(wildcard src/*.cpp)) -all: $(OBJS) - $(CXX) $(LDFLAGS) -L$(TIKI_DIR)$(TIKI_PLAT) -L$(TIKI_DIR)$(TIKI_PLAT)/lib $(OBJS) $(TIKI_BASE_LIBS) -o chatd +ifeq ($(TIKI_PLAT),nds) +NDS_CART_CODE ?= TKCD +NDS_CART_ID ?= TK +NDS_CART_NAME ?= TikiChatd +NDS_CART_VERSION ?= 1 +endif +all: chatd +chatd: $(OBJS) + $(build_romdisk) + $(CXX) $(LDFLAGS) -L$(TIKI_DIR)$(TIKI_PLAT) -L$(TIKI_DIR)$(TIKI_PLAT)/lib $(OBJS) $(TIKI_BASE_LIBS) -o chatd$(PLATFORM_BINARY_EXT) $(ROMDISK_OBJ) + $(post_build) + clean: - -rm -f $(OBJS) chatd + -rm -f $(OBJS) chatd$(PLATFORM_BINARY_EXT) $(ROMDISK_OBJ) +ifeq ($(TIKI_PLAT),nds) + -rm -f chatd.nds chatd.ds.gba +endif DEPSDIR=$(CURDIR) include $(TIKI_DIR)$(TIKI_PLAT)/Makefile.rules Property changes on: tiki/examples/net/chatd/src ___________________________________________________________________ Name: svn:ignore + *.d Modified: tiki/examples/net/httpclient/Makefile =================================================================== --- tiki/examples/net/httpclient/Makefile 2007-09-03 18:44:28 UTC (rev 505) +++ tiki/examples/net/httpclient/Makefile 2007-09-04 17:24:54 UTC (rev 506) @@ -1,13 +1,27 @@ -TIKI_DIR=../../../ -CFLAGS=-I$(TIKI_DIR)$(TIKI_PLAT)/include -I$(TIKI_DIR)include +TIKI_DIR ?= ../../../ +CFLAGS = -I$(TIKI_DIR)$(TIKI_PLAT)/include -I$(TIKI_DIR)include OBJS = $(patsubst %.cpp,%.o,$(wildcard src/*.cpp)) +ROMDISK_DIR=resources -all: $(OBJS) - $(CXX) $(LDFLAGS) -L$(TIKI_DIR)$(TIKI_PLAT) -L$(TIKI_DIR)$(TIKI_PLAT)/lib $(OBJS) $(TIKI_BASE_LIBS) -o httpclient +ifeq ($(TIKI_PLAT),nds) +NDS_CART_CODE ?= TKHT +NDS_CART_ID ?= TK +NDS_CART_NAME ?= TikiHttpTest +NDS_CART_VERSION ?= 1 +endif +all: httpclient +httpclient: $(OBJS) + $(build_romdisk) + $(CXX) $(LDFLAGS) -L$(TIKI_DIR)$(TIKI_PLAT) -L$(TIKI_DIR)$(TIKI_PLAT)/lib $(OBJS) $(TIKI_BASE_LIBS) -o httpclient$(PLATFORM_BINARY_EXT) $(ROMDISK_OBJ) + $(post_build) + clean: - -rm -f $(OBJS) httpclient + -rm -f $(OBJS) httpclient$(PLATFORM_BINARY_EXT) $(ROMDISK_OBJ) +ifeq ($(TIKI_PLAT),nds) + -rm -f httpclient.nds httpclient.ds.gba +endif DEPSDIR=$(CURDIR) include $(TIKI_DIR)$(TIKI_PLAT)/Makefile.rules Property changes on: tiki/examples/net/httpclient/src ___________________________________________________________________ Name: svn:ignore + *.d Modified: tiki/examples/net/httpclient/src/main.cpp =================================================================== --- tiki/examples/net/httpclient/src/main.cpp 2007-09-03 18:44:28 UTC (rev 505) +++ tiki/examples/net/httpclient/src/main.cpp 2007-09-04 17:24:54 UTC (rev 506) @@ -51,7 +51,7 @@ #if TIKI_PLAT == TIKI_DC RefPtr<Texture> cf = new Texture("/rd/pc-ascii.png", true); #else - RefPtr<Texture> cf = new Texture("resources/pc-ascii.png", true); + RefPtr<Texture> cf = new Texture("pc-ascii.png", true); #endif ConsoleText *console = new ConsoleText(80, 25, cf); console->setSize(640, 480); Property changes on: tiki/nds ___________________________________________________________________ Name: svn:ignore + libtiki.a Modified: tiki/nds/Makefile =================================================================== --- tiki/nds/Makefile 2007-09-03 18:44:28 UTC (rev 505) +++ tiki/nds/Makefile 2007-09-04 17:24:54 UTC (rev 506) @@ -56,14 +56,11 @@ clean: clean_subdirs -rm -f $(BASE_OBJS) $(THIRD_PARTY_OBJS) libtiki.a + $(MAKE) -C arm7_template clean TOPDIR=$(CURDIR) + $(MAKE) TIKI_PLAT=nds -C$(CURDIR)/../examples clean examples: - $(MAKE) TIKI_PLAT=nds TIKI_DIR=$(CURDIR)/../ -C$(CURDIR)/../examples/TikiTest - $(MAKE) TIKI_PLAT=nds TIKI_DIR=$(CURDIR)/../ -C$(CURDIR)/../examples/console/TikiSnake - $(MAKE) TIKI_PLAT=nds TIKI_DIR=$(CURDIR)/../ -C$(CURDIR)/../examples/net/basic - $(MAKE) TIKI_PLAT=nds TIKI_DIR=$(CURDIR)/../ -C$(CURDIR)/../examples/net/chat - $(MAKE) TIKI_PLAT=nds TIKI_DIR=$(CURDIR)/../ -C$(CURDIR)/../examples/net/chatd - $(MAKE) TIKI_PLAT=nds TIKI_DIR=$(CURDIR)/../ -C$(CURDIR)/../examples/net/httpclient + $(MAKE) TIKI_PLAT=nds -C$(CURDIR)/../examples clean all package: zip -9r ../dist/$(SVN_VERSION)/tiki-$(SVN_VERSION)-nds.zip \ @@ -76,12 +73,28 @@ nds/include \ nds/Makefile.rules \ -x "*/.svn/*" + cp ../examples/console/TikiSnake/resources/pc-ascii.png \ + ../examples/console/TikiSnake + cp ../examples/net/httpclient/resources/pc-ascii.png \ + ../examples/net/httpclient cd .. && \ zip -9ru dist/$(SVN_VERSION)/tiki-$(SVN_VERSION)-nds.zip \ - examples/TikiTest/tikitest \ - examples/console/TikiSnake/tikisnake \ + examples/TikiTest/tikitest.nds \ + examples/TikiTest/tikitest.ds.gba \ + examples/console/TikiSnake/pc-ascii.png \ + examples/console/TikiSnake/tikisnake.nds \ + examples/console/TikiSnake/tikisnake.ds.gba \ + examples/net/basic/basic.nds \ + examples/net/basic/basic.ds.gba \ + examples/net/chat/chat.nds \ + examples/net/chat/chat.ds.gba \ + examples/net/chatd/chatd.nds \ + examples/net/chatd/chatd.ds.gba \ + examples/net/httpclient/pc-ascii.png \ + examples/net/httpclient/httpclient.nds \ + examples/net/httpclient/httpclient.ds.gba \ -x "*/.svn/*" + rm -f ../examples/console/TikiSnake/pc-ascii.png ../examples/net/httpclient/pc-ascii.png DEPSDIR=$(CURDIR) -TIKI_DIR=$(CURDIR)/.. include Makefile.rules Modified: tiki/nds/Makefile.rules =================================================================== --- tiki/nds/Makefile.rules 2007-09-03 18:44:28 UTC (rev 505) +++ tiki/nds/Makefile.rules 2007-09-04 17:24:54 UTC (rev 506) @@ -8,14 +8,13 @@ $(patsubst %, _clean_dir_%, $(SUBDIRS)): @$(MAKE) -C $(patsubst _clean_dir_%, %, $@) clean -ifeq ($(strip $(DEVKITPRO)),) -$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitARM) +ifeq ($(strip $(DEVKITARM)),) +$(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM) endif -TIKI_BASE_LIBS=-ltiki -L$(DEVKITPRO)/libnds/lib -ldswifi9 -lfat -lnds9 +TIKI_BASE_LIBS=-ltiki -L$(DEVKITARM)/libnds/lib -ldswifi9 -lfat -lnds9 - -CXXFLAGS=-I$(DEVKITPRO)/libnds/include +CXXFLAGS=-I$(DEVKITARM)/libnds/include CXXFLAGS+=-I$(TIKI_DIR)/include CXXFLAGS+=-I$(TIKI_DIR)/nds/include -g CXXFLAGS+=-I$(TIKI_DIR)/3rdparty/zlib @@ -33,3 +32,23 @@ LDFLAGS=-specs=ds_arm9.specs -mthumb -mthumb-interwork -mno-fpu -L$(DEVKITPRO)/lib -lgcc include $(DEVKITARM)/ds_rules + +PLATFORM_BINARY_EXT = .arm9.elf + +define build_romdisk +endef + +NDS_CART_CODE ?= TIKI +NDS_CART_ID ?= TK +NDS_CART_NAME ?= Tiki Example +NDS_CART_VERSION ?= 1 + +define post_build + @$(MAKE) -C $(TIKI_DIR)/$(TIKI_PLAT)/arm7_template TOPDIR=$(CURDIR) + @$(DEVKITARM)/bin/arm-eabi-objcopy -O binary $@.arm9.elf $@.arm9 + @ndstool -c $@.nds -g $(NDS_CART_CODE) $(NDS_CART_ID) "$(NDS_CART_NAME)" $(NDS_CART_VERSION) -7 tikiarm7.arm7 -9 $@.arm9 + @dsbuild $@.nds + @rm -f $@.arm9 + @rm -f tikiarm7.arm7 + @rm -f $@.arm9.elf +endef Property changes on: tiki/nds/src ___________________________________________________________________ Name: svn:ignore + *.d Property changes on: tiki/nds/src/audio ___________________________________________________________________ Name: svn:ignore + *.d Property changes on: tiki/sdl ___________________________________________________________________ Name: svn:ignore + TikiSDL.layout TikiSDL.depend libtiki.a bin obj Modified: tiki/sdl/Makefile =================================================================== --- tiki/sdl/Makefile 2007-09-03 18:44:28 UTC (rev 505) +++ tiki/sdl/Makefile 2007-09-04 17:24:54 UTC (rev 506) @@ -57,14 +57,10 @@ clean: clean_subdirs -rm -f $(BASE_OBJS) $(THIRD_PARTY_OBJS) libtiki.a + $(MAKE) TIKI_PLAT=sdl -C$(CURDIR)/../examples clean examples: - $(MAKE) TIKI_PLAT=sdl TIKI_DIR=$(CURDIR)/../ -C$(CURDIR)/../examples/TikiTest - $(MAKE) TIKI_PLAT=sdl TIKI_DIR=$(CURDIR)/../ -C$(CURDIR)/../examples/console/TikiSnake - $(MAKE) TIKI_PLAT=sdl TIKI_DIR=$(CURDIR)/../ -C$(CURDIR)/../examples/net/basic - $(MAKE) TIKI_PLAT=sdl TIKI_DIR=$(CURDIR)/../ -C$(CURDIR)/../examples/net/chatd - $(MAKE) TIKI_PLAT=sdl TIKI_DIR=$(CURDIR)/../ -C$(CURDIR)/../examples/net/chat - $(MAKE) TIKI_PLAT=sdl TIKI_DIR=$(CURDIR)/../ -C$(CURDIR)/../examples/net/httpclient + $(MAKE) TIKI_PLAT=sdl -C$(CURDIR)/../examples clean all package: tar -cvf ../dist/$(SVN_VERSION)/tiki-$(SVN_VERSION)-sdl.tar libtiki.a @@ -75,12 +71,19 @@ --exclude .svn cp ../examples/console/TikiSnake/resources/pc-ascii.png \ ../examples/console/TikiSnake + cp ../examples/net/httpclient/resources/pc-ascii.png \ + ../examples/net/httpclient tar -uvf ../dist/$(SVN_VERSION)/tiki-$(SVN_VERSION)-sdl.tar -C ../ \ examples/TikiTest/tikitest \ + examples/net/basic/basic \ + examples/net/chat/chat \ + examples/net/chatd/chatd \ + examples/net/httpclient/httpclient \ + examples/net/httpclient/pc-ascii.png \ examples/console/TikiSnake/tikisnake \ examples/console/TikiSnake/pc-ascii.png \ --exclude .svn - rm -f ../examples/console/TikiSnake/pc-ascii.png + rm -f ../examples/console/TikiSnake/pc-ascii.png ../examples/net/httpclient/pc-ascii.png gzip ../dist/$(SVN_VERSION)/tiki-$(SVN_VERSION)-sdl.tar include Makefile.rules Modified: tiki/sdl/Makefile.rules =================================================================== --- tiki/sdl/Makefile.rules 2007-09-03 18:44:28 UTC (rev 505) +++ tiki/sdl/Makefile.rules 2007-09-04 17:24:54 UTC (rev 506) @@ -21,3 +21,12 @@ @$(MAKE) -C $(patsubst _clean_dir_%, %, $@) clean TIKI_BASE_LIBS=-ltiki $(shell openal-config --libs) -lGL -lGLU $(shell sdl-config --libs) + +PLATFORM_BINARY_EXT = +ROMDISK_OBJ = + +define build_romdisk +endef + +define post_build +endef Property changes on: tiki/src/audio ___________________________________________________________________ Name: svn:ignore + *.d Property changes on: tiki/src/audio/oggvorbis ___________________________________________________________________ Name: svn:ignore + *.d Property changes on: tiki/src/base ___________________________________________________________________ Name: svn:ignore + *.d Property changes on: tiki/src/gl ___________________________________________________________________ Name: svn:ignore + *.d Property changes on: tiki/src/gl/anims ___________________________________________________________________ Name: svn:ignore + *.d Property changes on: tiki/src/gl/drawables ___________________________________________________________________ Name: svn:ignore + *.d Property changes on: tiki/src/gl/triggers ___________________________________________________________________ Name: svn:ignore + *.d Property changes on: tiki/src/hid ___________________________________________________________________ Name: svn:ignore + *.d Property changes on: tiki/src/image ___________________________________________________________________ Name: svn:ignore + *.d Property changes on: tiki/src/math ___________________________________________________________________ Name: svn:ignore + *.d Property changes on: tiki/src/net ___________________________________________________________________ Name: svn:ignore + *.d Property changes on: tiki/src/net/http ___________________________________________________________________ Name: svn:ignore + *.d Property changes on: tiki/src/net/util ___________________________________________________________________ Name: svn:ignore + *.d Property changes on: tiki/src/thread ___________________________________________________________________ Name: svn:ignore + *.d This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-09-03 18:44:31
|
Revision: 505 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=505&view=rev Author: atani Date: 2007-09-03 11:44:28 -0700 (Mon, 03 Sep 2007) Log Message: ----------- adding tinyxml to object list Modified Paths: -------------- tiki/nds/Makefile Modified: tiki/nds/Makefile =================================================================== --- tiki/nds/Makefile 2007-09-03 03:44:24 UTC (rev 504) +++ tiki/nds/Makefile 2007-09-03 18:44:28 UTC (rev 505) @@ -45,7 +45,7 @@ $(BASE_HID_OBJ) $(BASE_IMAGE_OBJ) $(BASE_MATH_OBJ) \ $(BASE_THREAD_OBJ) $(BASE_NET_OBJ) -THIRD_PARTY_OBJS = $(JPEG_OBJ) $(OGG_OBJ) $(VORBIS_OBJ) $(PNG_OBJ) $(ZLIB_OBJ) +THIRD_PARTY_OBJS = $(JPEG_OBJ) $(OGG_OBJ) $(VORBIS_OBJ) $(PNG_OBJ) $(ZLIB_OBJ) $(TINYXML_OBJ) TIKI_DIR=$(CURDIR)/.. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-09-03 03:44:27
|
Revision: 504 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=504&view=rev Author: atani Date: 2007-09-02 20:44:24 -0700 (Sun, 02 Sep 2007) Log Message: ----------- * increased the buffer for printf (16kb on all plats except nds which is 1k) * added tinyxml to the include path * implemented CookieJar::loadFromXML(), CookieJar::saveToXML() * added dswifi7 lib to arm7_template * added Socket::send(string), Socket::recv(string) * modified httpclient to use a TextConsole Modified Paths: -------------- tiki/examples/net/httpclient/src/main.cpp tiki/include/Tiki/net/http/cookie.h tiki/include/Tiki/net/socket.h tiki/include/Tiki/net/tcpsocket.h tiki/include/Tiki/net/util/base64.h tiki/nds/Makefile.rules tiki/nds/arm7_template/Makefile tiki/sdl/Makefile tiki/src/base/debug.cpp tiki/src/gl/drawables/console.cpp tiki/src/net/http/cookiejar.cpp tiki/src/net/http/useragent.cpp tiki/src/net/tcpsocket.cpp tiki/src/net/util/base64.cpp tiki/win32/include/Tiki/platnet.h tiki/win32/src/platnet.cpp tiki/win32/tiki.vcproj Added Paths: ----------- tiki/examples/net/httpclient/resources/ tiki/examples/net/httpclient/resources/pc-ascii.png Added: tiki/examples/net/httpclient/resources/pc-ascii.png =================================================================== (Binary files differ) Property changes on: tiki/examples/net/httpclient/resources/pc-ascii.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: tiki/examples/net/httpclient/src/main.cpp =================================================================== --- tiki/examples/net/httpclient/src/main.cpp 2007-09-02 23:53:47 UTC (rev 503) +++ tiki/examples/net/httpclient/src/main.cpp 2007-09-03 03:44:24 UTC (rev 504) @@ -14,16 +14,22 @@ #include <Tiki/net/http/useragent.h> #include <Tiki/net/http/request.h> +#include <Tiki/drawables/console.h> + using namespace Tiki; using namespace Tiki::Debug; using namespace Tiki::Net; using namespace Tiki::Net::Http; +using namespace Tiki::GL; volatile bool g_quitting = false; void tkCallback( const Hid::Event & evt, void * data ) { if ( evt.type == Hid::Event::EvtQuit ) { g_quitting = true; } + else if (evt.type == Hid::Event::EvtKeypress && evt.key == Hid::Event::KeyEsc) { + g_quitting = true; + } } extern "C" int tiki_main( int argc, char **argv) { @@ -32,51 +38,75 @@ Hid::callbackReg( tkCallback, NULL ); HttpUserAgent *useragent = new HttpUserAgent(); + useragent->setCookieJar(new CookieJar()); useragent->setIgnoreCookies(false); + useragent->getCookieJar()->loadFromXML("cookies.xml"); //useragent->setProxyHost("proxy.example.com"); //useragent->setProxyPort(80); Request *request = new Request(); request->setUrl("http://www.google.com/"); - useragent->setCookieJar(new CookieJar()); - useragent->setIgnoreCookies(false); + - for(int reqCount = 0; reqCount < 10; reqCount++) { - Response *response = useragent->get(request); - Tiki::Debug::printf("response code: %d\n", response->getResultCode()); - std::list<Cookie *> cookies = useragent->getCookieJar()->getCookies(); - for(std::list<Cookie *>::iterator iter = cookies.begin(); - iter != cookies.end(); - ++iter) { - Cookie *cookie = (*iter); - if(cookie->isSecure()) { - Tiki::Debug::printf("COOKIE: %s (version->%s,path->%s,max-age->%d,domain->%s,secure->%s)\n", - cookie->getName().c_str(), cookie->getVersion().c_str(), cookie->getPath().c_str(), cookie->getMaxAge(), - cookie->getDomain().c_str(), cookie->isSecure() ? "true" : "false"); - } - else { - Tiki::Debug::printf("COOKIE: %s (version->%s,value->%s,path->%s,max-age->%d,domain->%s,secure->%s)\n", - cookie->getName().c_str(), cookie->getVersion().c_str(), cookie->getValue().c_str(), cookie->getPath().c_str(), cookie->getMaxAge(), - cookie->getDomain().c_str(), cookie->isSecure() ? "true" : "false"); - } - } +#if TIKI_PLAT == TIKI_DC + RefPtr<Texture> cf = new Texture("/rd/pc-ascii.png", true); +#else + RefPtr<Texture> cf = new Texture("resources/pc-ascii.png", true); +#endif + ConsoleText *console = new ConsoleText(80, 25, cf); + console->setSize(640, 480); + console->setTranslate( Vector( 320, 240, 0 ) ); + console->setAutoWrap( true ); + console->setAutoScroll( true ); - std::list<std::string> content = response->getContentPartNames(); - for(std::list<std::string>::iterator iter = content.begin(); - iter != content.end(); - ++iter) - { - Buffer *responseBuf = response->getContentPart(*iter); - Tiki::Debug::printf("Content Part: %s [%u bytes]\n", (*iter).c_str(), responseBuf->getUsedDataLen()); - //Tiki::Debug::printf("%s\n", responseBuf->getData()); - } + console->printf("Sending request: %s\n", request->getUrl().c_str()); + Response *response = useragent->get(request); + + console->printf("response code: %d\n", response->getResultCode()); + std::list<Cookie *> cookies = useragent->getCookieJar()->getCookies(); + for(std::list<Cookie *>::iterator iter = cookies.begin(); + iter != cookies.end(); + ++iter) { + Cookie *cookie = (*iter); + if(cookie->isSecure()) { + console->printf("COOKIE: %s (version->%s,path->%s,max-age->%d,domain->%s,secure->%s)\n", + cookie->getName().c_str(), cookie->getVersion().c_str(), cookie->getPath().c_str(), cookie->getMaxAge(), + cookie->getDomain().c_str(), cookie->isSecure() ? "true" : "false"); + } + else { + console->printf("COOKIE: %s (version->%s,value->%s,path->%s,max-age->%d,domain->%s,secure->%s)\n", + cookie->getName().c_str(), cookie->getVersion().c_str(), cookie->getValue().c_str(), cookie->getPath().c_str(), cookie->getMaxAge(), + cookie->getDomain().c_str(), cookie->isSecure() ? "true" : "false"); + } + } - delete response; + std::list<std::string> content = response->getContentPartNames(); + for(std::list<std::string>::iterator iter = content.begin(); + iter != content.end(); + ++iter) + { + Buffer *responseBuf = response->getContentPart(*iter); + console->printf("Content Part: %s [%u bytes]\n", (*iter).c_str(), responseBuf->getUsedDataLen()); + console->printf((char *)responseBuf->getData()); } + + while(!g_quitting) { + Frame::begin(); + console->draw(Drawable::Opaque); + Frame::transEnable(); + console->draw(Drawable::Trans); + Frame::finish(); + } + + useragent->getCookieJar()->saveToXML("cookies.xml"); + + delete response; delete request; delete useragent; Tiki::Net::shutdown(); + Tiki::shutdown(); + return 0; } Modified: tiki/include/Tiki/net/http/cookie.h =================================================================== --- tiki/include/Tiki/net/http/cookie.h 2007-09-02 23:53:47 UTC (rev 503) +++ tiki/include/Tiki/net/http/cookie.h 2007-09-03 03:44:24 UTC (rev 504) @@ -85,6 +85,9 @@ uint64 getCreateTime() const { return m_createTime; } + void setCreateTime(uint64 time) { + m_createTime = time; + } private: string m_name; string m_value; Modified: tiki/include/Tiki/net/socket.h =================================================================== --- tiki/include/Tiki/net/socket.h 2007-09-02 23:53:47 UTC (rev 503) +++ tiki/include/Tiki/net/socket.h 2007-09-03 03:44:24 UTC (rev 504) @@ -65,8 +65,12 @@ virtual void send(Buffer *data) = 0; + virtual void send(string &data) = 0; + virtual void recv(Buffer *data) = 0; + virtual void recv(string &data) = 0; + virtual void open() = 0; virtual void close() = 0; Modified: tiki/include/Tiki/net/tcpsocket.h =================================================================== --- tiki/include/Tiki/net/tcpsocket.h 2007-09-02 23:53:47 UTC (rev 503) +++ tiki/include/Tiki/net/tcpsocket.h 2007-09-03 03:44:24 UTC (rev 504) @@ -42,8 +42,10 @@ virtual ~TCPSocket() {} virtual void send(Buffer *data); + virtual void send(string &data); virtual void recv(Buffer *data); + virtual void recv(string &data); virtual bool isOpen() { return m_open; Modified: tiki/include/Tiki/net/util/base64.h =================================================================== --- tiki/include/Tiki/net/util/base64.h 2007-09-02 23:53:47 UTC (rev 503) +++ tiki/include/Tiki/net/util/base64.h 2007-09-03 03:44:24 UTC (rev 504) @@ -9,6 +9,8 @@ #ifndef __TIKI_BASE64_H #define __TIKI_BASE64_H +#include "Tiki/net/buffer.h" + namespace Tiki { namespace Net { namespace Util { Modified: tiki/nds/Makefile.rules =================================================================== --- tiki/nds/Makefile.rules 2007-09-02 23:53:47 UTC (rev 503) +++ tiki/nds/Makefile.rules 2007-09-03 03:44:24 UTC (rev 504) @@ -24,6 +24,7 @@ CXXFLAGS+=-I$(TIKI_DIR)/3rdparty/libogg/include CXXFLAGS+=-I$(TIKI_DIR)/3rdparty/libvorbis/include CXXFLAGS+=-I$(TIKI_DIR)/3rdparty/libvorbis/lib +CXXFLAGS+=-I$(TIKI_DIR)/3rdparty/tinyxml CXXFLAGS+=-DARM9 CXXFLAGS+=-march=armv5te -mtune=arm946e-s -fomit-frame-pointer -ffast-math -mthumb -mthumb-interwork -O2 CFLAGS=$(CXXFLAGS) Modified: tiki/nds/arm7_template/Makefile =================================================================== --- tiki/nds/arm7_template/Makefile 2007-09-02 23:53:47 UTC (rev 503) +++ tiki/nds/arm7_template/Makefile 2007-09-03 03:44:24 UTC (rev 504) @@ -37,7 +37,7 @@ ASFLAGS := -g $(ARCH) LDFLAGS = -specs=ds_arm7.specs -g $(ARCH) -mno-fpu -Wl,-Map,$(notdir $*).map -LIBS := -lnds7 +LIBS := -lnds7 -ldswifi7 #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing Modified: tiki/sdl/Makefile =================================================================== --- tiki/sdl/Makefile 2007-09-02 23:53:47 UTC (rev 503) +++ tiki/sdl/Makefile 2007-09-03 03:44:24 UTC (rev 504) @@ -48,7 +48,7 @@ THIRD_PARTY_OBJS = $(JPEG_OBJ) $(OGG_OBJ) $(VORBIS_OBJ) $(PNG_OBJ) $(ZLIB_OBJ) $(TINYXML_OBJ) CFLAGS=-I../include -I$(CURDIR)/include -g -CFLAGS+=-I../3rdparty/libogg/include -I../3rdparty/libvorbis/include -I../3rdparty/libvorbis/lib +CFLAGS+=-I../3rdparty/libogg/include -I../3rdparty/libvorbis/include -I../3rdparty/libvorbis/lib -I../3rdparty/tinyxml SUBDIRS=src Modified: tiki/src/base/debug.cpp =================================================================== --- tiki/src/base/debug.cpp 2007-09-02 23:53:47 UTC (rev 503) +++ tiki/src/base/debug.cpp 2007-09-03 03:44:24 UTC (rev 504) @@ -19,7 +19,7 @@ // console output in a GUI app. #if TIKI_PLAT == TIKI_WIN32 va_list args; - char buffer[ 4096 ]; + char buffer[ 16 * 1024 ]; va_start( args, fmt ); int i = vsprintf( buffer, fmt, args ); va_end( args ); Modified: tiki/src/gl/drawables/console.cpp =================================================================== --- tiki/src/gl/drawables/console.cpp 2007-09-02 23:53:47 UTC (rev 503) +++ tiki/src/gl/drawables/console.cpp 2007-09-03 03:44:24 UTC (rev 504) @@ -137,7 +137,11 @@ void ConsoleText::printf( const char *fmt, ... ) { +#if TIKI_PLAT == TIKI_NDS char buf[ 1024 ]; +#else + char buf[ 16 * 1024 ]; +#endif va_list args; va_start( args, fmt ); Modified: tiki/src/net/http/cookiejar.cpp =================================================================== --- tiki/src/net/http/cookiejar.cpp 2007-09-02 23:53:47 UTC (rev 503) +++ tiki/src/net/http/cookiejar.cpp 2007-09-03 03:44:24 UTC (rev 504) @@ -10,8 +10,13 @@ #include "Tiki/tiki.h" #include "Tiki/tikitime.h" #include "Tiki/net/http/cookiejar.h" +#include "Tiki/net/util/base64.h" #include "Tiki/net/util/date.h" +#include "tinyxml.h" + +#include <fstream> + namespace Tiki { namespace Net { @@ -19,7 +24,10 @@ namespace Http { using std::string; + using std::endl; using std::list; + using std::ofstream; + using Tiki::Net::Util::Base64; CookieJar::CookieJar() { } @@ -186,7 +194,9 @@ } void CookieJar::expireCookies() { - if(m_cookies.empty()) return; + if(m_cookies.empty()) { + return; + } list< list< Cookie * >::iterator > cookiesToExpire; uint64 now = Tiki::Time::gettime(); for(list<Cookie *>::iterator iter = m_cookies.begin(); @@ -195,7 +205,9 @@ // check if cookie has expired uint64 create = (*iter)->getCreateTime(); uint64 diff = now - create; - if(diff < 1) diff = 1; + if(diff < 1) { + diff = 1; + } // convert the diff from microseconds to milliseconds diff /= 1000; // convert the diff from milliseconds to seconds @@ -206,10 +218,84 @@ } } - void loadFromXML(string filename) { + void CookieJar::loadFromXML(string filename) { + TiXmlDocument doc(filename.c_str()); + Base64 b64; + if(doc.LoadFile()) { + for(TiXmlNode *node = doc.FirstChildElement("CookieJar")->FirstChild("Cookie"); node != NULL; node = node->NextSibling()) { + Cookie *cookie; + string name = node->ToElement()->Attribute("name"); + TiXmlElement *valueNode = node->FirstChildElement("Value"); + string valueEncoded(valueNode->GetText()); + Tiki::Debug::printf(valueNode->GetText()); + Buffer buf(valueEncoded.length(), (uint8 *)valueEncoded.c_str()); + Buffer *decoded = b64.decode(&buf); + string value = (char *)decoded->getData(); + delete decoded; + + cookie = new Cookie(name, value); + for(TiXmlAttribute *attr = node->ToElement()->FirstAttribute(); + attr != NULL; + attr = attr->Next()) { + if(!string(attr->Name()).compare("maxage")) { + cookie->setMaxAge(attr->IntValue()); + } + else if(!string(attr->Name()).compare("version")) { + cookie->setVersion(attr->Value()); + } + else if(!string(attr->Name()).compare("path")) { + cookie->setPath(attr->Value()); + } + else if(!string(attr->Name()).compare("secure")) { + if(attr->Value()[0] == 't') { + cookie->setSecure(true); + } + } + else if(!string(attr->Name()).compare("domain")) { + cookie->setDomain(attr->Value()); + } + else if(!string(attr->Name()).compare("created")) { + cookie->setCreateTime(attr->IntValue()); + } + } + addCookie(cookie); + } + } } - void saveToXML(string filename) { + void CookieJar::saveToXML(string filename) { + ofstream stream; + stream.open(filename.c_str()); + + stream << "<?xml version=\"1.0\" ?>" << endl; + stream << "<CookieJar>" << endl; + Base64 b64; + for(list< Cookie * >::iterator iter = m_cookies.begin(); + iter != m_cookies.end(); + ++iter) { + stream << " <Cookie name=\""<< (*iter)->getName() + << "\" version=\"" << (*iter)->getVersion() + << "\" maxage=\"" << (*iter)->getMaxAge() + << "\" created=\"" << (*iter)->getCreateTime() + << "\" domain=\"" << (*iter)->getDomain() + << "\" path=\"" << (*iter)->getPath() + << "\" secure=\"" << ((*iter)->isSecure() ? string("true") : string("false")) + << "\">" << endl; + if(!(*iter)->getComment().empty()) { + stream << " <Comment>" << (*iter)->getComment() << "</Comment>" << endl; + } + stream << " <Value><![CDATA[" << endl; + Buffer *buf = b64.encode(new Buffer((*iter)->getValue().length(), + (uint8 *)((*iter)->getValue().c_str()))); + stream << (char *)(buf->getData()); + delete buf; + stream << endl << "]]></Value>" << endl; + stream << " </Cookie>" << endl; + } + stream << "</CookieJar>" << endl; + + stream.flush(); + stream.close(); } }; // namespace Http Modified: tiki/src/net/http/useragent.cpp =================================================================== --- tiki/src/net/http/useragent.cpp 2007-09-02 23:53:47 UTC (rev 503) +++ tiki/src/net/http/useragent.cpp 2007-09-03 03:44:24 UTC (rev 504) @@ -28,25 +28,6 @@ using std::istringstream; using std::ios; -#define READ_ONE_LINE(res, socket) \ - { \ - Buffer *recvBuf = new Buffer(1); \ - res = ""; \ - while(socket->isOpen()) { \ - recvBuf->reset(); \ - socket->recv(recvBuf); \ - if(recvBuf->getUsedDataLen() > 0) { \ - if(recvBuf->getData()[0] != '\n' && recvBuf->getData()[0] != '\r' ) { \ - res.append((char *)recvBuf->getData()); \ - } \ - else if(recvBuf->getData()[0] != '\r' ) { \ - break; \ - } \ - } \ - } \ - delete recvBuf; \ - } - HttpUserAgent::HttpUserAgent() { #if TIKI_PLAT == TIKI_WIN32 m_userAgentName = "Tiki/1.0 (Windows)"; @@ -100,7 +81,7 @@ Tiki::Debug::printf("Sending request...\n"); Tiki::Debug::printf(requestText.c_str()); - socket->send(new Buffer(requestText.length(), (uint8 *)requestText.c_str())); + socket->send(requestText); readResponse(response, socket); @@ -144,12 +125,12 @@ } Tiki::Debug::printf("Sending request...\n"); - socket->send(new Buffer(requestText.length(), (uint8 *)requestText.c_str())); + socket->send(requestText); list<string> content = req->getContentPartNames(); if(content.size() > 1 || req->isForcedMultiPartUpload()) { string status = ""; - READ_ONE_LINE(status, socket) + socket->recv(status); for(list<string>::iterator iter = content.begin(); iter != content.end(); @@ -168,7 +149,7 @@ temp << "\"; filename=\"" << buf->getFileNameShort() << "\"\r\nContent-Type: " << buf->getContentType() << "\r\n\r\n"; string headerText = temp.str(); //Tiki::Debug::printf("CONTENT_HEADER:\n%s", headerText.c_str()); - socket->send(new Buffer(headerText.length(), (uint8 *)headerText.c_str())); + socket->send(headerText); socket->send(buf); } } @@ -176,7 +157,7 @@ footerText.append(req->getBoundaryMarker()); footerText.append("--\r\n"); //Tiki::Debug::printf("CONTENT_FOOTER:\n%s", footerText.c_str()); - socket->send(new Buffer(footerText.length(), (uint8 *)footerText.c_str())); + socket->send(footerText); } else if(content.size() == 1) { Buffer *buf = req->getContentPart(*content.begin()); @@ -303,7 +284,7 @@ parseUrl(response->getUrl(), host, resource, port); string status = ""; - READ_ONE_LINE(status, socket) + socket->recv(status); Tiki::Debug::printf("%s\n", status.c_str()); @@ -317,7 +298,7 @@ while(1) { string line = ""; - READ_ONE_LINE(line, socket) + socket->recv(line); if(line.size() == 0) { // done with headers break; @@ -353,7 +334,7 @@ { sizeDecoded = 0; string size = ""; - READ_ONE_LINE(size, socket); + socket->recv(size); if(size.empty()) { sizeDecoded = 1; continue; Modified: tiki/src/net/tcpsocket.cpp =================================================================== --- tiki/src/net/tcpsocket.cpp 2007-09-02 23:53:47 UTC (rev 503) +++ tiki/src/net/tcpsocket.cpp 2007-09-03 03:44:24 UTC (rev 504) @@ -34,6 +34,22 @@ } while(dataLen > 0 && (len > 0 || errno == EINTR)); } +void TCPSocket::send(string &buffer) { + uint8 *data = (uint8 *)buffer.c_str(); + size_t dataLen = buffer.length(); + int len; + + do { + //Tiki::Debug::printf("sending %d bytes\n", dataLen); + len = ::send(m_socket, (const char *)data, (int)dataLen, 0); + if(len > 0) { + //Tiki::Debug::printf("sent %d bytes\n", len); + dataLen -= len; + data += len; + } + } while(dataLen > 0 && (len > 0 || errno == EINTR)); +} + void TCPSocket::recv(Buffer *data) { size_t maxReadData = data->getDataLen(); #if TIKI_PLAT == TIKI_NDS @@ -65,6 +81,24 @@ delete [] tmp; } +void TCPSocket::recv(string &data) { + Buffer *recvBuf = new Buffer(1); + data = ""; + while(isOpen()) { + recvBuf->reset(); + recv(recvBuf); + if(recvBuf->getUsedDataLen() > 0) { + if(recvBuf->getData()[0] != '\n' && recvBuf->getData()[0] != '\r' ) { + data.append((char *)recvBuf->getData()); + } + else if(recvBuf->getData()[0] != '\r' ) { + break; + } + } + } + delete recvBuf; +} + void TCPSocket::open() { struct sockaddr_in sock_addr; m_socket = socket(AF_INET, SOCK_STREAM, 0); Modified: tiki/src/net/util/base64.cpp =================================================================== --- tiki/src/net/util/base64.cpp 2007-09-02 23:53:47 UTC (rev 503) +++ tiki/src/net/util/base64.cpp 2007-09-03 03:44:24 UTC (rev 504) @@ -62,7 +62,7 @@ while (inIndex < source->getUsedDataLen()) { if (source->getUsedDataLen() - inIndex <= 2) { quartetsPerLine++; - encodeTriplet (inputData + inIndex, source->getUsedDataLen() - inIndex, result + outIndex); + encodeTriplet (inputData + inIndex, static_cast<uint8>(source->getUsedDataLen() - inIndex), result + outIndex); break; } else { quartetsPerLine++; @@ -200,14 +200,14 @@ } size_t Base64::calcEncodeBufferSize(size_t byteCount) { - div_t result = div (byteCount, 3); + div_t result = div (static_cast<int>(byteCount), 3); size_t bytesNeeded = result.quot * 4; if (result.rem != 0) { // pad with 4 extra bytes to ensure room for pad characters; bytesNeeded += 4; } // CRLF -> "\r\n" each 76 characters - result = div (bytesNeeded, 76); + result = div (static_cast<int>(byteCount), 76); bytesNeeded += result.quot * 2; // allow room for null terminator @@ -217,7 +217,7 @@ } size_t Base64::calcDecodeBufferSize(uint8 *input, size_t inputByteCount) { - div_t result = div (inputByteCount, 4); + div_t result = div (static_cast<int>(inputByteCount), 4); size_t bytesNeeded = result.quot * 3; if (input[inputByteCount - 1] == '=') { Modified: tiki/win32/include/Tiki/platnet.h =================================================================== --- tiki/win32/include/Tiki/platnet.h 2007-09-02 23:53:47 UTC (rev 503) +++ tiki/win32/include/Tiki/platnet.h 2007-09-03 03:44:24 UTC (rev 504) @@ -15,5 +15,9 @@ #include <fcntl.h> #include <winsock2.h> +#include <wininet.h> +#pragma comment(lib, "ws2_32.lib") +#pragma comment(lib, "wininet.lib") + #endif // TIKI_PLATFORM_NET_H Modified: tiki/win32/src/platnet.cpp =================================================================== --- tiki/win32/src/platnet.cpp 2007-09-02 23:53:47 UTC (rev 503) +++ tiki/win32/src/platnet.cpp 2007-09-03 03:44:24 UTC (rev 504) @@ -9,11 +9,14 @@ #include "pch.h" #include "Tiki/tiki.h" #include "Tiki/net.h" +#include "Tiki/glhdrs.h" namespace Tiki { namespace Net { + DWORD connectionFlags; + void init() { WORD version_wanted = MAKEWORD(1,1); @@ -34,6 +37,38 @@ } } +bool connect() +{ + BOOL state = InternetAutodial(0, Tiki::GetWin32Window()); + return state == TRUE; +} + +bool isConnected() +{ + BOOL state = InternetGetConnectedState(&connectionFlags, 0); + if(connectionFlags & INTERNET_CONNECTION_CONFIGURED) { + Tiki::Debug::printf("INTERNET_CONNECTION_CONFIGURED is set\n"); + } + if(connectionFlags & INTERNET_CONNECTION_LAN) { + Tiki::Debug::printf("INTERNET_CONNECTION_LAN is set\n"); + } + if(connectionFlags & INTERNET_CONNECTION_MODEM) { + Tiki::Debug::printf("INTERNET_CONNECTION_MODEM is set\n"); + } + if(connectionFlags & INTERNET_CONNECTION_OFFLINE) { + Tiki::Debug::printf("INTERNET_CONNECTION_OFFLINE is set\n"); + } + if(connectionFlags & INTERNET_CONNECTION_PROXY) { + Tiki::Debug::printf("INTERNET_CONNECTION_PROXY is set\n"); + } + return state == TRUE; +} + +void disconnect() +{ + InternetAutodialHangup(0); +} + } // namespace Net } // namespace Tiki \ No newline at end of file Modified: tiki/win32/tiki.vcproj =================================================================== --- tiki/win32/tiki.vcproj 2007-09-02 23:53:47 UTC (rev 503) +++ tiki/win32/tiki.vcproj 2007-09-03 03:44:24 UTC (rev 504) @@ -42,7 +42,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories=""$(ProjectDir)\include";"$(ProjectDir)\..\include";"C:\Program Files\OpenAL 1.1 SDK\include";"$(ProjectDir)\..\3rdparty\libjpeg";"$(ProjectDir)\..\3rdparty\libogg\include";"$(ProjectDir)\..\3rdparty\libpng";"$(ProjectDir)\..\3rdparty\libvorbis\include";"$(ProjectDir)\..\3rdparty\zlib"" + AdditionalIncludeDirectories=""$(ProjectDir)\include";"$(ProjectDir)\..\include";"C:\Program Files\OpenAL 1.1 SDK\include";"$(ProjectDir)\..\3rdparty\libjpeg";"$(ProjectDir)\..\3rdparty\libogg\include";"$(ProjectDir)\..\3rdparty\libpng";"$(ProjectDir)\..\3rdparty\libvorbis\include";"$(ProjectDir)\..\3rdparty\zlib";"$(ProjectDir)\..\3rdparty\tinyxml"" PreprocessorDefinitions="_WIN32_WINNT=0x0500;_CRT_SECURE_NO_WARNINGS=1" MinimalRebuild="true" BasicRuntimeChecks="3" @@ -108,7 +108,7 @@ /> <Tool Name="VCCLCompilerTool" - AdditionalIncludeDirectories=""$(ProjectDir)\include";"$(ProjectDir)\..\include";"C:\Program Files\OpenAL 1.1 SDK\include";"$(ProjectDir)\..\3rdparty\libjpeg";"$(ProjectDir)\..\3rdparty\libogg\include";"$(ProjectDir)\..\3rdparty\libpng";"$(ProjectDir)\..\3rdparty\libvorbis\include";"$(ProjectDir)\..\3rdparty\zlib"" + AdditionalIncludeDirectories=""$(ProjectDir)\include";"$(ProjectDir)\..\include";"C:\Program Files\OpenAL 1.1 SDK\include";"$(ProjectDir)\..\3rdparty\libjpeg";"$(ProjectDir)\..\3rdparty\libogg\include";"$(ProjectDir)\..\3rdparty\libpng";"$(ProjectDir)\..\3rdparty\libvorbis\include";"$(ProjectDir)\..\3rdparty\zlib";"$(ProjectDir)\..\3rdparty\tinyxml"" PreprocessorDefinitions="_WIN32_WINNT=0x0500; _CRT_SECURE_NO_WARNINGS=1" RuntimeLibrary="0" UsePrecompiledHeader="2" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <c99...@us...> - 2007-09-02 23:53:51
|
Revision: 503 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=503&view=rev Author: c99koder Date: 2007-09-02 16:53:47 -0700 (Sun, 02 Sep 2007) Log Message: ----------- Tiki: HTTP: Properly initialize the cookieJar, avoid a division by zero error Modified Paths: -------------- tiki/src/net/http/cookiejar.cpp tiki/src/net/http/useragent.cpp Modified: tiki/src/net/http/cookiejar.cpp =================================================================== --- tiki/src/net/http/cookiejar.cpp 2007-08-30 22:07:55 UTC (rev 502) +++ tiki/src/net/http/cookiejar.cpp 2007-09-02 23:53:47 UTC (rev 503) @@ -186,6 +186,7 @@ } void CookieJar::expireCookies() { + if(m_cookies.empty()) return; list< list< Cookie * >::iterator > cookiesToExpire; uint64 now = Tiki::Time::gettime(); for(list<Cookie *>::iterator iter = m_cookies.begin(); @@ -194,6 +195,7 @@ // check if cookie has expired uint64 create = (*iter)->getCreateTime(); uint64 diff = now - create; + if(diff < 1) diff = 1; // convert the diff from microseconds to milliseconds diff /= 1000; // convert the diff from milliseconds to seconds Modified: tiki/src/net/http/useragent.cpp =================================================================== --- tiki/src/net/http/useragent.cpp 2007-08-30 22:07:55 UTC (rev 502) +++ tiki/src/net/http/useragent.cpp 2007-09-02 23:53:47 UTC (rev 503) @@ -62,6 +62,7 @@ m_proxyHost = ""; m_proxyPort = 8080; m_ignoreCookies = true; + m_cookieJar = NULL; } Response *HttpUserAgent::get(Request *req) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-08-30 22:08:01
|
Revision: 502 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=502&view=rev Author: atani Date: 2007-08-30 15:07:55 -0700 (Thu, 30 Aug 2007) Log Message: ----------- applying sector sizing patch from Quzar Modified Paths: -------------- kos/kernel/arch/dreamcast/hardware/cdrom.c kos/kernel/arch/dreamcast/include/dc/cdrom.h Modified: kos/kernel/arch/dreamcast/hardware/cdrom.c =================================================================== --- kos/kernel/arch/dreamcast/hardware/cdrom.c 2007-08-30 22:07:22 UTC (rev 501) +++ kos/kernel/arch/dreamcast/hardware/cdrom.c 2007-08-30 22:07:55 UTC (rev 502) @@ -61,10 +61,21 @@ /* Set disc access mode */ static int gdc_change_data_type(void *param) { MAKE_SYSCALL(return, param, 0, 10); } +/* Reset the GD-ROM */ +static void gdc_reset() { MAKE_SYSCALL(/**/, 0, 0, 9); } +/* Abort the current command */ +static void gdc_abort_cmd(int cmd) { MAKE_SYSCALL(/**/,cmd, 0, 8); } + /* The CD access mutex */ static mutex_t * mutex = NULL; +static int sector_size = 2048; /*default 2048, 2352 for raw data reading*/ +void set_sector_size (int size) { + sector_size = size; + cdrom_reinit(); +} + /* Command execution sequence */ int cdrom_exec_cmd(int cmd, void *param) { int status[4] = {0}; @@ -75,12 +86,16 @@ do { gdc_exec_server(); n = gdc_get_cmd_stat(f, status); - if (n == 1) + if (n == PROCESSING) thd_pass(); - } while (n == 1); + } while (n == PROCESSING); - if (n == 2) + if (n == COMPLETED) return ERR_OK; + else if (n == ABORTED) + return ERR_ABORTED; + else if (n == NO_ACTIVE) + return ERR_NO_ACTIVE; else { switch(status[0]) { case 2: return ERR_NO_DISC; @@ -163,7 +178,7 @@ params[0] = 0; /* 0 = set, 1 = get */ params[1] = 8192; /* ? */ params[2] = cdxa ? 2048 : 1024; /* CD-XA mode 1/2 */ - params[3] = 2048; /* sector size */ + params[3] = sector_size; /* sector size */ if (gdc_change_data_type(params) < 0) { rv = ERR_SYS; goto exit; } exit: Modified: kos/kernel/arch/dreamcast/include/dc/cdrom.h =================================================================== --- kos/kernel/arch/dreamcast/include/dc/cdrom.h 2007-08-30 22:07:22 UTC (rev 501) +++ kos/kernel/arch/dreamcast/include/dc/cdrom.h 2007-08-30 22:07:55 UTC (rev 502) @@ -36,7 +36,16 @@ #define ERR_NO_DISC 1 #define ERR_DISC_CHG 2 #define ERR_SYS 3 +#define ERR_ABORTED 4 +#define ERR_NO_ACTIVE 5 +/* Command Status responses */ +#define FAILED -1 +#define NO_ACTIVE 0 +#define PROCESSING 1 +#define COMPLETED 2 +#define ABORTED 3 + /* CDDA Read Modes */ #define CDDA_TRACKS 1 #define CDDA_SECTORS 2 @@ -71,6 +80,9 @@ #define TOC_CTRL(n) ( ((n) & 0xf0000000) >> 28 ) #define TOC_TRACK(n) ( ((n) & 0x00ff0000) >> 16 ) +/* Sets the sector size */ +void set_sector_size (int size); + /* Command execution sequence */ int cdrom_exec_cmd(int cmd, void *param); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-08-30 22:07:32
|
Revision: 501 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=501&view=rev Author: atani Date: 2007-08-30 15:07:22 -0700 (Thu, 30 Aug 2007) Log Message: ----------- removing gp2x port since it is no longer functional, a few parts of Tiki are now using features not available in GLES Modified Paths: -------------- tiki/include/Tiki/tiki.h Removed Paths: ------------- tiki/gp2x/ Modified: tiki/include/Tiki/tiki.h =================================================================== --- tiki/include/Tiki/tiki.h 2007-08-30 00:05:25 UTC (rev 500) +++ tiki/include/Tiki/tiki.h 2007-08-30 22:07:22 UTC (rev 501) @@ -30,8 +30,7 @@ #define TIKI_WIN32 1 #define TIKI_SDL 2 #define TIKI_DC 3 -#define TIKI_GP2X 4 -#define TIKI_NDS 5 +#define TIKI_NDS 4 // Bring in our custom types. #include "Tiki/tikitypes.h" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-08-30 00:05:27
|
Revision: 500 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=500&view=rev Author: atani Date: 2007-08-29 17:05:25 -0700 (Wed, 29 Aug 2007) Log Message: ----------- osx xcode project update Modified Paths: -------------- tiki/osx/Tiki.xcodeproj/project.pbxproj Modified: tiki/osx/Tiki.xcodeproj/project.pbxproj =================================================================== --- tiki/osx/Tiki.xcodeproj/project.pbxproj 2007-08-29 17:52:02 UTC (rev 499) +++ tiki/osx/Tiki.xcodeproj/project.pbxproj 2007-08-30 00:05:25 UTC (rev 500) @@ -16,6 +16,16 @@ 640C2C30092EB8C40032DE40 /* alpharotate.h in Headers */ = {isa = PBXBuildFile; fileRef = 640C2C2F092EB8C40032DE40 /* alpharotate.h */; }; 6444BEE60932A3D800A29768 /* texturetile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6444BEE50932A3D700A29768 /* texturetile.cpp */; }; 6444BEE80932A3F200A29768 /* texturetile.h in Headers */ = {isa = PBXBuildFile; fileRef = 6444BEE70932A3F200A29768 /* texturetile.h */; }; + 6499FE6A0C862377008D9FEF /* tinyxml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6499FE660C862377008D9FEF /* tinyxml.cpp */; }; + 6499FE6B0C862377008D9FEF /* tinyxml.h in Headers */ = {isa = PBXBuildFile; fileRef = 6499FE670C862377008D9FEF /* tinyxml.h */; }; + 6499FE6C0C862377008D9FEF /* tinyxmlerror.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6499FE680C862377008D9FEF /* tinyxmlerror.cpp */; }; + 6499FE6D0C862377008D9FEF /* tinyxmlparser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6499FE690C862377008D9FEF /* tinyxmlparser.cpp */; }; + 6499FE710C8623A3008D9FEF /* base64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6499FE6F0C8623A3008D9FEF /* base64.cpp */; }; + 6499FE720C8623A3008D9FEF /* date.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6499FE700C8623A3008D9FEF /* date.cpp */; }; + 6499FE760C8623D6008D9FEF /* base64.h in Headers */ = {isa = PBXBuildFile; fileRef = 6499FE740C8623D6008D9FEF /* base64.h */; }; + 6499FE770C8623D6008D9FEF /* date.h in Headers */ = {isa = PBXBuildFile; fileRef = 6499FE750C8623D6008D9FEF /* date.h */; }; + 6499FEA40C8640CA008D9FEF /* cookiejar.h in Headers */ = {isa = PBXBuildFile; fileRef = 6499FEA30C8640CA008D9FEF /* cookiejar.h */; }; + 6499FEA60C8640E5008D9FEF /* cookiejar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6499FEA50C8640E5008D9FEF /* cookiejar.cpp */; }; 64D758F4092EB9A5002667EE /* sleep.h in Headers */ = {isa = PBXBuildFile; fileRef = 64D758F3092EB9A5002667EE /* sleep.h */; }; 64ED75F50C7CFAE500D16D5C /* address.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 64ED75F10C7CFAE500D16D5C /* address.cpp */; }; 64ED75F60C7CFAE500D16D5C /* socket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 64ED75F20C7CFAE500D16D5C /* socket.cpp */; }; @@ -204,6 +214,16 @@ 640C2C2F092EB8C40032DE40 /* alpharotate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = alpharotate.h; path = ../include/Tiki/anims/alpharotate.h; sourceTree = SOURCE_ROOT; }; 6444BEE50932A3D700A29768 /* texturetile.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = texturetile.cpp; path = ../src/gl/drawables/texturetile.cpp; sourceTree = SOURCE_ROOT; }; 6444BEE70932A3F200A29768 /* texturetile.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = texturetile.h; path = ../include/Tiki/drawables/texturetile.h; sourceTree = SOURCE_ROOT; }; + 6499FE660C862377008D9FEF /* tinyxml.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = tinyxml.cpp; path = ../3rdparty/tinyxml/tinyxml.cpp; sourceTree = SOURCE_ROOT; }; + 6499FE670C862377008D9FEF /* tinyxml.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = tinyxml.h; path = ../3rdparty/tinyxml/tinyxml.h; sourceTree = SOURCE_ROOT; }; + 6499FE680C862377008D9FEF /* tinyxmlerror.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = tinyxmlerror.cpp; path = ../3rdparty/tinyxml/tinyxmlerror.cpp; sourceTree = SOURCE_ROOT; }; + 6499FE690C862377008D9FEF /* tinyxmlparser.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = tinyxmlparser.cpp; path = ../3rdparty/tinyxml/tinyxmlparser.cpp; sourceTree = SOURCE_ROOT; }; + 6499FE6F0C8623A3008D9FEF /* base64.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = base64.cpp; path = ../src/net/util/base64.cpp; sourceTree = SOURCE_ROOT; }; + 6499FE700C8623A3008D9FEF /* date.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = date.cpp; path = ../src/net/util/date.cpp; sourceTree = SOURCE_ROOT; }; + 6499FE740C8623D6008D9FEF /* base64.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = base64.h; path = ../include/Tiki/net/util/base64.h; sourceTree = SOURCE_ROOT; }; + 6499FE750C8623D6008D9FEF /* date.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = date.h; path = ../include/Tiki/net/util/date.h; sourceTree = SOURCE_ROOT; }; + 6499FEA30C8640CA008D9FEF /* cookiejar.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = cookiejar.h; path = ../include/Tiki/net/http/cookiejar.h; sourceTree = SOURCE_ROOT; }; + 6499FEA50C8640E5008D9FEF /* cookiejar.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = cookiejar.cpp; path = ../src/net/http/cookiejar.cpp; sourceTree = SOURCE_ROOT; }; 64D758F3092EB9A5002667EE /* sleep.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sleep.h; path = ../include/Tiki/anims/sleep.h; sourceTree = SOURCE_ROOT; }; 64ED75F10C7CFAE500D16D5C /* address.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = address.cpp; path = ../src/net/address.cpp; sourceTree = SOURCE_ROOT; }; 64ED75F20C7CFAE500D16D5C /* socket.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = socket.cpp; path = ../src/net/socket.cpp; sourceTree = SOURCE_ROOT; }; @@ -517,9 +537,39 @@ name = "Other Sources"; sourceTree = "<group>"; }; + 6499FE520C8622D4008D9FEF /* tinyXML */ = { + isa = PBXGroup; + children = ( + 6499FE660C862377008D9FEF /* tinyxml.cpp */, + 6499FE670C862377008D9FEF /* tinyxml.h */, + 6499FE680C862377008D9FEF /* tinyxmlerror.cpp */, + 6499FE690C862377008D9FEF /* tinyxmlparser.cpp */, + ); + name = tinyXML; + sourceTree = "<group>"; + }; + 6499FE6E0C862384008D9FEF /* util */ = { + isa = PBXGroup; + children = ( + 6499FE6F0C8623A3008D9FEF /* base64.cpp */, + 6499FE700C8623A3008D9FEF /* date.cpp */, + ); + name = util; + sourceTree = "<group>"; + }; + 6499FE730C8623AE008D9FEF /* util */ = { + isa = PBXGroup; + children = ( + 6499FE740C8623D6008D9FEF /* base64.h */, + 6499FE750C8623D6008D9FEF /* date.h */, + ); + name = util; + sourceTree = "<group>"; + }; 64ED75F00C7CFAC500D16D5C /* net */ = { isa = PBXGroup; children = ( + 6499FE6E0C862384008D9FEF /* util */, 64ED75F90C7CFAE900D16D5C /* http */, 64ED75F10C7CFAE500D16D5C /* address.cpp */, 64ED75F20C7CFAE500D16D5C /* socket.cpp */, @@ -532,6 +582,7 @@ 64ED75F90C7CFAE900D16D5C /* http */ = { isa = PBXGroup; children = ( + 6499FEA50C8640E5008D9FEF /* cookiejar.cpp */, 64ED75FA0C7CFB1800D16D5C /* request.cpp */, 64ED75FB0C7CFB1800D16D5C /* response.cpp */, 64ED75FC0C7CFB1800D16D5C /* useragent.cpp */, @@ -542,6 +593,7 @@ 64ED76110C7CFB2200D16D5C /* net */ = { isa = PBXGroup; children = ( + 6499FE730C8623AE008D9FEF /* util */, 64ED76130C7CFB4C00D16D5C /* address.h */, 64ED76140C7CFB4C00D16D5C /* buffer.h */, 64ED76150C7CFB4C00D16D5C /* socket.h */, @@ -556,6 +608,7 @@ 64ED76120C7CFB2D00D16D5C /* http */ = { isa = PBXGroup; children = ( + 6499FEA30C8640CA008D9FEF /* cookiejar.h */, 64ED761F0C7CFB6200D16D5C /* cookie.h */, 64ED76200C7CFB6200D16D5C /* request.h */, 64ED76210C7CFB6200D16D5C /* response.h */, @@ -768,6 +821,7 @@ C4B181C30856B19900B46BDA /* 3rdParty */ = { isa = PBXGroup; children = ( + 6499FE520C8622D4008D9FEF /* tinyXML */, C4B181CC0856B1B900B46BDA /* LibJPEG */, C4B181C90856B1B200B46BDA /* LibPNG */, C4B181C60856B1A700B46BDA /* OggVorbis */, @@ -1087,6 +1141,10 @@ 64ED76290C7CFB7E00D16D5C /* endian.h in Headers */, 64ED762A0C7CFB7E00D16D5C /* net.h in Headers */, 64ED762E0C7CFBA100D16D5C /* platnet.h in Headers */, + 6499FE6B0C862377008D9FEF /* tinyxml.h in Headers */, + 6499FE760C8623D6008D9FEF /* base64.h in Headers */, + 6499FE770C8623D6008D9FEF /* date.h in Headers */, + 6499FEA40C8640CA008D9FEF /* cookiejar.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1302,6 +1360,12 @@ 64ED75FE0C7CFB1800D16D5C /* response.cpp in Sources */, 64ED75FF0C7CFB1800D16D5C /* useragent.cpp in Sources */, 64ED762C0C7CFB9400D16D5C /* platnet.cpp in Sources */, + 6499FE6A0C862377008D9FEF /* tinyxml.cpp in Sources */, + 6499FE6C0C862377008D9FEF /* tinyxmlerror.cpp in Sources */, + 6499FE6D0C862377008D9FEF /* tinyxmlparser.cpp in Sources */, + 6499FE710C8623A3008D9FEF /* base64.cpp in Sources */, + 6499FE720C8623A3008D9FEF /* date.cpp in Sources */, + 6499FEA60C8640E5008D9FEF /* cookiejar.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-08-29 17:52:05
|
Revision: 499 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=499&view=rev Author: atani Date: 2007-08-29 10:52:02 -0700 (Wed, 29 Aug 2007) Log Message: ----------- Tiki not tiki Modified Paths: -------------- tiki/include/Tiki/net/util/date.h Modified: tiki/include/Tiki/net/util/date.h =================================================================== --- tiki/include/Tiki/net/util/date.h 2007-08-28 06:12:03 UTC (rev 498) +++ tiki/include/Tiki/net/util/date.h 2007-08-29 17:52:02 UTC (rev 499) @@ -8,7 +8,8 @@ #ifndef __TIKI_NET_UTIL_DATE_H #define __TIKI_NET_UTIL_DATE_H -#include "tiki/tikitime.h" +#include "Tiki/tikitime.h" + namespace Tiki { namespace Net { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-08-28 06:12:08
|
Revision: 498 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=498&view=rev Author: atani Date: 2007-08-27 23:12:03 -0700 (Mon, 27 Aug 2007) Log Message: ----------- oops, Tiki not tiki Modified Paths: -------------- tiki/include/Tiki/net/http/cookie.h Modified: tiki/include/Tiki/net/http/cookie.h =================================================================== --- tiki/include/Tiki/net/http/cookie.h 2007-08-28 05:22:39 UTC (rev 497) +++ tiki/include/Tiki/net/http/cookie.h 2007-08-28 06:12:03 UTC (rev 498) @@ -8,7 +8,7 @@ #ifndef __TIKI_NET_HTTP_COOKIE_H #define __TIKI_NET_HTTP_COOKIE_H -#include "tiki/tikitime.h" +#include "Tiki/tikitime.h" namespace Tiki { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-08-28 05:22:53
|
Revision: 497 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=497&view=rev Author: atani Date: 2007-08-27 22:22:39 -0700 (Mon, 27 Aug 2007) Log Message: ----------- added svn:ignore to various directories to ignore *.user, Release and Debug trees added TinyXML files to 3rdparty tree, will be used in Tiki::Net::Http::CookieJar class for load/store Added Tiki::Net::Util::Date methods (not fully implemented or tested) added "using std::???" lines to Tiki::Net::* classes/headers Reworked Cookies to be stored in the CookieJar class and sent back to the requesting server via the UserAgent (currently does not handle expired cookies, that is dependent on the Date methods above) Modified Paths: -------------- tiki/examples/net/httpclient/src/main.cpp tiki/include/Tiki/net/address.h tiki/include/Tiki/net/buffer.h tiki/include/Tiki/net/http/cookie.h tiki/include/Tiki/net/http/request.h tiki/include/Tiki/net/http/useragent.h tiki/nds/Makefile tiki/sdl/Makefile tiki/src/net/address.cpp tiki/src/net/http/request.cpp tiki/src/net/http/useragent.cpp tiki/src/net/tcpsocket.cpp tiki/win32/tiki.cbp tiki/win32/tiki.layout tiki/win32/tiki.vcproj Added Paths: ----------- tiki/3rdparty/tinyxml/ tiki/3rdparty/tinyxml/changes.txt tiki/3rdparty/tinyxml/readme.txt tiki/3rdparty/tinyxml/tinyxml.cpp tiki/3rdparty/tinyxml/tinyxml.h tiki/3rdparty/tinyxml/tinyxmlerror.cpp tiki/3rdparty/tinyxml/tinyxmlparser.cpp tiki/include/Tiki/net/http/cookiejar.h tiki/include/Tiki/net/util/date.h tiki/src/net/http/cookiejar.cpp tiki/src/net/util/date.cpp Property Changed: ---------------- tiki/examples/TikiTest/ tiki/examples/console/TikiSnake/ tiki/examples/net/basic/ tiki/examples/net/chat/ tiki/examples/net/chatd/ tiki/examples/net/httpclient/ tiki/win32/ Added: tiki/3rdparty/tinyxml/changes.txt =================================================================== --- tiki/3rdparty/tinyxml/changes.txt (rev 0) +++ tiki/3rdparty/tinyxml/changes.txt 2007-08-28 05:22:39 UTC (rev 497) @@ -0,0 +1,269 @@ +Changes in version 1.0.1: +- Fixed comment tags which were outputing as '<?--' instead of + the correct '<!--'. +- Implemented the Next and Prev methods of the TiXmlAttribute class. +- Renamed 'LastAttribtute' to 'LastAttribute' +- Fixed bad pointer to 'isspace' that could occur while parsing text. +- Errors finding beginning and end of tags no longer throw it into an + infinite loop. (Hopefully.) + +Changes in version 1.0.2 +- Minor documentation fixes. + +Changes in version 1.0.3 +- After nodes are added to a document, they return a pointer + to the new node instead of a bool for success. +- Elements can be constructed with a value, which is the + element name. Every element must have a value or it will be + invalid, but the code changes to enforce this are not fully + in place. + +Changes in version 1.1.0 +- Added the TiXmlAttributeSet class to pull the attributes into + a seperate container. +- Moved the doubly liked list out of XmlBase. Now XmlBase only + requires the Print() function and defines some utility functions. +- Moved errors into a seperate file. (With the idea of internationalization + to the other latin-1 languages.) +- Added the "NodeType" +- Fixed white space parsing in text to conform with the standard. + Basically, all white space becomes just one space. +- Added the TiXmlDeclaration class to read xml declarations. + +Changes in version 1.2.0 +- Removed the factory. The factory was not really in the spirit + of small and simple, confused the code, and was of limited value. +- Added FirstChildElement and NextSiblingElement, because they + are such common functions. +- Re-wrote the example to test and demonstrate more functionality. + +Changes in version 1.2.1 +- Fixed a bug where comments couldn't be inside elements. +- Loading now clears out existing XML rather than appending. +- Added the "Clear" method on a node to delete all its children. + +Changes in version 1.2.2 +- Fixed TiXmlAttribute::Previous actually returning "next." Thanks + to Rickard Troedsson for the bug fix. + +Changes in version 1.2.3 +- Added the TIXML prefix to the error strings to resolve conflicts + with #defines in OS headers. Thanks to Steve Lhomme. +- Fixed a delete buf that should be a delete [] buf. + Thanks to Ephi Sinowitz. + +Changes in version 1.2.4 +- ReplaceChild() was almost guarenteed to fail. Should be fixed, + thanks to Joe Smith. Joe also pointed out that the Print() functions + should take stream references: I agree, and would like to overload + the Print() method to take either format, but I don't want to do + this in a dot release. +- Some compilers seem to need an extra <ctype.h> include. Thanks + to Steve Lhomme for that. + +Changes in version 2.0.0 BETA +- Made the ToXXX() casts safe if 'this' is null. + When "LoadFile" is called with a filename, the value will correctly get set. + Thanks to Brian Yoder. +- Fixed bug where isalpha() and isalnum() would get called with a negative value for + high ascii numbers. Thanks to Alesky Aksenov. +- Fixed some errors codes that were not getting set. +- Made methods "const" that were not. +- Added a switch to enable or disable the ignoring of white space. ( TiXmlDocument::SetIgnoreWhiteSpace() ) +- Greater standardization and code re-use in the parser. +- Added a stream out operator. +- Added a stream in operator. +- Entity support, of predefined entites. &#x entities are untouched by input or output. +- Improved text out formatting. +- Fixed ReplaceChild bug, thanks to Tao Chen. + +Changes in version 2.0.1 +- Fixed hanging on loading a 0 length file. Thanks to Jeff Scozzafava. +- Fixed crashing on InsertBeforeChild and InsertAfterChild. Also possibility of bad links being + created by same function. Thanks to Frank De prins. +- Added missing licence text. Thanks to Lars Willemsens. +- Added <ctype.h> include, at the suggestion of Steve Walters. + +Changes in version 2.1.0 +- Yves Berquin brings us the STL switch. The forum on SourceForge, and various emails to + me, have long debated all out STL vs. no STL at all. And now you can have it both ways. + TinyXml will compile either way. + +Changes in version 2.1.1 +- Compilation warnings. + +Changes in version 2.1.2 +- Uneeded code is not compiled in the STL case. +- Changed headers so that STL can be turned on or off in tinyxml.h + +Changes in version 2.1.3 +- Fixed non-const reference in API; now uses a pointer. +- Copy constructor of TiXmlString not checking for assignment to self. +- Nimrod Cohen found a truly evil bug in the STL implementation that occurs + when a string is converted to a c_str and then assigned to self. Search for + STL_STRING_BUG for a full description. I'm asserting this is a Microsoft STL + bug, since &string and string.c_str() should never be the same. Nevertheless, + the code works around it. +- Urivan Saaib pointed out a compiler conflict, where the C headers define + the isblank macro, which was wiping out the TiXmlString::isblank() method. + The method was unused and has been removed. + +Changes in version 2.1.4 +- Reworked the entity code. Entities were not correctly surving round trip input and output. + Will now automatically create entities for high ascii in output. + +Changes in version 2.1.5 +- Bug fix by kylotan : infinite loop on some input (tinyxmlparser.cpp rev 1.27) +- Contributed by Ivica Aracic (bytelord) : 1 new VC++ project to compile versions as static libraries (tinyxml_lib.dsp), + and an example usage in xmltest.dsp + (Patch request ID 678605) +- A suggestion by Ronald Fenner Jr (dormlock) to add #include <istream> and <ostream> for Apple's Project Builder + (Patch request ID 697642) +- A patch from ohommes that allows to parse correctly dots in element names and attribute names + (Patch request 602600 and kylotan 701728) +- A patch from hermitgeek ( James ) and wasteland for improper error reporting +- Reviewed by Lee, with the following changes: + - Got sick of fighting the STL/non-STL thing in the windows build. Broke + them out as seperate projects. + - I have too long not included the dsw. Added. + - TinyXmlText had a protected Print. Odd. + - Made LinkEndChild public, with docs and appropriate warnings. + - Updated the docs. + +2.2.0 +- Fixed an uninitialized pointer in the TiXmlAttributes +- Fixed STL compilation problem in MinGW (and gcc 3?) - thanks Brian Yoder for finding this one +- Fixed a syntax error in TiXmlDeclaration - thanks Brian Yoder +- Fletcher Dunn proposed and submitted new error handling that tracked the row and column. Lee + modified it to not have performance impact. +- General cleanup suggestions from Fletcher Dunn. +- In error handling, general errors will no longer clear the error state of specific ones. +- Fix error in documentation : comments starting with "<?--" instead of "<!--" (thanks ion_pulse) +- Added the TiXmlHandle. An easy, safe way to browse XML DOMs with less code. +- Added QueryAttribute calls which have better error messaging. (Proposed by Fletcher Dunn) +- Nodes and attributes can now print themselves to strings. (Yves suggestion) +- Fixed bug where entities with one character would confuse parser. (Thanks Roman) + +2.2.1 +- Additional testing (no more bugs found to be fixed in this release) +- Significant performance improvement to the cursor code. + +2.3.0 +- User Data are now defined in TiXmlBase instead of TiXmlNode +- Character Entities are now UCS-2 +- Character Entities can be decimal or hexadecimal +- UTF-8 conversion. +- Fixed many, many bugs. + +2.3.1 +- Fixed bug in handling nulls embedded in the input. +- Make UTF-8 parser tolerant of bad text encoding. +- Added encoding detection. +- Many fixes and input from John-Philip Leonard Johansson (JP) and Ellers, + including UTF-8 feedback, bug reports, and patches. Thanks! +- Added version # constants - a suggestion from JP and Ellers. +- [ 979180 ] Missing ; in entity reference, fix from Rob Laveaux. +- Copy constructors and assignment have been a long time coming. Thanks to + Fokke and JP. + +2.3.2 +- Made the IsAlpha and IsAlphaNum much more tolerant of non-UTF-8 encodings. Thanks + Volker Boerchers for finding the issue. +- Ran the program though the magnificent Valgrind - http://valgrind.kde.org - to check + for memory errors. Fixed some minor issues. + +2.3.3 +- Fixed crash when test program was run from incorrect directory. +- Fixed bug 1070717 - empty document not returned correctly - thanks Katsuhisa Yuasa. +- Bug 1079301 resolved - deprecated stdlib calls. Thanks Adrian Boeing. +- Bug 1035218 fixed - documentation errors. Xunji Luo +- Other bug fixes have accumulated and been fixed on the way as well; my apologies to + authors not credited! +- Big fix / addition is to correctly return const values. TinyXml could basically + remove const in a method like this: TiXmlElement* Foo() const, where the returned element + was a pointer to internal data. That is now: const TiXmlElement* Foo() const and + TiXmlElement* Foo(). + +2.3.4 +- Fixed additional const errors, thanks Kent Gibson. +- Correctly re-enable warnings after tinyxml header. Thanks Cory Nelson. +- Variety of type cleanup and warning fixes. Thanks Warren Stevens. +- Cleaned up unneeded constructor calls in TinyString - thanks to Geoff Carlton and + the discussion group on sourceforge. + +2.4.0 +- Improved string class, thanks Tyge Lovset (whose name gets mangled in English - sorry) +- Type cast compiler warning, thanks Rob van den Bogaard +- Added GetText() convenience function. Thanks Ilya Parniuk & Andrew Ellers for input. +- Many thanks to marlonism for finding an infinite loop in bad xml. +- A patch to cleanup warnings from Robert Gebis. +- Added ValueStr() to get the value of a node as a string. +- TiXmlText can now parse and output as CDATA +- Additional string improvement from James (z2895) +- Removed extraneous 'const', thanks David Aldrich +- First pass at switching to the "safe" stdlib functions. Many people have suggested and + pushed on this, but Warren Stevens put together the first proposal. +- TinyXml now will do EOL normalization before parsing, consistent with the W3C XML spec. +- Documents loaded with the UTF-8 BOM will now save with the UTF-8 BOM. Good suggestion + from 'instructor_' +- Ellers submitted his very popular tutorials, which have been added to the distribution. + +2.4.1 +- Fixed CDATA output formatting +- Fixed memory allocators in TinyString to work with overloaded new/delete + +2.4.2 +- solosnake pointed out that TIXML_LOG causes problems on an XBOX. The definition in the header + was superflous and was moved inside of DEBUG_PARSING + +2.4.3 +- Fixed a test bug that caused a crash in 'xmltest'. TinyXML was fine, but it isn't good + to ship with a broken test suite. +- Started converting some functions to not cast between std::string and const char* + quite as often. +- Added FILE* versions of the document loads - good suggestion from Wade Brainerd +- Empty documents might not always return the errors they should. [1398915] Thanks to igor v. +- Added some asserts for multiply adding a node, regardng bug [1391937] suggested by Paco Arjonilla. + +2.4.4 +- Bug find thanks to andre-gross found a memory leak that occured when a document failed to load. +- Bug find (and good analysis) by VirtualJim who found a case where attribute parsing + should be throwing an error and wasn't. +- Steve Hyatt suggested the QueryValueAttribute method, which is now implemented. +- DavidA identified a chunk of dead code. +- Andrew Baxter sent in some compiler warnings that were good clean up points. + +2.5 +- Added the Visit() API. Many thanks to both Andrew Ellerton and John-Philip for all their + work, code, suggestion, and just general pushing that it should be done. +- Removed existing streaming code and use TiXmlPrinter instead. +- [ tinyxml-Bugs-1527079 ] Compile error in tinystr.cpp fixed, thanks to Paul Suggs +- [ tinyxml-Bugs-1522890 ] SaveFile has no error checks fixed, thanks to Ivan Dobrokotov +- Ivan Dobrokotov also reported redundant memory allocation in the Attribute() method, which + upon investigation was a mess. The attribute should now be fixed for both const char* and + std::string, and the return types match the input parameters. +- Feature [ 1511105 ] Make TiXmlComment constructor accept a string / char*, implemented. + Thanks to Karl Itschen for the feedback. +- [ 1480108 ] Stream parsing fails when CDATA contains tags was found by Tobias Grimm, who also + submitted a test case and patch. A significant bug in CDATA streaming (operator>>) has now + been fixed. + +2.5.2 +- Lieven, and others, pointed out a missing const-cast that upset the Open Watcom compiler. + Should now be fixed. +- ErrorRow and ErrorCol should have been const, and weren't. Fixed thanks to Dmitry Polutov. + +2.5.3 +- zloe_zlo identified a missing string specialization for QueryValueAttribute() [ 1695429 ]. Worked + on this bug, but not sure how to fix it in a safe, cross-compiler way. +- increased warning level to 4 and turned on detect 64 bit portability issues for VC2005. + May address [ 1677737 ] VS2005: /Wp64 warnings +- grosheck identified several problems with the Document copy. Many thanks for [ 1660367 ] +- Nice catch, and suggested fix, be Gilad Novik on the Printer dropping entities. + "[ 1600650 ] Bug when printing xml text" is now fixed. +- A subtle fix from Nicos Gollan in the tinystring initializer: + [ 1581449 ] Fix initialiser of TiXmlString::nullrep_ +- Great catch, although there isn't a submitter for the bug. [ 1475201 ] TinyXML parses entities in comments. + Comments should not, in fact, parse entities. Fixed the code path and added tests. +- We were not catching all the returns from ftell. Thanks to Bernard for catching that. + Added: tiki/3rdparty/tinyxml/readme.txt =================================================================== --- tiki/3rdparty/tinyxml/readme.txt (rev 0) +++ tiki/3rdparty/tinyxml/readme.txt 2007-08-28 05:22:39 UTC (rev 497) @@ -0,0 +1,530 @@ +/** @mainpage + +<h1> TinyXML </h1> + +TinyXML is a simple, small, C++ XML parser that can be easily +integrated into other programs. + +<h2> What it does. </h2> + +In brief, TinyXML parses an XML document, and builds from that a +Document Object Model (DOM) that can be read, modified, and saved. + +XML stands for "eXtensible Markup Language." It allows you to create +your own document markups. Where HTML does a very good job of marking +documents for browsers, XML allows you to define any kind of document +markup, for example a document that describes a "to do" list for an +organizer application. XML is a very structured and convenient format. +All those random file formats created to store application data can +all be replaced with XML. One parser for everything. + +The best place for the complete, correct, and quite frankly hard to +read spec is at <a href="http://www.w3.org/TR/2004/REC-xml-20040204/"> +http://www.w3.org/TR/2004/REC-xml-20040204/</a>. An intro to XML +(that I really like) can be found at +<a href="http://skew.org/xml/tutorial/">http://skew.org/xml/tutorial</a>. + +There are different ways to access and interact with XML data. +TinyXML uses a Document Object Model (DOM), meaning the XML data is parsed +into a C++ objects that can be browsed and manipulated, and then +written to disk or another output stream. You can also construct an XML document +from scratch with C++ objects and write this to disk or another output +stream. + +TinyXML is designed to be easy and fast to learn. It is two headers +and four cpp files. Simply add these to your project and off you go. +There is an example file - xmltest.cpp - to get you started. + +TinyXML is released under the ZLib license, +so you can use it in open source or commercial code. The details +of the license are at the top of every source file. + +TinyXML attempts to be a flexible parser, but with truly correct and +compliant XML output. TinyXML should compile on any reasonably C++ +compliant system. It does not rely on exceptions or RTTI. It can be +compiled with or without STL support. TinyXML fully supports +the UTF-8 encoding, and the first 64k character entities. + + +<h2> What it doesn't do. </h2> + +TinyXML doesn't parse or use DTDs (Document Type Definitions) or XSLs +(eXtensible Stylesheet Language.) There are other parsers out there +(check out www.sourceforge.org, search for XML) that are much more fully +featured. But they are also much bigger, take longer to set up in +your project, have a higher learning curve, and often have a more +restrictive license. If you are working with browsers or have more +complete XML needs, TinyXML is not the parser for you. + +The following DTD syntax will not parse at this time in TinyXML: + +@verbatim + <!DOCTYPE Archiv [ + <!ELEMENT Comment (#PCDATA)> + ]> +@endverbatim + +because TinyXML sees this as a !DOCTYPE node with an illegally +embedded !ELEMENT node. This may be addressed in the future. + +<h2> Tutorials. </h2> + +For the impatient, here is a tutorial to get you going. A great way to get started, +but it is worth your time to read this (very short) manual completely. + +- @subpage tutorial0 + +<h2> Code Status. </h2> + +TinyXML is mature, tested code. It is very stable. If you find +bugs, please file a bug report on the sourceforge web site +(www.sourceforge.net/projects/tinyxml). We'll get them straightened +out as soon as possible. + +There are some areas of improvement; please check sourceforge if you are +interested in working on TinyXML. + +<h2> Related Projects </h2> + +TinyXML projects you may find useful! (Descriptions provided by the projects.) + +<ul> +<li> <b>TinyXPath</b> (http://tinyxpath.sourceforge.net). TinyXPath is a small footprint + XPath syntax decoder, written in C++.</li> +<li> <b>TinyXML++</b> (http://code.google.com/p/ticpp/). TinyXML++ is a completely new + interface to TinyXML that uses MANY of the C++ strengths. Templates, + exceptions, and much better error handling.</li> +</ul> + +<h2> Features </h2> + +<h3> Using STL </h3> + +TinyXML can be compiled to use or not use STL. When using STL, TinyXML +uses the std::string class, and fully supports std::istream, std::ostream, +operator<<, and operator>>. Many API methods have both 'const char*' and +'const std::string&' forms. + +When STL support is compiled out, no STL files are included whatsoever. All +the string classes are implemented by TinyXML itself. API methods +all use the 'const char*' form for input. + +Use the compile time #define: + + TIXML_USE_STL + +to compile one version or the other. This can be passed by the compiler, +or set as the first line of "tinyxml.h". + +Note: If compiling the test code in Linux, setting the environment +variable TINYXML_USE_STL=YES/NO will control STL compilation. In the +Windows project file, STL and non STL targets are provided. In your project, +It's probably easiest to add the line "#define TIXML_USE_STL" as the first +line of tinyxml.h. + +<h3> UTF-8 </h3> + +TinyXML supports UTF-8 allowing to manipulate XML files in any language. TinyXML +also supports "legacy mode" - the encoding used before UTF-8 support and +probably best described as "extended ascii". + +Normally, TinyXML will try to detect the correct encoding and use it. However, +by setting the value of TIXML_DEFAULT_ENCODING in the header file, TinyXML +can be forced to always use one encoding. + +TinyXML will assume Legacy Mode until one of the following occurs: +<ol> + <li> If the non-standard but common "UTF-8 lead bytes" (0xef 0xbb 0xbf) + begin the file or data stream, TinyXML will read it as UTF-8. </li> + <li> If the declaration tag is read, and it has an encoding="UTF-8", then + TinyXML will read it as UTF-8. </li> + <li> If the declaration tag is read, and it has no encoding specified, then TinyXML will + read it as UTF-8. </li> + <li> If the declaration tag is read, and it has an encoding="something else", then TinyXML + will read it as Legacy Mode. In legacy mode, TinyXML will work as it did before. It's + not clear what that mode does exactly, but old content should keep working.</li> + <li> Until one of the above criteria is met, TinyXML runs in Legacy Mode.</li> +</ol> + +What happens if the encoding is incorrectly set or detected? TinyXML will try +to read and pass through text seen as improperly encoded. You may get some strange results or +mangled characters. You may want to force TinyXML to the correct mode. + +You may force TinyXML to Legacy Mode by using LoadFile( TIXML_ENCODING_LEGACY ) or +LoadFile( filename, TIXML_ENCODING_LEGACY ). You may force it to use legacy mode all +the time by setting TIXML_DEFAULT_ENCODING = TIXML_ENCODING_LEGACY. Likewise, you may +force it to TIXML_ENCODING_UTF8 with the same technique. + +For English users, using English XML, UTF-8 is the same as low-ASCII. You +don't need to be aware of UTF-8 or change your code in any way. You can think +of UTF-8 as a "superset" of ASCII. + +UTF-8 is not a double byte format - but it is a standard encoding of Unicode! +TinyXML does not use or directly support wchar, TCHAR, or Microsoft's _UNICODE at this time. +It is common to see the term "Unicode" improperly refer to UTF-16, a wide byte encoding +of unicode. This is a source of confusion. + +For "high-ascii" languages - everything not English, pretty much - TinyXML can +handle all languages, at the same time, as long as the XML is encoded +in UTF-8. That can be a little tricky, older programs and operating systems +tend to use the "default" or "traditional" code page. Many apps (and almost all +modern ones) can output UTF-8, but older or stubborn (or just broken) ones +still output text in the default code page. + +For example, Japanese systems traditionally use SHIFT-JIS encoding. +Text encoded as SHIFT-JIS can not be read by TinyXML. +A good text editor can import SHIFT-JIS and then save as UTF-8. + +The <a href="http://skew.org/xml/tutorial/">Skew.org link</a> does a great +job covering the encoding issue. + +The test file "utf8test.xml" is an XML containing English, Spanish, Russian, +and Simplified Chinese. (Hopefully they are translated correctly). The file +"utf8test.gif" is a screen capture of the XML file, rendered in IE. Note that +if you don't have the correct fonts (Simplified Chinese or Russian) on your +system, you won't see output that matches the GIF file even if you can parse +it correctly. Also note that (at least on my Windows machine) console output +is in a Western code page, so that Print() or printf() cannot correctly display +the file. This is not a bug in TinyXML - just an OS issue. No data is lost or +destroyed by TinyXML. The console just doesn't render UTF-8. + + +<h3> Entities </h3> +TinyXML recognizes the pre-defined "character entities", meaning special +characters. Namely: + +@verbatim + & & + < < + > > + " " + ' ' +@endverbatim + +These are recognized when the XML document is read, and translated to there +UTF-8 equivalents. For instance, text with the XML of: + +@verbatim + Far & Away +@endverbatim + +will have the Value() of "Far & Away" when queried from the TiXmlText object, +and will be written back to the XML stream/file as an ampersand. Older versions +of TinyXML "preserved" character entities, but the newer versions will translate +them into characters. + +Additionally, any character can be specified by its Unicode code point: +The syntax " " or " " are both to the non-breaking space characher. + +<h3> Printing </h3> +TinyXML can print output in several different ways that all have strengths and limitations. + +- Print( FILE* ). Output to a std-C stream, which includes all C files as well as stdout. + - "Pretty prints", but you don't have control over printing options. + - The output is streamed directly to the FILE object, so there is no memory overhead + in the TinyXML code. + - used by Print() and SaveFile() + +- operator<<. Output to a c++ stream. + - Integrates with standart C++ iostreams. + - Outputs in "network printing" mode without line breaks. Good for network transmission + and moving XML between C++ objects, but hard for a human to read. + +- TiXmlPrinter. Output to a std::string or memory buffer. + - API is less concise + - Future printing options will be put here. + - Printing may change slightly in future versions as it is refined and expanded. + +<h3> Streams </h3> +With TIXML_USE_STL on TinyXML supports C++ streams (operator <<,>>) streams as well +as C (FILE*) streams. There are some differences that you may need to be aware of. + +C style output: + - based on FILE* + - the Print() and SaveFile() methods + + Generates formatted output, with plenty of white space, intended to be as + human-readable as possible. They are very fast, and tolerant of ill formed + XML documents. For example, an XML document that contains 2 root elements + and 2 declarations, will still print. + +C style input: + - based on FILE* + - the Parse() and LoadFile() methods + + A fast, tolerant read. Use whenever you don't need the C++ streams. + +C++ style output: + - based on std::ostream + - operator<< + + Generates condensed output, intended for network transmission rather than + readability. Depending on your system's implementation of the ostream class, + these may be somewhat slower. (Or may not.) Not tolerant of ill formed XML: + a document should contain the correct one root element. Additional root level + elements will not be streamed out. + +C++ style input: + - based on std::istream + - operator>> + + Reads XML from a stream, making it useful for network transmission. The tricky + part is knowing when the XML document is complete, since there will almost + certainly be other data in the stream. TinyXML will assume the XML data is + complete after it reads the root element. Put another way, documents that + are ill-constructed with more than one root element will not read correctly. + Also note that operator>> is somewhat slower than Parse, due to both + implementation of the STL and limitations of TinyXML. + +<h3> White space </h3> +The world simply does not agree on whether white space should be kept, or condensed. +For example, pretend the '_' is a space, and look at "Hello____world". HTML, and +at least some XML parsers, will interpret this as "Hello_world". They condense white +space. Some XML parsers do not, and will leave it as "Hello____world". (Remember +to keep pretending the _ is a space.) Others suggest that __Hello___world__ should become +Hello___world. + +It's an issue that hasn't been resolved to my satisfaction. TinyXML supports the +first 2 approaches. Call TiXmlBase::SetCondenseWhiteSpace( bool ) to set the desired behavior. +The default is to condense white space. + +If you change the default, you should call TiXmlBase::SetCondenseWhiteSpace( bool ) +before making any calls to Parse XML data, and I don't recommend changing it after +it has been set. + + +<h3> Handles </h3> + +Where browsing an XML document in a robust way, it is important to check +for null returns from method calls. An error safe implementation can +generate a lot of code like: + +@verbatim +TiXmlElement* root = document.FirstChildElement( "Document" ); +if ( root ) +{ + TiXmlElement* element = root->FirstChildElement( "Element" ); + if ( element ) + { + TiXmlElement* child = element->FirstChildElement( "Child" ); + if ( child ) + { + TiXmlElement* child2 = child->NextSiblingElement( "Child" ); + if ( child2 ) + { + // Finally do something useful. +@endverbatim + +Handles have been introduced to clean this up. Using the TiXmlHandle class, +the previous code reduces to: + +@verbatim +TiXmlHandle docHandle( &document ); +TiXmlElement* child2 = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).Child( "Child", 1 ).ToElement(); +if ( child2 ) +{ + // do something useful +@endverbatim + +Which is much easier to deal with. See TiXmlHandle for more information. + + +<h3> Row and Column tracking </h3> +Being able to track nodes and attributes back to their origin location +in source files can be very important for some applications. Additionally, +knowing where parsing errors occured in the original source can be very +time saving. + +TinyXML can tracks the row and column origin of all nodes and attributes +in a text file. The TiXmlBase::Row() and TiXmlBase::Column() methods return +the origin of the node in the source text. The correct tabs can be +configured in TiXmlDocument::SetTabSize(). + + +<h2> Using and Installing </h2> + +To Compile and Run xmltest: + +A Linux Makefile and a Windows Visual C++ .dsw file is provided. +Simply compile and run. It will write the file demotest.xml to your +disk and generate output on the screen. It also tests walking the +DOM by printing out the number of nodes found using different +techniques. + +The Linux makefile is very generic and runs on many systems - it +is currently tested on mingw and +MacOSX. You do not need to run 'make depend'. The dependecies have been +hard coded. + +<h3>Windows project file for VC6</h3> +<ul> +<li>tinyxml: tinyxml library, non-STL </li> +<li>tinyxmlSTL: tinyxml library, STL </li> +<li>tinyXmlTest: test app, non-STL </li> +<li>tinyXmlTestSTL: test app, STL </li> +</ul> + +<h3>Makefile</h3> +At the top of the makefile you can set: + +PROFILE, DEBUG, and TINYXML_USE_STL. Details (such that they are) are in +the makefile. + +In the tinyxml directory, type "make clean" then "make". The executable +file 'xmltest' will be created. + + + +<h3>To Use in an Application:</h3> + +Add tinyxml.cpp, tinyxml.h, tinyxmlerror.cpp, tinyxmlparser.cpp, tinystr.cpp, and tinystr.h to your +project or make file. That's it! It should compile on any reasonably +compliant C++ system. You do not need to enable exceptions or +RTTI for TinyXML. + + +<h2> How TinyXML works. </h2> + +An example is probably the best way to go. Take: +@verbatim + <?xml version="1.0" standalone=no> + <!-- Our to do list data --> + <ToDo> + <Item priority="1"> Go to the <bold>Toy store!</bold></Item> + <Item priority="2"> Do bills</Item> + </ToDo> +@endverbatim + +Its not much of a To Do list, but it will do. To read this file +(say "demo.xml") you would create a document, and parse it in: +@verbatim + TiXmlDocument doc( "demo.xml" ); + doc.LoadFile(); +@endverbatim + +And its ready to go. Now lets look at some lines and how they +relate to the DOM. + +@verbatim +<?xml version="1.0" standalone=no> +@endverbatim + + The first line is a declaration, and gets turned into the + TiXmlDeclaration class. It will be the first child of the + document node. + + This is the only directive/special tag parsed by by TinyXML. + Generally directive tags are stored in TiXmlUnknown so the + commands wont be lost when it is saved back to disk. + +@verbatim +<!-- Our to do list data --> +@endverbatim + + A comment. Will become a TiXmlComment object. + +@verbatim +<ToDo> +@endverbatim + + The "ToDo" tag defines a TiXmlElement object. This one does not have + any attributes, but does contain 2 other elements. + +@verbatim +<Item priority="1"> +@endverbatim + + Creates another TiXmlElement which is a child of the "ToDo" element. + This element has 1 attribute, with the name "priority" and the value + "1". + +@verbatim +Go to the +@endverbatim + + A TiXmlText. This is a leaf node and cannot contain other nodes. + It is a child of the "Item" TiXmlElement. + +@verbatim +<bold> +@endverbatim + + + Another TiXmlElement, this one a child of the "Item" element. + +Etc. + +Looking at the entire object tree, you end up with: +@verbatim +TiXmlDocument "demo.xml" + TiXmlDeclaration "version='1.0'" "standalone=no" + TiXmlComment " Our to do list data" + TiXmlElement "ToDo" + TiXmlElement "Item" Attribtutes: priority = 1 + TiXmlText "Go to the " + TiXmlElement "bold" + TiXmlText "Toy store!" + TiXmlElement "Item" Attributes: priority=2 + TiXmlText "Do bills" +@endverbatim + +<h2> Documentation </h2> + +The documentation is build with Doxygen, using the 'dox' +configuration file. + +<h2> License </h2> + +TinyXML is released under the zlib license: + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. + +<h2> References </h2> + +The World Wide Web Consortium is the definitive standard body for +XML, and there web pages contain huge amounts of information. + +The definitive spec: <a href="http://www.w3.org/TR/2004/REC-xml-20040204/"> +http://www.w3.org/TR/2004/REC-xml-20040204/</a> + +I also recommend "XML Pocket Reference" by Robert Eckstein and published by +OReilly...the book that got the whole thing started. + +<h2> Contributors, Contacts, and a Brief History </h2> + +Thanks very much to everyone who sends suggestions, bugs, ideas, and +encouragement. It all helps, and makes this project fun. A special thanks +to the contributors on the web pages that keep it lively. + +So many people have sent in bugs and ideas, that rather than list here +we try to give credit due in the "changes.txt" file. + +TinyXML was originally written by Lee Thomason. (Often the "I" still +in the documentation.) Lee reviews changes and releases new versions, +with the help of Yves Berquin, Andrew Ellerton, and the tinyXml community. + +We appreciate your suggestions, and would love to know if you +use TinyXML. Hopefully you will enjoy it and find it useful. +Please post questions, comments, file bugs, or contact us at: + +www.sourceforge.net/projects/tinyxml + +Lee Thomason, Yves Berquin, Andrew Ellerton +*/ Added: tiki/3rdparty/tinyxml/tinyxml.cpp =================================================================== --- tiki/3rdparty/tinyxml/tinyxml.cpp (rev 0) +++ tiki/3rdparty/tinyxml/tinyxml.cpp 2007-08-28 05:22:39 UTC (rev 497) @@ -0,0 +1,1879 @@ +/* +www.sourceforge.net/projects/tinyxml +Original code (2.0 and earlier )copyright (c) 2000-2006 Lee Thomason (www.grinninglizard.com) + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + +#include "pch.h" + +#include "tinyxml.h" + + +bool TiXmlBase::condenseWhiteSpace = true; + +// Microsoft compiler security +FILE* TiXmlFOpen( const char* filename, const char* mode ) +{ + #if defined(_MSC_VER) && (_MSC_VER >= 1400 ) + FILE* fp = 0; + errno_t err = fopen_s( &fp, filename, mode ); + if ( !err && fp ) + return fp; + return 0; + #else + return fopen( filename, mode ); + #endif +} + +void TiXmlBase::EncodeString( const TIXML_STRING& str, TIXML_STRING* outString ) +{ + int i=0; + + while( i<(int)str.length() ) + { + unsigned char c = (unsigned char) str[i]; + + if ( c == '&' + && i < ( (int)str.length() - 2 ) + && str[i+1] == '#' + && str[i+2] == 'x' ) + { + // Hexadecimal character reference. + // Pass through unchanged. + // © -- copyright symbol, for example. + // + // The -1 is a bug fix from Rob Laveaux. It keeps + // an overflow from happening if there is no ';'. + // There are actually 2 ways to exit this loop - + // while fails (error case) and break (semicolon found). + // However, there is no mechanism (currently) for + // this function to return an error. + while ( i<(int)str.length()-1 ) + { + outString->append( str.c_str() + i, 1 ); + ++i; + if ( str[i] == ';' ) + break; + } + } + else if ( c == '&' ) + { + outString->append( entity[0].str, entity[0].strLength ); + ++i; + } + else if ( c == '<' ) + { + outString->append( entity[1].str, entity[1].strLength ); + ++i; + } + else if ( c == '>' ) + { + outString->append( entity[2].str, entity[2].strLength ); + ++i; + } + else if ( c == '\"' ) + { + outString->append( entity[3].str, entity[3].strLength ); + ++i; + } + else if ( c == '\'' ) + { + outString->append( entity[4].str, entity[4].strLength ); + ++i; + } + else if ( c < 32 ) + { + // Easy pass at non-alpha/numeric/symbol + // Below 32 is symbolic. + char buf[ 32 ]; + + #if defined(TIXML_SNPRINTF) + TIXML_SNPRINTF( buf, sizeof(buf), "&#x%02X;", (unsigned) ( c & 0xff ) ); + #else + sprintf( buf, "&#x%02X;", (unsigned) ( c & 0xff ) ); + #endif + + //*ME: warning C4267: convert 'size_t' to 'int' + //*ME: Int-Cast to make compiler happy ... + outString->append( buf, (int)strlen( buf ) ); + ++i; + } + else + { + //char realc = (char) c; + //outString->append( &realc, 1 ); + *outString += (char) c; // somewhat more efficient function call. + ++i; + } + } +} + + +TiXmlNode::TiXmlNode( NodeType _type ) : TiXmlBase() +{ + parent = 0; + type = _type; + firstChild = 0; + lastChild = 0; + prev = 0; + next = 0; +} + + +TiXmlNode::~TiXmlNode() +{ + TiXmlNode* node = firstChild; + TiXmlNode* temp = 0; + + while ( node ) + { + temp = node; + node = node->next; + delete temp; + } +} + + +void TiXmlNode::CopyTo( TiXmlNode* target ) const +{ + target->SetValue (value.c_str() ); + target->userData = userData; +} + + +void TiXmlNode::Clear() +{ + TiXmlNode* node = firstChild; + TiXmlNode* temp = 0; + + while ( node ) + { + temp = node; + node = node->next; + delete temp; + } + + firstChild = 0; + lastChild = 0; +} + + +TiXmlNode* TiXmlNode::LinkEndChild( TiXmlNode* node ) +{ + assert( node->parent == 0 || node->parent == this ); + assert( node->GetDocument() == 0 || node->GetDocument() == this->GetDocument() ); + + if ( node->Type() == TiXmlNode::DOCUMENT ) + { + delete node; + if ( GetDocument() ) GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + node->parent = this; + + node->prev = lastChild; + node->next = 0; + + if ( lastChild ) + lastChild->next = node; + else + firstChild = node; // it was an empty list. + + lastChild = node; + return node; +} + + +TiXmlNode* TiXmlNode::InsertEndChild( const TiXmlNode& addThis ) +{ + if ( addThis.Type() == TiXmlNode::DOCUMENT ) + { + if ( GetDocument() ) GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + TiXmlNode* node = addThis.Clone(); + if ( !node ) + return 0; + + return LinkEndChild( node ); +} + + +TiXmlNode* TiXmlNode::InsertBeforeChild( TiXmlNode* beforeThis, const TiXmlNode& addThis ) +{ + if ( !beforeThis || beforeThis->parent != this ) { + return 0; + } + if ( addThis.Type() == TiXmlNode::DOCUMENT ) + { + if ( GetDocument() ) GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + TiXmlNode* node = addThis.Clone(); + if ( !node ) + return 0; + node->parent = this; + + node->next = beforeThis; + node->prev = beforeThis->prev; + if ( beforeThis->prev ) + { + beforeThis->prev->next = node; + } + else + { + assert( firstChild == beforeThis ); + firstChild = node; + } + beforeThis->prev = node; + return node; +} + + +TiXmlNode* TiXmlNode::InsertAfterChild( TiXmlNode* afterThis, const TiXmlNode& addThis ) +{ + if ( !afterThis || afterThis->parent != this ) { + return 0; + } + if ( addThis.Type() == TiXmlNode::DOCUMENT ) + { + if ( GetDocument() ) GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + TiXmlNode* node = addThis.Clone(); + if ( !node ) + return 0; + node->parent = this; + + node->prev = afterThis; + node->next = afterThis->next; + if ( afterThis->next ) + { + afterThis->next->prev = node; + } + else + { + assert( lastChild == afterThis ); + lastChild = node; + } + afterThis->next = node; + return node; +} + + +TiXmlNode* TiXmlNode::ReplaceChild( TiXmlNode* replaceThis, const TiXmlNode& withThis ) +{ + if ( replaceThis->parent != this ) + return 0; + + TiXmlNode* node = withThis.Clone(); + if ( !node ) + return 0; + + node->next = replaceThis->next; + node->prev = replaceThis->prev; + + if ( replaceThis->next ) + replaceThis->next->prev = node; + else + lastChild = node; + + if ( replaceThis->prev ) + replaceThis->prev->next = node; + else + firstChild = node; + + delete replaceThis; + node->parent = this; + return node; +} + + +bool TiXmlNode::RemoveChild( TiXmlNode* removeThis ) +{ + if ( removeThis->parent != this ) + { + assert( 0 ); + return false; + } + + if ( removeThis->next ) + removeThis->next->prev = removeThis->prev; + else + lastChild = removeThis->prev; + + if ( removeThis->prev ) + removeThis->prev->next = removeThis->next; + else + firstChild = removeThis->next; + + delete removeThis; + return true; +} + +const TiXmlNode* TiXmlNode::FirstChild( const char * _value ) const +{ + const TiXmlNode* node; + for ( node = firstChild; node; node = node->next ) + { + if ( strcmp( node->Value(), _value ) == 0 ) + return node; + } + return 0; +} + + +const TiXmlNode* TiXmlNode::LastChild( const char * _value ) const +{ + const TiXmlNode* node; + for ( node = lastChild; node; node = node->prev ) + { + if ( strcmp( node->Value(), _value ) == 0 ) + return node; + } + return 0; +} + + +const TiXmlNode* TiXmlNode::IterateChildren( const TiXmlNode* previous ) const +{ + if ( !previous ) + { + return FirstChild(); + } + else + { + assert( previous->parent == this ); + return previous->NextSibling(); + } +} + + +const TiXmlNode* TiXmlNode::IterateChildren( const char * val, const TiXmlNode* previous ) const +{ + if ( !previous ) + { + return FirstChild( val ); + } + else + { + assert( previous->parent == this ); + return previous->NextSibling( val ); + } +} + + +const TiXmlNode* TiXmlNode::NextSibling( const char * _value ) const +{ + const TiXmlNode* node; + for ( node = next; node; node = node->next ) + { + if ( strcmp( node->Value(), _value ) == 0 ) + return node; + } + return 0; +} + + +const TiXmlNode* TiXmlNode::PreviousSibling( const char * _value ) const +{ + const TiXmlNode* node; + for ( node = prev; node; node = node->prev ) + { + if ( strcmp( node->Value(), _value ) == 0 ) + return node; + } + return 0; +} + + +void TiXmlElement::RemoveAttribute( const char * name ) +{ + TIXML_STRING str( name ); + TiXmlAttribute* node = attributeSet.Find( str ); + if ( node ) + { + attributeSet.Remove( node ); + delete node; + } +} + +const TiXmlElement* TiXmlNode::FirstChildElement() const +{ + const TiXmlNode* node; + + for ( node = FirstChild(); + node; + node = node->NextSibling() ) + { + if ( node->ToElement() ) + return node->ToElement(); + } + return 0; +} + + +const TiXmlElement* TiXmlNode::FirstChildElement( const char * _value ) const +{ + const TiXmlNode* node; + + for ( node = FirstChild( _value ); + node; + node = node->NextSibling( _value ) ) + { + if ( node->ToElement() ) + return node->ToElement(); + } + return 0; +} + + +const TiXmlElement* TiXmlNode::NextSiblingElement() const +{ + const TiXmlNode* node; + + for ( node = NextSibling(); + node; + node = node->NextSibling() ) + { + if ( node->ToElement() ) + return node->ToElement(); + } + return 0; +} + + +const TiXmlElement* TiXmlNode::NextSiblingElement( const char * _value ) const +{ + const TiXmlNode* node; + + for ( node = NextSibling( _value ); + node; + node = node->NextSibling( _value ) ) + { + if ( node->ToElement() ) + return node->ToElement(); + } + return 0; +} + + +const TiXmlDocument* TiXmlNode::GetDocument() const +{ + const TiXmlNode* node; + + for( node = this; node; node = node->parent ) + { + if ( node->ToDocument() ) + return node->ToDocument(); + } + return 0; +} + + +TiXmlElement::TiXmlElement (const char * _value) + : TiXmlNode( TiXmlNode::ELEMENT ) +{ + firstChild = lastChild = 0; + value = _value; +} + + +#ifdef TIXML_USE_STL +TiXmlElement::TiXmlElement( const std::string& _value ) + : TiXmlNode( TiXmlNode::ELEMENT ) +{ + firstChild = lastChild = 0; + value = _value; +} +#endif + + +TiXmlElement::TiXmlElement( const TiXmlElement& copy) + : TiXmlNode( TiXmlNode::ELEMENT ) +{ + firstChild = lastChild = 0; + copy.CopyTo( this ); +} + + +void TiXmlElement::operator=( const TiXmlElement& base ) +{ + ClearThis(); + base.CopyTo( this ); +} + + +TiXmlElement::~TiXmlElement() +{ + ClearThis(); +} + + +void TiXmlElement::ClearThis() +{ + Clear(); + while( attributeSet.First() ) + { + TiXmlAttribute* node = attributeSet.First(); + attributeSet.Remove( node ); + delete node; + } +} + + +const char* TiXmlElement::Attribute( const char* name ) const +{ + const TiXmlAttribute* node = attributeSet.Find( name ); + if ( node ) + return node->Value(); + return 0; +} + + +#ifdef TIXML_USE_STL +const std::string* TiXmlElement::Attribute( const std::string& name ) const +{ + const TiXmlAttribute* node = attributeSet.Find( name ); + if ( node ) + return &node->ValueStr(); + return 0; +} +#endif + + +const char* TiXmlElement::Attribute( const char* name, int* i ) const +{ + const char* s = Attribute( name ); + if ( i ) + { + if ( s ) { + *i = atoi( s ); + } + else { + *i = 0; + } + } + return s; +} + + +#ifdef TIXML_USE_STL +const std::string* TiXmlElement::Attribute( const std::string& name, int* i ) const +{ + const std::string* s = Attribute( name ); + if ( i ) + { + if ( s ) { + *i = atoi( s->c_str() ); + } + else { + *i = 0; + } + } + return s; +} +#endif + + +const char* TiXmlElement::Attribute( const char* name, double* d ) const +{ + const char* s = Attribute( name ); + if ( d ) + { + if ( s ) { + *d = atof( s ); + } + else { + *d = 0; + } + } + return s; +} + + +#ifdef TIXML_USE_STL +const std::string* TiXmlElement::Attribute( const std::string& name, double* d ) const +{ + const std::string* s = Attribute( name ); + if ( d ) + { + if ( s ) { + *d = atof( s->c_str() ); + } + else { + *d = 0; + } + } + return s; +} +#endif + + +int TiXmlElement::QueryIntAttribute( const char* name, int* ival ) const +{ + const TiXmlAttribute* node = attributeSet.Find( name ); + if ( !node ) + return TIXML_NO_ATTRIBUTE; + return node->QueryIntValue( ival ); +} + + +#ifdef TIXML_USE_STL +int TiXmlElement::QueryIntAttribute( const std::string& name, int* ival ) const +{ + const TiXmlAttribute* node = attributeSet.Find( name ); + if ( !node ) + return TIXML_NO_ATTRIBUTE; + return node->QueryIntValue( ival ); +} +#endif + + +int TiXmlElement::QueryDoubleAttribute( const char* name, double* dval ) const +{ + const TiXmlAttribute* node = attributeSet.Find( name ); + if ( !node ) + return TIXML_NO_ATTRIBUTE; + return node->QueryDoubleValue( dval ); +} + + +#ifdef TIXML_USE_STL +int TiXmlElement::QueryDoubleAttribute( const std::string& name, double* dval ) const +{ + const TiXmlAttribute* node = attributeSet.Find( name ); + if ( !node ) + return TIXML_NO_ATTRIBUTE; + return node->QueryDoubleValue( dval ); +} +#endif + + +void TiXmlElement::SetAttribute( const char * name, int val ) +{ + char buf[64]; + #if defined(TIXML_SNPRINTF) + TIXML_SNPRINTF( buf, sizeof(buf), "%d", val ); + #else + sprintf( buf, "%d", val ); + #endif + SetAttribute( name, buf ); +} + + +#ifdef TIXML_USE_STL +void TiXmlElement::SetAttribute( const std::string& name, int val ) +{ + std::ostringstream oss; + oss << val; + SetAttribute( name, oss.str() ); +} +#endif + + +void TiXmlElement::SetDoubleAttribute( const char * name, double val ) +{ + char buf[256]; + #if defined(TIXML_SNPRINTF) + TIXML_SNPRINTF( buf, sizeof(buf), "%f", val ); + #else + sprintf( buf, "%f", val ); + #endif + SetAttribute( name, buf ); +} + + +void TiXmlElement::SetAttribute( const char * cname, const char * cvalue ) +{ + #ifdef TIXML_USE_STL + TIXML_STRING _name( cname ); + TIXML_STRING _value( cvalue ); + #else + const char* _name = cname; + const char* _value = cvalue; + #endif + + TiXmlAttribute* node = attributeSet.Find( _name ); + if ( node ) + { + node->SetValue( _value ); + return; + } + + TiXmlAttribute* attrib = new TiXmlAttribute( cname, cvalue ); + if ( attrib ) + { + attributeSet.Add( attrib ); + } + else + { + TiXmlDocument* document = GetDocument(); + if ( document ) document->SetError( TIXML_ERROR_OUT_OF_MEMORY, 0, 0, TIXML_ENCODING_UNKNOWN ); + } +} + + +#ifdef TIXML_USE_STL +void TiXmlElement::SetAttribute( const std::string& name, const std::string& _value ) +{ + TiXmlAttribute* node = attributeSet.Find( name ); + if ( node ) + { + node->SetValue( _value ); + return; + } + + TiXmlAttribute* attrib = new TiXmlAttribute( name, _value ); + if ( attrib ) + { + attributeSet.Add( attrib ); + } + else + { + TiXmlDocument* document = GetDocument(); + if ( document ) document->SetError( TIXML_ERROR_OUT_OF_MEMORY, 0, 0, TIXML_ENCODING_UNKNOWN ); + } +} +#endif + + +void TiXmlElement::Print( FILE* cfile, int depth ) const +{ + int i; + assert( cfile ); + for ( i=0; i<depth; i++ ) { + fprintf( cfile, " " ); + } + + fprintf( cfile, "<%s", value.c_str() ); + + const TiXmlAttribute* attrib; + for ( attrib = attributeSet.First(); attrib; attrib = attrib->Next() ) + { + fprintf( cfile, " " ); + attrib->Print( cfile, depth ); + } + + // There are 3 different formatting approaches: + // 1) An element without children is printed as a <foo /> node + // 2) An element with only a text child is printed as <foo> text </foo> + // 3) An element with children is printed on multiple lines. + TiXmlNode* node; + if ( !firstChild ) + { + fprintf( cfile, " />" ); + } + else if ( firstChild == lastChild && firstChild->ToText() ) + { + fprintf( cfile, ">" ); + firstChild->Print( cfile, depth + 1 ); + fprintf( cfile, "</%s>", value.c_str() ); + } + else + { + fprintf( cfile, ">" ); + + for ( node = firstChild; node; node=node->NextSibling() ) + { + if ( !node->ToText() ) + { + fprintf( cfile, "\n" ); + } + node->Print( cfile, depth+1 ); + } + fprintf( cfile, "\n" ); + for( i=0; i<depth; ++i ) { + fprintf( cfile, " " ); + } + fprintf( cfile, "</%s>", value.c_str() ); + } +} + + +void TiXmlElement::CopyTo( TiXmlElement* target ) const +{ + // superclass: + TiXmlNode::CopyTo( target ); + + // Element class: + // Clone the attributes, then clone the children. + const TiXmlAttribute* attribute = 0; + for( attribute = attributeSet.First(); + attribute; + attribute = attribute->Next() ) + { + target->SetAttribute( attribute->Name(), attribute->Value() ); + } + + TiXmlNode* node = 0; + for ( node = firstChild; node; node = node->NextSibling() ) + { + target->LinkEndChild( node->Clone() ); + } +} + +bool TiXmlElement::Accept( TiXmlVisitor* visitor ) const +{ + if ( visitor->VisitEnter( *this, attributeSet.First() ) ) + { + for ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() ) + { + if ( !node->Accept( visitor ) ) + break; + } + } + return visitor->VisitExit( *this ); +} + + +TiXmlNode* TiXmlElement::Clone() const +{ + TiXmlElement* clone = new TiXmlElement( Value() ); + if ( !clone ) + return 0; + + CopyTo( clone ); + return clone; +} + + +const char* TiXmlElement::GetText() const +{ + const TiXmlNode* child = this->FirstChild(); + if ( child ) { + const TiXmlText* childText = child->ToText(); + if ( childText ) { + return childText->Value(); + } + } + return 0; +} + + +TiXmlDocument::TiXmlDocument() : TiXmlNode( TiXmlNode::DOCUMENT ) +{ + tabsize = 4; + useMicrosoftBOM = false; + ClearError(); +} + +TiXmlDocument::TiXmlDocument( const char * documentName ) : TiXmlNode( TiXmlNode::DOCUMENT ) +{ + tabsize = 4; + useMicrosoftBOM = false; + value = documentName; + ClearError(); +} + + +#ifdef TIXML_USE_STL +TiXmlDocument::TiXmlDocument( const std::string& documentName ) : TiXmlNode( TiXmlNode::DOCUMENT ) +{ + tabsize = 4; + useMicrosoftBOM = false; + value = documentName; + ClearError(); +} +#endif + + +TiXmlDocument::TiXmlDocument( const TiXmlDocument& copy ) : TiXmlNode( TiXmlNode::DOCUMENT ) +{ + copy.CopyTo( this ); +} + + +void TiXmlDocument::operator=( const TiXmlDocument& copy ) +{ + Clear(); + copy.CopyTo( this ); +} + + +bool TiXmlDocument::LoadFile( TiXmlEncoding encoding ) +{ + // See STL_STRING_BUG below. + //StringToBuffer buf( value ); + + return LoadFile( Value(), encoding ); +} + + +bool TiXmlDocument::SaveFile() const +{ + // See STL_STRING_BUG below. +// StringToBuffer buf( value ); +// +// if ( buf.buffer && SaveFile( buf.buffer ) ) +// return true; +// +// return false; + return SaveFile( Value() ); +} + +bool TiXmlDocument::LoadFile( const char* _filename, TiXmlEncoding encoding ) +{ + // There was a really terrifying little bug here. The code: + // value = filename + // in the STL case, cause the assignment method of the std::string to + // be called. What is strange, is that the std::string had the same + // address as it's c_str() method, and so bad things happen. Looks + // like a bug in the Microsoft STL implementation. + // Add an extra string to avoid the crash. + TIXML_STRING filename( _filename ); + value = filename; + + // reading in binary mode so that tinyxml can normalize the EOL + FILE* file = TiXmlFOpen( value.c_str (), "rb" ); + + if ( file ) + { + bool result = LoadFile( file, encoding ); + fclose( file ); + return result; + } + else + { + SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN ); + return false; + } +} + +bool TiXmlDocument::LoadFile( FILE* file, TiXmlEncoding encoding ) +{ + if ( !file ) + { + SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN ); + return false; + } + + // Delete the existing data: + Clear(); + location.Clear(); + + // Get the file size, so we can pre-allocate the string. HUGE speed impact. + long length = 0; + fseek( file, 0, SEEK_END ); + length = ftell( file ); + fseek( file, 0, SEEK_SET ); + + // Strange case, but good to handle up front. + if ( length <= 0 ) + { + SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return false; + } + + // If we have a file, assume it is all one big XML file, and read it in. + // The document parser may decide the document ends sooner than the entire file, however. + TIXML_STRING data; + data.reserve( length ); + + // Subtle bug here. TinyXml did use fgets. But from the XML spec: + // 2.11 End-of-Line Handling + // <snip> + // <quote> + // ...the XML processor MUST behave as if it normalized all line breaks in external + // parsed entities (including the document entity) on input, before parsing, by translating + // both the two-character sequence #xD #xA and any #xD that is not followed by #xA to + // a single #xA character. + // </quote> + // + // It is not clear fgets does that, and certainly isn't clear it works cross platform. + // Generally, you expect fgets to translate from the convention of the OS to the c/unix + // convention, and not work generally. + + /* + while( fgets( buf, sizeof(buf), file ) ) + { + data += buf; + } + */ + + char* buf = new char[ length+1 ]; + buf[0] = 0; + + if ( fread( buf, length, 1, file ) != 1 ) { + delete [] buf; + SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN ); + return false; + } + + const char* lastPos = buf; + const char* p = buf; + + buf[length] = 0; + while( *p ) { + assert( p < (buf+length) ); + if ( *p == 0xa ) { + // Newline character. No special rules for this. Append all the characters + // since the last string, and include the newline. + data.append( lastPos, (p-lastPos+1) ); // append, include the newline + ++p; // move past the newline + lastPos = p; // and point to the new buffer (may be 0) + assert( p <= (buf+length) ); + } + else if ( *p == 0xd ) { + // Carriage return. Append what we have so far, then + // handle moving forward in the buffer. + if ( (p-lastPos) > 0 ) { + data.append( lastPos, p-lastPos ); // do not add the CR + } + data += (char)0xa; // a proper newline + + if ( *(p+1) == 0xa ) { + // Carriage return - new line sequence + p += 2; + lastPos = p; + assert( p <= (buf+length) ); + } + else { + // it was followed by something else...that is presumably characters again. + ++p; + lastPos = p; + assert( p <= (buf+length) ); + } + } + else { + ++p; + } + } + // Handle any left over characters. + if ( p-lastPos ) { + data.append( lastPos, p-lastPos ); + } + delete [] buf; + buf = 0; + + Parse( data.c_str(), 0, encoding ); + + if ( Error() ) + return false; + else + return true; +} + + +bool TiXmlDocument::SaveFile( const char * filename ) const +{ + // The old c stuff lives on... + FILE* fp = TiXmlFOpen( filename, "w" ); + if ( fp ) + { + bool result = SaveFile( fp ); + fclose( fp ); + return result; + } + return false; +} + + +bool TiXmlDocument::SaveFile( FILE* fp ) const +{ + if ( useMicrosoftBOM ) + { + const unsigned char TIXML_UTF_LEAD_0 = 0xefU; + const unsigned char TIXML_UTF_LEAD_1 = 0xbbU; + const unsigned char TIXML_UTF_LEAD_2 = 0xbfU; + + fputc( TIXML_UTF_LEAD_0, fp ); + fputc( TIXML_UTF_LEAD_1, fp ); + fputc( TIXML_UTF_LEAD_2, fp ); + } + Print( fp, 0 ); + return (ferror(fp) == 0); +} + + +void TiXmlDocument::CopyTo( TiXmlDocument* target ) const +{ + TiXmlNode::CopyTo( target ); + + target->error = error; + ta... [truncated message content] |
From: <c99...@us...> - 2007-08-27 16:21:56
|
Revision: 496 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=496&view=rev Author: c99koder Date: 2007-08-26 11:58:23 -0700 (Sun, 26 Aug 2007) Log Message: ----------- Tiki: NDS: Properly close TCP sockets Modified Paths: -------------- tiki/src/net/tcpsocket.cpp Modified: tiki/src/net/tcpsocket.cpp =================================================================== --- tiki/src/net/tcpsocket.cpp 2007-08-25 17:30:20 UTC (rev 495) +++ tiki/src/net/tcpsocket.cpp 2007-08-26 18:58:23 UTC (rev 496) @@ -109,6 +109,9 @@ #if TIKI_PLAT == TIKI_WIN32 ::shutdown(m_socket, SD_BOTH); closesocket(m_socket); +#elif TIKI_PLAT == TIKI_NDS + ::shutdown(m_socket, 1); + closesocket(m_socket); #else ::shutdown(m_socket, SHUT_RDWR); ::close(m_socket); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-08-27 16:13:06
|
Revision: 494 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=494&view=rev Author: atani Date: 2007-08-25 01:48:53 -0700 (Sat, 25 Aug 2007) Log Message: ----------- various updates, added parsing of Set-Cookie header param, need to add support for sending Cookie back to server Modified Paths: -------------- tiki/examples/net/httpclient/src/main.cpp tiki/include/Tiki/net/buffer.h tiki/include/Tiki/net/http/cookie.h tiki/include/Tiki/net/http/request.h tiki/include/Tiki/net/http/useragent.h tiki/include/Tiki/net/socket.h tiki/include/Tiki/net/tcpserversocket.h tiki/include/Tiki/net/tcpsocket.h tiki/include/Tiki/net/udpsocket.h tiki/include/Tiki/net/util/base64.h tiki/src/audio/stream.cpp tiki/src/net/address.cpp tiki/src/net/http/useragent.cpp tiki/src/net/util/base64.cpp tiki/win32/include/pch.h tiki/win32/tiki.cbp tiki/win32/tiki.layout tiki/win32/tiki.sln tiki/win32/tiki.vcproj Added Paths: ----------- tiki/examples/TikiTest/TikiTest.vcproj Removed Paths: ------------- tiki/examples/TikiTest/TikiTest_vc80.vcproj tiki/win32/tiki_vc80.sln tiki/win32/tiki_vs80.vcproj Copied: tiki/examples/TikiTest/TikiTest.vcproj (from rev 493, tiki/examples/TikiTest/TikiTest_vc80.vcproj) =================================================================== --- tiki/examples/TikiTest/TikiTest.vcproj (rev 0) +++ tiki/examples/TikiTest/TikiTest.vcproj 2007-08-25 08:48:53 UTC (rev 494) @@ -0,0 +1,213 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="TikiTest" + ProjectGUID="{7B823C96-860C-4578-95BB-1087A45AF1AA}" + Keyword="Win32Proj" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="$(ProjectDir)..\..\win32\include;$(ProjectDir)\..\..\include;"C:\Program Files\OpenAL 1.1 SDK\include"" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="gdi32.lib kernel32.lib user32.lib opengl32.lib glu32.lib comdlg32.lib ws2_32.lib" + LinkIncremental="2" + AdditionalLibraryDirectories="$(ProjectDir)\..\..\win32\Debug;"C:\Program Files\OpenAL 1.1 SDK\libs\Win32"" + GenerateDebugInformation="true" + SubSystem="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="1" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="$(ProjectDir)..\..\win32\include;$(ProjectDir)\..\..\include;"C:\Program Files\OpenAL 1.1 SDK\include"" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;" + RuntimeLibrary="0" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="gdi32.lib kernel32.lib user32.lib opengl32.lib glu32.lib comdlg32.lib ws2_32.lib" + LinkIncremental="1" + AdditionalLibraryDirectories="$(ProjectDir)\..\..\win32\Release;C:\Program Files\OpenAL 1.1 SDK\libs\Win32" + IgnoreDefaultLibraryNames="" + GenerateDebugInformation="true" + SubSystem="2" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath=".\src\testobj.h" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + <Filter + Name="Source Files" + Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + <File + RelativePath=".\src\test.cpp" + > + </File> + <File + RelativePath=".\src\testobj.cpp" + > + </File> + <File + RelativePath=".\src\TikiTest.cpp" + > + </File> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> Deleted: tiki/examples/TikiTest/TikiTest_vc80.vcproj =================================================================== --- tiki/examples/TikiTest/TikiTest_vc80.vcproj 2007-08-25 02:07:26 UTC (rev 493) +++ tiki/examples/TikiTest/TikiTest_vc80.vcproj 2007-08-25 08:48:53 UTC (rev 494) @@ -1,213 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="8.00" - Name="TikiTest" - ProjectGUID="{7B823C96-860C-4578-95BB-1087A45AF1AA}" - Keyword="Win32Proj" - > - <Platforms> - <Platform - Name="Win32" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="Debug" - IntermediateDirectory="Debug" - ConfigurationType="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="$(ProjectDir)..\..\win32\include;$(ProjectDir)\..\..\include;"C:\Program Files\OpenAL 1.1 SDK\include"" - PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="1" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="4" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="gdi32.lib kernel32.lib user32.lib opengl32.lib glu32.lib comdlg32.lib ws2_32.lib" - LinkIncremental="2" - AdditionalLibraryDirectories="$(ProjectDir)\..\..\win32\Debug;"C:\Program Files\OpenAL 1.1 SDK\libs\Win32"" - GenerateDebugInformation="true" - SubSystem="2" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCWebDeploymentTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="Release" - IntermediateDirectory="Release" - ConfigurationType="1" - CharacterSet="2" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories="$(ProjectDir)..\..\win32\include;$(ProjectDir)\..\..\include;"C:\Program Files\OpenAL 1.1 SDK\include"" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;" - RuntimeLibrary="0" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="gdi32.lib kernel32.lib user32.lib opengl32.lib glu32.lib comdlg32.lib ws2_32.lib" - LinkIncremental="1" - AdditionalLibraryDirectories="$(ProjectDir)\..\..\win32\Release;C:\Program Files\OpenAL 1.1 SDK\libs\Win32" - IgnoreDefaultLibraryNames="" - GenerateDebugInformation="true" - SubSystem="2" - OptimizeReferences="2" - EnableCOMDATFolding="2" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCWebDeploymentTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" - > - <File - RelativePath=".\src\testobj.h" - > - </File> - </Filter> - <Filter - Name="Resource Files" - Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" - UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" - > - </Filter> - <Filter - Name="Source Files" - Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" - > - <File - RelativePath=".\src\test.cpp" - > - </File> - <File - RelativePath=".\src\testobj.cpp" - > - </File> - <File - RelativePath=".\src\TikiTest.cpp" - > - </File> - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> Modified: tiki/examples/net/httpclient/src/main.cpp =================================================================== --- tiki/examples/net/httpclient/src/main.cpp 2007-08-25 02:07:26 UTC (rev 493) +++ tiki/examples/net/httpclient/src/main.cpp 2007-08-25 08:48:53 UTC (rev 494) @@ -31,15 +31,24 @@ Tiki::Net::init(); Hid::callbackReg( tkCallback, NULL ); - RefPtr<HttpUserAgent> useragent = new HttpUserAgent(); + HttpUserAgent *useragent = new HttpUserAgent(); //useragent->setProxyHost("proxy.example.com"); //useragent->setProxyPort(80); - RefPtr<Request> request = new Request(); - request->setUrl("http://www.example.com/"); + Request *request = new Request(); + request->setUrl("http://www.oracle.com/"); - RefPtr<Response> response = useragent->get(request); + Response *response = useragent->get(request); Tiki::Debug::printf("response code: %d\n", response->getResultCode()); + std::list<Cookie *> cookies = useragent->getCookies(); + for(std::list<Cookie *>::iterator iter = cookies.begin(); + iter != cookies.end(); + ++iter) { + Cookie *cookie = (*iter); + Tiki::Debug::printf("COOKIE: %s (value->%s,path->%s,max-age->%d,domain->%s,secure->%s)\n", + cookie->getName().c_str(), cookie->getValue().c_str(), cookie->getPath().c_str(), cookie->getMaxAge(), + cookie->getDomain().c_str(), cookie->isSecure() ? "true" : "false"); + } std::list<std::string> content = response->getContentPartNames(); for(std::list<std::string>::iterator iter = content.begin(); @@ -51,6 +60,10 @@ Tiki::Debug::printf("%s\n", responseBuf->getData()); } + delete response; + delete request; + delete useragent; + Tiki::Net::shutdown(); return 0; Modified: tiki/include/Tiki/net/buffer.h =================================================================== --- tiki/include/Tiki/net/buffer.h 2007-08-25 02:07:26 UTC (rev 493) +++ tiki/include/Tiki/net/buffer.h 2007-08-25 08:48:53 UTC (rev 494) @@ -24,19 +24,19 @@ public: Buffer(size_t len, std::string contentType = "application/octet-stream") : m_contentType(contentType) { - if(len > 0) { - m_data = new uint8[len]; - memset(m_data, 0, len); + m_dataLen = len + 1; + if(m_dataLen > 0) { + m_data = new uint8[m_dataLen]; + memset(m_data, '\0', m_dataLen); } - m_dataLen = len; m_usedDataLen = 0; } Buffer(size_t len, uint8 *data, std::string contentType = "application/octet-stream") : m_contentType(contentType) { - m_data = new uint8[len]; - memset(m_data, 0, len); - m_dataLen = len; + m_dataLen = len + 1; + m_data = new uint8[m_dataLen]; + memset(m_data, '\0', m_dataLen); m_usedDataLen = len; memcpy(m_data, data, len); } @@ -56,9 +56,11 @@ void read(Tiki::File file) { assert(file.isValid()); m_fileName = file.getFileName(); - m_dataLen = m_usedDataLen = file.total(); + m_usedDataLen = file.total(); + m_dataLen = m_usedDataLen + 1; m_data = new uint8[m_dataLen]; - file.read(m_data, static_cast<int>(m_dataLen)); + memset(m_data, '\0', m_dataLen); + file.read(m_data, static_cast<int>(m_usedDataLen)); } void write(Tiki::File file) { @@ -68,6 +70,7 @@ void append(Buffer *buf) { uint8 * newbuf = new uint8[ m_dataLen + buf->getDataLen() ]; + memset(newbuf, '\0', m_dataLen + buf->getDataLen()); if(m_data != NULL) { memcpy(newbuf, m_data, m_usedDataLen); } @@ -80,7 +83,7 @@ void reset() { if(m_data != NULL) { - memset(m_data, 0, m_dataLen); + memset(m_data, '\0', m_dataLen); } m_usedDataLen = 0; } @@ -113,7 +116,7 @@ } size_t getDataLen() const { - return m_dataLen; + return m_dataLen - 1; } size_t getUsedDataLen() const { @@ -121,7 +124,7 @@ } void setData(uint8 *data, size_t len) { - memset(m_data, 0, m_dataLen); + memset(m_data, '\0', m_dataLen); if(len > m_dataLen) { memcpy(m_data, data, m_dataLen); Modified: tiki/include/Tiki/net/http/cookie.h =================================================================== --- tiki/include/Tiki/net/http/cookie.h 2007-08-25 02:07:26 UTC (rev 493) +++ tiki/include/Tiki/net/http/cookie.h 2007-08-25 08:48:53 UTC (rev 494) @@ -8,22 +8,17 @@ #ifndef __TIKI_NET_HTTP_COOKIE_H #define __TIKI_NET_HTTP_COOKIE_H -#include "Tiki/refcnt.h" - namespace Tiki { namespace Net { namespace Http { -class Cookie : public RefCnt { +class Cookie { public: - Cookie( std::string name, std::string value, std::string version, - std::string comment = "", long maxage = 0, std::string path = "", - bool secure = false) : - m_name(name), m_value(value), m_version(version), m_comment(comment), - m_maxage(maxage), m_path(path), m_secure(secure) {}; + Cookie( std::string name, std::string value) : + m_name(name), m_value(value), m_maxage(0) {}; std::string getName() const { return m_name; @@ -37,25 +32,54 @@ return m_version; } + void setVersion(std::string version) { + m_version = version; + } + + std::string getDomain() const { + return m_domain; + } + + void setDomain(std::string domain) { + m_domain = domain; + } + std::string getComment() const { return m_comment; } + void setComment(std::string comment) { + m_comment = comment; + } + std::string getPath() const { return m_path; } + void setPath(std::string path) { + m_path = path; + } + long getMaxAge() const { return m_maxage; } + void setMaxAge(long age) { + m_maxage = age; + } + bool isSecure() { return m_secure; } + + void setSecure(bool secure) { + m_secure = secure; + } private: std::string m_name; std::string m_value; std::string m_version; + std::string m_domain; std::string m_comment; long m_maxage; std::string m_path; Modified: tiki/include/Tiki/net/http/request.h =================================================================== --- tiki/include/Tiki/net/http/request.h 2007-08-25 02:07:26 UTC (rev 493) +++ tiki/include/Tiki/net/http/request.h 2007-08-25 08:48:53 UTC (rev 494) @@ -8,15 +8,15 @@ #ifndef __TIKI_NET_HTTP_REQUEST_H #define __TIKI_NET_HTTP_REQUEST_H -#include "Tiki/refcnt.h" +#include "Tiki/refcnt.h" #include "Tiki/net/util/base64.h" namespace Tiki { namespace Net { -namespace Http { - +namespace Http { + using Tiki::Net::Util::Base64; extern std::string DEFAULT_CONTENT_PART; @@ -24,7 +24,7 @@ class Request : public RefCnt { public: Request(); - /* + virtual ~Request() { m_params.clear(); if(!m_parts.empty()) { @@ -36,19 +36,19 @@ } m_parts.clear(); } - */ - - void setAuthentication(std::string username, std::string password) { - std::string param = username + ":" + password; - Buffer *inputBuf = new Buffer(param.length(), (uint8 *)param.c_str()); - - Base64 b64; - Buffer *result = b64.encode(inputBuf); - - setHeaderParam("Authorization", std::string("Basic ") + std::string((char *)result->getData())); - - delete inputBuf; - delete result; + + + void setAuthentication(std::string username, std::string password) { + std::string param = username + ":" + password; + Buffer *inputBuf = new Buffer(param.length(), (uint8 *)param.c_str()); + + Base64 b64; + Buffer *result = b64.encode(inputBuf); + + setHeaderParam("Authorization", std::string("Basic ") + std::string((char *)result->getData())); + + delete inputBuf; + delete result; } std::string getUrl() const { @@ -84,7 +84,7 @@ std::string m_url; std::string m_boundaryMarker; typedef std::map<std::string, std::string> StringStringMap; - typedef std::map<std::string, RefPtr<Buffer> > StringBufferMap; + typedef std::map<std::string, Buffer * > StringBufferMap; StringStringMap m_params; StringBufferMap m_parts; bool m_forcedMultiPart; Modified: tiki/include/Tiki/net/http/useragent.h =================================================================== --- tiki/include/Tiki/net/http/useragent.h 2007-08-25 02:07:26 UTC (rev 493) +++ tiki/include/Tiki/net/http/useragent.h 2007-08-25 08:48:53 UTC (rev 494) @@ -27,7 +27,7 @@ public: HttpUserAgent(); virtual ~HttpUserAgent() { - for(std::list< RefPtr< Cookie > >::iterator iter = m_cookies.begin(); + for(std::list< Cookie * >::iterator iter = m_cookies.begin(); iter != m_cookies.end(); ++iter) { delete *iter; @@ -59,7 +59,7 @@ return m_proxyPort; } - std::list< RefPtr< Cookie > > getCookies() const { + std::list< Cookie * > getCookies() const { return m_cookies; } @@ -71,7 +71,7 @@ std::string m_userAgentName; std::string m_proxyHost; int m_proxyPort; - std::list< RefPtr< Cookie > > m_cookies; + std::list< Cookie * > m_cookies; void parseUrl(const std::string url, std::string &host, std::string &resource, int &port); void buildRequest(const std::string host, const std::string resource, const int port, Modified: tiki/include/Tiki/net/socket.h =================================================================== --- tiki/include/Tiki/net/socket.h 2007-08-25 02:07:26 UTC (rev 493) +++ tiki/include/Tiki/net/socket.h 2007-08-25 08:48:53 UTC (rev 494) @@ -8,7 +8,7 @@ #ifndef __TIKI_NET_SOCKET_H #define __TIKI_NET_SOCKET_H -#include "Tiki/object.h" +#include "Tiki/refcnt.h" #include "Tiki/net/address.h" #include "Tiki/net/buffer.h" @@ -16,11 +16,12 @@ namespace Net { -class Socket : public Object +class Socket : public RefCnt { public: Socket(); Socket(Address *address); + virtual ~Socket() {} Address *getPeerAddress() { Modified: tiki/include/Tiki/net/tcpserversocket.h =================================================================== --- tiki/include/Tiki/net/tcpserversocket.h 2007-08-25 02:07:26 UTC (rev 493) +++ tiki/include/Tiki/net/tcpserversocket.h 2007-08-25 08:48:53 UTC (rev 494) @@ -21,6 +21,7 @@ public: TCPServerSocket() : TCPSocket() {}; TCPServerSocket(Address *address) : TCPSocket(address) {}; + virtual ~TCPServerSocket() {} void bind(size_t maxwaiting = 10); Modified: tiki/include/Tiki/net/tcpsocket.h =================================================================== --- tiki/include/Tiki/net/tcpsocket.h 2007-08-25 02:07:26 UTC (rev 493) +++ tiki/include/Tiki/net/tcpsocket.h 2007-08-25 08:48:53 UTC (rev 494) @@ -19,11 +19,8 @@ namespace TCP { using Tiki::Net::Buffer; +using Tiki::Net::Socket; -class TCPSocket : public Tiki::Net::Socket -{ - public: - #ifndef INVALID_SOCKET #define INVALID_SOCKET -1 #endif @@ -31,13 +28,18 @@ #ifndef SOCKET_ERROR #define SOCKET_ERROR -1 #endif - TCPSocket() : Socket(), m_open(false) {}; + +class TCPSocket : public Socket +{ + public: + TCPSocket() : m_open(false) {}; TCPSocket(Address *address) : Socket(address), m_open(false) {}; #if TIKI_PLAT == TIKI_WIN32 TCPSocket(Address *address, SOCKET socket) : Socket(address), m_open(true), m_socket(socket) {setNonBlocking(false);}; #else TCPSocket(RefPtr<Address> address, int socket) : Socket(address), m_open(true), m_socket(socket) {setNonBlocking(false);}; #endif + virtual ~TCPSocket() {} virtual void send(Buffer *data); Modified: tiki/include/Tiki/net/udpsocket.h =================================================================== --- tiki/include/Tiki/net/udpsocket.h 2007-08-25 02:07:26 UTC (rev 493) +++ tiki/include/Tiki/net/udpsocket.h 2007-08-25 08:48:53 UTC (rev 494) @@ -19,6 +19,7 @@ class UDPSocket : public Tiki::Net::Socket { public: + virtual ~UDPSocket() {} virtual void send(RefPtr<Buffer> data); virtual void recv(RefPtr<Buffer> data); Modified: tiki/include/Tiki/net/util/base64.h =================================================================== --- tiki/include/Tiki/net/util/base64.h 2007-08-25 02:07:26 UTC (rev 493) +++ tiki/include/Tiki/net/util/base64.h 2007-08-25 08:48:53 UTC (rev 494) @@ -20,7 +20,7 @@ private: void encodeTriplet(uint8 *input, uint8 count, uint8 *output); - uint8 decodeQuartet(uint8 *input, uint8 *output); + int8 decodeQuartet(uint8 *input, uint8 *output); size_t calcEncodeBufferSize(size_t byteCount); size_t calcDecodeBufferSize(uint8 *input, size_t inputByteCount); Modified: tiki/src/audio/stream.cpp =================================================================== --- tiki/src/audio/stream.cpp 2007-08-25 02:07:26 UTC (rev 493) +++ tiki/src/audio/stream.cpp 2007-08-25 08:48:53 UTC (rev 494) @@ -22,10 +22,10 @@ TIKI_OBJECT_END( Stream ) /* - + This module uses CoreAudio to stream data out to the sound output device. It's based loosely on the KOS snd_stream module. - + */ bool Stream::initGlobal() { @@ -276,9 +276,11 @@ } #if TIKI_PLAT == TIKI_WIN32 -# include <malloc.h> -# define alloca _alloca +# include <malloc.h> +#ifndef alloca +# define alloca _alloca #endif +#endif bool Stream::fillBuffer( ALuint buffer ) { // Thanks to VC++ we have to do this with alloca. Modified: tiki/src/net/address.cpp =================================================================== --- tiki/src/net/address.cpp 2007-08-25 02:07:26 UTC (rev 493) +++ tiki/src/net/address.cpp 2007-08-25 08:48:53 UTC (rev 494) @@ -53,7 +53,7 @@ { if(m_ip == AddressUnknown) { - Tiki::Debug::printf("resolving host: %s\n", m_hostname.c_str()); + Tiki::Debug::printf("resolving host: %s", m_hostname.c_str()); struct hostent *hp = gethostbyname(m_hostname.c_str()); if(hp != NULL) { @@ -62,6 +62,7 @@ #else memcpy(&m_ip, hp->h_addr, hp->h_length); #endif + Tiki::Debug::printf("...Resolved: %s\n", getIPAddressString().c_str()); } } return m_ip; Modified: tiki/src/net/http/useragent.cpp =================================================================== --- tiki/src/net/http/useragent.cpp 2007-08-25 02:07:26 UTC (rev 493) +++ tiki/src/net/http/useragent.cpp 2007-08-25 08:48:53 UTC (rev 494) @@ -25,18 +25,15 @@ #define READ_ONE_LINE(res, socket) \ { \ Buffer *recvBuf = new Buffer(1); \ - char tbuf[2]; \ res = ""; \ while(socket->isOpen()) { \ recvBuf->reset(); \ socket->recv(recvBuf); \ if(recvBuf->getUsedDataLen() > 0) { \ - tbuf[0] = recvBuf->getData()[0]; \ - tbuf[1] = '\0'; \ - if(tbuf[0] != '\n' && tbuf[0] != '\r' ) { \ - res.append((char *)tbuf); \ + if(recvBuf->getData()[0] != '\n' && recvBuf->getData()[0] != '\r' ) { \ + res.append((char *)recvBuf->getData()); \ } \ - else if(tbuf[0] != '\r' ) { \ + else if(recvBuf->getData()[0] != '\r' ) { \ break; \ } \ } \ @@ -46,18 +43,18 @@ HttpUserAgent::HttpUserAgent() { #if TIKI_PLAT == TIKI_WIN32 - setUserAgentName("Tiki/1.0 (Windows)"); + m_userAgentName = "Tiki/1.0 (Windows)"; #elif TIKI_PLAT == TIKI_NDS - setUserAgentName("Tiki/1.0 (Nintendo DS)"); + m_userAgentName = "Tiki/1.0 (Nintendo DS)"; #elif TIKI_PLAT == TIKI_SDL - setUserAgentName("Tiki/1.0 (SDL)"); + m_userAgentName = "Tiki/1.0 (SDL)"; #elif TIKI_PLAT == TIKI_OSX - setUserAgentName("Tiki/1.0 (Mac OS X)"); + m_userAgentName = "Tiki/1.0 (Mac OS X)"; #else - setUserAgentName("Tiki/1.0 (Unknown)"); + m_userAgentName = "Tiki/1.0 (Unknown)"; #endif - setProxyHost(""); - setProxyPort(8080); + m_proxyHost = ""; + m_proxyPort = 8080; } Response *HttpUserAgent::get(Request *req) { @@ -94,6 +91,7 @@ } Tiki::Debug::printf("Sending request...\n"); + Tiki::Debug::printf(requestText.c_str()); socket->send(new Buffer(requestText.length(), (uint8 *)requestText.c_str())); readResponse(response, socket); @@ -284,6 +282,8 @@ std::string status = ""; READ_ONE_LINE(status, socket) + Tiki::Debug::printf("%s\n", status.c_str()); + //Tiki::Debug::printf("Status: %s\n", status.c_str()); for(std::string::size_type i = 0; i < status.length(); i++) { if(status.at(i) == ' ') { @@ -308,7 +308,65 @@ } if(!field.compare("Set-Cookie")) { + Cookie *cookie; + std::string extras = ""; + + std::string cookieName, cookieValue; + if(value.find(";") != std::string::npos) { + extras = value.substr(value.find(";")+1); + value = value.substr(0, value.find(";")); + } + cookieName = value.substr(0, value.find("=")); + cookieValue = value.substr(value.find("=") + 1); + cookie = new Cookie(cookieName, cookieValue); + + while(!extras.empty()) { + std::string param = extras; + if(extras.find(";") != std::string::npos) { + param = extras.substr(0, extras.find(";")); + extras = extras.substr(extras.find(";") + 1); + } + else { + extras = ""; + } + while(param.at(0) == ' ') { + param = param.substr(1); + } + std::string paramName = param, paramValue; + if(param.find("=") != std::string::npos) { + paramName = param.substr(0, param.find("=")); + paramValue = param.substr(param.find("=") + 1); + } + if(!paramName.compare("path")) { + cookie->setPath(paramValue); + } + else if(!paramName.compare("expires")) { + //cookie-> + } + else if(!paramName.compare("domain")) { + cookie->setDomain(paramValue); + } + else if(!paramName.compare("max-age")) { + cookie->setMaxAge(atol(paramValue.c_str())); + } + else if(!paramName.compare("secure")) { + cookie->setSecure(true); + } + else if(!paramName.compare("version")) { + cookie->setVersion(paramValue); + } + } + + for(std::list<Cookie *>::iterator iter = m_cookies.begin(); + iter != m_cookies.end(); + ++iter) { + if(!(*iter)->getName().compare(cookieName)) { + m_cookies.erase(iter); + } + } + + m_cookies.push_back(cookie); } else { response->setHeaderParam(field, value); @@ -316,7 +374,7 @@ } } - RefPtr<Buffer> fullBuf = new Buffer(1); + Buffer *fullBuf = new Buffer(1); if(!response->getHeaderParam("Transfer-Encoding").compare("chunked")) { Tiki::Debug::printf("Encoding is chunked\n"); Modified: tiki/src/net/util/base64.cpp =================================================================== --- tiki/src/net/util/base64.cpp 2007-08-25 02:07:26 UTC (rev 493) +++ tiki/src/net/util/base64.cpp 2007-08-25 08:48:53 UTC (rev 494) @@ -156,7 +156,7 @@ } - uint8 Base64::decodeQuartet(uint8 *input, uint8 *output) { + int8 Base64::decodeQuartet(uint8 *input, uint8 *output) { uint32 buffer = 0; if (input[3] == '=') { @@ -165,8 +165,8 @@ buffer = (buffer | BASE64_DEALPHABET[input[1]]) << 6; buffer = buffer << 14; - uint* temp = (uint*) &buffer; - output [0] = temp[3]; + uint8* temp = (uint8*) &buffer; + output[0] = temp[3]; return 1; } else { @@ -175,9 +175,9 @@ buffer = (buffer | BASE64_DEALPHABET[input[2]]) << 6; buffer = buffer << 8; - uint* temp = (uint*) &buffer; - output [0] = temp[3]; - output [1] = temp[2]; + uint8* temp = (uint8*) &buffer; + output[0] = temp[3]; + output[1] = temp[2]; return 2; } @@ -188,10 +188,10 @@ buffer = (buffer | BASE64_DEALPHABET[input[3]]) << 6; buffer = buffer << 2; - uint* temp = (uint*) &buffer; - output [0] = temp[3]; - output [1] = temp[2]; - output [2] = temp[1]; + uint8* temp = (uint8*) &buffer; + output[0] = temp[3]; + output[1] = temp[2]; + output[2] = temp[1]; return 3; } Modified: tiki/win32/include/pch.h =================================================================== --- tiki/win32/include/pch.h 2007-08-25 02:07:26 UTC (rev 493) +++ tiki/win32/include/pch.h 2007-08-25 08:48:53 UTC (rev 494) @@ -29,12 +29,12 @@ // This is the hand-off point in the library from WinMain, and HID callbacks. namespace Tiki { -int DoMain( const char * szAppName, HINSTANCE hInst, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow ); -void RecvQuit(); -void RecvEvent( UINT iMsg, WPARAM wParam, LPARAM lParam ); + int DoMain( const char * szAppName, HINSTANCE hInst, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow ); + void RecvQuit(); + void RecvEvent( UINT iMsg, WPARAM wParam, LPARAM lParam ); } // Packed structs need some compiler-specific foo. -#define PACKED_STRUCT_BEGIN #pragma pack(push, 1) -#define PACKED_STRUCT_END #pragma pack(pop) +#define PACKED_STRUCT_BEGIN __declspec(align(1)) +#define PACKED_STRUCT_END #define PACKED_STRUCT_MEMBER Modified: tiki/win32/tiki.cbp =================================================================== --- tiki/win32/tiki.cbp 2007-08-25 02:07:26 UTC (rev 493) +++ tiki/win32/tiki.cbp 2007-08-25 08:48:53 UTC (rev 494) @@ -921,6 +921,12 @@ <Option link="0"/> <Option target="default"/> </Unit> + <Unit filename="..\include\Tiki\drawables\console.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> <Unit filename="..\include\Tiki\drawables\cursor.h"> <Option compilerVar=""/> <Option compile="0"/> @@ -1023,6 +1029,78 @@ <Option link="0"/> <Option target="default"/> </Unit> + <Unit filename="..\include\Tiki\net.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\net\address.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\net\buffer.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\net\http\cookie.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\net\http\request.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\net\http\response.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\net\http\useragent.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\net\socket.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\net\tcpserversocket.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\net\tcpsocket.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\net\udpsocket.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> + <Unit filename="..\include\Tiki\net\util\base64.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> <Unit filename="..\include\Tiki\object.h"> <Option compilerVar=""/> <Option compile="0"/> @@ -1225,6 +1303,10 @@ <Option compilerVar="CPP"/> <Option target="default"/> </Unit> + <Unit filename="..\src\gl\drawables\console.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> <Unit filename="..\src\gl\drawables\cursor.cpp"> <Option compilerVar="CPP"/> <Option target="default"/> @@ -1313,6 +1395,38 @@ <Option compilerVar="CPP"/> <Option target="default"/> </Unit> + <Unit filename="..\src\net\address.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\net\http\request.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\net\http\response.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\net\http\useragent.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\net\socket.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\net\tcpserversocket.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\net\tcpsocket.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="..\src\net\util\base64.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> <Unit filename="..\src\thread\thread.cpp"> <Option compilerVar="CPP"/> <Option target="default"/> @@ -1323,6 +1437,12 @@ <Option link="0"/> <Option target="default"/> </Unit> + <Unit filename="include\Tiki\platnet.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> <Unit filename="include\Tiki\platthread.h"> <Option compilerVar=""/> <Option compile="0"/> @@ -1371,6 +1491,10 @@ <Option compilerVar="CPP"/> <Option target="default"/> </Unit> + <Unit filename="src\platnet.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> <Unit filename="src\platthread.cpp"> <Option compilerVar="CPP"/> <Option target="default"/> @@ -1379,5 +1503,9 @@ <Option compilerVar="CPP"/> <Option target="default"/> </Unit> + <Unit filename="stdafx.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> </Project> </CodeBlocks_project_file> Modified: tiki/win32/tiki.layout =================================================================== --- tiki/win32/tiki.layout 2007-08-25 02:07:26 UTC (rev 493) +++ tiki/win32/tiki.layout 2007-08-25 08:48:53 UTC (rev 494) @@ -1,61 +1,4 @@ <?xml version="1.0"?> <!DOCTYPE CodeBlocks_layout_file> <CodeBlocks_layout_file> - <File name="..\3rdparty\libjpeg\jconfig.h" open="0" top="0"> - <Cursor position="653" topLine="2"/> - </File> - <File name="..\3rdparty\libjpeg\jpeglib.h" open="0" top="0"> - <Cursor position="1105" topLine="11"/> - </File> - <File name="..\3rdparty\libogg\src\bitwise.c" open="0" top="0"> - <Cursor position="1119" topLine="0"/> - </File> - <File name="..\3rdparty\libvorbis\lib\modes\setup_44.h" open="0" top="0"> - <Cursor position="956" topLine="1"/> - </File> - <File name="..\include\Tiki\stream.h" open="0" top="0"> - <Cursor position="471" topLine="26"/> - </File> - <File name="..\include\Tiki\tiki.h" open="0" top="0"> - <Cursor position="187" topLine="3"/> - </File> - <File name="..\src\audio\oggvorbis\sndoggvorbis.cpp" open="0" top="0"> - <Cursor position="205" topLine="0"/> - </File> - <File name="..\src\audio\sound.cpp" open="0" top="0"> - <Cursor position="42" topLine="5"/> - </File> - <File name="..\src\gl\animation.cpp" open="0" top="0"> - <Cursor position="10" topLine="0"/> - </File> - <File name="..\src\gl\texture.cpp" open="0" top="0"> - <Cursor position="7819" topLine="301"/> - </File> - <File name="include\Tiki\glhdrs.h" open="0" top="0"> - <Cursor position="123" topLine="0"/> - </File> - <File name="include\Tiki\platthread.h" open="0" top="0"> - <Cursor position="298" topLine="0"/> - </File> - <File name="include\Tiki\tikitypes.h" open="0" top="0"> - <Cursor position="600" topLine="5"/> - </File> - <File name="include\pch.h" open="0" top="0"> - <Cursor position="376" topLine="0"/> - </File> - <File name="src\init_shutdown.cpp" open="0" top="0"> - <Cursor position="151" topLine="0"/> - </File> - <File name="src\platgl.cpp" open="0" top="0"> - <Cursor position="43" topLine="0"/> - </File> - <File name="src\plathid.cpp" open="0" top="0"> - <Cursor position="355" topLine="2"/> - </File> - <File name="src\platthread.cpp" open="0" top="0"> - <Cursor position="2217" topLine="102"/> - </File> - <File name="src\tikitime.cpp" open="0" top="0"> - <Cursor position="161" topLine="2"/> - </File> </CodeBlocks_layout_file> Modified: tiki/win32/tiki.sln =================================================================== --- tiki/win32/tiki.sln 2007-08-25 02:07:26 UTC (rev 493) +++ tiki/win32/tiki.sln 2007-08-25 08:48:53 UTC (rev 494) @@ -1,30 +1,74 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual C++ Express 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiki", "tiki.vcproj", "{F2816CAC-B560-4ED9-8A73-9635F832943C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TikiTest", "..\examples\TikiTest\TikiTest.vcproj", "{7B823C96-860C-4578-95BB-1087A45AF1AA}" ProjectSection(ProjectDependencies) = postProject + {F2816CAC-B560-4ED9-8A73-9635F832943C} = {F2816CAC-B560-4ED9-8A73-9635F832943C} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TikiTest", "TikiTest\TikiTest.vcproj", "{32E9853A-32A0-4A21-8C3C-A065A360A8F4}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TikiSnake", "..\examples\console\TikiSnake\TikiSnake.vcproj", "{FCAE4EF3-7B5D-4C0D-8793-4157F7D8709F}" ProjectSection(ProjectDependencies) = postProject {F2816CAC-B560-4ED9-8A73-9635F832943C} = {F2816CAC-B560-4ED9-8A73-9635F832943C} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BasicNet", "..\examples\net\basic\basic.vcproj", "{7B823C96-860C-4578-95CC-1087A45AF1AA}" + ProjectSection(ProjectDependencies) = postProject + {F2816CAC-B560-4ED9-8A73-9635F832943C} = {F2816CAC-B560-4ED9-8A73-9635F832943C} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ChatClient", "..\examples\net\chat\chat.vcproj", "{7B823C96-860C-4578-95DD-1087A45AF1AA}" + ProjectSection(ProjectDependencies) = postProject + {F2816CAC-B560-4ED9-8A73-9635F832943C} = {F2816CAC-B560-4ED9-8A73-9635F832943C} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ChatServer", "..\examples\net\chatd\chatd.vcproj", "{7B823C96-860C-4578-95EE-1087A45AF1AA}" + ProjectSection(ProjectDependencies) = postProject + {F2816CAC-B560-4ED9-8A73-9635F832943C} = {F2816CAC-B560-4ED9-8A73-9635F832943C} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HttpClient", "..\examples\net\httpclient\httpclient.vcproj", "{7B823C96-861C-4578-95FF-1087A45AF1AA}" + ProjectSection(ProjectDependencies) = postProject + {F2816CAC-B560-4ED9-8A73-9635F832943C} = {F2816CAC-B560-4ED9-8A73-9635F832943C} + EndProjectSection +EndProject Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {F2816CAC-B560-4ED9-8A73-9635F832943C}.Debug.ActiveCfg = Debug|Win32 - {F2816CAC-B560-4ED9-8A73-9635F832943C}.Debug.Build.0 = Debug|Win32 - {F2816CAC-B560-4ED9-8A73-9635F832943C}.Release.ActiveCfg = Release|Win32 - {F2816CAC-B560-4ED9-8A73-9635F832943C}.Release.Build.0 = Release|Win32 - {32E9853A-32A0-4A21-8C3C-A065A360A8F4}.Debug.ActiveCfg = Debug|Win32 - {32E9853A-32A0-4A21-8C3C-A065A360A8F4}.Debug.Build.0 = Debug|Win32 - {32E9853A-32A0-4A21-8C3C-A065A360A8F4}.Release.ActiveCfg = Release|Win32 - {32E9853A-32A0-4A21-8C3C-A065A360A8F4}.Release.Build.0 = Release|Win32 + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F2816CAC-B560-4ED9-8A73-9635F832943C}.Debug|Win32.ActiveCfg = Debug|Win32 + {F2816CAC-B560-4ED9-8A73-9635F832943C}.Debug|Win32.Build.0 = Debug|Win32 + {F2816CAC-B560-4ED9-8A73-9635F832943C}.Release|Win32.ActiveCfg = Release|Win32 + {F2816CAC-B560-4ED9-8A73-9635F832943C}.Release|Win32.Build.0 = Release|Win32 + {7B823C96-860C-4578-95BB-1087A45AF1AA}.Debug|Win32.ActiveCfg = Debug|Win32 + {7B823C96-860C-4578-95BB-1087A45AF1AA}.Debug|Win32.Build.0 = Debug|Win32 + {7B823C96-860C-4578-95BB-1087A45AF1AA}.Release|Win32.ActiveCfg = Release|Win32 + {7B823C96-860C-4578-95BB-1087A45AF1AA}.Release|Win32.Build.0 = Release|Win32 + {FCAE4EF3-7B5D-4C0D-8793-4157F7D8709F}.Debug|Win32.ActiveCfg = Debug|Win32 + {FCAE4EF3-7B5D-4C0D-8793-4157F7D8709F}.Debug|Win32.Build.0 = Debug|Win32 + {FCAE4EF3-7B5D-4C0D-8793-4157F7D8709F}.Release|Win32.ActiveCfg = Release|Win32 + {FCAE4EF3-7B5D-4C0D-8793-4157F7D8709F}.Release|Win32.Build.0 = Release|Win32 + {7B823C96-860C-4578-95CC-1087A45AF1AA}.Debug|Win32.ActiveCfg = Debug|Win32 + {7B823C96-860C-4578-95CC-1087A45AF1AA}.Debug|Win32.Build.0 = Debug|Win32 + {7B823C96-860C-4578-95CC-1087A45AF1AA}.Release|Win32.ActiveCfg = Release|Win32 + {7B823C96-860C-4578-95CC-1087A45AF1AA}.Release|Win32.Build.0 = Release|Win32 + {7B823C96-860C-4578-95DD-1087A45AF1AA}.Debug|Win32.ActiveCfg = Debug|Win32 + {7B823C96-860C-4578-95DD-1087A45AF1AA}.Debug|Win32.Build.0 = Debug|Win32 + {7B823C96-860C-4578-95DD-1087A45AF1AA}.Release|Win32.ActiveCfg = Release|Win32 + {7B823C96-860C-4578-95DD-1087A45AF1AA}.Release|Win32.Build.0 = Release|Win32 + {7B823C96-860C-4578-95EE-1087A45AF1AA}.Debug|Win32.ActiveCfg = Debug|Win32 + {7B823C96-860C-4578-95EE-1087A45AF1AA}.Debug|Win32.Build.0 = Debug|Win32 + {7B823C96-860C-4578-95EE-1087A45AF1AA}.Release|Win32.ActiveCfg = Release|Win32 + {7B823C96-860C-4578-95EE-1087A45AF1AA}.Release|Win32.Build.0 = Release|Win32 + {7B823C96-861C-4578-95FF-1087A45AF1AA}.Debug|Win32.ActiveCfg = Debug|Win32 + {7B823C96-861C-4578-95FF-1087A45AF1AA}.Debug|Win32.Build.0 = Debug|Win32 + {7B823C96-861C-4578-95FF-1087A45AF1AA}.Release|Win32.ActiveCfg = Release|Win32 + {7B823C96-861C-4578-95FF-1087A45AF1AA}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection EndGlobal Modified: tiki/win32/tiki.vcproj =================================================================== --- tiki/win32/tiki.vcproj 2007-08-25 02:07:26 UTC (rev 493) +++ tiki/win32/tiki.vcproj 2007-08-25 08:48:53 UTC (rev 494) @@ -1,97 +1,150 @@ <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" - Version="7.10" + Version="8.00" Name="tiki" ProjectGUID="{F2816CAC-B560-4ED9-8A73-9635F832943C}" - Keyword="Win32Proj"> + RootNamespace="tiki" + Keyword="Win32Proj" + > <Platforms> <Platform - Name="Win32"/> + Name="Win32" + /> </Platforms> + <ToolFiles> + </ToolFiles> <Configurations> <Configuration Name="Debug|Win32" OutputDirectory="Debug" IntermediateDirectory="Debug" ConfigurationType="4" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" UseOfMFC="0" - CharacterSet="2"> + CharacterSet="2" + > <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories="include;../include;../3rdparty/libpng;../3rdparty/zlib;../3rdparty/libjpeg;../3rdparty/libogg/include;../3rdparty/libvorbis/include;"C:\Program Files\OpenAL 1.1 SDK\include"" - MinimalRebuild="TRUE" + AdditionalIncludeDirectories=""$(ProjectDir)\include";"$(ProjectDir)\..\include";"C:\Program Files\OpenAL 1.1 SDK\include";"$(ProjectDir)\..\3rdparty\libjpeg";"$(ProjectDir)\..\3rdparty\libogg\include";"$(ProjectDir)\..\3rdparty\libpng";"$(ProjectDir)\..\3rdparty\libvorbis\include";"$(ProjectDir)\..\3rdparty\zlib"" + PreprocessorDefinitions="_WIN32_WINNT=0x0500;_CRT_SECURE_NO_WARNINGS=1" + MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" - UsePrecompiledHeader="3" + UsePrecompiledHeader="2" PrecompiledHeaderThrough="pch.h" WarningLevel="3" - Detect64BitPortabilityProblems="TRUE" - DebugInformationFormat="4"/> + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + /> <Tool - Name="VCCustomBuildTool"/> + Name="VCManagedResourceCompilerTool" + /> <Tool - Name="VCLibrarianTool" - OutputFile="$(OutDir)/tiki.lib"/> + Name="VCResourceCompilerTool" + /> <Tool - Name="VCMIDLTool"/> + Name="VCPreLinkEventTool" + /> <Tool - Name="VCPostBuildEventTool"/> + Name="VCLibrarianTool" + OutputFile="$(OutDir)/tiki.lib" + /> <Tool - Name="VCPreBuildEventTool"/> + Name="VCALinkTool" + /> <Tool - Name="VCPreLinkEventTool"/> + Name="VCXDCMakeTool" + /> <Tool - Name="VCResourceCompilerTool"/> + Name="VCBscMakeTool" + /> <Tool - Name="VCWebServiceProxyGeneratorTool"/> + Name="VCFxCopTool" + /> <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + Name="VCPostBuildEventTool" + /> </Configuration> <Configuration Name="Release|Win32" OutputDirectory="Release" IntermediateDirectory="Release" ConfigurationType="4" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" UseOfMFC="0" - CharacterSet="2"> + CharacterSet="2" + > <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool Name="VCCLCompilerTool" - AdditionalIncludeDirectories="include;../include;../3rdparty/libpng;../3rdparty/zlib;../3rdparty/libjpeg;../3rdparty/libogg/include;../3rdparty/libvorbis/include;"C:\Program Files\OpenAL 1.1 SDK\include"" + AdditionalIncludeDirectories=""$(ProjectDir)\include";"$(ProjectDir)\..\include";"C:\Program Files\OpenAL 1.1 SDK\include";"$(ProjectDir)\..\3rdparty\libjpeg";"$(ProjectDir)\..\3rdparty\libogg\include";"$(ProjectDir)\..\3rdparty\libpng";"$(ProjectDir)\..\3rdparty\libvorbis\include";"$(ProjectDir)\..\3rdparty\zlib"" + PreprocessorDefinitions="_WIN32_WINNT=0x0500; _CRT_SECURE_NO_WARNINGS=1" RuntimeLibrary="0" - UsePrecompiledHeader="3" + UsePrecompiledHeader="2" PrecompiledHeaderThrough="pch.h" WarningLevel="3" - Detect64BitPortabilityProblems="TRUE" - DebugInformationFormat="3"/> + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> <Tool - Name="VCCustomBuildTool"/> + Name="VCManagedResourceCompilerTool" + /> <Tool - Name="VCLibrarianTool" - OutputFile="$(OutDir)/tiki.lib"/> + Name="VCResourceCompilerTool" + /> <Tool - Name="VCMIDLTool"/> + Name="VCPreLinkEventTool" + /> <Tool - Name="VCPostBuildEventTool"/> + Name="VCLibrarianTool" + OutputFile="$(OutDir)/tiki.lib" + /> <Tool - Name="VCPreBuildEventTool"/> + Name="VCALinkTool" + /> <Tool - Name="VCPreLinkEventTool"/> + Name="VCXDCMakeTool" + /> <Tool - Name="VCResourceCompilerTool"/> + Name="VCBscMakeTool" + /> <Tool - Name="VCWebServiceProxyGeneratorTool"/> + Name="VCFxCopTool" + /> <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + Name="VCPostBuildEventTool" + /> </Configuration> </Configurations> <References> @@ -99,2012 +152,2742 @@ <Files> <Filter Name="Portable" - Filter=""> + > <Filter Name="Source" - Filter=""> + > <Filter Name="audio" - Filter=""> + > <File - RelativePath="..\src\audio\sound.cpp"> + RelativePath="..\src\audio\sound.cpp" + > <FileConfiguration - Name="Debug|Win32"> + Name="Debug|Win32" + > <Tool Name="VCCLCompilerTool" - ObjectFile="$(IntDir)/$(InputName)1.obj"/> + ObjectFile="$(IntDir)/$(InputName)1.obj" + /> </FileConfiguration> <FileConfiguration - Name="Release|Win32"> + Name="Release|Win32" + > <Tool Name="VCCLCompilerTool" - ObjectFile="$(IntDir)/$(InputName)1.obj"/> + ObjectFile="$(IntDir)/$(InputName)1.obj" + /> </FileConfiguration> </File> <File - RelativePath="..\src\audio\stream.cpp"> + RelativePath="..\src\audio\stream.cpp" + > <FileConfiguration - Name="Debug|Win32"> + Name="Debug|Win32" + > <Tool Name="VCCLCompilerTool" - ObjectFile="$(IntDir)/$(InputName)1.obj"/> + ObjectFile="$(IntDir)/$(InputName)1.obj" + /> </FileConfiguration> <FileConfiguration - Name="Release|Win32"> + Name="Release|Win32" + > <Tool Name="VCCLCompilerTool" - ObjectFile="$(IntDir)/$(InputName)1.obj"/> + ObjectFile="$(IntDir)/$(InputName)1.obj" + /> </FileConfiguration> </File> <Filter Name="oggvorbis" - Filter=""> + > <File - RelativePath="..\src\audio\oggvorbis\misc.h"> + RelativePath="..\src\audio\oggvorbis\misc.h" + > </File> <File - RelativePath="..\src\audio\oggvorbis\sndoggvorbis.cpp"> + RelativePath="..\src\audio\oggvorbis\sndoggvorbis.cpp" + > </File> </Filter> </Filter> <Filter Name="base" - Filter=""> + > <File - RelativePath="..\src\base\debug.cpp"> + RelativePath="..\src\base\debug.cpp" + > </File> <File - RelativePath="..\src\base\endian.cpp"> + RelativePath="..\src\base\endian.cpp" + > </File> <File - RelativePath="..\src\base\file.cpp"> + RelativePath="..\src\base\file.cpp" + > </File> <File - RelativePath="..\src\base\object.cpp"> + RelativePath="..\src\base\object.cpp" + > </File> <File - RelativePath="..\src\base\timeline.cpp"> + RelativePath="..\src\base\timeline.cpp" + > </File> <File - RelativePath="..\src\base\timepoint.cpp"> + RelativePath="..\src\base\timepoint.cpp" + > </File> </Filter> <Filter Name="gl" - Filter=""> + > <File - RelativePath="..\src\gl\animation.cpp"> + RelativePath="..\src\gl\animation.cpp" + > </File> <File - RelativePath="..\src\gl\drawable.cpp"> + RelativePath="..\src\gl\drawable.cpp" + > </File> <File - RelativePath="..\src\gl\font.cpp"> + RelativePath="..\src\gl\font.cpp" + > </File> <File - RelativePath="..\src\gl\genmenu.cpp"> + RelativePath="..\src\gl\genmenu.cpp" + > </File> <File - RelativePath="..\src\gl\gl.cpp"> + RelativePath="..\src\gl\gl.cpp" + > </File> <File - RelativePath="..\src\gl\plxcompat.cpp"> + RelativePath="..\src\gl\plxcompat.cpp" + > </File> <File - RelativePath="..\src\gl\texture.cpp"> + RelativePath="..\src\gl\texture.cpp" + > </File> <File - RelativePath="..\src\gl\trigger.cpp"> + RelativePath="..\src\gl\trigger.cpp" + > </File> <Filter Name="anims" - Filter=""> + > <File - RelativePath="..\src\gl\anims\alphafader.cpp"> + RelativePath="..\src\gl\anims\alphafader.cpp" + > </File> <File - RelativePath="..\src\gl\anims\expxymover.cpp"> + RelativePath="..\src\gl\anims\expxymover.cpp" + > </File> <File - RelativePath="..\src\gl\anims\logxymover.cpp"> + RelativePath="..\src\gl\anims\logxymover.cpp" + > </File> <File - RelativePath="..\src\gl\anims\tintfader.cpp"> + RelativePath="..\src\gl\anims\tintfader.cpp" + > </File> </Filter> <Filter Name="drawables" - Filter=""> + > <File - RelativePath="..\src\gl\drawables\banner.cpp"> + RelativePath="..\src\gl\drawables\banner.cpp" + > </File> <File - RelativePath="..\src\gl\drawables\console.cpp"> + RelativePath="..\src\gl\drawables\console.cpp" + > </File> <File - RelativePath="..\src\gl\drawables\cursor.cpp"> + RelativePath="..\src\gl\drawables\cursor.cpp" + > </File> <File - RelativePath="..\src\gl\drawables\label.cpp"> + RelativePath="..\src\gl\drawables\label.cpp" + > </File> <File - RelativePath="..\src\gl\drawables\pointerArrow.cpp"> + RelativePath="..\src\gl\drawables\pointerArrow.cpp" + > </File> + <File + RelativePath="..\src\gl\drawables\texturetile.cpp" + > + </File> </Filter> <Filter Name="triggers" - Filter=""> + > <File - RelativePath="..\src\gl\triggers\birth.cpp"> + RelativePath="..\src\gl\triggers\birth.cpp" + > </File> <File - RelativePath="..\src\gl\triggers\death.cpp"> + RelativePath="..\src\gl\triggers\death.cpp" + > </File> </Filter> </Filter> <Filter Name="hid" - Filter=""> + > <File - RelativePath="..\src\hid\eventcollector.cpp"> + RelativePath="..\src\hid\eventcollector.cpp" + > </File> <File - RelativePath="..\src\hid\hid.cpp"> + RelativePath="..\src\hid\hid.cpp" + > </File> </Filter> <Filter Name="math" - Filter=""> + > <File - RelativePath="..\src\math\bspline.cpp"> + RelativePath="..\src\math\bspline.cpp" + > </File> <File - RelativePath="..\src\math\math.cpp"> + RelativePath="..\src\math\math.cpp" + > </File> <File - RelativePath="..\src\math\matrix.cpp"> + RelativePath="..\src\math\matrix.cpp" + > </File> <File - RelativePath="..\src\math\vector.cpp"> + RelativePath="..\src\math\vector.cpp" + > </File> <File - RelativePath="..\src\math\vector3.cpp"> + RelativePath="..\src\math\vector3.cpp" + > </File> </Filter> <Filter Name="thread" - Filter=""> + > <File - RelativePath="..\src\thread\thread.cpp"> + RelativePath="..\src\thread\thread.cpp" + > </File> </Filter> <Filter Name="image" - Filter=""> + > <File - RelativePath="..\src\image\image.cpp"> + RelativePath="..\src\image\image.cpp" + > </File> <File - RelativePath="..\src\image\loadjpg.cpp"> + RelativePath="..\src\image\loadjpg.cpp" + > </File> <File - RelativePath="..\src\image\loadpng.cpp"> + RelativePath="..\src\image\loadpng.cpp" + > </File> </Filter> + <Filter + Name="net" + > + <File + RelativePath="..\src\net\address.cpp" + > + </File> + <File + RelativePath="..\src\net\socket.cpp" + > + </File> + <File + RelativePath="..\src\net\tcpserversocket.cpp" + > + </File> + <File + RelativePath="..\src\net\tcpsocket.cpp" + > + </File> + <Filter + Name="http" + > + <File + RelativePath="..\src\net\http\request.cpp" + > + </File> + <File + RelativePath="..\src\net\http\response.cpp" + > + </File> + <File + RelativePath="..\src\net\http\useragent.cpp" + > + </File> + </Filter> + </Filter> </Filter> <Filter Name="Include" - Filter=""> + > <File - RelativePath="..\include\Tiki\tiki.h"> + RelativePath="..\include\Tiki\tiki.h" + > </File> <File - RelativePath="..\include\Tiki\TikiAll.h"> + RelativePath="..\include\Tiki\TikiAll.h" + > </File> <Filter Name="base" - Filter=""> + > <File - RelativePath="..\include\Tiki\debug.h"> + RelativePath="..\include\Tiki\debug.h" + > </File> <File - RelativePath="..\include\Tiki\file.h"> + RelativePath="..\include\Tiki\file.h" + > </File> ... [truncated message content] |
From: <at...@us...> - 2007-08-26 12:07:51
|
Revision: 495 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=495&view=rev Author: atani Date: 2007-08-25 10:30:20 -0700 (Sat, 25 Aug 2007) Log Message: ----------- fixing path in win32/Makefile to project/solution files use google.com for httpclient example (sets a cookie) Modified Paths: -------------- tiki/examples/net/httpclient/src/main.cpp tiki/win32/Makefile Modified: tiki/examples/net/httpclient/src/main.cpp =================================================================== --- tiki/examples/net/httpclient/src/main.cpp 2007-08-25 08:48:53 UTC (rev 494) +++ tiki/examples/net/httpclient/src/main.cpp 2007-08-25 17:30:20 UTC (rev 495) @@ -36,7 +36,7 @@ //useragent->setProxyPort(80); Request *request = new Request(); - request->setUrl("http://www.oracle.com/"); + request->setUrl("http://www.google.com/"); Response *response = useragent->get(request); Tiki::Debug::printf("response code: %d\n", response->getResultCode()); @@ -57,7 +57,7 @@ { Buffer *responseBuf = response->getContentPart(*iter); Tiki::Debug::printf("Content Part: %s [%u bytes]\n", (*iter).c_str(), responseBuf->getUsedDataLen()); - Tiki::Debug::printf("%s\n", responseBuf->getData()); + //Tiki::Debug::printf("%s\n", responseBuf->getData()); } delete response; Modified: tiki/win32/Makefile =================================================================== --- tiki/win32/Makefile 2007-08-25 08:48:53 UTC (rev 494) +++ tiki/win32/Makefile 2007-08-25 17:30:20 UTC (rev 495) @@ -1,14 +1,17 @@ all: - vcbuild /nocolor /rebuild tiki_vs80.vcproj $$ALL + vcbuild /nocolor /rebuild tiki.vcproj $$ALL clean: - -vcbuild /nocolor /clean tiki_vc80.sln $$ALL + -vcbuild /nocolor /clean tiki.sln $$ALL examples: - vcbuild /nocolor /rebuild ..\\examples\\TikiTest\\TikiTest_vc80.vcproj $$ALL + vcbuild /nocolor /rebuild ..\\examples\\TikiTest\\TikiTest.vcproj $$ALL vcbuild /nocolor /rebuild ..\\examples\\console\\TikiSnake\\TikiSnake.vcproj $$ALL vcbuild /nocolor /rebuild ..\\examples\\net\\basic\\basic.vcproj $$ALL + vcbuild /nocolor /rebuild ..\\examples\\net\\chat\\chat.vcproj $$ALL + vcbuild /nocolor /rebuild ..\\examples\\net\\chatd\\chatd.vcproj $$ALL + vcbuild /nocolor /rebuild ..\\examples\\net\\httpclient\\httpclient.vcproj $$ALL package: zip -9r ../dist/$(SVN_VERSION)/tiki-$(SVN_VERSION)-win32-Debug.zip Debug/tiki.lib @@ -18,6 +21,9 @@ win32/include \ examples/TikiTest/Debug/tikitest.exe \ examples/net/basic/Debug/BasicNet.exe \ + examples/net/httpclient/Debug/BasicNet.exe \ + examples/net/chat/Debug/BasicNet.exe \ + examples/net/chatd/Debug/BasicNet.exe \ examples/console/TikiSnake/Debug/tikisnake.exe \ examples/console/TikiSnake/Debug/pc-ascii.png \ -x "*/.svn/*" @@ -28,6 +34,9 @@ win32/include \ examples/TikiTest/Release/tikitest.exe \ examples/net/basic/Release/BasicNet.exe \ + examples/net/httpclient/Release/BasicNet.exe \ + examples/net/chat/Release/BasicNet.exe \ + examples/net/chatd/Release/BasicNet.exe \ examples/console/TikiSnake/Release/tikisnake.exe \ examples/console/TikiSnake/Release/pc-ascii.png \ -x "*/.svn/*" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-08-26 11:09:40
|
Revision: 493 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=493&view=rev Author: atani Date: 2007-08-24 19:07:26 -0700 (Fri, 24 Aug 2007) Log Message: ----------- added Code::Blocks project/workspace for SDL build added new method: Request::setAuthentication() added Tiki::Net::Util::Base64 class fixed pngconf.h comment (astyle mangled it) removed old Tiki.xcode files (old XCode version) modified font.cpp to use macros from pch.h instead of TIKI_PLAT==TIKI_WIN32 blocks Modified Paths: -------------- tiki/3rdparty/libpng/pngconf.h tiki/include/Tiki/net/buffer.h tiki/include/Tiki/net/http/request.h tiki/include/Tiki/net/tcpsocket.h tiki/include/Tiki/net.h tiki/nds/Makefile tiki/sdl/Makefile tiki/sdl/src/init_shutdown.cpp tiki/sdl/src/platgl.cpp tiki/sdl/src/plathid.cpp tiki/sdl/src/platnet.cpp tiki/sdl/src/platthread.cpp tiki/sdl/src/tikitime.cpp tiki/src/gl/font.cpp tiki/src/net/http/request.cpp Added Paths: ----------- tiki/include/Tiki/net/util/ tiki/include/Tiki/net/util/base64.h tiki/sdl/TikiSDL.cbp tiki/sdl/TikiSDL.workspace tiki/src/net/util/ tiki/src/net/util/base64.cpp Removed Paths: ------------- tiki/osx/Tiki.xcode/ Modified: tiki/3rdparty/libpng/pngconf.h =================================================================== --- tiki/3rdparty/libpng/pngconf.h 2007-08-25 00:14:06 UTC (rev 492) +++ tiki/3rdparty/libpng/pngconf.h 2007-08-25 02:07:26 UTC (rev 493) @@ -29,7 +29,7 @@ /* * Added at libpng-1.2.8 - * + * * If you create a private DLL you need to define in "pngusr.h" the followings: * #define PNG_USER_PRIVATEBUILD <Describes by whom and why this version of * the DLL was built> @@ -40,8 +40,8 @@ * number and must match your private DLL name> * e.g. // private DLL "libpng13gx.dll" * #define PNG_USER_DLLFNAME_POSTFIX "gx" - * - * The following macros are also at your disposal if you want to complete the + * + * The following macros are also at your disposal if you want to complete the * DLL VERSIONINFO structure. * - PNG_USER_VERSIONINFO_COMMENTS * - PNG_USER_VERSIONINFO_COMPANYNAME @@ -129,9 +129,9 @@ * 'Cygwin' defines/defaults: * PNG_BUILD_DLL -- (ignored) building the dll * (no define) -- (ignored) building an application, linking to the dll - * PNG_STATIC -- (ignored) building the static lib, or building an + * PNG_STATIC -- (ignored) building the static lib, or building an * application that links to the static lib. - * ALL_STATIC -- (ignored) building various static libs, or building an + * ALL_STATIC -- (ignored) building various static libs, or building an * application that links to the static libs. * Thus, * a cygwin user should define either PNG_BUILD_DLL or PNG_STATIC, and @@ -144,12 +144,12 @@ * PNG_BUILD_DLL * PNG_STATIC * (nothing) == PNG_USE_DLL - * + * * CYGWIN (2002-01-20): The preceding is now obsolete. With the advent - * of auto-import in binutils, we no longer need to worry about + * of auto-import in binutils, we no longer need to worry about * __declspec(dllexport) / __declspec(dllimport) and friends. Therefore, * we don't need to worry about PNG_STATIC or ALL_STATIC when it comes - * to __declspec() stuff. However, we DO need to worry about + * to __declspec() stuff. However, we DO need to worry about * PNG_BUILD_DLL and PNG_STATIC because those change some defaults * such as CONSOLE_IO and whether GLOBAL_ARRAYS are allowed. */ @@ -212,7 +212,7 @@ */ #if defined(_WIN32_WCE) -# include <windows.h> +# include <windows.h> /* Console I/O functions are not supported on WindowsCE */ # define PNG_NO_CONSOLE_IO # ifdef PNG_DEBUG @@ -238,7 +238,7 @@ # endif # endif # else -# if !defined(_WIN32_WCE) +# if !defined(_WIN32_WCE) /* "stdio.h" functions are not supported on WindowsCE */ # include <stdio.h> # endif @@ -290,7 +290,7 @@ # define PNG_SETJMP_SUPPORTED #endif -#ifdef PNG_SETJMP_SUPPORTED +#ifdef PNG_SETJMP_SUPPORTED /* This is an attempt to force a single setjmp behaviour on Linux. If * the X config stuff didn't define _BSD_SOURCE we wouldn't need this. */ @@ -300,7 +300,7 @@ # define PNG_SAVE_BSD_SOURCE # undef _BSD_SOURCE # endif -# ifdef _SETJMP_H +# ifdef _SETJMP_H /* If you encounter a compiler error here, see the explanation * near the end of INSTALL. */ @@ -345,7 +345,7 @@ */ #if defined(PNG_FLOATING_POINT_SUPPORTED) -# if defined(MACOS) +# if defined(MACOS) /* We need to check that <math.h> hasn't already been included earlier * as it seems it doesn't agree with <fp.h>, yet we should really use * <fp.h> if possible. @@ -356,7 +356,7 @@ # else # include <math.h> # endif -# if defined(_AMIGA) && defined(__SASC) && defined(_M68881) +# if defined(_AMIGA) && defined(__SASC) && defined(_M68881) /* Amiga SAS/C: We must include builtin FPU functions when compiling using * MATH=68881 */ @@ -574,7 +574,7 @@ #if !defined(PNG_NO_PROGRESSIVE_READ) && \ !defined(PNG_PROGRESSIVE_READ_NOT_SUPPORTED) /* if you don't do progressive */ # define PNG_PROGRESSIVE_READ_SUPPORTED /* reading. This is not talking */ -#endif /* about interlacing capability! You'll */ +#endif /* about interlacing capability! You'll */ /* still have interlacing unless you change the following line: */ #define PNG_READ_INTERLACING_SUPPORTED /* required for PNG-compliant decoders */ @@ -633,11 +633,8 @@ # endif #endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */ -#define PNG_WRITE_INTERLACING_SUPPORTED /* not required for PNG-compliant +#define PNG_WRITE_INTERLACING_SUPPORTED /* not required for PNG-compliant encoders, but can cause trouble if left undefined */ -encoders, but can cause trouble -if left undefined * / - #if !defined(PNG_NO_WRITE_WEIGHTED_FILTER) && \ defined(PNG_FLOATING_POINT_SUPPORTED) # define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED @@ -1033,7 +1030,7 @@ /* need the time information for reading tIME chunks */ #if defined(PNG_tIME_SUPPORTED) -# if !defined(_WIN32_WCE) +# if !defined(_WIN32_WCE) /* "time.h" functions are not supported on WindowsCE */ # include <time.h> # endif @@ -1082,7 +1079,7 @@ # define LDATA 1 # else # define LDATA 0 -# endif +# endif /* GRR: why is Cygwin in here? Cygwin is not Borland C... */ # if !defined(__WIN32__) && !defined(__FLAT__) && !defined(__CYGWIN__) # define PNG_MAX_MALLOC_64K @@ -1091,7 +1088,7 @@ # define FAR __far # endif # define USE_FAR_KEYWORD -# endif /* LDATA != 1 */ +# endif /* LDATA != 1 */ /* Possibly useful for moving data out of default segment. * Uncomment it if you want. Could also define FARDATA as * const if your compiler supports it. (SJT) @@ -1168,7 +1165,7 @@ /* Pointers to pointers to pointers; i.e., pointer to array */ typedef char FAR * FAR * FAR * png_charppp; -#if defined(PNG_1_0_X) || defined(PNG_1_2_X) +#if defined(PNG_1_0_X) || defined(PNG_1_2_X) /* SPC - Is this stuff deprecated? */ /* It'll be removed as of libpng-1.3.0 - GR-P */ /* libpng typedefs for types in zlib. If zlib changes @@ -1200,7 +1197,7 @@ #if !defined(PNG_DLL) && (defined(PNG_BUILD_DLL) || defined(PNG_USE_DLL)) # define PNG_DLL -#endif +#endif /* If CYGWIN, then disallow GLOBAL ARRAYS unless building a static lib. * When building a static lib, default to no GLOBAL ARRAYS, but allow * command-line override @@ -1357,7 +1354,7 @@ (LIBPNG_WAS_COMPILED_WITH__PNG_SETJMP_NOT_SUPPORTED) #endif -#if defined(USE_FAR_KEYWORD) /* memory model independent fns */ +#if defined(USE_FAR_KEYWORD) /* memory model independent fns */ /* use this to make far-to-near assignments */ # define CHECK 1 # define NOCHECK 0 @@ -1378,7 +1375,7 @@ # define png_memcmp memcmp /* SJT: added */ # define png_memcpy memcpy # define png_memset memset -#endif +#endif /* End of memory model independent support */ /* Just a little check that someone hasn't tried to define something @@ -1389,7 +1386,7 @@ # define PNG_ZBUF_SIZE 65536L #endif -#ifdef PNG_READ_SUPPORTED +#ifdef PNG_READ_SUPPORTED /* Prior to libpng-1.0.9, this block was in pngasmrd.h */ #if defined(PNG_INTERNAL) @@ -1424,7 +1421,7 @@ # define PNG_HAVE_ASSEMBLER_COMBINE_ROW # define PNG_HAVE_ASSEMBLER_READ_INTERLACE # define PNG_HAVE_ASSEMBLER_READ_FILTER_ROW -#endif +#endif /* - see pnggccrd.c for info about what is currently enabled */ #endif /* PNG_INTERNAL */ Modified: tiki/include/Tiki/net/buffer.h =================================================================== --- tiki/include/Tiki/net/buffer.h 2007-08-25 00:14:06 UTC (rev 492) +++ tiki/include/Tiki/net/buffer.h 2007-08-25 02:07:26 UTC (rev 493) @@ -42,7 +42,7 @@ } Buffer(std::string filename, std::string contentType, std::string fieldName = "") : - m_fileName(filename), m_contentType(contentType), m_fieldName(fieldName) { + m_contentType(contentType), m_fileName(filename), m_fieldName(fieldName) { File file(filename, "rb"); read(file); file.close(); @@ -50,7 +50,7 @@ Buffer(Tiki::File file, std::string contentType, std::string fieldName = "") : m_contentType(contentType), m_fieldName(fieldName) { - read(file); + read(file); } void read(Tiki::File file) { @@ -86,9 +86,6 @@ } uint8 *getData() const { - if(m_usedDataLen > 0) { - m_data[m_usedDataLen] = '\0'; - } return m_data; } Modified: tiki/include/Tiki/net/http/request.h =================================================================== --- tiki/include/Tiki/net/http/request.h 2007-08-25 00:14:06 UTC (rev 492) +++ tiki/include/Tiki/net/http/request.h 2007-08-25 02:07:26 UTC (rev 493) @@ -8,13 +8,16 @@ #ifndef __TIKI_NET_HTTP_REQUEST_H #define __TIKI_NET_HTTP_REQUEST_H -#include "Tiki/refcnt.h" +#include "Tiki/refcnt.h" +#include "Tiki/net/util/base64.h" namespace Tiki { namespace Net { -namespace Http { +namespace Http { + +using Tiki::Net::Util::Base64; extern std::string DEFAULT_CONTENT_PART; @@ -33,7 +36,20 @@ } m_parts.clear(); } - */ + */ + + void setAuthentication(std::string username, std::string password) { + std::string param = username + ":" + password; + Buffer *inputBuf = new Buffer(param.length(), (uint8 *)param.c_str()); + + Base64 b64; + Buffer *result = b64.encode(inputBuf); + + setHeaderParam("Authorization", std::string("Basic ") + std::string((char *)result->getData())); + + delete inputBuf; + delete result; + } std::string getUrl() const { return m_url; Modified: tiki/include/Tiki/net/tcpsocket.h =================================================================== --- tiki/include/Tiki/net/tcpsocket.h 2007-08-25 00:14:06 UTC (rev 492) +++ tiki/include/Tiki/net/tcpsocket.h 2007-08-25 02:07:26 UTC (rev 493) @@ -34,9 +34,9 @@ TCPSocket() : Socket(), m_open(false) {}; TCPSocket(Address *address) : Socket(address), m_open(false) {}; #if TIKI_PLAT == TIKI_WIN32 - TCPSocket(Address *address, SOCKET socket) : Socket(address), m_socket(socket), m_open(true) {setNonBlocking(false);}; + TCPSocket(Address *address, SOCKET socket) : Socket(address), m_open(true), m_socket(socket) {setNonBlocking(false);}; #else - TCPSocket(RefPtr<Address> address, int socket) : Socket(address), m_socket(socket), m_open(true) {setNonBlocking(false);}; + TCPSocket(RefPtr<Address> address, int socket) : Socket(address), m_open(true), m_socket(socket) {setNonBlocking(false);}; #endif virtual void send(Buffer *data); Added: tiki/include/Tiki/net/util/base64.h =================================================================== --- tiki/include/Tiki/net/util/base64.h (rev 0) +++ tiki/include/Tiki/net/util/base64.h 2007-08-25 02:07:26 UTC (rev 493) @@ -0,0 +1,36 @@ +/* + Tiki + + base64.h + + Copyright (C)2007 Atani Software +*/ + +#ifndef __TIKI_BASE64_H +#define __TIKI_BASE64_H + +namespace Tiki { + namespace Net { + namespace Util { + + class Base64 { + public: + Buffer *encode(Buffer *source); + Buffer *decode(Buffer *source); + + private: + void encodeTriplet(uint8 *input, uint8 count, uint8 *output); + uint8 decodeQuartet(uint8 *input, uint8 *output); + size_t calcEncodeBufferSize(size_t byteCount); + size_t calcDecodeBufferSize(uint8 *input, size_t inputByteCount); + + static uint8 BASE64_ALPHABET[64]; + static uint8 BASE64_DEALPHABET[128]; + }; + + } + } + +} + +#endif // __TIKI_BASE64_H Modified: tiki/include/Tiki/net.h =================================================================== --- tiki/include/Tiki/net.h 2007-08-25 00:14:06 UTC (rev 492) +++ tiki/include/Tiki/net.h 2007-08-25 02:07:26 UTC (rev 493) @@ -31,3 +31,4 @@ #include "Tiki/net/tcpsocket.h" #include "Tiki/net/tcpserversocket.h" #include "Tiki/net/udpsocket.h" +#include "Tiki/net/util/base64.h" Modified: tiki/nds/Makefile =================================================================== --- tiki/nds/Makefile 2007-08-25 00:14:06 UTC (rev 492) +++ tiki/nds/Makefile 2007-08-25 02:07:26 UTC (rev 493) @@ -12,6 +12,7 @@ BASE_THREAD_OBJ=$(patsubst %.cpp,%.o,$(wildcard ../src/thread/*.cpp)) BASE_NET_OBJ=$(patsubst %.cpp,%.o,$(wildcard ../src/net/*.cpp)) BASE_NET_OBJ+=$(patsubst %.cpp,%.o,$(wildcard ../src/net/http/*.cpp)) +BASE_NET_OBJ+=$(patsubst %.cpp,%.o,$(wildcard ../src/net/util/*.cpp)) JPEG_OBJ=$(patsubst %.c,%.o,$(wildcard ../3rdparty/libjpeg/*.c)) PNG_OBJ=$(patsubst %.c,%.o,$(wildcard ../3rdparty/libpng/*.c)) Modified: tiki/sdl/Makefile =================================================================== --- tiki/sdl/Makefile 2007-08-25 00:14:06 UTC (rev 492) +++ tiki/sdl/Makefile 2007-08-25 02:07:26 UTC (rev 493) @@ -12,6 +12,7 @@ BASE_THREAD_OBJ=$(patsubst %.cpp,%.o,$(wildcard ../src/thread/*.cpp)) BASE_NET_OBJ=$(patsubst %.cpp,%.o,$(wildcard ../src/net/*.cpp)) BASE_NET_OBJ+=$(patsubst %.cpp,%.o,$(wildcard ../src/net/http/*.cpp)) +BASE_NET_OBJ+=$(patsubst %.cpp,%.o,$(wildcard ../src/net/util/*.cpp)) JPEG_OBJ=$(patsubst %.c,%.o,$(wildcard ../3rdparty/libjpeg/*.c)) PNG_OBJ=$(patsubst %.c,%.o,$(wildcard ../3rdparty/libpng/*.c)) Added: tiki/sdl/TikiSDL.cbp =================================================================== --- tiki/sdl/TikiSDL.cbp (rev 0) +++ tiki/sdl/TikiSDL.cbp 2007-08-25 02:07:26 UTC (rev 493) @@ -0,0 +1,548 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="TikiSDL" /> + <Option pch_mode="2" /> + <Option compiler="gcc" /> + <Build> + <Target title="Debug"> + <Option output="bin/Debug/libTikiSDL" prefix_auto="1" extension_auto="1" /> + <Option working_dir="" /> + <Option object_output="obj/Debug/" /> + <Option type="2" /> + <Option compiler="gcc" /> + <Option createDefFile="1" /> + <Compiler> + <Add option="-g" /> + </Compiler> + </Target> + <Target title="Release"> + <Option output="bin/Release/libTikiSDL" prefix_auto="1" extension_auto="1" /> + <Option working_dir="" /> + <Option object_output="obj/Release/" /> + <Option type="2" /> + <Option compiler="gcc" /> + <Option createDefFile="1" /> + <Compiler> + <Add option="-O2" /> + </Compiler> + <Linker> + <Add option="-s" /> + </Linker> + </Target> + </Build> + <Compiler> + <Add option="-Wall" /> + <Add option="`sdl-config --cflags`" /> + <Add directory="include" /> + <Add directory="../include" /> + <Add directory="../3rdparty/libjpeg" /> + <Add directory="../3rdparty/libogg/include" /> + <Add directory="../3rdparty/libpng" /> + <Add directory="../3rdparty/libvorbis/include" /> + <Add directory="../3rdparty/zlib" /> + <Add directory="../3rdparty/libvorbis/lib" /> + </Compiler> + <Unit filename="../3rdparty/libjpeg/jcapimin.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jcapistd.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jccoefct.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jccolor.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jcdctmgr.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jchuff.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jchuff.h" /> + <Unit filename="../3rdparty/libjpeg/jcinit.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jcmainct.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jcmarker.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jcmaster.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jcomapi.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jconfig.h" /> + <Unit filename="../3rdparty/libjpeg/jcparam.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jcphuff.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jcprepct.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jcsample.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jctrans.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jdapimin.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jdapistd.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jdatadst.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jdatasrc.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jdcoefct.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jdcolor.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jdct.h" /> + <Unit filename="../3rdparty/libjpeg/jddctmgr.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jdhuff.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jdhuff.h" /> + <Unit filename="../3rdparty/libjpeg/jdinput.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jdmainct.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jdmarker.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jdmaster.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jdmerge.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jdphuff.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jdpostct.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jdsample.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jdtrans.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jerror.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jerror.h" /> + <Unit filename="../3rdparty/libjpeg/jfdctflt.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jfdctfst.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jfdctint.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jidctflt.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jidctfst.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jidctint.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jidctred.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jinclude.h" /> + <Unit filename="../3rdparty/libjpeg/jmemmgr.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jmemnobs.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jmemsys.h" /> + <Unit filename="../3rdparty/libjpeg/jmorecfg.h" /> + <Unit filename="../3rdparty/libjpeg/jpegint.h" /> + <Unit filename="../3rdparty/libjpeg/jpeglib.h" /> + <Unit filename="../3rdparty/libjpeg/jquant1.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jquant2.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jutils.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libjpeg/jversion.h" /> + <Unit filename="../3rdparty/libogg/include/ogg/ogg.h" /> + <Unit filename="../3rdparty/libogg/include/ogg/os_types.h" /> + <Unit filename="../3rdparty/libogg/src/bitwise.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libogg/src/framing.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libpng/png.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libpng/png.h" /> + <Unit filename="../3rdparty/libpng/pngconf.h" /> + <Unit filename="../3rdparty/libpng/pngerror.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libpng/pnggccrd.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libpng/pngget.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libpng/pngmem.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libpng/pngpread.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libpng/pngread.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libpng/pngrio.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libpng/pngrtran.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libpng/pngrutil.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libpng/pngset.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libpng/pngtrans.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libpng/pngvcrd.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libpng/pngwio.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libpng/pngwrite.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libpng/pngwtran.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libpng/pngwutil.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libvorbis/include/vorbis/codec.h" /> + <Unit filename="../3rdparty/libvorbis/include/vorbis/vorbisenc.h" /> + <Unit filename="../3rdparty/libvorbis/include/vorbis/vorbisfile.h" /> + <Unit filename="../3rdparty/libvorbis/lib/analysis.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libvorbis/lib/backends.h" /> + <Unit filename="../3rdparty/libvorbis/lib/barkmel.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libvorbis/lib/bitrate.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libvorbis/lib/bitrate.h" /> + <Unit filename="../3rdparty/libvorbis/lib/block.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libvorbis/lib/books/coupled/res_books_stereo.h" /> + <Unit filename="../3rdparty/libvorbis/lib/books/floor/floor_books.h" /> + <Unit filename="../3rdparty/libvorbis/lib/books/uncoupled/res_books_uncoupled.h" /> + <Unit filename="../3rdparty/libvorbis/lib/codebook.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libvorbis/lib/codebook.h" /> + <Unit filename="../3rdparty/libvorbis/lib/codec_internal.h" /> + <Unit filename="../3rdparty/libvorbis/lib/envelope.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libvorbis/lib/envelope.h" /> + <Unit filename="../3rdparty/libvorbis/lib/floor0.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libvorbis/lib/floor1.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libvorbis/lib/highlevel.h" /> + <Unit filename="../3rdparty/libvorbis/lib/info.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libvorbis/lib/lookup.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libvorbis/lib/lookup.h" /> + <Unit filename="../3rdparty/libvorbis/lib/lookup_data.h" /> + <Unit filename="../3rdparty/libvorbis/lib/lpc.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libvorbis/lib/lpc.h" /> + <Unit filename="../3rdparty/libvorbis/lib/lsp.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libvorbis/lib/lsp.h" /> + <Unit filename="../3rdparty/libvorbis/lib/mapping0.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libvorbis/lib/masking.h" /> + <Unit filename="../3rdparty/libvorbis/lib/mdct.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libvorbis/lib/mdct.h" /> + <Unit filename="../3rdparty/libvorbis/lib/misc.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/floor_all.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/psych_11.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/psych_16.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/psych_44.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/psych_8.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/residue_16.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/residue_44.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/residue_44u.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/residue_8.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/setup_11.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/setup_16.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/setup_22.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/setup_32.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/setup_44.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/setup_44u.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/setup_8.h" /> + <Unit filename="../3rdparty/libvorbis/lib/modes/setup_X.h" /> + <Unit filename="../3rdparty/libvorbis/lib/os.h" /> + <Unit filename="../3rdparty/libvorbis/lib/psy.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libvorbis/lib/psy.h" /> + <Unit filename="../3rdparty/libvorbis/lib/registry.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libvorbis/lib/registry.h" /> + <Unit filename="../3rdparty/libvorbis/lib/res0.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libvorbis/lib/scales.h" /> + <Unit filename="../3rdparty/libvorbis/lib/sharedbook.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libvorbis/lib/smallft.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libvorbis/lib/smallft.h" /> + <Unit filename="../3rdparty/libvorbis/lib/synthesis.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libvorbis/lib/vorbisenc.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libvorbis/lib/vorbisfile.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libvorbis/lib/window.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/libvorbis/lib/window.h" /> + <Unit filename="../3rdparty/zlib/adler32.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/zlib/compress.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/zlib/crc32.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/zlib/crc32.h" /> + <Unit filename="../3rdparty/zlib/deflate.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/zlib/deflate.h" /> + <Unit filename="../3rdparty/zlib/gzio.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/zlib/infback.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/zlib/inffast.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/zlib/inffast.h" /> + <Unit filename="../3rdparty/zlib/inffixed.h" /> + <Unit filename="../3rdparty/zlib/inflate.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/zlib/inflate.h" /> + <Unit filename="../3rdparty/zlib/inftrees.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/zlib/inftrees.h" /> + <Unit filename="../3rdparty/zlib/trees.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/zlib/trees.h" /> + <Unit filename="../3rdparty/zlib/uncompr.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/zlib/zconf.h" /> + <Unit filename="../3rdparty/zlib/zlib.h" /> + <Unit filename="../3rdparty/zlib/zutil.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="../3rdparty/zlib/zutil.h" /> + <Unit filename="../include/Tiki/TikiAll.h" /> + <Unit filename="../include/Tiki/animation.h" /> + <Unit filename="../include/Tiki/anims/alphafader.h" /> + <Unit filename="../include/Tiki/anims/alpharotate.h" /> + <Unit filename="../include/Tiki/anims/expxymover.h" /> + <Unit filename="../include/Tiki/anims/logxymover.h" /> + <Unit filename="../include/Tiki/anims/sleep.h" /> + <Unit filename="../include/Tiki/anims/tintfader.h" /> + <Unit filename="../include/Tiki/bspline.h" /> + <Unit filename="../include/Tiki/color.h" /> + <Unit filename="../include/Tiki/color3.h" /> + <Unit filename="../include/Tiki/debug.h" /> + <Unit filename="../include/Tiki/drawable.h" /> + <Unit filename="../include/Tiki/drawables/banner.h" /> + <Unit filename="../include/Tiki/drawables/console.h" /> + <Unit filename="../include/Tiki/drawables/cursor.h" /> + <Unit filename="../include/Tiki/drawables/label.h" /> + <Unit filename="../include/Tiki/drawables/layer.h" /> + <Unit filename="../include/Tiki/drawables/pointerArrow.h" /> + <Unit filename="../include/Tiki/drawables/texturetile.h" /> + <Unit filename="../include/Tiki/endian.h" /> + <Unit filename="../include/Tiki/eventcollector.h" /> + <Unit filename="../include/Tiki/file.h" /> + <Unit filename="../include/Tiki/font.h" /> + <Unit filename="../include/Tiki/genmenu.h" /> + <Unit filename="../include/Tiki/gl.h" /> + <Unit filename="../include/Tiki/hid.h" /> + <Unit filename="../include/Tiki/image.h" /> + <Unit filename="../include/Tiki/imgjpg.h" /> + <Unit filename="../include/Tiki/imgpng.h" /> + <Unit filename="../include/Tiki/list.h" /> + <Unit filename="../include/Tiki/matrix.h" /> + <Unit filename="../include/Tiki/net.h" /> + <Unit filename="../include/Tiki/net/address.h" /> + <Unit filename="../include/Tiki/net/buffer.h" /> + <Unit filename="../include/Tiki/net/http/cookie.h" /> + <Unit filename="../include/Tiki/net/http/request.h" /> + <Unit filename="../include/Tiki/net/http/response.h" /> + <Unit filename="../include/Tiki/net/http/useragent.h" /> + <Unit filename="../include/Tiki/net/socket.h" /> + <Unit filename="../include/Tiki/net/tcpserversocket.h" /> + <Unit filename="../include/Tiki/net/tcpsocket.h" /> + <Unit filename="../include/Tiki/net/udpsocket.h" /> + <Unit filename="../include/Tiki/net/util/base64.h" /> + <Unit filename="../include/Tiki/object.h" /> + <Unit filename="../include/Tiki/oggvorbis.h" /> + <Unit filename="../include/Tiki/plxcompat.h" /> + <Unit filename="../include/Tiki/refcnt.h" /> + <Unit filename="../include/Tiki/scene.h" /> + <Unit filename="../include/Tiki/sound.h" /> + <Unit filename="../include/Tiki/stream.h" /> + <Unit filename="../include/Tiki/tee.h" /> + <Unit filename="../include/Tiki/texture.h" /> + <Unit filename="../include/Tiki/thread.h" /> + <Unit filename="../include/Tiki/tiki.h" /> + <Unit filename="../include/Tiki/tikimath.h" /> + <Unit filename="../include/Tiki/tikitime.h" /> + <Unit filename="../include/Tiki/timeline.h" /> + <Unit filename="../include/Tiki/timepoint.h" /> + <Unit filename="../include/Tiki/trigger.h" /> + <Unit filename="../include/Tiki/triggers/birth.h" /> + <Unit filename="../include/Tiki/triggers/chainanim.h" /> + <Unit filename="../include/Tiki/triggers/death.h" /> + <Unit filename="../include/Tiki/triggers/oneshot.h" /> + <Unit filename="../include/Tiki/vector.h" /> + <Unit filename="../include/Tiki/vector3.h" /> + <Unit filename="include/Tiki/glhdrs.h" /> + <Unit filename="include/Tiki/platnet.h" /> + <Unit filename="include/Tiki/platthread.h" /> + <Unit filename="include/Tiki/tikitypes.h" /> + <Unit filename="include/machine/endian.h" /> + <Unit filename="include/pch.h" /> + <Unit filename="include/sys/queue.h" /> + <Unit filename="src/init_shutdown.cpp" /> + <Unit filename="src/platgl.cpp" /> + <Unit filename="src/plathid.cpp" /> + <Unit filename="src/platnet.cpp" /> + <Unit filename="src/platthread.cpp" /> + <Unit filename="src/tikitime.cpp" /> + <Unit filename="../src/audio/oggvorbis/misc.h" /> + <Unit filename="../src/audio/oggvorbis/sndoggvorbis.cpp" /> + <Unit filename="../src/audio/sound.cpp" /> + <Unit filename="../src/audio/stream.cpp" /> + <Unit filename="../src/base/debug.cpp" /> + <Unit filename="../src/base/endian.cpp" /> + <Unit filename="../src/base/file.cpp" /> + <Unit filename="../src/base/object.cpp" /> + <Unit filename="../src/base/timeline.cpp" /> + <Unit filename="../src/base/timepoint.cpp" /> + <Unit filename="../src/gl/animation.cpp" /> + <Unit filename="../src/gl/anims/alphafader.cpp" /> + <Unit filename="../src/gl/anims/expxymover.cpp" /> + <Unit filename="../src/gl/anims/logxymover.cpp" /> + <Unit filename="../src/gl/anims/tintfader.cpp" /> + <Unit filename="../src/gl/drawable.cpp" /> + <Unit filename="../src/gl/drawables/banner.cpp" /> + <Unit filename="../src/gl/drawables/console.cpp" /> + <Unit filename="../src/gl/drawables/cursor.cpp" /> + <Unit filename="../src/gl/drawables/label.cpp" /> + <Unit filename="../src/gl/drawables/pointerArrow.cpp" /> + <Unit filename="../src/gl/drawables/texturetile.cpp" /> + <Unit filename="../src/gl/font.cpp" /> + <Unit filename="../src/gl/genmenu.cpp" /> + <Unit filename="../src/gl/gl.cpp" /> + <Unit filename="../src/gl/plxcompat.cpp" /> + <Unit filename="../src/gl/texture.cpp" /> + <Unit filename="../src/gl/trigger.cpp" /> + <Unit filename="../src/gl/triggers/birth.cpp" /> + <Unit filename="../src/gl/triggers/death.cpp" /> + <Unit filename="../src/hid/eventcollector.cpp" /> + <Unit filename="../src/hid/hid.cpp" /> + <Unit filename="../src/image/image.cpp" /> + <Unit filename="../src/image/loadjpg.cpp" /> + <Unit filename="../src/image/loadpng.cpp" /> + <Unit filename="../src/math/bspline.cpp" /> + <Unit filename="../src/math/math.cpp" /> + <Unit filename="../src/math/matrix.cpp" /> + <Unit filename="../src/math/vector.cpp" /> + <Unit filename="../src/math/vector3.cpp" /> + <Unit filename="../src/net/address.cpp" /> + <Unit filename="../src/net/http/request.cpp" /> + <Unit filename="../src/net/http/response.cpp" /> + <Unit filename="../src/net/http/useragent.cpp" /> + <Unit filename="../src/net/socket.cpp" /> + <Unit filename="../src/net/tcpserversocket.cpp" /> + <Unit filename="../src/net/tcpsocket.cpp" /> + <Unit filename="../src/net/util/base64.cpp" /> + <Unit filename="../src/thread/thread.cpp" /> + <Extensions> + <code_completion /> + <envvars /> + <debugger /> + </Extensions> + </Project> +</CodeBlocks_project_file> Added: tiki/sdl/TikiSDL.workspace =================================================================== --- tiki/sdl/TikiSDL.workspace (rev 0) +++ tiki/sdl/TikiSDL.workspace 2007-08-25 02:07:26 UTC (rev 493) @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_workspace_file> + <Workspace title="Workspace"> + <Project filename="TikiSDL.cbp" active="1" /> + </Workspace> +</CodeBlocks_workspace_file> Modified: tiki/sdl/src/init_shutdown.cpp =================================================================== --- tiki/sdl/src/init_shutdown.cpp 2007-08-25 00:14:06 UTC (rev 492) +++ tiki/sdl/src/init_shutdown.cpp 2007-08-25 02:07:26 UTC (rev 493) @@ -19,55 +19,44 @@ namespace Tiki { -bool init( int argc, char **argv ) { - ALCdevice * dev; - ALCcontext *context; - if ( SDL_Init( SDL_INIT_EVERYTHING | SDL_INIT_EVENTTHREAD | SDL_INIT_NOPARACHUTE ) < 0 ) { - fprintf( stderr, "Unable to initialize SDL: %s\n", SDL_GetError() ); - return false; + bool init( int argc, char **argv ) { + ALCdevice * dev; + ALCcontext *context; + if ( SDL_Init( SDL_INIT_EVERYTHING | SDL_INIT_EVENTTHREAD | SDL_INIT_NOPARACHUTE ) < 0 ) { + fprintf( stderr, "Unable to initialize SDL: %s\n", SDL_GetError() ); + return false; + } + + dev = alcOpenDevice( "sdl" ); + if ( dev == NULL ) { + fprintf( stderr, "Unable to initialize OpenAL: %s\n", alGetString( alGetError() ) ); + } else { + context = alcCreateContext( dev, NULL ); + if ( context == NULL ) { + fprintf( stderr, "alcCreateContext returned NULL: %s\n", alGetString( alGetError() ) ); + } else { + alcMakeContextCurrent( context ); + alcProcessContext( context ); + Audio::Sound::initGlobal(); + Audio::Stream::initGlobal(); + } + } + GL::Plxcompat::plx_mat3d_init( 640, 480 ); + return Hid::init(); } - dev = alcOpenDevice( "sdl" ); - if ( dev == NULL ) { - fprintf( stderr, "Unable to initialize OpenAL: %s\n", alGetError() ); - } else { - context = alcCreateContext( dev, NULL ); - if ( context == NULL ) { - fprintf( stderr, "alcCreateContext returned NULL: %s\n", alGetError() ); - } else { - alcMakeContextCurrent( context ); - alcProcessContext( context ); - Audio::Sound::initGlobal(); - Audio::Stream::initGlobal(); - } + void shutdown() { + Hid::shutdown(); } - GL::Plxcompat::plx_mat3d_init( 640, 480 ); - return Hid::init(); -} -void shutdown() { - Hid::shutdown(); -} + void setName( const char *windowName, const char *iconName ) { + SDL_WM_SetCaption( windowName, iconName ); + } -void setName( const char *windowName, const char *iconName ) { - SDL_WM_SetCaption( windowName, iconName ); -} + namespace GL { + void showCursor( bool visible ) { + SDL_ShowCursor( visible == true ); + } + } -namespace GL { -void showCursor( bool visible ) { - SDL_ShowCursor( visible == true ); } -} - -namespace Net { - -void init() -{ -} - -void shutdown() -{ -} -} - -} Modified: tiki/sdl/src/platgl.cpp =================================================================== --- tiki/sdl/src/platgl.cpp 2007-08-25 00:14:06 UTC (rev 492) +++ tiki/sdl/src/platgl.cpp 2007-08-25 02:07:26 UTC (rev 493) @@ -20,9 +20,9 @@ using namespace Tiki; static struct timeval lastFrame = { - 0, 0 - }; -static int targetFrameRate = 60, targetW = 640, targetH = 480; + 0, 0 + }; +static int targetFrameRate = 60; static uint64 firstFrame = 0; static uint64 frameCnt = 0, totalFrameCnt = 0; @@ -33,7 +33,7 @@ if ( cur == firstFrame ) return 0.0f; - return ( float ) ( ( frameCnt * 1000000.0 ) / ( cur - firstFrame ) ); + return ( float )(( frameCnt * 1000000.0 ) / ( cur - firstFrame ) ); } void Tiki::GL::Frame::setFrameRateLimit( int rate ) { @@ -42,50 +42,50 @@ extern "C" { - void tiki_wait_if_needed() { - // Every so often we should reset the frame counters, to avoid - // having a super long term averaging effect. - if ( frameCnt >= 500 ) { - firstFrame = 0; - frameCnt = 0; - } + void tiki_wait_if_needed() { + // Every so often we should reset the frame counters, to avoid + // having a super long term averaging effect. + if ( frameCnt >= 500 ) { + firstFrame = 0; + frameCnt = 0; + } - // Update frame counters. - if ( !firstFrame ) - firstFrame = Tiki::Time::gettime(); - frameCnt++; - totalFrameCnt++; + // Update frame counters. + if ( !firstFrame ) + firstFrame = Tiki::Time::gettime(); + frameCnt++; + totalFrameCnt++; - if ( lastFrame.tv_sec == 0 ) { + if ( lastFrame.tv_sec == 0 ) { + gettimeofday( &lastFrame, NULL ); + return ; + } + + struct timeval now; + gettimeofday( &now, NULL ); + long long nowu = (( long long ) now.tv_sec ) * 1000 * 1000 + now.tv_usec; + long long lastu = (( long long ) lastFrame.tv_sec ) * 1000 * 1000 + lastFrame.tv_usec; + long long diffu = nowu - lastu; + if ( diffu < ( 1000 * 1000 / targetFrameRate ) ) { + usleep(( 1000 * 1000 / targetFrameRate ) - diffu ); + } gettimeofday( &lastFrame, NULL ); - return ; } - struct timeval now; - gettimeofday( &now, NULL ); - long long nowu = ( ( long long ) now.tv_sec ) * 1000 * 1000 + now.tv_usec; - long long lastu = ( ( long long ) lastFrame.tv_sec ) * 1000 * 1000 + lastFrame.tv_usec; - long long diffu = nowu - lastu; - if ( diffu < ( 1000 * 1000 / targetFrameRate ) ) { - usleep( ( 1000 * 1000 / targetFrameRate ) - diffu ); + void tiki_scene_begin_hook() { + tiki_wait_if_needed(); } - gettimeofday( &lastFrame, NULL ); - } - void tiki_scene_begin_hook() { - tiki_wait_if_needed(); - } + void tiki_scene_finish_hook() { + SDL_GL_SwapBuffers(); + } - void tiki_scene_finish_hook() { - SDL_GL_SwapBuffers(); - } + void tiki_scene_begin_opaque_hook() {} - void tiki_scene_begin_opaque_hook() {} + void tiki_scene_finish_opaque_hook() {} - void tiki_scene_finish_opaque_hook() {} + void tiki_scene_begin_trans_hook() {} - void tiki_scene_begin_trans_hook() {} + void tiki_scene_finish_trans_hook() {} - void tiki_scene_finish_trans_hook() {} - -} + } Modified: tiki/sdl/src/plathid.cpp =================================================================== --- tiki/sdl/src/plathid.cpp 2007-08-25 00:14:06 UTC (rev 492) +++ tiki/sdl/src/plathid.cpp 2007-08-25 02:07:26 UTC (rev 493) @@ -8,46 +8,46 @@ using namespace Tiki::Hid; class KbDevice : public Device { -public: - KbDevice() { } - virtual ~KbDevice() { } + public: + KbDevice() { } + virtual ~KbDevice() { } - virtual Type getType() const { - return TypeKeyboard; - } - virtual string getName() const { - return "SDL Keyboard"; - } -}; + virtual Type getType() const { + return TypeKeyboard; + } + virtual string getName() const { + return "SDL Keyboard"; + } + }; class MouseDevice : public Device { -public: - MouseDevice() { } - virtual ~MouseDevice() { } + public: + MouseDevice() { } + virtual ~MouseDevice() { } - virtual Type getType() const { - return TypeMouse; - } - virtual string getName() const { - return "SDL Mouse"; - } + virtual Type getType() const { + return TypeMouse; + } + virtual string getName() const { + return "SDL Mouse"; + } - void moveXY( int x, int y ) { - abs_x += x; - abs_y += y; - } - void setXY( int x, int y ) { - abs_x = x; - abs_y = y; - } - void getXY( int *x, int *y ) { - *x = abs_x; - *y = abs_y; - } + void moveXY( int x, int y ) { + abs_x += x; + abs_y += y; + } + void setXY( int x, int y ) { + abs_x = x; + abs_y = y; + } + void getXY( int *x, int *y ) { + *x = abs_x; + *y = abs_y; + } -protected: - int abs_x, abs_y; -}; + protected: + int abs_x, abs_y; + }; static RefPtr<KbDevice> SDLkb; static RefPtr<MouseDevice> SDLMouse; @@ -75,9 +75,9 @@ sendEvent( evtMouse ); if ( SDL_SetVideoMode( 640, 480, 16, SDL_OPENGL ) == NULL ) { - fprintf( stderr, "Unable to Create OpenGL Window: %s\n", SDL_GetError() ); - return false; - } + fprintf( stderr, "Unable to Create OpenGL Window: %s\n", SDL_GetError() ); + return false; + } SDL_WarpMouse( 0, 0 ); @@ -91,12 +91,12 @@ glEnable( GL_BLEND ); glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); glShadeModel( GL_SMOOTH ); // Enable Smooth Shading - glClearColor( 0.0f, 0.0f, 0.0f, 0.0f ); // Black Background + glClearColor( 0.0f, 0.0f, 0.0f, 0.0f ); // Black Background glClearDepth( 1.0f ); // Depth Buffer Setup glEnable( GL_DEPTH_TEST ); // Enables Depth Testing glDepthFunc( GL_LEQUAL ); // The Type Of Depth Testing To Do - glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST ); // Really Nice Perspective Calculations + glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST ); // Really Nice Perspective Calculations return true; } @@ -120,10 +120,10 @@ } extern "C" void TikiRecvQuit() { - done = 1; - Event evt( Event::EvtQuit ); - sendEvent( evt ); -} + done = 1; + Event evt( Event::EvtQuit ); + sendEvent( evt ); + } int HandleMouse( void *unused ) { SDL_Event events[ 10 ]; @@ -133,95 +133,95 @@ /* Handle mouse events here */ mask = ( SDL_MOUSEMOTIONMASK | SDL_MOUSEBUTTONDOWNMASK | SDL_MOUSEBUTTONUPMASK ); while ( ! done ) { - found = SDL_PeepEvents( events, 10, SDL_GETEVENT, mask ); - for ( i = 0; i < found; ++i ) { - switch ( events[ i ].type ) { - case SDL_MOUSEBUTTONDOWN: { - Event evt( Event::EvtBtnPress ); - evt.port = 0; - evt.dev = SDLMouse; - evt.btn = Event::MouseFirst + events[ i ].button.button - 1; - SDLMouse->getXY( &evt.x, &evt.y ); - sendEvent( evt ); + found = SDL_PeepEvents( events, 10, SDL_GETEVENT, mask ); + for ( i = 0; i < found; ++i ) { + switch ( events[ i ].type ) { + case SDL_MOUSEBUTTONDOWN: { + Event evt( Event::EvtBtnPress ); + evt.port = 0; + evt.dev = SDLMouse; + evt.btn = Event::MouseFirst + events[ i ].button.button - 1; + SDLMouse->getXY( &evt.x, &evt.y ); + sendEvent( evt ); + } + break; + case SDL_MOUSEBUTTONUP: { + Event evt( Event::EvtBtnRelease ); + evt.port = 0; + evt.dev = SDLMouse; + evt.btn = Event::MouseFirst + events[ i ].button.button - 1; + SDLMouse->getXY( &evt.x, &evt.y ); + sendEvent( evt ); + } + break; + case SDL_MOUSEMOTION: { + SDLMouse->moveXY( events[ i ].motion.xrel, events[ i ].motion.yrel ); + Event evt( Event::EvtMouseMove ); + evt.port = 0; + evt.dev = SDLMouse; + SDLMouse->getXY( &evt.x, &evt.y ); + sendEvent( evt ); + } + break; + } } - break; - case SDL_MOUSEBUTTONUP: { - Event evt( Event::EvtBtnRelease ); - evt.port = 0; - evt.dev = SDLMouse; - evt.btn = Event::MouseFirst + events[ i ].button.button - 1; - SDLMouse->getXY( &evt.x, &evt.y ); - sendEvent( evt ); - } - break; - case SDL_MOUSEMOTION: { - SDLMouse->moveXY( events[ i ].motion.xrel, events[ i ].motion.yrel ); - Event evt( Event::EvtMouseMove ); - evt.port = 0; - evt.dev = SDLMouse; - SDLMouse->getXY( &evt.x, &evt.y ); - sendEvent( evt ); - } - break; - } + /* Give up some CPU to allow events to arrive */ + SDL_Delay( 20 ); } - /* Give up some CPU to allow events to arrive */ - SDL_Delay( 20 ); - } return ( 0 ); } static int translateSym( SDLKey key ) { switch ( key ) { - case SDLK_UP: - return Event::KeyUp; - case SDLK_DOWN: - return Event::KeyDown; - case SDLK_LEFT: - return Event::KeyLeft; - case SDLK_RIGHT: - return Event::KeyRight; - case SDLK_INSERT: - return Event::KeyInsert; - case SDLK_DELETE: - return Event::KeyDelete; - case SDLK_HOME: - return Event::KeyHome; - case SDLK_END: - return Event::KeyEnd; - case SDLK_PAGEUP: - return Event::KeyPgup; - case SDLK_PAGEDOWN: - return Event::KeyPgdn; - case SDLK_ESCAPE: - return Event::KeyEsc; - case SDLK_F1: - return Event::KeyF1; - case SDLK_F2: - return Event::KeyF2; - case SDLK_F3: - return Event::KeyF3; - case SDLK_F4: - return Event::KeyF4; - case SDLK_F5: - return Event::KeyF5; - case SDLK_F6: - return Event::KeyF6; - case SDLK_F7: - return Event::KeyF7; - case SDLK_F8: - return Event::KeyF8; - case SDLK_F9: - return Event::KeyF9; - case SDLK_F10: - return Event::KeyF10; - case SDLK_F11: - return Event::KeyF11; - case SDLK_F12: - return Event::KeyF12; - default: - return key; - } + case SDLK_UP: + return Event::KeyUp; + case SDLK_DOWN: + return Event::KeyDown; + case SDLK_LEFT: + return Event::KeyLeft; + case SDLK_RIGHT: + return Event::KeyRight; + case SDLK_INSERT: + return Event::KeyInsert; + case SDLK_DELETE: + return Event::KeyDelete; + case SDLK_HOME: + return Event::KeyHome; + case SDLK_END: + return Event::KeyEnd; + case SDLK_PAGEUP: + return Event::KeyPgup; + case SDLK_PAGEDOWN: + return Event::KeyPgdn; + case SDLK_ESCAPE: + return Event::KeyEsc; + case SDLK_F1: + return Event::KeyF1; + case SDLK_F2: + return Event::KeyF2; + case SDLK_F3: + return Event::KeyF3; + case SDLK_F4: + return Event::KeyF4; + case SDLK_F5: + return Event::KeyF5; + case SDLK_F6: + return Event::KeyF6; + case SDLK_F7: + return Event::KeyF7; + case SDLK_F8: + return Event::KeyF8; + case SDLK_F9: + return Event::KeyF9; + case SDLK_F10: + return Event::KeyF10; + case SDLK_F11: + return Event::KeyF11; + case SDLK_F12: + return Event::KeyF12; + default: + return key; + } return key; } @@ -238,53 +238,53 @@ /* Handle mouse events here */ mask = ( SDL_KEYDOWNMASK | SDL_KEYUPMASK ); while ( ! done ) { - found = SDL_PeepEvents( events, 10, SDL_GETEVENT, mask ); - for ( i = 0; i < found; ++i ) { - if ( events[ i ].type == SDL_KEYDOWN ) { - mod = 0; + found = SDL_PeepEvents( events, 10, SDL_GETEVENT, mask ); + for ( i = 0; i < found; ++i ) { + if ( events[ i ].type == SDL_KEYDOWN ) { + mod = 0; - if ( events[ i ].key.keysym.mod & KMOD_SHIFT ) - mod |= Event::KeyShift; - if ( events[ i ].key.keysym.mod & KMOD_CTRL ) - mod |= Event::KeyControl; - if ( events[ i ].key.keysym.mod & KMOD_ALT ) - mod |= Event::KeyAlt; + if ( events[ i ].key.keysym.mod & KMOD_SHIFT ) + mod |= Event::KeyShift; + if ( events[ i ].key.keysym.mod & KMOD_CTRL ) + mod |= Event::KeyControl; + if ( events[ i ].key.keysym.mod & KMOD_ALT ) + mod |= Event::KeyAlt; - /* We want to toggle visibility on buttonpress */ + /* We want to toggle visibility on buttonpress */ - //Only keypress, not keydown, should repeat - if ( !( lastPressed.sym == events[ i ].key.keysym.sym && lastPressed.mod == events[ i ].key.keysym.mod ) ) { - Event evt( Event::EvtKeyDown ); - evt.dev = SDLkb; - evt.key = translateSym( events[ i ].key.keysym.sym ); - evt.mod = mod; - sendEvent( evt ); + //Only keypress, not keydown, should repeat + if ( !( lastPressed.sym == events[ i ].key.keysym.sym && lastPressed.mod == events[ i ].key.keysym.mod ) ) { + Event evt( Event::EvtKeyDown ); + evt.dev = SDLkb; + evt.key = translateSym( events[ i ].key.keysym.sym ); + evt.mod = mod; + sendEvent( evt ); - lastPressed.sym = events[ i ].key.keysym.sym; - lastPressed.mod = events[ i ].key.keysym.mod; - } + lastPressed.sym = events[ i ].key.keysym.sym; + lastPressed.mod = events[ i ].key.keysym.mod; + } - Event evtPress( Event::EvtKeypress ); - evtPress.dev = SDLkb; - evtPress.key = translateSym( events[ i ].key.keysym.sym ); - evtPress.mod = mod; - sendEvent( evtPress ); - //Debug::printf("HID:KB: KEYDOWN: %d\n", evt.key); - } else { - Event evt( Event::EvtKeyUp ); - evt.dev = SDLkb; - evt.key = translateSym( events[ i ].key.keysym.sym ); - evt.mod = mod; - sendEvent( evt ); - //Debug::printf("HID:KB: KEYUP: %d\n", evt.key); + Event evtPress( Event::EvtKeypress ); + evtPress.dev = SDLkb; + evtPress.key = translateSym( events[ i ].key.keysym.sym ); + evtPress.mod = mod; + sendEvent( evtPress ); + //Debug::printf("HID:KB: KEYDOWN: %d\n", evt.key); + } else { + Event evt( Event::EvtKeyUp ); + evt.dev = SDLkb; + evt.key = translateSym( events[ i ].key.keysym.sym ); + evt.mod = mod; + sendEvent( evt ); + //Debug::printf("HID:KB: KEYUP: %d\n", evt.key); - lastPressed.sym = ( SDLKey ) 0; - lastPressed.mod = ( SDLMod ) 0; - } + lastPressed.sym = ( SDLKey ) 0; + lastPressed.mod = ( SDLMod ) 0; + } + } + /* Give up some CPU to allow events to arrive */ + SDL_Delay( 20 ); } - /* Give up some CPU to allow events to arrive */ - SDL_Delay( 20 ); - } return ( 0 ); } @@ -296,19 +296,19 @@ /* Handle mouse events here */ mask = ( SDL_ACTIVEEVENTMASK | SDL_QUITMASK | SDL_SYSWMEVENTMASK ); while ( ! done ) { - found = SDL_PeepEvents( events, 10, SDL_GETEVENT, mask ); - for ( i = 0; i < found; ++i ) { - switch ( events[ i ].type ) { - /* We want to toggle visibility on buttonpress */ - case SDL_QUIT: - done = 1; - TikiRecvQuit(); - break; - } + found = SDL_PeepEvents( events, 10, SDL_GETEVENT, mask ); + for ( i = 0; i < found; ++i ) { + switch ( events[ i ].type ) { + /* We want to toggle visibility on buttonpress */ + case SDL_QUIT: + done = 1; + TikiRecvQuit(); + break; + } + } + /* Give up some CPU to allow events to arrive */ + SDL_Delay( 20 ); } - /* Give up some CPU to allow events to arrive */ - SDL_Delay( 20 ); - } return ( 0 ); } Modified: tiki/sdl/src/platnet.cpp =================================================================== --- tiki/sdl/src/platnet.cpp 2007-08-25 00:14:06 UTC (rev 492) +++ tiki/sdl/src/platnet.cpp 2007-08-25 02:07:26 UTC (rev 493) @@ -11,20 +11,21 @@ namespace Tiki { -namespace Net { + namespace Net { -void init() { -} + void init() { + } -void shutdown() { -} + void shutdown() { + } -bool connect() { -} + bool connect() { + return true; + } -void disconnect() { -} + void disconnect() { + } -} // namespace Net + } // namespace Net } // namespace Tiki Modified: tiki/sdl/src/platthread.cpp =================================================================== --- tiki/sdl/src/platthread.cpp 2007-08-25 00:14:06 UTC (rev 492) +++ tiki/sdl/src/platthread.cpp 2007-08-25 02:07:26 UTC (rev 493) @@ -19,7 +19,7 @@ using Tiki::Thread::mutex_t; using Tiki::Thread::cond_t; -bool Thread::create( pthread_t * out, void * ( *func ) ( void * ), void * param ) { +bool Thread::create( pthread_t * out, void * ( *func )( void * ), void * param ) { return pthread_create( out, NULL, func, param ) >= 0; } @@ -43,13 +43,13 @@ bool Thread::mutex_create( mutex_t * out ) { pthread_mutexattr_t attrs; if ( pthread_mutexattr_init( &attrs ) < 0 ) { - assert( false ); - return false; - } + assert( false ); + return false; + } if ( pthread_mutexattr_settype( &attrs, PTHREAD_MUTEX_RECURSIVE ) < 0 ) { - assert( false ); - return false; - } + assert( false ); + return false; + } int rv = pthread_mutex_init( out, &attrs ) >= 0; pthread_mutexattr_destroy( &attrs ); return rv; Modified: tiki/sdl/src/tikitime.cpp =================================================================== --- tiki/sdl/src/tikitime.cpp 2007-08-25 00:14:06 UTC (rev 492) +++ tiki/sdl/src/tikitime.cpp 2007-08-25 02:07:26 UTC (rev 493) @@ -24,7 +24,7 @@ } void Time::sleep( uint64 us ) { - usleep( ( unsigned int ) us ); + usleep(( unsigned int ) us ); } Modified: tiki/src/gl/font.cpp =================================================================== --- tiki/src/gl/font.cpp 2007-08-25 00:14:06 UTC (rev 492) +++ tiki/src/gl/font.cpp 2007-08-25 02:07:26 UTC (rev 493) @@ -39,9 +39,9 @@ /* Implementation notes... - + TXF Header (thanks to PLIB and gentexfont) - + BYTES WHAT ----------------------------- 4 0xff + 'txf' @@ -52,9 +52,9 @@ 4 maximum font ascent 4 maximum font descent 4 glyph count - + TXF Per-Glyph Data - + BYTES WHAT ----------------------------- 2 character index @@ -66,19 +66,17 @@ 1 char for padding 2 texture x for left of char 2 texture y for bottom of char - + We'll mimic PLIB here as far as handling the fonts: each u/v coord is offset by half a pixel (which provides a bit of an anti-aliasing effect) and all character sizes are scaled to 1 pixel high using the maximum font ascent. We then multiply this by the point size to get the real quad size. Additionally, we add to the X coordinate of the top of the glyph to achieve an oblique effect (it's not a proper italic...) - + */ -#if TIKI_PLAT==TIKI_WIN32 -#pragma pack(push,1) -#endif +PACKED_STRUCT_BEGIN typedef struct { uint8 magic[ 4 ] PACKED_STRUCT_MEMBER; uint32 endian PACKED_STRUCT_MEMBER; @@ -90,7 +88,9 @@ uint32 glyph_cnt PACKED_STRUCT_MEMBER; } txfhdr_t; +PACKED_STRUCT_END +PACKED_STRUCT_BEGIN typedef struct { int16 idx PACKED_STRUCT_MEMBER; int8 w PACKED_STRUCT_MEMBER; @@ -103,9 +103,7 @@ uint16 y PACKED_STRUCT_MEMBER; } txfglyph_t; -#if TIKI_PLAT==TIKI_WIN32 -#pragma pack(pop) -#endif +PACKED_STRUCT_END // These functions are used if the host and font endianness // do *not* match. Modified: tiki/src/net/http/request.cpp =================================================================== --- tiki/src/net/http/request.cpp 2007-08-25 00:14:06 UTC (rev 492) +++ tiki/src/net/http/request.cpp 2007-08-25 02:07:26 UTC (rev 493) @@ -35,7 +35,8 @@ if(!param.compare("User-Agent")) { Tiki::Debug::printf("Setting User-Agent via Request::setHeaderParam() is not allowed. Use HttpUserAgent::setUserAgentName() instead.\n"); return; - } + } + removeHeaderParam(param); m_params.insert(std::make_pair(param, value)); } @@ -59,16 +60,19 @@ return params; } -void Request::addContentPart(Buffer *input, std::string name) { - if(!name.empty()) { - m_parts.insert(std::make_pair(name, input)); +void Request::addContentPart(Buffer *input, std::string name) { + std::string partName = DEFAULT_CONTENT_PART; + if(!name.empty()) { + partName = name; } else if(!input->getFileName().empty()) { - m_parts.insert(std::make_pair(input->getFileName(), input)); - } - else { - m_parts.insert(std::make_pair(DEFAULT_CONTENT_PART, input)); - } + partName = input->getFileName(); + } + + if(m_parts.find(partName) != m_parts.end()) { + m_parts.erase(m_parts.find(partName)); + } + m_parts.insert(std::make_pair(partName, input)); } Buffer *Request::getContentPart(std::string name) const { Added: tiki/src/net/util/base64.cpp =================================================================== --- tiki/src/net/util/base64.cpp (rev 0) +++ tiki/src/net/util/base64.cpp 2007-08-25 02:07:26 UTC (rev 493) @@ -0,0 +1,235 @@ +/* + Tiki + + Base64.cpp + + Copyright (C)2007 Atani Software +*/ + +#include "pch.h" +#include "Tiki/tiki.h" +#include "Tiki/net.h" + +#include "Tiki/net/util/base64.h" + +#include <stdlib.h> +#include <math.h> +#include <memory.h> + +namespace Tiki { + + namespace Net { + + namespace Util { + using Tiki::Net::Buffer; + + uint8 Base64::BASE64_ALPHABET[] = { + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', // 0 - 9 + 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', // 10 - 19 + 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', // 20 - 29 + 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', // 30 - 39 + 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', // 40 - 49 + 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', // 50 - 59 + '8', '9', '+', '/' // 60 - 63 + }; + + uint8 Base64::BASE64_DEALPHABET[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 9 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 10 - 19 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 20 - 29 + ... [truncated message content] |
From: <c99...@us...> - 2007-08-25 00:14:10
|
Revision: 492 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=492&view=rev Author: c99koder Date: 2007-08-24 17:14:06 -0700 (Fri, 24 Aug 2007) Log Message: ----------- Tiki: net: Fix HTTP POST size calculation and header format Modified Paths: -------------- tiki/src/net/http/useragent.cpp Modified: tiki/src/net/http/useragent.cpp =================================================================== --- tiki/src/net/http/useragent.cpp 2007-08-24 02:55:09 UTC (rev 491) +++ tiki/src/net/http/useragent.cpp 2007-08-25 00:14:06 UTC (rev 492) @@ -152,21 +152,21 @@ if(buf->getUsedDataLen() > 0) { std::stringstream temp; temp << "--" << req->getBoundaryMarker() << "\r\n"; - temp << "Content-Disposition: form-data: name=\""; + temp << "Content-Disposition: form-data; name=\""; if(!buf->getFieldName().empty()) { temp << buf->getFieldName(); } else { temp << "File"; } - temp << "\"; filename=\"" << buf->getFileNameShort() << "\"\r\nContent-Type: " << buf->getContentType() << "\r\n"; + temp << "\"; filename=\"" << buf->getFileNameShort() << "\"\r\nContent-Type: " << buf->getContentType() << "\r\n\r\n"; std::string headerText = temp.str(); //Tiki::Debug::printf("CONTENT_HEADER:\n%s", headerText.c_str()); socket->send(new Buffer(headerText.length(), (uint8 *)headerText.c_str())); socket->send(buf); } } - std::string footerText = "--"; + std::string footerText = "\r\n--"; footerText.append(req->getBoundaryMarker()); footerText.append("--\r\n"); //Tiki::Debug::printf("CONTENT_FOOTER:\n%s", footerText.c_str()); @@ -243,22 +243,23 @@ std::list<std::string> content = request->getContentPartNames(); if(!mode.compare("POST") && (content.size() > 1 || request->isForcedMultiPartUpload())) { - uint64 totalSize = 8; // add 8 to account for "--<boundary>--\r\n" + uint64 totalSize = 8 + request->getBoundaryMarker().length(); // account for the ending boundary for(std::list<std::string>::iterator iter = content.begin(); iter != content.end(); ++iter) { Buffer *buf = request->getContentPart(*iter); if(buf->getUsedDataLen() > 0) { + totalSize += request->getBoundaryMarker().length() + 4; totalSize += buf->getUsedDataLen(); std::stringstream temp; - temp << "Content-Disposition: form-data: name=\""; + temp << "Content-Disposition: form-data; name=\""; if(!buf->getFieldName().empty()) { temp << buf->getFieldName(); } else { temp << "File"; } - temp << "\"; filename=\"" << buf->getFileNameShort() << "\"\r\nContent-Type: " << buf->getContentType() << "\r\n"; + temp << "\"; filename=\"" << buf->getFileNameShort() << "\"\r\nContent-Type: " << buf->getContentType() << "\r\n\r\n"; // add section header size totalSize += temp.str().length(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-08-24 02:55:11
|
Revision: 491 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=491&view=rev Author: atani Date: 2007-08-23 19:55:09 -0700 (Thu, 23 Aug 2007) Log Message: ----------- more fixes to uploading files via POST. Added Request.setForcedMultiPartUpload() commented many Debug::printf lines Modified Paths: -------------- tiki/include/Tiki/net/buffer.h tiki/include/Tiki/net/http/request.h tiki/src/net/http/request.cpp tiki/src/net/http/useragent.cpp tiki/src/net/tcpsocket.cpp Modified: tiki/include/Tiki/net/buffer.h =================================================================== --- tiki/include/Tiki/net/buffer.h 2007-08-23 23:28:54 UTC (rev 490) +++ tiki/include/Tiki/net/buffer.h 2007-08-24 02:55:09 UTC (rev 491) @@ -8,7 +8,7 @@ #ifndef __TIKI_NET_BUFFER_H #define __TIKI_NET_BUFFER_H -#include "Tiki/object.h" +#include "Tiki/refcnt.h" #include "Tiki/file.h" #include <fstream> @@ -19,13 +19,15 @@ using Tiki::File; -class Buffer : public Object +class Buffer : public RefCnt { public: Buffer(size_t len, std::string contentType = "application/octet-stream") : m_contentType(contentType) { - m_data = new uint8[len]; - memset(m_data, 0, len); + if(len > 0) { + m_data = new uint8[len]; + memset(m_data, 0, len); + } m_dataLen = len; m_usedDataLen = 0; } @@ -64,9 +66,11 @@ file.write(m_data, static_cast<int>(m_usedDataLen)); } - void append(RefPtr<Buffer> buf) { + void append(Buffer *buf) { uint8 * newbuf = new uint8[ m_dataLen + buf->getDataLen() ]; - memcpy(newbuf, m_data, m_usedDataLen); + if(m_data != NULL) { + memcpy(newbuf, m_data, m_usedDataLen); + } memcpy(newbuf + m_usedDataLen, buf->getData(), buf->getUsedDataLen()); delete [] m_data; m_data = newbuf; @@ -75,12 +79,16 @@ } void reset() { - memset(m_data, 0, m_dataLen); + if(m_data != NULL) { + memset(m_data, 0, m_dataLen); + } m_usedDataLen = 0; } uint8 *getData() const { - m_data[m_usedDataLen] = '\0'; + if(m_usedDataLen > 0) { + m_data[m_usedDataLen] = '\0'; + } return m_data; } Modified: tiki/include/Tiki/net/http/request.h =================================================================== --- tiki/include/Tiki/net/http/request.h 2007-08-23 23:28:54 UTC (rev 490) +++ tiki/include/Tiki/net/http/request.h 2007-08-24 02:55:09 UTC (rev 491) @@ -56,6 +56,14 @@ return m_boundaryMarker; } + void setForcedMultiPartUpload(bool mode) { + m_forcedMultiPart = mode; + } + + bool isForcedMultiPartUpload() const { + return m_forcedMultiPart; + } + private: std::string m_url; std::string m_boundaryMarker; @@ -63,6 +71,7 @@ typedef std::map<std::string, RefPtr<Buffer> > StringBufferMap; StringStringMap m_params; StringBufferMap m_parts; + bool m_forcedMultiPart; }; }; // namespace Http Modified: tiki/src/net/http/request.cpp =================================================================== --- tiki/src/net/http/request.cpp 2007-08-23 23:28:54 UTC (rev 490) +++ tiki/src/net/http/request.cpp 2007-08-24 02:55:09 UTC (rev 491) @@ -21,8 +21,8 @@ Request::Request() { setHeaderParam("Connection", "close"); - m_boundaryMarker = "-----------------------09f911019d74e35bd84156c5635688c0"; - + m_boundaryMarker = "--09f911019d74e35bd84156c5635688c0"; + m_forcedMultiPart = false; } void Request::removeHeaderParam(std::string param) { Modified: tiki/src/net/http/useragent.cpp =================================================================== --- tiki/src/net/http/useragent.cpp 2007-08-23 23:28:54 UTC (rev 490) +++ tiki/src/net/http/useragent.cpp 2007-08-24 02:55:09 UTC (rev 491) @@ -24,7 +24,7 @@ #define READ_ONE_LINE(res, socket) \ { \ - RefPtr<Buffer> recvBuf = new Buffer(1); \ + Buffer *recvBuf = new Buffer(1); \ char tbuf[2]; \ res = ""; \ while(socket->isOpen()) { \ @@ -41,6 +41,7 @@ } \ } \ } \ + delete recvBuf; \ } HttpUserAgent::HttpUserAgent() { @@ -73,9 +74,9 @@ std::string requestText; buildRequest(hostname, resource, port, "GET", req, requestText); - Tiki::Debug::printf("Request:\n%s", requestText.c_str()); + //Tiki::Debug::printf("Request:\n%s", requestText.c_str()); - RefPtr<TCPSocket> socket; + TCPSocket *socket; if(m_proxyHost.empty()) { socket = new TCPSocket(new Address(hostname, port)); } @@ -86,24 +87,20 @@ socket->setNonBlocking(false); socket->open(); - if(socket->isOpen()) { - Tiki::Debug::printf("Sending request...\n"); - } - else { + if(!socket->isOpen()) { Tiki::Debug::printf("connect failed\n"); response->setResultCode(504); return response; } - RefPtr<Buffer> buf = new Buffer(2048); - buf->setData((uint8 *)requestText.c_str(), requestText.length()); - socket->send(buf); + Tiki::Debug::printf("Sending request...\n"); + socket->send(new Buffer(requestText.length(), (uint8 *)requestText.c_str())); readResponse(response, socket); socket->close(); - //delete socket; + delete socket; return response; } @@ -121,9 +118,9 @@ std::string requestText; buildRequest(hostname, resource, port, "POST", req, requestText); - Tiki::Debug::printf("Request:\n%s", requestText.c_str()); + //Tiki::Debug::printf("Request:\n%s", requestText.c_str()); - RefPtr<TCPSocket> socket; + TCPSocket *socket; if(m_proxyHost.empty()) { socket = new TCPSocket(new Address(hostname, port)); } @@ -134,61 +131,59 @@ socket->setNonBlocking(false); socket->open(); - if(socket->isOpen()) { - Tiki::Debug::printf("Sending request...\n"); - } - else { + if(!socket->isOpen()) { Tiki::Debug::printf("connect failed\n"); response->setResultCode(504); return response; } - RefPtr<Buffer> buf = new Buffer(2048); - buf->setData((uint8 *)requestText.c_str(), requestText.length()); - socket->send(buf); + Tiki::Debug::printf("Sending request...\n"); + socket->send(new Buffer(requestText.length(), (uint8 *)requestText.c_str())); std::list<std::string> content = req->getContentPartNames(); - if(content.size() > 1) { + if(content.size() > 1 || req->isForcedMultiPartUpload()) { std::string status = ""; READ_ONE_LINE(status, socket) for(std::list<std::string>::iterator iter = content.begin(); iter != content.end(); ++iter) { - RefPtr<Buffer> buf = req->getContentPart(*iter); - std::stringstream temp; - temp << req->getBoundaryMarker() << "\r\n"; - temp << "Content-Disposition: form-data: name=\""; - if(!buf->getFieldName().empty()) { - temp << buf->getFieldName(); + Buffer *buf = req->getContentPart(*iter); + if(buf->getUsedDataLen() > 0) { + std::stringstream temp; + temp << "--" << req->getBoundaryMarker() << "\r\n"; + temp << "Content-Disposition: form-data: name=\""; + if(!buf->getFieldName().empty()) { + temp << buf->getFieldName(); + } + else { + temp << "File"; + } + temp << "\"; filename=\"" << buf->getFileNameShort() << "\"\r\nContent-Type: " << buf->getContentType() << "\r\n"; + std::string headerText = temp.str(); + //Tiki::Debug::printf("CONTENT_HEADER:\n%s", headerText.c_str()); + socket->send(new Buffer(headerText.length(), (uint8 *)headerText.c_str())); + socket->send(buf); } - else { - temp << "File"; - } - temp << "\"; filename=\"" << buf->getFileNameShort() << "\"\r\nContent-Type: " << buf->getContentType() << "\r\n"; - RefPtr<Buffer> headerBuf = new Buffer(2048); - std::string headerText = temp.str(); - headerBuf->setData((uint8 *)headerText.c_str(), headerText.length()); - socket->send(headerBuf); - socket->send(buf); } std::string footerText = "--"; footerText.append(req->getBoundaryMarker()); footerText.append("--\r\n"); - RefPtr<Buffer> footerBuf = new Buffer(2048); - footerBuf->setData((uint8 *)footerText.c_str(), footerText.length()); - socket->send(footerBuf); + //Tiki::Debug::printf("CONTENT_FOOTER:\n%s", footerText.c_str()); + socket->send(new Buffer(footerText.length(), (uint8 *)footerText.c_str())); } else if(content.size() == 1) { - RefPtr<Buffer> buf = req->getContentPart(*content.begin()); - socket->send(buf); + Buffer *buf = req->getContentPart(*content.begin()); + if(buf->getUsedDataLen() > 0) { + socket->send(buf); + } } readResponse(response, socket); socket->close(); - //delete socket; + delete socket; return response; } @@ -247,25 +242,27 @@ } std::list<std::string> content = request->getContentPartNames(); - if(!mode.compare("POST") && content.size() > 1) { - uint64 totalSize = request->getBoundaryMarker().length() + 6; // add 6 to account for "--<boundary>--\r\n" + if(!mode.compare("POST") && (content.size() > 1 || request->isForcedMultiPartUpload())) { + uint64 totalSize = 8; // add 8 to account for "--<boundary>--\r\n" for(std::list<std::string>::iterator iter = content.begin(); iter != content.end(); ++iter) { - RefPtr<Buffer> buf = request->getContentPart(*iter); - totalSize += buf->getUsedDataLen(); - std::stringstream temp; - temp << "Content-Disposition: form-data: name=\""; - if(!buf->getFieldName().empty()) { - temp << buf->getFieldName(); + Buffer *buf = request->getContentPart(*iter); + if(buf->getUsedDataLen() > 0) { + totalSize += buf->getUsedDataLen(); + std::stringstream temp; + temp << "Content-Disposition: form-data: name=\""; + if(!buf->getFieldName().empty()) { + temp << buf->getFieldName(); + } + else { + temp << "File"; + } + temp << "\"; filename=\"" << buf->getFileNameShort() << "\"\r\nContent-Type: " << buf->getContentType() << "\r\n"; + + // add section header size + totalSize += temp.str().length(); } - else { - temp << "File"; - } - temp << "\"; filename=\"" << buf->getFileNameShort() << "\"\r\nContent-Type: " << buf->getContentType() << "\r\n"; - - // add section header size - totalSize += temp.str().length(); } req << "Content-Length: " << totalSize << "\r\n"; @@ -273,7 +270,7 @@ req << "Content-Type: multipart/form-data; boundary=" << request->getBoundaryMarker() << "\r\n"; } else if(!mode.compare("POST") && content.size() == 1) { - RefPtr<Buffer> buf = request->getContentPart(*content.begin()); + Buffer *buf = request->getContentPart(*content.begin()); req << "Content-Type: " << buf->getContentType() << "\r\n"; req << "Content-Length: " << buf->getUsedDataLen() << "\r\n"; } @@ -344,21 +341,23 @@ //Tiki::Debug::printf("chunk size: %d [%s]\n", sizeDecoded, size.c_str()); if(sizeDecoded > 0) { - RefPtr<Buffer> chunkBuf = new Buffer(sizeDecoded); + Buffer *chunkBuf = new Buffer(sizeDecoded); socket->recv(chunkBuf); if(chunkBuf->getUsedDataLen() < sizeDecoded) { //Tiki::Debug::printf("Buffer underflow\n"); size_t needed = sizeDecoded - chunkBuf->getUsedDataLen(); while(needed > 0) { - RefPtr<Buffer> chunkBuf2 = new Buffer(needed); + Buffer *chunkBuf2 = new Buffer(needed); socket->recv(chunkBuf2); chunkBuf->append(chunkBuf2); needed -= chunkBuf2->getUsedDataLen(); + delete chunkBuf2; } } totalSize += chunkBuf->getUsedDataLen(); fullBuf->append(chunkBuf); + delete chunkBuf; } } while(sizeDecoded > 0); //Tiki::Debug::printf("total size: %d %x\n", totalSize, totalSize); @@ -368,22 +367,30 @@ size_t sizeDecoded = atoi(response->getHeaderParam("Content-Length").c_str()); //Tiki::Debug::printf("decodedSize: %d\n", sizeDecoded); - RefPtr<Buffer> chunkBuf = new Buffer(sizeDecoded); + Buffer *chunkBuf = new Buffer(sizeDecoded); socket->recv(chunkBuf); if(chunkBuf->getUsedDataLen() < sizeDecoded) { sizeDecoded -= chunkBuf->getUsedDataLen(); while(sizeDecoded > 0) { - RefPtr<Buffer> chunkBuf2 = new Buffer(sizeDecoded); + Buffer *chunkBuf2 = new Buffer(sizeDecoded); socket->recv(chunkBuf2); chunkBuf->append(chunkBuf2); sizeDecoded -= chunkBuf2->getUsedDataLen(); + delete chunkBuf2; } } fullBuf->append(chunkBuf); + delete chunkBuf; } else { Tiki::Debug::printf("Encoding is unknown\n"); + Tiki::Debug::printf("Dumping headers\nHEADER NAME -> VALUE"); + for(std::list<std::string>::iterator iter = response->getHeaderParamNames().begin(); + iter != response->getHeaderParamNames().end(); + ++iter) { + Tiki::Debug::printf("%s -> %s\n", (*iter).c_str(), response->getHeaderParam(*iter).c_str()); + } } response->addContentPart(fullBuf, DEFAULT_CONTENT_PART); } Modified: tiki/src/net/tcpsocket.cpp =================================================================== --- tiki/src/net/tcpsocket.cpp 2007-08-23 23:28:54 UTC (rev 490) +++ tiki/src/net/tcpsocket.cpp 2007-08-24 02:55:09 UTC (rev 491) @@ -24,10 +24,10 @@ int len; do { - Tiki::Debug::printf("sending %d bytes\n", dataLen); + //Tiki::Debug::printf("sending %d bytes\n", dataLen); len = ::send(m_socket, (const char *)data, (int)dataLen, 0); if(len > 0) { - Tiki::Debug::printf("sent %d bytes\n", len); + //Tiki::Debug::printf("sent %d bytes\n", len); dataLen -= len; data += len; } @@ -71,7 +71,7 @@ int yes = 1; #if TIKI_PLAT != TIKI_NDS - Tiki::Debug::printf("setting TCP_NODELAY\n"); + //Tiki::Debug::printf("setting TCP_NODELAY\n"); setsockopt(m_socket, IPPROTO_TCP, TCP_NODELAY, (char *)&yes, sizeof(yes)); #endif @@ -91,13 +91,13 @@ sock_addr.sin_family = AF_INET; sock_addr.sin_addr.s_addr = getPeerAddress()->getIPAddress(); sock_addr.sin_port = htons(getPeerAddress()->getPort()); - Tiki::Debug::printf("connecting to peer [%s->%s]\n", getPeerAddress()->getHostName().c_str(), getPeerAddress()->getIPAddressString().c_str()); + //Tiki::Debug::printf("connecting to peer [%s->%s]\n", getPeerAddress()->getHostName().c_str(), getPeerAddress()->getIPAddressString().c_str()); if( ::connect( m_socket, (struct sockaddr *)&sock_addr, sizeof(struct sockaddr_in)) == SOCKET_ERROR) { Tiki::Debug::printf("Error opening socket\n"); close(); return; } - Tiki::Debug::printf("Connected..\n"); + //Tiki::Debug::printf("Connected..\n"); } m_open = true; } @@ -118,7 +118,7 @@ void TCPSocket::setNonBlocking(bool blocking) { - Tiki::Debug::printf("%sabling blocking\n", blocking ? "dis" : "en" ); + //Tiki::Debug::printf("%sabling blocking\n", blocking ? "dis" : "en" ); Socket::setNonBlocking(blocking); #if TIKI_PLAT == TIKI_WIN32 unsigned long mode = (!blocking); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |