ref: 55cc349dd60d7464b313a93d060970f59c4ac816
parent: 453ce04e8b6fae24da2fbb87302edb5dfcbd2078
author: Gabriel Ravier <gabravier@gmail.com>
date: Fri Sep 20 16:25:51 EDT 2019
Moar commenting stuff Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
--- a/src/ArmsItem.cpp
+++ b/src/ArmsItem.cpp
@@ -367,9 +367,9 @@
for (i = 0; i < ARMS_MAX; ++i)
{
if (gArmsData[i].code == 0)
- break; // Not a weapon
+ break; // Invalid weapon
- // Get rect for current weapon
+ // Get icon rect for next weapon
rcArms.left = TILES_TO_PIXELS(gArmsData[i].code % 0x10);
rcArms.right = rcArms.left + TILES_TO_PIXELS(1);
rcArms.top = TILES_TO_PIXELS(PIXELS_TO_TILES(gArmsData[i].code));
@@ -389,6 +389,7 @@
}
else
{
+ // Weapon doesn't use ammunition
PutBitmap3(&rcView, 40 * i + (WINDOW_WIDTH - 192) / 2, (WINDOW_HEIGHT - 144) / 2, &rcNone, SURFACE_ID_TEXT_BOX);
PutBitmap3(&rcView, 40 * i + (WINDOW_WIDTH - 192) / 2, (WINDOW_HEIGHT - 128) / 2, &rcNone, SURFACE_ID_TEXT_BOX);
}
@@ -405,8 +406,9 @@
for (i = 0; i < ITEM_MAX; ++i)
{
if (gItemData[i].code == 0)
- break;
+ break; // Invalid item
+ // Get rect for next item
rcItem.left = 32 * (gItemData[i].code % 8);
rcItem.right = rcItem.left + 32;
rcItem.top = 16 * (gItemData[i].code / 8);