{"id":15049549,"url":"https://github.com/victorqueiroz/tmx2c","last_synced_at":"2026-04-01T22:05:45.695Z","repository":{"id":57377337,"uuid":"423232511","full_name":"VictorQueiroz/tmx2c","owner":"VictorQueiroz","description":"Export Tiled Editor map files (.tmx) to C99 format directly from the command line.","archived":false,"fork":false,"pushed_at":"2023-02-15T16:36:01.000Z","size":190,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-26T01:50:34.045Z","etag":null,"topics":["2d","tiled-map-editor","tmx-maps","tmx-parser"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VictorQueiroz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-31T18:44:09.000Z","updated_at":"2023-03-05T13:22:25.000Z","dependencies_parsed_at":"2024-09-24T21:32:37.777Z","dependency_job_id":null,"html_url":"https://github.com/VictorQueiroz/tmx2c","commit_stats":{"total_commits":63,"total_committers":1,"mean_commits":63.0,"dds":0.0,"last_synced_commit":"0a316c928a1b1c0f7b34c1a5c8b32467aa92389f"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/VictorQueiroz/tmx2c","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VictorQueiroz%2Ftmx2c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VictorQueiroz%2Ftmx2c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VictorQueiroz%2Ftmx2c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VictorQueiroz%2Ftmx2c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VictorQueiroz","download_url":"https://codeload.github.com/VictorQueiroz/tmx2c/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VictorQueiroz%2Ftmx2c/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28087822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-27T02:00:05.897Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2d","tiled-map-editor","tmx-maps","tmx-parser"],"created_at":"2024-09-24T21:21:15.290Z","updated_at":"2025-12-27T23:18:38.729Z","avatar_url":"https://github.com/VictorQueiroz.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tmx2c\n\nExport [Tiled Editor](https://thorbjorn.itch.io/tiled) map files (.tmx) to C99 format directly from the command line.\n\n## Installation\n\n```\nnpm install -g tmx2c\n```\n\n## Usage\n\n```\ntmx2c \"test/Kings and Pigs/map.tmx\":main_map \"test/Kings and Pigs/map2.tmx\":level_2_map -o generated\n```\n\nThis will generate a CMake project on a relative path (in this case `generated` was chosen) with all the embedded maps information.\n\n```c\n#include \"generated/maps/main_map.h\"\n#include \"generated/maps/level_2_map.h\"\n#include \u003cassert.h\u003e\n#include \u003cstddef.h\u003e\nint main() {\n    struct tiled_map_t* map = NULL;\n    map = tiled_main_map_alloc();\n    assert(map != NULL);\n    tiled_main_map_free(\u0026map);\n    assert(map == NULL);\n    map = tiled_level_2_map_alloc();\n    assert(map != NULL);\n    tiled_level_2_map_free(\u0026map);\n    assert(map == NULL);\n    return 0;\n}\n```\n\n## Object types\n\nThe code generator will map all of the mentioned object types into a C enum. So this:\n\n```xml\n\u003cobjectgroup id=\"2\" name=\"Object Layer 1\"\u003e\n    \u003cobject id=\"1\" name=\"Player Spawn Point\" type=\"playerSpawnPoint\" x=\"512\" y=\"288\" width=\"32\" height=\"32\"/\u003e\n    \u003cobject id=\"2\" name=\"Enemy Spawn Point\" type=\"enemySpawnPoint\" x=\"480\" y=\"576\" width=\"32\" height=\"32\"\u003e\n        \u003cproperties\u003e\n            \u003cproperty name=\"attack\" value=\"10\"/\u003e\n        \u003c/properties\u003e\n    \u003c/object\u003e\n\u003c/objectgroup\u003e\n\u003cobjectgroup id=\"3\" name=\"Object Layer 2\"\u003e\n    \u003cobject id=\"4\" name=\"Health Life Item\" type=\"healthLifeItem\" x=\"160\" y=\"576\" width=\"32\" height=\"32\"/\u003e\n\u003c/objectgroup\u003e\n```\n\nBecomes this:\n\n```c\nenum tiled_object_type_t {\n    TILED_OBJECT_TYPE_NONE,\n    TILED_OBJECT_TYPE_PLAYER_SPAWN_POINT,\n    TILED_OBJECT_TYPE_ENEMY_SPAWN_POINT,\n    TILED_OBJECT_TYPE_HEALTH_LIFE_ITEM\n};\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvictorqueiroz%2Ftmx2c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvictorqueiroz%2Ftmx2c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvictorqueiroz%2Ftmx2c/lists"}