Merge branch 'master' into moveSel2CCObject

This commit is contained in:
dumganhar 2012-01-17 09:37:31 +08:00
commit ea0fb47f98
81 changed files with 3983 additions and 3493 deletions

View File

@ -22,7 +22,12 @@
#include <Box2D/Collision/Shapes/b2CircleShape.h> #include <Box2D/Collision/Shapes/b2CircleShape.h>
#include <Box2D/Collision/Shapes/b2PolygonShape.h> #include <Box2D/Collision/Shapes/b2PolygonShape.h>
#ifdef SHP
#include <stdio.h>
#else
#include <cstdio> #include <cstdio>
#endif
using namespace std; using namespace std;
int32 b2_toiCalls, b2_toiIters, b2_toiMaxIters; int32 b2_toiCalls, b2_toiIters, b2_toiMaxIters;

View File

@ -17,11 +17,15 @@
*/ */
#include <Box2D/Common/b2Settings.h> #include <Box2D/Common/b2Settings.h>
#ifdef SHP
#include <FBaseSys.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#else
#include <cstdlib> #include <cstdlib>
#include <cstdio> #include <cstdio>
#include <cstdarg> #include <cstdarg>
#ifdef SHP
#include <FBaseSys.h>
#endif #endif

View File

@ -34,7 +34,7 @@
<option id="gnu.cpp.compiler.lib.debug.option.optimization.level.1279009838" name="Optimization Level" superClass="gnu.cpp.compiler.lib.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/> <option id="gnu.cpp.compiler.lib.debug.option.optimization.level.1279009838" name="Optimization Level" superClass="gnu.cpp.compiler.lib.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.lib.debug.option.debugging.level.1137403177" name="Debug Level" superClass="gnu.cpp.compiler.lib.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/> <option id="gnu.cpp.compiler.lib.debug.option.debugging.level.1137403177" name="Debug Level" superClass="gnu.cpp.compiler.lib.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.include.paths.1388652374" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath"> <option id="gnu.cpp.compiler.option.include.paths.1388652374" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="${cocos2dx_loc}"/> <listOptionValue builtIn="false" value="../../../"/>
</option> </option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1768946738" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/> <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1768946738" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool> </tool>
@ -44,9 +44,7 @@
<option id="gnu.c.compiler.option.preprocessor.def.symbols.638003594" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols"> <option id="gnu.c.compiler.option.preprocessor.def.symbols.638003594" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="LINUX"/> <listOptionValue builtIn="false" value="LINUX"/>
</option> </option>
<option id="gnu.c.compiler.option.include.paths.29808765" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"> <option id="gnu.c.compiler.option.include.paths.29808765" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"/>
<listOptionValue builtIn="false" value="${cocos2dx_loc}"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1136434176" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/> <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1136434176" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool> </tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.base.1824882157" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/> <tool id="cdt.managedbuild.tool.gnu.c.linker.base.1824882157" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/>
@ -56,6 +54,12 @@
</tool> </tool>
</toolChain> </toolChain>
</folderInfo> </folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Collision"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Common"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Dynamics"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Rope"/>
</sourceEntries>
</configuration> </configuration>
</storageModule> </storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
@ -88,7 +92,7 @@
<option id="gnu.cpp.compiler.lib.release.option.optimization.level.401070766" name="Optimization Level" superClass="gnu.cpp.compiler.lib.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/> <option id="gnu.cpp.compiler.lib.release.option.optimization.level.401070766" name="Optimization Level" superClass="gnu.cpp.compiler.lib.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
<option id="gnu.cpp.compiler.lib.release.option.debugging.level.1515853804" name="Debug Level" superClass="gnu.cpp.compiler.lib.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/> <option id="gnu.cpp.compiler.lib.release.option.debugging.level.1515853804" name="Debug Level" superClass="gnu.cpp.compiler.lib.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.include.paths.315343143" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath"> <option id="gnu.cpp.compiler.option.include.paths.315343143" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="../../.."/> <listOptionValue builtIn="false" value="../../../"/>
</option> </option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.811835144" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/> <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.811835144" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool> </tool>
@ -98,9 +102,7 @@
<option id="gnu.c.compiler.option.preprocessor.def.symbols.514457469" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols"> <option id="gnu.c.compiler.option.preprocessor.def.symbols.514457469" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="LINUX"/> <listOptionValue builtIn="false" value="LINUX"/>
</option> </option>
<option id="gnu.c.compiler.option.include.paths.1198096657" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"> <option id="gnu.c.compiler.option.include.paths.1198096657" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"/>
<listOptionValue builtIn="false" value="../../.."/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.624842426" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/> <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.624842426" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool> </tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.base.1478061636" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/> <tool id="cdt.managedbuild.tool.gnu.c.linker.base.1478061636" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/>
@ -110,6 +112,12 @@
</tool> </tool>
</toolChain> </toolChain>
</folderInfo> </folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Collision"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Common"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Dynamics"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Rope"/>
</sourceEntries>
</configuration> </configuration>
</storageModule> </storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>

View File

@ -81,25 +81,30 @@
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature> <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures> </natures>
<linkedResources> <linkedResources>
<link>
<name>Box2D.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Box2D.h</locationURI>
</link>
<link> <link>
<name>Collision</name> <name>Collision</name>
<type>2</type> <type>2</type>
<location>/home/xm/workspace/cocos2d-x/Box2D/Collision</location> <locationURI>PARENT-1-PROJECT_LOC/Collision</locationURI>
</link> </link>
<link> <link>
<name>Common</name> <name>Common</name>
<type>2</type> <type>2</type>
<location>/home/xm/workspace/cocos2d-x/Box2D/Common</location> <locationURI>PARENT-1-PROJECT_LOC/Common</locationURI>
</link> </link>
<link> <link>
<name>Dynamics</name> <name>Dynamics</name>
<type>2</type> <type>2</type>
<location>/home/xm/workspace/cocos2d-x/Box2D/Dynamics</location> <locationURI>PARENT-1-PROJECT_LOC/Dynamics</locationURI>
</link> </link>
<link> <link>
<name>Rope</name> <name>Rope</name>
<type>2</type> <type>2</type>
<location>/home/xm/workspace/cocos2d-x/Box2D/Rope</location> <locationURI>PARENT-1-PROJECT_LOC/Rope</locationURI>
</link> </link>
</linkedResources> </linkedResources>
</projectDescription> </projectDescription>

View File

@ -1,23 +1,69 @@
cocos2d-1.0.1-x-0.11.0 @ Jan.13 2012
[blackberry]
Feature #907: support blackberry playbook
[all platforms]
Bug #752: fix a bug that enable and disable touch more times in touch handler callback function may cause memory leak
Bug #911: fix a bug that TextureCache::addUIImage() cannot create texture when key is null
Bug #920: export export functions in CCAffineTransform with CC_DLL
Bug #922: make CCTexture2D::setPVRImagesHavePremultipliedAlpha() to be a static function
Bug #926: fix a crash caused by RTTI when running TouchesTest
Bug #936: fix a bug that touch menu item may crash when selector is null
Feature #892: use RTTI to simplify the codes
Feature #903: add touch index for CCTouch
Refactor #934: add 'isEqual' function for CCString, make CCObject::isEqual to a virtual function
Refactor #940: use new icons and new background pictures with new logo of cocos2d-x
[android]
Bug #923: fix a bug that CCTextureCache::addImageAsync() crashes when a game enters foreground from background
Bug #906: remove unneeded codes in CCImage_android.cpp
Bug #910: fix a bug that create-android-project.bat may erase exist folder with appointed name
Bug #884: fix a crash error caused by CocosDenshion on android simulator
Bug #921: fix a bug that accelerometer axes inverted in Motorola Xoom tablet
Bug #928: fix a bug that 16-bit texture is changed to 32-bit after application enter foreground
Bug #935: fix a bug that terminateProcessJNI() invoke wrong jni function
Bug #937: fix a compiling error on android x86
Bug #941: fix a bug that volume of background music may not in [0, 1.0]
Feature #887: define GL_GLEXT_PROTOTYPES = 1 automatically when compile on ndk r7
Feature #919: improve build_native.sh and create-android-project.sh
Refactor #924: make loading music resources thread safe
Document #837: Write a document describes how to use jni
Document #914: update document to fit android r5~r7
[iOS]
Bug #917: implement CCFileUtils::getFileDataFromZip()
Feature #893: remove cached data when receiving memory warning on iOS
[bada]
Bug #918: fix a compiling error after renaming airplay to marmalade
Bug #927: fix a crash caused by invoking unloadEffect after invoking stopEffect
Bug #938: fix a bug that glGenFramebuffersOES isn't supported on wave m device
Bug #943: fix a bug that box2d can't be compiled successfully on bada sdk 1.2.1
Refactor #904: Recreate bada 2.0 projects
[win32]
Bug #915: fix a bug that msvc template uses old version of .cpp files
[linux]
Bug #888: fix compiling error with eclipse
Bug #930: fix a crash caused by load jpg format files
[marmalade]
Refactor #908: merge marmalade to latest cocos2d-x source
cocos2d-1.0.1-x-0.10.0 @ Dec.2 2011 cocos2d-1.0.1-x-0.10.0 @ Dec.2 2011
[bada] [bada]
Feature #223 integrate cocos2d-bada branch to master Feature #223 integrate cocos2d-bada branch to master
Bug #852 fix a bug that CCSpriteBatchNode cannot be drawn correctly Bug #852 fix a bug that CCSpriteBatchNode cannot be drawn correctly
[all platforms] [all platforms]
Feature #854 integrate pthread and write a test case on all platforms Feature #854 integrate pthread and write a test case on all platforms
Feature #465 implement CCTextureCache::addImageAsync() Feature #465 implement CCTextureCache::addImageAsync()
Feature #850 upgrade box2d from 2.1.2 to last 2.2.1 Feature #850 upgrade box2d from 2.1.2 to last 2.2.1
Feature #781 add functions for effects Feature #781 add functions for effects
Feature #760 add methods to get/set CCDirector::m_pNotificationNode Feature #760 add methods to get/set CCDirector::m_pNotificationNode
Bug #883 fix the crash of SpriteTest Bug #883 fix the crash of SpriteTest
Refactor #879 use CCAssert() instead of assert() Refactor #879 use CCAssert() instead of assert()
Document #882 Write a document describes some cautions about using pthread Document #882 Write a document describes some cautions about using pthread
[android] [android]
Feature #838 support android x86 platform Feature #838 support android x86 platform
Bug #758 fix a bug that custom TTF fonts causing low memory Bug #758 fix a bug that custom TTF fonts causing low memory
Bug #848 fix a bug that accelerometer values are wrong if the content is scaled Bug #848 fix a bug that accelerometer values are wrong if the content is scaled
Bug #885 fix a bug that SimpleAudioEngine::setEffectVolume() don't take effect immediately Bug #885 fix a bug that SimpleAudioEngine::setEffectVolume() don't take effect immediately
Document #864 write a describe how to build on sdk 4.0 & ndk-r7 Document #864 write a describe how to build on sdk 4.0 & ndk-r7
Document #878 write a document describe how to build project for x86 android Document #878 write a document describe how to build project for x86 android
Document #881 write a document describes building android ndk project with ndk-r7 Document #881 write a document describes building android ndk project with ndk-r7
[linux] [linux]
Bug #780 fix build error on ubuntu 11.0 Bug #780 fix build error on ubuntu 11.0

View File

