Sprint game for GR-PEACH.

Dependencies:   GR-PEACH_video GraphicsFramework LCD_shield_config R_BSP


What is this ?

This is a sprint time trial game. In this game you move by swiping from left to right.
The faster you swipe, the faster your character moves.
You can change the language of the comment by USER_BUTTON0. (defalt :English)
It uses the high speed Renesas graphics drawing library and the 2D graphics hardware accelerator.

Composition

GR-PEACH and GR-PEACH 4.3inch LCD Shield. /media/uploads/dkato/swipe_runner.jpg

About image to be drawn

Image files that are used in the sample program is easily possible replacement by using the "Convert Image to Binary Table" tool below.
This tool generates "BinaryImage_RZ_A1H.c" and "BinaryImage_RZ_A1H.h" in the Images folder and converts each image file to binary. Then, this tool outputs the data to "RGA_Sample_BinaryImage" table of "BinaryImage_RZ_A1H.c" and defines the macro name indicating the offset position in the table to "BinaryImage_RZ_A1H.h".
The sample program executes with reference to this macro name for offset.
/media/uploads/dkato/cnv_img_to_bin_tbl_swipe_runner.zip


概要

ゴールまでの到着時間を競うゲームです。画面の左から右へスワイプすると走ります。
速くスワイプすると走るスピードがあがります。
USER_BUTTON0を押すと吹き出しコメントを日本語に変更できます。(初期状態では英語に設定されています)
アクセラレータハードウェア アクセラレーションを使って高速に描画。

構成

GR-PEACH、GR-PEACH 4.3inch LCD Shield。 /media/uploads/dkato/swipe_runner.jpg

描画する画像について

サンプルプログラムで使用している画像ファイルは、下記の"Convert Image to Binary Table"ツールを利用する事で、簡単に差し替えが可能です。
このツールは、Imagesフォルダ内にBinaryImage_RZ_A1H.c ファイルと BinaryImage_RZ_A1H.h ファイルを生成し、各画像ファイルをバイナリ変換します。そして、そのデータをBinaryImage_RZ_A1H.c ファイルのRGA_Sample_BinaryImageテーブルに出力し、BinaryImage_RZ_A1H.h ファイルにテーブル内のオフセット位置を示すマクロ名を定義します。
サンプルプログラムでは、オフセット用のマクロ名を参照して動作します。
/media/uploads/dkato/cnv_img_to_bin_tbl_swipe_runner.zip

