Subversion Repositories vaca_plus

Rev

Rev 19 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

/*
 VERY IMPORTANT!
 This file is designed to convert any user maps you have made to combatibility with Vaca+
 This will move the numbers of certain sounds and change the tile numbers of certain sprites.
 
 It has already been run on the maps included with Vaca+ (Life's a Beach, Dukematch, Shark's Cove, Zoo).
 
 To use, open the console in Mapster32 and type:
 include vfix
 enableevent all
 
 Then change to 3D mode and back to 2D mode.  Wait for about five seconds for the script to run through all the sprites and sectors.
 Save your map.  Open your next map, switch to 3D mode, etc.  Repeat.  You do not have to type the commands again.
  
 Not following these directions will fuck up your maps.
 
 ALWAYS MAKE BACKUPS OF YOUR MAPS!
*/

include DEFS.CON
include VacaDefs.con

gamevar i 0 0
gamevar j 0 0
gamevar k 0 0

onevent EVENT_DRAW2DSCREEN
// Fixing sounds.

        for i allsprites, ifactor MUSICANDSFX
        {
                 switch .lotag

// fixing ambient sounds
                        case 91
                        case 308
                        case 501
                                set .lotag 944
                                break

                        case 95 set .lotag 950 break
                        case 180 set .lotag 951 break
                        case 181 set .lotag 952 break
                        case 187 set .lotag 953 break
                        case 188 set .lotag 954 break
                        case 189 set .lotag 955 break
                        case 190 set .lotag 956 break
                        case 192 set .lotag 957 break
                        case 193 set .lotag 958 break
                        case 281 set .lotag 959 break
                        
                        case 309 set .lotag 900 break
                        case 310 set .lotag 901 break
                        case 311 set .lotag 902 break
                        case 312 set .lotag 903 break
                        case 313 set .lotag 904 break
                        case 314 set .lotag 905 break
                        case 315 set .lotag 906 break
                        case 316 set .lotag 907 break
                        case 317 set .lotag 908 break
                        case 318 set .lotag 909 break
                        case 319 set .lotag 910 break
                        case 320 set .lotag 911 break
                        case 321 set .lotag 912 break
                        case 322 set .lotag 913 break
                        case 323 set .lotag 914 break
                        case 324 set .lotag 915 break
                        case 325 set .lotag 916 break
                        case 326 set .lotag 917 break
                        case 327 set .lotag 918 break
                        case 343 set .lotag 919 break
                        case 344 set .lotag 920 break
                        case 347 set .lotag 921 break
                        case 417 set .lotag 922 break
                        case 418 set .lotag 923 break
                        case 419 set .lotag 924 break
                        case 420 set .lotag 925 break
                        case 421 set .lotag 926 break
                        case 422 set .lotag 927 break
                        case 423 set .lotag 928 break
                        case 424 set .lotag 929 break
                        case 425 set .lotag 930 break
                        case 432 set .lotag 931 break
                        case 433 set .lotag 932 break
                        case 434 set .lotag 933 break
                        case 435 set .lotag 934 break
                        case 426 set .lotag 935 break
                        case 427 set .lotag 936 break
                        case 428 set .lotag 937 break
                        case 429 set .lotag 938 break
                        case 430 set .lotag 939 break
                        case 431 set .lotag 940 break
                        case 436 set .lotag 941 break
                        case 437 set .lotag 942 break
                        case 438 set .lotag 943 break
                        
                endswitch

// fixing triggered sounds (e.g. elevators)
                sectgetlotag
                ifvarn LOTAG 0
                {
                        switch .hitag
                                case 95 set .hitag 950 break
                                case 180 set .hitag 951 break
                                case 181 set .hitag 952 break
                                case 187 set .hitag 953 break
                                case 188 set .hitag 954 break
                                case 189 set .hitag 955 break
                                case 190 set .hitag 956 break
                                case 192 set .hitag 957 break
                                case 193 set .hitag 958 break
                                case 281 set .hitag 959 break
                                
                                case 309 set .hitag 900 break
                                case 310 set .hitag 901 break
                                case 311 set .hitag 902 break
                                case 312 set .hitag 903 break
                                case 313 set .hitag 904 break
                                case 314 set .hitag 905 break
                                case 315 set .hitag 906 break
                                case 316 set .hitag 907 break
                                case 317 set .hitag 908 break
                                case 318 set .hitag 909 break
                                case 319 set .hitag 910 break
                                case 320 set .hitag 911 break
                                case 321 set .hitag 912 break
                                case 322 set .hitag 913 break
                                case 323 set .hitag 914 break
                                case 324 set .hitag 915 break
                                case 325 set .hitag 916 break
                                case 326 set .hitag 917 break
                                case 327 set .hitag 918 break
                                case 343 set .hitag 919 break
                                case 344 set .hitag 920 break
                                case 347 set .hitag 921 break
                                case 417 set .hitag 922 break
                                case 418 set .hitag 923 break
                                case 419 set .hitag 924 break
                                case 420 set .hitag 925 break
                                case 421 set .hitag 926 break
                                case 422 set .hitag 927 break
                                case 423 set .hitag 928 break
                                case 424 set .hitag 929 break
                                case 425 set .hitag 930 break
                                case 432 set .hitag 931 break
                                case 433 set .hitag 932 break
                                case 434 set .hitag 933 break
                                case 435 set .hitag 934 break
                                case 426 set .hitag 935 break
                                case 427 set .hitag 936 break
                                case 428 set .hitag 937 break
                                case 429 set .hitag 938 break
                                case 430 set .hitag 939 break
                                case 431 set .hitag 940 break
                                case 436 set .hitag 941 break
                                case 437 set .hitag 942 break
                                case 438 set .hitag 943 break
                        endswitch
                }
        }
