Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

DSWave: Difference between revisions

From GameBrew
No edit summary
No edit summary
Line 11: Line 11:
}}
}}


DSWaves is a library programmed in Lua of a style waves of the PSP XMB. It creates waves resembling the PSP XMB on NDS. This library is for [[Micro Lua DS|Micro Lua DS]] only.
DSWaves (Spanish) is a library programmed in Lua of a style waves of the PSP XMB. It creates waves resembling the PSP XMB on NDS. This library is for [[Micro Lua DS|Micro Lua DS]] only.


==User guide==
==User guide==
'''How to Use DSWaves:'''
===How to Use DSWaves===
Load the waves to the RAM:
DSWave.LoadWave("imagen_ondas.png") <br>


Load the RAM waves.
Load the waves to the VRAM:
  DSWave.LoadWave ("imagen_ondas.png") <br>
  DSWave.LoadVWave("imagen_ondas.png") <br>


Load the VRAM waves.
Free the image of the waves (to be able to load another or to free memory):
  DSWave.LoadVWave ("imagen_ondas.png") <br>
  DSWave.ClearWave() <br>


Free the image of waves (for charging another or to free memory).
Tint the waves, for example, DSWave.Tint(Red), it is assumed that we already define Red as a color by Red = Color.new (31,0,0):
  DSWave.ClearWave () <br>
  DSWave.Tint(Color) <br>


Dyeing the waves. Example: DSWave.Tint (Red), assume you define a color using Red as Red = Color.new (31,0,0)
Create a horizontal mirror, for example, DSWave.MirrorH(true) to enable or DSWave.MirrorH(false) to disable:
  DSWave.Tint (Color) <br>
  DSWave.MirrorV(true) or DSWave.MirrorV(false) <br>


Creates a horizontal mirror. Example: DSWave.MirrorH (true) to enable or DSWave.MirrorH (false) to disable.
Same as the previous one but creating a vertical mirror:
DSWave.MirrorV (true) or DSWave.MirrorV (false) <br>
DSWave.MirrorH(true) or DSWave.MirrorH(false) <br>


Same as above but creating a vertical mirror.
Blite the wave on the screen, it must be used inside the loop:
  DSWave.MirrorH (true) or DSWave.MirrorH (false) <br>
  DSWave.Init(SCREEN_UP) or DSWave.Init(SCREEN_DOWN) <br>


Blitea the wave on the screen should be used inside the loop.
Define the speed of the wave. Important to use, otherwise the wave will not move (where 1 can be 2, 3 , 4, etc):
DSWave.Init (SCREEN_UP) or DSWave.Init (SCREEN_DOWN) <br>
DSWave.SetSpeed(1) <br>
Sets the speed of the wave, important to use, otherwise the wave will not move.
DSWave.SetSpeed ​​(1) - where 1 can be 2,3,4, ... <br>


Returns the speed of the wave, for use with a variable Example:
Return the speed of the wave. Must be used with a variable, example:  
  DSWave.GetSpeed ​​velocidad_olas = () <br>
  velocidad_olas = DSWave.GetSpeed() <br>


'''Note from developer:'''
'''Note from developer:'''

Revision as of 08:38, 24 Mayıs 2021

DSWave
File:Dswaves.png
General
Author(s)RedHunter
TypeOther
Version1.0
LicenceMixed
Links
[Media:Dswavelua1.rar Download]
Website
Advertisements

<htmlet>adsense</htmlet>


DSWaves (Spanish) is a library programmed in Lua of a style waves of the PSP XMB. It creates waves resembling the PSP XMB on NDS. This library is for Micro Lua DS only.

User guide

How to Use DSWaves

Load the waves to the RAM:

DSWave.LoadWave("imagen_ondas.png") 

Load the waves to the VRAM:

DSWave.LoadVWave("imagen_ondas.png") 

Free the image of the waves (to be able to load another or to free memory):

DSWave.ClearWave() 

Tint the waves, for example, DSWave.Tint(Red), it is assumed that we already define Red as a color by Red = Color.new (31,0,0):

DSWave.Tint(Color) 

Create a horizontal mirror, for example, DSWave.MirrorH(true) to enable or DSWave.MirrorH(false) to disable:

DSWave.MirrorV(true) or DSWave.MirrorV(false) 

Same as the previous one but creating a vertical mirror:

DSWave.MirrorH(true) or DSWave.MirrorH(false) 

Blite the wave on the screen, it must be used inside the loop:

DSWave.Init(SCREEN_UP) or DSWave.Init(SCREEN_DOWN) 

Define the speed of the wave. Important to use, otherwise the wave will not move (where 1 can be 2, 3 , 4, etc):

DSWave.SetSpeed(1) 

Return the speed of the wave. Must be used with a variable, example:

velocidad_olas = DSWave.GetSpeed() 

Note from developer:

You can create the image of the waves with GIMP or Photoshop (or any other graphics editing program) or use the ones in this tutorial for PSP, only you have to resize them to 256x192.

Keep in mind that the following variables can not be used in our homebrews because the library uses DSWave: waveimg, CRN, crrk, vvl, VLV, srrrr, cWave, sssr.


Advertising: