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.
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。
描画する画像について
サンプルプログラムで使用している画像ファイルは、下記の"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
Images/BinaryImage_RZ_A1H.h
- Committer:
- dkato
- Date:
- 2016-09-29
- Revision:
- 2:9c5f0045c9df
File content as of revision 2:9c5f0045c9df:
#ifndef BINARYIMAGE_RZ_A1H_H #define BINARYIMAGE_RZ_A1H_H #ifdef __cplusplus extern "C" { /* Start of C Symbol */ #endif extern const uint8_t RGA_Sample_BinaryImage[ 0x003512C0uL ]; #define start_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00000000 )) #define tukare1_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x0001F420 )) #define tukare2_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x0003E840 )) #define run1_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x0005DC60 )) #define run2_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x0007D080 )) #define run3_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x0009C4A0 )) #define run4_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x000BB8C0 )) #define run5_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x000DACE0 )) #define run6_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x000FA100 )) #define run7_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00119520 )) #define dash1_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00138940 )) #define dash2_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00157D60 )) #define dash3_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00177180 )) #define dash4_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x001965A0 )) #define sdash1_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x001B59C0 )) #define sdash2_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x001D4DE0 )) #define sdash3_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x001F4200 )) #define goal_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00213620 )) #define haikei_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00232A40 )) #define haikei_temae_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00287CC0 )) #define swipe_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x002A84E0 )) #define start3_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x002AC500 )) #define start2_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x002B67A0 )) #define start1_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x002C0A40 )) #define go_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x002CACE0 )) #define comment1_jp_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x002D4F80 )) #define comment2_jp_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x002DC660 )) #define comment3_jp_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x002E5840 )) #define comment4_jp_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x002EB9E0 )) #define comment5_jp_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x002F1D60 )) #define comment1_en_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x002F6EC0 )) #define comment2_en_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x002FE5A0 )) #define comment3_en_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00307780 )) #define comment4_en_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x0030D920 )) #define comment5_en_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00313CA0 )) #define logo_start_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00318E00 )) #define logo_goal_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x003195A0 )) #define logo_genzai_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00319D40 )) #define goooal_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x0031A4E0 )) #define result_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00327FA0 )) #define sec_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x003428C0 )) #define num_0_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x003434C0 )) #define num_1_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00343C00 )) #define num_2_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00344340 )) #define num_3_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00344A80 )) #define num_4_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x003451C0 )) #define num_5_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00345900 )) #define num_6_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00346040 )) #define num_7_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00346780 )) #define num_8_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00346EC0 )) #define num_9_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00347600 )) #define dot_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00347D40 )) #define hosi_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00347E40 )) #define new_record_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x0034AA20 )) #define record_1st_File ((const graphics_image_t*)( RGA_Sample_BinaryImage + 0x00350B20 )) #ifdef __cplusplus } /* End of C Symbol */ #endif #endif /* BINARYIMAGE_RZ_A1H_H */