User Tools

Site Tools


en:tutorials:resources:resource_reloading

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:tutorials:resources:resource_reloading [2021/08/28 11:53 (3 years ago)] – [Rules and Notes] iarwainen:tutorials:resources:resource_reloading [2021/08/28 12:07 (3 years ago)] (current) – [Swapping to high-res using Code] iarwain
Line 7: Line 7:
 ===== The assets ====== ===== The assets ======
  
-Download these two sprite textures and save them to a data\texture\lowres folder in your project.+Download these two sprite textures and save them to a ''data/texture/lowres'' folder in your project.
  
-{{ :tutorials:resources:buggy.png?nolink |}} {{ :tutorials:resources:oil.png?nolink |}}+{{ :tutorials:resources:lowres:buggy.png?nolink |}} {{ :tutorials:resources:lowres:oil.png?nolink |}}
  
-Download these two sprite textures and save them to a data\texture\highres folder in your project.+Download these two sprite textures and save them to a ''data/texture/highres'' folder in your project.
  
-{{ :tutorials:resources:buggy-highres.png?nolink |}} {{ :tutorials:resources:oil-hires.png?nolink |}} +{{ :tutorials:resources:highres:buggy.png?nolink |}} {{ :tutorials:resources:highres:oil.png?nolink |}}
- +
-Remove the ''-hires'' from the filenames before saving.+
  
 ===== Setting up resources ===== ===== Setting up resources =====
Line 80: Line 78:
 ===== Swapping to high-res using Commands ===== ===== Swapping to high-res using Commands =====
  
-While the app is running, press the '~' key (tilde) to open the Orx Console.+While the app is running, press the ''~'' key (tilde) to open the Orx Console.
  
 Enter the following commands to switch to the high resolution assets: Enter the following commands to switch to the high resolution assets:
Line 110: Line 108:
  
 <code c> <code c>
-orxResource_RemoveStorage("Texture", orxNULL); +orxResource_RemoveStorage("Texture", orxNULL);  // Removes all the storages from the Texture group
  
 orxConfig_PushSection("Resource"); orxConfig_PushSection("Resource");
-orxConfig_SetString("Texture", "@ResourceHighRes"); // Switch to the high-res textures+orxConfig_SetString("Texture", "@ResourceHighRes"); // Switches to the high-res textures
 orxConfig_PopSection(); orxConfig_PopSection();
  
en/tutorials/resources/resource_reloading.1630176839.txt.gz · Last modified: 2021/08/28 11:53 (3 years ago) by iarwain