moved game values for score and health from player to game structure
[rocksndiamonds.git] / src / game_sp / ASM.c
1 // ----------------------------------------------------------------------------
2 // ASM.c
3 // ----------------------------------------------------------------------------
4
5 #include "ASM.h"
6
7
8 void MovLowByte(int *p, int i)
9 {
10   *p = (*p & 0xff00) | (i & 0xff);
11 }
12
13 void MovHighByte(int *p, int i)
14 {
15   *p = (*p & 0xff) | ((i << 8) & 0xff00);
16 }
17
18 int LowByte(int i)
19 {
20   return (i & 0xff);
21 }
22
23 int HighByte(int i)
24 {
25   return ((i >> 8) & 0xff);
26 }
27
28 int SgnHighByte(int i)
29 {
30   return (signed char)HighByte(i);
31 }
32
33 int ByteToInt(byte b)
34 {
35   return (signed char)b;
36 }