Skip to content

Commit

Permalink
Github release
Browse files Browse the repository at this point in the history
  • Loading branch information
nandor committed Jun 18, 2014
0 parents commit 3491d8d
Show file tree
Hide file tree
Showing 47 changed files with 7,062 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
build/
112 changes: 112 additions & 0 deletions CMakeLists.txt
@@ -0,0 +1,112 @@
# This file is part of the Team 28 Project
# Licensing information can be found in the LICENSE file
# (C) 2014 The Team 28 Authors. All rights reserved.
cmake_minimum_required(VERSION 2.8)
project(PiFox)

set(SOURCES
kernel.s
math.s
mbox.s
gfx.s
ports.s
input.s
printf.s
game.s
bullets.s
objects.s
pillars.s
player.s
sound.s
rockets.s
enemies.s
assets/rock.s
assets/ship.s
assets/enemy.s
assets/rocket.s
)

SET(IMAGES
bullet.png
rocket.png
wrench.png
flare.png
mountains.png
tristan.png
monkey.png
pifox.png
)

set(ASFLAGS -march=armv6zk -mfpu=vfp -g --fatal-warnings)

# Determine toolchain
execute_process(COMMAND which arm-none-eabi-as OUTPUT_VARIABLE NONE_EABI_EXISTS)
message(STATUS ${NONE_EABI_EXISTS})
if(NONE_EABI_EXISTS STREQUAL "")
set(TOOLCHAIN arm-linux-gnueabi)
else()
set(TOOLCHAIN arm-none-eabi)
endif()

# Compile all images
foreach(file ${IMAGES})
get_filename_component(file_path ${file} PATH)
get_filename_component(file_name ${file} NAME_WE)

set(file "${file_name}")
set(object "${CMAKE_BINARY_DIR}/assets${file_path}/${file_name}.bin")
set(source "${CMAKE_SOURCE_DIR}/assets${file_path}/${file_name}.png")
get_filename_component(dir ${object} PATH)

file(MAKE_DIRECTORY ${dir})
add_custom_command(
OUTPUT ${object}
DEPENDS ${source}
COMMAND ${CMAKE_SOURCE_DIR}/imager.py ${source} --out=${object}
)

list(APPEND IMAGES_BIN ${object})
endforeach(file)

# Compile all sources
foreach(file ${SOURCES})
get_filename_component(file_path ${file} PATH)
get_filename_component(file_name ${file} NAME_WE)

set(file "${file_name}")
set(object "${CMAKE_BINARY_DIR}/${file_path}/${file_name}.o")
set(source "${CMAKE_SOURCE_DIR}/${file_path}/${file_name}.s")
get_filename_component(dir ${object} PATH)

file(MAKE_DIRECTORY ${dir})
add_custom_command(
OUTPUT ${object}
DEPENDS ${source} ${IMAGES_BIN} ${MAPS_BIN}
COMMAND ${TOOLCHAIN}-as
${ASFLAGS} ${source} -o ${object}
-I${CMAKE_SOURCE_DIR}/
)

list(APPEND OBJECTS ${object})
endforeach(file)

# Kernel elf file
set(KERNEL_ELF ${CMAKE_BINARY_DIR}/kernel.elf)
set(KERNEL_LD ${CMAKE_SOURCE_DIR}/kernel.ld)
set(KERNEL_BIN ${CMAKE_BINARY_DIR}/kernel.img)

# Build a binary file out of the elf
add_custom_target(
kernel ALL
DEPENDS ${KERNEL_ELF}
COMMAND ${TOOLCHAIN}-objcopy
-O binary ${KERNEL_ELF} ${KERNEL_BIN}
)

# Link objects into an elf file
add_custom_command(
OUTPUT ${KERNEL_ELF}
DEPENDS ${OBJECTS} ${KERNEL_LD}
COMMAND ${TOOLCHAIN}-ld
-T ${KERNEL_LD} ${OBJECTS} -o ${KERNEL_ELF}
)
1 change: 1 addition & 0 deletions assets/boost.bin

