mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-20 16:49:52 +00:00
* prettier * typo * bugfix: expect error on non supported skin format * multiple instance, different gamma (colors) * bugfix colortheme bg, cleanup * prettier * back to load single skin, del dead code * del hack() * trial to rename 'parse' -> skinengine_wal * fully SkinEngine_Audio * cleanup console warn. * real switchSkin * integrate WAL parser with plugable skinEngine. * +KJofol ! * show Vis, Song, * +WindowsMediaPlayer: Engine,Skins. * load JS * MMD3's header: movable * +DialKnob * +Button for down image that use global bmp * preparing to Dock (layout name|mode) * dock! * undoc button * +FloodLevel: kjofol seek. only ui/drag-mouse * bugfix can't click * +slider action. * del dead code * bugfix on switch kjofol skin * call dispose() on switch skin * bugfix Audion timer. * bugfix loading skin*.zip, bugfix knob * demo: loading .zip (unknown|ambiguous ext) * just rename file * wsz: failed to load wsz:( * default Equalizer: missing #11,#12 * loading classic skin .wsz * bugfix: don't stop when bitmap not found * maximum viable. * Replace the previous base with DeClassified This commit aims to replace the base used for rendering Classic Skins in Webamp Modern with the latest commit of DeClassified * added iso support for the EQ, update base skin * working tooltips for the time display * rename wsz_root to skin for some reason this still doesnt make webamp modern render the skin it's given * a bunch of things * allow wsz_root to skin. (failed due missing files) * prettier * add but ignore. maybe soon be used * temporary disabling "application.mi" * reusing old classic code, that works * + manifesto * okay, lets use skin in correct way * ren file * redefining eq xml * thumb background changes when mousemove * +Pitch ! * set seek z-order to be not covering pitch. * pitch: smooth audio effect during changes. * bugfix normal pitch != 100% * +Shade mode * add objective-c syntaxt highlighter * +Repeat, Shuffle * Call & StrangeCall diff exploration * +FileExtractor * prettier. * loading sonique for first time * loading sonique for first time * showing the main frame, + regional applied * play,pause,stop * play,pause,stop click images * revert to using std|*.json * show song duration (both enquee & addtrack) * finding a correct bitrate * +real metadata, +experiment bitRate * show real song artist + title * +showing real KBPS, real KHZ. * track.id is not (can not be) required, error on eqnueeefile() * complete album art. * bugfix volume onchanged * del dead code * lowercase key, to avoid misleading * lowercase key, to avoid misleading * speedup id3 parsing by Promise * load another maki * valid: uiRoot required for vm. * move Track * playlist text elipsis * +scifi (sample skin) * first attept to wrap text inside an irregular shape * reduce noise in html. => head/css. * show cone gradient as Ring's preparation. * show progress Ring * both ring are now drawn. * allow 270deg * preparing real progress * completing ui, no event yet * bugfix mistaken mask * allowing ring.action (+events) * shuffle,repeat. * eject * switch to layout:NAV * switch to layout:SMALL * adding JetAudio support * all bitmaps are loaded * prevent 'undefined' id. * show something visible :P * preparing to load one tag with several meaning * adding JetCowonAudio (old uib) support * bugfix CORS issue of api.webampskins.org/graphql * more window buttons * add more sonique skin * do list of ini content * valid yarn build. * sgf extractor * sonique icon * ignore 'extracted-*' folders * add more sonique skin to load * custom bitmap (just shown) * just colorized * maybe yes/no. colors is not confirmed * not-found items ( taken from sonique install dir) * load global png: via .ts * show icons in circle buttons! * exploring rgn (failed) * can load from path (yeah, slow! :v) * add freform/winamp * add lineHeight to adjust font-size * add border-bottom of menus * prefix css (scrollbars) * just commit, whatever. * bugfix frequency position (not overlaped) * +Menu ! (can only hover & mouse-down) * still bugfix lineheight of titlebar's text * show deprecated class * show deprecated methods * better on showing deprecated * bugfix Menu.GUID * force lowercase * menus res * set zero as a valid value of calcelation. * completing Container props * add more props, and also by retype (lowcase typo) * pre-add * +List, etc. * addd more props * rename _width -> _w & _height -> _h * +onresize * more detail message of too many similar error * +ontextchanged * log description on where the error come? * avoid missing script id. (better debug) * attaching WindowHolder * my BigBento is just working (some hardcoded) * add (my hacked) BigBento into selection. * rename: _resizable -> _canResize. to avoid conflict in Frame * Frame.from = L * a bit better. but not reflect on toggle click. * reaching 71% of maki implementation * mute frame border * MUTE GRAPHQL ERROR CORS. * dummy method: addSubMenu * oke lah. lumayan * implement windowholder for PL (only). * correct align children: left & right. * a bit better (assuring all key = lowercased) * recompile some scripts * bugfix thinger * +MMD3 with thinger included (standalone) * bugfix mono/stereo get by text.display="songinfo" * +winamp browser * + Maki Explorer * +fake implementation * Big Bugfix: COnfig Item * I understand, bud no found any mistake * trial to compare string == insensitive * trial to compare string != insensitive * trial to case insensitive * trial to compare string != insensitive * bugfix triggering multi events * set DEBUG, doesnt work :( * more preserved guid * mice down/up = work. but no visually. * add undefined as fake * implement fake Popup > open @mouse-hover * bugfix: hover didn't work * mute lint error * bugfix xmlParam -> toLowerCase * failed code to comment: * allow bool as int * mute console * unhide text when not expanded | to find a text * inpect "Class" in binary (distinct to other var) * bugfix CORS cdn. , wait until user click demo. * bugfix reading unicode char. * Mad Apple Girl dancing * Mad Apple Girl skin * bad apple HD * set back Text to be used by titlebar * Completing missing classes (For better maki explorer / maki understanding) * split editor to 2, for comparing up & down * mark CLASS. by subclassing of vars identification * Full speed animation * add more maki: Application, File+XmlDoc * add more maki: Application, File+XmlDoc * more info when error (id of script) * +global: application. +few methods * +few methods. * beautify (format doc), (typo) * bugfix eris-lund: found a fatal error/program stop * Class defintion (in maki file) is back supported. * STUPID? mute ERROR. (don't stop) * set back to very-simple logic * implement alternateText * bugfix a maki file loaded twice (multi) * + trigger event in a class. * mute console * sorry, for hardcoded. ;p * clean up uneeded dependency * load very simple part: main.bmp + cbutton.bmp * load main.shaded * bitrates * bitrates * more classic skin * + note & link, +full bitlist * more classic items * more progress. * ++ various implementation, based on /progress * *.WMZ region.txt is now ready ! * typo. * integrate play/pause/stop statuses + mono|stereo * network status * change: wa.play.red => traffic.red (buffering) * Volume + Pan * EQ + PL buttons * bugfix Text (char not found , too narrow bitmapfont) * TIME text is clickable * +Shuffle + Repeat * better pseudo minus sign taken from "5" & "7" char * pixel-perfect of Timer (text) of WInamp Modern. * completing classic.player (container) * completing VISCOLOR.txt parsing & applying values * bugfix wrong parameter of vis * Allow bitmap transparency by color (WMP) * bugfix wrong parameter of vis * Green Head is back running! (WMP) * running WMP correctly * running WMP correctly: background-color * format from root dir * format from root dir * reduce lint complain * del unknown file --------- Co-authored-by: Fathony <fathony@smart-leaders.net> Co-authored-by: Eris Lund <38136789+0x5066@users.noreply.github.com>
80 lines
2.4 KiB
JavaScript
80 lines
2.4 KiB
JavaScript
#!/usr/bin/env node
|
|
|
|
/**
|
|
* Based on extract_objects.pl from Ralf Engels<ralf.engels@gmx.de> Maki decompiler
|
|
*/
|
|
|
|
const fs = require("fs");
|
|
|
|
function parseFile(filePath) {
|
|
const mi = fs.readFileSync(filePath, "utf8");
|
|
const lines = mi.split("\n");
|
|
|
|
const objects = {};
|
|
lines.forEach((line, lineNumber) => {
|
|
const classDefinitionMatch =
|
|
/\s*extern\s+class\s*\@\{(........\s?-\s?....\s?-\s?....\s?-\s?....\s?-\s?............)\}\s*\@\s*(.*?)\s+(.*?);/.exec(
|
|
line
|
|
);
|
|
if (classDefinitionMatch) {
|
|
const id = classDefinitionMatch[1].replace(/[-\s]/g, "");
|
|
const parent = classDefinitionMatch[2];
|
|
const name = classDefinitionMatch[3]
|
|
.replace(/^_predecl /, "")
|
|
.replace(/^&/, "");
|
|
const deprecated = /^deprecated\s/.test(line);
|
|
objects[name.toLowerCase()] = {
|
|
id,
|
|
name,
|
|
parent,
|
|
deprecated,
|
|
functions: [],
|
|
};
|
|
}
|
|
|
|
const methodMatch = /\s*extern(\s+.*)?\s+(.*)\.(.*)\((.*)\);/.exec(line);
|
|
|
|
if (methodMatch) {
|
|
const methodDeprecated = /^deprecated\s/.test(line);
|
|
const result = methodMatch[1] == null ? "" : methodMatch[1].trim();
|
|
const className = methodMatch[2].toLowerCase();
|
|
const name = methodMatch[3].trim();
|
|
const rawArgs = methodMatch[4].split(/\s*,\s*/);
|
|
const parameters = rawArgs.filter(Boolean).map((rawArg) => {
|
|
const argMatch = /^\s*(.*\s+)?(.*)\s*/.exec(rawArg);
|
|
if (argMatch == null) {
|
|
throw new Error(`Could not find args in ${rawArg} in ${line}`);
|
|
}
|
|
const type = argMatch[1];
|
|
if (type == null) {
|
|
// console.warn(`Could not find args name in ${fileName}:${lineNum} "${line}"`);
|
|
return [argMatch[2], "unknown_arg_name"];
|
|
}
|
|
return [type.trim(), argMatch[2]];
|
|
});
|
|
if (objects[className] == null) {
|
|
throw new Error(
|
|
`"${className} not defined in ${filePath}:${lineNumber}. I have ${JSON.stringify(
|
|
Object.keys(objects)
|
|
)}`
|
|
);
|
|
}
|
|
objects[className].functions.push({
|
|
name,
|
|
parameters,
|
|
result,
|
|
deprecated: methodDeprecated,
|
|
});
|
|
}
|
|
});
|
|
|
|
const objectIds = {};
|
|
Object.keys(objects).forEach((normalizedName) => {
|
|
const { id, parent, functions, name, deprecated } = objects[normalizedName];
|
|
objectIds[id] = { parent, name, deprecated, functions };
|
|
});
|
|
|
|
return objectIds;
|
|
}
|
|
|
|
module.exports = { parseFile };
|