Maps/Vmaps and MMaps Digit change#360
Open
billy1arm wants to merge 10 commits into
Open
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Contributor
There was a problem hiding this comment.
Pull request overview
Updates map/vmap/mmap file naming conventions to use 4-digit zero-padded map IDs (e.g., 0001 instead of 001) across runtime loaders, generators, and GM commands to align with updated extraction outputs.
Changes:
- Switched mmap
.mmapand.mmtilefilename formatting from 3-digit to 4-digit map IDs. - Switched terrain
.mapfilename formatting from 3-digit to 4-digit map IDs. - Switched vmap
.vmtree/.vmtilefilename formatting from 3-digit to 4-digit map IDs.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
src/game/WorldHandlers/MoveMap.cpp |
Updates mmap .mmap/.mmtile filename patterns and related logs to 4-digit map IDs. |
src/game/WorldHandlers/GridMap.cpp |
Updates terrain .map filename patterns to 4-digit map IDs. |
src/game/vmap/VMapManager2.cpp |
Updates vmap runtime map tree filename padding to 4 digits. |
src/game/vmap/TileAssembler.cpp |
Updates vmap extractor output filenames (.vmtree/.vmtile) to 4 digits. |
src/game/vmap/MapTree.cpp |
Updates vmap tile filename generation to 4 digits. |
src/game/ChatCommands/MMapCommands.cpp |
Updates .mmap loc output formatting to 4-digit map IDs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
| { | ||
| --loadedTiles; | ||
| DEBUG_FILTER_LOG(LOG_FILTER_MAP_LOADING, "MMAP:unloadMap: Unloaded mmtile %03i[%02i,%02i] from %03i", mapId, x, y, mapId); | ||
| DEBUG_FILTER_LOG(LOG_FILTER_MAP_LOADING, "MMAP:unloadMap: Unloaded mmtile %04u[%02i,%02i] from %04i", mapId, x, y, mapId); |
Comment on lines
+877
to
+879
| int len = sWorld.GetDataPath().length() + strlen("maps/%04u%02u%02u.map") + 1; | ||
| char* tmp = new char[len]; | ||
| snprintf(tmp, len, (char*)(sWorld.GetDataPath() + "maps/%03u%02u%02u.map").c_str(), mapid, gx, gy); | ||
| snprintf(tmp, len, (char*)(sWorld.GetDataPath() + "maps/%04u%02u%02u.map").c_str(), mapid, (unsigned)gx, (unsigned)gy); |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
| { | ||
| --loadedTiles; | ||
| DEBUG_FILTER_LOG(LOG_FILTER_MAP_LOADING, "MMAP:unloadMap: Unloaded mmtile %03i[%02i,%02i] from %03i", mapId, x, y, mapId); | ||
| DEBUG_FILTER_LOG(LOG_FILTER_MAP_LOADING, "MMAP:unloadMap: Unloaded mmtile %04u[%02i,%02i] from %04i", mapId, x, y, mapId); |
| const int32 filenameTileY = y; | ||
|
|
||
| // load this tile :: mmaps/MMMYYXX.mmtile | ||
| // load this tile :: mmaps/MMMXXYY.mmtile |
| int len = sWorld.GetDataPath().length() + strlen("maps/%04u%02u%02u.map") + 1; | ||
| char* tmp = new char[len]; | ||
| snprintf(tmp, len, (char*)(sWorld.GetDataPath() + "maps/%03u%02u%02u.map").c_str(), mapid, gx, gy); | ||
| snprintf(tmp, len, (char*)(sWorld.GetDataPath() + "maps/%04u%02u%02u.map").c_str(), mapid, (unsigned)gx, (unsigned)gy); |
| int len = sWorld.GetDataPath().length() + strlen("maps/%04u%02u%02u.map") + 1; | ||
| char* tmp = new char[len]; | ||
| snprintf(tmp, len, (char*)(sWorld.GetDataPath() + "maps/%03u%02u%02u.map").c_str(), m_mapId, x, y); | ||
| snprintf(tmp, len, (char*)(sWorld.GetDataPath() + "maps/%04u%02u%02u.map").c_str(), m_mapId, x, y); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
all files will need to be extracted after this update
This change is