00001 #ifndef ENGINE_H 00002 #define ENGINE_H 00003 00004 #define FIELD_WIDTH current_map.width 00005 #define FIELD_HEIGHT current_map.height 00006 00007 #define ANIMATE_DIAMONDS 00008 #define DELAY_TIME 4 00009 #define MOVE_DELAY 5 00010 #define EXPLODE_DURATION 4 00011 #define VERSION_STRING "v1.0" 00012 00013 #define VIEWPORT_WIDTH (LCD_WIDTH/8) 00014 #define VIEWPORT_HEIGHT ((LCD_HEIGHT-12)/8) 00015 #define SCROLL_INCR_X 6 00016 #define SCROLL_INCR_Y 4 00017 #define EDGE_X 4 00018 #define EDGE_Y 2 00019 00020 #define SCREEN_CENTER (LCD_WIDTH/2) 00021 00022 #include "cprotofix.h" 00023 #define OPTIMIZE_ROM_CALLS 00024 #define USE_TI89 00025 #define USE_TI92P 00026 #define USE_V200 00027 #include <tigcclib.h> 00028 00029 #include "skye.h" 00030 00031 #define NUM_EFFECT_TYPES 10 00032 //{{{ 00033 #define EFFECT_NONE 0 00034 #define EFFECT_EXPLODE_TOPLEFT 1 00035 #define EFFECT_EXPLODE_TOP 2 00036 #define EFFECT_EXPLODE_TOPRIGHT 3 00037 #define EFFECT_EXPLODE_LEFT 4 00038 #define EFFECT_EXPLODE_CENTER 5 00039 #define EFFECT_EXPLODE_RIGHT 6 00040 #define EFFECT_EXPLODE_BOTLEFT 7 00041 #define EFFECT_EXPLODE_BOTTOM 8 00042 #define EFFECT_EXPLODE_BOTRIGHT 9 00043 #define EFFECT_BLOB 10 00044 #define EFFECT_VIRUS 11 00045 #define EFFECT_TWISTER 12 00046 #define EFFECT_GNASHER 13 00047 #define EFFECT_SPIKE 14 00048 #define EFFECT_DIAMOND 15 00049 //}}} 00050 00051 typedef struct effect_info { 00052 unsigned char sprite; 00053 signed char duration; 00054 } effect_info; 00055 00056 extern char active_set[32]; 00057 00058 //{{{ 00059 typedef struct engine_map_square { 00060 map_square v; 00061 char skip; 00062 effect_info effect; 00063 } engine_map_square; 00064 //}}} 00065 //{{{ 00066 // Game engine internal map format 00067 typedef struct engine_map 00068 { 00069 short width, height; 00070 short gamerules; 00071 00072 char name[32]; 00073 char author[32]; 00074 char hint[64]; 00075 char congrat[64]; 00076 engine_map_square **t; 00077 } engine_map; 00078 //}}} 00079 00080 extern engine_map current_map; 00081 extern int current_level_num; 00082 extern int player_x, player_y; 00083 extern const char tile_sprites[NUM_TILE_TYPES][24]; 00084 extern const char effects[NUM_EFFECT_TYPES][24]; 00085 extern const char black_square[24]; 00086 00087 #ifdef SPLINT 00088 # define GrayIdle() 00089 #else 00090 # define GrayIdle() pokeIO(0x600005,0b10111) 00091 #endif 00092 00093 #ifndef CPROTO 00094 #include "proto.h" 00095 #endif 00096 00097 #endif //ENGINE_H
1.3.6