Skip to content

Commit

Permalink
[Position independence] False positives in master.lib GRCG function c…
Browse files Browse the repository at this point in the history
…alls

Yup, function parameters that can clearly be identified as coordinates
are by far the fastest way to raise the calculated position
independence percentage. Kinda makes it sound like useless work, which
I'm only doing because it's dictated by some counting algorithm on a
website, but decompilation will want to un-hex all of these values
anyway. We're merely doing that right now, across all games.

Part of P0058, funded by -Tom-.
  • Loading branch information
nmlgc committed Nov 13, 2019
1 parent 8a25070 commit 6c4852f
Show file tree
Hide file tree
Showing 15 changed files with 316 additions and 592 deletions.
2 changes: 2 additions & 0 deletions libs/sprite16/sprite16.h
Expand Up @@ -33,3 +33,5 @@ typedef enum {
OVERLAP_CLEAR = 1,
OVERLAP_OR = 0
} sprite16_overlap_t;

#define SPRITE16_RES_Y 200
2 changes: 2 additions & 0 deletions libs/sprite16/sprite16.inc
Expand Up @@ -12,3 +12,5 @@ SPRITE16_SET_MASK = 8

OVERLAP_CLEAR = 1
OVERLAP_OR = 0

SPRITE16_RES_Y = 200
17 changes: 17 additions & 0 deletions th02/playfld.h
@@ -0,0 +1,17 @@
#define PLAYFIELD_X (32)
#define PLAYFIELD_Y (16)
#define PLAYFIELD_W (384)
#define PLAYFIELD_H (368)

#define PLAYFIELD_LEFT (PLAYFIELD_X)
#define PLAYFIELD_TOP (PLAYFIELD_Y)
#define PLAYFIELD_RIGHT (PLAYFIELD_X + PLAYFIELD_W)
#define PLAYFIELD_BOTTOM (PLAYFIELD_Y + PLAYFIELD_H)

#define PLAYFIELD_VRAM_X (PLAYFIELD_X / 8)
#define PLAYFIELD_VRAM_W (PLAYFIELD_W / 8)
#define PLAYFIELD_VRAM_RIGHT (PLAYFIELD_RIGHT / 8)

#define PLAYFIELD_TRAM_X (PLAYFIELD_X / 8)
#define PLAYFIELD_TRAM_W (PLAYFIELD_W / 8)
#define PLAYFIELD_TRAM_RIGHT (PLAYFIELD_RIGHT / 8)
2 changes: 2 additions & 0 deletions th02/playfld.inc
Expand Up @@ -10,6 +10,8 @@ PLAYFIELD_BOTTOM = PLAYFIELD_Y + PLAYFIELD_H

PLAYFIELD_VRAM_X = PLAYFIELD_X / 8
PLAYFIELD_VRAM_W = PLAYFIELD_W / 8
PLAYFIELD_VRAM_RIGHT = PLAYFIELD_RIGHT / 8

PLAYFIELD_TRAM_X = PLAYFIELD_X / 8
PLAYFIELD_TRAM_W = PLAYFIELD_W / 8
PLAYFIELD_TRAM_RIGHT = PLAYFIELD_RIGHT / 8

0 comments on commit 6c4852f

Please sign in to comment.