Skip to content

Commit

Permalink
Merge branch 'touchTicTacTenPrepGitHub'
Browse files Browse the repository at this point in the history
  • Loading branch information
John Murray committed Feb 13, 2013
2 parents 5d15366 + 9c4795d commit 8d25bba
Show file tree
Hide file tree
Showing 15 changed files with 301 additions and 207 deletions.
186 changes: 77 additions & 109 deletions TouchTicTacTen/.cproject

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions TouchTicTacTen/.project
Expand Up @@ -62,6 +62,11 @@
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>com.rim.tad.tools.wst.jsdt.core.javascriptValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
Expand Down
33 changes: 33 additions & 0 deletions TouchTicTacTen/.settings/org.eclipse.cdt.core.prefs
@@ -0,0 +1,33 @@
eclipse.preferences.version=1
environment/project/com.qnx.qcc.toolChain.1734555494/CPULIST/delimiter=,
environment/project/com.qnx.qcc.toolChain.1734555494/CPULIST/operation=append
environment/project/com.qnx.qcc.toolChain.1734555494/CPULIST/value=x86
environment/project/com.qnx.qcc.toolChain.1734555494/VARIANTLIST/delimiter=,
environment/project/com.qnx.qcc.toolChain.1734555494/VARIANTLIST/operation=append
environment/project/com.qnx.qcc.toolChain.1734555494/VARIANTLIST/value=g
environment/project/com.qnx.qcc.toolChain.1734555494/append=true
environment/project/com.qnx.qcc.toolChain.1734555494/appendContributed=true
environment/project/com.qnx.qcc.toolChain.438719540/CPULIST/delimiter=,
environment/project/com.qnx.qcc.toolChain.438719540/CPULIST/operation=append
environment/project/com.qnx.qcc.toolChain.438719540/CPULIST/value=arm
environment/project/com.qnx.qcc.toolChain.438719540/EXCLUDE_VARIANTLIST/delimiter=,
environment/project/com.qnx.qcc.toolChain.438719540/EXCLUDE_VARIANTLIST/operation=append
environment/project/com.qnx.qcc.toolChain.438719540/EXCLUDE_VARIANTLIST/value=r
environment/project/com.qnx.qcc.toolChain.438719540/append=true
environment/project/com.qnx.qcc.toolChain.438719540/appendContributed=true
environment/project/com.qnx.qcc.toolChain.681787606/CPULIST/delimiter=,
environment/project/com.qnx.qcc.toolChain.681787606/CPULIST/operation=append
environment/project/com.qnx.qcc.toolChain.681787606/CPULIST/value=arm
environment/project/com.qnx.qcc.toolChain.681787606/VARIANTLIST/delimiter=,
environment/project/com.qnx.qcc.toolChain.681787606/VARIANTLIST/operation=append
environment/project/com.qnx.qcc.toolChain.681787606/VARIANTLIST/value=g
environment/project/com.qnx.qcc.toolChain.681787606/append=true
environment/project/com.qnx.qcc.toolChain.681787606/appendContributed=true
environment/project/com.qnx.qcc.toolChain.768170920/CPULIST/delimiter=,
environment/project/com.qnx.qcc.toolChain.768170920/CPULIST/operation=append
environment/project/com.qnx.qcc.toolChain.768170920/CPULIST/value=arm
environment/project/com.qnx.qcc.toolChain.768170920/EXCLUDE_VARIANTLIST/delimiter=,
environment/project/com.qnx.qcc.toolChain.768170920/EXCLUDE_VARIANTLIST/operation=append
environment/project/com.qnx.qcc.toolChain.768170920/EXCLUDE_VARIANTLIST/value=p
environment/project/com.qnx.qcc.toolChain.768170920/append=true
environment/project/com.qnx.qcc.toolChain.768170920/appendContributed=true
35 changes: 3 additions & 32 deletions TouchTicTacTen/Makefile
@@ -1,35 +1,6 @@
QMAKE_TARGET = TouchTicTacTen
QMAKE = $(QNX_HOST)/usr/bin/qmake
TARGET = $(QMAKE_TARGET)
PROJECT_DIR := $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)))
I18N_DIR := $(PROJECT_DIR)/translations

