Update SpaceShooter - applications/spaceshooter/Resources.ring
@@ -11,15 +11,14 @@ Class Resources
aData = [] # [Image File, Image Data, Texture]
func Image cImage
- nMax = len(aData)
- if nMax > 0
- for t=1 to nMax
- if aData[t][C_DATA_FILE] = cImage
- unloadImage(aData[t][C_DATA_IMAGE].oData)
- aData[t][C_DATA_IMAGE] = loadImage(cImage)
- unloadtexture(aData[t][C_DATA_TEX])
- aData[t][C_DATA_TEX] = LoadTextureFromImage(aData[t][C_DATA_IMAGE])
- return aData[t][C_DATA_IMAGE]
+ if len(aData) > 0
+ for aList in aData
+ if aList[C_DATA_FILE] = cImage
+ unloadImage(aList[C_DATA_IMAGE].oData)
+ aList[C_DATA_IMAGE] = loadImage(cImage)
+ unloadtexture(aList[C_DATA_TEX])
+ aList[C_DATA_TEX] = LoadTextureFromImage(aList[C_DATA_IMAGE])
+ return aList[C_DATA_IMAGE]
ok
next
ok