@ -397,7 +397,7 @@ void SimpleAudioEngine::setBackgroundMusicVolume(float volume)
if (s_pBackPlayer != NULL) if (s_pBackPlayer != NULL)
{ {
s_pBackPlayer->SetVolume(ceil(volume)); s_pBackPlayer->SetVolume(ceil(volume*99));
} }
s_fBackgroundMusicVolume = volume; s_fBackgroundMusicVolume = volume;
} }
@ -423,7 +423,7 @@ void SimpleAudioEngine::setEffectsVolume(float volume)
{ {
if (it->second != NULL) if (it->second != NULL)
{ {
it->second->SetVolume(ceil(volume)); it->second->SetVolume(ceil(volume*99));
} }
} }
s_fEffectsVolume = volume; s_fEffectsVolume = volume;
@ -446,13 +446,7 @@ unsigned int SimpleAudioEngine::playEffect(const char* pszFilePath, bool bLoop/*
AppLog("CCAudioOut instance must not be NULL, id = %d", p->first); AppLog("CCAudioOut instance must not be NULL, id = %d", p->first);
return 0; return 0;
} }
p->second->SetVolume((int) (s_fEffectsVolume * 99)); p->second->SetVolume(ceil(s_fEffectsVolume * 99));
int volume = p->second->GetVolume();
if (s_fEffectsVolume > 0.0f && volume == 0)
{
p->second->SetVolume(1);
}
if (AUDIOOUT_STATE_PLAYING == p->second->GetState()) if (AUDIOOUT_STATE_PLAYING == p->second->GetState())
{ {

View File

@ -32,8 +32,8 @@
<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.2020537008" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/> <option id="gnu.cpp.compiler.exe.debug.option.optimization.level.2020537008" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.exe.debug.option.debugging.level.886209200" name="Debug Level" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/> <option id="gnu.cpp.compiler.exe.debug.option.debugging.level.886209200" name="Debug Level" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.include.paths.1002280254" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath"> <option id="gnu.cpp.compiler.option.include.paths.1002280254" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/include}&quot;"/> <listOptionValue builtIn="false" value="../../include"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/third_party/fmod/api/inc}&quot;"/> <listOptionValue builtIn="false" value="../../third_party/fmod/api/inc"/>
</option> </option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1604049990" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/> <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1604049990" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool> </tool>
@ -41,8 +41,8 @@
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.206236808" name="Optimization Level" superClass="gnu.c.compiler.exe.debug.option.optimization.level" valueType="enumerated"/> <option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.206236808" name="Optimization Level" superClass="gnu.c.compiler.exe.debug.option.optimization.level" valueType="enumerated"/>
<option id="gnu.c.compiler.exe.debug.option.debugging.level.828037565" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/> <option id="gnu.c.compiler.exe.debug.option.debugging.level.828037565" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.985313341" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"> <option id="gnu.c.compiler.option.include.paths.985313341" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/include}&quot;"/> <listOptionValue builtIn="false" value="../../include"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/third_party/fmod/api/inc}&quot;"/> <listOptionValue builtIn="false" value="../../third_party/fmod/api/inc"/>
</option> </option>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.370598124" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/> <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.370598124" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool> </tool>
@ -55,7 +55,7 @@
</option> </option>
<option defaultValue="true" id="gnu.cpp.link.option.shared.430688089" name="Shared (-shared)" superClass="gnu.cpp.link.option.shared" valueType="boolean"/> <option defaultValue="true" id="gnu.cpp.link.option.shared.430688089" name="Shared (-shared)" superClass="gnu.cpp.link.option.shared" valueType="boolean"/>
<option id="gnu.cpp.link.option.paths.1630974641" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths"> <option id="gnu.cpp.link.option.paths.1630974641" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/third_party/fmod/api/lib}&quot;"/> <listOptionValue builtIn="false" value="../../third_party/fmod/api/lib"/>
</option> </option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1207468004" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input"> <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1207468004" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
@ -68,7 +68,9 @@
</toolChain> </toolChain>
</folderInfo> </folderInfo>
<sourceEntries> <sourceEntries>
<entry excluding="android|third_party/fmod/tools|third_party/fmod/fmoddesignerapi|third_party/fmod/examples|third_party/fmod/documentation|wophone|win32|proj.wophone|proj.win32|proj.airplay|iphone|airplay" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> <entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Linux"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="include"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="third_party"/>
</sourceEntries> </sourceEntries>
</configuration> </configuration>
</storageModule> </storageModule>
@ -104,8 +106,8 @@
<option id="gnu.cpp.compiler.exe.release.option.optimization.level.1962013303" name="Optimization Level" superClass="gnu.cpp.compiler.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/> <option id="gnu.cpp.compiler.exe.release.option.optimization.level.1962013303" name="Optimization Level" superClass="gnu.cpp.compiler.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
<option id="gnu.cpp.compiler.exe.release.option.debugging.level.2015755429" name="Debug Level" superClass="gnu.cpp.compiler.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/> <option id="gnu.cpp.compiler.exe.release.option.debugging.level.2015755429" name="Debug Level" superClass="gnu.cpp.compiler.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.include.paths.1414683978" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath"> <option id="gnu.cpp.compiler.option.include.paths.1414683978" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/include}&quot;"/> <listOptionValue builtIn="false" value="../../include"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/third_party/fmod/api/inc}&quot;"/> <listOptionValue builtIn="false" value="../../third_party/fmod/api/inc"/>
</option> </option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1557365568" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/> <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1557365568" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool> </tool>
@ -113,8 +115,8 @@
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.1295172282" name="Optimization Level" superClass="gnu.c.compiler.exe.release.option.optimization.level" valueType="enumerated"/> <option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.1295172282" name="Optimization Level" superClass="gnu.c.compiler.exe.release.option.optimization.level" valueType="enumerated"/>
<option id="gnu.c.compiler.exe.release.option.debugging.level.1006696632" name="Debug Level" superClass="gnu.c.compiler.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/> <option id="gnu.c.compiler.exe.release.option.debugging.level.1006696632" name="Debug Level" superClass="gnu.c.compiler.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.92938039" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"> <option id="gnu.c.compiler.option.include.paths.92938039" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/include}&quot;"/> <listOptionValue builtIn="false" value="../../include"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/third_party/fmod/api/inc}&quot;"/> <listOptionValue builtIn="false" value="../../third_party/fmod/api/inc"/>
</option> </option>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.757092405" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/> <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.757092405" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool> </tool>
@ -127,7 +129,7 @@
</option> </option>
<option defaultValue="true" id="gnu.cpp.link.option.shared.1840009551" name="Shared (-shared)" superClass="gnu.cpp.link.option.shared" valueType="boolean"/> <option defaultValue="true" id="gnu.cpp.link.option.shared.1840009551" name="Shared (-shared)" superClass="gnu.cpp.link.option.shared" valueType="boolean"/>
<option id="gnu.cpp.link.option.paths.1502506408" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths"> <option id="gnu.cpp.link.option.paths.1502506408" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/third_party/fmod/api/lib}&quot;"/> <listOptionValue builtIn="false" value="../../third_party/fmod/api/lib"/>
</option> </option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1952243970" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input"> <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1952243970" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
@ -140,7 +142,9 @@
</toolChain> </toolChain>
</folderInfo> </folderInfo>
<sourceEntries> <sourceEntries>
<entry excluding="android|third_party/fmod/tools|third_party/fmod/fmoddesignerapi|third_party/fmod/examples|third_party/fmod/documentation|wophone|win32|proj.wophone|proj.win32|proj.airplay|iphone|airplay" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> <entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Linux"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="include"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="third_party"/>
</sourceEntries> </sourceEntries>
</configuration> </configuration>
</storageModule> </storageModule>

View File

@ -86,11 +86,6 @@
<type>2</type> <type>2</type>
<locationURI>PARENT-1-PROJECT_LOC/Linux</locationURI> <locationURI>PARENT-1-PROJECT_LOC/Linux</locationURI>
</link> </link>
<link>
<name>android</name>
<type>2</type>
<locationURI>PARENT-1-PROJECT_LOC/android</locationURI>
</link>
<link> <link>
<name>include</name> <name>include</name>
<type>2</type> <type>2</type>

View File

@ -93,20 +93,13 @@ spriteDog:setPosition(cocos2d.CCPoint(0, winSize.height/4*3))
layerFarm:addChild(spriteDog) layerFarm:addChild(spriteDog)
animation = cocos2d.CCAnimation:animation() animation = cocos2d.CCAnimation:animation()
animation:addFrame(frame0)
animation:addFrame(frame1)
animation:setDelay(0.5)
animation:setName('wait')
animFrames = cocos2d.CCMutableArray_CCSpriteFrame__:new(2) animFrames = cocos2d.CCMutableArray_CCSpriteFrame__:new(2)
animFrames:addObject(frame0) animFrames:addObject(frame0)
animFrames:addObject(frame1) animFrames:addObject(frame1)
--animation = cocos2d.CCAnimation:animationWithName("wait", 0.5, animFrames)
animation = cocos2d.CCAnimation:animationWithFrames(animFrames,0.5) animation = cocos2d.CCAnimation:animationWithFrames(animFrames,0.5)
animation = cocos2d.CCAnimation:animationWithFrames(animFrames, 0.5)
animate = cocos2d.CCAnimate:actionWithAnimation(animation, false); animate = cocos2d.CCAnimate:actionWithAnimation(animation, false);
spriteDog:runAction(cocos2d.CCRepeatForever:actionWithAction(animate)) spriteDog:runAction(cocos2d.CCRepeatForever:actionWithAction(animate))

View File

@ -7,7 +7,7 @@
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="8"/> <uses-sdk android:minSdkVersion="7" android:targetSdkVersion="8"/>
<application android:label="@string/app_name" <application android:label="@string/app_name"
android:debuggable="true"> android:debuggable="true" android:icon="@drawable/icon">
<activity android:name=".HelloLua" <activity android:name=".HelloLua"
android:label="@string/app_name" android:label="@string/app_name"

View File

@ -1,11 +1,2 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system use,
# "build.properties", and override values to adapt the script to your
# project structure.
# Project target. # Project target.
target=android-8 target=android-7

View File

@ -1,26 +1,26 @@
/* AUTO-GENERATED FILE. DO NOT MODIFY. /* AUTO-GENERATED FILE. DO NOT MODIFY.
* *
* This class was automatically generated by the * This class was automatically generated by the
* aapt tool from the resource data it found. It * aapt tool from the resource data it found. It
* should not be modified by hand. * should not be modified by hand.
*/ */
package org.cocos2dx.hellolua; package org.cocos2dx.hellolua;
public final class R { public final class R {
public static final class attr { public static final class attr {
} }
public static final class drawable { public static final class drawable {
public static final int icon=0x7f020000; public static final int icon=0x7f020000;
} }
public static final class id { public static final class id {
public static final int test_demo_gl_surfaceview=0x7f050001; public static final int test_demo_gl_surfaceview=0x7f050001;
public static final int textField=0x7f050000; public static final int textField=0x7f050000;
} }
public static final class layout { public static final class layout {
public static final int game_demo=0x7f030000; public static final int game_demo=0x7f030000;
} }
public static final class string { public static final class string {
public static final int app_name=0x7f040000; public static final int app_name=0x7f040000;
} }
} }

View File

@ -175,6 +175,14 @@ public class Cocos2dxMusic {
} }
public void setBackgroundVolume(float volume){ public void setBackgroundVolume(float volume){
if (volume < 0.0f){
volume = 0.0f;
}
if (volume > 1.0f){
volume = 1.0f;
}
this.mLeftVolume = this.mRightVolume = volume; this.mLeftVolume = this.mRightVolume = volume;
if (this.mBackgroundMediaPlayer != null){ if (this.mBackgroundMediaPlayer != null){
this.mBackgroundMediaPlayer.setVolume(this.mLeftVolume, this.mRightVolume); this.mBackgroundMediaPlayer.setVolume(this.mLeftVolume, this.mRightVolume);

View File

@ -64,7 +64,7 @@ bool AppDelegate::initInstance() {
// The HelloWorld is designed as HVGA. // The HelloWorld is designed as HVGA.
CCEGLView * pMainWnd = new CCEGLView(); CCEGLView * pMainWnd = new CCEGLView();
CC_BREAK_IF(! pMainWnd CC_BREAK_IF(! pMainWnd
|| ! pMainWnd->Create("cocos2d: Hello World", 800, 480,480, 320)); || ! pMainWnd->Create("cocos2d: Hello World", 480, 320 ,480, 320));
CCFileUtils::setResourcePath("../Resource/"); CCFileUtils::setResourcePath("../Resource/");

View File

@ -5,10 +5,6 @@
<storageModule moduleId="org.eclipse.cdt.core.settings"> <storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.1378309016"> <cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.1378309016">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.1378309016" moduleId="org.eclipse.cdt.core.settings" name="Debug"> <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.1378309016" moduleId="org.eclipse.cdt.core.settings" name="Debug">
<macros>
<stringMacro name="cocos2dx_loc" type="VALUE_TEXT" value="../../../"/>
<stringMacro name="lib_name" type="VALUE_TEXT" value="helloworld"/>
</macros>
<externalSettings/> <externalSettings/>
<extensions> <extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/> <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
@ -30,11 +26,14 @@
<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.513215504" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/> <option id="gnu.cpp.compiler.exe.debug.option.optimization.level.513215504" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.exe.debug.option.debugging.level.354795965" name="Debug Level" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/> <option id="gnu.cpp.compiler.exe.debug.option.debugging.level.354795965" name="Debug Level" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.include.paths.577331571" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath"> <option id="gnu.cpp.compiler.option.include.paths.577331571" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${cocos2dx_loc}/cocos2dx&quot;"/> <listOptionValue builtIn="false" value="../../Classes"/>
<listOptionValue builtIn="false" value="&quot;${cocos2dx_loc}/CocosDenshion/include&quot;"/> <listOptionValue builtIn="false" value="../../../"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/Classes}&quot;"/> <listOptionValue builtIn="false" value="../../../cocos2dx"/>
<listOptionValue builtIn="false" value="${cocos2dx_loc}/cocos2dx/include"/> <listOptionValue builtIn="false" value="../../../cocos2dx/include"/>
<listOptionValue builtIn="false" value="${cocos2dx_loc}/cocos2dx/platform"/> <listOptionValue builtIn="false" value="../../../cocos2dx/platform"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/qnx"/>
<listOptionValue builtIn="false" value="../../../chipmunk/include/chipmunk"/>
<listOptionValue builtIn="false" value="../../../CocosDenshion/include"/>
</option> </option>
<option id="gnu.cpp.compiler.option.preprocessor.def.753894218" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols"> <option id="gnu.cpp.compiler.option.preprocessor.def.753894218" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
<listOptionValue builtIn="false" value="LINUX"/> <listOptionValue builtIn="false" value="LINUX"/>
@ -44,13 +43,7 @@
<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1024548975" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug"> <tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1024548975" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug">
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.1846873676" name="Optimization Level" superClass="gnu.c.compiler.exe.debug.option.optimization.level" valueType="enumerated"/> <option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.1846873676" name="Optimization Level" superClass="gnu.c.compiler.exe.debug.option.optimization.level" valueType="enumerated"/>
<option id="gnu.c.compiler.exe.debug.option.debugging.level.624794682" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/> <option id="gnu.c.compiler.exe.debug.option.debugging.level.624794682" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.141168982" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"> <option id="gnu.c.compiler.option.include.paths.141168982" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/Classes}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${cocos2dx_loc}/CocosDenshion/include&quot;"/>
<listOptionValue builtIn="false" value="${cocos2dx_loc}/cocos2dx/include"/>
<listOptionValue builtIn="false" value="${cocos2dx_loc}/cocos2dx/platform"/>
<listOptionValue builtIn="false" value="${cocos2dx_loc}/cocos2dx"/>
</option>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.1586206751" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols"> <option id="gnu.c.compiler.option.preprocessor.def.symbols.1586206751" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="LINUX"/> <listOptionValue builtIn="false" value="LINUX"/>
</option> </option>
@ -65,9 +58,9 @@
<listOptionValue builtIn="false" value="cocosdenshion"/> <listOptionValue builtIn="false" value="cocosdenshion"/>
</option> </option>
<option id="gnu.cpp.link.option.paths.1730426040" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths"> <option id="gnu.cpp.link.option.paths.1730426040" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
<listOptionValue builtIn="false" value="&quot;${cocos2dx_loc}/cocos2dx/proj.linux/${ConfigName}&quot;"/> <listOptionValue builtIn="false" value="../../../cocos2dx/proj.linux/${ConfigName}"/>
<listOptionValue builtIn="false" value="&quot;${cocos2dx_loc}/CocosDenshion/proj.linux/${ConfigName}&quot;"/> <listOptionValue builtIn="false" value="../../../CocosDenshion/proj.linux/${ConfigName}"/>
<listOptionValue builtIn="false" value="&quot;${cocos2dx_loc}/CocosDenshion/third_party/fmod/api/lib&quot;"/> <listOptionValue builtIn="false" value="../../../CocosDenshion/third_party/fmod/api/lib"/>
</option> </option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.338357910" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input"> <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.338357910" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
@ -80,7 +73,8 @@
</toolChain> </toolChain>
</folderInfo> </folderInfo>
<sourceEntries> <sourceEntries>
<entry excluding="wophone|win32|airplay|ios|android|android/jni" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> <entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Classes"/>
<entry excluding="Classes" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/>
</sourceEntries> </sourceEntries>
</configuration> </configuration>
</storageModule> </storageModule>
@ -89,10 +83,6 @@
</cconfiguration> </cconfiguration>
<cconfiguration id="cdt.managedbuild.config.gnu.exe.release.1261731462"> <cconfiguration id="cdt.managedbuild.config.gnu.exe.release.1261731462">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.release.1261731462" moduleId="org.eclipse.cdt.core.settings" name="Release"> <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.release.1261731462" moduleId="org.eclipse.cdt.core.settings" name="Release">
<macros>
<stringMacro name="cocos2dx_loc" type="VALUE_TEXT" value="../../../"/>
<stringMacro name="lib_name" type="VALUE_TEXT" value="helloworld"/>
</macros>
<externalSettings/> <externalSettings/>
<extensions> <extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/> <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
@ -114,11 +104,14 @@
<option id="gnu.cpp.compiler.exe.release.option.optimization.level.1579660092" name="Optimization Level" superClass="gnu.cpp.compiler.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/> <option id="gnu.cpp.compiler.exe.release.option.optimization.level.1579660092" name="Optimization Level" superClass="gnu.cpp.compiler.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
<option id="gnu.cpp.compiler.exe.release.option.debugging.level.67257659" name="Debug Level" superClass="gnu.cpp.compiler.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/> <option id="gnu.cpp.compiler.exe.release.option.debugging.level.67257659" name="Debug Level" superClass="gnu.cpp.compiler.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.include.paths.1175073911" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath"> <option id="gnu.cpp.compiler.option.include.paths.1175073911" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${cocos2dx_loc}/cocos2dx&quot;"/> <listOptionValue builtIn="false" value="../../Classes"/>
<listOptionValue builtIn="false" value="&quot;${cocos2dx_loc}/CocosDenshion/include&quot;"/> <listOptionValue builtIn="false" value="../../../"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/Classes}&quot;"/> <listOptionValue builtIn="false" value="../../../cocos2dx"/>
<listOptionValue builtIn="false" value="${cocos2dx_loc}/cocos2dx/include"/> <listOptionValue builtIn="false" value="../../../cocos2dx/include"/>
<listOptionValue builtIn="false" value="${cocos2dx_loc}/cocos2dx/platform"/> <listOptionValue builtIn="false" value="../../../cocos2dx/platform"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/qnx"/>
<listOptionValue builtIn="false" value="../../../chipmunk/include/chipmunk"/>
<listOptionValue builtIn="false" value="../../../CocosDenshion/include"/>
</option> </option>
<option id="gnu.cpp.compiler.option.preprocessor.def.1649765609" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols"> <option id="gnu.cpp.compiler.option.preprocessor.def.1649765609" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
<listOptionValue builtIn="false" value="LINUX"/> <listOptionValue builtIn="false" value="LINUX"/>
@ -128,13 +121,7 @@
<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.1992070152" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release"> <tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.1992070152" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release">
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.925598500" name="Optimization Level" superClass="gnu.c.compiler.exe.release.option.optimization.level" valueType="enumerated"/> <option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.925598500" name="Optimization Level" superClass="gnu.c.compiler.exe.release.option.optimization.level" valueType="enumerated"/>
<option id="gnu.c.compiler.exe.release.option.debugging.level.1434439101" name="Debug Level" superClass="gnu.c.compiler.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/> <option id="gnu.c.compiler.exe.release.option.debugging.level.1434439101" name="Debug Level" superClass="gnu.c.compiler.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.92708570" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"> <option id="gnu.c.compiler.option.include.paths.92708570" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/Classes}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${cocos2dx_loc}/CocosDenshion/include&quot;"/>
<listOptionValue builtIn="false" value="${cocos2dx_loc}/cocos2dx/include"/>
<listOptionValue builtIn="false" value="${cocos2dx_loc}/cocos2dx/platform"/>
<listOptionValue builtIn="false" value="${cocos2dx_loc}/cocos2dx"/>
</option>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.1314682529" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols"> <option id="gnu.c.compiler.option.preprocessor.def.symbols.1314682529" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="LINUX"/> <listOptionValue builtIn="false" value="LINUX"/>
</option> </option>
@ -149,9 +136,9 @@
<listOptionValue builtIn="false" value="cocosdenshion"/> <listOptionValue builtIn="false" value="cocosdenshion"/>
</option> </option>
<option id="gnu.cpp.link.option.paths.510724007" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths"> <option id="gnu.cpp.link.option.paths.510724007" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
<listOptionValue builtIn="false" value="&quot;${cocos2dx_loc}/cocos2dx/proj.linux/${ConfigName}&quot;"/> <listOptionValue builtIn="false" value="../../../cocos2dx/proj.linux/${ConfigName}"/>
<listOptionValue builtIn="false" value="&quot;${cocos2dx_loc}/CocosDenshion/third_party/fmod/api/lib&quot;"/> <listOptionValue builtIn="false" value="../../../CocosDenshion/proj.linux/${ConfigName}"/>
<listOptionValue builtIn="false" value="&quot;${cocos2dx_loc}/CocosDenshion/proj.linux/${ConfigName}&quot;"/> <listOptionValue builtIn="false" value="../../../CocosDenshion/third_party/fmod/api/lib"/>
</option> </option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.970027608" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input"> <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.970027608" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
@ -164,7 +151,8 @@
</toolChain> </toolChain>
</folderInfo> </folderInfo>
<sourceEntries> <sourceEntries>
<entry excluding="wophone|win32|airplay|ios|android|android/jni" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> <entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Classes"/>
<entry excluding="Classes" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/>
</sourceEntries> </sourceEntries>
</configuration> </configuration>
</storageModule> </storageModule>
@ -184,18 +172,18 @@
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1378309016.1046894403;cdt.managedbuild.config.gnu.exe.debug.1378309016.1046894403.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1116079203;cdt.managedbuild.tool.gnu.c.compiler.input.1941427790"> <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1378309016.1046894403;cdt.managedbuild.config.gnu.exe.debug.1378309016.1046894403.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1116079203;cdt.managedbuild.tool.gnu.c.compiler.input.1941427790">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/> <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
</scannerConfigBuildInfo> </scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1378309016.708057448;cdt.managedbuild.config.gnu.exe.debug.1378309016.708057448.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1818259119;cdt.managedbuild.tool.gnu.cpp.compiler.input.810275929">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.1261731462;cdt.managedbuild.config.gnu.exe.release.1261731462.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1347395052;cdt.managedbuild.tool.gnu.cpp.compiler.input.627062533"> <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.1261731462;cdt.managedbuild.config.gnu.exe.release.1261731462.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1347395052;cdt.managedbuild.tool.gnu.cpp.compiler.input.627062533">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/> <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
</scannerConfigBuildInfo> </scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1378309016.708057448;cdt.managedbuild.config.gnu.exe.debug.1378309016.708057448.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.175957853;cdt.managedbuild.tool.gnu.c.compiler.input.838160662"> <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1378309016.708057448;cdt.managedbuild.config.gnu.exe.debug.1378309016.708057448.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1818259119;cdt.managedbuild.tool.gnu.cpp.compiler.input.810275929">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/> <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
</scannerConfigBuildInfo> </scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1378309016;cdt.managedbuild.config.gnu.exe.debug.1378309016.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1024548975;cdt.managedbuild.tool.gnu.c.compiler.input.1184297872"> <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1378309016;cdt.managedbuild.config.gnu.exe.debug.1378309016.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1024548975;cdt.managedbuild.tool.gnu.c.compiler.input.1184297872">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/> <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
</scannerConfigBuildInfo> </scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1378309016.708057448;cdt.managedbuild.config.gnu.exe.debug.1378309016.708057448.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.175957853;cdt.managedbuild.tool.gnu.c.compiler.input.838160662">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1378309016.1046894403;cdt.managedbuild.config.gnu.exe.debug.1378309016.1046894403.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.942164708;cdt.managedbuild.tool.gnu.cpp.compiler.input.1074068007"> <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1378309016.1046894403;cdt.managedbuild.config.gnu.exe.debug.1378309016.1046894403.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.942164708;cdt.managedbuild.tool.gnu.cpp.compiler.input.1074068007">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/> <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
</scannerConfigBuildInfo> </scannerConfigBuildInfo>

View File

@ -88,10 +88,5 @@
<type>2</type> <type>2</type>
<locationURI>PARENT-1-PROJECT_LOC/Classes</locationURI> <locationURI>PARENT-1-PROJECT_LOC/Classes</locationURI>
</link> </link>
<link>
<name>android</name>
<type>2</type>
<locationURI>PARENT-1-PROJECT_LOC/android</locationURI>
</link>
</linkedResources> </linkedResources>
</projectDescription> </projectDescription>

View File

@ -0,0 +1 @@
5fe89fb5bd58cedf13b0363f97b20e3ea7ff255d

View File

@ -1,11 +1,2 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system use,
# "build.properties", and override values to adapt the script to your
# project structure.
# Project target. # Project target.
target=android-7 target=android-15

View File

@ -175,6 +175,14 @@ public class Cocos2dxMusic {
} }
public void setBackgroundVolume(float volume){ public void setBackgroundVolume(float volume){
if (volume < 0.0f){
volume = 0.0f;
}
if (volume > 1.0f){
volume = 1.0f;
}
this.mLeftVolume = this.mRightVolume = volume; this.mLeftVolume = this.mRightVolume = volume;
if (this.mBackgroundMediaPlayer != null){ if (this.mBackgroundMediaPlayer != null){
this.mBackgroundMediaPlayer.setVolume(this.mLeftVolume, this.mRightVolume); this.mBackgroundMediaPlayer.setVolume(this.mLeftVolume, this.mRightVolume);

View File

@ -0,0 +1 @@
2aa7c4f2261f68cadfdb9d65c1b9291a58f98d15

View File

@ -0,0 +1 @@
a9cf0424744f0676e91af84a9ba593790d18ccc4

View File

@ -0,0 +1 @@
9ba2234125d78810b9358b4af48cba1c8cfe523e

View File

@ -0,0 +1 @@
2aa7c4f2261f68cadfdb9d65c1b9291a58f98d15

View File

@ -49,16 +49,31 @@
<option id="com.qnx.qcc.option.linker.langcpp.670245200" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/> <option id="com.qnx.qcc.option.linker.langcpp.670245200" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.linker.libraries.1760958269" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs"> <option id="com.qnx.qcc.option.linker.libraries.1760958269" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
<listOptionValue builtIn="false" value="cocos2dx"/> <listOptionValue builtIn="false" value="cocos2dx"/>
<listOptionValue builtIn="false" value="CocosDenshion"/>
<listOptionValue builtIn="false" value="GLESv1_CM"/>
<listOptionValue builtIn="false" value="bps"/> <listOptionValue builtIn="false" value="bps"/>
<listOptionValue builtIn="false" value="curl"/>
<listOptionValue builtIn="false" value="mmrndclient"/>
<listOptionValue builtIn="false" value="strm"/>
<listOptionValue builtIn="false" value="grskia"/> <listOptionValue builtIn="false" value="grskia"/>
<listOptionValue builtIn="false" value="OpenAL"/>
<listOptionValue builtIn="false" value="alut"/>
<listOptionValue builtIn="false" value="curl"/>
<listOptionValue builtIn="false" value="asound"/>
<listOptionValue builtIn="false" value="xml2"/>
</option> </option>
<option id="com.qnx.qcc.option.linker.security.1794064552" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/> <option id="com.qnx.qcc.option.linker.security.1794064552" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.linker.libraryPaths.1757627798" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths"> <option id="com.qnx.qcc.option.linker.libraryPaths.1757627798" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/> <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/> <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.qnx/Device-Debug"/> <listOptionValue builtIn="false" value="../../../cocos2dx/proj.qnx/Device-Debug"/>
<listOptionValue builtIn="false" value="../../../CocosDenshion/proj.qnx/Device-Debug"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/qnx/libraries"/> <listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/qnx/libraries"/>
</option> </option>
<option id="com.qnx.qcc.option.linker.ldoptions.1363839882" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
<listOptionValue builtIn="false" value="../../../Box2D/proj.qnx/Device-Debug/libBox2D.a"/>
<listOptionValue builtIn="false" value="../../../chipmunk/proj.qnx/Device-Debug/libchipmunk.a"/>
</option>
<inputType id="com.qnx.qcc.inputType.linker.697035559" superClass="com.qnx.qcc.inputType.linker"> <inputType id="com.qnx.qcc.inputType.linker.697035559" superClass="com.qnx.qcc.inputType.linker">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/> <additionalInput kind="additionalinput" paths="$(LIBS)"/>
@ -121,8 +136,18 @@
<option id="com.qnx.qcc.option.linker.langcpp.1928031496" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/> <option id="com.qnx.qcc.option.linker.langcpp.1928031496" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.linker.libraries.1701813567" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs"> <option id="com.qnx.qcc.option.linker.libraries.1701813567" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
<listOptionValue builtIn="false" value="cocos2dx"/> <listOptionValue builtIn="false" value="cocos2dx"/>
<listOptionValue builtIn="false" value="CocosDenshion"/>
<listOptionValue builtIn="false" value="GLESv1_CM"/>
<listOptionValue builtIn="false" value="bps"/> <listOptionValue builtIn="false" value="bps"/>
<listOptionValue builtIn="false" value="curl"/>
<listOptionValue builtIn="false" value="mmrndclient"/>
<listOptionValue builtIn="false" value="strm"/>
<listOptionValue builtIn="false" value="grskia"/> <listOptionValue builtIn="false" value="grskia"/>
<listOptionValue builtIn="false" value="OpenAL"/>
<listOptionValue builtIn="false" value="alut"/>
<listOptionValue builtIn="false" value="curl"/>
<listOptionValue builtIn="false" value="asound"/>
<listOptionValue builtIn="false" value="xml2"/>
</option> </option>
<option id="com.qnx.qcc.option.linker.security.1061945690" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/> <option id="com.qnx.qcc.option.linker.security.1061945690" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.linker.pie.2077677263" name="Position Independent Executable (-pie)" superClass="com.qnx.qcc.option.linker.pie" value="true" valueType="boolean"/> <option id="com.qnx.qcc.option.linker.pie.2077677263" name="Position Independent Executable (-pie)" superClass="com.qnx.qcc.option.linker.pie" value="true" valueType="boolean"/>
@ -130,8 +155,13 @@
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/> <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/> <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.qnx/Device-Release"/> <listOptionValue builtIn="false" value="../../../cocos2dx/proj.qnx/Device-Release"/>
<listOptionValue builtIn="false" value="../../../CocosDenshion/proj.qnx/Device-Release"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/qnx/libraries"/> <listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/qnx/libraries"/>
</option> </option>
<option id="com.qnx.qcc.option.linker.ldoptions.2141259757" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
<listOptionValue builtIn="false" value="../../../Box2D/proj.qnx/Device-Release/libBox2D.a"/>
<listOptionValue builtIn="false" value="../../../chipmunk/proj.qnx/Device-Release/libchipmunk.a"/>
</option>
<inputType id="com.qnx.qcc.inputType.linker.1321710093" superClass="com.qnx.qcc.inputType.linker"> <inputType id="com.qnx.qcc.inputType.linker.1321710093" superClass="com.qnx.qcc.inputType.linker">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/> <additionalInput kind="additionalinput" paths="$(LIBS)"/>
@ -197,16 +227,31 @@
<option id="com.qnx.qcc.option.linker.langcpp.1232550377" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/> <option id="com.qnx.qcc.option.linker.langcpp.1232550377" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.linker.libraries.1289108024" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs"> <option id="com.qnx.qcc.option.linker.libraries.1289108024" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
<listOptionValue builtIn="false" value="cocos2dx"/> <listOptionValue builtIn="false" value="cocos2dx"/>
<listOptionValue builtIn="false" value="CocosDenshion"/>
<listOptionValue builtIn="false" value="GLESv1_CM"/>
<listOptionValue builtIn="false" value="bps"/> <listOptionValue builtIn="false" value="bps"/>
<listOptionValue builtIn="false" value="curl"/>
<listOptionValue builtIn="false" value="mmrndclient"/>
<listOptionValue builtIn="false" value="strm"/>
<listOptionValue builtIn="false" value="grskia"/> <listOptionValue builtIn="false" value="grskia"/>
<listOptionValue builtIn="false" value="OpenAL"/>
<listOptionValue builtIn="false" value="alut"/>
<listOptionValue builtIn="false" value="curl"/>
<listOptionValue builtIn="false" value="asound"/>
<listOptionValue builtIn="false" value="xml2"/>
</option> </option>
<option id="com.qnx.qcc.option.linker.security.29518400" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/> <option id="com.qnx.qcc.option.linker.security.29518400" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.linker.libraryPaths.150600101" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths"> <option id="com.qnx.qcc.option.linker.libraryPaths.150600101" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/> <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/> <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.qnx/Device-Profile"/> <listOptionValue builtIn="false" value="../../../cocos2dx/proj.qnx/Device-Profile"/>
<listOptionValue builtIn="false" value="../../../CocosDenshion/proj.qnx/Device-Profile"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/qnx/libraries"/> <listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/qnx/libraries"/>
</option> </option>
<option id="com.qnx.qcc.option.linker.ldoptions.1370019185" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
<listOptionValue builtIn="false" value="../../../Box2D/proj.qnx/Device-Profile/libBox2D.a"/>
<listOptionValue builtIn="false" value="../../../chipmunk/proj.qnx/Device-Profile/libchipmunk.a"/>
</option>
<inputType id="com.qnx.qcc.inputType.linker.1078171597" superClass="com.qnx.qcc.inputType.linker"> <inputType id="com.qnx.qcc.inputType.linker.1078171597" superClass="com.qnx.qcc.inputType.linker">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/> <additionalInput kind="additionalinput" paths="$(LIBS)"/>
@ -272,16 +317,31 @@
<option id="com.qnx.qcc.option.linker.langcpp.1160718760" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/> <option id="com.qnx.qcc.option.linker.langcpp.1160718760" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.linker.libraries.1736864271" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs"> <option id="com.qnx.qcc.option.linker.libraries.1736864271" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
<listOptionValue builtIn="false" value="cocos2dx"/> <listOptionValue builtIn="false" value="cocos2dx"/>
<listOptionValue builtIn="false" value="CocosDenshion"/>
<listOptionValue builtIn="false" value="GLESv1_CM"/>
<listOptionValue builtIn="false" value="bps"/> <listOptionValue builtIn="false" value="bps"/>
<listOptionValue builtIn="false" value="curl"/>
<listOptionValue builtIn="false" value="mmrndclient"/>
<listOptionValue builtIn="false" value="strm"/>
<listOptionValue builtIn="false" value="grskia"/> <listOptionValue builtIn="false" value="grskia"/>
<listOptionValue builtIn="false" value="OpenAL"/>
<listOptionValue builtIn="false" value="alut"/>
<listOptionValue builtIn="false" value="curl"/>
<listOptionValue builtIn="false" value="asound"/>
<listOptionValue builtIn="false" value="xml2"/>
</option> </option>
<option id="com.qnx.qcc.option.linker.security.1670627205" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/> <option id="com.qnx.qcc.option.linker.security.1670627205" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.linker.libraryPaths.322375874" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths"> <option id="com.qnx.qcc.option.linker.libraryPaths.322375874" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/> <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/> <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.qnx/Device-Coverage"/> <listOptionValue builtIn="false" value="../../../cocos2dx/proj.qnx/Device-Coverage"/>
<listOptionValue builtIn="false" value="../../../CocosDenshion/proj.qnx/Device-Coverage"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/qnx/libraries"/> <listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/qnx/libraries"/>
</option> </option>
<option id="com.qnx.qcc.option.linker.ldoptions.619637072" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
<listOptionValue builtIn="false" value="../../../Box2D/proj.qnx/Device-Coverage/libBox2D.a"/>
<listOptionValue builtIn="false" value="../../../chipmunk/proj.qnx/Device-Coverage/libchipmunk.a"/>
</option>
<inputType id="com.qnx.qcc.inputType.linker.1438498440" superClass="com.qnx.qcc.inputType.linker"> <inputType id="com.qnx.qcc.inputType.linker.1438498440" superClass="com.qnx.qcc.inputType.linker">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/> <additionalInput kind="additionalinput" paths="$(LIBS)"/>
@ -344,17 +404,32 @@
<option id="com.qnx.qcc.option.linker.langcpp.550638471" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/> <option id="com.qnx.qcc.option.linker.langcpp.550638471" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.linker.libraries.1179286572" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs"> <option id="com.qnx.qcc.option.linker.libraries.1179286572" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
<listOptionValue builtIn="false" value="cocos2dx"/> <listOptionValue builtIn="false" value="cocos2dx"/>
<listOptionValue builtIn="false" value="CocosDenshion"/>
<listOptionValue builtIn="false" value="GLESv1_CM"/>
<listOptionValue builtIn="false" value="bps"/> <listOptionValue builtIn="false" value="bps"/>
<listOptionValue builtIn="false" value="curl"/>
<listOptionValue builtIn="false" value="mmrndclient"/>
<listOptionValue builtIn="false" value="strm"/>
<listOptionValue builtIn="false" value="grskia"/> <listOptionValue builtIn="false" value="grskia"/>
<listOptionValue builtIn="false" value="OpenAL"/>
<listOptionValue builtIn="false" value="alut"/>
<listOptionValue builtIn="false" value="curl"/>
<listOptionValue builtIn="false" value="asound"/>
<listOptionValue builtIn="false" value="xml2"/>
</option> </option>
<option id="com.qnx.qcc.option.linker.security.2014666509" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/> <option id="com.qnx.qcc.option.linker.security.2014666509" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.linker.libraryPaths.927694704" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths"> <option id="com.qnx.qcc.option.linker.libraryPaths.927694704" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/> <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/> <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.qnx/Simulator"/> <listOptionValue builtIn="false" value="../../../cocos2dx/proj.qnx/Simulator"/>
<listOptionValue builtIn="false" value="../../../CocosDenshion/proj.qnx/Simulator"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/qnx/libraries/x86"/> <listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/qnx/libraries/x86"/>
</option> </option>
<option id="com.qnx.qcc.option.linker.objectFiles.1451516298" name="Additional Object Files" superClass="com.qnx.qcc.option.linker.objectFiles"/> <option id="com.qnx.qcc.option.linker.objectFiles.1451516298" name="Additional Object Files" superClass="com.qnx.qcc.option.linker.objectFiles"/>
<option id="com.qnx.qcc.option.linker.ldoptions.526534847" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
<listOptionValue builtIn="false" value="../../../Box2D/proj.qnx/Simulator/libBox2D.a"/>
<listOptionValue builtIn="false" value="../../../chipmunk/proj.qnx/Simulator/libchipmunk.a"/>
</option>
<inputType id="com.qnx.qcc.inputType.linker.439307041" superClass="com.qnx.qcc.inputType.linker"> <inputType id="com.qnx.qcc.inputType.linker.439307041" superClass="com.qnx.qcc.inputType.linker">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/> <additionalInput kind="additionalinput" paths="$(LIBS)"/>
@ -419,16 +494,31 @@
<option id="com.qnx.qcc.option.linker.langcpp.1840561937" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/> <option id="com.qnx.qcc.option.linker.langcpp.1840561937" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.linker.libraries.1031790004" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs"> <option id="com.qnx.qcc.option.linker.libraries.1031790004" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
<listOptionValue builtIn="false" value="cocos2dx"/> <listOptionValue builtIn="false" value="cocos2dx"/>
<listOptionValue builtIn="false" value="CocosDenshion"/>
<listOptionValue builtIn="false" value="GLESv1_CM"/>
<listOptionValue builtIn="false" value="bps"/> <listOptionValue builtIn="false" value="bps"/>
<listOptionValue builtIn="false" value="curl"/>
<listOptionValue builtIn="false" value="mmrndclient"/>
<listOptionValue builtIn="false" value="strm"/>
<listOptionValue builtIn="false" value="grskia"/> <listOptionValue builtIn="false" value="grskia"/>
<listOptionValue builtIn="false" value="OpenAL"/>
<listOptionValue builtIn="false" value="alut"/>
<listOptionValue builtIn="false" value="curl"/>
<listOptionValue builtIn="false" value="asound"/>
<listOptionValue builtIn="false" value="xml2"/>
</option> </option>
<option id="com.qnx.qcc.option.linker.security.931994389" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/> <option id="com.qnx.qcc.option.linker.security.931994389" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.linker.libraryPaths.681434121" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths"> <option id="com.qnx.qcc.option.linker.libraryPaths.681434121" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/> <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/> <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.qnx/Simulator-Profile"/> <listOptionValue builtIn="false" value="../../../cocos2dx/proj.qnx/Simulator-Profile"/>
<listOptionValue builtIn="false" value="../../../CocosDenshion/proj.qnx/Simulator-Profile"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/qnx/libraries/x86"/> <listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/qnx/libraries/x86"/>
</option> </option>
<option id="com.qnx.qcc.option.linker.ldoptions.536840311" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
<listOptionValue builtIn="false" value="../../../Box2D/proj.qnx/Simulator-Profile/libBox2D.a"/>
<listOptionValue builtIn="false" value="../../../chipmunk/proj.qnx/Simulator-Profile/libchipmunk.a"/>
</option>
<inputType id="com.qnx.qcc.inputType.linker.2044213175" superClass="com.qnx.qcc.inputType.linker"> <inputType id="com.qnx.qcc.inputType.linker.2044213175" superClass="com.qnx.qcc.inputType.linker">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/> <additionalInput kind="additionalinput" paths="$(LIBS)"/>
@ -493,16 +583,31 @@
<option id="com.qnx.qcc.option.linker.langcpp.769428310" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/> <option id="com.qnx.qcc.option.linker.langcpp.769428310" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.linker.libraries.1325336223" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs"> <option id="com.qnx.qcc.option.linker.libraries.1325336223" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
<listOptionValue builtIn="false" value="cocos2dx"/> <listOptionValue builtIn="false" value="cocos2dx"/>
<listOptionValue builtIn="false" value="CocosDenshion"/>
<listOptionValue builtIn="false" value="GLESv1_CM"/>
<listOptionValue builtIn="false" value="bps"/> <listOptionValue builtIn="false" value="bps"/>
<listOptionValue builtIn="false" value="curl"/>
<listOptionValue builtIn="false" value="mmrndclient"/>
<listOptionValue builtIn="false" value="strm"/>
<listOptionValue builtIn="false" value="grskia"/> <listOptionValue builtIn="false" value="grskia"/>
<listOptionValue builtIn="false" value="OpenAL"/>
<listOptionValue builtIn="false" value="alut"/>
<listOptionValue builtIn="false" value="curl"/>
<listOptionValue builtIn="false" value="asound"/>
<listOptionValue builtIn="false" value="xml2"/>
</option> </option>
<option id="com.qnx.qcc.option.linker.security.2136296969" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/> <option id="com.qnx.qcc.option.linker.security.2136296969" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.linker.libraryPaths.1115848281" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths"> <option id="com.qnx.qcc.option.linker.libraryPaths.1115848281" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/> <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/> <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.qnx/Simulator-Coverage"/> <listOptionValue builtIn="false" value="../../../cocos2dx/proj.qnx/Simulator-Coverage"/>
<listOptionValue builtIn="false" value="../../../CocosDenshion/proj.qnx/Simulator-Coverage"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/qnx/libraries/x86"/> <listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/qnx/libraries/x86"/>
</option> </option>
<option id="com.qnx.qcc.option.linker.ldoptions.259366688" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
<listOptionValue builtIn="false" value="../../../Box2D/proj.qnx/Simulator-Coverage/libBox2D.a"/>
<listOptionValue builtIn="false" value="../../../chipmunk/proj.qnx/Simulator-Coverage/libchipmunk.a"/>
</option>
<inputType id="com.qnx.qcc.inputType.linker.780133405" superClass="com.qnx.qcc.inputType.linker"> <inputType id="com.qnx.qcc.inputType.linker.780133405" superClass="com.qnx.qcc.inputType.linker">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/> <additionalInput kind="additionalinput" paths="$(LIBS)"/>

View File

@ -3,7 +3,10 @@
<name>HelloWorld</name> <name>HelloWorld</name>
<comment></comment> <comment></comment>
<projects> <projects>
<project>Box2D</project>
<project>chipmunk</project>
<project>cocos2dx</project> <project>cocos2dx</project>
<project>CocosDenshion</project>
</projects> </projects>
<buildSpec> <buildSpec>
<buildCommand> <buildCommand>

View File

@ -52,48 +52,57 @@
<category>core.games</category> <category>core.games</category>
<asset path="icon.png">icon.png</asset> <asset path="icon.png">icon.png</asset>
<asset path="${workspace_loc:/HelloWorld/Resource}">Resource</asset> <asset path="${workspace_loc:/HelloWorld/Resource}">Resource</asset>
<asset path="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib/libbps.so" type="Qnx/Elf">lib/libbps.so.1</asset> <asset path="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib/libbps.so" type="Qnx/Elf">lib/libbps.so.1</asset>
<asset path="${QNX_TARGET}\..\target-override\${CPUVARDIR}/usr/lib/libOpenAL.so" type="Qnx/Elf">lib/libOpenAL.so.1</asset>
<asset path="${QNX_TARGET}\..\target-override\${CPUVARDIR}/usr/lib/libalut.so" type="Qnx/Elf">lib/libalut.so.1</asset>
<configuration id="com.qnx.qcc.configuration.exe.debug.446234419" name="Device-Debug"> <configuration id="com.qnx.qcc.configuration.exe.debug.446234419" name="Device-Debug">
<platformArchitecture>armle-v7</platformArchitecture> <platformArchitecture>armle-v7</platformArchitecture>
<asset path="Device-Debug/HelloWorld" entry="true" type="Qnx/Elf">HelloWorld</asset> <asset path="Device-Debug/HelloWorld" entry="true" type="Qnx/Elf">HelloWorld</asset>
<asset path="${workspace_loc:/cocos2dx/Device-Debug/libcocos2dx.so}" type="Qnx/Elf">lib/libcocos2dx.so</asset> <asset path="${workspace_loc:/cocos2dx/Device-Debug/libcocos2dx.so}" type="Qnx/Elf">lib/libcocos2dx.so</asset>
<asset path="${workspace_loc:/cocos2dx/platform/third_party/qnx/libraries/libgrskia.so}" type="Qnx/Elf">lib/libgrskia.so</asset> <asset path="${workspace_loc:/cocos2dx/platform/third_party/qnx/libraries/libgrskia.so}" type="Qnx/Elf">lib/libgrskia.so</asset>
<asset path="${workspace_loc:/CocosDenshion/Device-Debug/libCocosDenshion.so}" type="Qnx/Elf">lib/libCocosDenshion.so</asset>
</configuration> </configuration>
<configuration id="com.qnx.qcc.configuration.exe.release.1265921422" name="Device-Release"> <configuration id="com.qnx.qcc.configuration.exe.release.1265921422" name="Device-Release">
<platformArchitecture>armle-v7</platformArchitecture> <platformArchitecture>armle-v7</platformArchitecture>
<asset path="Device-Release/HelloWorld" entry="true" type="Qnx/Elf">HelloWorld</asset> <asset path="Device-Release/HelloWorld" entry="true" type="Qnx/Elf">HelloWorld</asset>
<asset path="${workspace_loc:/cocos2dx/platform/third_party/qnx/libraries/libgrskia.so}" type="Qnx/Elf">lib/libgrskia.so</asset> <asset path="${workspace_loc:/cocos2dx/platform/third_party/qnx/libraries/libgrskia.so}" type="Qnx/Elf">lib/libgrskia.so</asset>
<asset path="${workspace_loc:/cocos2dx/Device-Release/libcocos2dx.so}" type="Qnx/Elf">lib/libcocos2dx.so</asset> <asset path="${workspace_loc:/cocos2dx/Device-Release/libcocos2dx.so}" type="Qnx/Elf">lib/libcocos2dx.so</asset>
<asset path="${workspace_loc:/CocosDenshion/Device-Release/libCocosDenshion.so}" type="Qnx/Elf">lib/libCocosDenshion.so</asset>
</configuration> </configuration>
<configuration id="com.qnx.qcc.configuration.exe.profile.1761000041" name="Device-Profile"> <configuration id="com.qnx.qcc.configuration.exe.profile.1761000041" name="Device-Profile">
<platformArchitecture>armle-v7</platformArchitecture> <platformArchitecture>armle-v7</platformArchitecture>
<asset path="Device-Profile/HelloWorld" entry="true" type="Qnx/Elf">HelloWorld</asset> <asset path="Device-Profile/HelloWorld" entry="true" type="Qnx/Elf">HelloWorld</asset>
<asset path="${workspace_loc:/cocos2dx/platform/third_party/qnx/libraries/libgrskia.so}" type="Qnx/Elf">lib/libgrskia.so</asset> <asset path="${workspace_loc:/cocos2dx/platform/third_party/qnx/libraries/libgrskia.so}" type="Qnx/Elf">lib/libgrskia.so</asset>
<asset path="${workspace_loc:/cocos2dx/Device-Profile/libcocos2dx.so}" type="Qnx/Elf">lib/libcocos2dx.so</asset> <asset path="${workspace_loc:/cocos2dx/Device-Profile/libcocos2dx.so}" type="Qnx/Elf">lib/libcocos2dx.so</asset>
<asset path="${workspace_loc:/CocosDenshion/Device-Profile/libCocosDenshion.so}" type="Qnx/Elf">lib/libCocosDenshion.so</asset>
</configuration> </configuration>
<configuration id="com.qnx.qcc.configuration.exe.profile.coverage.1771167181" name="Device-Coverage"> <configuration id="com.qnx.qcc.configuration.exe.profile.coverage.1771167181" name="Device-Coverage">
<platformArchitecture>armle-v7</platformArchitecture> <platformArchitecture>armle-v7</platformArchitecture>
<asset path="Device-Coverage/HelloWorld" entry="true" type="Qnx/Elf">HelloWorld</asset> <asset path="Device-Coverage/HelloWorld" entry="true" type="Qnx/Elf">HelloWorld</asset>
<asset path="${workspace_loc:/cocos2dx/platform/third_party/qnx/libraries/libgrskia.so}" type="Qnx/Elf">lib/libgrskia.so</asset> <asset path="${workspace_loc:/cocos2dx/platform/third_party/qnx/libraries/libgrskia.so}" type="Qnx/Elf">lib/libgrskia.so</asset>
<asset path="${workspace_loc:/cocos2dx/Device-Coverage/libcocos2dx.so}" type="Qnx/Elf">lib/libcocos2dx.so</asset> <asset path="${workspace_loc:/cocos2dx/Device-Coverage/libcocos2dx.so}" type="Qnx/Elf">lib/libcocos2dx.so</asset>
<asset path="${workspace_loc:/CocosDenshion/Device-Coverage/libCocosDenshion.so}" type="Qnx/Elf">lib/libCocosDenshion.so</asset>
</configuration> </configuration>
<configuration id="com.qnx.qcc.configuration.exe.debug.660208940" name="Simulator"> <configuration id="com.qnx.qcc.configuration.exe.debug.660208940" name="Simulator">
<platformArchitecture>x86</platformArchitecture> <platformArchitecture>x86</platformArchitecture>
<asset path="Simulator/HelloWorld" entry="true" type="Qnx/Elf">HelloWorld</asset> <asset path="Simulator/HelloWorld" entry="true" type="Qnx/Elf">HelloWorld</asset>
<asset path="${workspace_loc:/cocos2dx/Simulator/libcocos2dx.so}" type="Qnx/Elf">lib/libcocos2dx.so</asset> <asset path="${workspace_loc:/cocos2dx/Simulator/libcocos2dx.so}" type="Qnx/Elf">lib/libcocos2dx.so</asset>
<asset path="${workspace_loc:/cocos2dx/platform/third_party/qnx/libraries/x86/libgrskia.so}" type="Qnx/Elf">lib/libgrskia.so</asset> <asset path="${workspace_loc:/cocos2dx/platform/third_party/qnx/libraries/x86/libgrskia.so}" type="Qnx/Elf">lib/libgrskia.so</asset>
<asset path="${workspace_loc:/CocosDenshion/Simulator/libCocosDenshion.so}" type="Qnx/Elf">lib/libCocosDenshion.so</asset>
</configuration> </configuration>
<configuration id="com.qnx.qcc.configuration.exe.profile.1237484173" name="Simulator-Profile"> <configuration id="com.qnx.qcc.configuration.exe.profile.1237484173" name="Simulator-Profile">
<platformArchitecture>x86</platformArchitecture> <platformArchitecture>x86</platformArchitecture>
<asset path="Simulator-Profile/HelloWorld" entry="true" type="Qnx/Elf">HelloWorld</asset> <asset path="Simulator-Profile/HelloWorld" entry="true" type="Qnx/Elf">HelloWorld</asset>
<asset path="${workspace_loc:/cocos2dx/platform/third_party/qnx/libraries/x86/libgrskia.so}" type="Qnx/Elf">lib/libgrskia.so</asset> <asset path="${workspace_loc:/cocos2dx/platform/third_party/qnx/libraries/x86/libgrskia.so}" type="Qnx/Elf">lib/libgrskia.so</asset>
<asset path="${workspace_loc:/cocos2dx/Simulator-Profile/libcocos2dx.so}" type="Qnx/Elf">lib/libcocos2dx.so</asset> <asset path="${workspace_loc:/cocos2dx/Simulator-Profile/libcocos2dx.so}" type="Qnx/Elf">lib/libcocos2dx.so</asset>
<asset path="${workspace_loc:/CocosDenshion/Simulator-Profile/libCocosDenshion.so}" type="Qnx/Elf">lib/libCocosDenshion.so</asset>
</configuration> </configuration>
<configuration id="com.qnx.qcc.configuration.exe.profile.coverage.181538713" name="Simulator-Coverage"> <configuration id="com.qnx.qcc.configuration.exe.profile.coverage.181538713" name="Simulator-Coverage">
<platformArchitecture>x86</platformArchitecture> <platformArchitecture>x86</platformArchitecture>
<asset path="Simulator-Coverage/HelloWorld" entry="true" type="Qnx/Elf">HelloWorld</asset> <asset path="Simulator-Coverage/HelloWorld" entry="true" type="Qnx/Elf">HelloWorld</asset>
<asset path="${workspace_loc:/cocos2dx/platform/third_party/qnx/libraries/x86/libgrskia.so}" type="Qnx/Elf">lib/libgrskia.so</asset> <asset path="${workspace_loc:/cocos2dx/platform/third_party/qnx/libraries/x86/libgrskia.so}" type="Qnx/Elf">lib/libgrskia.so</asset>
<asset path="${workspace_loc:/cocos2dx/Simulator-Coverage/libcocos2dx.so}" type="Qnx/Elf">lib/libcocos2dx.so</asset> <asset path="${workspace_loc:/cocos2dx/Simulator-Coverage/libcocos2dx.so}" type="Qnx/Elf">lib/libcocos2dx.so</asset>
<asset path="${workspace_loc:/CocosDenshion/Simulator-Coverage/libCocosDenshion.so}" type="Qnx/Elf">lib/libCocosDenshion.so</asset>
</configuration> </configuration>
<!-- The icon for the application, which should be 86x86. --> <!-- The icon for the application, which should be 86x86. -->

View File

@ -30,16 +30,14 @@
<tool command="g++" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} -std=c99" id="cdt.managedbuild.tool.gnu.cpp.compiler.lib.debug.1477393222" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.lib.debug"> <tool command="g++" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} -std=c99" id="cdt.managedbuild.tool.gnu.cpp.compiler.lib.debug.1477393222" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.lib.debug">
<option id="gnu.cpp.compiler.lib.debug.option.optimization.level.1727235052" name="Optimization Level" superClass="gnu.cpp.compiler.lib.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/> <option id="gnu.cpp.compiler.lib.debug.option.optimization.level.1727235052" name="Optimization Level" superClass="gnu.cpp.compiler.lib.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.lib.debug.option.debugging.level.1409960395" name="Debug Level" superClass="gnu.cpp.compiler.lib.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/> <option id="gnu.cpp.compiler.lib.debug.option.debugging.level.1409960395" name="Debug Level" superClass="gnu.cpp.compiler.lib.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.include.paths.1711056444" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath"> <option id="gnu.cpp.compiler.option.include.paths.1711056444" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/include/chipmunk}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.429805574" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/> <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.429805574" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool> </tool>
<tool command="gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} -std=c99" id="cdt.managedbuild.tool.gnu.c.compiler.lib.debug.1368062983" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.lib.debug"> <tool command="gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} -std=c99" id="cdt.managedbuild.tool.gnu.c.compiler.lib.debug.1368062983" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.lib.debug">
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.lib.debug.option.optimization.level.720444868" name="Optimization Level" superClass="gnu.c.compiler.lib.debug.option.optimization.level" valueType="enumerated"/> <option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.lib.debug.option.optimization.level.720444868" name="Optimization Level" superClass="gnu.c.compiler.lib.debug.option.optimization.level" valueType="enumerated"/>
<option id="gnu.c.compiler.lib.debug.option.debugging.level.342607594" name="Debug Level" superClass="gnu.c.compiler.lib.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/> <option id="gnu.c.compiler.lib.debug.option.debugging.level.342607594" name="Debug Level" superClass="gnu.c.compiler.lib.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.141295110" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"> <option id="gnu.c.compiler.option.include.paths.141295110" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/include/chipmunk}&quot;"/> <listOptionValue builtIn="false" value="../../include/chipmunk/"/>
</option> </option>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.552898382" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/> <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.552898382" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool> </tool>
@ -50,6 +48,10 @@
</tool> </tool>
</toolChain> </toolChain>
</folderInfo> </folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="include"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src"/>
</sourceEntries>
</configuration> </configuration>
</storageModule> </storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
@ -81,16 +83,14 @@
<tool commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} -std=c99" id="cdt.managedbuild.tool.gnu.cpp.compiler.lib.release.1020683973" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.lib.release"> <tool commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} -std=c99" id="cdt.managedbuild.tool.gnu.cpp.compiler.lib.release.1020683973" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.lib.release">
<option id="gnu.cpp.compiler.lib.release.option.optimization.level.800559143" name="Optimization Level" superClass="gnu.cpp.compiler.lib.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/> <option id="gnu.cpp.compiler.lib.release.option.optimization.level.800559143" name="Optimization Level" superClass="gnu.cpp.compiler.lib.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
<option id="gnu.cpp.compiler.lib.release.option.debugging.level.1914202641" name="Debug Level" superClass="gnu.cpp.compiler.lib.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/> <option id="gnu.cpp.compiler.lib.release.option.debugging.level.1914202641" name="Debug Level" superClass="gnu.cpp.compiler.lib.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.include.paths.1955575364" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath"> <option id="gnu.cpp.compiler.option.include.paths.1955575364" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/include/chipmunk}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.489464204" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/> <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.489464204" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool> </tool>
<tool commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} -std=c99" id="cdt.managedbuild.tool.gnu.c.compiler.lib.release.1654590301" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.lib.release"> <tool commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} -std=c99" id="cdt.managedbuild.tool.gnu.c.compiler.lib.release.1654590301" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.lib.release">
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.lib.release.option.optimization.level.577613930" name="Optimization Level" superClass="gnu.c.compiler.lib.release.option.optimization.level" valueType="enumerated"/> <option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.lib.release.option.optimization.level.577613930" name="Optimization Level" superClass="gnu.c.compiler.lib.release.option.optimization.level" valueType="enumerated"/>
<option id="gnu.c.compiler.lib.release.option.debugging.level.692648692" name="Debug Level" superClass="gnu.c.compiler.lib.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/> <option id="gnu.c.compiler.lib.release.option.debugging.level.692648692" name="Debug Level" superClass="gnu.c.compiler.lib.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.1483798947" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"> <option id="gnu.c.compiler.option.include.paths.1483798947" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/include/chipmunk}&quot;"/> <listOptionValue builtIn="false" value="../../include/chipmunk/"/>
</option> </option>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1759525822" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/> <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1759525822" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool> </tool>
@ -101,6 +101,10 @@
</tool> </tool>
</toolChain> </toolChain>
</folderInfo> </folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="include"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src"/>
</sourceEntries>
</configuration> </configuration>
</storageModule> </storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>

