Skip to content

Commit

Permalink
Merge pull request #50 from jsmolina/feature/ia_change
Browse files Browse the repository at this point in the history
ia improve
  • Loading branch information
jsmolina authored Dec 23, 2019
2 parents 90cff00 + 68da721 commit 41705c0
Show file tree
Hide file tree
Showing 6 changed files with 247 additions and 109 deletions.
6 changes: 5 additions & 1 deletion globals.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
struct sp1_Rect full_screen = {0, 0, 32, 24};

uint8_t random_value;
uint8_t tmp_val;
uint8_t tmp_val2;
uint8_t exit_count;

// or using UDG from just code
uint8_t map[25][32] = {
Expand Down Expand Up @@ -122,7 +125,8 @@ uint8_t frame = 0;
uint8_t lives = 0;
uint8_t level = 0;
uint8_t repaint_lives = 1;
uint8_t speed = 0;
uint8_t reached_level = 0;
uint8_t slowticker = 0;
uint8_t showing_points = NONE;
uint8_t idx;
uint16_t matrixrow;
Expand Down
17 changes: 14 additions & 3 deletions globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,18 @@
#define DIR_LEFT 3
#define DIR_RIGHT 4
#define NONE 250
#define ELUDE 25
#define FRIGHTENED 25
#define JAILED 20
#define GETTING_JAILED 30
#define JAILED_EXITING 1
#define ACTIVE 0
#define CHASE 0
#define SCATTER 40

// ghost index
#define GCYAN 0
#define GRED 1
#define GMAGENTA 2
#define GYELLOW 3

#define AYCTRL 65533
#define AYDATA 49149
Expand Down Expand Up @@ -171,6 +178,9 @@ extern uint8_t map[25][32];
extern uint8_t map2[25][32];
extern uint8_t map3[25][32];
extern uint8_t random_value;
extern uint8_t tmp_val;
extern uint8_t tmp_val2;
extern uint8_t exit_count;

extern uint8_t pill_eaten;
extern struct spritep pacman;
Expand All @@ -192,7 +202,8 @@ extern uint8_t col;
extern uint8_t current;
extern uint16_t points;
extern uint8_t remaining_points;
extern uint8_t speed;
extern uint8_t reached_level;
extern uint8_t slowticker;
extern uint8_t frame;
extern uint8_t showing_points;

Expand Down
2 changes: 1 addition & 1 deletion int.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ unsigned char pick;
void
wait(void)
{
while (abs(tick - timer) < speed) {
while (abs(tick - timer) < SPEED) {
intrinsic_halt();
in = (joy)(&joy_keys);
}
Expand Down
2 changes: 2 additions & 0 deletions int.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEAL
#define WFRAMES 2
#endif

#define SPEED 6

#define clock(x) (tick)

extern unsigned char tick;
Expand Down
Loading

0 comments on commit 41705c0

Please sign in to comment.