实例介绍
从www.PacktPub.com上下载的SDL Game Development(基于SDL2.0的)一书的source code,里面附带了程序中使用的图片,大家可以直接下载,不用到那个网站用邮箱下载了
【实例截图】
【核心代码】
6821OT_code_bundle
└── 6821OT_code_bundle
├── Alien Attack
│ └── src
│ ├── Alien Attack.sdf
│ ├── Alien Attack.sln
│ ├── Alien Attack.suo
│ ├── Alien Attack.vcxproj
│ ├── Alien Attack.vcxproj.filters
│ ├── Alien Attack.vcxproj.user
│ ├── AnimatedGraphic.cpp
│ ├── AnimatedGraphic.h
│ ├── assets
│ │ ├── attack.xml
│ │ ├── blocks1.png
│ │ ├── blocks2.png
│ │ ├── blocks3.png
│ │ ├── boom.wav
│ │ ├── boss1.png
│ │ ├── bossexplosion.png
│ │ ├── bullet1.png
│ │ ├── bullet2.png
│ │ ├── bullet3.png
│ │ ├── button.png
│ │ ├── clouds2.png
│ │ ├── clouds.png
│ │ ├── DST_Announce.ogg
│ │ ├── DST_ElectroRock.ogg
│ │ ├── enemy1.png
│ │ ├── enemy2.png
│ │ ├── enemy3.png
│ │ ├── exit.png
│ │ ├── explosion.png
│ │ ├── gameover.png
│ │ ├── heli.png
│ │ ├── Icon.png
│ │ ├── largeexplosion.png
│ │ ├── lives.png
│ │ ├── main.png
│ │ ├── map1.tmx
│ │ ├── map2.tmx
│ │ ├── objecttypes.xml
│ │ ├── phaser.wav
│ │ ├── restart.png
│ │ ├── resume.png
│ │ ├── smallexplosion.png
│ │ ├── Thumbs.db
│ │ └── turret.png
│ ├── base64.cpp
│ ├── base64.h
│ ├── Bullet.h
│ ├── BulletHandler.cpp
│ ├── BulletHandler.h
│ ├── Callback.h
│ ├── Collision.h
│ ├── CollisionManager.cpp
│ ├── CollisionManager.h
│ ├── Enemy.h
│ ├── Eskeletor.h
│ ├── Game.cpp
│ ├── Game.h
│ ├── GameObjectFactory.cpp
│ ├── GameObjectFactory.h
│ ├── GameObject.h
│ ├── GameOverState.cpp
│ ├── GameOverState.h
│ ├── GameState.h
│ ├── GameStateMachine.cpp
│ ├── GameStateMachine.h
│ ├── Glider.h
│ ├── InputHandler.cpp
│ ├── InputHandler.h
│ ├── Layer.h
│ ├── Level1Boss.h
│ ├── Level.cpp
│ ├── Level.h
│ ├── LevelParser.cpp
│ ├── LevelParser.h
│ ├── LoaderParams.h
│ ├── main.cpp
│ ├── MainMenuState.cpp
│ ├── MainMenuState.h
│ ├── MapLoader.cpp
│ ├── MapLoader.h
│ ├── MenuButton.cpp
│ ├── MenuButton.h
│ ├── MenuState.h
│ ├── ObjectLayer.cpp
│ ├── ObjectLayer.h
│ ├── PauseState.cpp
│ ├── PauseState.h
│ ├── Player.cpp
│ ├── Player.h
│ ├── PlayState.cpp
│ ├── PlayState.h
│ ├── RoofTurret.h
│ ├── ScrollingBackground.cpp
│ ├── ScrollingBackground.h
│ ├── ShooterObject.cpp
│ ├── ShooterObject.h
│ ├── ShotGlider.h
│ ├── SoundManager.cpp
│ ├── SoundManager.h
│ ├── StateParser.cpp
│ ├── StateParser.h
│ ├── TextureManager.cpp
│ ├── TextureManager.h
│ ├── TileLayer.cpp
│ ├── TileLayer.h
│ ├── Turret.h
│ └── Vector2D.h
├── assets used in the book
│ ├── animate-alpha.png
│ ├── animate.bmp
│ ├── animate.png
│ ├── helicopter2.png
│ ├── helicopter.png
│ └── rider.bmp
├── common-framework
│ ├── base64.cpp
│ ├── base64.h
│ ├── Callback.h
│ ├── Collision.h
│ ├── GameObjectFactory.cpp
│ ├── GameObjectFactory.h
│ ├── GameState.h
│ ├── GameStateMachine.cpp
│ ├── GameStateMachine.h
│ ├── InputHandler.cpp
│ ├── InputHandler.h
│ ├── Layer.h
│ ├── Level.cpp
│ ├── Level.h
│ ├── LoaderParams.h
│ ├── MapLoader.cpp
│ ├── MapLoader.h
│ ├── SoundManager.cpp
│ ├── SoundManager.h
│ ├── StateParser.cpp
│ ├── StateParser.h
│ ├── TextureManager.cpp
│ ├── TextureManager.h
│ └── Vector2D.h
├── Conan the Caveman
│ └── src
│ ├── AnimatedGraphic.cpp
│ ├── AnimatedGraphic.h
│ ├── assets
│ │ ├── blocks1.png
│ │ ├── blocks2.png
│ │ ├── button.png
│ │ ├── clouds.png
│ │ ├── conan.xml
│ │ ├── death.wav
│ │ ├── dot.png
│ │ ├── DST-Away.ogg
│ │ ├── exit.png
│ │ ├── jewel.png
│ │ ├── jump.wav
│ │ ├── lazy.map
│ │ ├── main.png
│ │ ├── map1.tmx
│ │ ├── objecttypes.xml
│ │ ├── player.png
│ │ ├── prehistoric.png
│ │ ├── restart.png
│ │ ├── resume.png
│ │ ├── snail.png
│ │ ├── test.xml
│ │ ├── Thumbs.db
│ │ └── tiles.png
│ ├── base64.cpp
│ ├── base64.h
│ ├── Callback.h
│ ├── Camera.cpp
│ ├── Camera.h
│ ├── Collision.h
│ ├── CollisionManager.cpp
│ ├── CollisionManager.h
│ ├── Conan the Caveman.sdf
│ ├── Conan the Caveman.sln
│ ├── Conan the Caveman.suo
│ ├── Conan the Caveman.vcxproj
│ ├── Conan the Caveman.vcxproj.filters
│ ├── Conan the Caveman.vcxproj.user
│ ├── Enemy.h
│ ├── Game.cpp
│ ├── Game.h
│ ├── GameObjectFactory.cpp
│ ├── GameObjectFactory.h
│ ├── GameObject.h
│ ├── GameOverState.cpp
│ ├── GameOverState.h
│ ├── GameState.h
│ ├── GameStateMachine.cpp
│ ├── GameStateMachine.h
│ ├── InputHandler.cpp
│ ├── InputHandler.h
│ ├── Layer.h
│ ├── Level.cpp
│ ├── Level.h
│ ├── LevelParser.cpp
│ ├── LevelParser.h
│ ├── LoaderParams.h
│ ├── main.cpp
│ ├── MainMenuState.cpp
│ ├── MainMenuState.h
│ ├── MapLoader.cpp
│ ├── MapLoader.h
│ ├── MenuButton.cpp
│ ├── MenuButton.h
│ ├── MenuState.h
│ ├── NewSDL2Book-Info.plist
│ ├── NewSDL2Book-Prefix.pch
│ ├── ObjectLayer.cpp
│ ├── ObjectLayer.h
│ ├── PauseState.cpp
│ ├── PauseState.h
│ ├── PlatformerObject.cpp
│ ├── PlatformerObject.h
│ ├── Player.cpp
│ ├── Player.h
│ ├── PlayState.cpp
│ ├── PlayState.h
│ ├── ScrollingBackground.cpp
│ ├── ScrollingBackground.h
│ ├── SDLPlatformer-Info.plist
│ ├── SDLPlatformer-Prefix.pch
│ ├── Snail.h
│ ├── SoundManager.cpp
│ ├── SoundManager.h
│ ├── StateParser.cpp
│ ├── StateParser.h
│ ├── test.xml
│ ├── TextureManager.cpp
│ ├── TextureManager.h
│ ├── TileLayer.cpp
│ ├── TileLayer.h
│ ├── Turret.h
│ └── Vector2D.h
├── tinyxml
│ ├── changes.txt
│ ├── docs
│ │ ├── annotated.html
│ │ ├── classes.html
│ │ ├── classTiXmlAttribute.html
│ │ ├── classTiXmlAttribute-members.html
│ │ ├── classTiXmlAttribute.png
│ │ ├── classTiXmlBase.html
│ │ ├── classTiXmlBase-members.html
│ │ ├── classTiXmlBase.png
│ │ ├── classTiXmlComment.html
│ │ ├── classTiXmlComment-members.html
│ │ ├── classTiXmlComment.png
│ │ ├── classTiXmlDeclaration.html
│ │ ├── classTiXmlDeclaration-members.html
│ │ ├── classTiXmlDeclaration.png
│ │ ├── classTiXmlDocument.html
│ │ ├── classTiXmlDocument-members.html
│ │ ├── classTiXmlDocument.png
│ │ ├── classTiXmlElement.html
│ │ ├── classTiXmlElement-members.html
│ │ ├── classTiXmlElement.png
│ │ ├── classTiXmlHandle.html
│ │ ├── classTiXmlHandle-members.html
│ │ ├── classTiXmlNode.html
│ │ ├── classTiXmlNode-members.html
│ │ ├── classTiXmlNode.png
│ │ ├── classTiXmlPrinter.html
│ │ ├── classTiXmlPrinter-members.html
│ │ ├── classTiXmlPrinter.png
│ │ ├── classTiXmlText.html
│ │ ├── classTiXmlText-members.html
│ │ ├── classTiXmlText.png
│ │ ├── classTiXmlUnknown.html
│ │ ├── classTiXmlUnknown-members.html
│ │ ├── classTiXmlUnknown.png
│ │ ├── classTiXmlVisitor.html
│ │ ├── classTiXmlVisitor-members.html
│ │ ├── classTiXmlVisitor.png
│ │ ├── deprecated.html
│ │ ├── doxygen.css
│ │ ├── doxygen.png
│ │ ├── files.html
│ │ ├── functions_0x63.html
│ │ ├── functions_0x64.html
│ │ ├── functions_0x65.html
│ │ ├── functions_0x66.html
│ │ ├── functions_0x67.html
│ │ ├── functions_0x69.html
│ │ ├── functions_0x6c.html
│ │ ├── functions_0x6e.html
│ │ ├── functions_0x6f.html
│ │ ├── functions_0x70.html
│ │ ├── functions_0x71.html
│ │ ├── functions_0x72.html
│ │ ├── functions_0x73.html
│ │ ├── functions_0x74.html
│ │ ├── functions_0x75.html
│ │ ├── functions_0x76.html
│ │ ├── functions_enum.html
│ │ ├── functions_func_0x63.html
│ │ ├── functions_func_0x64.html
│ │ ├── functions_func_0x65.html
│ │ ├── functions_func_0x66.html
│ │ ├── functions_func_0x67.html
│ │ ├── functions_func_0x69.html
│ │ ├── functions_func_0x6c.html
│ │ ├── functions_func_0x6e.html
│ │ ├── functions_func_0x70.html
│ │ ├── functions_func_0x71.html
│ │ ├── functions_func_0x72.html
│ │ ├── functions_func_0x73.html
│ │ ├── functions_func_0x74.html
│ │ ├── functions_func_0x75.html
│ │ ├── functions_func_0x76.html
│ │ ├── functions_func.html
│ │ ├── functions.html
│ │ ├── functions_rela.html
│ │ ├── functions_vars.html
│ │ ├── hierarchy.html
│ │ ├── index.html
│ │ ├── pages.html
│ │ ├── tab_b.gif
│ │ ├── tab_l.gif
│ │ ├── tab_r.gif
│ │ ├── tabs.css
│ │ ├── tinystr_8h_source.html
│ │ ├── tinyxml_8h_source.html
│ │ └── tutorial0.html
│ ├── Makefile
│ ├── readme.txt
│ ├── tinystr.cpp
│ ├── tinystr.h
│ ├── tinyxml.cpp
│ ├── tinyxmlerror.cpp
│ ├── tinyxml.h
│ ├── tinyxml_lib.vcxproj
│ ├── tinyxmlparser.cpp
│ ├── tinyxml.sln
│ ├── tinyxmlSTL.vcxproj
│ ├── tinyXmlTestSTL.vcxproj
│ ├── tinyXmlTest.vcxproj
│ ├── utf8test.gif
│ ├── utf8testverify.xml
│ ├── utf8test.xml
│ └── xmltest.cpp
└── zlib128-dll
├── DLL_FAQ.txt
├── include
│ ├── zconf.h
│ └── zlib.h
├── lib
│ ├── zdll.lib
│ └── zlib.def
├── README.txt
├── test
│ ├── example_d.exe
│ └── minigzip_d.exe
├── USAGE.txt
└── zlib1.dll
15 directories, 345 files
标签:
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论