View File

@ -29,7 +29,7 @@ namespace cocos2d {
const char* cocos2dVersion() const char* cocos2dVersion()
{ {
return "cocos2d-1.0.1-x-0.10.0"; return "cocos2d-1.0.1-x-0.11.0";
} }
}//namespace cocos2d }//namespace cocos2d

View File

@ -419,6 +419,6 @@ public:
static CCEaseBackInOut* actionWithAction(CCActionInterval* pAction); static CCEaseBackInOut* actionWithAction(CCActionInterval* pAction);
}; };
#endif // __ACTION_CCEASE_ACTION_H__
} }
#endif // __ACTION_CCEASE_ACTION_H__

View File

@ -78,6 +78,9 @@ public:
*/ */
virtual void registerWithTouchDispatcher(void); virtual void registerWithTouchDispatcher(void);
virtual void touchDelegateRetain();
virtual void touchDelegateRelease();
/** whether or not it will receive Touch events. /** whether or not it will receive Touch events.
You can enable / disable touch events with this property. You can enable / disable touch events with this property.
Only the touches of this node will be affected. This "method" is not propagated to it's children. Only the touches of this node will be affected. This "method" is not propagated to it's children.

View File

@ -70,12 +70,12 @@ public:
* In TouchesTest, class Padle inherits from CCSprite and CCTargetedTouchDelegate. * In TouchesTest, class Padle inherits from CCSprite and CCTargetedTouchDelegate.
* When it invoke CCTouchDispatcher::sharedDispatcher()->addTargetedDelegate(this, 0, true), * When it invoke CCTouchDispatcher::sharedDispatcher()->addTargetedDelegate(this, 0, true),
* it will crash in CCTouchHandler::initWithDelegate() because of dynamic_cast() on android. * it will crash in CCTouchHandler::initWithDelegate() because of dynamic_cast() on android.
* I don't know why, so add these functions for the subclass to invoke it's know retain() and * I don't know why, so add these functions for the subclass to invoke it's own retain() and
* release(). * release().
* More detain info please refer issue #926(cocos2d-x). * More detain info please refer issue #926(cocos2d-x).
*/ */
virtual void touchDelegateRetain(){} virtual void touchDelegateRetain() = 0;
virtual void touchDelegateRelease(){} virtual void touchDelegateRelease() = 0;
// functions for script call back // functions for script call back
inline void registerScriptTouchHandler(int eventType, const char* pszScriptFunctionName) inline void registerScriptTouchHandler(int eventType, const char* pszScriptFunctionName)

View File

@ -221,6 +221,16 @@ void CCLayer::onEnterTransitionDidFinish()
CCNode::onEnterTransitionDidFinish(); CCNode::onEnterTransitionDidFinish();
} }
void CCLayer::touchDelegateRetain()
{
retain();
}
void CCLayer::touchDelegateRelease()
{
release();
}
bool CCLayer::ccTouchBegan(CCTouch *pTouch, CCEvent *pEvent) bool CCLayer::ccTouchBegan(CCTouch *pTouch, CCEvent *pEvent)
{ {
CC_UNUSED_PARAM(pTouch); CC_UNUSED_PARAM(pTouch);

View File

@ -384,4 +384,8 @@ NS_CC_END;
#include "qnx/CCFileUtils_qnx.cpp" #include "qnx/CCFileUtils_qnx.cpp"
#endif #endif
#if (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX)
#include "Linux/CCFileUtils_Linux.cpp"
#endif
#endif // (CC_TARGET_PLATFORM != CC_PLATFORM_IOS) #endif // (CC_TARGET_PLATFORM != CC_PLATFORM_IOS)

View File

@ -152,17 +152,7 @@ bool CCImage::_initWithJpgData(void * data, int nSize)
/* setup decompression process and source, then read JPEG header */ /* setup decompression process and source, then read JPEG header */
jpeg_create_decompress( &cinfo ); jpeg_create_decompress( &cinfo );
/* this makes the library read from infile */
//TODO in some linux release it use libjpeg62 which does not support jpeg_mem_src instead of libjpeg8
// load memory data as stream
#if (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX)
FILE * source = fmemopen(data, nSize, "rb");
CC_BREAK_IF(!source);
jpeg_stdio_src(&cinfo, source);
fclose(source);
#else
jpeg_mem_src( &cinfo, (unsigned char *) data, nSize ); jpeg_mem_src( &cinfo, (unsigned char *) data, nSize );
#endif
/* reading the image header which contains image information */ /* reading the image header which contains image information */
jpeg_read_header( &cinfo, true ); jpeg_read_header( &cinfo, true );
@ -351,12 +341,12 @@ bool CCImage::saveToFile(const char *pszFilePath, bool bIsToRGB)
std::string strFilePath(pszFilePath); std::string strFilePath(pszFilePath);
CC_BREAK_IF(strFilePath.size() <= 4); CC_BREAK_IF(strFilePath.size() <= 4);
std::string strLowerCasePath(strFilePath); std::string strLowerCasePath(strFilePath);
for (unsigned int i = 0; i < strLowerCasePath.length(); ++i) for (unsigned int i = 0; i < strLowerCasePath.length(); ++i)
{ {
strLowerCasePath[i] = tolower(strFilePath[i]); strLowerCasePath[i] = tolower(strFilePath[i]);
} }
if (std::string::npos != strLowerCasePath.find(".png")) if (std::string::npos != strLowerCasePath.find(".png"))
{ {
CC_BREAK_IF(!_saveImageToPNG(pszFilePath, bIsToRGB)); CC_BREAK_IF(!_saveImageToPNG(pszFilePath, bIsToRGB));
@ -562,6 +552,7 @@ bool CCImage::_saveImageToJPG(const char * pszFilePath)
for (int i = 0; i < m_nHeight; ++i) for (int i = 0; i < m_nHeight; ++i)
{ {
for (int j = 0; j < m_nWidth; ++j) for (int j = 0; j < m_nWidth; ++j)
{ {
pTempData[(i * m_nWidth + j) * 3] = m_pData[(i * m_nWidth + j) * 4]; pTempData[(i * m_nWidth + j) * 3] = m_pData[(i * m_nWidth + j) * 4];
pTempData[(i * m_nWidth + j) * 3 + 1] = m_pData[(i * m_nWidth + j) * 4 + 1]; pTempData[(i * m_nWidth + j) * 3 + 1] = m_pData[(i * m_nWidth + j) * 4 + 1];
@ -619,3 +610,7 @@ NS_CC_END;
#if (CC_TARGET_PLATFORM == CC_PLATFORM_QNX) #if (CC_TARGET_PLATFORM == CC_PLATFORM_QNX)
#include "qnx/CCImage_qnx.cpp" #include "qnx/CCImage_qnx.cpp"
#endif #endif
#if (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX)
#include "Linux/CCImage_Linux.cpp"
#endif

View File

@ -282,6 +282,7 @@ void CCEGLView::release()
{ {
/* Exits from GLFW */ /* Exits from GLFW */
glfwTerminate(); glfwTerminate();
exit(0);
} }
void CCEGLView::setTouchDelegate(EGLTouchDelegate * pDelegate) { void CCEGLView::setTouchDelegate(EGLTouchDelegate * pDelegate) {

View File

@ -0,0 +1,47 @@
/*
* jchuff.h
*
* Copyright (C) 1991-1997, 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 declarations for Huffman entropy encoding routines
* that are shared between the sequential encoder (jchuff.c) and the
* progressive encoder (jcphuff.c). No other modules need to see these.
*/
/* The legal range of a DCT coefficient is
* -1024 .. +1023 for 8-bit data;
* -16384 .. +16383 for 12-bit data.
* Hence the magnitude should always fit in 10 or 14 bits respectively.
*/
#if BITS_IN_JSAMPLE == 8
#define MAX_COEF_BITS 10
#else
#define MAX_COEF_BITS 14
#endif
/* Derived data constructed for each Huffman table */
typedef struct {
unsigned int ehufco[256]; /* code for each symbol */
char ehufsi[256]; /* length of code for each symbol */
/* If no code has been allocated for a symbol S, ehufsi[S] contains 0 */
} c_derived_tbl;
/* Short forms of external names for systems with brain-damaged linkers. */
#ifdef NEED_SHORT_EXTERNAL_NAMES
#define jpeg_make_c_derived_tbl jMkCDerived
#define jpeg_gen_optimal_table jGenOptTbl
#endif /* NEED_SHORT_EXTERNAL_NAMES */
/* Expand a Huffman table definition into the derived format */
EXTERN(void) jpeg_make_c_derived_tbl
JPP((j_compress_ptr cinfo, boolean isDC, int tblno,
c_derived_tbl ** pdtbl));
/* Generate an optimal table definition given the specified counts */
EXTERN(void) jpeg_gen_optimal_table
JPP((j_compress_ptr cinfo, JHUFF_TBL * htbl, long freq[]));

View File

@ -1,38 +1,23 @@
/* jconfig.h. Generated from jconfig.cfg by configure. */ /* jconfig.dj --- jconfig.h for DJGPP (Delorie's GNU C port) on MS-DOS. */
/* jconfig.cfg --- source file edited by configure script */ /* see jconfig.doc for explanations */
/* see jconfig.txt for explanations */
#define HAVE_PROTOTYPES 1 #define HAVE_PROTOTYPES
#define HAVE_UNSIGNED_CHAR 1 #define HAVE_UNSIGNED_CHAR
#define HAVE_UNSIGNED_SHORT 1 #define HAVE_UNSIGNED_SHORT
/* #undef void */ /* #define void char */
/* #undef const */ /* #define const */
/* #undef CHAR_IS_UNSIGNED */ #undef CHAR_IS_UNSIGNED
#define HAVE_STDDEF_H 1 #define HAVE_STDDEF_H
#define HAVE_STDLIB_H 1 #define HAVE_STDLIB_H
#define HAVE_LOCALE_H 1 #undef NEED_BSD_STRINGS
/* #undef NEED_BSD_STRINGS */ #undef NEED_SYS_TYPES_H
/* #undef NEED_SYS_TYPES_H */ #undef NEED_FAR_POINTERS /* DJGPP uses flat 32-bit addressing */
/* #undef NEED_FAR_POINTERS */ #undef NEED_SHORT_EXTERNAL_NAMES
/* #undef NEED_SHORT_EXTERNAL_NAMES */ #undef INCOMPLETE_TYPES_BROKEN
/* Define this if you get warnings about undefined structures. */
/* #undef INCOMPLETE_TYPES_BROKEN */
/* Define "boolean" as unsigned char, not int, on Windows systems. */
#ifdef _WIN32
#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
typedef unsigned char boolean;
#endif
#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
#endif
#ifdef JPEG_INTERNALS #ifdef JPEG_INTERNALS
/* #undef RIGHT_SHIFT_IS_UNSIGNED */ #undef RIGHT_SHIFT_IS_UNSIGNED
#define INLINE __inline__
/* These are for configuring the JPEG memory manager. */
/* #undef DEFAULT_MAX_MEM */
/* #undef NO_MKTEMP */
#endif /* JPEG_INTERNALS */ #endif /* JPEG_INTERNALS */
@ -41,14 +26,13 @@ typedef unsigned char boolean;
#define BMP_SUPPORTED /* BMP image file format */ #define BMP_SUPPORTED /* BMP image file format */
#define GIF_SUPPORTED /* GIF image file format */ #define GIF_SUPPORTED /* GIF image file format */
#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
/* #undef RLE_SUPPORTED */ #undef RLE_SUPPORTED /* Utah RLE image file format */
#define TARGA_SUPPORTED /* Targa image file format */ #define TARGA_SUPPORTED /* Targa image file format */
/* #undef TWO_FILE_COMMANDLINE */ #undef TWO_FILE_COMMANDLINE /* optional */
/* #undef NEED_SIGNAL_CATCHER */ #define USE_SETMODE /* Needed to make one-file style work in DJGPP */
/* #undef DONT_USE_B_MODE */ #undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */
#undef DONT_USE_B_MODE
/* Define this if you want percent-done progress reports from cjpeg/djpeg. */ #undef PROGRESS_REPORT /* optional */
/* #undef PROGRESS_REPORT */
#endif /* JPEG_CJPEG_DJPEG */ #endif /* JPEG_CJPEG_DJPEG */

View File

@ -1,393 +1,393 @@
/* /*
* jdct.h * jdct.h
* *
* Copyright (C) 1994-1996, Thomas G. Lane. * Copyright (C) 1994-1996, Thomas G. Lane.
* This file is part of the Independent JPEG Group's software. * This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file. * For conditions of distribution and use, see the accompanying README file.
* *
* This include file contains common declarations for the forward and * This include file contains common declarations for the forward and
* inverse DCT modules. These declarations are private to the DCT managers * inverse DCT modules. These declarations are private to the DCT managers
* (jcdctmgr.c, jddctmgr.c) and the individual DCT algorithms. * (jcdctmgr.c, jddctmgr.c) and the individual DCT algorithms.
* The individual DCT algorithms are kept in separate files to ease * The individual DCT algorithms are kept in separate files to ease
* machine-dependent tuning (e.g., assembly coding). * machine-dependent tuning (e.g., assembly coding).
*/ */
/* /*
* A forward DCT routine is given a pointer to an input sample array and * A forward DCT routine is given a pointer to an input sample array and
* a pointer to a work area of type DCTELEM[]; the DCT is to be performed * a pointer to a work area of type DCTELEM[]; the DCT is to be performed
* in-place in that buffer. Type DCTELEM is int for 8-bit samples, INT32 * in-place in that buffer. Type DCTELEM is int for 8-bit samples, INT32
* for 12-bit samples. (NOTE: Floating-point DCT implementations use an * for 12-bit samples. (NOTE: Floating-point DCT implementations use an
* array of type FAST_FLOAT, instead.) * array of type FAST_FLOAT, instead.)
* The input data is to be fetched from the sample array starting at a * The input data is to be fetched from the sample array starting at a
* specified column. (Any row offset needed will be applied to the array * specified column. (Any row offset needed will be applied to the array
* pointer before it is passed to the FDCT code.) * pointer before it is passed to the FDCT code.)
* Note that the number of samples fetched by the FDCT routine is * Note that the number of samples fetched by the FDCT routine is
* DCT_h_scaled_size * DCT_v_scaled_size. * DCT_h_scaled_size * DCT_v_scaled_size.
* The DCT outputs are returned scaled up by a factor of 8; they therefore * The DCT outputs are returned scaled up by a factor of 8; they therefore
* have a range of +-8K for 8-bit data, +-128K for 12-bit data. This * have a range of +-8K for 8-bit data, +-128K for 12-bit data. This
* convention improves accuracy in integer implementations and saves some * convention improves accuracy in integer implementations and saves some
* work in floating-point ones. * work in floating-point ones.
* Quantization of the output coefficients is done by jcdctmgr.c. * Quantization of the output coefficients is done by jcdctmgr.c.
*/ */
#if BITS_IN_JSAMPLE == 8 #if BITS_IN_JSAMPLE == 8
typedef int DCTELEM; /* 16 or 32 bits is fine */ typedef int DCTELEM; /* 16 or 32 bits is fine */
#else #else
typedef INT32 DCTELEM; /* must have 32 bits */ typedef INT32 DCTELEM; /* must have 32 bits */
#endif #endif
typedef JMETHOD(void, forward_DCT_method_ptr, (DCTELEM * data, typedef JMETHOD(void, forward_DCT_method_ptr, (DCTELEM * data,
JSAMPARRAY sample_data, JSAMPARRAY sample_data,
JDIMENSION start_col)); JDIMENSION start_col));
typedef JMETHOD(void, float_DCT_method_ptr, (FAST_FLOAT * data, typedef JMETHOD(void, float_DCT_method_ptr, (FAST_FLOAT * data,
JSAMPARRAY sample_data, JSAMPARRAY sample_data,
JDIMENSION start_col)); JDIMENSION start_col));
/* /*
* An inverse DCT routine is given a pointer to the input JBLOCK and a pointer * An inverse DCT routine is given a pointer to the input JBLOCK and a pointer
* to an output sample array. The routine must dequantize the input data as * to an output sample array. The routine must dequantize the input data as
* well as perform the IDCT; for dequantization, it uses the multiplier table * well as perform the IDCT; for dequantization, it uses the multiplier table
* pointed to by compptr->dct_table. The output data is to be placed into the * pointed to by compptr->dct_table. The output data is to be placed into the
* sample array starting at a specified column. (Any row offset needed will * sample array starting at a specified column. (Any row offset needed will
* be applied to the array pointer before it is passed to the IDCT code.) * be applied to the array pointer before it is passed to the IDCT code.)
* Note that the number of samples emitted by the IDCT routine is * Note that the number of samples emitted by the IDCT routine is
* DCT_h_scaled_size * DCT_v_scaled_size. * DCT_h_scaled_size * DCT_v_scaled_size.
*/ */
/* typedef inverse_DCT_method_ptr is declared in jpegint.h */ /* typedef inverse_DCT_method_ptr is declared in jpegint.h */
/* /*
* Each IDCT routine has its own ideas about the best dct_table element type. * Each IDCT routine has its own ideas about the best dct_table element type.
*/ */
typedef MULTIPLIER ISLOW_MULT_TYPE; /* short or int, whichever is faster */ typedef MULTIPLIER ISLOW_MULT_TYPE; /* short or int, whichever is faster */
#if BITS_IN_JSAMPLE == 8 #if BITS_IN_JSAMPLE == 8
typedef MULTIPLIER IFAST_MULT_TYPE; /* 16 bits is OK, use short if faster */ typedef MULTIPLIER IFAST_MULT_TYPE; /* 16 bits is OK, use short if faster */
#define IFAST_SCALE_BITS 2 /* fractional bits in scale factors */ #define IFAST_SCALE_BITS 2 /* fractional bits in scale factors */
#else #else
typedef INT32 IFAST_MULT_TYPE; /* need 32 bits for scaled quantizers */ typedef INT32 IFAST_MULT_TYPE; /* need 32 bits for scaled quantizers */
#define IFAST_SCALE_BITS 13 /* fractional bits in scale factors */ #define IFAST_SCALE_BITS 13 /* fractional bits in scale factors */
#endif #endif
typedef FAST_FLOAT FLOAT_MULT_TYPE; /* preferred floating type */ typedef FAST_FLOAT FLOAT_MULT_TYPE; /* preferred floating type */
/* /*
* Each IDCT routine is responsible for range-limiting its results and * Each IDCT routine is responsible for range-limiting its results and
* converting them to unsigned form (0..MAXJSAMPLE). The raw outputs could * converting them to unsigned form (0..MAXJSAMPLE). The raw outputs could
* be quite far out of range if the input data is corrupt, so a bulletproof * be quite far out of range if the input data is corrupt, so a bulletproof
* range-limiting step is required. We use a mask-and-table-lookup method * range-limiting step is required. We use a mask-and-table-lookup method
* to do the combined operations quickly. See the comments with * to do the combined operations quickly. See the comments with
* prepare_range_limit_table (in jdmaster.c) for more info. * prepare_range_limit_table (in jdmaster.c) for more info.
*/ */
#define IDCT_range_limit(cinfo) ((cinfo)->sample_range_limit + CENTERJSAMPLE) #define IDCT_range_limit(cinfo) ((cinfo)->sample_range_limit + CENTERJSAMPLE)
#define RANGE_MASK (MAXJSAMPLE * 4 + 3) /* 2 bits wider than legal samples */ #define RANGE_MASK (MAXJSAMPLE * 4 + 3) /* 2 bits wider than legal samples */
/* Short forms of external names for systems with brain-damaged linkers. */ /* Short forms of external names for systems with brain-damaged linkers. */
#ifdef NEED_SHORT_EXTERNAL_NAMES #ifdef NEED_SHORT_EXTERNAL_NAMES
#define jpeg_fdct_islow jFDislow #define jpeg_fdct_islow jFDislow
#define jpeg_fdct_ifast jFDifast #define jpeg_fdct_ifast jFDifast
#define jpeg_fdct_float jFDfloat #define jpeg_fdct_float jFDfloat
#define jpeg_fdct_7x7 jFD7x7 #define jpeg_fdct_7x7 jFD7x7
#define jpeg_fdct_6x6 jFD6x6 #define jpeg_fdct_6x6 jFD6x6
#define jpeg_fdct_5x5 jFD5x5 #define jpeg_fdct_5x5 jFD5x5
#define jpeg_fdct_4x4 jFD4x4 #define jpeg_fdct_4x4 jFD4x4
#define jpeg_fdct_3x3 jFD3x3 #define jpeg_fdct_3x3 jFD3x3
#define jpeg_fdct_2x2 jFD2x2 #define jpeg_fdct_2x2 jFD2x2
#define jpeg_fdct_1x1 jFD1x1 #define jpeg_fdct_1x1 jFD1x1
#define jpeg_fdct_9x9 jFD9x9 #define jpeg_fdct_9x9 jFD9x9
#define jpeg_fdct_10x10 jFD10x10 #define jpeg_fdct_10x10 jFD10x10
#define jpeg_fdct_11x11 jFD11x11 #define jpeg_fdct_11x11 jFD11x11
#define jpeg_fdct_12x12 jFD12x12 #define jpeg_fdct_12x12 jFD12x12
#define jpeg_fdct_13x13 jFD13x13 #define jpeg_fdct_13x13 jFD13x13
#define jpeg_fdct_14x14 jFD14x14 #define jpeg_fdct_14x14 jFD14x14
#define jpeg_fdct_15x15 jFD15x15 #define jpeg_fdct_15x15 jFD15x15
#define jpeg_fdct_16x16 jFD16x16 #define jpeg_fdct_16x16 jFD16x16
#define jpeg_fdct_16x8 jFD16x8 #define jpeg_fdct_16x8 jFD16x8
#define jpeg_fdct_14x7 jFD14x7 #define jpeg_fdct_14x7 jFD14x7
#define jpeg_fdct_12x6 jFD12x6 #define jpeg_fdct_12x6 jFD12x6
#define jpeg_fdct_10x5 jFD10x5 #define jpeg_fdct_10x5 jFD10x5
#define jpeg_fdct_8x4 jFD8x4 #define jpeg_fdct_8x4 jFD8x4
#define jpeg_fdct_6x3 jFD6x3 #define jpeg_fdct_6x3 jFD6x3
#define jpeg_fdct_4x2 jFD4x2 #define jpeg_fdct_4x2 jFD4x2
#define jpeg_fdct_2x1 jFD2x1 #define jpeg_fdct_2x1 jFD2x1
#define jpeg_fdct_8x16 jFD8x16 #define jpeg_fdct_8x16 jFD8x16
#define jpeg_fdct_7x14 jFD7x14 #define jpeg_fdct_7x14 jFD7x14
#define jpeg_fdct_6x12 jFD6x12 #define jpeg_fdct_6x12 jFD6x12
#define jpeg_fdct_5x10 jFD5x10 #define jpeg_fdct_5x10 jFD5x10
#define jpeg_fdct_4x8 jFD4x8 #define jpeg_fdct_4x8 jFD4x8
#define jpeg_fdct_3x6 jFD3x6 #define jpeg_fdct_3x6 jFD3x6
#define jpeg_fdct_2x4 jFD2x4 #define jpeg_fdct_2x4 jFD2x4
#define jpeg_fdct_1x2 jFD1x2 #define jpeg_fdct_1x2 jFD1x2
#define jpeg_idct_islow jRDislow #define jpeg_idct_islow jRDislow
#define jpeg_idct_ifast jRDifast #define jpeg_idct_ifast jRDifast
#define jpeg_idct_float jRDfloat #define jpeg_idct_float jRDfloat
#define jpeg_idct_7x7 jRD7x7 #define jpeg_idct_7x7 jRD7x7
#define jpeg_idct_6x6 jRD6x6 #define jpeg_idct_6x6 jRD6x6
#define jpeg_idct_5x5 jRD5x5 #define jpeg_idct_5x5 jRD5x5
#define jpeg_idct_4x4 jRD4x4 #define jpeg_idct_4x4 jRD4x4
#define jpeg_idct_3x3 jRD3x3 #define jpeg_idct_3x3 jRD3x3
#define jpeg_idct_2x2 jRD2x2 #define jpeg_idct_2x2 jRD2x2
#define jpeg_idct_1x1 jRD1x1 #define jpeg_idct_1x1 jRD1x1
#define jpeg_idct_9x9 jRD9x9 #define jpeg_idct_9x9 jRD9x9
#define jpeg_idct_10x10 jRD10x10 #define jpeg_idct_10x10 jRD10x10
#define jpeg_idct_11x11 jRD11x11 #define jpeg_idct_11x11 jRD11x11
#define jpeg_idct_12x12 jRD12x12 #define jpeg_idct_12x12 jRD12x12
#define jpeg_idct_13x13 jRD13x13 #define jpeg_idct_13x13 jRD13x13
#define jpeg_idct_14x14 jRD14x14 #define jpeg_idct_14x14 jRD14x14
#define jpeg_idct_15x15 jRD15x15 #define jpeg_idct_15x15 jRD15x15
#define jpeg_idct_16x16 jRD16x16 #define jpeg_idct_16x16 jRD16x16
#define jpeg_idct_16x8 jRD16x8 #define jpeg_idct_16x8 jRD16x8
#define jpeg_idct_14x7 jRD14x7 #define jpeg_idct_14x7 jRD14x7
#define jpeg_idct_12x6 jRD12x6 #define jpeg_idct_12x6 jRD12x6
#define jpeg_idct_10x5 jRD10x5 #define jpeg_idct_10x5 jRD10x5
#define jpeg_idct_8x4 jRD8x4 #define jpeg_idct_8x4 jRD8x4
#define jpeg_idct_6x3 jRD6x3 #define jpeg_idct_6x3 jRD6x3
#define jpeg_idct_4x2 jRD4x2 #define jpeg_idct_4x2 jRD4x2
#define jpeg_idct_2x1 jRD2x1 #define jpeg_idct_2x1 jRD2x1
#define jpeg_idct_8x16 jRD8x16 #define jpeg_idct_8x16 jRD8x16
#define jpeg_idct_7x14 jRD7x14 #define jpeg_idct_7x14 jRD7x14
#define jpeg_idct_6x12 jRD6x12 #define jpeg_idct_6x12 jRD6x12
#define jpeg_idct_5x10 jRD5x10 #define jpeg_idct_5x10 jRD5x10
#define jpeg_idct_4x8 jRD4x8 #define jpeg_idct_4x8 jRD4x8
#define jpeg_idct_3x6 jRD3x8 #define jpeg_idct_3x6 jRD3x8
#define jpeg_idct_2x4 jRD2x4 #define jpeg_idct_2x4 jRD2x4
#define jpeg_idct_1x2 jRD1x2 #define jpeg_idct_1x2 jRD1x2
#endif /* NEED_SHORT_EXTERNAL_NAMES */ #endif /* NEED_SHORT_EXTERNAL_NAMES */
/* Extern declarations for the forward and inverse DCT routines. */ /* Extern declarations for the forward and inverse DCT routines. */
EXTERN(void) jpeg_fdct_islow EXTERN(void) jpeg_fdct_islow
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_ifast EXTERN(void) jpeg_fdct_ifast
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_float EXTERN(void) jpeg_fdct_float
JPP((FAST_FLOAT * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((FAST_FLOAT * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_7x7 EXTERN(void) jpeg_fdct_7x7
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_6x6 EXTERN(void) jpeg_fdct_6x6
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_5x5 EXTERN(void) jpeg_fdct_5x5
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_4x4 EXTERN(void) jpeg_fdct_4x4
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_3x3 EXTERN(void) jpeg_fdct_3x3
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_2x2 EXTERN(void) jpeg_fdct_2x2
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_1x1 EXTERN(void) jpeg_fdct_1x1
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_9x9 EXTERN(void) jpeg_fdct_9x9
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_10x10 EXTERN(void) jpeg_fdct_10x10
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_11x11 EXTERN(void) jpeg_fdct_11x11
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_12x12 EXTERN(void) jpeg_fdct_12x12
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_13x13 EXTERN(void) jpeg_fdct_13x13
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_14x14 EXTERN(void) jpeg_fdct_14x14
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_15x15 EXTERN(void) jpeg_fdct_15x15
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_16x16 EXTERN(void) jpeg_fdct_16x16
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_16x8 EXTERN(void) jpeg_fdct_16x8
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_14x7 EXTERN(void) jpeg_fdct_14x7
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_12x6 EXTERN(void) jpeg_fdct_12x6
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_10x5 EXTERN(void) jpeg_fdct_10x5
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_8x4 EXTERN(void) jpeg_fdct_8x4
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_6x3 EXTERN(void) jpeg_fdct_6x3
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_4x2 EXTERN(void) jpeg_fdct_4x2
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_2x1 EXTERN(void) jpeg_fdct_2x1
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_8x16 EXTERN(void) jpeg_fdct_8x16
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_7x14 EXTERN(void) jpeg_fdct_7x14
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_6x12 EXTERN(void) jpeg_fdct_6x12
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_5x10 EXTERN(void) jpeg_fdct_5x10
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_4x8 EXTERN(void) jpeg_fdct_4x8
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_3x6 EXTERN(void) jpeg_fdct_3x6
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_2x4 EXTERN(void) jpeg_fdct_2x4
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_fdct_1x2 EXTERN(void) jpeg_fdct_1x2
JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_idct_islow EXTERN(void) jpeg_idct_islow
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_ifast EXTERN(void) jpeg_idct_ifast
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_float EXTERN(void) jpeg_idct_float
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_7x7 EXTERN(void) jpeg_idct_7x7
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_6x6 EXTERN(void) jpeg_idct_6x6
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_5x5 EXTERN(void) jpeg_idct_5x5
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_4x4 EXTERN(void) jpeg_idct_4x4
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_3x3 EXTERN(void) jpeg_idct_3x3
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_2x2 EXTERN(void) jpeg_idct_2x2
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_1x1 EXTERN(void) jpeg_idct_1x1
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_9x9 EXTERN(void) jpeg_idct_9x9
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_10x10 EXTERN(void) jpeg_idct_10x10
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_11x11 EXTERN(void) jpeg_idct_11x11
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_12x12 EXTERN(void) jpeg_idct_12x12
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_13x13 EXTERN(void) jpeg_idct_13x13
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_14x14 EXTERN(void) jpeg_idct_14x14
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_15x15 EXTERN(void) jpeg_idct_15x15
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_16x16 EXTERN(void) jpeg_idct_16x16
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_16x8 EXTERN(void) jpeg_idct_16x8
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_14x7 EXTERN(void) jpeg_idct_14x7
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_12x6 EXTERN(void) jpeg_idct_12x6
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_10x5 EXTERN(void) jpeg_idct_10x5
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_8x4 EXTERN(void) jpeg_idct_8x4
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_6x3 EXTERN(void) jpeg_idct_6x3
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_4x2 EXTERN(void) jpeg_idct_4x2
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_2x1 EXTERN(void) jpeg_idct_2x1
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_8x16 EXTERN(void) jpeg_idct_8x16
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_7x14 EXTERN(void) jpeg_idct_7x14
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_6x12 EXTERN(void) jpeg_idct_6x12
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_5x10 EXTERN(void) jpeg_idct_5x10
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_4x8 EXTERN(void) jpeg_idct_4x8
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_3x6 EXTERN(void) jpeg_idct_3x6
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_2x4 EXTERN(void) jpeg_idct_2x4
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_1x2 EXTERN(void) jpeg_idct_1x2
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
/* /*
* Macros for handling fixed-point arithmetic; these are used by many * Macros for handling fixed-point arithmetic; these are used by many
* but not all of the DCT/IDCT modules. * but not all of the DCT/IDCT modules.
* *
* All values are expected to be of type INT32. * All values are expected to be of type INT32.
* Fractional constants are scaled left by CONST_BITS bits. * Fractional constants are scaled left by CONST_BITS bits.
* CONST_BITS is defined within each module using these macros, * CONST_BITS is defined within each module using these macros,
* and may differ from one module to the next. * and may differ from one module to the next.
*/ */
#define ONE ((INT32) 1) #define ONE ((INT32) 1)
#define CONST_SCALE (ONE << CONST_BITS) #define CONST_SCALE (ONE << CONST_BITS)
/* Convert a positive real constant to an integer scaled by CONST_SCALE. /* Convert a positive real constant to an integer scaled by CONST_SCALE.
* Caution: some C compilers fail to reduce "FIX(constant)" at compile time, * Caution: some C compilers fail to reduce "FIX(constant)" at compile time,
* thus causing a lot of useless floating-point operations at run time. * thus causing a lot of useless floating-point operations at run time.
*/ */
#define FIX(x) ((INT32) ((x) * CONST_SCALE + 0.5)) #define FIX(x) ((INT32) ((x) * CONST_SCALE + 0.5))
/* Descale and correctly round an INT32 value that's scaled by N bits. /* Descale and correctly round an INT32 value that's scaled by N bits.
* We assume RIGHT_SHIFT rounds towards minus infinity, so adding * We assume RIGHT_SHIFT rounds towards minus infinity, so adding
* the fudge factor is correct for either sign of X. * the fudge factor is correct for either sign of X.
*/ */
#define DESCALE(x,n) RIGHT_SHIFT((x) + (ONE << ((n)-1)), n) #define DESCALE(x,n) RIGHT_SHIFT((x) + (ONE << ((n)-1)), n)
/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. /* Multiply an INT32 variable by an INT32 constant to yield an INT32 result.
* This macro is used only when the two inputs will actually be no more than * This macro is used only when the two inputs will actually be no more than
* 16 bits wide, so that a 16x16->32 bit multiply can be used instead of a * 16 bits wide, so that a 16x16->32 bit multiply can be used instead of a
* full 32x32 multiply. This provides a useful speedup on many machines. * full 32x32 multiply. This provides a useful speedup on many machines.
* Unfortunately there is no way to specify a 16x16->32 multiply portably * Unfortunately there is no way to specify a 16x16->32 multiply portably
* in C, but some C compilers will do the right thing if you provide the * in C, but some C compilers will do the right thing if you provide the
* correct combination of casts. * correct combination of casts.
*/ */
#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ #ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */
#define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT16) (const))) #define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT16) (const)))
#endif #endif
#ifdef SHORTxLCONST_32 /* known to work with Microsoft C 6.0 */ #ifdef SHORTxLCONST_32 /* known to work with Microsoft C 6.0 */
#define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT32) (const))) #define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT32) (const)))
#endif #endif
#ifndef MULTIPLY16C16 /* default definition */ #ifndef MULTIPLY16C16 /* default definition */
#define MULTIPLY16C16(var,const) ((var) * (const)) #define MULTIPLY16C16(var,const) ((var) * (const))
#endif #endif
/* Same except both inputs are variables. */ /* Same except both inputs are variables. */
#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ #ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */
#define MULTIPLY16V16(var1,var2) (((INT16) (var1)) * ((INT16) (var2))) #define MULTIPLY16V16(var1,var2) (((INT16) (var1)) * ((INT16) (var2)))
#endif #endif
#ifndef MULTIPLY16V16 /* default definition */ #ifndef MULTIPLY16V16 /* default definition */
#define MULTIPLY16V16(var1,var2) ((var1) * (var2)) #define MULTIPLY16V16(var1,var2) ((var1) * (var2))
#endif #endif

View File

@ -0,0 +1,201 @@
/*
* jdhuff.h
*
* Copyright (C) 1991-1997, 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 declarations for Huffman entropy decoding routines
* that are shared between the sequential decoder (jdhuff.c) and the
* progressive decoder (jdphuff.c). No other modules need to see these.
*/
/* Short forms of external names for systems with brain-damaged linkers. */
#ifdef NEED_SHORT_EXTERNAL_NAMES
#define jpeg_make_d_derived_tbl jMkDDerived
#define jpeg_fill_bit_buffer jFilBitBuf
#define jpeg_huff_decode jHufDecode
#endif /* NEED_SHORT_EXTERNAL_NAMES */
/* Derived data constructed for each Huffman table */
#define HUFF_LOOKAHEAD 8 /* # of bits of lookahead */
typedef struct {
/* Basic tables: (element [0] of each array is unused) */
INT32 maxcode[18]; /* largest code of length k (-1 if none) */
/* (maxcode[17] is a sentinel to ensure jpeg_huff_decode terminates) */
INT32 valoffset[17]; /* huffval[] offset for codes of length k */
/* valoffset[k] = huffval[] index of 1st symbol of code length k, less
* the smallest code of length k; so given a code of length k, the
* corresponding symbol is huffval[code + valoffset[k]]
*/
/* Link to public Huffman table (needed only in jpeg_huff_decode) */
JHUFF_TBL *pub;
/* Lookahead tables: indexed by the next HUFF_LOOKAHEAD bits of
* the input data stream. If the next Huffman code is no more
* than HUFF_LOOKAHEAD bits long, we can obtain its length and
* the corresponding symbol directly from these tables.
*/
int look_nbits[1<<HUFF_LOOKAHEAD]; /* # bits, or 0 if too long */
UINT8 look_sym[1<<HUFF_LOOKAHEAD]; /* symbol, or unused */
} d_derived_tbl;
/* Expand a Huffman table definition into the derived format */
EXTERN(void) jpeg_make_d_derived_tbl
JPP((j_decompress_ptr cinfo, boolean isDC, int tblno,
d_derived_tbl ** pdtbl));
/*
* Fetching the next N bits from the input stream is a time-critical operation
* for the Huffman decoders. We implement it with a combination of inline
* macros and out-of-line subroutines. Note that N (the number of bits
* demanded at one time) never exceeds 15 for JPEG use.
*
* We read source bytes into get_buffer and dole out bits as needed.
* If get_buffer already contains enough bits, they are fetched in-line
* by the macros CHECK_BIT_BUFFER and GET_BITS. When there aren't enough
* bits, jpeg_fill_bit_buffer is called; it will attempt to fill get_buffer
* as full as possible (not just to the number of bits needed; this
* prefetching reduces the overhead cost of calling jpeg_fill_bit_buffer).
* Note that jpeg_fill_bit_buffer may return FALSE to indicate suspension.
* On TRUE return, jpeg_fill_bit_buffer guarantees that get_buffer contains
* at least the requested number of bits --- dummy zeroes are inserted if
* necessary.
*/
typedef INT32 bit_buf_type; /* type of bit-extraction buffer */
#define BIT_BUF_SIZE 32 /* size of buffer in bits */
/* If long is > 32 bits on your machine, and shifting/masking longs is
* reasonably fast, making bit_buf_type be long and setting BIT_BUF_SIZE
* appropriately should be a win. Unfortunately we can't define the size
* with something like #define BIT_BUF_SIZE (sizeof(bit_buf_type)*8)
* because not all machines measure sizeof in 8-bit bytes.
*/
typedef struct { /* Bitreading state saved across MCUs */
bit_buf_type get_buffer; /* current bit-extraction buffer */
int bits_left; /* # of unused bits in it */
} bitread_perm_state;
typedef struct { /* Bitreading working state within an MCU */
/* Current data source location */
/* We need a copy, rather than munging the original, in case of suspension */
const JOCTET * next_input_byte; /* => next byte to read from source */
size_t bytes_in_buffer; /* # of bytes remaining in source buffer */
/* Bit input buffer --- note these values are kept in register variables,
* not in this struct, inside the inner loops.
*/
bit_buf_type get_buffer; /* current bit-extraction buffer */
int bits_left; /* # of unused bits in it */
/* Pointer needed by jpeg_fill_bit_buffer. */
j_decompress_ptr cinfo; /* back link to decompress master record */
} bitread_working_state;
/* Macros to declare and load/save bitread local variables. */
#define BITREAD_STATE_VARS \
register bit_buf_type get_buffer; \
register int bits_left; \
bitread_working_state br_state
#define BITREAD_LOAD_STATE(cinfop,permstate) \
br_state.cinfo = cinfop; \
br_state.next_input_byte = cinfop->src->next_input_byte; \
br_state.bytes_in_buffer = cinfop->src->bytes_in_buffer; \
get_buffer = permstate.get_buffer; \
bits_left = permstate.bits_left;
#define BITREAD_SAVE_STATE(cinfop,permstate) \
cinfop->src->next_input_byte = br_state.next_input_byte; \
cinfop->src->bytes_in_buffer = br_state.bytes_in_buffer; \
permstate.get_buffer = get_buffer; \
permstate.bits_left = bits_left
/*
* These macros provide the in-line portion of bit fetching.
* Use CHECK_BIT_BUFFER to ensure there are N bits in get_buffer
* before using GET_BITS, PEEK_BITS, or DROP_BITS.
* The variables get_buffer and bits_left are assumed to be locals,
* but the state struct might not be (jpeg_huff_decode needs this).
* CHECK_BIT_BUFFER(state,n,action);
* Ensure there are N bits in get_buffer; if suspend, take action.
* val = GET_BITS(n);
* Fetch next N bits.
* val = PEEK_BITS(n);
* Fetch next N bits without removing them from the buffer.
* DROP_BITS(n);
* Discard next N bits.
* The value N should be a simple variable, not an expression, because it
* is evaluated multiple times.
*/
#define CHECK_BIT_BUFFER(state,nbits,action) \
{ if (bits_left < (nbits)) { \
if (! jpeg_fill_bit_buffer(&(state),get_buffer,bits_left,nbits)) \
{ action; } \
get_buffer = (state).get_buffer; bits_left = (state).bits_left; } }
#define GET_BITS(nbits) \
(((int) (get_buffer >> (bits_left -= (nbits)))) & ((1<<(nbits))-1))
#define PEEK_BITS(nbits) \
(((int) (get_buffer >> (bits_left - (nbits)))) & ((1<<(nbits))-1))
#define DROP_BITS(nbits) \
(bits_left -= (nbits))
/* Load up the bit buffer to a depth of at least nbits */
EXTERN(boolean) jpeg_fill_bit_buffer
JPP((bitread_working_state * state, register bit_buf_type get_buffer,
register int bits_left, int nbits));
/*
* Code for extracting next Huffman-coded symbol from input bit stream.
* Again, this is time-critical and we make the main paths be macros.
*
* We use a lookahead table to process codes of up to HUFF_LOOKAHEAD bits
* without looping. Usually, more than 95% of the Huffman codes will be 8
* or fewer bits long. The few overlength codes are handled with a loop,
* which need not be inline code.
*
* Notes about the HUFF_DECODE macro:
* 1. Near the end of the data segment, we may fail to get enough bits
* for a lookahead. In that case, we do it the hard way.
* 2. If the lookahead table contains no entry, the next code must be
* more than HUFF_LOOKAHEAD bits long.
* 3. jpeg_huff_decode returns -1 if forced to suspend.
*/
#define HUFF_DECODE(result,state,htbl,failaction,slowlabel) \
{ register int nb, look; \
if (bits_left < HUFF_LOOKAHEAD) { \
if (! jpeg_fill_bit_buffer(&state,get_buffer,bits_left, 0)) {failaction;} \
get_buffer = state.get_buffer; bits_left = state.bits_left; \
if (bits_left < HUFF_LOOKAHEAD) { \
nb = 1; goto slowlabel; \
} \
} \
look = PEEK_BITS(HUFF_LOOKAHEAD); \
if ((nb = htbl->look_nbits[look]) != 0) { \
DROP_BITS(nb); \
result = htbl->look_sym[look]; \
} else { \
nb = HUFF_LOOKAHEAD+1; \
slowlabel: \
if ((result=jpeg_huff_decode(&state,get_buffer,bits_left,htbl,nb)) < 0) \
{ failaction; } \
get_buffer = state.get_buffer; bits_left = state.bits_left; \
} \
}
/* Out-of-line case for Huffman code fetching */
EXTERN(int) jpeg_huff_decode
JPP((bitread_working_state * state, register bit_buf_type get_buffer,
register int bits_left, d_derived_tbl * htbl, int min_bits));

View File

@ -1,304 +1,304 @@
/* /*
* jerror.h * jerror.h
* *
* Copyright (C) 1994-1997, Thomas G. Lane. * Copyright (C) 1994-1997, Thomas G. Lane.
* Modified 1997-2009 by Guido Vollbeding. * Modified 1997-2009 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software. * This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file. * For conditions of distribution and use, see the accompanying README file.
* *
* This file defines the error and message codes for the JPEG library. * This file defines the error and message codes for the JPEG library.
* Edit this file to add new codes, or to translate the message strings to * Edit this file to add new codes, or to translate the message strings to
* some other language. * some other language.
* A set of error-reporting macros are defined too. Some applications using * A set of error-reporting macros are defined too. Some applications using
* the JPEG library may wish to include this file to get the error codes * the JPEG library may wish to include this file to get the error codes
* and/or the macros. * and/or the macros.
*/ */
/* /*
* To define the enum list of message codes, include this file without * To define the enum list of message codes, include this file without
* defining macro JMESSAGE. To create a message string table, include it * defining macro JMESSAGE. To create a message string table, include it
* again with a suitable JMESSAGE definition (see jerror.c for an example). * again with a suitable JMESSAGE definition (see jerror.c for an example).
*/ */
#ifndef JMESSAGE #ifndef JMESSAGE
#ifndef JERROR_H #ifndef JERROR_H
/* First time through, define the enum list */ /* First time through, define the enum list */
#define JMAKE_ENUM_LIST #define JMAKE_ENUM_LIST
#else #else
/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */ /* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */
#define JMESSAGE(code,string) #define JMESSAGE(code,string)
#endif /* JERROR_H */ #endif /* JERROR_H */
#endif /* JMESSAGE */ #endif /* JMESSAGE */
#ifdef JMAKE_ENUM_LIST #ifdef JMAKE_ENUM_LIST
typedef enum { typedef enum {
#define JMESSAGE(code,string) code , #define JMESSAGE(code,string) code ,
#endif /* JMAKE_ENUM_LIST */ #endif /* JMAKE_ENUM_LIST */
JMESSAGE(JMSG_NOMESSAGE, "Bogus message code %d") /* Must be first entry! */ JMESSAGE(JMSG_NOMESSAGE, "Bogus message code %d") /* Must be first entry! */
/* For maintenance convenience, list is alphabetical by message code name */ /* For maintenance convenience, list is alphabetical by message code name */
JMESSAGE(JERR_BAD_ALIGN_TYPE, "ALIGN_TYPE is wrong, please fix") JMESSAGE(JERR_BAD_ALIGN_TYPE, "ALIGN_TYPE is wrong, please fix")
JMESSAGE(JERR_BAD_ALLOC_CHUNK, "MAX_ALLOC_CHUNK is wrong, please fix") JMESSAGE(JERR_BAD_ALLOC_CHUNK, "MAX_ALLOC_CHUNK is wrong, please fix")
JMESSAGE(JERR_BAD_BUFFER_MODE, "Bogus buffer control mode") JMESSAGE(JERR_BAD_BUFFER_MODE, "Bogus buffer control mode")
JMESSAGE(JERR_BAD_COMPONENT_ID, "Invalid component ID %d in SOS") JMESSAGE(JERR_BAD_COMPONENT_ID, "Invalid component ID %d in SOS")
JMESSAGE(JERR_BAD_CROP_SPEC, "Invalid crop request") JMESSAGE(JERR_BAD_CROP_SPEC, "Invalid crop request")
JMESSAGE(JERR_BAD_DCT_COEF, "DCT coefficient out of range") JMESSAGE(JERR_BAD_DCT_COEF, "DCT coefficient out of range")
JMESSAGE(JERR_BAD_DCTSIZE, "DCT scaled block size %dx%d not supported") JMESSAGE(JERR_BAD_DCTSIZE, "DCT scaled block size %dx%d not supported")
JMESSAGE(JERR_BAD_DROP_SAMPLING, JMESSAGE(JERR_BAD_DROP_SAMPLING,
"Component index %d: mismatching sampling ratio %d:%d, %d:%d, %c") "Component index %d: mismatching sampling ratio %d:%d, %d:%d, %c")
JMESSAGE(JERR_BAD_HUFF_TABLE, "Bogus Huffman table definition") JMESSAGE(JERR_BAD_HUFF_TABLE, "Bogus Huffman table definition")
JMESSAGE(JERR_BAD_IN_COLORSPACE, "Bogus input colorspace") JMESSAGE(JERR_BAD_IN_COLORSPACE, "Bogus input colorspace")
JMESSAGE(JERR_BAD_J_COLORSPACE, "Bogus JPEG colorspace") JMESSAGE(JERR_BAD_J_COLORSPACE, "Bogus JPEG colorspace")
JMESSAGE(JERR_BAD_LENGTH, "Bogus marker length") JMESSAGE(JERR_BAD_LENGTH, "Bogus marker length")
JMESSAGE(JERR_BAD_LIB_VERSION, JMESSAGE(JERR_BAD_LIB_VERSION,
"Wrong JPEG library version: library is %d, caller expects %d") "Wrong JPEG library version: library is %d, caller expects %d")
JMESSAGE(JERR_BAD_MCU_SIZE, "Sampling factors too large for interleaved scan") JMESSAGE(JERR_BAD_MCU_SIZE, "Sampling factors too large for interleaved scan")
JMESSAGE(JERR_BAD_POOL_ID, "Invalid memory pool code %d") JMESSAGE(JERR_BAD_POOL_ID, "Invalid memory pool code %d")
JMESSAGE(JERR_BAD_PRECISION, "Unsupported JPEG data precision %d") JMESSAGE(JERR_BAD_PRECISION, "Unsupported JPEG data precision %d")
JMESSAGE(JERR_BAD_PROGRESSION, JMESSAGE(JERR_BAD_PROGRESSION,
"Invalid progressive parameters Ss=%d Se=%d Ah=%d Al=%d") "Invalid progressive parameters Ss=%d Se=%d Ah=%d Al=%d")
JMESSAGE(JERR_BAD_PROG_SCRIPT, JMESSAGE(JERR_BAD_PROG_SCRIPT,
"Invalid progressive parameters at scan script entry %d") "Invalid progressive parameters at scan script entry %d")
JMESSAGE(JERR_BAD_SAMPLING, "Bogus sampling factors") JMESSAGE(JERR_BAD_SAMPLING, "Bogus sampling factors")
JMESSAGE(JERR_BAD_SCAN_SCRIPT, "Invalid scan script at entry %d") JMESSAGE(JERR_BAD_SCAN_SCRIPT, "Invalid scan script at entry %d")
JMESSAGE(JERR_BAD_STATE, "Improper call to JPEG library in state %d") JMESSAGE(JERR_BAD_STATE, "Improper call to JPEG library in state %d")
JMESSAGE(JERR_BAD_STRUCT_SIZE, JMESSAGE(JERR_BAD_STRUCT_SIZE,
"JPEG parameter struct mismatch: library thinks size is %u, caller expects %u") "JPEG parameter struct mismatch: library thinks size is %u, caller expects %u")
JMESSAGE(JERR_BAD_VIRTUAL_ACCESS, "Bogus virtual array access") JMESSAGE(JERR_BAD_VIRTUAL_ACCESS, "Bogus virtual array access")
JMESSAGE(JERR_BUFFER_SIZE, "Buffer passed to JPEG library is too small") JMESSAGE(JERR_BUFFER_SIZE, "Buffer passed to JPEG library is too small")
JMESSAGE(JERR_CANT_SUSPEND, "Suspension not allowed here") JMESSAGE(JERR_CANT_SUSPEND, "Suspension not allowed here")
JMESSAGE(JERR_CCIR601_NOTIMPL, "CCIR601 sampling not implemented yet") JMESSAGE(JERR_CCIR601_NOTIMPL, "CCIR601 sampling not implemented yet")
JMESSAGE(JERR_COMPONENT_COUNT, "Too many color components: %d, max %d") JMESSAGE(JERR_COMPONENT_COUNT, "Too many color components: %d, max %d")
JMESSAGE(JERR_CONVERSION_NOTIMPL, "Unsupported color conversion request") JMESSAGE(JERR_CONVERSION_NOTIMPL, "Unsupported color conversion request")
JMESSAGE(JERR_DAC_INDEX, "Bogus DAC index %d") JMESSAGE(JERR_DAC_INDEX, "Bogus DAC index %d")
JMESSAGE(JERR_DAC_VALUE, "Bogus DAC value 0x%x") JMESSAGE(JERR_DAC_VALUE, "Bogus DAC value 0x%x")
JMESSAGE(JERR_DHT_INDEX, "Bogus DHT index %d") JMESSAGE(JERR_DHT_INDEX, "Bogus DHT index %d")
JMESSAGE(JERR_DQT_INDEX, "Bogus DQT index %d") JMESSAGE(JERR_DQT_INDEX, "Bogus DQT index %d")
JMESSAGE(JERR_EMPTY_IMAGE, "Empty JPEG image (DNL not supported)") JMESSAGE(JERR_EMPTY_IMAGE, "Empty JPEG image (DNL not supported)")
JMESSAGE(JERR_EMS_READ, "Read from EMS failed") JMESSAGE(JERR_EMS_READ, "Read from EMS failed")
JMESSAGE(JERR_EMS_WRITE, "Write to EMS failed") JMESSAGE(JERR_EMS_WRITE, "Write to EMS failed")
JMESSAGE(JERR_EOI_EXPECTED, "Didn't expect more than one scan") JMESSAGE(JERR_EOI_EXPECTED, "Didn't expect more than one scan")
JMESSAGE(JERR_FILE_READ, "Input file read error") JMESSAGE(JERR_FILE_READ, "Input file read error")
JMESSAGE(JERR_FILE_WRITE, "Output file write error --- out of disk space?") JMESSAGE(JERR_FILE_WRITE, "Output file write error --- out of disk space?")
JMESSAGE(JERR_FRACT_SAMPLE_NOTIMPL, "Fractional sampling not implemented yet") JMESSAGE(JERR_FRACT_SAMPLE_NOTIMPL, "Fractional sampling not implemented yet")
JMESSAGE(JERR_HUFF_CLEN_OVERFLOW, "Huffman code size table overflow") JMESSAGE(JERR_HUFF_CLEN_OVERFLOW, "Huffman code size table overflow")
JMESSAGE(JERR_HUFF_MISSING_CODE, "Missing Huffman code table entry") JMESSAGE(JERR_HUFF_MISSING_CODE, "Missing Huffman code table entry")
JMESSAGE(JERR_IMAGE_TOO_BIG, "Maximum supported image dimension is %u pixels") JMESSAGE(JERR_IMAGE_TOO_BIG, "Maximum supported image dimension is %u pixels")
JMESSAGE(JERR_INPUT_EMPTY, "Empty input file") JMESSAGE(JERR_INPUT_EMPTY, "Empty input file")
JMESSAGE(JERR_INPUT_EOF, "Premature end of input file") JMESSAGE(JERR_INPUT_EOF, "Premature end of input file")
JMESSAGE(JERR_MISMATCHED_QUANT_TABLE, JMESSAGE(JERR_MISMATCHED_QUANT_TABLE,
"Cannot transcode due to multiple use of quantization table %d") "Cannot transcode due to multiple use of quantization table %d")
JMESSAGE(JERR_MISSING_DATA, "Scan script does not transmit all data") JMESSAGE(JERR_MISSING_DATA, "Scan script does not transmit all data")
JMESSAGE(JERR_MODE_CHANGE, "Invalid color quantization mode change") JMESSAGE(JERR_MODE_CHANGE, "Invalid color quantization mode change")
JMESSAGE(JERR_NOTIMPL, "Not implemented yet") JMESSAGE(JERR_NOTIMPL, "Not implemented yet")
JMESSAGE(JERR_NOT_COMPILED, "Requested feature was omitted at compile time") JMESSAGE(JERR_NOT_COMPILED, "Requested feature was omitted at compile time")
JMESSAGE(JERR_NO_ARITH_TABLE, "Arithmetic table 0x%02x was not defined") JMESSAGE(JERR_NO_ARITH_TABLE, "Arithmetic table 0x%02x was not defined")
JMESSAGE(JERR_NO_BACKING_STORE, "Backing store not supported") JMESSAGE(JERR_NO_BACKING_STORE, "Backing store not supported")
JMESSAGE(JERR_NO_HUFF_TABLE, "Huffman table 0x%02x was not defined") JMESSAGE(JERR_NO_HUFF_TABLE, "Huffman table 0x%02x was not defined")
JMESSAGE(JERR_NO_IMAGE, "JPEG datastream contains no image") JMESSAGE(JERR_NO_IMAGE, "JPEG datastream contains no image")
JMESSAGE(JERR_NO_QUANT_TABLE, "Quantization table 0x%02x was not defined") JMESSAGE(JERR_NO_QUANT_TABLE, "Quantization table 0x%02x was not defined")
JMESSAGE(JERR_NO_SOI, "Not a JPEG file: starts with 0x%02x 0x%02x") JMESSAGE(JERR_NO_SOI, "Not a JPEG file: starts with 0x%02x 0x%02x")
JMESSAGE(JERR_OUT_OF_MEMORY, "Insufficient memory (case %d)") JMESSAGE(JERR_OUT_OF_MEMORY, "Insufficient memory (case %d)")
JMESSAGE(JERR_QUANT_COMPONENTS, JMESSAGE(JERR_QUANT_COMPONENTS,
"Cannot quantize more than %d color components") "Cannot quantize more than %d color components")
JMESSAGE(JERR_QUANT_FEW_COLORS, "Cannot quantize to fewer than %d colors") JMESSAGE(JERR_QUANT_FEW_COLORS, "Cannot quantize to fewer than %d colors")
JMESSAGE(JERR_QUANT_MANY_COLORS, "Cannot quantize to more than %d colors") JMESSAGE(JERR_QUANT_MANY_COLORS, "Cannot quantize to more than %d colors")
JMESSAGE(JERR_SOF_DUPLICATE, "Invalid JPEG file structure: two SOF markers") JMESSAGE(JERR_SOF_DUPLICATE, "Invalid JPEG file structure: two SOF markers")
JMESSAGE(JERR_SOF_NO_SOS, "Invalid JPEG file structure: missing SOS marker") JMESSAGE(JERR_SOF_NO_SOS, "Invalid JPEG file structure: missing SOS marker")
JMESSAGE(JERR_SOF_UNSUPPORTED, "Unsupported JPEG process: SOF type 0x%02x") JMESSAGE(JERR_SOF_UNSUPPORTED, "Unsupported JPEG process: SOF type 0x%02x")
JMESSAGE(JERR_SOI_DUPLICATE, "Invalid JPEG file structure: two SOI markers") JMESSAGE(JERR_SOI_DUPLICATE, "Invalid JPEG file structure: two SOI markers")
JMESSAGE(JERR_SOS_NO_SOF, "Invalid JPEG file structure: SOS before SOF") JMESSAGE(JERR_SOS_NO_SOF, "Invalid JPEG file structure: SOS before SOF")
JMESSAGE(JERR_TFILE_CREATE, "Failed to create temporary file %s") JMESSAGE(JERR_TFILE_CREATE, "Failed to create temporary file %s")
JMESSAGE(JERR_TFILE_READ, "Read failed on temporary file") JMESSAGE(JERR_TFILE_READ, "Read failed on temporary file")
JMESSAGE(JERR_TFILE_SEEK, "Seek failed on temporary file") JMESSAGE(JERR_TFILE_SEEK, "Seek failed on temporary file")
JMESSAGE(JERR_TFILE_WRITE, JMESSAGE(JERR_TFILE_WRITE,
"Write failed on temporary file --- out of disk space?") "Write failed on temporary file --- out of disk space?")
JMESSAGE(JERR_TOO_LITTLE_DATA, "Application transferred too few scanlines") JMESSAGE(JERR_TOO_LITTLE_DATA, "Application transferred too few scanlines")
JMESSAGE(JERR_UNKNOWN_MARKER, "Unsupported marker type 0x%02x") JMESSAGE(JERR_UNKNOWN_MARKER, "Unsupported marker type 0x%02x")
JMESSAGE(JERR_VIRTUAL_BUG, "Virtual array controller messed up") JMESSAGE(JERR_VIRTUAL_BUG, "Virtual array controller messed up")
JMESSAGE(JERR_WIDTH_OVERFLOW, "Image too wide for this implementation") JMESSAGE(JERR_WIDTH_OVERFLOW, "Image too wide for this implementation")
JMESSAGE(JERR_XMS_READ, "Read from XMS failed") JMESSAGE(JERR_XMS_READ, "Read from XMS failed")
JMESSAGE(JERR_XMS_WRITE, "Write to XMS failed") JMESSAGE(JERR_XMS_WRITE, "Write to XMS failed")
JMESSAGE(JMSG_COPYRIGHT, JCOPYRIGHT) JMESSAGE(JMSG_COPYRIGHT, JCOPYRIGHT)
JMESSAGE(JMSG_VERSION, JVERSION) JMESSAGE(JMSG_VERSION, JVERSION)
JMESSAGE(JTRC_16BIT_TABLES, JMESSAGE(JTRC_16BIT_TABLES,
"Caution: quantization tables are too coarse for baseline JPEG") "Caution: quantization tables are too coarse for baseline JPEG")
JMESSAGE(JTRC_ADOBE, JMESSAGE(JTRC_ADOBE,
"Adobe APP14 marker: version %d, flags 0x%04x 0x%04x, transform %d") "Adobe APP14 marker: version %d, flags 0x%04x 0x%04x, transform %d")
JMESSAGE(JTRC_APP0, "Unknown APP0 marker (not JFIF), length %u") JMESSAGE(JTRC_APP0, "Unknown APP0 marker (not JFIF), length %u")
JMESSAGE(JTRC_APP14, "Unknown APP14 marker (not Adobe), length %u") JMESSAGE(JTRC_APP14, "Unknown APP14 marker (not Adobe), length %u")
JMESSAGE(JTRC_DAC, "Define Arithmetic Table 0x%02x: 0x%02x") JMESSAGE(JTRC_DAC, "Define Arithmetic Table 0x%02x: 0x%02x")
JMESSAGE(JTRC_DHT, "Define Huffman Table 0x%02x") JMESSAGE(JTRC_DHT, "Define Huffman Table 0x%02x")
JMESSAGE(JTRC_DQT, "Define Quantization Table %d precision %d") JMESSAGE(JTRC_DQT, "Define Quantization Table %d precision %d")
JMESSAGE(JTRC_DRI, "Define Restart Interval %u") JMESSAGE(JTRC_DRI, "Define Restart Interval %u")
JMESSAGE(JTRC_EMS_CLOSE, "Freed EMS handle %u") JMESSAGE(JTRC_EMS_CLOSE, "Freed EMS handle %u")
JMESSAGE(JTRC_EMS_OPEN, "Obtained EMS handle %u") JMESSAGE(JTRC_EMS_OPEN, "Obtained EMS handle %u")
JMESSAGE(JTRC_EOI, "End Of Image") JMESSAGE(JTRC_EOI, "End Of Image")
JMESSAGE(JTRC_HUFFBITS, " %3d %3d %3d %3d %3d %3d %3d %3d") JMESSAGE(JTRC_HUFFBITS, " %3d %3d %3d %3d %3d %3d %3d %3d")
JMESSAGE(JTRC_JFIF, "JFIF APP0 marker: version %d.%02d, density %dx%d %d") JMESSAGE(JTRC_JFIF, "JFIF APP0 marker: version %d.%02d, density %dx%d %d")
JMESSAGE(JTRC_JFIF_BADTHUMBNAILSIZE, JMESSAGE(JTRC_JFIF_BADTHUMBNAILSIZE,
"Warning: thumbnail image size does not match data length %u") "Warning: thumbnail image size does not match data length %u")
JMESSAGE(JTRC_JFIF_EXTENSION, JMESSAGE(JTRC_JFIF_EXTENSION,
"JFIF extension marker: type 0x%02x, length %u") "JFIF extension marker: type 0x%02x, length %u")
JMESSAGE(JTRC_JFIF_THUMBNAIL, " with %d x %d thumbnail image") JMESSAGE(JTRC_JFIF_THUMBNAIL, " with %d x %d thumbnail image")
JMESSAGE(JTRC_MISC_MARKER, "Miscellaneous marker 0x%02x, length %u") JMESSAGE(JTRC_MISC_MARKER, "Miscellaneous marker 0x%02x, length %u")
JMESSAGE(JTRC_PARMLESS_MARKER, "Unexpected marker 0x%02x") JMESSAGE(JTRC_PARMLESS_MARKER, "Unexpected marker 0x%02x")
JMESSAGE(JTRC_QUANTVALS, " %4u %4u %4u %4u %4u %4u %4u %4u") JMESSAGE(JTRC_QUANTVALS, " %4u %4u %4u %4u %4u %4u %4u %4u")
JMESSAGE(JTRC_QUANT_3_NCOLORS, "Quantizing to %d = %d*%d*%d colors") JMESSAGE(JTRC_QUANT_3_NCOLORS, "Quantizing to %d = %d*%d*%d colors")
JMESSAGE(JTRC_QUANT_NCOLORS, "Quantizing to %d colors") JMESSAGE(JTRC_QUANT_NCOLORS, "Quantizing to %d colors")
JMESSAGE(JTRC_QUANT_SELECTED, "Selected %d colors for quantization") JMESSAGE(JTRC_QUANT_SELECTED, "Selected %d colors for quantization")
JMESSAGE(JTRC_RECOVERY_ACTION, "At marker 0x%02x, recovery action %d") JMESSAGE(JTRC_RECOVERY_ACTION, "At marker 0x%02x, recovery action %d")
JMESSAGE(JTRC_RST, "RST%d") JMESSAGE(JTRC_RST, "RST%d")
JMESSAGE(JTRC_SMOOTH_NOTIMPL, JMESSAGE(JTRC_SMOOTH_NOTIMPL,
"Smoothing not supported with nonstandard sampling ratios") "Smoothing not supported with nonstandard sampling ratios")
JMESSAGE(JTRC_SOF, "Start Of Frame 0x%02x: width=%u, height=%u, components=%d") JMESSAGE(JTRC_SOF, "Start Of Frame 0x%02x: width=%u, height=%u, components=%d")
JMESSAGE(JTRC_SOF_COMPONENT, " Component %d: %dhx%dv q=%d") JMESSAGE(JTRC_SOF_COMPONENT, " Component %d: %dhx%dv q=%d")
JMESSAGE(JTRC_SOI, "Start of Image") JMESSAGE(JTRC_SOI, "Start of Image")
JMESSAGE(JTRC_SOS, "Start Of Scan: %d components") JMESSAGE(JTRC_SOS, "Start Of Scan: %d components")
JMESSAGE(JTRC_SOS_COMPONENT, " Component %d: dc=%d ac=%d") JMESSAGE(JTRC_SOS_COMPONENT, " Component %d: dc=%d ac=%d")
JMESSAGE(JTRC_SOS_PARAMS, " Ss=%d, Se=%d, Ah=%d, Al=%d") JMESSAGE(JTRC_SOS_PARAMS, " Ss=%d, Se=%d, Ah=%d, Al=%d")
JMESSAGE(JTRC_TFILE_CLOSE, "Closed temporary file %s") JMESSAGE(JTRC_TFILE_CLOSE, "Closed temporary file %s")
JMESSAGE(JTRC_TFILE_OPEN, "Opened temporary file %s") JMESSAGE(JTRC_TFILE_OPEN, "Opened temporary file %s")
JMESSAGE(JTRC_THUMB_JPEG, JMESSAGE(JTRC_THUMB_JPEG,
"JFIF extension marker: JPEG-compressed thumbnail image, length %u") "JFIF extension marker: JPEG-compressed thumbnail image, length %u")
JMESSAGE(JTRC_THUMB_PALETTE, JMESSAGE(JTRC_THUMB_PALETTE,
"JFIF extension marker: palette thumbnail image, length %u") "JFIF extension marker: palette thumbnail image, length %u")
JMESSAGE(JTRC_THUMB_RGB, JMESSAGE(JTRC_THUMB_RGB,
"JFIF extension marker: RGB thumbnail image, length %u") "JFIF extension marker: RGB thumbnail image, length %u")
JMESSAGE(JTRC_UNKNOWN_IDS, JMESSAGE(JTRC_UNKNOWN_IDS,
"Unrecognized component IDs %d %d %d, assuming YCbCr") "Unrecognized component IDs %d %d %d, assuming YCbCr")
JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u") JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u")
JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u") JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u")
JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d") JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d")
JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt JPEG data: bad arithmetic code") JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt JPEG data: bad arithmetic code")
JMESSAGE(JWRN_BOGUS_PROGRESSION, JMESSAGE(JWRN_BOGUS_PROGRESSION,
"Inconsistent progression sequence for component %d coefficient %d") "Inconsistent progression sequence for component %d coefficient %d")
JMESSAGE(JWRN_EXTRANEOUS_DATA, JMESSAGE(JWRN_EXTRANEOUS_DATA,
"Corrupt JPEG data: %u extraneous bytes before marker 0x%02x") "Corrupt JPEG data: %u extraneous bytes before marker 0x%02x")
JMESSAGE(JWRN_HIT_MARKER, "Corrupt JPEG data: premature end of data segment") JMESSAGE(JWRN_HIT_MARKER, "Corrupt JPEG data: premature end of data segment")
JMESSAGE(JWRN_HUFF_BAD_CODE, "Corrupt JPEG data: bad Huffman code") JMESSAGE(JWRN_HUFF_BAD_CODE, "Corrupt JPEG data: bad Huffman code")
JMESSAGE(JWRN_JFIF_MAJOR, "Warning: unknown JFIF revision number %d.%02d") JMESSAGE(JWRN_JFIF_MAJOR, "Warning: unknown JFIF revision number %d.%02d")
JMESSAGE(JWRN_JPEG_EOF, "Premature end of JPEG file") JMESSAGE(JWRN_JPEG_EOF, "Premature end of JPEG file")
JMESSAGE(JWRN_MUST_RESYNC, JMESSAGE(JWRN_MUST_RESYNC,
"Corrupt JPEG data: found marker 0x%02x instead of RST%d") "Corrupt JPEG data: found marker 0x%02x instead of RST%d")
JMESSAGE(JWRN_NOT_SEQUENTIAL, "Invalid SOS parameters for sequential JPEG") JMESSAGE(JWRN_NOT_SEQUENTIAL, "Invalid SOS parameters for sequential JPEG")
JMESSAGE(JWRN_TOO_MUCH_DATA, "Application transferred too many scanlines") JMESSAGE(JWRN_TOO_MUCH_DATA, "Application transferred too many scanlines")
#ifdef JMAKE_ENUM_LIST #ifdef JMAKE_ENUM_LIST
JMSG_LASTMSGCODE JMSG_LASTMSGCODE
} J_MESSAGE_CODE; } J_MESSAGE_CODE;
#undef JMAKE_ENUM_LIST #undef JMAKE_ENUM_LIST
#endif /* JMAKE_ENUM_LIST */ #endif /* JMAKE_ENUM_LIST */
/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */ /* Zap JMESSAGE macro so that future re-inclusions do nothing by default */
#undef JMESSAGE #undef JMESSAGE
#ifndef JERROR_H #ifndef JERROR_H
#define JERROR_H #define JERROR_H
/* Macros to simplify using the error and trace message stuff */ /* Macros to simplify using the error and trace message stuff */
/* The first parameter is either type of cinfo pointer */ /* The first parameter is either type of cinfo pointer */
/* Fatal errors (print message and exit) */ /* Fatal errors (print message and exit) */
#define ERREXIT(cinfo,code) \ #define ERREXIT(cinfo,code) \
((cinfo)->err->msg_code = (code), \ ((cinfo)->err->msg_code = (code), \
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
#define ERREXIT1(cinfo,code,p1) \ #define ERREXIT1(cinfo,code,p1) \
((cinfo)->err->msg_code = (code), \ ((cinfo)->err->msg_code = (code), \
(cinfo)->err->msg_parm.i[0] = (p1), \ (cinfo)->err->msg_parm.i[0] = (p1), \
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
#define ERREXIT2(cinfo,code,p1,p2) \ #define ERREXIT2(cinfo,code,p1,p2) \
((cinfo)->err->msg_code = (code), \ ((cinfo)->err->msg_code = (code), \
(cinfo)->err->msg_parm.i[0] = (p1), \ (cinfo)->err->msg_parm.i[0] = (p1), \
(cinfo)->err->msg_parm.i[1] = (p2), \ (cinfo)->err->msg_parm.i[1] = (p2), \
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
#define ERREXIT3(cinfo,code,p1,p2,p3) \ #define ERREXIT3(cinfo,code,p1,p2,p3) \
((cinfo)->err->msg_code = (code), \ ((cinfo)->err->msg_code = (code), \
(cinfo)->err->msg_parm.i[0] = (p1), \ (cinfo)->err->msg_parm.i[0] = (p1), \
(cinfo)->err->msg_parm.i[1] = (p2), \ (cinfo)->err->msg_parm.i[1] = (p2), \
(cinfo)->err->msg_parm.i[2] = (p3), \ (cinfo)->err->msg_parm.i[2] = (p3), \
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
#define ERREXIT4(cinfo,code,p1,p2,p3,p4) \ #define ERREXIT4(cinfo,code,p1,p2,p3,p4) \
((cinfo)->err->msg_code = (code), \ ((cinfo)->err->msg_code = (code), \
(cinfo)->err->msg_parm.i[0] = (p1), \ (cinfo)->err->msg_parm.i[0] = (p1), \
(cinfo)->err->msg_parm.i[1] = (p2), \ (cinfo)->err->msg_parm.i[1] = (p2), \
(cinfo)->err->msg_parm.i[2] = (p3), \ (cinfo)->err->msg_parm.i[2] = (p3), \
(cinfo)->err->msg_parm.i[3] = (p4), \ (cinfo)->err->msg_parm.i[3] = (p4), \
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
#define ERREXIT6(cinfo,code,p1,p2,p3,p4,p5,p6) \ #define ERREXIT6(cinfo,code,p1,p2,p3,p4,p5,p6) \
((cinfo)->err->msg_code = (code), \ ((cinfo)->err->msg_code = (code), \
(cinfo)->err->msg_parm.i[0] = (p1), \ (cinfo)->err->msg_parm.i[0] = (p1), \
(cinfo)->err->msg_parm.i[1] = (p2), \ (cinfo)->err->msg_parm.i[1] = (p2), \
(cinfo)->err->msg_parm.i[2] = (p3), \ (cinfo)->err->msg_parm.i[2] = (p3), \
(cinfo)->err->msg_parm.i[3] = (p4), \ (cinfo)->err->msg_parm.i[3] = (p4), \
(cinfo)->err->msg_parm.i[4] = (p5), \ (cinfo)->err->msg_parm.i[4] = (p5), \
(cinfo)->err->msg_parm.i[5] = (p6), \ (cinfo)->err->msg_parm.i[5] = (p6), \
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
#define ERREXITS(cinfo,code,str) \ #define ERREXITS(cinfo,code,str) \
((cinfo)->err->msg_code = (code), \ ((cinfo)->err->msg_code = (code), \
strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
#define MAKESTMT(stuff) do { stuff } while (0) #define MAKESTMT(stuff) do { stuff } while (0)
/* Nonfatal errors (we can keep going, but the data is probably corrupt) */ /* Nonfatal errors (we can keep going, but the data is probably corrupt) */
#define WARNMS(cinfo,code) \ #define WARNMS(cinfo,code) \
((cinfo)->err->msg_code = (code), \ ((cinfo)->err->msg_code = (code), \
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1))
#define WARNMS1(cinfo,code,p1) \ #define WARNMS1(cinfo,code,p1) \
((cinfo)->err->msg_code = (code), \ ((cinfo)->err->msg_code = (code), \
(cinfo)->err->msg_parm.i[0] = (p1), \ (cinfo)->err->msg_parm.i[0] = (p1), \
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1))
#define WARNMS2(cinfo,code,p1,p2) \ #define WARNMS2(cinfo,code,p1,p2) \
((cinfo)->err->msg_code = (code), \ ((cinfo)->err->msg_code = (code), \
(cinfo)->err->msg_parm.i[0] = (p1), \ (cinfo)->err->msg_parm.i[0] = (p1), \
(cinfo)->err->msg_parm.i[1] = (p2), \ (cinfo)->err->msg_parm.i[1] = (p2), \
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1))
/* Informational/debugging messages */ /* Informational/debugging messages */
#define TRACEMS(cinfo,lvl,code) \ #define TRACEMS(cinfo,lvl,code) \
((cinfo)->err->msg_code = (code), \ ((cinfo)->err->msg_code = (code), \
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
#define TRACEMS1(cinfo,lvl,code,p1) \ #define TRACEMS1(cinfo,lvl,code,p1) \
((cinfo)->err->msg_code = (code), \ ((cinfo)->err->msg_code = (code), \
(cinfo)->err->msg_parm.i[0] = (p1), \ (cinfo)->err->msg_parm.i[0] = (p1), \
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
#define TRACEMS2(cinfo,lvl,code,p1,p2) \ #define TRACEMS2(cinfo,lvl,code,p1,p2) \
((cinfo)->err->msg_code = (code), \ ((cinfo)->err->msg_code = (code), \
(cinfo)->err->msg_parm.i[0] = (p1), \ (cinfo)->err->msg_parm.i[0] = (p1), \
(cinfo)->err->msg_parm.i[1] = (p2), \ (cinfo)->err->msg_parm.i[1] = (p2), \
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
#define TRACEMS3(cinfo,lvl,code,p1,p2,p3) \ #define TRACEMS3(cinfo,lvl,code,p1,p2,p3) \
MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \
_mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); \ _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); \
(cinfo)->err->msg_code = (code); \ (cinfo)->err->msg_code = (code); \
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
#define TRACEMS4(cinfo,lvl,code,p1,p2,p3,p4) \ #define TRACEMS4(cinfo,lvl,code,p1,p2,p3,p4) \
MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \
_mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \
(cinfo)->err->msg_code = (code); \ (cinfo)->err->msg_code = (code); \
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
#define TRACEMS5(cinfo,lvl,code,p1,p2,p3,p4,p5) \ #define TRACEMS5(cinfo,lvl,code,p1,p2,p3,p4,p5) \
MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \
_mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \
_mp[4] = (p5); \ _mp[4] = (p5); \
(cinfo)->err->msg_code = (code); \ (cinfo)->err->msg_code = (code); \
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
#define TRACEMS8(cinfo,lvl,code,p1,p2,p3,p4,p5,p6,p7,p8) \ #define TRACEMS8(cinfo,lvl,code,p1,p2,p3,p4,p5,p6,p7,p8) \
MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \
_mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \
_mp[4] = (p5); _mp[5] = (p6); _mp[6] = (p7); _mp[7] = (p8); \ _mp[4] = (p5); _mp[5] = (p6); _mp[6] = (p7); _mp[7] = (p8); \
(cinfo)->err->msg_code = (code); \ (cinfo)->err->msg_code = (code); \
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
#define TRACEMSS(cinfo,lvl,code,str) \ #define TRACEMSS(cinfo,lvl,code,str) \
((cinfo)->err->msg_code = (code), \ ((cinfo)->err->msg_code = (code), \
strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
#endif /* JERROR_H */ #endif /* JERROR_H */

View File

@ -1,91 +1,91 @@
/* /*
* jinclude.h * jinclude.h
* *
* Copyright (C) 1991-1994, Thomas G. Lane. * Copyright (C) 1991-1994, Thomas G. Lane.
* This file is part of the Independent JPEG Group's software. * This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file. * For conditions of distribution and use, see the accompanying README file.
* *
* This file exists to provide a single place to fix any problems with * This file exists to provide a single place to fix any problems with
* including the wrong system include files. (Common problems are taken * including the wrong system include files. (Common problems are taken
* care of by the standard jconfig symbols, but on really weird systems * care of by the standard jconfig symbols, but on really weird systems
* you may have to edit this file.) * you may have to edit this file.)
* *
* NOTE: this file is NOT intended to be included by applications using the * NOTE: this file is NOT intended to be included by applications using the
* JPEG library. Most applications need only include jpeglib.h. * JPEG library. Most applications need only include jpeglib.h.
*/ */
/* Include auto-config file to find out which system include files we need. */ /* Include auto-config file to find out which system include files we need. */
#include "jconfig.h" /* auto configuration options */ #include "jconfig.h" /* auto configuration options */
#define JCONFIG_INCLUDED /* so that jpeglib.h doesn't do it again */ #define JCONFIG_INCLUDED /* so that jpeglib.h doesn't do it again */
/* /*
* We need the NULL macro and size_t typedef. * We need the NULL macro and size_t typedef.
* On an ANSI-conforming system it is sufficient to include <stddef.h>. * On an ANSI-conforming system it is sufficient to include <stddef.h>.
* Otherwise, we get them from <stdlib.h> or <stdio.h>; we may have to * Otherwise, we get them from <stdlib.h> or <stdio.h>; we may have to
* pull in <sys/types.h> as well. * pull in <sys/types.h> as well.
* Note that the core JPEG library does not require <stdio.h>; * Note that the core JPEG library does not require <stdio.h>;
* only the default error handler and data source/destination modules do. * only the default error handler and data source/destination modules do.
* But we must pull it in because of the references to FILE in jpeglib.h. * But we must pull it in because of the references to FILE in jpeglib.h.
* You can remove those references if you want to compile without <stdio.h>. * You can remove those references if you want to compile without <stdio.h>.
*/ */
#ifdef HAVE_STDDEF_H #ifdef HAVE_STDDEF_H
#include <stddef.h> #include <stddef.h>
#endif #endif
#ifdef HAVE_STDLIB_H #ifdef HAVE_STDLIB_H
#include <stdlib.h> #include <stdlib.h>
#endif #endif
#ifdef NEED_SYS_TYPES_H #ifdef NEED_SYS_TYPES_H
#include <sys/types.h> #include <sys/types.h>
#endif #endif
#include <stdio.h> #include <stdio.h>
/* /*
* We need memory copying and zeroing functions, plus strncpy(). * We need memory copying and zeroing functions, plus strncpy().
* ANSI and System V implementations declare these in <string.h>. * ANSI and System V implementations declare these in <string.h>.
* BSD doesn't have the mem() functions, but it does have bcopy()/bzero(). * BSD doesn't have the mem() functions, but it does have bcopy()/bzero().
* Some systems may declare memset and memcpy in <memory.h>. * Some systems may declare memset and memcpy in <memory.h>.
* *
* NOTE: we assume the size parameters to these functions are of type size_t. * NOTE: we assume the size parameters to these functions are of type size_t.
* Change the casts in these macros if not! * Change the casts in these macros if not!
*/ */
#ifdef NEED_BSD_STRINGS #ifdef NEED_BSD_STRINGS
#include <strings.h> #include <strings.h>
#define MEMZERO(target,size) bzero((void *)(target), (size_t)(size)) #define MEMZERO(target,size) bzero((void *)(target), (size_t)(size))
#define MEMCOPY(dest,src,size) bcopy((const void *)(src), (void *)(dest), (size_t)(size)) #define MEMCOPY(dest,src,size) bcopy((const void *)(src), (void *)(dest), (size_t)(size))
#else /* not BSD, assume ANSI/SysV string lib */ #else /* not BSD, assume ANSI/SysV string lib */
#include <string.h> #include <string.h>
#define MEMZERO(target,size) memset((void *)(target), 0, (size_t)(size)) #define MEMZERO(target,size) memset((void *)(target), 0, (size_t)(size))
#define MEMCOPY(dest,src,size) memcpy((void *)(dest), (const void *)(src), (size_t)(size)) #define MEMCOPY(dest,src,size) memcpy((void *)(dest), (const void *)(src), (size_t)(size))
#endif #endif
/* /*
* In ANSI C, and indeed any rational implementation, size_t is also the * In ANSI C, and indeed any rational implementation, size_t is also the
* type returned by sizeof(). However, it seems there are some irrational * type returned by sizeof(). However, it seems there are some irrational
* implementations out there, in which sizeof() returns an int even though * implementations out there, in which sizeof() returns an int even though
* size_t is defined as long or unsigned long. To ensure consistent results * size_t is defined as long or unsigned long. To ensure consistent results
* we always use this SIZEOF() macro in place of using sizeof() directly. * we always use this SIZEOF() macro in place of using sizeof() directly.
*/ */
#define SIZEOF(object) ((size_t) sizeof(object)) #define SIZEOF(object) ((size_t) sizeof(object))
/* /*
* The modules that use fread() and fwrite() always invoke them through * The modules that use fread() and fwrite() always invoke them through
* these macros. On some systems you may need to twiddle the argument casts. * these macros. On some systems you may need to twiddle the argument casts.
* CAUTION: argument order is different from underlying functions! * CAUTION: argument order is different from underlying functions!
*/ */
#define JFREAD(file,buf,sizeofbuf) \ #define JFREAD(file,buf,sizeofbuf) \
((size_t) fread((void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file))) ((size_t) fread((void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file)))
#define JFWRITE(file,buf,sizeofbuf) \ #define JFWRITE(file,buf,sizeofbuf) \
((size_t) fwrite((const void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file))) ((size_t) fwrite((const void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file)))

View File

@ -1,198 +1,198 @@
/* /*
* jmemsys.h * jmemsys.h
* *
* Copyright (C) 1992-1997, Thomas G. Lane. * Copyright (C) 1992-1997, Thomas G. Lane.
* This file is part of the Independent JPEG Group's software. * This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file. * For conditions of distribution and use, see the accompanying README file.
* *
* This include file defines the interface between the system-independent * This include file defines the interface between the system-independent
* and system-dependent portions of the JPEG memory manager. No other * and system-dependent portions of the JPEG memory manager. No other
* modules need include it. (The system-independent portion is jmemmgr.c; * modules need include it. (The system-independent portion is jmemmgr.c;
* there are several different versions of the system-dependent portion.) * there are several different versions of the system-dependent portion.)
* *
* This file works as-is for the system-dependent memory managers supplied * This file works as-is for the system-dependent memory managers supplied
* in the IJG distribution. You may need to modify it if you write a * in the IJG distribution. You may need to modify it if you write a
* custom memory manager. If system-dependent changes are needed in * custom memory manager. If system-dependent changes are needed in
* this file, the best method is to #ifdef them based on a configuration * this file, the best method is to #ifdef them based on a configuration
* symbol supplied in jconfig.h, as we have done with USE_MSDOS_MEMMGR * symbol supplied in jconfig.h, as we have done with USE_MSDOS_MEMMGR
* and USE_MAC_MEMMGR. * and USE_MAC_MEMMGR.
*/ */
/* Short forms of external names for systems with brain-damaged linkers. */ /* Short forms of external names for systems with brain-damaged linkers. */
#ifdef NEED_SHORT_EXTERNAL_NAMES #ifdef NEED_SHORT_EXTERNAL_NAMES
#define jpeg_get_small jGetSmall #define jpeg_get_small jGetSmall
#define jpeg_free_small jFreeSmall #define jpeg_free_small jFreeSmall
#define jpeg_get_large jGetLarge #define jpeg_get_large jGetLarge
#define jpeg_free_large jFreeLarge #define jpeg_free_large jFreeLarge
#define jpeg_mem_available jMemAvail #define jpeg_mem_available jMemAvail
#define jpeg_open_backing_store jOpenBackStore #define jpeg_open_backing_store jOpenBackStore
#define jpeg_mem_init jMemInit #define jpeg_mem_init jMemInit
#define jpeg_mem_term jMemTerm #define jpeg_mem_term jMemTerm
#endif /* NEED_SHORT_EXTERNAL_NAMES */ #endif /* NEED_SHORT_EXTERNAL_NAMES */
/* /*
* These two functions are used to allocate and release small chunks of * These two functions are used to allocate and release small chunks of
* memory. (Typically the total amount requested through jpeg_get_small is * memory. (Typically the total amount requested through jpeg_get_small is
* no more than 20K or so; this will be requested in chunks of a few K each.) * no more than 20K or so; this will be requested in chunks of a few K each.)
* Behavior should be the same as for the standard library functions malloc * Behavior should be the same as for the standard library functions malloc
* and free; in particular, jpeg_get_small must return NULL on failure. * and free; in particular, jpeg_get_small must return NULL on failure.
* On most systems, these ARE malloc and free. jpeg_free_small is passed the * On most systems, these ARE malloc and free. jpeg_free_small is passed the
* size of the object being freed, just in case it's needed. * size of the object being freed, just in case it's needed.
* On an 80x86 machine using small-data memory model, these manage near heap. * On an 80x86 machine using small-data memory model, these manage near heap.
*/ */
EXTERN(void *) jpeg_get_small JPP((j_common_ptr cinfo, size_t sizeofobject)); EXTERN(void *) jpeg_get_small JPP((j_common_ptr cinfo, size_t sizeofobject));
EXTERN(void) jpeg_free_small JPP((j_common_ptr cinfo, void * object, EXTERN(void) jpeg_free_small JPP((j_common_ptr cinfo, void * object,
size_t sizeofobject)); size_t sizeofobject));
/* /*
* These two functions are used to allocate and release large chunks of * These two functions are used to allocate and release large chunks of
* memory (up to the total free space designated by jpeg_mem_available). * memory (up to the total free space designated by jpeg_mem_available).
* The interface is the same as above, except that on an 80x86 machine, * The interface is the same as above, except that on an 80x86 machine,
* far pointers are used. On most other machines these are identical to * far pointers are used. On most other machines these are identical to
* the jpeg_get/free_small routines; but we keep them separate anyway, * the jpeg_get/free_small routines; but we keep them separate anyway,
* in case a different allocation strategy is desirable for large chunks. * in case a different allocation strategy is desirable for large chunks.
*/ */
EXTERN(void FAR *) jpeg_get_large JPP((j_common_ptr cinfo, EXTERN(void FAR *) jpeg_get_large JPP((j_common_ptr cinfo,
size_t sizeofobject)); size_t sizeofobject));
EXTERN(void) jpeg_free_large JPP((j_common_ptr cinfo, void FAR * object, EXTERN(void) jpeg_free_large JPP((j_common_ptr cinfo, void FAR * object,
size_t sizeofobject)); size_t sizeofobject));
/* /*
* The macro MAX_ALLOC_CHUNK designates the maximum number of bytes that may * The macro MAX_ALLOC_CHUNK designates the maximum number of bytes that may
* be requested in a single call to jpeg_get_large (and jpeg_get_small for that * be requested in a single call to jpeg_get_large (and jpeg_get_small for that
* matter, but that case should never come into play). This macro is needed * matter, but that case should never come into play). This macro is needed
* to model the 64Kb-segment-size limit of far addressing on 80x86 machines. * to model the 64Kb-segment-size limit of far addressing on 80x86 machines.
* On those machines, we expect that jconfig.h will provide a proper value. * On those machines, we expect that jconfig.h will provide a proper value.
* On machines with 32-bit flat address spaces, any large constant may be used. * On machines with 32-bit flat address spaces, any large constant may be used.
* *
* NB: jmemmgr.c expects that MAX_ALLOC_CHUNK will be representable as type * NB: jmemmgr.c expects that MAX_ALLOC_CHUNK will be representable as type
* size_t and will be a multiple of sizeof(align_type). * size_t and will be a multiple of sizeof(align_type).
*/ */
#ifndef MAX_ALLOC_CHUNK /* may be overridden in jconfig.h */ #ifndef MAX_ALLOC_CHUNK /* may be overridden in jconfig.h */
#define MAX_ALLOC_CHUNK 1000000000L #define MAX_ALLOC_CHUNK 1000000000L
#endif #endif
/* /*
* This routine computes the total space still available for allocation by * This routine computes the total space still available for allocation by
* jpeg_get_large. If more space than this is needed, backing store will be * jpeg_get_large. If more space than this is needed, backing store will be
* used. NOTE: any memory already allocated must not be counted. * used. NOTE: any memory already allocated must not be counted.
* *
* There is a minimum space requirement, corresponding to the minimum * There is a minimum space requirement, corresponding to the minimum
* feasible buffer sizes; jmemmgr.c will request that much space even if * feasible buffer sizes; jmemmgr.c will request that much space even if
* jpeg_mem_available returns zero. The maximum space needed, enough to hold * jpeg_mem_available returns zero. The maximum space needed, enough to hold
* all working storage in memory, is also passed in case it is useful. * all working storage in memory, is also passed in case it is useful.
* Finally, the total space already allocated is passed. If no better * Finally, the total space already allocated is passed. If no better
* method is available, cinfo->mem->max_memory_to_use - already_allocated * method is available, cinfo->mem->max_memory_to_use - already_allocated
* is often a suitable calculation. * is often a suitable calculation.
* *
* It is OK for jpeg_mem_available to underestimate the space available * It is OK for jpeg_mem_available to underestimate the space available
* (that'll just lead to more backing-store access than is really necessary). * (that'll just lead to more backing-store access than is really necessary).
* However, an overestimate will lead to failure. Hence it's wise to subtract * However, an overestimate will lead to failure. Hence it's wise to subtract
* a slop factor from the true available space. 5% should be enough. * a slop factor from the true available space. 5% should be enough.
* *
* On machines with lots of virtual memory, any large constant may be returned. * On machines with lots of virtual memory, any large constant may be returned.
* Conversely, zero may be returned to always use the minimum amount of memory. * Conversely, zero may be returned to always use the minimum amount of memory.
*/ */
EXTERN(long) jpeg_mem_available JPP((j_common_ptr cinfo, EXTERN(long) jpeg_mem_available JPP((j_common_ptr cinfo,
long min_bytes_needed, long min_bytes_needed,
long max_bytes_needed, long max_bytes_needed,
long already_allocated)); long already_allocated));
/* /*
* This structure holds whatever state is needed to access a single * This structure holds whatever state is needed to access a single
* backing-store object. The read/write/close method pointers are called * backing-store object. The read/write/close method pointers are called
* by jmemmgr.c to manipulate the backing-store object; all other fields * by jmemmgr.c to manipulate the backing-store object; all other fields
* are private to the system-dependent backing store routines. * are private to the system-dependent backing store routines.
*/ */
#define TEMP_NAME_LENGTH 64 /* max length of a temporary file's name */ #define TEMP_NAME_LENGTH 64 /* max length of a temporary file's name */
#ifdef USE_MSDOS_MEMMGR /* DOS-specific junk */ #ifdef USE_MSDOS_MEMMGR /* DOS-specific junk */
typedef unsigned short XMSH; /* type of extended-memory handles */ typedef unsigned short XMSH; /* type of extended-memory handles */
typedef unsigned short EMSH; /* type of expanded-memory handles */ typedef unsigned short EMSH; /* type of expanded-memory handles */
typedef union { typedef union {
short file_handle; /* DOS file handle if it's a temp file */ short file_handle; /* DOS file handle if it's a temp file */
XMSH xms_handle; /* handle if it's a chunk of XMS */ XMSH xms_handle; /* handle if it's a chunk of XMS */
EMSH ems_handle; /* handle if it's a chunk of EMS */ EMSH ems_handle; /* handle if it's a chunk of EMS */
} handle_union; } handle_union;
#endif /* USE_MSDOS_MEMMGR */ #endif /* USE_MSDOS_MEMMGR */
#ifdef USE_MAC_MEMMGR /* Mac-specific junk */ #ifdef USE_MAC_MEMMGR /* Mac-specific junk */
#include <Files.h> #include <Files.h>
#endif /* USE_MAC_MEMMGR */ #endif /* USE_MAC_MEMMGR */
typedef struct backing_store_struct * backing_store_ptr; typedef struct backing_store_struct * backing_store_ptr;
typedef struct backing_store_struct { typedef struct backing_store_struct {
/* Methods for reading/writing/closing this backing-store object */ /* Methods for reading/writing/closing this backing-store object */
JMETHOD(void, read_backing_store, (j_common_ptr cinfo, JMETHOD(void, read_backing_store, (j_common_ptr cinfo,
backing_store_ptr info, backing_store_ptr info,
void FAR * buffer_address, void FAR * buffer_address,
long file_offset, long byte_count)); long file_offset, long byte_count));
JMETHOD(void, write_backing_store, (j_common_ptr cinfo, JMETHOD(void, write_backing_store, (j_common_ptr cinfo,
backing_store_ptr info, backing_store_ptr info,
void FAR * buffer_address, void FAR * buffer_address,
long file_offset, long byte_count)); long file_offset, long byte_count));
JMETHOD(void, close_backing_store, (j_common_ptr cinfo, JMETHOD(void, close_backing_store, (j_common_ptr cinfo,
backing_store_ptr info)); backing_store_ptr info));
/* Private fields for system-dependent backing-store management */ /* Private fields for system-dependent backing-store management */
#ifdef USE_MSDOS_MEMMGR #ifdef USE_MSDOS_MEMMGR
/* For the MS-DOS manager (jmemdos.c), we need: */ /* For the MS-DOS manager (jmemdos.c), we need: */
handle_union handle; /* reference to backing-store storage object */ handle_union handle; /* reference to backing-store storage object */
char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */ char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */
#else #else
#ifdef USE_MAC_MEMMGR #ifdef USE_MAC_MEMMGR
/* For the Mac manager (jmemmac.c), we need: */ /* For the Mac manager (jmemmac.c), we need: */
short temp_file; /* file reference number to temp file */ short temp_file; /* file reference number to temp file */
FSSpec tempSpec; /* the FSSpec for the temp file */ FSSpec tempSpec; /* the FSSpec for the temp file */
char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */ char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */
#else #else
/* For a typical implementation with temp files, we need: */ /* For a typical implementation with temp files, we need: */
FILE * temp_file; /* stdio reference to temp file */ FILE * temp_file; /* stdio reference to temp file */
char temp_name[TEMP_NAME_LENGTH]; /* name of temp file */ char temp_name[TEMP_NAME_LENGTH]; /* name of temp file */
#endif #endif
#endif #endif
} backing_store_info; } backing_store_info;
/* /*
* Initial opening of a backing-store object. This must fill in the * Initial opening of a backing-store object. This must fill in the
* read/write/close pointers in the object. The read/write routines * read/write/close pointers in the object. The read/write routines
* may take an error exit if the specified maximum file size is exceeded. * may take an error exit if the specified maximum file size is exceeded.
* (If jpeg_mem_available always returns a large value, this routine can * (If jpeg_mem_available always returns a large value, this routine can
* just take an error exit.) * just take an error exit.)
*/ */
EXTERN(void) jpeg_open_backing_store JPP((j_common_ptr cinfo, EXTERN(void) jpeg_open_backing_store JPP((j_common_ptr cinfo,
backing_store_ptr info, backing_store_ptr info,
long total_bytes_needed)); long total_bytes_needed));
/* /*
* These routines take care of any system-dependent initialization and * These routines take care of any system-dependent initialization and
* cleanup required. jpeg_mem_init will be called before anything is * cleanup required. jpeg_mem_init will be called before anything is
* allocated (and, therefore, nothing in cinfo is of use except the error * allocated (and, therefore, nothing in cinfo is of use except the error
* manager pointer). It should return a suitable default value for * manager pointer). It should return a suitable default value for
* max_memory_to_use; this may subsequently be overridden by the surrounding * max_memory_to_use; this may subsequently be overridden by the surrounding
* application. (Note that max_memory_to_use is only important if * application. (Note that max_memory_to_use is only important if
* jpeg_mem_available chooses to consult it ... no one else will.) * jpeg_mem_available chooses to consult it ... no one else will.)
* jpeg_mem_term may assume that all requested memory has been freed and that * jpeg_mem_term may assume that all requested memory has been freed and that
* all opened backing-store objects have been closed. * all opened backing-store objects have been closed.
*/ */
EXTERN(long) jpeg_mem_init JPP((j_common_ptr cinfo)); EXTERN(long) jpeg_mem_init JPP((j_common_ptr cinfo));
EXTERN(void) jpeg_mem_term JPP((j_common_ptr cinfo)); EXTERN(void) jpeg_mem_term JPP((j_common_ptr cinfo));

View File

@ -1,371 +1,371 @@
/* /*
* jmorecfg.h * jmorecfg.h
* *
* Copyright (C) 1991-1997, Thomas G. Lane. * Copyright (C) 1991-1997, Thomas G. Lane.
* Modified 1997-2009 by Guido Vollbeding. * Modified 1997-2009 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software. * This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file. * For conditions of distribution and use, see the accompanying README file.
* *
* This file contains additional configuration options that customize the * This file contains additional configuration options that customize the
* JPEG software for special applications or support machine-dependent * JPEG software for special applications or support machine-dependent
* optimizations. Most users will not need to touch this file. * optimizations. Most users will not need to touch this file.
*/ */
/* /*
* Define BITS_IN_JSAMPLE as either * Define BITS_IN_JSAMPLE as either
* 8 for 8-bit sample values (the usual setting) * 8 for 8-bit sample values (the usual setting)
* 12 for 12-bit sample values * 12 for 12-bit sample values
* Only 8 and 12 are legal data precisions for lossy JPEG according to the * Only 8 and 12 are legal data precisions for lossy JPEG according to the
* JPEG standard, and the IJG code does not support anything else! * JPEG standard, and the IJG code does not support anything else!
* We do not support run-time selection of data precision, sorry. * We do not support run-time selection of data precision, sorry.
*/ */
#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */ #define BITS_IN_JSAMPLE 8 /* use 8 or 12 */
/* /*
* Maximum number of components (color channels) allowed in JPEG image. * Maximum number of components (color channels) allowed in JPEG image.
* To meet the letter of the JPEG spec, set this to 255. However, darn * To meet the letter of the JPEG spec, set this to 255. However, darn
* few applications need more than 4 channels (maybe 5 for CMYK + alpha * few applications need more than 4 channels (maybe 5 for CMYK + alpha
* mask). We recommend 10 as a reasonable compromise; use 4 if you are * mask). We recommend 10 as a reasonable compromise; use 4 if you are
* really short on memory. (Each allowed component costs a hundred or so * really short on memory. (Each allowed component costs a hundred or so
* bytes of storage, whether actually used in an image or not.) * bytes of storage, whether actually used in an image or not.)
*/ */
#define MAX_COMPONENTS 10 /* maximum number of image components */ #define MAX_COMPONENTS 10 /* maximum number of image components */
/* /*
* Basic data types. * Basic data types.
* You may need to change these if you have a machine with unusual data * You may need to change these if you have a machine with unusual data
* type sizes; for example, "char" not 8 bits, "short" not 16 bits, * type sizes; for example, "char" not 8 bits, "short" not 16 bits,
* or "long" not 32 bits. We don't care whether "int" is 16 or 32 bits, * or "long" not 32 bits. We don't care whether "int" is 16 or 32 bits,
* but it had better be at least 16. * but it had better be at least 16.
*/ */
/* Representation of a single sample (pixel element value). /* Representation of a single sample (pixel element value).
* We frequently allocate large arrays of these, so it's important to keep * We frequently allocate large arrays of these, so it's important to keep
* them small. But if you have memory to burn and access to char or short * them small. But if you have memory to burn and access to char or short
* arrays is very slow on your hardware, you might want to change these. * arrays is very slow on your hardware, you might want to change these.
*/ */
#if BITS_IN_JSAMPLE == 8 #if BITS_IN_JSAMPLE == 8
/* JSAMPLE should be the smallest type that will hold the values 0..255. /* JSAMPLE should be the smallest type that will hold the values 0..255.
* You can use a signed char by having GETJSAMPLE mask it with 0xFF. * You can use a signed char by having GETJSAMPLE mask it with 0xFF.
*/ */
#ifdef HAVE_UNSIGNED_CHAR #ifdef HAVE_UNSIGNED_CHAR
typedef unsigned char JSAMPLE; typedef unsigned char JSAMPLE;
#define GETJSAMPLE(value) ((int) (value)) #define GETJSAMPLE(value) ((int) (value))
#else /* not HAVE_UNSIGNED_CHAR */ #else /* not HAVE_UNSIGNED_CHAR */
typedef char JSAMPLE; typedef char JSAMPLE;
#ifdef CHAR_IS_UNSIGNED #ifdef CHAR_IS_UNSIGNED
#define GETJSAMPLE(value) ((int) (value)) #define GETJSAMPLE(value) ((int) (value))
#else #else
#define GETJSAMPLE(value) ((int) (value) & 0xFF) #define GETJSAMPLE(value) ((int) (value) & 0xFF)
#endif /* CHAR_IS_UNSIGNED */ #endif /* CHAR_IS_UNSIGNED */
#endif /* HAVE_UNSIGNED_CHAR */ #endif /* HAVE_UNSIGNED_CHAR */
#define MAXJSAMPLE 255 #define MAXJSAMPLE 255
#define CENTERJSAMPLE 128 #define CENTERJSAMPLE 128
#endif /* BITS_IN_JSAMPLE == 8 */ #endif /* BITS_IN_JSAMPLE == 8 */
#if BITS_IN_JSAMPLE == 12 #if BITS_IN_JSAMPLE == 12
/* JSAMPLE should be the smallest type that will hold the values 0..4095. /* JSAMPLE should be the smallest type that will hold the values 0..4095.
* On nearly all machines "short" will do nicely. * On nearly all machines "short" will do nicely.
*/ */
typedef short JSAMPLE; typedef short JSAMPLE;
#define GETJSAMPLE(value) ((int) (value)) #define GETJSAMPLE(value) ((int) (value))
#define MAXJSAMPLE 4095 #define MAXJSAMPLE 4095
#define CENTERJSAMPLE 2048 #define CENTERJSAMPLE 2048
#endif /* BITS_IN_JSAMPLE == 12 */ #endif /* BITS_IN_JSAMPLE == 12 */
/* Representation of a DCT frequency coefficient. /* Representation of a DCT frequency coefficient.
* This should be a signed value of at least 16 bits; "short" is usually OK. * This should be a signed value of at least 16 bits; "short" is usually OK.
* Again, we allocate large arrays of these, but you can change to int * Again, we allocate large arrays of these, but you can change to int
* if you have memory to burn and "short" is really slow. * if you have memory to burn and "short" is really slow.
*/ */
typedef short JCOEF; typedef short JCOEF;
/* Compressed datastreams are represented as arrays of JOCTET. /* Compressed datastreams are represented as arrays of JOCTET.
* These must be EXACTLY 8 bits wide, at least once they are written to * These must be EXACTLY 8 bits wide, at least once they are written to
* external storage. Note that when using the stdio data source/destination * external storage. Note that when using the stdio data source/destination
* managers, this is also the data type passed to fread/fwrite. * managers, this is also the data type passed to fread/fwrite.
*/ */
#ifdef HAVE_UNSIGNED_CHAR #ifdef HAVE_UNSIGNED_CHAR
typedef unsigned char JOCTET; typedef unsigned char JOCTET;
#define GETJOCTET(value) (value) #define GETJOCTET(value) (value)
#else /* not HAVE_UNSIGNED_CHAR */ #else /* not HAVE_UNSIGNED_CHAR */
typedef char JOCTET; typedef char JOCTET;
#ifdef CHAR_IS_UNSIGNED #ifdef CHAR_IS_UNSIGNED
#define GETJOCTET(value) (value) #define GETJOCTET(value) (value)
#else #else
#define GETJOCTET(value) ((value) & 0xFF) #define GETJOCTET(value) ((value) & 0xFF)
#endif /* CHAR_IS_UNSIGNED */ #endif /* CHAR_IS_UNSIGNED */
#endif /* HAVE_UNSIGNED_CHAR */ #endif /* HAVE_UNSIGNED_CHAR */
/* These typedefs are used for various table entries and so forth. /* These typedefs are used for various table entries and so forth.
* They must be at least as wide as specified; but making them too big * They must be at least as wide as specified; but making them too big
* won't cost a huge amount of memory, so we don't provide special * won't cost a huge amount of memory, so we don't provide special
* extraction code like we did for JSAMPLE. (In other words, these * extraction code like we did for JSAMPLE. (In other words, these
* typedefs live at a different point on the speed/space tradeoff curve.) * typedefs live at a different point on the speed/space tradeoff curve.)
*/ */
/* UINT8 must hold at least the values 0..255. */ /* UINT8 must hold at least the values 0..255. */
#ifdef HAVE_UNSIGNED_CHAR #ifdef HAVE_UNSIGNED_CHAR
typedef unsigned char UINT8; typedef unsigned char UINT8;
#else /* not HAVE_UNSIGNED_CHAR */ #else /* not HAVE_UNSIGNED_CHAR */
#ifdef CHAR_IS_UNSIGNED #ifdef CHAR_IS_UNSIGNED
typedef char UINT8; typedef char UINT8;
#else /* not CHAR_IS_UNSIGNED */ #else /* not CHAR_IS_UNSIGNED */
typedef short UINT8; typedef short UINT8;
#endif /* CHAR_IS_UNSIGNED */ #endif /* CHAR_IS_UNSIGNED */
#endif /* HAVE_UNSIGNED_CHAR */ #endif /* HAVE_UNSIGNED_CHAR */
/* UINT16 must hold at least the values 0..65535. */ /* UINT16 must hold at least the values 0..65535. */
#ifdef HAVE_UNSIGNED_SHORT #ifdef HAVE_UNSIGNED_SHORT
typedef unsigned short UINT16; typedef unsigned short UINT16;
#else /* not HAVE_UNSIGNED_SHORT */ #else /* not HAVE_UNSIGNED_SHORT */
typedef unsigned int UINT16; typedef unsigned int UINT16;
#endif /* HAVE_UNSIGNED_SHORT */ #endif /* HAVE_UNSIGNED_SHORT */
/* INT16 must hold at least the values -32768..32767. */ /* INT16 must hold at least the values -32768..32767. */
#ifndef XMD_H /* X11/xmd.h correctly defines INT16 */ #ifndef XMD_H /* X11/xmd.h correctly defines INT16 */
typedef short INT16; typedef short INT16;
#endif #endif
/* INT32 must hold at least signed 32-bit values. */ /* INT32 must hold at least signed 32-bit values. */
#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ #ifndef XMD_H /* X11/xmd.h correctly defines INT32 */
#ifndef _BASETSD_H_ /* Microsoft defines it in basetsd.h */ #ifndef _BASETSD_H_ /* Microsoft defines it in basetsd.h */
#ifndef _BASETSD_H /* MinGW is slightly different */ #ifndef _BASETSD_H /* MinGW is slightly different */
#ifndef QGLOBAL_H /* Qt defines it in qglobal.h */ #ifndef QGLOBAL_H /* Qt defines it in qglobal.h */
typedef long INT32; typedef long INT32;
#endif #endif
#endif #endif
#endif #endif
#endif #endif
/* Datatype used for image dimensions. The JPEG standard only supports /* Datatype used for image dimensions. The JPEG standard only supports
* images up to 64K*64K due to 16-bit fields in SOF markers. Therefore * images up to 64K*64K due to 16-bit fields in SOF markers. Therefore
* "unsigned int" is sufficient on all machines. However, if you need to * "unsigned int" is sufficient on all machines. However, if you need to
* handle larger images and you don't mind deviating from the spec, you * handle larger images and you don't mind deviating from the spec, you
* can change this datatype. * can change this datatype.
*/ */
typedef unsigned int JDIMENSION; typedef unsigned int JDIMENSION;
#define JPEG_MAX_DIMENSION 65500L /* a tad under 64K to prevent overflows */ #define JPEG_MAX_DIMENSION 65500L /* a tad under 64K to prevent overflows */
/* These macros are used in all function definitions and extern declarations. /* These macros are used in all function definitions and extern declarations.
* You could modify them if you need to change function linkage conventions; * You could modify them if you need to change function linkage conventions;
* in particular, you'll need to do that to make the library a Windows DLL. * in particular, you'll need to do that to make the library a Windows DLL.
* Another application is to make all functions global for use with debuggers * Another application is to make all functions global for use with debuggers
* or code profilers that require it. * or code profilers that require it.
*/ */
/* a function called through method pointers: */ /* a function called through method pointers: */
#define METHODDEF(type) static type #define METHODDEF(type) static type
/* a function used only in its module: */ /* a function used only in its module: */
#define LOCAL(type) static type #define LOCAL(type) static type
/* a function referenced thru EXTERNs: */ /* a function referenced thru EXTERNs: */
#define GLOBAL(type) type #define GLOBAL(type) type
/* a reference to a GLOBAL function: */ /* a reference to a GLOBAL function: */
#define EXTERN(type) extern type #define EXTERN(type) extern type
/* This macro is used to declare a "method", that is, a function pointer. /* This macro is used to declare a "method", that is, a function pointer.
* We want to supply prototype parameters if the compiler can cope. * We want to supply prototype parameters if the compiler can cope.
* Note that the arglist parameter must be parenthesized! * Note that the arglist parameter must be parenthesized!
* Again, you can customize this if you need special linkage keywords. * Again, you can customize this if you need special linkage keywords.
*/ */
#ifdef HAVE_PROTOTYPES #ifdef HAVE_PROTOTYPES
#define JMETHOD(type,methodname,arglist) type (*methodname) arglist #define JMETHOD(type,methodname,arglist) type (*methodname) arglist
#else #else
#define JMETHOD(type,methodname,arglist) type (*methodname) () #define JMETHOD(type,methodname,arglist) type (*methodname) ()
#endif #endif
/* Here is the pseudo-keyword for declaring pointers that must be "far" /* Here is the pseudo-keyword for declaring pointers that must be "far"
* on 80x86 machines. Most of the specialized coding for 80x86 is handled * on 80x86 machines. Most of the specialized coding for 80x86 is handled
* by just saying "FAR *" where such a pointer is needed. In a few places * by just saying "FAR *" where such a pointer is needed. In a few places
* explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol. * explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol.
*/ */
#ifndef FAR #ifndef FAR
#ifdef NEED_FAR_POINTERS #ifdef NEED_FAR_POINTERS
#define FAR far #define FAR far
#else #else
#define FAR #define FAR
#endif #endif
#endif #endif
/* /*
* On a few systems, type boolean and/or its values FALSE, TRUE may appear * On a few systems, type boolean and/or its values FALSE, TRUE may appear
* in standard header files. Or you may have conflicts with application- * in standard header files. Or you may have conflicts with application-
* specific header files that you want to include together with these files. * specific header files that you want to include together with these files.
* Defining HAVE_BOOLEAN before including jpeglib.h should make it work. * Defining HAVE_BOOLEAN before including jpeglib.h should make it work.
*/ */
#ifndef HAVE_BOOLEAN #ifndef HAVE_BOOLEAN
typedef int boolean; typedef int boolean;
#endif #endif
#ifndef FALSE /* in case these macros already exist */ #ifndef FALSE /* in case these macros already exist */
#define FALSE 0 /* values of boolean */ #define FALSE 0 /* values of boolean */
#endif #endif
#ifndef TRUE #ifndef TRUE
#define TRUE 1 #define TRUE 1
#endif #endif
/* /*
* The remaining options affect code selection within the JPEG library, * The remaining options affect code selection within the JPEG library,
* but they don't need to be visible to most applications using the library. * but they don't need to be visible to most applications using the library.
* To minimize application namespace pollution, the symbols won't be * To minimize application namespace pollution, the symbols won't be
* defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined. * defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined.
*/ */
#ifdef JPEG_INTERNALS #ifdef JPEG_INTERNALS
#define JPEG_INTERNAL_OPTIONS #define JPEG_INTERNAL_OPTIONS
#endif #endif
#ifdef JPEG_INTERNAL_OPTIONS #ifdef JPEG_INTERNAL_OPTIONS
/* /*
* These defines indicate whether to include various optional functions. * These defines indicate whether to include various optional functions.
* Undefining some of these symbols will produce a smaller but less capable * Undefining some of these symbols will produce a smaller but less capable
* library. Note that you can leave certain source files out of the * library. Note that you can leave certain source files out of the
* compilation/linking process if you've #undef'd the corresponding symbols. * compilation/linking process if you've #undef'd the corresponding symbols.
* (You may HAVE to do that if your compiler doesn't like null source files.) * (You may HAVE to do that if your compiler doesn't like null source files.)
*/ */
/* Capability options common to encoder and decoder: */ /* Capability options common to encoder and decoder: */
#define DCT_ISLOW_SUPPORTED /* slow but accurate integer algorithm */ #define DCT_ISLOW_SUPPORTED /* slow but accurate integer algorithm */
#define DCT_IFAST_SUPPORTED /* faster, less accurate integer method */ #define DCT_IFAST_SUPPORTED /* faster, less accurate integer method */
#define DCT_FLOAT_SUPPORTED /* floating-point: accurate, fast on fast HW */ #define DCT_FLOAT_SUPPORTED /* floating-point: accurate, fast on fast HW */
/* Encoder capability options: */ /* Encoder capability options: */
#define C_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */ #define C_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */
#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ #define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
#define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ #define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/
#define DCT_SCALING_SUPPORTED /* Input rescaling via DCT? (Requires DCT_ISLOW)*/ #define DCT_SCALING_SUPPORTED /* Input rescaling via DCT? (Requires DCT_ISLOW)*/
#define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */ #define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */
/* Note: if you selected 12-bit data precision, it is dangerous to turn off /* Note: if you selected 12-bit data precision, it is dangerous to turn off
* ENTROPY_OPT_SUPPORTED. The standard Huffman tables are only good for 8-bit * ENTROPY_OPT_SUPPORTED. The standard Huffman tables are only good for 8-bit
* precision, so jchuff.c normally uses entropy optimization to compute * precision, so jchuff.c normally uses entropy optimization to compute
* usable tables for higher precision. If you don't want to do optimization, * usable tables for higher precision. If you don't want to do optimization,
* you'll have to supply different default Huffman tables. * you'll have to supply different default Huffman tables.
* The exact same statements apply for progressive JPEG: the default tables * The exact same statements apply for progressive JPEG: the default tables
* don't work for progressive mode. (This may get fixed, however.) * don't work for progressive mode. (This may get fixed, however.)
*/ */
#define INPUT_SMOOTHING_SUPPORTED /* Input image smoothing option? */ #define INPUT_SMOOTHING_SUPPORTED /* Input image smoothing option? */
/* Decoder capability options: */ /* Decoder capability options: */
#define D_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */ #define D_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */
#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ #define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
#define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ #define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/
#define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */ #define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */
#define SAVE_MARKERS_SUPPORTED /* jpeg_save_markers() needed? */ #define SAVE_MARKERS_SUPPORTED /* jpeg_save_markers() needed? */
#define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing? (Progressive only) */ #define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing? (Progressive only) */
#undef UPSAMPLE_SCALING_SUPPORTED /* Output rescaling at upsample stage? */ #undef UPSAMPLE_SCALING_SUPPORTED /* Output rescaling at upsample stage? */
#define UPSAMPLE_MERGING_SUPPORTED /* Fast path for sloppy upsampling? */ #define UPSAMPLE_MERGING_SUPPORTED /* Fast path for sloppy upsampling? */
#define QUANT_1PASS_SUPPORTED /* 1-pass color quantization? */ #define QUANT_1PASS_SUPPORTED /* 1-pass color quantization? */
#define QUANT_2PASS_SUPPORTED /* 2-pass color quantization? */ #define QUANT_2PASS_SUPPORTED /* 2-pass color quantization? */
/* more capability options later, no doubt */ /* more capability options later, no doubt */
/* /*
* Ordering of RGB data in scanlines passed to or from the application. * Ordering of RGB data in scanlines passed to or from the application.
* If your application wants to deal with data in the order B,G,R, just * If your application wants to deal with data in the order B,G,R, just
* change these macros. You can also deal with formats such as R,G,B,X * change these macros. You can also deal with formats such as R,G,B,X
* (one extra byte per pixel) by changing RGB_PIXELSIZE. Note that changing * (one extra byte per pixel) by changing RGB_PIXELSIZE. Note that changing
* the offsets will also change the order in which colormap data is organized. * the offsets will also change the order in which colormap data is organized.
* RESTRICTIONS: * RESTRICTIONS:
* 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats. * 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats.
* 2. These macros only affect RGB<=>YCbCr color conversion, so they are not * 2. These macros only affect RGB<=>YCbCr color conversion, so they are not
* useful if you are using JPEG color spaces other than YCbCr or grayscale. * useful if you are using JPEG color spaces other than YCbCr or grayscale.
* 3. The color quantizer modules will not behave desirably if RGB_PIXELSIZE * 3. The color quantizer modules will not behave desirably if RGB_PIXELSIZE
* is not 3 (they don't understand about dummy color components!). So you * is not 3 (they don't understand about dummy color components!). So you
* can't use color quantization if you change that value. * can't use color quantization if you change that value.
*/ */
#define RGB_RED 0 /* Offset of Red in an RGB scanline element */ #define RGB_RED 0 /* Offset of Red in an RGB scanline element */
#define RGB_GREEN 1 /* Offset of Green */ #define RGB_GREEN 1 /* Offset of Green */
#define RGB_BLUE 2 /* Offset of Blue */ #define RGB_BLUE 2 /* Offset of Blue */
#define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */ #define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */
/* Definitions for speed-related optimizations. */ /* Definitions for speed-related optimizations. */
/* If your compiler supports inline functions, define INLINE /* If your compiler supports inline functions, define INLINE
* as the inline keyword; otherwise define it as empty. * as the inline keyword; otherwise define it as empty.
*/ */
#ifndef INLINE #ifndef INLINE
#ifdef __GNUC__ /* for instance, GNU C knows about inline */ #ifdef __GNUC__ /* for instance, GNU C knows about inline */
#define INLINE __inline__ #define INLINE __inline__
#endif #endif
#ifndef INLINE #ifndef INLINE
#define INLINE /* default is to define it as empty */ #define INLINE /* default is to define it as empty */
#endif #endif
#endif #endif
/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying /* On some machines (notably 68000 series) "int" is 32 bits, but multiplying
* two 16-bit shorts is faster than multiplying two ints. Define MULTIPLIER * two 16-bit shorts is faster than multiplying two ints. Define MULTIPLIER
* as short on such a machine. MULTIPLIER must be at least 16 bits wide. * as short on such a machine. MULTIPLIER must be at least 16 bits wide.
*/ */
#ifndef MULTIPLIER #ifndef MULTIPLIER
#define MULTIPLIER int /* type for fastest integer multiply */ #define MULTIPLIER int /* type for fastest integer multiply */
#endif #endif
/* FAST_FLOAT should be either float or double, whichever is done faster /* FAST_FLOAT should be either float or double, whichever is done faster
* by your compiler. (Note that this type is only used in the floating point * by your compiler. (Note that this type is only used in the floating point
* DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.) * DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.)
* Typically, float is faster in ANSI C compilers, while double is faster in * Typically, float is faster in ANSI C compilers, while double is faster in
* pre-ANSI compilers (because they insist on converting to double anyway). * pre-ANSI compilers (because they insist on converting to double anyway).
* The code below therefore chooses float if we have ANSI-style prototypes. * The code below therefore chooses float if we have ANSI-style prototypes.
*/ */
#ifndef FAST_FLOAT #ifndef FAST_FLOAT
#ifdef HAVE_PROTOTYPES #ifdef HAVE_PROTOTYPES
#define FAST_FLOAT float #define FAST_FLOAT float
#else #else
#define FAST_FLOAT double #define FAST_FLOAT double
#endif #endif
#endif #endif
#endif /* JPEG_INTERNAL_OPTIONS */ #endif /* JPEG_INTERNAL_OPTIONS */

View File

@ -1,407 +1,407 @@
/* /*
* jpegint.h * jpegint.h
* *
* Copyright (C) 1991-1997, Thomas G. Lane. * Copyright (C) 1991-1997, Thomas G. Lane.
* Modified 1997-2009 by Guido Vollbeding. * Modified 1997-2009 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software. * This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file. * For conditions of distribution and use, see the accompanying README file.
* *
* This file provides common declarations for the various JPEG modules. * This file provides common declarations for the various JPEG modules.
* These declarations are considered internal to the JPEG library; most * These declarations are considered internal to the JPEG library; most
* applications using the library shouldn't need to include this file. * applications using the library shouldn't need to include this file.
*/ */
/* Declarations for both compression & decompression */ /* Declarations for both compression & decompression */
typedef enum { /* Operating modes for buffer controllers */ typedef enum { /* Operating modes for buffer controllers */
JBUF_PASS_THRU, /* Plain stripwise operation */ JBUF_PASS_THRU, /* Plain stripwise operation */
/* Remaining modes require a full-image buffer to have been created */ /* Remaining modes require a full-image buffer to have been created */
JBUF_SAVE_SOURCE, /* Run source subobject only, save output */ JBUF_SAVE_SOURCE, /* Run source subobject only, save output */
JBUF_CRANK_DEST, /* Run dest subobject only, using saved data */ JBUF_CRANK_DEST, /* Run dest subobject only, using saved data */
JBUF_SAVE_AND_PASS /* Run both subobjects, save output */ JBUF_SAVE_AND_PASS /* Run both subobjects, save output */
} J_BUF_MODE; } J_BUF_MODE;
/* Values of global_state field (jdapi.c has some dependencies on ordering!) */ /* Values of global_state field (jdapi.c has some dependencies on ordering!) */
#define CSTATE_START 100 /* after create_compress */ #define CSTATE_START 100 /* after create_compress */
#define CSTATE_SCANNING 101 /* start_compress done, write_scanlines OK */ #define CSTATE_SCANNING 101 /* start_compress done, write_scanlines OK */
#define CSTATE_RAW_OK 102 /* start_compress done, write_raw_data OK */ #define CSTATE_RAW_OK 102 /* start_compress done, write_raw_data OK */
#define CSTATE_WRCOEFS 103 /* jpeg_write_coefficients done */ #define CSTATE_WRCOEFS 103 /* jpeg_write_coefficients done */
#define DSTATE_START 200 /* after create_decompress */ #define DSTATE_START 200 /* after create_decompress */
#define DSTATE_INHEADER 201 /* reading header markers, no SOS yet */ #define DSTATE_INHEADER 201 /* reading header markers, no SOS yet */
#define DSTATE_READY 202 /* found SOS, ready for start_decompress */ #define DSTATE_READY 202 /* found SOS, ready for start_decompress */
#define DSTATE_PRELOAD 203 /* reading multiscan file in start_decompress*/ #define DSTATE_PRELOAD 203 /* reading multiscan file in start_decompress*/
#define DSTATE_PRESCAN 204 /* performing dummy pass for 2-pass quant */ #define DSTATE_PRESCAN 204 /* performing dummy pass for 2-pass quant */
#define DSTATE_SCANNING 205 /* start_decompress done, read_scanlines OK */ #define DSTATE_SCANNING 205 /* start_decompress done, read_scanlines OK */
#define DSTATE_RAW_OK 206 /* start_decompress done, read_raw_data OK */ #define DSTATE_RAW_OK 206 /* start_decompress done, read_raw_data OK */
#define DSTATE_BUFIMAGE 207 /* expecting jpeg_start_output */ #define DSTATE_BUFIMAGE 207 /* expecting jpeg_start_output */
#define DSTATE_BUFPOST 208 /* looking for SOS/EOI in jpeg_finish_output */ #define DSTATE_BUFPOST 208 /* looking for SOS/EOI in jpeg_finish_output */
#define DSTATE_RDCOEFS 209 /* reading file in jpeg_read_coefficients */ #define DSTATE_RDCOEFS 209 /* reading file in jpeg_read_coefficients */
#define DSTATE_STOPPING 210 /* looking for EOI in jpeg_finish_decompress */ #define DSTATE_STOPPING 210 /* looking for EOI in jpeg_finish_decompress */
/* Declarations for compression modules */ /* Declarations for compression modules */
/* Master control module */ /* Master control module */
struct jpeg_comp_master { struct jpeg_comp_master {
JMETHOD(void, prepare_for_pass, (j_compress_ptr cinfo)); JMETHOD(void, prepare_for_pass, (j_compress_ptr cinfo));
JMETHOD(void, pass_startup, (j_compress_ptr cinfo)); JMETHOD(void, pass_startup, (j_compress_ptr cinfo));
JMETHOD(void, finish_pass, (j_compress_ptr cinfo)); JMETHOD(void, finish_pass, (j_compress_ptr cinfo));
/* State variables made visible to other modules */ /* State variables made visible to other modules */
boolean call_pass_startup; /* True if pass_startup must be called */ boolean call_pass_startup; /* True if pass_startup must be called */
boolean is_last_pass; /* True during last pass */ boolean is_last_pass; /* True during last pass */
}; };
/* Main buffer control (downsampled-data buffer) */ /* Main buffer control (downsampled-data buffer) */
struct jpeg_c_main_controller { struct jpeg_c_main_controller {
JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
JMETHOD(void, process_data, (j_compress_ptr cinfo, JMETHOD(void, process_data, (j_compress_ptr cinfo,
JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
JDIMENSION in_rows_avail)); JDIMENSION in_rows_avail));
}; };
/* Compression preprocessing (downsampling input buffer control) */ /* Compression preprocessing (downsampling input buffer control) */
struct jpeg_c_prep_controller { struct jpeg_c_prep_controller {
JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
JMETHOD(void, pre_process_data, (j_compress_ptr cinfo, JMETHOD(void, pre_process_data, (j_compress_ptr cinfo,
JSAMPARRAY input_buf, JSAMPARRAY input_buf,
JDIMENSION *in_row_ctr, JDIMENSION *in_row_ctr,
JDIMENSION in_rows_avail, JDIMENSION in_rows_avail,
JSAMPIMAGE output_buf, JSAMPIMAGE output_buf,
JDIMENSION *out_row_group_ctr, JDIMENSION *out_row_group_ctr,
JDIMENSION out_row_groups_avail)); JDIMENSION out_row_groups_avail));
}; };
/* Coefficient buffer control */ /* Coefficient buffer control */
struct jpeg_c_coef_controller { struct jpeg_c_coef_controller {
JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
JMETHOD(boolean, compress_data, (j_compress_ptr cinfo, JMETHOD(boolean, compress_data, (j_compress_ptr cinfo,
JSAMPIMAGE input_buf)); JSAMPIMAGE input_buf));
}; };
/* Colorspace conversion */ /* Colorspace conversion */
struct jpeg_color_converter { struct jpeg_color_converter {
JMETHOD(void, start_pass, (j_compress_ptr cinfo)); JMETHOD(void, start_pass, (j_compress_ptr cinfo));
JMETHOD(void, color_convert, (j_compress_ptr cinfo, JMETHOD(void, color_convert, (j_compress_ptr cinfo,
JSAMPARRAY input_buf, JSAMPIMAGE output_buf, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
JDIMENSION output_row, int num_rows)); JDIMENSION output_row, int num_rows));
}; };
/* Downsampling */ /* Downsampling */
struct jpeg_downsampler { struct jpeg_downsampler {
JMETHOD(void, start_pass, (j_compress_ptr cinfo)); JMETHOD(void, start_pass, (j_compress_ptr cinfo));
JMETHOD(void, downsample, (j_compress_ptr cinfo, JMETHOD(void, downsample, (j_compress_ptr cinfo,
JSAMPIMAGE input_buf, JDIMENSION in_row_index, JSAMPIMAGE input_buf, JDIMENSION in_row_index,
JSAMPIMAGE output_buf, JSAMPIMAGE output_buf,
JDIMENSION out_row_group_index)); JDIMENSION out_row_group_index));
boolean need_context_rows; /* TRUE if need rows above & below */ boolean need_context_rows; /* TRUE if need rows above & below */
}; };
/* Forward DCT (also controls coefficient quantization) */ /* Forward DCT (also controls coefficient quantization) */
typedef JMETHOD(void, forward_DCT_ptr, typedef JMETHOD(void, forward_DCT_ptr,
(j_compress_ptr cinfo, jpeg_component_info * compptr, (j_compress_ptr cinfo, jpeg_component_info * compptr,
JSAMPARRAY sample_data, JBLOCKROW coef_blocks, JSAMPARRAY sample_data, JBLOCKROW coef_blocks,
JDIMENSION start_row, JDIMENSION start_col, JDIMENSION start_row, JDIMENSION start_col,
JDIMENSION num_blocks)); JDIMENSION num_blocks));
struct jpeg_forward_dct { struct jpeg_forward_dct {
JMETHOD(void, start_pass, (j_compress_ptr cinfo)); JMETHOD(void, start_pass, (j_compress_ptr cinfo));
/* It is useful to allow each component to have a separate FDCT method. */ /* It is useful to allow each component to have a separate FDCT method. */
forward_DCT_ptr forward_DCT[MAX_COMPONENTS]; forward_DCT_ptr forward_DCT[MAX_COMPONENTS];
}; };
/* Entropy encoding */ /* Entropy encoding */
struct jpeg_entropy_encoder { struct jpeg_entropy_encoder {
JMETHOD(void, start_pass, (j_compress_ptr cinfo, boolean gather_statistics)); JMETHOD(void, start_pass, (j_compress_ptr cinfo, boolean gather_statistics));
JMETHOD(boolean, encode_mcu, (j_compress_ptr cinfo, JBLOCKROW *MCU_data)); JMETHOD(boolean, encode_mcu, (j_compress_ptr cinfo, JBLOCKROW *MCU_data));
JMETHOD(void, finish_pass, (j_compress_ptr cinfo)); JMETHOD(void, finish_pass, (j_compress_ptr cinfo));
}; };
/* Marker writing */ /* Marker writing */
struct jpeg_marker_writer { struct jpeg_marker_writer {
JMETHOD(void, write_file_header, (j_compress_ptr cinfo)); JMETHOD(void, write_file_header, (j_compress_ptr cinfo));
JMETHOD(void, write_frame_header, (j_compress_ptr cinfo)); JMETHOD(void, write_frame_header, (j_compress_ptr cinfo));
JMETHOD(void, write_scan_header, (j_compress_ptr cinfo)); JMETHOD(void, write_scan_header, (j_compress_ptr cinfo));
JMETHOD(void, write_file_trailer, (j_compress_ptr cinfo)); JMETHOD(void, write_file_trailer, (j_compress_ptr cinfo));
JMETHOD(void, write_tables_only, (j_compress_ptr cinfo)); JMETHOD(void, write_tables_only, (j_compress_ptr cinfo));
/* These routines are exported to allow insertion of extra markers */ /* These routines are exported to allow insertion of extra markers */
/* Probably only COM and APPn markers should be written this way */ /* Probably only COM and APPn markers should be written this way */
JMETHOD(void, write_marker_header, (j_compress_ptr cinfo, int marker, JMETHOD(void, write_marker_header, (j_compress_ptr cinfo, int marker,
unsigned int datalen)); unsigned int datalen));
JMETHOD(void, write_marker_byte, (j_compress_ptr cinfo, int val)); JMETHOD(void, write_marker_byte, (j_compress_ptr cinfo, int val));
}; };
/* Declarations for decompression modules */ /* Declarations for decompression modules */
/* Master control module */ /* Master control module */
struct jpeg_decomp_master { struct jpeg_decomp_master {
JMETHOD(void, prepare_for_output_pass, (j_decompress_ptr cinfo)); JMETHOD(void, prepare_for_output_pass, (j_decompress_ptr cinfo));
JMETHOD(void, finish_output_pass, (j_decompress_ptr cinfo)); JMETHOD(void, finish_output_pass, (j_decompress_ptr cinfo));
/* State variables made visible to other modules */ /* State variables made visible to other modules */
boolean is_dummy_pass; /* True during 1st pass for 2-pass quant */ boolean is_dummy_pass; /* True during 1st pass for 2-pass quant */
}; };
/* Input control module */ /* Input control module */
struct jpeg_input_controller { struct jpeg_input_controller {
JMETHOD(int, consume_input, (j_decompress_ptr cinfo)); JMETHOD(int, consume_input, (j_decompress_ptr cinfo));
JMETHOD(void, reset_input_controller, (j_decompress_ptr cinfo)); JMETHOD(void, reset_input_controller, (j_decompress_ptr cinfo));
JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo)); JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo));
JMETHOD(void, finish_input_pass, (j_decompress_ptr cinfo)); JMETHOD(void, finish_input_pass, (j_decompress_ptr cinfo));
/* State variables made visible to other modules */ /* State variables made visible to other modules */
boolean has_multiple_scans; /* True if file has multiple scans */ boolean has_multiple_scans; /* True if file has multiple scans */
boolean eoi_reached; /* True when EOI has been consumed */ boolean eoi_reached; /* True when EOI has been consumed */
}; };
/* Main buffer control (downsampled-data buffer) */ /* Main buffer control (downsampled-data buffer) */
struct jpeg_d_main_controller { struct jpeg_d_main_controller {
JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)); JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode));
JMETHOD(void, process_data, (j_decompress_ptr cinfo, JMETHOD(void, process_data, (j_decompress_ptr cinfo,
JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
JDIMENSION out_rows_avail)); JDIMENSION out_rows_avail));
}; };
/* Coefficient buffer control */ /* Coefficient buffer control */
struct jpeg_d_coef_controller { struct jpeg_d_coef_controller {
JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo)); JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo));
JMETHOD(int, consume_data, (j_decompress_ptr cinfo)); JMETHOD(int, consume_data, (j_decompress_ptr cinfo));
JMETHOD(void, start_output_pass, (j_decompress_ptr cinfo)); JMETHOD(void, start_output_pass, (j_decompress_ptr cinfo));
JMETHOD(int, decompress_data, (j_decompress_ptr cinfo, JMETHOD(int, decompress_data, (j_decompress_ptr cinfo,
JSAMPIMAGE output_buf)); JSAMPIMAGE output_buf));
/* Pointer to array of coefficient virtual arrays, or NULL if none */ /* Pointer to array of coefficient virtual arrays, or NULL if none */
jvirt_barray_ptr *coef_arrays; jvirt_barray_ptr *coef_arrays;
}; };
/* Decompression postprocessing (color quantization buffer control) */ /* Decompression postprocessing (color quantization buffer control) */
struct jpeg_d_post_controller { struct jpeg_d_post_controller {
JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)); JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode));
JMETHOD(void, post_process_data, (j_decompress_ptr cinfo, JMETHOD(void, post_process_data, (j_decompress_ptr cinfo,
JSAMPIMAGE input_buf, JSAMPIMAGE input_buf,
JDIMENSION *in_row_group_ctr, JDIMENSION *in_row_group_ctr,
JDIMENSION in_row_groups_avail, JDIMENSION in_row_groups_avail,
JSAMPARRAY output_buf, JSAMPARRAY output_buf,
JDIMENSION *out_row_ctr, JDIMENSION *out_row_ctr,
JDIMENSION out_rows_avail)); JDIMENSION out_rows_avail));
}; };
/* Marker reading & parsing */ /* Marker reading & parsing */
struct jpeg_marker_reader { struct jpeg_marker_reader {
JMETHOD(void, reset_marker_reader, (j_decompress_ptr cinfo)); JMETHOD(void, reset_marker_reader, (j_decompress_ptr cinfo));
/* Read markers until SOS or EOI. /* Read markers until SOS or EOI.
* Returns same codes as are defined for jpeg_consume_input: * Returns same codes as are defined for jpeg_consume_input:
* JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI. * JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI.
*/ */
JMETHOD(int, read_markers, (j_decompress_ptr cinfo)); JMETHOD(int, read_markers, (j_decompress_ptr cinfo));
/* Read a restart marker --- exported for use by entropy decoder only */ /* Read a restart marker --- exported for use by entropy decoder only */
jpeg_marker_parser_method read_restart_marker; jpeg_marker_parser_method read_restart_marker;
/* State of marker reader --- nominally internal, but applications /* State of marker reader --- nominally internal, but applications
* supplying COM or APPn handlers might like to know the state. * supplying COM or APPn handlers might like to know the state.
*/ */
boolean saw_SOI; /* found SOI? */ boolean saw_SOI; /* found SOI? */
boolean saw_SOF; /* found SOF? */ boolean saw_SOF; /* found SOF? */
int next_restart_num; /* next restart number expected (0-7) */ int next_restart_num; /* next restart number expected (0-7) */
unsigned int discarded_bytes; /* # of bytes skipped looking for a marker */ unsigned int discarded_bytes; /* # of bytes skipped looking for a marker */
}; };
/* Entropy decoding */ /* Entropy decoding */
struct jpeg_entropy_decoder { struct jpeg_entropy_decoder {
JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
JMETHOD(boolean, decode_mcu, (j_decompress_ptr cinfo, JMETHOD(boolean, decode_mcu, (j_decompress_ptr cinfo,
JBLOCKROW *MCU_data)); JBLOCKROW *MCU_data));
}; };
/* Inverse DCT (also performs dequantization) */ /* Inverse DCT (also performs dequantization) */
typedef JMETHOD(void, inverse_DCT_method_ptr, typedef JMETHOD(void, inverse_DCT_method_ptr,
(j_decompress_ptr cinfo, jpeg_component_info * compptr, (j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JCOEFPTR coef_block,
JSAMPARRAY output_buf, JDIMENSION output_col)); JSAMPARRAY output_buf, JDIMENSION output_col));
struct jpeg_inverse_dct { struct jpeg_inverse_dct {
JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
/* It is useful to allow each component to have a separate IDCT method. */ /* It is useful to allow each component to have a separate IDCT method. */
inverse_DCT_method_ptr inverse_DCT[MAX_COMPONENTS]; inverse_DCT_method_ptr inverse_DCT[MAX_COMPONENTS];
}; };
/* Upsampling (note that upsampler must also call color converter) */ /* Upsampling (note that upsampler must also call color converter) */
struct jpeg_upsampler { struct jpeg_upsampler {
JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
JMETHOD(void, upsample, (j_decompress_ptr cinfo, JMETHOD(void, upsample, (j_decompress_ptr cinfo,
JSAMPIMAGE input_buf, JSAMPIMAGE input_buf,
JDIMENSION *in_row_group_ctr, JDIMENSION *in_row_group_ctr,
JDIMENSION in_row_groups_avail, JDIMENSION in_row_groups_avail,
JSAMPARRAY output_buf, JSAMPARRAY output_buf,
JDIMENSION *out_row_ctr, JDIMENSION *out_row_ctr,
JDIMENSION out_rows_avail)); JDIMENSION out_rows_avail));
boolean need_context_rows; /* TRUE if need rows above & below */ boolean need_context_rows; /* TRUE if need rows above & below */
}; };
/* Colorspace conversion */ /* Colorspace conversion */
struct jpeg_color_deconverter { struct jpeg_color_deconverter {
JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
JMETHOD(void, color_convert, (j_decompress_ptr cinfo, JMETHOD(void, color_convert, (j_decompress_ptr cinfo,
JSAMPIMAGE input_buf, JDIMENSION input_row, JSAMPIMAGE input_buf, JDIMENSION input_row,
JSAMPARRAY output_buf, int num_rows)); JSAMPARRAY output_buf, int num_rows));
}; };
/* Color quantization or color precision reduction */ /* Color quantization or color precision reduction */
struct jpeg_color_quantizer { struct jpeg_color_quantizer {
JMETHOD(void, start_pass, (j_decompress_ptr cinfo, boolean is_pre_scan)); JMETHOD(void, start_pass, (j_decompress_ptr cinfo, boolean is_pre_scan));
JMETHOD(void, color_quantize, (j_decompress_ptr cinfo, JMETHOD(void, color_quantize, (j_decompress_ptr cinfo,
JSAMPARRAY input_buf, JSAMPARRAY output_buf, JSAMPARRAY input_buf, JSAMPARRAY output_buf,
int num_rows)); int num_rows));
JMETHOD(void, finish_pass, (j_decompress_ptr cinfo)); JMETHOD(void, finish_pass, (j_decompress_ptr cinfo));
JMETHOD(void, new_color_map, (j_decompress_ptr cinfo)); JMETHOD(void, new_color_map, (j_decompress_ptr cinfo));
}; };
/* Miscellaneous useful macros */ /* Miscellaneous useful macros */
#undef MAX #undef MAX
#define MAX(a,b) ((a) > (b) ? (a) : (b)) #define MAX(a,b) ((a) > (b) ? (a) : (b))
#undef MIN #undef MIN
#define MIN(a,b) ((a) < (b) ? (a) : (b)) #define MIN(a,b) ((a) < (b) ? (a) : (b))
/* We assume that right shift corresponds to signed division by 2 with /* We assume that right shift corresponds to signed division by 2 with
* rounding towards minus infinity. This is correct for typical "arithmetic * rounding towards minus infinity. This is correct for typical "arithmetic
* shift" instructions that shift in copies of the sign bit. But some * shift" instructions that shift in copies of the sign bit. But some
* C compilers implement >> with an unsigned shift. For these machines you * C compilers implement >> with an unsigned shift. For these machines you
* must define RIGHT_SHIFT_IS_UNSIGNED. * must define RIGHT_SHIFT_IS_UNSIGNED.
* RIGHT_SHIFT provides a proper signed right shift of an INT32 quantity. * RIGHT_SHIFT provides a proper signed right shift of an INT32 quantity.
* It is only applied with constant shift counts. SHIFT_TEMPS must be * It is only applied with constant shift counts. SHIFT_TEMPS must be
* included in the variables of any routine using RIGHT_SHIFT. * included in the variables of any routine using RIGHT_SHIFT.
*/ */
#ifdef RIGHT_SHIFT_IS_UNSIGNED #ifdef RIGHT_SHIFT_IS_UNSIGNED
#define SHIFT_TEMPS INT32 shift_temp; #define SHIFT_TEMPS INT32 shift_temp;
#define RIGHT_SHIFT(x,shft) \ #define RIGHT_SHIFT(x,shft) \
((shift_temp = (x)) < 0 ? \ ((shift_temp = (x)) < 0 ? \
(shift_temp >> (shft)) | ((~((INT32) 0)) << (32-(shft))) : \ (shift_temp >> (shft)) | ((~((INT32) 0)) << (32-(shft))) : \
(shift_temp >> (shft))) (shift_temp >> (shft)))
#else #else
#define SHIFT_TEMPS #define SHIFT_TEMPS
#define RIGHT_SHIFT(x,shft) ((x) >> (shft)) #define RIGHT_SHIFT(x,shft) ((x) >> (shft))
#endif #endif
/* Short forms of external names for systems with brain-damaged linkers. */ /* Short forms of external names for systems with brain-damaged linkers. */
#ifdef NEED_SHORT_EXTERNAL_NAMES #ifdef NEED_SHORT_EXTERNAL_NAMES
#define jinit_compress_master jICompress #define jinit_compress_master jICompress
#define jinit_c_master_control jICMaster #define jinit_c_master_control jICMaster
#define jinit_c_main_controller jICMainC #define jinit_c_main_controller jICMainC
#define jinit_c_prep_controller jICPrepC #define jinit_c_prep_controller jICPrepC
#define jinit_c_coef_controller jICCoefC #define jinit_c_coef_controller jICCoefC
#define jinit_color_converter jICColor #define jinit_color_converter jICColor
#define jinit_downsampler jIDownsampler #define jinit_downsampler jIDownsampler
#define jinit_forward_dct jIFDCT #define jinit_forward_dct jIFDCT
#define jinit_huff_encoder jIHEncoder #define jinit_huff_encoder jIHEncoder
#define jinit_arith_encoder jIAEncoder #define jinit_arith_encoder jIAEncoder
#define jinit_marker_writer jIMWriter #define jinit_marker_writer jIMWriter
#define jinit_master_decompress jIDMaster #define jinit_master_decompress jIDMaster
#define jinit_d_main_controller jIDMainC #define jinit_d_main_controller jIDMainC
#define jinit_d_coef_controller jIDCoefC #define jinit_d_coef_controller jIDCoefC
#define jinit_d_post_controller jIDPostC #define jinit_d_post_controller jIDPostC
#define jinit_input_controller jIInCtlr #define jinit_input_controller jIInCtlr
#define jinit_marker_reader jIMReader #define jinit_marker_reader jIMReader
#define jinit_huff_decoder jIHDecoder #define jinit_huff_decoder jIHDecoder
#define jinit_arith_decoder jIADecoder #define jinit_arith_decoder jIADecoder
#define jinit_inverse_dct jIIDCT #define jinit_inverse_dct jIIDCT
#define jinit_upsampler jIUpsampler #define jinit_upsampler jIUpsampler
#define jinit_color_deconverter jIDColor #define jinit_color_deconverter jIDColor
#define jinit_1pass_quantizer jI1Quant #define jinit_1pass_quantizer jI1Quant
#define jinit_2pass_quantizer jI2Quant #define jinit_2pass_quantizer jI2Quant
#define jinit_merged_upsampler jIMUpsampler #define jinit_merged_upsampler jIMUpsampler
#define jinit_memory_mgr jIMemMgr #define jinit_memory_mgr jIMemMgr
#define jdiv_round_up jDivRound #define jdiv_round_up jDivRound
#define jround_up jRound #define jround_up jRound
#define jcopy_sample_rows jCopySamples #define jcopy_sample_rows jCopySamples
#define jcopy_block_row jCopyBlocks #define jcopy_block_row jCopyBlocks
#define jzero_far jZeroFar #define jzero_far jZeroFar
#define jpeg_zigzag_order jZIGTable #define jpeg_zigzag_order jZIGTable
#define jpeg_natural_order jZAGTable #define jpeg_natural_order jZAGTable
#define jpeg_natural_order7 jZAGTable7 #define jpeg_natural_order7 jZAGTable7
#define jpeg_natural_order6 jZAGTable6 #define jpeg_natural_order6 jZAGTable6
#define jpeg_natural_order5 jZAGTable5 #define jpeg_natural_order5 jZAGTable5
#define jpeg_natural_order4 jZAGTable4 #define jpeg_natural_order4 jZAGTable4
#define jpeg_natural_order3 jZAGTable3 #define jpeg_natural_order3 jZAGTable3
#define jpeg_natural_order2 jZAGTable2 #define jpeg_natural_order2 jZAGTable2
#define jpeg_aritab jAriTab #define jpeg_aritab jAriTab
#endif /* NEED_SHORT_EXTERNAL_NAMES */ #endif /* NEED_SHORT_EXTERNAL_NAMES */
/* Compression module initialization routines */ /* Compression module initialization routines */
EXTERN(void) jinit_compress_master JPP((j_compress_ptr cinfo)); EXTERN(void) jinit_compress_master JPP((j_compress_ptr cinfo));
EXTERN(void) jinit_c_master_control JPP((j_compress_ptr cinfo, EXTERN(void) jinit_c_master_control JPP((j_compress_ptr cinfo,
boolean transcode_only)); boolean transcode_only));
EXTERN(void) jinit_c_main_controller JPP((j_compress_ptr cinfo, EXTERN(void) jinit_c_main_controller JPP((j_compress_ptr cinfo,
boolean need_full_buffer)); boolean need_full_buffer));
EXTERN(void) jinit_c_prep_controller JPP((j_compress_ptr cinfo, EXTERN(void) jinit_c_prep_controller JPP((j_compress_ptr cinfo,
boolean need_full_buffer)); boolean need_full_buffer));
EXTERN(void) jinit_c_coef_controller JPP((j_compress_ptr cinfo, EXTERN(void) jinit_c_coef_controller JPP((j_compress_ptr cinfo,
boolean need_full_buffer)); boolean need_full_buffer));
EXTERN(void) jinit_color_converter JPP((j_compress_ptr cinfo)); EXTERN(void) jinit_color_converter JPP((j_compress_ptr cinfo));
EXTERN(void) jinit_downsampler JPP((j_compress_ptr cinfo)); EXTERN(void) jinit_downsampler JPP((j_compress_ptr cinfo));
EXTERN(void) jinit_forward_dct JPP((j_compress_ptr cinfo)); EXTERN(void) jinit_forward_dct JPP((j_compress_ptr cinfo));
EXTERN(void) jinit_huff_encoder JPP((j_compress_ptr cinfo)); EXTERN(void) jinit_huff_encoder JPP((j_compress_ptr cinfo));
EXTERN(void) jinit_arith_encoder JPP((j_compress_ptr cinfo)); EXTERN(void) jinit_arith_encoder JPP((j_compress_ptr cinfo));
EXTERN(void) jinit_marker_writer JPP((j_compress_ptr cinfo)); EXTERN(void) jinit_marker_writer JPP((j_compress_ptr cinfo));
/* Decompression module initialization routines */ /* Decompression module initialization routines */
EXTERN(void) jinit_master_decompress JPP((j_decompress_ptr cinfo)); EXTERN(void) jinit_master_decompress JPP((j_decompress_ptr cinfo));
EXTERN(void) jinit_d_main_controller JPP((j_decompress_ptr cinfo, EXTERN(void) jinit_d_main_controller JPP((j_decompress_ptr cinfo,
boolean need_full_buffer)); boolean need_full_buffer));
EXTERN(void) jinit_d_coef_controller JPP((j_decompress_ptr cinfo, EXTERN(void) jinit_d_coef_controller JPP((j_decompress_ptr cinfo,
boolean need_full_buffer)); boolean need_full_buffer));
EXTERN(void) jinit_d_post_controller JPP((j_decompress_ptr cinfo, EXTERN(void) jinit_d_post_controller JPP((j_decompress_ptr cinfo,
boolean need_full_buffer)); boolean need_full_buffer));
EXTERN(void) jinit_input_controller JPP((j_decompress_ptr cinfo)); EXTERN(void) jinit_input_controller JPP((j_decompress_ptr cinfo));
EXTERN(void) jinit_marker_reader JPP((j_decompress_ptr cinfo)); EXTERN(void) jinit_marker_reader JPP((j_decompress_ptr cinfo));
EXTERN(void) jinit_huff_decoder JPP((j_decompress_ptr cinfo)); EXTERN(void) jinit_huff_decoder JPP((j_decompress_ptr cinfo));
EXTERN(void) jinit_arith_decoder JPP((j_decompress_ptr cinfo)); EXTERN(void) jinit_arith_decoder JPP((j_decompress_ptr cinfo));
EXTERN(void) jinit_inverse_dct JPP((j_decompress_ptr cinfo)); EXTERN(void) jinit_inverse_dct JPP((j_decompress_ptr cinfo));
EXTERN(void) jinit_upsampler JPP((j_decompress_ptr cinfo)); EXTERN(void) jinit_upsampler JPP((j_decompress_ptr cinfo));
EXTERN(void) jinit_color_deconverter JPP((j_decompress_ptr cinfo)); EXTERN(void) jinit_color_deconverter JPP((j_decompress_ptr cinfo));
EXTERN(void) jinit_1pass_quantizer JPP((j_decompress_ptr cinfo)); EXTERN(void) jinit_1pass_quantizer JPP((j_decompress_ptr cinfo));
EXTERN(void) jinit_2pass_quantizer JPP((j_decompress_ptr cinfo)); EXTERN(void) jinit_2pass_quantizer JPP((j_decompress_ptr cinfo));
EXTERN(void) jinit_merged_upsampler JPP((j_decompress_ptr cinfo)); EXTERN(void) jinit_merged_upsampler JPP((j_decompress_ptr cinfo));
/* Memory manager initialization */ /* Memory manager initialization */
EXTERN(void) jinit_memory_mgr JPP((j_common_ptr cinfo)); EXTERN(void) jinit_memory_mgr JPP((j_common_ptr cinfo));
/* Utility routines in jutils.c */ /* Utility routines in jutils.c */
EXTERN(long) jdiv_round_up JPP((long a, long b)); EXTERN(long) jdiv_round_up JPP((long a, long b));
EXTERN(long) jround_up JPP((long a, long b)); EXTERN(long) jround_up JPP((long a, long b));
EXTERN(void) jcopy_sample_rows JPP((JSAMPARRAY input_array, int source_row, EXTERN(void) jcopy_sample_rows JPP((JSAMPARRAY input_array, int source_row,
JSAMPARRAY output_array, int dest_row, JSAMPARRAY output_array, int dest_row,
int num_rows, JDIMENSION num_cols)); int num_rows, JDIMENSION num_cols));
EXTERN(void) jcopy_block_row JPP((JBLOCKROW input_row, JBLOCKROW output_row, EXTERN(void) jcopy_block_row JPP((JBLOCKROW input_row, JBLOCKROW output_row,
JDIMENSION num_blocks)); JDIMENSION num_blocks));
EXTERN(void) jzero_far JPP((void FAR * target, size_t bytestozero)); EXTERN(void) jzero_far JPP((void FAR * target, size_t bytestozero));
/* Constant tables in jutils.c */ /* Constant tables in jutils.c */
#if 0 /* This table is not actually needed in v6a */ #if 0 /* This table is not actually needed in v6a */
extern const int jpeg_zigzag_order[]; /* natural coef order to zigzag order */ extern const int jpeg_zigzag_order[]; /* natural coef order to zigzag order */
#endif #endif
extern const int jpeg_natural_order[]; /* zigzag coef order to natural order */ extern const int jpeg_natural_order[]; /* zigzag coef order to natural order */
extern const int jpeg_natural_order7[]; /* zz to natural order for 7x7 block */ extern const int jpeg_natural_order7[]; /* zz to natural order for 7x7 block */
extern const int jpeg_natural_order6[]; /* zz to natural order for 6x6 block */ extern const int jpeg_natural_order6[]; /* zz to natural order for 6x6 block */
extern const int jpeg_natural_order5[]; /* zz to natural order for 5x5 block */ extern const int jpeg_natural_order5[]; /* zz to natural order for 5x5 block */
extern const int jpeg_natural_order4[]; /* zz to natural order for 4x4 block */ extern const int jpeg_natural_order4[]; /* zz to natural order for 4x4 block */
extern const int jpeg_natural_order3[]; /* zz to natural order for 3x3 block */ extern const int jpeg_natural_order3[]; /* zz to natural order for 3x3 block */
extern const int jpeg_natural_order2[]; /* zz to natural order for 2x2 block */ extern const int jpeg_natural_order2[]; /* zz to natural order for 2x2 block */
/* Arithmetic coding probability estimation tables in jaricom.c */ /* Arithmetic coding probability estimation tables in jaricom.c */
extern const INT32 jpeg_aritab[]; extern const INT32 jpeg_aritab[];
/* Suppress undefined-structure complaints if necessary. */ /* Suppress undefined-structure complaints if necessary. */
#ifdef INCOMPLETE_TYPES_BROKEN #ifdef INCOMPLETE_TYPES_BROKEN
#ifndef AM_MEMORY_MANAGER /* only jmemmgr.c defines these */ #ifndef AM_MEMORY_MANAGER /* only jmemmgr.c defines these */
struct jvirt_sarray_control { long dummy; }; struct jvirt_sarray_control { long dummy; };
struct jvirt_barray_control { long dummy; }; struct jvirt_barray_control { long dummy; };
#endif #endif
#endif /* INCOMPLETE_TYPES_BROKEN */ #endif /* INCOMPLETE_TYPES_BROKEN */

File diff suppressed because it is too large Load Diff

View File

@ -1,14 +1,14 @@
/* /*
* jversion.h * jversion.h
* *
* Copyright (C) 1991-2011, Thomas G. Lane, Guido Vollbeding. * Copyright (C) 1991-2011, Thomas G. Lane, Guido Vollbeding.
* This file is part of the Independent JPEG Group's software. * This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file. * For conditions of distribution and use, see the accompanying README file.
* *
* This file contains software version identification. * This file contains software version identification.
*/ */
#define JVERSION "8c 16-Jan-2011" #define JVERSION "8c 16-Jan-2011"
#define JCOPYRIGHT "Copyright (C) 2011, Thomas G. Lane, Guido Vollbeding" #define JCOPYRIGHT "Copyright (C) 2011, Thomas G. Lane, Guido Vollbeding"

View File

@ -1 +1 @@
37d0b7101cea5dff8e28a57fe552d2301d6acd23 dcd9ca68ab355cd31812a2d804f63d24166079fa

View File

@ -32,13 +32,15 @@
<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.1363689121" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/> <option id="gnu.cpp.compiler.exe.debug.option.optimization.level.1363689121" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.exe.debug.option.debugging.level.182720845" name="Debug Level" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/> <option id="gnu.cpp.compiler.exe.debug.option.debugging.level.182720845" name="Debug Level" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.include.paths.1224978101" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath"> <option id="gnu.cpp.compiler.option.include.paths.1224978101" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="../../"/> <listOptionValue builtIn="false" value="../../../"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform/third_party/linux/libfreetype2}&quot;"/> <listOptionValue builtIn="false" value="../../../cocos2dx"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/include}&quot;"/> <listOptionValue builtIn="false" value="../../../cocos2dx/include"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform}&quot;"/> <listOptionValue builtIn="false" value="../../../cocos2dx/platform"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform/third_party/linux/libpng}&quot;"/> <listOptionValue builtIn="false" value="../../../cocos2dx/platform/linux"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform/third_party/linux/libxml2}&quot;"/> <listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libfreetype2"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform/third_party/linux/libjpeg}&quot;"/> <listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libpng"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libxml2"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libjpeg"/>
</option> </option>
<option id="gnu.cpp.compiler.option.preprocessor.def.954744053" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols"> <option id="gnu.cpp.compiler.option.preprocessor.def.954744053" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
<listOptionValue builtIn="false" value="LINUX"/> <listOptionValue builtIn="false" value="LINUX"/>
@ -49,15 +51,7 @@
<tool command="gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.452615323" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug"> <tool command="gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.452615323" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug">
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.1079128222" name="Optimization Level" superClass="gnu.c.compiler.exe.debug.option.optimization.level" valueType="enumerated"/> <option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.1079128222" name="Optimization Level" superClass="gnu.c.compiler.exe.debug.option.optimization.level" valueType="enumerated"/>
<option id="gnu.c.compiler.exe.debug.option.debugging.level.703039623" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/> <option id="gnu.c.compiler.exe.debug.option.debugging.level.703039623" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.500257262" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"> <option id="gnu.c.compiler.option.include.paths.500257262" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"/>
<listOptionValue builtIn="false" value="../../"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform/third_party/linux/libjpeg}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform/third_party/linux/libpng}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform/third_party/linux/libfreetype2}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform/third_party/linux/libxml2}&quot;"/>
</option>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.1531770269" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols"/> <option id="gnu.c.compiler.option.preprocessor.def.symbols.1531770269" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols"/>
<option id="gnu.c.compiler.option.warnings.allwarn.1446204747" name="All warnings (-Wall)" superClass="gnu.c.compiler.option.warnings.allwarn" value="false" valueType="boolean"/> <option id="gnu.c.compiler.option.warnings.allwarn.1446204747" name="All warnings (-Wall)" superClass="gnu.c.compiler.option.warnings.allwarn" value="false" valueType="boolean"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.697502414" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/> <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.697502414" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
@ -73,11 +67,11 @@
</option> </option>
<option id="gnu.cpp.link.option.soname.2012475291" name="Shared object name (-Wl,-soname=)" superClass="gnu.cpp.link.option.soname" value="" valueType="string"/> <option id="gnu.cpp.link.option.soname.2012475291" name="Shared object name (-Wl,-soname=)" superClass="gnu.cpp.link.option.soname" value="" valueType="string"/>
<option id="gnu.cpp.link.option.userobjs.1360463693" name="Other objects" superClass="gnu.cpp.link.option.userobjs" valueType="userObjs"> <option id="gnu.cpp.link.option.userobjs.1360463693" name="Other objects" superClass="gnu.cpp.link.option.userobjs" valueType="userObjs">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform/third_party/linux/libraries/libfreetype.a}&quot;"/> <listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libfreetype.a"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform/third_party/linux/libraries/libcurl.a}&quot;"/> <listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libcurl.a"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform/third_party/linux/libraries/libxml2.a}&quot;"/> <listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libxml2.a"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform/third_party/linux/libraries/libpng.a}&quot;"/> <listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libpng.a"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform/third_party/linux/libraries/libjpeg.a}&quot;"/> <listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libjpeg.a"/>
</option> </option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.620370737" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input"> <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.620370737" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
@ -90,7 +84,26 @@
</toolChain> </toolChain>
</folderInfo> </folderInfo>
<sourceEntries> <sourceEntries>
<entry excluding="platform/marmalade|platform (copy)|platform/wophone|particle_nodes/CCParticleSystemPoint.cpp|proj.wophone|platform/ios|proj.win32|platform/android|platform/win32|proj.airplay|platform/third_party|platform/bada|platform/qnx" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/> <entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="actions"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="base_nodes"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="cocoa"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="effects"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="include"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="keypad_dispatcher"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="label_nodes"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="layers_scenes_transitions_nodes"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="menu_nodes"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="misc_nodes"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="particle_nodes"/>
<entry excluding="android/|bada/|ios/|Linux/CCFileUtils_Linux.cpp|Linux/CCImage_Linux.cpp|marmalade/|qnx/|third_party/|win32/|wophone/" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="platform"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="script_support"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="sprite_nodes"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="support"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="text_input_node"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="textures"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="tileMap_parallax_nodes"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="touch_dispatcher"/>
<entry excluding="actions|base_nodes|cocoa|effects|include|keypad_dispatcher|label_nodes|layers_scenes_transitions_nodes|menu_nodes|misc_nodes|particle_nodes|platform|script_support|sprite_nodes|support|text_input_node|textures|tileMap_parallax_nodes|touch_dispatcher" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/>
</sourceEntries> </sourceEntries>
</configuration> </configuration>
</storageModule> </storageModule>
@ -127,13 +140,15 @@
<option id="gnu.cpp.compiler.exe.release.option.optimization.level.1498871898" name="Optimization Level" superClass="gnu.cpp.compiler.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/> <option id="gnu.cpp.compiler.exe.release.option.optimization.level.1498871898" name="Optimization Level" superClass="gnu.cpp.compiler.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
<option id="gnu.cpp.compiler.exe.release.option.debugging.level.1985273019" name="Debug Level" superClass="gnu.cpp.compiler.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/> <option id="gnu.cpp.compiler.exe.release.option.debugging.level.1985273019" name="Debug Level" superClass="gnu.cpp.compiler.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.include.paths.1571711257" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath"> <option id="gnu.cpp.compiler.option.include.paths.1571711257" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="../../"/> <listOptionValue builtIn="false" value="../../../"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform/third_party/linux/libfreetype2}&quot;"/> <listOptionValue builtIn="false" value="../../../cocos2dx"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/include}&quot;"/> <listOptionValue builtIn="false" value="../../../cocos2dx/include"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform}&quot;"/> <listOptionValue builtIn="false" value="../../../cocos2dx/platform"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform/third_party/linux/libpng}&quot;"/> <listOptionValue builtIn="false" value="../../../cocos2dx/platform/linux"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform/third_party/linux/libxml2}&quot;"/> <listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libfreetype2"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform/third_party/linux/libjpeg}&quot;"/> <listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libpng"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libxml2"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libjpeg"/>
</option> </option>
<option id="gnu.cpp.compiler.option.preprocessor.def.1432872181" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols"> <option id="gnu.cpp.compiler.option.preprocessor.def.1432872181" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
<listOptionValue builtIn="false" value="LINUX"/> <listOptionValue builtIn="false" value="LINUX"/>
@ -144,15 +159,7 @@
<tool command="gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.984270671" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release"> <tool command="gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.984270671" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release">
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.1465078999" name="Optimization Level" superClass="gnu.c.compiler.exe.release.option.optimization.level" value="gnu.c.optimization.level.most" valueType="enumerated"/> <option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.1465078999" name="Optimization Level" superClass="gnu.c.compiler.exe.release.option.optimization.level" value="gnu.c.optimization.level.most" valueType="enumerated"/>
<option id="gnu.c.compiler.exe.release.option.debugging.level.519142307" name="Debug Level" superClass="gnu.c.compiler.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/> <option id="gnu.c.compiler.exe.release.option.debugging.level.519142307" name="Debug Level" superClass="gnu.c.compiler.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.1095324729" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"> <option id="gnu.c.compiler.option.include.paths.1095324729" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"/>
<listOptionValue builtIn="false" value="../../"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform/third_party/linux/libjpeg}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform/third_party/linux/libpng}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform/third_party/linux/libfreetype2}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform/third_party/linux/libxml2}&quot;"/>
</option>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.1479035749" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols"/> <option id="gnu.c.compiler.option.preprocessor.def.symbols.1479035749" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols"/>
<option id="gnu.c.compiler.option.warnings.allwarn.2077117046" name="All warnings (-Wall)" superClass="gnu.c.compiler.option.warnings.allwarn" value="false" valueType="boolean"/> <option id="gnu.c.compiler.option.warnings.allwarn.2077117046" name="All warnings (-Wall)" superClass="gnu.c.compiler.option.warnings.allwarn" value="false" valueType="boolean"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.191330176" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/> <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.191330176" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
@ -168,11 +175,11 @@
</option> </option>
<option id="gnu.cpp.link.option.soname.1066283521" name="Shared object name (-Wl,-soname=)" superClass="gnu.cpp.link.option.soname" value="" valueType="string"/> <option id="gnu.cpp.link.option.soname.1066283521" name="Shared object name (-Wl,-soname=)" superClass="gnu.cpp.link.option.soname" value="" valueType="string"/>
<option id="gnu.cpp.link.option.userobjs.394630625" name="Other objects" superClass="gnu.cpp.link.option.userobjs" valueType="userObjs"> <option id="gnu.cpp.link.option.userobjs.394630625" name="Other objects" superClass="gnu.cpp.link.option.userobjs" valueType="userObjs">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform/third_party/linux/libraries/libfreetype.a}&quot;"/> <listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libfreetype.a"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform/third_party/linux/libraries/libcurl.a}&quot;"/> <listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libcurl.a"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform/third_party/linux/libraries/libxml2.a}&quot;"/> <listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libxml2.a"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform/third_party/linux/libraries/libpng.a}&quot;"/> <listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libpng.a"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform/third_party/linux/libraries/libjpeg.a}&quot;"/> <listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libjpeg.a"/>
</option> </option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.319060310" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input"> <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.319060310" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
@ -185,7 +192,26 @@
</toolChain> </toolChain>
</folderInfo> </folderInfo>
<sourceEntries> <sourceEntries>
<entry excluding="platform/airplay|platform (copy)|platform/wophone|particle_nodes/CCParticleSystemPoint.cpp|proj.wophone|platform/ios|proj.win32|platform/android|platform/win32|proj.airplay|platform/third_party" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> <entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="actions"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="base_nodes"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="cocoa"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="effects"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="include"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="keypad_dispatcher"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="label_nodes"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="layers_scenes_transitions_nodes"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="menu_nodes"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="misc_nodes"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="particle_nodes"/>
<entry excluding="android/|bada/|ios/|Linux/CCFileUtils_Linux.cpp|Linux/CCImage_Linux.cpp|marmalade/|qnx/|third_party/|win32/|wophone/" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="platform"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="script_support"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="sprite_nodes"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="support"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="text_input_node"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="textures"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="tileMap_parallax_nodes"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="touch_dispatcher"/>
<entry excluding="actions|base_nodes|cocoa|effects|include|keypad_dispatcher|label_nodes|layers_scenes_transitions_nodes|menu_nodes|misc_nodes|particle_nodes|platform|script_support|sprite_nodes|support|text_input_node|textures|tileMap_parallax_nodes|touch_dispatcher" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/>
</sourceEntries> </sourceEntries>
</configuration> </configuration>
</storageModule> </storageModule>

