From 777d764702c9c09ad219d88c2b29d5aa6e86becc Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Mon, 23 Jan 2017 11:20:03 +0000 Subject: [PATCH] Don't define getangle as __fastcall under Lunatic in order to avoid "Warning: resolving _getangle by linking to @getangle@8". git-svn-id: https://svn.eduke32.com/eduke32@6023 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/include/build.h | 4 +++- polymer/eduke32/build/src/engine.c | 2 +- polymer/eduke32/source/lunatic/defs_common.lua | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/polymer/eduke32/build/include/build.h b/polymer/eduke32/build/include/build.h index 068694ef8..60de53191 100644 --- a/polymer/eduke32/build/include/build.h +++ b/polymer/eduke32/build/include/build.h @@ -65,11 +65,13 @@ enum rendmode_t { # define LUNATIC_CB ATTRIBUTE((used)) // Used for variables and functions referenced from Lua: # define LUNATIC_EXTERN ATTRIBUTE((used)) +# define LUNATIC_FASTCALL #else # ifdef NEW_MAP_FORMAT # error "New map format can only be used with Lunatic" # endif # define LUNATIC_EXTERN static +# define LUNATIC_FASTCALL __fastcall #endif #define MAXWALLSB ((MAXWALLS>>2)+(MAXWALLS>>3)) @@ -1103,7 +1105,7 @@ int32_t krand(void); #endif int32_t ksqrt(uint32_t num); -int32_t __fastcall getangle(int32_t xvect, int32_t yvect); +int32_t LUNATIC_FASTCALL getangle(int32_t xvect, int32_t yvect); FORCE_INLINE uint32_t uhypsq(int32_t dx, int32_t dy) { diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index 57666eec5..b6e41151f 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -10097,7 +10097,7 @@ int32_t inside(int32_t x, int32_t y, int16_t sectnum) return -1; } -int32_t __fastcall getangle(int32_t xvect, int32_t yvect) +int32_t LUNATIC_FASTCALL getangle(int32_t xvect, int32_t yvect) { int32_t rv; diff --git a/polymer/eduke32/source/lunatic/defs_common.lua b/polymer/eduke32/source/lunatic/defs_common.lua index 34017fa62..f0c0fb612 100644 --- a/polymer/eduke32/source/lunatic/defs_common.lua +++ b/polymer/eduke32/source/lunatic/defs_common.lua @@ -500,7 +500,7 @@ double gethiticks(void); int32_t krand(void); int32_t ksqrt(uint32_t num); -int32_t __fastcall getangle(int32_t xvect, int32_t yvect); +int32_t getangle(int32_t xvect, int32_t yvect); int32_t Mulscale(int32_t a, int32_t b, int32_t sh); ]]