DOH! Chars are unsigned on the IIgs! IIgs menus fixed!
This commit is contained in:
parent
14866e93ee
commit
fb9b6b41bf
1 changed files with 25 additions and 28 deletions
|
@ -138,27 +138,27 @@ static CoordT tileLookup[TILE_COUNT] = {
|
|||
};
|
||||
|
||||
|
||||
void avatarDraw(void);
|
||||
void crateMove(byte sx, byte sy, byte dx, byte dy);
|
||||
void fontPrint(jlImgT *font, jint16 cx, jint16 cy, const char *what, ...);
|
||||
void gamePlay(void);
|
||||
void gameSave(void);
|
||||
void imageShow(jlImgT *image);
|
||||
bool inputRead(byte *key);
|
||||
byte menuDraw(const char *titleShow, const char *menuItems[], byte *height, byte *offsetX, byte *offsetY);
|
||||
char menuHandle(const char *titleShow, const char *menuItems[], char selected);
|
||||
bool menuMain(void);
|
||||
//void paletteShow(void);
|
||||
void puzzleComplete(void);
|
||||
void puzzleDraw(void);
|
||||
void puzzleForceFullRedraw(void);
|
||||
void puzzleLoad(void);
|
||||
void puzzleRedraw(void);
|
||||
void puzzleReset(void);
|
||||
void puzzleSelect(void);
|
||||
void solvedCount(void);
|
||||
void tickerUpdate(void);
|
||||
void titleShow(void);
|
||||
void avatarDraw(void);
|
||||
void crateMove(byte sx, byte sy, byte dx, byte dy);
|
||||
void fontPrint(jlImgT *font, jint16 cx, jint16 cy, const char *what, ...);
|
||||
void gamePlay(void);
|
||||
void gameSave(void);
|
||||
void imageShow(jlImgT *image);
|
||||
bool inputRead(byte *key);
|
||||
byte menuDraw(const char *titleShow, const char *menuItems[], byte *height, byte *offsetX, byte *offsetY);
|
||||
jint16 menuHandle(const char *titleShow, const char *menuItems[], jint16 selected);
|
||||
bool menuMain(void);
|
||||
//void paletteShow(void);
|
||||
void puzzleComplete(void);
|
||||
void puzzleDraw(void);
|
||||
void puzzleForceFullRedraw(void);
|
||||
void puzzleLoad(void);
|
||||
void puzzleRedraw(void);
|
||||
void puzzleReset(void);
|
||||
void puzzleSelect(void);
|
||||
void solvedCount(void);
|
||||
void tickerUpdate(void);
|
||||
void titleShow(void);
|
||||
|
||||
|
||||
void avatarDraw(void) {
|
||||
|
@ -413,9 +413,6 @@ byte menuDraw(const char *title, const char *menuItems[], byte *height, byte *of
|
|||
jint16 y3;
|
||||
byte width = 0;
|
||||
|
||||
// 222 223 221
|
||||
// 222 220 221
|
||||
|
||||
// Calculate height, width, and offsets from menu count.
|
||||
while (menuItems[count]) {
|
||||
if (width < strlen(menuItems[count]) + 6) width = strlen(menuItems[count]) + 6;
|
||||
|
@ -464,7 +461,7 @@ byte menuDraw(const char *title, const char *menuItems[], byte *height, byte *of
|
|||
}
|
||||
|
||||
|
||||
char menuHandle(const char *title, const char *menuItems[], char selected) {
|
||||
jint16 menuHandle(const char *title, const char *menuItems[], jint16 selected) {
|
||||
byte count = 0;
|
||||
byte inMenuYOffset = 7;
|
||||
byte offsetX = 0;
|
||||
|
@ -473,8 +470,8 @@ char menuHandle(const char *title, const char *menuItems[], char selected) {
|
|||
byte height;
|
||||
byte ox;
|
||||
byte oy;
|
||||
char result = -1;
|
||||
bool inMenu = true;
|
||||
jint16 result = -1;
|
||||
jint16 xpos;
|
||||
jint16 ypos;
|
||||
jint16 last;
|
||||
|
@ -545,8 +542,8 @@ char menuHandle(const char *title, const char *menuItems[], char selected) {
|
|||
|
||||
|
||||
bool menuMain(void) {
|
||||
bool running = true;
|
||||
char choice = 0;
|
||||
bool running = true;
|
||||
jint16 choice = 0;
|
||||
|
||||
while ((choice >= 0) && running && !jlUtilMustExit()) {
|
||||
choice = menuHandle("Main Menu", menuOptions, choice);
|
||||
|
|
Loading…
Add table
Reference in a new issue