View File

@ -67,8 +67,6 @@ OBJECTS = ../actions/CCAction.o \
../platform/platform.o \ ../platform/platform.o \
../platform/Linux/CCAplication_linux.o \ ../platform/Linux/CCAplication_linux.o \
../platform/Linux/CCEGLView_linux.o \ ../platform/Linux/CCEGLView_linux.o \
../platform/Linux/CCFileUtils_Linux.o \
../platform/Linux/CCImage_Linux.o \
../script_support/CCScriptSupport.o \ ../script_support/CCScriptSupport.o \
../sprite_nodes/CCAnimation.o \ ../sprite_nodes/CCAnimation.o \
../sprite_nodes/CCAnimationCache.o \ ../sprite_nodes/CCAnimationCache.o \

View File

@ -1,97 +0,0 @@
@echo off
:: This script is used to create an bada project.
:: Don't change it until you know what you do.
setlocal
setlocal enabledelayedexpansion
set COCOS2DX_ROOT=%cd%
set /p PROJECT_NAME=please input project name:
if /i %PROJECT_NAME%==tests (
echo can't not use "tests" as a project name, because it is used for cocos2dx tests project.
goto END
)
if /i %PROJECT_NAME%==HelloWorld (
echo can't not use "HelloWorld" as a project name, because it is used for cocos2dx HelloWorld project.
goto END
)
if not exist %PROJECT_NAME% md %PROJECT_NAME%
cd %PROJECT_NAME%
set PROJECT_ROOT=%COCOS2DX_ROOT%\%PROJECT_NAME%
echo project root = %PROJECT_ROOT%
if not exist bada (
md Resource
md bada\sdk1.0\Icons
md bada\sdk1.0\Res
md bada\sdk2.0\Icons
md bada\sdk2.0\Res
md bada\src
) else (
echo "bada project exist!"
goto END
)
xcopy /y /s %COCOS2DX_ROOT%\HelloWorld\Resource\*.* Resource
copy /y %COCOS2DX_ROOT%\HelloWorld\bada\sdk1.0\Icons bada\sdk1.0\Icons
copy /y %COCOS2DX_ROOT%\HelloWorld\bada\sdk1.0\.badaprj bada\sdk1.0
copy /y %COCOS2DX_ROOT%\HelloWorld\bada\sdk1.0\.cproject bada\sdk1.0
copy /y %COCOS2DX_ROOT%\HelloWorld\bada\sdk1.0\.project bada\sdk1.0
copy /y %COCOS2DX_ROOT%\HelloWorld\bada\sdk1.0\application.xml bada\sdk1.0
copy /y %COCOS2DX_ROOT%\HelloWorld\bada\sdk1.0\manifest.xml bada\sdk1.0
copy /y %COCOS2DX_ROOT%\HelloWorld\bada\src bada\src
copy /y %COCOS2DX_ROOT%\HelloWorld\bada\sdk2.0\Icons bada\sdk2.0\Icons
copy /y %COCOS2DX_ROOT%\HelloWorld\bada\sdk2.0\.badaprj bada\sdk2.0
copy /y %COCOS2DX_ROOT%\HelloWorld\bada\sdk2.0\.cproject bada\sdk2.0
copy /y %COCOS2DX_ROOT%\HelloWorld\bada\sdk2.0\.project bada\sdk2.0
copy /y %COCOS2DX_ROOT%\HelloWorld\bada\sdk2.0\application.xml bada\sdk2.0
copy /y %COCOS2DX_ROOT%\HelloWorld\bada\sdk2.0\manifest.xml bada\sdk2.0
copy /y %COCOS2DX_ROOT%\HelloWorld\bada\src bada\src
if not exist Classes (
md Classes
xcopy /y /s %COCOS2DX_ROOT%\HelloWorld\Classes\*.* Classes
) else (
echo "Classes folder exist, it will not be override!"
)
:: rename HelloWorldEntry.cpp
move bada\src\HelloWorldEntry.cpp bada\src\%PROJECT_NAME%Entry.cpp
cd bada\sdk1.0
call :replace .cproject
call :replace .project
call :replace application.xml
cd ..\..\bada\sdk2.0
call :replace .cproject
call :replace .project
call :replace application.xml
echo Congratulations, %PROJECT_NAME% project have been created, please import the project from BadaIDE.
:END
endlocal
pause
exit
:replace
for /f "tokens=1* delims=:" %%a in ('findstr /n .* "%1"') do (
if "%%b"=="" (
echo\>>tmp.txt
) else (
set "var=%%b"
set "var=!var:HelloWorld=%PROJECT_NAME%!"
echo !var!>>tmp.txt
)
)
move tmp.txt %1

