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-11-07 20:11:08
|
Revision: 540 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=540&view=rev Author: atani Date: 2007-11-07 12:11:05 -0800 (Wed, 07 Nov 2007) Log Message: ----------- package structure changes Modified Paths: -------------- tiki/dc/Makefile tiki/nds/Makefile tiki/sdl/Makefile Property Changed: ---------------- tiki/examples/menu/basic/ tiki/examples/menu/popup/ Modified: tiki/dc/Makefile =================================================================== --- tiki/dc/Makefile 2007-11-07 15:56:21 UTC (rev 539) +++ tiki/dc/Makefile 2007-11-07 20:11:05 UTC (rev 540) @@ -28,16 +28,18 @@ $(MAKE) TIKI_PLAT=dc -C$(CURDIR)/../examples clean all package: - zip -9r ../dist/$(SVN_VERSION)/tiki-$(SVN_VERSION)-dc.zip libtiki.a - cd .. && \ - zip -9ru dist/$(SVN_VERSION)/tiki-$(SVN_VERSION)-dc.zip \ - include \ - dc/include \ - dc/Makefile.rules \ - -x "*/.svn/*" - cd .. && \ - zip -9ru dist/$(SVN_VERSION)/tiki-$(SVN_VERSION)-dc.zip \ - examples/console/TikiSnake/tikisnake.elf \ - -x "*/.svn/*" + mkdir ../dist/$(SVN_VERSION)/tmp + mkdir ../dist/$(SVN_VERSION)/tmp/Library + mkdir ../dist/$(SVN_VERSION)/tmp/Library/dc + mkdir ../dist/$(SVN_VERSION)/tmp/Samples + svn export ../include ../dist/$(SVN_VERSION)/tmp/Library/include + svn export include ../dist/$(SVN_VERSION)/tmp/Library/dc/include + cp libtiki.a ../dist/$(SVN_VERSION)/tmp/Library/dc + cp Makefile.rules ../dist/$(SVN_VERSION)/tmp/Library/dc + find ../examples -name '*.elf' \ + -exec cp {} ../dist/$(SVN_VERSION)/tmp/Samples \; + cd ../dist/$(SVN_VERSION)/tmp && \ + zip -9r ../tiki-$(SVN_VERSION)-dc.zip Library Samples + rm -rf ../dist/$(SVN_VERSION)/tmp include Makefile.rules Property changes on: tiki/examples/menu/basic ___________________________________________________________________ Name: svn:ignore - Debug Release build *.user *.nds *.ds.gba + Debug Release build *.user *.nds *.ds.gba menu_basic Property changes on: tiki/examples/menu/popup ___________________________________________________________________ Name: svn:ignore - build Debug Release *.user *.nds *.ds.gba + build Debug Release *.user *.nds *.ds.gba menu_popup Modified: tiki/nds/Makefile =================================================================== --- tiki/nds/Makefile 2007-11-07 15:56:21 UTC (rev 539) +++ tiki/nds/Makefile 2007-11-07 20:11:05 UTC (rev 540) @@ -64,34 +64,27 @@ $(MAKE) TIKI_PLAT=nds -C$(CURDIR)/../examples clean all package: - cd .. && \ - zip -9ru dist/$(SVN_VERSION)/tiki-$(SVN_VERSION)-nds.zip \ - include \ - nds/include \ - 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 \ - ../examples/net/httpclient - cd .. && \ - zip -9ru dist/$(SVN_VERSION)/tiki-$(SVN_VERSION)-nds.zip \ - 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 - 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*' + mkdir ../dist/$(SVN_VERSION)/tmp + mkdir ../dist/$(SVN_VERSION)/tmp/Library + mkdir ../dist/$(SVN_VERSION)/tmp/Library/nds + mkdir ../dist/$(SVN_VERSION)/tmp/Samples + mkdir ../dist/$(SVN_VERSION)/tmp/Samples/Resources + svn export ../include ../dist/$(SVN_VERSION)/tmp/Library/include + svn export include ../dist/$(SVN_VERSION)/tmp/Library/nds/include + cp libtiki.a ../dist/$(SVN_VERSION)/tmp/Library/nds + cp Makefile.rules ../dist/$(SVN_VERSION)/tmp/Library/nds + find $(wildcard $(TIKI_DIR)/examples/**/**/resources) \ + $(wildcard $(TIKI_DIR)/examples/**/resources) \ + -type f -maxdepth 1 \ + -exec cp {} ../dist/$(SVN_VERSION)/tmp/Samples/Resources \; + find $(TIKI_DIR)/examples -name '*.nds' \ + -exec cp {} ../dist/$(SVN_VERSION)/tmp/Samples \; + find $(TIKI_DIR)/examples -name '*.ds.gba' \ + -exec cp {} ../dist/$(SVN_VERSION)/tmp/Samples \; + echo "Copy the contents of the Resources directory to the root of your flash card.\nThis is required by many of the Tiki samples" > ../dist/$(SVN_VERSION)/tmp/Samples/README.txt + cd ../dist/$(SVN_VERSION)/tmp && \ + zip -9r ../tiki-$(SVN_VERSION)-nds.zip Library Samples + rm -rf ../dist/$(SVN_VERSION)/tmp DEPSDIR=$(CURDIR) include Makefile.rules Modified: tiki/sdl/Makefile =================================================================== --- tiki/sdl/Makefile 2007-11-07 15:56:21 UTC (rev 539) +++ tiki/sdl/Makefile 2007-11-07 20:11:05 UTC (rev 540) @@ -63,26 +63,31 @@ $(MAKE) TIKI_PLAT=sdl -C$(CURDIR)/../examples clean all package: - tar -cvf ../dist/$(SVN_VERSION)/tiki-$(SVN_VERSION)-sdl.tar libtiki.a - tar -uvf ../dist/$(SVN_VERSION)/tiki-$(SVN_VERSION)-sdl.tar -C ../ \ - include \ - sdl/include \ - sdl/Makefile.rules \ - --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/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 ../examples/net/httpclient/pc-ascii.png - gzip ../dist/$(SVN_VERSION)/tiki-$(SVN_VERSION)-sdl.tar + mkdir ../dist/$(SVN_VERSION)/tmp + mkdir ../dist/$(SVN_VERSION)/tmp/Library + mkdir ../dist/$(SVN_VERSION)/tmp/Library/sdl + mkdir ../dist/$(SVN_VERSION)/tmp/Samples + svn export ../include ../dist/$(SVN_VERSION)/tmp/Library/include + svn export include ../dist/$(SVN_VERSION)/tmp/Library/sdl/include + cp libtiki.a ../dist/$(SVN_VERSION)/tmp/Library/sdl + cp Makefile.rules ../dist/$(SVN_VERSION)/tmp/Library/sdl + find $(wildcard ../examples/**/**/resources) \ + $(wildcard ../examples/**/resources) \ + -type f -maxdepth 1 \ + -exec cp {} ../dist/$(SVN_VERSION)/tmp/Samples \; + cp ../examples/net/basic/basic \ + ../examples/net/chat/chat \ + ../examples/net/chatd/chatd \ + ../examples/net/httpclient/httpclient \ + ../examples/console/TikiSnake/tikisnake \ + ../examples/menu/basic/menu_basic \ + ../examples/menu/popup/menu_popup \ + ../examples/sound/sfx/sound_fx \ + ../dist/$(SVN_VERSION)/tmp/Samples + cd ../dist/$(SVN_VERSION)/tmp && \ + tar -cvf ../tiki-$(SVN_VERSION)-sdl.tar \ + Library Samples && \ + gzip ../tiki-$(SVN_VERSION)-sdl.tar + rm -rf ../dist/$(SVN_VERSION)/tmp include Makefile.rules This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-11-07 15:56:24
|
Revision: 539 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=539&view=rev Author: atani Date: 2007-11-07 07:56:21 -0800 (Wed, 07 Nov 2007) Log Message: ----------- fix compilation failure for SDL Modified Paths: -------------- tiki/examples/net/chatd/src/ChatServer.cpp Modified: tiki/examples/net/chatd/src/ChatServer.cpp =================================================================== --- tiki/examples/net/chatd/src/ChatServer.cpp 2007-11-07 15:35:12 UTC (rev 538) +++ tiki/examples/net/chatd/src/ChatServer.cpp 2007-11-07 15:56:21 UTC (rev 539) @@ -9,8 +9,6 @@ #include <Tiki/tiki.h> #include <pch.h> -TIKI_INIT_FLAGS(TIKI_INIT_NOTHING); - #if TIKI_PLAT == TIKI_WIN32 #include <windows.h> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-11-07 15:35:19
|
Revision: 538 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=538&view=rev Author: atani Date: 2007-11-07 07:35:12 -0800 (Wed, 07 Nov 2007) Log Message: ----------- disable debug by default Modified Paths: -------------- tiki/examples/events/src/test.cpp tiki/examples/menu/basic/src/main.cpp tiki/examples/menu/popup/src/main.cpp 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/include/Tiki/tiki.h Modified: tiki/examples/events/src/test.cpp =================================================================== --- tiki/examples/events/src/test.cpp 2007-11-07 07:47:57 UTC (rev 537) +++ tiki/examples/events/src/test.cpp 2007-11-07 15:35:12 UTC (rev 538) @@ -12,6 +12,8 @@ using namespace Tiki; +TIKI_INIT_FLAGS(TIKI_INIT_DEFAULTS | TIKI_INIT_DEBUG_CONSOLE) + extern "C" int tiki_main( int argc, char **argv ) { // Init Tiki if ( !Tiki::init( argc, argv ) ) { Modified: tiki/examples/menu/basic/src/main.cpp =================================================================== --- tiki/examples/menu/basic/src/main.cpp 2007-11-07 07:47:57 UTC (rev 537) +++ tiki/examples/menu/basic/src/main.cpp 2007-11-07 15:35:12 UTC (rev 538) @@ -16,6 +16,8 @@ using namespace Tiki; using namespace Tiki::GL; +TIKI_INIT_FLAGS(TIKI_INIT_DEFAULTS | TIKI_INIT_DEBUG_CONSOLE) + class BasicMenuExample : public GenericMenu { public: BasicMenuExample() { Modified: tiki/examples/menu/popup/src/main.cpp =================================================================== --- tiki/examples/menu/popup/src/main.cpp 2007-11-07 07:47:57 UTC (rev 537) +++ tiki/examples/menu/popup/src/main.cpp 2007-11-07 15:35:12 UTC (rev 538) @@ -18,6 +18,8 @@ using namespace Tiki; using namespace Tiki::GL; +TIKI_INIT_FLAGS(TIKI_INIT_DEFAULTS | TIKI_INIT_DEBUG_CONSOLE) + class PopupMenuExample : public GenericMenu { public: PopupMenuExample() { Modified: tiki/examples/net/basic/src/main.cpp =================================================================== --- tiki/examples/net/basic/src/main.cpp 2007-11-07 07:47:57 UTC (rev 537) +++ tiki/examples/net/basic/src/main.cpp 2007-11-07 15:35:12 UTC (rev 538) @@ -17,6 +17,8 @@ using namespace Tiki::Net::TCP; using namespace Tiki::Time; +TIKI_INIT_FLAGS(TIKI_INIT_DEFAULTS | TIKI_INIT_DEBUG_CONSOLE) + extern "C" int tiki_main( int argc, char **argv) { Tiki::Net::init(); Modified: tiki/examples/net/chat/src/main.cpp =================================================================== --- tiki/examples/net/chat/src/main.cpp 2007-11-07 07:47:57 UTC (rev 537) +++ tiki/examples/net/chat/src/main.cpp 2007-11-07 15:35:12 UTC (rev 538) @@ -21,6 +21,8 @@ RefPtr<TCPSocket> g_remoteconn; std::string g_tmpbuf; +TIKI_INIT_FLAGS(TIKI_INIT_DEFAULTS | TIKI_INIT_DEBUG_CONSOLE) + volatile bool g_quitting = false; void tkCallback( const Hid::Event & evt, void * data ) { if ( evt.type == Hid::Event::EvtQuit ) { Modified: tiki/examples/net/chatd/src/main.cpp =================================================================== --- tiki/examples/net/chatd/src/main.cpp 2007-11-07 07:47:57 UTC (rev 537) +++ tiki/examples/net/chatd/src/main.cpp 2007-11-07 15:35:12 UTC (rev 538) @@ -29,6 +29,8 @@ std::map<std::string, void (*)( TCPSocket * )> g_commandHandlers; +TIKI_INIT_FLAGS(TIKI_INIT_DEFAULTS | TIKI_INIT_DEBUG_CONSOLE) + volatile bool quitting = false; void tkCallback( const Hid::Event & evt, void * data ) { if ( evt.type == Hid::Event::EvtQuit ) { Modified: tiki/examples/net/httpclient/src/main.cpp =================================================================== --- tiki/examples/net/httpclient/src/main.cpp 2007-11-07 07:47:57 UTC (rev 537) +++ tiki/examples/net/httpclient/src/main.cpp 2007-11-07 15:35:12 UTC (rev 538) @@ -23,6 +23,8 @@ using namespace Tiki::Net::Http; using namespace Tiki::GL; +TIKI_INIT_FLAGS(TIKI_INIT_DEFAULTS | TIKI_INIT_DEBUG_CONSOLE) + class EventReceiver : public Object { public: EventReceiver() {} Modified: tiki/include/Tiki/tiki.h =================================================================== --- tiki/include/Tiki/tiki.h 2007-11-07 07:47:57 UTC (rev 537) +++ tiki/include/Tiki/tiki.h 2007-11-07 15:35:12 UTC (rev 538) @@ -84,12 +84,11 @@ TIKI_INIT_AUDIO_MASK = 0x00FF0000, TIKI_INIT_DEBUG_CONSOLE = 0x01000000, - TIKI_INIT_DEBUG_DEFAULT = TIKI_INIT_DEBUG_CONSOLE, + TIKI_INIT_DEBUG_DEFAULT = 0x00000000, TIKI_INIT_DEBUG_MASK = 0xFF000000, TIKI_INIT_NOTHING = 0x00000000, TIKI_INIT_DEFAULTS = TIKI_INIT_HID_DEFAULT | TIKI_INIT_VIDEO_DEFAULT | TIKI_INIT_AUDIO_DEFAULT | TIKI_INIT_DEBUG_DEFAULT, - TIKI_INIT_DEFAULTS_NODEBUG = TIKI_INIT_HID_DEFAULT | TIKI_INIT_VIDEO_DEFAULT | TIKI_INIT_AUDIO_DEFAULT, } TIKI_INIT_FLAGS_ENUM; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-11-07 07:48:03
|
Revision: 537 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=537&view=rev Author: atani Date: 2007-11-06 23:47:57 -0800 (Tue, 06 Nov 2007) Log Message: ----------- removing files from OpenAL distribution Removed Paths: ------------- tiki/examples/console/TikiSnake/resources/OpenAL32.dll tiki/examples/console/TikiSnake/resources/alut.dll Deleted: tiki/examples/console/TikiSnake/resources/OpenAL32.dll =================================================================== (Binary files differ) Deleted: tiki/examples/console/TikiSnake/resources/alut.dll =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <c99...@us...> - 2007-11-07 02:30:33
|
Revision: 536 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=536&view=rev Author: c99koder Date: 2007-11-06 18:30:31 -0800 (Tue, 06 Nov 2007) Log Message: ----------- Fix missing include Modified Paths: -------------- tiki/dc/src/init_shutdown.cpp Modified: tiki/dc/src/init_shutdown.cpp =================================================================== --- tiki/dc/src/init_shutdown.cpp 2007-11-06 21:26:13 UTC (rev 535) +++ tiki/dc/src/init_shutdown.cpp 2007-11-07 02:30:31 UTC (rev 536) @@ -9,6 +9,7 @@ #include "pch.h" #include "Tiki/tiki.h" +#include "Tiki/gl.h" #include "Tiki/sound.h" #include "Tiki/stream.h" #include "Tiki/hid.h" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-11-06 21:26:16
|
Revision: 535 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=535&view=rev Author: atani Date: 2007-11-06 13:26:13 -0800 (Tue, 06 Nov 2007) Log Message: ----------- 32x24 not 64x24 Modified Paths: -------------- tiki/nds/src/init_shutdown.cpp Modified: tiki/nds/src/init_shutdown.cpp =================================================================== --- tiki/nds/src/init_shutdown.cpp 2007-11-06 20:32:59 UTC (rev 534) +++ tiki/nds/src/init_shutdown.cpp 2007-11-06 21:26:13 UTC (rev 535) @@ -43,7 +43,7 @@ SUB_BG1_CR = BG_64x32 | BG_COLOR_16 | BG_MAP_BASE( 2 ) | BG_TILE_BASE( 1 ); vramSetBankC( VRAM_C_SUB_BG ); memcpy( ( void * )BG_TILE_RAM_SUB( 1 ), ascii_font_bin, ascii_font_bin_size ); - debug_console = new Tiki::GL::NDSSubScreenConsole( 64, 24 ); + debug_console = new Tiki::GL::NDSSubScreenConsole( 32, 24 ); */ } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-11-06 20:33:01
|
Revision: 534 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=534&view=rev Author: atani Date: 2007-11-06 12:32:59 -0800 (Tue, 06 Nov 2007) Log Message: ----------- nds sound fx support, sound fx sample Modified Paths: -------------- tiki/examples/Makefile tiki/include/Tiki/sound.h tiki/nds/src/audio/sound.cpp tiki/nds/src/init_shutdown.cpp Added Paths: ----------- tiki/examples/sound/ tiki/examples/sound/Makefile tiki/examples/sound/sfx/ tiki/examples/sound/sfx/Makefile tiki/examples/sound/sfx/resources/ tiki/examples/sound/sfx/resources/click.wav tiki/examples/sound/sfx/resources/pc-ascii.png tiki/examples/sound/sfx/src/ tiki/examples/sound/sfx/src/SoundFX.cpp tiki/examples/sound/sfx/src/main.cpp Modified: tiki/examples/Makefile =================================================================== --- tiki/examples/Makefile 2007-11-06 16:46:32 UTC (rev 533) +++ tiki/examples/Makefile 2007-11-06 20:32:59 UTC (rev 534) @@ -1,5 +1,5 @@ -SUBDIRS = events menu console net nehe +SUBDIRS = events menu console net nehe sound TIKI_DIR ?= $(CURDIR)/../ include $(TIKI_DIR)$(TIKI_PLAT)/Makefile.rules Added: tiki/examples/sound/Makefile =================================================================== --- tiki/examples/sound/Makefile (rev 0) +++ tiki/examples/sound/Makefile 2007-11-06 20:32:59 UTC (rev 534) @@ -0,0 +1,8 @@ + +SUBDIRS = sfx + +TIKI_DIR ?= $(CURDIR)/../../ +include $(TIKI_DIR)$(TIKI_PLAT)/Makefile.rules + +all: subdirs +clean: clean_subdirs Property changes on: tiki/examples/sound/sfx ___________________________________________________________________ Name: svn:ignore + build Debug Release *.nds *.ds.gba sound_fx Added: tiki/examples/sound/sfx/Makefile =================================================================== --- tiki/examples/sound/sfx/Makefile (rev 0) +++ tiki/examples/sound/sfx/Makefile 2007-11-06 20:32:59 UTC (rev 534) @@ -0,0 +1,26 @@ + +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 ?= SOUN +NDS_CART_ID ?= TK +NDS_CART_NAME ?= SoundFX +NDS_CART_VERSION ?= 1 +endif + +all: sound_fx +sound_fx: $(OBJS) + $(build_romdisk) + $(CXX) $(LDFLAGS) -L$(TIKI_DIR)$(TIKI_PLAT) -L$(TIKI_DIR)$(TIKI_PLAT)/lib $(OBJS) $(TIKI_BASE_LIBS) -o sound_fx$(PLATFORM_BINARY_EXT) $(ROMDISK_OBJ) + $(post_build) + +clean: + -rm -f $(OBJS) sound_fx$(PLATFORM_BINARY_EXT) $(ROMDISK_OBJ) +ifeq ($(TIKI_PLAT),nds) + -rm -f sound_fx.nds sound_fx.ds.gba +endif + +TIKI_DIR ?= $(CURDIR)/../../../ +DEPSDIR=$(CURDIR) +include $(TIKI_DIR)$(TIKI_PLAT)/Makefile.rules Property changes on: tiki/examples/sound/sfx/Makefile ___________________________________________________________________ Name: svn:executable + * Added: tiki/examples/sound/sfx/resources/click.wav =================================================================== (Binary files differ) Property changes on: tiki/examples/sound/sfx/resources/click.wav ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: tiki/examples/sound/sfx/resources/pc-ascii.png =================================================================== (Binary files differ) Property changes on: tiki/examples/sound/sfx/resources/pc-ascii.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Property changes on: tiki/examples/sound/sfx/src ___________________________________________________________________ Name: svn:ignore + *.d Added: tiki/examples/sound/sfx/src/SoundFX.cpp =================================================================== --- tiki/examples/sound/sfx/src/SoundFX.cpp (rev 0) +++ tiki/examples/sound/sfx/src/SoundFX.cpp 2007-11-06 20:32:59 UTC (rev 534) @@ -0,0 +1,27 @@ +/* +* SoundFX.cpp +* Basic menu example +* +* Copyright (C)2007 Atani Software +* +*/ + +#include <Tiki/tiki.h> +#include <pch.h> + +#if TIKI_PLAT == TIKI_WIN32 +#include <windows.h> + +static char szAppName[] = "SoundFX"; +int APIENTRY WinMain( HINSTANCE hInst, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow ) +#else +extern "C" int tiki_main( int argc, char *argv[] ); +int main( int argc, char *argv[] ) +#endif +{ +#if TIKI_PLAT != TIKI_WIN32 + return tiki_main( argc, argv ); +#else + return Tiki::DoMain( szAppName, hInst, hPrevInstance, lpCmdLine, nCmdShow ); +#endif +} Added: tiki/examples/sound/sfx/src/main.cpp =================================================================== --- tiki/examples/sound/sfx/src/main.cpp (rev 0) +++ tiki/examples/sound/sfx/src/main.cpp 2007-11-06 20:32:59 UTC (rev 534) @@ -0,0 +1,116 @@ +/* +* main.cpp +* Sound FX example +* +* Copyright (C)2007 Atani Software +* +*/ + +#include <Tiki/tiki.h> +#include <Tiki/sound.h> +#include <Tiki/hid.h> +#include <Tiki/gl.h> +#include <Tiki/drawables/console.h> + +using namespace Tiki; +using namespace Tiki::Audio; +using namespace Tiki::GL; +using namespace Tiki::Hid; + +float volume = 0.50f; +float panning = 0.0f; + +RefPtr<Sound> sound; +RefPtr<Console> console; +RefPtr<Texture> console_font; + +volatile bool g_quitting = false; +void tkCallback( const Event & evt, void * data ) { + if ( evt.type == Event::EvtQuit ) { + g_quitting = true; + } + else if (evt.type == Event::EvtKeypress) { + switch(evt.key) { + case '\n': + case '\r': + sound->play(volume, panning); + break; + case Event::KeyLeft: + panning -= 0.05f; + if(panning < -1.0f) { + panning = -1.0f; + } + + break; + case Event::KeyRight: + panning += 0.05f; + if(panning > 1.0f) { + panning = 1.0f; + } + break; + case Event::KeyDown: + volume -= 0.05f; + if(volume < 0.0f) { + volume = 0.0f; + } + break; + case Event::KeyUp: + volume += 0.05f; + if(volume > 1.0f) { + volume = 1.0f; + } + + break; + case Event::KeyEsc: + g_quitting = true; + break; + + } + + } +} + +extern "C" int tiki_main(int argc, char *argv[]) +{ + Tiki::init(argc, argv); + Hid::callbackReg( tkCallback, NULL ); + +#if TIKI_PLAT == TIKI_DC + console_font = new Texture( "/rd/pc-ascii.png", true ); + sound = new Sound("/rd/click.wav"); +#else + console_font = new Texture( "pc-ascii.png", true ); + sound = new Sound("click.wav"); +#endif + console = new Console( 80, 25, console_font ); + + Vector screenExtents = Frame::getScreenExtents(); + console->setSize(screenExtents.x, screenExtents.y); + screenExtents *= 0.5f; + console->setTranslate(screenExtents); + console->setAutoWrap( true ); + console->setAutoScroll( true ); + console->color( BLACK, GREY ); + console->clear(); + + while (!g_quitting) + { + console->clear(); + console->printf("Press ESC to exit\n"); + console->printf("Panning: %02.02f\n", panning); + console->printf("Volume: %02.02f\n", volume); + + Frame::begin(); + console->draw(Drawable::Opaque); + Frame::transEnable(); + console->draw(Drawable::Trans); + Frame::finish(); + } + + delete sound; + delete console; + delete console_font; + + Tiki::shutdown(); + return 0; +} Modified: tiki/include/Tiki/sound.h =================================================================== --- tiki/include/Tiki/sound.h 2007-11-06 16:46:32 UTC (rev 533) +++ tiki/include/Tiki/sound.h 2007-11-06 20:32:59 UTC (rev 534) @@ -13,11 +13,11 @@ #include "object.h" #if TIKI_PLAT == TIKI_OSX -# include <OpenAL/al.h> +#include <OpenAL/al.h> #elif TIKI_PLAT == TIKI_SDL -# include <AL/al.h> +#include <AL/al.h> #elif TIKI_PLAT == TIKI_WIN32 -# include <al.h> +#include <al.h> #endif namespace Tiki { @@ -70,7 +70,10 @@ sfxhnd_t handle; #endif #if TIKI_PLAT == TIKI_NDS - TransferSoundData m_sndData; + uint8 *m_buffer; + uint32 m_rate; + uint32 m_size; + uint8 m_format; #endif static float m_default_vol; Modified: tiki/nds/src/audio/sound.cpp =================================================================== --- tiki/nds/src/audio/sound.cpp 2007-11-06 16:46:32 UTC (rev 533) +++ tiki/nds/src/audio/sound.cpp 2007-11-06 20:32:59 UTC (rev 534) @@ -11,6 +11,8 @@ #include "Tiki/sound.h" #include "Tiki/file.h" +#include <nds.h> + #include <string.h> using namespace Tiki::Audio; @@ -25,6 +27,7 @@ bool Sound::initGlobal() { setGenericSound( 11025, 127, 64, 1 ); + return true; } @@ -43,9 +46,7 @@ assert( false ); } -Sound::Sound() { - memset( &m_sndData, 0, sizeof( TransferSoundData ) ); -} +Sound::Sound() {} Sound::~Sound() {} @@ -61,7 +62,7 @@ if ( strncmp( magic, "WAVE", 4 ) ) { Debug::printf( "Sound::loadFromFile: file is not RIFF WAVE\n" ); wavFile.close(); - m_sndData.data = NULL; + m_buffer = NULL; return false; } @@ -80,26 +81,25 @@ Debug::printf( "WAVE file is %s, %dHZ, %d bits/sample, %d bytes total, format %d\n", chn == 1 ? "mono" : "stereo", hz, bitsize, len, fmt ); if ( bitsize == 8 ) { - m_sndData.format = 1; + m_format = 1; } else if ( bitsize == 16 ) { - m_sndData.format = 2; + m_format = 2; } else { Debug::printf( "Sound::loadFromFile: unsupported bitsize / channel combination\n" ); wavFile.close(); - m_sndData.data = NULL; + m_buffer = NULL; return false; } - m_sndData.len = len; - m_sndData.rate = hz; - - m_sndData.data = malloc( len ); + m_size = len; + m_rate = hz; + m_buffer = new u8[ m_size ]; if ( bitsize == 8 ) { - wavFile.read( m_sndData.data, len ); + wavFile.read( m_buffer, m_size ); } else { //byte swapping may be needed, depending on host endianness - for ( int i = 0; i < size; i += 2 ) { - wavFile.readle16( ( uint8 * ) m_sndData.data + i, 1 ); + for ( int i = 0; i < m_size; i += 2 ) { + wavFile.readle16( ( uint8 * ) m_buffer + i, 1 ); } } @@ -113,29 +113,29 @@ } int Sound::play() { - m_sndData.vol = 128 * m_default_vol; - playSound(&m_sndData); + play( 0, m_default_vol, 0.0f ); return 0; } int Sound::play( float vol ) { - m_sndData.pan = 64; - m_sndData.vol = 128 * vol; - playSound(&m_sndData); + play( 0, vol, 0.0f ); return 0; } int Sound::play( float vol, float pan ) { - m_sndData.pan = 64; - m_sndData.vol = 128 * vol; - playSound(&m_sndData); + play( 0, vol, pan ); return 0; } void Sound::play( int ch, float vol, float pan ) { - m_sndData.pan = 64; - m_sndData.vol = 128 * vol; - playSound(&m_sndData); - return 0; + TransferSoundData sound = { + m_buffer, + m_size, + m_rate, + static_cast<u8>(128 * vol), + pan == 0.0f ? 64 : (pan < 0.0f ? 128 + static_cast<u8>(64 * pan) : 64 + static_cast<u8>(64 * pan)), + m_format + }; + playSound( &sound ); } Modified: tiki/nds/src/init_shutdown.cpp =================================================================== --- tiki/nds/src/init_shutdown.cpp 2007-11-06 16:46:32 UTC (rev 533) +++ tiki/nds/src/init_shutdown.cpp 2007-11-06 20:32:59 UTC (rev 534) @@ -11,8 +11,9 @@ #include "Tiki/sound.h" #include "Tiki/stream.h" #include "Tiki/hid.h" +#include "Tiki/drawables/console.h" -#include <nds.h>s +#include <nds.h> #include <fat.h> #include <dswifi9.h> #include <dssoundstream.h> @@ -22,7 +23,7 @@ SendCommandToArm7( 0x87654321 ); } -Tiki::GL::NDSSubScreenConsole *console = NULL; +Tiki::GL::NDSSubScreenConsole *debug_console = NULL; extern const u8 ascii_font_bin[]; extern const u32 ascii_font_bin_size; @@ -42,7 +43,7 @@ SUB_BG1_CR = BG_64x32 | BG_COLOR_16 | BG_MAP_BASE( 2 ) | BG_TILE_BASE( 1 ); vramSetBankC( VRAM_C_SUB_BG ); memcpy( ( void * )BG_TILE_RAM_SUB( 1 ), ascii_font_bin, ascii_font_bin_size ); - console = new Tiki::GL::NDSSubScreenConsole( 64, 24 ); + debug_console = new Tiki::GL::NDSSubScreenConsole( 64, 24 ); */ } @@ -140,8 +141,8 @@ Audio::Stream::shutdownGlobal(); Audio::Sound::shutdownGlobal(); } - if(g_tiki_init_flags & TIKI_INIT_DEBUG_CONSOLE && console != NULL) { - delete console; + if(g_tiki_init_flags & TIKI_INIT_DEBUG_CONSOLE && debug_console != NULL) { + delete debug_console; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-11-06 16:46:37
|
Revision: 533 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=533&view=rev Author: atani Date: 2007-11-06 08:46:32 -0800 (Tue, 06 Nov 2007) Log Message: ----------- SoundFX support on the DS. Modified Paths: -------------- tiki/include/Tiki/sound.h tiki/nds/src/audio/sound.cpp tiki/nds/src/init_shutdown.cpp Modified: tiki/include/Tiki/sound.h =================================================================== --- tiki/include/Tiki/sound.h 2007-11-06 15:54:58 UTC (rev 532) +++ tiki/include/Tiki/sound.h 2007-11-06 16:46:32 UTC (rev 533) @@ -14,14 +14,11 @@ #if TIKI_PLAT == TIKI_OSX # include <OpenAL/al.h> -#else -#if TIKI_PLAT == TIKI_SDL +#elif TIKI_PLAT == TIKI_SDL # include <AL/al.h> -#endif -#if TIKI_PLAT == TIKI_WIN32 +#elif TIKI_PLAT == TIKI_WIN32 # include <al.h> #endif -#endif namespace Tiki { namespace Audio { @@ -67,14 +64,13 @@ private: bool m_stereo; #if TIKI_PLAT != TIKI_DC && TIKI_PLAT != TIKI_NDS - ALuint m_buffer; #endif #if TIKI_PLAT == TIKI_DC - sfxhnd_t handle; #endif #if TIKI_PLAT == TIKI_NDS + TransferSoundData m_sndData; #endif static float m_default_vol; Modified: tiki/nds/src/audio/sound.cpp =================================================================== --- tiki/nds/src/audio/sound.cpp 2007-11-06 15:54:58 UTC (rev 532) +++ tiki/nds/src/audio/sound.cpp 2007-11-06 16:46:32 UTC (rev 533) @@ -24,6 +24,7 @@ float Sound::m_default_vol = 0.9f; bool Sound::initGlobal() { + setGenericSound( 11025, 127, 64, 1 ); return true; } @@ -42,12 +43,68 @@ assert( false ); } -Sound::Sound() {} +Sound::Sound() { + memset( &m_sndData, 0, sizeof( TransferSoundData ) ); +} Sound::~Sound() {} bool Sound::loadFromFile( const string & fn ) { - return false; + char magic[ 4 ]; + uint32 len, hz; + uint16 chn, bitsize, fmt; + + File wavFile( fn, "r" ); + wavFile.seek( 8, SEEK_SET ); + wavFile.read( magic, 4 ); + + if ( strncmp( magic, "WAVE", 4 ) ) { + Debug::printf( "Sound::loadFromFile: file is not RIFF WAVE\n" ); + wavFile.close(); + m_sndData.data = NULL; + return false; + } + + /* Read WAV header info */ + wavFile.seek( 0x14, SEEK_SET ); + wavFile.readle16( &fmt, 1 ); + wavFile.readle16( &chn, 1 ); + wavFile.readle32( &hz, 1 ); + wavFile.seek( 0x22, SEEK_SET ); + wavFile.readle16( &bitsize, 1 ); + + /* Read WAV data */ + wavFile.seek( 0x28, SEEK_SET ); + wavFile.readle32( &len, 1 ); + + Debug::printf( "WAVE file is %s, %dHZ, %d bits/sample, %d bytes total, format %d\n", + chn == 1 ? "mono" : "stereo", hz, bitsize, len, fmt ); + if ( bitsize == 8 ) { + m_sndData.format = 1; + } else if ( bitsize == 16 ) { + m_sndData.format = 2; + } else { + Debug::printf( "Sound::loadFromFile: unsupported bitsize / channel combination\n" ); + wavFile.close(); + m_sndData.data = NULL; + return false; + } + + m_sndData.len = len; + m_sndData.rate = hz; + + m_sndData.data = malloc( len ); + if ( bitsize == 8 ) { + wavFile.read( m_sndData.data, len ); + } else { + //byte swapping may be needed, depending on host endianness + for ( int i = 0; i < size; i += 2 ) { + wavFile.readle16( ( uint8 * ) m_sndData.data + i, 1 ); + } + } + + wavFile.close(); + return true; } // Set the default volume value @@ -56,16 +113,29 @@ } int Sound::play() { - return -1; + m_sndData.vol = 128 * m_default_vol; + playSound(&m_sndData); + return 0; } int Sound::play( float vol ) { - return -1; + m_sndData.pan = 64; + m_sndData.vol = 128 * vol; + playSound(&m_sndData); + return 0; } int Sound::play( float vol, float pan ) { - return -1; + m_sndData.pan = 64; + m_sndData.vol = 128 * vol; + playSound(&m_sndData); + return 0; } -void Sound::play( int ch, float vol, float pan ) {} +void Sound::play( int ch, float vol, float pan ) { + m_sndData.pan = 64; + m_sndData.vol = 128 * vol; + playSound(&m_sndData); + return 0; +} Modified: tiki/nds/src/init_shutdown.cpp =================================================================== --- tiki/nds/src/init_shutdown.cpp 2007-11-06 15:54:58 UTC (rev 532) +++ tiki/nds/src/init_shutdown.cpp 2007-11-06 16:46:32 UTC (rev 533) @@ -99,6 +99,10 @@ Tiki::Debug::printf("Enabling SoundStream\n"); Audio::Stream::initGlobal(); } + if(g_tiki_init_flags & TIKI_INIT_AUDIO_SFX) { + Tiki::Debug::printf("Enabling SoundFX\n"); + Audio::Sound::initGlobal(); + } } if(g_tiki_init_flags & TIKI_INIT_HID_MASK ) { Tiki::Debug::printf("Enabling HID\n"); @@ -134,6 +138,7 @@ } if(g_tiki_init_flags & TIKI_INIT_HID_MASK ) { Audio::Stream::shutdownGlobal(); + Audio::Sound::shutdownGlobal(); } if(g_tiki_init_flags & TIKI_INIT_DEBUG_CONSOLE && console != NULL) { delete console; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-11-06 15:55:00
|
Revision: 532 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=532&view=rev Author: atani Date: 2007-11-06 07:54:58 -0800 (Tue, 06 Nov 2007) Log Message: ----------- NDS optimized console for lower screen. Modified Paths: -------------- tiki/include/Tiki/drawables/console.h tiki/nds/Makefile tiki/nds/Makefile.rules tiki/nds/src/init_shutdown.cpp tiki/src/gl/drawables/console.cpp Added Paths: ----------- tiki/nds/ascii_font.bin Property Changed: ---------------- tiki/nds/ Modified: tiki/include/Tiki/drawables/console.h =================================================================== --- tiki/include/Tiki/drawables/console.h 2007-11-06 02:14:10 UTC (rev 531) +++ tiki/include/Tiki/drawables/console.h 2007-11-06 15:54:58 UTC (rev 532) @@ -122,36 +122,52 @@ return *this; } virtual void draw(ObjType t); - void renderCharacter(float x, float y, float w, float h, unsigned char c, int color); - void renderBackground(float x, float y, float w, float h, int color); + protected: - RefPtr<Texture> m_texture; int m_rows, m_cols; std::vector<unsigned char> m_charData; std::vector<unsigned short> m_colorData; - - Color m_palette[8]; + float m_w, m_h; + virtual void refresh() { + Frame::begin(); + draw(Drawable::Opaque); + Frame::transEnable(); + draw(Drawable::Trans); + Frame::finish(); + } + private: - void processAnsiString(); + RefPtr<Texture> m_texture; + Color m_palette[8]; bool m_autoScroll, m_autoWrap, m_autoRefresh; bool m_ansi; int m_cursor_x, m_cursor_y; int m_save_x, m_save_y; int m_attr; - float m_w, m_h; unsigned char ansistr[51]; unsigned char ansiptr; - - void refresh() { - Frame::begin(); - draw(Drawable::Opaque); - Frame::transEnable(); - draw(Drawable::Trans); - Frame::finish(); - } + + void processAnsiString(); + void renderCharacter(float x, float y, float w, float h, unsigned char c, int color); + void renderBackground(float x, float y, float w, float h, int color); }; + +#if TIKI_PLAT == TIKI_NDS + // NDS optimized console for the lower screen + class NDSSubScreenConsole : public Console + { + public: + NDSSubScreenConsole(int cols, int rows); + virtual void draw(ObjType list); + + protected: + virtual void refresh() { + draw(Drawable::Opaque); + } + }; +#endif }; }; Property changes on: tiki/nds ___________________________________________________________________ Name: svn:ignore - libtiki.a tiki.depend tiki.layout .objs + libtiki.a tiki.depend tiki.layout .objs ascii_font_bin.h Modified: tiki/nds/Makefile =================================================================== --- tiki/nds/Makefile 2007-11-06 02:14:10 UTC (rev 531) +++ tiki/nds/Makefile 2007-11-06 15:54:58 UTC (rev 532) @@ -6,6 +6,7 @@ BASE_GL_OBJ+=$(patsubst %.cpp,%.o,$(wildcard ../src/gl/anims/*.cpp)) BASE_GL_OBJ+=$(patsubst %.cpp,%.o,$(wildcard ../src/gl/drawables/*.cpp)) BASE_GL_OBJ+=$(patsubst %.cpp,%.o,$(wildcard ../src/gl/triggers/*.cpp)) +BASE_GL_OBJ+=ascii_font.bin.o BASE_HID_OBJ=$(patsubst %.cpp,%.o,$(wildcard ../src/hid/*.cpp)) BASE_IMAGE_OBJ=$(patsubst %.cpp,%.o,$(wildcard ../src/image/*.cpp)) BASE_MATH_OBJ=$(patsubst %.cpp,%.o,$(wildcard ../src/math/*.cpp)) Modified: tiki/nds/Makefile.rules =================================================================== --- tiki/nds/Makefile.rules 2007-11-06 02:14:10 UTC (rev 531) +++ tiki/nds/Makefile.rules 2007-11-06 15:54:58 UTC (rev 532) @@ -55,3 +55,11 @@ @rm -f tikiarm7.arm7 @rm -f $@.arm9.elf endef + +#----------------- +# extra rules not provided by devkitpro + +%.bin.o : %.bin + @echo $(notdir $<) + @$(bin2o) +#----------------- Added: tiki/nds/ascii_font.bin =================================================================== (Binary files differ) Property changes on: tiki/nds/ascii_font.bin ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: tiki/nds/src/init_shutdown.cpp =================================================================== --- tiki/nds/src/init_shutdown.cpp 2007-11-06 02:14:10 UTC (rev 531) +++ tiki/nds/src/init_shutdown.cpp 2007-11-06 15:54:58 UTC (rev 532) @@ -22,6 +22,10 @@ SendCommandToArm7( 0x87654321 ); } +Tiki::GL::NDSSubScreenConsole *console = NULL; +extern const u8 ascii_font_bin[]; +extern const u32 ascii_font_bin_size; + namespace Tiki { bool init( int argc, char **argv ) { @@ -32,13 +36,21 @@ if(g_tiki_init_flags & TIKI_INIT_DEBUG_CONSOLE) { consoleDemoInit(); + /* + videoSetModeSub( MODE_0_2D | DISPLAY_BG0_ACTIVE | DISPLAY_BG1_ACTIVE ); + SUB_BG0_CR = BG_64x32 | BG_COLOR_16 | BG_MAP_BASE( 0 ) | BG_TILE_BASE( 1 ); + SUB_BG1_CR = BG_64x32 | BG_COLOR_16 | BG_MAP_BASE( 2 ) | BG_TILE_BASE( 1 ); + vramSetBankC( VRAM_C_SUB_BG ); + memcpy( ( void * )BG_TILE_RAM_SUB( 1 ), ascii_font_bin, ascii_font_bin_size ); + console = new Tiki::GL::NDSSubScreenConsole( 64, 24 ); + */ } - // Setup the Main screen for 3D + // Setup the Main screen for 3D videoSetMode( MODE_0_3D ); vramSetBankA( VRAM_A_TEXTURE ); - Tiki::Debug::printf("Enabling IRQs\n"); + Tiki::Debug::printf("Enabling IRQs\n"); // IRQ basic setup irqInit(); @@ -47,39 +59,39 @@ glInit(); glEnable(GL_TEXTURE_2D); - // 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( 0x7FFF ); + // 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( 0x7FFF ); // Set our viewport to be the same size as the screen - glViewport(0,0,255,191); + glViewport(0,0,255,191); glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(70, 256.0 / 192.0, 0.1, 100); + glLoadIdentity(); + gluPerspective(70, 256.0 / 192.0, 0.1, 100); glLight(0, RGB15(31,31,31) , 0, floattov10(-1.0),0); glLight(1, RGB15(31,31,31) , 0,0,floattov10(-1.0)); glLight(2, RGB15(31,31,31) , 0,0,floattov10(1.0)); //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)); + 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(); + //ds uses a table for shinyness..this generates a half-ass one + glMaterialShinyness(); - glPolyFmt(POLY_ALPHA(31) | POLY_CULL_FRONT | POLY_FORMAT_LIGHT0| POLY_FORMAT_LIGHT1| POLY_FORMAT_LIGHT2 ); + glPolyFmt(POLY_ALPHA(31) | POLY_CULL_FRONT | POLY_FORMAT_LIGHT0| POLY_FORMAT_LIGHT1| POLY_FORMAT_LIGHT2 ); - glMatrixMode(GL_MODELVIEW); + glMatrixMode(GL_MODELVIEW); - // set a default color. - glColor3f(1, 1, 1); + // set a default color. + glColor3f(1, 1, 1); - Tiki::Debug::printf("Enabling libFAT\n"); + Tiki::Debug::printf("Enabling libFAT\n"); fatInitDefault(); if(g_tiki_init_flags & TIKI_INIT_AUDIO_MASK) { @@ -123,6 +135,9 @@ if(g_tiki_init_flags & TIKI_INIT_HID_MASK ) { Audio::Stream::shutdownGlobal(); } + if(g_tiki_init_flags & TIKI_INIT_DEBUG_CONSOLE && console != NULL) { + delete console; + } } void setName( const char *windowName, const char *iconName ) {} Modified: tiki/src/gl/drawables/console.cpp =================================================================== --- tiki/src/gl/drawables/console.cpp 2007-11-06 02:14:10 UTC (rev 531) +++ tiki/src/gl/drawables/console.cpp 2007-11-06 15:54:58 UTC (rev 532) @@ -519,3 +519,61 @@ } ansiptr = 0; } + + +#if TIKI_PLAT == TIKI_NDS +NDSSubScreenConsole::NDSSubScreenConsole(int cols, int rows) : Console(cols, rows, NULL) { + BG_PALETTE_SUB[ ( 16 * 0 ) + 1 ] = RGB15( 0, 0, 0 ); + BG_PALETTE_SUB[ ( 16 * 1 ) + 1 ] = RGB15( 0, 0, 15 ); + BG_PALETTE_SUB[ ( 16 * 2 ) + 1 ] = RGB15( 0, 15, 0 ); + BG_PALETTE_SUB[ ( 16 * 3 ) + 1 ] = RGB15( 0, 15, 15 ); + BG_PALETTE_SUB[ ( 16 * 4 ) + 1 ] = RGB15( 15, 0, 0 ); + BG_PALETTE_SUB[ ( 16 * 5 ) + 1 ] = RGB15( 15, 0, 15 ); + BG_PALETTE_SUB[ ( 16 * 6 ) + 1 ] = RGB15( 15, 15, 0 ); + BG_PALETTE_SUB[ ( 16 * 7 ) + 1 ] = RGB15( 15, 15, 15 ); + BG_PALETTE_SUB[ ( 16 * 8 ) + 1 ] = RGB15( 6, 6, 6 ); + BG_PALETTE_SUB[ ( 16 * 9 ) + 1 ] = RGB15( 0, 0, 31 ); + BG_PALETTE_SUB[ ( 16 * 10 ) + 1 ] = RGB15( 0, 31, 0 ); + BG_PALETTE_SUB[ ( 16 * 11 ) + 1 ] = RGB15( 0, 31, 31 ); + BG_PALETTE_SUB[ ( 16 * 12 ) + 1 ] = RGB15( 31, 0, 0 ); + BG_PALETTE_SUB[ ( 16 * 13 ) + 1 ] = RGB15( 31, 0, 31 ); + BG_PALETTE_SUB[ ( 16 * 14 ) + 1 ] = RGB15( 31, 31, 0 ); + BG_PALETTE_SUB[ ( 16 * 15 ) + 1 ] = RGB15( 31, 31, 31 ); + + setANSI(true); + setAutoRefresh(true); +} + +// use the following value to ensure the background is visible when rendered +#define SOLID_FILL 219 + +// Macro for palette selecting +#define TILE_PALETTE(n) ((n)<<12) + +void NDSSubScreenConsole::draw(ObjType list) { + if(list == Trans) { + return; + } + u16 * bg0Map = ( u16 * )SCREEN_BASE_BLOCK_SUB( 0 ); + u16 * bg1Map = ( u16 * )SCREEN_BASE_BLOCK_SUB( 2 ); + + for( u16 y = 0; y < m_rows; y++ ) { + for( u16 x = 0; x < m_cols; x++ ) { + char fg = m_colorData[ ( y * m_cols ) + x ] & 0x07; + if( m_colorData[ ( y * m_cols ) + x ] & HIGH_INTENSITY ) { + fg += 8; + } + char bg = ( m_colorData[ ( y * m_cols ) + x ] >> 8 ) & 0x07; + + if(x < 32) { + bg1Map[ ( y * 32 ) + x ] = SOLID_FILL | TILE_PALETTE(bg); + bg0Map[ ( y * 32 ) + x ] = m_charData[ ( y * m_cols ) + x ] | TILE_PALETTE(fg); + } + else { + bg1Map[ ( y * 32 ) + ( x - 32 ) + 1024 ] = SOLID_FILL | TILE_PALETTE(bg); + bg0Map[ ( y * 32 ) + ( x - 32 ) + 1024 ] = m_charData[ ( y * m_cols ) + x ] | TILE_PALETTE(fg); + } + } + } +} +#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-11-06 02:14:18
|
Revision: 531 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=531&view=rev Author: atani Date: 2007-11-05 18:14:10 -0800 (Mon, 05 Nov 2007) Log Message: ----------- fix examples copy Modified Paths: -------------- tiki/osx/Makefile Modified: tiki/osx/Makefile =================================================================== --- tiki/osx/Makefile 2007-11-06 01:01:45 UTC (rev 530) +++ tiki/osx/Makefile 2007-11-06 02:14:10 UTC (rev 531) @@ -34,13 +34,13 @@ ditto -v build/Development/Tiki.framework \ ../dist/$(SVN_VERSION)/tmp/Development/Tiki.framework ditto -v ../examples/console/TikiSnake/build/Deployment/TikiSnake.app \ - ../dist/$(SVN_VERSION)/tmp/Samples + ../dist/$(SVN_VERSION)/tmp/Samples/TikiSnake.app ditto -v ../examples/events/build/Deployment/TikiEvents.app \ - ../dist/$(SVN_VERSION)/tmp/Samples + ../dist/$(SVN_VERSION)/tmp/Samples/TikiEvents.app ditto -v ../examples/menu/basic/build/Deployment/TikiBasicMenu.app \ - ../dist/$(SVN_VERSION)/tmp/Samples + ../dist/$(SVN_VERSION)/tmp/Samples/TikiBasicMenu.app ditto -v ../examples/menu/popup/build/Deployment/TikiPopupMenu.app \ - ../dist/$(SVN_VERSION)/tmp/Samples + ../dist/$(SVN_VERSION)/tmp/Samples/TikiPopupMenu.app hdiutil create -fs HFS+ \ -srcfolder "../dist/$(SVN_VERSION)/tmp" \ -volname "Tiki-r$(SVN_VERSION)" \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-11-06 01:01:48
|
Revision: 530 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=530&view=rev Author: atani Date: 2007-11-05 17:01:45 -0800 (Mon, 05 Nov 2007) Log Message: ----------- package target cleanups Modified Paths: -------------- tiki/osx/Makefile tiki/osx/Tiki.xcodeproj/project.pbxproj Modified: tiki/osx/Makefile =================================================================== --- tiki/osx/Makefile 2007-11-06 00:16:35 UTC (rev 529) +++ tiki/osx/Makefile 2007-11-06 01:01:45 UTC (rev 530) @@ -1,41 +1,51 @@ + +EXAMPLES = $(wildcard ../examples/**/*.xcodeproj) +EXAMPLES += $(wildcard ../examples/**/**/*.xcodeproj) + +$(patsubst %, _clean_dir_%, $(SUBDIRS)): + @$(MAKE) -C $(patsubst _clean_dir_%, %, $@) clean all: - xcodebuild -target Tiki -configuration Development - xcodebuild -target Tiki -configuration Deployment + xcodebuild -parallelizeTargets -target Tiki -configuration Development + xcodebuild -parallelizeTargets -target Tiki -configuration Deployment -examples: - xcodebuild -project ../examples/console/TikiSnake/TikiSnake.xcodeproj -configuration Development - xcodebuild -project ../examples/console/TikiSnake/TikiSnake.xcodeproj -configuration Deployment +examples: $(patsubst %, _example_%, $(EXAMPLES)) -clean: +$(patsubst %, _example_%, $(EXAMPLES)): + xcodebuild -parallelizeTargets -project $(patsubst _example_%, %, $@) -configuration Development + xcodebuild -parallelizeTargets -project $(patsubst _example_%, %, $@) -configuration Deployment + +clean_examples: $(patsubst %, _clean_%, $(EXAMPLES)) + +$(patsubst %, _clean_%, $(EXAMPLES)): + xcodebuild -parallelizeTargets -project $(patsubst _clean_%, %, $@) -configuration Development clean + xcodebuild -parallelizeTargets -project $(patsubst _clean_%, %, $@) -configuration Deployment clean + +clean: clean_examples -xcodebuild -target Tiki -configuration Development clean -xcodebuild -target Tiki -configuration Deployment clean - -xcodebuild -project ../examples/console/TikiSnake/TikiSnake.xcodeproj -configuration Development clean - -xcodebuild -project ../examples/console/TikiSnake/TikiSnake.xcodeproj -configuration Deployment clean package: - mkdir ../dist/$(SVN_VERSION)/tmp-debug + mkdir ../dist/$(SVN_VERSION)/tmp + mkdir ../dist/$(SVN_VERSION)/tmp/Development + mkdir ../dist/$(SVN_VERSION)/tmp/Deployment + mkdir ../dist/$(SVN_VERSION)/tmp/Samples + ditto -v build/Deployment/Tiki.framework \ + ../dist/$(SVN_VERSION)/tmp/Deployment/Tiki.framework ditto -v build/Development/Tiki.framework \ - ../dist/$(SVN_VERSION)/tmp-debug/Tiki.framework - ditto -v ../examples/console/TikiSnake/build/Development/TikiSnake.app \ - ../dist/$(SVN_VERSION)/tmp-debug/TikiSnake.app - hdiutil create -fs HFS+ \ - -srcfolder "../dist/$(SVN_VERSION)/tmp-debug" \ - -volname "Tiki-r$(SVN_VERSION)-Debug" \ - "../dist/$(SVN_VERSION)/tiki-$(SVN_VERSION)-Debug.dmg" - rm -rf ../dist/$(SVN_VERSION)/tmp-debug - hdiutil internet-enable -yes \ - "../dist/$(SVN_VERSION)/tiki-$(SVN_VERSION)-Debug.dmg" - gzip ../dist/$(SVN_VERSION)/tiki-$(SVN_VERSION)-Debug.dmg - mkdir ../dist/$(SVN_VERSION)/tmp-release - ditto -v build/Deployment/Tiki.framework \ - ../dist/$(SVN_VERSION)/tmp-release/Tiki.framework + ../dist/$(SVN_VERSION)/tmp/Development/Tiki.framework ditto -v ../examples/console/TikiSnake/build/Deployment/TikiSnake.app \ - ../dist/$(SVN_VERSION)/tmp-release/TikiSnake.app + ../dist/$(SVN_VERSION)/tmp/Samples + ditto -v ../examples/events/build/Deployment/TikiEvents.app \ + ../dist/$(SVN_VERSION)/tmp/Samples + ditto -v ../examples/menu/basic/build/Deployment/TikiBasicMenu.app \ + ../dist/$(SVN_VERSION)/tmp/Samples + ditto -v ../examples/menu/popup/build/Deployment/TikiPopupMenu.app \ + ../dist/$(SVN_VERSION)/tmp/Samples hdiutil create -fs HFS+ \ - -srcfolder "../dist/$(SVN_VERSION)/tmp-release" \ - -volname "Tiki-r$(SVN_VERSION)-Release" \ - "../dist/$(SVN_VERSION)/tiki-$(SVN_VERSION)-Release.dmg" + -srcfolder "../dist/$(SVN_VERSION)/tmp" \ + -volname "Tiki-r$(SVN_VERSION)" \ + "../dist/$(SVN_VERSION)/tiki-$(SVN_VERSION).dmg" + rm -rf ../dist/$(SVN_VERSION)/tmp hdiutil internet-enable -yes \ - "../dist/$(SVN_VERSION)/tiki-$(SVN_VERSION)-Release.dmg" - gzip ../dist/$(SVN_VERSION)/tiki-$(SVN_VERSION)-Release.dmg - rm -rf ../dist/$(SVN_VERSION)/tmp-release + "../dist/$(SVN_VERSION)/tiki-$(SVN_VERSION).dmg" + gzip ../dist/$(SVN_VERSION)/tiki-$(SVN_VERSION).dmg Modified: tiki/osx/Tiki.xcodeproj/project.pbxproj =================================================================== --- tiki/osx/Tiki.xcodeproj/project.pbxproj 2007-11-06 00:16:35 UTC (rev 529) +++ tiki/osx/Tiki.xcodeproj/project.pbxproj 2007-11-06 01:01:45 UTC (rev 530) @@ -17,6 +17,8 @@ 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 */; }; + 644D23550CDFE82D00E7F291 /* lightbarmenu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 644D23540CDFE82D00E7F291 /* lightbarmenu.cpp */; }; + 644D23570CDFE83C00E7F291 /* lightbarmenu.h in Headers */ = {isa = PBXBuildFile; fileRef = 644D23560CDFE83C00E7F291 /* lightbarmenu.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 */; }; @@ -215,6 +217,8 @@ 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; }; + 644D23540CDFE82D00E7F291 /* lightbarmenu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = lightbarmenu.cpp; path = ../src/gl/drawables/lightbarmenu.cpp; sourceTree = SOURCE_ROOT; }; + 644D23560CDFE83C00E7F291 /* lightbarmenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lightbarmenu.h; path = ../include/Tiki/drawables/lightbarmenu.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; }; @@ -1003,6 +1007,7 @@ children = ( C4F5154B079A0B9E0001D0D0 /* alphafader.cpp */, C4F5154C079A0B9E0001D0D0 /* expxymover.cpp */, + 644D23540CDFE82D00E7F291 /* lightbarmenu.cpp */, C4F5154D079A0B9E0001D0D0 /* logxymover.cpp */, C4F5154E079A0B9E0001D0D0 /* tintfader.cpp */, ); @@ -1034,6 +1039,7 @@ C4F5155B079A0BDD0001D0D0 /* gl */ = { isa = PBXGroup; children = ( + 644D23560CDFE83C00E7F291 /* lightbarmenu.h */, C4F51568079A0C480001D0D0 /* anims */, C4F51569079A0C4E0001D0D0 /* drawables */, C4F5156A079A0C560001D0D0 /* triggers */, @@ -1143,6 +1149,7 @@ 6499FE760C8623D6008D9FEF /* base64.h in Headers */, 6499FE770C8623D6008D9FEF /* date.h in Headers */, 6499FEA40C8640CA008D9FEF /* cookiejar.h in Headers */, + 644D23570CDFE83C00E7F291 /* lightbarmenu.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1366,6 +1373,7 @@ 6499FE720C8623A3008D9FEF /* date.cpp in Sources */, 6499FEA60C8640E5008D9FEF /* cookiejar.cpp in Sources */, 6400608E0CDF9DC800969916 /* init_flags_default.cpp in Sources */, + 644D23550CDFE82D00E7F291 /* lightbarmenu.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-11-06 00:16:37
|
Revision: 529 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=529&view=rev Author: atani Date: 2007-11-05 16:16:35 -0800 (Mon, 05 Nov 2007) Log Message: ----------- various fixes to the project files Modified Paths: -------------- tiki/examples/menu/basic/English.lproj/InfoPlist.strings tiki/examples/menu/basic/English.lproj/MainMenu.nib/info.nib tiki/examples/menu/basic/Info.plist tiki/examples/menu/basic/main.m Added Paths: ----------- tiki/examples/menu/popup/English.lproj/ tiki/examples/menu/popup/English.lproj/InfoPlist.strings tiki/examples/menu/popup/English.lproj/MainMenu.nib/ tiki/examples/menu/popup/English.lproj/MainMenu.nib/classes.nib tiki/examples/menu/popup/English.lproj/MainMenu.nib/info.nib tiki/examples/menu/popup/English.lproj/MainMenu.nib/keyedobjects.nib tiki/examples/menu/popup/Info.plist tiki/examples/menu/popup/main.m tiki/examples/menu/popup/popup.xcodeproj/ tiki/examples/menu/popup/popup.xcodeproj/project.pbxproj tiki/examples/menu/popup/popup_Prefix.pch tiki/examples/menu/popup/src/Controller.h tiki/examples/menu/popup/src/Controller.m tiki/examples/menu/popup/version.plist Property Changed: ---------------- tiki/examples/menu/basic/basic.xcodeproj/ tiki/examples/menu/popup/ Modified: tiki/examples/menu/basic/English.lproj/InfoPlist.strings =================================================================== (Binary files differ) Modified: tiki/examples/menu/basic/English.lproj/MainMenu.nib/info.nib =================================================================== --- tiki/examples/menu/basic/English.lproj/MainMenu.nib/info.nib 2007-11-05 20:24:01 UTC (rev 528) +++ tiki/examples/menu/basic/English.lproj/MainMenu.nib/info.nib 2007-11-06 00:16:35 UTC (rev 529) @@ -5,7 +5,7 @@ <key>IBFramework Version</key> <string>629</string> <key>IBLastKnownRelativeProjectPath</key> - <string>../../events.xcodeproj</string> + <string>../../basic.xcodeproj</string> <key>IBOldestOS</key> <integer>5</integer> <key>IBOpenObjects</key> Modified: tiki/examples/menu/basic/Info.plist =================================================================== --- tiki/examples/menu/basic/Info.plist 2007-11-05 20:24:01 UTC (rev 528) +++ tiki/examples/menu/basic/Info.plist 2007-11-06 00:16:35 UTC (rev 529) @@ -5,7 +5,7 @@ <key>CFBundleDevelopmentRegion</key> <string>English</string> <key>CFBundleExecutable</key> - <string>TikiEvents</string> + <string>TikiBasicMenu</string> <key>CFBundleIconFile</key> <string></string> <key>CFBundleIdentifier</key> Property changes on: tiki/examples/menu/basic/basic.xcodeproj ___________________________________________________________________ Name: svn:ignore + *.pbxuser *.mode1v3 Modified: tiki/examples/menu/basic/main.m =================================================================== --- tiki/examples/menu/basic/main.m 2007-11-05 20:24:01 UTC (rev 528) +++ tiki/examples/menu/basic/main.m 2007-11-06 00:16:35 UTC (rev 529) @@ -1,6 +1,6 @@ // // main.m -// TikiEvents +// TikiBasicMenu // // Created by Dan Potter on 1/11/05. // Copyright Cryptic Allusion, LLC 2005. All rights reserved. Property changes on: tiki/examples/menu/popup ___________________________________________________________________ Name: svn:ignore - Debug Release *.user *.nds *.ds.gba + build Debug Release *.user *.nds *.ds.gba Added: tiki/examples/menu/popup/English.lproj/InfoPlist.strings =================================================================== (Binary files differ) Property changes on: tiki/examples/menu/popup/English.lproj/InfoPlist.strings ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: tiki/examples/menu/popup/English.lproj/MainMenu.nib/classes.nib =================================================================== --- tiki/examples/menu/popup/English.lproj/MainMenu.nib/classes.nib (rev 0) +++ tiki/examples/menu/popup/English.lproj/MainMenu.nib/classes.nib 2007-11-06 00:16:35 UTC (rev 529) @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>IBClasses</key> + <array> + <dict> + <key>CLASS</key> + <string>FirstResponder</string> + <key>LANGUAGE</key> + <string>ObjC</string> + <key>SUPERCLASS</key> + <string>NSObject</string> + </dict> + <dict> + <key>ACTIONS</key> + <dict> + <key>fullScreen</key> + <string>id</string> + </dict> + <key>CLASS</key> + <string>Controller</string> + <key>LANGUAGE</key> + <string>ObjC</string> + <key>OUTLETS</key> + <dict> + <key>fullSceen</key> + <string>id</string> + <key>mainView</key> + <string>NSView</string> + <key>mainWindow</key> + <string>NSWindow</string> + </dict> + <key>SUPERCLASS</key> + <string>NSObject</string> + </dict> + </array> + <key>IBVersion</key> + <string>1</string> +</dict> +</plist> Added: tiki/examples/menu/popup/English.lproj/MainMenu.nib/info.nib =================================================================== --- tiki/examples/menu/popup/English.lproj/MainMenu.nib/info.nib (rev 0) +++ tiki/examples/menu/popup/English.lproj/MainMenu.nib/info.nib 2007-11-06 00:16:35 UTC (rev 529) @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>IBFramework Version</key> + <string>629</string> + <key>IBLastKnownRelativeProjectPath</key> + <string>../../popup.xcodeproj</string> + <key>IBOldestOS</key> + <integer>5</integer> + <key>IBOpenObjects</key> + <array> + <integer>24</integer> + </array> + <key>IBSystem Version</key> + <string>9A581</string> + <key>targetFramework</key> + <string>IBCocoaFramework</string> +</dict> +</plist> Added: tiki/examples/menu/popup/English.lproj/MainMenu.nib/keyedobjects.nib =================================================================== (Binary files differ) Property changes on: tiki/examples/menu/popup/English.lproj/MainMenu.nib/keyedobjects.nib ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: tiki/examples/menu/popup/Info.plist =================================================================== --- tiki/examples/menu/popup/Info.plist (rev 0) +++ tiki/examples/menu/popup/Info.plist 2007-11-06 00:16:35 UTC (rev 529) @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleExecutable</key> + <string>TikiPopupMenu</string> + <key>CFBundleIconFile</key> + <string></string> + <key>CFBundleIdentifier</key> + <string>com.apple.myCocoaApp</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>1.0</string> + <key>NSMainNibFile</key> + <string>MainMenu</string> + <key>NSPrincipalClass</key> + <string>NSApplication</string> +</dict> +</plist> Added: tiki/examples/menu/popup/main.m =================================================================== --- tiki/examples/menu/popup/main.m (rev 0) +++ tiki/examples/menu/popup/main.m 2007-11-06 00:16:35 UTC (rev 529) @@ -0,0 +1,14 @@ +// +// main.m +// TikiPopupMenu +// +// Created by Dan Potter on 1/11/05. +// Copyright Cryptic Allusion, LLC 2005. All rights reserved. +// + +#import <Cocoa/Cocoa.h> + +int main(int argc, char *argv[]) +{ + return NSApplicationMain(argc, (const char **) argv); +} Added: tiki/examples/menu/popup/popup.xcodeproj/project.pbxproj =================================================================== --- tiki/examples/menu/popup/popup.xcodeproj/project.pbxproj (rev 0) +++ tiki/examples/menu/popup/popup.xcodeproj/project.pbxproj 2007-11-06 00:16:35 UTC (rev 529) @@ -0,0 +1,342 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 42; + objects = { + +/* Begin PBXBuildFile section */ + 640060E30CDFA79800969916 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 640060E10CDFA79800969916 /* main.cpp */; }; + 640060E90CDFA7B900969916 /* Controller.m in Sources */ = {isa = PBXBuildFile; fileRef = 640060E80CDFA7B900969916 /* Controller.m */; }; + 8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; }; + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; + 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; + C4332D17079B224F0025BF39 /* Tiki.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = C4F50D800799DE840001D0D0 /* Tiki.framework */; }; + C4F50D810799DE840001D0D0 /* Tiki.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C4F50D800799DE840001D0D0 /* Tiki.framework */; }; + C4F50EEF0799E5B40001D0D0 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C4F50EEE0799E5B40001D0D0 /* OpenGL.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + C4332D16079B22450025BF39 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + C4332D17079B224F0025BF39 /* Tiki.framework in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; }; + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; + 29B97319FDCFA39411CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/MainMenu.nib; sourceTree = "<group>"; }; + 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; }; + 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; }; + 640060E10CDFA79800969916 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = src/main.cpp; sourceTree = "<group>"; }; + 640060E70CDFA7B900969916 /* Controller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Controller.h; path = src/Controller.h; sourceTree = "<group>"; }; + 640060E80CDFA7B900969916 /* Controller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Controller.m; path = src/Controller.m; sourceTree = "<group>"; }; + 648E462B0CDFE7C100ED64F6 /* popup_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = popup_Prefix.pch; sourceTree = "<group>"; }; + 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; }; + 8D1107320486CEB800E47090 /* TikiPopupMenu.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TikiPopupMenu.app; sourceTree = BUILT_PRODUCTS_DIR; }; + C4F50D800799DE840001D0D0 /* Tiki.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Tiki.framework; path = ../../../osx/build/Deployment/Tiki.framework; sourceTree = SOURCE_ROOT; }; + C4F50EEE0799E5B40001D0D0 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D11072E0486CEB800E47090 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, + C4F50D810799DE840001D0D0 /* Tiki.framework in Frameworks */, + C4F50EEF0799E5B40001D0D0 /* OpenGL.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Classes */ = { + isa = PBXGroup; + children = ( + 648E462B0CDFE7C100ED64F6 /* popup_Prefix.pch */, + 640060E70CDFA7B900969916 /* Controller.h */, + 640060E80CDFA7B900969916 /* Controller.m */, + 640060E10CDFA79800969916 /* main.cpp */, + ); + name = Classes; + sourceTree = "<group>"; + }; + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + C4F50EEE0799E5B40001D0D0 /* OpenGL.framework */, + C4F50D800799DE840001D0D0 /* Tiki.framework */, + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, + ); + name = "Linked Frameworks"; + sourceTree = "<group>"; + }; + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 29B97325FDCFA39411CA2CEA /* Foundation.framework */, + 29B97324FDCFA39411CA2CEA /* AppKit.framework */, + ); + name = "Other Frameworks"; + sourceTree = "<group>"; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D1107320486CEB800E47090 /* TikiPopupMenu.app */, + ); + name = Products; + sourceTree = "<group>"; + }; + 29B97314FDCFA39411CA2CEA /* TikiPopupMenu */ = { + isa = PBXGroup; + children = ( + 080E96DDFE201D6D7F000001 /* Classes */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = TikiPopupMenu; + sourceTree = "<group>"; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = "<group>"; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + 8D1107310486CEB800E47090 /* Info.plist */, + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, + 29B97318FDCFA39411CA2CEA /* MainMenu.nib */, + ); + name = Resources; + sourceTree = "<group>"; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = "<group>"; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D1107260486CEB800E47090 /* TikiPopupMenu */ = { + isa = PBXNativeTarget; + buildConfigurationList = 64FBB927092EA33F00427AD0 /* Build configuration list for PBXNativeTarget "TikiPopupMenu" */; + buildPhases = ( + 8D1107290486CEB800E47090 /* Resources */, + 8D11072C0486CEB800E47090 /* Sources */, + 8D11072E0486CEB800E47090 /* Frameworks */, + C4332D16079B22450025BF39 /* CopyFiles */, + C4332EE0079B242E0025BF39 /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = TikiPopupMenu; + productInstallPath = "$(HOME)/Applications"; + productName = TikiPopupMenu; + productReference = 8D1107320486CEB800E47090 /* TikiPopupMenu.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 64FBB92B092EA33F00427AD0 /* Build configuration list for PBXProject "popup" */; + compatibilityVersion = "Xcode 2.4"; + hasScannedForEncodings = 1; + mainGroup = 29B97314FDCFA39411CA2CEA /* TikiPopupMenu */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8D1107260486CEB800E47090 /* TikiPopupMenu */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D1107290486CEB800E47090 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */, + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + C4332EE0079B242E0025BF39 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "# rm -rfv ${EXECUTABLE_FOLDER_PATH}/PrivateHeaders\n"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D11072C0486CEB800E47090 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072D0486CEB800E47090 /* main.m in Sources */, + 640060E30CDFA79800969916 /* main.cpp in Sources */, + 640060E90CDFA7B900969916 /* Controller.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C165DFE840E0CC02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = "<group>"; + }; + 29B97318FDCFA39411CA2CEA /* MainMenu.nib */ = { + isa = PBXVariantGroup; + children = ( + 29B97319FDCFA39411CA2CEA /* English */, + ); + name = MainMenu.nib; + sourceTree = "<group>"; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 64FBB928092EA33F00427AD0 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(NATIVE_ARCH)"; + COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS = ../../../osx/build/Development/; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = popup_Prefix.pch; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PREBINDING = NO; + PRODUCT_NAME = TikiPopupMenu; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Development; + }; + 64FBB929092EA33F00427AD0 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(NATIVE_ARCH)"; + COPY_PHASE_STRIP = YES; + FRAMEWORK_SEARCH_PATHS = ../../../osx/build/Deployment/; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = popup_Prefix.pch; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = TikiPopupMenu; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Deployment; + }; + 64FBB92C092EA33F00427AD0 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + HEADER_SEARCH_PATHS = ( + ../../../include, + ../../../osx/include, + /sw/include, + ../../../3rdparty/boost, + ); + MACOSX_DEPLOYMENT_TARGET = 10.3; + SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + }; + name = Development; + }; + 64FBB92D092EA33F00427AD0 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + HEADER_SEARCH_PATHS = ( + ../../../include, + ../../../osx/include, + /sw/include, + ../../../3rdparty/boost, + ); + MACOSX_DEPLOYMENT_TARGET = 10.3; + SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + }; + name = Deployment; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 64FBB927092EA33F00427AD0 /* Build configuration list for PBXNativeTarget "TikiPopupMenu" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 64FBB928092EA33F00427AD0 /* Development */, + 64FBB929092EA33F00427AD0 /* Deployment */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Development; + }; + 64FBB92B092EA33F00427AD0 /* Build configuration list for PBXProject "popup" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 64FBB92C092EA33F00427AD0 /* Development */, + 64FBB92D092EA33F00427AD0 /* Deployment */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Development; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} Added: tiki/examples/menu/popup/popup_Prefix.pch =================================================================== --- tiki/examples/menu/popup/popup_Prefix.pch (rev 0) +++ tiki/examples/menu/popup/popup_Prefix.pch 2007-11-06 00:16:35 UTC (rev 529) @@ -0,0 +1,7 @@ +// +// Prefix header for all source files of the 'TikiTest' target in the 'TikiTest' project +// + +#ifdef __OBJC__ + #import <Cocoa/Cocoa.h> +#endif Added: tiki/examples/menu/popup/src/Controller.h =================================================================== --- tiki/examples/menu/popup/src/Controller.h (rev 0) +++ tiki/examples/menu/popup/src/Controller.h 2007-11-06 00:16:35 UTC (rev 529) @@ -0,0 +1,15 @@ +/* Controller */ + +#import <Cocoa/Cocoa.h> +#import <Tiki/TikiMain.h> + +@interface Controller : NSObject { + IBOutlet NSView *mainView; + IBOutlet NSWindow *mainWindow; + + TikiMain * tm; + NSString * openFileName; +} + +- (IBAction)fullScreen: (id)sender; +@end Added: tiki/examples/menu/popup/src/Controller.m =================================================================== --- tiki/examples/menu/popup/src/Controller.m (rev 0) +++ tiki/examples/menu/popup/src/Controller.m 2007-11-06 00:16:35 UTC (rev 529) @@ -0,0 +1,44 @@ +#import "Controller.h" +#import <Tiki/TikiMain.h> +#import <assert.h> + +void tiki_main(); + +@implementation Controller +- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename +{ + openFileName = filename; +} + +- (void) applicationDidFinishLaunching: (NSNotification *) note +{ + TikiMain * otm = [[TikiMain alloc] retain]; + tm = otm; + [tm doMainWithWindow: mainWindow andView: mainView andMainFunc: tiki_main andOpenFile:openFileName]; + tm = nil; + [otm release]; +} + +- (NSApplicationTerminateReply) applicationShouldTerminate: (NSApplication *)sender +{ + assert( tm ); + [tm quitSoon]; + return NSTerminateNow; +} + +- (BOOL) applicationShouldTerminateAfterLastWindowClosed: (NSApplication *)theApplication +{ + return YES; +} + +- (IBAction)fullScreen: (id) sender +{ + if( [mainView isInFullScreenMode] == YES ) { + [mainView exitFullScreenModeWithOptions: nil]; + } + else { + [mainView enterFullScreenMode:[NSScreen mainScreen] withOptions:nil]; + } +} + +@end Added: tiki/examples/menu/popup/version.plist =================================================================== --- tiki/examples/menu/popup/version.plist (rev 0) +++ tiki/examples/menu/popup/version.plist 2007-11-06 00:16:35 UTC (rev 529) @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>BuildVersion</key> + <string>92</string> + <key>CFBundleVersion</key> + <string>1.0</string> + <key>ProductBuildVersion</key> + <string>7K571</string> + <key>ProjectName</key> + <string>NibPBTemplates</string> + <key>SourceVersion</key> + <string>1200000</string> +</dict> +</plist> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-11-05 20:24:05
|
Revision: 528 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=528&view=rev Author: atani Date: 2007-11-05 12:24:01 -0800 (Mon, 05 Nov 2007) Log Message: ----------- preliminary full screen support for TikiSnake and events samples preliminary project for basic menu sample Modified Paths: -------------- tiki/examples/console/TikiSnake/English.lproj/MainMenu.nib/classes.nib tiki/examples/console/TikiSnake/English.lproj/MainMenu.nib/info.nib tiki/examples/console/TikiSnake/TikiSnake.xcodeproj/project.pbxproj tiki/examples/console/TikiSnake/src/Controller.h tiki/examples/console/TikiSnake/src/Controller.m tiki/examples/events/English.lproj/MainMenu.nib/classes.nib tiki/examples/events/English.lproj/MainMenu.nib/info.nib tiki/examples/events/events.xcodeproj/project.pbxproj tiki/examples/events/src/Controller.h tiki/examples/events/src/Controller.m tiki/osx/Tiki.xcodeproj/project.pbxproj tiki/osx/src/TikiMain.m tiki/src/base/debug.cpp Added Paths: ----------- tiki/examples/console/TikiSnake/English.lproj/MainMenu.nib/keyedobjects.nib tiki/examples/events/English.lproj/MainMenu.nib/keyedobjects.nib tiki/examples/menu/basic/English.lproj/ tiki/examples/menu/basic/English.lproj/InfoPlist.strings tiki/examples/menu/basic/English.lproj/MainMenu.nib/ tiki/examples/menu/basic/English.lproj/MainMenu.nib/classes.nib tiki/examples/menu/basic/English.lproj/MainMenu.nib/info.nib tiki/examples/menu/basic/English.lproj/MainMenu.nib/keyedobjects.nib tiki/examples/menu/basic/Info.plist tiki/examples/menu/basic/basic.xcodeproj/ tiki/examples/menu/basic/basic.xcodeproj/project.pbxproj tiki/examples/menu/basic/basic_Prefix.pch tiki/examples/menu/basic/main.m tiki/examples/menu/basic/src/Controller.h tiki/examples/menu/basic/src/Controller.m tiki/examples/menu/basic/version.plist Property Changed: ---------------- tiki/examples/console/TikiSnake/ tiki/examples/console/TikiSnake/TikiSnake.xcodeproj/ tiki/examples/events/ tiki/examples/events/events.xcodeproj/ tiki/examples/menu/basic/ tiki/osx/ tiki/osx/Tiki.xcodeproj/ Property changes on: tiki/examples/console/TikiSnake ___________________________________________________________________ Name: svn:ignore - Debug Release *.user *.nds *.ds.gba *.elf tikisnake + Debug Release *.user *.nds *.ds.gba *.elf tikisnake build Modified: tiki/examples/console/TikiSnake/English.lproj/MainMenu.nib/classes.nib =================================================================== --- tiki/examples/console/TikiSnake/English.lproj/MainMenu.nib/classes.nib 2007-11-05 17:08:21 UTC (rev 527) +++ tiki/examples/console/TikiSnake/English.lproj/MainMenu.nib/classes.nib 2007-11-05 20:24:01 UTC (rev 528) @@ -1,12 +1,41 @@ -{ - IBClasses = ( - { - CLASS = Controller; - LANGUAGE = ObjC; - OUTLETS = {mainView = NSView; mainWindow = NSWindow; }; - SUPERCLASS = NSObject; - }, - {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; } - ); - IBVersion = 1; -} \ No newline at end of file +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>IBClasses</key> + <array> + <dict> + <key>CLASS</key> + <string>FirstResponder</string> + <key>LANGUAGE</key> + <string>ObjC</string> + <key>SUPERCLASS</key> + <string>NSObject</string> + </dict> + <dict> + <key>ACTIONS</key> + <dict> + <key>fullScreen</key> + <string>id</string> + </dict> + <key>CLASS</key> + <string>Controller</string> + <key>LANGUAGE</key> + <string>ObjC</string> + <key>OUTLETS</key> + <dict> + <key>fullScreen</key> + <string>id</string> + <key>mainView</key> + <string>NSView</string> + <key>mainWindow</key> + <string>NSWindow</string> + </dict> + <key>SUPERCLASS</key> + <string>NSObject</string> + </dict> + </array> + <key>IBVersion</key> + <string>1</string> +</dict> +</plist> Modified: tiki/examples/console/TikiSnake/English.lproj/MainMenu.nib/info.nib =================================================================== --- tiki/examples/console/TikiSnake/English.lproj/MainMenu.nib/info.nib 2007-11-05 17:08:21 UTC (rev 527) +++ tiki/examples/console/TikiSnake/English.lproj/MainMenu.nib/info.nib 2007-11-05 20:24:01 UTC (rev 528) @@ -1,22 +1,20 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> - <key>IBDocumentLocation</key> - <string>87 99 356 240 0 0 1280 1002 </string> - <key>IBEditorPositions</key> - <dict> - <key>29</key> - <string>94 344 338 44 0 0 1280 1002 </string> - </dict> <key>IBFramework Version</key> - <string>443.0</string> + <string>629</string> + <key>IBLastKnownRelativeProjectPath</key> + <string>../../TikiSnake.xcodeproj</string> + <key>IBOldestOS</key> + <integer>5</integer> <key>IBOpenObjects</key> <array> - <integer>21</integer> <integer>29</integer> </array> <key>IBSystem Version</key> - <string>8I127</string> + <string>9A581</string> + <key>targetFramework</key> + <string>IBCocoaFramework</string> </dict> </plist> Added: tiki/examples/console/TikiSnake/English.lproj/MainMenu.nib/keyedobjects.nib =================================================================== (Binary files differ) Property changes on: tiki/examples/console/TikiSnake/English.lproj/MainMenu.nib/keyedobjects.nib ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Property changes on: tiki/examples/console/TikiSnake/TikiSnake.xcodeproj ___________________________________________________________________ Name: svn:ignore + *.pbxuser *.mode1v3 Modified: tiki/examples/console/TikiSnake/TikiSnake.xcodeproj/project.pbxproj =================================================================== --- tiki/examples/console/TikiSnake/TikiSnake.xcodeproj/project.pbxproj 2007-11-05 17:08:21 UTC (rev 527) +++ tiki/examples/console/TikiSnake/TikiSnake.xcodeproj/project.pbxproj 2007-11-05 20:24:01 UTC (rev 528) @@ -19,31 +19,6 @@ C4F50EEF0799E5B40001D0D0 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C4F50EEE0799E5B40001D0D0 /* OpenGL.framework */; }; /* End PBXBuildFile section */ -/* Begin PBXBuildStyle section */ - 4A9504CCFFE6A4B311CA0CBA /* Development */ = { - isa = PBXBuildStyle; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - PREBINDING = NO; - ZERO_LINK = NO; - }; - name = Development; - }; - 4A9504CDFFE6A4B311CA0CBA /* Deployment */ = { - isa = PBXBuildStyle; - buildSettings = { - COPY_PHASE_STRIP = YES; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - ZERO_LINK = NO; - }; - name = Deployment; - }; -/* End PBXBuildStyle section */ - /* Begin PBXCopyFilesBuildPhase section */ C4332D16079B22450025BF39 /* CopyFiles */ = { isa = PBXCopyFilesBuildPhase; @@ -182,16 +157,6 @@ ); buildRules = ( ); - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ../../osx/build; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = TikiSnake_Prefix.pch; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(HOME)/Applications"; - PRODUCT_NAME = TikiSnake; - WRAPPER_EXTENSION = app; - }; dependencies = ( ); name = TikiSnake; @@ -206,15 +171,11 @@ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; buildConfigurationList = 64FBB92B092EA33F00427AD0 /* Build configuration list for PBXProject "TikiSnake" */; - buildSettings = { - }; - buildStyles = ( - 4A9504CCFFE6A4B311CA0CBA /* Development */, - 4A9504CDFFE6A4B311CA0CBA /* Deployment */, - ); + compatibilityVersion = "Xcode 2.4"; hasScannedForEncodings = 1; mainGroup = 29B97314FDCFA39411CA2CEA /* TikiSnake */; projectDirPath = ""; + projectRoot = ""; targets = ( 8D1107260486CEB800E47090 /* TikiSnake */, ); @@ -349,36 +310,45 @@ 64FBB92C092EA33F00427AD0 /* Development */ = { isa = XCBuildConfiguration; buildSettings = { + ARCHS = "$(NATIVE_ARCH)"; HEADER_SEARCH_PATHS = ( ../../include, ../../osx/include, /sw/include, ../../3rdparty/boost, ); + MACOSX_DEPLOYMENT_TARGET = 10.3; + SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; }; name = Development; }; 64FBB92D092EA33F00427AD0 /* Deployment */ = { isa = XCBuildConfiguration; buildSettings = { + ARCHS = "$(NATIVE_ARCH)"; HEADER_SEARCH_PATHS = ( ../../include, ../../osx/include, /sw/include, ../../3rdparty/boost, ); + MACOSX_DEPLOYMENT_TARGET = 10.3; + SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; }; name = Deployment; }; 64FBB92E092EA33F00427AD0 /* Default */ = { isa = XCBuildConfiguration; buildSettings = { + ARCHS = "$(NATIVE_ARCH)"; HEADER_SEARCH_PATHS = ( ../../include, ../../osx/include, /sw/include, ../../3rdparty/boost, ); + MACOSX_DEPLOYMENT_TARGET = 10.3; + SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; }; name = Default; }; Modified: tiki/examples/console/TikiSnake/src/Controller.h =================================================================== --- tiki/examples/console/TikiSnake/src/Controller.h 2007-11-05 17:08:21 UTC (rev 527) +++ tiki/examples/console/TikiSnake/src/Controller.h 2007-11-05 20:24:01 UTC (rev 528) @@ -9,4 +9,6 @@ TikiMain * tm; } + +- (IBAction)fullScreen: (id)sender; @end Modified: tiki/examples/console/TikiSnake/src/Controller.m =================================================================== --- tiki/examples/console/TikiSnake/src/Controller.m 2007-11-05 17:08:21 UTC (rev 527) +++ tiki/examples/console/TikiSnake/src/Controller.m 2007-11-05 20:24:01 UTC (rev 528) @@ -9,7 +9,11 @@ - (void) applicationDidFinishLaunching: (NSNotification *) note { NSString * resPath = [[NSBundle mainBundle] resourcePath]; +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 + chdir([resPath UTF8String]); +#else chdir([resPath cString]); +#endif TikiMain * otm = [[TikiMain alloc] retain]; tm = otm; [tm doMainWithWindow: mainWindow andView: mainView andMainFunc: tiki_main]; @@ -29,4 +33,14 @@ return YES; } +- (IBAction)fullScreen: (id) sender +{ + if( [mainView isInFullScreenMode] == YES ) { + [mainView exitFullScreenModeWithOptions: nil]; + } + else { + [mainView enterFullScreenMode:[NSScreen mainScreen] withOptions:nil]; + } +} + @end Property changes on: tiki/examples/events ___________________________________________________________________ Name: svn:ignore - Debug Release *.user *.nds *.ds.gba + Debug Release build *.user *.nds *.ds.gba Modified: tiki/examples/events/English.lproj/MainMenu.nib/classes.nib =================================================================== --- tiki/examples/events/English.lproj/MainMenu.nib/classes.nib 2007-11-05 17:08:21 UTC (rev 527) +++ tiki/examples/events/English.lproj/MainMenu.nib/classes.nib 2007-11-05 20:24:01 UTC (rev 528) @@ -1,12 +1,41 @@ -{ - IBClasses = ( - { - CLASS = Controller; - LANGUAGE = ObjC; - OUTLETS = {mainView = NSView; mainWindow = NSWindow; }; - SUPERCLASS = NSObject; - }, - {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; } - ); - IBVersion = 1; -} \ No newline at end of file +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>IBClasses</key> + <array> + <dict> + <key>CLASS</key> + <string>FirstResponder</string> + <key>LANGUAGE</key> + <string>ObjC</string> + <key>SUPERCLASS</key> + <string>NSObject</string> + </dict> + <dict> + <key>ACTIONS</key> + <dict> + <key>fullScreen</key> + <string>id</string> + </dict> + <key>CLASS</key> + <string>Controller</string> + <key>LANGUAGE</key> + <string>ObjC</string> + <key>OUTLETS</key> + <dict> + <key>fullSceen</key> + <string>id</string> + <key>mainView</key> + <string>NSView</string> + <key>mainWindow</key> + <string>NSWindow</string> + </dict> + <key>SUPERCLASS</key> + <string>NSObject</string> + </dict> + </array> + <key>IBVersion</key> + <string>1</string> +</dict> +</plist> Modified: tiki/examples/events/English.lproj/MainMenu.nib/info.nib =================================================================== --- tiki/examples/events/English.lproj/MainMenu.nib/info.nib 2007-11-05 17:08:21 UTC (rev 527) +++ tiki/examples/events/English.lproj/MainMenu.nib/info.nib 2007-11-05 20:24:01 UTC (rev 528) @@ -1,22 +1,20 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> - <key>IBDocumentLocation</key> - <string>87 99 356 240 0 0 1280 1002 </string> - <key>IBEditorPositions</key> - <dict> - <key>29</key> - <string>94 344 338 44 0 0 1280 1002 </string> - </dict> <key>IBFramework Version</key> - <string>437.0</string> + <string>629</string> + <key>IBLastKnownRelativeProjectPath</key> + <string>../../events.xcodeproj</string> + <key>IBOldestOS</key> + <integer>5</integer> <key>IBOpenObjects</key> <array> - <integer>29</integer> - <integer>21</integer> + <integer>24</integer> </array> <key>IBSystem Version</key> - <string>8A428</string> + <string>9A581</string> + <key>targetFramework</key> + <string>IBCocoaFramework</string> </dict> </plist> Added: tiki/examples/events/English.lproj/MainMenu.nib/keyedobjects.nib =================================================================== (Binary files differ) Property changes on: tiki/examples/events/English.lproj/MainMenu.nib/keyedobjects.nib ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Property changes on: tiki/examples/events/events.xcodeproj ___________________________________________________________________ Name: svn:ignore + *.pbxuser *.mode1v3 Modified: tiki/examples/events/events.xcodeproj/project.pbxproj =================================================================== --- tiki/examples/events/events.xcodeproj/project.pbxproj 2007-11-05 17:08:21 UTC (rev 527) +++ tiki/examples/events/events.xcodeproj/project.pbxproj 2007-11-05 20:24:01 UTC (rev 528) @@ -172,10 +172,12 @@ /* Begin PBXProject section */ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; - buildConfigurationList = 64FBB92B092EA33F00427AD0 /* Build configuration list for PBXProject "TikiEvents" */; + buildConfigurationList = 64FBB92B092EA33F00427AD0 /* Build configuration list for PBXProject "events" */; + compatibilityVersion = "Xcode 2.4"; hasScannedForEncodings = 1; mainGroup = 29B97314FDCFA39411CA2CEA /* TikiEvents */; projectDirPath = ""; + projectRoot = ""; targets = ( 8D1107260486CEB800E47090 /* TikiEvents */, ); @@ -247,6 +249,7 @@ 64FBB928092EA33F00427AD0 /* Development */ = { isa = XCBuildConfiguration; buildSettings = { + ARCHS = "$(NATIVE_ARCH)"; COPY_PHASE_STRIP = NO; FRAMEWORK_SEARCH_PATHS = ../../osx/build/Development/; GCC_DYNAMIC_NO_PIC = NO; @@ -267,6 +270,7 @@ 64FBB929092EA33F00427AD0 /* Deployment */ = { isa = XCBuildConfiguration; buildSettings = { + ARCHS = "$(NATIVE_ARCH)"; COPY_PHASE_STRIP = YES; FRAMEWORK_SEARCH_PATHS = ../../osx/build/Deployment/; GCC_ENABLE_FIX_AND_CONTINUE = NO; @@ -284,6 +288,7 @@ 64FBB92A092EA33F00427AD0 /* Default */ = { isa = XCBuildConfiguration; buildSettings = { + ARCHS = "$(NATIVE_ARCH)"; FRAMEWORK_SEARCH_PATHS = ../../osx/build/Development/; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -350,7 +355,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Default; }; - 64FBB92B092EA33F00427AD0 /* Build configuration list for PBXProject "TikiEvents" */ = { + 64FBB92B092EA33F00427AD0 /* Build configuration list for PBXProject "events" */ = { isa = XCConfigurationList; buildConfigurations = ( 64FBB92C092EA33F00427AD0 /* Development */, Modified: tiki/examples/events/src/Controller.h =================================================================== --- tiki/examples/events/src/Controller.h 2007-11-05 17:08:21 UTC (rev 527) +++ tiki/examples/events/src/Controller.h 2007-11-05 20:24:01 UTC (rev 528) @@ -10,4 +10,6 @@ TikiMain * tm; NSString * openFileName; } + +- (IBAction)fullScreen: (id)sender; @end Modified: tiki/examples/events/src/Controller.m =================================================================== --- tiki/examples/events/src/Controller.m 2007-11-05 17:08:21 UTC (rev 527) +++ tiki/examples/events/src/Controller.m 2007-11-05 20:24:01 UTC (rev 528) @@ -31,4 +31,14 @@ return YES; } +- (IBAction)fullScreen: (id) sender +{ + if( [mainView isInFullScreenMode] == YES ) { + [mainView exitFullScreenModeWithOptions: nil]; + } + else { + [mainView enterFullScreenMode:[NSScreen mainScreen] withOptions:nil]; + } +} + @end Property changes on: tiki/examples/menu/basic ___________________________________________________________________ Name: svn:ignore - Debug Release *.user *.nds *.ds.gba + Debug Release build *.user *.nds *.ds.gba Added: tiki/examples/menu/basic/English.lproj/InfoPlist.strings =================================================================== (Binary files differ) Property changes on: tiki/examples/menu/basic/English.lproj/InfoPlist.strings ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: tiki/examples/menu/basic/English.lproj/MainMenu.nib/classes.nib =================================================================== --- tiki/examples/menu/basic/English.lproj/MainMenu.nib/classes.nib (rev 0) +++ tiki/examples/menu/basic/English.lproj/MainMenu.nib/classes.nib 2007-11-05 20:24:01 UTC (rev 528) @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>IBClasses</key> + <array> + <dict> + <key>CLASS</key> + <string>FirstResponder</string> + <key>LANGUAGE</key> + <string>ObjC</string> + <key>SUPERCLASS</key> + <string>NSObject</string> + </dict> + <dict> + <key>ACTIONS</key> + <dict> + <key>fullScreen</key> + <string>id</string> + </dict> + <key>CLASS</key> + <string>Controller</string> + <key>LANGUAGE</key> + <string>ObjC</string> + <key>OUTLETS</key> + <dict> + <key>fullSceen</key> + <string>id</string> + <key>mainView</key> + <string>NSView</string> + <key>mainWindow</key> + <string>NSWindow</string> + </dict> + <key>SUPERCLASS</key> + <string>NSObject</string> + </dict> + </array> + <key>IBVersion</key> + <string>1</string> +</dict> +</plist> Added: tiki/examples/menu/basic/English.lproj/MainMenu.nib/info.nib =================================================================== --- tiki/examples/menu/basic/English.lproj/MainMenu.nib/info.nib (rev 0) +++ tiki/examples/menu/basic/English.lproj/MainMenu.nib/info.nib 2007-11-05 20:24:01 UTC (rev 528) @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>IBFramework Version</key> + <string>629</string> + <key>IBLastKnownRelativeProjectPath</key> + <string>../../events.xcodeproj</string> + <key>IBOldestOS</key> + <integer>5</integer> + <key>IBOpenObjects</key> + <array> + <integer>24</integer> + </array> + <key>IBSystem Version</key> + <string>9A581</string> + <key>targetFramework</key> + <string>IBCocoaFramework</string> +</dict> +</plist> Added: tiki/examples/menu/basic/English.lproj/MainMenu.nib/keyedobjects.nib =================================================================== (Binary files differ) Property changes on: tiki/examples/menu/basic/English.lproj/MainMenu.nib/keyedobjects.nib ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: tiki/examples/menu/basic/Info.plist =================================================================== --- tiki/examples/menu/basic/Info.plist (rev 0) +++ tiki/examples/menu/basic/Info.plist 2007-11-05 20:24:01 UTC (rev 528) @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleExecutable</key> + <string>TikiEvents</string> + <key>CFBundleIconFile</key> + <string></string> + <key>CFBundleIdentifier</key> + <string>com.apple.myCocoaApp</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>1.0</string> + <key>NSMainNibFile</key> + <string>MainMenu</string> + <key>NSPrincipalClass</key> + <string>NSApplication</string> +</dict> +</plist> Added: tiki/examples/menu/basic/basic.xcodeproj/project.pbxproj =================================================================== --- tiki/examples/menu/basic/basic.xcodeproj/project.pbxproj (rev 0) +++ tiki/examples/menu/basic/basic.xcodeproj/project.pbxproj 2007-11-05 20:24:01 UTC (rev 528) @@ -0,0 +1,340 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 42; + objects = { + +/* Begin PBXBuildFile section */ + 640060E30CDFA79800969916 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 640060E10CDFA79800969916 /* main.cpp */; }; + 640060E90CDFA7B900969916 /* Controller.m in Sources */ = {isa = PBXBuildFile; fileRef = 640060E80CDFA7B900969916 /* Controller.m */; }; + 8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; }; + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; + 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; + C4332D17079B224F0025BF39 /* Tiki.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = C4F50D800799DE840001D0D0 /* Tiki.framework */; }; + C4F50D810799DE840001D0D0 /* Tiki.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C4F50D800799DE840001D0D0 /* Tiki.framework */; }; + C4F50EEF0799E5B40001D0D0 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C4F50EEE0799E5B40001D0D0 /* OpenGL.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + C4332D16079B22450025BF39 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + C4332D17079B224F0025BF39 /* Tiki.framework in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; }; + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; + 29B97319FDCFA39411CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/MainMenu.nib; sourceTree = "<group>"; }; + 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; }; + 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; }; + 640060E10CDFA79800969916 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = src/main.cpp; sourceTree = "<group>"; }; + 640060E70CDFA7B900969916 /* Controller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Controller.h; path = src/Controller.h; sourceTree = "<group>"; }; + 640060E80CDFA7B900969916 /* Controller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Controller.m; path = src/Controller.m; sourceTree = "<group>"; }; + 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; }; + 8D1107320486CEB800E47090 /* TikiBasicMenu.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TikiBasicMenu.app; sourceTree = BUILT_PRODUCTS_DIR; }; + C4F50D800799DE840001D0D0 /* Tiki.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Tiki.framework; path = ../../../osx/build/Deployment/Tiki.framework; sourceTree = SOURCE_ROOT; }; + C4F50EEE0799E5B40001D0D0 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D11072E0486CEB800E47090 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, + C4F50D810799DE840001D0D0 /* Tiki.framework in Frameworks */, + C4F50EEF0799E5B40001D0D0 /* OpenGL.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Classes */ = { + isa = PBXGroup; + children = ( + 640060E70CDFA7B900969916 /* Controller.h */, + 640060E80CDFA7B900969916 /* Controller.m */, + 640060E10CDFA79800969916 /* main.cpp */, + ); + name = Classes; + sourceTree = "<group>"; + }; + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + C4F50EEE0799E5B40001D0D0 /* OpenGL.framework */, + C4F50D800799DE840001D0D0 /* Tiki.framework */, + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, + ); + name = "Linked Frameworks"; + sourceTree = "<group>"; + }; + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 29B97325FDCFA39411CA2CEA /* Foundation.framework */, + 29B97324FDCFA39411CA2CEA /* AppKit.framework */, + ); + name = "Other Frameworks"; + sourceTree = "<group>"; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D1107320486CEB800E47090 /* TikiBasicMenu.app */, + ); + name = Products; + sourceTree = "<group>"; + }; + 29B97314FDCFA39411CA2CEA /* TikiBasicMenu */ = { + isa = PBXGroup; + children = ( + 080E96DDFE201D6D7F000001 /* Classes */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = TikiBasicMenu; + sourceTree = "<group>"; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = "<group>"; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + 8D1107310486CEB800E47090 /* Info.plist */, + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, + 29B97318FDCFA39411CA2CEA /* MainMenu.nib */, + ); + name = Resources; + sourceTree = "<group>"; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = "<group>"; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D1107260486CEB800E47090 /* TikiBasicMenu */ = { + isa = PBXNativeTarget; + buildConfigurationList = 64FBB927092EA33F00427AD0 /* Build configuration list for PBXNativeTarget "TikiBasicMenu" */; + buildPhases = ( + 8D1107290486CEB800E47090 /* Resources */, + 8D11072C0486CEB800E47090 /* Sources */, + 8D11072E0486CEB800E47090 /* Frameworks */, + C4332D16079B22450025BF39 /* CopyFiles */, + C4332EE0079B242E0025BF39 /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = TikiBasicMenu; + productInstallPath = "$(HOME)/Applications"; + productName = TikiBasicMenu; + productReference = 8D1107320486CEB800E47090 /* TikiBasicMenu.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 64FBB92B092EA33F00427AD0 /* Build configuration list for PBXProject "basic" */; + compatibilityVersion = "Xcode 2.4"; + hasScannedForEncodings = 1; + mainGroup = 29B97314FDCFA39411CA2CEA /* TikiBasicMenu */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8D1107260486CEB800E47090 /* TikiBasicMenu */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D1107290486CEB800E47090 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */, + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + C4332EE0079B242E0025BF39 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "# rm -rfv ${EXECUTABLE_FOLDER_PATH}/PrivateHeaders\n"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D11072C0486CEB800E47090 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072D0486CEB800E47090 /* main.m in Sources */, + 640060E30CDFA79800969916 /* main.cpp in Sources */, + 640060E90CDFA7B900969916 /* Controller.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C165DFE840E0CC02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = "<group>"; + }; + 29B97318FDCFA39411CA2CEA /* MainMenu.nib */ = { + isa = PBXVariantGroup; + children = ( + 29B97319FDCFA39411CA2CEA /* English */, + ); + name = MainMenu.nib; + sourceTree = "<group>"; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 64FBB928092EA33F00427AD0 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(NATIVE_ARCH)"; + COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS = ../../../osx/build/Development/; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = basic_Prefix.pch; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PREBINDING = NO; + PRODUCT_NAME = TikiBasicMenu; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Development; + }; + 64FBB929092EA33F00427AD0 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(NATIVE_ARCH)"; + COPY_PHASE_STRIP = YES; + FRAMEWORK_SEARCH_PATHS = ../../../osx/build/Deployment/; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = basic_Prefix.pch; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = TikiBasicMenu; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Deployment; + }; + 64FBB92C092EA33F00427AD0 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + HEADER_SEARCH_PATHS = ( + ../../../include, + ../../../osx/include, + /sw/include, + ../../../3rdparty/boost, + ); + MACOSX_DEPLOYMENT_TARGET = 10.3; + SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + }; + name = Development; + }; + 64FBB92D092EA33F00427AD0 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + HEADER_SEARCH_PATHS = ( + ../../../include, + ../../../osx/include, + /sw/include, + ../../../3rdparty/boost, + ); + MACOSX_DEPLOYMENT_TARGET = 10.3; + SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + }; + name = Deployment; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 64FBB927092EA33F00427AD0 /* Build configuration list for PBXNativeTarget "TikiBasicMenu" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 64FBB928092EA33F00427AD0 /* Development */, + 64FBB929092EA33F00427AD0 /* Deployment */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Development; + }; + 64FBB92B092EA33F00427AD0 /* Build configuration list for PBXProject "basic" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 64FBB92C092EA33F00427AD0 /* Development */, + 64FBB92D092EA33F00427AD0 /* Deployment */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Development; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} Added: tiki/examples/menu/basic/basic_Prefix.pch =================================================================== --- tiki/examples/menu/basic/basic_Prefix.pch (rev 0) +++ tiki/examples/menu/basic/basic_Prefix.pch 2007-11-05 20:24:01 UTC (rev 528) @@ -0,0 +1,7 @@ +// +// Prefix header for all source files of the 'TikiTest' target in the 'TikiTest' project +// + +#ifdef __OBJC__ + #import <Cocoa/Cocoa.h> +#endif Added: tiki/examples/menu/basic/main.m =================================================================== --- tiki/examples/menu/basic/main.m (rev 0) +++ tiki/examples/menu/basic/main.m 2007-11-05 20:24:01 UTC (rev 528) @@ -0,0 +1,14 @@ +// +// main.m +// TikiEvents +// +// Created by Dan Potter on 1/11/05. +// Copyright Cryptic Allusion, LLC 2005. All rights reserved. +// + +#import <Cocoa/Cocoa.h> + +int main(int argc, char *argv[]) +{ + return NSApplicationMain(argc, (const char **) argv); +} Added: tiki/examples/menu/basic/src/Controller.h =================================================================== --- tiki/examples/menu/basic/src/Controller.h (rev 0) +++ tiki/examples/menu/basic/src/Controller.h 2007-11-05 20:24:01 UTC (rev 528) @@ -0,0 +1,15 @@ +/* Controller */ + +#import <Cocoa/Cocoa.h> +#import <Tiki/TikiMain.h> + +@interface Controller : NSObject { + IBOutlet NSView *mainView; + IBOutlet NSWindow *mainWindow; + + TikiMain * tm; + NSString * openFileName; +} + +- (IBAction)fullScreen: (id)sender; +@end Added: tiki/examples/menu/basic/src/Controller.m =================================================================== --- tiki/examples/menu/basic/src/Controller.m (rev 0) +++ tiki/examples/menu/basic/src/Controller.m 2007-11-05 20:24:01 UTC (rev 528) @@ -0,0 +1,44 @@ +#import "Controller.h" +#import <Tiki/TikiMain.h> +#import <assert.h> + +void tiki_main(); + +@implementation Controller +- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename +{ + openFileName = filename; +} + +- (void) applicationDidFinishLaunching: (NSNotification *) note +{ + TikiMain * otm = [[TikiMain alloc] retain]; + tm = otm; + [tm doMainWithWindow: mainWindow andView: mainView andMainFunc: tiki_main andOpenFile:openFileName]; + tm = nil; + [otm release]; +} + +- (NSApplicationTerminateReply) applicationShouldTerminate: (NSApplication *)sender +{ + assert( tm ); + [tm quitSoon]; + return NSTerminateNow; +} + +- (BOOL) applicationShouldTerminateAfterLastWindowClosed: (NSApplication *)theApplication +{ + return YES; +} + +- (IBAction)fullScreen: (id) sender +{ + if( [mainView isInFullScreenMode] == YES ) { + [mainView exitFullScreenModeWithOptions: nil]; + } + else { + [mainView enterFullScreenMode:[NSScreen mainScreen] withOptions:nil]; + } +} + +@end Added: tiki/examples/menu/basic/version.plist =================================================================== --- tiki/examples/menu/basic/version.plist (rev 0) +++ tiki/examples/menu/basic/version.plist 2007-11-05 20:24:01 UTC (rev 528) @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>BuildVersion</key> + <string>92</string> + <key>CFBundleVersion</key> + <string>1.0</string> + <key>ProductBuildVersion</key> + <string>7K571</string> + <key>ProjectName</key> + <string>NibPBTemplates</string> + <key>SourceVersion</key> + <string>1200000</string> +</dict> +</plist> Property changes on: tiki/osx ___________________________________________________________________ Name: svn:ignore + build Property changes on: tiki/osx/Tiki.xcodeproj ___________________________________________________________________ Name: svn:ignore + *.pbxuser *.mode1v3 Modified: tiki/osx/Tiki.xcodeproj/project.pbxproj =================================================================== --- tiki/osx/Tiki.xcodeproj/project.pbxproj 2007-11-05 17:08:21 UTC (rev 527) +++ tiki/osx/Tiki.xcodeproj/project.pbxproj 2007-11-05 20:24:01 UTC (rev 528) @@ -13,6 +13,7 @@ 2290A0FE09302D7500B7D80C /* pointerArrow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2290A0FC09302D7500B7D80C /* pointerArrow.cpp */; }; 2290A10109302D9F00B7D80C /* cursor.h in Headers */ = {isa = PBXBuildFile; fileRef = 2290A0FF09302D9F00B7D80C /* cursor.h */; }; 2290A10209302D9F00B7D80C /* pointerArrow.h in Headers */ = {isa = PBXBuildFile; fileRef = 2290A10009302D9F00B7D80C /* pointerArrow.h */; }; + 6400608E0CDF9DC800969916 /* init_flags_default.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6400608D0CDF9DC800969916 /* init_flags_default.cpp */; }; 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 */; }; @@ -210,6 +211,7 @@ 2290A0FF09302D9F00B7D80C /* cursor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = cursor.h; path = ../include/Tiki/drawables/cursor.h; sourceTree = SOURCE_ROOT; }; 2290A10009302D9F00B7D80C /* pointerArrow.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = pointerArrow.h; path = ../include/Tiki/drawables/pointerArrow.h; sourceTree = SOURCE_ROOT; }; 32DBCF5E0370ADEE00C91783 /* Tiki_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Tiki_Prefix.pch; sourceTree = "<group>"; }; + 6400608D0CDF9DC800969916 /* init_flags_default.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = init_flags_default.cpp; sourceTree = "<group>"; }; 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; }; @@ -636,7 +638,7 @@ C4AD52E30793CDC100E1B779 /* audio */, C42BD2D6078FC9BF00061670 /* base */, C4F51516079A0B1C0001D0D0 /* gl */, - C4539923079A455600F3A584 /* t */, + C4539923079A455600F3A584 /* hid */, C48814FE079F8A3B0038D5B0 /* image */, C4F5157D079A0CFB0001D0D0 /* math */, C472B72C079B0FBA00F0C00A /* thread */, @@ -647,6 +649,7 @@ C42BD2D6078FC9BF00061670 /* base */ = { isa = PBXGroup; children = ( + 6400608D0CDF9DC800969916 /* init_flags_default.cpp */, C4AD53070793CE9F00E1B779 /* debug.cpp */, C4F5148D0799FBA10001D0D0 /* endian.cpp */, C4AD52290793B4CD00E1B779 /* file.cpp */, @@ -722,13 +725,13 @@ name = hid; sourceTree = "<group>"; }; - C4539923079A455600F3A584 /* t */ = { + C4539923079A455600F3A584 /* hid */ = { isa = PBXGroup; children = ( C48E6CD607A48FDE00045273 /* eventcollector.cpp */, C453992A079A477500F3A584 /* hid.cpp */, ); - name = t; + name = hid; sourceTree = "<group>"; }; C472B72C079B0FBA00F0C00A /* thread */ = { @@ -1362,6 +1365,7 @@ 6499FE710C8623A3008D9FEF /* base64.cpp in Sources */, 6499FE720C8623A3008D9FEF /* date.cpp in Sources */, 6499FEA60C8640E5008D9FEF /* cookiejar.cpp in Sources */, + 6400608E0CDF9DC800969916 /* init_flags_default.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1499,7 +1503,10 @@ C4B181AC0856AE7000B46BDA /* Development */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = ppc; + ARCHS = ( + ppc, + i386, + ); DEBUG_INFORMATION_FORMAT = dwarf; LIBRARY_SEARCH_PATHS = /System/Library/Frameworks/; MACOSX_DEPLOYMENT_TARGET = 10.4; Modified: tiki/osx/src/TikiMain.m =================================================================== --- tiki/osx/src/TikiMain.m 2007-11-05 17:08:21 UTC (rev 527) +++ tiki/osx/src/TikiMain.m 2007-11-05 20:24:01 UTC (rev 528) @@ -155,14 +155,6 @@ continue; } - // Is the event for us? - if ([event window] != mainWindow) { - //NSLog([NSString stringWithFormat: @"Ignoring event not for us: %@", event]); - [NSApp sendEvent: event]; - continue; - } - //NSLog([NSString stringWithFormat: @"%@", event]); - // Handle the event we got type = [event type]; switch (type) { Modified: tiki/src/base/debug.cpp =================================================================== --- tiki/src/base/debug.cpp 2007-11-05 17:08:21 UTC (rev 527) +++ tiki/src/base/debug.cpp 2007-11-05 20:24:01 UTC (rev 528) @@ -15,7 +15,7 @@ using namespace Tiki::Debug; int Debug::printf( const char * fmt, ... ) { - if(g_tiki_init_flags & TIKI_INIT_DEBUG_CONSOLE) { + if(g_tiki_init_flags & TIKI_INIT_DEBUG_MASK) { #if TIKI_PLAT == TIKI_WIN32 va_list args; char buffer[ 16 * 1024 ]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-11-05 17:08:35
|
Revision: 527 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=527&view=rev Author: atani Date: 2007-11-05 09:08:21 -0800 (Mon, 05 Nov 2007) Log Message: ----------- enable i386 Modified Paths: -------------- tiki/osx/Tiki.xcodeproj/project.pbxproj Modified: tiki/osx/Tiki.xcodeproj/project.pbxproj =================================================================== --- tiki/osx/Tiki.xcodeproj/project.pbxproj 2007-11-05 17:05:44 UTC (rev 526) +++ tiki/osx/Tiki.xcodeproj/project.pbxproj 2007-11-05 17:08:21 UTC (rev 527) @@ -1173,10 +1173,12 @@ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; buildConfigurationList = C4B181AB0856AE7000B46BDA /* Build configuration list for PBXProject "Tiki" */; + compatibilityVersion = "Xcode 2.4"; hasScannedForEncodings = 1; mainGroup = 0867D691FE84028FC02AAC07 /* Tiki */; productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; projectDirPath = ""; + projectRoot = ""; targets = ( 8DC2EF4F0486A6940098B216 /* Tiki */, ); @@ -1380,6 +1382,10 @@ C4B181A80856AE7000B46BDA /* Development */ = { isa = XCBuildConfiguration; buildSettings = { + ARCHS = ( + i386, + ppc, + ); COPY_PHASE_STRIP = NO; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-11-05 17:05:51
|
Revision: 526 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=526&view=rev Author: atani Date: 2007-11-05 09:05:44 -0800 (Mon, 05 Nov 2007) Log Message: ----------- avoid realloc in Buffer if there is enough space in the buffer for the new data. preallocate Buffer when reading the response to an http request. reorganize NDS init (also now uses TIKI_INIT_FLAGS) added TIKI_INIT_DEBUG_* flags to enable the debug console (enabled by default), use TIKI_INIT_DEFAULTS_NODEBUG to enable the defaults without the debug console. Note that this will waste some cycles when calling Tiki::Debug::printf() when the console is not enabled. Modified Paths: -------------- tiki/include/Tiki/net/buffer.h tiki/include/Tiki/tiki.h tiki/nds/src/init_shutdown.cpp tiki/nds/src/platnet.cpp tiki/src/base/debug.cpp tiki/src/gl/gl.cpp tiki/src/net/http/useragent.cpp tiki/win32/src/platgl.cpp tiki/win32/src/platnet.cpp Modified: tiki/include/Tiki/net/buffer.h =================================================================== --- tiki/include/Tiki/net/buffer.h 2007-11-04 17:20:24 UTC (rev 525) +++ tiki/include/Tiki/net/buffer.h 2007-11-05 17:05:44 UTC (rev 526) @@ -70,14 +70,19 @@ } 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); + if(m_dataLen - m_usedDataLen > buf->getUsedDataLen()) { + memcpy(m_data + getUsedDataLen(), buf->getData(), buf->getUsedDataLen()); } - memcpy(newbuf + m_usedDataLen, buf->getData(), buf->getUsedDataLen()); - delete [] m_data; - m_data = newbuf; + else { + 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); + } + memcpy(newbuf + m_usedDataLen, buf->getData(), buf->getUsedDataLen()); + delete [] m_data; + m_data = newbuf; + } m_dataLen += buf->getDataLen(); m_usedDataLen += buf->getUsedDataLen(); } Modified: tiki/include/Tiki/tiki.h =================================================================== --- tiki/include/Tiki/tiki.h 2007-11-04 17:20:24 UTC (rev 525) +++ tiki/include/Tiki/tiki.h 2007-11-05 17:05:44 UTC (rev 526) @@ -83,8 +83,13 @@ TIKI_INIT_AUDIO_DEFAULT = TIKI_INIT_AUDIO_STREAM | TIKI_INIT_AUDIO_SFX, TIKI_INIT_AUDIO_MASK = 0x00FF0000, + TIKI_INIT_DEBUG_CONSOLE = 0x01000000, + TIKI_INIT_DEBUG_DEFAULT = TIKI_INIT_DEBUG_CONSOLE, + TIKI_INIT_DEBUG_MASK = 0xFF000000, + TIKI_INIT_NOTHING = 0x00000000, - TIKI_INIT_DEFAULTS = TIKI_INIT_HID_DEFAULT | TIKI_INIT_VIDEO_DEFAULT | TIKI_INIT_AUDIO_DEFAULT, + TIKI_INIT_DEFAULTS = TIKI_INIT_HID_DEFAULT | TIKI_INIT_VIDEO_DEFAULT | TIKI_INIT_AUDIO_DEFAULT | TIKI_INIT_DEBUG_DEFAULT, + TIKI_INIT_DEFAULTS_NODEBUG = TIKI_INIT_HID_DEFAULT | TIKI_INIT_VIDEO_DEFAULT | TIKI_INIT_AUDIO_DEFAULT, } TIKI_INIT_FLAGS_ENUM; } Modified: tiki/nds/src/init_shutdown.cpp =================================================================== --- tiki/nds/src/init_shutdown.cpp 2007-11-04 17:20:24 UTC (rev 525) +++ tiki/nds/src/init_shutdown.cpp 2007-11-05 17:05:44 UTC (rev 526) @@ -1,133 +1,134 @@ -/* - Tiki - - init_shutdown.cpp - - Copyright (C)2005 Atani Software -*/ - -#include "pch.h" - -#include "Tiki/sound.h" -#include "Tiki/stream.h" -#include "Tiki/hid.h" - -#include <nds.h> -#include <fat.h> -#include <dswifi9.h> -#include <dssoundstream.h> - -// notification function to send fifo message to arm7 -void arm9_synctoarm7() { // send fifo message - SendCommandToArm7( 0x87654321 ); -} -// wifi timer function, to update internals of sgIP -void Timer_50ms( void ) { - Wifi_Timer( 50 ); -} -namespace Tiki { - -bool init( int argc, char **argv ) { - // Turn on everything - powerON( POWER_ALL ); - - lcdMainOnTop(); - - 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(); - irqSet(IRQ_VBLANK, 0); - - Tiki::Debug::printf("Enabling GL\n"); - - // initialize the geometry engine - glInit(); - glEnable(GL_TEXTURE_2D); - - // 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( 0x7FFF ); - // Set our viewport to be the same size as the screen - glViewport(0,0,255,191); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(70, 256.0 / 192.0, 0.1, 100); - - - glLight(0, RGB15(31,31,31) , 0, floattov10(-1.0),0); - glLight(1, RGB15(31,31,31) , 0,0,floattov10(-1.0)); - glLight(2, RGB15(31,31,31) , 0,0,floattov10(1.0)); - - //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_FRONT | POLY_FORMAT_LIGHT0| POLY_FORMAT_LIGHT1| POLY_FORMAT_LIGHT2 ); - - glMatrixMode(GL_MODELVIEW); - - // set a default color. - glColor3f(1, 1, 1); - - Tiki::Debug::printf("Enabling libFAT\n"); - // initialize libfat +/* + Tiki + + init_shutdown.cpp + + Copyright (C)2005 Atani Software +*/ + +#include "pch.h" + +#include "Tiki/sound.h" +#include "Tiki/stream.h" +#include "Tiki/hid.h" + +#include <nds.h>s +#include <fat.h> +#include <dswifi9.h> +#include <dssoundstream.h> + +// notification function to send fifo message to arm7 +void arm9_synctoarm7() { // send fifo message + SendCommandToArm7( 0x87654321 ); +} + +namespace Tiki { + +bool init( int argc, char **argv ) { + // Turn on everything + powerON( POWER_ALL ); + + lcdMainOnTop(); + + if(g_tiki_init_flags & TIKI_INIT_DEBUG_CONSOLE) { + 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(); + + Tiki::Debug::printf("Enabling GL\n"); + // initialize the geometry engine + glInit(); + glEnable(GL_TEXTURE_2D); + + // 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( 0x7FFF ); + // Set our viewport to be the same size as the screen + glViewport(0,0,255,191); + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluPerspective(70, 256.0 / 192.0, 0.1, 100); + + glLight(0, RGB15(31,31,31) , 0, floattov10(-1.0),0); + glLight(1, RGB15(31,31,31) , 0,0,floattov10(-1.0)); + glLight(2, RGB15(31,31,31) , 0,0,floattov10(1.0)); + + //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_FRONT | POLY_FORMAT_LIGHT0| POLY_FORMAT_LIGHT1| POLY_FORMAT_LIGHT2 ); + + glMatrixMode(GL_MODELVIEW); + + // set a default color. + glColor3f(1, 1, 1); + + Tiki::Debug::printf("Enabling libFAT\n"); fatInitDefault(); - - // initialize parallax - Tiki::Debug::printf("Enabling Sound\n"); - Audio::Stream::initGlobal(); - Hid::init(); - - irqSet( IRQ_TIMER3, Timer_50ms ); // setup timer IRQ - 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; - irqEnable( IRQ_FIFO_NOT_EMPTY ); - - REG_IPC_FIFO_CR = IPC_FIFO_ENABLE | IPC_FIFO_RECV_IRQ; // enable FIFO IRQ - - Wifi_SetSyncHandler( arm9_synctoarm7 ); // tell wifi lib to use our handler to notify arm7 - - // set timer3 - *( ( volatile u16 * ) 0x0400010C ) = -6553; // 6553.1 * 256 cycles = ~50ms; - *( ( volatile u16 * ) 0x0400010E ) = 0x00C2; // enable, irq, 1/256 clock - - while ( Wifi_CheckInit() == 0 ) { // wait for arm7 to be initted successfully - swiWaitForVBlank(); - } - - } // wifi init complete - wifi lib can now be used! - - return true; -} - -void shutdown() { - Hid::shutdown(); -} - -void setName( const char *windowName, const char *iconName ) {} - -namespace GL { -void showCursor( bool visible ) {} -} - -} + + if(g_tiki_init_flags & TIKI_INIT_AUDIO_MASK) { + if(g_tiki_init_flags & TIKI_INIT_AUDIO_STREAM) { + Tiki::Debug::printf("Enabling SoundStream\n"); + Audio::Stream::initGlobal(); + } + } + if(g_tiki_init_flags & TIKI_INIT_HID_MASK ) { + Tiki::Debug::printf("Enabling HID\n"); + Hid::init(); + } + + Tiki::Debug::printf("Initializing ARM7\n"); + // enable & clear FIFO + REG_IPC_FIFO_CR = IPC_FIFO_ENABLE | IPC_FIFO_SEND_CLEAR; + + // setup some basic options for the wifi lib + u32 Wifi_pass = Wifi_Init( WIFIINIT_OPTION_USELED ); + REG_IPC_FIFO_TX = 0x12345678; + REG_IPC_FIFO_TX = Wifi_pass; + irqEnable( IRQ_FIFO_NOT_EMPTY ); + + // enable FIFO IRQ + REG_IPC_FIFO_CR = IPC_FIFO_ENABLE | IPC_FIFO_RECV_IRQ; + + // tell wifi lib to use our handler to notify arm7 + Wifi_SetSyncHandler( arm9_synctoarm7 ); + + // wait for arm7 to be initted successfully + while ( Wifi_CheckInit() == 0 ) { + swiWaitForVBlank(); + } + return true; +} + +void shutdown() { + if(g_tiki_init_flags & TIKI_INIT_HID_MASK ) { + Hid::shutdown(); + } + if(g_tiki_init_flags & TIKI_INIT_HID_MASK ) { + Audio::Stream::shutdownGlobal(); + } +} + +void setName( const char *windowName, const char *iconName ) {} + +namespace GL { +void showCursor( bool visible ) {} +} + +} Modified: tiki/nds/src/platnet.cpp =================================================================== --- tiki/nds/src/platnet.cpp 2007-11-04 17:20:24 UTC (rev 525) +++ tiki/nds/src/platnet.cpp 2007-11-05 17:05:44 UTC (rev 526) @@ -1,52 +1,64 @@ -/* - Tiki - - platnet.cpp - - Copyright (C)2007 Atani Software -*/ - -#include "Tiki/tiki.h" -#include "Tiki/net.h" - -namespace Tiki { - -namespace Net { - -void init() { -} - -void shutdown() { -} - -bool connect() { +/* + Tiki + + platnet.cpp + + Copyright (C)2007 Atani Software +*/ + +#include "Tiki/tiki.h" +#include "Tiki/net.h" + +// wifi timer function, to update internals of sgIP +void Timer_50ms( void ) { + Wifi_Timer( 50 ); +} + +namespace Tiki { + +namespace Net { + +void init() { + Tiki::Debug::printf("Enabling Wifi\n"); + irqSet( IRQ_TIMER3, Timer_50ms ); // setup timer IRQ + irqEnable( IRQ_TIMER3 ); + + // set timer3 + *( ( volatile u16 * ) 0x0400010C ) = -6553; // 6553.1 * 256 cycles = ~50ms; + *( ( volatile u16 * ) 0x0400010E ) = 0x00C2; // enable, irq, 1/256 clock +} + +void shutdown() { +} + +bool connect() { if(!isConnected()) { - Tiki::Debug::printf("Connecting to Wifi\n"); - Wifi_AutoConnect(); - while(1) { - switch(Wifi_AssocStatus()) { - case ASSOCSTATUS_ASSOCIATED: - return true; - case ASSOCSTATUS_CANNOTCONNECT: - return false; - } - } - } - - return true; -} - -bool isConnected() { - return (Wifi_AssocStatus() == ASSOCSTATUS_ASSOCIATED); -} - -void disconnect() { + Tiki::Debug::printf("Connecting to Wifi\n"); + Wifi_AutoConnect(); + while(1) { + switch(Wifi_AssocStatus()) { + case ASSOCSTATUS_ASSOCIATED: + return true; + case ASSOCSTATUS_CANNOTCONNECT: + return false; + } + } + } + + return true; +} + +bool isConnected() { + return (Wifi_AssocStatus() == ASSOCSTATUS_ASSOCIATED); +} + +void disconnect() { if(isConnected()) { - Tiki::Debug::printf("Disconnecting Wifi\n"); - Wifi_DisconnectAP(); - } -} - -} // namespace Net - -} // namespace Tiki + Tiki::Debug::printf("Disconnecting Wifi\n"); + Wifi_DisconnectAP(); + } +} + +} // namespace Net + +} // namespace Tiki Modified: tiki/src/base/debug.cpp =================================================================== --- tiki/src/base/debug.cpp 2007-11-04 17:20:24 UTC (rev 525) +++ tiki/src/base/debug.cpp 2007-11-05 17:05:44 UTC (rev 526) @@ -15,36 +15,36 @@ using namespace Tiki::Debug; int Debug::printf( const char * fmt, ... ) { - // This unfortunately has to go elsewhere for Win32 since it chops off any - // console output in a GUI app. + if(g_tiki_init_flags & TIKI_INIT_DEBUG_CONSOLE) { #if TIKI_PLAT == TIKI_WIN32 - va_list args; - char buffer[ 16 * 1024 ]; - va_start( args, fmt ); - int i = vsprintf( buffer, fmt, args ); - va_end( args ); + va_list args; + char buffer[ 16 * 1024 ]; + va_start( args, fmt ); + int i = vsprintf( buffer, fmt, args ); + va_end( args ); - OutputDebugString( buffer ); + OutputDebugString( buffer ); - return i; + 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 ); + va_list args; + char buffer[ 1024 ]; + va_start( args, fmt ); + int i = vsprintf( buffer, fmt, args ); + va_end( args ); - iprintf(buffer); - return i; + iprintf(buffer); + return i; #else + va_list args; - va_list args; + va_start( args, fmt ); + int i = vprintf( fmt, args ); + va_end( args ); - va_start( args, fmt ); - int i = vprintf( fmt, args ); - va_end( args ); - - return i; + return i; #endif + } + return 0; } Modified: tiki/src/gl/gl.cpp =================================================================== --- tiki/src/gl/gl.cpp 2007-11-04 17:20:24 UTC (rev 525) +++ tiki/src/gl/gl.cpp 2007-11-05 17:05:44 UTC (rev 526) @@ -42,7 +42,7 @@ Tiki::Math::Vector screen = getScreenExtents(); - glViewport( 0, 0, screen.x, screen.y ); + glViewport( 0, 0, (GLsizei)screen.x, (GLsizei)screen.y ); glClearDepth( 0.0f ); #if TIKI_PLAT != TIKI_DC glClear( GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT + GL_STENCIL_BUFFER_BIT ); Modified: tiki/src/net/http/useragent.cpp =================================================================== --- tiki/src/net/http/useragent.cpp 2007-11-04 17:20:24 UTC (rev 525) +++ tiki/src/net/http/useragent.cpp 2007-11-05 17:05:44 UTC (rev 526) @@ -350,7 +350,15 @@ } } - Buffer *fullBuf = new Buffer(1); + Buffer *fullBuf; + if(responseSize == -1) + { + fullBuf = new Buffer(1); + } + else + { + fullBuf = new Buffer(responseSize); + } if(!response->getHeaderParam("Transfer-Encoding").compare("chunked")) { Tiki::Debug::printf("Encoding is chunked\n"); @@ -384,8 +392,18 @@ if(chunkBuf->getUsedDataLen() < sizeDecoded) { size_t needed = sizeDecoded - chunkBuf->getUsedDataLen(); + Buffer *chunkBuf2; + if(needed > 4096) { + chunkBuf2 = new Buffer(4096); + } + else { + chunkBuf2 = new Buffer(needed); + } while(needed > 0) { - Buffer *chunkBuf2 = new Buffer(needed); + if(needed < chunkBuf2->getDataLen()) { + delete chunkBuf2; + chunkBuf2 = new Buffer(needed); + } socket->recv(chunkBuf2); chunkBuf->append(chunkBuf2); if(chunkBuf2->getUsedDataLen() > 0) { @@ -394,9 +412,9 @@ emit( "progressUpdate", progress ); delete progress; } - needed -= chunkBuf2->getUsedDataLen(); - delete chunkBuf2; + needed -= chunkBuf2->getUsedDataLen(); } + delete chunkBuf2; } totalSize += chunkBuf->getUsedDataLen(); fullBuf->append(chunkBuf); @@ -417,8 +435,18 @@ if(chunkBuf->getUsedDataLen() < sizeDecoded) { sizeDecoded -= chunkBuf->getUsedDataLen(); + Buffer *chunkBuf2; + if(sizeDecoded > 4096) { + chunkBuf2 = new Buffer(4096); + } + else { + chunkBuf2 = new Buffer(sizeDecoded); + } while(sizeDecoded > 0) { - Buffer *chunkBuf2 = new Buffer(sizeDecoded); + if(sizeDecoded < chunkBuf2->getDataLen()) { + delete chunkBuf2; + chunkBuf2 = new Buffer(sizeDecoded); + } socket->recv(chunkBuf2); chunkBuf->append(chunkBuf2); if(chunkBuf2->getUsedDataLen() > 0) { @@ -428,10 +456,11 @@ delete progress; } sizeDecoded -= chunkBuf2->getUsedDataLen(); - delete chunkBuf2; } + delete chunkBuf2; } fullBuf->append(chunkBuf); + delete chunkBuf; } else { Modified: tiki/win32/src/platgl.cpp =================================================================== --- tiki/win32/src/platgl.cpp 2007-11-04 17:20:24 UTC (rev 525) +++ tiki/win32/src/platgl.cpp 2007-11-05 17:05:44 UTC (rev 526) @@ -382,12 +382,3 @@ // the frame proper e.g. loading textures will not work. // wglMakeCurrent(NULL, NULL); } - - - - - - - - - Modified: tiki/win32/src/platnet.cpp =================================================================== --- tiki/win32/src/platnet.cpp 2007-11-04 17:20:24 UTC (rev 525) +++ tiki/win32/src/platnet.cpp 2007-11-05 17:05:44 UTC (rev 526) @@ -15,7 +15,7 @@ namespace Net { - DWORD connectionFlags; +DWORD connectionFlags; void init() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <c99...@us...> - 2007-11-04 17:20:35
|
Revision: 525 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=525&view=rev Author: c99koder Date: 2007-11-04 09:20:24 -0800 (Sun, 04 Nov 2007) Log Message: ----------- Tweak the Z offset between Console foreground and background, and keep depth testing enabled Modified Paths: -------------- tiki/src/gl/drawables/console.cpp Modified: tiki/src/gl/drawables/console.cpp =================================================================== --- tiki/src/gl/drawables/console.cpp 2007-11-04 15:44:30 UTC (rev 524) +++ tiki/src/gl/drawables/console.cpp 2007-11-04 17:20:24 UTC (rev 525) @@ -226,7 +226,7 @@ w *= sv.x; h *= sv.y; - const Vector & tv = getPosition() + Vector( x, y, 0.01f ); + const Vector & tv = getPosition() + Vector( x, y, 0.0001f ); Color color = m_palette[BLACK]; if ( attr & HIGH_INTENSITY ) @@ -252,7 +252,7 @@ w *= sv.x; h *= sv.y; - const Vector & tv = getPosition() + Vector( x, y, -0.01f ); + const Vector & tv = getPosition() + Vector( x, y, -0.0001f ); m_palette[ color ].select(); glVertex3f(tv.x - (m_w / 2), tv.y + h - (m_h / 2), tv.z); @@ -267,9 +267,6 @@ float x_step = ( m_w / m_cols ); float y_step = ( m_h / m_rows ); -#if TIKI_PLAT != TIKI_NDS - glDisable( GL_DEPTH_TEST ); -#endif if ( list == Trans ) { //Characters! m_texture->select(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-11-04 15:44:32
|
Revision: 524 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=524&view=rev Author: atani Date: 2007-11-04 07:44:30 -0800 (Sun, 04 Nov 2007) Log Message: ----------- fixed compilation error in httpclient on win32 fixed bug in useragent which caused segfault when content-encoding was not chunked. Modified Paths: -------------- tiki/examples/net/httpclient/src/main.cpp tiki/src/net/http/useragent.cpp Modified: tiki/examples/net/httpclient/src/main.cpp =================================================================== --- tiki/examples/net/httpclient/src/main.cpp 2007-10-30 18:43:38 UTC (rev 523) +++ tiki/examples/net/httpclient/src/main.cpp 2007-11-04 15:44:30 UTC (rev 524) @@ -36,6 +36,7 @@ else { Debug::printf("Sent %d/%d\n", progress->getBytesSent(), progress->getBytesExpected()); } + return 0; } }; Modified: tiki/src/net/http/useragent.cpp =================================================================== --- tiki/src/net/http/useragent.cpp 2007-10-30 18:43:38 UTC (rev 523) +++ tiki/src/net/http/useragent.cpp 2007-11-04 15:44:30 UTC (rev 524) @@ -337,6 +337,7 @@ } else if(!field.compare("Content-Length")) { responseSize = atoi(value.c_str()); + response->setHeaderParam(field, value); } else { response->setHeaderParam(field, value); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-10-30 18:43:53
|
Revision: 523 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=523&view=rev Author: atani Date: 2007-10-30 11:43:38 -0700 (Tue, 30 Oct 2007) Log Message: ----------- more NDS work, still not 100% functional for textures :( Modified Paths: -------------- tiki/examples/menu/basic/Makefile tiki/nds/src/init_shutdown.cpp tiki/src/gl/font.cpp tiki/src/gl/genmenu.cpp tiki/src/gl/gl.cpp tiki/src/gl/texture.cpp Property Changed: ---------------- tiki/examples/events/ tiki/examples/events/src/ tiki/examples/menu/basic/ tiki/examples/menu/basic/src/ tiki/examples/menu/popup/ tiki/examples/menu/popup/src/ Property changes on: tiki/examples/events ___________________________________________________________________ Name: svn:ignore - Debug *.user + Debug Release *.user *.nds *.ds.gba Property changes on: tiki/examples/events/src ___________________________________________________________________ Name: svn:ignore + *.d Property changes on: tiki/examples/menu/basic ___________________________________________________________________ Name: svn:ignore + Debug Release *.user *.nds *.ds.gba Modified: tiki/examples/menu/basic/Makefile =================================================================== --- tiki/examples/menu/basic/Makefile 2007-10-30 05:05:47 UTC (rev 522) +++ tiki/examples/menu/basic/Makefile 2007-10-30 18:43:38 UTC (rev 523) @@ -9,8 +9,8 @@ NDS_CART_VERSION ?= 1 endif -all: menu_popup -menu_popup: $(OBJS) +all: menu_basic +menu_basic: $(OBJS) $(build_romdisk) $(CXX) $(LDFLAGS) -L$(TIKI_DIR)$(TIKI_PLAT) -L$(TIKI_DIR)$(TIKI_PLAT)/lib $(OBJS) $(TIKI_BASE_LIBS) -o menu_basic$(PLATFORM_BINARY_EXT) $(ROMDISK_OBJ) $(post_build) Property changes on: tiki/examples/menu/basic/src ___________________________________________________________________ Name: svn:ignore + *.d Property changes on: tiki/examples/menu/popup ___________________________________________________________________ Name: svn:ignore + Debug Release *.user *.nds *.ds.gba Property changes on: tiki/examples/menu/popup/src ___________________________________________________________________ Name: svn:ignore + *.d Modified: tiki/nds/src/init_shutdown.cpp =================================================================== --- tiki/nds/src/init_shutdown.cpp 2007-10-30 05:05:47 UTC (rev 522) +++ tiki/nds/src/init_shutdown.cpp 2007-10-30 18:43:38 UTC (rev 523) @@ -29,41 +29,43 @@ bool init( int argc, char **argv ) { // Turn on everything - powerON( POWER_ALL ); - + powerON( POWER_ALL ); + lcdMainOnTop(); - consoleDemoInit(); - - // Setup the Main screen for 3D - videoSetMode( MODE_0_3D ); + consoleDemoInit(); - //vramSetBankA( VRAM_A_TEXTURE ); - + // Setup the Main screen for 3D + videoSetMode( MODE_0_3D ); + vramSetBankA( VRAM_A_TEXTURE ); + Tiki::Debug::printf("Enabling IRQs\n"); // IRQ basic setup irqInit(); - irqSet(IRQ_VBLANK, 0); - + irqSet(IRQ_VBLANK, 0); + Tiki::Debug::printf("Enabling GL\n"); // initialize the geometry engine - glInit(); + glInit(); 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 ); + glClearDepth( 0x7FFF ); + // Set our viewport to be the same size as the screen + glViewport(0,0,255,191); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(70, 256.0 / 192.0, 0.1, 100); - glMatrixMode(GL_MODELVIEW); + + + glLight(0, RGB15(31,31,31) , 0, floattov10(-1.0),0); + glLight(1, RGB15(31,31,31) , 0,0,floattov10(-1.0)); + glLight(2, RGB15(31,31,31) , 0,0,floattov10(1.0)); //need to set up some material properties since DS does not have them set by default glMaterialf(GL_AMBIENT, RGB15(16,16,16)); @@ -74,11 +76,13 @@ //ds uses a table for shinyness..this generates a half-ass one glMaterialShinyness(); - glPolyFmt(POLY_ALPHA(31) | POLY_CULL_NONE ); + glPolyFmt(POLY_ALPHA(31) | POLY_CULL_FRONT | POLY_FORMAT_LIGHT0| POLY_FORMAT_LIGHT1| POLY_FORMAT_LIGHT2 ); + + glMatrixMode(GL_MODELVIEW); // set a default color. glColor3f(1, 1, 1); - + Tiki::Debug::printf("Enabling libFAT\n"); // initialize libfat fatInitDefault(); @@ -86,17 +90,17 @@ // initialize parallax Tiki::Debug::printf("Enabling Sound\n"); Audio::Stream::initGlobal(); - Hid::init(); - + Hid::init(); + irqSet( IRQ_TIMER3, Timer_50ms ); // setup timer IRQ - irqEnable( IRQ_TIMER3 ); - Tiki::Debug::printf("Enabling Wifi\n"); + 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/src/gl/font.cpp =================================================================== --- tiki/src/gl/font.cpp 2007-10-30 05:05:47 UTC (rev 522) +++ tiki/src/gl/font.cpp 2007-10-30 18:43:38 UTC (rev 523) @@ -183,7 +183,7 @@ /* Make sure we can allocate texture space for it */ m_fnt.txr = new Texture; - if ( !m_fnt.txr->createCanvas( hdr.txr_width, hdr.txr_height, Texture::ARGB4444 ) ) { + if ( !m_fnt.txr->createCanvas( hdr.txr_width, hdr.txr_height, Texture::ARGB1555 ) ) { Debug::printf( "Font: can't allocate texture for '%s'\n", fn.c_str() ); return false; } Modified: tiki/src/gl/genmenu.cpp =================================================================== --- tiki/src/gl/genmenu.cpp 2007-10-30 05:05:47 UTC (rev 522) +++ tiki/src/gl/genmenu.cpp 2007-10-30 18:43:38 UTC (rev 523) @@ -138,9 +138,9 @@ glClearColor( m_bg[ 0 ] * m_exitCount, m_bg[ 1 ] * m_exitCount, m_bg[ 2 ] * m_exitCount, 1.0f ); #else - glClearColor( ( uint8 ) ( ( m_bg[ 0 ] * m_exitCount ) * 255 ), - ( uint8 ) ( ( m_bg[ 1 ] * m_exitCount ) * 255 ), - ( uint8 ) ( ( m_bg[ 2 ] * m_exitCount ) * 255 ), 255 ); + glClearColor( ( uint8 ) ( ( m_bg[ 0 ] * m_exitCount ) * 32 ), + ( uint8 ) ( ( m_bg[ 1 ] * m_exitCount ) * 32 ), + ( uint8 ) ( ( m_bg[ 2 ] * m_exitCount ) * 32 ), 31 ); #endif } else { @@ -148,9 +148,9 @@ glClearColor( m_bg[ 0 ], m_bg[ 1 ], m_bg[ 2 ], 1.0f ); #else - glClearColor( ( uint8 ) ( m_bg[ 0 ] * 255 ), - ( uint8 ) ( m_bg[ 1 ] * 255 ), - ( uint8 ) ( m_bg[ 2 ] * 255 ), 255 ); + glClearColor( ( uint8 ) ( m_bg[ 0 ] * 32 ), + ( uint8 ) ( m_bg[ 1 ] * 32 ), + ( uint8 ) ( m_bg[ 2 ] * 32 ), 31 ); #endif } Modified: tiki/src/gl/gl.cpp =================================================================== --- tiki/src/gl/gl.cpp 2007-10-30 05:05:47 UTC (rev 522) +++ tiki/src/gl/gl.cpp 2007-10-30 18:43:38 UTC (rev 523) @@ -39,8 +39,10 @@ glDisable( GL_CULL_FACE ); set2d(); + + Tiki::Math::Vector screen = getScreenExtents(); - glViewport( 0, 0, 640, 480 ); + glViewport( 0, 0, screen.x, screen.y ); glClearDepth( 0.0f ); #if TIKI_PLAT != TIKI_DC glClear( GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT + GL_STENCIL_BUFFER_BIT ); @@ -61,22 +63,16 @@ void Frame::set2d() { glMatrixMode( GL_PROJECTION ); glLoadIdentity(); -#if TIKI_PLAT != TIKI_NDS - glOrtho( 0, 640, 480, 0, 1.0f, -1.0f ); -#else - glOrtho( 0, 256, 192, 0, 0.1f, 100.0f ); -#endif + Tiki::Math::Vector screen = getScreenExtents(); + glOrtho( 0, screen.x, screen.y, 0, 1.0f, -1.0f ); glMatrixMode( GL_MODELVIEW ); } void Frame::set3d() { glMatrixMode( GL_PROJECTION ); glLoadIdentity(); -#if TIKI_PLAT != TIKI_NDS - gluPerspective( 45.0f, 640.0f / 480.0f, 0.1f, 100.0f ); -#else - gluPerspective( 70.0f, 256.0f / 192.0f, 0.1f, 100.0f ); -#endif + Tiki::Math::Vector screen = getScreenExtents(); + gluPerspective( 45.0f, screen.x / screen.y, 0.1f, 100.0f ); glMatrixMode( GL_MODELVIEW ); } @@ -90,22 +86,24 @@ // This will leave the depth testing enabled (to not overdraw // opaque objects) but not update the depth buffer. glDepthMask( GL_FALSE ); +#endif + #if TIKI_PLAT == TIKI_DC glKosFinishList(); #endif glEnable( GL_BLEND ); +#if TIKI_PLAT != TIKI_NDS glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); #else // TIKI_NDS - glPolyFmt(POLY_ALPHA(31) | POLY_CULL_NONE); + glPolyFmt(POLY_ALPHA(0) | POLY_CULL_FRONT | POLY_FORMAT_LIGHT0| POLY_FORMAT_LIGHT1| POLY_FORMAT_LIGHT2); #endif } void Frame::transDisable() { // glEnable(GL_DEPTH_TEST); -#if TIKI_PLAT != TIKI_NDS glDisable( GL_BLEND ); -#else - glPolyFmt(POLY_ALPHA(0) | POLY_CULL_NONE); +#if TIKI_PLAT == TIKI_NDS + glPolyFmt(POLY_ALPHA(31) | POLY_CULL_FRONT | POLY_FORMAT_LIGHT0| POLY_FORMAT_LIGHT1| POLY_FORMAT_LIGHT2); #endif } Modified: tiki/src/gl/texture.cpp =================================================================== --- tiki/src/gl/texture.cpp 2007-10-30 05:05:47 UTC (rev 522) +++ tiki/src/gl/texture.cpp 2007-10-30 18:43:38 UTC (rev 523) @@ -65,6 +65,7 @@ } void Texture::convertToGl() { +#if TIKI_PLAT != TIKI_NDS uint16 * src16 = ( uint16 * ) m_ptr; uint8 * dst = m_txrdata; @@ -117,6 +118,7 @@ *dst++ = a; } } +#endif } #if TIKI_PLAT == TIKI_WIN32 @@ -141,7 +143,30 @@ #endif #endif +#if TIKI_PLAT == TIKI_NDS +static void getTextureSize(int x, int y, uint8 *tx, uint8 *ty) { + if(x < 9) { *tx = TEXTURE_SIZE_8; } + else if(x < 17) { *tx = TEXTURE_SIZE_16; } + else if(x < 33) { *tx = TEXTURE_SIZE_32; } + else if(x < 65) { *tx = TEXTURE_SIZE_64; } + else if(x < 129) { *tx = TEXTURE_SIZE_128; } + else if(x < 257) { *tx = TEXTURE_SIZE_256; } + else if(x < 513) { *tx = TEXTURE_SIZE_512; } + else if(x < 1025) { *tx = TEXTURE_SIZE_1024; } + + if(y < 9) { *ty = TEXTURE_SIZE_8; } + else if(y < 17) { *ty = TEXTURE_SIZE_16; } + else if(y < 33) { *ty = TEXTURE_SIZE_32; } + else if(y < 65) { *ty = TEXTURE_SIZE_64; } + else if(y < 129) { *ty = TEXTURE_SIZE_128; } + else if(y < 257) { *ty = TEXTURE_SIZE_256; } + else if(y < 513) { *ty = TEXTURE_SIZE_512; } + else if(y < 1025) { *ty = TEXTURE_SIZE_1024; } +} +#endif + + bool Texture::loadFromFile( const string & fn, int use_alpha ) { RefPtr<Image> img; size_t fnlen; @@ -242,14 +267,17 @@ } glTexEnvi( GL_TEXTURE_2D, GL_TEXTURE_ENV_MODE, GL_MODULATEALPHA ); #elif TIKI_PLAT == TIKI_NDS - glGenTextures( 1, &m_gltxr ); - glBindTexture( 0, m_gltxr ); - if(use_alpha) { - glTexImage2D( 0, 0, GL_RGBA, (m_w/8) - 1, (m_h/8) - 1, 0, TEXGEN_TEXCOORD, m_ptr ); - } - else { - glTexImage2D( 0, 0, GL_RGB, (m_w/8) - 1, (m_h/8) - 1, 0, TEXGEN_TEXCOORD, m_ptr ); - } + uint8 w, h; + getTextureSize(img->w, img->h, &w, &h); + m_w = w; + m_h = h; + Debug::printf("TextureSize: (%d, %d) -> (%d, %d)\n", img->w, img->h, m_w, m_h); + if(use_alpha) { + glTexImage2D( 0, 0, GL_RGBA, m_w, m_h, 0, TEXGEN_TEXCOORD, m_ptr ); + } + else { + glTexImage2D( 0, 0, GL_RGB, m_w, m_h, 0, TEXGEN_TEXCOORD, m_ptr ); + } #endif return true; @@ -293,12 +321,22 @@ return false; } +#if TIKI_PLAT != TIKI_NDS // We'll write the converted data into this buffer if ( m_fmt == RGBA8888 ) m_txrdata = m_ptr; else m_txrdata = new uint8[ m_w * m_h * 4 ]; - +#else + // on the DS we only handle 16 bit textures, so use existing allocated space + m_txrdata = m_ptr; + + uint8 tw, th; + getTextureSize(w, h, &tw, &th); + m_w = tw; + m_h = th; + Debug::printf("TextureSize: (%d, %d) -> (%d, %d)\n", w, h, m_w, m_h); +#endif return true; } @@ -364,21 +402,31 @@ glBindTexture( GL_TEXTURE_2D, m_gltxr ); #if TIKI_PLAT != TIKI_DC && TIKI_PLAT != TIKI_NDS glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, m_w, m_h, 0, GL_RGBA, GL_UNSIGNED_BYTE, m_txrdata ); -#elif TIKI_PLAT != TIKI_NDS +#elif TIKI_PLAT == TIKI_NDS switch ( m_fmt ) { case ARGB1555: - glTexImage2D( GL_TEXTURE_2D, 0, GL_ARGB1555, m_w, m_h, 0, GL_ARGB1555, GL_UNSIGNED_BYTE, m_ptr ); - break; + glTexImage2D( 0, 0, GL_RGBA, m_w, m_h, 0, TEXGEN_TEXCOORD, m_ptr ); + break; + case RGB565: + default: + glTexImage2D( 0, 0, GL_RGB, m_w, m_h, 0, TEXGEN_TEXCOORD, m_ptr ); + break; + } +#elif TIKI_PLAT == TIKI_DC + switch ( m_fmt ) { + case ARGB1555: + glTexImage2D( GL_TEXTURE_2D, 0, GL_ARGB1555, m_w, m_h, 0, GL_ARGB1555, GL_UNSIGNED_BYTE, m_ptr ); + break; case ARGB4444: - glTexImage2D( GL_TEXTURE_2D, 0, GL_ARGB4444, m_w, m_h, 0, GL_ARGB4444, GL_UNSIGNED_BYTE, m_ptr ); - break; + glTexImage2D( GL_TEXTURE_2D, 0, GL_ARGB4444, m_w, m_h, 0, GL_ARGB4444, GL_UNSIGNED_BYTE, m_ptr ); + break; case RGB565: - glTexImage2D( GL_TEXTURE_2D, 0, GL_RGB565, m_w, m_h, 0, GL_RGB565, GL_UNSIGNED_BYTE, m_ptr ); - break; + glTexImage2D( GL_TEXTURE_2D, 0, GL_RGB565, m_w, m_h, 0, GL_RGB565, GL_UNSIGNED_BYTE, m_ptr ); + break; default: - Debug::printf( "Texture::canvasUnlock: Unsupported texture format\n" ); - assert( false ); - break; + Debug::printf( "Texture::canvasUnlock: Unsupported texture format\n" ); + assert( false ); + break; } #endif } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-10-30 05:05:48
|
Revision: 522 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=522&view=rev Author: atani Date: 2007-10-29 22:05:47 -0700 (Mon, 29 Oct 2007) Log Message: ----------- fixed vertical centering of the menubox/items based on position. This was originally using the position as a start point rather than a center point. Modified Paths: -------------- tiki/src/gl/drawables/lightbarmenu.cpp Modified: tiki/src/gl/drawables/lightbarmenu.cpp =================================================================== --- tiki/src/gl/drawables/lightbarmenu.cpp 2007-10-30 00:26:20 UTC (rev 521) +++ tiki/src/gl/drawables/lightbarmenu.cpp 2007-10-30 05:05:47 UTC (rev 522) @@ -26,7 +26,11 @@ m_height = 0.0f; m_width = 0.0f; - float y = 10.0f; + Tiki::Debug::printf("Option list size: %d\n", options.size()); + // the 2.0f here is to give some space between the border and the first options in the menu + float start_y = 2.0f + (m_borderSize * 2.0f) + (-25.0f * (options.size() / 2)); + float y = start_y; + Tiki::Debug::printf("Starting Y: %04.4f\n", y); for(std::list<std::string>::const_iterator iter = options.begin(); iter != options.end(); iter++) { float h, w; @@ -50,7 +54,10 @@ subAdd(tempLabel); y += 25.0f; } - m_height = (y - 10.0f) + (m_borderSize * 2); + Tiki::Debug::printf("Ending Y: %04.4f\n", y); + // the 4.0f here is to give some space between the border and the last options in the menu + m_height = ((start_y - y) * -1) + 4.0f; + Tiki::Debug::printf("Y size: %04.4f\n", m_height); m_width += (m_borderSize * 2); m_options.front()->setTint(m_colorSelected); @@ -202,15 +209,15 @@ glBegin(GL_QUADS); m_borderColor.select(); glBegin(GL_QUADS); - glVertex3f(tv.x - m_width/2, tv.y, tv.z / 1000.0f); - glVertex3f(tv.x + m_width/2, tv.y, tv.z / 1000.0f); - glVertex3f(tv.x + m_width/2, tv.y + m_height, tv.z / 1000.0f); - glVertex3f(tv.x - m_width/2, tv.y + m_height, tv.z / 1000.0f); + glVertex3f(tv.x - m_width/2, tv.y - m_height/2, tv.z / 1000.0f); + glVertex3f(tv.x + m_width/2, tv.y - m_height/2, tv.z / 1000.0f); + glVertex3f(tv.x + m_width/2, tv.y + m_height/2, tv.z / 1000.0f); + glVertex3f(tv.x - m_width/2, tv.y + m_height/2, tv.z / 1000.0f); m_boxColor.select(); - glVertex3f(tv.x - (m_width - m_borderSize)/2, tv.y + m_borderSize, tv.z / 1000.0f); - glVertex3f(tv.x + (m_width - m_borderSize)/2, tv.y + m_borderSize, tv.z / 1000.0f); - glVertex3f(tv.x + (m_width - m_borderSize)/2, tv.y + (m_height - m_borderSize), tv.z / 1000.0f); - glVertex3f(tv.x - (m_width - m_borderSize)/2, tv.y + (m_height - m_borderSize), tv.z / 1000.0f); + glVertex3f(tv.x - (m_width - m_borderSize)/2, tv.y + (m_borderSize - m_height)/2, tv.z / 1000.0f); + glVertex3f(tv.x + (m_width - m_borderSize)/2, tv.y + (m_borderSize - m_height)/2, tv.z / 1000.0f); + glVertex3f(tv.x + (m_width - m_borderSize)/2, tv.y + (m_height - m_borderSize)/2, tv.z / 1000.0f); + glVertex3f(tv.x - (m_width - m_borderSize)/2, tv.y + (m_height - m_borderSize)/2, tv.z / 1000.0f); glEnd(); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-10-30 00:26:23
|
Revision: 521 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=521&view=rev Author: atani Date: 2007-10-29 17:26:20 -0700 (Mon, 29 Oct 2007) Log Message: ----------- * added LightBarMenu drawable * added a couple examples using GenericMenu and the LightBarMenu Modified Paths: -------------- tiki/dc/src/platgl.cpp tiki/examples/Makefile tiki/include/Tiki/gl.h tiki/nds/src/platgl.cpp tiki/osx/src/platgl.cpp tiki/sdl/src/platgl.cpp tiki/win32/src/platgl.cpp Added Paths: ----------- tiki/examples/menu/ tiki/examples/menu/Makefile tiki/examples/menu/basic/ tiki/examples/menu/basic/Makefile tiki/examples/menu/basic/resources/ tiki/examples/menu/basic/resources/ca-logo.png tiki/examples/menu/basic/src/ tiki/examples/menu/basic/src/MenuBasic.cpp tiki/examples/menu/basic/src/main.cpp tiki/examples/menu/popup/ tiki/examples/menu/popup/Makefile tiki/examples/menu/popup/resources/ tiki/examples/menu/popup/resources/ca-logo.png tiki/examples/menu/popup/resources/typewriter.txf tiki/examples/menu/popup/src/ tiki/examples/menu/popup/src/MenuPopup.cpp tiki/examples/menu/popup/src/main.cpp tiki/include/Tiki/drawables/lightbarmenu.h tiki/src/gl/drawables/lightbarmenu.cpp Modified: tiki/dc/src/platgl.cpp =================================================================== --- tiki/dc/src/platgl.cpp 2007-10-29 23:07:45 UTC (rev 520) +++ tiki/dc/src/platgl.cpp 2007-10-30 00:26:20 UTC (rev 521) @@ -31,9 +31,13 @@ return Vector( 640.0f, 480.0f, 0.0f ); } +Vector getScreenCenter() { + return Vector( 320.0f, 240.0f, 0.0f ); } + } } +} extern "C" { Modified: tiki/examples/Makefile =================================================================== --- tiki/examples/Makefile 2007-10-29 23:07:45 UTC (rev 520) +++ tiki/examples/Makefile 2007-10-30 00:26:20 UTC (rev 521) @@ -1,5 +1,5 @@ -SUBDIRS = events console net nehe +SUBDIRS = events menu console net nehe TIKI_DIR ?= $(CURDIR)/../ include $(TIKI_DIR)$(TIKI_PLAT)/Makefile.rules Added: tiki/examples/menu/Makefile =================================================================== --- tiki/examples/menu/Makefile (rev 0) +++ tiki/examples/menu/Makefile 2007-10-30 00:26:20 UTC (rev 521) @@ -0,0 +1,8 @@ + +SUBDIRS = basic popup + +TIKI_DIR ?= $(CURDIR)/../../ +include $(TIKI_DIR)$(TIKI_PLAT)/Makefile.rules + +all: subdirs +clean: clean_subdirs Added: tiki/examples/menu/basic/Makefile =================================================================== --- tiki/examples/menu/basic/Makefile (rev 0) +++ tiki/examples/menu/basic/Makefile 2007-10-30 00:26:20 UTC (rev 521) @@ -0,0 +1,26 @@ + +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 ?= MENU +NDS_CART_ID ?= TK +NDS_CART_NAME ?= MenuBasic +NDS_CART_VERSION ?= 1 +endif + +all: menu_popup +menu_popup: $(OBJS) + $(build_romdisk) + $(CXX) $(LDFLAGS) -L$(TIKI_DIR)$(TIKI_PLAT) -L$(TIKI_DIR)$(TIKI_PLAT)/lib $(OBJS) $(TIKI_BASE_LIBS) -o menu_basic$(PLATFORM_BINARY_EXT) $(ROMDISK_OBJ) + $(post_build) + +clean: + -rm -f $(OBJS) menu_basic$(PLATFORM_BINARY_EXT) $(ROMDISK_OBJ) +ifeq ($(TIKI_PLAT),nds) + -rm -f menu_basic.nds menu_basic.ds.gba +endif + +TIKI_DIR ?= $(CURDIR)/../../../ +DEPSDIR=$(CURDIR) +include $(TIKI_DIR)$(TIKI_PLAT)/Makefile.rules Property changes on: tiki/examples/menu/basic/Makefile ___________________________________________________________________ Name: svn:executable + * Added: tiki/examples/menu/basic/resources/ca-logo.png =================================================================== (Binary files differ) Property changes on: tiki/examples/menu/basic/resources/ca-logo.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: tiki/examples/menu/basic/src/MenuBasic.cpp =================================================================== --- tiki/examples/menu/basic/src/MenuBasic.cpp (rev 0) +++ tiki/examples/menu/basic/src/MenuBasic.cpp 2007-10-30 00:26:20 UTC (rev 521) @@ -0,0 +1,27 @@ +/* +* MenuBasic.cpp +* Basic menu example +* +* Copyright (C)2007 Atani Software +* +*/ + +#include <Tiki/tiki.h> +#include <pch.h> + +#if TIKI_PLAT == TIKI_WIN32 +#include <windows.h> + +static char szAppName[] = "MenuBasic"; +int APIENTRY WinMain( HINSTANCE hInst, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow ) +#else +extern "C" int tiki_main( int argc, char *argv[] ); +int main( int argc, char *argv[] ) +#endif +{ +#if TIKI_PLAT != TIKI_WIN32 + return tiki_main( argc, argv ); +#else + return Tiki::DoMain( szAppName, hInst, hPrevInstance, lpCmdLine, nCmdShow ); +#endif +} Added: tiki/examples/menu/basic/src/main.cpp =================================================================== --- tiki/examples/menu/basic/src/main.cpp (rev 0) +++ tiki/examples/menu/basic/src/main.cpp 2007-10-30 00:26:20 UTC (rev 521) @@ -0,0 +1,60 @@ +/* +* main.cpp +* Basic menu example +* +* Copyright (C)2007 Atani Software +* +*/ + +#include <Tiki/tiki.h> +#include <Tiki/gl.h> +#include <Tiki/hid.h> +#include <Tiki/genmenu.h> +#include <Tiki/texture.h> +#include <Tiki/drawables/banner.h> + +using namespace Tiki; +using namespace Tiki::GL; + +class BasicMenuExample : public GenericMenu { + public: + BasicMenuExample() { +#if TIKI_PLAT == TIKI_DC + m_image = new Texture("/rd/ca-logo.png", true); +#else + m_image = new Texture("ca-logo.png", true); +#endif + Vector screenSize = Frame::getScreenExtents(); + m_scene->setTranslate(Frame::getScreenCenter() + Vector(0.0f, 0.0f, 10.0f)); + + m_background = new Banner(Drawable::Opaque, m_image); + m_background->setSize(screenSize.x, screenSize.y); + m_background->setTranslate(Vector(0.0f, 0.0f, 1.0f)); + m_scene->subAdd(m_background); + } + protected: + virtual void inputEvent(const Event & evt) + { + if ( evt.type == Hid::Event::EvtQuit ) { + startExit(); + } + else if (evt.type == Hid::Event::EvtKeypress && evt.key == Hid::Event::KeyEsc) { + startExit(); + } + } + + private: + RefPtr<Banner> m_background; + RefPtr<Texture> m_image; +}; + +extern "C" int tiki_main(int argc, char *argv[]) +{ + Tiki::init(argc, argv); + + BasicMenuExample example; + example.doMenu(); + + Tiki::shutdown(); + return 0; +} Added: tiki/examples/menu/popup/Makefile =================================================================== --- tiki/examples/menu/popup/Makefile (rev 0) +++ tiki/examples/menu/popup/Makefile 2007-10-30 00:26:20 UTC (rev 521) @@ -0,0 +1,26 @@ + +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 ?= MENU +NDS_CART_ID ?= TK +NDS_CART_NAME ?= MenuPopup +NDS_CART_VERSION ?= 1 +endif + +all: menu_popup +menu_popup: $(OBJS) + $(build_romdisk) + $(CXX) $(LDFLAGS) -L$(TIKI_DIR)$(TIKI_PLAT) -L$(TIKI_DIR)$(TIKI_PLAT)/lib $(OBJS) $(TIKI_BASE_LIBS) -o menu_popup$(PLATFORM_BINARY_EXT) $(ROMDISK_OBJ) + $(post_build) + +clean: + -rm -f $(OBJS) menu_popup$(PLATFORM_BINARY_EXT) $(ROMDISK_OBJ) +ifeq ($(TIKI_PLAT),nds) + -rm -f menu_popup.nds menu_popup.ds.gba +endif + +TIKI_DIR ?= $(CURDIR)/../../../ +DEPSDIR=$(CURDIR) +include $(TIKI_DIR)$(TIKI_PLAT)/Makefile.rules Property changes on: tiki/examples/menu/popup/Makefile ___________________________________________________________________ Name: svn:executable + * Added: tiki/examples/menu/popup/resources/ca-logo.png =================================================================== (Binary files differ) Property changes on: tiki/examples/menu/popup/resources/ca-logo.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: tiki/examples/menu/popup/resources/typewriter.txf =================================================================== (Binary files differ) Property changes on: tiki/examples/menu/popup/resources/typewriter.txf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: tiki/examples/menu/popup/src/MenuPopup.cpp =================================================================== --- tiki/examples/menu/popup/src/MenuPopup.cpp (rev 0) +++ tiki/examples/menu/popup/src/MenuPopup.cpp 2007-10-30 00:26:20 UTC (rev 521) @@ -0,0 +1,27 @@ +/* +* MenuPopup.cpp +* Basic Popup menu +* +* Copyright (C)2007 Atani Software +* +*/ + +#include <Tiki/tiki.h> +#include <pch.h> + +#if TIKI_PLAT == TIKI_WIN32 +#include <windows.h> + +static char szAppName[] = "MenuPopup"; +int APIENTRY WinMain( HINSTANCE hInst, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow ) +#else +extern "C" int tiki_main( int argc, char *argv[] ); +int main( int argc, char *argv[] ) +#endif +{ +#if TIKI_PLAT != TIKI_WIN32 + return tiki_main( argc, argv ); +#else + return Tiki::DoMain( szAppName, hInst, hPrevInstance, lpCmdLine, nCmdShow ); +#endif +} Added: tiki/examples/menu/popup/src/main.cpp =================================================================== --- tiki/examples/menu/popup/src/main.cpp (rev 0) +++ tiki/examples/menu/popup/src/main.cpp 2007-10-30 00:26:20 UTC (rev 521) @@ -0,0 +1,92 @@ +/* +* MenuPopup.cpp +* Basic Popup menu +* +* Copyright (C)2007 Atani Software +* +*/ + +#include <Tiki/tiki.h> +#include <Tiki/gl.h> +#include <Tiki/hid.h> +#include <Tiki/genmenu.h> +#include <Tiki/font.h> +#include <Tiki/texture.h> +#include <Tiki/drawables/banner.h> +#include <Tiki/drawables/lightbarmenu.h> + +using namespace Tiki; +using namespace Tiki::GL; + +class PopupMenuExample : public GenericMenu { + public: + PopupMenuExample() { +#if TIKI_PLAT == TIKI_DC + m_image = new Texture("/rd/ca-logo.png", true); + m_font = new Font("/rd/typewriter.txf"); +#else + m_image = new Texture("ca-logo.png", true); + m_font = new Font("typewriter.txf"); +#endif + Vector screenSize = Frame::getScreenExtents(); + m_scene->setTranslate(Frame::getScreenCenter() + Vector(0.0f, 0.0f, 10.0f)); + + std::list<std::string> options; + options.push_back("Option 1"); + options.push_back("Option 2"); + options.push_back("Option 3"); + options.push_back("Quit"); + m_menu = new LightBarMenu(options, m_font); + m_menu->setTranslate(Vector(0.0f, 0.0f, 2.0f)); + m_scene->subAdd(m_menu); + + m_background = new Banner(Drawable::Opaque, m_image); + m_background->setSize(screenSize.x, screenSize.y); + m_background->setTranslate(Vector(0.0f, 0.0f, 1.0f)); + m_scene->subAdd(m_background); + } + + int getResult() { + return m_menu->getResult(); + } + + protected: + virtual void inputEvent(const Event & evt) + { + // the lightbar menu drawable handles all events while it is active + if(m_menu->inputEvent(evt)) + { + startExit(); + } + } + private: + RefPtr<LightBarMenu> m_menu; + RefPtr<Banner> m_background; + RefPtr<Texture> m_image; + RefPtr<Font> m_font; +}; + +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[]) +{ + Tiki::init(argc, argv); + Hid::callbackReg( tkCallback, NULL ); + + PopupMenuExample example; + example.doMenu(); + + Debug::printf("You chose option %d\n", example.getResult()); + + Tiki::shutdown(); + + return 0; +} Added: tiki/include/Tiki/drawables/lightbarmenu.h =================================================================== --- tiki/include/Tiki/drawables/lightbarmenu.h (rev 0) +++ tiki/include/Tiki/drawables/lightbarmenu.h 2007-10-30 00:26:20 UTC (rev 521) @@ -0,0 +1,55 @@ +/* + Tiki + + lightbarmenu.h + + Copyright (C)2007 Atani Software + */ +#ifndef __TIKI_DRW_LIGHTBAR_H +#define __TIKI_DRW_LIGHTBAR_H + +#include "Tiki/drawable.h" +#include "Tiki/drawables/label.h" +#include "Tiki/vector.h" +#include "Tiki/color.h" +#include "Tiki/hid.h" + +#include <list> + +namespace Tiki { + +namespace GL { + +class LightBarMenu : public Drawable +{ + public: + LightBarMenu(std::list<std::string> options, + Font *fh, + bool smearText = false, + bool needBox = true, + float borderSize = 3.0f, + const Color boxColor = Color(0.5f, 0.0f, 0.0f, 0.75f), + const Color borderColor = Color(0.5f, 0.75f, 0.0f, 0.0f)); + bool inputEvent(const Hid::Event &evt); + int getResult(); + + virtual void draw(ObjType t); + + private: + bool m_needBox; + Color m_boxColor; + Color m_borderColor; + float m_borderSize; + float m_width; + float m_height; + int m_cursel; + std::list< RefPtr<Label> > m_options; + std::list<Vector> m_optionsPosCache; + Color m_colorSelected; + Color m_colorDefault; +}; + +} // namespace GL +} // namespace Tiki + +#endif // __TIKI_DRW_LIGHTBAR_H Modified: tiki/include/Tiki/gl.h =================================================================== --- tiki/include/Tiki/gl.h 2007-10-29 23:07:45 UTC (rev 520) +++ tiki/include/Tiki/gl.h 2007-10-30 00:26:20 UTC (rev 521) @@ -44,6 +44,9 @@ // defaults to window size for platform. Tiki::Math::Vector getScreenExtents(); +// Returns a suitable Vector pointing to the screen center +Tiki::Math::Vector getScreenCenter(); + } } } Modified: tiki/nds/src/platgl.cpp =================================================================== --- tiki/nds/src/platgl.cpp 2007-10-29 23:07:45 UTC (rev 520) +++ tiki/nds/src/platgl.cpp 2007-10-30 00:26:20 UTC (rev 521) @@ -27,6 +27,10 @@ return Vector( 256.0f, 192.0f, 0.0f ); } +Vector getScreenCenter() { + return Vector( 128.0f, 96.0f, 0.0f ); +} + float getFrameRate() { uint64 cur = Tiki::Time::gettime(); Modified: tiki/osx/src/platgl.cpp =================================================================== --- tiki/osx/src/platgl.cpp 2007-10-29 23:07:45 UTC (rev 520) +++ tiki/osx/src/platgl.cpp 2007-10-30 00:26:20 UTC (rev 521) @@ -74,6 +74,10 @@ return Vector( 640.0f, 480.0f, 0.0f ); } +Vector getScreenCenter() { + return Vector( 320.0f, 240.0f, 0.0f ); } + } } +} Modified: tiki/sdl/src/platgl.cpp =================================================================== --- tiki/sdl/src/platgl.cpp 2007-10-29 23:07:45 UTC (rev 520) +++ tiki/sdl/src/platgl.cpp 2007-10-30 00:26:20 UTC (rev 521) @@ -48,9 +48,13 @@ return Vector( 640.0f, 480.0f, 0.0f ); } +Vector getScreenCenter() { + return Vector( 320.0f, 240.0f, 0.0f ); } + } } +} extern "C" { Added: tiki/src/gl/drawables/lightbarmenu.cpp =================================================================== --- tiki/src/gl/drawables/lightbarmenu.cpp (rev 0) +++ tiki/src/gl/drawables/lightbarmenu.cpp 2007-10-30 00:26:20 UTC (rev 521) @@ -0,0 +1,216 @@ +/* + Tiki + + lightbarmenu.cpp + + Copyright (C)2007 Atani Software + */ + +#include "pch.h" +#include "Tiki/drawables/lightbarmenu.h" + +using namespace Tiki::GL; +using namespace Tiki::Hid; + +LightBarMenu::LightBarMenu(std::list<std::string> options, + Font *fh, bool smearText, bool needBox, float borderSize, + Color boxColor, Color borderColor) +{ + m_needBox = needBox; + m_borderSize = borderSize; + m_borderColor = borderColor; + m_boxColor = boxColor; + m_colorSelected = Color(1, 1, 0, 1); + m_colorDefault = Color(1, 1, 1, 1); + m_cursel = 0; + m_height = 0.0f; + m_width = 0.0f; + + float y = 10.0f; + for(std::list<std::string>::const_iterator iter = options.begin(); iter != options.end(); iter++) + { + float h, w; + std::string str = *iter; + fh->getTextSize(str, w, h); + if(m_width < w) + { + m_width = w; + } + RefPtr<Label> tempLabel = new Label(fh, str, 24, true, true); + tempLabel->setTranslate(Vector(0.0f, y, 0.01f)); + Vector locTL = Vector(0.0f, y, 0.01f); + locTL.x -= w / 2; + locTL.y -= h / 2; + m_optionsPosCache.push_back(locTL); + Vector locBR = Vector(0.0f, y, 0.01f); + locBR.x += w / 2; + locBR.y += h / 2; + m_optionsPosCache.push_back(locBR); + m_options.push_back(tempLabel); + subAdd(tempLabel); + y += 25.0f; + } + m_height = (y - 10.0f) + (m_borderSize * 2); + m_width += (m_borderSize * 2); + + m_options.front()->setTint(m_colorSelected); +} + +bool LightBarMenu::inputEvent(const Event &evt) +{ + if(evt.dev == NULL || evt.type == Event::EvtQuit) + { + return true; + } + switch(evt.dev->getType()) + { + case Device::TypeKeyboard: + if(evt.type == Event::EvtKeyUp) + { + switch(evt.key) + { + case Event::KeyUp: + if(m_cursel > 0) + { + m_cursel--; + } + else + { + m_cursel = static_cast<int>(m_options.size() - 1); + } + break; + case Event::KeyDown: + if(static_cast<std::list< RefPtr<Label> >::size_type>(m_cursel) < + m_options.size() - 1) + { + m_cursel++; + } + else + { + m_cursel = 0; + } + break; + case 27: // ESCAPE KEY + m_cursel = -1; + case '\r': + case '\n': + return true; + } + } + break; + case Device::TypeJoystick: + switch(evt.btn) + { + case Event::BtnUp: + if(m_cursel > 0) + { + m_cursel--; + } + else + { + m_cursel = static_cast<int>(m_options.size() - 1); + } + break; + case Event::BtnDown: + if(static_cast<std::list< RefPtr<Label> >::size_type>(m_cursel) < + m_options.size() - 1) + { + m_cursel++; + } + else + { + m_cursel = 0; + } + break; + case Event::BtnB: + m_cursel = -1; + case Event::BtnA: + return true; + } + break; + case Device::TypeMouse: + { + int cnt = -1; + switch(evt.type) + { + case Event::EvtMouseMove: + for(std::list<Vector>::const_iterator iter = m_optionsPosCache.begin(); iter != m_optionsPosCache.end(); iter++) + { + cnt++; + const Vector &tl = *iter; + const Vector &br = *++iter; + + if( (evt.x >= tl.x && evt.x <= br.x) && + (evt.y >= tl.y && evt.y <= br.y)) + { + m_cursel = cnt; + } + } + break; + case Event::EvtBtnPress: + for(std::list<Vector>::const_iterator iter = m_optionsPosCache.begin(); iter != m_optionsPosCache.end(); iter++) + { + cnt++; + const Vector &tl = *iter; + const Vector &br = *++iter; + + if( (evt.x >= tl.x && evt.x <= br.x) && + (evt.y >= tl.y && evt.y <= br.y)) + { + m_cursel = cnt; + return true; + } + } + break; + } + } + break; + default: + Tiki::Debug::printf("Unknown Device: %d\n", evt.dev->getType()); + } + + int counter = 0; + for(std::list< RefPtr<Label> >::const_iterator iter = m_options.begin(); iter != m_options.end(); iter++) + { + Label *label = *iter; + label->setTint(m_colorDefault); + if(counter == m_cursel) + { + label->setTint(m_colorSelected); + } + counter++; + } + return false; +} + +int LightBarMenu::getResult() +{ + Tiki::Debug::printf("Result: %d\n", m_cursel); + return m_cursel; +} + +void LightBarMenu::draw(ObjType list) +{ + if(!m_needBox) + { + return; + } + else if(list==Trans) + { + const Vector & tv = getPosition(); + Texture::deselect(); + glBegin(GL_QUADS); + m_borderColor.select(); + glBegin(GL_QUADS); + glVertex3f(tv.x - m_width/2, tv.y, tv.z / 1000.0f); + glVertex3f(tv.x + m_width/2, tv.y, tv.z / 1000.0f); + glVertex3f(tv.x + m_width/2, tv.y + m_height, tv.z / 1000.0f); + glVertex3f(tv.x - m_width/2, tv.y + m_height, tv.z / 1000.0f); + m_boxColor.select(); + glVertex3f(tv.x - (m_width - m_borderSize)/2, tv.y + m_borderSize, tv.z / 1000.0f); + glVertex3f(tv.x + (m_width - m_borderSize)/2, tv.y + m_borderSize, tv.z / 1000.0f); + glVertex3f(tv.x + (m_width - m_borderSize)/2, tv.y + (m_height - m_borderSize), tv.z / 1000.0f); + glVertex3f(tv.x - (m_width - m_borderSize)/2, tv.y + (m_height - m_borderSize), tv.z / 1000.0f); + glEnd(); + } +} Modified: tiki/win32/src/platgl.cpp =================================================================== --- tiki/win32/src/platgl.cpp 2007-10-29 23:07:45 UTC (rev 520) +++ tiki/win32/src/platgl.cpp 2007-10-30 00:26:20 UTC (rev 521) @@ -324,9 +324,13 @@ return Vector( static_cast<float>(m_targetW), static_cast<float>(m_targetH), 0.0f ); } +Vector getScreenCenter() { + return Vector( static_cast<float>(m_targetW / 2), static_cast<float>(m_targetH / 2), 0.0f ); } + } } +} extern "C" void tiki_scene_begin_hook() { // Set up our GL context for painting, if needed. If this is another This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-10-29 23:07:47
|
Revision: 520 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=520&view=rev Author: atani Date: 2007-10-29 16:07:45 -0700 (Mon, 29 Oct 2007) Log Message: ----------- support for pushing events out for received data. Modified Paths: -------------- tiki/examples/net/httpclient/src/main.cpp tiki/include/Tiki/net/buffer.h tiki/include/Tiki/net/http/useragent.h tiki/include/Tiki/net/socket.h tiki/include/Tiki/net/tcpsocket.h tiki/src/base/object.cpp tiki/src/net/http/cookiejar.cpp tiki/src/net/http/useragent.cpp tiki/src/net/socket.cpp tiki/src/net/tcpsocket.cpp Modified: tiki/examples/net/httpclient/src/main.cpp =================================================================== --- tiki/examples/net/httpclient/src/main.cpp 2007-10-28 18:38:46 UTC (rev 519) +++ tiki/examples/net/httpclient/src/main.cpp 2007-10-29 23:07:45 UTC (rev 520) @@ -7,6 +7,7 @@ */ #include <Tiki/tiki.h> +#include <Tiki/object.h> #include <Tiki/refcnt.h> #include <Tiki/hid.h> #include <Tiki/tikitime.h> @@ -22,6 +23,27 @@ using namespace Tiki::Net::Http; using namespace Tiki::GL; +class EventReceiver : public Object { + public: + EventReceiver() {} + TIKI_OBJECT_DECLS( EventReceiver ) + + int progressUpdate(Selector *sel, Object *arg) { + SocketProgress *progress = reinterpret_cast<SocketProgress *>(arg); + if(progress->getBytesReceived() > 0) { + Debug::printf("Recv %d/%d\n", progress->getBytesReceived(), progress->getBytesExpected()); + } + else { + Debug::printf("Sent %d/%d\n", progress->getBytesSent(), progress->getBytesExpected()); + } + } +}; + +TIKI_OBJECT_NAME( EventReceiver ) +TIKI_OBJECT_BEGIN( Object, EventReceiver ) +TIKI_OBJECT_RECEIVER( "progressUpdate", EventReceiver::progressUpdate ) +TIKI_OBJECT_END( EventReceiver ) + volatile bool g_quitting = false; void tkCallback( const Hid::Event & evt, void * data ) { if ( evt.type == Hid::Event::EvtQuit ) { @@ -40,12 +62,16 @@ Tiki::Net::connect(); HttpUserAgent *useragent = new HttpUserAgent(); + useragent->connect( "progressUpdate", new EventReceiver() ); useragent->setCookieJar(new CookieJar()); useragent->setIgnoreCookies(false); useragent->getCookieJar()->loadFromXML("cookies.xml"); - //useragent->setProxyHost("proxy.example.com"); - //useragent->setProxyPort(80); + if(argc >= 3) { + useragent->setProxyHost(argv[1]); + useragent->setProxyPort(atoi(argv[2])); + } + Request *request = new Request(); request->setUrl("http://www.google.com/"); Modified: tiki/include/Tiki/net/buffer.h =================================================================== --- tiki/include/Tiki/net/buffer.h 2007-10-28 18:38:46 UTC (rev 519) +++ tiki/include/Tiki/net/buffer.h 2007-10-29 23:07:45 UTC (rev 520) @@ -151,4 +151,4 @@ } // namespace Tiki -#endif // __TIKI_NET_UDPPACKET_H +#endif // __TIKI_NET_BUFFER_H Modified: tiki/include/Tiki/net/http/useragent.h =================================================================== --- tiki/include/Tiki/net/http/useragent.h 2007-10-28 18:38:46 UTC (rev 519) +++ tiki/include/Tiki/net/http/useragent.h 2007-10-29 23:07:45 UTC (rev 520) @@ -24,7 +24,7 @@ using std::string; using std::list; -class HttpUserAgent : public RefCnt { +class HttpUserAgent : public Object { public: HttpUserAgent(); @@ -73,7 +73,10 @@ Response *get(Request *req); Response *post(Request *req); - + + protected: + TIKI_OBJECT_DECLS( HttpUserAgent ) + private: string m_userAgentName; string m_proxyHost; Modified: tiki/include/Tiki/net/socket.h =================================================================== --- tiki/include/Tiki/net/socket.h 2007-10-28 18:38:46 UTC (rev 519) +++ tiki/include/Tiki/net/socket.h 2007-10-29 23:07:45 UTC (rev 520) @@ -8,7 +8,7 @@ #ifndef __TIKI_NET_SOCKET_H #define __TIKI_NET_SOCKET_H -#include "Tiki/refcnt.h" +#include "Tiki/object.h" #include "Tiki/net/address.h" #include "Tiki/net/buffer.h" @@ -16,9 +16,9 @@ namespace Net { -class Socket : public RefCnt +class Socket : public Object { - public: + public: Socket(); Socket(Address *address); virtual ~Socket() {} @@ -77,6 +77,9 @@ virtual bool isOpen() = 0; + protected: + TIKI_OBJECT_DECLS( Socket ) + private: RefPtr<Address> m_peerAddress; RefPtr<Address> m_localAddress; @@ -84,6 +87,30 @@ bool m_reuse; }; +class SocketProgress : public Object { + public: + SocketProgress(size_t expected, size_t received, size_t sent) { + m_expected = expected; + m_received = received; + m_sent = sent; + } + size_t getBytesExpected() { + return m_expected; + } + size_t getBytesReceived() { + return m_received; + } + size_t getBytesSent() { + return m_sent; + } + protected: + TIKI_OBJECT_DECLS( Socket ) + private: + size_t m_expected; + size_t m_received; + size_t m_sent; +}; + } // namespace Net } // namespace Tiki Modified: tiki/include/Tiki/net/tcpsocket.h =================================================================== --- tiki/include/Tiki/net/tcpsocket.h 2007-10-28 18:38:46 UTC (rev 519) +++ tiki/include/Tiki/net/tcpsocket.h 2007-10-29 23:07:45 UTC (rev 520) @@ -32,12 +32,12 @@ class TCPSocket : public Socket { public: - TCPSocket() : m_open(false) {}; - TCPSocket(Address *address) : Socket(address), m_open(false) {}; + TCPSocket() : m_open(false), m_sendEvents(true) {}; + TCPSocket(Address *address) : Socket(address), m_open(false), m_sendEvents(true) {}; #if TIKI_PLAT == TIKI_WIN32 - TCPSocket(Address *address, SOCKET socket) : Socket(address), m_open(true), m_socket(socket) {setNonBlocking(false);}; + TCPSocket(Address *address, SOCKET socket) : Socket(address), m_open(true), m_sendEvents(true), m_socket(socket) {setNonBlocking(false);}; #else - TCPSocket(RefPtr<Address> address, int socket) : Socket(address), m_open(true), m_socket(socket) {setNonBlocking(false);}; + TCPSocket(RefPtr<Address> address, int socket) : Socket(address), m_open(true), m_sendEvents(true), m_socket(socket) {setNonBlocking(false);}; #endif virtual ~TCPSocket() {} @@ -67,8 +67,11 @@ virtual void setNonBlocking(bool blocking); protected: + TIKI_OBJECT_DECLS( TCPSocket ) + uint16 m_port; bool m_open; + bool m_sendEvents; #if TIKI_PLAT == TIKI_WIN32 SOCKET m_socket; #else Modified: tiki/src/base/object.cpp =================================================================== --- tiki/src/base/object.cpp 2007-10-28 18:38:46 UTC (rev 519) +++ tiki/src/base/object.cpp 2007-10-29 23:07:45 UTC (rev 520) @@ -106,8 +106,10 @@ // Find the target method. ReceiverMap::iterator i = m_receivers.find( msg ); if ( i == m_receivers.end() ) { +#if defined(DEBUG_OBJECT) Debug::printf( "WARNING: Selector %s performed on object %s ignored!\n", msg.c_str(), m_className.c_str() ); +#endif return -1; } @@ -128,6 +130,12 @@ Selector targetSel = target.second; if ( targetSel == "" ) targetSel = msg; + if(targetObj == NULL) { +#if defined(DEBUG_OBJECT) + Debug::printf("WARNING: Selector \'%s\' on object %s maps to NULL!\n", msg.c_str(), m_className.c_str()); +#endif + return -1; + } return targetObj->perform( targetSel, this, arg ); } Modified: tiki/src/net/http/cookiejar.cpp =================================================================== --- tiki/src/net/http/cookiejar.cpp 2007-10-28 18:38:46 UTC (rev 519) +++ tiki/src/net/http/cookiejar.cpp 2007-10-29 23:07:45 UTC (rev 520) @@ -73,8 +73,6 @@ } void CookieJar::addCookie(string httpLine, string host, string resource) { - - Tiki::Debug::printf("COOKIE: %s\n", httpLine.c_str()); Cookie *cookie; string value = httpLine; @@ -227,7 +225,6 @@ 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(); @@ -301,4 +298,4 @@ }; // namespace Net -}; // namespace Tiki \ No newline at end of file +}; // namespace Tiki Modified: tiki/src/net/http/useragent.cpp =================================================================== --- tiki/src/net/http/useragent.cpp 2007-10-28 18:38:46 UTC (rev 519) +++ tiki/src/net/http/useragent.cpp 2007-10-29 23:07:45 UTC (rev 520) @@ -28,6 +28,11 @@ using std::istringstream; using std::ios; +TIKI_OBJECT_NAME( HttpUserAgent ) +TIKI_OBJECT_BEGIN( Object, HttpUserAgent ) +TIKI_OBJECT_OUTLET( "progressUpdate" ) +TIKI_OBJECT_END( HttpUserAgent ) + HttpUserAgent::HttpUserAgent() { #if TIKI_PLAT == TIKI_WIN32 m_userAgentName = "Tiki/1.0 (Windows)"; @@ -58,10 +63,6 @@ parseUrl(req->getUrl(), hostname, resource, port); - string requestText; - buildRequest(hostname, resource, port, "GET", req, requestText); - //Tiki::Debug::printf("Request:\n%s", requestText.c_str()); - TCPSocket *socket; if(m_proxyHost.empty()) { socket = new TCPSocket(new Address(hostname, port)); @@ -79,6 +80,9 @@ return response; } + string requestText; + buildRequest(hostname, resource, port, "GET", req, requestText); + Tiki::Debug::printf("Sending request...\n"); Tiki::Debug::printf(requestText.c_str()); socket->send(requestText); @@ -103,10 +107,6 @@ parseUrl(req->getUrl(), hostname, resource, port); - string requestText; - buildRequest(hostname, resource, port, "POST", req, requestText); - //Tiki::Debug::printf("Request:\n%s", requestText.c_str()); - TCPSocket *socket; if(m_proxyHost.empty()) { socket = new TCPSocket(new Address(hostname, port)); @@ -124,10 +124,23 @@ return response; } + string requestText; + buildRequest(hostname, resource, port, "POST", req, requestText); + Tiki::Debug::printf("Sending request...\n"); socket->send(requestText); - + + size_t maxSize = requestText.length(); + size_t sentSize = maxSize; list<string> content = req->getContentPartNames(); + for(list<string>::iterator iter = content.begin(); + iter != content.end(); + ++iter) { + Buffer *buf = req->getContentPart(*iter); + if(buf->getUsedDataLen() > 0) { + maxSize += buf->getUsedDataLen(); + } + } if(content.size() > 1 || req->isForcedMultiPartUpload()) { string status = ""; socket->recv(status); @@ -151,19 +164,26 @@ //Tiki::Debug::printf("CONTENT_HEADER:\n%s", headerText.c_str()); socket->send(headerText); socket->send(buf); + sentSize += buf->getUsedDataLen(); + SocketProgress *progress = new SocketProgress(maxSize, 0, sentSize); + emit( "progressUpdate", progress ); + delete progress; } } string footerText = "\r\n--"; footerText.append(req->getBoundaryMarker()); footerText.append("--\r\n"); - //Tiki::Debug::printf("CONTENT_FOOTER:\n%s", footerText.c_str()); socket->send(footerText); } else if(content.size() == 1) { Buffer *buf = req->getContentPart(*content.begin()); if(buf->getUsedDataLen() > 0) { socket->send(buf); + SocketProgress *progress = new SocketProgress(maxSize, 0, buf->getUsedDataLen()); + emit( "progressUpdate", progress ); + delete progress; } + } readResponse(response, socket); @@ -286,24 +306,23 @@ string status = ""; socket->recv(status); - Tiki::Debug::printf("%s\n", status.c_str()); - - //Tiki::Debug::printf("Status: %s\n", status.c_str()); for(string::size_type i = 0; i < status.length(); i++) { if(status.at(i) == ' ') { response->setResultCode(atoi(status.c_str()+i + 1)); break; } } - + + size_t responseSize = -1; + size_t receivedSoFar = 0; while(1) { string line = ""; socket->recv(line); + receivedSoFar += line.size(); if(line.size() == 0) { // done with headers break; } - //Tiki::Debug::printf("HEADER_LINE: %s\n", line.c_str()); if(line.find(":") != string::npos) { string field = line.substr(0, line.find(":")); string value = line.substr(line.find(":") + 1); @@ -316,12 +335,20 @@ m_cookieJar->addCookie(value, host, resource); } } + else if(!field.compare("Content-Length")) { + responseSize = atoi(value.c_str()); + } else { response->setHeaderParam(field, value); } } + if(responseSize != -1) { + SocketProgress *progress = new SocketProgress(responseSize, receivedSoFar, 0); + emit( "progressUpdate", progress ); + delete progress; + } } - + Buffer *fullBuf = new Buffer(1); if(!response->getHeaderParam("Transfer-Encoding").compare("chunked")) { @@ -344,20 +371,28 @@ sizestream.unsetf(ios::dec); sizestream.setf(ios::skipws); sizestream >> sizeDecoded; + responseSize = receivedSoFar + sizeDecoded; - //Tiki::Debug::printf("chunk size: %d [%s]\n", sizeDecoded, size.c_str()); if(sizeDecoded > 0) { - Buffer *chunkBuf = new Buffer(sizeDecoded); socket->recv(chunkBuf); + receivedSoFar += chunkBuf->getUsedDataLen(); + SocketProgress *progress = new SocketProgress(responseSize, receivedSoFar, 0); + emit( "progressUpdate", progress ); + delete progress; if(chunkBuf->getUsedDataLen() < sizeDecoded) { - //Tiki::Debug::printf("Buffer underflow\n"); size_t needed = sizeDecoded - chunkBuf->getUsedDataLen(); while(needed > 0) { Buffer *chunkBuf2 = new Buffer(needed); socket->recv(chunkBuf2); chunkBuf->append(chunkBuf2); + if(chunkBuf2->getUsedDataLen() > 0) { + receivedSoFar += chunkBuf2->getUsedDataLen(); + SocketProgress *progress = new SocketProgress(responseSize, receivedSoFar, 0); + emit( "progressUpdate", progress ); + delete progress; + } needed -= chunkBuf2->getUsedDataLen(); delete chunkBuf2; } @@ -367,15 +402,17 @@ delete chunkBuf; } } while(sizeDecoded > 0); - //Tiki::Debug::printf("total size: %d %x\n", totalSize, totalSize); } else if(response->getHeaderParam("Content-Length").compare("")) { Tiki::Debug::printf("Encoding is inline\n"); size_t sizeDecoded = atoi(response->getHeaderParam("Content-Length").c_str()); - //Tiki::Debug::printf("decodedSize: %d\n", sizeDecoded); Buffer *chunkBuf = new Buffer(sizeDecoded); socket->recv(chunkBuf); + receivedSoFar += chunkBuf->getUsedDataLen(); + SocketProgress *progress = new SocketProgress(responseSize, receivedSoFar, 0); + emit( "progressUpdate", progress ); + delete progress; if(chunkBuf->getUsedDataLen() < sizeDecoded) { sizeDecoded -= chunkBuf->getUsedDataLen(); @@ -383,6 +420,12 @@ Buffer *chunkBuf2 = new Buffer(sizeDecoded); socket->recv(chunkBuf2); chunkBuf->append(chunkBuf2); + if(chunkBuf2->getUsedDataLen() > 0) { + receivedSoFar += chunkBuf2->getUsedDataLen(); + SocketProgress *progress = new SocketProgress(responseSize, receivedSoFar, 0); + emit( "progressUpdate", progress ); + delete progress; + } sizeDecoded -= chunkBuf2->getUsedDataLen(); delete chunkBuf2; } Modified: tiki/src/net/socket.cpp =================================================================== --- tiki/src/net/socket.cpp 2007-10-28 18:38:46 UTC (rev 519) +++ tiki/src/net/socket.cpp 2007-10-29 23:07:45 UTC (rev 520) @@ -14,6 +14,15 @@ namespace Net { +TIKI_OBJECT_NAME( Socket ) +TIKI_OBJECT_BEGIN( Object, Socket ) +TIKI_OBJECT_OUTLET( "progress" ) +TIKI_OBJECT_END( Socket ) + +TIKI_OBJECT_NAME( SocketProgress ) +TIKI_OBJECT_BEGIN( Object, SocketProgress ) +TIKI_OBJECT_END( SocketProgress ) + Socket::Socket() { m_localAddress = new Address(); Modified: tiki/src/net/tcpsocket.cpp =================================================================== --- tiki/src/net/tcpsocket.cpp 2007-10-28 18:38:46 UTC (rev 519) +++ tiki/src/net/tcpsocket.cpp 2007-10-29 23:07:45 UTC (rev 520) @@ -18,18 +18,26 @@ namespace TCP { +TIKI_OBJECT_NAME( TCPSocket ) +TIKI_OBJECT_BEGIN( Socket, TCPSocket ) +TIKI_OBJECT_OUTLET( "progress" ) +TIKI_OBJECT_END( TCPSocket ) + void TCPSocket::send(Buffer *buffer) { uint8 *data = buffer->getData(); size_t dataLen = buffer->getUsedDataLen(); int len; + size_t dataSent = 0; 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; + dataSent += len; + SocketProgress *progress = new SocketProgress(buffer->getUsedDataLen(), 0, dataSent); + emit( "progress", progress ); + delete progress; } } while(dataLen > 0 && (len > 0 || errno == EINTR)); } @@ -38,14 +46,17 @@ uint8 *data = (uint8 *)buffer.c_str(); size_t dataLen = buffer.length(); int len; + size_t dataSent = 0; 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; + dataSent += len; + SocketProgress *progress = new SocketProgress(buffer.length(), 0, dataSent); + emit( "progress", progress ); + delete progress; } } while(dataLen > 0 && (len > 0 || errno == EINTR)); } @@ -61,7 +72,6 @@ memset(tmp, 0, maxReadData); int recvlen = 0; errno = 0; - //Tiki::Debug::printf("receiving %d bytes\n", data->getDataLen()); do { recvlen = ::recv(m_socket, (char *)tmp, (int)maxReadData, 0); #if TIKI_PLAT == TIKI_WIN32 @@ -70,7 +80,11 @@ } while(errno == EINTR); #endif if(recvlen > 0) { - //Tiki::Debug::printf("received %d bytes\nerrno %d\n", recvlen, errno); + if(m_sendEvents) { + SocketProgress *progress = new SocketProgress(maxReadData, recvlen, 0); + emit( "progress", progress ); + delete progress; + } data->setData(tmp, recvlen); } else if(recvlen < 0) { @@ -82,20 +96,27 @@ } 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; - } - } - } + Buffer *recvBuf = new Buffer(1); + data = ""; + m_sendEvents = false; + 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' ) { + if(data.length() > 0) { + SocketProgress *progress = new SocketProgress(data.length(), data.length(), 0); + emit( "progress", progress ); + delete progress; + } + break; + } + } + } + m_sendEvents = true; delete recvBuf; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-10-28 18:38:49
|
Revision: 519 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=519&view=rev Author: atani Date: 2007-10-28 11:38:46 -0700 (Sun, 28 Oct 2007) Log Message: ----------- Adding "events" example which is a stripped down version of the old TikiTest example. Modified Paths: -------------- tiki/examples/Makefile tiki/win32/tiki.sln Added Paths: ----------- tiki/examples/events/ tiki/examples/events/English.lproj/ tiki/examples/events/English.lproj/InfoPlist.strings tiki/examples/events/English.lproj/MainMenu.nib/ tiki/examples/events/English.lproj/MainMenu.nib/classes.nib tiki/examples/events/English.lproj/MainMenu.nib/info.nib tiki/examples/events/English.lproj/MainMenu.nib/objects.nib tiki/examples/events/Info.plist tiki/examples/events/Makefile tiki/examples/events/events.cbp tiki/examples/events/events.vcproj tiki/examples/events/events.xcodeproj/ tiki/examples/events/events.xcodeproj/project.pbxproj tiki/examples/events/events_Prefix.pch tiki/examples/events/main.m tiki/examples/events/src/ tiki/examples/events/src/Controller.h tiki/examples/events/src/Controller.m tiki/examples/events/src/TikiEvents.cpp tiki/examples/events/src/test.cpp tiki/examples/events/src/testobj.cpp tiki/examples/events/src/testobj.h tiki/examples/events/version.plist Modified: tiki/examples/Makefile =================================================================== --- tiki/examples/Makefile 2007-10-27 02:10:42 UTC (rev 518) +++ tiki/examples/Makefile 2007-10-28 18:38:46 UTC (rev 519) @@ -1,5 +1,5 @@ -SUBDIRS = console net nehe +SUBDIRS = events console net nehe TIKI_DIR ?= $(CURDIR)/../ include $(TIKI_DIR)$(TIKI_PLAT)/Makefile.rules Property changes on: tiki/examples/events ___________________________________________________________________ Name: svn:ignore + Debug *.user Added: tiki/examples/events/English.lproj/InfoPlist.strings =================================================================== (Binary files differ) Property changes on: tiki/examples/events/English.lproj/InfoPlist.strings ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: tiki/examples/events/English.lproj/MainMenu.nib/classes.nib =================================================================== --- tiki/examples/events/English.lproj/MainMenu.nib/classes.nib (rev 0) +++ tiki/examples/events/English.lproj/MainMenu.nib/classes.nib 2007-10-28 18:38:46 UTC (rev 519) @@ -0,0 +1,12 @@ +{ + IBClasses = ( + { + CLASS = Controller; + LANGUAGE = ObjC; + OUTLETS = {mainView = NSView; mainWindow = NSWindow; }; + SUPERCLASS = NSObject; + }, + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; } + ); + IBVersion = 1; +} \ No newline at end of file Added: tiki/examples/events/English.lproj/MainMenu.nib/info.nib =================================================================== --- tiki/examples/events/English.lproj/MainMenu.nib/info.nib (rev 0) +++ tiki/examples/events/English.lproj/MainMenu.nib/info.nib 2007-10-28 18:38:46 UTC (rev 519) @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>IBDocumentLocation</key> + <string>87 99 356 240 0 0 1280 1002 </string> + <key>IBEditorPositions</key> + <dict> + <key>29</key> + <string>94 344 338 44 0 0 1280 1002 </string> + </dict> + <key>IBFramework Version</key> + <string>437.0</string> + <key>IBOpenObjects</key> + <array> + <integer>29</integer> + <integer>21</integer> + </array> + <key>IBSystem Version</key> + <string>8A428</string> +</dict> +</plist> Added: tiki/examples/events/English.lproj/MainMenu.nib/objects.nib =================================================================== (Binary files differ) Property changes on: tiki/examples/events/English.lproj/MainMenu.nib/objects.nib ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: tiki/examples/events/Info.plist =================================================================== --- tiki/examples/events/Info.plist (rev 0) +++ tiki/examples/events/Info.plist 2007-10-28 18:38:46 UTC (rev 519) @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleExecutable</key> + <string>TikiEvents</string> + <key>CFBundleIconFile</key> + <string></string> + <key>CFBundleIdentifier</key> + <string>com.apple.myCocoaApp</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>1.0</string> + <key>NSMainNibFile</key> + <string>MainMenu</string> + <key>NSPrincipalClass</key> + <string>NSApplication</string> +</dict> +</plist> Added: tiki/examples/events/Makefile =================================================================== --- tiki/examples/events/Makefile (rev 0) +++ tiki/examples/events/Makefile 2007-10-28 18:38:46 UTC (rev 519) @@ -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 ?= TKEV +NDS_CART_ID ?= TK +NDS_CART_NAME ?= TikiEvents +NDS_CART_VERSION ?= 1 +endif + +all: tikievents +tikievents: $(OBJS) + $(build_romdisk) + $(CXX) $(LDFLAGS) -L$(TIKI_DIR)$(TIKI_PLAT) -L$(TIKI_DIR)$(TIKI_PLAT)/lib $(OBJS) $(TIKI_BASE_LIBS) -o tikievents$(PLATFORM_BINARY_EXT) $(ROMDISK_OBJ) + $(post_build) + +clean: + -rm -f $(OBJS) tikievents$(PLATFORM_BINARY_EXT) $(ROMDISK_OBJ) +ifeq ($(TIKI_PLAT),nds) + -rm -f tikievents.nds tikievents.ds.gba +endif + +TIKI_DIR ?= $(CURDIR)/../../ +DEPSDIR=$(CURDIR) +include $(TIKI_DIR)$(TIKI_PLAT)/Makefile.rules Added: tiki/examples/events/events.cbp =================================================================== --- tiki/examples/events/events.cbp (rev 0) +++ tiki/examples/events/events.cbp 2007-10-28 18:38:46 UTC (rev 519) @@ -0,0 +1,57 @@ +<?xml version="1.0"?> +<!DOCTYPE CodeBlocks_project_file> +<CodeBlocks_project_file> + <FileVersion major="1" minor="1"/> + <Project> + <Option title="TikiEvents"/> + <Option makefile="Makefile"/> + <Option makefile_is_custom="0"/> + <Option compiler="0"/> + <Build> + <Target title="default"> + <Option output="tikievents.exe"/> + <Option working_dir="."/> + <Option object_output=".objs"/> + <Option deps_output=".deps"/> + <Option type="0"/> + <Option compiler="0"/> + <Option projectResourceIncludeDirsRelation="0"/> + </Target> + </Build> + <Compiler> + <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"/> + </Linker> + <Unit filename="src\TikiEvents.cpp"> + <Option compilerVar="CPP"/> + <Option objectName="TikiEvents.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> + </Project> +</CodeBlocks_project_file> Added: tiki/examples/events/events.vcproj =================================================================== --- tiki/examples/events/events.vcproj (rev 0) +++ tiki/examples/events/events.vcproj 2007-10-28 18:38:46 UTC (rev 519) @@ -0,0 +1,213 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="TikiEvents" + ProjectGUID="{16508E01-E2E1-47B1-9B3A-6991C0032E76}" + 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\TikiEvents.cpp" + > + </File> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> Added: tiki/examples/events/events.xcodeproj/project.pbxproj =================================================================== --- tiki/examples/events/events.xcodeproj/project.pbxproj (rev 0) +++ tiki/examples/events/events.xcodeproj/project.pbxproj 2007-10-28 18:38:46 UTC (rev 519) @@ -0,0 +1,366 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 42; + objects = { + +/* Begin PBXBuildFile section */ + 8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; }; + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; + 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; + C4332D17079B224F0025BF39 /* Tiki.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = C4F50D800799DE840001D0D0 /* Tiki.framework */; }; + C47EB6A108366BE4009FA9BA /* testobj.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C47EB69F08366BE4009FA9BA /* testobj.cpp */; }; + C4B588860794D44D004D22F2 /* test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C4B588850794D44D004D22F2 /* test.cpp */; }; + C4F50D810799DE840001D0D0 /* Tiki.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C4F50D800799DE840001D0D0 /* Tiki.framework */; }; + C4F50ECE0799E1350001D0D0 /* Controller.m in Sources */ = {isa = PBXBuildFile; fileRef = C4F50ECC0799E1350001D0D0 /* Controller.m */; }; + C4F50EEF0799E5B40001D0D0 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C4F50EEE0799E5B40001D0D0 /* OpenGL.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + C4332D16079B22450025BF39 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + C4332D17079B224F0025BF39 /* Tiki.framework in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; }; + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; + 29B97319FDCFA39411CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/MainMenu.nib; sourceTree = "<group>"; }; + 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; }; + 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; }; + 32CA4F630368D1EE00C91783 /* events_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = events_Prefix.pch; sourceTree = "<group>"; }; + 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; }; + 8D1107320486CEB800E47090 /* TikiEvents.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TikiEvents.app; sourceTree = BUILT_PRODUCTS_DIR; }; + C47EB69F08366BE4009FA9BA /* testobj.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = testobj.cpp; path = src/testobj.cpp; sourceTree = SOURCE_ROOT; }; + C47EB6A008366BE4009FA9BA /* testobj.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = testobj.h; path = src/testobj.h; sourceTree = SOURCE_ROOT; }; + C4B588850794D44D004D22F2 /* test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = test.cpp; path = src/test.cpp; sourceTree = "<group>"; }; + C4F50D800799DE840001D0D0 /* Tiki.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Tiki.framework; path = ../../osx/build/Development/Tiki.framework; sourceTree = SOURCE_ROOT; }; + C4F50ECB0799E1350001D0D0 /* Controller.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Controller.h; path = src/Controller.h; sourceTree = SOURCE_ROOT; }; + C4F50ECC0799E1350001D0D0 /* Controller.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = Controller.m; path = src/Controller.m; sourceTree = SOURCE_ROOT; }; + C4F50EEE0799E5B40001D0D0 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D11072E0486CEB800E47090 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, + C4F50D810799DE840001D0D0 /* Tiki.framework in Frameworks */, + C4F50EEF0799E5B40001D0D0 /* OpenGL.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Classes */ = { + isa = PBXGroup; + children = ( + C4F50ECB0799E1350001D0D0 /* Controller.h */, + C4F50ECC0799E1350001D0D0 /* Controller.m */, + C47EB6A008366BE4009FA9BA /* testobj.h */, + C47EB69F08366BE4009FA9BA /* testobj.cpp */, + C4B588850794D44D004D22F2 /* test.cpp */, + ); + name = Classes; + sourceTree = "<group>"; + }; + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + C4F50EEE0799E5B40001D0D0 /* OpenGL.framework */, + C4F50D800799DE840001D0D0 /* Tiki.framework */, + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, + ); + name = "Linked Frameworks"; + sourceTree = "<group>"; + }; + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 29B97325FDCFA39411CA2CEA /* Foundation.framework */, + 29B97324FDCFA39411CA2CEA /* AppKit.framework */, + ); + name = "Other Frameworks"; + sourceTree = "<group>"; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D1107320486CEB800E47090 /* TikiEvents.app */, + ); + name = Products; + sourceTree = "<group>"; + }; + 29B97314FDCFA39411CA2CEA /* TikiEvents */ = { + isa = PBXGroup; + children = ( + 080E96DDFE201D6D7F000001 /* Classes */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = TikiEvents; + sourceTree = "<group>"; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 32CA4F630368D1EE00C91783 /* events_Prefix.pch */, + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = "<group>"; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + 8D1107310486CEB800E47090 /* Info.plist */, + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, + 29B97318FDCFA39411CA2CEA /* MainMenu.nib */, + ); + name = Resources; + sourceTree = "<group>"; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = "<group>"; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D1107260486CEB800E47090 /* TikiEvents */ = { + isa = PBXNativeTarget; + buildConfigurationList = 64FBB927092EA33F00427AD0 /* Build configuration list for PBXNativeTarget "TikiEvents" */; + buildPhases = ( + 8D1107290486CEB800E47090 /* Resources */, + 8D11072C0486CEB800E47090 /* Sources */, + 8D11072E0486CEB800E47090 /* Frameworks */, + C4332D16079B22450025BF39 /* CopyFiles */, + C4332EE0079B242E0025BF39 /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = TikiEvents; + productInstallPath = "$(HOME)/Applications"; + productName = TikiEvents; + productReference = 8D1107320486CEB800E47090 /* TikiEvents.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 64FBB92B092EA33F00427AD0 /* Build configuration list for PBXProject "TikiEvents" */; + hasScannedForEncodings = 1; + mainGroup = 29B97314FDCFA39411CA2CEA /* TikiEvents */; + projectDirPath = ""; + targets = ( + 8D1107260486CEB800E47090 /* TikiEvents */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D1107290486CEB800E47090 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */, + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + C4332EE0079B242E0025BF39 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "# rm -rfv ${EXECUTABLE_FOLDER_PATH}/PrivateHeaders\n"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D11072C0486CEB800E47090 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072D0486CEB800E47090 /* main.m in Sources */, + C4B588860794D44D004D22F2 /* test.cpp in Sources */, + C4F50ECE0799E1350001D0D0 /* Controller.m in Sources */, + C47EB6A108366BE4009FA9BA /* testobj.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C165DFE840E0CC02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = "<group>"; + }; + 29B97318FDCFA39411CA2CEA /* MainMenu.nib */ = { + isa = PBXVariantGroup; + children = ( + 29B97319FDCFA39411CA2CEA /* English */, + ); + name = MainMenu.nib; + sourceTree = "<group>"; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 64FBB928092EA33F00427AD0 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS = ../../osx/build/Development/; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = events_Prefix.pch; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PREBINDING = NO; + PRODUCT_NAME = TikiEvents; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Development; + }; + 64FBB929092EA33F00427AD0 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + FRAMEWORK_SEARCH_PATHS = ../../osx/build/Deployment/; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = events_Prefix.pch; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = TikiEvents; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Deployment; + }; + 64FBB92A092EA33F00427AD0 /* Default */ = { + isa = XCBuildConfiguration; + buildSettings = { + FRAMEWORK_SEARCH_PATHS = ../../osx/build/Development/; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = events_Prefix.pch; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = TikiEvents; + WRAPPER_EXTENSION = app; + }; + name = Default; + }; + 64FBB92C092EA33F00427AD0 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + HEADER_SEARCH_PATHS = ( + ../../include, + ../../osx/include, + /sw/include, + ../../3rdparty/boost, + ); + MACOSX_DEPLOYMENT_TARGET = 10.3; + SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + }; + name = Development; + }; + 64FBB92D092EA33F00427AD0 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + HEADER_SEARCH_PATHS = ( + ../../include, + ../../osx/include, + /sw/include, + ../../3rdparty/boost, + ); + MACOSX_DEPLOYMENT_TARGET = 10.3; + SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + }; + name = Deployment; + }; + 64FBB92E092EA33F00427AD0 /* Default */ = { + isa = XCBuildConfiguration; + buildSettings = { + HEADER_SEARCH_PATHS = ( + ../../include, + ../../osx/include, + /sw/include, + ../../3rdparty/boost, + ); + MACOSX_DEPLOYMENT_TARGET = 10.3; + SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + }; + name = Default; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 64FBB927092EA33F00427AD0 /* Build configuration list for PBXNativeTarget "TikiEvents" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 64FBB928092EA33F00427AD0 /* Development */, + 64FBB929092EA33F00427AD0 /* Deployment */, + 64FBB92A092EA33F00427AD0 /* Default */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Default; + }; + 64FBB92B092EA33F00427AD0 /* Build configuration list for PBXProject "TikiEvents" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 64FBB92C092EA33F00427AD0 /* Development */, + 64FBB92D092EA33F00427AD0 /* Deployment */, + 64FBB92E092EA33F00427AD0 /* Default */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Default; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} Added: tiki/examples/events/events_Prefix.pch =================================================================== --- tiki/examples/events/events_Prefix.pch (rev 0) +++ tiki/examples/events/events_Prefix.pch 2007-10-28 18:38:46 UTC (rev 519) @@ -0,0 +1,7 @@ +// +// Prefix header for all source files of the 'TikiTest' target in the 'TikiTest' project +// + +#ifdef __OBJC__ + #import <Cocoa/Cocoa.h> +#endif Added: tiki/examples/events/main.m =================================================================== --- tiki/examples/events/main.m (rev 0) +++ tiki/examples/events/main.m 2007-10-28 18:38:46 UTC (rev 519) @@ -0,0 +1,14 @@ +// +// main.m +// TikiEvents +// +// Created by Dan Potter on 1/11/05. +// Copyright Cryptic Allusion, LLC 2005. All rights reserved. +// + +#import <Cocoa/Cocoa.h> + +int main(int argc, char *argv[]) +{ + return NSApplicationMain(argc, (const char **) argv); +} Added: tiki/examples/events/src/Controller.h =================================================================== --- tiki/examples/events/src/Controller.h (rev 0) +++ tiki/examples/events/src/Controller.h 2007-10-28 18:38:46 UTC (rev 519) @@ -0,0 +1,13 @@ +/* Controller */ + +#import <Cocoa/Cocoa.h> +#import <Tiki/TikiMain.h> + +@interface Controller : NSObject { + IBOutlet NSView *mainView; + IBOutlet NSWindow *mainWindow; + + TikiMain * tm; + NSString * openFileName; +} +@end Added: tiki/examples/events/src/Controller.m =================================================================== --- tiki/examples/events/src/Controller.m (rev 0) +++ tiki/examples/events/src/Controller.m 2007-10-28 18:38:46 UTC (rev 519) @@ -0,0 +1,34 @@ +#import "Controller.h" +#import <Tiki/TikiMain.h> +#import <assert.h> + +void tiki_main(); + +@implementation Controller +- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename +{ + openFileName = filename; +} + +- (void) applicationDidFinishLaunching: (NSNotification *) note +{ + TikiMain * otm = [[TikiMain alloc] retain]; + tm = otm; + [tm doMainWithWindow: mainWindow andView: mainView andMainFunc: tiki_main andOpenFile:openFileName]; + tm = nil; + [otm release]; +} + +- (NSApplicationTerminateReply) applicationShouldTerminate: (NSApplication *)sender +{ + assert( tm ); + [tm quitSoon]; + return NSTerminateNow; +} + +- (BOOL) applicationShouldTerminateAfterLastWindowClosed: (NSApplication *)theApplication +{ + return YES; +} + +@end Added: tiki/examples/events/src/TikiEvents.cpp =================================================================== --- tiki/examples/events/src/TikiEvents.cpp (rev 0) +++ tiki/examples/events/src/TikiEvents.cpp 2007-10-28 18:38:46 UTC (rev 519) @@ -0,0 +1,28 @@ +/* +* TikiEvents.cpp +* TikiEvents +* +* Copyright 2005 Cryptic Allusion, LLC. All rights reserved. +* +*/ + +#include <Tiki/tiki.h> +#include <pch.h> + +#if TIKI_PLAT == TIKI_WIN32 +#include <windows.h> + +static char szAppName[] = "TikiEvents"; +int APIENTRY WinMain( HINSTANCE hInst, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow ) +#else +extern "C" int tiki_main( int argc, char *argv[] ); +int main( int argc, char *argv[] ) +#endif +{ +#if TIKI_PLAT != TIKI_WIN32 + return tiki_main( argc, argv ); +#else + + return Tiki::DoMain( szAppName, hInst, hPrevInstance, lpCmdLine, nCmdShow ); +#endif +} Added: tiki/examples/events/src/test.cpp =================================================================== --- tiki/examples/events/src/test.cpp (rev 0) +++ tiki/examples/events/src/test.cpp 2007-10-28 18:38:46 UTC (rev 519) @@ -0,0 +1,38 @@ +/* +* test.cpp +* TikiTest +* +* Created by Dan Potter on 1/11/05. +* Copyright 2005 Cryptic Allusion, LLC. All rights reserved. +* +*/ + +#include <Tiki/tiki.h> +#include "testobj.h" + +using namespace Tiki; + +extern "C" int tiki_main( int argc, char **argv ) { + // Init Tiki + if ( !Tiki::init( argc, argv ) ) { + exit( -1 ); + } + Tiki::setName( "TikiEvents", NULL ); + Tiki::GL::showCursor( false ); + + Debug::printf( "argc: %i\n", argc ); + for ( int i = 0; i < argc; i++ ) { + Debug::printf( "argv[%i]: %s\n", i, argv[ i ] ); + } + + RefPtr<TestObject> test = new TestObject( "1" ); + RefPtr<TestObject> test2 = new TestObject( "2" ); + test->connect( "testevent", test2 ); + test->perform( "testmessage", NULL, NULL ); + test->perform( "anothermessage", NULL, NULL ); + + Tiki::shutdown(); + + return 0; +} + Added: tiki/examples/events/src/testobj.cpp =================================================================== --- tiki/examples/events/src/testobj.cpp (rev 0) +++ tiki/examples/events/src/testobj.cpp 2007-10-28 18:38:46 UTC (rev 519) @@ -0,0 +1,61 @@ +/* + Tiki + + object.cpp + + Copyright (C)2005 Cryptic Allusion, LLC +*/ + +#include <Tiki/tiki.h> +#include <Tiki/debug.h> + +#include "testobj.h" + +using namespace Tiki; +using std::string; + +TIKI_OBJECT_NAME( TestObject ) +TIKI_OBJECT_BEGIN( Object, TestObject ) +TIKI_OBJECT_RECEIVER( "testmessage", TestObject::testMessage ) +TIKI_OBJECT_RECEIVER( "anothermessage", TestObject::anotherMessage ) +TIKI_OBJECT_RECEIVER( "testevent", TestObject::testEvent ) +TIKI_OBJECT_OUTLET( "testevent" ) +TIKI_OBJECT_END( TestObject ) + + +TestObject::TestObject( string name ) { + Debug::printf( "TestObject::TestObject(%s)\n", name.c_str() ); + m_name = name; +} + +TestObject::~TestObject() {} + +int TestObject::testMessage( Object * sender, Object * arg ) { + Debug::printf( "TestObject(%s)::testMessage(%p, %p)\n", m_name.c_str(), sender, arg ); + return 0; +} + +int TestObject::anotherMessage( Object * sender, Object * arg ) { + Debug::printf( "TestObject(%s)::anotherMessage(%p, %p)\n", m_name.c_str(), sender, arg ); + return emit( "testevent", arg ); +} + +int TestObject::testEvent( Object * sender, Object * arg ) { + Debug::printf( "TestObject(%s)::testEvent(%p, %p)\n", m_name.c_str(), sender, arg ); + return 0; +} + + + + + + + + + + + + + + + Added: tiki/examples/events/src/testobj.h =================================================================== --- tiki/examples/events/src/testobj.h (rev 0) +++ tiki/examples/events/src/testobj.h 2007-10-28 18:38:46 UTC (rev 519) @@ -0,0 +1,36 @@ +#ifndef __TESTOBJ_H +#define __TESTOBJ_H + +#include <Tiki/object.h> +#include <string> + +class TestObject : public Tiki::Object { +public: + TestObject( std::string name ); + virtual ~TestObject(); + int testMessage( Object * sender, Object * arg ); + int anotherMessage( Object * sender, Object * arg ); + int testEvent( Object * sender, Object * arg ); + +protected: + TIKI_OBJECT_DECLS( TestObject ) + + std::string m_name; +}; + + +#endif + + + + + + + + + + + + + + Added: tiki/examples/events/version.plist =================================================================== --- tiki/examples/events/version.plist (rev 0) +++ tiki/examples/events/version.plist 2007-10-28 18:38:46 UTC (rev 519) @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>BuildVersion</key> + <string>92</string> + <key>CFBundleVersion</key> + <string>1.0</string> + <key>ProductBuildVersion</key> + <string>7K571</string> + <key>ProjectName</key> + <string>NibPBTemplates</string> + <key>SourceVersion</key> + <string>1200000</string> +</dict> +</plist> Modified: tiki/win32/tiki.sln =================================================================== --- tiki/win32/tiki.sln 2007-10-27 02:10:42 UTC (rev 518) +++ tiki/win32/tiki.sln 2007-10-28 18:38:46 UTC (rev 519) @@ -48,6 +48,11 @@ {F2816CAC-B560-4ED9-8A73-9635F832943C} = {F2816CAC-B560-4ED9-8A73-9635F832943C} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TikiEvents", "..\examples\events\events.vcproj", "{16508E01-E2E1-47B1-9B3A-6991C0032E76}" + ProjectSection(ProjectDependencies) = postProject + {F2816CAC-B560-4ED9-8A73-9635F832943C} = {F2816CAC-B560-4ED9-8A73-9635F832943C} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -94,6 +99,10 @@ {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 + {16508E01-E2E1-47B1-9B3A-6991C0032E76}.Debug|Win32.ActiveCfg = Debug|Win32 + {16508E01-E2E1-47B1-9B3A-6991C0032E76}.Debug|Win32.Build.0 = Debug|Win32 + {16508E01-E2E1-47B1-9B3A-6991C0032E76}.Release|Win32.ActiveCfg = Release|Win32 + {16508E01-E2E1-47B1-9B3A-6991C0032E76}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-10-27 02:10:45
|
Revision: 518 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=518&view=rev Author: atani Date: 2007-10-26 19:10:42 -0700 (Fri, 26 Oct 2007) Log Message: ----------- * win32 projects for NeHe examples * removed lingering ref to TikiTest Modified Paths: -------------- tiki/examples/nehe/lesson02/src/main.cpp tiki/examples/nehe/lesson03/src/main.cpp tiki/examples/nehe/lesson04/src/main.cpp tiki/examples/nehe/lesson05/src/main.cpp tiki/win32/src/init_shutdown.cpp tiki/win32/src/platgl.cpp tiki/win32/tiki.sln Added Paths: ----------- tiki/examples/nehe/lesson02/nehe02.vcproj tiki/examples/nehe/lesson02/src/NeHe02.cpp tiki/examples/nehe/lesson03/nehe03.vcproj tiki/examples/nehe/lesson03/src/NeHe03.cpp tiki/examples/nehe/lesson04/nehe04.vcproj tiki/examples/nehe/lesson04/src/NeHe04.cpp tiki/examples/nehe/lesson05/nehe05.vcproj tiki/examples/nehe/lesson05/src/NeHe05.cpp Property Changed: ---------------- tiki/examples/nehe/lesson02/ tiki/examples/nehe/lesson03/ tiki/examples/nehe/lesson04/ tiki/examples/nehe/lesson05/ Property changes on: tiki/examples/nehe/lesson02 ___________________________________________________________________ Name: svn:ignore - *.nds *.ds.gba nehe_lesson02 + *.nds *.ds.gba nehe_lesson02 Release *.user Debug Added: tiki/examples/nehe/lesson02/nehe02.vcproj =================================================================== --- tiki/examples/nehe/lesson02/nehe02.vcproj (rev 0) +++ tiki/examples/nehe/lesson02/nehe02.vcproj 2007-10-27 02:10:42 UTC (rev 518) @@ -0,0 +1,205 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="NeHe02" + ProjectGUID="{088EA2EE-469C-4306-905F-CB4AE857504D}" + 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}" + > + </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\main.cpp" + > + </File> + <File + RelativePath=".\src\NeHe02.cpp" + > + </File> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> Added: tiki/examples/nehe/lesson02/src/NeHe02.cpp =================================================================== --- tiki/examples/nehe/lesson02/src/NeHe02.cpp (rev 0) +++ tiki/examples/nehe/lesson02/src/NeHe02.cpp 2007-10-27 02:10:42 UTC (rev 518) @@ -0,0 +1,27 @@ +/* +* Basic.cpp +* Basic Network test +* +* Copyright (C)2007 Atani Software +* +*/ + +#include <Tiki/tiki.h> +#include <pch.h> + +#if TIKI_PLAT == TIKI_WIN32 +#include <windows.h> + +static char szAppName[] = "NeHe02"; +int APIENTRY WinMain( HINSTANCE hInst, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow ) +#else +extern "C" int tiki_main( int argc, char *argv[] ); +int main( int argc, char *argv[] ) +#endif +{ +#if TIKI_PLAT != TIKI_WIN32 + return tiki_main( argc, argv ); +#else + return Tiki::DoMain( szAppName, hInst, hPrevInstance, lpCmdLine, nCmdShow ); +#endif +} Modified: tiki/examples/nehe/lesson02/src/main.cpp =================================================================== --- tiki/examples/nehe/lesson02/src/main.cpp 2007-10-27 01:19:20 UTC (rev 517) +++ tiki/examples/nehe/lesson02/src/main.cpp 2007-10-27 02:10:42 UTC (rev 518) @@ -23,7 +23,7 @@ } } -int main(int argc, char *argv[]) +extern "C" int tiki_main(int argc, char *argv[]) { Tiki::init(argc, argv); Hid::callbackReg( tkCallback, NULL ); Property changes on: tiki/examples/nehe/lesson03 ___________________________________________________________________ Name: svn:ignore - *.nds *.ds.gba nehe_lesson03 + *.nds *.ds.gba nehe_lesson03 Release *.user Debug Added: tiki/examples/nehe/lesson03/nehe03.vcproj =================================================================== --- tiki/examples/nehe/lesson03/nehe03.vcproj (rev 0) +++ tiki/examples/nehe/lesson03/nehe03.vcproj 2007-10-27 02:10:42 UTC (rev 518) @@ -0,0 +1,205 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="NeHe03" + ProjectGUID="{03954CA9-79FF-4A27-8A90-8984ABFA9307}" + 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}" + > + </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\main.cpp" + > + </File> + <File + RelativePath=".\src\NeHe03.cpp" + > + </File> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> Added: tiki/examples/nehe/lesson03/src/NeHe03.cpp =================================================================== --- tiki/examples/nehe/lesson03/src/NeHe03.cpp (rev 0) +++ tiki/examples/nehe/lesson03/src/NeHe03.cpp 2007-10-27 02:10:42 UTC (rev 518) @@ -0,0 +1,27 @@ +/* +* NeHe03.cpp +* Entry point for NeHe03 +* +* Copyright (C)2007 Atani Software +* +*/ + +#include <Tiki/tiki.h> +#include <pch.h> + +#if TIKI_PLAT == TIKI_WIN32 +#include <windows.h> + +static char szAppName[] = "NeHe03"; +int APIENTRY WinMain( HINSTANCE hInst, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow ) +#else +extern "C" int tiki_main( int argc, char *argv[] ); +int main( int argc, char *argv[] ) +#endif +{ +#if TIKI_PLAT != TIKI_WIN32 + return tiki_main( argc, argv ); +#else + return Tiki::DoMain( szAppName, hInst, hPrevInstance, lpCmdLine, nCmdShow ); +#endif +} Modified: tiki/examples/nehe/lesson03/src/main.cpp =================================================================== --- tiki/examples/nehe/lesson03/src/main.cpp 2007-10-27 01:19:20 UTC (rev 517) +++ tiki/examples/nehe/lesson03/src/main.cpp 2007-10-27 02:10:42 UTC (rev 518) @@ -1,5 +1,5 @@ /**************************************** - * NDS NeHe Lesson 01 * + * NDS NeHe Lesson 03 * * Author: Dovoto * ****************************************/ @@ -23,7 +23,7 @@ } } -int main(int argc, char *argv[]) +extern "C" int tiki_main(int argc, char *argv[]) { Tiki::init(argc, argv); Hid::callbackReg( tkCallback, NULL ); Property changes on: tiki/examples/nehe/lesson04 ___________________________________________________________________ Name: svn:ignore - *.nds *.ds.gba nehe_lesson04 + *.nds *.ds.gba nehe_lesson04 Release *.user Debug Added: tiki/examples/nehe/lesson04/nehe04.vcproj =================================================================== --- tiki/examples/nehe/lesson04/nehe04.vcproj (rev 0) +++ tiki/examples/nehe/lesson04/nehe04.vcproj 2007-10-27 02:10:42 UTC (rev 518) @@ -0,0 +1,205 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="NeHe04" + ProjectGUID="{7B823C96-860C-4578-95FF-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}" + > + </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\NeHe04.cpp" + > + </File> + <File + RelativePath=".\src\main.cpp" + > + </File> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> Added: tiki/examples/nehe/lesson04/src/NeHe04.cpp =================================================================== --- tiki/examples/nehe/lesson04/src/NeHe04.cpp (rev 0) +++ tiki/examples/nehe/lesson04/src/NeHe04.cpp 2007-10-27 02:10:42 UTC (rev 518) @@ -0,0 +1,27 @@ +/* +* Basic.cpp +* Basic Network test +* +* Copyright (C)2007 Atani Software +* +*/ + +#include <Tiki/tiki.h> +#include <pch.h> + +#if TIKI_PLAT == TIKI_WIN32 +#include <windows.h> + +static char szAppName[] = "NeHe04"; +int APIENTRY WinMain( HINSTANCE hInst, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow ) +#else +extern "C" int tiki_main( int argc, char *argv[] ); +int main( int argc, char *argv[] ) +#endif +{ +#if TIKI_PLAT != TIKI_WIN32 + return tiki_main( argc, argv ); +#else + return Tiki::DoMain( szAppName, hInst, hPrevInstance, lpCmdLine, nCmdShow ); +#endif +} Modified: tiki/examples/nehe/lesson04/src/main.cpp =================================================================== --- tiki/examples/nehe/lesson04/src/main.cpp 2007-10-27 01:19:20 UTC (rev 517) +++ tiki/examples/nehe/lesson04/src/main.cpp 2007-10-27 02:10:42 UTC (rev 518) @@ -28,7 +28,7 @@ } } -int main(int argc, char *argv[]) +extern "C" int tiki_main(int argc, char *argv[]) { Tiki::init(argc, argv); Hid::callbackReg( tkCallback, NULL ); Property changes on: tiki/examples/nehe/lesson05 ___________________________________________________________________ Name: svn:ignore - *.nds *.ds.gba nehe_lesson05 + *.nds *.ds.gba nehe_lesson05 Release *.user Debug Added: tiki/examples/nehe/lesson05/nehe05.vcproj =================================================================== --- tiki/examples/nehe/lesson05/nehe05.vcproj (rev 0) +++ tiki/examples/nehe/lesson05/nehe05.vcproj 2007-10-27 02:10:42 UTC (rev 518) @@ -0,0 +1,205 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="NeHe05" + 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}" + > + </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\main.cpp" + > + </File> + <File + RelativePath=".\src\NeHe05.cpp" + > + </File> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> Added: tiki/examples/nehe/lesson05/src/NeHe05.cpp =================================================================== --- tiki/examples/nehe/lesson05/src/NeHe05.cpp (rev 0) +++ tiki/examples/nehe/lesson05/src/NeHe05.cpp 2007-10-27 02:10:42 UTC (rev 518) @@ -0,0 +1,27 @@ +/* +* NeHe05.cpp +* Entry point for NeHe05 +* +* Copyright (C)2007 Atani Software +* +*/ + +#include <Tiki/tiki.h> +#include <pch.h> + +#if TIKI_PLAT == TIKI_WIN32 +#include <windows.h> + +static char szAppName[] = "NeHe05"; +int APIENTRY WinMain( HINSTANCE hInst, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow ) +#else +extern "C" int tiki_main( int argc, char *argv[] ); +int main( int argc, char *argv[] ) +#endif +{ +#if TIKI_PLAT != TIKI_WIN32 + return tiki_main( argc, argv ); +#else + return Tiki::DoMain( szAppName, hInst, hPrevInstance, lpCmdLine, nCmdShow ); +#endif +} Modified: tiki/examples/nehe/lesson05/src/main.cpp =================================================================== --- tiki/examples/nehe/lesson05/src/main.cpp 2007-10-27 01:19:20 UTC (rev 517) +++ tiki/examples/nehe/lesson05/src/main.cpp 2007-10-27 02:10:42 UTC (rev 518) @@ -27,7 +27,7 @@ } } -int main(int argc, char *argv[]) +extern "C" int tiki_main(int argc, char *argv[]) { Tiki::init(argc, argv); Hid::callbackReg( tkCallback, NULL ); Modified: tiki/win32/src/init_shutdown.cpp =================================================================== --- tiki/win32/src/init_shutdown.cpp 2007-10-27 01:19:20 UTC (rev 517) +++ tiki/win32/src/init_shutdown.cpp 2007-10-27 02:10:42 UTC (rev 518) @@ -1,5 +1,6 @@ #include "pch.h" +#include "Tiki/gl.h" #include "Tiki/hid.h" #include "Tiki/sound.h" #include "Tiki/stream.h" Modified: tiki/win32/src/platgl.cpp =================================================================== --- tiki/win32/src/platgl.cpp 2007-10-27 01:19:20 UTC (rev 517) +++ tiki/win32/src/platgl.cpp 2007-10-27 02:10:42 UTC (rev 518) @@ -321,7 +321,7 @@ } Vector getScreenExtents() { - return Vector( 640.0f, 480.0f, 0.0f ); + return Vector( static_cast<float>(m_targetW), static_cast<float>(m_targetH), 0.0f ); } } Modified: tiki/win32/tiki.sln =================================================================== --- tiki/win32/tiki.sln 2007-10-27 01:19:20 UTC (rev 517) +++ tiki/win32/tiki.sln 2007-10-27 02:10:42 UTC (rev 518) @@ -3,11 +3,6 @@ # 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}") = "TikiSnake", "..\examples\console\TikiSnake\TikiSnake.vcproj", "{FCAE4EF3-7B5D-4C0D-8793-4157F7D8709F}" ProjectSection(ProjectDependencies) = postProject {F2816CAC-B560-4ED9-8A73-9635F832943C} = {F2816CAC-B560-4ED9-8A73-9635F832943C} @@ -33,6 +28,26 @@ {F2816CAC-B560-4ED9-8A73-9635F832943C} = {F2816CAC-B560-4ED9-8A73-9635F832943C} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NeHe02", "..\examples\nehe\lesson02\nehe02.vcproj", "{088EA2EE-469C-4306-905F-CB4AE857504D}" + ProjectSection(ProjectDependencies) = postProject + {F2816CAC-B560-4ED9-8A73-9635F832943C} = {F2816CAC-B560-4ED9-8A73-9635F832943C} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NeHe03", "..\examples\nehe\lesson03\nehe03.vcproj", "{03954CA9-79FF-4A27-8A90-8984ABFA9307}" + ProjectSection(ProjectDependencies) = postProject + {F2816CAC-B560-4ED9-8A73-9635F832943C} = {F2816CAC-B560-4ED9-8A73-9635F832943C} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NeHe04", "..\examples\nehe\lesson04\nehe04.vcproj", "{7B823C96-860C-4578-95FF-1087A45AF1AA}" + ProjectSection(ProjectDependencies) = postProject + {F2816CAC-B560-4ED9-8A73-9635F832943C} = {F2816CAC-B560-4ED9-8A73-9635F832943C} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NeHe05", "..\examples\nehe\lesson05\nehe05.vcproj", "{7B823C96-860C-4578-95BB-1087A45AF1AA}" + ProjectSection(ProjectDependencies) = postProject + {F2816CAC-B560-4ED9-8A73-9635F832943C} = {F2816CAC-B560-4ED9-8A73-9635F832943C} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -43,10 +58,6 @@ {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 @@ -67,6 +78,22 @@ {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 + {088EA2EE-469C-4306-905F-CB4AE857504D}.Debug|Win32.ActiveCfg = Debug|Win32 + {088EA2EE-469C-4306-905F-CB4AE857504D}.Debug|Win32.Build.0 = Debug|Win32 + {088EA2EE-469C-4306-905F-CB4AE857504D}.Release|Win32.ActiveCfg = Release|Win32 + {088EA2EE-469C-4306-905F-CB4AE857504D}.Release|Win32.Build.0 = Release|Win32 + {03954CA9-79FF-4A27-8A90-8984ABFA9307}.Debug|Win32.ActiveCfg = Debug|Win32 + {03954CA9-79FF-4A27-8A90-8984ABFA9307}.Debug|Win32.Build.0 = Debug|Win32 + {03954CA9-79FF-4A27-8A90-8984ABFA9307}.Release|Win32.ActiveCfg = Release|Win32 + {03954CA9-79FF-4A27-8A90-8984ABFA9307}.Release|Win32.Build.0 = Release|Win32 + {7B823C96-860C-4578-95FF-1087A45AF1AA}.Debug|Win32.ActiveCfg = Debug|Win32 + {7B823C96-860C-4578-95FF-1087A45AF1AA}.Debug|Win32.Build.0 = Debug|Win32 + {7B823C96-860C-4578-95FF-1087A45AF1AA}.Release|Win32.ActiveCfg = Release|Win32 + {7B823C96-860C-4578-95FF-1087A45AF1AA}.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 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2007-10-27 01:19:22
|
Revision: 517 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=517&view=rev Author: atani Date: 2007-10-26 18:19:20 -0700 (Fri, 26 Oct 2007) Log Message: ----------- * removed plxcompat * removed TikiTest, will replace with new version soon * set svn:ignore on various directories Modified Paths: -------------- tiki/dc/Makefile tiki/dc/src/init_shutdown.cpp tiki/dc/src/platgl.cpp tiki/examples/Makefile tiki/examples/console/TikiSnake/src/snake.cpp tiki/examples/nehe/lesson02/src/main.cpp tiki/examples/nehe/lesson03/src/main.cpp tiki/examples/nehe/lesson04/src/main.cpp tiki/examples/nehe/lesson05/src/main.cpp tiki/examples/net/httpclient/src/main.cpp tiki/include/Tiki/TikiAll.h tiki/include/Tiki/drawable.h tiki/include/Tiki/drawables/console.h tiki/include/Tiki/gl.h tiki/include/Tiki/vector.h tiki/nds/Makefile tiki/nds/src/init_shutdown.cpp tiki/nds/src/platgl.cpp tiki/nds/tiki.cbp tiki/osx/Makefile tiki/osx/Tiki.xcodeproj/project.pbxproj tiki/osx/src/init_shutdown.cpp tiki/osx/src/platgl.cpp tiki/sdl/Makefile tiki/sdl/TikiSDL.cbp tiki/sdl/src/init_shutdown.cpp tiki/sdl/src/platgl.cpp tiki/src/gl/drawable.cpp tiki/src/gl/drawables/banner.cpp tiki/src/gl/drawables/console.cpp tiki/src/gl/drawables/label.cpp tiki/src/gl/drawables/pointerArrow.cpp tiki/src/gl/drawables/texturetile.cpp tiki/src/gl/font.cpp tiki/win32/Makefile tiki/win32/src/init_shutdown.cpp tiki/win32/src/platgl.cpp tiki/win32/tiki.cbp tiki/win32/tiki.vcproj Removed Paths: ------------- tiki/examples/TikiTest/ tiki/include/Tiki/plxcompat.h tiki/src/gl/plxcompat.cpp Property Changed: ---------------- tiki/examples/console/TikiSnake/ tiki/examples/nehe/lesson02/ tiki/examples/nehe/lesson03/ tiki/examples/nehe/lesson04/ tiki/examples/nehe/lesson05/ tiki/examples/net/basic/ tiki/examples/net/chat/ tiki/examples/net/chatd/ tiki/examples/net/httpclient/ tiki/nds/tikiarm7/ Modified: tiki/dc/Makefile =================================================================== --- tiki/dc/Makefile 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/dc/Makefile 2007-10-27 01:19:20 UTC (rev 517) @@ -37,7 +37,6 @@ -x "*/.svn/*" cd .. && \ zip -9ru dist/$(SVN_VERSION)/tiki-$(SVN_VERSION)-dc.zip \ - examples/TikiTest/tikitest.elf \ examples/console/TikiSnake/tikisnake.elf \ -x "*/.svn/*" Modified: tiki/dc/src/init_shutdown.cpp =================================================================== --- tiki/dc/src/init_shutdown.cpp 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/dc/src/init_shutdown.cpp 2007-10-27 01:19:20 UTC (rev 517) @@ -11,7 +11,6 @@ #include "Tiki/tiki.h" #include "Tiki/sound.h" #include "Tiki/stream.h" -#include "Tiki/plxcompat.h" #include "Tiki/hid.h" static pvr_init_params_t params = { @@ -30,7 +29,6 @@ glKosInit(); snd_stream_init(); - GL::Plxcompat::plx_mat3d_init( 640, 480 ); Hid::init(); return true; Modified: tiki/dc/src/platgl.cpp =================================================================== --- tiki/dc/src/platgl.cpp 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/dc/src/platgl.cpp 2007-10-27 01:19:20 UTC (rev 517) @@ -15,14 +15,26 @@ using namespace Tiki; -float Tiki::GL::Frame::getFrameRate() { +namespace Tiki { +namespace GL { +namespace Frame { + +float getFrameRate() { pvr_stats_t stats; pvr_get_stats( &stats ); return stats.frame_rate; } -void Tiki::GL::Frame::setFrameRateLimit( int rate ) {} +void setFrameRateLimit( int rate ) {} +Vector getScreenExtents() { + return Vector( 640.0f, 480.0f, 0.0f ); +} + +} +} +} + extern "C" { void tiki_wait_if_needed() { Modified: tiki/examples/Makefile =================================================================== --- tiki/examples/Makefile 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/examples/Makefile 2007-10-27 01:19:20 UTC (rev 517) @@ -1,5 +1,5 @@ -SUBDIRS = TikiTest console net nehe +SUBDIRS = console net nehe TIKI_DIR ?= $(CURDIR)/../ include $(TIKI_DIR)$(TIKI_PLAT)/Makefile.rules Property changes on: tiki/examples/console/TikiSnake ___________________________________________________________________ Name: svn:ignore - Debug Release *.user *.nds *.ds.gba *.elf + Debug Release *.user *.nds *.ds.gba *.elf tikisnake Modified: tiki/examples/console/TikiSnake/src/snake.cpp =================================================================== --- tiki/examples/console/TikiSnake/src/snake.cpp 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/examples/console/TikiSnake/src/snake.cpp 2007-10-27 01:19:20 UTC (rev 517) @@ -7,7 +7,6 @@ */ #include <Tiki/tiki.h> -#include <Tiki/plxcompat.h> #include <Tiki/gl.h> #include <Tiki/hid.h> #include <Tiki/tikitime.h> @@ -69,15 +68,17 @@ Hid::callbackReg( tkCallback, NULL ); //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 +#if TIKI_PLAT == TIKI_DC + RefPtr<Texture> cf = new Texture("/rd/pc-ascii.png", true); +#else + RefPtr<Texture> cf = new Texture("pc-ascii.png", true); +#endif + RefPtr<Console> ct = new Console( 80, 25, cf ); + + Vector screenExtents = Frame::getScreenExtents(); + ct->setSize(screenExtents.x, screenExtents.y); + screenExtents *= 0.5f; + ct->setTranslate(screenExtents); ct->setAutoScroll( 0 ); ct->setAutoWrap( 0 ); Property changes on: tiki/examples/nehe/lesson02 ___________________________________________________________________ Name: svn:ignore + *.nds *.ds.gba nehe_lesson02 Modified: tiki/examples/nehe/lesson02/src/main.cpp =================================================================== --- tiki/examples/nehe/lesson02/src/main.cpp 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/examples/nehe/lesson02/src/main.cpp 2007-10-27 01:19:20 UTC (rev 517) @@ -5,17 +5,30 @@ #include <Tiki/tiki.h> #include <Tiki/gl.h> +#include <Tiki/hid.h> using namespace Tiki; using namespace Tiki::GL; void DrawGLScene(); +// Tiki Specific +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; + } +} + int main(int argc, char *argv[]) { Tiki::init(argc, argv); + Hid::callbackReg( tkCallback, NULL ); - while (1) + while (!g_quitting) { Frame::begin(); Property changes on: tiki/examples/nehe/lesson03 ___________________________________________________________________ Name: svn:ignore + *.nds *.ds.gba nehe_lesson03 Modified: tiki/examples/nehe/lesson03/src/main.cpp =================================================================== --- tiki/examples/nehe/lesson03/src/main.cpp 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/examples/nehe/lesson03/src/main.cpp 2007-10-27 01:19:20 UTC (rev 517) @@ -5,17 +5,30 @@ #include <Tiki/tiki.h> #include <Tiki/gl.h> +#include <Tiki/hid.h> using namespace Tiki; using namespace Tiki::GL; void DrawGLScene(); +// Tiki Specific +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; + } +} + int main(int argc, char *argv[]) { Tiki::init(argc, argv); + Hid::callbackReg( tkCallback, NULL ); - while (1) + while (!g_quitting) { Frame::begin(); Frame::set3d(); Property changes on: tiki/examples/nehe/lesson04 ___________________________________________________________________ Name: svn:ignore - *.nds *.ds.gba + *.nds *.ds.gba nehe_lesson04 Modified: tiki/examples/nehe/lesson04/src/main.cpp =================================================================== --- tiki/examples/nehe/lesson04/src/main.cpp 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/examples/nehe/lesson04/src/main.cpp 2007-10-27 01:19:20 UTC (rev 517) @@ -6,6 +6,7 @@ // include your ndslib #include <Tiki/tiki.h> #include <Tiki/gl.h> +#include <Tiki/hid.h> using namespace Tiki; using namespace Tiki::GL; @@ -16,14 +17,23 @@ float rtri; // Angle For The Triangle ( NEW ) float rquad; // Angle For The Quad ( NEW ) +// Tiki Specific +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; + } +} + int main(int argc, char *argv[]) { Tiki::init(argc, argv); + Hid::callbackReg( tkCallback, NULL ); - // Set the current matrix to be the model matrix - glMatrixMode(GL_MODELVIEW); - - while (1) + while (!g_quitting) { Frame::begin(); Frame::set3d(); Property changes on: tiki/examples/nehe/lesson05 ___________________________________________________________________ Name: svn:ignore - *.nds *.ds.gba + *.nds *.ds.gba nehe_lesson05 Modified: tiki/examples/nehe/lesson05/src/main.cpp =================================================================== --- tiki/examples/nehe/lesson05/src/main.cpp 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/examples/nehe/lesson05/src/main.cpp 2007-10-27 01:19:20 UTC (rev 517) @@ -6,6 +6,7 @@ // include your ndslib #include <Tiki/tiki.h> #include <Tiki/gl.h> +#include <Tiki/hid.h> using namespace Tiki; using namespace Tiki::GL; @@ -15,11 +16,23 @@ float rtri; // Angle For The Triangle ( NEW ) float rquad; // Angle For The Quad ( NEW ) +// Tiki Specific +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; + } +} + int main(int argc, char *argv[]) { - Tiki::init(argc, argv); + Tiki::init(argc, argv); + Hid::callbackReg( tkCallback, NULL ); - while (1) + while (!g_quitting) { Frame::begin(); Frame::set3d(); @@ -32,6 +45,7 @@ Frame::finish(); } + Tiki::shutdown(); return 0; } Property changes on: tiki/examples/net/basic ___________________________________________________________________ Name: svn:ignore - Debug Release *.user *.nds *.ds.gba + Debug Release *.user *.nds *.ds.gba basic Property changes on: tiki/examples/net/chat ___________________________________________________________________ Name: svn:ignore - Debug Release *.user *.nds *.ds.gba + Debug Release *.user *.nds *.ds.gba chat Property changes on: tiki/examples/net/chatd ___________________________________________________________________ Name: svn:ignore - Debug Release *.user *.nds *.ds.gba + Debug Release *.user *.nds *.ds.gba chatd Property changes on: tiki/examples/net/httpclient ___________________________________________________________________ Name: svn:ignore - Debug Release *.user *.nds *.ds.gba + Debug Release *.user *.nds *.ds.gba httpclient Modified: tiki/examples/net/httpclient/src/main.cpp =================================================================== --- tiki/examples/net/httpclient/src/main.cpp 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/examples/net/httpclient/src/main.cpp 2007-10-27 01:19:20 UTC (rev 517) @@ -54,16 +54,16 @@ #else 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(255, 191); - console->setTranslate( Vector( 128, 96, 0 ) ); -#endif + RefPtr<Console> console = new Console(80, 25, cf); + + Vector screenExtents = Frame::getScreenExtents(); + console->setSize(screenExtents.x, screenExtents.y); + screenExtents *= 0.5f; + console->setTranslate(screenExtents); console->setAutoWrap( true ); console->setAutoScroll( true ); + console->color( BLACK, GREY ); + console->clear(); console->printf("Sending request: %s\n", request->getUrl().c_str()); Response *response = useragent->get(request); Modified: tiki/include/Tiki/TikiAll.h =================================================================== --- tiki/include/Tiki/TikiAll.h 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/include/Tiki/TikiAll.h 2007-10-27 01:19:20 UTC (rev 517) @@ -25,7 +25,6 @@ #include <Tiki/matrix.h> #include <Tiki/object.h> #include <Tiki/oggvorbis.h> -#include <Tiki/plxcompat.h> #include <Tiki/refcnt.h> #include <Tiki/scene.h> #include <Tiki/sound.h> Modified: tiki/include/Tiki/drawable.h =================================================================== --- tiki/include/Tiki/drawable.h 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/include/Tiki/drawable.h 2007-10-27 01:19:20 UTC (rev 517) @@ -179,14 +179,6 @@ } protected: - /// Setup a transform matrix, taking into account the - /// parent relative rotation and scaling parameters. Pushes the old - /// matrix onto the stack. - void pushTransformMatrix() const; - - /// Pops the old matrix off the stack. - void popTransformMatrix() const; - bool m_t_prelative; ///< Is translation parent-relative? bool m_r_prelative; ///< Is rotation parent-relative? bool m_s_prelative; ///< Is scaling parent-relative? Modified: tiki/include/Tiki/drawables/console.h =================================================================== --- tiki/include/Tiki/drawables/console.h 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/include/Tiki/drawables/console.h 2007-10-27 01:19:20 UTC (rev 517) @@ -6,8 +6,8 @@ Copyright (C)2001 - 2006 Sam Steele */ -#ifndef __TIKI_DRW_CONSOLETEXT_H -#define __TIKI_DRW_CONSOLETEXT_H +#ifndef __TIKI_DRW_CONSOLE_H +#define __TIKI_DRW_CONSOLE_H #include "Tiki/gl.h" #include "Tiki/drawable.h" @@ -41,10 +41,10 @@ }; /** ConsoleText -- ConsoleText displays an array of fixed width characters. */ - class ConsoleText : public Drawable { + class Console : public Drawable { public: - ConsoleText(int cols, int rows, Texture * texture); - virtual ~ConsoleText(); + Console(int cols, int rows, Texture * texture); + virtual ~Console(); void setTexture(Texture * txr); void setSize(float w, float h); @@ -92,31 +92,31 @@ m_colorData[(y*m_cols) + x] = attr; } - ConsoleText& operator <<(std::string input) { + Console& operator <<(std::string input) { printf("%s",input.c_str()); return *this; } - ConsoleText& operator <<(const char *input) { + Console& operator <<(const char *input) { printf("%s",input); return *this; } - ConsoleText& operator <<(int input) { + Console& operator <<(int input) { printf("%i",input); return *this; } - ConsoleText& operator <<(char input) { + Console& operator <<(char input) { printf("%c",input); return *this; } - ConsoleText& operator <<(float input) { + Console& operator <<(float input) { printf("%f",input); return *this; Modified: tiki/include/Tiki/gl.h =================================================================== --- tiki/include/Tiki/gl.h 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/include/Tiki/gl.h 2007-10-27 01:19:20 UTC (rev 517) @@ -9,7 +9,9 @@ #ifndef __TIKI_GL_H #define __TIKI_GL_H +#include "Tiki/tiki.h" #include "Tiki/glhdrs.h" +#include "Tiki/vector.h" namespace Tiki { namespace GL { @@ -38,6 +40,10 @@ // number of frames per second allowed. The default is 60. void setFrameRateLimit( int rate ); +// Returns the max size of the screen in pixels +// defaults to window size for platform. +Tiki::Math::Vector getScreenExtents(); + } } } Deleted: tiki/include/Tiki/plxcompat.h =================================================================== --- tiki/include/Tiki/plxcompat.h 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/include/Tiki/plxcompat.h 2007-10-27 01:19:20 UTC (rev 517) @@ -1,808 +0,0 @@ -/* - Tiki - - plxcompat.h - - Copyright (C)2002,2004 Dan Potter - Copyright (C)2005 Cryptic Allusion, LLC -*/ - -#ifndef __TIKI_PLXCOMPAT_H -#define __TIKI_PLXCOMPAT_H - -// These convenience methods are just an easier way to submit commands to -// OpenGL. These are based on Parallax's prim.h, matrix.h, and sprite.h files, -// and are mostly shortcut methods for porting old code. - -#include "Tiki/color.h" -#include "Tiki/vector.h" -#include "Tiki/matrix.h" -#include "Tiki/glhdrs.h" - -namespace Tiki { -namespace GL { - -class Texture; - -namespace Plxcompat { - -//////////////////////////////////////////////////////////////////////////////////// -// dr.h - -typedef void * plx_dr_state_t; -static inline void plx_dr_init( plx_dr_state_t * t ) { } - -//////////////////////////////////////////////////////////////////////////////////// -// context.h - -/** - Select a texture for use with the context system. If you delete the - texture this has selected and then try to use contexts without - setting another texture, you'll probably get some gross garbage - on your output. Specify a NULL texture here to disable texturing. - */ -void plx_cxt_texture( Texture * txr ); - -/** - Set the blending mode to use with the context. What's available is - platform dependent, but we have defines for DC below. - */ -void plx_cxt_blending( int src, int dst ); -// glBlendFunc - -/* Constants for blending modes */ -#define PLX_BLEND_ZERO GL_ZERO -#define PLX_BLEND_ONE GL_ONE -#define PLX_BLEND_DESTCOLOR GL_DST_COLOR -#define PLX_BLEND_INVDESTCOLOR GL_ONE_MINUS_DST_COLOR -#define PLX_BLEND_SRCALPHA GL_SRC_ALPHA -#define PLX_BLEND_INVSRCALPHA GL_ONE_MINUS_SRC_ALPHA -#define PLX_BLEND_DESTALPHA GL_DST_ALPHA -#define PLX_BLEND_INVDESTALPHA GL_ONE_MINUS_DST_ALPHA - -/** - Set the culling mode. - */ -void plx_cxt_culling( int type ); -// glCullFace -// glFrontFace - -/* Constants for culling modes */ -#define PLX_CULL_NONE GL_FRONT_AND_BACK /**< Show everything */ -#define PLX_CULL_CW GL_BACK /**< Remove clockwise polys */ -#define PLX_CULL_CCW GL_FRONT /**< Remove counter-clockwise polys */ - -/** - Submit the selected context for rendering. - */ -static inline void plx_cxt_send( int /*foo*/ ) { } - - -//////////////////////////////////////////////////////////////////////////////////// -// matrix.h - -// This isn't perfect but will catch most uses by client code. -typedef Matrix matrix_t; -typedef Vector vector_t; -typedef Vector point_t; - -/* Copy the internal matrix out to a memory one */ -void mat_store( matrix_t *out ); - -/* Copy a memory matrix into the internal one */ -void mat_load( matrix_t *out ); - -/* Clear internal to an identity matrix */ -void mat_identity(); - -/* "Apply" a matrix: multiply a matrix onto the "internal" one */ -void mat_apply( matrix_t *src ); - -/* Transform zero or more sets of vectors using the current internal - matrix. Each vector is three floats long. */ -void mat_transform( vector_t *invecs, vector_t *outvecs, int veccnt, int vecskip ); - -/* Inline mat_transform which works on the three coordinates passed in; - this works most efficiently if you've already got the three numbers - (x,y,z) in the right registers (fr0,fr1,fr2). */ -void mat_trans_single( float & x, float & y, float & z ); - -/* Same as above, but allows an input to and preserves the Z/W value */ -void mat_trans_single4( float & x, float & y, float & z, float & w ); - -/* This is like mat_trans_single, but it leaves z/w instead of 1/w - for the z component. */ -void mat_trans_single3( float & x, float & y, float & z ); - -/* Transform vector, without any perspective division. */ -void mat_trans_nodiv( float & x, float & y, float & z, float & w ); - -void mat_rotate_x( float r ); -void mat_rotate_y( float r ); -void mat_rotate_z( float r ); -void mat_rotate( float xr, float yr, float zr ); -void mat_translate( float x, float y, float z ); -void mat_scale( float x, float y, float z ); - -static inline void plx_mat_store( matrix_t *out ) { - mat_store( out ); -} -static inline void plx_mat_load( matrix_t *out ) { - mat_load( out ); -} -static inline void plx_mat_identity() { - mat_identity(); -} -static inline void plx_mat_apply( matrix_t *src ) { - mat_apply( src ); -} -static inline void plx_mat_transform( vector_t *invecs, vector_t *outvecs, int veccnt, int vecskip ) { - mat_transform( invecs, outvecs, veccnt, vecskip ); -} -static inline void plx_mat_tfip_3d( float & x, float & y, float & z ) { - mat_trans_single( x, y, z ); -} -static inline void plx_mat_tfip_3dw( float & x, float & y, float & z, float & w ) { - mat_trans_single4( x, y, z, w ); -} -static inline void plx_mat_tfip_2d( float & x, float & y, float & z ) { - mat_trans_single3( x, y, z ); -} - -static inline void plx_mat_rotate_x( float r ) { - mat_rotate_x( r ); -} -static inline void plx_mat_rotate_y( float r ) { - mat_rotate_y( r ); -} -static inline void plx_mat_rotate_z( float r ) { - mat_rotate_z( r ); -} -static inline void plx_mat_rotate( float xr, float yr, float zr ) { - mat_rotate( xr, yr, zr ); -} -static inline void plx_mat_translate( float x, float y, float z ) { - mat_translate( x, y, z ); -} -static inline void plx_mat_scale( float x, float y, float z ) { - mat_scale( x, y, z ); -} - -/* The 3D matrix operations, somewhat simplified from KGL. All of these use - the matrix regs, but do not primarily keep their values in them. To get - the values out into the matrix regs (and usable) you'll want to set - everything up and then call plx_mat3d_apply(). */ - -/** Call before doing anything else, or after switching video - modes to setup some basic parameters. */ -void plx_mat3d_init( int width, int height ); - -/** Set which matrix we are working on */ -void plx_mat3d_mode( int mode ); - -/* Constants for plx_mat3d_mode and plx_mat3d_apply */ -static const int PLX_MAT_PROJECTION = 0; -static const int PLX_MAT_MODELVIEW = 1; -static const int PLX_MAT_SCREENVIEW = 2; -static const int PLX_MAT_SCRATCH = 3; -static const int PLX_MAT_WORLDVIEW = 4; -static const int PLX_MAT_COUNT = 5; - -/** Load an identity matrix */ -void plx_mat3d_identity(); - -/** Load a raw matrix */ -void plx_mat3d_load( matrix_t * src ); - -/** Save a raw matrix */ -void plx_mat3d_store( matrix_t * src ); - -/** Setup viewport parameters */ -void plx_mat3d_viewport( int x1, int y1, int width, int height ); - -void plx_mat3d_depthrange( float n, float f ); - -/** Setup a perspective matrix */ -void plx_mat3d_perspective( float angle, float aspect, float znear, float zfar ); - -/** Setup a frustum matrix */ -void plx_mat3d_frustum( float left, float right, float bottom, float top, float znear, float zfar ); - -/** Push a matrix on the stack */ -void plx_mat3d_push(); - -/** Pop a matrix from the stack and reload it */ -void plx_mat3d_pop(); - -/** Reload a matrix from the top of the stack, but don't pop it */ -void plx_mat3d_peek(); - -/** Rotation */ -void plx_mat3d_rotate( float angle, float x, float y, float z ); - -/** Scaling */ -void plx_mat3d_scale( float x, float y, float z ); - -/** Translation */ -void plx_mat3d_translate( float x, float y, float z ); - -/** Do a camera "look at" */ -void plx_mat3d_lookat( const point_t * eye, const point_t * center, const vector_t * up ); - -/** Apply a matrix from one of the matrix modes to the matrix regs */ -void plx_mat3d_apply( int mode ); - -/** Manually apply a matrix */ -void plx_mat3d_apply_mat( matrix_t * src ); - -/** Apply all the matrices for a normal 3D scene */ -void plx_mat3d_apply_all(); - - -//////////////////////////////////////////////////////////////////////////////////// -// prim.h - -static const int PLX_VERT = 0; -static const int PLX_VERT_EOS = 1; - -typedef struct { - int flags; - float x, y, z; - float u, v; - uint32 argb; - uint32 oargb; // no one is using this.. probably.. -} -plx_vertex_t; - -// 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); \ -} while(0) - -#define PRIMPOST(flags) do { \ - if (flags == PLX_VERT_EOS) { \ - glEnd(); \ - stripping = false; \ - } else { \ - stripping = true; \ - } \ -} 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 ); -#if TIKI_PLAT != TIKI_NDS - uint8 a = ( uint8 ) ( ( argb >> 24 ) & 0xff ); - glColor4ub( r, g, b, a ); -#else - glColor3b( r, g, b ); -#endif -} - -// This function will handle the meat of the Parallax emulation. Note -// that it's invalid with this design to have cross-module vertex submission -// 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 ); - glTexCoord2f( vert->u, vert->v ); - glVertex3f( vert->x, vert->y, vert->z / zscale ); - PRIMPOST( vert->flags ); -} - -void plx_xform( float & x, float & y, float & z ); -static inline void plx_xform( plx_vertex_t * vert ) { - plx_xform( vert->x, vert->y, vert->z ); -} -static inline uint32 plx_pack_color( float a, float r, float g, float b ) { - return Color::pack( a, r, g, b ); -} - - -/** - This simple primitive function will fill a vertex structure for - you from parameters. It uses floating point numbers for the color - values and no u/v coordinates. The "vert" parameter may be a DR target. - */ -static inline void plx_vert_fnn( plx_vertex_t * vert, int flags, float x, float y, float z, - float a, float r, float g, float b ) { - vert->flags = flags; - vert->x = x; - vert->y = y; - vert->z = z; - vert->u = vert->v = 0.0f; - vert->argb = plx_pack_color( a, r, g, b ); - vert->oargb = 0; -} - -/** - Like plx_vert_fnn, but it takes a pre-packed integer color value. - */ -static inline void plx_vert_inn( plx_vertex_t * vert, int flags, float x, float y, float z, - uint32 color ) { - vert->flags = flags; - vert->x = x; - vert->y = y; - vert->z = z; - vert->u = vert->v = 0.0f; - vert->argb = color; - vert->oargb = 0; -} - -/** - Like plx_vert_fnn, but it takes u/v texture coordinates as well. - */ -static inline void plx_vert_ffn( plx_vertex_t * vert, int flags, float x, float y, float z, - float a, float r, float g, float b, float u, float v ) { - vert->flags = flags; - vert->x = x; - vert->y = y; - vert->z = z; - vert->u = u; - vert->v = v; - vert->argb = plx_pack_color( a, r, g, b ); - vert->oargb = 0; -} - -/** - Like plx_vert_fnn, but it takes u/v texture coordinates and a pre-packed integer - color value. - */ -static inline void plx_vert_ifn( plx_vertex_t * vert, int flags, float x, float y, float z, - uint32 color, float u, float v ) { - vert->flags = flags; - vert->x = x; - vert->y = y; - vert->z = z; - vert->u = u; - vert->v = v; - vert->argb = color; - vert->oargb = 0; -} - -/****************************************************** PLX_PRIM VERTEX ****/ -// In PX, these are pretty much all implemented as GL at the low level. - -/** - Like plx_vert_fnp, but submits the point using plx_prim. - */ -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 ); -#endif - glVertex3f( x, y, z / zscale ); - PRIMPOST( flags ); -} - -/** - Like plx_vert_inn, but submits the point using plx_prim. - */ -static inline void plx_vert_inp( int flags, float x, float y, float z, uint32 color ) { - PRIMPRE(); - glColoru32( color ); - glVertex3f( x, y, z / zscale ); - PRIMPOST( flags ); -} - -/** - Like plx_vert_indm3, but uses plx_prim. - */ -static inline void plx_vert_inpm3( int flags, float x, float y, float z, uint32 color ) { - PRIMPRE(); - glColoru32( color ); - plx_xform( x, y, z ); - glVertex3f( x, y, z / zscale ); - PRIMPOST( flags ); -} - -/** - Like plx_vert_ifpm3, but uses plx_prim. - */ -static inline void plx_vert_ifpm3( 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 ); - PRIMPOST( flags ); -} - -/** - Like plx_vert_ffn, but submits the point using plx_prim. - */ -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 ); - PRIMPOST( flags ); -} - -/** - Like plx_vert_ifn, but submits the point using plx_prim. - */ -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 ); - PRIMPOST( flags ); -} - -/********************************************************* DR VERTEX ****/ -// In PX, these are just wrappers for the p versions. - -/** - Like plx_vert_fnn, but submits the point using DR. - */ -static inline void plx_vert_fnd( plx_dr_state_t * state, int flags, float x, float y, float z, - float a, float r, float g, float b ) { - plx_vert_fnp( flags, x, y, z, a, r, g, b ); -} - -/** - Like plx_vert_inn, but submits the point using DR. - */ -static inline void plx_vert_ind( plx_dr_state_t * state, int flags, float x, float y, float z, - uint32 color ) { - plx_vert_inp( flags, x, y, z, color ); -} - -/** - Like plx_vert_ffn, but submits the point using DR. - */ -static inline void plx_vert_ffd( plx_dr_state_t * state, int flags, float x, float y, float z, - float a, float r, float g, float b, float u, float v ) { - plx_vert_ffp( flags, x, y, z, a, r, g, b, u, v ); -} - -/** - Like plx_vert_ifn, but submits the point using DR. - */ -static inline void plx_vert_ifd( plx_dr_state_t * state, int flags, float x, float y, float z, - uint32 color, float u, float v ) { - plx_vert_ifp( flags, x, y, z, color, u, v ); -} - -/** - Like plx_vert_ind, but also transforms via the active matrices for 3D - */ -static inline void plx_vert_indm3( plx_dr_state_t * state, int flags, float x, float y, float z, - uint32 color ) { - plx_vert_inpm3( flags, x, y, z, color ); -} - -/** - Like plx_vert_ifd, but also transforms via the active matrices for 3D - */ -static inline void plx_vert_ifdm3( plx_dr_state_t * state, int flags, float x, float y, float z, - uint32 color, float u, float v ) { - plx_vert_ifpm3( flags, x, y, z, color, u, v ); -} - - -//////////////////////////////////////////////////////////////////////////////////// -// sprite.h - -/** - Submit a quad using the given coordinates, color, and UV values via - DR. The coordinates are at the center point. - */ -static inline void plx_spr_fnd( plx_dr_state_t * state, - float wi, float hi, - float x, float y, float z, - float a, float r, float g, float b ) { - float w = wi / 2.0f; - float h = hi / 2.0f; - plx_vert_ffd( state, PLX_VERT, - x - w, y + h, z, - a, r, g, b, - 0.0f, 1.0f ); - plx_vert_ffd( state, PLX_VERT, - x - w, y - h, z, - a, r, g, b, - 0.0f, 0.0f ); - plx_vert_ffd( state, PLX_VERT, - x + w, y + h, z, - a, r, g, b, - 1.0f, 1.0f ); - plx_vert_ffd( state, PLX_VERT_EOS, - x + w, y - h, z, - a, r, g, b, - 1.0f, 0.0f ); -} - -/** - Like plx_spr_fnd, but with integer color. - */ -static inline void plx_spr_ind( plx_dr_state_t * state, - float wi, float hi, - float x, float y, float z, - uint32 color ) { - float w = wi / 2.0f; - float h = hi / 2.0f; - plx_vert_ifd( state, PLX_VERT, - x - w, y + h, z, - color, - 0.0f, 1.0f ); - plx_vert_ifd( state, PLX_VERT, - x - w, y - h, z, - color, - 0.0f, 0.0f ); - plx_vert_ifd( state, PLX_VERT, - x + w, y + h, z, - color, - 1.0f, 1.0f ); - plx_vert_ifd( state, PLX_VERT_EOS, - x + w, y - h, z, - color, - 1.0f, 0.0f ); -} - -/** - Like plx_spr_fnd, but using matrix math. - */ -static inline void plx_spr_fmd( plx_dr_state_t * state, - float wi, float hi, - float xi, float yi, float zi, - float a, float r, float g, float b ) { - float w = wi / 2.0f; - float h = hi / 2.0f; - float x, y, z; - - x = xi - w; - y = yi + h; - z = zi; - plx_mat_tfip_2d( x, y, z ); - plx_vert_ffd( state, PLX_VERT, - x, y, z, - a, r, g, b, - 0.0f, 1.0f ); - - x = xi - w; - y = yi - h; - z = zi; - plx_mat_tfip_2d( x, y, z ); - plx_vert_ffd( state, PLX_VERT, - x, y, z, - a, r, g, b, - 0.0f, 0.0f ); - - x = xi + w; - y = yi + h; - z = zi; - plx_mat_tfip_2d( x, y, z ); - plx_vert_ffd( state, PLX_VERT, - x, y, z, - a, r, g, b, - 1.0f, 1.0f ); - - x = xi + w; - y = yi - h; - z = zi; - plx_mat_tfip_2d( x, y, z ); - plx_vert_ffd( state, PLX_VERT_EOS, - x, y, z, - a, r, g, b, - 1.0f, 0.0f ); -} - -/** - Like plx_spr_fmd, but using integer colors. - */ -static inline void plx_spr_imd( plx_dr_state_t * state, - float wi, float hi, - float xi, float yi, float zi, - uint32 color ) { - float w = wi / 2.0f; - float h = hi / 2.0f; - float x, y, z; - - x = xi - w; - y = yi + h; - z = zi; - plx_mat_tfip_2d( x, y, z ); - plx_vert_ifd( state, PLX_VERT, - x, y, z, - color, - 0.0f, 1.0f ); - - x = xi - w; - y = yi - h; - z = zi; - plx_mat_tfip_2d( x, y, z ); - plx_vert_ifd( state, PLX_VERT, - x, y, z, - color, - 0.0f, 0.0f ); - - x = xi + w; - y = yi + h; - z = zi; - plx_mat_tfip_2d( x, y, z ); - plx_vert_ifd( state, PLX_VERT, - x, y, z, - color, - 1.0f, 1.0f ); - - x = xi + w; - y = yi - h; - z = zi; - plx_mat_tfip_2d( x, y, z ); - plx_vert_ifd( state, PLX_VERT_EOS, - x, y, z, - color, - 1.0f, 0.0f ); -} - -/**************************************************** PVR_PRIM VERSIONS ***/ - -/** - Like plx_spr_fnd, but using pvr_prim. - */ -static inline void plx_spr_fnp( - float wi, float hi, - float x, float y, float z, - float a, float r, float g, float b ) { - float w = wi / 2.0f; - float h = hi / 2.0f; - plx_vert_ffp( PLX_VERT, - x - w, y + h, z, - a, r, g, b, - 0.0f, 1.0f ); - plx_vert_ffp( PLX_VERT, - x - w, y - h, z, - a, r, g, b, - 0.0f, 0.0f ); - plx_vert_ffp( PLX_VERT, - x + w, y + h, z, - a, r, g, b, - 1.0f, 1.0f ); - plx_vert_ffp( PLX_VERT_EOS, - x + w, y - h, z, - a, r, g, b, - 1.0f, 0.0f ); -} - -/** - Like plx_spr_ind, but using pvr_prim. - */ -static inline void plx_spr_inp( - float wi, float hi, - float x, float y, float z, - uint32 color ) { - float w = wi / 2.0f; - float h = hi / 2.0f; - plx_vert_ifp( PLX_VERT, - x - w, y + h, z, - color, - 0.0f, 1.0f ); - plx_vert_ifp( PLX_VERT, - x - w, y - h, z, - color, - 0.0f, 0.0f ); - plx_vert_ifp( PLX_VERT, - x + w, y + h, z, - color, - 1.0f, 1.0f ); - plx_vert_ifp( PLX_VERT_EOS, - x + w, y - h, z, - color, - 1.0f, 0.0f ); -} - -/** - Like plx_spr_fmd, but using pvr_prim. - */ -static inline void plx_spr_fmp( - float wi, float hi, - float xi, float yi, float zi, - float a, float r, float g, float b ) { - float w = wi / 2.0f; - float h = hi / 2.0f; - float x, y, z; - - x = xi - w; - y = yi + h; - z = zi; - plx_mat_tfip_2d( x, y, z ); - plx_vert_ffp( PLX_VERT, - x, y, z, - a, r, g, b, - 0.0f, 1.0f ); - - x = xi - w; - y = yi - h; - z = zi; - plx_mat_tfip_2d( x, y, z ); - plx_vert_ffp( PLX_VERT, - x, y, z, - a, r, g, b, - 0.0f, 0.0f ); - - x = xi + w; - y = yi + h; - z = zi; - plx_mat_tfip_2d( x, y, z ); - plx_vert_ffp( PLX_VERT, - x, y, z, - a, r, g, b, - 1.0f, 1.0f ); - - x = xi + w; - y = yi - h; - z = zi; - plx_mat_tfip_2d( x, y, z ); - plx_vert_ffp( PLX_VERT_EOS, - x, y, z, - a, r, g, b, - 1.0f, 0.0f ); -} - -/** - Like plx_spr_imd, but using pvr_prim. - */ -static inline void plx_spr_imp( - float wi, float hi, - float xi, float yi, float zi, - uint32 color ) { - float w = wi / 2.0f; - float h = hi / 2.0f; - float x, y, z; - - x = xi - w; - y = yi + h; - z = zi; - plx_mat_tfip_2d( x, y, z ); - plx_vert_ifp( PLX_VERT, - x, y, z, - color, - 0.0f, 1.0f ); - - x = xi - w; - y = yi - h; - z = zi; - plx_mat_tfip_2d( x, y, z ); - plx_vert_ifp( PLX_VERT, - x, y, z, - color, - 0.0f, 0.0f ); - - x = xi + w; - y = yi + h; - z = zi; - plx_mat_tfip_2d( x, y, z ); - plx_vert_ifp( PLX_VERT, - x, y, z, - color, - 1.0f, 1.0f ); - - x = xi + w; - y = yi - h; - z = zi; - plx_mat_tfip_2d( x, y, z ); - plx_vert_ifp( PLX_VERT_EOS, - x, y, z, - color, - 1.0f, 0.0f ); -} - - -} -} -} - -#endif // __TIKI_PLXCOMPAT_H - Modified: tiki/include/Tiki/vector.h =================================================================== --- tiki/include/Tiki/vector.h 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/include/Tiki/vector.h 2007-10-27 01:19:20 UTC (rev 517) @@ -11,7 +11,8 @@ #define __TIKI_VECTOR_H #include <assert.h> -#include "tikimath.h" +#include "Tiki/tikimath.h" +#include "Tiki/debug.h" namespace Tiki { namespace Math { Modified: tiki/nds/Makefile =================================================================== --- tiki/nds/Makefile 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/nds/Makefile 2007-10-27 01:19:20 UTC (rev 517) @@ -76,8 +76,6 @@ ../examples/net/httpclient cd .. && \ zip -9ru dist/$(SVN_VERSION)/tiki-$(SVN_VERSION)-nds.zip \ - 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 \ Modified: tiki/nds/src/init_shutdown.cpp =================================================================== --- tiki/nds/src/init_shutdown.cpp 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/nds/src/init_shutdown.cpp 2007-10-27 01:19:20 UTC (rev 517) @@ -10,7 +10,6 @@ #include "Tiki/sound.h" #include "Tiki/stream.h" -#include "Tiki/plxcompat.h" #include "Tiki/hid.h" #include <nds.h> @@ -85,7 +84,6 @@ fatInitDefault(); // initialize parallax - GL::Plxcompat::plx_mat3d_init( 256, 192 ); Tiki::Debug::printf("Enabling Sound\n"); Audio::Stream::initGlobal(); Hid::init(); Modified: tiki/nds/src/platgl.cpp =================================================================== --- tiki/nds/src/platgl.cpp 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/nds/src/platgl.cpp 2007-10-27 01:19:20 UTC (rev 517) @@ -23,6 +23,9 @@ namespace GL { namespace Frame { +Vector getScreenExtents() { + return Vector( 256.0f, 192.0f, 0.0f ); +} float getFrameRate() { uint64 cur = Tiki::Time::gettime(); Modified: tiki/nds/tiki.cbp =================================================================== --- tiki/nds/tiki.cbp 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/nds/tiki.cbp 2007-10-27 01:19:20 UTC (rev 517) @@ -452,7 +452,6 @@ <Unit filename="../include/Tiki/net/util/date.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" /> @@ -510,7 +509,6 @@ <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" /> Property changes on: tiki/nds/tikiarm7 ___________________________________________________________________ Name: svn:ignore - build tikiarm7.arm7.elf + build tikiarm7.arm7.elf tikiarm7.arm7 Modified: tiki/osx/Makefile =================================================================== --- tiki/osx/Makefile 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/osx/Makefile 2007-10-27 01:19:20 UTC (rev 517) @@ -3,16 +3,12 @@ xcodebuild -target Tiki -configuration Deployment examples: - xcodebuild -project ../examples/TikiTest/TikiTest.xcodeproj -configuration Development - xcodebuild -project ../examples/TikiTest/TikiTest.xcodeproj -configuration Deployment xcodebuild -project ../examples/console/TikiSnake/TikiSnake.xcodeproj -configuration Development xcodebuild -project ../examples/console/TikiSnake/TikiSnake.xcodeproj -configuration Deployment clean: -xcodebuild -target Tiki -configuration Development clean -xcodebuild -target Tiki -configuration Deployment clean - -xcodebuild -project ../examples/TikiTest/TikiTest.xcodeproj -configuration Development clean - -xcodebuild -project ../examples/TikiTest/TikiTest.xcodeproj -configuration Deployment clean -xcodebuild -project ../examples/console/TikiSnake/TikiSnake.xcodeproj -configuration Development clean -xcodebuild -project ../examples/console/TikiSnake/TikiSnake.xcodeproj -configuration Deployment clean @@ -20,8 +16,6 @@ mkdir ../dist/$(SVN_VERSION)/tmp-debug ditto -v build/Development/Tiki.framework \ ../dist/$(SVN_VERSION)/tmp-debug/Tiki.framework - ditto -v ../examples/TikiTest/build/Development/TikiTest.app \ - ../dist/$(SVN_VERSION)/tmp-debug/TikiTest.app ditto -v ../examples/console/TikiSnake/build/Development/TikiSnake.app \ ../dist/$(SVN_VERSION)/tmp-debug/TikiSnake.app hdiutil create -fs HFS+ \ @@ -35,8 +29,6 @@ mkdir ../dist/$(SVN_VERSION)/tmp-release ditto -v build/Deployment/Tiki.framework \ ../dist/$(SVN_VERSION)/tmp-release/Tiki.framework - ditto -v ../examples/TikiTest/build/Deployment/TikiTest.app \ - ../dist/$(SVN_VERSION)/tmp-release/TikiTest.app ditto -v ../examples/console/TikiSnake/build/Deployment/TikiSnake.app \ ../dist/$(SVN_VERSION)/tmp-release/TikiSnake.app hdiutil create -fs HFS+ \ Modified: tiki/osx/Tiki.xcodeproj/project.pbxproj =================================================================== --- tiki/osx/Tiki.xcodeproj/project.pbxproj 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/osx/Tiki.xcodeproj/project.pbxproj 2007-10-27 01:19:20 UTC (rev 517) @@ -182,7 +182,6 @@ C4F51583079A0D0B0001D0D0 /* matrix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C4F5157F079A0D0B0001D0D0 /* matrix.cpp */; }; C4F51584079A0D0B0001D0D0 /* vector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C4F51580079A0D0B0001D0D0 /* vector.cpp */; }; C4F51585079A0D0B0001D0D0 /* vector3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C4F51581079A0D0B0001D0D0 /* vector3.cpp */; }; - C4F515F2079A302D0001D0D0 /* plxcompat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C4F515F1079A302D0001D0D0 /* plxcompat.cpp */; }; C4F51613079A34260001D0D0 /* gl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C4F51612079A34260001D0D0 /* gl.cpp */; }; /* End PBXBuildFile section */ @@ -444,8 +443,6 @@ C4F5157F079A0D0B0001D0D0 /* matrix.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = matrix.cpp; path = ../src/math/matrix.cpp; sourceTree = SOURCE_ROOT; }; C4F51580079A0D0B0001D0D0 /* vector.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = vector.cpp; path = ../src/math/vector.cpp; sourceTree = SOURCE_ROOT; }; C4F51581079A0D0B0001D0D0 /* vector3.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = vector3.cpp; path = ../src/math/vector3.cpp; sourceTree = SOURCE_ROOT; }; - C4F515AA079A27E10001D0D0 /* plxcompat.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = plxcompat.h; path = ../include/Tiki/plxcompat.h; sourceTree = SOURCE_ROOT; }; - C4F515F1079A302D0001D0D0 /* plxcompat.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = plxcompat.cpp; path = ../src/gl/plxcompat.cpp; sourceTree = SOURCE_ROOT; }; C4F5160B079A33AA0001D0D0 /* gl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = gl.h; path = ../include/Tiki/gl.h; sourceTree = SOURCE_ROOT; }; C4F51612079A34260001D0D0 /* gl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = gl.cpp; path = ../src/gl/gl.cpp; sourceTree = SOURCE_ROOT; }; /* End PBXFileReference section */ @@ -992,7 +989,6 @@ C4F5152C079A0B690001D0D0 /* font.cpp */, C4F5152D079A0B690001D0D0 /* genmenu.cpp */, C4F51612079A34260001D0D0 /* gl.cpp */, - C4F515F1079A302D0001D0D0 /* plxcompat.cpp */, C4F5152E079A0B690001D0D0 /* texture.cpp */, C4F5152F079A0B690001D0D0 /* trigger.cpp */, ); @@ -1045,7 +1041,6 @@ C4F51564079A0C430001D0D0 /* font.h */, C4F51565079A0C430001D0D0 /* genmenu.h */, C4F5160B079A33AA0001D0D0 /* gl.h */, - C4F515AA079A27E10001D0D0 /* plxcompat.h */, C4F51566079A0C430001D0D0 /* texture.h */, C4F51567079A0C430001D0D0 /* trigger.h */, ); @@ -1242,7 +1237,6 @@ C4F51583079A0D0B0001D0D0 /* matrix.cpp in Sources */, C4F51584079A0D0B0001D0D0 /* vector.cpp in Sources */, C4F51585079A0D0B0001D0D0 /* vector3.cpp in Sources */, - C4F515F2079A302D0001D0D0 /* plxcompat.cpp in Sources */, C4F51613079A34260001D0D0 /* gl.cpp in Sources */, C453992B079A477500F3A584 /* hid.cpp in Sources */, C453994B079A509100F3A584 /* plathid.mm in Sources */, Modified: tiki/osx/src/init_shutdown.cpp =================================================================== --- tiki/osx/src/init_shutdown.cpp 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/osx/src/init_shutdown.cpp 2007-10-27 01:19:20 UTC (rev 517) @@ -20,7 +20,6 @@ #include "Tiki/sound.h" #include "Tiki/stream.h" -#include "Tiki/plxcompat.h" #include "Tiki/hid.h" extern "C" void tiki_set_window_name( CFStringRef windowName ); @@ -47,7 +46,6 @@ Audio::Sound::initGlobal(); Audio::Stream::initGlobal(); - GL::Plxcompat::plx_mat3d_init( 640, 480 ); Hid::init(); return true; Modified: tiki/osx/src/platgl.cpp =================================================================== --- tiki/osx/src/platgl.cpp 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/osx/src/platgl.cpp 2007-10-27 01:19:20 UTC (rev 517) @@ -37,13 +37,6 @@ frameCnt++; totalFrameCnt++; -#ifndef NDEBUG - /* if (frameCnt && !(frameCnt % 250)) { - Debug::printf("frame %d, fps = %.2f\n", (int)frameCnt, - (double)Tiki::GL::Frame::getFrameRate()); - } */ -#endif - if ( lastFrame.tv_sec == 0 ) { gettimeofday( &lastFrame, NULL ); return ; @@ -60,7 +53,10 @@ gettimeofday( &lastFrame, NULL ); } -float Tiki::GL::Frame::getFrameRate() { +namespace Tiki { +namespace GL { +namespace Frame { +float getFrameRate() { uint64 cur = Tiki::Time::gettime(); // Avoid divzero @@ -70,7 +66,14 @@ return ( float ) ( ( frameCnt * 1000000.0 ) / ( cur - firstFrame ) ); } -void Tiki::GL::Frame::setFrameRateLimit( int rate ) { +void setFrameRateLimit( int rate ) { targetFrameRate = rate; } +Vector getScreenExtents() { + return Vector( 640.0f, 480.0f, 0.0f ); +} + +} +} +} Modified: tiki/sdl/Makefile =================================================================== --- tiki/sdl/Makefile 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/sdl/Makefile 2007-10-27 01:19:20 UTC (rev 517) @@ -74,7 +74,6 @@ 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 \ Modified: tiki/sdl/TikiSDL.cbp =================================================================== --- tiki/sdl/TikiSDL.cbp 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/sdl/TikiSDL.cbp 2007-10-27 01:19:20 UTC (rev 517) @@ -457,7 +457,6 @@ <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" /> @@ -515,7 +514,6 @@ <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" /> Modified: tiki/sdl/src/init_shutdown.cpp =================================================================== --- tiki/sdl/src/init_shutdown.cpp 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/sdl/src/init_shutdown.cpp 2007-10-27 01:19:20 UTC (rev 517) @@ -11,9 +11,10 @@ #include <AL/al.h> #include <AL/alc.h> +#include "Tiki/tiki.h" +#include "Tiki/gl.h" #include "Tiki/sound.h" #include "Tiki/stream.h" -#include "Tiki/plxcompat.h" #include "Tiki/hid.h" #include <SDL/SDL.h> @@ -66,7 +67,6 @@ 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(); } Modified: tiki/sdl/src/platgl.cpp =================================================================== --- tiki/sdl/src/platgl.cpp 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/sdl/src/platgl.cpp 2007-10-27 01:19:20 UTC (rev 517) @@ -26,7 +26,11 @@ static uint64 firstFrame = 0; static uint64 frameCnt = 0, totalFrameCnt = 0; -float Tiki::GL::Frame::getFrameRate() { +namespace Tiki { +namespace GL { +namespace Frame { + +float getFrameRate() { uint64 cur = Tiki::Time::gettime(); // Avoid divzero @@ -36,10 +40,18 @@ return ( float )(( frameCnt * 1000000.0 ) / ( cur - firstFrame ) ); } -void Tiki::GL::Frame::setFrameRateLimit( int rate ) { +void setFrameRateLimit( int rate ) { targetFrameRate = rate; } +Vector getScreenExtents() { + return Vector( 640.0f, 480.0f, 0.0f ); +} + +} +} +} + extern "C" { void tiki_wait_if_needed() { Modified: tiki/src/gl/drawable.cpp =================================================================== --- tiki/src/gl/drawable.cpp 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/src/gl/drawable.cpp 2007-10-27 01:19:20 UTC (rev 517) @@ -10,7 +10,6 @@ #include "pch.h" #include "Tiki/drawable.h" #include "Tiki/matrix.h" -#include "Tiki/plxcompat.h" using namespace Tiki::GL; @@ -229,19 +228,3 @@ return tint; } - -void Drawable::pushTransformMatrix() const { - const Vector & pos = getTranslate(); - const Vector & rot = getRotate(); - const Vector & scale = getScale(); - - Plxcompat::plx_mat3d_push(); - Plxcompat::plx_mat3d_translate( pos.x, pos.y, pos.z ); - Plxcompat::plx_mat3d_rotate( rot.w, rot.x, rot.y, rot.z ); - Plxcompat::plx_mat3d_scale( scale.x, scale.y, scale.z ); -} - -void Drawable::popTransformMatrix() const { - Plxcompat::plx_mat3d_pop(); -} - Modified: tiki/src/gl/drawables/banner.cpp =================================================================== --- tiki/src/gl/drawables/banner.cpp 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/src/gl/drawables/banner.cpp 2007-10-27 01:19:20 UTC (rev 517) @@ -10,10 +10,8 @@ #include "pch.h" #include "Tiki/drawables/banner.h" -#include "Tiki/plxcompat.h" using namespace Tiki::GL; -using namespace Tiki::GL::Plxcompat; Banner::Banner(ObjType t, Texture * texture) { m_list = t; @@ -75,18 +73,18 @@ if (list != Trans) { argb.a = 1.0f; } - argb.select(); - - glBegin(GL_TRIANGLE_STRIP); - glTexCoord2f(m_u1, m_v1); - glVertex3f(tv.x - w/2, tv.y + h/2, tv.z); + + glLoadIdentity(); + glBegin(GL_QUADS); glTexCoord2f(m_u2, m_v2); - glVertex3f(tv.x - w/2, tv.y - h/2, tv.z); - glTexCoord2f(m_u3, m_v3); - glVertex3f(tv.x + w/2, tv.y + h/2, tv.z); + glVertex3f(tv.x - w/2, tv.y - h/2, tv.z / 1000.0f); glTexCoord2f(m_u4, m_v4); - glVertex3f(tv.x + w/2, tv.y - h/2, tv.z); + glVertex3f(tv.x + w/2, tv.y - h/2, tv.z / 1000.0f); + glTexCoord2f(m_u3, m_v3); + glVertex3f(tv.x + w/2, tv.y + h/2, tv.z / 1000.0f); + glTexCoord2f(m_u1, m_v1); + glVertex3f(tv.x - w/2, tv.y + h/2, tv.z / 1000.0f); glEnd(); } Modified: tiki/src/gl/drawables/console.cpp =================================================================== --- tiki/src/gl/drawables/console.cpp 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/src/gl/drawables/console.cpp 2007-10-27 01:19:20 UTC (rev 517) @@ -10,14 +10,12 @@ #include "pch.h" #include "Tiki/tiki.h" -#include "Tiki/plxcompat.h" #include "Tiki/drawables/console.h" #include <stdarg.h> using namespace Tiki::GL; -using namespace Tiki::GL::Plxcompat; -ConsoleText::ConsoleText( int cols, int rows, Texture * texture ) +Console::Console( int cols, int rows, Texture * texture ) { m_texture = texture; m_rows = rows; @@ -54,21 +52,21 @@ clear(); } -ConsoleText::~ConsoleText() +Console::~Console() {} -void ConsoleText::setTexture( Texture * txr ) +void Console::setTexture( Texture * txr ) { m_texture = txr; } -void ConsoleText::setSize( float w, float h ) +void Console::setSize( float w, float h ) { m_w = w; m_h = h; } -void ConsoleText::clear() +void Console::clear() { int x; @@ -86,7 +84,7 @@ refresh(); } -void ConsoleText::scroll( int rows, int top, int left, int bottom, int right ) +void Console::scroll( int rows, int top, int left, int bottom, int right ) { assert( top >= 0 && left >= 0 && bottom <= m_rows && right <= m_cols ); @@ -111,18 +109,18 @@ refresh(); } -void ConsoleText::scroll( int rows ) +void Console::scroll( int rows ) { scroll( rows, 0, 0, m_rows - 1, m_cols - 1 ); } -void ConsoleText::locate( int x, int y ) +void Console::locate( int x, int y ) { m_cursor_x = x; m_cursor_y = y; } -void ConsoleText::color( int fg, int bg ) +void Console::color( int fg, int bg ) { m_attr = 0x0000; if ( fg > 7 && fg <= 16 ) @@ -134,7 +132,7 @@ m_attr |= ( bg << 8 ); } -void ConsoleText::printf( const char *fmt, ... ) +void Console::printf( const char *fmt, ... ) { #if TIKI_PLAT == TIKI_NDS char buf[ 1024 ]; @@ -219,7 +217,7 @@ refresh(); } -void ConsoleText::renderCharacter( float x, float y, float w, float h, unsigned char c, int attr ) +void Console::renderCharacter( float x, float y, float w, float h, unsigned char c, int attr ) { float u = static_cast<float>( ( c % 16 ) * 8 ); float v = static_cast<float>( ( c / 16 ) * 8 ); @@ -248,7 +246,7 @@ glVertex3f(tv.x + w - (m_w / 2), tv.y + h - (m_h / 2), tv.z); } -void ConsoleText::renderBackground( float x, float y, float w, float h, int color ) +void Console::renderBackground( float x, float y, float w, float h, int color ) { const Vector & sv = getScale(); w *= sv.x; @@ -263,7 +261,7 @@ glVertex3f(tv.x + w - (m_w / 2), tv.y + h - (m_h / 2), tv.z); } -void ConsoleText::draw( ObjType list ) +void Console::draw( ObjType list ) { int x = 0, y = 0; float x_step = ( m_w / m_cols ); @@ -300,7 +298,7 @@ } } -void ConsoleText::processAnsiString() +void Console::processAnsiString() { if ( ansistr[ 1 ] == '[' ) { @@ -355,7 +353,6 @@ m_cursor_x = m_cols - 1; if ( m_cursor_y > m_rows - 1 ) m_cursor_y = m_rows - 1; - //printf("**** GOTO XY(%u,%u) ****\n", m_cursor_x, m_cursor_y); } break; case 'A': // UP * lines @@ -368,7 +365,6 @@ m_cursor_x = m_cols - 1; if ( m_cursor_y > m_rows - 1 ) m_cursor_y = m_rows - 1; - //printf("**** UP %u ****\n",m_cursor_y); break; case 'B': // DOWN * lines m_cursor_y += args[ 0 ]; @@ -380,7 +376,6 @@ m_cursor_x = m_cols - 1; if ( m_cursor_y > m_rows - 1 ) m_cursor_y = m_rows - 1; - //printf("**** DOWN %u ****\n",m_cursor_y); break; case 'C': // RIGHT * chars m_cursor_x += args[ 0 ]; @@ -392,7 +387,6 @@ m_cursor_x = m_cols - 1; if ( m_cursor_y > m_rows - 1 ) m_cursor_y = m_rows - 1; - //printf("**** RIGHT %u ****\n",m_cursor_y); break; case 'D': // LEFT * chars m_cursor_x -= args[ 0 ]; @@ -404,26 +398,21 @@ m_cursor_x = m_cols - 1; if ( m_cursor_y > m_rows - 1 ) m_cursor_y = m_rows - 1; - //printf("**** LEFT %u ****\n",m_cursor_y); break; case 'J': // clearscreen clear(); - //printf("**** CLEAR SCREEN ****\n"); break; case 's': // save location m_save_x = m_cursor_x; m_save_y = m_cursor_y; - //printf("**** SAVE XY (%u, %u) ****\n", save_x, save_y); break; case 'u': // restore location m_cursor_x = m_save_x; m_cursor_y = m_save_y; m_save_x = m_save_y = 0; - //printf("**** RESTORE XY (%u, %u) ****\n", m_cursor_x, m_cursor_y); break; case 'n': // ANSI detect //remoteHost->write("\x1b[1;1R", 6); - //printf("**** ANSI DETECTION ****\n"); break; case 'k': case 'K': // clear EOL @@ -434,16 +423,13 @@ m_charData[ ( m_cursor_y * m_cols ) + x ] = 0; m_colorData[ ( m_cursor_y * m_cols ) + x++ ] = m_attr; } - //printf("**** CLEAR EOL %u ****\n", m_cursor_y); } break; case 'm': // set color attribute, currently ignored { - //printf("**** SET ATTRIBUTE [%u]", argptr); int i; for ( i = 0; i < argptr; i++ ) { - //printf(" %u", args[i]); switch ( args[ i ] ) { case 0: @@ -530,14 +516,9 @@ break; } } - //printf(" ****\n"); } break; } } - // else - // { - // printf("Bogus ANSI: %s\n", ansistr); - // } ansiptr = 0; } Modified: tiki/src/gl/drawables/label.cpp =================================================================== --- tiki/src/gl/drawables/label.cpp 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/src/gl/drawables/label.cpp 2007-10-27 01:19:20 UTC (rev 517) @@ -10,10 +10,8 @@ #include "pch.h" #include "Tiki/drawables/label.h" -#include "Tiki/plxcompat.h" using namespace Tiki::GL; -using namespace Tiki::GL::Plxcompat; Label::Label(Font * fh, const string & text, float size, bool centered, bool smear) { m_fh = fh; Modified: tiki/src/gl/drawables/pointerArrow.cpp =================================================================== --- tiki/src/gl/drawables/pointerArrow.cpp 2007-10-26 19:19:14 UTC (rev 516) +++ tiki/src/gl/drawables/pointerArrow.cpp 2007-10-27 01:19... [truncated message content] |
From: <at...@us...> - 2007-10-26 19:19:17
|
Revision: 516 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=516&view=rev Author: atani Date: 2007-10-26 12:19:14 -0700 (Fri, 26 Oct 2007) Log Message: ----------- * more NeHe examples * migrated a couple drawables away from plx to normal OpenGL calls * more NDS compatibility, all NeHe examples work as expected. Modified Paths: -------------- tiki/examples/nehe/Makefile tiki/examples/nehe/lesson02/src/main.cpp tiki/examples/nehe/lesson03/Makefile tiki/examples/nehe/lesson03/src/main.cpp tiki/examples/net/httpclient/src/main.cpp tiki/include/Tiki/color.h tiki/src/gl/drawables/banner.cpp tiki/src/gl/drawables/console.cpp tiki/src/gl/drawables/pointerArrow.cpp tiki/src/gl/gl.cpp Added Paths: ----------- tiki/examples/nehe/lesson03/ tiki/examples/nehe/lesson04/ tiki/examples/nehe/lesson04/Makefile tiki/examples/nehe/lesson04/src/ tiki/examples/nehe/lesson04/src/main.cpp tiki/examples/nehe/lesson05/ tiki/examples/nehe/lesson05/Makefile tiki/examples/nehe/lesson05/src/ tiki/examples/nehe/lesson05/src/main.cpp Removed Paths: ------------- tiki/examples/nehe/lesson01/ Property Changed: ---------------- tiki/examples/nehe/lesson02/src/ tiki/examples/nehe/lesson03/src/ Modified: tiki/examples/nehe/Makefile =================================================================== --- tiki/examples/nehe/Makefile 2007-10-25 23:42:44 UTC (rev 515) +++ tiki/examples/nehe/Makefile 2007-10-26 19:19:14 UTC (rev 516) @@ -1,5 +1,5 @@ -SUBDIRS = lesson01 lesson02 +SUBDIRS = lesson02 lesson03 lesson04 lesson05 TIKI_DIR ?= $(CURDIR)/../../ include $(TIKI_DIR)$(TIKI_PLAT)/Makefile.rules Property changes on: tiki/examples/nehe/lesson02/src ___________________________________________________________________ Name: svn:ignore + *.d *.nds *.ds.gba Modified: tiki/examples/nehe/lesson02/src/main.cpp =================================================================== --- tiki/examples/nehe/lesson02/src/main.cpp 2007-10-25 23:42:44 UTC (rev 515) +++ tiki/examples/nehe/lesson02/src/main.cpp 2007-10-26 19:19:14 UTC (rev 516) @@ -22,16 +22,10 @@ Frame::set3d(); // Set the current matrix to be the model matrix - glMatrixMode(GL_MODELVIEW); - - //Push our original Matrix onto the stack (save state) - //glPushMatrix(); + glMatrixMode(GL_MODELVIEW); DrawGLScene(); - // Pop our Matrix from the stack (restore state) - //glPopMatrix(); - Frame::finish(); } Copied: tiki/examples/nehe/lesson03 (from rev 515, tiki/examples/nehe/lesson01) Modified: tiki/examples/nehe/lesson03/Makefile =================================================================== --- tiki/examples/nehe/lesson01/Makefile 2007-10-25 23:42:44 UTC (rev 515) +++ tiki/examples/nehe/lesson03/Makefile 2007-10-26 19:19:14 UTC (rev 516) @@ -4,22 +4,22 @@ OBJS = $(patsubst %.cpp,%.o,$(wildcard src/*.cpp)) ifeq ($(TIKI_PLAT),nds) -NDS_CART_CODE ?= NH01 +NDS_CART_CODE ?= NH03 NDS_CART_ID ?= NH -NDS_CART_NAME ?= NeHe01 +NDS_CART_NAME ?= NeHe03 NDS_CART_VERSION ?= 1 endif -all: nehe_lesson01 -nehe_lesson01: $(OBJS) +all: nehe_lesson03 +nehe_lesson03: $(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) + $(CXX) $(LDFLAGS) -L$(TIKI_DIR)$(TIKI_PLAT) -L$(TIKI_DIR)$(TIKI_PLAT)/lib $(OBJS) $(TIKI_BASE_LIBS) -o nehe_lesson03$(PLATFORM_BINARY_EXT) $(ROMDISK_OBJ) $(post_build) clean: - -rm -f $(OBJS) nehe_lesson01$(PLATFORM_BINARY_EXT) $(ROMDISK_OBJ) + -rm -f $(OBJS) nehe_lesson03$(PLATFORM_BINARY_EXT) $(ROMDISK_OBJ) ifeq ($(TIKI_PLAT),nds) - -rm -f nehe_lesson01.nds nehe_lesson01.ds.gba + -rm -f nehe_lesson03.nds nehe_lesson03.ds.gba endif TIKI_DIR ?= $(CURDIR)/../../../ Property changes on: tiki/examples/nehe/lesson03/src ___________________________________________________________________ Name: svn:ignore + *.d *.nds *.ds.nds Modified: tiki/examples/nehe/lesson03/src/main.cpp =================================================================== --- tiki/examples/nehe/lesson01/src/main.cpp 2007-10-25 23:42:44 UTC (rev 515) +++ tiki/examples/nehe/lesson03/src/main.cpp 2007-10-26 19:19:14 UTC (rev 516) @@ -18,20 +18,12 @@ while (1) { Frame::begin(); + Frame::set3d(); // 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(); } @@ -39,8 +31,24 @@ return 0; } -void DrawGLScene(void) +void DrawGLScene() // Here's Where We Do All The Drawing { - //this is where the magic happens - glLoadIdentity(); + 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 + glColor3f(1.0f,0.0f,0.0f); // Set The Color To Red + glVertex3f( 0.0f, 1.0f, 0.0f); // Top + glColor3f(0.0f,1.0f,0.0f); // Set The Color To Green + glVertex3f(-1.0f,-1.0f, 0.0f); // Bottom Left + glColor3f(0.0f,0.0f,1.0f); // Set The Color To Blue + 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 + glColor3f(0.5f,0.5f,1.0f); // Set The Color To Blue One Time Only + 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 } Property changes on: tiki/examples/nehe/lesson04 ___________________________________________________________________ Name: svn:ignore + *.nds *.ds.gba Added: tiki/examples/nehe/lesson04/Makefile =================================================================== --- tiki/examples/nehe/lesson04/Makefile (rev 0) +++ tiki/examples/nehe/lesson04/Makefile 2007-10-26 19:19:14 UTC (rev 516) @@ -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 ?= NH04 +NDS_CART_ID ?= NH +NDS_CART_NAME ?= NeHe04 +NDS_CART_VERSION ?= 1 +endif + +all: nehe_lesson04 +nehe_lesson04: $(OBJS) + $(build_romdisk) + $(CXX) $(LDFLAGS) -L$(TIKI_DIR)$(TIKI_PLAT) -L$(TIKI_DIR)$(TIKI_PLAT)/lib $(OBJS) $(TIKI_BASE_LIBS) -o nehe_lesson04$(PLATFORM_BINARY_EXT) $(ROMDISK_OBJ) + $(post_build) + +clean: + -rm -f $(OBJS) nehe_lesson04$(PLATFORM_BINARY_EXT) $(ROMDISK_OBJ) +ifeq ($(TIKI_PLAT),nds) + -rm -f nehe_lesson04.nds nehe_lesson04.ds.gba +endif + +TIKI_DIR ?= $(CURDIR)/../../../ +DEPSDIR=$(CURDIR) +include $(TIKI_DIR)$(TIKI_PLAT)/Makefile.rules Property changes on: tiki/examples/nehe/lesson04/Makefile ___________________________________________________________________ Name: svn:executable + * Property changes on: tiki/examples/nehe/lesson04/src ___________________________________________________________________ Name: svn:ignore + *.d Added: tiki/examples/nehe/lesson04/src/main.cpp =================================================================== --- tiki/examples/nehe/lesson04/src/main.cpp (rev 0) +++ tiki/examples/nehe/lesson04/src/main.cpp 2007-10-26 19:19:14 UTC (rev 516) @@ -0,0 +1,69 @@ +/**************************************** + * NDS NeHe Lesson 04 * + * Author: Dovoto * + ****************************************/ + +// include your ndslib +#include <Tiki/tiki.h> +#include <Tiki/gl.h> + +using namespace Tiki; +using namespace Tiki::GL; + + +void DrawGLScene(); + +float rtri; // Angle For The Triangle ( NEW ) +float rquad; // Angle For The Quad ( NEW ) + +int main(int argc, char *argv[]) +{ + Tiki::init(argc, argv); + + // Set the current matrix to be the model matrix + glMatrixMode(GL_MODELVIEW); + + while (1) + { + Frame::begin(); + Frame::set3d(); + + // Set the current matrix to be the model matrix + glMatrixMode(GL_MODELVIEW); + + // draw the scene + DrawGLScene(); + + 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 + glRotatef(rtri,0.0f,1.0f,0.0f); // Rotate The Triangle On The Y axis ( NEW ) + glColor3f(1, 1, 1); // set the vertex color + glBegin(GL_TRIANGLES); // Start Drawing A Triangle + glColor3f(1.0f,0.0f,0.0f); // Set Top Point Of Triangle To Red + glVertex3f( 0.0f, 1.0f, 0.0f); // First Point Of The Triangle + glColor3f(0.0f,1.0f,0.0f); // Set Left Point Of Triangle To Green + glVertex3f(-1.0f,-1.0f, 0.0f); // Second Point Of The Triangle + glColor3f(0.0f,0.0f,1.0f); // Set Right Point Of Triangle To Blue + glVertex3f( 1.0f,-1.0f, 0.0f); // Third Point Of The Triangle + glEnd(); // Done Drawing The Triangle + glLoadIdentity(); // Reset The Current Modelview Matrix + glTranslatef(1.5f,0.0f,-6.0f); // Move Right 1.5 Units And Into The Screen 6.0 + glRotatef(rquad,1.0f,0.0f,0.0f); // Rotate The Quad On The X axis ( NEW ) + glColor3f(0.5f,0.5f,1.0f); // Set The Color To Blue One Time Only + 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 + rtri+=0.9f; // Increase The Rotation Variable For The Triangle ( NEW ) + rquad-=0.75f; // Decrease The Rotation Variable For The Quad ( NEW ) +} Property changes on: tiki/examples/nehe/lesson05 ___________________________________________________________________ Name: svn:ignore + *.nds *.ds.gba Added: tiki/examples/nehe/lesson05/Makefile =================================================================== --- tiki/examples/nehe/lesson05/Makefile (rev 0) +++ tiki/examples/nehe/lesson05/Makefile 2007-10-26 19:19:14 UTC (rev 516) @@ -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 ?= NH05 +NDS_CART_ID ?= NH +NDS_CART_NAME ?= NeHe05 +NDS_CART_VERSION ?= 1 +endif + +all: nehe_lesson05 +nehe_lesson05: $(OBJS) + $(build_romdisk) + $(CXX) $(LDFLAGS) -L$(TIKI_DIR)$(TIKI_PLAT) -L$(TIKI_DIR)$(TIKI_PLAT)/lib $(OBJS) $(TIKI_BASE_LIBS) -o nehe_lesson05$(PLATFORM_BINARY_EXT) $(ROMDISK_OBJ) + $(post_build) + +clean: + -rm -f $(OBJS) nehe_lesson05$(PLATFORM_BINARY_EXT) $(ROMDISK_OBJ) +ifeq ($(TIKI_PLAT),nds) + -rm -f nehe_lesson05.nds nehe_lesson05.ds.gba +endif + +TIKI_DIR ?= $(CURDIR)/../../../ +DEPSDIR=$(CURDIR) +include $(TIKI_DIR)$(TIKI_PLAT)/Makefile.rules Property changes on: tiki/examples/nehe/lesson05/Makefile ___________________________________________________________________ Name: svn:executable + * Property changes on: tiki/examples/nehe/lesson05/src ___________________________________________________________________ Name: svn:ignore + *.d Added: tiki/examples/nehe/lesson05/src/main.cpp =================================================================== --- tiki/examples/nehe/lesson05/src/main.cpp (rev 0) +++ tiki/examples/nehe/lesson05/src/main.cpp 2007-10-26 19:19:14 UTC (rev 516) @@ -0,0 +1,108 @@ +/**************************************** + * NDS NeHe Lesson 05 * + * Author: Dovoto * + ****************************************/ + +// include your ndslib +#include <Tiki/tiki.h> +#include <Tiki/gl.h> + +using namespace Tiki; +using namespace Tiki::GL; + +void DrawGLScene(); + +float rtri; // Angle For The Triangle ( NEW ) +float rquad; // Angle For The Quad ( NEW ) + +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); + + DrawGLScene(); + + 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 + glRotatef(rtri,0.0f,1.0f,0.0f); // Rotate The Triangle On The Y axis ( NEW ) + glBegin(GL_TRIANGLES); // Start Drawing A Triangle + glColor3f(1.0f,0.0f,0.0f); // Red + glVertex3f( 0.0f, 1.0f, 0.0f); // Top Of Triangle (Front) + glColor3f(0.0f,1.0f,0.0f); // Green + glVertex3f(-1.0f,-1.0f, 1.0f); // Left Of Triangle (Front) + glColor3f(0.0f,0.0f,1.0f); // Blue + glVertex3f( 1.0f,-1.0f, 1.0f); // Right Of Triangle (Front) + glColor3f(1.0f,0.0f,0.0f); // Red + glVertex3f( 0.0f, 1.0f, 0.0f); // Top Of Triangle (Right) + glColor3f(0.0f,0.0f,1.0f); // Blue + glVertex3f( 1.0f,-1.0f, 1.0f); // Left Of Triangle (Right) + glColor3f(0.0f,1.0f,0.0f); // Green + glVertex3f( 1.0f,-1.0f, -1.0f); // Right Of Triangle (Right) + glColor3f(1.0f,0.0f,0.0f); // Red + glVertex3f( 0.0f, 1.0f, 0.0f); // Top Of Triangle (Back) + glColor3f(0.0f,1.0f,0.0f); // Green + glVertex3f( 1.0f,-1.0f, -1.0f); // Left Of Triangle (Back) + glColor3f(0.0f,0.0f,1.0f); // Blue + glVertex3f(-1.0f,-1.0f, -1.0f); // Right Of Triangle (Back) + glColor3f(1.0f,0.0f,0.0f); // Red + glVertex3f( 0.0f, 1.0f, 0.0f); // Top Of Triangle (Left) + glColor3f(0.0f,0.0f,1.0f); // Blue + glVertex3f(-1.0f,-1.0f,-1.0f); // Left Of Triangle (Left) + glColor3f(0.0f,1.0f,0.0f); // Green + glVertex3f(-1.0f,-1.0f, 1.0f); // Right Of Triangle (Left) + glEnd(); // Done Drawing The Pyramid + + glLoadIdentity(); // Reset The Current Modelview Matrix + glTranslatef(1.5f,0.0f,-7.0f); // Move Right 1.5 Units And Into The Screen 7.0 + glRotatef(rquad,1.0f,1.0f,1.0f); // Rotate The Quad On The X axis ( NEW ) + glBegin(GL_QUADS); // Draw A Quad + glColor3f(0.0f,1.0f,0.0f); // Set The Color To Green + glVertex3f( 1.0f, 1.0f,-1.0f); // Top Right Of The Quad (Top) + glVertex3f(-1.0f, 1.0f,-1.0f); // Top Left Of The Quad (Top) + glVertex3f(-1.0f, 1.0f, 1.0f); // Bottom Left Of The Quad (Top) + glVertex3f( 1.0f, 1.0f, 1.0f); // Bottom Right Of The Quad (Top) + glColor3f(1.0f,0.5f,0.0f); // Set The Color To Orange + glVertex3f( 1.0f,-1.0f, 1.0f); // Top Right Of The Quad (Bottom) + glVertex3f(-1.0f,-1.0f, 1.0f); // Top Left Of The Quad (Bottom) + glVertex3f(-1.0f,-1.0f,-1.0f); // Bottom Left Of The Quad (Bottom) + glVertex3f( 1.0f,-1.0f,-1.0f); // Bottom Right Of The Quad (Bottom) + glColor3f(1.0f,0.0f,0.0f); // Set The Color To Red + glVertex3f( 1.0f, 1.0f, 1.0f); // Top Right Of The Quad (Front) + glVertex3f(-1.0f, 1.0f, 1.0f); // Top Left Of The Quad (Front) + glVertex3f(-1.0f,-1.0f, 1.0f); // Bottom Left Of The Quad (Front) + glVertex3f( 1.0f,-1.0f, 1.0f); // Bottom Right Of The Quad (Front) + glColor3f(1.0f,1.0f,0.0f); // Set The Color To Yellow + glVertex3f( 1.0f,-1.0f,-1.0f); // Top Right Of The Quad (Back) + glVertex3f(-1.0f,-1.0f,-1.0f); // Top Left Of The Quad (Back) + glVertex3f(-1.0f, 1.0f,-1.0f); // Bottom Left Of The Quad (Back) + glVertex3f( 1.0f, 1.0f,-1.0f); // Bottom Right Of The Quad (Back) + glColor3f(0.0f,0.0f,1.0f); // Set The Color To Blue + glVertex3f(-1.0f, 1.0f, 1.0f); // Top Right Of The Quad (Left) + glVertex3f(-1.0f, 1.0f,-1.0f); // Top Left Of The Quad (Left) + glVertex3f(-1.0f,-1.0f,-1.0f); // Bottom Left Of The Quad (Left) + glVertex3f(-1.0f,-1.0f, 1.0f); // Bottom Right Of The Quad (Left) + glColor3f(1.0f,0.0f,1.0f); // Set The Color To Violet + glVertex3f( 1.0f, 1.0f,-1.0f); // Top Right Of The Quad (Right) + glVertex3f( 1.0f, 1.0f, 1.0f); // Top Left Of The Quad (Right) + glVertex3f( 1.0f,-1.0f, 1.0f); // Bottom Left Of The Quad (Right) + glVertex3f( 1.0f,-1.0f,-1.0f); // Bottom Right Of The Quad (Right) + glEnd(); // Done Drawing The Quad + + rtri+=0.2f; // Increase The Rotation Variable For The Triangle ( NEW ) + rquad-=0.15f; // Decrease The Rotation Variable For The Quad ( NEW ) +} Modified: tiki/examples/net/httpclient/src/main.cpp =================================================================== --- tiki/examples/net/httpclient/src/main.cpp 2007-10-25 23:42:44 UTC (rev 515) +++ tiki/examples/net/httpclient/src/main.cpp 2007-10-26 19:19:14 UTC (rev 516) @@ -59,7 +59,7 @@ console->setSize(640, 480); console->setTranslate( Vector( 320, 240, 0 ) ); #else - console->setSize(256, 192); + console->setSize(255, 191); console->setTranslate( Vector( 128, 96, 0 ) ); #endif console->setAutoWrap( true ); @@ -80,7 +80,7 @@ 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", + 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"); } Modified: tiki/include/Tiki/color.h =================================================================== --- tiki/include/Tiki/color.h 2007-10-25 23:42:44 UTC (rev 515) +++ tiki/include/Tiki/color.h 2007-10-26 19:19:14 UTC (rev 516) @@ -84,8 +84,7 @@ #if TIKI_PLAT != TIKI_NDS glColor4f( r, g, b, a ); #else - - glColor3f( r, g, b ); + glColor(pack1555(r, g, b, a)); #endif } @@ -96,6 +95,12 @@ ( ( ( int ) ( g * 255 ) ) << 8 ) | ( ( ( int ) ( b * 255 ) ) ); } + static uint32 pack1555( float a, float r, float g, float b ) { + return ( ( ( ( int ) ( a * 255 ) ) >> 7 ) << 8 ) | + ( ( ( ( int ) ( r * 255 ) ) >> 3 ) << 10 ) | + ( ( ( ( int ) ( g * 255 ) ) >> 3 ) << 5 ) | + ( ( ( ( int ) ( b * 255 ) ) >> 4 ) ); + } float a, r, g, b; }; Modified: tiki/src/gl/drawables/banner.cpp =================================================================== --- tiki/src/gl/drawables/banner.cpp 2007-10-25 23:42:44 UTC (rev 515) +++ tiki/src/gl/drawables/banner.cpp 2007-10-26 19:19:14 UTC (rev 516) @@ -70,38 +70,23 @@ const Vector & tv = getPosition(); - plx_vertex_t vert; - if (list == Trans) { - vert.argb = getColor(); - } else { - Color t = getColor(); t.a = 1.0f; - vert.argb = t; - } - vert.oargb = 0; + Color argb = getColor(); - vert.flags = PLX_VERT; - vert.x = tv.x-w/2; - vert.y = tv.y+h/2; - vert.z = tv.z; - vert.u = m_u1; - vert.v = m_v1; - plx_prim(&vert, sizeof(vert)); - - vert.y = tv.y-h/2; - vert.u = m_u2; - vert.v = m_v2; - plx_prim(&vert, sizeof(vert)); - - vert.x = tv.x+w/2; - vert.y = tv.y+h/2; - vert.u = m_u3; - vert.v = m_v3; - plx_prim(&vert, sizeof(vert)); - - vert.flags = PLX_VERT_EOS; - vert.y = tv.y-h/2; - vert.u = m_u4; - vert.v = m_v4; - plx_prim(&vert, sizeof(vert)); + if (list != Trans) { + argb.a = 1.0f; + } + + argb.select(); + + glBegin(GL_TRIANGLE_STRIP); + glTexCoord2f(m_u1, m_v1); + glVertex3f(tv.x - w/2, tv.y + h/2, tv.z); + glTexCoord2f(m_u2, m_v2); + glVertex3f(tv.x - w/2, tv.y - h/2, tv.z); + glTexCoord2f(m_u3, m_v3); + glVertex3f(tv.x + w/2, tv.y + h/2, tv.z); + glTexCoord2f(m_u4, m_v4); + glVertex3f(tv.x + w/2, tv.y - h/2, tv.z); + glEnd(); } Modified: tiki/src/gl/drawables/console.cpp =================================================================== --- tiki/src/gl/drawables/console.cpp 2007-10-25 23:42:44 UTC (rev 515) +++ tiki/src/gl/drawables/console.cpp 2007-10-26 19:19:14 UTC (rev 516) @@ -38,7 +38,6 @@ m_texture->select(); #if TIKI_PLAT != TIKI_DC && TIKI_PLAT != TIKI_NDS - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST ); #endif @@ -222,88 +221,46 @@ void ConsoleText::renderCharacter( float x, float y, float w, float h, unsigned char c, int attr ) { - plx_vertex_t vert; float u = static_cast<float>( ( c % 16 ) * 8 ); float v = static_cast<float>( ( c / 16 ) * 8 ); - int color = attr & 0x07; - const Vector & sv = getScale(); w *= sv.x; h *= sv.y; const Vector & tv = getPosition() + Vector( x, y, 0.01f ); - m_texture->select(); - + Color color = m_palette[BLACK]; if ( attr & HIGH_INTENSITY ) { - vert.argb = Color( 0.25, 0.25, 0.25 ); - //color -= 8; + color += Color( 0.25, 0.25, 0.25 ); } - else - { - vert.argb = Color( 0, 0, 0 ); - } - vert.argb += m_palette[ color ]; - vert.oargb = 0; - - vert.flags = PLX_VERT; - vert.x = tv.x - m_w / 2; - vert.y = tv.y + h - m_h / 2; - vert.z = tv.z; - vert.u = u / m_texture->getW(); - vert.v = ( v + 8 ) / m_texture->getH(); - plx_prim( &vert, sizeof( vert ) ); - - vert.y = tv.y - m_h / 2; - vert.u = u / m_texture->getH(); - vert.v = v / m_texture->getW(); - plx_prim( &vert, sizeof( vert ) ); - - vert.x = tv.x + w - m_w / 2; - vert.y = tv.y + h - m_h / 2; - vert.u = ( u + 8 ) / m_texture->getW(); - vert.v = ( v + 8 ) / m_texture->getH(); - plx_prim( &vert, sizeof( vert ) ); - - vert.flags = PLX_VERT_EOS; - vert.y = tv.y - m_h / 2; - vert.u = ( u + 8 ) / m_texture->getW(); - vert.v = v / m_texture->getH(); - plx_prim( &vert, sizeof( vert ) ); + color += m_palette[ attr & 0x07 ]; + color.select(); + + glTexCoord2f(u/m_texture->getW(), (v+8)/m_texture->getH()); + glVertex3f(tv.x - (m_w / 2), tv.y + h - (m_h / 2), tv.z); + glTexCoord2f(u/m_texture->getW(), v/m_texture->getH()); + glVertex3f(tv.x - (m_w / 2), tv.y - (m_h / 2), tv.z); + glTexCoord2f((u+8)/m_texture->getW(), v/m_texture->getH()); + glVertex3f(tv.x + w - (m_w / 2), tv.y - (m_h / 2), tv.z); + glTexCoord2f((u+8)/m_texture->getW(), (v+8)/m_texture->getH()); + glVertex3f(tv.x + w - (m_w / 2), tv.y + h - (m_h / 2), tv.z); } void ConsoleText::renderBackground( float x, float y, float w, float h, int color ) { - plx_vertex_t vert; const Vector & sv = getScale(); w *= sv.x; h *= sv.y; const Vector & tv = getPosition() + Vector( x, y, -0.01f ); - - m_texture->deselect(); - - vert.argb = m_palette[ color ]; - vert.oargb = 0; - - vert.flags = PLX_VERT; - vert.x = tv.x - m_w / 2; - vert.y = tv.y + h - m_h / 2; - vert.z = tv.z; - plx_prim( &vert, sizeof( vert ) ); - - vert.y = tv.y - m_h / 2; - plx_prim( &vert, sizeof( vert ) ); - - vert.x = tv.x + w - m_w / 2; - vert.y = tv.y + h - m_h / 2; - plx_prim( &vert, sizeof( vert ) ); - - vert.flags = PLX_VERT_EOS; - vert.y = tv.y - m_h / 2; - plx_prim( &vert, sizeof( vert ) ); + m_palette[ color ].select(); + + glVertex3f(tv.x - (m_w / 2), tv.y + h - (m_h / 2), tv.z); + glVertex3f(tv.x - (m_w / 2), tv.y - (m_h / 2), tv.z); + glVertex3f(tv.x + w - (m_w / 2), tv.y - (m_h / 2), tv.z); + glVertex3f(tv.x + w - (m_w / 2), tv.y + h - (m_h / 2), tv.z); } void ConsoleText::draw( ObjType list ) @@ -313,23 +270,33 @@ float y_step = ( m_h / m_rows ); #if TIKI_PLAT != TIKI_NDS - glDisable( GL_DEPTH_TEST ); #endif - - for ( y = 0; y < m_rows; y++ ) - { - for ( x = 0; x < m_cols; x++ ) + if ( list == Trans ) + { //Characters! + m_texture->select(); + glBegin(GL_QUADS); + for ( y = 0; y < m_rows; y++ ) { - if ( list == Trans ) - { //Characters! + for ( x = 0; x < m_cols; x++ ) + { renderCharacter( x * x_step, y * y_step, x_step, y_step, m_charData[ y * ( m_cols ) + x ], m_colorData[ y * ( m_cols ) + x ] ); } - else - { //Background blocks! + } + glEnd(); + } + else + { //Background blocks! + m_texture->deselect(); + glBegin(GL_QUADS); + for ( y = 0; y < m_rows; y++ ) + { + for ( x = 0; x < m_cols; x++ ) + { renderBackground( x * x_step, y * y_step, x_step, y_step, ( m_colorData[ y * ( m_cols ) + x ] >> 8 ) & 0x07 ); } } + glEnd(); } } Modified: tiki/src/gl/drawables/pointerArrow.cpp =================================================================== --- tiki/src/gl/drawables/pointerArrow.cpp 2007-10-25 23:42:44 UTC (rev 515) +++ tiki/src/gl/drawables/pointerArrow.cpp 2007-10-26 19:19:14 UTC (rev 516) @@ -29,40 +29,20 @@ Texture::deselect(); if(list==Trans) { - vert.argb = Color(0,0,0); - vert.z = tv.z; + Color black = Color(0,0,0); + black.select(); - vert.flags = PLX_VERT; - vert.x = tv.x-2; - vert.y = tv.y-4; - plx_prim(&vert, sizeof(vert)); + glBegin(GL_TRIANGLE_STRIP); + glVertex3f(tv.x - 2, tv.y - 4, tv.z); + glVertex3f(tv.x + 18, tv.y + 16, tv.z); + glVertex3f(tv.x - 2, tv.y + 24, tv.z); + glEnd(); - vert.flags = PLX_VERT; - vert.x = tv.x+18; - vert.y = tv.y+16; - plx_prim(&vert, sizeof(vert)); - - vert.flags = PLX_VERT_EOS; - vert.x = tv.x-2; - vert.y = tv.y+24; - plx_prim(&vert, sizeof(vert)); - - vert.argb = getTint(); - vert.z = tv.z + 0.01f; - - vert.flags = PLX_VERT; - vert.x = tv.x; - vert.y = tv.y; - plx_prim(&vert, sizeof(vert)); - - vert.flags = PLX_VERT; - vert.x = tv.x+15; - vert.y = tv.y+15; - plx_prim(&vert, sizeof(vert)); - - vert.flags = PLX_VERT_EOS; - vert.x = tv.x; - vert.y = tv.y+21; - plx_prim(&vert, sizeof(vert)); + getTint().select(); + glBegin(GL_TRIANGLE_STRIP); + glVertex3f(tv.x, tv.y, tv.z + 0.01f); + glVertex3f(tv.x + 15, tv.y + 15, tv.z + 0.01f); + glVertex3f(tv.x, tv.y + 21, tv.z + 0.01f); + glEnd(); } } Modified: tiki/src/gl/gl.cpp =================================================================== --- tiki/src/gl/gl.cpp 2007-10-25 23:42:44 UTC (rev 515) +++ tiki/src/gl/gl.cpp 2007-10-26 19:19:14 UTC (rev 516) @@ -37,11 +37,9 @@ glDepthMask( GL_TRUE ); glShadeModel( GL_SMOOTH ); glDisable( GL_CULL_FACE ); -#endif set2d(); -#if TIKI_PLAT != TIKI_NDS glViewport( 0, 0, 640, 480 ); glClearDepth( 0.0f ); #if TIKI_PLAT != TIKI_DC @@ -51,13 +49,12 @@ #endif #else // TIKI_NDS - //glViewport( 0, 0, 255, 191 ); - //glClearDepth( 0x7FFFF ); - //glClearColor( 0, 0, 0, 31 ); + + // the DS is not happy in ortho mode, so force back to 3d + set3d(); #endif - glLoadIdentity(); - + glLoadIdentity(); transDisable(); } @@ -67,7 +64,7 @@ #if TIKI_PLAT != TIKI_NDS glOrtho( 0, 640, 480, 0, 1.0f, -1.0f ); #else - glOrtho( 0, 256, 192, 0, 0.1f, 100.0f ); + glOrtho( 0, 256, 192, 0, 0.1f, 100.0f ); #endif glMatrixMode( GL_MODELVIEW ); } @@ -98,6 +95,8 @@ #endif glEnable( GL_BLEND ); glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); +#else // TIKI_NDS + glPolyFmt(POLY_ALPHA(31) | POLY_CULL_NONE); #endif } @@ -105,6 +104,8 @@ // glEnable(GL_DEPTH_TEST); #if TIKI_PLAT != TIKI_NDS glDisable( GL_BLEND ); +#else + glPolyFmt(POLY_ALPHA(0) | POLY_CULL_NONE); #endif } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |