lols4排位奖励发奖励之前不打砖5会掉么

||||9553下载:打造最放心的绿色安全下载站!
您的位置:&&搜索“”&>&&>&打砖机安达机械制造厂
打砖机安达机械制造厂
发布日期:
河南郑州巩义市安达机械制造有限公司
   我公司现执行科学管理,各系列产品由各部门专业生产,下属五个单位,分部郑州与巩义区域内,广开销售门路,扩大经营思路,开拓创新不断进取。
安达:追求完美,使我们从未停止的目标
安达:打造精品,是我们从未改变的主题。
安达:优质服务,使我们从未动摇的信念。
用户的口杯,胜过书面上的金杯。
   以事实为根据,以互惠互利为动力。
以和谐君子取财有道为方针,德行兼备,创造和谐社会。
【真空砖机和粘土砖机的区别、应用工艺流程】
真空砖机和普通粘土砖机区别于主机,其它副机根据砖机型号、日产量、配备的设备都可通用,普通粘土砖机主机内部,没有真空技术设计结构,压力小、产量高、所做出的砖坯软,砖坯是靠人工采用专用的插砖坯叉子,来一块一块的叉起,又一层层斜交叉摆放成通风透光的砖坯晾晒架,待砖坯晾晒干后装窑烧成。真空砖机内部设计结构与普通粘土砖机不同,要求密封程度高,压力大、日产量较小与普通粘土砖机。真空砖机配置有,真空泵、空压机,原材料通过副机流水线作业搅拌均匀后,进入真空砖机,原料在真空砖机内真空状态下,有空压机、真空泵的协调作用、将泥料中的水份强力抽出真空砖机体外,抽过水份的泥料坚硬,需要双级强动力和优质减速机真空砖机全功能来完成推进挤出成型泥条,密实坚硬的泥条来之不易,需要真空砖机整体和内在结构设计合理。河南巩义市安达机械制造有限公司,以用户的切身利益为根本,以质量创造和谐社会,以信誉不断开创新商机,让用户生产顺利使用满意安心。我公司采用德国部分先进技术和国内名牌柳杭减速机,易损件采用高锰合金钢材料制作,减速机和真空砖机连接主轴采用45#碳结钢,同心度精准,泥缸衬套采用高锰合金钢耐磨材料,更换方便快捷,螺旋加力推进器同样采用高锰合金钢耐磨材料制成,真空度精准无误。本公司高质量的真空砖机,除易损件之外,寿命可达25年以上,所做出的砖坯无需晾晒直接进入隧道窑烧成优质砖。
此真空砖机能做出多种砖型,通过换模具即可实现你所要的砖型。密实坚硬的泥条,通过无泥头自动切条机,减少了两个工作人员和切砖坯后两边剩下的废品泥料头的返还,现代工人的工资都比较高,每个工人每天按100元计算,废品泥料头的返还、人工和从新制作成砖坯的耗电过程,全年统算,两个工人的工资和费泥料头的返回处理,全年可节省10万元左右。密实坚硬的泥条通过无泥头切条机后,然后进入自动切坯机,而后进入机械手自动抓砖坯平台,随即由机械手自动码坯机、直接抓上进入隧道窑的干燥坯车上,随即有操作工人将装好砖坯的干燥车、调运进入隧道窑环保烘干处理室,砖坯烘干后进入高温烧结室,烧成后再进入逐渐降温室,然后由专业的出窑车装运出窑、码垛后等待出售。
而另一种真空砖机没有配置机械手自动码坯机,配置了一种简易的输送分坯机,是靠人工抓砖坯与进窑炉烧成车上的。真空砖机制做砖坯的过程,首先是有供料机、在进入输送机、在进入对辊机再进入输送机、再进入双轴搅拌机、在进入输送机、再进入真空砖机。然后出泥条、由自动切条机、切断,泥条自动进入切坯台后、切坯机有两种,一种是人工操作切坯的,另一种是自动切坯的。切坯后进入简易输送分坯机,由人工抓砖坯与进窑炉烧成车上的,而另一种切坯后是由机械手自动抓入进窑炉车上的。多孔砖是通过更换模头、也叫泥嘴、也叫出砖口、也叫龙口、来实现多孔砖的。
另一种是普通粘土砖机,不是真空的,只能做普通粘土标准砖。需要晾晒、土砖坯晾晒干后,由专用拉土砖坯车、或者人工拉砖坯车、送往晾晒场、湿砖坯由人工层层交叉码成通风良好的湿砖坯架,待晾干后、再由专用拉干砖坯车或者人工拉干砖坯车、送往隧道窑或轮窑进行技术装置通风、通火、烧成优质产品国家标准红砖。粘土砖机和真空砖机的生产过程,基本相似,主机有区别,一种是粘土制砖机,砖坯需要晾晒。另一种是真空制砖机,砖坯不用晾晒。粘土砖机需要配置自动落板机,而真空砖机需要配置专用输送湿砖坯平台和一种简易输送分坯机、及窑车、摆渡车、牵引车。
全自动真空砖机需要配置机械手抓坯机、配套的专用自动切坯机、窑车、摆渡车、牵引车。【详细情况请来电咨询】
900型 600型550型500型450型是我厂目前在国内最先进的真空砖机,砖坯不用晾晒,直接进入隧道窑、轮窑烧成国家标准优质砖,机械手全自动化码湿砖坯自动装窑车整齐,通风透火,火力均匀,节省燃煤,烧出成品率极高,环保隧道窑,不用烟囱。烧出国家标准优质成品砖。本厂砖机设备适应:粘土、红土、白土、黑土、黄土、页岩、风化石、煤矸石、淤泥、陶泥、胶泥土、均可制作优质砖。烧制分三个阶段,第一高温段,第二成品散热段,第三利用成品散热段余热烘干湿砖坯,在烘干湿砖坯的同时产生大量热蒸汽,空气密度和蒸汽密度混合形成高湿密度蒸汽,然而产生了物理现象处理了有害气体作用,彻底阻断了大量的粉尘和添加煤时来不及燃烧的黑煤粉,这是造成大量排放粉尘和黑烟的根源,这些大量的粉尘和黑烟、通过空气和蒸汽混合形成高湿密度蒸汽、粉尘和黑烟产生了比重,降落底部或者顺从风力穿过层层砖坯被阻断和吸附在砖坯上。在砖坯烘干后进入高温烧砖时、这些吸附在砖坯上的黑煤粉和粉尘发挥了二次燃烧作用。同时也加速了烧成速度和成品率,节省了不可小视的燃煤量。绝对不可小看添加煤时来不及燃烧、造成大量黑煤烟粉的排放量。节省燃煤和极大提高烧出成品率有着两大功效。第一:全自动化码湿砖坯自动装窑整齐,通风透火,火力均匀,节省燃煤比人工装窑技术标准超出多倍,并且极大提高了成品率。第二:大量的粉尘和添加煤时来不及燃烧的黑煤粉吸附在砖坯上【粉尘也有一定的发热量】做高温二次燃烧。这两项节省燃煤一年下来,节省燃煤投入资金足可以买一辆小轿车。
湿砖坯在烘干70%后期,有微量短时段蓝烟排放,之前所排放出的是白色蒸汽,现在大多数用户都采用这种环保使用方法。【要想彻底阻断粉尘、黑烟和二氧化硫有害气体,每个加煤火口就必须增加一台微型煤气发生炉。{或者一套专业除尘器}这样就可彻底解决空气环境污染,就不会给周围住户造成空气环境污染的烦恼,和平共处,安心生产。】微型煤气发生炉功能详细介绍:【lx-c型直燃式煤气炉: 直燃式煤气发生炉自2006年问世以来,成功应用到热镀锌行业,主要以温度供应及时、运行费用低、无故障运行时间长、设备价格便宜、环保达标排放等五大特点。
我单位专门组织著名热工专家研发了直燃式煤气炉专供热镀锌行业使用,其具有如下特点:
煤炭燃烧充分、热量供应及时,生产工艺所需要温度有保障。
焦油物质直接产于燃烧,没有焦油堵塞管道的麻烦;在生产中没有产生机械故障,避免经常维修和更换部件而影响生产,提高经济效益。
耐用性强、不娇气,普遍连续无故障使用时间长于1年,大修寿命大于4年。
与工业炉炉体连体砌筑,无额外燃料消耗,节约燃料25%以上。
直燃式煤气发生炉是我们近年来研制成功的新工炉型,它利用煤炭为燃料同以空气和水蒸气为气化剂产生煤气。其基本特点是煤气炉与工业炉连体砌筑。该煤气发生炉可用于镀锌炉、马弗炉、退火炉、干燥炉、轧钢炉、锻造炉、井式炉等工业炉。具有热效率高、无烟尘、环保达标等优点,是目前较理想的更新换代的燃煤炉。具有较好的节能环保效果。
一. 直燃式煤气发生炉原理
当空气和水蒸气通过高温的固体燃料层(煤或焦炭)时发生化学反应生成混合煤气并燃烧放热加热工件的炉窑,其煤气炉与工业炉连体砌筑。当气化剂(空气或水蒸气)鼓入炉内时,沿煤层高度方向形成五层,自下而上可分为:灰渣层、氧化层、还原层、干馏层、干燥层。气化剂首先经过渣层得到预热,当上升进入高温燃烧曾时,碳和氧发生氧化放热反应。氧化层中产生的热气继续上升,与上层燃料接触,产生还原反应。还原层中产生的热气体再往上升,加热了上面的煤层,形成干馏和干燥层。干馏层的挥发份逸出。生成的煤气聚集在料层上,并连同燃料的物理显热一并进入烧嘴燃烧。
1.煤气炉与使用的工业炉连体,煤气不需用管道输送,避免了热量的损失,节约了能源。
2.煤气炉的焦油直接参与了燃料,没有焦油堵塞烧嘴和管道的麻烦。同时节省了煤。
3.该煤气炉的预热二次风直接进入烧嘴与煤气混合燃烧。
4.该煤气炉在生产中没有机械事故,避免经常维修和更换部件而影响生产,节约维修费。
5.煤气燃烧完全,无烟尘,完全达到环保要求。
三. 技术参数
1.适用炉型:镀锌炉、退火炉、轧钢加热炉、锻造炉、马弗炉、干燥炉、井式炉、熔化炉、砖瓦厂、耐火厂、碳素厂、凡是用煤烧的炉子,使用此设备都可以达到环保节煤效果。具有明显的节能、环保的效果,有广阔的推广应用前景。
2.适用温度;400°C~1350°C
3.燃料粒度(mm):3-300
4.产气率(M3/Kg):3-3.9
5.煤气低发热值(kj/Nm3):
6.煤气出口温度;500°C~600°C
7.煤气出口压力(Kpa):0.9-1.2
8.炉底最大鼓风压力(Kpa):2.45
9.热效率:>60%
10.燃料消耗量:与传统燃煤炉相比可节煤20%直燃式煤气发生炉具有环保、节能、易操作的优点:
(1)节约燃料费用。
(2)具有易维护,不会堵塞道的优点。
(3)每个班只需加一次煤,一周一次炉灰。
(4)可用烟煤等廉价煤。
(5)环保完全达标、不冒黑烟。】
注明:【全自动化码湿砖坯机,一次码湿砖坯块数,是根据签订合同后,确定使用什么样窑炉来决定一次码湿砖坯块数的。】
这种高效节能环保隧道窑、轮窑全自动化码坯机、真空砖机全套生产工艺流程,砖坯不用晾晒比老式需要晾晒砖坯,节省如此600型真空砖机日产量,节省一百多号人,节省一百多亩地,节省大量防雨草栅、塑料布,节省许多运砖坯车辆。节省下雨、刮风、倒塌砖坯、来往运输砖坯、装车、装窑、大量损耗砖坯的严重现象。此先进全自动化600型真空砖机,全自动码砖坯机和高效节能环保隧道窑相结合,省心省事减少了人多管理麻烦的劳累。这种高效节能600型真空砖机生产工艺流程,每班仅仅需要6个工人,全天两班12人,占地25-30亩,人员少管理非常轻松,全国都在砍粘土砖机,但对非耕地、页岩生产量有规模的公有制和私有制企业通过实地考察,还在审批通过的厂家很多,我们还在加点加班生产,同时出口量也在不断攀升。在全国砍掉许多粘土砖厂的政策控制下,能继续办砖厂的公有私有企业毕竟是少数,然而烧结砖供不应求,利润比晾晒砖坯生产方式翻倍,用工人极少,管理轻松,座在办公室,安心收钱。
高效节能用电不用油挖土机特点:
 该机以电做动力,可匹配四轮(或三轮)翻斗车远距离采土,其结构有操作室、行走部分、挖掘部分、输送装车部分、推土部分及液压部分组成,经实践证明,其优点表现在以下几个方面:
 1、一机多用,设计新颖:该机集推土、粉碎、搅拌、挖掘、输送装车诸功能于一体,达到国内外采土设别的先进水平。
 2、成本低、产量高:该机行走、挖掘、输送全部用电,每小时用电 15 度左右,可挖土装车 50―100立方/小时,土质硬者产量酌减,每万块砖坯采土费用不超过 3 元(电费 0.70 元 / 度)
 3、适应性强,效果好:本机独有旋刨结构,断面开采,可挖低于地平面 3 米 、平面挖高度 7 米 ,平面上高的图层自上而下均匀挖掘、粉碎、搅拌、不但原料颗粒细,而且使上、中、下的土充分搅拌、均合。例如南阳某砖厂改用“刨挖”后,砖坯的外观尺寸不再有偏差,砖坯质量明显提高,砖的价格也比周围高 3 分钱,而且从不存货,效益明显提高。
 4、用人少、易操作:该机操作只需 1 人,经短期培训,即可上岗。若班产 15 万砖坯距离在 1000 米 左右时,只需配二台翻斗车或拖拉机即可满足生产需要,共需要 3 人即可。
 5、维修方便,费用低:该机底盘采用汽车底盘和履带底盘两种,组合了各种机械的优点,除易损件外,基本上无故障运行,年维修费用不超过 2000 元。
