1 |
commit: d77fb61b56f29e1fd7dfd0a01feb3fb4cdb305f2 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun May 16 18:32:08 2021 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun May 16 18:32:21 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d77fb61b |
7 |
|
8 |
games-fps/avp: tweak for gcc-11 |
9 |
|
10 |
Reported-by: Toralf Förster |
11 |
Closes: https://bugs.gentoo.org/790230 |
12 |
Package-Manager: Portage-3.0.18, Repoman-3.0.3 |
13 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
14 |
|
15 |
games-fps/avp/avp-20150214-r1.ebuild | 7 +- |
16 |
.../avp/files/avp-20150214-gcc-11-minmax.patch | 281 +++++++++++++++++++++ |
17 |
2 files changed, 286 insertions(+), 2 deletions(-) |
18 |
|
19 |
diff --git a/games-fps/avp/avp-20150214-r1.ebuild b/games-fps/avp/avp-20150214-r1.ebuild |
20 |
index fb38321a71f..42bb6956dc1 100644 |
21 |
--- a/games-fps/avp/avp-20150214-r1.ebuild |
22 |
+++ b/games-fps/avp/avp-20150214-r1.ebuild |
23 |
@@ -1,4 +1,4 @@ |
24 |
-# Copyright 1999-2020 Gentoo Authors |
25 |
+# Copyright 1999-2021 Gentoo Authors |
26 |
# Distributed under the terms of the GNU General Public License v2 |
27 |
|
28 |
EAPI=7 |
29 |
@@ -20,7 +20,10 @@ RDEPEND=" |
30 |
DEPEND="${RDEPEND}" |
31 |
BDEPEND="virtual/pkgconfig" |
32 |
|
33 |
-PATCHES=( "${FILESDIR}"/avp-20150214-fno-common.patch ) |
34 |
+PATCHES=( |
35 |
+ "${FILESDIR}"/${P}-fno-common.patch |
36 |
+ "${FILESDIR}"/${P}-gcc-11-minmax.patch |
37 |
+) |
38 |
|
39 |
src_configure() { |
40 |
local mycmakeargs=( |
41 |
|
42 |
diff --git a/games-fps/avp/files/avp-20150214-gcc-11-minmax.patch b/games-fps/avp/files/avp-20150214-gcc-11-minmax.patch |
43 |
new file mode 100644 |
44 |
index 00000000000..20ec1c29690 |
45 |
--- /dev/null |
46 |
+++ b/games-fps/avp/files/avp-20150214-gcc-11-minmax.patch |
47 |
@@ -0,0 +1,281 @@ |
48 |
+https://bugs.gentoo.org/790230 |
49 |
+ |
50 |
+Avod std::min / #define min() macro clash. |
51 |
+--- a/src/avp/bh_cable.c |
52 |
++++ b/src/avp/bh_cable.c |
53 |
+@@ -100 +100 @@ void PowerCableBehaveFun(STRATEGYBLOCK* sbptr) |
54 |
+- health_gained=min(pc_bhv->current_charge,max_health-current_health); |
55 |
++ health_gained=avp_min(pc_bhv->current_charge,max_health-current_health); |
56 |
+--- a/src/avp/bh_deathvol.c |
57 |
++++ b/src/avp/bh_deathvol.c |
58 |
+@@ -96 +96 @@ void DeathVolumeBehaveFun(STRATEGYBLOCK* vol_sbptr) |
59 |
+- if(max(miny,dv_bhv->volume_min.vy) > min(maxy,dv_bhv->volume_max.vy)) continue; |
60 |
++ if(avp_max(miny,dv_bhv->volume_min.vy) > avp_min(maxy,dv_bhv->volume_max.vy)) continue; |
61 |
+--- a/src/avp/bh_gener.c |
62 |
++++ b/src/avp/bh_gener.c |
63 |
+@@ -159,2 +159,2 @@ void GeneratorBehaviour(STRATEGYBLOCK *sbPtr) |
64 |
+- genBlock->GenerationRate=min(genBlock->GenerationRate,GENSPERMINUTE_MAX*100); |
65 |
+- genBlock->GenerationRate=max(genBlock->GenerationRate,GENSPERMINUTE_MIN*100); |
66 |
++ genBlock->GenerationRate=avp_min(genBlock->GenerationRate,GENSPERMINUTE_MAX*100); |
67 |
++ genBlock->GenerationRate=avp_max(genBlock->GenerationRate,GENSPERMINUTE_MIN*100); |
68 |
+@@ -1174 +1174 @@ static int GeneratorBalance_LocalLimit(int normal_limit) |
69 |
+- int shift = min(GeneratorBalance.MaxAIShift,4); |
70 |
++ int shift = avp_min(GeneratorBalance.MaxAIShift,4); |
71 |
+@@ -1178 +1178 @@ static int GeneratorBalance_LocalLimit(int normal_limit) |
72 |
+- return(normal_limit + min(alien_shortfall,shift)); |
73 |
++ return(normal_limit + avp_min(alien_shortfall,shift)); |
74 |
+--- a/src/avp/bh_queen.c |
75 |
++++ b/src/avp/bh_queen.c |
76 |
+@@ -3464 +3464 @@ void QueenBehaviour(STRATEGYBLOCK *sbPtr) |
77 |
+- Player->ObStrategyBlock->DynPtr->LinImpulse.vx=min(Player->ObStrategyBlock->DynPtr->LinImpulse.vx,-3000); |
78 |
++ Player->ObStrategyBlock->DynPtr->LinImpulse.vx=avp_min(Player->ObStrategyBlock->DynPtr->LinImpulse.vx,-3000); |
79 |
+@@ -4639 +4639 @@ void HandleHangarAirlock() |
80 |
+- AirlockTimeOpen=max(AirlockTimeOpen,30*ONE_FIXED); |
81 |
++ AirlockTimeOpen=avp_max(AirlockTimeOpen,30*ONE_FIXED); |
82 |
+@@ -4692 +4692 @@ void HandleHangarAirlock() |
83 |
+- cur_impulse->vx=min(cur_impulse->vx,impulse.vx); |
84 |
++ cur_impulse->vx=avp_min(cur_impulse->vx,impulse.vx); |
85 |
+@@ -4700 +4700 @@ void HandleHangarAirlock() |
86 |
+- cur_impulse->vx=max(cur_impulse->vx,impulse.vx); |
87 |
++ cur_impulse->vx=avp_max(cur_impulse->vx,impulse.vx); |
88 |
+@@ -4709 +4709 @@ void HandleHangarAirlock() |
89 |
+- cur_impulse->vy=min(cur_impulse->vy,impulse.vy); |
90 |
++ cur_impulse->vy=avp_min(cur_impulse->vy,impulse.vy); |
91 |
+@@ -4717 +4717 @@ void HandleHangarAirlock() |
92 |
+- cur_impulse->vy=max(cur_impulse->vy,impulse.vy); |
93 |
++ cur_impulse->vy=avp_max(cur_impulse->vy,impulse.vy); |
94 |
+@@ -4727 +4727 @@ void HandleHangarAirlock() |
95 |
+- cur_impulse->vz=min(cur_impulse->vz,impulse.vz); |
96 |
++ cur_impulse->vz=avp_min(cur_impulse->vz,impulse.vz); |
97 |
+@@ -4735 +4735 @@ void HandleHangarAirlock() |
98 |
+- cur_impulse->vz=max(cur_impulse->vz,impulse.vz); |
99 |
++ cur_impulse->vz=avp_max(cur_impulse->vz,impulse.vz); |
100 |
+--- a/src/avp/hud.c |
101 |
++++ b/src/avp/hud.c |
102 |
+@@ -946 +946 @@ static void DisplayHealthAndArmour(void) |
103 |
+- health = min(health,99); |
104 |
++ health = avp_min(health,99); |
105 |
+@@ -951 +951 @@ static void DisplayHealthAndArmour(void) |
106 |
+- armour = min(armour,99); |
107 |
++ armour = avp_min(armour,99); |
108 |
+--- a/src/avp/win95/avpchunk.cpp |
109 |
++++ b/src/avp/win95/avpchunk.cpp |
110 |
+@@ -283 +283 @@ AVP_Generator_Extended_Settings_Chunk::AVP_Generator_Extended_Settings_Chunk(Chu |
111 |
+- size_t size=max(*(int*) data,(int)sizeof(AVP_Generator_Weighting)); |
112 |
++ size_t size=avp_max(*(int*) data,(int)sizeof(AVP_Generator_Weighting)); |
113 |
+@@ -554 +554 @@ AVP_Environment_Settings_Chunk::AVP_Environment_Settings_Chunk(Chunk_With_Childr |
114 |
+- size_t size=max(data_size,sizeof(AVP_Environment_Settings)); |
115 |
++ size_t size=avp_max(data_size,sizeof(AVP_Environment_Settings)); |
116 |
+@@ -645 +645 @@ AVP_Decal_Chunk::AVP_Decal_Chunk(Chunk_With_Children* parent,const char* data,si |
117 |
+- decal_size=max(loaded_decal_size,(int)sizeof(AVP_Decal)); |
118 |
++ decal_size=avp_max(loaded_decal_size,(int)sizeof(AVP_Decal)); |
119 |
+--- a/src/avp/win95/objsetup.cpp |
120 |
++++ b/src/avp/win95/objsetup.cpp |
121 |
+@@ -959 +959 @@ void add_placed_hierarchy(Placed_Hierarchy_Chunk* phc,const char* fname,const ch |
122 |
+- phtt->num_sounds=max(phtt->num_sounds,isc->index+1); |
123 |
++ phtt->num_sounds=avp_max(phtt->num_sounds,isc->index+1); |
124 |
+@@ -993 +993 @@ void add_placed_hierarchy(Placed_Hierarchy_Chunk* phc,const char* fname,const ch |
125 |
+- phtt->num_sequences=max(phtt->num_sequences,phsc->index+1); |
126 |
++ phtt->num_sequences=avp_max(phtt->num_sequences,phsc->index+1); |
127 |
+@@ -1780,5 +1780,5 @@ static void add_placed_light(Object_Chunk* ob,int list_pos,AVP_Strategy_Chunk* a |
128 |
+- pltd->fade_up_time=(max(lchunk->light.fade_up_time,1)*ONE_FIXED)/1000; |
129 |
+- pltd->fade_down_time=(max(lchunk->light.fade_down_time,1)*ONE_FIXED)/1000; |
130 |
+- pltd->up_time=(max(lchunk->light.up_time,1)*ONE_FIXED)/1000; |
131 |
+- pltd->down_time=(max(lchunk->light.down_time,1)*ONE_FIXED)/1000; |
132 |
+- pltd->timer=(max(lchunk->light.start_time,1)*ONE_FIXED)/1000; |
133 |
++ pltd->fade_up_time=(avp_max(lchunk->light.fade_up_time,1)*ONE_FIXED)/1000; |
134 |
++ pltd->fade_down_time=(avp_max(lchunk->light.fade_down_time,1)*ONE_FIXED)/1000; |
135 |
++ pltd->up_time=(avp_max(lchunk->light.up_time,1)*ONE_FIXED)/1000; |
136 |
++ pltd->down_time=(avp_max(lchunk->light.down_time,1)*ONE_FIXED)/1000; |
137 |
++ pltd->timer=(avp_max(lchunk->light.start_time,1)*ONE_FIXED)/1000; |
138 |
+@@ -3811 +3811 @@ void setup_particle_generators(Environment_Data_Chunk * envd) |
139 |
+- part_temp->frequency=ONE_FIXED/max(data_chunk->quantity,1); |
140 |
++ part_temp->frequency=ONE_FIXED/avp_max(data_chunk->quantity,1); |
141 |
+--- a/src/avp/win95/pldnet.c |
142 |
++++ b/src/avp/win95/pldnet.c |
143 |
+@@ -1612 +1612 @@ void NetSendMessages(void) |
144 |
+- netGameData.sendTimer=max(0,netGameData.sendTimer); |
145 |
++ netGameData.sendTimer=avp_max(0,netGameData.sendTimer); |
146 |
+@@ -2018,3 +2018,3 @@ void AddNetMsg_GameDescription(void) |
147 |
+- messagePtr->numDeaths[0]=(unsigned char) min(netGameData.numDeaths[0],255); |
148 |
+- messagePtr->numDeaths[1]=(unsigned char) min(netGameData.numDeaths[1],255); |
149 |
+- messagePtr->numDeaths[2]=(unsigned char) min(netGameData.numDeaths[2],255); |
150 |
++ messagePtr->numDeaths[0]=(unsigned char) avp_min(netGameData.numDeaths[0],255); |
151 |
++ messagePtr->numDeaths[1]=(unsigned char) avp_min(netGameData.numDeaths[1],255); |
152 |
++ messagePtr->numDeaths[2]=(unsigned char) avp_min(netGameData.numDeaths[2],255); |
153 |
+@@ -9825,2 +9825,2 @@ static int GetDynamicScoreMultiplier(int playerKilledIndex,int killerIndex) |
154 |
+- scoreFor=max(500,scoreFor+500); |
155 |
+- scoreAgainst=max(500,scoreAgainst+500); |
156 |
++ scoreFor=avp_max(500,scoreFor+500); |
157 |
++ scoreAgainst=avp_max(500,scoreAgainst+500); |
158 |
+@@ -10536 +10536 @@ int DetermineAvailableCharacterTypes(BOOL ConsiderUsedCharacters) |
159 |
+- CharacterTypesAvailable[i]=max(0,CharacterTypesAvailable[i]); |
160 |
++ CharacterTypesAvailable[i]=avp_max(0,CharacterTypesAvailable[i]); |
161 |
+@@ -10540 +10540 @@ int DetermineAvailableCharacterTypes(BOOL ConsiderUsedCharacters) |
162 |
+- CharacterSubTypesAvailable[i]=max(0,CharacterSubTypesAvailable[i]); |
163 |
++ CharacterSubTypesAvailable[i]=avp_max(0,CharacterSubTypesAvailable[i]); |
164 |
+@@ -10550 +10550 @@ int DetermineAvailableCharacterTypes(BOOL ConsiderUsedCharacters) |
165 |
+- CharacterSubTypesAvailable[i]=min(CharacterSubTypesAvailable[i],CharacterTypesAvailable[NGCT_Marine]); |
166 |
++ CharacterSubTypesAvailable[i]=avp_min(CharacterSubTypesAvailable[i],CharacterTypesAvailable[NGCT_Marine]); |
167 |
+@@ -10553 +10553 @@ int DetermineAvailableCharacterTypes(BOOL ConsiderUsedCharacters) |
168 |
+- CharacterTypesAvailable[NGCT_Marine]=min(CharacterTypesAvailable[NGCT_Marine],maxMarines); |
169 |
++ CharacterTypesAvailable[NGCT_Marine]=avp_min(CharacterTypesAvailable[NGCT_Marine],maxMarines); |
170 |
+--- a/src/avp/win95/projload.cpp |
171 |
++++ b/src/avp/win95/projload.cpp |
172 |
+@@ -170 +170 @@ void setup_paths(RIFFHANDLE h) |
173 |
+- PathArraySize=max(PathArraySize,apc->PathID+1); |
174 |
++ PathArraySize=avp_max(PathArraySize,apc->PathID+1); |
175 |
+@@ -190 +190 @@ void setup_paths(RIFFHANDLE h) |
176 |
+- length=max(length,(length-1)*2); |
177 |
++ length=avp_max(length,(length-1)*2); |
178 |
+@@ -466 +466 @@ Global_Hierarchy_Store::Global_Hierarchy_Store (RIFFHANDLE h) |
179 |
+- max_index=max(max_index,isc->index); |
180 |
++ max_index=avp_max(max_index,isc->index); |
181 |
+@@ -719 +719 @@ void Global_Hierarchy_Store::setup_alternate_shape_sets(List <Object_ShapeNum_Pa |
182 |
+- max_index=max(max_index,coll->Set_Collection_Num); |
183 |
++ max_index=avp_max(max_index,coll->Set_Collection_Num); |
184 |
+@@ -991 +991 @@ SECTION * Global_Hierarchy_Store::build_hierarchy (Object_Hierarchy_Chunk * ohc, |
185 |
+- kfd->Sequence_Length =(unsigned short) min(seq->frames[frame_no].at_frame_no - this_frame_no,65535); |
186 |
++ kfd->Sequence_Length =(unsigned short) avp_min(seq->frames[frame_no].at_frame_no - this_frame_no,65535); |
187 |
+@@ -995 +995 @@ SECTION * Global_Hierarchy_Store::build_hierarchy (Object_Hierarchy_Chunk * ohc, |
188 |
+- kfd->Sequence_Length =(unsigned short) min(65536 - this_frame_no,65535); |
189 |
++ kfd->Sequence_Length =(unsigned short) avp_min(65536 - this_frame_no,65535); |
190 |
+@@ -1199 +1199 @@ SECTION * Global_Hierarchy_Store::build_hierarchy (Object_Hierarchy_Chunk * ohc, |
191 |
+- kfd->Sequence_Length =(unsigned short) min(frame_array[frame_no]->at_frame_no - this_frame_no,65535); |
192 |
++ kfd->Sequence_Length =(unsigned short) avp_min(frame_array[frame_no]->at_frame_no - this_frame_no,65535); |
193 |
+@@ -1203 +1203 @@ SECTION * Global_Hierarchy_Store::build_hierarchy (Object_Hierarchy_Chunk * ohc, |
194 |
+- kfd->Sequence_Length =(unsigned short) min(65536 - this_frame_no , 65535); |
195 |
++ kfd->Sequence_Length =(unsigned short) avp_min(65536 - this_frame_no , 65535); |
196 |
+--- a/src/files.c |
197 |
++++ b/src/files.c |
198 |
+@@ -668 +668 @@ void InitGameDirectories(char *argv0) |
199 |
+- copylen = min(len, PATH_MAX-1); |
200 |
++ copylen = avp_min(len, PATH_MAX-1); |
201 |
+--- a/src/fixer.h |
202 |
++++ b/src/fixer.h |
203 |
+@@ -50,7 +50,2 @@ extern "C" { |
204 |
+-#ifndef min |
205 |
+-#define min(a, b) (((a) < (b)) ? (a) : (b)) |
206 |
+-#endif |
207 |
+- |
208 |
+-#ifndef max |
209 |
+-#define max(a, b) (((a) > (b)) ? (a) : (b)) |
210 |
+-#endif |
211 |
++#define avp_min(a, b) (((a) < (b)) ? (a) : (b)) |
212 |
++#define avp_max(a, b) (((a) > (b)) ? (a) : (b)) |
213 |
+--- a/src/main.c |
214 |
++++ b/src/main.c |
215 |
+@@ -461 +461 @@ static void load_opengl_library(const char *lib) |
216 |
+- copylen = min(len, PATH_MAX-1); |
217 |
++ copylen = avp_min(len, PATH_MAX-1); |
218 |
+--- a/src/win95/bmpnames.cpp |
219 |
++++ b/src/win95/bmpnames.cpp |
220 |
+@@ -131 +131 @@ Chunk_With_BMPs::Chunk_With_BMPs (Chunk_With_Children * parent, const char * con |
221 |
+- max_index = max (bn.index, max_index); |
222 |
++ max_index = avp_max (bn.index, max_index); |
223 |
+--- a/src/win95/chnkload.cpp |
224 |
++++ b/src/win95/chnkload.cpp |
225 |
+@@ -675 +675 @@ static void setup_tex_conv_array ( |
226 |
+- max_indices = max(bns().index,max_indices); |
227 |
++ max_indices = avp_max(bns().index,max_indices); |
228 |
+@@ -1180 +1180 @@ BOOL load_rif_bitmaps (RIFFHANDLE h, int/* flags*/) |
229 |
+- h->max_index = max(bns().index,h->max_index); |
230 |
++ h->max_index = avp_max(bns().index,h->max_index); |
231 |
+@@ -1622 +1622 @@ void DeallocateRifLoadedShapeheader(SHAPEHEADER * shp) |
232 |
+- max_num_texs = max (max_num_texs, shp->items[i][3] &0x7fff); |
233 |
++ max_num_texs = avp_max (max_num_texs, shp->items[i][3] &0x7fff); |
234 |
+@@ -2141 +2141 @@ void SetupAnimatingShape(Shape_Chunk* sc,SHAPEHEADER* shp, Shape_Merge_Data_Chun |
235 |
+- numseq=max(assc->sequence_data.SequenceNum+1,numseq); |
236 |
++ numseq=avp_max(assc->sequence_data.SequenceNum+1,numseq); |
237 |
+@@ -2176,3 +2176,3 @@ void SetupAnimatingShape(Shape_Chunk* sc,SHAPEHEADER* shp, Shape_Merge_Data_Chun |
238 |
+- int x=max(-sas->min_x,sas->max_x); |
239 |
+- int y=max(-sas->min_y,sas->max_y); |
240 |
+- int z=max(-sas->min_z,sas->max_z); |
241 |
++ int x=avp_max(-sas->min_x,sas->max_x); |
242 |
++ int y=avp_max(-sas->min_y,sas->max_y); |
243 |
++ int z=avp_max(-sas->min_z,sas->max_z); |
244 |
+@@ -2612 +2612 @@ BOOL copy_sprite_to_shapeheader (RIFFHANDLE h, SHAPEHEADER *& shphd,Sprite_Heade |
245 |
+- local_max_index = max(bns().index,local_max_index); |
246 |
++ local_max_index = avp_max(bns().index,local_max_index); |
247 |
+@@ -2774 +2774 @@ BOOL copy_sprite_to_shapeheader (RIFFHANDLE h, SHAPEHEADER *& shphd,Sprite_Heade |
248 |
+- MaxSeq=max(MaxSeq,((Sprite_Action_Chunk*)chlif())->Action); |
249 |
++ MaxSeq=avp_max(MaxSeq,((Sprite_Action_Chunk*)chlif())->Action); |
250 |
+--- a/src/win95/chnktype.cpp |
251 |
++++ b/src/win95/chnktype.cpp |
252 |
+@@ -1047,3 +1047,3 @@ void ChunkAnimSequence::UpdateNormalsAndExtents(ChunkShape const * cs,List<int>* |
253 |
+- max.x = max(max.x, caf->v_list[j].x); |
254 |
+- max.y = max(max.y, caf->v_list[j].y); |
255 |
+- max.z = max(max.z, caf->v_list[j].z); |
256 |
++ max.x = avp_max(max.x, caf->v_list[j].x); |
257 |
++ max.y = avp_max(max.y, caf->v_list[j].y); |
258 |
++ max.z = avp_max(max.z, caf->v_list[j].z); |
259 |
+@@ -1051,3 +1051,3 @@ void ChunkAnimSequence::UpdateNormalsAndExtents(ChunkShape const * cs,List<int>* |
260 |
+- min.x = min(min.x, caf->v_list[j].x); |
261 |
+- min.y = min(min.y, caf->v_list[j].y); |
262 |
+- min.z = min(min.z, caf->v_list[j].z); |
263 |
++ min.x = avp_min(min.x, caf->v_list[j].x); |
264 |
++ min.y = avp_min(min.y, caf->v_list[j].y); |
265 |
++ min.z = avp_min(min.z, caf->v_list[j].z); |
266 |
+@@ -1057 +1057 @@ void ChunkAnimSequence::UpdateNormalsAndExtents(ChunkShape const * cs,List<int>* |
267 |
+- radius = max (radius, (float)temp_rad); |
268 |
++ radius = avp_max (radius, (float)temp_rad); |
269 |
+--- a/src/win95/inline.h |
270 |
++++ b/src/win95/inline.h |
271 |
+@@ -4,7 +4,2 @@ |
272 |
+-#ifndef min |
273 |
+-#define min(a, b) (((a) < (b)) ? (a) : (b)) |
274 |
+-#endif |
275 |
+- |
276 |
+-#ifndef max |
277 |
+-#define max(a, b) (((a) > (b)) ? (a) : (b)) |
278 |
+-#endif |
279 |
++#define avp_min(a, b) (((a) < (b)) ? (a) : (b)) |
280 |
++#define avp_max(a, b) (((a) > (b)) ? (a) : (b)) |
281 |
+--- a/src/win95/ltchunk.cpp |
282 |
++++ b/src/win95/ltchunk.cpp |
283 |
+@@ -334,2 +334,2 @@ int Light_Scale_Chunk::ApplyPrelightScale(int l) |
284 |
+- l=min(l,255); |
285 |
+- return max(l,prelight_multiply_above); |
286 |
++ l=avp_min(l,255); |
287 |
++ return avp_max(l,prelight_multiply_above); |
288 |
+@@ -343,2 +343,2 @@ int Light_Scale_Chunk::ApplyRuntimeScale(int l) |
289 |
+- l=min(l,255); |
290 |
+- return max(l,runtime_multiply_above); |
291 |
++ l=avp_min(l,255); |
292 |
++ return avp_max(l,runtime_multiply_above); |
293 |
+--- a/src/win95/mishchnk.cpp |
294 |
++++ b/src/win95/mishchnk.cpp |
295 |
+@@ -628 +628 @@ void File_Chunk::post_input_processing() |
296 |
+- Shape_Chunk::max_id = max (Shape_Chunk::max_id,sli()->get_header()->file_id_num); |
297 |
++ Shape_Chunk::max_id = avp_max (Shape_Chunk::max_id,sli()->get_header()->file_id_num); |
298 |
+@@ -1518 +1518 @@ void File_Chunk::build_object_array() |
299 |
+- object_array_size=max(object_array_size,oblif()->object_data.index_num+1); |
300 |
++ object_array_size=avp_max(object_array_size,oblif()->object_data.index_num+1); |
301 |
+@@ -1867 +1867 @@ void RIF_File_Chunk::post_input_processing() |
302 |
+- Shape_Chunk::max_id = max (Shape_Chunk::max_id,sli()->get_header()->file_id_num); |
303 |
++ Shape_Chunk::max_id = avp_max (Shape_Chunk::max_id,sli()->get_header()->file_id_num); |
304 |
+--- a/src/win95/shpchunk.cpp |
305 |
++++ b/src/win95/shpchunk.cpp |
306 |
+@@ -194,3 +194,3 @@ void Shape_Chunk::post_input_processing() |
307 |
+- max.x = max(max.x, shape_data_store->v_list[i].x); |
308 |
+- max.y = max(max.y, shape_data_store->v_list[i].y); |
309 |
+- max.z = max(max.z, shape_data_store->v_list[i].z); |
310 |
++ max.x = avp_max(max.x, shape_data_store->v_list[i].x); |
311 |
++ max.y = avp_max(max.y, shape_data_store->v_list[i].y); |
312 |
++ max.z = avp_max(max.z, shape_data_store->v_list[i].z); |
313 |
+@@ -198,3 +198,3 @@ void Shape_Chunk::post_input_processing() |
314 |
+- min.x = min(min.x, shape_data_store->v_list[i].x); |
315 |
+- min.y = min(min.y, shape_data_store->v_list[i].y); |
316 |
+- min.z = min(min.z, shape_data_store->v_list[i].z); |
317 |
++ min.x = avp_min(min.x, shape_data_store->v_list[i].x); |
318 |
++ min.y = avp_min(min.y, shape_data_store->v_list[i].y); |
319 |
++ min.z = avp_min(min.z, shape_data_store->v_list[i].z); |
320 |
+@@ -204 +204 @@ void Shape_Chunk::post_input_processing() |
321 |
+- radius = max (radius, temp_rad); |
322 |
++ radius = avp_max (radius, temp_rad); |
323 |
+@@ -1462 +1462 @@ void Shape_Header_Chunk::prepare_for_output() |
324 |
+- Shape_Chunk::max_id = max(Shape_Chunk::max_id, file_id_num); |
325 |
++ Shape_Chunk::max_id = avp_max(Shape_Chunk::max_id, file_id_num); |
326 |
+@@ -1786 +1786 @@ void Shape_Morphing_Data_Chunk::prepare_for_output() |
327 |
+- max_id = max (max_id, ((Shape_Sub_Shape_Chunk *)cli())->get_header()->file_id_num); |
328 |
++ max_id = avp_max (max_id, ((Shape_Sub_Shape_Chunk *)cli())->get_header()->file_id_num); |