资源简介
这是大一暑假写的第一个游戏,用C++写的,花了七天时间
代码片段和文件信息
#include “SDL.h“
#include “SDL_image.h“
#include “SDL_mixer.h“
#include “SDL_ttf.h“
#include “TIMER.h“
Timer fps;
//图层
SDL_Surface *dot = NULL;
SDL_Surface *enemy = NULL;
SDL_Surface *bullet_image[2];
SDL_Surface *screen = NULL;
SDL_Surface *tileSheet = NULL;
SDL_Surface *background = NULL;
SDL_Surface *bomb = NULL;
SDL_Surface *title = NULL;
SDL_Surface *black = NULL;
SDL_Surface *staff = NULL;
SDL_Surface *Arrow[2];
SDL_Surface *help_screen = NULL;
SDL_Surface *life_three = NULL;
SDL_Surface *life_two = NULL;
SDL_Surface *life_one = NULL;
SDL_Surface *over = NULL;
SDL_Surface *win = NULL;
SDL_Surface *grass1 = NULL;
SDL_Surface *perfect_victor = NULL;
//阿聪
SDL_Surface *seconds = NULL;
SDL_Surface *count_money = NULL;
SDL_Surface *coin = NULL;
SDL_Surface *eato = NULL;
SDL_Surface *show_score = NULL;
SDL_Surface *pipe = NULL;
SDL_Surface *castal = NULL;
SDL_Surface *danger = NULL;
SDL_Surface *symbol1 = NULL;
SDL_Surface *boss = NULL;
SDL_Surface *appear1 = NULL;
SDL_Surface *appear2 = NULL;
SDL_Surface *boss_hit = NULL;
SDL_Surface *HP_green = NULL;
SDL_Surface *HP_red = NULL;
SDL_Surface *boss_ko = NULL;
TTF_Font *font = NULL;
//音乐
Mix_Music * title_music = NULL;
Mix_Music * game_music = NULL;
Mix_Chunk * jump_se = NULL;
Mix_Chunk * staff_se = NULL;
Mix_Chunk * dead_se = NULL;
Mix_Chunk * gameover_se = NULL;
Mix_Chunk * bomb_se = NULL;
Mix_Chunk * coin_se = NULL;
Mix_Chunk * boss_start = NULL;
Mix_Chunk * win_se = NULL;
//截图区域信息
SDL_Rect clips[ 12 ];
SDL_Rect clipbomb[4];
//阿聪
SDL_Rect clipsRight[ 4 ];
SDL_Rect clipsLeft[ 4 ];
SDL_Rect clipsRight_enemy[ 8 ];
SDL_Rect clipsLeft_enemy[ 8 ];
SDL_Rect clips_Dotright[ 6 ];
SDL_Rect clips_Dotleft[ 6 ];
SDL_Rect clips_score[ 4 ];
SDL_Rect clips_eato[ 3 ];
SDL_Rect clips_Right_boss[ 3 ];
SDL_Rect clips_Left_boss[ 3 ];
SDL_Rect clips_appear_boss_one[ 5 ];
SDL_Rect clips_appear_boss_two[ 5 ];
SDL_Rect clips_hp[ 10 ];
//全局控制变量们
int Dead_enemy[7];
int Dead_flower[2];
bool hit_target = false;
bool hit_the_top = false;
bool In_animation = false;
bool Pressed = false;
bool Begin_staff = false;
bool title_begin = false;
bool up = true;
bool arrow_state = false;
bool Help_screen = false;
bool Is_help = false;
bool title_quit = false;
bool title_mus_played = false;
bool Game_mus_played = false;
bool Has_dead = false;
int Left_or_right_released = 0;
int arrow_frame = 0;
int wait_count = 0;
int onther_wait_count = 0;
int Dead_wait_count = 0;
int Distance_touches_wall = 0;
int alpha = SDL_ALPHA_TRANSPARENT;
Uint32 start1 = 0;
int flag_time = 0; //重置时间标志
int check = 1;
bool Fight_boss = false;
bool Boss_dead = false;
bool Show_appear = false;
bool Show_ko_boss = false;
bool First_pause = false;
//字体颜色设置
SDL_Color textColor = { 0xFF 0xFF 0xFF };
int show_money = 0;
//镜头参数
SDL_Rect camera = { 0 0 512 384 };
//SDL事件结构
SDL_Event event;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 5128 2009-10-17 11:41 mario(白金版)\include\begin_code.h
文件 1482 2009-10-17 11:41 mario(白金版)\include\close_code.h
文件 3233 2009-10-17 11:41 mario(白金版)\include\SDL.h
文件 1933 2009-10-17 11:41 mario(白金版)\include\SDL_active.h
文件 11215 2009-10-17 11:41 mario(白金版)\include\SDL_audio.h
文件 986 2009-10-17 11:41 mario(白金版)\include\SDL_byteorder.h
文件 6048 2009-10-17 11:41 mario(白金版)\include\SDL_cdrom.h
文件 1474 2009-10-17 11:41 mario(白金版)\include\SDL_config.h
文件 2149 2009-10-17 11:41 mario(白金版)\include\SDL_config_amiga.h
文件 2803 2009-10-17 11:41 mario(白金版)\include\SDL_config_dreamcast.h
文件 2801 2009-10-17 11:41 mario(白金版)\include\SDL_config_macos.h
文件 4193 2009-10-17 11:41 mario(白金版)\include\SDL_config_macosx.h
文件 1982 2009-10-17 11:41 mario(白金版)\include\SDL_config_minimal.h
文件 2979 2009-10-17 11:41 mario(白金版)\include\SDL_config_nds.h
文件 3635 2009-10-17 11:41 mario(白金版)\include\SDL_config_os2.h
文件 3107 2009-10-17 11:41 mario(白金版)\include\SDL_config_symbian.h
文件 4574 2009-10-17 11:41 mario(白金版)\include\SDL_config_win32.h
文件 869 2009-10-17 11:41 mario(白金版)\include\SDL_copying.h
文件 2221 2009-10-17 11:41 mario(白金版)\include\SDL_cpuinfo.h
文件 5873 2009-10-17 11:41 mario(白金版)\include\SDL_endian.h
文件 1874 2009-10-17 11:41 mario(白金版)\include\SDL_error.h
文件 13041 2009-10-17 11:41 mario(白金版)\include\SDL_events.h
文件 979 2009-10-17 11:41 mario(白金版)\include\SDL_getenv.h
文件 5277 2009-11-15 01:51 mario(白金版)\include\SDL_image.h
文件 5532 2009-10-17 11:41 mario(白金版)\include\SDL_joystick.h
文件 4098 2009-10-17 11:41 mario(白金版)\include\SDL_keyboard.h
文件 7492 2009-10-17 11:41 mario(白金版)\include\SDL_keysym.h
文件 2739 2009-10-17 11:41 mario(白金版)\include\SDL_loadso.h
文件 2866 2009-10-17 11:41 mario(白金版)\include\SDL_main.h
文件 27114 2009-11-15 01:52 mario(白金版)\include\SDL_mixer.h
............此处省略156个文件信息
评论
共有 条评论