From: <at...@us...> - 2006-07-05 22:02:11
|
Revision: 346 Author: atani Date: 2006-07-05 15:01:53 -0700 (Wed, 05 Jul 2006) ViewCVS: http://svn.sourceforge.net/cadcdev/?rev=346&view=rev Log Message: ----------- [DC] compilation fixes found while compiling goatmenu. [DC] removed call to tikitest_all from dc/Makefile. [GEN] fixes for various compilation warnings. [GEN] fixed missing include for Tiki/hid.h in cursor.h Modified Paths: -------------- tiki/dc/Makefile tiki/dc/src/platgl.cpp tiki/include/Tiki/drawables/cursor.h tiki/include/Tiki/genmenu.h tiki/src/gl/drawables/console.cpp tiki/src/gl/drawables/pointerArrow.cpp tiki/src/gl/font.cpp tiki/src/gl/plxcompat.cpp tiki/src/gl/texture.cpp Modified: tiki/dc/Makefile =================================================================== --- tiki/dc/Makefile 2006-06-15 16:50:57 UTC (rev 345) +++ tiki/dc/Makefile 2006-07-05 22:01:53 UTC (rev 346) @@ -19,7 +19,6 @@ all: subdirs $(BASE_OBJS) $(KOS_AR) ru libtiki.a $(BASE_OBJS) - $(MAKE) tikitest_all clean: clean_subdirs -rm -f $(BASE_OBJS) libtiki.a Modified: tiki/dc/src/platgl.cpp =================================================================== --- tiki/dc/src/platgl.cpp 2006-06-15 16:50:57 UTC (rev 345) +++ tiki/dc/src/platgl.cpp 2006-07-05 22:01:53 UTC (rev 346) @@ -15,11 +15,6 @@ using namespace Tiki; -static struct timeval lastFrame = { 0,0 }; -static int targetFrameRate = 60; -static uint64 firstFrame = 0; -static uint64 frameCnt = 0, totalFrameCnt = 0; - float Tiki::GL::Frame::getFrameRate() { pvr_stats_t stats; pvr_get_stats(&stats); @@ -27,70 +22,33 @@ } void Tiki::GL::Frame::setFrameRateLimit(int rate) { - targetFrameRate = rate; } extern "C" { void tiki_wait_if_needed() { -#if 0 - // Every so often we should reset the frame counters, to avoid - // having a super long term averaging effect. - if (frameCnt >= 500) { - firstFrame = 0; - frameCnt = 0; - } - - // Update frame counters. - if (!firstFrame) - firstFrame = Tiki::Time::gettime(); - frameCnt++; - totalFrameCnt++; - - if (lastFrame.tv_sec == 0) { - gettimeofday(&lastFrame, NULL); - return; - } - - struct timeval now; - gettimeofday(&now, NULL); - long long nowu = ((long long)now.tv_sec) * 1000 * 1000 + now.tv_usec; - long long lastu = ((long long)lastFrame.tv_sec) * 1000 * 1000 + lastFrame.tv_usec; - long long diffu = nowu - lastu; - if (diffu < (1000*1000 / targetFrameRate)) { - Time::sleep((1000*1000 / targetFrameRate) - diffu); - } - gettimeofday(&lastFrame, NULL); -#endif pvr_wait_ready(); } void tiki_scene_begin_hook() { - //tiki_wait_if_needed(); - //pvr_scene_begin(); glKosBeginFrame(); } void tiki_scene_finish_hook() { - //pvr_scene_finish(); glKosFinishFrame(); } void tiki_scene_begin_opaque_hook() { - //pvr_list_begin(PVR_LIST_OP_POLY); } void tiki_scene_finish_opaque_hook() { glKosFinishList(); - //pvr_list_finish(); } void tiki_scene_begin_trans_hook() { - //pvr_list_begin(PVR_LIST_TR_POLY); } void tiki_scene_finish_trans_hook() { glKosFinishList(); - //pvr_list_finish(); } } Modified: tiki/include/Tiki/drawables/cursor.h =================================================================== --- tiki/include/Tiki/drawables/cursor.h 2006-06-15 16:50:57 UTC (rev 345) +++ tiki/include/Tiki/drawables/cursor.h 2006-07-05 22:01:53 UTC (rev 346) @@ -10,6 +10,7 @@ #define __TIKI_DRW_CURSOR_H #include "Tiki/drawable.h" +#include "Tiki/hid.h" namespace Tiki { namespace GL { Modified: tiki/include/Tiki/genmenu.h =================================================================== --- tiki/include/Tiki/genmenu.h 2006-06-15 16:50:57 UTC (rev 345) +++ tiki/include/Tiki/genmenu.h 2006-07-05 22:01:53 UTC (rev 346) @@ -13,7 +13,7 @@ #include "Tiki/refcnt.h" #include "Tiki/drawables/layer.h" #include "Tiki/hid.h" -#include "Tiki/eventCollector.h" +#include "Tiki/eventcollector.h" #include "Tiki/oggvorbis.h" /* Modified: tiki/src/gl/drawables/console.cpp =================================================================== --- tiki/src/gl/drawables/console.cpp 2006-06-15 16:50:57 UTC (rev 345) +++ tiki/src/gl/drawables/console.cpp 2006-07-05 22:01:53 UTC (rev 346) @@ -124,7 +124,7 @@ vsprintf(buf,fmt,args); va_end(args); - for(int i=0; i<strlen(buf); i++) { + for(size_t i=0; i<strlen(buf); i++) { if(m_cursor_x >= m_cols && m_autoWrap) { m_cursor_y++; m_cursor_x = 0; @@ -494,4 +494,4 @@ // printf("Bogus ANSI: %s\n", ansistr); // } ansiptr = 0; -} \ No newline at end of file +} Modified: tiki/src/gl/drawables/pointerArrow.cpp =================================================================== --- tiki/src/gl/drawables/pointerArrow.cpp 2006-06-15 16:50:57 UTC (rev 345) +++ tiki/src/gl/drawables/pointerArrow.cpp 2006-07-05 22:01:53 UTC (rev 346) @@ -65,4 +65,4 @@ vert.y = tv.y+21; plx_prim(&vert, sizeof(vert)); } -} \ No newline at end of file +} Modified: tiki/src/gl/font.cpp =================================================================== --- tiki/src/gl/font.cpp 2006-06-15 16:50:57 UTC (rev 345) +++ tiki/src/gl/font.cpp 2006-07-05 22:01:53 UTC (rev 346) @@ -254,10 +254,10 @@ void * txrptr = m_fnt.txr->canvasLock(); auto_ptr<uint8> bmtmpfree; - uint8 * bmtmp; - uint32 bmsize; + uint8 * bmtmp = NULL; + int bmsize; auto_ptr<uint16> txrtmpfree; - uint16 * txrtmp; + uint16 * txrtmp = NULL; int stride; /* What format are we using? */ Modified: tiki/src/gl/plxcompat.cpp =================================================================== --- tiki/src/gl/plxcompat.cpp 2006-06-15 16:50:57 UTC (rev 345) +++ tiki/src/gl/plxcompat.cpp 2006-07-05 22:01:53 UTC (rev 346) @@ -22,7 +22,9 @@ using namespace Tiki::GL::Plxcompat; using namespace Tiki::Math; +#ifndef assert_msg #define assert_msg(x, y) assert(x) +#endif //////////////////////////////////////////////////////////////////// @@ -481,9 +483,10 @@ ////////////////////////////////////////////////////////////////////////////////// + +/* static float zscale = 1000.0f; - -/* static int stripping = 0; +static int stripping = 0; void Plxcompat::plx_prim(plx_vertex_t * vert, int size) { if (!stripping) glBegin(GL_TRIANGLE_STRIP); Modified: tiki/src/gl/texture.cpp =================================================================== --- tiki/src/gl/texture.cpp 2006-06-15 16:50:57 UTC (rev 345) +++ tiki/src/gl/texture.cpp 2006-07-05 22:01:53 UTC (rev 346) @@ -254,8 +254,11 @@ m_ptr = new uint8[m_w * m_h * 3]; break; case RGBA8888: + case ARGB8888: m_ptr = new uint8[m_w * m_h * 4]; break; + default: + return false; } // We'll write the converted data into this buffer This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |