Revive Amiga port for NetHack 3.7

Update the Amiga Intuition window port (AMII/AMIV) for the 3.7
window_procs API. Key changes:

- Update all window function signatures for 3.7
- Add assembly trampolines for AmigaOS register-based callbacks
- Convert all K&R function definitions to C99
- Add cross-compilation build system (cross-pre1/pre2/post.370)
  using bebbo's m68k-amigaos-gcc with -noixemul -std=gnu17 -m68000
- Clipping fixes: viewport centering, simplified ScrollRaster,
  duplicate Ctrl-R suppression, glyph buffer invalidation
- Add menucolor support in menu rendering
- Move native txt2iff.c and xpm2iff.c to outdated/
- Add nethack.cnf and README.amiga
This commit is contained in:
Ingo Paschke
2026-03-23 20:48:06 +01:00
parent 7b89255ea8
commit 2d597cb9fa
27 changed files with 1101 additions and 908 deletions
+12 -15
View File
@@ -8,10 +8,9 @@ void EditClipping(void);
void DrawCol(struct Window *w, int idx, UWORD *colors);
void DispCol(struct Window *w, int idx, UWORD *colors);
void amii_change_color(int, long, int);
char *amii_get_color_string();
char *amii_get_color_string(void);
void amii_getlin(const char *prompt, char *bufp);
void getlind(const char *prompt, char *bufp, const char *dflt);
char *amii_get_color_string(void);
int filecopy(char *from, char *to);
char *basename(char *str);
char *dirname(char *str);
@@ -33,15 +32,15 @@ void amii_scrollmsg(register struct Window *w,
register struct amii_WinDesc *cw);
/* winkey.c */
int amii_nh_poskey(int *x, int *y, int *mod);
int amii_nh_poskey(coordxy *x, coordxy *y, int *mod);
int amii_nhgetch(void);
void amii_get_nh_event(void);
void amii_getret(void);
/* winmenu.c */
void amii_start_menu(winid window, unsigned long);
void amii_add_menu(winid, int, const anything *, CHAR_P, CHAR_P, int,
const char *, unsigned int);
void amii_add_menu(winid, const glyph_info *, const anything *, CHAR_P, CHAR_P,
int, int, const char *, unsigned int);
void amii_end_menu(winid, const char *);
int amii_select_menu(winid, int, menu_item **);
int DoMenuScroll(int win, int blocking, int how, menu_item **);
@@ -55,7 +54,6 @@ struct Window *OpenShWindow(struct NewWindow *nw);
void CloseShWindow(struct Window *win);
int ConvertKey(struct IntuiMessage *message);
int kbhit(void);
int kbhit(void);
int amikbhit(void);
int WindowGetchar(void);
WETYPE WindowGetevent(void);
@@ -101,19 +99,19 @@ void amii_resume_nhwindows(void);
void amii_bell(void);
void removetopl(int cnt);
void port_help(void);
void amii_print_glyph(winid win, coordxy x, coordxy y, int glyph, int bkglyph);
void amii_print_glyph(winid win, coordxy x, coordxy y, const glyph_info *glyphinfo, const glyph_info *bkglyphinfo);
void amii_raw_print(const char *s);
void amii_raw_print_bold(const char *s);
void amii_update_inventory(void);
void amii_update_inventory(int);
void amii_mark_synch(void);
void amii_wait_synch(void);
void amii_setclipped(void);
void amii_cliparound(int x, int y);
void amii_set_text_font(char *font, int size);
BitMapHeader ReadImageFiles(char **, struct BitMap **, char **);
BitMapHeader ReadImageFile(const char *, struct BitMap **);
void FreeImageFile(struct BitMap **);
BitMapHeader ReadTileImageFiles(void);
void FreeImageFiles(char **, struct BitMap **);
void FreeTileImageFiles();
void FreeTileImageFiles(void);
/* winami.c */
#ifdef SHAREDLIB
@@ -124,12 +122,10 @@ void amii_askname(void);
void amii_player_selection(void);
void RandomWindow(char *name);
int amii_get_ext_cmd(void);
char amii_yn_function(const char *prompt, const char *resp, char def);
char amii_yn_function(const char *query, const char *resp, char def);
void amii_display_file(const char *fn, boolean complain);
void SetBorder(struct Gadget *gd);
void *malloc(register unsigned size);
void free(void *q);
/* malloc/free provided by stdlib.h */
#ifdef SHAREDLIB
/* amilib.c */
@@ -141,6 +137,8 @@ void setup_librefs(WinamiBASE *base);
void Abort(long rc);
#endif
win_request_info *amii_ctrl_nhwindow(winid, int, win_request_info *);
/* amirip.c */
void amii_outrip(winid tmpwin, int how, time_t when);
@@ -151,4 +149,3 @@ int GlyphToIcon(int glyph);
void dispmap_sanity(void);
int dispmap_sanity1(int);
#endif
void FreeTileImageFiles(void);