81
create-bada-project.vbs Normal file
View File

@ -0,0 +1,81 @@
set fso = Wscript.CreateObject("Scripting.FileSystemObject")
dim szPrompt, msgRet
szPrompt = "Prompt"
function ReplaceFileContent(fileName, oldStr, newStr)
set f = fso.opentextfile(fileName)
s = replace(f.readall, oldStr, newStr)
f.close
set r = fso.opentextfile(fileName, 2, true)
r.write s
end function
function CopyFolder(srcFolder, desFolder)
if (fso.FolderExists(desFolder)) then
'msgbox("none:"+srcFolder+":"+desFolder)
'If the desFolder exist, do nothing.
else
CopyFolder = fso.CopyFolder(srcFolder, desFolder)
end if
end function
function ConfigureProject()
dim szProjectName
szProjectName = Inputbox("Please Input Project Name:", szPrompt)
if szProjectName = "" then
Wscript.quit
end if
if (0 = strcomp(szProjectName, "HelloWorld", 1) or 0 = strcomp(szProjectName, "tests", 1)) then
msgRet = msgbox("Can not create a project named with "+szProjectName+", Please input again!", 1, szPrompt)
if (msgRet = 1) then
call ConfigureProject
end if
Wscript.quit
end if
if (fso.FolderExists(szProjectName)) then
else
fso.CreateFolder(szProjectName)
end if
dim badaFolder
badaFolder = szProjectName + "\bada"
if (fso.FolderExists(badaFolder)) then
msgRet = msgbox("The '"+szProjectName+"' project exists, can't override! Please input again!", 1, szPrompt)
if (msgRet = 1) then
call ConfigureProject
end if
Wcript.quit
end if
dim szSrcClass, szSrcBada, szSrcResource
dim szDesClass, szDesBada, szDesResource
szSrcClass = "HelloWorld\Classes"
szSrcBada = "HelloWorld\bada"
szSrcResource = "HelloWorld\Resource"
szDesClass = szProjectName+"\Classes"
szDesBada = szProjectName+"\bada"
szDesResource = szProjectName+"\Resource"
call CopyFolder(szSrcClass, szDesClass)
call CopyFolder(szSrcBada, szDesBada)
call CopyFolder(szSrcResource, szDesResource)
dim i
for i=1 to 2
call ReplaceFileContent(szProjectName+"\bada\sdk"+cstr(i)+".0\application.xml", "HelloWorld", szProjectName)
call ReplaceFileContent(szProjectName+"\bada\sdk"+cstr(i)+".0\.project", "HelloWorld", szProjectName)
call ReplaceFileContent(szProjectName+"\bada\sdk"+cstr(i)+".0\.cproject", "HelloWorld", szProjectName)
next
call msgbox("Congratulations, the '"+szProjectName+"' project have been created successfully, please use Bada IDE to import the project!", 0, szPrompt)
end function
call ConfigureProject
Wscript.quit

