- 博客(0)
- 资源 (3)
空空如也
iOSMVVM开发模式实例
.
|____handler
| |____AccountHandler.h
| |____ModelHandler.h
|____model
| |____AccountDataModel.h
| |____AccountDataModel.m
| |____DataModel.h
| |____DataModel.m
|____module
| |____login
| | |____LoginBiz.h
| | |____LoginBiz.m
| | |____LoginView.h
| | |____LoginView.m
| | |____LoginViewController.h
| | |____LoginViewController.m
| | |____LoginViewDelegate.h
| |____register
| | |____RegisterBiz.h
| | |____RegisterBiz.m
| | |____RegisterView.h
| | |____RegisterView.m
| | |____RegisterViewController.h
| | |____RegisterViewController.m
| | |____RegisterViewDelegate.h
|____network
| |____HttpClient.h
| |____HttpClient.m
|____storage
| |____AccountStorage.h
| |____AccountStorage.m
|____vender
| |____AFNetworking
|____view
|____viewmodel
| |____ModelBiz.h
| |____ModelBiz.m
2017-09-19
2d 动画编辑 opengles c++实现
bool AnimationManager::Load(const std::string &fileName;) {
float width;
float height;
const char * path = MakePath(fileName.c_str());
std::string fullFileName = std::string(path);
// Á‡„ÛʇÂÏ ÚÂÍÒÚÛÛ - Á‡ÔËÒ˚‚‡ÂÏ Û͇Á‡ÚÂθ ̇ Ì ‚ "tex", ÍÓÚÓ˚È ËÒÔÓθÁÛÂÚÒˇ ‰‡ÎÂÂ
//
// ̇˜‡ÎÓ ·ÎÓ͇ - ˝ÚÓÚ ÍÓ‰ ÔË ÔÓÚËÓ‚‡ÌËË Ì‡‰Ó ÔÂÂÔËÒ‡Ú¸
// HGE *hge = hgeCreate(HGE_VERSION);
GLuint tex = TextureLoad((fullFileName.substr(0, fullFileName.length() - 3) + "png").c_str(), width, height);
if (tex == 0) { // ÂÒÎË ÚÂÍÒÚÛ‡ Ì ̇ȉÂ̇ - ÔÂ˚‚‡ÂÏ Á‡„ÛÁÍÛ, ‚ÓÁ‚‡˘‡ÂÏ "false"
return false;
}
// ÍÓ̈ ·ÎÓ͇
TiXmlDocument doc;
if (doc.LoadFile(path)) { // ÂÒÎË Ù‡ÈÎ ÒÛ˘ÂÒÚ‚ÛÂÚ - ˜ËÚ‡ÂÏ XML Ò ÓÔËÒ‡ÌËÂÏ ‡ÌËχˆËÈ
TiXmlElement *root = doc.RootElement();
TiXmlElement *animation = root->FirstChildElement("Animation");
while (animation) {
const char *id = animation->Attribute("id");
// ¬Õ»Ã¿Õ»≈ - ËÁ ‰‚Ûı Ë ·ÓΠ‡ÌËχˆËÈ Ò Ó‰Ë̇ÍÓ‚˚ÏË id - ·Û‰ÂÚ Á‡„ÛÊÂ̇ ÚÓθÍÓ Ô‚‡ˇ
if (_animations.find(id) == _animations.end()) {
_animations[id] = new Animation(animation, tex, width, height);
}
animation = animation->NextSiblingElement("Animation");
}
_textures.push_back(tex);
printf("file loaded %s\n", path);
return true;
} else {
// Ù‡ÈÎ ‡ÌËχˆËÈ Ì ̇ȉÂÌ ËÎË Â„Ó Ì ۉ‡ÎÓÒ¸ ÔÓ˜ËÚ‡Ú¸
// ‚˚„ÛʇÂÏ ÚÂÍÒÚÛÛ, ‚ÓÁ‚‡˘‡ÂÏ "false"
//
// ̇˜‡ÎÓ ·ÎÓ͇ - ˝ÚÓÚ ÍÓ‰ ÔË ÔÓÚËÓ‚‡ÌËË Ì‡‰Ó ÔÂÂÔËÒ‡Ú¸
//hge->Texture_Free(tex);
// ÍÓ̈ ·ÎÓ͇
printf("file not found: %s\n", path);
return false;
}
}
2012-04-17
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人