The current issue is resolved. This thread will remain open for further discussion.
So it has come to me that I need some help with this quest. And that is, I need help from scripters because I am running into scripting issues that just baffle me and significantly impede progress until they are sorted out. These hiatuses have been the cause of many rustled jimmies much frustration and several hiatuses thus so far.
Anyways, here's this lovely block of code that has an issue for some reason:
const int TILE_BIGMAPTILE_START_BASE = 34980; //The tile corresponding to the tiles containing the pieces of the minimap on the tilesheet const int TILE_BIGMAPTILE_START_DESTINATION = 34320; //The tile corresponding to the tiles containing the pieces of the minimap on the tilesheet that will be displayed on the subscreen int mapindex[2] = {1, 2}; //The current number of playable maps (in ZQ terms) in the quest and their map numbers. int mapdata[256] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } //The array used for keeping track of states that the map shows. Each element corresponds to a screen on the map. const int MAPFLAG_VISITED = 1; //Marks the screen as visited, so the map continues to work after saving. const int MAPFLAG_ITEM = 2; //Marks the screen as having an unobtained item const int MAPFLAG_ITEM_TAKEN = 4; //Marks the screen as having an obtained item const int MAPFLAG_BOSS = 8; //Marks the screen as having a boss on it const int MAPFLAG_MINECART = 16; //Marks the screen as having a minecart on it. void MapUpdate(){ //Updates the tiles used for the map. if(Link->Action == LA_SCROLLING){ //Update when Link is scrolling if(Game->GetCurMap() == mapindex[0] || Game->GetCurMap() == mapindex[1]){ //Link is on the first two maps according to mapindex[] CopyTile(TILE_BIGMAPTILE_START_BASE + (Game->GetCurMap()-1)*160 + (Game->GetCurScreen()+(Div(Game->GetCurScreen(), 16)*4)), TILE_BIGMAPTILE_START_DESTINATION + (Game->GetCurMap()-1)*160 + (Game->GetCurScreen()+(Div(Game->GetCurScreen(), 16)*4))); //Copy the map tiles over the "blank" map tiles (that are displayed on the Map screen) when the player goes to the screen mapdata[(Game->GetCurMap()-1)*128 + Game->GetCurScreen()] |= MAPFLAG_VISITED; //Flag the screen as visited, so I can keep the map between saves } } }
The issue I am facing here is in this line:
mapdata[(Game->GetCurMap()-1)*128 + Game->GetCurScreen()] |= MAPFLAG_VISITED; //Flag the screen as visited, so I can keep the map between saves
By all forms of logic, this line should be setting the MAPFLAG_VISITED flag to the correct element. However it is not, leaving that element at 0. I've ran traces to confirm that the flag is not being set at all and that it is not being set to the wrong element.
Can anyone explain what is going wrong here?
Edit: Issue resolved.
Edited by Orithan, 10 October 2016 - 05:09 AM.