83
create-qnx-project.sh Normal file
View File

@ -0,0 +1,83 @@
#!/bin/sh
HELLOWORLD_ROOT=`pwd`/HelloWorld
# make directory qnx and copy all files and directories into it
copy_qnx_folder(){
if [ -d $PROJECT_DIR/qnx ]; then
echo "The '$PROJECT_NAME' project exists, can't override! Please input again!"
create_qnx_project
exit
fi
mkdir $PROJECT_DIR/qnx
echo $HELLOWORLD_ROOT
for file in `ls -a $HELLOWORLD_ROOT/qnx | grep -E '\.(project|cproject|xml|png|cpp)' `
do
file=$HELLOWORLD_ROOT/qnx/$file
if [ -f $file ];then
#echo $file
cp $file $PROJECT_DIR/qnx
fi
done
}
copy_cpp_h_from_helloworld(){
if [ -d $PROJECT_DIR/Classes ]; then
echo "Classes folder exists, skip copying Classes folder!"
else
mkdir $PROJECT_DIR/Classes
for file in `ls $HELLOWORLD_ROOT/Classes/* | grep -E '.(cpp|h|mk)' `
do
if [ -f $file ];then
#echo $file
cp $file $PROJECT_DIR/Classes
fi
done
fi
}
# copy resources
copy_resouces(){
if [ -d $PROJECT_DIR/Resource ]; then
echo "Resource folder exists, skip copying Resource folder!"
else
mkdir $PROJECT_DIR/Resource
for file in $HELLOWORLD_ROOT/Resource/*
do
#echo $file
cp $file $PROJECT_DIR/Resource
done
fi
}
# replace string
modify_file_content(){
# here should use # instead of /, why??
sed "s#HelloWorld#$PROJECT_NAME#" $PROJECT_DIR/qnx/$1 > $PROJECT_DIR/qnx/tmp.txt
rm $PROJECT_DIR/qnx/$1
mv $PROJECT_DIR/qnx/tmp.txt $PROJECT_DIR/qnx/$1
}
create_qnx_project(){
echo "Please input your project name:"
read PROJECT_NAME
PROJECT_DIR=`pwd`/$PROJECT_NAME
# check if PROJECT_DIR is exist
if [ -d $PROJECT_DIR ]; then
echo ""
else
mkdir $PROJECT_DIR
fi
copy_qnx_folder
modify_file_content .project
modify_file_content .cproject
modify_file_content bar-descriptor.xml
copy_cpp_h_from_helloworld
copy_resouces
echo "Congratulations, the '$PROJECT_NAME' project have been created successfully, please use QNX IDE to import the project!"
}
create_qnx_project

78
create-qnx-project.vbs Normal file
View File

@ -0,0 +1,78 @@
set fso = Wscript.CreateObject("Scripting.FileSystemObject")
dim szPrompt, msgRet
szPrompt = "Prompt"
function ReplaceFileContent(fileName, oldStr, newStr)
set f = fso.opentextfile(fileName)
s = replace(f.readall, oldStr, newStr)
f.close
set r = fso.opentextfile(fileName, 2, true)
r.write s
end function
function CopyFolder(srcFolder, desFolder)
if (fso.FolderExists(desFolder)) then
'msgbox("none:"+srcFolder+":"+desFolder)
'If the desFolder exist, do nothing.
else
CopyFolder = fso.CopyFolder(srcFolder, desFolder)
end if
end function
function ConfigureProject()
dim szProjectName
szProjectName = Inputbox("Please Input Project Name:", szPrompt)
if szProjectName = "" then
Wscript.quit
end if
if (0 = strcomp(szProjectName, "HelloWorld", 1) or 0 = strcomp(szProjectName, "tests", 1)) then
msgRet = msgbox("Can not create a project named with "+szProjectName+", Please input again!", 1, szPrompt)
if (msgRet = 1) then
call ConfigureProject
end if
Wscript.quit
end if
if (fso.FolderExists(szProjectName)) then
else
fso.CreateFolder(szProjectName)
end if
dim qnxFolder
qnxFolder = szProjectName + "\qnx"
if (fso.FolderExists(qnxFolder)) then
msgRet = msgbox("The '"+szProjectName+"' project exists, can't override! Please input again!", 1, szPrompt)
if (msgRet = 1) then
call ConfigureProject
end if
Wcript.quit
end if
dim szSrcClass, szSrcQnx, szSrcResource
dim szDesClass, szDesQnx, szDesResource
szSrcClass = "HelloWorld\Classes"
szSrcQnx = "HelloWorld\qnx"
szSrcResource = "HelloWorld\Resource"
szDesClass = szProjectName+"\Classes"
szDesQnx = szProjectName+"\qnx"
szDesResource = szProjectName+"\Resource"
call CopyFolder(szSrcClass, szDesClass)
call CopyFolder(szSrcQnx, szDesQnx)
call CopyFolder(szSrcResource, szDesResource)
call ReplaceFileContent(szProjectName+"\qnx\bar-descriptor.xml", "HelloWorld", szProjectName)
call ReplaceFileContent(szProjectName+"\qnx\.project", "HelloWorld", szProjectName)
call ReplaceFileContent(szProjectName+"\qnx\.cproject", "HelloWorld", szProjectName)
call msgbox("Congratulations, the '"+szProjectName+"' project have been created successfully, please use QNX IDE to import the project!", 0, szPrompt)
end function
call ConfigureProject
Wscript.quit

View File

@ -1,39 +0,0 @@
set fso = Wscript.CreateObject("Scripting.FileSystemObject")
function ReplaceFileContent(fileName, oldStr, newStr)
set f = fso.opentextfile(fileName)
s = replace(f.readall, oldStr, newStr)
f.close
set r = fso.opentextfile(fileName, 2, true)
r.write s
end function
dim szProjectName
szProjectName = Inputbox("Please Input Project Name:", "Prompt")
if (fso.FolderExists(szProjectName)) then
else
fso.CreateFolder(szProjectName)
end if
dim qnxFolder
qnxFolder = szProjectName + "\qnx"
if (fso.FolderExists(qnxFolder)) then
msgbox("the project exists, can't override!")
Wscript.quit
else
fso.CreateFolder(qnxFolder)
end if
ret = fso.CopyFolder("HelloWorld\Classes", szProjectName+"\Classes")
ret = fso.CopyFolder("HelloWorld\qnx", szProjectName+"\qnx")
ret = fso.CopyFolder("HelloWorld\Resource", szProjectName+"\Resource")
call ReplaceFileContent(szProjectName+"\qnx\bar-descriptor.xml", "HelloWorld", szProjectName)
call ReplaceFileContent(szProjectName+"\qnx\.project", "HelloWorld", szProjectName)
call ReplaceFileContent(szProjectName+"\qnx\.cproject", "HelloWorld", szProjectName)
Wscript.quit

View File

@ -2,7 +2,7 @@
echo 'cocos2d-x template installer' echo 'cocos2d-x template installer'
COCOS2D_VER='cocos2d-1.0.1-x-0.10.0' COCOS2D_VER='cocos2d-1.0.1-x-0.11.0'
BASE_TEMPLATE_DIR="/Library/Application Support/Developer/Shared/Xcode" BASE_TEMPLATE_DIR="/Library/Application Support/Developer/Shared/Xcode"
BASE_TEMPLATE_USER_DIR="$HOME/Library/Application Support/Developer/Shared/Xcode" BASE_TEMPLATE_USER_DIR="$HOME/Library/Application Support/Developer/Shared/Xcode"

View File

@ -1 +1 @@
fa585bcfe80466bd38886af03a16751b439570ad 9cfad9940e7c5ab477855e3c4364e2df0274e878

View File

@ -33,7 +33,7 @@ move_files_into_android(){
copy_cpp_h_from_helloworld(){ copy_cpp_h_from_helloworld(){
mkdir $APP_DIR/Classes mkdir $APP_DIR/Classes
for file in `ls $HELLOWORLD_ROOT/Classes/* | grep -E '.*\.[cpp|h|mk]' ` for file in `ls $HELLOWORLD_ROOT/Classes/* | grep -E '.*\.(cpp|h|mk)' `
do do
if [ -f $file ];then if [ -f $file ];then
cp $file $APP_DIR/Classes cp $file $APP_DIR/Classes

View File

@ -38,7 +38,7 @@ move_eclipse_configures_into(){
sed -i "s/HelloWorld/$APP_NAME/" $APP_DIR/Linux/.project sed -i "s/HelloWorld/$APP_NAME/" $APP_DIR/Linux/.project
sed -i "s:\.\./\.\./\.\./:$COCOS2DX_ROOT:;s:helloworld:$APP_NAME:" $APP_DIR/Linux/.cproject sed -i "s/HelloWorld/$APP_NAME/" $APP_DIR/Linux/.cproject
} }
move_files_into_linux move_files_into_linux

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -0,0 +1 @@
a09f5a5c10a2c292e53273fe9bb93c1b711a3787

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -0,0 +1 @@
a09f5a5c10a2c292e53273fe9bb93c1b711a3787

View File

@ -0,0 +1 @@
5fe89fb5bd58cedf13b0363f97b20e3ea7ff255d

View File

@ -0,0 +1 @@
5fe89fb5bd58cedf13b0363f97b20e3ea7ff255d

View File

@ -0,0 +1 @@
5fe89fb5bd58cedf13b0363f97b20e3ea7ff255d

View File

@ -0,0 +1 @@
5fe89fb5bd58cedf13b0363f97b20e3ea7ff255d

View File

@ -0,0 +1 @@
5fe89fb5bd58cedf13b0363f97b20e3ea7ff255d

View File

@ -1,11 +1,2 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system use,
# "build.properties", and override values to adapt the script to your
# project structure.
# Project target. # Project target.
target=android-7 target=android-7

View File

@ -1,26 +1,26 @@
/* AUTO-GENERATED FILE. DO NOT MODIFY. /* AUTO-GENERATED FILE. DO NOT MODIFY.
* *
* This class was automatically generated by the * This class was automatically generated by the
* aapt tool from the resource data it found. It * aapt tool from the resource data it found. It
* should not be modified by hand. * should not be modified by hand.
*/ */
package org.cocos2dx.tests; package org.cocos2dx.tests;
public final class R { public final class R {
public static final class attr { public static final class attr {
} }
public static final class drawable { public static final class drawable {
public static final int icon=0x7f020000; public static final int icon=0x7f020000;
} }
public static final class id { public static final class id {
public static final int test_demo_gl_surfaceview=0x7f050001; public static final int test_demo_gl_surfaceview=0x7f050001;
public static final int textField=0x7f050000; public static final int textField=0x7f050000;
} }
public static final class layout { public static final class layout {
public static final int test_demo=0x7f030000; public static final int test_demo=0x7f030000;
} }
public static final class string { public static final class string {
public static final int app_name=0x7f040000; public static final int app_name=0x7f040000;
} }
} }

View File

@ -175,6 +175,14 @@ public class Cocos2dxMusic {
} }
public void setBackgroundVolume(float volume){ public void setBackgroundVolume(float volume){
if (volume < 0.0f){
volume = 0.0f;
}
if (volume > 1.0f){
volume = 1.0f;
}
this.mLeftVolume = this.mRightVolume = volume; this.mLeftVolume = this.mRightVolume = volume;
if (this.mBackgroundMediaPlayer != null){ if (this.mBackgroundMediaPlayer != null){
this.mBackgroundMediaPlayer.setVolume(this.mLeftVolume, this.mRightVolume); this.mBackgroundMediaPlayer.setVolume(this.mLeftVolume, this.mRightVolume);

View File

@ -0,0 +1 @@
2aa7c4f2261f68cadfdb9d65c1b9291a58f98d15

View File

@ -0,0 +1 @@
a9cf0424744f0676e91af84a9ba593790d18ccc4

View File

@ -0,0 +1 @@
9ba2234125d78810b9358b4af48cba1c8cfe523e

View File

@ -0,0 +1 @@
2aa7c4f2261f68cadfdb9d65c1b9291a58f98d15

View File

@ -20,20 +20,25 @@
<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.699705174." name="/" resourcePath=""> <folderInfo id="cdt.managedbuild.config.gnu.exe.debug.699705174." name="/" resourcePath="">
<toolChain errorParsers="" id="cdt.managedbuild.toolchain.gnu.exe.debug.841204785" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug"> <toolChain errorParsers="" id="cdt.managedbuild.toolchain.gnu.exe.debug.841204785" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.exe.debug.1771431107" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/> <targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.exe.debug.1771431107" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
<builder buildPath="${workspace_loc:/cocos2dx-test/Debug}" errorParsers="org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.CWDLocator" id="cdt.managedbuild.target.gnu.builder.exe.debug.692013632" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/> <builder buildPath="${workspace_loc:/cocos2dx-test/Debug}" errorParsers="org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.CWDLocator" id="cdt.managedbuild.target.gnu.builder.exe.debug.692013632" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.debug">
<outputEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name="Debug"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name="Release"/>
</outputEntries>
</builder>
<tool commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} -Wl,-rpath,../../cocos2dx/proj.linux/${ConfigName} -Wl,-rpath,../../CocosDenshion/proj.linux/${ConfigName}" id="cdt.managedbuild.tool.gnu.archiver.base.823571804" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/> <tool commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} -Wl,-rpath,../../cocos2dx/proj.linux/${ConfigName} -Wl,-rpath,../../CocosDenshion/proj.linux/${ConfigName}" id="cdt.managedbuild.tool.gnu.archiver.base.823571804" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
<tool command="g++" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.405614352" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug"> <tool command="g++" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.405614352" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.248343481" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/> <option id="gnu.cpp.compiler.exe.debug.option.optimization.level.248343481" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.exe.debug.option.debugging.level.634257735" name="Debug Level" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/> <option id="gnu.cpp.compiler.exe.debug.option.debugging.level.634257735" name="Debug Level" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.include.paths.1707443626" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath"> <option id="gnu.cpp.compiler.option.include.paths.1707443626" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="../../"/> <listOptionValue builtIn="false" value="../../"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux"/> <listOptionValue builtIn="false" value="../../../"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/include"/>
<listOptionValue builtIn="false" value="../../../cocos2dx"/> <listOptionValue builtIn="false" value="../../../cocos2dx"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/include"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/platform"/> <listOptionValue builtIn="false" value="../../../cocos2dx/platform"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux"/>
<listOptionValue builtIn="false" value="../../../CocosDenshion/include"/> <listOptionValue builtIn="false" value="../../../CocosDenshion/include"/>
<listOptionValue builtIn="false" value="../../../chipmunk/include/chipmunk"/> <listOptionValue builtIn="false" value="../../../chipmunk/include/chipmunk"/>
<listOptionValue builtIn="false" value="../../../"/>
</option> </option>
<option id="gnu.cpp.compiler.option.preprocessor.def.331369055" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols"> <option id="gnu.cpp.compiler.option.preprocessor.def.331369055" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
<listOptionValue builtIn="false" value="LINUX"/> <listOptionValue builtIn="false" value="LINUX"/>
@ -43,16 +48,7 @@
<tool command="gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.2041247495" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug"> <tool command="gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.2041247495" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug">
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.1013157776" name="Optimization Level" superClass="gnu.c.compiler.exe.debug.option.optimization.level" valueType="enumerated"/> <option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.1013157776" name="Optimization Level" superClass="gnu.c.compiler.exe.debug.option.optimization.level" valueType="enumerated"/>
<option id="gnu.c.compiler.exe.debug.option.debugging.level.216261172" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/> <option id="gnu.c.compiler.exe.debug.option.debugging.level.216261172" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.1705967553" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"> <option id="gnu.c.compiler.option.include.paths.1705967553" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/cocos2dx-base/platform/third_party/linux}&quot;"/>
<listOptionValue builtIn="false" value="../CocosDenshion/include"/>
<listOptionValue builtIn="false" value="../cocos2dx/include"/>
<listOptionValue builtIn="false" value="../cocos2dx"/>
<listOptionValue builtIn="false" value="../cocos2dx/platform"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/cocos2d-x/chipmunk/include/chipmunk}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/cocos2d-x/Box2D}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/cocos2d-x/tests}&quot;"/>
</option>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.305684306" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols"> <option id="gnu.c.compiler.option.preprocessor.def.symbols.305684306" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="LINUX"/> <listOptionValue builtIn="false" value="LINUX"/>
</option> </option>
@ -68,13 +64,13 @@
<listOptionValue builtIn="false" value="cocosdenshion"/> <listOptionValue builtIn="false" value="cocosdenshion"/>
</option> </option>
<option id="gnu.cpp.link.option.paths.335055881" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths"> <option id="gnu.cpp.link.option.paths.335055881" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
<listOptionValue builtIn="false" value="&quot;../../../cocos2dx/proj.linux/${ConfigName}&quot;"/> <listOptionValue builtIn="false" value="../../../cocos2dx/proj.linux/${ConfigName}"/>
<listOptionValue builtIn="false" value="../../../CocosDenshion/proj.linux/${ConfigName}"/>
<listOptionValue builtIn="false" value="../../../CocosDenshion/third_party/fmod/api/lib"/> <listOptionValue builtIn="false" value="../../../CocosDenshion/third_party/fmod/api/lib"/>
<listOptionValue builtIn="false" value="&quot;../../../CocosDenshion/proj.linux/${ConfigName}&quot;"/>
</option> </option>
<option id="gnu.cpp.link.option.userobjs.1021852674" name="Other objects" superClass="gnu.cpp.link.option.userobjs" valueType="userObjs"> <option id="gnu.cpp.link.option.userobjs.1021852674" name="Other objects" superClass="gnu.cpp.link.option.userobjs" valueType="userObjs">
<listOptionValue builtIn="false" value="&quot;../../../chipmunk/proj.linux/${ConfigName}/libchipmunk.a&quot;"/> <listOptionValue builtIn="false" value="../../../chipmunk/proj.linux/${ConfigName}/libchipmunk.a"/>
<listOptionValue builtIn="false" value="&quot;../../../Box2D/proj.linux/${ConfigName}/libBox2D.a&quot;"/> <listOptionValue builtIn="false" value="../../../Box2D/proj.linux/${ConfigName}/libBox2D.a"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libcurl.a"/> <listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libcurl.a"/>
</option> </option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.280033790" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input"> <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.280033790" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
@ -83,12 +79,23 @@
</inputType> </inputType>
</tool> </tool>
<tool command="as" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GASErrorParser" id="cdt.managedbuild.tool.gnu.assembler.exe.debug.844668943" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug"> <tool command="as" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GASErrorParser" id="cdt.managedbuild.tool.gnu.assembler.exe.debug.844668943" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug">
<option id="gnu.both.asm.option.include.paths.1555644609" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="/home/dumganhar/project/cocos2d-x/tests/"/>
<listOptionValue builtIn="false" value="/home/dumganhar/project/cocos2d-x/"/>
<listOptionValue builtIn="false" value="/home/dumganhar/project/cocos2d-x/cocos2dx"/>
<listOptionValue builtIn="false" value="/home/dumganhar/project/cocos2d-x/cocos2dx/include"/>
<listOptionValue builtIn="false" value="/home/dumganhar/project/cocos2d-x/cocos2dx/platform"/>
<listOptionValue builtIn="false" value="/home/dumganhar/project/cocos2d-x/cocos2dx/platform/third_party/linux"/>
<listOptionValue builtIn="false" value="/home/dumganhar/project/cocos2d-x/CocosDenshion/include"/>
<listOptionValue builtIn="false" value="/home/dumganhar/project/cocos2d-x/chipmunk/include/chipmunk"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1269039546" superClass="cdt.managedbuild.tool.gnu.assembler.input"/> <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1269039546" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool> </tool>
</toolChain> </toolChain>
</folderInfo> </folderInfo>
<sourceEntries> <sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> <entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="tests"/>
<entry excluding="tests" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/>
</sourceEntries> </sourceEntries>
</configuration> </configuration>
</storageModule> </storageModule>
@ -119,13 +126,13 @@
<option id="gnu.cpp.compiler.exe.release.option.debugging.level.452676886" name="Debug Level" superClass="gnu.cpp.compiler.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/> <option id="gnu.cpp.compiler.exe.release.option.debugging.level.452676886" name="Debug Level" superClass="gnu.cpp.compiler.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.include.paths.219173285" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath"> <option id="gnu.cpp.compiler.option.include.paths.219173285" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="../../"/> <listOptionValue builtIn="false" value="../../"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/include"/>
<listOptionValue builtIn="false" value="../../../cocos2dx"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/platform"/>
<listOptionValue builtIn="false" value="../../../CocosDenshion/include"/>
<listOptionValue builtIn="false" value="../../..//chipmunk/include/chipmunk"/>
<listOptionValue builtIn="false" value="../../../"/> <listOptionValue builtIn="false" value="../../../"/>
<listOptionValue builtIn="false" value="../../../cocos2dx"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/include"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/platform"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux"/>
<listOptionValue builtIn="false" value="../../../CocosDenshion/include"/>
<listOptionValue builtIn="false" value="../../../chipmunk/include/chipmunk"/>
</option> </option>
<option id="gnu.cpp.compiler.option.preprocessor.def.2022262883" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols"> <option id="gnu.cpp.compiler.option.preprocessor.def.2022262883" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
<listOptionValue builtIn="false" value="LINUX"/> <listOptionValue builtIn="false" value="LINUX"/>
@ -135,16 +142,7 @@
<tool errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.1494845250" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release"> <tool errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.1494845250" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release">
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.1213583313" name="Optimization Level" superClass="gnu.c.compiler.exe.release.option.optimization.level" value="gnu.c.optimization.level.none" valueType="enumerated"/> <option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.1213583313" name="Optimization Level" superClass="gnu.c.compiler.exe.release.option.optimization.level" value="gnu.c.optimization.level.none" valueType="enumerated"/>
<option id="gnu.c.compiler.exe.release.option.debugging.level.222853384" name="Debug Level" superClass="gnu.c.compiler.exe.release.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/> <option id="gnu.c.compiler.exe.release.option.debugging.level.222853384" name="Debug Level" superClass="gnu.c.compiler.exe.release.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.1626903439" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"> <option id="gnu.c.compiler.option.include.paths.1626903439" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/cocos2dx-base/platform/third_party/linux}&quot;"/>
<listOptionValue builtIn="false" value="../CocosDenshion/include"/>
<listOptionValue builtIn="false" value="../cocos2dx/include"/>
<listOptionValue builtIn="false" value="../cocos2dx"/>
<listOptionValue builtIn="false" value="../cocos2dx/platform"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/cocos2d-x/chipmunk/include/chipmunk}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/cocos2d-x/Box2D}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/cocos2d-x/tests}&quot;"/>
</option>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.794705780" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols"> <option id="gnu.c.compiler.option.preprocessor.def.symbols.794705780" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="LINUX"/> <listOptionValue builtIn="false" value="LINUX"/>
</option> </option>
@ -160,13 +158,13 @@
<listOptionValue builtIn="false" value="cocosdenshion"/> <listOptionValue builtIn="false" value="cocosdenshion"/>
</option> </option>
<option id="gnu.cpp.link.option.paths.2032137429" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths"> <option id="gnu.cpp.link.option.paths.2032137429" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
<listOptionValue builtIn="false" value="&quot;../../../cocos2dx/proj.linux/${ConfigName}&quot;"/> <listOptionValue builtIn="false" value="../../../cocos2dx/proj.linux/${ConfigName}"/>
<listOptionValue builtIn="false" value="../../../CocosDenshion/proj.linux/${ConfigName}"/>
<listOptionValue builtIn="false" value="../../../CocosDenshion/third_party/fmod/api/lib"/> <listOptionValue builtIn="false" value="../../../CocosDenshion/third_party/fmod/api/lib"/>
<listOptionValue builtIn="false" value="&quot;../../../CocosDenshion/proj.linux/${ConfigName}&quot;"/>
</option> </option>
<option id="gnu.cpp.link.option.userobjs.1558283777" name="Other objects" superClass="gnu.cpp.link.option.userobjs" valueType="userObjs"> <option id="gnu.cpp.link.option.userobjs.1558283777" name="Other objects" superClass="gnu.cpp.link.option.userobjs" valueType="userObjs">
<listOptionValue builtIn="false" value="&quot;../../../chipmunk/proj.linux/${ConfigName}/libchipmunk.a&quot;"/> <listOptionValue builtIn="false" value="../../../chipmunk/proj.linux/${ConfigName}/libchipmunk.a"/>
<listOptionValue builtIn="false" value="&quot;../../../Box2D/proj.linux/${ConfigName}/libBox2D.a&quot;"/> <listOptionValue builtIn="false" value="../../../Box2D/proj.linux/${ConfigName}/libBox2D.a"/>
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libcurl.a"/> <listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libcurl.a"/>
</option> </option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1573978538" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input"> <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1573978538" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
@ -180,7 +178,8 @@
</toolChain> </toolChain>
</folderInfo> </folderInfo>
<sourceEntries> <sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> <entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="tests"/>
<entry excluding="tests" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/>
</sourceEntries> </sourceEntries>
</configuration> </configuration>
</storageModule> </storageModule>