Large diffs are not rendered by default.

Binary file added assets/bullet.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/cantletyou.bin

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/corneria.bin

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/crash.bin

Large diffs are not rendered by default.

67 changes: 67 additions & 0 deletions assets/enemy.s
@@ -0,0 +1,67 @@
@ This file is part of the Team 28 Project
@ Licensing information can be found in the LICENSE file
@ (C) 2014 The Team 28 Authors. All rights reserved.
.global enemy_vtx
.global enemy_idx

@ ------------------------------------------------------------------------------
@ Enemy model
@ X Y Z 1.0
@ ------------------------------------------------------------------------------
.align 2
enemy_vtx:
.float 0.00, 0.75, 0.0, 1.0 @ 0
.float -0.75, 0.00, 0.0, 1.0 @ 1
.float 0.00, -0.75, 0.0, 1.0 @ 2
.float 0.75, 0.00, 0.0, 1.0 @ 3

.float -0.90, 0.90, 0.0, 1.0 @ 4
.float -0.90, -0.90, 0.0, 1.0 @ 5
.float 0.90, -0.90, 0.0, 1.0 @ 6
.float 0.90, 0.90, 0.0, 1.0 @ 7

.float 0.00, 0.00, 2.0, 1.0 @ 8

.float -0.60, 0.60, 1.0, 1.0 @ 9
.float -0.60, -0.60, 1.0, 1.0 @ 10
.float 0.60, -0.60, 1.0, 1.0 @ 11
.float 0.60, 0.60, 1.0, 1.0 @ 12

enemy_idx:
.long 0, 1, 8
.float 1.0, 0.2, 0.2
.long 1, 2, 8
.float 1.0, 0.2, 0.2
.long 2, 3, 8
.float 1.0, 0.2, 0.2
.long 3, 0, 8
.float 1.0, 0.2, 0.2

.long 1, 0, 9
.float 1.0, 0.7, 0.2
.long 0, 4, 9
.float 1.0, 0.7, 0.2
.long 4, 1, 9
.float 1.0, 0.7, 0.2

.long 2, 1, 10
.float 1.0, 0.7, 0.2
.long 1, 5, 10
.float 1.0, 0.7, 0.2
.long 5, 2, 10
.float 1.0, 0.7, 0.2

.long 3, 2, 11
.float 1.0, 0.7, 0.2
.long 2, 6, 11
.float 1.0, 0.7, 0.2
.long 6, 3, 11
.float 1.0, 0.7, 0.2

.long 0, 3, 12
.float 1.0, 0.7, 0.2
.long 7, 0, 12
.float 1.0, 0.7, 0.2
.long 3, 7, 12
.float 1.0, 0.7, 0.2

1 change: 1 addition & 0 deletions assets/fail.bin

Large diffs are not rendered by default.

