tmx

TMX(Translation Memory eXchange) files in python

烈酒焚心 提交于 2020-04-12 20:38:32
问题 Is there a module for handling TMX(Translation Memory eXchange) files in python, if not, what would be another way to do it? As it stands, I have a giant 2gb file with French-English subtitles. Would it be possible to even handle such a file or would I have to break it down? 回答1: As @hurrial said, you can use translate-toolkit. Install This toolkit is only available using pip. To install it, run: pip install translate-toolkit Usage Assume that you have the following simple sample.tmx file:

How to avoid a double-up of effort for retina, when using tile maps from Tiled with Cocos2d

僤鯓⒐⒋嵵緔 提交于 2020-02-05 08:19:47
问题 I've got retina tile maps working, 15x10 tiles, of 64x64 tiles. problem is for non-retina devices I will need to make a 15x10 tiles of 32x32 tiles. I don't want to recreate the Tile, is it just a case of changing the XML (.tmx) file? Is there an automated tool or another way around this? I've been looking online but not getting too much help. Thanks 回答1: You have to update the TMX file and scale certain attributes. Unless your TMX map is very simple this will be a tedious and error-prone task

Cannot render .tmx map using OrthogonalTiledMapRenderer (Android)

冷暖自知 提交于 2019-12-25 18:51:39
问题 I am having a hard time getting a map to display correctly on my android app using LibGdx. First up here is my code: public class PlayState extends State { private LittleMan littleMan; private TiledMap map; OrthogonalTiledMapRenderer tiledMapRenderer; OrthographicCamera camera; public PlayState(GameStateManager gsm) { super(gsm); littleMan = new LittleMan(50,100); float w = Gdx.graphics.getWidth(); float h = Gdx.graphics.getHeight(); camera = new OrthographicCamera(); camera.setToOrtho(false,

Cannot load progressive jpeg images in libgdx

久未见 提交于 2019-12-12 14:07:46
问题 Here's my source package com.effect.bio; import com.badlogic.gdx.ApplicationListener; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Input; import com.badlogic.gdx.graphics.GL10; import com.badlogic.gdx.graphics.Mesh; import com.badlogic.gdx.graphics.OrthographicCamera; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.Sprite; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.maps.tiled.TiledMap; import com.badlogic.gdx.maps.tiled

Decompress gzip and zlib string in javascript

社会主义新天地 提交于 2019-11-26 17:31:42
问题 I want to get compress layer data from tmx file . Who knows libraries for decompress gzip and zlib string in javascript ? I try zlib but it doesn't work for me . Ex , layer data in tmx file is : <data encoding="base64" compression="zlib"> eJztwTEBAAAAwqD1T20JT6AAAHgaCWAAAQ== </data> My javascript code is var base64Data = "eJztwTEBAAAAwqD1T20JT6AAAHgaCWAAAQ=="; var compressData = atob(base64Data); var inflate = new Zlib.Inflate(compressData); var output = inflate.decompress(); It runs with