地址:河南省巩义市汽车北站向东1000米石灰务工业区
河南巩义安达机械制造有限公司
本厂现场安装调试,一流售后服务,让用户用的满意合作开心,互惠互利。
欢迎到我厂座客考察,一次合作,终身为友,友情链接,请联系,付先生:,
真空砖机,双级真空砖机,煤矸石真空砖机,页岩真空砖机,粘土真空砖机,烧砖机,制砖机,砖头机,红砖机,挤砖机
免烧砖机也叫砌块砖机,水泥砖机,空心砖机
免烧砖机,砌块砖机,免烧砖机价格,砌块砖机价格,免烧砖机设备,全自动免烧砖机,水泥空心砖机,水泥砖机。
垫块机,静压垫块砖机,水泥垫块机,钢筋笼垫块机,钢筋混凝土垫块机,钢筋保护层塑料垫块机,多功能水泥垫块机,混凝土垫块机,
混凝土加气块设备,发泡混凝土设备,发泡混凝土砌块设备,泡沫加气块设备,蒸压加气混凝土砌块机,加气混凝土砌块强度等级,灰砂加气混凝土砌块机,加气混凝土砌块种类。
砖机,真空砖机,砖机制造厂,真空砖机制造厂,粘土砖机,制砖机,真空砖机生产线,真空砖机生产线视频,节能DWZL型联合电动挖土机,
破碎机,破碎机价格,破碎机设备,碎石机价格,破碎机型号,鄂式破碎机,反击破碎机,砂石生产线。
www.gyadjx.5com瓦机,粘土真空瓦机,粘土瓦机,真空瓦机,彩色瓦机,水泥彩瓦机,仿古式瓦机,新型水泥彩瓦机。
烘干机,烘干机设备,金属破碎机,易拉罐破碎机,废旧金属破碎机,金属破碎机设备,大型金属破碎机,废旧摩托车汽车破碎机。
全国统一销售热线:86-8
传真:8 邮编:451200
地址:郑州市巩义东工业开发区
河南巩义市安达机械制造有限公司
付银安&&先生 ( 董事长助理 )电话: 8
以上信息由企业自行提供,该企业负责信息内容的真实性、准确性和合法性。全球机械网对此不承担任何保证责任。
更多该公司产品
全球机械网 版权所有 &
高级会员申请热线: 9 &电子邮件:
本站网址:(全球机械网)全球机械网.com
[在线咨询服务] MSN:&&&&&QQ:1905118(全球机械网客服)哈尔滨顾乡大街与乡政街口,青年与卖货老板因为卖的是熟狗肉,青年恶意挑衅,发生口角,后把老板娘的夹子和刀扔到地上,并扔到的一个老大爷身上,裤子上有熟食的油渍,正当众人批评青年时,暴怒的青年无所发泄,此时老人要求他赔礼道歉,青年随后怒骂并殴打老人。老人鼻子出血,头上有大包,并出现昏迷的状况,巡警出现及时将二人带走。
 台湾三名少年殴打同学,被打的当事人抱头求救,过路的行人没有一个对其进行帮助,更有甚者,用手机拍下打人的画面,并将此暴力录像在网上进行流传……