Binary file added assets/flare.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/font.bin
Binary file not shown.
Binary file added assets/goodwork.bin
Binary file not shown.
1 change: 1 addition & 0 deletions assets/laser.bin

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/miss.bin
@@ -0,0 +1 @@
���������������������������������������������������~~~~~�������~|ywusrqrsux|��������~}{zzz{}�������~}|||{{{||}~������~~}}}}~�������~~}}~~�}{zzz{}~�������}zxwvvxz}��������������~~}|{{{{{|~����������������~~~~���������������������|yxxz{~���������~~������������~}|{{|}~��������~}}}~~~������������}||{{{|}��������������������{yvuvy}����������������������������|yxyz}��������zsnmqz��������zutvx|���������~{zyyyy{}�����������~}|{{zz{}�������}{{|~��}{zz{}��������{wuvx}����}||}�����������|yvttv{��������~xutvz�����zvtstw{��������}{yxwxy{}�����������~~}}|{{zzzz{}����������~}~~~|{{||}�������������~|zwuuvxz}�������}}~�������|zxxz}������|ywwxz|~���}|{z{~���������|yvuuvxy{}�����������}zyxxy{}���������}zxwxy{~������~}~�����������~}{yxxxy{}���~}}}�������zxvvwwxyz{|}~~}|zyz{}�����~�������|yvtrrrtvy}������{xuuvy|�������}zxvutuvwyzzzyxwwxz|~�����~}|||}~�����}zwustw|�������~|zyyyyz{|~��~|zyxz~�����{vttvy}�������{uqqsw{��������|yxy{}������|xutv}�������|xvvxz~�������|zy{|}~������������������}zxxy{}������������~|yvtuwz~�������������������|zz|��������|xutv{����������������~~~~�������������~{{~��������{yxy{��������~|zyz|����������}zyz}~|{{|||}�����������}zwvx|��������|yy{}�������������������|wsrsuy}������{y{~��������}yvux|����������~~�������~{{{{|~�������{wuuwy}�����~|{|��������}{{~����}||}~~�������������~����~}|{{|}~~}}}}}}||||}������������������|zyxxyz{}��������������������~{zz{}~������~~~��������~}}}~�����~{ywwy|��������~|}~�������~zwvuvwz}������|wuux{��������~~����}zxvvvvvxz}��~{yxxxy|���������}|}}���~zwuuuwy|����~|{|}~�����~}|zyy{~���|zyyyzz{}~~~����|yy}��������|wutty~������|yww{����~��~zxx{�����|yxz{||{zy{��~|~��zwx{���������}||||}�����~ywwz~��������~}}}{{{}~|ywx{|{y{�����{yxy{||z{}���~}~�|ywwy~���xuw{}~}yvwy|}zvuy~��}{{���{tsw���}{{}���|x}���|vy����xqu�����}}���vt|����}|����zy|����������}{{�������wsx����������}{����yor~���~|���~��������~z���}y|����~xx}����{y~��~||~�����yx�����yz����������zsqt|���������zux����������~yy~���{vz���}uy����}���~{{}����|~���~{{|~~|zz~��������~ywwy}�����|yz|~~{wx}���~ywy}��������zutx��|{~���}wsu{��}usz�����}|yurqsy���|y{����|z{~~ytrv}�}xw{���}yxy{{yxxxy}��~xtx�~xtv}���~yz|}}|ywz~��|urtw{}{zz~�������~|yvw}���|xutuwzz|�����|xz}~}�����yuuy������{xy}����������}~����||�����}{{{|~�������|~����������~}~�����������|z{��}{{������~}~~}}�����}{}��~����~ww{��~wuy�����~}����|y{���~xvz�}xux�����}xz��}yxz~���xuy����}}���|yxz�~{{���~vsu|���{|��yuw����{vw{~}ywy}���|z{~��~{|��~xtv}����xu|���{tt{��zy~���~ww}����~|}����{ww}���}|}���{wv{�����ww���yv|����}{~���{wz���~}~����{xy~����{z~���||����zvz�����}~|yz�����~���|y{�����{{~�����|y{���~}����{y{~����|z}�����~~���|z|����~xx���{w|����vqv����|z}����~~~��}~����~{|����|yz}��}|����}vv|����vru���wuz���|xy~���}xwz~�}|~����{x{��{{����}xx|~~~~����wru{~{vv|����|y{���|wz���xy���{wx}����������}zxy|����~{{{{||������yuw���zz��|ww~���|{����xuy�����|z|���~ww~���}{���wuy����|x{�������}z{~������vqv�����wtx���������}{z|����}wy����|z|����{{����{ux���xz����{y{�����zz}}||~����yqv����{~�����zx{��}~�����~uqqv|���������}~�������{y|����������wsw����������|xw}���������~xu{��}}}�����|tpu}���������}{{|����}����xw~���������zuqpv���������|tomqy��������zpkpy~|{�����{utw}��~{}����{tsx~��~yz���vrx���������yss{����~}}{wtrsw~��ztuy}���������vpqty����������{xxyzzwuw�����{y||ywwwvz������|wwxx{����~~��~{yz}����|z{~��~}�����{xy{|}{z�����~~~{zzz{~������|zyy|}}��������}}~|y{~��������}y|~��������������|utwy{|}}yw{|{}����������~�����}�����}vvzytruw{�����}z~�{y����������|xx~������zwwrqx��������~rqwz|������|wttvy{�����~zywsty}������|yyyxy}�����������zuux|~�����~~{xy||���������|z{~|wssv{�����xz��|srv|����������uos|�|xz~�����yrs{�ytw~����������������yx{||~����yuux|����������ytv}����������{ts{��|~�����}}{z}��||����~~�������}|}}zxxy{~���������~{{~�~}���������|ywy~���������}{xwz���~|���������~yx{}����|z~{yyusy��������{{z{����������ytx������~}~|urz��������~~}z{���|}����ysv{|yz�����~ywy||z|���~���wv|������~|}}xssy����|}�~xtstw{���������|tswyxz��������|utx{zwx|�������zy}�}xw|����������zvssw}��~������~{{|~���������|zyyz{}�������~~���||������|}����������{xvvy~��������}wuvx{||~�������{zz|}}~�������{wx|}||�����}yz|{z~��������}��������~}|yy{}�����~zxvw{}|~���������}ytqrw}���������yvwyyxyyy��������|xz|}~��������~~|{{||{~������}|}}}���~���{zz{~����|xwyyxy}���������}yxvx|��������{z{{wtx�������}}|z{�~�������}~������}|zyz{|~�������{xvvx{}��������|wwzz{~������}~{xy||{}�����������~}zwwz~�������}{z|}~�������{z|}|}���������{wwz|{}������~~���������{{}���������}|{zz{~������}|{{{|}}||������}}}{{��������~|zyz{|}~������}~�����~{z|���������{yyyyz}���������~����������zxxzzyy{|~������||}}|}��������~zy{|{}�������~|zy{~~~�������|zz|��������~}}|z{���~}}}||�������~}|{|}~~��������}zzyxy}������}z{|}~������������~}}|{{||}�����~zz{}~~���������~||}~������~{z{z{|�����~{{}~}}����������~{z||}�������|{}}|{{|������{z|~���������}{{yyz}������~}|{|}~������}}~��������~}{{}��������~|z{|||}��������~{yy|~���������~}}|{{}}~����������~}}�����~~~}{z|~~}~���������������~}}}}~��������~}|{{{|}�������}{{}~��������}|{{}��������~|{{{}~������~�������}||{|}~��������{z{|||}~�������������}||}~}}����������~~|yy|~�����������}|{xvvvx|~��������||||||~���������������|zxxx{}��������~~���~}~~�������|yxxyz|��������~~}||~~�������~������{z{{|~��������~~~������}|||}~������}||{{|~���������~}|{||}}}������}|}~�����������~}|}~}~�����~}{{|~~����}~��������~}~���~{z{|}}~~�������}{|}~~�������~}|{z|~~�����~}}}~�������������~~~~~~||}}}~~��~~~�������������~}}~~����~}}~~||}}}~~���������}|||{~����������}}~}}~~~�������������~}||{|}������~}~~~��~~���������}|{{|}~��������~||}}}~������~��������~|{}~~~��������������~~}~���������~}|{{}}}~������������������������~}}~������~~���������~}}~}~�����~~~~����������������~~�����~~~~~~���������~~���������~}~~~��������~~�������������~~}|}}~����������������~~~�����~~~~~������������}|{{|~��������~~~~~~}~~�������������~}||}}~��������~��~~���������~~}}}~~~������������������~}~���~~~~�����������~~}~~~������~~��~~������~}~���~~�������~~~~������~~~���~������~~����������~~~�����������~�������~~~�������������������~~~��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
Binary file added assets/monkey.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/mountains.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/pickup.bin

