Permalink
Browse files

Merge branch 'next' of https://github.com/ablake/NDK-Samples into next

  • Loading branch information...
2 parents e9735e4 + d37f822 commit 8603510db4bc01d5ed688c23b3cfae4218284e12 @ablake ablake committed Dec 6, 2012
Showing with 325 additions and 233 deletions.
  1. +3 −0 .gitignore
  2. +137 −143 Gamepad/.cproject
  3. +84 −84 Gamepad/.project
  4. +3 −1 Gamepad/bar-descriptor.xml
  5. +2 −4 Gamepad/common.mk
  6. +56 −0 Gamepad/manifest.properties
  7. +40 −0 Gamepad/readme.txt
  8. +0 −1 Gamepad/x86/o/Makefile
View
@@ -44,6 +44,9 @@ GLES11Template/x86/o-g/GLES11Template
GLES20Template/arm/o.le-v7-g/GLES20Template
GLES20Template/arm/o.le-v7/GLES20Template
GLES20Template/x86/o-g/GLES20Template
+Gamepad/arm/o.le-v7-g/Gamepad
+Gamepad/arm/o.le-v7/Gamepad
+Gamepad/x86/o-g/Gamepad
Geolocation/arm/o.le-v7-g/Geolocation
Geolocation/arm/o.le-v7/Geolocation
Geolocation/x86/o-g/Geolocation
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -1,84 +1,84 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>Gamepad</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
- <triggers>clean,full,incremental,</triggers>
- <arguments>
- <dictionary>
- <key>?name?</key>
- <value></value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.append_environment</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.autoBuildTarget</key>
- <value>all</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.buildArguments</key>
- <value></value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.buildCommand</key>
- <value>make</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
- <value>clean</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.contents</key>
- <value>org.eclipse.cdt.make.core.activeConfigSettings</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
- <value>false</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.enableFullBuild</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.fullBuildTarget</key>
- <value>all</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.stopOnError</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
- <value>true</value>
- </dictionary>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
- <triggers>full,incremental,</triggers>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>com.qnx.tools.bbt.xml.core.bbtXMLValidationBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.cdt.core.cnature</nature>
- <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
- <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
- <nature>com.qnx.tools.ide.bbt.core.bbtnature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>Gamepad</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <triggers>clean,full,incremental,</triggers>
+ <arguments>
+ <dictionary>
+ <key>?name?</key>
+ <value></value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.append_environment</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.autoBuildTarget</key>
+ <value>all</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildArguments</key>
+ <value></value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildCommand</key>
+ <value>make</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
+ <value>clean</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.contents</key>
+ <value>org.eclipse.cdt.make.core.activeConfigSettings</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+ <value>false</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableFullBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.fullBuildTarget</key>
+ <value>all</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.stopOnError</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
+ <value>true</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+ <triggers>full,incremental,</triggers>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.qnx.tools.bbt.xml.core.bbtXMLValidationBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+ <nature>com.qnx.tools.ide.bbt.core.bbtnature</nature>
+ </natures>
+</projectDescription>
@@ -34,7 +34,7 @@
<!-- <authorId>ABC1234YjsnUk235h</authorId> -->
<initialWindow>
- <aspectRatio>landscape</aspectRatio>
+ <aspectRatio>landscape</aspectRatio>
<autoOrients>false</autoOrients>
<systemChrome>none</systemChrome>
<transparent>false</transparent>
@@ -43,6 +43,8 @@
<!-- The category where the application appears. Either core.games or core.media. -->
<category>core.games</category>
<asset path="icon.png">icon.png</asset>
+ <asset path="LICENSE">LICENSE</asset>
+ <asset path="NOTICE">NOTICE</asset>
<asset path="gamepad.png">gamepad.png</asset>
<configuration name="Device-Debug">
<platformArchitecture>armle-v7</platformArchitecture>
View
@@ -13,13 +13,11 @@ EXTRA_INCVPATH+=$(QNX_TARGET)/usr/include/freetype2 \
EXTRA_LIBVPATH+=$(QNX_TARGET)/../target-override/$(CPUVARDIR)/lib \
$(QNX_TARGET)/../target-override/$(CPUVARDIR)/usr/lib
-# Add USING_GL11 to build bbutil for gles 1.1 use
-CCFLAGS+=-DUSING_GL11
-
# Compiler options for enhanced security and recording the compiler options in release builds
CCFLAGS+=-fstack-protector-strong -D_FORTIFY_SOURCE=2 \
$(if $(filter g so shared,$(VARIANTS)),,-fPIE) \
- $(if $(filter g,$(VARIANTS)),,-frecord-gcc-switches)
+ $(if $(filter g,$(VARIANTS)),,-frecord-gcc-switches) \
+ -DUSING_GL11
# Linker options for enhanced security
LDFLAGS+=-Wl,-z,relro -Wl,-z,now $(if $(filter g so shared,$(VARIANTS)),,-pie)
@@ -0,0 +1,56 @@
+#
+# Project template manifest file. This provides input to the New Project Wizard
+# to direct the creation of a project from a template.
+#
+# This file is a Java properties file. The properties supported are:
+#
+# template.name - [required] The succinct name of the project template shown in the wizard
+# template.description - [required] A brief description of the project template
+# project.name - [required] The name of the example project that is created
+# icon - [optional] The icon file to generate and list in the bar-descriptor.xml.
+# Should be named "icon.png"
+# actions - [optional] Space-delimited list of the permissions required (actions performed)
+# by the application. The "run_native" action is implicit.
+# open.file - [Optional] The file to open in an editor when the project creation
+# is finished. Usually the bar-descriptor.xml (which is not in the
+# example storage folder!)
+# libs - [required] The libraries to which to link the project binary. Space-separated list.
+# sources - [required] The source files to add to the project. Space-separated list.
+# resources - [optional] Other non-source files to add to the project. Space-separated list.
+# readmes - [optional] Read-me files to add to the project but not packaged in the BAR.
+# Space-separated list.
+#
+# For the 'sources' and 'resources' lists, additional properties may optionally be defined
+# that map the files to destination paths in the project. Depending on the kind of project
+# that is created, these may be relative to some directory or other within the project (e.g.,
+# a 'src/' directory.
+#
+# These properties consist of 'path.' appended by the source file name. For example:
+#
+# resources: some-file.xml other-file.xml
+# path.some-file.xml: resources/config/main.xml
+# path.other-file.xml: resources/misc/stuff.xml
+#
+
+template.name: BlackBerry® 10 OS Example Gamepad Project
+template.description: Create a new BlackBerry® 10 OS Example project for working with gamepads.
+
+project.name: Gamepad
+
+icon: icon.png
+
+open.file: bar-descriptor.xml
+
+libs: bps screen EGL GLESv1_CM m png freetype
+
+sources: main.c bbutil.c bbutil.h
+
+flags.compiler: -DUSING_GL11
+
+resources: LICENSE NOTICE gamepad.png
+
+readmes: readme.txt
+
+orientation: landscape
+
+#actions:
View
@@ -0,0 +1,40 @@
+Gamepad - Handle and configure game controller events
+
+========================================================================
+Sample Description:
+
+The Gamepad sample is an application that demonstrates how to handle
+gamepad and joystick events. It can handle two connected game controllers
+at once.
+
+When an HID game controller is connected to the device, a collection of
+buttons and analog sticks representing the controller will be drawn.
+This "virtual" gamepad will react to input events from the controller.
+Tapping a virtual button on the screen, then pressing a physical button
+on the gamepad, allows the buttons to be re-assigned -- much like a game
+would allow players to change how it is controlled.
+
+Feature summary:
+- Discovery of gamepad and joystick devices which are already connnected.
+- Handling of controller connect and disconnect events.
+- Handling of controller input events.
+- Configuration of controller buttons.
+
+========================================================================
+Requirements:
+
+ - BlackBerry� 10 Native SDK
+ - One of the following:
+ - BlackBerry� 10 device
+ - BlackBerry� 10 simulator
+
+========================================================================
+Importing a project into the Native SDK:
+
+ 1. From the the Sample apps page, download and extract the sample application.
+ 2. Launch the Native SDK.
+ 3. On the File menu, click Import.
+ 4. Expand General, and select Existing Projects into Workspace. Click Next.
+ 5. Browse to the location where you extracted the sample app, and click OK.
+ The sample project should display in the the Projects section.
+ 6. Click Finish to import the project into your workspace.
View
@@ -1 +0,0 @@
-include ../../common.mk

0 comments on commit 8603510

Please sign in to comment.