{"id":27992191,"url":"https://github.com/return-to-the-roots/libsiedler2","last_synced_at":"2025-05-08T17:57:57.270Z","repository":{"id":10282595,"uuid":"12399129","full_name":"Return-To-The-Roots/libsiedler2","owner":"Return-To-The-Roots","description":"Settlers II File Format Reader/Writer Library for s25client","archived":false,"fork":false,"pushed_at":"2025-04-18T17:25:29.000Z","size":2525,"stargazers_count":12,"open_issues_count":0,"forks_count":5,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-05-08T17:57:49.120Z","etag":null,"topics":["c-plus-plus"],"latest_commit_sha":null,"homepage":"http://www.rttr.info","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Return-To-The-Roots.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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,"zenodo":null}},"created_at":"2013-08-27T06:51:14.000Z","updated_at":"2025-04-18T17:25:33.000Z","dependencies_parsed_at":"2025-04-18T16:49:27.628Z","dependency_job_id":"992de890-e0df-419a-8047-0d84cccf0479","html_url":"https://github.com/Return-To-The-Roots/libsiedler2","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Return-To-The-Roots%2Flibsiedler2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Return-To-The-Roots%2Flibsiedler2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Return-To-The-Roots%2Flibsiedler2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Return-To-The-Roots%2Flibsiedler2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Return-To-The-Roots","download_url":"https://codeload.github.com/Return-To-The-Roots/libsiedler2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253124211,"owners_count":21857612,"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","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":["c-plus-plus"],"created_at":"2025-05-08T17:57:56.626Z","updated_at":"2025-05-08T17:57:57.248Z","avatar_url":"https://github.com/Return-To-The-Roots.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\nCopyright (C) 2005 - 2021 Settlers Freaks \u003csf-team at siedler25.org\u003e\n\nSPDX-License-Identifier: GPL-2.0-or-later\n--\u003e\n\n# libsiedler2 - Library for reading and writing 'The Settlers II' file formats\n\n## Current Build Info\n\n- Github Actions: ![Unit tests](https://github.com/Return-To-The-Roots/libsiedler2/workflows/Unit%20tests/badge.svg)\n\n- Appveyor: [![Appveyor Status](https://ci.appveyor.com/api/projects/status/elq18eld1ulhgm3k/branch/master?svg=true)](https://ci.appveyor.com/project/Flow86/libsiedler2/branch/master)\n\n- Coverage:\n[![Coveralls Status](https://coveralls.io/repos/github/Return-To-The-Roots/libsiedler2/badge.svg?branch=master)](https://coveralls.io/github/Return-To-The-Roots/libsiedler2?branch=master)\n[![Codecov Status](https://codecov.io/gh/Return-To-The-Roots/libsiedler2/branch/master/graph/badge.svg)](https://codecov.io/gh/Return-To-The-Roots/libsiedler2)\n\n## Prerequisites\n\n- boost ( \u003chttp://www.boost.org\u003e )\n- libutil\n- libendian\n\n## Installation\n\n```bash\nmkdir build \u0026\u0026 cd build\ncmake ..\nmake install\n```\n\nTo run all tests (`make test`) you need to put the original Settlers II folders\n(DATA and GFX) in the testFiles directory.\n\n## Texture format\n\nThe bitmaps can be stored in memory in ARGB or paletted format.\n\nThe ARGB format is byte BGRA, so 4 bytes define 1 pixel with blue first\nand alpha last.\n\nIf this is interpreted as a 32bit word on a little endian machine than it is\n(word) ARGB format.\nThat is the alpha value is the most significant byte.\n\nThe used format can be set with `setTextureFormat`.\n\nAll bitmaps loaded **after** this call will be in the given format with\nconversion beeing used if required.\n\n*Note:* While it is possible to convert paletted -\u003e ARGB in all cases the\nreverse is not always possible.\nSo using a paletted format may result in failure while loading ARGB bitmaps.\n\n## Palettes\n\nAs some files may contain embedded palettes (i.e LBM files):\nBe careful when reading, writing or using them.\n\n- If the bitmap is paletted, the loaded result contains a palette.\n- If it is ARGB, it may contain a palette and this palette may be invalid\n(not contain all colors) which can result in errors when converting to paletted.\n\nUse `checkPalette` to make sure the palette is valid.\n(Trivially true for paletted bitmaps.)\n\nFor the usage the following applies:\n\n1. No palette is required or used when no conversion occurs\n(Read/Write, Create/Print to from file/buffer with same format)\n2. Loading: If the file contains a palette,\n            it is stored in the bitmap and used.  \n            If the file does not contain a palette the passed palette is used,\n            but only stored with the bitmap if it is paletted.\n3. Writing: If the file format contains a palette and the bitmap contains one,\n            it is used instead of the passed palette.\n            Otherwise the palette passed is used with the bitmaps palette as\n            a fallback.\n            It is an error not to pass a palette when conversion is required\n            unless the bitmap contains one.  \n            If the file format supports paletted and unpalleted images then the\n            paletted format is used, if (and only if) the bitmap is paletted\n            or contains a palette.\n4. Drawing: The `print` function will prefer the passed palette for conversion\n            from ARGB and the contained palette for conversion to ARGB.\n5. Creating: The `create` function resets the bitmap completely\n            (size, palette, format, data).\n             It will create a bitmap with the same format as the buffer.\n             A palette is required and stored for paletted formats.\n\n## Additional information\n\nA detailed description of the file formats are here:\n\u003chttps://www.siedler25.org/formate\u003e (in German)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freturn-to-the-roots%2Flibsiedler2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freturn-to-the-roots%2Flibsiedler2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freturn-to-the-roots%2Flibsiedler2/lists"}