freeimage - freebitmap convert from HBitmap, with alpha data.
Load and bind 32Bit Bitmap as texture Success.
guichan-gamebox implement.bmpFontCreate,
opengles的窗口 与window 窗口的高度不同 后者还包括30像素的标题...
more ui elements to implement. until 6.30 , i will release one small demo,both run win &iphone.
对于 guichan 的扩展.
要实现 graphics, input, image,imageloader 以及 imagefont 几个类的接口.
其他部分是平台无关的定义。
而hge 事实上也是分隔开定义的, 仔细看的话是 hge,hge_impl graphics system 还有一层是 core, helper
这种设计的模式叫做 Adapter Pattern,
adapter模式是扩展时用。
“当客户类使用它时,接口不匹配,。。用硬代码调用这个类,势必产生大量重复代码”,当接口不匹配时,一般我们要么修改原来的类或者修改现在的类,使它们接口来匹配,但是这种修改原来类的办法不是好办法,我们要把原来的类当做“黑匣子”,尽量不去动它,保证复杂系统的稳定性,这是就只能通过adapter增加一个类,来做转换,就象110/220的变压转换器一样。
这个模式告诉我们,不要随意去修改原来代码,不要自以为很聪明,我个人感觉这是很多年轻程序员最喜欢范的毛病。
adapter 模式在网络里的应用是 gateway(网关),在现实生活中的应用就是 translator/interpretor(翻译)。
#define RGB(r, g, b)
[UIColor colorWithRed:r/256.0 green:g/256.0 blue:b/256.0 alpha:1]
#define RGBA(r, g, b, a)
[UIColor colorWithRed:r/256.0 green:g/256.0 blue:b/256.0 alpha:a]
// Code without the macro
msgLabel.textColor =
[UIColor colorWithRed:255/256.0 green:251/256.0 blue:204/256.0 alpha:1];
// Or like this...
msgLabel.textColor = [UIColor colorWithRed:1.0 green:.98 blue:.8 alpha:1];
// Code with macro
msgLabel.textColor = RGB(255, 251, 204);
1. Speed - It has new built-in processor and is 2 times faster than previous generation iPhone. It consumes less resources and has improved battery life.
2. Camera - It comes loaded with 3 MegaPixel camera with auto focus, auto exposure and auto white balance. Camera also supports photo, video geotagging and any application can access all the camera functions now.
3. 3D Graphics - It has new 3D graphics support in hardware for faster and more complicated 3D games.
4. Battery Life - As expected, it has much improved battery life. It supports 5 hours of internet use, 9 hours of wifi and video playback is 10 hours vs 30 hours for audio.
5. Design, size & weight - Design has remained same with glossy back. Size is also same 4.5 x 2.4 x 0.48 inches. However, weight has increased little, One ounce to 4.8 ounces (135 grams vs 133 grams).
6. Special features - You can talk with iphone and instruct it to play similar song to one your are playing. It supports features like: zooming on text, inverting video, and voice over when you touch whatever text is on screen.
New iPhone3G is more environment friendly with 23% smaller packing and arsenic free glass, mercury Free LCD and PVC free. It will be available in Black & white models and should be hit markets in over 80 countries by August 2009 - interested? [via Gizmodo]
Yep, just announced earlier today at WWDC.
http://www.apple.com/pr/library/2009/06/08iphone.html
From the release:
"iPhone 3G S offers incredible speed and performance, on average up to twice as fast as iPhone 3G, so you can render web pages quicker and launch applications faster. iPhone 3G S takes advantage of the OpenGL ES 2.0 standard for stunning high-quality 3D graphics, making mobile gaming and other graphic intense applications better than ever. iPhone 3G S is not only faster, but with longer battery life you can watch more videos, listen to more music, browse the Internet or keep using your favorite apps even longer. The new iPhone 3G S also supports 7.2 Mbps HSDPA for faster networking speeds.*** "
Sounds like a boost in CPU too (claimed up to 2X speed in a lot of applications - not sure what that translates to in terms of processor speed improvement.
这是4月初的计划, 还有几天就到5月了,不能欠债了。
先发个截图. 慢慢整理. 希望能将 CCGameBox 的各个部件都能介绍。
这是一个贪吃蛇游戏. 操作玩法是用重力感应器来控制方向。
http://www.box.net/shared/rktgsv2uug 是下载的连接. 如果你能帮我做ipa或者pxl的安装 请mail 我. 感谢