Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

First commit.

  • Loading branch information...
commit 06846d0ebbc86bc384ea2dc0099e3e9a04bfad2f 0 parents
@ashcairo ashcairo authored
Showing with 51,816 additions and 0 deletions.
  1. +11 −0 .gitignore
  2. +8 −0 Android/Source/.classpath
  3. +73 −0 Android/Source/.cproject
  4. +43 −0 Android/Source/.project
  5. +66 −0 Android/Source/.settings/org.eclipse.cdt.codan.core.prefs
  6. +5 −0 Android/Source/.settings/org.eclipse.core.resources.prefs
  7. +27 −0 Android/Source/AndroidManifest.xml
  8. BIN  Android/Source/icon.png
  9. +5 −0 Android/Source/jni/Android.mk
  10. +36 −0 Android/Source/jni/Application.mk
  11. +62 −0 Android/Source/jni/Source/Android.mk
  12. +67 −0 Android/Source/jni/Source/CCGLView.h
  13. +180 −0 Android/Source/jni/Source/CCJNI.cpp
  14. +39 −0 Android/Source/jni/Source/CCJNI.h
  15. +108 −0 Android/Source/jni/Source/CCPlatform.cpp
  16. +68 −0 Android/Source/jni/Source/CCPlatform.h
  17. +231 −0 Android/Source/jni/Source/Rendering/CCDeviceRenderer.cpp
  18. +39 −0 Android/Source/jni/Source/Rendering/CCDeviceRenderer.h
  19. +188 −0 Android/Source/jni/Source/Rendering/CCTexturePNG.cpp
  20. +43 −0 Android/Source/jni/Source/Rendering/CCTexturePNG.h
  21. +194 −0 Android/Source/jni/Source/Tools/CCDeviceControls.cpp
  22. +46 −0 Android/Source/jni/Source/Tools/CCDeviceControls.h
  23. +268 −0 Android/Source/jni/Source/Tools/CCDeviceFileManager.cpp
  24. +107 −0 Android/Source/jni/Source/Tools/CCDeviceFileManager.h
  25. +106 −0 Android/Source/jni/Source/main.cpp
  26. +1 −0  Android/Source/jni/libzip/.deps/mkstemp.Plo
  27. +101 −0 Android/Source/jni/libzip/.deps/zip_add.Plo
  28. +118 −0 Android/Source/jni/libzip/.deps/zip_add_dir.Plo
  29. +138 −0 Android/Source/jni/libzip/.deps/zip_close.Plo
  30. +101 −0 Android/Source/jni/libzip/.deps/zip_delete.Plo
  31. +138 −0 Android/Source/jni/libzip/.deps/zip_dirent.Plo
  32. +109 −0 Android/Source/jni/libzip/.deps/zip_entry_free.Plo
  33. +109 −0 Android/Source/jni/libzip/.deps/zip_entry_new.Plo
  34. +101 −0 Android/Source/jni/libzip/.deps/zip_err_str.Plo
  35. +109 −0 Android/Source/jni/libzip/.deps/zip_error.Plo
  36. +101 −0 Android/Source/jni/libzip/.deps/zip_error_get.Plo
  37. +102 −0 Android/Source/jni/libzip/.deps/zip_error_get_sys_type.Plo
  38. +133 −0 Android/Source/jni/libzip/.deps/zip_error_strerror.Plo
  39. +133 −0 Android/Source/jni/libzip/.deps/zip_error_to_str.Plo
  40. +109 −0 Android/Source/jni/libzip/.deps/zip_fclose.Plo
  41. +102 −0 Android/Source/jni/libzip/.deps/zip_file_error_clear.Plo
  42. +101 −0 Android/Source/jni/libzip/.deps/zip_file_error_get.Plo
  43. +138 −0 Android/Source/jni/libzip/.deps/zip_file_get_offset.Plo
  44. +117 −0 Android/Source/jni/libzip/.deps/zip_filerange_crc.Plo
  45. +101 −0 Android/Source/jni/libzip/.deps/zip_fopen.Plo
  46. +124 −0 Android/Source/jni/libzip/.deps/zip_fopen_index.Plo
  47. +101 −0 Android/Source/jni/libzip/.deps/zip_fread.Plo
  48. +109 −0 Android/Source/jni/libzip/.deps/zip_free.Plo
  49. +102 −0 Android/Source/jni/libzip/.deps/zip_get_archive_comment.Plo
  50. +102 −0 Android/Source/jni/libzip/.deps/zip_get_archive_flag.Plo
  51. +102 −0 Android/Source/jni/libzip/.deps/zip_get_file_comment.Plo
  52. +101 −0 Android/Source/jni/libzip/.deps/zip_get_name.Plo
  53. +118 −0 Android/Source/jni/libzip/.deps/zip_memdup.Plo
  54. +113 −0 Android/Source/jni/libzip/.deps/zip_name_locate.Plo
  55. +109 −0 Android/Source/jni/libzip/.deps/zip_new.Plo
  56. +156 −0 Android/Source/jni/libzip/.deps/zip_open.Plo
  57. +113 −0 Android/Source/jni/libzip/.deps/zip_rename.Plo
  58. +101 −0 Android/Source/jni/libzip/.deps/zip_replace.Plo
  59. +110 −0 Android/Source/jni/libzip/.deps/zip_set_archive_comment.Plo
  60. +102 −0 Android/Source/jni/libzip/.deps/zip_set_archive_flag.Plo
  61. +109 −0 Android/Source/jni/libzip/.deps/zip_set_file_comment.Plo
  62. +118 −0 Android/Source/jni/libzip/.deps/zip_set_name.Plo
  63. +118 −0 Android/Source/jni/libzip/.deps/zip_source_buffer.Plo
  64. +116 −0 Android/Source/jni/libzip/.deps/zip_source_file.Plo
  65. +138 −0 Android/Source/jni/libzip/.deps/zip_source_filep.Plo
  66. +109 −0 Android/Source/jni/libzip/.deps/zip_source_free.Plo
  67. +109 −0 Android/Source/jni/libzip/.deps/zip_source_function.Plo
  68. +118 −0 Android/Source/jni/libzip/.deps/zip_source_zip.Plo
  69. +101 −0 Android/Source/jni/libzip/.deps/zip_stat.Plo
  70. +101 −0 Android/Source/jni/libzip/.deps/zip_stat_index.Plo
  71. +101 −0 Android/Source/jni/libzip/.deps/zip_stat_init.Plo
  72. +101 −0 Android/Source/jni/libzip/.deps/zip_strerror.Plo
  73. +109 −0 Android/Source/jni/libzip/.deps/zip_unchange.Plo
  74. +109 −0 Android/Source/jni/libzip/.deps/zip_unchange_all.Plo
  75. +109 −0 Android/Source/jni/libzip/.deps/zip_unchange_archive.Plo
  76. +109 −0 Android/Source/jni/libzip/.deps/zip_unchange_data.Plo
  77. BIN  Android/Source/jni/libzip/.libs/libzip.a
  78. +41 −0 Android/Source/jni/libzip/.libs/libzip.la
  79. +41 −0 Android/Source/jni/libzip/.libs/libzip.lai
  80. BIN  Android/Source/jni/libzip/.libs/libzip.so
  81. BIN  Android/Source/jni/libzip/.libs/libzip.so.1
  82. BIN  Android/Source/jni/libzip/.libs/libzip.so.1.0.0
  83. BIN  Android/Source/jni/libzip/.libs/zip_add.o
  84. BIN  Android/Source/jni/libzip/.libs/zip_add_dir.o
  85. BIN  Android/Source/jni/libzip/.libs/zip_close.o
  86. BIN  Android/Source/jni/libzip/.libs/zip_delete.o
  87. BIN  Android/Source/jni/libzip/.libs/zip_dirent.o
  88. BIN  Android/Source/jni/libzip/.libs/zip_entry_free.o
  89. BIN  Android/Source/jni/libzip/.libs/zip_entry_new.o
  90. BIN  Android/Source/jni/libzip/.libs/zip_err_str.o
  91. BIN  Android/Source/jni/libzip/.libs/zip_error.o
  92. BIN  Android/Source/jni/libzip/.libs/zip_error_clear.o
  93. BIN  Android/Source/jni/libzip/.libs/zip_error_get.o
  94. BIN  Android/Source/jni/libzip/.libs/zip_error_get_sys_type.o
  95. BIN  Android/Source/jni/libzip/.libs/zip_error_strerror.o
  96. BIN  Android/Source/jni/libzip/.libs/zip_error_to_str.o
  97. BIN  Android/Source/jni/libzip/.libs/zip_fclose.o
  98. BIN  Android/Source/jni/libzip/.libs/zip_file_error_clear.o
  99. BIN  Android/Source/jni/libzip/.libs/zip_file_error_get.o
  100. BIN  Android/Source/jni/libzip/.libs/zip_file_get_offset.o
  101. BIN  Android/Source/jni/libzip/.libs/zip_file_strerror.o
  102. BIN  Android/Source/jni/libzip/.libs/zip_filerange_crc.o
  103. BIN  Android/Source/jni/libzip/.libs/zip_fopen.o
  104. BIN  Android/Source/jni/libzip/.libs/zip_fopen_index.o
  105. BIN  Android/Source/jni/libzip/.libs/zip_fread.o
  106. BIN  Android/Source/jni/libzip/.libs/zip_free.o
  107. BIN  Android/Source/jni/libzip/.libs/zip_get_archive_comment.o
  108. BIN  Android/Source/jni/libzip/.libs/zip_get_archive_flag.o
  109. BIN  Android/Source/jni/libzip/.libs/zip_get_file_comment.o
  110. BIN  Android/Source/jni/libzip/.libs/zip_get_name.o
  111. BIN  Android/Source/jni/libzip/.libs/zip_get_num_files.o
  112. BIN  Android/Source/jni/libzip/.libs/zip_memdup.o
  113. BIN  Android/Source/jni/libzip/.libs/zip_name_locate.o
  114. BIN  Android/Source/jni/libzip/.libs/zip_new.o
  115. BIN  Android/Source/jni/libzip/.libs/zip_open.o
  116. BIN  Android/Source/jni/libzip/.libs/zip_rename.o
  117. BIN  Android/Source/jni/libzip/.libs/zip_replace.o
  118. BIN  Android/Source/jni/libzip/.libs/zip_set_archive_comment.o
  119. BIN  Android/Source/jni/libzip/.libs/zip_set_archive_flag.o
  120. BIN  Android/Source/jni/libzip/.libs/zip_set_file_comment.o
  121. BIN  Android/Source/jni/libzip/.libs/zip_set_name.o
  122. BIN  Android/Source/jni/libzip/.libs/zip_source_buffer.o
  123. BIN  Android/Source/jni/libzip/.libs/zip_source_file.o
  124. BIN  Android/Source/jni/libzip/.libs/zip_source_filep.o
  125. BIN  Android/Source/jni/libzip/.libs/zip_source_free.o
  126. BIN  Android/Source/jni/libzip/.libs/zip_source_function.o
  127. BIN  Android/Source/jni/libzip/.libs/zip_source_zip.o
  128. BIN  Android/Source/jni/libzip/.libs/zip_stat.o
  129. BIN  Android/Source/jni/libzip/.libs/zip_stat_index.o
  130. BIN  Android/Source/jni/libzip/.libs/zip_stat_init.o
  131. BIN  Android/Source/jni/libzip/.libs/zip_strerror.o
  132. BIN  Android/Source/jni/libzip/.libs/zip_unchange.o
  133. BIN  Android/Source/jni/libzip/.libs/zip_unchange_all.o
  134. BIN  Android/Source/jni/libzip/.libs/zip_unchange_archive.o
  135. BIN  Android/Source/jni/libzip/.libs/zip_unchange_data.o
  136. +78 −0 Android/Source/jni/libzip/Android.mk
  137. +97 −0 Android/Source/jni/libzip/config.h
  138. +41 −0 Android/Source/jni/libzip/libzip.la
  139. +140 −0 Android/Source/jni/libzip/mkstemp.c
  140. +230 −0 Android/Source/jni/libzip/zip.h
  141. +49 −0 Android/Source/jni/libzip/zip_add.c
  142. +12 −0 Android/Source/jni/libzip/zip_add.lo
  143. +80 −0 Android/Source/jni/libzip/zip_add_dir.c
  144. +12 −0 Android/Source/jni/libzip/zip_add_dir.lo
  145. +679 −0 Android/Source/jni/libzip/zip_close.c
  146. +12 −0 Android/Source/jni/libzip/zip_close.lo
  147. +58 −0 Android/Source/jni/libzip/zip_delete.c
  148. +12 −0 Android/Source/jni/libzip/zip_delete.lo
  149. +615 −0 Android/Source/jni/libzip/zip_dirent.c
  150. +12 −0 Android/Source/jni/libzip/zip_dirent.lo
  151. +52 −0 Android/Source/jni/libzip/zip_entry_free.c
  152. +12 −0 Android/Source/jni/libzip/zip_entry_free.lo
  153. +78 −0 Android/Source/jni/libzip/zip_entry_new.c
  154. +12 −0 Android/Source/jni/libzip/zip_entry_new.lo
  155. +68 −0 Android/Source/jni/libzip/zip_err_str.c
  156. +12 −0 Android/Source/jni/libzip/zip_err_str.lo
  157. +101 −0 Android/Source/jni/libzip/zip_error.c
  158. +12 −0 Android/Source/jni/libzip/zip_error.lo
  159. +44 −0 Android/Source/jni/libzip/zip_error_clear.c
  160. +12 −0 Android/Source/jni/libzip/zip_error_clear.lo
  161. +44 −0 Android/Source/jni/libzip/zip_error_get.c
  162. +12 −0 Android/Source/jni/libzip/zip_error_get.lo
  163. +47 −0 Android/Source/jni/libzip/zip_error_get_sys_type.c
  164. +12 −0 Android/Source/jni/libzip/zip_error_get_sys_type.lo
  165. +90 −0 Android/Source/jni/libzip/zip_error_strerror.c
  166. +12 −0 Android/Source/jni/libzip/zip_error_strerror.lo
  167. +70 −0 Android/Source/jni/libzip/zip_error_to_str.c
  168. +12 −0 Android/Source/jni/libzip/zip_error_to_str.lo
  169. +71 −0 Android/Source/jni/libzip/zip_fclose.c
  170. +12 −0 Android/Source/jni/libzip/zip_fclose.lo
  171. +44 −0 Android/Source/jni/libzip/zip_file_error_clear.c
  172. +12 −0 Android/Source/jni/libzip/zip_file_error_clear.lo
  173. +44 −0 Android/Source/jni/libzip/zip_file_error_get.c
  174. +12 −0 Android/Source/jni/libzip/zip_file_error_get.lo
  175. +74 −0 Android/Source/jni/libzip/zip_file_get_offset.c
  176. +12 −0 Android/Source/jni/libzip/zip_file_get_offset.lo
  177. +44 −0 Android/Source/jni/libzip/zip_file_strerror.c
  178. +12 −0 Android/Source/jni/libzip/zip_file_strerror.lo
  179. +71 −0 Android/Source/jni/libzip/zip_filerange_crc.c
  180. +12 −0 Android/Source/jni/libzip/zip_filerange_crc.lo
  181. +49 −0 Android/Source/jni/libzip/zip_fopen.c
  182. +12 −0 Android/Source/jni/libzip/zip_fopen.lo
  183. +216 −0 Android/Source/jni/libzip/zip_fopen_index.c
  184. +12 −0 Android/Source/jni/libzip/zip_fopen_index.lo
  185. +130 −0 Android/Source/jni/libzip/zip_fread.c
  186. +12 −0 Android/Source/jni/libzip/zip_fread.lo
  187. +81 −0 Android/Source/jni/libzip/zip_free.c
  188. +12 −0 Android/Source/jni/libzip/zip_free.lo
  189. +60 −0 Android/Source/jni/libzip/zip_get_archive_comment.c
  190. +12 −0 Android/Source/jni/libzip/zip_get_archive_comment.lo
  191. +48 −0 Android/Source/jni/libzip/zip_get_archive_flag.c
  192. +12 −0 Android/Source/jni/libzip/zip_get_archive_flag.lo
  193. +58 −0 Android/Source/jni/libzip/zip_get_file_comment.c
  194. +12 −0 Android/Source/jni/libzip/zip_get_file_comment.lo
  195. +71 −0 Android/Source/jni/libzip/zip_get_name.c
  196. +12 −0 Android/Source/jni/libzip/zip_get_name.lo
  197. +47 −0 Android/Source/jni/libzip/zip_get_num_files.c
  198. +12 −0 Android/Source/jni/libzip/zip_get_num_files.lo
  199. +55 −0 Android/Source/jni/libzip/zip_memdup.c
  200. +12 −0 Android/Source/jni/libzip/zip_memdup.lo
  201. +88 −0 Android/Source/jni/libzip/zip_name_locate.c
  202. +12 −0 Android/Source/jni/libzip/zip_name_locate.lo
  203. +70 −0 Android/Source/jni/libzip/zip_new.c
  204. +12 −0 Android/Source/jni/libzip/zip_new.lo
  205. +567 −0 Android/Source/jni/libzip/zip_open.c
  206. +12 −0 Android/Source/jni/libzip/zip_open.lo
  207. +65 −0 Android/Source/jni/libzip/zip_rename.c
  208. +12 −0 Android/Source/jni/libzip/zip_rename.lo
  209. +78 −0 Android/Source/jni/libzip/zip_replace.c
  210. +12 −0 Android/Source/jni/libzip/zip_replace.lo
  211. +65 −0 Android/Source/jni/libzip/zip_set_archive_comment.c
  212. +12 −0 Android/Source/jni/libzip/zip_set_archive_comment.lo
  213. +49 −0 Android/Source/jni/libzip/zip_set_archive_flag.c
  214. +12 −0 Android/Source/jni/libzip/zip_set_archive_flag.lo
  215. +66 −0 Android/Source/jni/libzip/zip_set_file_comment.c
  216. +12 −0 Android/Source/jni/libzip/zip_set_file_comment.lo
  217. +75 −0 Android/Source/jni/libzip/zip_set_name.c
  218. +12 −0 Android/Source/jni/libzip/zip_set_name.lo
  219. +157 −0 Android/Source/jni/libzip/zip_source_buffer.c
  220. +12 −0 Android/Source/jni/libzip/zip_source_buffer.lo
  221. +55 −0 Android/Source/jni/libzip/zip_source_file.c
  222. +12 −0 Android/Source/jni/libzip/zip_source_file.lo
  223. +216 −0 Android/Source/jni/libzip/zip_source_filep.c
  224. +12 −0 Android/Source/jni/libzip/zip_source_filep.lo
  225. +51 −0 Android/Source/jni/libzip/zip_source_free.c
  226. +12 −0 Android/Source/jni/libzip/zip_source_free.lo
  227. +59 −0 Android/Source/jni/libzip/zip_source_function.c
  228. +12 −0 Android/Source/jni/libzip/zip_source_function.lo
  229. +188 −0 Android/Source/jni/libzip/zip_source_zip.c
  230. +12 −0 Android/Source/jni/libzip/zip_source_zip.lo
  231. +49 −0 Android/Source/jni/libzip/zip_stat.c
  232. +12 −0 Android/Source/jni/libzip/zip_stat.lo
  233. +90 −0 Android/Source/jni/libzip/zip_stat_index.c
  234. +12 −0 Android/Source/jni/libzip/zip_stat_index.lo
  235. +51 −0 Android/Source/jni/libzip/zip_stat_init.c
  236. +12 −0 Android/Source/jni/libzip/zip_stat_init.lo
  237. +44 −0 Android/Source/jni/libzip/zip_strerror.c
  238. +12 −0 Android/Source/jni/libzip/zip_strerror.lo
  239. +82 −0 Android/Source/jni/libzip/zip_unchange.c
  240. +12 −0 Android/Source/jni/libzip/zip_unchange.lo
  241. +54 −0 Android/Source/jni/libzip/zip_unchange_all.c
  242. +12 −0 Android/Source/jni/libzip/zip_unchange_all.lo
  243. +52 −0 Android/Source/jni/libzip/zip_unchange_archive.c
  244. +12 −0 Android/Source/jni/libzip/zip_unchange_archive.lo
  245. +53 −0 Android/Source/jni/libzip/zip_unchange_data.c
  246. +12 −0 Android/Source/jni/libzip/zip_unchange_data.lo
  247. +264 −0 Android/Source/jni/libzip/zipint.h
  248. +3 −0  Android/Source/lint.xml
  249. +11 −0 Android/Source/project.properties
  250. BIN  Android/Source/res/drawable/abot_diffuse.png
  251. BIN  Android/Source/res/drawable/abot_screen_diffuse.png
  252. BIN  Android/Source/res/drawable/fx_character_highlight_texture.png
  253. BIN  Android/Source/res/drawable/fx_character_shooting_texture.png
  254. BIN  Android/Source/res/drawable/fx_impact_texture.png
  255. BIN  Android/Source/res/drawable/fx_weapon_bullet_glow_texture.png
  256. BIN  Android/Source/res/drawable/fx_weapon_bullet_texture.png
  257. BIN  Android/Source/res/drawable/fx_weapon_muzzleflash_texture.png
  258. BIN  Android/Source/res/drawable/healthpack_diffuse.png
  259. BIN  Android/Source/res/drawable/helveticaneuebold.png
  260. BIN  Android/Source/res/drawable/helveticaneuelight.png
  261. BIN  Android/Source/res/drawable/ibot_diffuse.png
  262. BIN  Android/Source/res/drawable/icon.png
  263. BIN  Android/Source/res/drawable/level_background.png
  264. BIN  Android/Source/res/drawable/level_particles_diffuse.png
  265. BIN  Android/Source/res/drawable/pressstartk.png
  266. BIN  Android/Source/res/drawable/sandbags_diffuse.png
  267. BIN  Android/Source/res/drawable/ui_abot_cropped.png
  268. BIN  Android/Source/res/drawable/ui_background.png
  269. BIN  Android/Source/res/drawable/ui_border.png
  270. BIN  Android/Source/res/drawable/ui_ibot_cropped.png
  271. BIN  Android/Source/res/drawable/ui_icon_life.png
  272. BIN  Android/Source/res/drawable/ui_vs.png
  273. BIN  Android/Source/res/drawable/ui_vs_bluestripe.png
  274. BIN  Android/Source/res/drawable/ui_vs_redstripe.png
  275. BIN  Android/Source/res/drawable/ui_vs_whitestripe.png
  276. BIN  Android/Source/res/drawable/white.png
  277. +900 −0 Android/Source/res/raw/abot_body.obj
  278. +1,202 −0 Android/Source/res/raw/abot_head.obj
  279. +766 −0 Android/Source/res/raw/abot_rightarm.obj
  280. +73 −0 Android/Source/res/raw/abot_screen.obj
  281. +51 −0 Android/Source/res/raw/alphacolour.fx
  282. +68 −0 Android/Source/res/raw/basic.fx
  283. +70 −0 Android/Source/res/raw/basic_vc.fx
  284. +779 −0 Android/Source/res/raw/fx_weapon_bullet.obj
  285. +57 −0 Android/Source/res/raw/fx_weapon_muzzleflash.obj
  286. +439 −0 Android/Source/res/raw/healthpack.obj
  287. +256 −0 Android/Source/res/raw/helveticaneuebold.data
  288. +256 −0 Android/Source/res/raw/helveticaneuelight.data
  289. +670 −0 Android/Source/res/raw/ibot_body.obj
  290. +640 −0 Android/Source/res/raw/ibot_head.obj
  291. +338 −0 Android/Source/res/raw/ibot_leftarm.obj
  292. +338 −0 Android/Source/res/raw/ibot_rightarm.obj
  293. +28,553 −0 Android/Source/res/raw/level_particles.obj
  294. +110 −0 Android/Source/res/raw/phong.fx
  295. +149 −0 Android/Source/res/raw/phongenv.fx
  296. +256 −0 Android/Source/res/raw/pressstartk.data
  297. +900 −0 Android/Source/res/raw/sandbags.obj
  298. +29 −0 Android/Source/res/values/strings.xml
  299. +52 −0 Android/Source/scripts/copy_assets.sh
  300. +100 −0 Android/Source/src/com/android2c/CCActivity.java