// fixing one-time sector sounds
        for k allsectors
        {
                switch sector[k].lotag

                        case 10091
                        case 10308
                                set sector[k].lotag 10944
                                break
                        
                        case 10095 set sector[k].lotag 10950 break
                        case 10180 set sector[k].lotag 10951 break
                        case 10181 set sector[k].lotag 10952 break
                        case 10187 set sector[k].lotag 10953 break
                        case 10188 set sector[k].lotag 10954 break
                        case 10189 set sector[k].lotag 10955 break
                        case 10190 set sector[k].lotag 10956 break
                        case 10192 set sector[k].lotag 10957 break
                        case 10193 set sector[k].lotag 10958 break
                        case 10281 set sector[k].lotag 10959 break
                        
                        case 10309 set sector[k].lotag 10900 break
                        case 10310 set sector[k].lotag 10901 break
                        case 10311 set sector[k].lotag 10902 break
                        case 10312 set sector[k].lotag 10903 break
                        case 10313 set sector[k].lotag 10904 break
                        case 10314 set sector[k].lotag 10905 break
                        case 10315 set sector[k].lotag 10906 break
                        case 10316 set sector[k].lotag 10907 break
                        case 10317 set sector[k].lotag 10908 break
                        case 10318 set sector[k].lotag 10909 break
                        case 10319 set sector[k].lotag 10910 break
                        case 10320 set sector[k].lotag 10911 break
                        case 10321 set sector[k].lotag 10912 break
                        case 10322 set sector[k].lotag 10913 break
                        case 10323 set sector[k].lotag 10914 break
                        case 10324 set sector[k].lotag 10915 break
                        case 10325 set sector[k].lotag 10916 break
                        case 10326 set sector[k].lotag 10917 break
                        case 10327 set sector[k].lotag 10918 break
                        case 10343 set sector[k].lotag 10919 break
                        case 10344 set sector[k].lotag 10920 break
                        case 10347 set sector[k].lotag 10921 break
                        case 10417 set sector[k].lotag 10922 break
                        case 10418 set sector[k].lotag 10923 break
                        case 10419 set sector[k].lotag 10924 break
                        case 10420 set sector[k].lotag 10925 break
                        case 10421 set sector[k].lotag 10926 break
                        case 10422 set sector[k].lotag 10927 break
                        case 10423 set sector[k].lotag 10928 break
                        case 10424 set sector[k].lotag 10929 break
                        case 10425 set sector[k].lotag 10930 break
                        case 10432 set sector[k].lotag 10931 break
                        case 10433 set sector[k].lotag 10932 break
                        case 10434 set sector[k].lotag 10933 break
                        case 10435 set sector[k].lotag 10934 break
                        case 10426 set sector[k].lotag 10935 break
                        case 10427 set sector[k].lotag 10936 break
                        case 10428 set sector[k].lotag 10937 break
                        case 10429 set sector[k].lotag 10938 break
                        case 10430 set sector[k].lotag 10939 break
                        case 10431 set sector[k].lotag 10940 break
                        case 10436 set sector[k].lotag 10941 break
                        case 10437 set sector[k].lotag 10942 break
                        case 10438 set sector[k].lotag 10943 break
                        
                endswitch
        }

// Fixing actors.

// fixing actors already in the map
        for j allsprites
        {
                switch .picnum
                        
                        case 1312 set .picnum 3650 break
                        case 2120 set .picnum 3585 break
                        case 2150 set .picnum 3646 break
                        case 2165 set .picnum 3670 break
                        case 3400 set .picnum 3660 break

                endswitch
        }
// fixing actors which spawn on triggers
        for i allsprites, ifactor RESPAWN
        {
                switch .hitag
                        
                        case 1312 set .hitag 3650 addlogvar .x addlogvar .y break
                        case 2120 set .hitag 3585 addlogvar .x addlogvar .y break
                        case 2150 set .hitag 3646 addlogvar .x addlogvar .y break
                        case 2165 set .hitag 3670 addlogvar .x addlogvar .y break
                        case 3400 set .hitag 3660 addlogvar .x addlogvar .y break
                        
                endswitch
        }
endevent