Skip to content

Commit

Permalink
Revert "Just let oam_spr throw if we don't find a label"
Browse files Browse the repository at this point in the history
This reverts commit 69156fa.
  • Loading branch information
jonathanpeppers committed Sep 18, 2024
1 parent 7ca0919 commit 4eddf08
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/dotnes.tasks/Utilities/IL2NESWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,14 @@ ushort GetAddress(string name)
case nameof(scroll):
return 0x82FB;
case nameof(oam_spr):
return Labels[nameof(oam_spr)];
if (Labels.TryGetValue(nameof(oam_spr), out var address))
{
return address;
}
else
{
return 0x0000;
}
default:
throw new NotImplementedException($"{nameof(GetAddress)} for {name} is not implemented!");
}
Expand Down

0 comments on commit 4eddf08

Please sign in to comment.