View File

@ -13,6 +13,10 @@
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name> <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers> <triggers>clean,full,incremental,</triggers>
<arguments> <arguments>
<dictionary>
<key>?children?</key>
<value>?name?=outputEntries\|?children?=?name?=entry\\\\\\\|\\\|?name?=entry\\\\\\\|\\\|\||</value>
</dictionary>
<dictionary> <dictionary>
<key>?name?</key> <key>?name?</key>
<value></value> <value></value>
@ -98,7 +102,7 @@
<link> <link>
<name>tests</name> <name>tests</name>
<type>2</type> <type>2</type>
<location>/home/xm/workspace/cocos2d-x/tests/tests</location> <locationURI>PARENT-1-PROJECT_LOC/tests</locationURI>
</link> </link>
</linkedResources> </linkedResources>
</projectDescription> </projectDescription>

View File

@ -1,56 +0,0 @@
#!/bin/bash
#arguments
#1 is the config name
#2 is the project name
#3 is the cocos2d sdk base folder
if [ $# -lt 3 ];then
echo "usage sh postCompiled.sh confi-gname project-name cocos2dx-root"
exit
fi
if [ ! -d "../../test.android/libs" ];then
mkdir ../../test.android/libs
fi
if [ ! -d "../../test.android/libs/armeabi" ];then
mkdir ../../test.android/libs/armeabi
fi
#move game lib into android/libs/armeabi
cp -f lib$2.so ../../test.android/libs/armeabi/
#move cocos2d lib into android/libs/armeabi
cp -f $3/cocos2dx/proj.linux/$1/lib*.so ../../test.android/libs/armeabi/
cp -f $3/CocosDenshion/proj.linux/$1/lib*.so ../../test.android/libs/armeabi/
cp -f $3/Box2D/proj.linux/$1/lib*.so ../../test.android/libs/armeabi/
cp -f $3/chipmunk/proj.linux/$1/lib*.so ../../test.android/libs/armeabi/
# copy resources, can not link. because we don't need some file
COCOS2DX_ROOT=../../..
TESTS_ROOT=$COCOS2DX_ROOT/tests/test.android
# make sure assets is exist
if [ -d $TESTS_ROOT/assets ]; then
rm -rf $TESTS_ROOT/assets
fi
mkdir $TESTS_ROOT/assets
# copy resources
for file in $COCOS2DX_ROOT/tests/Res/*
do
if [ -d $file ]; then
cp -rf $file $TESTS_ROOT/assets
fi
if [ -f $file ]; then
cp $file $TESTS_ROOT/assets
fi
done
# remove test_image_rgba4444.pvr.gz
rm -f $TESTS_ROOT/assets/Images/test_image_rgba4444.pvr.gz

View File

@ -151,19 +151,19 @@ void CocosDenshionTest::menuCallback(CCObject * pSender)
break; break;
// add bakcground music volume // add bakcground music volume
case 10: case 10:
SimpleAudioEngine::sharedEngine()->setBackgroundMusicVolume(SimpleAudioEngine::sharedEngine()->getBackgroundMusicVolume() + 0.1); SimpleAudioEngine::sharedEngine()->setBackgroundMusicVolume(SimpleAudioEngine::sharedEngine()->getBackgroundMusicVolume() + 0.1f);
break; break;
// sub backgroud music volume // sub backgroud music volume
case 11: case 11:
SimpleAudioEngine::sharedEngine()->setBackgroundMusicVolume(SimpleAudioEngine::sharedEngine()->getBackgroundMusicVolume() - 0.1); SimpleAudioEngine::sharedEngine()->setBackgroundMusicVolume(SimpleAudioEngine::sharedEngine()->getBackgroundMusicVolume() - 0.1f);
break; break;
// add effects volume // add effects volume
case 12: case 12:
SimpleAudioEngine::sharedEngine()->setEffectsVolume(SimpleAudioEngine::sharedEngine()->getEffectsVolume() + 0.1); SimpleAudioEngine::sharedEngine()->setEffectsVolume(SimpleAudioEngine::sharedEngine()->getEffectsVolume() + 0.1f);
break; break;
// sub effects volume // sub effects volume
case 13: case 13:
SimpleAudioEngine::sharedEngine()->setEffectsVolume(SimpleAudioEngine::sharedEngine()->getEffectsVolume() - 0.1); SimpleAudioEngine::sharedEngine()->setEffectsVolume(SimpleAudioEngine::sharedEngine()->getEffectsVolume() - 0.1f);
break; break;
case 14: case 14:
SimpleAudioEngine::sharedEngine()->pauseEffect(m_nSoundId); SimpleAudioEngine::sharedEngine()->pauseEffect(m_nSoundId);

View File

@ -24,8 +24,6 @@ public:
virtual void ccTouchesEnded(CCSet *pTouches, CCEvent *pEvent); virtual void ccTouchesEnded(CCSet *pTouches, CCEvent *pEvent);
virtual void ccTouchesCancelled(CCSet *pTouches, CCEvent *pEvent); virtual void ccTouchesCancelled(CCSet *pTouches, CCEvent *pEvent);
CCTouchDelegate();
void registerScriptTouchHandler(int eventType, const char* pszScriptFunctionName); void registerScriptTouchHandler(int eventType, const char* pszScriptFunctionName);
bool isScriptHandlerExist(int eventType); bool isScriptHandlerExist(int eventType);
void excuteScriptTouchHandler(int eventType, CCTouch *pTouch); void excuteScriptTouchHandler(int eventType, CCTouch *pTouch);
@ -48,7 +46,7 @@ public:
class CCTargetedTouchDelegate : public CCTouchDelegate class CCTargetedTouchDelegate : public CCTouchDelegate
{ {
public: public:
CCTargetedTouchDelegate();
/** Return YES to claim the touch. /** Return YES to claim the touch.
@since v0 @since v0
*/ */
@ -67,7 +65,6 @@ public:
class CCStandardTouchDelegate : public CCTouchDelegate class CCStandardTouchDelegate : public CCTouchDelegate
{ {
public: public:
CCStandardTouchDelegate();
// optional // optional
virtual void ccTouchesBegan(CCSet *pTouches, CCEvent *pEvent); virtual void ccTouchesBegan(CCSet *pTouches, CCEvent *pEvent);
virtual void ccTouchesMoved(CCSet *pTouches, CCEvent *pEvent); virtual void ccTouchesMoved(CCSet *pTouches, CCEvent *pEvent);