If you appreciate the work done within the wiki, please consider supporting The Cutting Room Floor on Patreon. Thanks for all your support!
Blasting Agent: Ultimate Edition (Nintendo 3DS)
Jump to navigation
Jump to search
Cleanup > Pages missing date references
Cleanup > Pages missing developer references
Cleanup > Pages missing publisher references
Games > Games by content > Games with uncompiled source code
Games > Games by developer > Games developed by Ratalaika Games
Games > Games by platform > Nintendo 3DS games
Games > Games by publisher > Games published by Rainy Frog
Games > Games by publisher > Games published by Ratalaika Games
Games > Games by release date > Games released in 2016
Games > Games by release date > Games released in 2017
Games > Games by release date > Games released in March
Games > Games by release date > Games released in March > Games released on March 29
Games > Games by release date > Games released in September
Games > Games by release date > Games released in September > Games released on September 18
Blasting Agent: Ultimate Edition |
---|
Developer: Ratalaika Games This game has uncompiled source code. |
Trivia: Blasting Agent is actually the stuff they sprayed on the inside of the Sega Genesis to make Sonic go so fast.
Font Converter
Left behind in the /font directory is fnt_to_json.py, which pretty much explains itself. And then it explains itself again in a comment.
""" Script to convert an .fnt (font) file exported from tools like BMFont and Glyph Designer to a .json format which we can use to render fonts at runtime """ import sys import os import json import re class RawJson(unicode): pass # patch json.encoder module to avoid escaping strings # so that they are copied verbatim in the resuling json file for name in ['encode_basestring', 'encode_basestring_ascii']: def encode(o, _encode=getattr(json.encoder, name)): return o if isinstance(o, RawJson) else _encode(o) setattr(json.encoder, name, encode) regex = re.compile("([a-zA-Z0-9]+)=((\"[^\"]*\")|(\S+))") def line_to_json(line): """ Convert a line from the .fnt file to json """ result = {} expressions = line.strip().split(' ') iterator = iter(expressions) next(iterator) for expression in iterator: if len(expression) == 0: continue props = regex.findall(line) for prop in props: value = prop[1] if ',' in value: value = '[%s]' % value elif value == '"""': value = '"\\""' elif value == '"\\"': value = '"\\\\"' result[prop[0]] = RawJson(value) return (expressions[0], result) def main(argv): if len(argv) != 2: raise ValueError('Usage: fnt_to_json input.fnt output.json') # Read the .fnt file into memory data = [] with open(argv[0]) as f: data = f.readlines() output = { 'pages' : [ ], } # Convert to json line by line for line in data: if line.startswith('chars'): (name, result) = line_to_json(line) output[name] = result elif line.startswith('kernings'): (name, result) = line_to_json(line) result['data'] = [] output[name] = result elif line.startswith('char'): (name, result) = line_to_json(line) output['pages'][int(result['page'])]['chars']['data'].append(result) elif line.startswith('kerning'): (name, result) = line_to_json(line) output['kernings']['data'].append(result) elif line.startswith('page'): (name, result) = line_to_json(line) result['chars'] = {} result['chars']['data'] = [] output['pages'].append(result) else: (name, result) = line_to_json(line) output[name] = result # Write result with open(argv[1], 'w') as f: f.write(json.dumps(output)) if __name__ == "__main__": main(sys.argv[1:])
Categories:
- Pages missing developer references
- Games developed by Ratalaika Games
- Pages missing publisher references
- Games published by Ratalaika Games
- Games published by Rainy Frog
- Nintendo 3DS games
- Pages missing date references
- Games released in 2017
- Games released in March
- Games released on March 29
- Games released in 2016
- Games released in September
- Games released on September 18
- Games with uncompiled source code
Cleanup > Pages missing date references
Cleanup > Pages missing developer references
Cleanup > Pages missing publisher references
Games > Games by content > Games with uncompiled source code
Games > Games by developer > Games developed by Ratalaika Games
Games > Games by platform > Nintendo 3DS games
Games > Games by publisher > Games published by Rainy Frog
Games > Games by publisher > Games published by Ratalaika Games
Games > Games by release date > Games released in 2016
Games > Games by release date > Games released in 2017
Games > Games by release date > Games released in March
Games > Games by release date > Games released in March > Games released on March 29
Games > Games by release date > Games released in September
Games > Games by release date > Games released in September > Games released on September 18