Mercurial > hg > openttd
changeset 912:db97a3c332dd draft
(svn r1399) -Fix: Fixes for compiling with Watcom C/C++ (ie, OS/2 port). (orudge)
Note: If people could watch out for initialising structs with
*non-constants* in future... it's a bit annoying, I
know, but Open Watcom isn't the only compiler which
doesn't support this (yet) - Borland, for example,
still doesn't like it.
author | truelight <truelight@openttd.org> |
---|---|
date | Thu, 06 Jan 2005 15:57:26 +0000 |
parents | 2839a6e9b420 |
children | e71d40e6dc27 |
files | openttd.tgt os/os2/openttd.wpj vehicle_gui.c |
diffstat | 3 files changed, 459 insertions(+), 471 deletions(-) [+] |
line wrap: on
line diff
--- a/openttd.tgt +++ b/openttd.tgt @@ -205,7 +205,7 @@ COBJ 54 WVList -15 +13 55 MVState 56 @@ -362,10 +362,10 @@ WCC 94 WString -20 -?????Pack structures +29 +?????No debugging information 0 -0 +1 95 MRState 96 @@ -374,1727 +374,1703 @@ WCC 97 WString -21 -?????4 byte alignment -0 -1 -98 -MRState -99 -WString -3 -WCC -100 -WString -29 -?????No debugging information -0 -1 -101 -MRState -102 -WString -3 -WCC -103 -WString 28 ?????Line number information 0 0 -104 +98 WVList 0 -1 1 1 0 -105 +99 MItem 4 ai.c -106 +100 WString 4 COBJ -107 +101 WVList 0 -108 +102 WVList 0 52 1 1 0 -109 +103 MItem 10 ai_build.c -110 +104 WString 4 COBJ -111 +105 WVList 0 -112 +106 WVList 0 52 1 1 0 -113 +107 MItem 8 ai_new.c -114 +108 WString 4 COBJ -115 +109 +WVList +0 +110 WVList 0 -116 +52 +1 +1 +0 +111 +MItem +15 +ai_pathfinder.c +112 +WString +4 +COBJ +113 +WVList +0 +114 WVList 0 52 1 1 0 -117 +115 MItem -15 -ai_pathfinder.c -118 +11 +ai_shared.c +116 WString 4 COBJ -119 +117 WVList 0 -120 +118 WVList 0 52 1 1 0 -121 +119 MItem -11 -ai_shared.c -122 +14 +aircraft_cmd.c +120 WString 4 COBJ -123 +121 WVList 0 -124 +122 WVList 0 52 1 1 0 -125 +123 MItem 14 -aircraft_cmd.c -126 +aircraft_gui.c +124 WString 4 COBJ -127 +125 WVList 0 -128 +126 WVList 0 52 1 1 0 -129 +127 MItem -14 -aircraft_gui.c -130 +9 +airport.c +128 WString 4 COBJ -131 +129 WVList 0 -132 +130 WVList 0 52 1 1 0 -133 +131 MItem -9 -airport.c -134 +13 +airport_gui.c +132 WString 4 COBJ -135 +133 WVList 0 -136 +134 WVList 0 52 1 1 0 -137 +135 MItem -13 -airport_gui.c -138 +8 +aystar.c +136 WString 4 COBJ -139 +137 WVList 0 -140 +138 WVList 0 52 1 1 0 -141 +139 MItem -8 -aystar.c -142 +12 +bridge_gui.c +140 WString 4 COBJ -143 +141 WVList 0 -144 +142 WVList 0 52 1 1 0 -145 +143 MItem -12 -bridge_gui.c -146 +16 +callback_table.c +144 WString 4 COBJ -147 +145 WVList 0 -148 +146 WVList 0 52 1 1 0 -149 +147 MItem -16 -callback_table.c -150 +11 +clear_cmd.c +148 WString 4 COBJ -151 +149 WVList 0 -152 +150 WVList 0 52 1 1 0 -153 +151 MItem -11 -clear_cmd.c -154 +9 +command.c +152 WString 4 COBJ -155 +153 WVList 0 -156 +154 WVList 0 52 1 1 0 -157 +155 MItem 9 -command.c -158 +console.c +156 WString 4 COBJ -159 +157 WVList 0 -160 +158 WVList 0 52 1 1 0 -161 +159 MItem -9 -console.c -162 +14 +console_cmds.c +160 WString 4 COBJ -163 +161 WVList 0 -164 +162 WVList 0 52 1 1 0 -165 +163 MItem -14 -console_cmds.c -166 +11 +dedicated.c +164 WString 4 COBJ -167 +165 WVList 0 -168 +166 WVList 0 52 1 1 0 -169 +167 MItem -11 -dedicated.c -170 +14 +disaster_cmd.c +168 WString 4 COBJ -171 +169 WVList 0 -172 +170 WVList 0 52 1 1 0 -173 +171 MItem -14 -disaster_cmd.c -174 +10 +dock_gui.c +172 WString 4 COBJ -175 +173 WVList 0 -176 +174 WVList 0 52 1 1 0 -177 +175 MItem -10 -dock_gui.c -178 +12 +dummy_land.c +176 WString 4 COBJ -179 +177 WVList 0 -180 +178 WVList 0 52 1 1 0 -181 +179 MItem -12 -dummy_land.c -182 +9 +economy.c +180 WString 4 COBJ -183 +181 WVList 0 -184 +182 WVList 0 52 1 1 0 -185 +183 MItem -9 -economy.c -186 +8 +engine.c +184 WString 4 COBJ -187 +185 WVList 0 -188 +186 WVList 0 52 1 1 0 -189 +187 MItem -8 -engine.c -190 +12 +engine_gui.c +188 WString 4 COBJ -191 +189 WVList 0 -192 +190 WVList 0 52 1 1 0 -193 +191 MItem -12 -engine_gui.c -194 +8 +fileio.c +192 WString 4 COBJ -195 +193 WVList 0 -196 +194 WVList 0 52 1 1 0 -197 +195 MItem -8 -fileio.c -198 +5 +gfx.c +196 WString 4 COBJ -199 +197 WVList 0 -200 +198 WVList 0 52 1 1 0 -201 +199 MItem -5 -gfx.c -202 +11 +graph_gui.c +200 WString 4 COBJ -203 +201 WVList 0 -204 +202 WVList 0 52 1 1 0 -205 +203 MItem -11 -graph_gui.c -206 +14 +industry_cmd.c +204 WString 4 COBJ -207 +205 WVList 0 -208 +206 WVList 0 52 1 1 0 -209 +207 MItem 14 -industry_cmd.c -210 +industry_gui.c +208 WString 4 COBJ -211 +209 WVList 0 -212 +210 WVList 0 52 1 1 0 -213 +211 MItem -14 -industry_gui.c -214 +11 +intro_gui.c +212 WString 4 COBJ -215 -WVList -0 -216 +213 WVList 0 -52 -1 -1 -0 -217 -MItem -11 -intro_gui.c -218 -WString -4 -COBJ -219 -WVList -0 -220 +214 WVList 0 52 1 1 0 -221 +215 MItem 11 landscape.c -222 +216 WString 4 COBJ -223 +217 WVList 0 -224 +218 WVList 0 52 1 1 0 -225 +219 MItem 10 main_gui.c -226 +220 WString 4 COBJ -227 +221 WVList 0 -228 +222 WVList 0 52 1 1 0 -229 +223 MItem 5 map.c -230 +224 WString 4 COBJ -231 +225 WVList 0 -232 +226 WVList 0 52 1 1 0 -233 +227 MItem 5 md5.c -234 +228 WString 4 COBJ -235 +229 WVList 0 -236 +230 WVList 0 52 1 1 0 -237 +231 MItem 9 minilzo.c -238 +232 WString 4 COBJ -239 +233 WVList 0 -240 +234 WVList 0 52 1 1 0 -241 +235 MItem 6 misc.c -242 +236 WString 4 COBJ -243 +237 WVList 0 -244 +238 WVList 0 52 1 1 0 -245 +239 MItem 10 misc_cmd.c -246 +240 WString 4 COBJ -247 +241 WVList 0 -248 +242 WVList 0 52 1 1 0 -249 +243 MItem 10 misc_gui.c -250 +244 WString 4 COBJ -251 +245 WVList 0 -252 +246 WVList 0 52 1 1 0 -253 +247 MItem 11 music_gui.c -254 +248 WString 4 COBJ -255 +249 WVList 0 -256 +250 WVList 0 52 1 1 0 -257 +251 MItem 9 namegen.c -258 +252 WString 4 COBJ -259 +253 WVList 0 -260 +254 WVList 0 52 1 1 0 -261 +255 MItem 9 network.c -262 +256 WString 4 COBJ -263 +257 WVList 0 -264 +258 WVList 0 52 1 1 0 -265 +259 MItem 16 network_client.c -266 +260 WString 4 COBJ -267 +261 WVList 0 -268 +262 WVList 0 52 1 1 0 -269 +263 MItem 14 network_data.c -270 +264 WString 4 COBJ -271 +265 WVList 0 -272 +266 WVList 0 52 1 1 0 -273 +267 MItem 18 network_gamelist.c -274 +268 WString 4 COBJ -275 +269 WVList 0 -276 +270 WVList 0 52 1 1 0 -277 +271 MItem 13 network_gui.c -278 +272 WString 4 COBJ -279 +273 WVList 0 -280 +274 WVList 0 52 1 1 0 -281 +275 MItem 16 network_server.c -282 +276 WString 4 COBJ -283 +277 WVList 0 -284 +278 WVList 0 52 1 1 0 -285 +279 MItem 13 network_udp.c -286 +280 WString 4 COBJ -287 +281 WVList 0 -288 +282 WVList 0 52 1 1 0 -289 +283 MItem 8 newgrf.c -290 +284 WString 4 COBJ -291 +285 WVList 0 -292 +286 WVList 0 52 1 1 0 -293 +287 MItem 10 news_gui.c -294 +288 WString 4 COBJ -295 +289 WVList 0 -296 +290 WVList 0 52 1 1 0 -297 +291 MItem 11 oldloader.c -298 +292 WString 4 COBJ -299 +293 WVList 0 -300 +294 WVList 0 52 1 1 0 -301 +295 MItem 11 order_cmd.c -302 +296 WString 4 COBJ -303 +297 WVList 0 -304 +298 WVList 0 52 1 1 0 -305 +299 MItem 11 order_gui.c -306 +300 WString 4 COBJ -307 +301 WVList 0 -308 +302 WVList 0 52 1 1 0 -309 +303 MItem 5 os2.c -310 +304 WString 4 COBJ -311 +305 WVList 0 -312 +306 WVList 0 52 1 1 0 -313 +307 MItem 10 pathfind.c -314 +308 WString 4 COBJ -315 +309 WVList 0 -316 +310 WVList 0 52 1 1 0 -317 +311 MItem 12 player_gui.c -318 +312 WString 4 COBJ -319 +313 WVList 0 -320 +314 WVList 0 52 1 1 0 -321 +315 MItem 9 players.c -322 +316 WString 4 COBJ -323 +317 WVList 0 -324 +318 WVList 0 52 1 1 0 -325 +319 MItem 7 queue.c -326 +320 WString 4 COBJ -327 +321 WVList 0 -328 +322 WVList 0 52 1 1 0 -329 +323 MItem 10 rail_cmd.c -330 +324 WString 4 COBJ -331 +325 WVList 0 -332 +326 WVList 0 52 1 1 0 -333 +327 MItem 10 rail_gui.c -334 +328 WString 4 COBJ -335 +329 WVList 0 -336 +330 WVList 0 52 1 1 0 -337 +331 MItem 10 road_cmd.c -338 +332 WString 4 COBJ -339 +333 WVList 0 -340 +334 WVList 0 52 1 1 0 -341 +335 MItem 10 road_gui.c -342 +336 WString 4 COBJ -343 +337 WVList 0 -344 +338 WVList 0 52 1 1 0 -345 +339 MItem 13 roadveh_cmd.c -346 +340 WString 4 COBJ -347 +341 WVList 0 -348 +342 WVList 0 52 1 1 0 -349 +343 MItem 13 roadveh_gui.c -350 +344 WString 4 COBJ -351 +345 WVList 0 -352 +346 WVList 0 52 1 1 0 -353 +347 MItem 10 saveload.c -354 +348 WString 4 COBJ -355 +349 WVList 0 -356 +350 WVList 0 52 1 1 0 -357 +351 MItem 12 screenshot.c -358 +352 WString 4 COBJ -359 +353 WVList 0 -360 +354 WVList 0 52 1 1 0 -361 +355 MItem 5 sdl.c -362 +356 WString 4 COBJ -363 +357 WVList 0 -364 +358 WVList 0 52 1 1 0 -365 +359 MItem 10 settings.c -366 +360 WString 4 COBJ -367 +361 WVList 0 -368 +362 WVList 0 52 1 1 0 -369 +363 MItem 14 settings_gui.c -370 +364 WString 4 COBJ -371 +365 WVList 0 -372 +366 WVList 0 52 1 1 0 -373 +367 MItem 10 ship_cmd.c -374 +368 WString 4 COBJ -375 +369 WVList 0 -376 +370 WVList 0 52 1 1 0 -377 +371 MItem 10 ship_gui.c -378 +372 WString 4 COBJ -379 +373 WVList 0 -380 +374 WVList 0 52 1 1 0 -381 +375 MItem 14 smallmap_gui.c -382 +376 WString 4 COBJ -383 +377 WVList 0 -384 +378 WVList 0 52 1 1 0 -385 +379 MItem 7 sound.c -386 +380 WString 4 COBJ -387 +381 WVList 0 -388 +382 WVList 0 52 1 1 0 -389 +383 MItem 8 sprite.c -390 +384 WString 4 COBJ -391 +385 WVList 0 -392 +386 WVList 0 52 1 1 0 -393 +387 MItem 13 spritecache.c -394 +388 WString 4 COBJ -395 +389 WVList 0 -396 +390 WVList 0 52 1 1 0 -397 +391 MItem 13 station_cmd.c -398 +392 WString 4 COBJ -399 +393 WVList 0 -400 +394 WVList 0 52 1 1 0 -401 +395 MItem 13 station_gui.c -402 +396 WString 4 COBJ -403 +397 WVList 0 -404 +398 WVList 0 52 1 1 0 -405 +399 MItem 8 StdAfx.c -406 +400 WString 4 COBJ -407 +401 WVList 0 -408 +402 WVList 0 52 1 1 0 -409 +403 MItem 9 strings.c -410 +404 WString 4 COBJ -411 +405 WVList 0 -412 +406 WVList 0 52 1 1 0 -413 +407 MItem 13 subsidy_gui.c -414 +408 WString 4 COBJ -415 +409 WVList 0 -416 +410 WVList 0 52 1 1 0 -417 +411 MItem 15 terraform_gui.c -418 +412 WString 4 COBJ -419 +413 WVList 0 -420 +414 WVList 0 52 1 1 0 -421 +415 MItem 9 texteff.c -422 +416 WString 4 COBJ -423 +417 WVList 0 -424 +418 WVList 0 52 1 1 0 -425 +419 MItem 10 town_cmd.c -426 +420 WString 4 COBJ -427 +421 WVList 0 -428 +422 WVList 0 52 1 1 0 -429 +423 MItem 10 town_gui.c -430 +424 WString 4 COBJ -431 +425 WVList 0 -432 +426 WVList 0 52 1 1 0 -433 +427 MItem 11 train_cmd.c -434 +428 WString 4 COBJ -435 +429 WVList 0 -436 +430 WVList 0 52 1 1 0 -437 +431 MItem 11 train_gui.c -438 +432 WString 4 COBJ -439 +433 WVList 0 -440 +434 WVList 0 52 1 1 0 -441 +435 MItem 10 tree_cmd.c -442 +436 WString 4 COBJ -443 +437 WVList 0 -444 +438 WVList 0 52 1 1 0 -445 +439 MItem 5 ttd.c -446 +440 WString 4 COBJ -447 +441 WVList 0 -448 +442 WVList 0 52 1 1 0 -449 +443 MItem 18 tunnelbridge_cmd.c -450 +444 WString 4 COBJ -451 +445 WVList 0 -452 +446 WVList 0 52 1 1 0 -453 +447 MItem 15 unmovable_cmd.c -454 +448 WString 4 COBJ -455 +449 WVList 0 -456 +450 WVList 0 52 1 1 0 -457 +451 MItem 9 vehicle.c -458 +452 WString 4 COBJ -459 +453 WVList 0 -460 +454 WVList 0 52 1 1 0 -461 +455 MItem 13 vehicle_gui.c -462 +456 WString 4 COBJ -463 +457 WVList 0 -464 +458 WVList 0 52 1 1 0 -465 +459 MItem 10 viewport.c -466 +460 WString 4 COBJ -467 +461 WVList 0 -468 +462 WVList 0 52 1 1 0 -469 +463 MItem 11 water_cmd.c -470 +464 WString 4 COBJ -471 +465 WVList 0 -472 +466 WVList 0 52 1 1 0 -473 +467 MItem 8 widget.c -474 +468 WString 4 COBJ -475 +469 WVList 0 -476 +470 WVList 0 52 1 1 0 -477 +471 MItem 8 window.c -478 +472 WString 4 COBJ -479 +473 WVList 0 -480 +474 WVList 0 52
--- a/os/os2/openttd.wpj +++ b/os/os2/openttd.wpj @@ -43,7 +43,7 @@ 17 ..\..\openttd.tgt 47 -47 +49 11 VComponent 12
--- a/vehicle_gui.c +++ b/vehicle_gui.c @@ -357,11 +357,14 @@ { byte railtype; int selected_id[2] = {-1,-1}; - int sel[2] = { WP(w,replaceveh_d).sel_index[0], WP(w,replaceveh_d).sel_index[1]}; + int sel[2]; int count = 0; int count2 = 0; int engine_id; + sel[0] = WP(w,replaceveh_d).sel_index[0]; + sel[1] = WP(w,replaceveh_d).sel_index[1]; + switch (WP(w,replaceveh_d).vehicletype) { case VEH_Train: { railtype = WP(w,replaceveh_d).railtype; @@ -502,8 +505,15 @@ static void DrawEngineArrayInReplaceWindow(Window *w, int x, int y, int x2, int y2, int pos, int pos2, int sel1, int sel2, int selected_id1, int selected_id2) { - int sel[2] = {sel1, sel2}; - int selected_id[2] = {selected_id1, selected_id2}; + int sel[2]; + int selected_id[2]; + + sel[0] = sel1; + sel[1] = sel2; + + selected_id[0] = selected_id1; + selected_id[1] = selected_id2; + switch (WP(w,replaceveh_d).vehicletype) { case VEH_Train: { byte railtype = WP(w,replaceveh_d).railtype; @@ -644,7 +654,9 @@ int pos2 = w->vscroll2.pos; int x2 = 1 + 228; int y2 = 15; - int sel[2] = { WP(w,replaceveh_d).sel_index[0], WP(w,replaceveh_d).sel_index[1]}; + int sel[2]; + sel[0] = WP(w,replaceveh_d).sel_index[0]; + sel[1] = WP(w,replaceveh_d).sel_index[1]; SetupScrollStuffForReplaceWindow(w);