Committer:
dkato
Date:
Thu Sep 29 03:20:32 2016 +0000
Revision:
2:9c5f0045c9df
Suports language selection.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dkato 2:9c5f0045c9df 1 #ifndef BINARYIMAGE_RZ_A1H_H
dkato 2:9c5f0045c9df 2 #define BINARYIMAGE_RZ_A1H_H
dkato 2:9c5f0045c9df 3
dkato 2:9c5f0045c9df 4 #ifdef __cplusplus
dkato 2:9c5f0045c9df 5 extern "C" { /* Start of C Symbol */
dkato 2:9c5f0045c9df 6 #endif
dkato 2:9c5f0045c9df 7
dkato 2:9c5f0045c9df 8 extern const uint8_t RGA_Sample_BinaryImage[ 0x003512C0uL ];
dkato 2:9c5f0045c9df 9
dkato 2:9c5f0045c9df 10 #define start_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00000000 ))
dkato 2:9c5f0045c9df 11 #define tukare1_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x0001F420 ))
dkato 2:9c5f0045c9df 12 #define tukare2_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x0003E840 ))
dkato 2:9c5f0045c9df 13 #define run1_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x0005DC60 ))
dkato 2:9c5f0045c9df 14 #define run2_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x0007D080 ))
dkato 2:9c5f0045c9df 15 #define run3_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x0009C4A0 ))
dkato 2:9c5f0045c9df 16 #define run4_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x000BB8C0 ))
dkato 2:9c5f0045c9df 17 #define run5_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x000DACE0 ))
dkato 2:9c5f0045c9df 18 #define run6_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x000FA100 ))
dkato 2:9c5f0045c9df 19 #define run7_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00119520 ))
dkato 2:9c5f0045c9df 20 #define dash1_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00138940 ))
dkato 2:9c5f0045c9df 21 #define dash2_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00157D60 ))
dkato 2:9c5f0045c9df 22 #define dash3_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00177180 ))
dkato 2:9c5f0045c9df 23 #define dash4_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x001965A0 ))
dkato 2:9c5f0045c9df 24 #define sdash1_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x001B59C0 ))
dkato 2:9c5f0045c9df 25 #define sdash2_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x001D4DE0 ))
dkato 2:9c5f0045c9df 26 #define sdash3_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x001F4200 ))
dkato 2:9c5f0045c9df 27 #define goal_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00213620 ))
dkato 2:9c5f0045c9df 28 #define haikei_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00232A40 ))
dkato 2:9c5f0045c9df 29 #define haikei_temae_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00287CC0 ))
dkato 2:9c5f0045c9df 30 #define swipe_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x002A84E0 ))
dkato 2:9c5f0045c9df 31 #define start3_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x002AC500 ))
dkato 2:9c5f0045c9df 32 #define start2_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x002B67A0 ))
dkato 2:9c5f0045c9df 33 #define start1_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x002C0A40 ))
dkato 2:9c5f0045c9df 34 #define go_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x002CACE0 ))
dkato 2:9c5f0045c9df 35 #define comment1_jp_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x002D4F80 ))
dkato 2:9c5f0045c9df 36 #define comment2_jp_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x002DC660 ))
dkato 2:9c5f0045c9df 37 #define comment3_jp_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x002E5840 ))
dkato 2:9c5f0045c9df 38 #define comment4_jp_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x002EB9E0 ))
dkato 2:9c5f0045c9df 39 #define comment5_jp_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x002F1D60 ))
dkato 2:9c5f0045c9df 40 #define comment1_en_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x002F6EC0 ))
dkato 2:9c5f0045c9df 41 #define comment2_en_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x002FE5A0 ))
dkato 2:9c5f0045c9df 42 #define comment3_en_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00307780 ))
dkato 2:9c5f0045c9df 43 #define comment4_en_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x0030D920 ))
dkato 2:9c5f0045c9df 44 #define comment5_en_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00313CA0 ))
dkato 2:9c5f0045c9df 45 #define logo_start_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00318E00 ))
dkato 2:9c5f0045c9df 46 #define logo_goal_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x003195A0 ))
dkato 2:9c5f0045c9df 47 #define logo_genzai_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00319D40 ))
dkato 2:9c5f0045c9df 48 #define goooal_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x0031A4E0 ))
dkato 2:9c5f0045c9df 49 #define result_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00327FA0 ))
dkato 2:9c5f0045c9df 50 #define sec_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x003428C0 ))
dkato 2:9c5f0045c9df 51 #define num_0_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x003434C0 ))
dkato 2:9c5f0045c9df 52 #define num_1_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00343C00 ))
dkato 2:9c5f0045c9df 53 #define num_2_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00344340 ))
dkato 2:9c5f0045c9df 54 #define num_3_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00344A80 ))
dkato 2:9c5f0045c9df 55 #define num_4_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x003451C0 ))
dkato 2:9c5f0045c9df 56 #define num_5_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00345900 ))
dkato 2:9c5f0045c9df 57 #define num_6_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00346040 ))
dkato 2:9c5f0045c9df 58 #define num_7_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00346780 ))
dkato 2:9c5f0045c9df 59 #define num_8_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00346EC0 ))
dkato 2:9c5f0045c9df 60 #define num_9_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00347600 ))
dkato 2:9c5f0045c9df 61 #define dot_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00347D40 ))
dkato 2:9c5f0045c9df 62 #define hosi_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00347E40 ))
dkato 2:9c5f0045c9df 63 #define new_record_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x0034AA20 ))
dkato 2:9c5f0045c9df 64 #define record_1st_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00350B20 ))
dkato 2:9c5f0045c9df 65
dkato 2:9c5f0045c9df 66 #ifdef __cplusplus
dkato 2:9c5f0045c9df 67 } /* End of C Symbol */
dkato 2:9c5f0045c9df 68 #endif
dkato 2:9c5f0045c9df 69
dkato 2:9c5f0045c9df 70 #endif /* BINARYIMAGE_RZ_A1H_H */