Large diffs are not rendered by default.

Binary file added assets/pifox.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 64 additions & 0 deletions assets/pillar.s
@@ -0,0 +1,64 @@
@ This file is part of the Team 28 Project
@ Licensing information can be found in the LICENSE file
@ (C) 2014 The Team 28 Authors. All rights reserved.
.global pillar_vtx
.global pillar_idx

@ ------------------------------------------------------------------------------
@ Cube model
@ X Y Z 1.0
@ ------------------------------------------------------------------------------
.align 2
pillar_vtx:
@ Front
.float -0.5, -0.5, 0.5, 1.0
.float 0.5, -0.5, 0.5, 1.0
.float 0.5, 0.5, 0.5, 1.0
.float -0.5, 0.5, 0.5, 1.0
@ Back
.float -0.5, -0.5, -0.5, 1.0
.float 0.5, -0.5, -0.5, 1.0
.float 0.5, 0.5, -0.5, 1.0
.float -0.5, 0.5, -0.5, 1.0
@ Top
.float 0.5, 0.5, -0.5, 1.0
.float -0.5, 0.5, -0.5, 1.0
.float -0.5, 0.5, 0.5, 1.0
.float 0.5, 0.5, 0.5, 1.0
@ Left
.float 0.5, -0.5, -0.5, 1.0
.float 0.5, 0.5, -0.5, 1.0
.float 0.5, 0.5, 0.5, 1.0
.float 0.5, -0.5, 0.5, 1.0
@ Right
.float -0.5, 0.5, -0.5, 1.0
.float -0.5, -0.5, -0.5, 1.0
.float -0.5, -0.5, 0.5, 1.0
.float -0.5, 0.5, 0.5, 1.0