网友称殴打老人不道德,要教育更要严惩。
属于“第一评论”版块。
3少年殴打,3少年殴打快播高清,3少年殴打百度影音
3少年殴打相关推荐
更多“3少年殴打”搜索结果
一段90后少年殴打七旬老人的视频在网上传播,视频中,两名少年对着白发苍苍的老人满嘴脏话并拳脚相加,老人虽然奋力反抗,但依旧敌不过年轻小伙的殴打。这两少年的行为让网民非常愤慨。3月30日上午12点,在警方的介入下,打人黑衣少年胡某的父亲表示愿意代表打人孩子的家长,随后赶到派出所向两位被打老人道歉。但周某的家人却仍不出面,这让两位老人心里很不舒服。
12岁少年上课讲话遭老师殴打致肾出血
南宁尸检证实网瘾少年被殴打致死
少年“戒网营”内死亡 疑被教官殴打
江苏电视台:90后少年殴打七旬老人 谁之过?
优酷网字幕
广西:少年“网戒营”内死亡 疑被教官殴打
广西网瘾少年死亡被确认为殴打致死
近日,忠县警方侦破一起13岁网瘾少年打伤自己77岁奶奶的案件,而凶手——年仅13岁的少年张某向办案民警交代犯罪动机时,他说只是为了能从奶奶身上找点钱好上网。
  日早上,拔山派出所接到张卫珍的报案,忠县永丰镇东方村6组李占淑在家中被人殴打,身上携带的1000余现金被人抢走,忠县警方接到报案后,立即赶到现场,发现李占淑正躺在家中床上,头部被打伤,到处是血迹。民警展开侦破,两天后,犯罪嫌疑人就被抓获。
  据了解,今年13岁的张某5岁时就死了母亲,上学期间学会了上网,打游戏,一发不可收拾,每天除了吃饭、睡觉就是到网吧上网,已逃学多天的张某用钱如水。
