shithub: wipeout

Download patch

ref: 104ae6e44619ae840882446870266012ca5c238b
parent: 314b4618a99626443b5f599bc8a5cacfee650e19
author: Jacob Moody <moody@posixcafe.org>
date: Fri Aug 25 22:08:45 EDT 2023

enable warnings and fix "address of array/function ignored"

--- a/src/mkfile
+++ b/src/mkfile
@@ -1,6 +1,6 @@
 </$objtype/mkfile
 
-CFLAGS=-Fp -I/sys/include/npe -I/sys/include/npe/SDL2 -D__plan9__ -D__${objtype}__ -DRENDERER_SOFTWARE
+CFLAGS=-Fpw -I/sys/include/npe -I/sys/include/npe/SDL2 -D__plan9__ -D__${objtype}__ -DRENDERER_SOFTWARE
 BIN=/$objtype/bin/games
 TARG=wipeout
 
--- a/src/wipeout/main_menu.c
+++ b/src/wipeout/main_menu.c
@@ -504,7 +504,7 @@
 }
 
 #define objects_unpack(DEST, SRC) \
-	objects_unpack_imp((Object **)&DEST, sizeof(DEST)/sizeof(Object*), SRC)
+	objects_unpack_imp((Object **)DEST, sizeof(DEST)/sizeof(Object*), SRC)
 
 static void objects_unpack_imp(Object **dest_array, int len, Object *src) {
 	int i;
@@ -527,10 +527,10 @@
 	objects_unpack(models.race_classes, objects_load("wipeout/common/leeg.prm", image_get_compressed_textures("wipeout/common/leeg.cmp")));
 	objects_unpack(models.teams, objects_load("wipeout/common/teams.prm", texture_list_empty()));
 	objects_unpack(models.pilots, objects_load("wipeout/common/pilot.prm", image_get_compressed_textures("wipeout/common/pilot.cmp")));
-	objects_unpack(models.options, objects_load("wipeout/common/alopt.prm", image_get_compressed_textures("wipeout/common/alopt.cmp")));
+	objects_unpack(&models.options, objects_load("wipeout/common/alopt.prm", image_get_compressed_textures("wipeout/common/alopt.cmp")));
 	objects_unpack(models.rescue, objects_load("wipeout/common/rescu.prm", image_get_compressed_textures("wipeout/common/rescu.cmp")));
 	objects_unpack(models.controller, objects_load("wipeout/common/pad1.prm", image_get_compressed_textures("wipeout/common/pad1.cmp")));
-	objects_unpack(models.misc, objects_load("wipeout/common/msdos.prm", image_get_compressed_textures("wipeout/common/msdos.cmp")));
+	objects_unpack(&models.misc, objects_load("wipeout/common/msdos.prm", image_get_compressed_textures("wipeout/common/msdos.cmp")));
 
 	menu_reset(main_menu);
 	page_main_init(main_menu);