pillar_idx:
.long 0, 1, 3
.float 0.5, 0.5, 0.5
.long 3, 1, 2
.float 0.5, 0.5, 0.5

.long 4, 7, 5
.float 0.5, 0.5, 0.5
.long 7, 6, 5
.float 0.5, 0.5, 0.5

.long 8, 9, 11
.float 0.5, 0.5, 0.5
.long 11, 9, 10
.float 0.5, 0.5, 0.5

.long 12, 13, 15
.float 0.5, 0.5, 0.5
.long 15, 13, 14
.float 0.5, 0.5, 0.5

.long 16, 17, 19
.float 0.5, 0.5, 0.5
.long 19, 17, 18
.float 0.5, 0.5, 0.5

148 changes: 148 additions & 0 deletions assets/rock.s
@@ -0,0 +1,148 @@
@ This file is part of the Team 28 Project
@ Licensing information can be found in the LICENSE file
@ (C) 2014 The Team 28 Authors. All rights reserved.
.global rock_vtx
.global rock_idx

@ ------------------------------------------------------------------------------
@ Rock model
@ X Y Z 1.0
@ ------------------------------------------------------------------------------
.align 2
rock_vtx:
.float 0.0, 0.75, 1.2135, 1.0
.float 0.0, 0.75, -1.2135, 1.0
.float 0.0, -0.75, 1.2135, 1.0
.float 0.0, -0.75, -1.2135, 1.0
.float 0.75, 1.2135, 0.0, 1.0
.float 0.75, -1.2135, 0.0, 1.0
.float -0.75, 1.2135, 0.0, 1.0
.float -0.75, -1.2135, 0.0, 1.0
.float 1.2135, 0.0, 0.75, 1.0
.float 1.2135, 0.0, -0.75, 1.0
.float -1.2135, 0.0, 0.75, 1.0
.float -1.2135, 0.0, -0.75, 1.0

