summaryrefslogtreecommitdiff
path: root/games/xracer/patches
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2012-10-26 20:22:12 +0000
committerjoerg <joerg@pkgsrc.org>2012-10-26 20:22:12 +0000
commitc1be91195f5b512e751b3f7ac28f7efa9e26a0e3 (patch)
tree846b7f23d5e70e5fabb52af1692b17402e908339 /games/xracer/patches
parent3fdd999007586cd5bb946168fd74bd67d32dac17 (diff)
downloadpkgsrc-c1be91195f5b512e751b3f7ac28f7efa9e26a0e3.tar.gz
extern inline -> static inline
Diffstat (limited to 'games/xracer/patches')
-rw-r--r--games/xracer/patches/patch-include_xracer-craft.h15
-rw-r--r--games/xracer/patches/patch-include_xracer-player.h125
2 files changed, 140 insertions, 0 deletions
diff --git a/games/xracer/patches/patch-include_xracer-craft.h b/games/xracer/patches/patch-include_xracer-craft.h
new file mode 100644
index 00000000000..5435df5e45c
--- /dev/null
+++ b/games/xracer/patches/patch-include_xracer-craft.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-include_xracer-craft.h,v 1.1 2012/10/26 20:22:12 joerg Exp $
+
+--- include/xracer-craft.h.orig 2012-10-26 13:35:24.000000000 +0000
++++ include/xracer-craft.h
+@@ -68,9 +68,7 @@ extern const struct xrCraft *xrCraftGetD
+ extern const struct xrCraft *xrCraftGetNext (const struct xrCraft *);
+
+ /* Call display function for craft. */
+-extern void xrCraftDisplay (const struct xrCraft *craft);
+-
+-extern inline void
++static inline void
+ xrCraftDisplay (const struct xrCraft *craft)
+ {
+ craft->display ();
diff --git a/games/xracer/patches/patch-include_xracer-player.h b/games/xracer/patches/patch-include_xracer-player.h
new file mode 100644
index 00000000000..6f5bb97a1de
--- /dev/null
+++ b/games/xracer/patches/patch-include_xracer-player.h
@@ -0,0 +1,125 @@
+$NetBSD: patch-include_xracer-player.h,v 1.1 2012/10/26 20:22:12 joerg Exp $
+
+--- include/xracer-player.h.orig 2012-10-26 13:35:56.000000000 +0000
++++ include/xracer-player.h
+@@ -130,79 +130,59 @@ extern void xrPlayerEndGame (void);
+ extern void xrPlayerUpdate (const struct xrGameControls *controls);
+
+ /* Inline structure accessors. */
+-extern int xrPlayerHasExternalShield (const struct xrPlayer *player);
+-
+-extern inline int
++static inline int
+ xrPlayerHasExternalShield (const struct xrPlayer *player)
+ {
+ return player->has_external_shield;
+ }
+
+-extern int xrPlayerHasAutoPilot (const struct xrPlayer *player);
+-
+-extern inline int
++static inline int
+ xrPlayerHasAutoPilot (const struct xrPlayer *player)
+ {
+ return player->has_autopilot;
+ }
+
+ /* This always returns the position of the midpoint of the back line. */
+-extern const GLfloat *xrPlayerGetPosition (const struct xrPlayer *player);
+-
+-extern inline const GLfloat *
++static inline const GLfloat *
+ xrPlayerGetPosition (const struct xrPlayer *player)
+ {
+ return player->backline_midpoint;
+ }
+
+-extern int xrPlayerGetSegment (const struct xrPlayer *player);
+-
+-extern inline int
++static inline int
+ xrPlayerGetSegment (const struct xrPlayer *player)
+ {
+ return player->seg[0];
+ }
+
+ /* Return the eye position, accounting for OOBE, if necessary. */
+-extern const GLfloat *xrPlayerGetCameraEye (const struct xrPlayer *player,
+- int oobe);
+-
+-extern inline const GLfloat *
++static inline const GLfloat *
+ xrPlayerGetCameraEye (const struct xrPlayer *player, int oobe)
+ {
+ return oobe ? player->eye_oobe : player->backline_midpoint;
+ }
+
+ /* Return the camera centre point, accounting for OOBE, if necessary. */
+-extern const GLfloat *xrPlayerGetCameraCentre (const struct xrPlayer *player,
+- int oobe);
+-
+-extern inline const GLfloat *
++static inline const GLfloat *
+ xrPlayerGetCameraCentre (const struct xrPlayer *player, int oobe)
+ {
+ return oobe ? player->centre_oobe : player->posn[0];
+ }
+
+ /* Return the camera up vector (this is unaffected by OOBE). */
+-extern const GLfloat *xrPlayerGetCameraUp (const struct xrPlayer *player);
+-
+-extern inline const GLfloat *
++static inline const GLfloat *
+ xrPlayerGetCameraUp (const struct xrPlayer *player)
+ {
+ return player->up;
+ }
+
+-extern int xrPlayerGetSpeed (const struct xrPlayer *player);
+-
+-extern inline int
++static inline int
+ xrPlayerGetSpeed (const struct xrPlayer *player)
+ {
+ return xrMagnitude (player->momentum[0]) * 500.;
+ }
+
+-extern int xrPlayerGetPowerup (const struct xrPlayer *player);
+-
+-extern inline int
++static inline int
+ xrPlayerGetPowerup (const struct xrPlayer *player)
+ {
+ return player->powerup;
+@@ -211,18 +191,14 @@ xrPlayerGetPowerup (const struct xrPlaye
+ /* Return the player's current lap, counting from 1. After the player has
+ * completed the game, this can return NR_LAPS + 1, so beware.
+ */
+-extern int xrPlayerGetCurrentLap (const struct xrPlayer *player);
+-
+-extern inline int
++static inline int
+ xrPlayerGetCurrentLap (const struct xrPlayer *player)
+ {
+ return player->displayed_current_lap + 1;
+ }
+
+ /* Return the player's current lap time. */
+-extern double xrPlayerGetCurrentLapTime (const struct xrPlayer *player);
+-
+-extern inline double
++static inline double
+ xrPlayerGetCurrentLapTime (const struct xrPlayer *player)
+ {
+ return xrCurrentTime - player->start_of_lap_time;
+@@ -232,9 +208,7 @@ xrPlayerGetCurrentLapTime (const struct
+ * Note: the LAP argument starts counting from 1, and must be <= NR_LAPS.
+ * This function does not return the current lap time.
+ */
+-extern double xrPlayerGetLapTime (const struct xrPlayer *player, int lap);
+-
+-extern inline double
++static inline double
+ xrPlayerGetLapTime (const struct xrPlayer *player, int lap)
+ {
+ lap--;