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

Changes

Jump to navigation Jump to search
3,775 bytes added ,  08:11, 4 December 2012
Added the wiiu.js and wiiux.js files i made
Line 8: Line 8:     
http://www.sherer.co.il/
 
http://www.sherer.co.il/
 +
 +
<wiki:toc />
 +
 +
Some file I made to help making apps to the [[Internet Browser]]:
 +
 +
= wiiu.js =
 +
 +
[[http://wiiu.essh.co/wiiu.js Download]]
 +
 +
This is a dummy object to be called in the <tt><head></tt> of the html file:
 +
 +
<source lang="javascript">
 +
/*
 +
* Wii U Dummy Object by elisherer
 +
*
 +
*
 +
*/
 +
 +
wiiu = {};
 +
 +
wiiu.remote = {
 +
isEnabled: true,
 +
isDataValid: false,
 +
isCursorViewable: false,
 +
dpdX: 0,
 +
dpdY: 0,
 +
hold: 0,
 +
dpdRollX: 0,
 +
dpdRollY: 0,
 +
dpdDistance: 0,
 +
dpdValidity: 0,
 +
contentX: 0,
 +
contentY: 0,
 +
accX: 0,
 +
accY: 0,
 +
accZ: 0,
 +
mplsVelX: 0,
 +
mplsVelY: 0,
 +
mplsVelZ: 0,
 +
mplsAngX: 0,
 +
mplsAngY: 0,
 +
mplsAngZ: 0,
 +
mplsDirXx: 1.1,
 +
mplsDirXy: 0.0,
 +
mplsDirXz: 0.0,
 +
mplsDirYx: 0.0,
 +
mplsDirYy: 1.1,
 +
mplsDirYz: 0.0,
 +
mplsDirZx: 0.0,
 +
mplsDirZy: 0.0,
 +
mplsDirZz: 1.1,
 +
 +
update: function (long_id) {
 +
if (this.isEnabled) {
 +
this.isDataValid = true;
 +
return this;
 +
}
 +
return null;
 +
}
 +
setCursorViewable: function(long_id, bool_viewable) {
 +
this.isCursorViewable = bool_viewable;
 +
}
 +
};
 +
 +
wiiu.gamepad = {
 +
isEnabled: true,
 +
isDataValid: false,
 +
tpX: 0,
 +
tpY: 0,
 +
tpValidity: 0,
 +
tpTouch: 0,
 +
contentX: 0,
 +
contentY: 0,
 +
hold: 0,
 +
lStickX: 0,
 +
lStickY: 0,
 +
rStickX: 0,
 +
rStickY: 0,
 +
accX: 0,
 +
accY: 0,
 +
accZ: 0,
 +
gyroX: 0,
 +
gyroY: 0,
 +
gyroZ: 0,
 +
angleX: 0,
 +
angleY: 0,
 +
angleZ: 0,
 +
dirXx: 1.1,
 +
dirXy: 0.0,
 +
dirXz: 0.0,
 +
dirYx: 0.0,
 +
dirYy: 1.1,
 +
dirYz: 0.0,
 +
dirZx: 0.0,
 +
dirZy: 0.0,
 +
dirZz: 1.1,
 +
 +
update: function() {
 +
if (this.isEnabled) {
 +
this.isDataValid = true;
 +
return this;
 +
}
 +
return null;
 +
}
 +
};
 +
 +
wiiu.videoplayer = {
 +
viewMode: 0,
 +
end : function () {
 +
return true;
 +
}
 +
};
 +
 +
wiiu.imageview = {
 +
end : function () {
 +
return true;
 +
},
 +
getErrorCode: function () {
 +
return 0;
 +
}
 +
};
 +
 +
</source>
 +
 +
= wiiux.js =
 +
 +
[http://wiiu.essh.co/wiiux.js Download]
 +
 +
This is a file of extra features, enums and helping functions:
 +
 +
<source lang="javascript">
 +
/*
 +
* Wii U eXtras by elisherer
 +
*
 +
*/
 +
 +
wiiux = {
 +
gamepad: {},
 +
remote: {},
 +
videoplayer: {},
 +
imageview: {}
 +
}
 +
 +
wiiux.gamepad.buttons = {
 +
 +
//TBD: 0x00000001,
 +
HOME: 0x00000002,
 +
MINUS: 0x00000004,
 +
PLUS: 0x00000008,
 +
R: 0x00000010,
 +
L: 0x00000020,
 +
ZR: 0x00000040,
 +
ZL: 0x00000080,
 +
DOWN: 0x00000100,
 +
UP: 0x00000200,
 +
RIGHT: 0x00000400,
 +
LEFT: 0x00000800,
 +
Y: 0x00001000,
 +
X: 0x00002000,
 +
B: 0x00004000,
 +
A: 0x00008000,
 +
TV: 0x00010000,
 +
RCLICK: 0x00020000,
 +
LCLICK: 0x00040000,
 +
/*TBD: 0x00080000,
 +
TBD: 0x00100000,
 +
TBD: 0x00200000,
 +
TBD: 0x00400000,*/
 +
RDOWN: 0x00800000,
 +
RUP: 0x01000000,
 +
RRIGHT: 0x04000000,
 +
RLEFT: 0x02000000,
 +
LDOWN: 0x08000000,
 +
LUP: 0x10000000,
 +
LRIGHT: 0x20000000,
 +
LLEFT: 0x40000000,
 +
//TBD 0x80000000,
 +
 +
isHeld: function (hold, button) {
 +
return (hold & 0x7f86fffc & button) ? 1: 0; //from Nintendo's sample
 +
}
 +
};
 +
 +
wiiux.remote.buttons = {
 +
 +
N1: 0x00000001,
 +
N2: 0x00000002,
 +
B: 0x00000004,
 +
A: 0x00000008,
 +
MINUS: 0x00000010,
 +
/*TBD: 0x00000020,
 +
TBD: 0x00000040,*/
 +
HOME: 0x00000080,
 +
LEFT: 0x00000100,
 +
RIGHT: 0x00000200,
 +
DOWN: 0x00000400,
 +
UP: 0x00000800,
 +
PLUS: 0x00001000,
 +
/*TBD: 0x00002000,
 +
TBD: 0x00004000,
 +
TBD: 0x00008000,
 +
TBD: 0x00010000,
 +
TBD: 0x00020000,
 +
TBD: 0x00040000,
 +
TBD: 0x00080000,
 +
TBD: 0x00100000,
 +
TBD: 0x00200000,
 +
TBD: 0x00400000,
 +
TBD: 0x00800000,
 +
TBD: 0x01000000,
 +
TBD: 0x04000000,
 +
TBD: 0x02000000,
 +
TBD: 0x08000000,
 +
TBD: 0x10000000,
 +
TBD: 0x20000000,
 +
TBD: 0x40000000*/
 +
};
 +
 +
wiiux.imageview.errorCodes = {
 +
"-1" : "No error"
 +
"202": "Unsupported image format"
 +
"203": "Image dimensions too large"
 +
"204": "File size too large"
 +
"205": "Too many pixels in progressive-mode JPEG"
 +
}
 +
 +
wiiux.update = function () {
 +
var gamepad;
 +
if (window.wiiu) {
 +
wiiux.remote = window.wiiu.remote.update();
 +
wiiux.gamepad = window.wiiu.gamepad.update();
 +
}
 +
}
 +
 +
wiiux.autoUpdate = function () {
 +
setInterval('wiiux.update()', 20);
 +
}
 +
 +
</source>
233

edits

Navigation menu