include mk/cs-base.mk

all: Makefile $(QMAKE_TARGET)

clean:
$(MAKE) -C ./arm -f Makefile sureclean
$(MAKE) -C ./x86 -f Makefile sureclean


Makefile: FORCE
$(QMAKE) -spec unsupported/blackberry-armv7le-qcc -o arm/Makefile $(QMAKE_TARGET).pro CONFIG+=device
$(QMAKE) -spec unsupported/blackberry-x86-qcc -o x86/Makefile $(QMAKE_TARGET).pro CONFIG+=simulator
$(MAKE) -C ./translations -f Makefile update release

FORCE:

$(QMAKE_TARGET): device simulator

device:
$(MAKE) -C ./arm -f Makefile all

Device-Debug: Makefile
$(MAKE) -C ./arm -f Makefile debug

Device-Release: Makefile
$(MAKE) -C ./arm -f Makefile release

simulator:
$(MAKE) -C ./x86 -f Makefile all

Simulator-Debug: Makefile
$(MAKE) -C ./x86 -f Makefile debug
13 changes: 8 additions & 5 deletions TouchTicTacTen/README.md
Expand Up @@ -2,14 +2,14 @@

The purpose of this application is to demonstrate how NFC peer to peer mode can be used in games. This is known as "Proximity Gaming".

Note that there is a Java version of this application for BlackBerry 7.1 devices and games can be played between Blackberry 7 devices and BlackBerry 10 devices. See https://github.com/blackberry/Samples-for-Java/tree/master/NFC/TouchTicTacToe
Note that there is a Java version of this application for BlackBerry 7.1 devices and games can be played between Blackberry 7 devices and BlackBerry 10 devices. See [BlackBerry 7 version](https://github.com/blackberry/Samples-for-Java/tree/master/NFC/TouchTicTacToe)

The sample code for this application is Open Source under
the [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0.html).

**Applies To**

* [Cascades for BlackBerry 10](https://bdsc.webapps.blackberry.com/cascades/)
* [Cascades for BlackBerry 10](https://developer.blackberry.com/cascades/)
* [BlackBerry Native SDK](http://developer.blackberry.com/native/)

**Author(s)**
Expand All @@ -19,23 +19,26 @@ the [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0.html).


**Release History**

* **V1.0.2** - Support for latest NDK ( Gold) and 720x720 screen size
* **V1** - Initial release

**Known Issues**
1. To start a new game it may be necessary to exit and then start again

**Dependencies**

1. BlackBerry Dev Alpha Device Software **10.0.9**
2. BlackBerry 10 Native SDK **10.0.9**
1. BlackBerry 10 Device Software **10.0.9**
2. BlackBerry 10 Native SDK **10.0.9** (Gold)


**I don't want to build it myself**

If you don't want to build this sample application yourself we've included a
pre-build and signed BAR files for each version. You can find them in the
pre-build and signed BAR file for each version. You can find them in the
folder "installable-bar-files":

* **TouchTicTacTen-1\_0\_2\_18.bar** -- Signed BAR file for Version 1.0.2 (V1.0.2) of the application ( requires BlackBerry 10 Software 10.0.9 )

**To contribute code to this repository you must be [signed up as an
official contributor](http://blackberry.github.com/howToContribute.html).**
Expand Down
51 changes: 3 additions & 48 deletions TouchTicTacTen/TouchTicTacTen.pro
@@ -1,51 +1,6 @@
TEMPLATE = app
TARGET = TouchTicTacTen
APP_NAME = TouchTicTacTen

CONFIG += qt warn_on debug_and_release cascades

INCLUDEPATH += ../src
SOURCES += ../src/*.cpp
HEADERS += ../src/*.hpp ../src/*.h
CONFIG += qt warn_on cascades10
LIBS += -lnfc -lnfc_bps

lupdate_inclusion {
SOURCES += ../assets/*.qml
}

device {
CONFIG(release, debug|release) {
DESTDIR = o.le-v7
}
CONFIG(debug, debug|release) {
DESTDIR = o.le-v7-g
}
}

simulator {
CONFIG(release, debug|release) {
DESTDIR = o
}
CONFIG(debug, debug|release) {
DESTDIR = o-g
}
}

OBJECTS_DIR = $${DESTDIR}/.obj
MOC_DIR = $${DESTDIR}/.moc
RCC_DIR = $${DESTDIR}/.rcc
UI_DIR = $${DESTDIR}/.ui

suredelete.target = sureclean
suredelete.commands = $(DEL_FILE) $${MOC_DIR}/*; $(DEL_FILE) $${RCC_DIR}/*; $(DEL_FILE) $${UI_DIR}/*
suredelete.depends = distclean

QMAKE_EXTRA_TARGETS += suredelete

TRANSLATIONS = \
$${TARGET}_en_GB.ts \
$${TARGET}_fr.ts \
$${TARGET}_it.ts \
$${TARGET}_de.ts \
$${TARGET}_es.ts \
$${TARGET}.ts

include(config.pri)
122 changes: 122 additions & 0 deletions TouchTicTacTen/assets/720x720/main.qml
@@ -0,0 +1,122 @@
/* Copyright (c) 2012 Research In Motion Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/import bb.cascades 1.0

Page {
Container {
background: backgroundPaint.imagePaint
attachedObjects: [
ImagePaintDefinition {
id: backgroundPaint
imageSource: "asset:///images/background.png"
}
]
layout: StackLayout {
}
Container {
layout: StackLayout {
orientation: LayoutOrientation.LeftToRight
}
horizontalAlignment: HorizontalAlignment.Center
Label {
text: "Touch Tic Tac Toe:"
textStyle {
base: SystemDefaults.TextStyles.TitleText
fontWeight: FontWeight.Bold
color: Color.create("#E6E9F8")
}
layoutProperties: StackLayoutProperties {
}
}
Label {
id: propertytime

// ttt.numMoves is a property that we keep track on in cpp code
// every time it's changed the text will be updated.
text: " Moves: " + ttt.numMoves
textStyle {
base: SystemDefaults.TextStyles.TitleText
fontWeight: FontWeight.Bold
color: Color.create("#E6E9F8")
}
}
}
Label {
id: message

// ttt.message is a property that we keep track on in cpp code
// every time it's changed the text will be updated.
text: ttt.message
textStyle {
base: SystemDefaults.TextStyles.SubtitleText
fontWeight: FontWeight.Bold
color: Color.Yellow
}
layoutProperties: StackLayoutProperties {
}
horizontalAlignment: HorizontalAlignment.Center
}

// Here we group the containers player area, a background and a nice flare on top
Container {
layout: DockLayout {
}
layoutProperties: StackLayoutProperties {
}
horizontalAlignment: HorizontalAlignment.Center
//This container is the one we find from CPP and add all the tiles to
// It's so much easier to do that from C++.
Container {
objectName: "playArea"
//The dark gray is an average trick, we can use it to see where we put our player area when layouting.
background: Color.DarkGray
preferredWidth: 600
preferredHeight: preferredWidth
layout: StackLayout {
orientation: LayoutOrientation.LeftToRight
}
layoutProperties: StackLayoutProperties {
}
horizontalAlignment: HorizontalAlignment.Center
verticalAlignment: VerticalAlignment.Center
}
}
Container {
layout: StackLayout {
orientation: LayoutOrientation.LeftToRight
}
layoutProperties: StackLayoutProperties {
}
horizontalAlignment: HorizontalAlignment.Center
Button {
text: "Reset"
onClicked: {
ttt.resetTiles();
}
}
}
Label {
id: about1
text: "Martin Woolley (@mdwrim) and John Murray (@jcmrim) V1.02"
textStyle {
base: SystemDefaults.TextStyles.SmallText
fontWeight: FontWeight.Bold
color: Color.create("#E6E9F8")
}
layoutProperties: StackLayoutProperties {
}
horizontalAlignment: HorizontalAlignment.Center
}
}
}
2 changes: 1 addition & 1 deletion TouchTicTacTen/assets/main.qml
Expand Up @@ -111,7 +111,7 @@ Page {
}
Label {
id: about1
text: "Martin Woolley (@mdwrim) and John Murray (@jcmrim) V1.01"
text: "Martin Woolley (@mdwrim) and John Murray (@jcmrim) V1.02"
textStyle {
base: SystemDefaults.TextStyles.SmallText
fontWeight: FontWeight.Bold
Expand Down
23 changes: 12 additions & 11 deletions TouchTicTacTen/bar-descriptor.xml
Expand Up @@ -35,7 +35,7 @@
<!-- A string value of the format <0-999>.<0-999>.<0-999> that represents application version which can be used to check for application upgrade.
Values can also be 1-part or 2-part. It is not necessary to have a 3-part value.
An updated version of application must have a versionNumber value higher than the previous version. Required. -->
<versionNumber>1.0.0</versionNumber>
<versionNumber>1.0.2</versionNumber>
<buildIdFile>buildnum</buildIdFile>

<!-- Fourth digit segment of the package version. First three segments are taken from the
Expand All @@ -52,8 +52,8 @@
<!-- <copyright></copyright> -->

<!-- Name of author which is used for signing. Must match the developer name of your development certificate. -->
<author>Martin Woolley</author>
<authorId>gYAAgLMrXMtcNrv1o1MfhJyK8bg</authorId>
<author>John Murray</author>
<authorId>gYAAgFPCViUqswOvaRvSwB1Mf2w</authorId>

<!-- Unique author ID assigned by signing authority. Required if using debug tokens. -->
<!-- <authorId>ABC1234YjsnUk235h</authorId> -->
Expand All @@ -65,19 +65,20 @@

<!-- The category where the application appears. Either core.games or core.media. -->
<category>core.games</category>
<configuration id="com.qnx.qcc.toolChain.1415755867" name="Default">
<configuration name="Device-Debug">
<platformArchitecture>armle-v7</platformArchitecture>
<asset path="arm/o.le-v7-g/TouchTicTacTen" entry="true" type="Qnx/Elf">TouchTicTacTen</asset>
</configuration>
<configuration id="com.qnx.qcc.toolChain.380155920" name="Device-Debug">
<configuration name="Device-Release">
<entryPointType>Qnx/Cascades</entryPointType>
<platformArchitecture>armle-v7</platformArchitecture>
<asset path="arm/o.le-v7-g/TouchTicTacTen" entry="true" type="Qnx/Elf">TouchTicTacTen</asset>
<asset path="arm/o.le-v7/TouchTicTacTen.so" entry="true" type="Qnx/Elf">TouchTicTacTen.so</asset>
</configuration>
<configuration id="com.qnx.qcc.toolChain.665378728" name="Device-Release">
<configuration name="Device-Profile">
<platformArchitecture>armle-v7</platformArchitecture>
<asset path="arm/o.le-v7/TouchTicTacTen" entry="true" type="Qnx/Elf">TouchTicTacTen</asset>
<asset path="arm-p/o.le-v7-g/TouchTicTacTen" entry="true" type="Qnx/Elf">TouchTicTacTen</asset>
</configuration>
<configuration id="com.qnx.qcc.toolChain.1275528115" name="Simulator-Debug">
<configuration name="Simulator-Debug">
<platformArchitecture>x86</platformArchitecture>
<asset path="x86/o-g/TouchTicTacTen" entry="true" type="Qnx/Elf">TouchTicTacTen</asset>
</configuration>
Expand All @@ -98,8 +99,8 @@
<!-- Request permission to execute native code. Required for native applications. -->
<permission system="true">run_native</permission>
<env var="LD_LIBRARY_PATH" value="app/native/lib:/usr/lib/qt4/lib"/>
<invoke-target id="com.example.TouchTicTacTen.ndef">

<invoke-target id="com.example.TouchTicTacTen">
<require-source-permissions>invoke_across_perimeters</require-source-permissions>
<type>APPLICATION</type>
<filter>
Expand Down
1 change: 1 addition & 0 deletions TouchTicTacTen/buildnum
@@ -0,0 +1 @@
19

0 comments on commit 8d25bba

Please sign in to comment.