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
(26) |
Aug
(48) |
Sep
(30) |
Oct
(8) |
Nov
(9) |
Dec
|
|
From: <at...@us...> - 2007-08-09 22:51:40
|
Revision: 436
http://cadcdev.svn.sourceforge.net/cadcdev/?rev=436&view=rev
Author: atani
Date: 2007-08-09 15:51:20 -0700 (Thu, 09 Aug 2007)
Log Message:
-----------
astyle --style=kr -t -P -K -a
Modified Paths:
--------------
tiki/examples/TikiTest/TikiTest_Prefix.pch
tiki/examples/TikiTest/src/Controller.h
tiki/examples/TikiTest/src/TikiTest.cpp
tiki/examples/TikiTest/src/test.cpp
tiki/examples/TikiTest/src/testobj.cpp
tiki/examples/TikiTest/src/testobj.h
tiki/examples/console/TikiSnake/TikiSnake_Prefix.pch
tiki/examples/console/TikiSnake/src/Controller.h
tiki/examples/console/TikiSnake/src/TikiSnake.cpp
tiki/examples/console/TikiSnake/src/snake.cpp
Modified: tiki/examples/TikiTest/TikiTest_Prefix.pch
===================================================================
--- tiki/examples/TikiTest/TikiTest_Prefix.pch 2007-08-09 22:48:59 UTC (rev 435)
+++ tiki/examples/TikiTest/TikiTest_Prefix.pch 2007-08-09 22:51:20 UTC (rev 436)
@@ -3,5 +3,5 @@
//
#ifdef __OBJC__
- #import <Cocoa/Cocoa.h>
+ #import <Cocoa/Cocoa.h>
#endif
Modified: tiki/examples/TikiTest/src/Controller.h
===================================================================
--- tiki/examples/TikiTest/src/Controller.h 2007-08-09 22:48:59 UTC (rev 435)
+++ tiki/examples/TikiTest/src/Controller.h 2007-08-09 22:51:20 UTC (rev 436)
@@ -3,12 +3,11 @@
#import <Cocoa/Cocoa.h>
#import <Tiki/TikiMain.h>
-@interface Controller : NSObject
-{
+@interface Controller : NSObject {
IBOutlet NSView *mainView;
IBOutlet NSWindow *mainWindow;
-
+
TikiMain * tm;
- NSString * openFileName;
+ NSString * openFileName;
}
@end
Modified: tiki/examples/TikiTest/src/TikiTest.cpp
===================================================================
--- tiki/examples/TikiTest/src/TikiTest.cpp 2007-08-09 22:48:59 UTC (rev 435)
+++ tiki/examples/TikiTest/src/TikiTest.cpp 2007-08-09 22:51:20 UTC (rev 436)
@@ -1,10 +1,10 @@
/*
- * TikiTest.cpp
- * TikiTest
- *
- * Copyright 2005 Cryptic Allusion, LLC. All rights reserved.
- *
- */
+* TikiTest.cpp
+* TikiTest
+*
+* Copyright 2005 Cryptic Allusion, LLC. All rights reserved.
+*
+*/
#include <Tiki/tiki.h>
#include <pch.h>
@@ -13,15 +13,16 @@
#include <windows.h>
static char szAppName[] = "TikiTest";
-int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
+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[])
+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);
+ return tiki_main( argc, argv );
#else
- return Tiki::DoMain(szAppName, hInst, hPrevInstance, lpCmdLine, nCmdShow);
+
+ return Tiki::DoMain( szAppName, hInst, hPrevInstance, lpCmdLine, nCmdShow );
#endif
}
Modified: tiki/examples/TikiTest/src/test.cpp
===================================================================
--- tiki/examples/TikiTest/src/test.cpp 2007-08-09 22:48:59 UTC (rev 435)
+++ tiki/examples/TikiTest/src/test.cpp 2007-08-09 22:51:20 UTC (rev 436)
@@ -1,11 +1,11 @@
/*
- * test.cpp
- * TikiTest
- *
- * Created by Dan Potter on 1/11/05.
- * Copyright 2005 Cryptic Allusion, LLC. All rights reserved.
- *
- */
+* test.cpp
+* TikiTest
+*
+* Created by Dan Potter on 1/11/05.
+* Copyright 2005 Cryptic Allusion, LLC. All rights reserved.
+*
+*/
#include <Tiki/tiki.h>
#include <Tiki/plxcompat.h>
@@ -22,10 +22,10 @@
using namespace Tiki::Audio::OggVorbis;
/*
-
+
This is a Parallax version of the "bubbles" KGL demo. The speed is about
the same, but it uses the Parallax functions instead of KGL.
-
+
*/
struct mouse_pos_t {
@@ -34,56 +34,56 @@
int valid;
};
-volatile mouse_pos_t mp[4]; //Woah, 4 mice!
+volatile mouse_pos_t mp[ 4 ]; //Woah, 4 mice!
//Draw the mouse pointer, parallax-style!
-void draw_mouse(volatile mouse_pos_t *pos) {
+void draw_mouse( volatile mouse_pos_t *pos ) {
plx_vertex_t vert;
plx_mat3d_identity();
- vert.argb = Color(0, 0, 0);
+ vert.argb = Color( 0, 0, 0 );
vert.z = 0.3f;
vert.flags = PLX_VERT;
- vert.x = static_cast<float>(pos->x - 2);
- vert.y = static_cast<float>(pos->y - 4);
- plx_prim(&vert, sizeof(vert));
+ vert.x = static_cast<float>( pos->x - 2 );
+ vert.y = static_cast<float>( pos->y - 4 );
+ plx_prim( &vert, sizeof( vert ) );
vert.flags = PLX_VERT;
- vert.x = static_cast<float>(pos->x + 18);
- vert.y = static_cast<float>(pos->y + 16);
- plx_prim(&vert, sizeof(vert));
+ vert.x = static_cast<float>( pos->x + 18 );
+ vert.y = static_cast<float>( pos->y + 16 );
+ plx_prim( &vert, sizeof( vert ) );
vert.flags = PLX_VERT_EOS;
- vert.x = static_cast<float>(pos->x - 2);
- vert.y = static_cast<float>(pos->y + 24);
- plx_prim(&vert, sizeof(vert));
+ vert.x = static_cast<float>( pos->x - 2 );
+ vert.y = static_cast<float>( pos->y + 24 );
+ plx_prim( &vert, sizeof( vert ) );
- vert.argb = Color(0.8f, 0.2f, 0.1f);
+ vert.argb = Color( 0.8f, 0.2f, 0.1f );
vert.z = 0.31f;
vert.flags = PLX_VERT;
- vert.x = static_cast<float>(pos->x);
- vert.y = static_cast<float>(pos->y);
- plx_prim(&vert, sizeof(vert));
+ vert.x = static_cast<float>( pos->x );
+ vert.y = static_cast<float>( pos->y );
+ plx_prim( &vert, sizeof( vert ) );
vert.flags = PLX_VERT;
- vert.x = static_cast<float>(pos->x + 15);
- vert.y = static_cast<float>(pos->y + 15);
- plx_prim(&vert, sizeof(vert));
+ vert.x = static_cast<float>( pos->x + 15 );
+ vert.y = static_cast<float>( pos->y + 15 );
+ plx_prim( &vert, sizeof( vert ) );
vert.flags = PLX_VERT_EOS;
- vert.x = static_cast<float>(pos->x);
- vert.y = static_cast<float>(pos->y + 21);
- plx_prim(&vert, sizeof(vert));
+ vert.x = static_cast<float>( pos->x );
+ vert.y = static_cast<float>( pos->y + 21 );
+ plx_prim( &vert, sizeof( vert ) );
}
/* Draws a sphere out of GL_QUADS according to the syntax of glutSolidSphere
-
+
This now uses triangle strips and PVR Direct Rendering for the best
possible performance.
-
+
Based very loosely on a routine from James Susinno.
*/
static float phase = 0.0f;
@@ -98,51 +98,51 @@
/* Initialize xmtrx with the values from KGL */
plx_mat_identity();
- plx_mat3d_apply(PLX_MAT_SCREENVIEW);
- plx_mat3d_apply(PLX_MAT_PROJECTION);
- plx_mat3d_apply(PLX_MAT_MODELVIEW);
+ plx_mat3d_apply( PLX_MAT_SCREENVIEW );
+ plx_mat3d_apply( PLX_MAT_PROJECTION );
+ plx_mat3d_apply( PLX_MAT_MODELVIEW );
/* Put our own polygon header */
// pvr_prim(&hdr, sizeof(hdr));
/* Iterate over stacks */
- for ( i=0; i<stacks; i++ ) {
- pitch = static_cast<float>(2*M_PI * ( (float)i/(float)stacks ));
- pitch2 = static_cast<float>(2*M_PI * ( (float)(i+1)/(float)stacks ));
+ for ( i = 0; i < stacks; i++ ) {
+ pitch = static_cast<float>( 2 * M_PI * ( ( float ) i / ( float ) stacks ) );
+ pitch2 = static_cast<float>( 2 * M_PI * ( ( float ) ( i + 1 ) / ( float ) stacks ) );
/* Iterate over slices: each entire stack will be one
long triangle strip. */
- for ( j=0; j<=slices/2; j++ ) {
- yaw = static_cast<float>(2*M_PI * ( (float)j/(float)slices ));
- yaw2 = static_cast<float>(2*M_PI * ( (float)(j+1)/(float)slices ));
+ for ( j = 0; j <= slices / 2; j++ ) {
+ yaw = static_cast<float>( 2 * M_PI * ( ( float ) j / ( float ) slices ) );
+ yaw2 = static_cast<float>( 2 * M_PI * ( ( float ) ( j + 1 ) / ( float ) slices ) );
/* x, y+1 */
x = radius * fcos( yaw ) * fcos( pitch2 );
y = radius * fsin( pitch2 );
z = radius * fsin( yaw ) * fcos( pitch2 );
- plx_mat_tfip_3d(x, y, z); /* Use ftrv to transform */
- g = fcos( yaw*2 ) / 2.0f + 0.5f;
+ plx_mat_tfip_3d( x, y, z ); /* Use ftrv to transform */
+ g = fcos( yaw * 2 ) / 2.0f + 0.5f;
b = fsin( phase + pitch2 ) / 2.0f + 0.5f;
- plx_vert_fnd(&dr_state, PLX_VERT,
- x, y, z, 1.0f,
- 0.0f, g, b);
+ plx_vert_fnd( &dr_state, PLX_VERT,
+ x, y, z, 1.0f,
+ 0.0f, g, b );
/* x, y */
x = radius * fcos( yaw ) * fcos( pitch );
y = radius * fsin( pitch );
z = radius * fsin( yaw ) * fcos( pitch );
- plx_mat_tfip_3d(x, y, z);
- g = fcos( yaw*2 ) / 2.0f + 0.5f;
+ plx_mat_tfip_3d( x, y, z );
+ g = fcos( yaw * 2 ) / 2.0f + 0.5f;
b = fsin( phase + pitch ) / 2.0f + 0.5f;
- if (j == (slices/2)) {
- plx_vert_fnd(&dr_state, PLX_VERT_EOS,
- x, y, z, 1.0f,
- 0.0f, g, b);
+ if ( j == ( slices / 2 ) ) {
+ plx_vert_fnd( &dr_state, PLX_VERT_EOS,
+ x, y, z, 1.0f,
+ 0.0f, g, b );
} else {
- plx_vert_fnd(&dr_state, PLX_VERT,
- x, y, z, 1.0f,
- 0.0f, g, b);
+ plx_vert_fnd( &dr_state, PLX_VERT,
+ x, y, z, 1.0f,
+ 0.0f, g, b );
}
}
}
@@ -154,116 +154,115 @@
static void sphere_frame_opaque() {
int i;
-// vid_border_color(255, 0, 0);
+ // vid_border_color(255, 0, 0);
Frame::begin();
-// vid_border_color(0, 255, 0);
+ // vid_border_color(0, 255, 0);
//Draw the mice
- for (i=0; i<4; i++) {
- if(mp[i].valid) {
- draw_mouse(&mp[i]);
+ for ( i = 0; i < 4; i++ ) {
+ if ( mp[ i ].valid ) {
+ draw_mouse( &mp[ i ] );
}
}
plx_mat3d_identity();
- plx_mat3d_translate(0.0f, 0.0f, -12.0f);
- plx_mat3d_rotate(r * 2, 0.75f, 1.0f, 0.5f);
+ plx_mat3d_translate( 0.0f, 0.0f, -12.0f );
+ plx_mat3d_rotate( r * 2, 0.75f, 1.0f, 0.5f );
plx_mat3d_push();
- for (i=0; i<SPHERE_CNT; i++) {
- plx_mat3d_translate(6.0f * fcos(static_cast<float>(i * 2*M_PI / SPHERE_CNT)), 0.0f, 6.0f * fsin(static_cast<float>(i * 2*M_PI / SPHERE_CNT)));
- plx_mat3d_rotate(r, 1.0f, 1.0f, 1.0f);
- sphere(1.2f, 20, 20);
- if (i < (SPHERE_CNT-1))
+ for ( i = 0; i < SPHERE_CNT; i++ ) {
+ plx_mat3d_translate( 6.0f * fcos( static_cast<float>( i * 2 * M_PI / SPHERE_CNT ) ), 0.0f, 6.0f * fsin( static_cast<float>( i * 2 * M_PI / SPHERE_CNT ) ) );
+ plx_mat3d_rotate( r, 1.0f, 1.0f, 1.0f );
+ sphere( 1.2f, 20, 20 );
+ if ( i < ( SPHERE_CNT - 1 ) )
plx_mat3d_peek();
}
plx_mat3d_pop();
plx_mat3d_identity();
- plx_mat3d_translate(0.0f, 0.0f, -12.0f);
- plx_mat3d_rotate(-r * 2, 0.75f, 1.0f, 0.5f);
+ plx_mat3d_translate( 0.0f, 0.0f, -12.0f );
+ plx_mat3d_rotate( -r * 2, 0.75f, 1.0f, 0.5f );
plx_mat3d_push();
- for (i=0; i<SPHERE_CNT; i++) {
- plx_mat3d_translate(3.0f * fcos(static_cast<float>(i * 2*M_PI / SPHERE_CNT)), 0.0f, 3.0f * fsin(static_cast<float>(i * 2*M_PI / SPHERE_CNT)));
- plx_mat3d_rotate(r, 1.0f, 1.0f, 1.0f);
- sphere(0.8f, 20, 20);
- if (i < (SPHERE_CNT-1))
+ for ( i = 0; i < SPHERE_CNT; i++ ) {
+ plx_mat3d_translate( 3.0f * fcos( static_cast<float>( i * 2 * M_PI / SPHERE_CNT ) ), 0.0f, 3.0f * fsin( static_cast<float>( i * 2 * M_PI / SPHERE_CNT ) ) );
+ plx_mat3d_rotate( r, 1.0f, 1.0f, 1.0f );
+ sphere( 0.8f, 20, 20 );
+ if ( i < ( SPHERE_CNT - 1 ) )
plx_mat3d_peek();
}
plx_mat3d_pop();
-// vid_border_color(0, 0, 255);
+ // vid_border_color(0, 0, 255);
Frame::finish();
- r+=dir;
- phase += static_cast<float>(2*M_PI / 240);
+ r += dir;
+ phase += static_cast<float>( 2 * M_PI / 240 );
}
volatile bool quitting = false;
-void tkCallback(const Hid::Event & evt, void * data) {
- if (evt.type == Hid::Event::EvtQuit) {
+void tkCallback( const Hid::Event & evt, void * data ) {
+ if ( evt.type == Hid::Event::EvtQuit ) {
quitting = true;
- } else if (evt.type == Event::EvtKeypress || (evt.type == Event::EvtBtnRelease && evt.btn == Event::MouseLeftBtn)) {
+ } else if ( evt.type == Event::EvtKeypress || ( evt.type == Event::EvtBtnRelease && evt.btn == Event::MouseLeftBtn ) ) {
dir = -dir;
}
int port = evt.port;
- if(evt.port < 0 && evt.port > 4) {
+ if ( evt.port < 0 && evt.port > 4 ) {
port = 0;
}
- if (evt.type == Event::EvtAttach) {
- printf("Device attached: %s\n",evt.dev->getName().c_str());
- if(evt.dev->getType() == Device::TypeMouse) {
- mp[port].valid=1;
- mp[port].x=320;
- mp[port].y=240;
+ if ( evt.type == Event::EvtAttach ) {
+ printf( "Device attached: %s\n", evt.dev->getName().c_str() );
+ if ( evt.dev->getType() == Device::TypeMouse ) {
+ mp[ port ].valid = 1;
+ mp[ port ].x = 320;
+ mp[ port ].y = 240;
}
}
- if (evt.type == Event::EvtDetach) {
- printf("Device detached: %s\n",evt.dev->getName().c_str());
- mp[port].valid=0;
+ if ( evt.type == Event::EvtDetach ) {
+ printf( "Device detached: %s\n", evt.dev->getName().c_str() );
+ mp[ port ].valid = 0;
}
- if (evt.type == Event::EvtMouseMove) {
- mp[port].x=evt.x;
- mp[port].y=evt.y;
+ if ( evt.type == Event::EvtMouseMove ) {
+ mp[ port ].x = evt.x;
+ mp[ port ].y = evt.y;
}
}
-extern "C" int tiki_main(int argc, char **argv) {
+extern "C" int tiki_main( int argc, char **argv ) {
// Init Tiki
- if(!Tiki::init(argc, argv))
- {
- exit(-1);
+ if ( !Tiki::init( argc, argv ) ) {
+ exit( -1 );
}
- Tiki::setName("TikiTest", NULL);
- Tiki::GL::showCursor(false);
- Hid::callbackReg(tkCallback, NULL);
+ Tiki::setName( "TikiTest", NULL );
+ Tiki::GL::showCursor( false );
+ Hid::callbackReg( tkCallback, NULL );
- Debug::printf("argc: %i\n", argc);
- for(int i=0; i<argc; i++) {
- Debug::printf("argv[%i]: %s\n",i,argv[i]);
+ Debug::printf( "argc: %i\n", argc );
+ for ( int i = 0; i < argc; i++ ) {
+ Debug::printf( "argv[%i]: %s\n", i, argv[ i ] );
}
-
+
#if TIKI_PLAT != TIKI_DC
//Attach events happen before we start :(
- mp[0].valid=1;
- mp[0].x=320;
- mp[0].y=240;
+ mp[ 0 ].valid = 1;
+ mp[ 0 ].x = 320;
+ mp[ 0 ].y = 240;
#endif
- 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);
+ 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 );
- plx_mat3d_mode(PLX_MAT_PROJECTION);
+ plx_mat3d_mode( PLX_MAT_PROJECTION );
plx_mat3d_identity();
- plx_mat3d_perspective(45.0f, 640.0f / 480.0f, 0.1f, 100.0f);
- plx_mat3d_mode(PLX_MAT_MODELVIEW);
+ plx_mat3d_perspective( 45.0f, 640.0f / 480.0f, 0.1f, 100.0f );
+ plx_mat3d_mode( PLX_MAT_MODELVIEW );
- while (!quitting)
+ while ( !quitting )
sphere_frame_opaque();
// Shut down Tiki
Modified: tiki/examples/TikiTest/src/testobj.cpp
===================================================================
--- tiki/examples/TikiTest/src/testobj.cpp 2007-08-09 22:48:59 UTC (rev 435)
+++ tiki/examples/TikiTest/src/testobj.cpp 2007-08-09 22:51:20 UTC (rev 436)
@@ -1,9 +1,9 @@
/*
- Tiki
+ Tiki
- object.cpp
+ object.cpp
- Copyright (C)2005 Cryptic Allusion, LLC
+ Copyright (C)2005 Cryptic Allusion, LLC
*/
#include <Tiki/tiki.h>
@@ -14,35 +14,34 @@
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)
+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());
+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);
+
+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::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);
+
+int TestObject::testEvent( Object * sender, Object * arg ) {
+ Debug::printf( "TestObject(%s)::testEvent(%p, %p)\n", m_name.c_str(), sender, arg );
return 0;
}
Modified: tiki/examples/TikiTest/src/testobj.h
===================================================================
--- tiki/examples/TikiTest/src/testobj.h 2007-08-09 22:48:59 UTC (rev 435)
+++ tiki/examples/TikiTest/src/testobj.h 2007-08-09 22:51:20 UTC (rev 436)
@@ -6,15 +6,15 @@
class TestObject : public Tiki::Object {
public:
- TestObject(std::string name);
+ TestObject( std::string name );
virtual ~TestObject();
- int testMessage(Object * sender, Object * arg);
- int anotherMessage(Object * sender, Object * arg);
- int testEvent(Object * sender, Object * arg);
+ int testMessage( Object * sender, Object * arg );
+ int anotherMessage( Object * sender, Object * arg );
+ int testEvent( Object * sender, Object * arg );
protected:
- TIKI_OBJECT_DECLS(TestObject)
-
+ TIKI_OBJECT_DECLS( TestObject )
+
std::string m_name;
};
Modified: tiki/examples/console/TikiSnake/TikiSnake_Prefix.pch
===================================================================
--- tiki/examples/console/TikiSnake/TikiSnake_Prefix.pch 2007-08-09 22:48:59 UTC (rev 435)
+++ tiki/examples/console/TikiSnake/TikiSnake_Prefix.pch 2007-08-09 22:51:20 UTC (rev 436)
@@ -3,5 +3,5 @@
//
#ifdef __OBJC__
- #import <Cocoa/Cocoa.h>
+ #import <Cocoa/Cocoa.h>
#endif
Modified: tiki/examples/console/TikiSnake/src/Controller.h
===================================================================
--- tiki/examples/console/TikiSnake/src/Controller.h 2007-08-09 22:48:59 UTC (rev 435)
+++ tiki/examples/console/TikiSnake/src/Controller.h 2007-08-09 22:51:20 UTC (rev 436)
@@ -3,11 +3,10 @@
#import <Cocoa/Cocoa.h>
#import <Tiki/TikiMain.h>
-@interface Controller : NSObject
-{
+@interface Controller : NSObject {
IBOutlet NSView *mainView;
IBOutlet NSWindow *mainWindow;
-
+
TikiMain * tm;
}
@end
Modified: tiki/examples/console/TikiSnake/src/TikiSnake.cpp
===================================================================
--- tiki/examples/console/TikiSnake/src/TikiSnake.cpp 2007-08-09 22:48:59 UTC (rev 435)
+++ tiki/examples/console/TikiSnake/src/TikiSnake.cpp 2007-08-09 22:51:20 UTC (rev 436)
@@ -1,10 +1,10 @@
/*
- * TikiSnake.cpp
- * TikiSnake
- *
- * Copyright 2006 Sam Steele. All rights reserved.
- *
- */
+* TikiSnake.cpp
+* TikiSnake
+*
+* Copyright 2006 Sam Steele. All rights reserved.
+*
+*/
#include <Tiki/tiki.h>
@@ -13,15 +13,16 @@
#include "pch.h"
static char szAppName[] = "TikiSnake";
-int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
+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[])
+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);
+ return tiki_main( argc, argv );
#else
- return Tiki::DoMain(szAppName, hInst, hPrevInstance, lpCmdLine, nCmdShow);
+
+ return Tiki::DoMain( szAppName, hInst, hPrevInstance, lpCmdLine, nCmdShow );
#endif
}
Modified: tiki/examples/console/TikiSnake/src/snake.cpp
===================================================================
--- tiki/examples/console/TikiSnake/src/snake.cpp 2007-08-09 22:48:59 UTC (rev 435)
+++ tiki/examples/console/TikiSnake/src/snake.cpp 2007-08-09 22:51:20 UTC (rev 436)
@@ -1,10 +1,10 @@
/*
- * snake.cpp
- * TikiSnake - a Tiki version of the classic snake game
- *
- * Copyright (C)2006 Sam Steele
- *
- */
+* snake.cpp
+* TikiSnake - a Tiki version of the classic snake game
+*
+* Copyright (C)2006 Sam Steele
+*
+*/
#include <Tiki/tiki.h>
#include <Tiki/plxcompat.h>
@@ -20,182 +20,192 @@
#define BOARD_X 77
#define BOARD_Y 20
-int board[BOARD_X][BOARD_Y];
+int board[ BOARD_X ][ BOARD_Y ];
-int sx=3,sy=3,sdx=1,sdy=0,ssize=3;
-int sscore=0,slives=3;
+int sx = 3, sy = 3, sdx = 1, sdy = 0, ssize = 3;
+int sscore = 0, slives = 3;
volatile bool quitting = false;
-void tkCallback(const Hid::Event & evt, void * data) {
- if (evt.type == Hid::Event::EvtQuit) {
+void tkCallback( const Hid::Event & evt, void * data ) {
+ if ( evt.type == Hid::Event::EvtQuit ) {
quitting = true;
- } else if (evt.type == Hid::Event::EvtKeypress) {
- switch(evt.key) {
+ } else if ( evt.type == Hid::Event::EvtKeypress ) {
+ switch ( evt.key ) {
case 27:
- quitting = true;
- break;
+ quitting = true;
+ break;
case Event::KeyUp:
- sdx = 0;
- sdy = -1;
- break;
+ sdx = 0;
+ sdy = -1;
+ break;
case Event::KeyDown:
- sdx = 0;
- sdy = 1;
- break;
+ sdx = 0;
+ sdy = 1;
+ break;
case Event::KeyLeft:
- sdx = -1;
- sdy = 0;
- break;
+ sdx = -1;
+ sdy = 0;
+ break;
case Event::KeyRight:
- sdx = 1;
- sdy = 0;
- break;
+ sdx = 1;
+ sdy = 0;
+ break;
}
}
}
-extern "C" int tiki_main(int argc, char **argv) {
- int x,y;
- bool go=1;
- bool dead=0;
-
+extern "C" int tiki_main( int argc, char **argv ) {
+ int x, y;
+ bool go = 1;
+ bool dead = 0;
+
//srand(time(NULL));
-
+
// Init Tiki
- if(!Tiki::init(argc, argv))
- {
- exit(-1);
+ if ( !Tiki::init( argc, argv ) ) {
+ exit( -1 );
}
- Tiki::setName("SnakeyGame", NULL);
- Hid::callbackReg(tkCallback, NULL);
+ Tiki::setName( "SnakeyGame", NULL );
+ Hid::callbackReg( tkCallback, NULL );
- //initialize the screen
- ConsoleText *ct = new ConsoleText(80,25,new Texture("pc-ascii.png", true));
-
- ct->setSize(640,480);
- ct->translate(Vector(320,240,0));
- ct->setAutoScroll(0);
- ct->setAutoWrap(0);
+ //initialize the screen
+ ConsoleText *ct = new ConsoleText( 80, 25, new Texture( "pc-ascii.png", true ) );
+ ct->setSize( 640, 480 );
+ ct->translate( Vector( 320, 240, 0 ) );
+ ct->setAutoScroll( 0 );
+ ct->setAutoWrap( 0 );
+
//initialize the board
- for(x=0;x<BOARD_X;x++) {
- for(y=0;y<BOARD_Y;y++) {
- board[x][y]=0;
+ for ( x = 0;x < BOARD_X;x++ ) {
+ for ( y = 0;y < BOARD_Y;y++ ) {
+ board[ x ][ y ] = 0;
}
}
-
+
//place an item
do {
- x=rand()%BOARD_X; y=rand()%BOARD_Y;
- } while(board[x][y]!=0);
- board[x][y]=999;
-
- while(!quitting) {
+ x = rand() % BOARD_X;
+ y = rand() % BOARD_Y;
+ } while ( board[ x ][ y ] != 0 );
+ board[ x ][ y ] = 999;
+
+ while ( !quitting ) {
//move head
- if(!dead) {
- sx+=sdx;
- sy+=sdy;
+ if ( !dead ) {
+ sx += sdx;
+ sy += sdy;
}
//check bounds
- if(sx>=BOARD_X || sx<0 || sy>=BOARD_Y || sy<0) {
- slives--;
- ssize=3;
- for(x=0;x<BOARD_X;x++) {
- for(y=0;y<BOARD_Y;y++) {
- board[x][y]=0;
+ if ( sx >= BOARD_X || sx < 0 || sy >= BOARD_Y || sy < 0 ) {
+ slives--;
+ ssize = 3;
+ for ( x = 0;x < BOARD_X;x++ ) {
+ for ( y = 0;y < BOARD_Y;y++ ) {
+ board[ x ][ y ] = 0;
}
}
- sx=rand()%BOARD_X;
- sy=rand()%BOARD_Y;
+ sx = rand() % BOARD_X;
+ sy = rand() % BOARD_Y;
do { //place a new item in an empty spot
- x=rand()%BOARD_X; y=rand()%BOARD_Y;
- } while(board[x][y]!=0);
- board[x][y]=999;
+ x = rand() % BOARD_X;
+ y = rand() % BOARD_Y;
+ } while ( board[ x ][ y ] != 0 );
+ board[ x ][ y ] = 999;
}
-
+
//check collisions
- if(board[sx][sy]>0) {
- if(board[sx][sy]==999) { //item
- ssize+=2; //increment snake size
+ if ( board[ sx ][ sy ] > 0 ) {
+ if ( board[ sx ][ sy ] == 999 ) { //item
+ ssize += 2; //increment snake size
sscore++; //and score
do { //place a new item in an empty spot
- x=rand()%BOARD_X; y=rand()%BOARD_Y;
- } while(board[x][y]!=0);
- board[x][y]=999;
+ x = rand() % BOARD_X;
+ y = rand() % BOARD_Y;
+ } while ( board[ x ][ y ] != 0 );
+ board[ x ][ y ] = 999;
//make the stretch work correctly
- for(x=0;x<BOARD_X;x++) {
- for(y=0;y<BOARD_Y;y++) {
- if(board[x][y]>0&&board[x][y]!=999) board[x][y]+=2;
+ for ( x = 0;x < BOARD_X;x++ ) {
+ for ( y = 0;y < BOARD_Y;y++ ) {
+ if ( board[ x ][ y ] > 0 && board[ x ][ y ] != 999 )
+ board[ x ][ y ] += 2;
}
}
} else { //snake
- slives--;
- ssize=3;
- for(x=0;x<BOARD_X;x++) {
- for(y=0;y<BOARD_Y;y++) {
- board[x][y]=0;
+ slives--;
+ ssize = 3;
+ for ( x = 0;x < BOARD_X;x++ ) {
+ for ( y = 0;y < BOARD_Y;y++ ) {
+ board[ x ][ y ] = 0;
}
}
- sx=rand()%BOARD_X;
- sy=rand()%BOARD_Y;
+ sx = rand() % BOARD_X;
+ sy = rand() % BOARD_Y;
}
}
- if(slives<=0) dead=1;
- board[sx][sy]=ssize+1;
-
+ if ( slives <= 0 )
+ dead = 1;
+ board[ sx ][ sy ] = ssize + 1;
+
//decrement the array (simulates motion)
- for(x=0;x<BOARD_X;x++) {
- for(y=0;y<BOARD_Y;y++) {
- if(board[x][y]>0&&board[x][y]!=999) board[x][y]--;
+ for ( x = 0;x < BOARD_X;x++ ) {
+ for ( y = 0;y < BOARD_Y;y++ ) {
+ if ( board[ x ][ y ] > 0 && board[ x ][ y ] != 999 )
+ board[ x ][ y ] --;
}
}
-
+
//render the screen
- ct->locate(0,0);
- ct->color(GREY | HIGH_INTENSITY, BLACK);
+ ct->locate( 0, 0 );
+ ct->color( GREY | HIGH_INTENSITY, BLACK );
*ct << "Score: " << sscore << endl;
- ct->locate(70,0);
- if(dead==0) *ct << "Lives: " << slives << endl;
- ct->color(YELLOW | HIGH_INTENSITY, BLACK);
- *ct << (char)218;
- for(x=0;x<BOARD_X;x++)
- *ct << (char)196;
- *ct << (char)191 << endl;
- for(y=0;y<BOARD_Y;y++) {
- ct->color(YELLOW | HIGH_INTENSITY, BLACK);
- *ct << (char)179;
- for(x=0;x<BOARD_X;x++) {
- ct->color(GREY | HIGH_INTENSITY, BLACK);
- if(board[x][y]==999 && dead==0) { //draw an item
- ct->color(5,0);
- *ct << (char)4;
- } else if(board[x][y]>0&&dead==0) *ct << "*"; //draw a snake piece
- else *ct << " "; //draw a space
- }
- ct->color(YELLOW | HIGH_INTENSITY, BLACK);
- *ct << (char)179 << endl;
+ ct->locate( 70, 0 );
+ if ( dead == 0 )
+ * ct << "Lives: " << slives << endl;
+ ct->color( YELLOW | HIGH_INTENSITY, BLACK );
+ *ct << ( char ) 218;
+ for ( x = 0;x < BOARD_X;x++ )
+ *ct << ( char ) 196;
+ *ct << ( char ) 191 << endl;
+ for ( y = 0;y < BOARD_Y;y++ ) {
+ ct->color( YELLOW | HIGH_INTENSITY, BLACK );
+ *ct << ( char ) 179;
+ for ( x = 0;x < BOARD_X;x++ ) {
+ ct->color( GREY | HIGH_INTENSITY, BLACK );
+ if ( board[ x ][ y ] == 999 && dead == 0 ) { //draw an item
+ ct->color( 5, 0 );
+ *ct << ( char ) 4;
+ } else if ( board[ x ][ y ] > 0 && dead == 0 )
+ * ct << "*"; //draw a snake piece
+ else
+ *ct << " "; //draw a space
}
- *ct << (char)192;
- for(x=0;x<BOARD_X;x++)
- *ct << (char)196;
- *ct << (char)217<<endl;
- ct->color(GREY | HIGH_INTENSITY, BLACK);
- *ct << "TikiSnake (C) 2006 Sam Steele";
- if(dead) {
- ct->color(RED, BLACK);
- ct->locate(36,11); *ct << "You Died!";
- ct->locate(36,12); *ct << "Press ESC";
- }
-
- Frame::begin();
- ct->draw(Drawable::Opaque);
- Frame::transEnable();
- ct->draw(Drawable::Trans);
- Frame::finish();
-
- Time::sleep(80000);
- }
-
+ ct->color( YELLOW | HIGH_INTENSITY, BLACK );
+ *ct << ( char ) 179 << endl;
+ }
+ *ct << ( char ) 192;
+ for ( x = 0;x < BOARD_X;x++ )
+ *ct << ( char ) 196;
+ *ct << ( char ) 217 << endl;
+ ct->color( GREY | HIGH_INTENSITY, BLACK );
+ *ct << "TikiSnake (C) 2006 Sam Steele";
+ if ( dead ) {
+ ct->color( RED, BLACK );
+ ct->locate( 36, 11 );
+ *ct << "You Died!";
+ ct->locate( 36, 12 );
+ *ct << "Press ESC";
+ }
+
+ Frame::begin();
+ ct->draw( Drawable::Opaque );
+ Frame::transEnable();
+ ct->draw( Drawable::Trans );
+ Frame::finish();
+
+ Time::sleep( 80000 );
+ }
+
Tiki::shutdown();
return 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <at...@us...> - 2007-08-09 22:49:07
|
Revision: 435
http://cadcdev.svn.sourceforge.net/cadcdev/?rev=435&view=rev
Author: atani
Date: 2007-08-09 15:48:59 -0700 (Thu, 09 Aug 2007)
Log Message:
-----------
astyle --style=kr -t -P -K -a
Modified Paths:
--------------
tiki/3rdparty/libjpeg/README
tiki/3rdparty/libjpeg/jcapimin.c
tiki/3rdparty/libjpeg/jcapistd.c
tiki/3rdparty/libjpeg/jccoefct.c
tiki/3rdparty/libjpeg/jccolor.c
tiki/3rdparty/libjpeg/jcdctmgr.c
tiki/3rdparty/libjpeg/jchuff.c
tiki/3rdparty/libjpeg/jchuff.h
tiki/3rdparty/libjpeg/jcinit.c
tiki/3rdparty/libjpeg/jcmainct.c
tiki/3rdparty/libjpeg/jcmarker.c
tiki/3rdparty/libjpeg/jcmaster.c
tiki/3rdparty/libjpeg/jcomapi.c
tiki/3rdparty/libjpeg/jconfig.h
tiki/3rdparty/libjpeg/jcparam.c
tiki/3rdparty/libjpeg/jcphuff.c
tiki/3rdparty/libjpeg/jcprepct.c
tiki/3rdparty/libjpeg/jcsample.c
tiki/3rdparty/libjpeg/jctrans.c
tiki/3rdparty/libjpeg/jdapimin.c
tiki/3rdparty/libjpeg/jdapistd.c
tiki/3rdparty/libjpeg/jdatadst.c
tiki/3rdparty/libjpeg/jdatasrc.c
tiki/3rdparty/libjpeg/jdcoefct.c
tiki/3rdparty/libjpeg/jdcolor.c
tiki/3rdparty/libjpeg/jdct.h
tiki/3rdparty/libjpeg/jddctmgr.c
tiki/3rdparty/libjpeg/jdhuff.c
tiki/3rdparty/libjpeg/jdhuff.h
tiki/3rdparty/libjpeg/jdinput.c
tiki/3rdparty/libjpeg/jdmainct.c
tiki/3rdparty/libjpeg/jdmarker.c
tiki/3rdparty/libjpeg/jdmaster.c
tiki/3rdparty/libjpeg/jdmerge.c
tiki/3rdparty/libjpeg/jdphuff.c
tiki/3rdparty/libjpeg/jdpostct.c
tiki/3rdparty/libjpeg/jdsample.c
tiki/3rdparty/libjpeg/jdtrans.c
tiki/3rdparty/libjpeg/jerror.c
tiki/3rdparty/libjpeg/jerror.h
tiki/3rdparty/libjpeg/jfdctflt.c
tiki/3rdparty/libjpeg/jfdctfst.c
tiki/3rdparty/libjpeg/jfdctint.c
tiki/3rdparty/libjpeg/jidctflt.c
tiki/3rdparty/libjpeg/jidctfst.c
tiki/3rdparty/libjpeg/jidctint.c
tiki/3rdparty/libjpeg/jidctred.c
tiki/3rdparty/libjpeg/jinclude.h
tiki/3rdparty/libjpeg/jmemmgr.c
tiki/3rdparty/libjpeg/jmemnobs.c
tiki/3rdparty/libjpeg/jmemsys.h
tiki/3rdparty/libjpeg/jmorecfg.h
tiki/3rdparty/libjpeg/jpegint.h
tiki/3rdparty/libjpeg/jpeglib.h
tiki/3rdparty/libjpeg/jquant1.c
tiki/3rdparty/libjpeg/jquant2.c
tiki/3rdparty/libjpeg/jversion.h
tiki/3rdparty/libpng/png.h
tiki/3rdparty/libpng/pngconf.h
tiki/3rdparty/libvorbis/lib/backends.h
tiki/3rdparty/libvorbis/lib/bitrate.h
tiki/3rdparty/libvorbis/lib/codebook.h
tiki/3rdparty/libvorbis/lib/codec_internal.h
tiki/3rdparty/libvorbis/lib/envelope.h
tiki/3rdparty/libvorbis/lib/highlevel.h
tiki/3rdparty/libvorbis/lib/lookup.h
tiki/3rdparty/libvorbis/lib/lookup_data.h
tiki/3rdparty/libvorbis/lib/lpc.h
tiki/3rdparty/libvorbis/lib/lsp.h
tiki/3rdparty/libvorbis/lib/masking.h
tiki/3rdparty/libvorbis/lib/mdct.h
tiki/3rdparty/libvorbis/lib/misc.h
tiki/3rdparty/libvorbis/lib/os.h
tiki/3rdparty/libvorbis/lib/psy.h
tiki/3rdparty/libvorbis/lib/registry.h
tiki/3rdparty/libvorbis/lib/scales.h
tiki/3rdparty/libvorbis/lib/smallft.h
tiki/3rdparty/libvorbis/lib/window.h
tiki/3rdparty/zlib/crc32.h
tiki/3rdparty/zlib/deflate.h
tiki/3rdparty/zlib/inffast.h
tiki/3rdparty/zlib/inffixed.h
tiki/3rdparty/zlib/inflate.h
tiki/3rdparty/zlib/inftrees.h
tiki/3rdparty/zlib/trees.h
tiki/3rdparty/zlib/zconf.h
tiki/3rdparty/zlib/zlib.h
tiki/3rdparty/zlib/zutil.h
tiki/dc/include/Tiki/glhdrs.h
tiki/dc/include/Tiki/platthread.h
tiki/dc/include/Tiki/tikitypes.h
tiki/dc/include/pch.h
tiki/dc/include/sys/queue.h
tiki/dc/src/audio/sound.cpp
tiki/dc/src/audio/stream.cpp
tiki/dc/src/init_shutdown.cpp
tiki/dc/src/platgl.cpp
tiki/dc/src/plathid.cpp
tiki/dc/src/platthread.cpp
tiki/dc/src/tikitime.cpp
tiki/gp2x/include/GLES/egl.h
tiki/gp2x/include/GLES/egltypes.h
tiki/gp2x/include/GLES/gl.h
tiki/gp2x/include/GLES/glext.h
tiki/gp2x/include/Tiki/glhdrs.h
tiki/gp2x/include/Tiki/platthread.h
tiki/gp2x/include/Tiki/tikitypes.h
tiki/gp2x/include/minimal.h
tiki/gp2x/include/minimal_940t.h
tiki/gp2x/include/pch.h
tiki/gp2x/include/sys/queue.h
tiki/gp2x/src/init_shutdown.cpp
tiki/gp2x/src/platgl.cpp
tiki/gp2x/src/plathid.cpp
tiki/gp2x/src/platthread.cpp
tiki/gp2x/src/rlyeh-minimal.cpp
tiki/gp2x/src/tikitime.cpp
tiki/include/Tiki/animation.h
tiki/include/Tiki/bspline.h
tiki/include/Tiki/color.h
tiki/include/Tiki/color3.h
tiki/include/Tiki/debug.h
tiki/include/Tiki/drawable.h
tiki/include/Tiki/endian.h
tiki/include/Tiki/eventcollector.h
tiki/include/Tiki/file.h
tiki/include/Tiki/font.h
tiki/include/Tiki/genmenu.h
tiki/include/Tiki/gl.h
tiki/include/Tiki/hid.h
tiki/include/Tiki/image.h
tiki/include/Tiki/imgjpg.h
tiki/include/Tiki/imgpng.h
tiki/include/Tiki/list.h
tiki/include/Tiki/matrix.h
tiki/include/Tiki/object.h
tiki/include/Tiki/oggvorbis.h
tiki/include/Tiki/plxcompat.h
tiki/include/Tiki/refcnt.h
tiki/include/Tiki/scene.h
tiki/include/Tiki/sound.h
tiki/include/Tiki/stream.h
tiki/include/Tiki/tee.h
tiki/include/Tiki/texture.h
tiki/include/Tiki/thread.h
tiki/include/Tiki/tiki.h
tiki/include/Tiki/tikimath.h
tiki/include/Tiki/tikitime.h
tiki/include/Tiki/timeline.h
tiki/include/Tiki/timepoint.h
tiki/include/Tiki/trigger.h
tiki/include/Tiki/vector.h
tiki/include/Tiki/vector3.h
tiki/nds/arm7_template/source/dssoundstream.h
tiki/nds/include/Tiki/glhdrs.h
tiki/nds/include/Tiki/platthread.h
tiki/nds/include/Tiki/tikitypes.h
tiki/nds/include/dssoundstream.h
tiki/nds/include/pch.h
tiki/nds/src/audio/sound.cpp
tiki/nds/src/audio/stream.cpp
tiki/nds/src/init_shutdown.cpp
tiki/nds/src/platgl.cpp
tiki/nds/src/plathid.cpp
tiki/nds/src/platthread.cpp
tiki/nds/src/tikitime.cpp
tiki/osx/include/Tiki/TikiMain.h
tiki/osx/include/Tiki/glhdrs.h
tiki/osx/include/Tiki/platthread.h
tiki/osx/include/Tiki/tikitypes.h
tiki/osx/include/pch.h
tiki/osx/src/init_shutdown.cpp
tiki/osx/src/platgl.cpp
tiki/osx/src/platthread.cpp
tiki/osx/src/tikitime.cpp
tiki/sdl/include/Tiki/glhdrs.h
tiki/sdl/include/Tiki/platthread.h
tiki/sdl/include/Tiki/tikitypes.h
tiki/sdl/include/pch.h
tiki/sdl/include/sys/queue.h
tiki/sdl/src/init_shutdown.cpp
tiki/sdl/src/platgl.cpp
tiki/sdl/src/plathid.cpp
tiki/sdl/src/platthread.cpp
tiki/sdl/src/tikitime.cpp
tiki/src/audio/oggvorbis/misc.h
tiki/src/audio/oggvorbis/sndoggvorbis.cpp
tiki/src/audio/sound.cpp
tiki/src/audio/stream.cpp
tiki/src/base/debug.cpp
tiki/src/base/endian.cpp
tiki/src/base/file.cpp
tiki/src/base/object.cpp
tiki/src/base/timeline.cpp
tiki/src/base/timepoint.cpp
tiki/src/gl/animation.cpp
tiki/src/gl/drawable.cpp
tiki/src/gl/font.cpp
tiki/src/gl/genmenu.cpp
tiki/src/gl/gl.cpp
tiki/src/gl/plxcompat.cpp
tiki/src/gl/texture.cpp
tiki/src/gl/trigger.cpp
tiki/src/hid/eventcollector.cpp
tiki/src/hid/hid.cpp
tiki/src/image/image.cpp
tiki/src/image/loadjpg.cpp
tiki/src/image/loadpng.cpp
tiki/src/math/bspline.cpp
tiki/src/math/math.cpp
tiki/src/math/matrix.cpp
tiki/src/math/vector.cpp
tiki/src/math/vector3.cpp
tiki/src/thread/thread.cpp
tiki/win32/include/Tiki/glhdrs.h
tiki/win32/include/Tiki/tikitypes.h
tiki/win32/include/pch.h
tiki/win32/include/sys/cdefs.h
tiki/win32/include/sys/queue.h
tiki/win32/src/init_shutdown.cpp
tiki/win32/src/platgl.cpp
tiki/win32/src/plathid.cpp
tiki/win32/src/platthread.cpp
tiki/win32/src/tikitime.cpp
Modified: tiki/3rdparty/libjpeg/README
===================================================================
--- tiki/3rdparty/libjpeg/README 2007-08-09 21:57:40 UTC (rev 434)
+++ tiki/3rdparty/libjpeg/README 2007-08-09 22:48:59 UTC (rev 435)
@@ -5,381 +5,392 @@
====================================
This distribution contains the sixth public release of the Independent JPEG
-Group's free JPEG software. You are welcome to redistribute this software and
+Group's free JPEG software. You are welcome to redistribute this software and
to use it for any purpose, subject to the conditions under LEGAL ISSUES, below.
-Serious users of this software (particularly those incorporating it into
-larger programs) should contact IJG at jpe...@uu... to be added to
-our electronic mailing list. Mailing list members are notified of updates
-and have a chance to participate in technical discussions, etc.
+Serious users of this software ( particularly those incorporating it into
+ larger programs )
+ should contact IJG at jpeg - in...@uu... to be added to
+ our electronic mailing list. Mailing list members are notified of updates
+ and have a chance to participate in technical discussions, etc.
-This software is the work of Tom Lane, Philip Gladstone, Jim Boucher,
-Lee Crocker, Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi,
-Guido Vollbeding, Ge' Weijers, and other members of the Independent JPEG
-Group.
+ This software is the work of Tom Lane, Philip Gladstone, Jim Boucher,
+ Lee Crocker, Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi,
+ Guido Vollbeding, Ge' Weijers, and other members of the Independent JPEG
+ Group.
-IJG is not affiliated with the official ISO JPEG standards committee.
+ IJG is not affiliated with the official ISO JPEG standards committee.
-DOCUMENTATION ROADMAP
-=====================
+ DOCUMENTATION ROADMAP
+ =====================
-This file contains the following sections:
+ This file contains the following sections:
-OVERVIEW General description of JPEG and the IJG software.
-LEGAL ISSUES Copyright, lack of warranty, terms of distribution.
-REFERENCES Where to learn more about JPEG.
-ARCHIVE LOCATIONS Where to find newer versions of this software.
-RELATED SOFTWARE Other stuff you should get.
-FILE FORMAT WARS Software *not* to get.
-TO DO Plans for future IJG releases.
+ OVERVIEW General description of JPEG and the IJG software.
+ LEGAL ISSUES Copyright, lack of warranty, terms of distribution.
+ REFERENCES Where to learn more about JPEG.
+ ARCHIVE LOCATIONS Where to find newer versions of this software.
+ RELATED SOFTWARE Other stuff you should get.
+ FILE FORMAT WARS Software *not* to get.
+ TO DO Plans for future IJG releases.
-Other documentation files in the distribution are:
+ Other documentation files in the distribution are:
-User documentation:
- install.doc How to configure and install the IJG software.
- usage.doc Usage instructions for cjpeg, djpeg, jpegtran,
- rdjpgcom, and wrjpgcom.
- *.1 Unix-style man pages for programs (same info as usage.doc).
- wizard.doc Advanced usage instructions for JPEG wizards only.
- change.log Version-to-version change highlights.
-Programmer and internal documentation:
- libjpeg.doc How to use the JPEG library in your own programs.
- example.c Sample code for calling the JPEG library.
- structure.doc Overview of the JPEG library's internal structure.
- filelist.doc Road map of IJG files.
- coderules.doc Coding style rules --- please read if you contribute code.
+ User documentation:
+ install.doc How to configure and install the IJG software.
+ usage.doc Usage instructions for cjpeg, djpeg, jpegtran,
+ rdjpgcom, and wrjpgcom.
+ *.1 Unix-style man pages for programs (same info as usage.doc).
+ wizard.doc Advanced usage instructions for JPEG wizards only.
+ change.log Version-to-version change highlights.
+ Programmer and internal documentation:
+ libjpeg.doc How to use the JPEG library in your own programs.
+ example.c Sample code for calling the JPEG library.
+ structure.doc Overview of the JPEG library's internal structure.
+ filelist.doc Road map of IJG files.
+ coderules.doc Coding style rules -- - please read if you contribute code.
-Please read at least the files install.doc and usage.doc. Useful information
-can also be found in the JPEG FAQ (Frequently Asked Questions) article. See
-ARCHIVE LOCATIONS below to find out where to obtain the FAQ article.
+ Please read at least the files install.doc and usage.doc. Useful information
+ can also be found in the JPEG FAQ ( Frequently Asked Questions )
+ article. See
+ ARCHIVE LOCATIONS below to find out where to obtain the FAQ article.
-If you want to understand how the JPEG code works, we suggest reading one or
-more of the REFERENCES, then looking at the documentation files (in roughly
-the order listed) before diving into the code.
+ If you want to understand how the JPEG code works, we suggest reading one or
+ more of the REFERENCES, then looking at the documentation files ( in roughly
+ the order listed ) before diving into the code.
-OVERVIEW
-========
+ OVERVIEW
+ == == == ==
-This package contains C software to implement JPEG image compression and
-decompression. JPEG (pronounced "jay-peg") is a standardized compression
-method for full-color and gray-scale images. JPEG is intended for compressing
-"real-world" scenes; line drawings, cartoons and other non-realistic images
-are not its strong suit. JPEG is lossy, meaning that the output image is not
-exactly identical to the input image. Hence you must not use JPEG if you
-have to have identical output bits. However, on typical photographic images,
+ This package contains C software to implement JPEG image compression and
+ decompression. JPEG ( pronounced "jay-peg" ) is a standardized compression
+ method for full - color and gray - scale images. JPEG is intended for compressing
+ "real-world" scenes;
+line drawings, cartoons and other non - realistic images
+are not its strong suit. JPEG is lossy, meaning that the output image is not
+exactly identical to the input image. Hence you must not use JPEG if you
+have to have identical output bits. However, on typical photographic images,
very good compression levels can be obtained with no visible change, and
remarkably high compression levels are possible if you can tolerate a
-low-quality image. For more details, see the references, or just experiment
-with various compression settings.
+ low - quality image. For more details, see the references, or just experiment
+ with various compression settings.
-This software implements JPEG baseline, extended-sequential, and progressive
-compression processes. Provision is made for supporting all variants of these
-processes, although some uncommon parameter settings aren't implemented yet.
-For legal reasons, we are not distributing code for the arithmetic-coding
-variants of JPEG; see LEGAL ISSUES. We have made no provision for supporting
-the hierarchical or lossless processes defined in the standard.
+ This software implements JPEG baseline, extended - sequential, and progressive
+ compression processes. Provision is made for supporting all variants of these
+ processes, although some uncommon parameter settings aren't implemented yet.
+ For legal reasons, we are not distributing code for the arithmetic-coding
+ variants of JPEG; see LEGAL ISSUES. We have made no provision for supporting
+ the hierarchical or lossless processes defined in the standard.
-We provide a set of library routines for reading and writing JPEG image files,
-plus two sample applications "cjpeg" and "djpeg", which use the library to
-perform conversion between JPEG and some other popular image file formats.
-The library is intended to be reused in other applications.
+ We provide a set of library routines for reading and writing JPEG image files,
+ plus two sample applications "cjpeg" and "djpeg", which use the library to
+ perform conversion between JPEG and some other popular image file formats.
+ The library is intended to be reused in other applications.
-In order to support file conversion and viewing software, we have included
-considerable functionality beyond the bare JPEG coding/decoding capability;
-for example, the color quantization modules are not strictly part of JPEG
-decoding, but they are essential for output to colormapped file formats or
-colormapped displays. These extra functions can be compiled out of the
-library if not required for a particular application. We have also included
-"jpegtran", a utility for lossless transcoding between different JPEG
-processes, and "rdjpgcom" and "wrjpgcom", two simple applications for
-inserting and extracting textual comments in JFIF files.
+ In order to support file conversion and viewing software, we have included
+ considerable functionality beyond the bare JPEG coding/decoding capability;
+ for example, the color quantization modules are not strictly part of JPEG
+ decoding, but they are essential for output to colormapped file formats or
+ colormapped displays. These extra functions can be compiled out of the
+ library if not required for a particular application. We have also included
+ "jpegtran", a utility for lossless transcoding between different JPEG
+ processes, and "rdjpgcom" and "wrjpgcom", two simple applications for
+ inserting and extracting textual comments in JFIF files.
-The emphasis in designing this software has been on achieving portability and
-flexibility, while also making it fast enough to be useful. In particular,
-the software is not intended to be read as a tutorial on JPEG. (See the
-REFERENCES section for introductory material.) Rather, it is intended to
-be reliable, portable, industrial-strength code. We do not claim to have
-achieved that goal in every aspect of the software, but we strive for it.
+ The emphasis in designing this software has been on achieving portability and
+ flexibility, while also making it fast enough to be useful. In particular,
+ the software is not intended to be read as a tutorial on JPEG. (See the
+ REFERENCES section for introductory material.) Rather, it is intended to
+ be reliable, portable, industrial-strength code. We do not claim to have
+ achieved that goal in every aspect of the software, but we strive for it.
-We welcome the use of this software as a component of commercial products.
-No royalty is required, but we do ask for an acknowledgement in product
-documentation, as described under LEGAL ISSUES.
+ We welcome the use of this software as a component of commercial products.
+ No royalty is required, but we do ask for an acknowledgement in product
+ documentation, as described under LEGAL ISSUES.
-LEGAL ISSUES
-============
+ LEGAL ISSUES
+ ============
-In plain English:
+ In plain English:
-1. We don't promise that this software works. (But if you find any bugs,
- please let us know!)
-2. You can use this software for whatever you want. You don't have to pay us.
-3. You may not pretend that you wrote this software. If you use it in a
- program, you must acknowledge somewhere in your documentation that
- you've used the IJG code.
+ 1. We don't promise that this software works. ( But if you find any bugs,
+ please let us know! )
+ 2. You can use this software for whatever you want. You don't have to pay us.
+ 3. You may not pretend that you wrote this software. If you use it in a
+ program, you must acknowledge somewhere in your documentation that
+ you've used the IJG code.
In legalese:
-The authors make NO WARRANTY or representation, either express or implied,
-with respect to this software, its quality, accuracy, merchantability, or
-fitness for a particular purpose. This software is provided "AS IS", and you,
-its user, assume the entire risk as to its quality and accuracy.
+ The authors make NO WARRANTY or representation, either express or implied,
+ with respect to this software, its quality, accuracy, merchantability, or
+ fitness for a particular purpose. This software is provided "AS IS", and you,
+ its user, assume the entire risk as to its quality and accuracy.
-This software is copyright (C) 1991-1998, Thomas G. Lane.
-All Rights Reserved except as specified below.
+ This software is copyright ( C )
+ 1991 - 1998, Thomas G. Lane.
+ All Rights Reserved except as specified below.
-Permission is hereby granted to use, copy, modify, and distribute this
-software (or portions thereof) for any purpose, without fee, subject to these
+ Permission is hereby granted to use, copy, modify, and distribute this
+ software ( or portions thereof ) for any purpose, without fee, subject to these
conditions:
-(1) If any part of the source code for this software is distributed, then this
-README file must be included, with this copyright and no-warranty notice
-unaltered; and any additions, deletions, or changes to the original files
+ ( 1 )
+ If any part of the source code for this software is distributed, then this
+ README file must be included, with this copyright and no - warranty notice
+ unaltered;
+and any additions, deletions, or changes to the original files
must be clearly indicated in accompanying documentation.
-(2) If only executable code is distributed, then the accompanying
+( 2 )
+If only executable code is distributed, then the accompanying
documentation must state that "this software is based in part on the work of
the Independent JPEG Group".
-(3) Permission for use of this software is granted only if the user accepts
-full responsibility for any undesirable consequences; the authors accept
+( 3 ) Permission for use of this software is granted only if the user accepts
+ full responsibility for any undesirable consequences;
+the authors accept
NO LIABILITY for damages of any kind.
These conditions apply to any software derived from or based on the IJG code,
-not just to the unmodified library. If you use our work, you ought to
+not just to the unmodified library. If you use our work, you ought to
acknowledge us.
Permission is NOT granted for the use of any IJG author's name or company name
-in advertising or publicity relating to this software or products derived from
-it. This software may be referred to only as "the Independent JPEG Group's
-software".
+ in advertising or publicity relating to this software or products derived from
+ it. This software may be referred to only as "the Independent JPEG Group's
+ software".
-We specifically permit and encourage the use of this software as the basis of
-commercial products, provided that all warranty or liability claims are
-assumed by the product vendor.
+ We specifically permit and encourage the use of this software as the basis of
+ commercial products, provided that all warranty or liability claims are
+ assumed by the product vendor.
-ansi2knr.c is included in this distribution by permission of L. Peter Deutsch,
-sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA.
-ansi2knr.c is NOT covered by the above copyright and conditions, but instead
-by the usual distribution terms of the Free Software Foundation; principally,
-that you must include source code if you redistribute it. (See the file
-ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part
-of any program generated from the IJG code, this does not limit you more than
-the foregoing paragraphs do.
+ ansi2knr.c is included in this distribution by permission of L. Peter Deutsch,
+ sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA.
+ ansi2knr.c is NOT covered by the above copyright and conditions, but instead
+ by the usual distribution terms of the Free Software Foundation; principally,
+ that you must include source code if you redistribute it. (See the file
+ ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part
+ of any program generated from the IJG code, this does not limit you more than
+ the foregoing paragraphs do.
-The Unix configuration script "configure" was produced with GNU Autoconf.
-It is copyright by the Free Software Foundation but is freely distributable.
-The same holds for its supporting scripts (config.guess, config.sub,
-ltconfig, ltmain.sh). Another support script, install-sh, is copyright
-by M.I.T. but is also freely distributable.
+ The Unix configuration script "configure" was produced with GNU Autoconf.
+ It is copyright by the Free Software Foundation but is freely distributable.
+ The same holds for its supporting scripts (config.guess, config.sub,
+ ltconfig, ltmain.sh). Another support script, install-sh, is copyright
+ by M.I.T. but is also freely distributable.
-It appears that the arithmetic coding option of the JPEG spec is covered by
-patents owned by IBM, AT&T, and Mitsubishi. Hence arithmetic coding cannot
-legally be used without obtaining one or more licenses. For this reason,
-support for arithmetic coding has been removed from the free JPEG software.
-(Since arithmetic coding provides only a marginal gain over the unpatented
-Huffman mode, it is unlikely that very many implementations will support it.)
-So far as we are aware, there are no patent restrictions on the remaining
-code.
+ It appears that the arithmetic coding option of the JPEG spec is covered by
+ patents owned by IBM, AT&T, and Mitsubishi. Hence arithmetic coding cannot
+ legally be used without obtaining one or more licenses. For this reason,
+ support for arithmetic coding has been removed from the free JPEG software.
+ (Since arithmetic coding provides only a marginal gain over the unpatented
+ Huffman mode, it is unlikely that very many implementations will support it.)
+ So far as we are aware, there are no patent restrictions on the remaining
+ code.
-The IJG distribution formerly included code to read and write GIF files.
-To avoid entanglement with the Unisys LZW patent, GIF reading support has
-been removed altogether, and the GIF writer has been simplified to produce
-"uncompressed GIFs". This technique does not use the LZW algorithm; the
-resulting GIF files are larger than usual, but are readable by all standard
-GIF decoders.
+ The IJG distribution formerly included code to read and write GIF files.
+ To avoid entanglement with the Unisys LZW patent, GIF reading support has
+ been removed altogether, and the GIF writer has been simplified to produce
+ "uncompressed GIFs". This technique does not use the LZW algorithm; the
+ resulting GIF files are larger than usual, but are readable by all standard
+ GIF decoders.
-We are required to state that
- "The Graphics Interchange Format(c) is the Copyright property of
- CompuServe Incorporated. GIF(sm) is a Service Mark property of
- CompuServe Incorporated."
+ We are required to state that
+ "The Graphics Interchange Format( c )
+ is the Copyright property of
+ CompuServe Incorporated. GIF( sm ) is a Service Mark property of
+ CompuServe Incorporated."
-REFERENCES
-==========
+ REFERENCES
+ ==========
-We highly recommend reading one or more of these references before trying to
-understand the innards of the JPEG software.
+ We highly recommend reading one or more of these references before trying to
+ understand the innards of the JPEG software.
-The best short technical introduction to the JPEG compression algorithm is
- Wallace, Gregory K. "The JPEG Still Picture Compression Standard",
- Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44.
-(Adjacent articles in that issue discuss MPEG motion picture compression,
-applications of JPEG, and related topics.) If you don't have the CACM issue
-handy, a PostScript file containing a revised version of Wallace's article is
-available at ftp://ftp.uu.net/graphics/jpeg/wallace.ps.gz. The file (actually
-a preprint for an article that appeared in IEEE Trans. Consumer Electronics)
-omits the sample images that appeared in CACM, but it includes corrections
-and some added material. Note: the Wallace article is copyright ACM and IEEE,
-and it may not be used for commercial purposes.
+ The best short technical introduction to the JPEG compression algorithm is
+ Wallace, Gregory K. "The JPEG Still Picture Compression Standard",
+ Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44.
+ (Adjacent articles in that issue discuss MPEG motion picture compression,
+ applications of JPEG, and related topics.) If you don't have the CACM issue
+ handy, a PostScript file containing a revised version of Wallace's article is
+ available at ftp://ftp.uu.net/graphics/jpeg/wallace.ps.gz. The file (actually
+ a preprint for an article that appeared in IEEE Trans. Consumer Electronics)
+ omits the sample images that appeared in CACM, but it includes corrections
+ and some added material. Note: the Wallace article is copyright ACM and IEEE,
+ and it may not be used for commercial purposes.
-A somewhat less technical, more leisurely introduction to JPEG can be found in
-"The Data Compression Book" by Mark Nelson and Jean-loup Gailly, published by
-M&T Books (New York), 2nd ed. 1996, ISBN 1-55851-434-1. This book provides
-good explanations and example C code for a multitude of compression methods
-including JPEG. It is an excellent source if you are comfortable reading C
-code but don't know much about data compression in general. The book's JPEG
-sample code is far from industrial-strength, but when you are ready to look
-at a full implementation, you've got one here...
+ A somewhat less technical, more leisurely introduction to JPEG can be found in
+ "The Data Compression Book" by Mark Nelson and Jean-loup Gailly, published by
+ M&T Books (New York), 2nd ed. 1996, ISBN 1-55851-434-1. This book provides
+ good explanations and example C code for a multitude of compression methods
+ including JPEG. It is an excellent source if you are comfortable reading C
+ code but don't know much about data compression in general. The book's JPEG
+ sample code is far from industrial-strength, but when you are ready to look
+ at a full implementation, you've got one here...
-The best full description of JPEG is the textbook "JPEG Still Image Data
-Compression Standard" by William B. Pennebaker and Joan L. Mitchell, published
-by Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1. Price US$59.95, 638 pp.
-The book includes the complete text of the ISO JPEG standards (DIS 10918-1
-and draft DIS 10918-2). This is by far the most complete exposition of JPEG
-in existence, and we highly recommend it.
+ The best full description of JPEG is the textbook "JPEG Still Image Data
+ Compression Standard" by William B. Pennebaker and Joan L. Mitchell, published
+ by Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1. Price US$59.95, 638 pp.
+ The book includes the complete text of the ISO JPEG standards (DIS 10918-1
+ and draft DIS 10918-2). This is by far the most complete exposition of JPEG
+ in existence, and we highly recommend it.
-The JPEG standard itself is not available electronically; you must order a
-paper copy through ISO or ITU. (Unless you feel a need to own a certified
-official copy, we recommend buying the Pennebaker and Mitchell book instead;
-it's much cheaper and includes a great deal of useful explanatory material.)
-In the USA, copies of the standard may be ordered from ANSI Sales at (212)
-642-4900, or from Global Engineering Documents at (800) 854-7179. (ANSI
-doesn't take credit card orders, but Global does.) It's not cheap: as of
-1992, ANSI was charging $95 for Part 1 and $47 for Part 2, plus 7%
-shipping/handling. The standard is divided into two parts, Part 1 being the
-actual specification, while Part 2 covers compliance testing methods. Part 1
-is titled "Digital Compression and Coding of Continuous-tone Still Images,
-Part 1: Requirements and guidelines" and has document numbers ISO/IEC IS
-10918-1, ITU-T T.81. Part 2 is titled "Digital Compression and Coding of
-Continuous-tone Still Images, Part 2: Compliance testing" and has document
-numbers ISO/IEC IS 10918-2, ITU-T T.83.
+ The JPEG standard itself is not available electronically; you must order a
+ paper copy through ISO or ITU. (Unless you feel a need to own a certified
+ official copy, we recommend buying the Pennebaker and Mitchell book instead;
+ it's much cheaper and includes a great deal of useful explanatory material.)
+ In the USA, copies of the standard may be ordered from ANSI Sales at (212)
+ 642-4900, or from Global Engineering Documents at (800) 854-7179. (ANSI
+ doesn't take credit card orders, but Global does.) It's not cheap: as of
+ 1992, ANSI was charging $95 for Part 1 and $47 for Part 2, plus 7%
+ shipping/handling. The standard is divided into two parts, Part 1 being the
+ actual specification, while Part 2 covers compliance testing methods. Part 1
+ is titled "Digital Compression and Coding of Continuous - tone Still Images,
+Part 1:
+ Requirements and guidelines" and has document numbers ISO/IEC IS
+ 10918-1, ITU-T T.81. Part 2 is titled "Digital Compression and Coding of
+Continuous - tone Still Images, Part 2:
+ Compliance testing" and has document
+ numbers ISO/IEC IS 10918-2, ITU-T T.83.
-Some extensions to the original JPEG standard are defined in JPEG Part 3,
-a newer ISO standard numbered ISO/IEC IS 10918-3 and ITU-T T.84. IJG
-currently does not support any Part 3 extensions.
+ Some extensions to the original JPEG standard are defined in JPEG Part 3,
+ a newer ISO standard numbered ISO/IEC IS 10918-3 and ITU-T T.84. IJG
+ currently does not support any Part 3 extensions.
-The JPEG standard does not specify all details of an interchangeable file
-format. For the omitted details we follow the "JFIF" conventions, revision
-1.02. A copy of the JFIF spec is available from:
- Literature Department
- C-Cube Microsystems, Inc.
- 1778 McCarthy Blvd.
- Milpitas, CA 95035
- phone (408) 944-6300, fax (408) 944-6314
-A PostScript version of this document is available by FTP at
-ftp://ftp.uu.net/graphics/jpeg/jfif.ps.gz. There is also a plain text
-version at ftp://ftp.uu.net/graphics/jpeg/jfif.txt.gz, but it is missing
-the figures.
+ The JPEG standard does not specify all details of an interchangeable file
+ format. For the omitted details we follow the "JFIF" conventions, revision
+ 1.02. A copy of the JFIF spec is available from:
+ Literature Department
+ C-Cube Microsystems, Inc.
+ 1778 McCarthy Blvd.
+ Milpitas, CA 95035
+ phone (408) 944-6300, fax (408) 944-6314
+ A PostScript version of this document is available by FTP at
+ ftp://ftp.uu.net/graphics/jpeg/jfif.ps.gz. There is also a plain text
+ version at ftp://ftp.uu.net/graphics/jpeg/jfif.txt.gz, but it is missing
+ the figures.
-The TIFF 6.0 file format specification can be obtained by FTP from
-ftp://ftp.sgi.com/graphics/tiff/TIFF6.ps.gz. The JPEG incorporation scheme
-found in the TIFF 6.0 spec of 3-June-92 has a number of serious problems.
-IJG does not recommend use of the TIFF 6.0 design (TIFF Compression tag 6).
-Instead, we recommend the JPEG design proposed by TIFF Technical Note #2
-(Compression tag 7). Copies of this Note can be obtained from ftp.sgi.com or
-from ftp://ftp.uu.net/graphics/jpeg/. It is expected that the next revision
-of the TIFF spec will replace the 6.0 JPEG design with the Note's design.
-Although IJG's own code does not support TIFF/JPEG, the free libtiff library
-uses our library to implement TIFF/JPEG per the Note. libtiff is available
-from ftp://ftp.sgi.com/graphics/tiff/.
+ The TIFF 6.0 file format specification can be obtained by FTP from
+ ftp://ftp.sgi.com/graphics/tiff/TIFF6.ps.gz. The JPEG incorporation scheme
+ found in the TIFF 6.0 spec of 3-June-92 has a number of serious problems.
+ IJG does not recommend use of the TIFF 6.0 design (TIFF Compression tag 6).
+ Instead, we recommend the JPEG design proposed by TIFF Technical Note #2
+ (Compression tag 7). Copies of this Note can be obtained from ftp.sgi.com or
+ from ftp://ftp.uu.net/graphics/jpeg/. It is expected that the next revision
+ of the TIFF spec will replace the 6.0 JPEG design with the Note's design.
+ Although IJG's own code does not support TIFF/JPEG, the free libtiff library
+ uses our library to implement TIFF/JPEG per the Note. libtiff is available
+ from ftp://ftp.sgi.com/graphics/tiff/.
-ARCHIVE LOCATIONS
-=================
+ ARCHIVE LOCATIONS
+ =================
-The "official" archive site for this software is ftp.uu.net (Internet
-address 192.48.96.9). The most recent released version can always be found
-there in directory graphics/jpeg. This particular version will be archived
-as ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz. If you don't have
-direct Internet access, UUNET's archives are also available via UUCP; contact
-he...@uu... for information on retrieving files that way.
+ The "official" archive site for this software is ftp.uu.net (Internet
+ address 192.48.96.9). The most recent released version can always be found
+ there in directory graphics/jpeg. This particular version will be archived
+ as ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz. If you don't have
+ direct Internet access, UUNET's archives are also available via UUCP; contact
+ he...@uu... for information on retrieving files that way.
-Numerous Internet sites maintain copies of the UUNET files. However, only
-ftp.uu.net is guaranteed to have the latest official version.
+ Numerous Internet sites maintain copies of the UUNET files. However, only
+ ftp.uu.net is guaranteed to have the latest official version.
-You can also obtain this software in DOS-compatible "zip" archive format from
-the SimTel archives (ftp://ftp.simtel.net/pub/simtelnet/msdos/graphics/), or
-on CompuServe in the Graphics Support forum (GO CIS:GRAPHSUP), library 12
-"JPEG Tools". Again, these versions may sometimes lag behind the ftp.uu.net
-release.
+ You can also obtain this software in DOS-compatible "zip" archive format from
+ the SimTel archives (ftp://ftp.simtel.net/pub/simtelnet/msdos/graphics/), or
+ on CompuServe in the Graphics Support forum (GO CIS:GRAPHSUP), library 12
+ "JPEG Tools". Again, these versions may sometimes lag behind the ftp.uu.net
+ release.
-The JPEG FAQ (Frequently Asked Questions) article is a useful source of
-general information about JPEG. It is updated constantly and therefore is
-not included in this distribution. The FAQ is posted every two weeks to
-Usenet newsgroups comp.graphics.misc, news.answers, and other groups.
-It is available on the World Wide Web at http://www.faqs.org/faqs/jpeg-faq/
-and other news.answers archive sites, including the official news.answers
-archive at rtfm.mit.edu: ftp://rtfm.mit.edu/pub/usenet/news.answers/jpeg-faq/.
-If you don't have Web or FTP access, send e-mail to mai...@rt...
-with body
- send usenet/news.answers/jpeg-faq/part1
- send usenet/news.answers/jpeg-faq/part2
+ The JPEG FAQ (Frequently Asked Questions) article is a useful source of
+ general information about JPEG. It is updated constantly and therefore is
+ not included in this distribution. The FAQ is posted every two weeks to
+ Usenet newsgroups comp.graphics.misc, news.answers, and other groups.
+ It is available on the World Wide Web at http://www.faqs.org/faqs/jpeg-faq/
+ and other news.answers archive sites, including the official news.answers
+ archive at rtfm.mit.edu: ftp://rtfm.mit.edu/pub/usenet/news.answers/jpeg-faq/.
+ If you don't have Web or FTP access, send e-mail to mai...@rt...
+ with body
+ send usenet/news.answers/jpeg-faq/part1
+ send usenet/news.answers/jpeg-faq/part2
-RELATED SOFTWARE
-================
+ RELATED SOFTWARE
+ ================
-Numerous viewing and image manipulation programs now support JPEG. (Quite a
-few of them use this library to do so.) The JPEG FAQ described above lists
-some of the more popular free and shareware viewers, and tells where to
-obtain them on Internet.
+ Numerous viewing and image manipulation programs now support JPEG. (Quite a
+ few of them use this library to do so.) The JPEG FAQ described above lists
+ some of the more popular free and shareware viewers, and tells where to
+ obtain them on Internet.
-If you are on a Unix machine, we highly recommend Jef Poskanzer's free
-PBMPLUS software, which provides many useful operations on PPM-format image
-files. In particular, it can convert PPM images to and from a wide range of
-other formats, thus making cjpeg/djpeg considerably more useful. The latest
-version is distributed by the NetPBM group, and is available from numerous
-sites, notably ftp://wuarchive.wustl.edu/graphics/graphics/packages/NetPBM/.
-Unfortunately PBMPLUS/NETPBM is not nearly as portable as the IJG software is;
-you are likely to have difficulty making it work on any non-Unix machine.
+ If you are on a Unix machine, we highly recommend Jef Poskanzer's free
+ PBMPLUS software, which provides many useful operations on PPM-format image
+ files. In particular, it can convert PPM images to and from a wide range of
+ other formats, thus making cjpeg/djpeg considerably more useful. The latest
+ version is distributed by the NetPBM group, and is available from numerous
+ sites, notably ftp://wuarchive.wustl.edu/graphics/graphics/packages/NetPBM/.
+ Unfortunately PBMPLUS/NETPBM is not nearly as portable as the IJG software is;
+ you are likely to have difficulty making it work on any non-Unix machine.
-A different free JPEG implementation, written by the PVRG group at Stanford,
-is available from ftp://havefun.stanford.edu/pub/jpeg/. This program
-is designed for research and experimentation rather than production use;
-it is slower, harder to use, and less portable than the IJG code, but it
-is easier to read and modify. Also, the PVRG code supports lossless JPEG,
-which we do not. (On the other hand, it doesn't do progressive JPEG.)
+ A different free JPEG implementation, written by the PVRG group at Stanford,
+ is available from ftp://havefun.stanford.edu/pub/jpeg/. This program
+ is designed for research and experimentation rather than production use;
+ it is slower, harder to use, and less portable than the IJG code, but it
+ is easier to read and modify. Also, the PVRG code supports lossless JPEG,
+ which we do not. (On the other hand, it doesn't do progressive JPEG.)
-FILE FORMAT WARS
-================
+ FILE FORMAT WARS
+ ================
-Some JPEG programs produce files that are not compatible with our library.
-The root of the problem is that the ISO JPEG committee failed to specify a
-concrete file format. Some vendors "filled in the blanks" on their own,
-creating proprietary formats that no one else could read. (For example, none
-of the early commercial JPEG implementations for the Macintosh were able to
-exchange compressed files.)
+ Some JPEG programs produce files that are not compatible with our library.
+ The root of the problem is that the ISO JPEG committee failed to specify a
+ concrete file format. Some vendors "filled in the blanks" on their own,
+ creating proprietary formats that no one else could read. (For example, none
+ of the early commercial JPEG implementations for the Macintosh were able to
+ exchange compressed files.)
-The file format we have adopted is called JFIF (see REFERENCES). This format
-has been agreed to by a number of major commercial JPEG vendors, and it has
-become the de facto standard. JFIF is a minimal or "low end" representation.
-We recommend the use of TIFF/JPEG (TIFF revision 6.0 as modified by TIFF
-Technical Note #2) for "high end" applications that need to record a lot of
-additional data about an image. TIFF/JPEG is fairly new and not yet widely
-supported, unfortunately.
+ The file format we have adopted is called JFIF (see REFERENCES). This format
+ has been agreed to by a number of major commercial JPEG vendors, and it has
+ become the de facto standard. JFIF is a minimal or "low end" representation.
+ We recommend the use of TIFF/JPEG (TIFF revision 6.0 as modified by TIFF
+ Technical Note #2) for "high end" applications that need to record a lot of
+ additional data about an image. TIFF/JPEG is fairly new and not yet widely
+ supported, unfortunately.
-The upcoming JPEG Part 3 standard defines a file format called SPIFF.
-SPIFF is interoperable with JFIF, in the sense that most JFIF decoders should
-be able to read the most common variant of SPIFF. SPIFF has some technical
-advantages over JFIF, but its major claim to fame is simply that it is an
-official standard rather than an informal one. At this point it is unclear
-whether SPIFF will supersede JFIF or whether JFIF will remain the de-facto
-standard. IJG intends to support SPIFF once the standard is frozen, but we
-have not decided whether it should become our default output format or not.
-(In any case, our decoder will remain capable of reading JFIF indefinitely.)
+ The upcoming JPEG Part 3 standard defines a file format called SPIFF.
+ SPIFF is interoperable with JFIF, in the sense that most JFIF decoders should
+ be able to read the most common variant of SPIFF. SPIFF has some technical
+ advantages over JFIF, but its major claim to fame is simply that it is an
+ official standard rather than an informal one. At this point it is unclear
+ whether SPIFF will supersede JFIF or whether JFIF will remain the de-facto
+ standard. IJG intends to support SPIFF once the standard is frozen, but we
+ have not decided whether it should become our default output format or not.
+ (In any case, our decoder will remain capable of reading JFIF indefinitely.)
-Various proprietary file formats incorporating JPEG compression also exist.
-We have little or no sympathy for the existence of these formats. Indeed,
-one of the original reasons for developing this free software was to help
-force convergence on common, open format standards for JPEG files. Don't
-use a proprietary file format!
+ Various proprietary file formats incorporating JPEG compression also exist.
+ We have little or no sympathy for the existence of these formats. Indeed,
+ one of the original reasons for developing this free software was to help
+ force convergence on common, open format standards for JPEG files. Don't
+ use a proprietary file format!
-TO DO
-=====
+ TO DO
+ =====
-The major thrust for v7 will probably be improvement of visual quality.
-The current method for scaling the quantization tables is known not to be
-very good at low Q values. We also intend to investigate block boundary
-smoothing, "poor man's variable quantization", and other means of improving
-quality-vs-file-size performance without sacrificing compatibility.
+ The major thrust for v7 will probably be improvement of visual quality.
+ The current method for scaling the quantization tables is known not to be
+ very good at low Q values. We also intend to investigate block boundary
+ smoothing, "poor man's variable quantization", and other means of improving
+ quality-vs-file-size performance without sacrificing compatibility.
-In future versions, we are considering supporting some of the upcoming JPEG
-Part 3 extensions --- principally, variable quantization and the SPIFF file
-format.
+ In future versions, we are considering supporting some of the upcoming JPEG
+ Part 3 extensions --- principally, variable quantization and the SPIFF file
+ format.
-As always, speeding things up is of great interest.
+ As always, speeding things up is of great interest.
-Please send bug reports, offers of help, etc. to jpe...@uu....
+ Please send bug reports, offers of help, etc. to jpe...@uu....
Modified: tiki/3rdparty/libjpeg/jcapimin.c
===================================================================
--- tiki/3rdparty/libjpeg/jcapimin.c 2007-08-09 21:57:40 UTC (rev 434)
+++ tiki/3rdparty/libjpeg/jcapimin.c 2007-08-09 22:48:59 UTC (rev 435)
@@ -1,20 +1,20 @@
/*
- * jcapimin.c
- *
- * Copyright (C) 1994-1998, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains application interface code for the compression half
- * of the JPEG library. These are the "minimum" API routines that may be
- * needed in either the normal full-compression case or the transcoding-only
- * case.
- *
- * Most of the routines intended to be called directly by an application
- * are in this file or in jcapistd.c. But also see jcparam.c for
- * parameter-setup helper routines, jcomapi.c for routines shared by
- * compression and decompression, and jctrans.c for the transcoding case.
- */
+* jcapimin.c
+*
+* Copyright (C) 1994-1998, Thomas G. Lane.
+* This file is part of the Independent JPEG Group's software.
+* For conditions of distribution and use, see the accompanying README file.
+*
+* This file contains application interface code for the compression half
+* of the JPEG library. These are the "minimum" API routines that may be
+* needed in either the normal full-compression case or the transcoding-only
+* case.
+*
+* Most of the routines intended to be called directly by an application
+* are in this file or in jcapistd.c. But also see jcparam.c for
+* parameter-setup helper routines, jcomapi.c for routines shared by
+* compression and decompression, and jctrans.c for the transcoding case.
+*/
#define JPEG_INTERNALS
#include "jinclude.h"
@@ -26,57 +26,56 @@
* The error manager must already be set up (in case memory manager fails).
*/
-GLOBAL(void)
-jpeg_CreateCompress (j_compress_ptr cinfo, int version, size_t structsize)
-{
- int i;
+GLOBAL( void )
+jpeg_CreateCompress ( j_compress_ptr cinfo, int version, size_t structsize ) {
+ int i;
- /* Guard against version mismatches between library and caller. */
- cinfo->mem = NULL; /* so jpeg_destroy knows mem mgr not called */
- if (version != JPEG_LIB_VERSION)
- ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version);
- if (structsize != SIZEOF(struct jpeg_compress_struct))
- ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE,
- (int) SIZEOF(struct jpeg_compress_struct), (int) structsize);
+ /* Guard against version mismatches between library and caller. */
+ cinfo->mem = NULL; /* so jpeg_destroy knows mem mgr not called */
+ if ( version != JPEG_LIB_VERSION )
+ ERREXIT2( cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version );
+ if ( structsize != SIZEOF( struct jpeg_compress_struct ) )
+ ERREXIT2( cinfo, JERR_BAD_STRUCT_SIZE,
+ ( int ) SIZEOF( struct jpeg_compress_struct ), ( int ) structsize );
- /* For debugging purposes, we zero the whole master structure.
- * But the application has already set the err pointer, and may have set
- * client_data, so we have to save and restore those fields.
- * Note: if application hasn't set client_data, tools like Purify may
- * complain here.
- */
- {
- struct jpeg_error_mgr * err = cinfo->err;
- void * client_data = cinfo->client_data; /* ignore Purify complaint here */
- MEMZERO(cinfo, SIZEOF(struct jpeg_compress_struct));
- cinfo->err = err;
- cinfo->client_data = client_data;
- }
- cinfo->is_decompressor = FALSE;
+ /* For debugging purposes, we zero the whole master structure.
+ * But the application has already set the err pointer, and may have set
+ * client_data, so we have to save and restore those fields.
+ * Note: if application hasn't set client_data, tools like Purify may
+ * complain here.
+ */
+ {
+ struct jpeg_error_mgr * err = cinfo->err;
+ void * client_data = cinfo->client_data; /* ignore Purify complaint here */
+ MEMZERO( cinfo, SIZEOF( struct jpeg_compress_struct ) );
+ cinfo->err = err;
+ cinfo->client_data = client_data;
+ }
+ cinfo->is_decompressor = FALSE;
- /* Initialize a memory manager instance for this object */
- jinit_memory_mgr((j_common_ptr) cinfo);
+ /* Initialize a memory manager instance for this object */
+ jinit_memory_mgr( ( j_common_ptr ) cinfo );
- /* Zero out pointers to permanent structures. */
- cinfo->progress = NULL;
- cinfo->dest = NULL;
+ /* Zero out pointers to permanent structures. */
+ cinfo->progress = NULL;
+ cinfo->dest = NULL;
- cinfo->comp_info = NULL;
+ cinfo->comp_info = NULL;
- for (i = 0; i < NUM_QUANT_TBLS; i++)
- cinfo->quant_tbl_ptrs[i] = NULL;
+ for ( i = 0; i < NUM_QUANT_TBLS; i++ )
+ cinfo->quant_tbl_ptrs[ i ] = NULL;
- for (i = 0; i < NUM_HUFF_TBLS; i++) {
- cinfo->dc_huff_tbl_ptrs[i] = NULL;
- cinfo->ac_huff_tbl_ptrs[i] = NULL;
- }
+ for ( i = 0; i < NUM_HUFF_TBLS; i++ ) {
+ cinfo->dc_huff_tbl_ptrs[ i ] = NULL;
+ cinfo->ac_huff_tbl_ptrs[ i ] = NULL;
+ }
- cinfo->script_space = NULL;
+ cinfo->script_space = NULL;
- cinfo->input_gamma = 1.0; /* in case application forgets */
+ cinfo->input_gamma = 1.0; /* in case application forgets */
- /* OK, I'm ready */
- cinfo->global_state = CSTATE_START;
+ /* OK, I'm ready */
+ cinfo->global_state = CSTATE_START;
}
@@ -84,10 +83,9 @@
* Destruction of a JPEG compression object
*/
-GLOBAL(void)
-jpeg_destroy_compress (j_compress_ptr cinfo)
-{
- jpeg_destroy((j_common_ptr) cinfo); /* use common routine */
+GLOBAL( void )
+jpeg_destroy_compress ( j_compress_ptr cinfo ) {
+ jpeg_destroy( ( j_common_ptr ) cinfo ); /* use common routine */
}
@@ -96,10 +94,9 @@
* but don't destroy the object itself.
*/
-GLOBAL(void)
-jpeg_abort_compress (j_compress_ptr cinfo)
-{
- jpeg_abort((j_common_ptr) cinfo); /* use common routine */
+GLOBAL( void )
+jpeg_abort_compress ( j_compress_ptr cinfo ) {
+ jpeg_abort( ( j_common_ptr ) cinfo ); /* use common routine */
}
@@ -115,24 +112,23 @@
* jcparam.o would be linked whether the application used it or not.
*/
-GLOBAL(void)
-jpeg_suppress_tables (j_compress_ptr cinfo, boolean suppress)
-{
- int i;
- JQUANT_TBL * qtbl;
- JHUFF_TBL * htbl;
+GLOBAL( void )
+jpeg_suppress_tables ( j_compress_ptr cinfo, boolean suppress ) {
+ int i;
+ JQUANT_TBL * qtbl;
+ JHUFF_TBL * htbl;
- for (i = 0; i < NUM_QUANT_TBLS; i++) {
- if ((qtbl = cinfo->quant_tbl_ptrs[i]) != NULL)
- qtbl->sent_table = suppress;
- }
+ for ( i = 0; i < NUM_QUANT_TBLS; i++ ) {
+ if ( ( qtbl = cinfo->quant_tbl_ptrs[ i ] ) != NULL )
+ qtbl->sent_table = suppress;
+ }
- for (i = 0; i < NUM_HUFF_TBLS; i++) {
- if ((htbl = cinfo->dc_huff_tbl_ptrs[i]) != NULL)
- htbl->sent_table = suppress;
- if ((htbl = cinfo->ac_huff_tbl_ptrs[i]) != NULL)
- htbl->sent_table = suppress;
- }
+ for ( i = 0; i < NUM_HUFF_TBLS; i++ ) {
+ if ( ( htbl = cinfo->dc_huff_tbl_ptrs[ i ] ) != NULL )
+ htbl->sent_table = suppress;
+ if ( ( htbl = cinfo->ac_huff_tbl_ptrs[ i ] ) != NULL )
+ htbl->sent_table = suppress;
+ }
}
@@ -143,41 +139,40 @@
* work including most of the actual output.
*/
-GLOBAL(void)
-jpeg_finish_compress (j_compress_ptr cinfo)
-{
- JDIMENSION iMCU_row;
+GLOBAL( void )
+jpeg_finish_compress ( j_compress_ptr cinfo ) {
+ JDIMENSION iMCU_row;
- if (cinfo->global_state == CSTATE_SCANNING ||
- cinfo->global_state == CSTATE_RAW_OK) {
- /* Terminate first pass */
- if (cinfo->next_scanline < cinfo->image_height)
- ERREXIT(cinfo, JERR_TOO_LITTLE_DATA);
- (*cinfo->master->finish_pass) (cinfo);
- } else if (cinfo->global_state != CSTATE_WRCOEFS)
- ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
- /* Perform any remaining passes */
- while (! cinfo->master->is_last_pass) {
- (*cinfo->master->prepare_for_pass) (cinfo);
- for (iMCU_row = 0; iMCU_row < cinfo->total_iMCU_rows; iMCU_row++) {
- if (cinfo->progress != NULL) {
- cinfo->progress->pass_counter = (long) iMCU_row;
- cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows;
- (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo);
- }
- /* We bypass the main controller and invoke coef controller directly;
- * all work is being done from the coefficient buffer.
- */
- if (! (*cinfo->coef->compress_data) (cinfo, (JSAMPIMAGE) NULL))
- ERREXIT(cinfo, JERR_CANT_SUSPEND);
- }
- (*cinfo->master->finish_pass) (cinfo);
- }
- /* Write EOI, do final cleanup */
- (*cinfo->marker->write_file_trailer) (cinfo);
- (*cinfo->dest->term_destination) (cinfo);
- /* We can use jpeg_abort to release memory and reset global_state */
- jpeg_abort((j_common_ptr) cinfo);
+ if ( cinfo->global_state == CSTATE_SCANNING ||
+ cinfo->global_state == CSTATE_RAW_OK ) {
+ /* Terminate first pass */
+ if ( cinfo->next_scanline < cinfo->image_height )
+ ERREXIT( cinfo, JERR_TOO_LITTLE_DATA );
+ ( *cinfo->master->finish_pass ) ( cinfo );
+ } else if ( cinfo->global_state != CSTATE_WRCOEFS )
+ ERREXIT1( cinfo, JERR_BAD_STATE, cinfo->global_state );
+ /* Perform any remaining passes */
+ while ( ! cinfo->master->is_last_pass ) {
+ ( *cinfo->master->prepare_for_pass ) ( cinfo );
+ for ( iMCU_row = 0; iMCU_row < cinfo->total_iMCU_rows; iMCU_row++ ) {
+ if ( cinfo->progress != NULL ) {
+ cinfo->progress->pass_counter = ( long ) iMCU_row;
+ cinfo->progress->pass_limit = ( long ) cinfo->total_iMCU_rows;
+ ( *cinfo->progress->progress_monitor ) ( ( j_common_ptr ) cinfo );
+ }
+ /* We bypass the main controller and invoke coef controller directly;
+ * all work is being done from the coefficient buffer.
+ */
+ if ( ! ( *cinfo->coef->compress_data ) ( cinfo, ( JSAMPIMAGE ) NULL ) )
+ ERREXIT( cinfo, JERR_CANT_SUSPEND );
+ }
+ ( *cinfo->master->finish_pass ) ( cinfo );
+ }
+ /* Write EOI, do final cleanup */
+ ( *cinfo->marker->write_file_trailer ) ( cinfo );
+ ( *cinfo->dest->term_destination ) ( cinfo );
+ /* We can use jpeg_abort to release memory and reset global_state */
+ jpeg_abort( ( j_common_ptr ) cinfo );
}
@@ -188,44 +183,41 @@
* first call to jpeg_write_scanlines() or jpeg_write_raw_data().
*/
-GLOBAL(void)
-jpeg_write_marker (j_compress_ptr cinfo, int marker,
- const JOCTET *dataptr, unsigned int datalen)
-{
- JMETHOD(void, write_marker_byte, (j_compress_ptr info, int val));
+GLOBAL( void )
+jpeg_write_marker ( j_compress_ptr cinfo, int marker,
+ const JOCTET *dataptr, unsigned int datalen ) {
+ JMETHOD( void, write_marker_byte, ( j_compress_ptr info, int val ) );
- if (cinfo->next_scanline != 0 ||
- (cinfo->global_state != CSTATE_SCANNING &&
- cinfo->global_state != CSTATE_RAW_OK &&
- cinfo->global_state != CSTATE_WRCOEFS))
- ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
+ if ( cinfo->next_scanline != 0 ||
+ ( cinfo->global_state != CSTATE_SCANNING &&
+ cinfo->global_state != CSTATE_RAW_OK &&
+ cinfo->global_state != CSTATE_WRCOEFS ) )
+ ERREXIT1( cinfo, JERR_BAD_STATE, cinfo->global_state );
- (*cinfo->marker->write_marker_header) (cinfo, marker, datalen);
- write_marker_byte = cinfo->marker->write_marker_byte; /* copy for speed */
- while (datalen--) {
- (*write_marker_byte) (cinfo, *dataptr);
- dataptr++;
- }
+ ( *cinfo->marker->write_marker_header ) ( cinfo, marker, datalen );
+ write_marker_byte = cinfo->marker->write_marker_byte; /* copy for speed */
+ while ( datalen-- ) {
+ ( *write_marker_byte ) ( cinfo, *dataptr );
+ dataptr++;
+ }
}
/* Same, but piecemeal. */
-GLOBAL(void)
-jpeg_write_m_header (j_compress_ptr cinfo, int marker, unsigned int datalen)
-{
- if (cinfo->next_scanline != 0 ||
- (cinfo->global_state != CSTATE_SCANNING &&
- cinfo->global_state != CSTATE_RAW_OK &&
- cinfo->global_state != CSTATE_WRCOEFS))
- ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
+GLOBAL( void )
+jpeg_write_m_header ( j_compress_ptr cinfo, int marker, unsigned int datalen ) {
+ if ( cinfo->next_scanline != 0 ||
+ ( cinfo->global_state != CSTATE_SCANNING &&
+ cinfo->global_state != CSTATE_RAW_OK &&
+ cinfo->global_state != CSTATE_WRCOEFS ) )
+ ERREXIT1( cinfo, JERR_BAD_STATE, cinfo->global_state );
- (*cinfo->marker->write_marker_header) (cinfo, marker, datalen);
+ ( *cinfo->marker->write_marker_header ) ( cinfo, marker, datalen );
}
-GLOBAL(void)
-jpeg_write_m_byte (j_co...
[truncated message content] |
|
From: <at...@us...> - 2007-08-09 21:57:42
|
Revision: 434
http://cadcdev.svn.sourceforge.net/cadcdev/?rev=434&view=rev
Author: atani
Date: 2007-08-09 14:57:40 -0700 (Thu, 09 Aug 2007)
Log Message:
-----------
initialize ansiptr in constructor, fixes ansi parsing to not ignore first ESC character
Modified Paths:
--------------
tiki/src/gl/drawables/console.cpp
Modified: tiki/src/gl/drawables/console.cpp
===================================================================
--- tiki/src/gl/drawables/console.cpp 2007-08-04 17:39:47 UTC (rev 433)
+++ tiki/src/gl/drawables/console.cpp 2007-08-09 21:57:40 UTC (rev 434)
@@ -48,6 +48,7 @@
m_autoWrap = true;
m_ansi = false;
m_autoRefresh = false;
+ ansiptr = 0;
color(GREY,BLACK);
clear();
@@ -136,34 +137,34 @@
}
if(ansiptr) {
- if(ansiptr > 50) {
- ansiptr = 0;
- }
- ansistr[ansiptr++] = buf[i];
- ansistr[ansiptr] = 0;
- if(!isdigit(buf[i]) && ((buf[i] != '[') && (buf[i] != ';'))) {
- processAnsiString();
- }
- } else if(buf[i] == '\x1b' && m_ansi) {
- ansistr[0] = buf[i];
- ansiptr = 1;
- ansistr[ansiptr] = 0;
- } else {
- if(buf[i] == '\n') {
- m_cursor_y++;
- m_cursor_x=0;
- continue;
- } else if(buf[i] == '\r') {
- m_cursor_x = 0;
- continue;
- } else if(buf[i] == '\b') {
- m_cursor_x--;
- if(m_cursor_x < 0) m_cursor_x = 0;
- continue;
- } else if(buf[i] == 12) { // funky old style clearscreen
- clear();
- continue;
- }
+ if(ansiptr > 50) {
+ ansiptr = 0;
+ }
+ ansistr[ansiptr++] = buf[i];
+ ansistr[ansiptr] = 0;
+ if(!isdigit(buf[i]) && ((buf[i] != '[') && (buf[i] != ';'))) {
+ processAnsiString();
+ }
+ } else if(buf[i] == '\x1b' && m_ansi) {
+ ansistr[0] = buf[i];
+ ansiptr = 1;
+ ansistr[ansiptr] = 0;
+ } else {
+ if(buf[i] == '\n') {
+ m_cursor_y++;
+ m_cursor_x=0;
+ continue;
+ } else if(buf[i] == '\r') {
+ m_cursor_x = 0;
+ continue;
+ } else if(buf[i] == '\b') {
+ m_cursor_x--;
+ if(m_cursor_x < 0) m_cursor_x = 0;
+ continue;
+ } else if(buf[i] == 12) { // funky old style clearscreen
+ clear();
+ continue;
+ }
assert(m_cursor_x >= 0 && m_cursor_y >= 0 && m_cursor_x < m_cols && m_cursor_y < m_rows);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ljs...@us...> - 2007-08-04 17:39:52
|
Revision: 433
http://cadcdev.svn.sourceforge.net/cadcdev/?rev=433&view=rev
Author: ljsebald
Date: 2007-08-04 10:39:47 -0700 (Sat, 04 Aug 2007)
Log Message:
-----------
A little cleaner way of dealing with those lvalue casts.
Modified Paths:
--------------
kos/kernel/arch/dreamcast/kernel/exec.c
kos/kernel/arch/dreamcast/kernel/init.c
Modified: kos/kernel/arch/dreamcast/kernel/exec.c
===================================================================
--- kos/kernel/arch/dreamcast/kernel/exec.c 2007-08-04 02:42:38 UTC (rev 432)
+++ kos/kernel/arch/dreamcast/kernel/exec.c 2007-08-04 17:39:47 UTC (rev 433)
@@ -84,8 +84,9 @@
/* Jump to the trampoline */
{
- void (*trampoline)() __noreturn;
- *((uint32 *) &trampoline) = (uint32)buffer;
+ typedef void (*trampoline_func)() __noreturn;
+ trampoline_func trampoline = (trampoline_func)buffer;
+
trampoline();
}
}
Modified: kos/kernel/arch/dreamcast/kernel/init.c
===================================================================
--- kos/kernel/arch/dreamcast/kernel/init.c 2007-08-04 02:42:38 UTC (rev 432)
+++ kos/kernel/arch/dreamcast/kernel/init.c 2007-08-04 17:39:47 UTC (rev 433)
@@ -253,14 +253,15 @@
/* Called to jump back to the BIOS menu; assumes a normal shutdown is possible */
void arch_menu() {
- void (*menu)(int) __noreturn;
+ typedef void (*menufunc)(int) __noreturn;
+ menufunc menu;
/* Shut down */
arch_shutdown();
/* Jump to the menus */
dbglog(DBG_CRITICAL, "arch: exiting the system to the BIOS menu\n");
- *((uint32 *) &menu) = *((uint32 *) 0x8c0000e0);
+ menu = (menufunc)(*((uint32 *) 0x8c0000e0));
menu(1);
}
@@ -291,7 +292,8 @@
/* Called to reboot the system; assume the system is in peril and don't
try to call the dtors */
void arch_reboot() {
- void (*rb)() __noreturn;
+ typedef void (*reboot_func)() __noreturn;
+ reboot_func rb;
dbglog(DBG_CRITICAL, "arch: rebooting the system\n");
@@ -299,6 +301,6 @@
irq_disable();
/* Reboot */
- *((uint32 *) &rb) = 0xa0000000;
+ rb = (reboot_func)0xa0000000;
rb();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ljs...@us...> - 2007-08-04 02:42:39
|
Revision: 432
http://cadcdev.svn.sourceforge.net/cadcdev/?rev=432&view=rev
Author: ljsebald
Date: 2007-08-03 19:42:38 -0700 (Fri, 03 Aug 2007)
Log Message:
-----------
No more cast expressions as lvalues...
Modified Paths:
--------------
kos/kernel/arch/dreamcast/kernel/exec.c
kos/kernel/arch/dreamcast/kernel/init.c
Modified: kos/kernel/arch/dreamcast/kernel/exec.c
===================================================================
--- kos/kernel/arch/dreamcast/kernel/exec.c 2007-08-03 04:26:06 UTC (rev 431)
+++ kos/kernel/arch/dreamcast/kernel/exec.c 2007-08-04 02:42:38 UTC (rev 432)
@@ -85,7 +85,7 @@
/* Jump to the trampoline */
{
void (*trampoline)() __noreturn;
- ((uint32 *)trampoline) = buffer;
+ *((uint32 *) &trampoline) = (uint32)buffer;
trampoline();
}
}
Modified: kos/kernel/arch/dreamcast/kernel/init.c
===================================================================
--- kos/kernel/arch/dreamcast/kernel/init.c 2007-08-03 04:26:06 UTC (rev 431)
+++ kos/kernel/arch/dreamcast/kernel/init.c 2007-08-04 02:42:38 UTC (rev 432)
@@ -23,6 +23,8 @@
extern int _bss_start, end;
+void _atexit_call_all();
+
/* Ditto */
int main(int argc, char **argv);
@@ -251,13 +253,15 @@
/* Called to jump back to the BIOS menu; assumes a normal shutdown is possible */
void arch_menu() {
+ void (*menu)(int) __noreturn;
+
/* Shut down */
arch_shutdown();
/* Jump to the menus */
dbglog(DBG_CRITICAL, "arch: exiting the system to the BIOS menu\n");
-
- { void (*menu)(int) __noreturn; ((uint32 *)menu) = *((uint32 *)0x8c0000e0); menu(1); }
+ *((uint32 *) &menu) = *((uint32 *) 0x8c0000e0);
+ menu(1);
}
/* Called to shut down non-gracefully; assume the system is in peril
@@ -287,11 +291,14 @@
/* Called to reboot the system; assume the system is in peril and don't
try to call the dtors */
void arch_reboot() {
+ void (*rb)() __noreturn;
+
dbglog(DBG_CRITICAL, "arch: rebooting the system\n");
/* Ensure that interrupts are disabled */
irq_disable();
/* Reboot */
- { void (*rb)() __noreturn; ((uint32*)rb) = (uint32 *)0xa0000000; rb(); }
+ *((uint32 *) &rb) = 0xa0000000;
+ rb();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ljs...@us...> - 2007-08-03 04:26:09
|
Revision: 431
http://cadcdev.svn.sourceforge.net/cadcdev/?rev=431&view=rev
Author: ljsebald
Date: 2007-08-02 21:26:06 -0700 (Thu, 02 Aug 2007)
Log Message:
-----------
A small fix for the texture_render example.
Modified Paths:
--------------
kos/examples/dreamcast/pvr/texture_render/ta.c
Modified: kos/examples/dreamcast/pvr/texture_render/ta.c
===================================================================
--- kos/examples/dreamcast/pvr/texture_render/ta.c 2007-08-03 04:19:54 UTC (rev 430)
+++ kos/examples/dreamcast/pvr/texture_render/ta.c 2007-08-03 04:26:06 UTC (rev 431)
@@ -28,7 +28,7 @@
int i;
polyplace_t *p;
- for (i=0; i<12; i++) {
+ for (i=0; i<6; i++) {
p = polys+i;
p->x += p->dx;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ljs...@us...> - 2007-08-03 04:19:58
|
Revision: 430
http://cadcdev.svn.sourceforge.net/cadcdev/?rev=430&view=rev
Author: ljsebald
Date: 2007-08-02 21:19:54 -0700 (Thu, 02 Aug 2007)
Log Message:
-----------
Adding in a few more inet functions for dealing with parsing and packing internet addresses.
Modified Paths:
--------------
kos/include/arpa/inet.h
kos/include/netinet/in.h
kos/kernel/libc/koslib/Makefile
kos/kernel/libc/koslib/inet_addr.c
Added Paths:
-----------
kos/kernel/libc/koslib/inet_aton.c
kos/kernel/libc/koslib/inet_ntoa.c
kos/kernel/libc/koslib/inet_ntop.c
kos/kernel/libc/koslib/inet_pton.c
Modified: kos/include/arpa/inet.h
===================================================================
--- kos/include/arpa/inet.h 2007-07-29 03:21:16 UTC (rev 429)
+++ kos/include/arpa/inet.h 2007-08-03 04:19:54 UTC (rev 430)
@@ -1,7 +1,7 @@
/* KallistiOS ##version##
arpa/inet.h
- Copyright (C)2006 Lawrence Sebald
+ Copyright (C) 2006, 2007 Lawrence Sebald
*/
@@ -9,10 +9,13 @@
#define __ARPA_INET_H
#include <sys/cdefs.h>
-#include <netinet/in.h>
__BEGIN_DECLS
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <sys/socket.h>
+
uint32 htonl(uint32 value);
uint32 ntohl(uint32 value);
@@ -20,7 +23,14 @@
uint16 ntohs(uint16 value);
in_addr_t inet_addr(const char *cp);
+int inet_aton(const char *cp, struct in_addr *pin);
+int inet_pton(int af, const char *src, void *dst);
+const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
+
+/* Non-reentrant */
+char *inet_ntoa(struct in_addr addr);
+
__END_DECLS
#endif /* __ARPA_INET_H */
Modified: kos/include/netinet/in.h
===================================================================
--- kos/include/netinet/in.h 2007-07-29 03:21:16 UTC (rev 429)
+++ kos/include/netinet/in.h 2007-08-03 04:19:54 UTC (rev 430)
@@ -1,7 +1,7 @@
/* KallistiOS ##version##
netinet/in.h
- Copyright (C)2006 Lawrence Sebald
+ Copyright (C) 2006, 2007 Lawrence Sebald
*/
@@ -13,8 +13,15 @@
__BEGIN_DECLS
+#ifndef __IN_PORT_T_DEFINED
+#define __IN_PORT_T_DEFINED
typedef uint16 in_port_t;
+#endif
+
+#ifndef __IN_ADDR_T_DEFINED
+#define __IN_ADDR_T_DEFINED
typedef uint32 in_addr_t;
+#endif
#ifndef __SA_FAMILY_T_DEFINED
#define __SA_FAMILY_T_DEFINED
@@ -34,10 +41,13 @@
#define INADDR_ANY 0x00000000
#define INADDR_BROADCAST 0xFFFFFFFF
+#define INADDR_NONE 0xFFFFFFFF
/* IP Protocols */
-#define IPPROTO_IP 0
-#define IPPROTO_UDP 17
+#define IPPROTO_IP 0
+#define IPPROTO_ICMP 1
+#define IPPROTO_TCP 6
+#define IPPROTO_UDP 17
__END_DECLS
Modified: kos/kernel/libc/koslib/Makefile
===================================================================
--- kos/kernel/libc/koslib/Makefile 2007-07-29 03:21:16 UTC (rev 429)
+++ kos/kernel/libc/koslib/Makefile 2007-08-03 04:19:54 UTC (rev 430)
@@ -11,6 +11,7 @@
assert.o dbglog.o malloc.o crtbegin.o crtend.o atexit.o \
opendir.o readdir.o closedir.o rewinddir.o scandir.o seekdir.o \
telldir.o usleep.o inet_addr.o realpath.o getcwd.o chdir.o mkdir.o \
- creat.o sleep.o rmdir.o rename.o
+ creat.o sleep.o rmdir.o rename.o inet_pton.o inet_ntop.o \
+ inet_ntoa.o inet_aton.o
include $(KOS_BASE)/Makefile.prefab
Modified: kos/kernel/libc/koslib/inet_addr.c
===================================================================
--- kos/kernel/libc/koslib/inet_addr.c 2007-07-29 03:21:16 UTC (rev 429)
+++ kos/kernel/libc/koslib/inet_addr.c 2007-08-03 04:19:54 UTC (rev 430)
@@ -1,49 +1,19 @@
/* KallistiOS ##version##
inet_addr.c
- Copyright (C)2006 Lawrence Sebald
+ Copyright (C) 2006, 2007 Lawrence Sebald
*/
#include <arpa/inet.h>
-#include <stdlib.h>
in_addr_t inet_addr(const char *cp) {
- in_addr_t result = 0;
- long tmp;
- char *ptr;
+ struct in_addr addr;
- tmp = strtoul(cp, &ptr, 10);
- if(tmp > 0xFF || cp == ptr) {
- return (in_addr_t) -1;
+ /* inet_aton() returns 0 on failure, 1 on success */
+ if(inet_aton(cp, &addr)) {
+ return addr.s_addr;
}
- else {
- result = tmp << 24;
- }
- tmp = strtoul(ptr + 1, &ptr, 10);
- if(tmp > 0xFF || cp == ptr) {
- return (in_addr_t) -1;
- }
- else {
- result |= tmp << 16;
- }
-
- tmp = strtoul(ptr + 1, &ptr, 10);
- if(tmp > 0xFF || cp == ptr) {
- return (in_addr_t) -1;
- }
- else {
- result |= tmp << 8;
- }
-
- tmp = strtoul(ptr + 1, &ptr, 10);
- if(tmp > 0xFF || cp == ptr) {
- return (in_addr_t) -1;
- }
- else {
- result |= tmp;
- }
-
- return (in_addr_t) htonl(result);
+ return INADDR_NONE;
}
Added: kos/kernel/libc/koslib/inet_aton.c
===================================================================
--- kos/kernel/libc/koslib/inet_aton.c (rev 0)
+++ kos/kernel/libc/koslib/inet_aton.c 2007-08-03 04:19:54 UTC (rev 430)
@@ -0,0 +1,118 @@
+/* KallistiOS ##version##
+
+ inet_aton.c
+ Copyright (C) 2007 Lawrence Sebald
+
+*/
+
+#include <arpa/inet.h>
+
+int inet_aton(const char *cp, struct in_addr *pin) {
+ int parts[4] = { 0 };
+ int count = 0;
+ int base = 0;
+ char tmp;
+
+ for(; *cp && count < 4; ++cp) {
+ if(*cp == '.') {
+ ++count;
+ base = 0;
+ }
+ else if(base == 0) {
+ /* Determine which base this part is in */
+ if(*cp == '0') {
+ tmp = *++cp;
+
+ if(tmp == '.') {
+ base = 0;
+ parts[count++] = 0;
+ }
+ else if(tmp == '\0') {
+ base = 0;
+ parts[count] = 0;
+ --cp;
+ }
+ else if(tmp != 'x' && tmp != 'X') {
+ /* Octal, handle the character just read too. */
+ base = 8;
+ parts[count] = *cp - '0';
+ }
+ else {
+ /* Hexadecimal */
+ base = 16;
+ }
+ }
+ else if(*cp > '0' && *cp <= '9') {
+ /* Decimal, handle the digit */
+ base = 10;
+ parts[count] = *cp - '0';
+ }
+ else {
+ /* Non-number starting character... bail out. */
+ return 0;
+ }
+ }
+ else if(base == 10 && *cp >= '0' && *cp <= '9') {
+ parts[count] *= 10;
+ parts[count] += *cp - '0';
+ }
+ else if(base == 8 && *cp >= '0' && *cp <= '7') {
+ parts[count] <<= 3;
+ parts[count] += *cp - '0';
+ }
+ else if(base == 16) {
+ parts[count] <<= 4;
+
+ if(*cp >= '0' && *cp <= '9') {
+ parts[count] += *cp - '0';
+ }
+ else if(*cp >= 'A' && *cp <= 'F') {
+ parts[count] += *cp - 'A' + 10;
+ }
+ else if(*cp >= 'a' && *cp <= 'f') {
+ parts[count] += *cp - 'a' + 10;
+ }
+ else {
+ /* Invalid hex digit */
+ return 0;
+ }
+ }
+ else {
+ /* Invalid digit, and not a dot... bail */
+ return 0;
+ }
+ }
+
+ if(count == 4) {
+ /* Too many dots, bail out */
+ return 0;
+ }
+
+ /* Validate each part */
+ if(count == 0) {
+ /* Easiest case, store our computed part, and it's done */
+ pin->s_addr = htonl(parts[0]);
+ }
+ else if(count == 1) {
+ if(parts[0] > 0xFF || parts[1] > 0xFFFFFF)
+ return 0;
+
+ pin->s_addr = htonl(parts[0] << 24 | parts[1]);
+ }
+ else if(count == 2) {
+ if(parts[0] > 0xFF || parts[1] > 0xFF || parts[2] > 0xFFFF)
+ return 0;
+
+ pin->s_addr = htonl(parts[0] << 24 | parts[1] << 16 | parts[2]);
+ }
+ else {
+ if(parts[0] > 0xFF || parts[1] > 0xFF ||
+ parts[2] > 0xFF || parts[3] > 0xFF)
+ return 0;
+
+ pin->s_addr = htonl(parts[0] << 24 | parts[1] << 16 |
+ parts[2] << 8 | parts[3]);
+ }
+
+ return 1;
+}
Added: kos/kernel/libc/koslib/inet_ntoa.c
===================================================================
--- kos/kernel/libc/koslib/inet_ntoa.c (rev 0)
+++ kos/kernel/libc/koslib/inet_ntoa.c 2007-08-03 04:19:54 UTC (rev 430)
@@ -0,0 +1,45 @@
+/* KallistiOS ##version##
+
+ inet_ntoa.c
+ Copyright (C) 2007 Lawrence Sebald
+
+*/
+
+#include <arpa/inet.h>
+
+char *inet_ntoa(struct in_addr addr) {
+ static char str[16]; /* XXX.XXX.XXX.XXX = 15 chars + 1 for NUL */
+ char tmp[3];
+ int i, part;
+ char *ch = tmp;
+ char *ch2 = str;
+
+ /* Parse each 8 bits individually. */
+ for(i = 0; i < 4; ++i) {
+ /* Treat the 32-bit address value as if it were an array of 8-bit
+ values. This works, regardless of the endianness of the host system
+ because the specs require the address passed in here to be in
+ network byte order (big endian). */
+ part = ((uint8 *) &addr.s_addr)[i];
+
+ do {
+ *ch++ = '0' + (char)(part % 10);
+ part /= 10;
+ } while(part);
+
+ /* tmp now contains the inverse of the number that is in the given
+ 8 bits. Reverse it for the final result, rewinding ch to the
+ beginning of tmp in the process. */
+ while(ch != tmp) {
+ *ch2++ = *--ch;
+ }
+
+ *ch2++ = '.';
+ }
+
+ /* There's a trailing '.' at the end of the address, change it to the
+ required NUL character */
+ *--ch2 = 0;
+
+ return str;
+}
Added: kos/kernel/libc/koslib/inet_ntop.c
===================================================================
--- kos/kernel/libc/koslib/inet_ntop.c (rev 0)
+++ kos/kernel/libc/koslib/inet_ntop.c 2007-08-03 04:19:54 UTC (rev 430)
@@ -0,0 +1,58 @@
+/* KallistiOS ##version##
+
+ inet_ntop.c
+ Copyright (C) 2007 Lawrence Sebald
+
+*/
+
+#include <arpa/inet.h>
+#include <errno.h>
+
+const char *inet_ntop(int af, const void *src, char *dst, socklen_t size) {
+ char tmp[3];
+ int i, part;
+ char *ch = tmp;
+ char *ch2 = dst;
+ struct in_addr *addr = (struct in_addr *)src;
+
+ if(af != AF_INET) {
+ errno = EAFNOSUPPORT;
+ return NULL;
+ }
+
+ /* Parse each 8 bits individually. */
+ for(i = 0; i < 4; ++i) {
+ /* Treat the 32-bit address value as if it were an array of 8-bit
+ values. This works, regardless of the endianness of the host system
+ because the specs require the address passed in here to be in
+ network byte order (big endian). */
+ part = ((uint8 *) &addr->s_addr)[i];
+
+ do {
+ *ch++ = '0' + (char)(part % 10);
+ part /= 10;
+ } while(part);
+
+ /* tmp now contains the inverse of the number that is in the given
+ 8 bits. Reverse it for the final result, rewinding ch to the
+ beginning of tmp in the process. */
+ while(ch != tmp && size) {
+ *ch2++ = *--ch;
+ --size;
+ }
+
+ if(!size) {
+ errno = ENOSPC;
+ return NULL;
+ }
+
+ *ch2++ = '.';
+ --size;
+ }
+
+ /* There's a trailing '.' at the end of the address, change it to the
+ required NUL character */
+ *--ch2 = 0;
+
+ return dst;
+}
Added: kos/kernel/libc/koslib/inet_pton.c
===================================================================
--- kos/kernel/libc/koslib/inet_pton.c (rev 0)
+++ kos/kernel/libc/koslib/inet_pton.c 2007-08-03 04:19:54 UTC (rev 430)
@@ -0,0 +1,51 @@
+/* KallistiOS ##version##
+
+ inet_pton.c
+ Copyright (C) 2007 Lawrence Sebald
+
+*/
+
+#include <arpa/inet.h>
+#include <errno.h>
+
+int inet_pton(int af, const char *src, void *dst) {
+ int parts[4] = { 0 };
+ int count = 0;
+ struct in_addr *addr = (struct in_addr *)dst;
+
+ if(af != AF_INET) {
+ errno = EAFNOSUPPORT;
+ return -1;
+ }
+
+ for(; *src && count < 4; ++src) {
+ if(*src == '.') {
+ ++count;
+ }
+ /* Unlike inet_aton(), inet_pton() only supports decimal parts */
+ else if(*src >= '0' && *src <= '9') {
+ parts[count] *= 10;
+ parts[count] += *src - '0';
+ }
+ else {
+ /* Invalid digit, and not a dot... bail */
+ return 0;
+ }
+ }
+
+ if(count != 3) {
+ /* Not the right number of parts, bail */
+ return 0;
+ }
+
+ /* Validate each part, note that unlike inet_aton(), inet_pton() only
+ supports the standard xxx.xxx.xxx.xxx addresses. */
+ if(parts[0] > 0xFF || parts[1] > 0xFF ||
+ parts[2] > 0xFF || parts[3] > 0xFF)
+ return 0;
+
+ addr->s_addr = htonl(parts[0] << 24 | parts[1] << 16 |
+ parts[2] << 8 | parts[3]);
+
+ return 1;
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <c99...@us...> - 2007-07-29 03:21:18
|
Revision: 429
http://cadcdev.svn.sourceforge.net/cadcdev/?rev=429&view=rev
Author: c99koder
Date: 2007-07-28 20:21:16 -0700 (Sat, 28 Jul 2007)
Log Message:
-----------
Tiki: NDS: Keep interrupts enabled during sound mixing, move wifi update into its own timer, include missing header file
Modified Paths:
--------------
tiki/nds/arm7_template/source/arm7main.c
tiki/nds/src/audio/stream.cpp
tiki/nds/src/init_shutdown.cpp
tiki/nds/src/plathid.cpp
Added Paths:
-----------
tiki/nds/include/dssoundstream.h
Modified: tiki/nds/arm7_template/source/arm7main.c
===================================================================
--- tiki/nds/arm7_template/source/arm7main.c 2007-07-28 19:00:43 UTC (rev 428)
+++ tiki/nds/arm7_template/source/arm7main.c 2007-07-29 03:21:16 UTC (rev 429)
@@ -152,6 +152,7 @@
}
void arm7_synctoarm9() { // send fifo message
+ SendCommandToArm9(0x87654321);
}
//---------------------------------------------------------------------------------
Added: tiki/nds/include/dssoundstream.h
===================================================================
--- tiki/nds/include/dssoundstream.h (rev 0)
+++ tiki/nds/include/dssoundstream.h 2007-07-29 03:21:16 UTC (rev 429)
@@ -0,0 +1,66 @@
+/*
+ Tiki
+
+ dssoundstream.h
+
+ based on the ARM9/ARM7 streaming code from
+ http://forum.gbadev.org/viewtopic.php?t=10739
+*/
+
+#ifndef __NDSSOUND_H
+#define __NDSSOUND_H
+
+#include <nds.h>
+
+#define CLOCK (1 << 25)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum
+{
+ NONE = 0,
+ INIT = 1,
+ MIX = 2,
+ MIXING = 4,
+ STOP = 8
+}CommandType;
+
+typedef enum
+{
+ FIFO_NONE = 0,
+ UPDATEON_ARM9 = 1,
+ MIXCOMPLETE_ONARM9 = 2
+}FifoType;
+
+typedef struct
+{
+ s8 *mixbuffer;
+ u32 rate;
+ u32 buffersize;
+ u32 cmd;
+ u8 channel,format;
+ u32 soundcursor,numsamples;
+ s32 prevtimer;
+ s16 period;
+}S_SoundSystem;
+
+#define soundsystem ((S_SoundSystem*)((u32)(IPC)+sizeof(TransferRegion)))
+
+#ifdef ARM9
+extern void SoundSystemInit(u32 rate,u32 buffersize,u8 channel,u8 format);
+extern void SoundStartMixer(void);
+extern void SendCommandToArm7(u32 command);
+#else
+extern void SoundVBlankIrq(void);
+extern void SoundSwapAndMix(void);
+extern void SoundSetTimer(int period);
+extern void SoundFifoHandler(void);
+extern void SendCommandToArm9(u32 command);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif
Property changes on: tiki/nds/include/dssoundstream.h
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: tiki/nds/src/audio/stream.cpp
===================================================================
--- tiki/nds/src/audio/stream.cpp 2007-07-28 19:00:43 UTC (rev 428)
+++ tiki/nds/src/audio/stream.cpp 2007-07-29 03:21:16 UTC (rev 429)
@@ -52,8 +52,11 @@
{
case FIFO_NONE:
break;
+ case 0x87654321:
+ Wifi_Sync();
+ break;
case UPDATEON_ARM9:
- REG_IME = 0;
+ //REG_IME = 0;
for(streams_iter = streams.begin(); streams_iter != streams.end(); streams_iter++) {
if(soundsystem->format == 8)
{
@@ -82,12 +85,11 @@
}
}
}
- REG_IME = 1;
+ //REG_IME = 1;
SendCommandToArm7(MIXCOMPLETE_ONARM9);
break;
}
}
- Wifi_Sync();
}
void SendCommandToArm7(u32 command)
@@ -114,7 +116,7 @@
Stream::Stream() {
// Default our members.
- m_bufSize = 16384;
+ m_bufSize = 4096;
m_chnCount = 2;
m_freq = 44100;
m_queueing = false;
Modified: tiki/nds/src/init_shutdown.cpp
===================================================================
--- tiki/nds/src/init_shutdown.cpp 2007-07-28 19:00:43 UTC (rev 428)
+++ tiki/nds/src/init_shutdown.cpp 2007-07-29 03:21:16 UTC (rev 429)
@@ -16,12 +16,16 @@
#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
- //This is a NO-OP because the sound streaming code will constantly communicate with the ARM7 over the FIFO anyway
+ 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) {
@@ -46,7 +50,8 @@
GL::Plxcompat::plx_mat3d_init(256, 192);
Audio::Stream::initGlobal();
Hid::init();
-
+ irqSet(IRQ_TIMER3, Timer_50ms); // setup timer IRQ
+ irqEnable(IRQ_TIMER3);
{ // send fifo message to initialize the arm7 wifi
REG_IPC_FIFO_CR = IPC_FIFO_ENABLE | IPC_FIFO_SEND_CLEAR; // enable & clear FIFO
@@ -59,6 +64,10 @@
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();
Modified: tiki/nds/src/plathid.cpp
===================================================================
--- tiki/nds/src/plathid.cpp 2007-07-28 19:00:43 UTC (rev 428)
+++ tiki/nds/src/plathid.cpp 2007-07-29 03:21:16 UTC (rev 429)
@@ -117,12 +117,11 @@
}
oldkeys = keys;
- Wifi_Timer(50);
__timecounter += 15000;
}
bool platInit() {
- irqSet(IRQ_VCOUNT,&TikiVBlank);
+ irqSet(IRQ_VBLANK,&TikiVBlank);
irqEnable(IRQ_VBLANK | IRQ_VCOUNT);
NDSjs = new JsDevice;
NDSmouse = new MouseDevice;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <c99...@us...> - 2007-07-28 19:00:44
|
Revision: 428
http://cadcdev.svn.sourceforge.net/cadcdev/?rev=428&view=rev
Author: c99koder
Date: 2007-07-28 12:00:43 -0700 (Sat, 28 Jul 2007)
Log Message:
-----------
Tiki: NDS: Touchscreen support
Modified Paths:
--------------
tiki/nds/src/plathid.cpp
Modified: tiki/nds/src/plathid.cpp
===================================================================
--- tiki/nds/src/plathid.cpp 2007-07-28 06:27:21 UTC (rev 427)
+++ tiki/nds/src/plathid.cpp 2007-07-28 19:00:43 UTC (rev 428)
@@ -3,46 +3,76 @@
#include "Tiki/hid.h"
#include <dswifi9.h>
+using namespace Tiki::Hid;
+
volatile uint64 __timecounter = 0;
+class MouseDevice : public Device {
+public:
+ MouseDevice() { }
+ virtual ~MouseDevice() { }
+
+ virtual Type getType() const { return TypeMouse; }
+ virtual string getName() const { return "NDS Touchscreen"; }
+};
+
+class JsDevice : public Device {
+public:
+ JsDevice() { }
+ virtual ~JsDevice() { }
+
+ virtual Type getType() const { return TypeJoystick; }
+ virtual string getName() const { return "NDS Controller"; }
+};
+
+static RefPtr<MouseDevice> NDSmouse;
+static RefPtr<JsDevice> NDSjs;
+
namespace Tiki {
namespace Hid {
#define CONTROLLER_BUTTON_MAP(OLDSTATE, NEWSTATE, BUTTON, EVENT) \
- if((NEWSTATE & BUTTON) && !(OLDSTATE & BUTTON)) { \
- Event evt(Event::EvtBtnPress); \
- evt.btn = EVENT; \
- evt.port = 1; \
- sendEvent(evt); \
- } \
- if(!(NEWSTATE & BUTTON) && (OLDSTATE & BUTTON)) { \
- Event evt(Event::EvtBtnRelease); \
- evt.btn = EVENT; \
- evt.port = 1; \
- sendEvent(evt); \
- }
+ if((NEWSTATE & BUTTON) && !(OLDSTATE & BUTTON)) { \
+ Event evt(Event::EvtBtnPress); \
+ evt.dev = NDSjs; \
+ evt.btn = EVENT; \
+ evt.port = 1; \
+ sendEvent(evt); \
+ } \
+ if(!(NEWSTATE & BUTTON) && (OLDSTATE & BUTTON)) { \
+ Event evt(Event::EvtBtnRelease); \
+ evt.dev = NDSjs; \
+ evt.btn = EVENT; \
+ evt.port = 1; \
+ sendEvent(evt); \
+ }
#define CONTROLLER_KEY_MAP(OLDSTATE, NEWSTATE, BUTTON, EVENT) \
- if((NEWSTATE & BUTTON) && !(OLDSTATE & BUTTON)) { \
- Event evtPress(Event::EvtKeypress); \
- evtPress.key = EVENT; \
- evtPress.port = 1; \
- sendEvent(evtPress); \
- \
- Event evt(Event::EvtKeyDown); \
- evt.key = EVENT; \
- evt.port = 1; \
- sendEvent(evt); \
- } \
- if(!(NEWSTATE & BUTTON) && (OLDSTATE & BUTTON)) { \
- Event evt(Event::EvtKeyUp); \
- evt.key = EVENT; \
- evt.port = 1; \
- sendEvent(evt); \
- }
+ if((NEWSTATE & BUTTON) && !(OLDSTATE & BUTTON)) { \
+ Event evtPress(Event::EvtKeypress); \
+ evtPress.dev = NDSjs; \
+ evtPress.key = EVENT; \
+ evtPress.port = 1; \
+ sendEvent(evtPress); \
+ \
+ Event evt(Event::EvtKeyDown); \
+ evt.dev = NDSjs; \
+ evt.key = EVENT; \
+ evt.port = 1; \
+ sendEvent(evt); \
+ } \
+ if(!(NEWSTATE & BUTTON) && (OLDSTATE & BUTTON)) { \
+ Event evt(Event::EvtKeyUp); \
+ evt.dev = NDSjs; \
+ evt.key = EVENT; \
+ evt.port = 1; \
+ sendEvent(evt); \
+ }
void TikiVBlank(void)
{
static u32 oldkeys = 0;
+ static u16 mouseX = 0, mouseY = 0;
+ touchPosition tp;
scanKeys();
u32 keys = keysHeld();
@@ -66,6 +96,26 @@
CONTROLLER_KEY_MAP(oldkeys, keys, KEY_A, 32);
CONTROLLER_KEY_MAP(oldkeys, keys, KEY_B, Event::KeyEsc);
+ //Touchscreen
+ if(keys & KEY_TOUCH) {
+ tp = touchReadXY();
+ Event evt(Event::EvtBtnPress);
+ evt.dev = NDSmouse;
+ evt.btn = Event::MouseLeftBtn;
+ evt.port = 1;
+ evt.x = mouseX = tp.px;
+ evt.y = mouseY = tp.py;
+ sendEvent(evt);
+ } else if(oldkeys & KEY_TOUCH) {
+ Event evt(Event::EvtBtnRelease);
+ evt.dev = NDSmouse;
+ evt.btn = Event::MouseLeftBtn;
+ evt.port = 1;
+ evt.x = mouseX;
+ evt.y = mouseY;
+ sendEvent(evt);
+ }
+
oldkeys = keys;
Wifi_Timer(50);
__timecounter += 15000;
@@ -74,6 +124,8 @@
bool platInit() {
irqSet(IRQ_VCOUNT,&TikiVBlank);
irqEnable(IRQ_VBLANK | IRQ_VCOUNT);
+ NDSjs = new JsDevice;
+ NDSmouse = new MouseDevice;
return true;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <c99...@us...> - 2007-07-28 06:27:23
|
Revision: 427
http://cadcdev.svn.sourceforge.net/cadcdev/?rev=427&view=rev
Author: c99koder
Date: 2007-07-27 23:27:21 -0700 (Fri, 27 Jul 2007)
Log Message:
-----------
NDS: Enable optimizations, wifi, and use an interrupt for a higher-resolution Tiki::gettime()
Modified Paths:
--------------
tiki/nds/Makefile.rules
tiki/nds/arm7_template/source/arm7main.c
tiki/nds/src/audio/stream.cpp
tiki/nds/src/init_shutdown.cpp
tiki/nds/src/plathid.cpp
tiki/nds/src/tikitime.cpp
Modified: tiki/nds/Makefile.rules
===================================================================
--- tiki/nds/Makefile.rules 2007-07-22 22:22:43 UTC (rev 426)
+++ tiki/nds/Makefile.rules 2007-07-28 06:27:21 UTC (rev 427)
@@ -12,7 +12,7 @@
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitARM)
endif
-TIKI_BASE_LIBS=-ltiki -L$(DEVKITPRO)/libnds/lib -lfat -lnds9
+TIKI_BASE_LIBS=-ltiki -L$(DEVKITPRO)/libnds/lib -ldswifi9 -lfat -lnds9
CXXFLAGS=-I$(DEVKITPRO)/libnds/include
@@ -25,7 +25,7 @@
CXXFLAGS+=-I$(TIKI_DIR)/3rdparty/libvorbis/include
CXXFLAGS+=-I$(TIKI_DIR)/3rdparty/libvorbis/lib
CXXFLAGS+=-DARM9
-CXXFLAGS+=-march=armv5te -mtune=arm946e-s -fomit-frame-pointer -ffast-math -mthumb -mthumb-interwork
+CXXFLAGS+=-march=armv5te -mtune=arm946e-s -fomit-frame-pointer -ffast-math -mthumb -mthumb-interwork -O2
CFLAGS=$(CXXFLAGS)
CXXFLAGS+=-fno-rtti
Modified: tiki/nds/arm7_template/source/arm7main.c
===================================================================
--- tiki/nds/arm7_template/source/arm7main.c 2007-07-22 22:22:43 UTC (rev 426)
+++ tiki/nds/arm7_template/source/arm7main.c 2007-07-28 06:27:21 UTC (rev 427)
@@ -9,6 +9,7 @@
#include <nds.h>
#include <stdlib.h>
+#include <dswifi7.h>
#include "dssoundstream.h"
//---------------------------------------------------------------------------------
@@ -138,20 +139,26 @@
}
}
}
-
+ Wifi_Update();
}
void FiFoHandler(void)
//---------------------------------------------------------------------------------
{
while ( !(REG_IPC_FIFO_CR & (IPC_FIFO_RECV_EMPTY)) )
{
+ Wifi_Sync();
SoundFifoHandler();
}
}
+
+void arm7_synctoarm9() { // send fifo message
+}
+
//---------------------------------------------------------------------------------
int main(int argc, char ** argv) {
//---------------------------------------------------------------------------------
-
+ u32 fifo_temp;
+
// Reset the clock if needed
rtcReset();
@@ -159,16 +166,33 @@
powerON(POWER_SOUND);
SOUND_CR = SOUND_ENABLE | SOUND_VOL(0x7F);
IPC->soundData = 0;
+ IPC->mailBusy = 0;
irqInit();
irqSet(IRQ_VBLANK, VblankHandler);
SetYtrigger(80);
vcount = 80;
irqSet(IRQ_VCOUNT, VcountHandler);
- REG_IPC_FIFO_CR = IPC_FIFO_ENABLE | IPC_FIFO_SEND_CLEAR | IPC_FIFO_RECV_IRQ;
- irqSet(IRQ_FIFO_NOT_EMPTY, FiFoHandler);
- irqEnable(IRQ_VBLANK | IRQ_VCOUNT|IRQ_FIFO_NOT_EMPTY);
+ REG_IPC_FIFO_CR = IPC_FIFO_ENABLE | IPC_FIFO_SEND_CLEAR;
+ irqEnable(IRQ_VBLANK | IRQ_VCOUNT);
+ irqSet(IRQ_WIFI, Wifi_Interrupt);
+ irqEnable(IRQ_WIFI);
+
+ // trade some mail, to get a pointer from arm9
+ while(1) {
+ while(REG_IPC_FIFO_CR&IPC_FIFO_RECV_EMPTY) swiWaitForVBlank();
+ fifo_temp=REG_IPC_FIFO_RX;
+ if(fifo_temp==0x12345678) break;
+ }
+ while(REG_IPC_FIFO_CR&IPC_FIFO_RECV_EMPTY) swiWaitForVBlank();
+ fifo_temp=REG_IPC_FIFO_RX;
+ Wifi_Init(fifo_temp);
+ irqSet(IRQ_FIFO_NOT_EMPTY,FiFoHandler);
+ irqEnable(IRQ_FIFO_NOT_EMPTY);
+ REG_IPC_FIFO_CR = IPC_FIFO_ENABLE | IPC_FIFO_RECV_IRQ;
+
+ Wifi_SetSyncHandler(arm7_synctoarm9);
SoundSetTimer(0);
// Keep the ARM7 idle
Modified: tiki/nds/src/audio/stream.cpp
===================================================================
--- tiki/nds/src/audio/stream.cpp 2007-07-22 22:22:43 UTC (rev 426)
+++ tiki/nds/src/audio/stream.cpp 2007-07-28 06:27:21 UTC (rev 427)
@@ -14,6 +14,7 @@
#include <string.h>
#include <nds.h>
+#include <dswifi9.h>
#include "dssoundstream.h"
using namespace Tiki::Audio;
@@ -86,6 +87,7 @@
break;
}
}
+ Wifi_Sync();
}
void SendCommandToArm7(u32 command)
Modified: tiki/nds/src/init_shutdown.cpp
===================================================================
--- tiki/nds/src/init_shutdown.cpp 2007-07-22 22:22:43 UTC (rev 426)
+++ tiki/nds/src/init_shutdown.cpp 2007-07-28 06:27:21 UTC (rev 427)
@@ -15,7 +15,13 @@
#include <nds.h>
#include <fat.h>
+#include <dswifi9.h>
+// notification function to send fifo message to arm7
+void arm9_synctoarm7() { // send fifo message
+ //This is a NO-OP because the sound streaming code will constantly communicate with the ARM7 over the FIFO anyway
+}
+
namespace Tiki {
bool init(int argc, char **argv) {
@@ -37,9 +43,30 @@
fatInitDefault();
// initialize parallax
- GL::Plxcompat::plx_mat3d_init(640, 480);
+ GL::Plxcompat::plx_mat3d_init(256, 192);
Audio::Stream::initGlobal();
- return Hid::init();
+ Hid::init();
+
+ { // 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
+
+ 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() {
Modified: tiki/nds/src/plathid.cpp
===================================================================
--- tiki/nds/src/plathid.cpp 2007-07-22 22:22:43 UTC (rev 426)
+++ tiki/nds/src/plathid.cpp 2007-07-28 06:27:21 UTC (rev 427)
@@ -1,7 +1,10 @@
#include "pch.h"
#include "Tiki/glhdrs.h"
#include "Tiki/hid.h"
+#include <dswifi9.h>
+volatile uint64 __timecounter = 0;
+
namespace Tiki {
namespace Hid {
#define CONTROLLER_BUTTON_MAP(OLDSTATE, NEWSTATE, BUTTON, EVENT) \
@@ -64,11 +67,13 @@
CONTROLLER_KEY_MAP(oldkeys, keys, KEY_B, Event::KeyEsc);
oldkeys = keys;
+ Wifi_Timer(50);
+ __timecounter += 15000;
}
bool platInit() {
- irqSet(IRQ_VBLANK,&TikiVBlank);
- irqEnable(IRQ_VBLANK);
+ irqSet(IRQ_VCOUNT,&TikiVBlank);
+ irqEnable(IRQ_VBLANK | IRQ_VCOUNT);
return true;
}
Modified: tiki/nds/src/tikitime.cpp
===================================================================
--- tiki/nds/src/tikitime.cpp 2007-07-22 22:22:43 UTC (rev 426)
+++ tiki/nds/src/tikitime.cpp 2007-07-28 06:27:21 UTC (rev 427)
@@ -13,16 +13,12 @@
#include <unistd.h>
#include <nds.h>
+extern volatile uint64 __timecounter;
+
namespace Tiki {
namespace Time {
uint64 gettime() {
- timeval tv;
- gettimeofday(&tv, NULL);
-
- uint64 rv = tv.tv_sec; rv *= 1000000;
- rv += tv.tv_usec;
-
- return rv;
+ return __timecounter;
}
void sleep(uint64 us) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <c99...@us...> - 2007-07-22 22:22:44
|
Revision: 426
http://svn.sourceforge.net/cadcdev/?rev=426&view=rev
Author: c99koder
Date: 2007-07-22 15:22:43 -0700 (Sun, 22 Jul 2007)
Log Message:
-----------
Tiki: NDS: Fix a typo
Modified Paths:
--------------
tiki/nds/src/audio/stream.cpp
Modified: tiki/nds/src/audio/stream.cpp
===================================================================
--- tiki/nds/src/audio/stream.cpp 2007-07-21 17:52:01 UTC (rev 425)
+++ tiki/nds/src/audio/stream.cpp 2007-07-22 22:22:43 UTC (rev 426)
@@ -14,7 +14,7 @@
#include <string.h>
#include <nds.h>
-#include "soundcommon.h"
+#include "dssoundstream.h"
using namespace Tiki::Audio;
using namespace Tiki::Thread;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <c99...@us...> - 2007-07-21 17:52:07
|
Revision: 425
http://svn.sourceforge.net/cadcdev/?rev=425&view=rev
Author: c99koder
Date: 2007-07-21 10:52:01 -0700 (Sat, 21 Jul 2007)
Log Message:
-----------
NDS: arm7/arm9 streaming code (mono only)
Modified Paths:
--------------
tiki/nds/Makefile.rules
tiki/nds/src/audio/stream.cpp
tiki/nds/src/init_shutdown.cpp
tiki/nds/src/platgl.cpp
Added Paths:
-----------
tiki/nds/arm7_template/
tiki/nds/arm7_template/Makefile
tiki/nds/arm7_template/source/
tiki/nds/arm7_template/source/arm7main.c
tiki/nds/arm7_template/source/dssoundstream.h
tiki/nds/arm7_template/source/sound7.c
Modified: tiki/nds/Makefile.rules
===================================================================
--- tiki/nds/Makefile.rules 2007-07-18 23:45:51 UTC (rev 424)
+++ tiki/nds/Makefile.rules 2007-07-21 17:52:01 UTC (rev 425)
@@ -27,7 +27,7 @@
CXXFLAGS+=-DARM9
CXXFLAGS+=-march=armv5te -mtune=arm946e-s -fomit-frame-pointer -ffast-math -mthumb -mthumb-interwork
CFLAGS=$(CXXFLAGS)
-CXXFLAGS+=-fno-rtti -fno-exceptions
+CXXFLAGS+=-fno-rtti
LDFLAGS=-specs=ds_arm9.specs -mthumb -mthumb-interwork -mno-fpu -L$(DEVKITPRO)/lib -lgcc
Added: tiki/nds/arm7_template/Makefile
===================================================================
--- tiki/nds/arm7_template/Makefile (rev 0)
+++ tiki/nds/arm7_template/Makefile 2007-07-21 17:52:01 UTC (rev 425)
@@ -0,0 +1,138 @@
+#---------------------------------------------------------------------------------
+.SUFFIXES:
+#---------------------------------------------------------------------------------
+ifeq ($(strip $(DEVKITARM)),)
+$(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM)
+endif
+
+include $(DEVKITARM)/ds_rules
+
+#---------------------------------------------------------------------------------
+# BUILD is the directory where object files & intermediate files will be placed
+# SOURCES is a list of directories containing source code
+# INCLUDES is a list of directories containing extra header files
+# DATA is a list of directories containing binary files
+# all directories are relative to this makefile
+#---------------------------------------------------------------------------------
+BUILD := build
+SOURCES := source
+INCLUDES := include build
+DATA :=
+TARGET := tikiarm7
+
+#---------------------------------------------------------------------------------
+# options for code generation
+#---------------------------------------------------------------------------------
+ARCH := -mthumb-interwork
+
+CFLAGS := -g -Wall -O2\
+ -mcpu=arm7tdmi -mtune=arm7tdmi -fomit-frame-pointer\
+ -ffast-math \
+ $(ARCH)
+
+CFLAGS += $(INCLUDE) -DARM7
+CXXFLAGS := $(CFLAGS)
+
+
+ASFLAGS := -g $(ARCH)
+LDFLAGS = -specs=ds_arm7.specs -g $(ARCH) -mno-fpu -Wl,-Map,$(notdir $*).map
+
+LIBS := -lnds7
+
+#---------------------------------------------------------------------------------
+# list of directories containing libraries, this must be the top level containing
+# include and lib
+#---------------------------------------------------------------------------------
+LIBDIRS := $(LIBNDS)
+
+
+#---------------------------------------------------------------------------------
+# no real need to edit anything past this point unless you need to add additional
+# rules for different file extensions
+#---------------------------------------------------------------------------------
+ifneq ($(BUILD),$(notdir $(CURDIR)))
+#---------------------------------------------------------------------------------
+
+export ARM7BIN := $(TOPDIR)/$(TARGET).arm7
+export ARM7ELF := $(CURDIR)/$(TARGET).arm7.elf
+export DEPSDIR := $(CURDIR)/$(BUILD)
+
+export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir))
+
+export CC := $(PREFIX)gcc
+export CXX := $(PREFIX)g++
+export AR := $(PREFIX)ar
+export OBJCOPY := $(PREFIX)objcopy
+
+CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
+CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
+SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
+BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
+
+export OFILES := $(addsuffix .o,$(BINFILES)) \
+ $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o)
+
+export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
+ $(foreach dir,$(LIBDIRS),-I$(dir)/include) \
+ -I$(CURDIR)/$(BUILD)
+
+export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib)
+
+#---------------------------------------------------------------------------------
+# use CXX for linking C++ projects, CC for standard C
+#---------------------------------------------------------------------------------
+ifeq ($(strip $(CPPFILES)),)
+#---------------------------------------------------------------------------------
+ export LD := $(CC)
+#---------------------------------------------------------------------------------
+else
+#---------------------------------------------------------------------------------
+ export LD := $(CXX)
+#---------------------------------------------------------------------------------
+endif
+#---------------------------------------------------------------------------------
+
+.PHONY: $(BUILD) clean
+
+#---------------------------------------------------------------------------------
+$(BUILD):
+ @[ -d $@ ] || mkdir -p $@
+ @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
+
+#---------------------------------------------------------------------------------
+clean:
+ @echo clean ...
+ @rm -fr $(BUILD) *.elf
+
+
+#---------------------------------------------------------------------------------
+else
+
+DEPENDS := $(OFILES:.o=.d)
+
+#---------------------------------------------------------------------------------
+# main targets
+#---------------------------------------------------------------------------------
+$(ARM7BIN) : $(ARM7ELF)
+ @$(OBJCOPY) -O binary $< $@
+ @echo built ... $(notdir $@)
+
+
+$(ARM7ELF) : $(OFILES)
+ @echo linking $(notdir $@)
+ @$(LD) $(LDFLAGS) $(OFILES) $(LIBPATHS) $(LIBS) -o $@
+
+
+#---------------------------------------------------------------------------------
+# you need a rule like this for each extension you use as binary data
+#---------------------------------------------------------------------------------
+%.bin.o : %.bin
+#---------------------------------------------------------------------------------
+ @echo $(notdir $<)
+ @$(bin2o)
+
+-include $(DEPENDS)
+
+#---------------------------------------------------------------------------------------
+endif
+#---------------------------------------------------------------------------------------
Property changes on: tiki/nds/arm7_template/Makefile
___________________________________________________________________
Name: svn:eol-style
+ native
Added: tiki/nds/arm7_template/source/arm7main.c
===================================================================
--- tiki/nds/arm7_template/source/arm7main.c (rev 0)
+++ tiki/nds/arm7_template/source/arm7main.c 2007-07-21 17:52:01 UTC (rev 425)
@@ -0,0 +1,180 @@
+/*
+ Tiki
+
+ arm7main.c
+
+ Based on the libnds arm7 template and the ARM9/ARM7 streaming code from
+ http://forum.gbadev.org/viewtopic.php?t=10739
+*/
+
+#include <nds.h>
+#include <stdlib.h>
+#include "dssoundstream.h"
+
+//---------------------------------------------------------------------------------
+void startSound(int sampleRate, const void* data, u32 bytes, u8 channel, u8 vol, u8 pan, u8 format) {
+//---------------------------------------------------------------------------------
+ SCHANNEL_TIMER(channel) = SOUND_FREQ(sampleRate);
+ SCHANNEL_SOURCE(channel) = (u32)data;
+ SCHANNEL_LENGTH(channel) = bytes >> 2 ;
+ SCHANNEL_CR(channel) = SCHANNEL_ENABLE | SOUND_ONE_SHOT | SOUND_VOL(vol) | SOUND_PAN(pan) | (format==1?SOUND_8BIT:SOUND_16BIT);
+}
+
+
+//---------------------------------------------------------------------------------
+s32 getFreeSoundChannel() {
+//---------------------------------------------------------------------------------
+ int i;
+ for (i=0; i<16; i++) {
+ if ( (SCHANNEL_CR(i) & SCHANNEL_ENABLE) == 0 ) return i;
+ }
+ return -1;
+}
+
+int vcount;
+touchPosition first,tempPos;
+
+//---------------------------------------------------------------------------------
+void VcountHandler() {
+//---------------------------------------------------------------------------------
+ static int lastbut = -1;
+
+ uint16 but=0, x=0, y=0, xpx=0, ypx=0, z1=0, z2=0;
+
+ but = REG_KEYXY;
+
+ // Check if the lid has been closed.
+ if(but & BIT(7)) {
+ // Save the current interrupt sate.
+ u32 ie_save = REG_IE;
+ // Turn the speaker down.
+ swiChangeSoundBias(0,0x400);
+ // Save current power state.
+ int power = readPowerManagement(PM_CONTROL_REG);
+ // Set sleep LED.
+ writePowerManagement(PM_CONTROL_REG, PM_LED_CONTROL(1));
+ // Register for the lid interrupt.
+ REG_IE = IRQ_LID;
+
+ // Power down till we get our interrupt.
+ swiSleep(); //waits for PM (lid open) interrupt
+
+ REG_IF = ~0;
+ // Restore the interrupt state.
+ REG_IE = ie_save;
+ // Restore power state.
+ writePowerManagement(PM_CONTROL_REG, power);
+
+ // Turn the speaker up.
+ swiChangeSoundBias(1,0x400);
+ }
+
+ if (!( (but ^ lastbut) & (1<<6))) {
+
+ tempPos = touchReadXY();
+
+ if ( tempPos.x == 0 || tempPos.y == 0 ) {
+ but |= (1 <<6);
+ lastbut = but;
+ } else {
+ x = tempPos.x;
+ y = tempPos.y;
+ xpx = tempPos.px;
+ ypx = tempPos.py;
+ z1 = tempPos.z1;
+ z2 = tempPos.z2;
+ }
+
+ } else {
+ lastbut = but;
+ but |= (1 <<6);
+ }
+
+ if ( vcount == 80 ) {
+ first = tempPos;
+ } else {
+ if ( abs( xpx - first.px) > 10 || abs( ypx - first.py) > 10 ||
+ (but & ( 1<<6)) ) {
+
+ but |= (1 <<6);
+ lastbut = but;
+
+ } else {
+ IPC->mailBusy = 1;
+ IPC->touchX = x;
+ IPC->touchY = y;
+ IPC->touchXpx = xpx;
+ IPC->touchYpx = ypx;
+ IPC->touchZ1 = z1;
+ IPC->touchZ2 = z2;
+ IPC->mailBusy = 0;
+ }
+ }
+ IPC->buttons = but;
+ vcount ^= (80 ^ 130);
+ SetYtrigger(vcount);
+
+}
+
+//---------------------------------------------------------------------------------
+void VblankHandler(void) {
+//---------------------------------------------------------------------------------
+
+ u32 i;
+
+ SoundVBlankIrq();
+
+ //sound code :)
+ TransferSound *snd = IPC->soundData;
+ IPC->soundData = 0;
+
+ if (0 != snd) {
+
+ for (i=0; i<snd->count; i++) {
+ s32 chan = getFreeSoundChannel();
+
+ if (chan >= 0) {
+ startSound(snd->data[i].rate, snd->data[i].data, snd->data[i].len, chan, snd->data[i].vol, snd->data[i].pan, snd->data[i].format);
+ }
+ }
+ }
+
+}
+void FiFoHandler(void)
+//---------------------------------------------------------------------------------
+{
+ while ( !(REG_IPC_FIFO_CR & (IPC_FIFO_RECV_EMPTY)) )
+ {
+ SoundFifoHandler();
+ }
+}
+//---------------------------------------------------------------------------------
+int main(int argc, char ** argv) {
+//---------------------------------------------------------------------------------
+
+ // Reset the clock if needed
+ rtcReset();
+
+ //enable sound
+ powerON(POWER_SOUND);
+ SOUND_CR = SOUND_ENABLE | SOUND_VOL(0x7F);
+ IPC->soundData = 0;
+
+ irqInit();
+ irqSet(IRQ_VBLANK, VblankHandler);
+ SetYtrigger(80);
+ vcount = 80;
+ irqSet(IRQ_VCOUNT, VcountHandler);
+ REG_IPC_FIFO_CR = IPC_FIFO_ENABLE | IPC_FIFO_SEND_CLEAR | IPC_FIFO_RECV_IRQ;
+ irqSet(IRQ_FIFO_NOT_EMPTY, FiFoHandler);
+ irqEnable(IRQ_VBLANK | IRQ_VCOUNT|IRQ_FIFO_NOT_EMPTY);
+
+ SoundSetTimer(0);
+
+ // Keep the ARM7 idle
+ while (1){
+ swiWaitForVBlank();
+ }
+}
+
+
Property changes on: tiki/nds/arm7_template/source/arm7main.c
___________________________________________________________________
Name: svn:eol-style
+ native
Added: tiki/nds/arm7_template/source/dssoundstream.h
===================================================================
--- tiki/nds/arm7_template/source/dssoundstream.h (rev 0)
+++ tiki/nds/arm7_template/source/dssoundstream.h 2007-07-21 17:52:01 UTC (rev 425)
@@ -0,0 +1,66 @@
+/*
+ Tiki
+
+ dssoundstream.h
+
+ based on the ARM9/ARM7 streaming code from
+ http://forum.gbadev.org/viewtopic.php?t=10739
+*/
+
+#ifndef __NDSSOUND_H
+#define __NDSSOUND_H
+
+#include <nds.h>
+
+#define CLOCK (1 << 25)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum
+{
+ NONE = 0,
+ INIT = 1,
+ MIX = 2,
+ MIXING = 4,
+ STOP = 8
+}CommandType;
+
+typedef enum
+{
+ FIFO_NONE = 0,
+ UPDATEON_ARM9 = 1,
+ MIXCOMPLETE_ONARM9 = 2
+}FifoType;
+
+typedef struct
+{
+ s8 *mixbuffer;
+ u32 rate;
+ u32 buffersize;
+ u32 cmd;
+ u8 channel,format;
+ u32 soundcursor,numsamples;
+ s32 prevtimer;
+ s16 period;
+}S_SoundSystem;
+
+#define soundsystem ((S_SoundSystem*)((u32)(IPC)+sizeof(TransferRegion)))
+
+#ifdef ARM9
+extern void SoundSystemInit(u32 rate,u32 buffersize,u8 channel,u8 format);
+extern void SoundStartMixer(void);
+extern void SendCommandToArm7(u32 command);
+#else
+extern void SoundVBlankIrq(void);
+extern void SoundSwapAndMix(void);
+extern void SoundSetTimer(int period);
+extern void SoundFifoHandler(void);
+extern void SendCommandToArm9(u32 command);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif
Property changes on: tiki/nds/arm7_template/source/dssoundstream.h
___________________________________________________________________
Name: svn:eol-style
+ native
Added: tiki/nds/arm7_template/source/sound7.c
===================================================================
--- tiki/nds/arm7_template/source/sound7.c (rev 0)
+++ tiki/nds/arm7_template/source/sound7.c 2007-07-21 17:52:01 UTC (rev 425)
@@ -0,0 +1,123 @@
+/*
+ Tiki
+
+ sound7.c
+
+ Based on the ARM9/ARM7 streaming code from
+ http://forum.gbadev.org/viewtopic.php?t=10739
+*/
+
+#include <nds.h>
+#include <arm7/serial.h>
+#include "dssoundstream.h"
+
+void SoundVBlankIrq(void)
+{
+ //REG_IME = 0;
+ int channel,i;
+
+ if(soundsystem->cmd & INIT)
+ {
+ SoundSetTimer(soundsystem->period);
+ soundsystem->cmd &= ~INIT;
+ }
+ else if(soundsystem->cmd & MIXING)
+ {
+ SoundSwapAndMix();
+ }
+ if(soundsystem->cmd & MIX)
+ {
+ channel = soundsystem->channel;
+
+ if(soundsystem->format == 8)
+ {
+ SCHANNEL_CR(0) = 0;
+ SCHANNEL_TIMER(0) = 0x10000 - soundsystem->period;
+ SCHANNEL_SOURCE(0) = (u32)soundsystem->mixbuffer;
+ SCHANNEL_REPEAT_POINT(0) = 0;
+ SCHANNEL_LENGTH(0) = soundsystem->buffersize >> 2;
+ SCHANNEL_CR(0) = SCHANNEL_ENABLE | SOUND_REPEAT | SOUND_VOL(127) | SOUND_PAN(64) | SOUND_8BIT;
+ }
+ if(soundsystem->format == 16)
+ {
+ SCHANNEL_CR(0) = 0;
+ SCHANNEL_TIMER(0) = 0x10000 - soundsystem->period;
+ SCHANNEL_SOURCE(0) = (u32)soundsystem->mixbuffer;
+ SCHANNEL_REPEAT_POINT(0) = 0;
+ SCHANNEL_LENGTH(0) = soundsystem->buffersize >> 2;
+ SCHANNEL_CR(0) = SCHANNEL_ENABLE | SOUND_REPEAT | SOUND_VOL(127) | SOUND_PAN(64) | SOUND_16BIT;
+ }
+
+ soundsystem->cmd &= ~MIX;
+ soundsystem->cmd |= MIXING;
+ }
+ //REG_IME = 1;
+}
+void SoundSetTimer(int period)
+{
+ if(!period)
+ {
+ TIMER0_DATA = 0;
+ TIMER0_CR = 0;
+ TIMER1_DATA = 0;
+ TIMER1_CR = 0;
+ }
+ else
+ {
+ TIMER0_DATA = 0x10000 - (period * 2);
+ TIMER0_CR = TIMER_ENABLE | TIMER_DIV_1;
+
+ TIMER1_DATA = 0;
+ TIMER1_CR = TIMER_ENABLE | TIMER_CASCADE | TIMER_DIV_1;
+ }
+}
+
+void SoundSwapAndMix(void)
+{
+ s32 curtimer,numsamples,remaining,tries;
+
+ curtimer = TIMER1_DATA;
+
+ numsamples = curtimer - soundsystem->prevtimer;
+
+ if(numsamples < 0) numsamples += 65536;
+
+ soundsystem->prevtimer = curtimer;
+ soundsystem->numsamples = numsamples;
+
+ SendCommandToArm9(UPDATEON_ARM9);
+}
+void SoundFifoHandler(void)
+{
+ u32 command;
+
+ if (!(REG_IPC_FIFO_CR & IPC_FIFO_RECV_EMPTY))
+ {
+ command = REG_IPC_FIFO_RX;
+
+ switch(command)
+ {
+ case FIFO_NONE:
+ break;
+ case MIXCOMPLETE_ONARM9:
+ //REG_IME = 0;
+ soundsystem->soundcursor += soundsystem->numsamples;
+ if(soundsystem->format == 8)
+ while (soundsystem->soundcursor > soundsystem->buffersize) soundsystem->soundcursor -= soundsystem->buffersize;
+ else
+ while (soundsystem->soundcursor > (soundsystem->buffersize >> 1)) soundsystem->soundcursor -= (soundsystem->buffersize >> 1);
+ //REG_IME = 1;
+ break;
+ }
+ }
+}
+void SendCommandToArm9(u32 command)
+{
+ while (REG_IPC_FIFO_CR & IPC_FIFO_SEND_FULL);
+ if (REG_IPC_FIFO_CR & IPC_FIFO_ERROR)
+ {
+ REG_IPC_FIFO_CR |= IPC_FIFO_SEND_CLEAR;
+ }
+
+ REG_IPC_FIFO_TX = command;
+}
Property changes on: tiki/nds/arm7_template/source/sound7.c
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: tiki/nds/src/audio/stream.cpp
===================================================================
--- tiki/nds/src/audio/stream.cpp 2007-07-18 23:45:51 UTC (rev 424)
+++ tiki/nds/src/audio/stream.cpp 2007-07-21 17:52:01 UTC (rev 425)
@@ -4,13 +4,18 @@
stream.cpp
Copyright (C)2005 Cryptic Allusion, LLC
+
+ Portions based on the ARM9/ARM7 streaming code from
+ http://forum.gbadev.org/viewtopic.php?t=10739
*/
#include "pch.h"
#include "Tiki/stream.h"
-
#include <string.h>
+#include <nds.h>
+#include "soundcommon.h"
+
using namespace Tiki::Audio;
using namespace Tiki::Thread;
@@ -20,8 +25,85 @@
TIKI_OBJECT_RECEIVER("stop", Stream::objectStop)
TIKI_OBJECT_END(Stream)
+std::list<Stream *> streams;
+void MixTikiStream(Stream *s, void *stream,u32 len)
+{
+ int samples = len;
+ memset(stream,0,len);
+ if(s->isPlaying()) {
+ if(s->getData((uint16*)stream,&samples) != Stream::GDSuccess) {
+ s->stop();
+ }
+ }
+}
+
+void TikiStreamFiFoHandler(void)
+{
+ u32 command,remain;
+ std::list<Stream *>::iterator streams_iter;
+
+ while ( !(REG_IPC_FIFO_CR & (IPC_FIFO_RECV_EMPTY)) )
+ {
+ command = REG_IPC_FIFO_RX;
+
+ switch(command)
+ {
+ case FIFO_NONE:
+ break;
+ case UPDATEON_ARM9:
+ REG_IME = 0;
+ for(streams_iter = streams.begin(); streams_iter != streams.end(); streams_iter++) {
+ if(soundsystem->format == 8)
+ {
+ if((soundsystem->soundcursor + soundsystem->numsamples) > soundsystem->buffersize)
+ {
+ MixTikiStream((*streams_iter),&soundsystem->mixbuffer[soundsystem->soundcursor],soundsystem->buffersize - soundsystem->soundcursor);
+ remain = soundsystem->numsamples - (soundsystem->buffersize - soundsystem->soundcursor);
+ MixTikiStream((*streams_iter),soundsystem->mixbuffer,remain);
+ }
+ else
+ {
+ MixTikiStream((*streams_iter),&soundsystem->mixbuffer[soundsystem->soundcursor],soundsystem->numsamples);
+ }
+ }
+ else
+ {
+ if((soundsystem->soundcursor + soundsystem->numsamples) > (soundsystem->buffersize >> 1))
+ {
+ MixTikiStream((*streams_iter),&soundsystem->mixbuffer[soundsystem->soundcursor << 1],(soundsystem->buffersize >> 1) - soundsystem->soundcursor);
+ remain = soundsystem->numsamples - ((soundsystem->buffersize >> 1) - soundsystem->soundcursor);
+ MixTikiStream((*streams_iter),soundsystem->mixbuffer,remain);
+ }
+ else
+ {
+ MixTikiStream((*streams_iter),&soundsystem->mixbuffer[soundsystem->soundcursor << 1],soundsystem->numsamples);
+ }
+ }
+ }
+ REG_IME = 1;
+ SendCommandToArm7(MIXCOMPLETE_ONARM9);
+ break;
+ }
+ }
+}
+
+void SendCommandToArm7(u32 command)
+{
+ while (REG_IPC_FIFO_CR & IPC_FIFO_SEND_FULL);
+ if (REG_IPC_FIFO_CR & IPC_FIFO_ERROR)
+ {
+ REG_IPC_FIFO_CR |= IPC_FIFO_SEND_CLEAR;
+ }
+
+ REG_IPC_FIFO_TX = command;
+}
+
bool Stream::initGlobal() {
+ irqSet(IRQ_FIFO_NOT_EMPTY,&TikiStreamFiFoHandler);
+ irqEnable(IRQ_FIFO_NOT_EMPTY);
+
+ REG_IPC_FIFO_CR = IPC_FIFO_ENABLE | IPC_FIFO_SEND_CLEAR | IPC_FIFO_RECV_IRQ;
return true;
}
@@ -30,18 +112,31 @@
Stream::Stream() {
// Default our members.
- m_bufSize = 0x4000;
+ m_bufSize = 16384;
m_chnCount = 2;
m_freq = 44100;
m_queueing = false;
m_state = StateStopped;
m_volume = 0.8f;
+
+ streams.push_back(this);
}
Stream::~Stream() {
+ streams.remove(this);
}
bool Stream::create() {
+ soundsystem->rate = m_freq;
+ soundsystem->buffersize = m_bufSize * sizeof(short);
+ soundsystem->mixbuffer = (s8*)malloc(soundsystem->buffersize);
+ soundsystem->format = 16;
+ soundsystem->channel = 0;
+ soundsystem->prevtimer = 0;
+ soundsystem->soundcursor = 0;
+ soundsystem->numsamples = 0;
+ soundsystem->period = 0x1000000 / m_freq;
+ soundsystem->cmd = INIT | MIX;
return true;
}
@@ -79,11 +174,12 @@
}
void Stream::pause() {
+ stop();
m_state = StatePaused;
}
void Stream::resume() {
- m_state = StatePlaying;
+ start();
}
void Stream::setVolume(float vol) {
Modified: tiki/nds/src/init_shutdown.cpp
===================================================================
--- tiki/nds/src/init_shutdown.cpp 2007-07-18 23:45:51 UTC (rev 424)
+++ tiki/nds/src/init_shutdown.cpp 2007-07-21 17:52:01 UTC (rev 425)
@@ -19,9 +19,26 @@
namespace Tiki {
bool init(int argc, char **argv) {
- REG_POWERCNT = POWER_ALL;
+ // Turn on everything
+ powerON(POWER_ALL);
+
+ // Setup the Main screen for 3D
+ videoSetMode(MODE_0_3D);
+ vramSetBankA(VRAM_A_TEXTURE);
+ lcdMainOnBottom();
+
+ // IRQ basic setup
irqInit();
+
+ // initialize the geometry engine
+ glInit();
+
+ // initialize libfat
fatInitDefault();
+
+ // initialize parallax
+ GL::Plxcompat::plx_mat3d_init(640, 480);
+ Audio::Stream::initGlobal();
return Hid::init();
}
Modified: tiki/nds/src/platgl.cpp
===================================================================
--- tiki/nds/src/platgl.cpp 2007-07-18 23:45:51 UTC (rev 424)
+++ tiki/nds/src/platgl.cpp 2007-07-21 17:52:01 UTC (rev 425)
@@ -36,6 +36,8 @@
}
void tiki_scene_finish_hook() {
+ glFlush(0);
+ swiWaitForVBlank();
}
void tiki_scene_begin_opaque_hook() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <at...@us...> - 2007-07-18 23:45:54
|
Revision: 424
http://svn.sourceforge.net/cadcdev/?rev=424&view=rev
Author: atani
Date: 2007-07-18 16:45:51 -0700 (Wed, 18 Jul 2007)
Log Message:
-----------
cleanups for dc-chain binutils-2.17 updates
Modified Paths:
--------------
dcload/dcload-ip/Makefile.cfg
dcload/dcload-ip/host-src/tool/Makefile
dcload/dcload-ip/host-src/tool/dc-tool.c
dcload/dcload-serial/Makefile.cfg
dcload/dcload-serial/host-src/tool/Makefile
dcload/dcload-serial/host-src/tool/dc-tool.c
Modified: dcload/dcload-ip/Makefile.cfg
===================================================================
--- dcload/dcload-ip/Makefile.cfg 2007-07-18 23:03:43 UTC (rev 423)
+++ dcload/dcload-ip/Makefile.cfg 2007-07-18 23:45:51 UTC (rev 424)
@@ -18,7 +18,7 @@
# sh-elf-stuff
TARGETCC = sh-elf-gcc
-TARGETCFLAGS = -O2 -ml -m4
+TARGETCFLAGS = -O2 -ml -m4-single-only
TARGETOBJCOPY = sh-elf-objcopy
TARGETLD = sh-elf-ld
@@ -34,7 +34,7 @@
#DREAMCAST_IP = 10.0.0.32
# dir to install dc-tool in
-TOOLINSTALLDIR = /usr/local/dcdev/bin
+TOOLINSTALLDIR = /usr/local/dc/bin
#TOOLINSTALLDIR = /usr/local/dc/bin
# uncomment this for cygwin
Modified: dcload/dcload-ip/host-src/tool/Makefile
===================================================================
--- dcload/dcload-ip/host-src/tool/Makefile 2007-07-18 23:03:43 UTC (rev 423)
+++ dcload/dcload-ip/host-src/tool/Makefile 2007-07-18 23:45:51 UTC (rev 424)
@@ -18,6 +18,7 @@
.PHONY : install
install: $(DCTOOL)
+ -mkdir $(TOOLINSTALLDIR)
cp $(DCTOOL) $(TOOLINSTALLDIR)
.PHONY : clean
Modified: dcload/dcload-ip/host-src/tool/dc-tool.c
===================================================================
--- dcload/dcload-ip/host-src/tool/dc-tool.c 2007-07-18 23:03:43 UTC (rev 423)
+++ dcload/dcload-ip/host-src/tool/dc-tool.c 2007-07-18 23:45:51 UTC (rev 424)
@@ -24,8 +24,8 @@
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#ifdef _WIN32
-#include <string.h>
#include <windows.h>
#include <sys/time.h>
#include <unistd.h>
@@ -446,13 +446,13 @@
if ((section->flags & SEC_HAS_CONTENTS) && (section->flags & SEC_LOAD)) {
printf("Section %s, ",section->name);
printf("lma 0x%x, ",section->lma);
- printf("size %d\n",section->_raw_size);
- if (section->_raw_size) {
- size += section->_raw_size;
- inbuf = malloc(section->_raw_size);
- bfd_get_section_contents(somebfd, section, inbuf, 0, section->_raw_size);
+ printf("size %d\n",bfd_section_size(somebfd, section));
+ if (bfd_section_size(somebfd, section)) {
+ size += bfd_section_size(somebfd, section);
+ inbuf = malloc(bfd_section_size(somebfd, section));
+ bfd_get_section_contents(somebfd, section, inbuf, 0, bfd_section_size(somebfd, section));
- send_data(inbuf, section->lma, section->_raw_size);
+ send_data(inbuf, section->lma, bfd_section_size(somebfd, section));
free(inbuf);
}
Modified: dcload/dcload-serial/Makefile.cfg
===================================================================
--- dcload/dcload-serial/Makefile.cfg 2007-07-18 23:03:43 UTC (rev 423)
+++ dcload/dcload-serial/Makefile.cfg 2007-07-18 23:45:51 UTC (rev 424)
@@ -6,7 +6,7 @@
# dc compiler prefix -- this is usually what you used for --prefix when
# building your compiler.
-TARGETPREFIX = /usr/local/dcdev/sh-elf
+TARGETPREFIX = /usr/local/dc/sh-elf
# you may have to change the paths for BFDLIB and BFDINCLUDE to
# the correct ones for your system
@@ -50,7 +50,7 @@
#SERIALDEVICE = COM1
# dir to install dc-tool in
-TOOLINSTALLDIR = /usr/local/dcdev/bin
+TOOLINSTALLDIR = /usr/local/dc/bin
# uncomment this for cygwin
#EXECUTABLEEXTENSION = .exe
Modified: dcload/dcload-serial/host-src/tool/Makefile
===================================================================
--- dcload/dcload-serial/host-src/tool/Makefile 2007-07-18 23:03:43 UTC (rev 423)
+++ dcload/dcload-serial/host-src/tool/Makefile 2007-07-18 23:45:51 UTC (rev 424)
@@ -24,6 +24,7 @@
.PHONY : install
install: $(DCTOOL)
+ -mkdir $(TOOLINSTALLDIR)
cp $(DCTOOL) $(TOOLINSTALLDIR)
.PHONY : clean
Modified: dcload/dcload-serial/host-src/tool/dc-tool.c
===================================================================
--- dcload/dcload-serial/host-src/tool/dc-tool.c 2007-07-18 23:03:43 UTC (rev 423)
+++ dcload/dcload-serial/host-src/tool/dc-tool.c 2007-07-18 23:45:51 UTC (rev 424)
@@ -25,8 +25,8 @@
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#ifdef _WIN32
-#include <string.h>
#include <windows.h>
#else
#include <termios.h>
@@ -337,7 +337,7 @@
ok = 'G';
serial_write(&ok, 1);
total -= size;
- (unsigned char *) data += size;
+ data += size;
break;
case 'C': // compressed
if (verbose) {
@@ -351,7 +351,7 @@
ok = 'G';
serial_write(&ok, 1);
total -= newsize;
- (unsigned char *) data += newsize;
+ data += newsize;
} else {
ok = 'B';
serial_write(&ok, 1);
@@ -705,20 +705,20 @@
if ((section->flags & SEC_HAS_CONTENTS) && (section->flags & SEC_LOAD)) {
printf("Section %s, ",section->name);
printf("lma 0x%x, ",section->lma);
- printf("size %d\n",section->_raw_size);
- if (section->_raw_size) {
- size += section->_raw_size;
- inbuf = malloc(section->_raw_size);
- bfd_get_section_contents(somebfd, section, inbuf, 0, section->_raw_size);
+ printf("size %d\n",bfd_section_size(somebfd, section));
+ if (bfd_section_size(somebfd, section)) {
+ size += bfd_section_size(somebfd, section);
+ inbuf = malloc(bfd_section_size(somebfd, section));
+ bfd_get_section_contents(somebfd, section, inbuf, 0, bfd_section_size(somebfd, section));
c = 'B';
serial_write(&c, 1);
blread(&c, 1);
send_uint(section->lma);
- send_uint(section->_raw_size);
+ send_uint(bfd_section_size(somebfd, section));
- send_data(inbuf, section->_raw_size, 1);
+ send_data(inbuf, bfd_section_size(somebfd, section), 1);
free(inbuf);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <at...@us...> - 2007-07-18 23:03:47
|
Revision: 423
http://svn.sourceforge.net/cadcdev/?rev=423&view=rev
Author: atani
Date: 2007-07-18 16:03:43 -0700 (Wed, 18 Jul 2007)
Log Message:
-----------
use dc-chain style naming as default
Modified Paths:
--------------
kos/doc/environ.sh.sample
Modified: kos/doc/environ.sh.sample
===================================================================
--- kos/doc/environ.sh.sample 2007-07-18 23:01:18 UTC (rev 422)
+++ kos/doc/environ.sh.sample 2007-07-18 23:03:43 UTC (rev 423)
@@ -36,10 +36,10 @@
#export KOS_GENROMFS="genromfs"
# Compiler prefixes
-export KOS_CC_BASE="/usr/local/dc/dc-elf"
-export KOS_CC_PREFIX="dc"
-#export KOS_CC_BASE="/usr/local/dc/sh-elf" # DC
-#export KOS_CC_PREFIX="sh-elf"
+#export KOS_CC_BASE="/usr/local/dc/dc-elf"
+#export KOS_CC_PREFIX="dc"
+export KOS_CC_BASE="/usr/local/dc/sh-elf" # DC
+export KOS_CC_PREFIX="sh-elf"
#export KOS_CC_BASE="${EE}" # PS2
#export KOS_CC_PREFIX="ee"
#export KOS_CC_BASE="/usr/local/gba/arm-elf" # GBA
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <at...@us...> - 2007-07-18 23:01:21
|
Revision: 422
http://svn.sourceforge.net/cadcdev/?rev=422&view=rev
Author: atani
Date: 2007-07-18 16:01:18 -0700 (Wed, 18 Jul 2007)
Log Message:
-----------
binutils version bump to 2.17, this fixes compilation with native gcc 4x
Modified Paths:
--------------
kos/utils/dc-chain/Makefile
kos/utils/dc-chain/download.sh
kos/utils/dc-chain/unpack.sh
Modified: kos/utils/dc-chain/Makefile
===================================================================
--- kos/utils/dc-chain/Makefile 2007-07-18 18:16:53 UTC (rev 421)
+++ kos/utils/dc-chain/Makefile 2007-07-18 23:01:18 UTC (rev 422)
@@ -23,10 +23,10 @@
sh_prefix := /usr/local/dc/$(sh_target)
arm_prefix := /usr/local/dc/$(arm_target)
# kos_root: KOS subversion root (contains kos/ and kos-ports/)
-kos_root=$(curdir)/../../..
+kos_root=$(CURDIR)/../../..
# kos_base: equivalent of KOS_BASE (contains include/ and kernel/)
kos_base=$(kos_root)/kos
-binutils_ver=2.15
+binutils_ver=2.17
gcc_ver=3.4.6
newlib_ver=1.12.0
thread_model=posix
@@ -46,13 +46,15 @@
all: patch build
# ---- patch {{{
+binutils_patches := $(wildcard $(patches)/binutils-$(binutils_ver)*.diff)
gcc_patches := $(wildcard $(patches)/gcc-$(gcc_ver)*.diff)
newlib_patches := $(wildcard $(patches)/newlib-$(newlib_ver)*.diff)
kos_patches := $(wildcard $(patches)/kos-*.diff)
-patch_targets=patch-gcc patch-newlib patch-kos
+patch_targets=patch-binutils patch-gcc patch-newlib patch-kos
patch: $(patch_targets)
+patch-binutils: $(binutils_patches)
patch-gcc: $(gcc_patches)
patch-newlib: $(newlib_patches)
patch-kos: $(kos_patches)
@@ -60,6 +62,9 @@
$(newlib_patches):
cd $(newlib_dir); patch -p1 < $@
+$(binutils_patches):
+ cd $(binutils_dir); patch -p1 < $@
+
$(gcc_patches):
cd $(gcc_dir); patch -p1 < $@
@@ -137,12 +142,18 @@
fixup-sh4-newlib: newlib_inc=$(sh_prefix)/$(sh_target)/include
fixup-sh4-newlib:
@echo "+++ Fixing up sh4 newlib includes..."
- cp $(kos_base)/include/pthread.h $(newlib_inc) # KOS pthread.h is modified
- cp $(kos_base)/include/sys/_pthread.h $(newlib_inc)/sys # to define _POSIX_THREADS
- cp $(kos_base)/include/sys/sched.h $(newlib_inc)/sys # pthreads to kthreads mapping
- ln -nsf $(kos_base)/include/kos $(newlib_inc) # so KOS includes are available as kos/file.h
- ln -nsf $(kos_base)/kernel/arch/dreamcast/include/arch $(newlib_inc) # kos/thread.h requires arch/arch.h
- ln -nsf $(kos_base)/kernel/arch/dreamcast/include/dc $(newlib_inc) # arch/arch.h requires dc/video.h
+# KOS pthread.h is modified
+# to define _POSIX_THREADS
+# pthreads to kthreads mapping
+# so KOS includes are available as kos/file.h
+# kos/thread.h requires arch/arch.h
+# arch/arch.h requires dc/video.h
+ cp $(kos_base)/include/pthread.h $(newlib_inc)
+ cp $(kos_base)/include/sys/_pthread.h $(newlib_inc)/sys
+ cp $(kos_base)/include/sys/sched.h $(newlib_inc)/sys
+ ln -nsf $(kos_base)/include/kos $(newlib_inc)
+ ln -nsf $(kos_base)/kernel/arch/dreamcast/include/arch $(newlib_inc)
+ ln -nsf $(kos_base)/kernel/arch/dreamcast/include/dc $(newlib_inc)
$(build_gcc_pass2): log = $(logdir)/$(build)-pass2.log
$(build_gcc_pass2): logdir
@@ -194,7 +205,7 @@
# ---- phony targets {{{
.PHONY: $(patch_targets)
-.PHONY: $(newlib_patches) $(gcc_patches) $(kos_patches)
+.PHONY: $(newlib_patches) $(binutils_patches) $(gcc_patches) $(kos_patches)
.PHONY: all build patch build-sh4 build-arm $(build_sh4_targets) $(build_arm_targets) clean
.PHONY: build-binutils build-newlib build-gcc-pass1 build-gcc-pass2 fixup-sh4-newlib
Modified: kos/utils/dc-chain/download.sh
===================================================================
--- kos/utils/dc-chain/download.sh 2007-07-18 18:16:53 UTC (rev 421)
+++ kos/utils/dc-chain/download.sh 2007-07-18 23:01:18 UTC (rev 422)
@@ -1,5 +1,5 @@
#!/bin/sh
-wget -c ftp://ftp.gnu.org/gnu/binutils/binutils-2.15.tar.bz2 || exit 1
+wget -c ftp://ftp.gnu.org/gnu/binutils/binutils-2.17.tar.bz2 || exit 1
wget -c ftp://ftp.gnu.org/gnu/gcc/gcc-3.4.6/gcc-3.4.6.tar.bz2 || exit 1
wget -c ftp://sources.redhat.com/pub/newlib/newlib-1.12.0.tar.gz || exit 1
Modified: kos/utils/dc-chain/unpack.sh
===================================================================
--- kos/utils/dc-chain/unpack.sh 2007-07-18 18:16:53 UTC (rev 421)
+++ kos/utils/dc-chain/unpack.sh 2007-07-18 23:01:18 UTC (rev 422)
@@ -1,7 +1,7 @@
#!/bin/sh
-rm -rf binutils-2.15 gcc-3.4.6 newlib-1.12.0
+rm -rf binutils-2.17 gcc-3.4.6 newlib-1.12.0
-tar jxf binutils-2.15.tar.bz2 || exit 1
+tar jxf binutils-2.17.tar.bz2 || exit 1
tar jxf gcc-3.4.6.tar.bz2 || exit 1
tar zxf newlib-1.12.0.tar.gz || exit 1
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <at...@us...> - 2007-07-18 18:16:59
|
Revision: 421
http://svn.sourceforge.net/cadcdev/?rev=421&view=rev
Author: atani
Date: 2007-07-18 11:16:53 -0700 (Wed, 18 Jul 2007)
Log Message:
-----------
default paths update
Modified Paths:
--------------
kos/utils/dc-chain/Makefile
Modified: kos/utils/dc-chain/Makefile
===================================================================
--- kos/utils/dc-chain/Makefile 2007-07-18 18:15:56 UTC (rev 420)
+++ kos/utils/dc-chain/Makefile 2007-07-18 18:16:53 UTC (rev 421)
@@ -20,10 +20,10 @@
# User configuration
sh_target=sh-elf
arm_target=arm-elf
-sh_prefix := /opt/dc/$(sh_target)
-arm_prefix := /opt/dc/$(arm_target)
+sh_prefix := /usr/local/dc/$(sh_target)
+arm_prefix := /usr/local/dc/$(arm_target)
# kos_root: KOS subversion root (contains kos/ and kos-ports/)
-kos_root=~/prj/svn
+kos_root=$(curdir)/../../..
# kos_base: equivalent of KOS_BASE (contains include/ and kernel/)
kos_base=$(kos_root)/kos
binutils_ver=2.15
@@ -108,6 +108,7 @@
> $(log)
cd $(build); ../$(src_dir)/configure --target=$(target) --prefix=$(prefix) $(to_log)
make -C $(build) all install $(to_log)
+ make -C $(build)/bfd install_libbfd $(to_log)
$(clean_up)
$(build_gcc_pass1) $(build_gcc_pass2): build = build-gcc-$(target)-$(gcc_ver)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <at...@us...> - 2007-07-18 18:15:59
|
Revision: 420
http://svn.sourceforge.net/cadcdev/?rev=420&view=rev
Author: atani
Date: 2007-07-18 11:15:56 -0700 (Wed, 18 Jul 2007)
Log Message:
-----------
glVertex2f patch
Modified Paths:
--------------
kos-ports/include/GL/gl.h
kos-ports/libgl/gldraw.c
Modified: kos-ports/include/GL/gl.h
===================================================================
--- kos-ports/include/GL/gl.h 2007-07-17 23:29:11 UTC (rev 419)
+++ kos-ports/include/GL/gl.h 2007-07-18 18:15:56 UTC (rev 420)
@@ -355,6 +355,8 @@
void glEnd(void);
+void glVertex2f(GLfloat x, GLfloat y);
+
void glVertex3f(GLfloat x, GLfloat y, GLfloat z);
void glVertex3fv(GLfloat *v);
Modified: kos-ports/libgl/gldraw.c
===================================================================
--- kos-ports/libgl/gldraw.c 2007-07-17 23:29:11 UTC (rev 419)
+++ kos-ports/libgl/gldraw.c 2007-07-18 18:15:56 UTC (rev 420)
@@ -541,6 +541,10 @@
{0.0f, 1.0f}
};
+void glVertex2f(GLfloat x, GLfloat y) {
+ glVertex3f(x, y, (GLfloat)0.0f);
+}
+
void glVertex3f(GLfloat x, GLfloat y, GLfloat z) {
gl_vbuf[gl_vbuf_top].flags = PVR_CMD_VERTEX;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <c99...@us...> - 2007-07-17 23:29:16
|
Revision: 419
http://svn.sourceforge.net/cadcdev/?rev=419&view=rev
Author: c99koder
Date: 2007-07-17 16:29:11 -0700 (Tue, 17 Jul 2007)
Log Message:
-----------
Tiki: SDL: Adjust makefile rules to use CC and CXX variables
Modified Paths:
--------------
tiki/sdl/Makefile.rules
Modified: tiki/sdl/Makefile.rules
===================================================================
--- tiki/sdl/Makefile.rules 2007-07-17 23:24:50 UTC (rev 418)
+++ tiki/sdl/Makefile.rules 2007-07-17 23:29:11 UTC (rev 419)
@@ -1,14 +1,14 @@
%.o: %.c
@echo "Compiling $< to $@"
- @gcc $(CFLAGS) -c $< -o $@
+ @$(CC) $(CFLAGS) -c $< -o $@
%.o: %.cc
@echo "Compiling $< to $@"
- @g++ $(CFLAGS) $(CXXFLAGS) -c $< -o $@
+ @$(CXX) $(CFLAGS) $(CXXFLAGS) -c $< -o $@
%.o: %.cpp
@echo "Compiling $< to $@"
- @g++ $(CFLAGS) $(CXXFLAGS) -c $< -o $@
+ @$(CXX) $(CFLAGS) $(CXXFLAGS) -c $< -o $@
subdirs: $(patsubst %, _dir_%, $(SUBDIRS))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <c99...@us...> - 2007-07-17 23:24:52
|
Revision: 418
http://svn.sourceforge.net/cadcdev/?rev=418&view=rev
Author: c99koder
Date: 2007-07-17 16:24:50 -0700 (Tue, 17 Jul 2007)
Log Message:
-----------
Tiki: Move the list of platforms into tiki.h
Modified Paths:
--------------
tiki/dc/include/Tiki/tikitypes.h
tiki/gp2x/include/Tiki/tikitypes.h
tiki/include/Tiki/tiki.h
tiki/nds/include/Tiki/tikitypes.h
tiki/osx/include/Tiki/tikitypes.h
tiki/sdl/include/Tiki/tikitypes.h
tiki/win32/include/Tiki/tikitypes.h
Modified: tiki/dc/include/Tiki/tikitypes.h
===================================================================
--- tiki/dc/include/Tiki/tikitypes.h 2007-07-17 23:06:07 UTC (rev 417)
+++ tiki/dc/include/Tiki/tikitypes.h 2007-07-17 23:24:50 UTC (rev 418)
@@ -16,11 +16,7 @@
#include <dc/sound/stream.h>
#include <dc/sound/sfxmgr.h>
-// This gets included in the main tiki.h, so it should suffice.
-#define TIKI_OSX 0
-#define TIKI_WIN32 1
-#define TIKI_SDL 2
-#define TIKI_DC 3
+//Define our platform
#define TIKI_PLAT TIKI_DC
namespace Tiki {
Modified: tiki/gp2x/include/Tiki/tikitypes.h
===================================================================
--- tiki/gp2x/include/Tiki/tikitypes.h 2007-07-17 23:06:07 UTC (rev 417)
+++ tiki/gp2x/include/Tiki/tikitypes.h 2007-07-17 23:24:50 UTC (rev 418)
@@ -12,12 +12,7 @@
#include <stddef.h>
-// This gets included in the main tiki.h, so it should suffice.
-#define TIKI_OSX 0
-#define TIKI_WIN32 1
-#define TIKI_SDL 2
-#define TIKI_DC 3
-#define TIKI_GP2X 4
+// Define our platform
#define TIKI_PLAT TIKI_GP2X
namespace Tiki {
Modified: tiki/include/Tiki/tiki.h
===================================================================
--- tiki/include/Tiki/tiki.h 2007-07-17 23:06:07 UTC (rev 417)
+++ tiki/include/Tiki/tiki.h 2007-07-17 23:24:50 UTC (rev 418)
@@ -24,6 +24,14 @@
}
}
+// Define our supported platforms
+#define TIKI_OSX 0
+#define TIKI_WIN32 1
+#define TIKI_SDL 2
+#define TIKI_DC 3
+#define TIKI_GP2X 4
+#define TIKI_NDS 5
+
// Bring in our custom types.
#include "Tiki/tikitypes.h"
Modified: tiki/nds/include/Tiki/tikitypes.h
===================================================================
--- tiki/nds/include/Tiki/tikitypes.h 2007-07-17 23:06:07 UTC (rev 417)
+++ tiki/nds/include/Tiki/tikitypes.h 2007-07-17 23:24:50 UTC (rev 418)
@@ -14,13 +14,7 @@
#include <sys/cdefs.h>
#include <nds/jtypes.h>
-// This gets included in the main tiki.h, so it should suffice.
-#define TIKI_OSX 0
-#define TIKI_WIN32 1
-#define TIKI_SDL 2
-#define TIKI_DC 3
-#define TIKI_GP2X 4
-#define TIKI_NDS 5
+// Define our platform
#define TIKI_PLAT TIKI_NDS
namespace Tiki {
Modified: tiki/osx/include/Tiki/tikitypes.h
===================================================================
--- tiki/osx/include/Tiki/tikitypes.h 2007-07-17 23:06:07 UTC (rev 417)
+++ tiki/osx/include/Tiki/tikitypes.h 2007-07-17 23:24:50 UTC (rev 418)
@@ -12,13 +12,7 @@
#include <stddef.h>
-// This gets included in the main tiki.h, so it should suffice.
-#define TIKI_OSX 0
-#define TIKI_WIN32 1
-#define TIKI_SDL 2
-#define TIKI_DC 3
-#define TIKI_GP2X 4
-#define TIKI_NDS 5
+// Define our platform
#define TIKI_PLAT TIKI_OSX
namespace Tiki {
Modified: tiki/sdl/include/Tiki/tikitypes.h
===================================================================
--- tiki/sdl/include/Tiki/tikitypes.h 2007-07-17 23:06:07 UTC (rev 417)
+++ tiki/sdl/include/Tiki/tikitypes.h 2007-07-17 23:24:50 UTC (rev 418)
@@ -12,11 +12,7 @@
#include <stddef.h>
-// This gets included in the main tiki.h, so it should suffice.
-#define TIKI_OSX 0
-#define TIKI_WIN32 1
-#define TIKI_SDL 2
-#define TIKI_DC 3
+// Define our platform
#define TIKI_PLAT TIKI_SDL
namespace Tiki {
Modified: tiki/win32/include/Tiki/tikitypes.h
===================================================================
--- tiki/win32/include/Tiki/tikitypes.h 2007-07-17 23:06:07 UTC (rev 417)
+++ tiki/win32/include/Tiki/tikitypes.h 2007-07-17 23:24:50 UTC (rev 418)
@@ -12,13 +12,7 @@
#include <stddef.h>
-// Figure out our platform.
-#define TIKI_OSX 0
-#define TIKI_WIN32 1
-#define TIKI_SDL 2
-#define TIKI_DC 3
-#define TIKI_GP2X 4
-#define TIKI_NDS 5
+// Define our platform
#define TIKI_PLAT TIKI_WIN32
namespace Tiki {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <c99...@us...> - 2007-07-17 23:06:59
|
Revision: 417
http://svn.sourceforge.net/cadcdev/?rev=417&view=rev
Author: c99koder
Date: 2007-07-17 16:06:07 -0700 (Tue, 17 Jul 2007)
Log Message:
-----------
NDS: Link with libfat, initialize libfat and the DS hardware, remove AutoLock calls from Stream class, and handle DS input events during VBlank interrupt
Modified Paths:
--------------
tiki/nds/Makefile.rules
tiki/nds/src/audio/stream.cpp
tiki/nds/src/init_shutdown.cpp
tiki/nds/src/plathid.cpp
tiki/nds/src/tikitime.cpp
Modified: tiki/nds/Makefile.rules
===================================================================
--- tiki/nds/Makefile.rules 2007-07-08 01:05:36 UTC (rev 416)
+++ tiki/nds/Makefile.rules 2007-07-17 23:06:07 UTC (rev 417)
@@ -12,7 +12,7 @@
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitARM)
endif
-TIKI_BASE_LIBS=-ltiki -L$(DEVKITPRO)/libnds/lib -lnds9
+TIKI_BASE_LIBS=-ltiki -L$(DEVKITPRO)/libnds/lib -lfat -lnds9
CXXFLAGS=-I$(DEVKITPRO)/libnds/include
Modified: tiki/nds/src/audio/stream.cpp
===================================================================
--- tiki/nds/src/audio/stream.cpp 2007-07-08 01:05:36 UTC (rev 416)
+++ tiki/nds/src/audio/stream.cpp 2007-07-17 23:06:07 UTC (rev 417)
@@ -36,83 +36,61 @@
m_queueing = false;
m_state = StateStopped;
m_volume = 0.8f;
- m_mutex = new Mutex();
}
Stream::~Stream() {
- destroy();
}
bool Stream::create() {
- AutoLock lock(m_mutex);
return true;
}
void Stream::destroy() {
- AutoLock lock(m_mutex);
}
// virtual void filter(int freq, int chncount, void * buffer, int smpcnt) { }
void Stream::filterAdd(Filter * f) {
- AutoLock lock(m_mutex);
-
m_filters.insertTail(f);
}
void Stream::filterRemove(Filter * f) {
- AutoLock lock(m_mutex);
-
m_filters.del(f);
}
void Stream::setQueueing(bool isQueued) {
- AutoLock lock(m_mutex);
-
m_queueing = isQueued;
}
void Stream::setFrequency(int freq) {
- AutoLock lock(m_mutex);
-
m_freq = freq;
}
void Stream::setChannelCount(int chncount) {
- AutoLock lock(m_mutex);
-
m_chnCount = chncount;
}
void Stream::start() {
- AutoLock lock(m_mutex);
m_state = StatePlaying;
}
void Stream::stop() {
- AutoLock lock(m_mutex);
m_state = StateStopped;
}
void Stream::pause() {
- AutoLock lock(m_mutex);
m_state = StatePaused;
}
void Stream::resume() {
- AutoLock lock(m_mutex);
m_state = StatePlaying;
}
void Stream::setVolume(float vol) {
- AutoLock lock(m_mutex);
-
m_volume = vol;
}
bool Stream::isPlaying() {
- AutoLock lock(m_mutex);
-
return m_state == StatePlaying;
}
Modified: tiki/nds/src/init_shutdown.cpp
===================================================================
--- tiki/nds/src/init_shutdown.cpp 2007-07-08 01:05:36 UTC (rev 416)
+++ tiki/nds/src/init_shutdown.cpp 2007-07-17 23:06:07 UTC (rev 417)
@@ -13,9 +13,15 @@
#include "Tiki/plxcompat.h"
#include "Tiki/hid.h"
+#include <nds.h>
+#include <fat.h>
+
namespace Tiki {
bool init(int argc, char **argv) {
+ REG_POWERCNT = POWER_ALL;
+ irqInit();
+ fatInitDefault();
return Hid::init();
}
Modified: tiki/nds/src/plathid.cpp
===================================================================
--- tiki/nds/src/plathid.cpp 2007-07-08 01:05:36 UTC (rev 416)
+++ tiki/nds/src/plathid.cpp 2007-07-17 23:06:07 UTC (rev 417)
@@ -4,7 +4,71 @@
namespace Tiki {
namespace Hid {
+#define CONTROLLER_BUTTON_MAP(OLDSTATE, NEWSTATE, BUTTON, EVENT) \
+ if((NEWSTATE & BUTTON) && !(OLDSTATE & BUTTON)) { \
+ Event evt(Event::EvtBtnPress); \
+ evt.btn = EVENT; \
+ evt.port = 1; \
+ sendEvent(evt); \
+ } \
+ if(!(NEWSTATE & BUTTON) && (OLDSTATE & BUTTON)) { \
+ Event evt(Event::EvtBtnRelease); \
+ evt.btn = EVENT; \
+ evt.port = 1; \
+ sendEvent(evt); \
+ }
+
+#define CONTROLLER_KEY_MAP(OLDSTATE, NEWSTATE, BUTTON, EVENT) \
+ if((NEWSTATE & BUTTON) && !(OLDSTATE & BUTTON)) { \
+ Event evtPress(Event::EvtKeypress); \
+ evtPress.key = EVENT; \
+ evtPress.port = 1; \
+ sendEvent(evtPress); \
+ \
+ Event evt(Event::EvtKeyDown); \
+ evt.key = EVENT; \
+ evt.port = 1; \
+ sendEvent(evt); \
+ } \
+ if(!(NEWSTATE & BUTTON) && (OLDSTATE & BUTTON)) { \
+ Event evt(Event::EvtKeyUp); \
+ evt.key = EVENT; \
+ evt.port = 1; \
+ sendEvent(evt); \
+ }
+
+void TikiVBlank(void)
+{
+ static u32 oldkeys = 0;
+ scanKeys();
+ u32 keys = keysHeld();
+
+ //Controller events
+ CONTROLLER_BUTTON_MAP(oldkeys, keys, KEY_UP, Event::BtnUp);
+ CONTROLLER_BUTTON_MAP(oldkeys, keys, KEY_DOWN, Event::BtnDown);
+ CONTROLLER_BUTTON_MAP(oldkeys, keys, KEY_LEFT, Event::BtnLeft);
+ CONTROLLER_BUTTON_MAP(oldkeys, keys, KEY_RIGHT, Event::BtnRight);
+ CONTROLLER_BUTTON_MAP(oldkeys, keys, KEY_A, Event::BtnA);
+ CONTROLLER_BUTTON_MAP(oldkeys, keys, KEY_B, Event::BtnB);
+ CONTROLLER_BUTTON_MAP(oldkeys, keys, KEY_X, Event::BtnX);
+ CONTROLLER_BUTTON_MAP(oldkeys, keys, KEY_Y, Event::BtnY);
+ CONTROLLER_BUTTON_MAP(oldkeys, keys, KEY_START, Event::BtnStart);
+
+ //Keyboard emulation
+ CONTROLLER_KEY_MAP(oldkeys, keys, KEY_UP, Event::KeyUp);
+ CONTROLLER_KEY_MAP(oldkeys, keys, KEY_DOWN, Event::KeyDown);
+ CONTROLLER_KEY_MAP(oldkeys, keys, KEY_LEFT, Event::KeyLeft);
+ CONTROLLER_KEY_MAP(oldkeys, keys, KEY_RIGHT, Event::KeyRight);
+ CONTROLLER_KEY_MAP(oldkeys, keys, KEY_START, 13);
+ CONTROLLER_KEY_MAP(oldkeys, keys, KEY_A, 32);
+ CONTROLLER_KEY_MAP(oldkeys, keys, KEY_B, Event::KeyEsc);
+
+ oldkeys = keys;
+}
+
bool platInit() {
+ irqSet(IRQ_VBLANK,&TikiVBlank);
+ irqEnable(IRQ_VBLANK);
return true;
}
Modified: tiki/nds/src/tikitime.cpp
===================================================================
--- tiki/nds/src/tikitime.cpp 2007-07-08 01:05:36 UTC (rev 416)
+++ tiki/nds/src/tikitime.cpp 2007-07-17 23:06:07 UTC (rev 417)
@@ -11,6 +11,7 @@
#include <sys/time.h>
#include <unistd.h>
+#include <nds.h>
namespace Tiki {
namespace Time {
@@ -25,17 +26,12 @@
}
void sleep(uint64 us) {
-// TODO: add this
-}
+ float seconds = (float)us / 1000000.0f;
+ int blanks = (int)(seconds * 60.0f);
+ for(int i=0; i < blanks; i++) {
+ swiWaitForVBlank();
+ }
}
}
-
-
-
-
-
-
-
-
-
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <c99...@us...> - 2007-07-08 01:05:42
|
Revision: 416
http://svn.sourceforge.net/cadcdev/?rev=416&view=rev
Author: c99koder
Date: 2007-07-07 18:05:36 -0700 (Sat, 07 Jul 2007)
Log Message:
-----------
Tiki: win32: add missing TIKI_GP2X and TIKI_NDS definitions
Modified Paths:
--------------
tiki/win32/include/Tiki/tikitypes.h
Modified: tiki/win32/include/Tiki/tikitypes.h
===================================================================
--- tiki/win32/include/Tiki/tikitypes.h 2007-07-02 16:59:18 UTC (rev 415)
+++ tiki/win32/include/Tiki/tikitypes.h 2007-07-08 01:05:36 UTC (rev 416)
@@ -17,6 +17,8 @@
#define TIKI_WIN32 1
#define TIKI_SDL 2
#define TIKI_DC 3
+#define TIKI_GP2X 4
+#define TIKI_NDS 5
#define TIKI_PLAT TIKI_WIN32
namespace Tiki {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <at...@us...> - 2007-07-02 16:59:43
|
Revision: 415
http://svn.sourceforge.net/cadcdev/?rev=415&view=rev
Author: atani
Date: 2007-07-02 09:59:18 -0700 (Mon, 02 Jul 2007)
Log Message:
-----------
remove ALUT
Modified Paths:
--------------
tiki/sdl/Makefile.rules
tiki/sdl/src/init_shutdown.cpp
Modified: tiki/sdl/Makefile.rules
===================================================================
--- tiki/sdl/Makefile.rules 2007-07-01 04:19:13 UTC (rev 414)
+++ tiki/sdl/Makefile.rules 2007-07-02 16:59:18 UTC (rev 415)
@@ -20,4 +20,4 @@
$(patsubst %, _clean_dir_%, $(SUBDIRS)):
@$(MAKE) -C $(patsubst _clean_dir_%, %, $@) clean
-TIKI_BASE_LIBS=-ltiki $(shell openal-config --libs) -lGL -lGLU -lpthread -lSDL
+TIKI_BASE_LIBS=-ltiki $(shell openal-config --libs) -lGL -lGLU $(shell sdl-config --libs)
Modified: tiki/sdl/src/init_shutdown.cpp
===================================================================
--- tiki/sdl/src/init_shutdown.cpp 2007-07-01 04:19:13 UTC (rev 414)
+++ tiki/sdl/src/init_shutdown.cpp 2007-07-02 16:59:18 UTC (rev 415)
@@ -10,7 +10,6 @@
#include <AL/al.h>
#include <AL/alc.h>
-#include <AL/alut.h>
#include "Tiki/sound.h"
#include "Tiki/stream.h"
@@ -45,7 +44,6 @@
{
alcMakeContextCurrent(context);
alcProcessContext(context);
- alutInit(&argc, argv);
Audio::Sound::initGlobal();
Audio::Stream::initGlobal();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <c99...@us...> - 2007-07-01 04:19:15
|
Revision: 414
http://svn.sourceforge.net/cadcdev/?rev=414&view=rev
Author: c99koder
Date: 2007-06-30 21:19:13 -0700 (Sat, 30 Jun 2007)
Log Message:
-----------
Tiki: Nintendo DS build fixes
Modified Paths:
--------------
tiki/nds/Makefile
tiki/nds/Makefile.rules
tiki/src/base/file.cpp
tiki/src/hid/eventcollector.cpp
Modified: tiki/nds/Makefile
===================================================================
--- tiki/nds/Makefile 2007-06-29 05:36:10 UTC (rev 413)
+++ tiki/nds/Makefile 2007-07-01 04:19:13 UTC (rev 414)
@@ -51,7 +51,7 @@
$(AR) ru libtiki.a $(BASE_OBJS) $(THIRD_PARTY_OBJS)
clean: clean_subdirs
- -rm -f $(BASE_OBJS) libtiki.a
+ -rm -f $(BASE_OBJS) $(THIRD_PARTY_OBJS) libtiki.a
DEPSDIR=$(CURDIR)
TIKI_DIR=$(CURDIR)/..
Modified: tiki/nds/Makefile.rules
===================================================================
--- tiki/nds/Makefile.rules 2007-06-29 05:36:10 UTC (rev 413)
+++ tiki/nds/Makefile.rules 2007-07-01 04:19:13 UTC (rev 414)
@@ -25,9 +25,9 @@
CXXFLAGS+=-I$(TIKI_DIR)/3rdparty/libvorbis/include
CXXFLAGS+=-I$(TIKI_DIR)/3rdparty/libvorbis/lib
CXXFLAGS+=-DARM9
-CXXFLAGS+=-mcpu=arm9tdmi -mtune=arm9tdmi -ffast-math -mthumb -mthumb-interwork
+CXXFLAGS+=-march=armv5te -mtune=arm946e-s -fomit-frame-pointer -ffast-math -mthumb -mthumb-interwork
CFLAGS=$(CXXFLAGS)
-CXXFLAGS+=-fno-rtti
+CXXFLAGS+=-fno-rtti -fno-exceptions
LDFLAGS=-specs=ds_arm9.specs -mthumb -mthumb-interwork -mno-fpu -L$(DEVKITPRO)/lib -lgcc
Modified: tiki/src/base/file.cpp
===================================================================
--- tiki/src/base/file.cpp 2007-06-29 05:36:10 UTC (rev 413)
+++ tiki/src/base/file.cpp 2007-07-01 04:19:13 UTC (rev 414)
@@ -9,6 +9,9 @@
#include "pch.h"
#include "Tiki/file.h"
+#if TIKI_PLAT == TIKI_NDS
+#include <sys/param.h>
+#endif
#include <machine/endian.h>
File::File() {
Modified: tiki/src/hid/eventcollector.cpp
===================================================================
--- tiki/src/hid/eventcollector.cpp 2007-06-29 05:36:10 UTC (rev 413)
+++ tiki/src/hid/eventcollector.cpp 2007-07-01 04:19:13 UTC (rev 414)
@@ -13,7 +13,9 @@
EventCollector::EventCollector(bool startListening) {
m_cookie = -1;
+#if TIKI_PLAT != TIKI_NDS
m_mutex = new Thread::Mutex();
+#endif
if (startListening)
start();
}
@@ -24,14 +26,18 @@
}
void EventCollector::start() {
+#if TIKI_PLAT != TIKI_NDS
Thread::AutoLock lock(m_mutex);
+#endif
assert( m_cookie < 0 );
m_cookie = callbackReg(hidCallbackStatic, this);
}
void EventCollector::stop() {
+#if TIKI_PLAT != TIKI_NDS
Thread::AutoLock lock(m_mutex);
+#endif
assert( m_cookie >= 0 );
callbackUnreg(m_cookie);
@@ -41,12 +47,16 @@
}
bool EventCollector::eventsAvailable() const {
+#if TIKI_PLAT != TIKI_NDS
Thread::AutoLock lock(m_mutex);
+#endif
return !m_events.empty();
}
bool EventCollector::getEvent(Event & evtOut) {
+#if TIKI_PLAT != TIKI_NDS
Thread::AutoLock lock(m_mutex);
+#endif
if (m_events.empty())
return false;
@@ -60,7 +70,9 @@
}
void EventCollector::hidCallback(const Event & evt) {
+#if TIKI_PLAT != TIKI_NDS
Thread::AutoLock lock(m_mutex);
+#endif
if (m_cookie >= 0)
m_events.push(evt);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <at...@us...> - 2007-06-29 05:36:19
|
Revision: 413
http://svn.sourceforge.net/cadcdev/?rev=413&view=rev
Author: atani
Date: 2007-06-28 22:36:10 -0700 (Thu, 28 Jun 2007)
Log Message:
-----------
adding missing TextureTile cpp file
Modified Paths:
--------------
tiki/win32/tiki_vs80.vcproj
Modified: tiki/win32/tiki_vs80.vcproj
===================================================================
--- tiki/win32/tiki_vs80.vcproj 2007-06-28 07:40:21 UTC (rev 412)
+++ tiki/win32/tiki_vs80.vcproj 2007-06-29 05:36:10 UTC (rev 413)
@@ -318,6 +318,10 @@
RelativePath="..\src\gl\drawables\pointerArrow.cpp"
>
</File>
+ <File
+ RelativePath="..\src\gl\drawables\texturetile.cpp"
+ >
+ </File>
</Filter>
<Filter
Name="triggers"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <at...@us...> - 2007-06-28 07:40:25
|
Revision: 412
http://svn.sourceforge.net/cadcdev/?rev=412&view=rev
Author: atani
Date: 2007-06-28 00:40:21 -0700 (Thu, 28 Jun 2007)
Log Message:
-----------
updates for win32 build
Modified Paths:
--------------
tiki/examples/TikiTest/src/test.cpp
tiki/src/audio/sound.cpp
tiki/src/gl/drawables/console.cpp
tiki/src/gl/drawables/cursor.cpp
tiki/src/gl/drawables/pointerArrow.cpp
tiki/win32/src/plathid.cpp
tiki/win32/tiki_vc80.sln
tiki/win32/tiki_vs80.vcproj
Added Paths:
-----------
tiki/examples/TikiTest/TikiTest_vc80.vcproj
Added: tiki/examples/TikiTest/TikiTest_vc80.vcproj
===================================================================
--- tiki/examples/TikiTest/TikiTest_vc80.vcproj (rev 0)
+++ tiki/examples/TikiTest/TikiTest_vc80.vcproj 2007-06-28 07:40:21 UTC (rev 412)
@@ -0,0 +1,213 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="TikiTest"
+ ProjectGUID="{7B823C96-860C-4578-95BB-1087A45AF1AA}"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="$(SolutionDir)\include;$(SolutionDir)\..\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"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="$(SolutionDir)\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="$(SolutionDir)\include;$(SolutionDir)\..\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"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="$(SolutionDir)\Release;C:\Program Files\OpenAL 1.1 SDK\libs\Win32"
+ IgnoreDefaultLibraryNames=""
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\src\testobj.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\src\test.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\testobj.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\TikiTest.cpp"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Modified: tiki/examples/TikiTest/src/test.cpp
===================================================================
--- tiki/examples/TikiTest/src/test.cpp 2007-05-25 14:37:18 UTC (rev 411)
+++ tiki/examples/TikiTest/src/test.cpp 2007-06-28 07:40:21 UTC (rev 412)
@@ -42,40 +42,40 @@
plx_mat3d_identity();
- vert.argb = Color(0,0,0);
- vert.z = 0.3;
+ vert.argb = Color(0, 0, 0);
+ vert.z = 0.3f;
vert.flags = PLX_VERT;
- vert.x = pos->x-2;
- vert.y = pos->y-4;
+ vert.x = static_cast<float>(pos->x - 2);
+ vert.y = static_cast<float>(pos->y - 4);
plx_prim(&vert, sizeof(vert));
vert.flags = PLX_VERT;
- vert.x = pos->x+18;
- vert.y = pos->y+16;
+ vert.x = static_cast<float>(pos->x + 18);
+ vert.y = static_cast<float>(pos->y + 16);
plx_prim(&vert, sizeof(vert));
vert.flags = PLX_VERT_EOS;
- vert.x = pos->x-2;
- vert.y = pos->y+24;
+ vert.x = static_cast<float>(pos->x - 2);
+ vert.y = static_cast<float>(pos->y + 24);
plx_prim(&vert, sizeof(vert));
- vert.argb = Color(0.8,0.2,0.1);
- vert.z = 0.31;
+ vert.argb = Color(0.8f, 0.2f, 0.1f);
+ vert.z = 0.31f;
vert.flags = PLX_VERT;
- vert.x = pos->x;
- vert.y = pos->y;
+ vert.x = static_cast<float>(pos->x);
+ vert.y = static_cast<float>(pos->y);
plx_prim(&vert, sizeof(vert));
vert.flags = PLX_VERT;
- vert.x = pos->x+15;
- vert.y = pos->y+15;
+ vert.x = static_cast<float>(pos->x + 15);
+ vert.y = static_cast<float>(pos->y + 15);
plx_prim(&vert, sizeof(vert));
vert.flags = PLX_VERT_EOS;
- vert.x = pos->x;
- vert.y = pos->y+21;
+ vert.x = static_cast<float>(pos->x);
+ vert.y = static_cast<float>(pos->y + 21);
plx_prim(&vert, sizeof(vert));
}
@@ -107,14 +107,14 @@
/* Iterate over stacks */
for ( i=0; i<stacks; i++ ) {
- pitch = 2*M_PI * ( (float)i/(float)stacks );
- pitch2 = 2*M_PI * ( (float)(i+1)/(float)stacks );
+ pitch = static_cast<float>(2*M_PI * ( (float)i/(float)stacks ));
+ pitch2 = static_cast<float>(2*M_PI * ( (float)(i+1)/(float)stacks ));
/* Iterate over slices: each entire stack will be one
long triangle strip. */
for ( j=0; j<=slices/2; j++ ) {
- yaw = 2*M_PI * ( (float)j/(float)slices );
- yaw2 = 2*M_PI * ( (float)(j+1)/(float)slices );
+ yaw = static_cast<float>(2*M_PI * ( (float)j/(float)slices ));
+ yaw2 = static_cast<float>(2*M_PI * ( (float)(j+1)/(float)slices ));
/* x, y+1 */
x = radius * fcos( yaw ) * fcos( pitch2 );
@@ -172,7 +172,7 @@
plx_mat3d_push();
for (i=0; i<SPHERE_CNT; i++) {
- plx_mat3d_translate(6.0f * fcos(i * 2*M_PI / SPHERE_CNT), 0.0f, 6.0f * fsin(i * 2*M_PI / SPHERE_CNT));
+ plx_mat3d_translate(6.0f * fcos(static_cast<float>(i * 2*M_PI / SPHERE_CNT)), 0.0f, 6.0f * fsin(static_cast<float>(i * 2*M_PI / SPHERE_CNT)));
plx_mat3d_rotate(r, 1.0f, 1.0f, 1.0f);
sphere(1.2f, 20, 20);
if (i < (SPHERE_CNT-1))
@@ -186,7 +186,7 @@
plx_mat3d_push();
for (i=0; i<SPHERE_CNT; i++) {
- plx_mat3d_translate(3.0f * fcos(i * 2*M_PI / SPHERE_CNT), 0.0f, 3.0f * fsin(i * 2*M_PI / SPHERE_CNT));
+ plx_mat3d_translate(3.0f * fcos(static_cast<float>(i * 2*M_PI / SPHERE_CNT)), 0.0f, 3.0f * fsin(static_cast<float>(i * 2*M_PI / SPHERE_CNT)));
plx_mat3d_rotate(r, 1.0f, 1.0f, 1.0f);
sphere(0.8f, 20, 20);
if (i < (SPHERE_CNT-1))
@@ -198,7 +198,7 @@
Frame::finish();
r+=dir;
- phase += 2*M_PI / 240.0f;
+ phase += static_cast<float>(2*M_PI / 240);
}
volatile bool quitting = false;
Modified: tiki/src/audio/sound.cpp
===================================================================
--- tiki/src/audio/sound.cpp 2007-05-25 14:37:18 UTC (rev 411)
+++ tiki/src/audio/sound.cpp 2007-06-28 07:40:21 UTC (rev 412)
@@ -124,7 +124,7 @@
char magic[4];
uint32 len, hz;
- uint16 *tmp, chn, bitsize, fmt;
+ uint16 chn, bitsize, fmt;
File wavFile(fn,"r");
wavFile.seek(8, SEEK_SET);
Modified: tiki/src/gl/drawables/console.cpp
===================================================================
--- tiki/src/gl/drawables/console.cpp 2007-05-25 14:37:18 UTC (rev 411)
+++ tiki/src/gl/drawables/console.cpp 2007-06-28 07:40:21 UTC (rev 412)
@@ -179,8 +179,8 @@
void ConsoleText::renderCharacter(float x, float y, float w, float h, unsigned char c, int attr) {
plx_vertex_t vert;
- float u = (c % 16) * 8;
- float v = (c / 16) * 8;
+ float u = static_cast<float>((c % 16) * 8);
+ float v = static_cast<float>((c / 16) * 8);
int color = attr & 0x07;
@@ -188,7 +188,7 @@
w *= sv.x;
h *= sv.y;
- const Vector & tv = getPosition() + Vector(x, y, 0.01);
+ const Vector & tv = getPosition() + Vector(x, y, 0.01f);
m_texture->select();
@@ -233,7 +233,7 @@
w *= sv.x;
h *= sv.y;
- const Vector & tv = getPosition() + Vector(x, y, -0.01);
+ const Vector & tv = getPosition() + Vector(x, y, -0.01f);
m_texture->deselect();
Modified: tiki/src/gl/drawables/cursor.cpp
===================================================================
--- tiki/src/gl/drawables/cursor.cpp 2007-05-25 14:37:18 UTC (rev 411)
+++ tiki/src/gl/drawables/cursor.cpp 2007-06-28 07:40:21 UTC (rev 412)
@@ -50,7 +50,7 @@
}
if (evt.type==Event::EvtMouseMove ) {
- setTranslate(Vector(evt.x,evt.y,getTranslate().z));
+ setTranslate(Vector(static_cast<float>(evt.x), static_cast<float>(evt.y), getTranslate().z));
}
}
Modified: tiki/src/gl/drawables/pointerArrow.cpp
===================================================================
--- tiki/src/gl/drawables/pointerArrow.cpp 2007-05-25 14:37:18 UTC (rev 411)
+++ tiki/src/gl/drawables/pointerArrow.cpp 2007-06-28 07:40:21 UTC (rev 412)
@@ -16,7 +16,7 @@
using namespace Tiki::GL::Plxcompat;
PointerArrow::PointerArrow() {
- setTint(Color(1.0,0.2,0.1));
+ setTint(Color(1.0f, 0.2f, 0.1f));
}
PointerArrow::~PointerArrow() {
@@ -48,7 +48,7 @@
plx_prim(&vert, sizeof(vert));
vert.argb = getTint();
- vert.z = tv.z + 0.01;
+ vert.z = tv.z + 0.01f;
vert.flags = PLX_VERT;
vert.x = tv.x;
Modified: tiki/win32/src/plathid.cpp
===================================================================
--- tiki/win32/src/plathid.cpp 2007-05-25 14:37:18 UTC (rev 411)
+++ tiki/win32/src/plathid.cpp 2007-06-28 07:40:21 UTC (rev 412)
@@ -161,7 +161,7 @@
}
evt.type = Event::EvtKeypress;
- for (int i=0; i<event.nRepeatCount; i++)
+ for (unsigned int i=0; i<event.nRepeatCount; i++)
sendEvent(evt);
}
break;
Modified: tiki/win32/tiki_vc80.sln
===================================================================
--- tiki/win32/tiki_vc80.sln 2007-05-25 14:37:18 UTC (rev 411)
+++ tiki/win32/tiki_vc80.sln 2007-06-28 07:40:21 UTC (rev 412)
@@ -1,7 +1,18 @@
+
Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
+# Visual C++ Express 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiki", "tiki_vs80.vcproj", "{F2816CAC-B560-4ED9-8A73-9635F832943C}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TikiTest", "..\examples\TikiTest\TikiTest_vc80.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}
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -12,6 +23,14 @@
{F2816CAC-B560-4ED9-8A73-9635F832943C}.Debug|Win32.Build.0 = Debug|Win32
{F2816CAC-B560-4ED9-8A73-9635F832943C}.Release|Win32.ActiveCfg = Release|Win32
{F2816CAC-B560-4ED9-8A73-9635F832943C}.Release|Win32.Build.0 = Release|Win32
+ {7B823C96-860C-4578-95BB-1087A45AF1AA}.Debug|Win32.ActiveCfg = Debug|Win32
+ {7B823C96-860C-4578-95BB-1087A45AF1AA}.Debug|Win32.Build.0 = Debug|Win32
+ {7B823C96-860C-4578-95BB-1087A45AF1AA}.Release|Win32.ActiveCfg = Release|Win32
+ {7B823C96-860C-4578-95BB-1087A45AF1AA}.Release|Win32.Build.0 = Release|Win32
+ {FCAE4EF3-7B5D-4C0D-8793-4157F7D8709F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {FCAE4EF3-7B5D-4C0D-8793-4157F7D8709F}.Debug|Win32.Build.0 = Debug|Win32
+ {FCAE4EF3-7B5D-4C0D-8793-4157F7D8709F}.Release|Win32.ActiveCfg = Release|Win32
+ {FCAE4EF3-7B5D-4C0D-8793-4157F7D8709F}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Modified: tiki/win32/tiki_vs80.vcproj
===================================================================
--- tiki/win32/tiki_vs80.vcproj 2007-05-25 14:37:18 UTC (rev 411)
+++ tiki/win32/tiki_vs80.vcproj 2007-06-28 07:40:21 UTC (rev 412)
@@ -4,6 +4,7 @@
Version="8.00"
Name="tiki"
ProjectGUID="{F2816CAC-B560-4ED9-8A73-9635F832943C}"
+ RootNamespace="tiki"
Keyword="Win32Proj"
>
<Platforms>
@@ -41,8 +42,8 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="include;../include;../3rdparty/libpng;../3rdparty/zlib;../3rdparty/libjpeg;../3rdparty/libogg/include;../3rdparty/libvorbis/include;"C:\Program Files\OpenAL 1.1 SDK\include""
- PreprocessorDefinitions="_WIN32_WINNT=0x0500"
+ AdditionalIncludeDirectories=""$(SolutionDir)\include";"$(SolutionDir)\..\include";"C:\Program Files\OpenAL 1.1 SDK\include";"$(SolutionDir)\..\3rdparty\libjpeg";"$(SolutionDir)\..\3rdparty\libogg\include";"$(SolutionDir)\..\3rdparty\libpng";"$(SolutionDir)\..\3rdparty\libvorbis\include";"$(SolutionDir)\..\3rdparty\zlib""
+ PreprocessorDefinitions="_WIN32_WINNT=0x0500;_CRT_SECURE_NO_WARNINGS=1"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -107,8 +108,8 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="include;../include;../3rdparty/libpng;../3rdparty/zlib;../3rdparty/libjpeg;../3rdparty/libogg/include;../3rdparty/libvorbis/include;"C:\Program Files\OpenAL 1.1 SDK\include""
- PreprocessorDefinitions="_WIN32_WINNT=0x0500"
+ AdditionalIncludeDirectories=""$(SolutionDir)\include";"$(SolutionDir)\..\include";"C:\Program Files\OpenAL 1.1 SDK\include";"$(SolutionDir)\..\3rdparty\libjpeg";"$(SolutionDir)\..\3rdparty\libogg\include";"$(SolutionDir)\..\3rdparty\libpng";"$(SolutionDir)\..\3rdparty\libvorbis\include";"$(SolutionDir)\..\3rdparty\zlib""
+ PreprocessorDefinitions="_WIN32_WINNT=0x0500; _CRT_SECURE_NO_WARNINGS=1"
RuntimeLibrary="0"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="pch.h"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|