updated comments and added more tags

This commit is contained in:
Alex Gentilucci 2020-06-26 15:07:51 -06:00
parent 6e9e74aa27
commit 595453d129
Signed by: nytpu
GPG Key ID: 144ADD49F173F5CE
2 changed files with 6 additions and 6 deletions

View File

@ -7,7 +7,7 @@
*/
#include <tonc.h>
#include "gbfs.h" // needs to be included here or else globals.h freaks
#include "gbfs.h"
#include "globals.h"
#include "controls.h"
@ -33,8 +33,8 @@ void player_update (struct spriteReg *sprite, int base_tile, int tile_toggle)
sprite->obj->attr1 &= ~ATTR1_HFLIP;
}
/* may remove or modify later if i decide that i want the player to be able
* to go off screen for some reason */
/* XXX: may remove or modify later if i decide that i want the player to be
* able to go off screen for some reason */
sprite->x = clamp(sprite->x+sprite->dx, SCHNOZ_L, SCREEN_WIDTH-SCHNOZ_R);
sprite->y = clamp(sprite->y+sprite->dy, -SCHNOZ_T, SCREEN_HEIGHT-SCHNOZ_B);
obj_set_pos(sprite->obj, sprite->x, sprite->y);
@ -53,8 +53,8 @@ void player_scroll (struct spriteReg *sprite, struct bgReg *background)
background->x = clamp(background->x + sprite->dx, 0, 512-SCREEN_WIDTH+1);
}
/* when physics are implemented, write in a way so the background isn't
* constantly scrolling when jumping or falling
/* TODO: when physics are implemented, write in a way so the background
* isn't constantly scrolling when jumping or falling
*/
if (background->y == 0 && sprite->y < SCREEN_CENTER_Y) {
sprite->y = clamp(sprite->y, -SCHNOZ_T, SCREEN_CENTER_Y);

View File

@ -61,6 +61,6 @@ int main (void)
REG_BG1HOFS = bg1.x;
REG_BG1VOFS = bg1.y;
}
return 0; // in case?
return 0; // XXX: in case? is it really needed?
}