一段90后少年殴打七旬老人的视频在网上传播,视频中,两名少年对着白发苍苍的老人满嘴脏话并拳脚相加,老人虽然奋力反抗,但依旧敌不过年轻小伙的殴打。这两少年的行为让网民非常愤慨。3月30日上午12点,在警方的介入下,打人黑衣少年胡某的父亲表示愿意代表打人孩子的家长,随后赶到派出所向两位被打老人道歉。但周某的家人却仍不出面,这让两位老人心里很不舒服。
感谢伟大的主角长脸、JP
配角:李承阳
以及友情出演的8(15)班同学
由于本人也参与了战斗,所以拍摄不清晰,角度不好请见谅。
不见谅的也必须见谅
属于“万千视界”版块
如今社会道德败坏到了令人发指的程度!!
稍后补充视频简介
16岁少年特训被殴打致死遭3教官4次殴打
现在的少年很让人心酸啊~
潘美人上传90后少年殴打谩骂老人-社会教育的缺失
出售10个美体号
8个是处号 保证最低价QQ
常州:少年殴打白发老汉 视频曝光引众怒
14岁的初二学生亮亮(化名)在学校经常遭到高年级的“坏孩子”索要钱物,稍有不从便会招来一顿暴打。在又一次被威胁交出50元钱后,亮亮不敢向家人张口要钱,也不愿向老师求助,担心到学校后会再遭殴打,他怀着忐忑的心情在家度过了周末。5月9日(周日)晚,不堪压力的孩子最终选择了喝下剧毒农药百草枯自杀的方式去逃避。目前亮亮仍未脱离危险期。
以上信息由汕头市恒其房产提供__更多精彩请登陆
90后少年殴打谩骂老人-社会教育缺失
广西少年网戒营内死亡 疑被教官殴打
更多精彩尽在w
触觉艺术旗下--我就要感觉!!
让你要自由!叙利亚少年的遭遇——我让你要自由!我让你要自由!你也想造反?给我跪下你个兔崽子,向阿萨德下跪!(男孩向阿萨德吐口水)2011年9月上传于网络
江苏:少年殴打七旬老人 谁之过?
日下午6点左右在深圳龙岗平湖镇平湖汽车站门口红绿灯处发生一起恶性事件,一单车少年过马路被殴打并强行拖走。青年不得不装死侥幸躲过一劫。交警牛气冲天玩群殴啊。
3少年殴打最新添加
3少年殴打相关推荐1303人阅读
注:以下内容为学习笔记,多数是从书本、资料中得来,只为加深印象,及日后参考。然而本人表达能力较差,写的不好。因非翻译、非转载,只好选原创,但多数乃摘抄,实为惭愧。但若能帮助一二访客,幸甚!
前一阵子学习Win32 SDK 时自己写过一个拼图游戏作为练习,基本功能是都完成了,但到后来随着代码量的增多,代码的组织上有点混乱。考虑到是第一次独立用Win32 SDK编写程序,就先放过了。但总觉的不爽。
最近看到一本名为《Windows 游戏编程大师技巧》的牛书,看到第一章打砖块的示例,欲效仿其组织代码的技巧,故将其源代码分拆成容易理解的若干部分,修改抄录于下,供他日重读或供无缘见到此书者查阅。
程序版权归原作者所有,吾仅是学习模仿,不敢掠美。
但源程序使用到了DirectX SDK,由于暂时不想涉及D3D,故改为用Win32 API 绘图。当然以后有空,或会学习一下DirectX SDK~
我们需要的是下面几个功能:
1)切换至任意图像模式
2)在屏幕上绘制各种颜色的矩形
3)获取键盘输入
4)使用一些定时函数同步游戏循环
5)在屏幕上画彩色字符串
1. 程序主框架(原程序为全屏隐藏鼠标,为调试简单,暂时改为非全屏不隐藏鼠标)
* FreakOut.cpp (改编自《Windows 游戏编程大师技巧》第一章示例程序)
/* INCLUDES *****************************************************************************/
#include &windows.h&
/* DEFINES ******************************************************************************/
// defines for windows
#define WINDOW_CLASS_NAME TEXT(&WIN32CLASS&)
#define WINDOW_WIDTH
#define WINDOW_HEIGHT
// states for game loop
#define GAME_STATE_INIT
#define GAME_STATE_START_LEVEL
#define GAME_STATE_RUN
#define GAME_STATE_SHUTDOWN
#define GAME_STATE_EXIT
/* GLOBALS *******************************************************************************/
main_window_handle = NULL;
// save the window handle
HINSTANCE main_instance
// save the instance
game_state
= GAME_STATE_INIT; // starting state
/* WINDPROC ******************************************************************************/
LRESULT CALLBACK WindowProc(HWND hwnd,
WPARAM wparam,
LPARAM lparam)
// this is the main message handler of the system
PAINTSTRUCT
switch (msg)
case WM_CREATE:
case WM_PAINT:
hdc = BeginPaint(hwnd, &ps);
EndPaint(hwnd, &ps);
case WM_DESTROY:
PostQuitMessage(0);
return DefWindowProc(hwnd, msg, wparam, lparam);
/* WINMAIN *******************************************************************************/
int WINAPI WinMain(HINSTANCE hinstance,
HINSTANCE hprevinstance,
LPSTR lpcmdline,
int ncmdshow)
PAINTSTRUCT
/* CS_DBLCLKS Specifies that the window should be notified of double clicks with
* WM_xBUTTONDBLCLK messages
* CS_OWNDC标志,属于此窗口类的窗口实例都有自己的DC(称为私有DC),私有DC仅属于该窗口实例,
* 所以程序只需要调用一次GetDC或BeginPaint获取DC,系统就为窗口初始化一个DC,并且保存程序
* 对其进行的改变。ReleaseDC和EndPaint函数不再需要了,因为其他程序无法访问和改变私有DC。
winclass.style
= CS_DBLCLKS | CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
winclass.lpfnWndProc = WindowP
winclass.cbClsExtra
winclass.cbWndExtra
winclass.hInstance
winclass.hIcon
= LoadIcon(NULL, IDI_APPLICATION);
winclass.hCursor
= LoadCursor(NULL, IDC_ARROW);
winclass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
winclass.lpszMenuName = NULL;
winclass.lpszClassName = WINDOW_CLASS_NAME;
// register the window class
if (!RegisterClass(&winclass))
// Create the window, note the use of WS_POPUP
hwnd = CreateWindow(
WINDOW_CLASS_NAME,
TEXT(&WIN32 Game Console&), // title
WS_OVERLAPPEDWINDOW,
// initial x, y
WINDOW_WIDTH,
// initial width
WINDOW_HEIGHT,
// initial height
// handle to parent
// handle to menu
hinstance,
// instance
// creation parms
if (! hwnd)
ShowWindow(hwnd, ncmdshow);
UpdateWindow(hwnd);
// hide mouse
//ShowCursor(FALSE);
// save the window handle and instance in a global
main_window_handle =
main_instance
// perform all game console specific initialization
//Game_Init();
// enter main event loop
if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
// test if this is a quit msg
if (msg.message == WM_QUIT)
// translate any accelerator keys
TranslateMessage(&msg);
// send the message to the window proc
DispatchMessage(&msg);
// main game processing goes here
//Game_Main();
// shutdown game and release all resources
//Game_Shutdown();
// show mouse
//ShowCursor(TRUE);
// return to windows like this
return (msg.wParam);
2. &游戏控制流程
int Game_Init(void *parms)
// this function is where you do all the initialization for your game
int Game_Shutdown(void *parms)
// this function is where you shutdown your game and release all resources
// that you allocated
int Game_Main(void *parms)
// this is the workhorse of your game it will be called continuously in real-time
// this is like main() in C all the calls for you game go here!
TCHAR buffer[80];
// what state is the game in?
if (game_state == GAME_STATE_INIT)
// seed the random number generator so game is different each play
srand((unsigned int)time(0));
// set the paddle position here to the middle bottom
paddle_x = PADDLE_START_X;
paddle_y = PADDLE_START_Y;
// set ball position and velocity
ball_x = 8 + rand() % (WINDOW_WIDTH-16);
ball_y = BALL_START_Y;
ball_dx = -4 + rand() % (8+1);
6 + rand() % 2;
// transition to start level state
game_state = GAME_STATE_START_LEVEL;
else if (game_state == GAME_STATE_START_LEVEL)
// get a new level ready to run
// initialize the blocks
Init_Blocks();
// reset block counter
blocks_hit = 0;
// transition to run state
game_state = GAME_STATE_RUN;
else if (game_state == GAME_STATE_RUN)
// start the timing clock
Start_Clock();
// clear drawing surface for next frame of animation
Draw_Rectangle(0, 0, WINDOW_WIDTH-1, WINDOW_HEIGHT-1, 0);
// move the paddle
if (KEY_DOWN(VK_RIGHT))
// move paddle to right
paddle_x += 8;
// make sure paddle doesn't go off screen
if (paddle_x & (WINDOW_WIDTH - PADDLE_WIDTH))
paddle_x = WINDOW_WIDTH - PADDLE_WIDTH;
else if (KEY_DOWN(VK_LEFT))
// move paddle to left
paddle_x += 8;
// make sure paddle doesn't go off screen
if (paddle_x & 0)
paddle_x = 0;
// draw blocks
Draw_Blocks();
// move the ball
ball_x += ball_
ball_y += ball_
// keep ball on screen, if the ball hits the edge of screen then
// bounce it by reflecting its velocity
if (ball_x & (WINDOW_WIDTH - BALL_SIZE) || ball_x & 0)
// reflect x-axis velocity
ball_dx = -ball_
// update position
ball_x += ball_
// now y-axis
if (ball_y & 0)
// reflect y-axis velocity
ball_dy = -ball_
// update position
ball_y += ball_
else if (ball_y & (WINDOW_HEIGHT - BALL_SIZE))
// reflect y-axis velocity
ball_dy = -ball_
// update position
ball_y += ball_
// minus the score
score -= 100;
// next watch out for ball velocity getting out of hand
if (ball_dx & 8)
ball_dx = 8;
else if (ball_dx & -8)
ball_dx = -8;
// test if ball hit any blocks or the paddle
Process_Ball();
// draw the paddle
Draw_Rectangle(paddle_x, paddle_y, paddle_x+PADDLE_WIDTH, paddle_y+PADDLE_HEIGHT, PADDLE_COLOR);
// draw the ball
Draw_Rectangle(ball_x, ball_y, ball_x+BALL_SIZE, ball_y+BALL_SIZE, 255);
// draw the info
wsprintf(buffer, TEXT(&FREAKOUT
Level %d&), score, level);
DrawText_GUI(buffer, 8, WINDOW_HEIGHT-16, 127);
// sync to 30 fps
Wait_Clock(30);
// check if user is trying to exit
if (KEY_DOWN(VK_ESCAPE))
// send message to windows to exit
PostMessage(main_window_handle, WM_DESTROY, 0, 0);
// set exit state
game_state = GAME_STATE_SHUTDOWN;
else if (game_state == GAME_STATE_SHUTDOWN)
// in this state shut everything down and release resources
// switch to exit state
game_state = GAME_STATE_EXIT;
3.小球的控制和绘制(原程序为directDraw绘制,此处改为Win32 API绘制)
/* DRAW FUNCTION **************************************************************************/
int Draw_Rectangle(int x1, int y1, int x2, int y2, int color)
// this function uses Win32 API to draw a filled rectangle
SetRect(&rect, x1, y1, x2, y2);
hbrush = CreateSolidBrush(color);
hdc = GetDC(main_window_handle);
FillRect(hdc, &rect, hbrush);
ReleaseDC(main_window_handle, hdc);
DeleteObject(hbrush);
int DrawText_GUI(TCHAR *text, int x, int y, int color)
hdc = GetDC(main_window_handle);
// set the colors for the text up
SetTextColor(hdc, color);
// set background mode to transparent so black isn't copied
SetBkMode(hdc, TRANSPARENT);
// draw the text
TextOut(hdc, x, y, text, lstrlen(text));
// release the dc
ReleaseDC(main_window_handle, hdc);
/* GAME PROGRAMMING CONSOLE FUNCTIONS *****************************************************/
void Init_Blocks(void)
// initialize the block field
for (int row = 0; row & NUM_BLOCK_ROWS; row++)
for (int col = 0; col & NUM_BLOCK_COLUMNS; col++)
blocks[row][col] = row*16 + col*3 + 16;
void Draw_Blocks(void)
// this function draws all the blocks in row major form
int x1 = BLOCK_ORIGIN_X;
int y1 = BLOCK_ORIGIN_Y;
// draw all the blocks
for (int row = 0; row & NUM_BLOCK_ROWS; row++)
// reset column position
x1 = BLOCK_ORIGIN_X;
for (int col = 0; col & NUM_BLOCK_COLUMNS; col++)
if (blocks[row][col] != 0)
Draw_Rectangle(x1, y1, x1+BLOCK_WIDTH, y1+BLOCK_HEIGHT, blocks[row][col]);
// advance column position
x1 += BLOCK_X_GAP;
// advance to next row position
y1 += BLOCK_Y_GAP;
void Process_Ball(void)
// this function tests if the ball has hit a block or the paddle if so, the ball is bounced
// and the block is removed from
the playfield note: very cheesy collision algorithm :)
// first test for ball block collisions
// the algorithm basically tests the ball against each block's bounding box this is inefficient,
// but easy to implement, later we'll see a better way
// current rendering position
int x1 = BLOCK_ORIGIN_X;
int y1 = BLOCK_ORIGIN_Y;
// computer center of ball
int ball_cx = ball_x + (BALL_SIZE/2);
int ball_cy = ball_y + (BALL_SIZE/2);
// test the ball has hit the paddle
if (ball_y & (WINDOW_HEIGHT/2) && ball_dy & 0)
// extract leading edge of ball
int x = ball_x + (BALL_SIZE/2);
int y = ball_y + (BALL_SIZE/2);
// test for collision with paddle
if ((x &= paddle_x && x &= paddle_x + PADDLE_WIDTH) &&
(y &= paddle_y && y &= paddle_y + PADDLE_HEIGHT))
// reflect ball
ball_dy = -ball_
// push ball out of paddle since it made contact
ball_y += ball_
// add a little english to ball based on motion of paddle
if (KEY_DOWN(VK_RIGHT))
ball_dx -= rand() % 3;
else if (KEY_DOWN(VK_LEFT))
ball_dx += rand() % 3;
ball_dx += (-1 + rand() % 3);
// test if there are no blocks, if so send a message to game loop to start another level
if (blocks_hit &= (NUM_BLOCK_ROWS * NUM_BLOCK_COLUMNS))
game_state = GAME_STATE_START_LEVEL;
// make a little noise
MessageBeep(MB_OK);
// now scan thru all the blocks and see of ball hit blocks
for (int row = 0; row & NUM_BLOCK_ROWS; row++)
x1 = BLOCK_ORIGIN_X;
// scan this row of blocks
for (int col = 0; col & NUM_BLOCK_COLUMNS; col++)
if (blocks[row][col] != 0)
// test ball against bounding box of block
if ((ball_cx & x1) && (ball_cx & x1 + BLOCK_WIDTH) &&
(ball_cy & y1) && (ball_cy & y1 + BLOCK_HEIGHT))
// remove the block
blocks[row][col] = 0;
// increment global block counter, so we know when to start another level up
blocks_hit++;
// bounce the ball
ball_dy = -ball_
// add a little english
ball_dx += (-1 + rand() % 3);
// make a little noise
MessageBeep(MB_OK);
// add some points
score += 5 * (level + (abs)(ball_dx));
// advance column position
x1 += BLOCK_X_GAP;
// advance row position
y1 += BLOCK_Y_GAP;
4.时间控制
/* CLOCK FUNCTIONS ************************************************************************/
DWORD Get_Clock(void)
// this function returns the current tick count
// return time
return GetTickCount();
DWORD Start_Clock(void)
// this function starts the block, that is, saves the current count,
// use in conjunction with Wait_Clock()
return (start_clock_count = Get_Clock());
DWORD Wait_Clock(DWORD count)
// this function is used to wait for a specific number of clicks since
// the call to Start_Clock
while (Get_Clock() - start_clock_count & count)
return Get_Clock();
5. 发现的问题及解决方案
1)颜色太暗:
原因可能是int 到RGB转换的问题,解决办法是传参数时直接用RGB构造。
2)挡板和分数都看不到
原因是原程序没有标题栏,是全屏显示的,现在有了标题栏,占了一定的空间,导致位置计算的不对,修改窗口style 为WS_POPUP即可。
3)界面闪烁及耗费CPU
原因是每次都先绘制黑色屏幕清除全屏,然后重新绘制,较为浪费,且一直在循环,耗费CPU。
解决办法是减少重绘区域,每次只绘制需要绘制的地方,而不是重绘全屏。修改使用死循环来耗费时间,改为Sleep。
完整代码:
* FreakOut.cpp (改编自《Windows 游戏编程大师技巧》第一章示例程序)
/* INCLUDES *******************************************************************************/
#include &windows.h&
#include &stdlib.h&
#include &time.h&
#include &stdio.h&
/* DEFINES ********************************************************************************/
// defines for windows
#define WINDOW_CLASS_NAME TEXT(&WIN32CLASS&)
#define WINDOW_WIDTH
#define WINDOW_HEIGHT
// states for game loop
#define GAME_STATE_INIT
#define GAME_STATE_START_LEVEL
#define GAME_STATE_RUN
#define GAME_STATE_SHUTDOWN
#define GAME_STATE_EXIT
// block defines
#define NUM_BLOCK_ROWS
#define NUM_BLOCK_COLUMNS
#define BLOCK_WIDTH
#define BLOCK_HEIGHT
#define BLOCK_ORIGIN_X
#define BLOCK_ORIGIN_Y
#define BLOCK_X_GAP
#define BLOCK_Y_GAP
// paddle defines
#define PADDLE_START_X
(WINDOW_WIDTH/2 - 16)
#define PADDLE_START_Y
(WINDOW_HEIGHT - 32);
#define PADDLE_WIDTH
#define PADDLE_HEIGHT
#define PADDLE_COLOR
RGB(0, 0, 255)
// ball defines
#define BALL_START_Y
(WINDOW_HEIGHT/2)
#define BALL_SIZE
// color defines
#define BACKGROUND_COLOR
RGB(0, 0, 0)
#define BLOCK_COLOR
RGB(125, 0, 0)
#define BALL_COLOR
RGB(222, 0, 222)
// these read the keyboard asynchronously
#define KEY_DOWN(vk_code) ((GetAsyncKeyState(vk_code) & 0x8000) ? 1 : 0)
#define KEY_UP(vk_code)
((GetAsyncKeyState(vk_code) & 0x8000) ? 0 : 1)
/* basic unsigned types *******************************************************************/
typedef unsigned short USHORT;
typedef unsigned short WORD;
typedef unsigned char
typedef unsigned char
/* FUNCTION DECLARATION *******************************************************************/
int Game_Init(void *parms = NULL);
int Game_Shutdown(void *parms = NULL);
int Game_Main(void *parms = NULL);
DWORD Start_Clock(void);
DWORD Wait_Clock(DWORD count);
/* GLOBALS *********************************************************************************/
main_window_handle = NULL;
// save the window handle
HINSTANCE main_instance
// save the instance
game_state
= GAME_STATE_INIT; // starting state
paddle_x = 0, paddle_y = 0;
// tracks position of paddle
= 0, ball_y
// tracks position of ball
= 0, ball_dy
// velocity of ball
// the score
// the current level
blocks_hit = 0;
// tracks number of blocks hit
start_clock_count = 0;
// used for timing
// this contains the game grid data
UCHAR blocks[NUM_BLOCK_ROWS][NUM_BLOCK_COLUMNS];
/* WINDPROC ********************************************************************************/
LRESULT CALLBACK WindowProc(HWND hwnd,
WPARAM wparam,
LPARAM lparam)
// this is the main message handler of the system
PAINTSTRUCT
switch (msg)
case WM_CREATE:
case WM_PAINT:
hdc = BeginPaint(hwnd, &ps);
EndPaint(hwnd, &ps);
case WM_DESTROY:
PostQuitMessage(0);
return DefWindowProc(hwnd, msg, wparam, lparam);
/* WINMAIN ********************************************************************************/
int WINAPI WinMain(HINSTANCE hinstance,
HINSTANCE hprevinstance,
LPSTR lpcmdline,
int ncmdshow)
PAINTSTRUCT
/* CS_DBLCLKS Specifies that the window should be notified of double clicks with
* WM_xBUTTONDBLCLK messages
* CS_OWNDC标志,属于此窗口类的窗口实例都有自己的DC(称为私有DC),私有DC仅属于该窗口实例,
* 所以程序只需要调用一次GetDC或BeginPaint获取DC,系统就为窗口初始化一个DC,并且保存程序
* 对其进行的改变。ReleaseDC和EndPaint函数不再需要了,因为其他程序无法访问和改变私有DC。
winclass.style
= CS_DBLCLKS | CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
winclass.lpfnWndProc = WindowP
winclass.cbClsExtra
winclass.cbWndExtra
winclass.hInstance
winclass.hIcon
= LoadIcon(NULL, IDI_APPLICATION);
winclass.hCursor
= LoadCursor(NULL, IDC_ARROW);
winclass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
winclass.lpszMenuName = NULL;
winclass.lpszClassName = WINDOW_CLASS_NAME;
// register the window class
if (!RegisterClass(&winclass))
// Create the window, note the use of WS_POPUP
hwnd = CreateWindow(
WINDOW_CLASS_NAME,
TEXT(&WIN32 Game Console&), // title
// initial x
// initial y
WINDOW_WIDTH,
// initial width
WINDOW_HEIGHT,
// initial height
// handle to parent
// handle to menu
hinstance,
// instance
// creation parms
if (! hwnd)
ShowWindow(hwnd, ncmdshow);
UpdateWindow(hwnd);
// hide mouse
//ShowCursor(FALSE);
// save the window handle and instance in a global
main_window_handle =
main_instance
// perform all game console specific initialization
Game_Init();
// enter main event loop
if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
// test if this is a quit msg
if (msg.message == WM_QUIT)
// translate any accelerator keys
TranslateMessage(&msg);
// send the message to the window proc
DispatchMessage(&msg);
// main game processing goes here
Game_Main();
Sleep(30);
// shutdown game and release all resources
Game_Shutdown();
// show mouse
//ShowCursor(TRUE);
// return to windows like this
return (msg.wParam);
/* DRAW FUNCTION **************************************************************************/
int Draw_Rectangle(int x1, int y1, int x2, int y2, int color)
// this function uses Win32 API to draw a filled rectangle
SetRect(&rect, x1, y1, x2, y2);
hbrush = CreateSolidBrush(color);
hdc = GetDC(main_window_handle);
FillRect(hdc, &rect, hbrush);
ReleaseDC(main_window_handle, hdc);
DeleteObject(hbrush);
int DrawText_GUI(TCHAR *text, int x, int y, int color)
hdc = GetDC(main_window_handle);
// set the colors for the text up
SetTextColor(hdc, color);
// set background mode to transparent so black isn't copied
SetBkMode(hdc, TRANSPARENT);
// draw the text
TextOut(hdc, x, y, text, lstrlen(text));
// release the dc
ReleaseDC(main_window_handle, hdc);
/* GAME PROGRAMMING CONSOLE FUNCTIONS *****************************************************/
void Init_Blocks(void)
// initialize the block field
for (int row = 0; row & NUM_BLOCK_ROWS; row++)
for (int col = 0; col & NUM_BLOCK_COLUMNS; col++)
blocks[row][col] = 1;
void Draw_Blocks(void)
// this function draws all the blocks in row major form
int x1 = BLOCK_ORIGIN_X;
int y1 = BLOCK_ORIGIN_Y;
// draw all the blocks
for (int row = 0; row & NUM_BLOCK_ROWS; row++)
// reset column position
x1 = BLOCK_ORIGIN_X;
for (int col = 0; col & NUM_BLOCK_COLUMNS; col++)
if (blocks[row][col] != 0)
Draw_Rectangle(x1, y1, x1+BLOCK_WIDTH, y1+BLOCK_HEIGHT, BLOCK_COLOR);
Draw_Rectangle(x1, y1, x1+BLOCK_WIDTH, y1+BLOCK_HEIGHT, BACKGROUND_COLOR);
x1 += BLOCK_X_GAP;
// advance column position
y1 += BLOCK_Y_GAP;
// advance to next row position
int Process_Ball(void)
// this function tests if the ball has hit a block or the paddle if so, the ball is bounced
// and the block is removed from
the playfield note: very cheesy collision algorithm :)
// first test for ball block collisions
// the algorithm basically tests the ball against each block's bounding box this is inefficient,
// but easy to implement, later we'll see a better way
// current rendering position
int x1 = BLOCK_ORIGIN_X;
int y1 = BLOCK_ORIGIN_Y;
// computer center of ball
int ball_cx = ball_x + (BALL_SIZE/2);
int ball_cy = ball_y + (BALL_SIZE/2);
// test the ball has hit the paddle
if (ball_y & (WINDOW_HEIGHT/2) && ball_dy & 0)
// extract leading edge of ball
int x = ball_x + (BALL_SIZE/2);
int y = ball_y + (BALL_SIZE/2);
// test for collision with paddle
if ((x &= paddle_x && x &= paddle_x + PADDLE_WIDTH) &&
(y &= paddle_y && y &= paddle_y + PADDLE_HEIGHT))
ball_dy = -ball_
// reflect ball
ball_y += ball_
// push ball out of paddle since it made contact
// add a little english to ball based on motion of paddle
if (KEY_DOWN(VK_RIGHT))
ball_dx -= rand() % 3;
else if (KEY_DOWN(VK_LEFT))
ball_dx += rand() % 3;
ball_dx += (-1 + rand() % 3);
// make a little noise
MessageBeep(MB_OK);
// now scan thru all the blocks and see of ball hit blocks
for (int row = 0; row & NUM_BLOCK_ROWS; row++)
x1 = BLOCK_ORIGIN_X;
// scan this row of blocks
for (int col = 0; col & NUM_BLOCK_COLUMNS; col++)
if (blocks[row][col] != 0)
// test ball against bounding box of block
if ((ball_cx & x1) && (ball_cx & x1 + BLOCK_WIDTH) &&
(ball_cy & y1) && (ball_cy & y1 + BLOCK_HEIGHT))
blocks[row][col] = 0;
// remove the block
// increment global block counter, so we know when to start another level up
blocks_hit++;
ball_dy = -ball_
// bounce the ball
ball_dx += (-1 + rand() % 3); // add a little english
MessageBeep(MB_OK);
// make a little noise
// test if there are no blocks, if so send a message to game loop to start another level
if (blocks_hit &= (NUM_BLOCK_ROWS * NUM_BLOCK_COLUMNS))
game_state = GAME_STATE_START_LEVEL;
// add some points
score += 5 * (level + (abs)(ball_dx));
x1 += BLOCK_X_GAP;
// advance column position
y1 += BLOCK_Y_GAP;
// advance row position
int Game_Init(void *parms)
// this function is where you do all the initialization for your game
int Game_Shutdown(void *parms)
// this function is where you shutdown your game and release all resources
// that you allocated
int Game_Main(void *parms)
// this is the workhorse of your game it will be called continuously in real-time
// this is like main() in C all the calls for you game go here!
TCHAR buffer[80];
BOOL bPaddleMoved = FALSE;
old_paddle_x, old_paddle_y;
old_ball_x, old_ball_y;
// what state is the game in?
if (game_state == GAME_STATE_INIT)
// seed the random number generator so game is different each play
srand((unsigned int)time(0));
// set the paddle position here to the middle bottom
paddle_x = PADDLE_START_X;
paddle_y = PADDLE_START_Y;
// set ball position and velocity
8 + rand() % (WINDOW_WIDTH-16);
ball_y = BALL_START_Y;
ball_dx = -4 + rand() % (8+1);
6 + rand() % 2;
// transition to start level state
game_state = GAME_STATE_START_LEVEL;
else if (game_state == GAME_STATE_START_LEVEL)
// get a new level ready to run
Init_Blocks();
// initialize the blocks
blocks_hit = 0;
// reset block counter
Draw_Blocks();
// draw blocks
// draw the paddle
Draw_Rectangle(paddle_x, paddle_y, paddle_x+PADDLE_WIDTH, paddle_y+PADDLE_HEIGHT, PADDLE_COLOR);
game_state = GAME_STATE_RUN;// transition to run state
else if (game_state == GAME_STATE_RUN)
// move the paddle
if (KEY_DOWN(VK_RIGHT))
old_paddle_x = paddle_x;
old_paddle_y = paddle_y;
paddle_x += 8;
// move paddle to right
// make sure paddle doesn't go off screen
if (paddle_x & (WINDOW_WIDTH - PADDLE_WIDTH))
paddle_x = WINDOW_WIDTH - PADDLE_WIDTH;
bPaddleMoved = TRUE;
else if (KEY_DOWN(VK_LEFT))
old_paddle_x = paddle_x;
old_paddle_y = paddle_y;
paddle_x -= 8;
// move paddle to left
// make sure paddle doesn't go off screen
if (paddle_x & 0)
paddle_x = 0;
bPaddleMoved = TRUE;
old_ball_x = ball_x;
old_ball_y = ball_y;
// move the ball
ball_x += ball_
ball_y += ball_
// keep ball on screen, if the ball hits the edge of screen then
// bounce it by reflecting its velocity
if (ball_x & (WINDOW_WIDTH - BALL_SIZE) || ball_x & 0)
ball_dx = -ball_
// reflect x-axis velocity
ball_x += ball_
// update position
// now y-axis
if (ball_y & 0)
ball_dy = -ball_
// reflect y-axis velocity
ball_y += ball_
// update position
else if (ball_y & (WINDOW_HEIGHT - BALL_SIZE))
ball_dy = -ball_
// reflect y-axis velocity
ball_y += ball_
// update position
score -= 100;
// minus the score
// next watch out for ball velocity getting out of hand
if (ball_dx & 8)
ball_dx = 8;
else if (ball_dx & -8)
ball_dx = -8;
// test if ball hit any blocks or the paddle
if (Process_Ball())
Draw_Blocks();
// draw blocks
if (bPaddleMoved)
// 覆盖旧的paddle
Draw_Rectangle(old_paddle_x, old_paddle_y, old_paddle_x+PADDLE_WIDTH, old_paddle_y+PADDLE_HEIGHT,
BACKGROUND_COLOR);
// draw the paddle
Draw_Rectangle(paddle_x, paddle_y, paddle_x+PADDLE_WIDTH, paddle_y+PADDLE_HEIGHT, PADDLE_COLOR);
// 覆盖旧的ball
Draw_Rectangle(old_ball_x, old_ball_y, old_ball_x+BALL_SIZE, old_ball_y+BALL_SIZE, BACKGROUND_COLOR);
// draw the ball
Draw_Rectangle(ball_x, ball_y, ball_x+BALL_SIZE, ball_y+BALL_SIZE, BALL_COLOR);
// draw the info
wsprintf(buffer, TEXT(&FREAKOUT
Level %d&), score, level);
Draw_Rectangle(8, WINDOW_HEIGHT-26, WINDOW_WIDTH, WINDOW_HEIGHT, BACKGROUND_COLOR);
DrawText_GUI(buffer, 8, WINDOW_HEIGHT-26, RGB(255, 255, 128));
// check if user is trying to exit
if (KEY_DOWN(VK_ESCAPE))
// send message to windows to exit
PostMessage(main_window_handle, WM_DESTROY, 0, 0);
// set exit state
game_state = GAME_STATE_SHUTDOWN;
else if (game_state == GAME_STATE_SHUTDOWN)
// in this state shut everything down and release resources
// switch to exit state
game_state = GAME_STATE_EXIT;
/* CLOCK FUNCTIONS ************************************************************************/
DWORD Get_Clock(void)
// this function returns the current tick count
// return time
return GetTickCount();
DWORD Start_Clock(void)
// this function starts the block, that is, saves the current count,
// use in conjunction with Wait_Clock()
return (start_clock_count = Get_Clock());
DWORD Wait_Clock(DWORD count)
// this function is used to wait for a specific number of clicks since
// the call to Start_Clock
while (Get_Clock() - start_clock_count & count)
return Get_Clock();
不足之处:因为之前经常在linux下编程,用的是game_state类型的变量风格,最近在windows下想学所谓的匈牙利表示法,但这段代码作者用了game_state类型的变量风格,我又被俘获了。。。
编程风格要统一,不能总是变来变去的!切记。
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:65819次
积分:1206
积分:1206
排名:第14911名
原创:50篇
评论:81条
(3)(6)(9)(18)(14)

我要回帖

更多关于 lols4排位奖励 的文章

 

随机推荐