rock_idx:
.long 0, 2, 8
.float 0.9, 0.2, 0.2
.long 10, 2, 0
.float 0.9, 0.2, 0.2
.long 0, 4, 6
.float 0.9, 0.2, 0.2
.long 8, 4, 0
.float 0.9, 0.2, 0.2
.long 0, 6, 10
.float 0.9, 0.2, 0.2
.long 1, 9, 3
.float 0.9, 0.2, 0.2
.long 11, 1, 3
.float 0.9, 0.2, 0.2
.long 4, 1, 6
.float 0.9, 0.2, 0.2
.long 9, 1, 4
.float 0.9, 0.2, 0.2
.long 6, 1, 11
.float 0.9, 0.2, 0.2
.long 2, 7, 5
.float 0.9, 0.2, 0.2
.long 5, 8, 2
.float 0.9, 0.2, 0.2
.long 10, 7, 2
.float 0.9, 0.2, 0.2
.long 7, 3, 5
.float 0.9, 0.2, 0.2
.long 3, 9, 5
.float 0.9, 0.2, 0.2
.long 11, 3, 7
.float 0.9, 0.2, 0.2
.long 4, 8, 9
.float 0.9, 0.2, 0.2
.long 5, 9, 8
.float 0.9, 0.2, 0.2
.long 11, 10, 6
.float 0.9, 0.2, 0.2
.long 10, 11, 7
.float 0.9, 0.2, 0.2

.long 0, 2, 8
.float 0.7, 0.5, 0.5
.long 10, 2, 0
.float 0.7, 0.5, 0.5
.long 0, 4, 6
.float 0.7, 0.5, 0.5
.long 8, 4, 0
.float 0.7, 0.5, 0.5
.long 0, 6, 10
.float 0.7, 0.5, 0.5
.long 1, 9, 3
.float 0.7, 0.5, 0.5
.long 11, 1, 3
.float 0.7, 0.5, 0.5
.long 4, 1, 6
.float 0.7, 0.5, 0.5
.long 9, 1, 4
.float 0.7, 0.5, 0.5
.long 6, 1, 11
.float 0.7, 0.5, 0.5
.long 2, 7, 5
.float 0.7, 0.5, 0.5
.long 5, 8, 2
.float 0.7, 0.5, 0.5
.long 10, 7, 2
.float 0.7, 0.5, 0.5
.long 7, 3, 5
.float 0.7, 0.5, 0.5
.long 3, 9, 5
.float 0.7, 0.5, 0.5
.long 11, 3, 7
.float 0.7, 0.5, 0.5
.long 4, 8, 9
.float 0.7, 0.5, 0.5
.long 5, 9, 8
.float 0.7, 0.5, 0.5
.long 11, 10, 6
.float 0.7, 0.5, 0.5
.long 10, 11, 7
.float 0.7, 0.5, 0.5

.long 0, 2, 8
.float 0.5, 0.5, 0.5
.long 10, 2, 0
.float 0.5, 0.5, 0.5
.long 0, 4, 6
.float 0.5, 0.5, 0.5
.long 8, 4, 0
.float 0.5, 0.5, 0.5
.long 0, 6, 10
.float 0.5, 0.5, 0.5
.long 1, 9, 3
.float 0.5, 0.5, 0.5
.long 11, 1, 3
.float 0.5, 0.5, 0.5
.long 4, 1, 6
.float 0.5, 0.5, 0.5
.long 9, 1, 4
.float 0.5, 0.5, 0.5
.long 6, 1, 11
.float 0.5, 0.5, 0.5
.long 2, 7, 5
.float 0.5, 0.5, 0.5
.long 5, 8, 2
.float 0.5, 0.5, 0.5
.long 10, 7, 2
.float 0.5, 0.5, 0.5
.long 7, 3, 5
.float 0.5, 0.5, 0.5
.long 3, 9, 5
.float 0.5, 0.5, 0.5
.long 11, 3, 7
.float 0.5, 0.5, 0.5
.long 4, 8, 9
.float 0.5, 0.5, 0.5
.long 5, 9, 8
.float 0.5, 0.5, 0.5
.long 11, 10, 6
.float 0.5, 0.5, 0.5
.long 10, 11, 7
.float 0.5, 0.5, 0.5
Binary file added assets/rocket.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3491d8d

Please sign in to comment.