Sorry, we could not display the entire diff because too many files (507) changed.
11 .gitignore
@@ -0,0 +1,11 @@
+iOS/*.xcodeproj/project.xcworkspace/
+iOS/*.xcodeproj/xcuserdata/
+
+Qt/*-build-desktop*/
+Qt/Project/*.pro.user*
+
+Android/Source/bin/
+Android/Source/gen/
+Android/Source/libs/
+Android/Source/obj/
+Android/Workspace/
8 Android/Source/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
+ <classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="gen"/>
+ <classpathentry kind="output" path="bin/classes"/>
+</classpath>
73 Android/Source/.cproject
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?>
+
+<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+ <storageModule moduleId="org.eclipse.cdt.core.settings">
+ <cconfiguration id="com.android.toolchain.gcc.1112106012">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.android.toolchain.gcc.1112106012" moduleId="org.eclipse.cdt.core.settings" name="Default">
+ <externalSettings/>
+ <extensions>
+ <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+ <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactName="CCActivity" buildProperties="" description="" id="com.android.toolchain.gcc.1112106012" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
+ <folderInfo id="com.android.toolchain.gcc.1112106012.1970376693" name="/" resourcePath="">
+ <toolChain id="com.android.toolchain.gcc.980088164" name="com.android.toolchain.gcc" superClass="com.android.toolchain.gcc">
+ <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.android.targetPlatform.1286287743" name="Android Platform" osList="all" superClass="com.android.targetPlatform"/>
+ <builder id="com.android.builder.1375149898" keepEnvironmentInBuildfile="false" managedBuildOn="false" superClass="com.android.builder">
+ <outputEntries>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name="libs"/>
+ </outputEntries>
+ </builder>
+ <tool id="cdt.managedbuild.tool.gnu.archiver.base.1322231345" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
+ <tool id="com.android.tool.compiler.g++.660925600" name="Android G++" superClass="com.android.tool.compiler.g++">
+ <inputType id="com.android.tool.compiler.g++.input.1720545170" superClass="com.android.tool.compiler.g++.input"/>
+ </tool>
+ <tool id="com.android.tool.compiler.c.1869166151" name="Android GCC" superClass="com.android.tool.compiler.c">
+ <inputType id="com.android.tool.compiler.c.input.20536251" superClass="com.android.tool.compiler.c.input"/>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.c.linker.base.1008074955" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/>
+ <tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.620059449" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base">
+ <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.2082639900" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
+ <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+ <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+ </inputType>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.assembler.base.444101448" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base">
+ <inputType id="cdt.managedbuild.tool.gnu.assembler.input.787636410" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+ </tool>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="jni"/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ <storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
+ <storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
+ </cconfiguration>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <project id="CCActivity.null.1526792350" name="CCActivity"/>
+ </storageModule>
+ <storageModule moduleId="scannerConfiguration">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+ <scannerConfigBuildInfo instanceId="com.android.toolchain.gcc.1112106012;com.android.toolchain.gcc.1112106012.1970376693;com.android.tool.compiler.g++.660925600;com.android.tool.compiler.g++.input.1720545170">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile"/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="com.android.toolchain.gcc.1112106012;com.android.toolchain.gcc.1112106012.1970376693;com.android.tool.compiler.c.1869166151;com.android.tool.compiler.c.input.20536251">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile"/>
+ </scannerConfigBuildInfo>
+ </storageModule>
+ <storageModule moduleId="refreshScope" versionNumber="1">
+ <resource resourceType="PROJECT" workspacePath="/CCActivity"/>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
+</cproject>
43 Android/Source/.project
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>CCActivity</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.ApkBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+ <triggers>full,incremental,</triggers>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ <nature>org.eclipse.cdt.core.ccnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+ </natures>
+</projectDescription>
66 Android/Source/.settings/org.eclipse.cdt.codan.core.prefs
@@ -0,0 +1,66 @@
+#Mon Dec 26 02:38:44 GMT 2011
+eclipse.preferences.version=1
+org.eclipse.cdt.codan.checkers.errnoreturn=-Warning
+org.eclipse.cdt.codan.checkers.errnoreturn.params={implicit\=>false}
+org.eclipse.cdt.codan.checkers.errreturnvalue=-Error
+org.eclipse.cdt.codan.checkers.errreturnvalue.params={}
+org.eclipse.cdt.codan.checkers.noreturn=-Error
+org.eclipse.cdt.codan.checkers.noreturn.params={implicit\=>false}
+org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation=-Error
+org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem=-Error
+org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem.params={}
+org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem=-Error
+org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem.params={}
+org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem.params={no_break_comment\=>"no break",last_case_param\=>true,empty_case_param\=>false}
+org.eclipse.cdt.codan.internal.checkers.CatchByReference=-Warning
+org.eclipse.cdt.codan.internal.checkers.CatchByReference.params={unknown\=>false,exceptions\=>()}
+org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem=-Error
+org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem=-Error
+org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem=-Error
+org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.InvalidArguments=-Error
+org.eclipse.cdt.codan.internal.checkers.InvalidArguments.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem=-Error
+org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem=-Error
+org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem=-Error
+org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem=-Error
+org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker=-Info
+org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker.params={pattern\=>"^[a-z]",macro\=>true,exceptions\=>()}
+org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem.params={}
+org.eclipse.cdt.codan.internal.checkers.OverloadProblem=-Error
+org.eclipse.cdt.codan.internal.checkers.OverloadProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem=-Error
+org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem=-Error
+org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem.params={}
+org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem.params={}
+org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem.params={macro\=>true,exceptions\=>()}
+org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem.params={paramNot\=>false}
+org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem.params={else\=>false,afterelse\=>false}
+org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem=-Error
+org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem.params={macro\=>true}
+org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem.params={macro\=>true}
+org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem.params={macro\=>true,exceptions\=>("@(\#)","$Id")}
+org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem=-Error
+org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
5 Android/Source/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,5 @@
+eclipse.preferences.version=1
+encoding//jni/Source/Rendering/CCDeviceRenderer.cpp=UTF-8
+encoding//src/com/android2c/CCActivity.java=UTF-8
+encoding//src/com/android2c/CCGLTexture.java=UTF-8
+encoding//src/com/android2c/CCGLViewJNI.java=UTF-8
27 Android/Source/AndroidManifest.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.softpoetry.androidsdemo"
+ android:versionName="1.0"
+ android:versionCode="1"
+ android:installLocation="preferExternal">
+
+ <uses-feature android:glEsVersion="0x00020000"/>
+
+ <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="10"/>
+
+ <uses-permission android:name="android.permission.INTERNET" />
+
+ <application android:label="@string/app_name" android:icon="@drawable/icon">
+ <activity android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
+ android:launchMode="singleTask"
+ android:configChanges="orientation|keyboardHidden"
+ android:name="com.android2c.CCActivity">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+
+ </application>
+
+</manifest>
BIN  Android/Source/icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 Android/Source/jni/Android.mk
@@ -0,0 +1,5 @@
+LOCAL_PATH := $(call my-dir)
+
+$(shell scripts/copy_assets.sh)
+
+include $(call all-subdir-makefiles)
36 Android/Source/jni/Application.mk
@@ -0,0 +1,36 @@
+APP_PROJECT_PATH := $(call my-dir)/..
+APP_MODULES := libzip libccjni
+#APP_CPPFLAGS += -frtti
+#APP_CPPFLAGS += -fexceptions
+APP_ABI := armeabi
+
+#ndk-build NDK_DEBUG=1
+#ndk_build RELEASE=1
+RELEASE := $(strip $(RELEASE))
+ifdef RELEASE
+ APP_OPTIM := release
+ APP_ABI += armeabi-v7a
+
+ APP_CPPFLAGS += -O3 -funroll-loops -DFPM_ARM
+else
+ APP_OPTIM := debug
+ APP_CFLAGS += -DDEBUGON
+
+ # Reduce compilation time and make debugging produce the expected results.
+ # This is the default. So no need to turn on
+ #APP_CPPFLAGS += -O0
+
+ # CCRelease: Makes macros debugable
+ APP_CPPFLAGS += -g3
+endif
+
+INTEL := $(strip $(INTEL))
+ifdef INTEL
+ APP_ABI += x86
+endif
+
+# Make all warnings into errors
+APP_CPPFLAGS := -Werror
+
+# We don't need accurate floating point maths, do we?
+APP_CPPFLAGS += -ffast-math
62 Android/Source/jni/Source/Android.mk
@@ -0,0 +1,62 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libccjni
+
+LOCAL_STATIC_LIBRARIES := libzip
+
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH)/ \
+ $(LOCAL_PATH)/Rendering \
+ $(LOCAL_PATH)/Tools \
+\
+ $(LOCAL_PATH)/../libzip \
+\
+ $(LOCAL_PATH)/../../../../Engine/Source \
+ $(LOCAL_PATH)/../../../../Engine/Source/AI \
+ $(LOCAL_PATH)/../../../../Engine/Source/Objects \
+ $(LOCAL_PATH)/../../../../Engine/Source/Rendering \
+ $(LOCAL_PATH)/../../../../Engine/Source/Scenes \
+ $(LOCAL_PATH)/../../../../Engine/Source/Tools \
+ $(LOCAL_PATH)/../../../../Engine/Source/UI \
+\
+ $(LOCAL_PATH)/../../../../External/3dsloader \
+ $(LOCAL_PATH)/../../../../External/jansson-2.3.1/src \
+ $(LOCAL_PATH)/../../../../External/ObjLoader3 \
+\
+ $(LOCAL_PATH)/../../../../App/Source/ \
+ $(LOCAL_PATH)/../../../../App/Source/Game/ \
+ $(LOCAL_PATH)/../../../../App/Source/Scenes/ \
+
+# Use the wildcard operator so we only need to update the
+# makefile if a new folder is added/one is removed or renamed
+MY_FILES := \
+ $(wildcard $(LOCAL_PATH)/*.cpp) \
+ $(wildcard $(LOCAL_PATH)/Rendering/*.cpp) \
+ $(wildcard $(LOCAL_PATH)/Tools/*.cpp) \
+ \
+ $(wildcard $(LOCAL_PATH)/../../../../Engine/Source/*.cpp) \
+ $(wildcard $(LOCAL_PATH)/../../../../Engine/Source/AI/*.cpp) \
+ $(wildcard $(LOCAL_PATH)/../../../../Engine/Source/Objects/*.cpp) \
+ $(wildcard $(LOCAL_PATH)/../../../../Engine/Source/Rendering/*.cpp) \
+ $(wildcard $(LOCAL_PATH)/../../../../Engine/Source/Scenes/*.cpp) \
+ $(wildcard $(LOCAL_PATH)/../../../../Engine/Source/Tools/*.cpp) \
+ $(wildcard $(LOCAL_PATH)/../../../../Engine/Source/UI/*.cpp) \
+ \
+ $(wildcard $(LOCAL_PATH)/../../../../External/3dsloader/*.cpp) \
+ $(wildcard $(LOCAL_PATH)/../../../../External/jansson-2.3.1/src/*.c) \
+ $(wildcard $(LOCAL_PATH)/../../../../External/ObjLoader3/*.cpp) \
+ \
+ $(wildcard $(LOCAL_PATH)/../../../../App/Source/*.cpp) \
+ $(wildcard $(LOCAL_PATH)/../../../../App/Source/Game/*.cpp) \
+ $(wildcard $(LOCAL_PATH)/../../../../App/Source/Scenes/*.cpp) \
+ $(wildcard $(LOCAL_PATH)/../../../../App/Source/UI/*.cpp) \
+
+LOCAL_SRC_FILES := $(MY_FILES:$(LOCAL_PATH)/%=%)
+
+LOCAL_LDLIBS := -llog -lGLESv2
+LOCAL_LDLIBS += -L$(SYSROOT)/usr/lib -ldl
+LOCAL_LDLIBS += -L$(SYSROOT)/usr/lib -lz
+
+include $(BUILD_SHARED_LIBRARY)
67 Android/Source/jni/Source/CCGLView.h
@@ -0,0 +1,67 @@
+/*-----------------------------------------------------------
+ * 2c - Cross Platform 3D Application Framework
+ *-----------------------------------------------------------
+ * Copyright © 2010 - 2011 France Telecom
+ * This software is distributed under the Apache 2.0 license.
+ * http://www.apache.org/licenses/LICENSE-2.0.html
+ *-----------------------------------------------------------
+ * File Name : CCGLView.h
+ * Description : OpenGL view handler.
+ *
+ * Created : 09/06/11
+ * Author(s) : Ashraf Samy Hegab, Chris Bowers
+ *-----------------------------------------------------------
+ */
+
+#ifndef __CCGLVIEW_H__
+#define __CCGLVIEW_H__
+
+
+#include <jni.h>
+
+extern class CCGLView *gView;
+
+class CCGLView
+{
+public:
+ CCGLView()
+ {
+ gView = this;
+
+ jniEnv = NULL;
+
+ pthread_mutexattr_init( &engineThreadMutexType );
+ pthread_mutexattr_settype( &engineThreadMutexType, PTHREAD_MUTEX_RECURSIVE );
+ pthread_mutex_init( &engineThreadMutex, &engineThreadMutexType );
+
+ width = height = 0.0f;
+ }
+
+ ~CCGLView()
+ {
+ ASSERT( gEngine == NULL );
+ pthread_mutex_destroy( &engineThreadMutex );
+ pthread_mutexattr_destroy( &engineThreadMutexType );
+ }
+
+ void resizeView(const float inWidth, const float inHeight)
+ {
+ width = inWidth;
+ height = inHeight;
+ }
+
+ const float getWidth() { return width; }
+ const float getHeight() { return height; }
+
+public:
+ JNIEnv *jniEnv;
+
+ pthread_mutex_t engineThreadMutex;
+ pthread_mutexattr_t engineThreadMutexType;
+
+protected:
+ float width, height;
+};
+
+
+#endif // __CCGLVIEW_H__
180 Android/Source/jni/Source/CCJNI.cpp
@@ -0,0 +1,180 @@
+/*-----------------------------------------------------------
+ * 2c - Cross Platform 3D Application Framework
+ *-----------------------------------------------------------
+ * Copyright © 2011 - 2011 France Telecom
+ * This software is distributed under the Apache 2.0 license.
+ * http://www.apache.org/licenses/LICENSE-2.0.html
+ *-----------------------------------------------------------
+ * File Name : CCJNI.cpp
+ *-----------------------------------------------------------
+ */
+
+#include "CCDefines.h"
+#include "CCJNI.h"
+
+#include "CCAppManager.h"
+
+
+void CCJNI::Assert(const char *file, const int line, const char *message)
+{
+ // JNI Java call
+ JNIEnv *jEnv = gView->jniEnv;
+
+ jclass jniClass = jEnv->FindClass( "com/android2c/CCJNI" );
+ ASSERT_MESSAGE( jniClass != 0, "Could not find Java class." );
+
+ // Get the method ID of our method "urlRequest", which takes one parameter of type string, and returns void
+ static jmethodID mid = jEnv->GetStaticMethodID( jniClass, "Assert", "(Ljava/lang/String;ILjava/lang/String;)V" );
+ ASSERT( mid != 0 );
+
+ // Call the function
+ jstring jFile = jEnv->NewStringUTF( file );
+ jstring jMessage = jEnv->NewStringUTF( message );
+ jEnv->CallStaticVoidMethod( jniClass, mid, jFile, line, jMessage );
+ jEnv->DeleteLocalRef( jFile );
+ jEnv->DeleteLocalRef( jMessage );
+}
+
+
+void CCJNI::AdvertsToggle(const bool toggle)
+{
+ // JNI Java call
+ JNIEnv *jEnv = gView->jniEnv;
+
+ jclass jniClass = jEnv->FindClass( "com/android2c/CCJNI" );
+ ASSERT_MESSAGE( jniClass != 0, "Could not find Java class." );
+
+ // Get the method ID of our method "urlRequest", which takes one parameter of type string, and returns void
+ static jmethodID mid = jEnv->GetStaticMethodID( jniClass, "AdvertsToggle", "(Z)V" );
+ ASSERT( mid != 0 );
+
+ // Call the function
+ jEnv->CallStaticVoidMethod( jniClass, mid, toggle );
+}
+
+
+void CCJNI::WebBrowserOpen(const char *url)
+{
+ // JNI Java call
+ JNIEnv *jEnv = gView->jniEnv;
+
+ jclass jniClass = jEnv->FindClass( "com/android2c/CCJNI" );
+ ASSERT_MESSAGE( jniClass != 0, "Could not find Java class." );
+
+ // Get the method ID of our method "urlRequest", which takes one parameter of type string, and returns void
+ static jmethodID mid = jEnv->GetStaticMethodID( jniClass, "WebBrowserOpen", "(Ljava/lang/String;)V" );
+ ASSERT( mid != 0 );
+
+ // Call the function
+ jstring javaURL = jEnv->NewStringUTF( url );
+ jEnv->CallStaticVoidMethod( jniClass, mid, javaURL );
+ //env->DeleteLocalRef( javaURL );
+}
+
+
+void CCJNI::VideoViewStart(const char *file)
+{
+ // JNI Java call
+ JNIEnv *jEnv = gView->jniEnv;
+
+ jclass jniClass = jEnv->FindClass( "com/android2c/CCJNI" );
+ ASSERT_MESSAGE( jniClass != 0, "Could not find Java class." );
+
+ // Get the method ID of our method "startVideoView", which takes one parameter of type string, and returns void
+ static jmethodID mid = jEnv->GetStaticMethodID( jniClass, "VideoViewStart", "(Ljava/lang/String;)V" );
+ ASSERT( mid != 0 );
+
+ // Call the function
+ jstring javaURL = jEnv->NewStringUTF( file );
+ jEnv->CallStaticVoidMethod( jniClass, mid, javaURL );
+ //jEnv->DeleteLocalRef( javaURL );
+}
+
+
+void CCJNI::VideoViewStop()
+{
+ // JNI Java call
+ JNIEnv *jEnv = gView->jniEnv;
+
+ jclass jniClass = jEnv->FindClass( "com/android2c/CCJNI" );
+ ASSERT_MESSAGE( jniClass != 0, "Could not find Java class." );
+
+ // Get the method ID of our method "stopVideoView", which takes 0 parameters, and returns void
+ static jmethodID mid = jEnv->GetStaticMethodID( jniClass, "VideoViewStop", "()V" );
+ ASSERT( mid != 0 );
+
+ // Call the function
+ jEnv->CallStaticVoidMethod( jniClass, mid );
+}
+
+
+static CCLambdaCallback *billingCallback = NULL;
+void CCJNI::BillingRequestPurchase(const char *productID, CCLambdaCallback *callback)
+{
+ if( billingCallback != NULL )
+ {
+ delete billingCallback;
+ }
+ billingCallback = callback;
+
+ CCText androidProductID = productID;
+ androidProductID.toLowercase();
+
+ // JNI Java call
+ JNIEnv *jEnv = gView->jniEnv;
+
+ jclass jniClass = jEnv->FindClass( "com/android2c/CCJNI" );
+ ASSERT_MESSAGE( jniClass != 0, "Could not find Java class." );
+
+ // Get the method ID of our method "startVideoView", which takes one parameter of type string, and returns void
+ static jmethodID mid = jEnv->GetStaticMethodID( jniClass, "BillingRequestPurchase", "(Ljava/lang/String;)V" );
+ ASSERT( mid != 0 );
+
+ // Call the function
+ jstring javaURL = jEnv->NewStringUTF( androidProductID.buffer );
+ jEnv->CallStaticVoidMethod( jniClass, mid, javaURL );
+ //jEnv->DeleteLocalRef( javaURL );
+}
+
+
+extern "C" JNIEXPORT void JNICALL Java_com_android2c_CCJNI_BillingItemPurchased(JNIEnv *jEnv, jobject jObj)
+{
+ if( billingCallback != NULL )
+ {
+ gEngine->nativeToEngineThread( billingCallback );
+ billingCallback = NULL;
+ }
+}
+
+
+void CCJNI::GCMRegister()
+{
+ JNIEnv *jEnv = gView->jniEnv;
+
+ jclass jniClass = jEnv->FindClass( "com/android2c/CCJNI" );
+ ASSERT_MESSAGE( jniClass != 0, "Could not find Java class." );
+
+ // Get the method ID of our method "stopVideoView", which takes 0 parameters, and returns void
+ static jmethodID mid = jEnv->GetStaticMethodID( jniClass, "GcmRegister", "()V" );
+ ASSERT( mid != 0 );
+
+ // Call the function
+ jEnv->CallStaticVoidMethod( jniClass, mid );
+}
+
+
+void CCJNI::GCMUnregister()
+{
+ JNIEnv *jEnv = gView->jniEnv;
+
+ jclass jniClass = jEnv->FindClass( "com/android2c/CCJNI" );
+ ASSERT_MESSAGE( jniClass != 0, "Could not find Java class." );
+
+ // Get the method ID of our method "stopVideoView", which takes 0 parameters, and returns void
+ static jmethodID mid = jEnv->GetStaticMethodID( jniClass, "GcmUnregister", "()V" );
+ ASSERT( mid != 0 );
+
+ // Call the function
+ jEnv->CallStaticVoidMethod( jniClass, mid );
+
+}
39 Android/Source/jni/Source/CCJNI.h
@@ -0,0 +1,39 @@
+/*-----------------------------------------------------------
+ * 2c - Cross Platform 3D Application Framework
+ *-----------------------------------------------------------
+ * Copyright © 2011 - 2011 France Telecom
+ * This software is distributed under the Apache 2.0 license.
+ * http://www.apache.org/licenses/LICENSE-2.0.html
+ *-----------------------------------------------------------
+ * File Name : CCJNI.h
+ * Description : C++ JNI interface class to CCJNI.java
+ *
+ * Created : 08/10/11
+ * Author(s) : Ashraf Samy Hegab
+ *-----------------------------------------------------------
+ */
+
+#ifndef __CCJNI_H__
+#define __CCJNI_H__
+
+
+class CCJNI
+{
+public:
+ static void Assert(const char *file, const int line, const char *message);
+
+ static void AdvertsToggle(const bool toggle);
+
+ static void WebBrowserOpen(const char *url);
+
+ static void VideoViewStart(const char *file);
+ static void VideoViewStop();
+
+ static void BillingRequestPurchase(const char *productID, CCLambdaCallback* callback);
+
+ static void GCMRegister();
+ static void GCMUnregister();
+};
+
+
+#endif // __CCJNI_H__
108 Android/Source/jni/Source/CCPlatform.cpp
@@ -0,0 +1,108 @@
+/*-----------------------------------------------------------
+ * 2c - Cross Platform 3D Application Framework
+ *-----------------------------------------------------------
+ * Copyright © 2011 - 2011 France Telecom
+ * This software is distributed under the Apache 2.0 license.
+ * http://www.apache.org/licenses/LICENSE-2.0.html
+ *-----------------------------------------------------------
+ * File Name : CCPlatform.cpp
+ *-----------------------------------------------------------
+ */
+
+#include "CCDefines.h"
+#include "CCGLView.h"
+
+
+void CCNativeThreadLock()
+{
+ pthread_mutex_lock( &gView->engineThreadMutex );
+}
+
+
+void CCNativeThreadUnlock()
+{
+ pthread_mutex_unlock( &gView->engineThreadMutex );
+}
+
+
+void CCJobsThreadLock()
+{
+}
+
+
+void CCJobsThreadUnlock()
+{
+}
+
+
+uint CCProfiler::stackIndex = 0;
+CCText CCProfiler::buffer;
+
+
+CCProfiler::CCProfiler(const char *name)
+{
+ this->name = name;
+
+ struct timespec res;
+ clock_gettime( CLOCK_REALTIME, &res );
+ const double currentTime = res.tv_sec + (double)( ( res.tv_nsec / 1e6 ) * 0.001 );
+ startTime = currentTime;
+
+ stackIndex++;
+}
+
+
+CCProfiler::~CCProfiler()
+{
+ stackIndex--;
+
+ struct timespec res;
+ clock_gettime( CLOCK_REALTIME, &res );
+ const double currentTime = res.tv_sec + (double)( ( res.tv_nsec / 1e6 ) * 0.001 );
+ const double runTime = ( currentTime - startTime ) * 1000;
+
+ if( runTime > 1.0 )
+ {
+ for( uint i=0; i<stackIndex; ++i )
+ {
+ buffer += "\t";
+ }
+
+ buffer += name;
+ buffer += " ";
+ buffer += (float)runTime;
+ buffer += "\n";
+ }
+}
+
+
+void CCProfiler::open()
+{
+ FILE *pFile = fopen( "/sdcard/ccjni.profile.txt", "w" );
+ ASSERT( pFile != NULL );
+ if( pFile != NULL )
+ {
+ fclose( pFile );
+ }
+
+ buffer.length = 0;
+ buffer += "Frame : 0\n";
+}
+
+
+void CCProfiler::save()
+{
+ static int frame = 1;
+ FILE *pFile = fopen( "/sdcard/ccjni.profile.txt", "a" );
+ ASSERT( pFile != NULL );
+ if( pFile != NULL )
+ {
+ fwrite( buffer.buffer, sizeof( char ), buffer.length, pFile );
+ fclose( pFile );
+ }
+
+ buffer.length = 0;
+ buffer += "\nFrame : ";
+ buffer += frame++;
+ buffer += "\n";
+}
68 Android/Source/jni/Source/CCPlatform.h
@@ -0,0 +1,68 @@
+/*-----------------------------------------------------------
+ * 2c - Cross Platform 3D Application Framework
+ *-----------------------------------------------------------
+ * Copyright © 2011 - 2011 France Telecom
+ * This software is distributed under the Apache 2.0 license.
+ * http://www.apache.org/licenses/LICENSE-2.0.html
+ *-----------------------------------------------------------
+ * File Name : CCPlatform.h
+ * Description : Platform specific functions.
+ *
+ * Created : 11/05/11
+ * Author(s) : Ashraf Samy Hegab
+ *-----------------------------------------------------------
+ */
+
+#ifndef __CCPLATFORM_H__
+#define __CCPLATFORM_H__
+
+
+#include <GLES2/gl2.h>
+#include <GLES2/gl2ext.h>
+#include <cstdlib>
+#include <ctype.h>
+#include <time.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include <pthread.h>
+
+#include <math.h>
+#define MAX(x,y) ((x>=y)?x:y)
+#define MIN(x,y) ((x>=y)?y:x)
+
+// CCRelease: Remove for release build
+//#define PROFILEON
+
+#ifdef DEBUGON
+#include <android/log.h>
+#define LOG_TAG "libccjni"
+#define LOGI(...) __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__)
+#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__)
+#define printf LOGE
+#endif
+
+extern void CCNativeThreadLock();
+extern void CCNativeThreadUnlock();
+extern void CCJobsThreadLock();
+extern void CCJobsThreadUnlock();
+
+class CCProfiler
+{
+public:
+ CCProfiler(const char *name);
+ ~CCProfiler();
+
+ static void open();
+ static void save();
+
+protected:
+ const char *name;
+ double startTime;
+
+ static uint stackIndex;
+ static class CCText buffer;
+};
+
+
+#endif // __CCPLATFORM_H__
231 Android/Source/jni/Source/Rendering/CCDeviceRenderer.cpp
@@ -0,0 +1,231 @@
+/*-----------------------------------------------------------
+ * 2c - Cross Platform 3D Application Framework
+ *-----------------------------------------------------------
+ * Copyright © 2011 – 2011 France Telecom
+ * This software is distributed under the Apache 2.0 license.
+ * http://www.apache.org/licenses/LICENSE-2.0.html
+ *-----------------------------------------------------------
+ * File Name : CCDeviceRenderer.cpp
+ *-----------------------------------------------------------
+ */
+
+#include "CCDefines.h"
+#include "CCDeviceRenderer.h"
+#include "CCGLView.h"
+#include "CCFileManager.h"
+
+
+static bool compileShader(GLuint *shader, GLenum type, const char *path)
+{
+ GLint status;
+
+ char *data;
+ const int fileSize = CCFileManager::GetPackagedFile( path, &data );
+
+ const int offset = 41;
+ char code[fileSize + offset];
+
+ if( type == GL_VERTEX_SHADER )
+ {
+ sprintf( code, "%s%s", "#define VERTEX_SHADER\r\n", data );
+ }
+ else if( type == GL_FRAGMENT_SHADER )
+ {
+ sprintf( code, "%s%s", "#define PIXEL_SHADER\r\n", data );
+ }
+
+ // For safety
+ code[fileSize + offset - 1] = '0';
+ const char* appendedCode = (const char*)&code[0];
+
+ *shader = glCreateShader( type );
+ DEBUG_OPENGL();
+
+ glShaderSource( *shader, 1, &appendedCode, NULL );
+ DEBUG_OPENGL();
+
+ glCompileShader( *shader );
+ DEBUG_OPENGL();
+
+#ifdef DEBUGON
+ GLint logLength = 0;
+ glGetShaderiv( *shader, GL_INFO_LOG_LENGTH, &logLength );
+ if( logLength > 0 )
+ {
+ char *log = (char*)malloc( logLength );
+ glGetShaderInfoLog( *shader, logLength, &logLength, log );
+ DEBUGLOG( "Shader compile log:\n%s", log );
+ free( log );
+ }
+#endif
+
+ glGetShaderiv( *shader, GL_COMPILE_STATUS, &status );
+ if( status == 0 )
+ {
+ glDeleteShader( *shader );
+ return false;
+ }
+
+ return true;
+}
+
+
+CCDeviceRenderer::~CCDeviceRenderer()
+{
+ frameBufferManager.destoryAllFrameBuffers();
+}
+
+
+bool CCDeviceRenderer::linkProgram(GLuint &program)
+{
+ glLinkProgram( program );
+ GLint linkStatus = GL_FALSE;
+ glGetProgramiv( program, GL_LINK_STATUS, &linkStatus );
+ if( linkStatus != GL_TRUE )
+ {
+ GLint bufLength = 0;
+ glGetProgramiv( program, GL_INFO_LOG_LENGTH, &bufLength );
+ if( bufLength )
+ {
+ char *buf = (char*)malloc( bufLength );
+ if( buf )
+ {
+ glGetProgramInfoLog( program, bufLength, NULL, buf );
+ DEBUGLOG( "Could not link program:\n%s\n", buf );
+ free( buf );
+ }
+ }
+ glDeleteProgram( program );
+ program = 0;
+ return false;
+ }
+ return true;
+}
+
+
+
+int CCDeviceRenderer::getShaderUniformLocation(const char *name)
+{
+ return glGetUniformLocation( currentShader->program, name );
+}
+
+
+bool CCDeviceRenderer::loadShader(CCShader *shader)
+{
+ GLuint vertShader, fragShader;
+
+ CCText shaderPath = shader->name;
+ shaderPath += ".fx";
+
+ // Create shader program
+ shader->program = glCreateProgram();
+
+ if( !compileShader( &vertShader, GL_VERTEX_SHADER, shaderPath.buffer ) )
+ {
+ DEBUGLOG( "Failed to compile vertex shader." );
+ glDeleteProgram( shader->program );
+ shader->program = 0;
+ return false;
+ }
+
+ if( !compileShader( &fragShader, GL_FRAGMENT_SHADER, shaderPath.buffer ) )
+ {
+ DEBUGLOG( "Failed to compile fragment shader." );
+ glDeleteProgram( shader->program );
+ shader->program = 0;
+ return false;
+ }
+
+ DEBUG_OPENGL();
+
+ // Attach shaders to program
+ glAttachShader( shader->program, vertShader );
+ DEBUG_OPENGL();
+
+ glAttachShader( shader->program, fragShader );
+ DEBUG_OPENGL();
+
+ // Bind attribute locations - this needs to be done prior to linking
+ glBindAttribLocation( shader->program, ATTRIB_VERTEX, "vs_position" );
+ glBindAttribLocation( shader->program, ATTRIB_TEXCOORD, "vs_texCoord" );
+ glBindAttribLocation( shader->program, ATTRIB_COLOUR, "vs_colour" );
+ glBindAttribLocation( shader->program, ATTRIB_NORMAL, "vs_normal" );
+ DEBUG_OPENGL();
+
+ if( !linkProgram( shader->program ) )
+ {
+ DEBUGLOG( "Failed to link program." );
+ if( vertShader )
+ {
+ glDeleteShader( vertShader );
+ vertShader = 0;
+ }
+
+ if( fragShader )
+ {
+ glDeleteShader( fragShader );
+ fragShader = 0;
+ }
+
+ if( shader->program )
+ {
+ glDeleteProgram( shader->program );
+ shader->program = 0;
+ }
+
+ return false;
+ }
+
+ // Release vertex and fragment shaders
+ if( vertShader )
+ {
+ glDeleteShader( vertShader );
+ }
+
+ if( fragShader )
+ {
+ glDeleteShader( fragShader );
+ }
+
+ return true;
+}
+
+
+bool CCDeviceRenderer::createDefaultFrameBuffer(CCFrameBufferObject &fbo)
+{
+ fbo.setFrameBuffer( 0 );
+ fbo.width = gView->getWidth();
+ fbo.height = gView->getHeight();
+ return true;
+}
+
+
+void CCDeviceRenderer::refreshScreenSize()
+{
+ screenSize.width = gView->getWidth();
+ screenSize.height = gView->getHeight();
+}
+
+
+void GLVertexAttribPointer(uint index, int size, GLenum type, bool normalized, int stride, const void *pointer)
+{
+ glVertexAttribPointer( index, size, type, normalized, stride, pointer );
+}
+
+
+void GLUniform3fv(int location, int count, const GLfloat *value)
+{
+ glUniform3fv( location, count, value );
+}
+
+
+void GLUniform4fv(int location, int count, const GLfloat *value)
+{
+ glUniform4fv( location, count, value );
+}
+
+
+void GLUniformMatrix4fv(int location, int count, bool transpose, const GLfloat value[4][4])
+{
+ glUniformMatrix4fv( location, count, transpose, &value[0][0] );
+}
39 Android/Source/jni/Source/Rendering/CCDeviceRenderer.h
@@ -0,0 +1,39 @@
+/*-----------------------------------------------------------
+ * 2c - Cross Platform 3D Application Framework
+ *-----------------------------------------------------------
+ * Copyright © 2011 Ð 2011 France Telecom
+ * This software is distributed under the Apache 2.0 license.
+ * http://www.apache.org/licenses/LICENSE-2.0.html
+ *-----------------------------------------------------------
+ * File Name : CCDeviceRenderer.h
+ * Description : Android specific OpenGL renderer.
+ *
+ * Created : 15/05/11
+ * Author(s) : Chris Bowers, Ashraf Samy Hegab
+ *-----------------------------------------------------------
+ */
+
+
+#ifndef __CCDEVICERENDERER_H__
+#define __CCDEVICERENDERER_H__
+
+#include "CCRenderer.h"
+
+class CCDeviceRenderer : public CCRenderer
+{
+public:
+ ~CCDeviceRenderer();
+
+private:
+ bool linkProgram(GLuint &prog);
+ int getShaderUniformLocation(const char *name);
+ bool loadShader(CCShader *shader);
+
+ bool createContext() { return true; };
+ bool createDefaultFrameBuffer(CCFrameBufferObject &fbo);
+
+ void refreshScreenSize();
+};
+
+
+#endif // __CCDEVICERENDERER_H__
188 Android/Source/jni/Source/Rendering/CCTexturePNG.cpp
@@ -0,0 +1,188 @@
+/*-----------------------------------------------------------
+ * 2c - Cross Platform 3D Application Framework
+ *-----------------------------------------------------------
+ * Copyright © 2011 Ð 2011 France Telecom
+ * This software is distributed under the Apache 2.0 license.
+ * http://www.apache.org/licenses/LICENSE-2.0.html
+ *-----------------------------------------------------------
+ * File Name : CCTexturePNG.cpp
+ *-----------------------------------------------------------
+ */
+
+#include "CCDefines.h"
+#include "CCTexturePNG.h"
+#include "CCTextureManager.h"
+#include "CCDeviceFileManager.h"
+
+#include "CCGLView.h"
+
+
+CCTexturePNG::CCTexturePNG()
+{
+}
+
+
+CCTexturePNG::~CCTexturePNG()
+{
+}
+
+
+static bool JniDoesTextureExist(const char *name, const bool packaged)
+{
+ // JNI Java call
+ JNIEnv *jEnv = gView->jniEnv;
+
+ jclass jniClass = jEnv->FindClass( "com/android2c/CCJNI" );
+ ASSERT_MESSAGE( jniClass != 0, "Could not find Java class." );
+
+ static jmethodID mid = jEnv->GetStaticMethodID( jniClass, "TextureDoesTextureExist", "(Ljava/lang/String;Z)Z" );
+ ASSERT( mid != 0 );
+
+ // Call the function
+ jstring jFilename = jEnv->NewStringUTF( name );
+ const bool result = jEnv->CallStaticBooleanMethod( jniClass, mid, jFilename, packaged );
+ jEnv->DeleteLocalRef( jFilename );
+ return result;
+}
+
+
+static int JniLoad(const char *name, const bool packaged, const bool generateMipMap)
+{
+ // JNI Java call
+ JNIEnv *jEnv = gView->jniEnv;
+
+ jclass jniClass = jEnv->FindClass( "com/android2c/CCJNI" );
+ ASSERT_MESSAGE( jniClass != 0, "Could not find Java class." );
+
+ static jmethodID mid = jEnv->GetStaticMethodID( jniClass, "TextureLoad", "(Ljava/lang/String;ZZ)I" );
+ ASSERT( mid != 0 );
+
+ // Call the function
+ jstring jFilename = jEnv->NewStringUTF( name );
+ const int result = jEnv->CallStaticIntMethod( jniClass, mid, jFilename, packaged, generateMipMap );
+ jEnv->DeleteLocalRef( jFilename );
+ return result;
+}
+
+
+static int JniGetImageWidth()
+{
+ // JNI Java call
+ JNIEnv *jEnv = gView->jniEnv;
+
+ jclass jniClass = jEnv->FindClass( "com/android2c/CCJNI" );
+ ASSERT_MESSAGE( jniClass != 0, "Could not find Java class." );
+
+ static jmethodID mid = jEnv->GetStaticMethodID( jniClass, "TextureGetImageWidth", "()I" );
+ ASSERT( mid != 0 );
+
+ // Call the function
+ return jEnv->CallStaticIntMethod( jniClass, mid );
+}
+
+
+static int JniGetImageHeight()
+{
+ // JNI Java call
+ JNIEnv *jEnv = gView->jniEnv;
+
+ jclass jniClass = jEnv->FindClass( "com/android2c/CCJNI" );
+ ASSERT_MESSAGE( jniClass != 0, "Could not find Java class." );
+
+ static jmethodID mid = jEnv->GetStaticMethodID( jniClass, "TextureGetImageHeight", "()I" );
+ ASSERT( mid != 0 );
+
+ // Call the function
+ return jEnv->CallStaticIntMethod( jniClass, mid );
+}
+
+
+static int JniGetRawWidth()
+{
+ // JNI Java call
+ JNIEnv *jEnv = gView->jniEnv;
+
+ jclass jniClass = jEnv->FindClass( "com/android2c/CCJNI" );
+ ASSERT_MESSAGE( jniClass != 0, "Could not find Java class." );
+
+ static jmethodID mid = jEnv->GetStaticMethodID( jniClass, "TextureGetRawWidth", "()I" );
+ ASSERT( mid != 0 );
+
+ // Call the function
+ return jEnv->CallStaticIntMethod( jniClass, mid );
+}
+
+
+static int JniGetRawHeight()
+{
+ // JNI Java call
+ JNIEnv *jEnv = gView->jniEnv;
+
+ jclass jniClass = jEnv->FindClass( "com/android2c/CCJNI" );
+ ASSERT_MESSAGE( jniClass != 0, "Could not find Java class." );
+
+ static jmethodID mid = jEnv->GetStaticMethodID( jniClass, "TextureGetRawHeight", "()I" );
+ ASSERT( mid != 0 );
+
+ // Call the function
+ return jEnv->CallStaticIntMethod( jniClass, mid );
+}
+
+
+static int JniGetAllocatedHeight()
+{
+ // JNI Java call
+ JNIEnv *jEnv = gView->jniEnv;
+
+ jclass jniClass = jEnv->FindClass( "com/android2c/CCJNI" );
+ ASSERT_MESSAGE( jniClass != 0, "Could not find Java class." );
+
+ static jmethodID mid = jEnv->GetStaticMethodID( jniClass, "TextureGetAllocatedHeight", "()I" );
+ ASSERT( mid != 0 );
+
+ // Call the function
+ return jEnv->CallStaticIntMethod( jniClass, mid );
+}
+
+
+bool CCTexturePNG::load(const char *path, const CCResourceType resourceType, const bool generateMipMap)
+{
+#if defined PROFILEON
+ CCProfiler profile( "CCTexturePNG::load()" );
+#endif
+
+ CCText filename = path;
+ filename.stripDirectory();
+ filename.toLowercase();
+
+ glName = JniLoad( filename.buffer, resourceType == Resource_Packaged, generateMipMap );
+ if( glName > 0 )
+ {
+ allocatedWidth = imageWidth = JniGetImageWidth();
+ imageHeight = JniGetImageHeight();
+ allocatedHeight = JniGetAllocatedHeight();
+
+ rawWidth = JniGetRawWidth();
+ rawHeight = JniGetRawHeight();
+
+ // TODO: pretend it's always 4 bytes on Android, look into getting actual pixel size data
+ allocatedBytes = allocatedWidth * allocatedHeight * 4;
+ return true;
+ }
+ return false;
+}
+
+
+bool CCTexturePNG::createGLTexture()
+{
+ return true;
+}
+
+
+bool CCTexturePNG::DoesTextureExist(const char *path, const CCResourceType resourceType)
+{
+ CCText filename = path;
+ filename.stripDirectory();
+ filename.toLowercase();
+ return JniDoesTextureExist( filename.buffer, resourceType == Resource_Packaged );
+}
43 Android/Source/jni/Source/Rendering/CCTexturePNG.h
@@ -0,0 +1,43 @@
+/*-----------------------------------------------------------
+ * 2c - Cross Platform 3D Application Framework
+ *-----------------------------------------------------------
+ * Copyright © 2011 - 2011 France Telecom
+ * This software is distributed under the Apache 2.0 license.
+ * http://www.apache.org/licenses/LICENSE-2.0.html
+ *-----------------------------------------------------------
+ * File Name : CCTexturePNG.h
+ * Description : Android specific texture loader for JPG/GIF/PNG.
+ *
+ * Created : 15/05/11
+ * Author(s) : Chris Bowers, Ashraf Samy Hegab
+ *-----------------------------------------------------------
+ */
+
+#ifndef __CCTEXTUREPNG_H__
+#define __CCTEXTUREPNG_H__
+
+#include "CCTextureBase.h"
+
+class CCTexturePNG : public CCTextureBase
+{
+public:
+ typedef CCTextureBase super;
+
+ CCTexturePNG();
+ virtual ~CCTexturePNG();
+
+ // TextureBase
+ virtual bool load(const char *name, const CCResourceType resourceType, const bool generateMipMap);
+ virtual bool createGLTexture();
+
+ virtual float getRawWidth() const { return (float)rawWidth; }
+ virtual float getRawHeight() const { return (float)rawHeight; }
+
+ static bool DoesTextureExist(const char *path, const CCResourceType resourceType);
+
+private:
+ float rawWidth, rawHeight;
+};
+
+#endif // __TEXTUREPNG_H__
+
194 Android/Source/jni/Source/Tools/CCDeviceControls.cpp
@@ -0,0 +1,194 @@
+/*-----------------------------------------------------------
+ * 2c - Cross Platform 3D Application Framework
+ *-----------------------------------------------------------
+ * Copyright © 2010 - 2011 France Telecom
+ * This software is distributed under the Apache 2.0 license.
+ * http://www.apache.org/licenses/LICENSE-2.0.html
+ *-----------------------------------------------------------
+ * File Name : CCDeviceControls.cpp
+ *-----------------------------------------------------------
+ */
+
+#include "CCDefines.h"
+#include "CCDeviceControls.h"
+#include "CCAppManager.h"
+
+
+extern "C" JNIEXPORT void JNICALL Java_com_android2c_CCJNI_ControlsSetDPI(JNIEnv *jEnv, jobject jObj, jfloat jX, jfloat jY)
+{
+ CCControls::SetDPI( jX, jY );
+}
+
+
+// Java constants pulled from touch event at Java end
+enum ActionTypes
+{
+ ACTION_DOWN = 0x0,
+ ACTION_UP = 0x1,
+ ACTION_MOVE = 0x2,
+ ACTION_CANCEL = 0x3,
+ ACTION_OUTSIDE = 0x3,
+ POINTER_DOWN = 0x5,
+ POINTER_UP = 0x6
+};
+
+
+extern "C" JNIEXPORT void JNICALL Java_com_android2c_CCJNI_ControlsHandleTouch(JNIEnv *jEnv, jobject jObj, jfloat jX, jfloat jY, jint jActionType, jint jTouchId)
+{
+ // Force only two fingers
+ if( gEngine && ( jTouchId == 0 || jTouchId == 1 ) )
+ {
+ CCDeviceControls *controls = (CCDeviceControls*)gEngine->controls;
+ controls->touchAction( jX, jY, jActionType, jTouchId );
+ }
+}
+
+
+extern "C" JNIEXPORT bool JNICALL Java_com_android2c_CCJNI_ControlsHandleBackButton(JNIEnv *jEnv, jobject jObj)
+{
+ if( gEngine != NULL )
+ {
+ for( int i=gEngine->scenes.length-1; i>=0; --i )
+ {
+ CCSceneBase *scene = gEngine->scenes.list[i];
+ if( scene->handleBackButton() )
+ {
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+
+CCDeviceControls::CCDeviceControls()
+{
+}
+
+
+void CCDeviceControls::touchAction(const float x, const float y, const int action, const int touchId)
+{
+ if( action == ACTION_DOWN || action == POINTER_DOWN )
+ {
+ UITouch *touch = &deviceTouches[touchId];
+ touch->position.x = x;
+ touch->position.y = y;
+ touchBegin( touch, touchId );
+ }
+ else if( action == ACTION_MOVE )
+ {
+ UITouch *touch = (UITouch*)screenTouches[touchId].usingTouch;
+ if( touch != NULL )
+ {
+ touch->position.x = x;
+ touch->position.y = y;
+ touchMove( touch, touchId );
+ }
+ }
+ else
+ {
+ UITouch *touch = (UITouch*)screenTouches[touchId].usingTouch;
+ if( touch != NULL )
+ {
+ touch->position.x = x;
+ touch->position.y = y;
+ touchEnd( touch );
+ }
+
+ }
+}
+
+void CCDeviceControls::touchBegin(UITouch *touch, const int touchIndex)
+{
+ touchHandle( touch, touchIndex );
+
+ inUse = false;
+ for( uint touchIndex=0; touchIndex<numberOfTouches; ++touchIndex )
+ {
+ inUse |= screenTouches[touchIndex].usingTouch != NULL;
+ }
+}
+
+
+void CCDeviceControls::touchMove(UITouch *touch, const int touchIndex)
+{
+ if( inUse )
+ {
+ touchHandle( touch, touchIndex );
+ }
+}
+
+
+void CCDeviceControls::touchEnd(UITouch *touch)
+{
+ unTouch( touch );
+ bool touchesFinished = true;
+
+ for( uint i = 0; i<numberOfTouches; ++i )
+ {
+ if( screenTouches[i].usingTouch != NULL )
+ {
+ touchesFinished = false;
+ }
+ }
+
+ if( touchesFinished )
+ {
+ inUse = false;
+ }
+}
+
+
+void CCDeviceControls::touchHandle(UITouch *touch, const int touchIndex)
+{
+ const CCSize &inverseScreenSize = gEngine->renderer->getInverseScreenSize();
+
+ CCPoint position = touch->position;
+ position.x *= inverseScreenSize.width;
+ position.y *= inverseScreenSize.height;
+
+ CCScreenTouches& screenTouch = screenTouches[touchIndex];
+ {
+ CCPoint screenPosition = position;
+ if( CCAppManager::GetOrientation().target == 270.0f )
+ {
+ CCSwapFloat( screenPosition.x, screenPosition.y );
+ screenPosition.y = 1.0f - screenPosition.y;
+ }
+ else if( CCAppManager::GetOrientation().target == 90.0f )
+ {
+ CCSwapFloat( screenPosition.x, screenPosition.y );
+ screenPosition.x = 1.0f - screenPosition.x;
+ }
+ else if( CCAppManager::GetOrientation().target == 180.0f )
+ {
+ screenPosition.x = 1.0f - screenPosition.x;
+ screenPosition.y = 1.0f - screenPosition.y;
+ }
+
+ CCNativeThreadLock();
+ if( screenTouch.usingTouch != NULL )
+ {
+ screenTouch.delta.x += screenPosition.x - screenTouch.position.x;
+ screenTouch.delta.y += screenPosition.y - screenTouch.position.y;
+ screenTouch.totalDelta.x += screenTouch.delta.x;
+ screenTouch.totalDelta.y += screenTouch.delta.y;
+ }
+ else
+ {
+ // Restart our counters
+ screenTouch.totalDelta.x = 0.0f;
+ screenTouch.totalDelta.y = 0.0f;
+ screenTouch.timeHeld = 0.0f;
+ screenTouch.startPosition = screenPosition;
+
+ for( uint i=0; i<CCScreenTouches::max_last_deltas; ++i )
+ {
+ screenTouch.lastDeltas[i].clear();
+ }
+ }
+ screenTouch.position = screenPosition;
+ screenTouch.usingTouch = touch;
+ CCNativeThreadUnlock();
+ }
+}
46 Android/Source/jni/Source/Tools/CCDeviceControls.h
@@ -0,0 +1,46 @@
+/*-----------------------------------------------------------
+ * 2c - Cross Platform 3D Application Framework
+ *-----------------------------------------------------------
+ * Copyright © 2010 - 2011 France Telecom
+ * This software is distributed under the Apache 2.0 license.
+ * http://www.apache.org/licenses/LICENSE-2.0.html
+ *-----------------------------------------------------------
+ * File Name : CCDeviceControls.h
+ * Description : Handles Android specific controls.
+ *
+ * Created : 15/05/11
+ * Author(s) : Chris Bowers, Ashraf Samy Hegab
+ *-----------------------------------------------------------
+ */
+
+#ifndef __CCDEVICECONTROLS_H__
+#define __CCDEVICECONTROLS_H__
+
+struct UITouch
+{
+ CCPoint position;
+};
+
+#include "CCControls.h"
+
+class CCDeviceControls : public CCControls
+{
+public:
+ CCDeviceControls();
+
+ // Handle JNI touch action call
+ void touchAction(const float x, const float y, const int action, const int touchId);
+
+ void touchBegin(UITouch *touch, const int touchIndex);
+ void touchMove(UITouch *touch, const int touchIndex);
+ void touchEnd(UITouch *touch);
+
+protected:
+ void touchHandle(UITouch *touch, const int touchIndex);
+
+protected:
+ UITouch deviceTouches[numberOfTouches];
+};
+
+
+#endif // __CCDEVICECONTROLS_H__
268 Android/Source/jni/Source/Tools/CCDeviceFileManager.cpp
@@ -0,0 +1,268 @@
+/*-----------------------------------------------------------
+ * 2c - Cross Platform 3D Application Framework
+ *-----------------------------------------------------------
+ * Copyright © 2010 - 2011 France Telecom
+ * This software is distributed under the Apache 2.0 license.
+ * http://www.apache.org/licenses/LICENSE-2.0.html
+ *-----------------------------------------------------------
+ * File Name : CCDeviceFileManager.cpp
+ *-----------------------------------------------------------
+ */
+
+#include "CCDefines.h"
+#include "CCDeviceFileManager.h"
+
+#include <errno.h>
+#include <jni.h>
+
+
+CCText CCDeviceFileManager::apkPath;
+CCText CCDeviceFileManager::dataPath;
+
+
+// Sets up the path to the resources in the APK file
+extern "C" JNIEXPORT void JNICALL Java_com_android2c_CCJNI_FileManagerSetPaths(JNIEnv *jEnv, jobject jObj, jstring jApkPath, jstring jDataPath)
+{
+ // Do the string conversion before setting the path
+ jboolean isCopy;
+ const char *temp = jEnv->GetStringUTFChars( jApkPath, &isCopy );
+ CCDeviceFileManager::apkPath = temp;
+ jEnv->ReleaseStringUTFChars( jApkPath, temp );
+
+ temp = jEnv->GetStringUTFChars( jDataPath, &isCopy );
+ CCDeviceFileManager::dataPath = temp;
+ CCDeviceFileManager::dataPath += "/";
+ jEnv->ReleaseStringUTFChars( jDataPath, temp );
+}
+
+
+CCDeviceFileManager::CCDeviceFileManager(CCResourceType resourceType)
+{
+ if( resourceType == Resource_Packaged )
+ {
+ m_File = new CCZipFile();
+ }
+ else
+ {
+ m_File = new CCBinaryFile();
+ }
+}
+
+
+const bool CCDeviceFileManager::open(const char *file)
+{
+ return m_File->open( file );
+}
+
+
+void CCDeviceFileManager::close()
+{
+ return m_File->close();
+}
+
+
+const uint CCDeviceFileManager::read(void *dest, const uint size)
+{
+ return m_File->read( dest, size );
+}
+
+void CCDeviceFileManager::seek(const uint size)
+{
+ m_File->seek( size );
+}
+
+
+void CCDeviceFileManager::setPosition(const uint pos)
+{
+ m_File->setPosition( pos );
+}
+
+
+const bool CCDeviceFileManager::endOfFile()
+{
+ return m_File->endOfFile();
+}
+
+
+const uint CCDeviceFileManager::size()
+{
+ return m_File->size();
+}
+
+
+const uint CCDeviceFileManager::position()
+{
+ return m_File->position();
+}
+
+
+// CCZipFile
+CCZipFile::CCZipFile()
+{
+ m_apkArchive = NULL;
+ m_File = NULL;
+ m_Size = 0;
+ m_Position = 0;
+}
+
+
+const bool CCZipFile::open(const char *file)
+{
+ // Grab the APK (zip) file to access resource
+ m_apkArchive = zip_open( CCDeviceFileManager::apkPath.buffer, 0, NULL );
+ if( m_apkArchive == NULL )
+ {
+ DEBUGLOG( "Error loading APK" );
+ return false;
+ }
+
+ // It's not an image, so add res/raw/ to the path to look in the correct directory
+ CCText fullFilePath = "res/raw/";
+ fullFilePath += file;
+
+ // Open the supplied file as read-only
+ m_File = zip_fopen( m_apkArchive, fullFilePath.buffer, 0 );
+ if( m_File != NULL )
+ {
+ // Get the file size
+ struct zip_stat stat;
+ zip_stat( m_apkArchive, fullFilePath.buffer, 0, &stat );
+ m_Size = stat.size;
+ return true;
+ }
+
+ DEBUGLOG( "Error loading file %s: %s", fullFilePath.buffer, strerror( errno ) );
+ return false;
+}
+
+
+void CCZipFile::close()
+{
+ if( m_File != NULL )
+ {
+ zip_fclose( m_File );
+ }
+ m_File = NULL;
+ m_Size = 0;
+
+ if( m_apkArchive != NULL )
+ {
+ zip_close( m_apkArchive );
+ }
+ m_apkArchive = NULL;
+}
+
+
+const uint CCZipFile::read(void *dest, const uint size)
+{
+ ASSERT( m_File != NULL && m_apkArchive != NULL );
+
+ // Regular file handle
+ const uint sz = zip_fread( m_File, dest, size );
+ ASSERT( sz == size );
+ if( sz > 0 )
+ {
+ m_Position += size;
+ return size;
+ }
+ ASSERT_MESSAGE( false, "File::Read(...) : ERROR! Error reading" );
+
+ return 0;
+}
+
+void CCZipFile::seek(const uint size)
+{
+ // Cannot seek through a zip file using libzip so fake a read
+ char empty[size];
+ read( empty, size );
+}
+
+
+void CCZipFile::setPosition(const uint pos)
+{
+ // Cannot seek through a zip file using libzip
+ ASSERT( false );
+// m_File.seek( pos );
+// m_Position = pos;
+}
+
+
+CCBinaryFile::CCBinaryFile()
+{
+ m_File = NULL;
+ m_Size = 0;
+ m_Position = 0;
+}
+
+
+const bool CCBinaryFile::open(const char *filePath)
+{
+ m_File = fopen( filePath, "rb" );
+ if( m_File == NULL )
+ {
+ return false;
+ }
+
+ fpos_t pos = 0;
+ fseek( m_File, 0, SEEK_END );
+ fgetpos( m_File, &pos );
+ fseek( m_File, 0, SEEK_SET );
+ m_Size = (uint)pos;
+ m_Position = 0;
+
+ return true;
+}
+
+
+// CCBinaryFile
+void CCBinaryFile::close()
+{
+ if( m_File != NULL )
+ {
+ fclose( m_File );
+ m_File = NULL;
+ }
+
+ m_File = NULL;
+ m_Size = 0;
+ m_Position = 0;
+}
+
+
+const uint CCBinaryFile::read(void *dest, const uint size)
+{
+ ASSERT_MESSAGE( m_File != NULL, "File::Read(...) : ERROR! File not open" );
+
+ // Regular file handle
+ const uint sz = fread( dest, size, 1, m_File );
+ ASSERT( sz == 1 );
+ if( sz > 0 )
+ {
+ m_Position += size;
+ return size;
+ }
+ DEBUGLOG( "File::Read(...) : WARNING! Error reading. Code %i\n", sz );
+ ASSERT_MESSAGE( false, "File::Read(...) : ERROR! Error reading" );
+
+ return 0;
+}
+
+
+
+void CCBinaryFile::seek(const uint size)
+{
+ ASSERT_MESSAGE( m_File != NULL, "File::Position(...) : ERROR! File not open" );
+
+ fseek( m_File, size, SEEK_CUR );
+ m_Position += size;
+}
+
+
+void CCBinaryFile::setPosition(const uint pos)
+{
+ ASSERT_MESSAGE( m_File != NULL, "File::Position(...) : ERROR! File not open" );
+ ASSERT_MESSAGE( pos < m_Size, "File::Position(...) : ERROR! Invalid file position" );
+
+ fseek( m_File, pos, SEEK_SET );
+ m_Position = pos;
+}
107 Android/Source/jni/Source/Tools/CCDeviceFileManager.h
@@ -0,0 +1,107 @@
+/*-----------------------------------------------------------
+ * 2c - Cross Platform 3D Application Framework
+ *-----------------------------------------------------------
+ * Copyright © 2010 Ð 2011 France Telecom
+ * This software is distributed under the Apache 2.0 license.
+ * http://www.apache.org/licenses/LICENSE-2.0.html
+ *-----------------------------------------------------------
+ * File Name : CCDeviceFileManager.h
+ * Description : Android specific file manager.
+ *
+ * Created : 15/05/11
+ * Author(s) : Chris Bowers, Ashraf Samy Hegab
+ *-----------------------------------------------------------
+ */
+
+#ifndef __CCDEVICEFILEMANAGER_H__
+#define __CCDEVICEFILEMANAGER_H__
+
+#include "CCFileManager.h"
+
+#include "../libzip/zip.h"
+
+class CCBaseFile
+{
+public:
+ virtual const bool open(const char *file) = 0;
+ virtual void close() = 0;
+ virtual const uint read(void *dest, const uint size) = 0;
+ virtual void seek(const uint size) = 0;
+ virtual void setPosition(const uint pos) = 0;
+ const bool endOfFile()
+ {
+ return m_Position >= m_Size;
+ }
+
+ virtual const uint size()
+ {
+ return m_Size;
+ }
+
+ virtual const uint position()
+ {
+ return m_Position;
+ }
+
+protected:
+ uint m_Size;
+ uint m_Position;
+};
+
+class CCDeviceFileManager : public CCFileManager
+{
+public:
+ CCDeviceFileManager(CCResourceType resourceType);
+
+ const bool open(const char *file);
+ void close();
+ const uint read(void *dest, const uint size);
+ void seek(const uint size);
+ void setPosition(const uint pos);
+ const bool endOfFile();
+ const uint size();
+ const uint position();
+
+public:
+ static CCText apkPath;
+ static CCText dataPath;
+
+private:
+ CCBaseFile *m_File;
+};
+
+class CCZipFile : public CCBaseFile
+{
+public:
+ CCZipFile();
+
+ const bool open(const char *file);
+ void close();
+ const uint read(void *dest, const uint size);
+ void seek(const uint size);
+ void setPosition(const uint pos);
+
+protected:
+ zip_file *m_File;
+
+private:
+ zip *m_apkArchive;
+};
+
+class CCBinaryFile : public CCBaseFile
+{
+public:
+ CCBinaryFile();
+
+ const bool open(const char *file);
+ void close();
+ const uint read(void *dest, const uint size);
+ void seek(const uint size);
+ void setPosition(const uint pos);
+
+protected:
+ FILE *m_Fil