In memory of Ben “bushing” Byer, who passed away on Monday, February 8th, 2016.

Difference between revisions of "Libwiilight"

From WiiBrew
Jump to navigation Jump to search
m (spam revert)
(→‎Installation: Added what to include in a Makefile)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{HomebrewPossiblyDangerous}}
+
{{lowercase title}}
 
+
{{Infobox development tools
This is a quick simple library created by me using the wiilight demo app by Bool.
+
| title      = libwiilight
It is designed to be quick, small and simple to use with relatively few commands.
+
| image      =
 
+
| type        = library
== Download ==
+
| author      = [[User:Cboomf|Cboomf]]
 
+
| maintainer  =
Beta 1 - [[Image:libwiilight.zip]]
+
| contributor =
 +
| portedby    =
 +
| version    = Beta 1
 +
| download    = Media:libwiilight.zip
 +
| website    =
 +
| discussion  =
 +
| source      =
 +
}}
 +
'''''libwiilight''''' is a quick simple library created by [[User:Cboomf|Cboomf]] using the wiilight demo app by [[User:Bool|Bool]]. It is designed to be quick, small and simple to use with relatively few commands.
  
 
== Documentation ==
 
== Documentation ==
 
 
=== Installation ===
 
=== Installation ===
 +
Copy the .a file to ''DEVKITPRO path''/libogc/lib/wii and the .h to ''DEVKITPRO path''/libogc/include
  
Copy the .a file to ''DEVKITPRO path''/libogc/lib/wii and the .h to ''DEVKITPRO path''/libogc/include
+
You will also need to add "-lwiilight" as a library in your Makefile.
  
 
=== Functions ===
 
=== Functions ===
 
 
<source lang="c">
 
<source lang="c">
 
void WIILIGHT_Init();
 
void WIILIGHT_Init();
Line 34: Line 41:
  
 
=== Demos / Examples ===
 
=== Demos / Examples ===
 
 
<source lang="c">
 
<source lang="c">
 
//Defines/includes
 
//Defines/includes
Line 48: Line 54:
 
WIILIGHT_TurnOff();
 
WIILIGHT_TurnOff();
 
</source>
 
</source>
 +
 +
[[Category:Libraries]]

Latest revision as of 04:33, 21 January 2010

libwiilight
General
Author(s)Cboomf
TypeLibrary
VersionBeta 1
Links
Download

libwiilight is a quick simple library created by Cboomf using the wiilight demo app by Bool. It is designed to be quick, small and simple to use with relatively few commands.

Documentation

Installation

Copy the .a file to DEVKITPRO path/libogc/lib/wii and the .h to DEVKITPRO path/libogc/include

You will also need to add "-lwiilight" as a library in your Makefile.

Functions

void WIILIGHT_Init();
void WIILIGHT_TurnOn();
int WIILIGHT_GetLevel();
int WIILIGHT_SetLevel(int level);

void WIILIGHT_Toggle();
void WIILIGHT_TurnOff();

WIILIGHT_Init(); - initializes the lib, should be called after the video init stuff WIILIGHT_TurnOn(); - turns on the light once the level has been set WIILIGHT_GetLevel(); - returns the current light level WIILIGHT_SetLevel(); - sets the light level (0 - 255) WIILIGHT-Toggle(); - toggles between on/off WIILIGHT_TurnOff(); - turns off the light

Demos / Examples

//Defines/includes
#include <wiilight.h>

//Inits
WIILIGHT_Init();

//Main App
WIILIGHT_SetLevel(255);
WIILIGHT_TurnOn();
sleep(3);
WIILIGHT_TurnOff();