Loading.cpp (433B)
1 #include "Loading.h" 2 3 bool Loading::Load(const char* filename) 4 { 5 6 cJSON* root = LoadJSON(filename); 7 //PrintJSON(root); 8 cJSON* loading = cJSON_GetObjectItem(root, "loading"); 9 10 char* SplashPath = cJSON_GetObjectItem(loading, "splash")->valuestring; 11 12 mSplash = SDL_CreateTextureFromSurface(mRen, LoadSurfaceBMP(SplashPath)); 13 return true; 14 } 15 16 bool Loading::Update() 17 { 18 SDL_RenderCopy(mRen, mSplash , NULL, NULL); 19 20 return true; 21 }