(de)serialize runescape classic entity, ui and texture images.
IMAGE COLLAGE
$ npm install @2003scape/rsc-sprites
create a new entity sprite (de)serializer (for entity jag and mem files). these are collections of frames for monster, character and equipment graphics.
prepare .jag
and .mem
buffers to be parsed. any sprites loaded with
entitySprites.loadMem
will have sprite.members = true
.
populate entitySprites.sprites
with frames of
canvas objects.
return an entities jag/mem archive.
create a new media sprite (de)serializer. these are images of interface items
(buttons, arrows) and inventory items. ui
specifies the filenames, sprite
offsets and amounts for interface sprites
hard-coded into the client:
// refers to "splat.dat"
splat: {
offset: 11,
sprites: 3
},
// etc.
this defaults to the interface sprites found in media58.jag
for
mudclient204 (./res/media-offsets.json
).
load and prepare a media jag archive buffer.
get a media sprite canvas by the id used in the client.
get a colourized item sprite canvas based on its id (index in config.items
).
Copyright 2020 2003Scape Team
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.