Subversion Repositories nw_plus

Rev

Rev 20 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 20 Rev 21
1
/*
1
/*
2
 VERY IMPORTANT!
2
 VERY IMPORTANT!
3
 This file is designed to convert any user maps you have made to combatibility with NW+
3
 This file is designed to convert any user maps you have made to combatibility with NW+
4
 This will move the numbers of certain sounds and change the tile numbers of certain sprites.
4
 This will move the numbers of certain sounds and change the tile numbers of certain sprites.
5
 
5
 
6
 It has already been run on the maps included with NW+ (Nuclear Winter, Demo, Zoo).
6
 It has already been run on the maps included with NW+ (Nuclear Winter, Demo, Zoo).
7
 
7
 
8
 Before use, follow the instructions about uncommenting code below.
8
 Before use, follow the instructions about uncommenting code below.
9
 
9
 
10
 To use, open the console in Mapster32 and type:
10
 To use, open the console in Mapster32 and type:
11
 include nwfix
11
 include nwfix
12
 enableevent all
12
 enableevent all
13
 
13
 
14
 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.
14
 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.
15
 Save your map.  Open your next map, switch to 3D mode, etc.  Repeat.  You do not have to type the commands again.
15
 Save your map.  Open your next map, switch to 3D mode, etc.  Repeat.  You do not have to type the commands again.
16
 
16
 
17
 Then follow the instructions abuot uncommenting code and repeat the procedure for your maps.
17
 Then follow the instructions abuot uncommenting code and repeat the procedure for your maps.
18
 
18
 
19
 Notes about replacing the actors: (see "Fixing actors.")
19
 Notes about replacing the actors: (see "Fixing actors.")
20
 You must only uncomment one step at a time (the same step in both allsprites and the RESPAWN cases).
20
 You must only uncomment one step at a time (the same step in both allsprites and the RESPAWN cases).
21
 You must run Step 1 before Step 2 and Step 2 after Step 1.
21
 You must run Step 1 before Step 2 and Step 2 after Step 1.
22
 Do not run Step 1 ever again after running Step 2.
22
 Do not run Step 1 ever again after running Step 2.
23
 
23
 
24
 Not following these directions will fuck up your maps.
24
 Not following these directions will fuck up your maps.
25
 
25
 
26
 ALWAYS MAKE BACKUPS OF YOUR MAPS!
26
 ALWAYS MAKE BACKUPS OF YOUR MAPS!
27
*/
27
*/
28
28
29
include DEFS.CON
29
include DEFS.CON
30
include NWDefs.con
30
include NWDefs.con
31
31
32
gamevar i 0 0
32
gamevar i 0 0
33
gamevar k 0 0
33
gamevar k 0 0
34
gamevar l 0 0
34
gamevar l 0 0
35
35
36
onevent EVENT_DRAW2DSCREEN
36
onevent EVENT_DRAW2DSCREEN
37
// Fixing sounds.
37
// Fixing sounds.
38
    for i allsprites, ifactor MUSICANDSFX
38
	for i allsprites, ifactor MUSICANDSFX
39
    {
39
	{
40
// fixing ambient sounds
40
// fixing ambient sounds
41
      switch .lotag
41
	switch .lotag
42
42
43
        case 91
43
		case 91
44
        case 308
44
		case 308
45
          set .lotag 426
45
			set .lotag 426
46
        break
46
			break
47
47
48
        case 244
48
		case 244
49
          set .lotag 438
49
			set .lotag 438
50
        break
50
			break
51
      endswitch
51
	endswitch
52
    }
52
	}
53
53
54
54
55
// fixing one-time sector sounds
55
// fixing one-time sector sounds
56
    for k allsectors
56
	for k allsectors
57
    {
57
	{
58
      switch sector[k].lotag
58
	switch sector[k].lotag
59
59
60
        case 10091
60
		case 10091
61
        case 10308
61
		case 10308
62
          set sector[k].lotag 10426
62
			set sector[k].lotag 10426
63
        break
63
			break
64
64
65
        case 10244
65
		case 10244
66
          set sector[k].lotag 10438
66
			set sector[k].lotag 10438
67
        break
67
			break
68
68
69
      endswitch
69
	endswitch
-
 
70
-
 
71
/*
-
 
72
	ifvarg sector[k].lotag 9999
-
 
73
		ifvarl sector[k].lotag 20000
-
 
74
		{
-
 
75
			al k
70
      // setsector[k].lotag l
76
			al sector[k].lotag
-
 
77
		}
-
 
78
*/
-
 
79
-
 
80
	// texture replacements:
-
 
81
	switch sector[k].floorpicnum
-
 
82
	
-
 
83
		case 198
-
 
84
			ifvare sector[k].floorpal 1
-
 
85
			{
-
 
86
				al k
-
 
87
				set sector[k].floorpicnum 3670
-
 
88
				set sector[k].floorpal 0
-
 
89
			}
-
 
90
			break
-
 
91
-
 
92
	endswitch
-
 
93
	switch sector[k].ceilingpicnum
-
 
94
	
-
 
95
		case 198
-
 
96
			ifvare sector[k].ceilingpal 1
-
 
97
			{
-
 
98
				al k
-
 
99
				set sector[k].ceilingpicnum 3670
-
 
100
				set sector[k].ceilingpal 0
71
    }
101
			}
-
 
102
			break
-
 
103
-
 
104
	endswitch
-
 
105
	}
-
 
106
-
 
107
	for k allwalls
-
 
108
	{
-
 
109
		ifvare wall[k].pal 1
-
 
110
		{
-
 
111
			switch wall[k].picnum
-
 
112
	
-
 
113
				case 198
-
 
114
					al k
-
 
115
					set wall[k].picnum 3670
-
 
116
					set wall[k].pal 0
-
 
117
					break
-
 
118
	
-
 
119
			endswitch
-
 
120
			switch wall[k].overpicnum
-
 
121
		
-
 
122
				case 198
-
 
123
					al k
-
 
124
					set wall[k].overpicnum 3670
-
 
125
					set wall[k].pal 0
-
 
126
					break
-
 
127
	
-
 
128
			endswitch
-
 
129
		}
-
 
130
	}
72
131
73
// Fixing actors.
132
// Fixing actors.
74
133
75
// fixing actors already in the map
134
// fixing actors already in the map
76
    for i allsprites
135
	for i allsprites
77
    {
136
	{
78
      switch .picnum
137
	switch .picnum
79
/*
138
/*
80
// Step 1: Santa
139
// Step 1: Santa
81
        case 2000 set .picnum 3900 break
140
		case 2000 set .picnum 3900 break
82
        case 2045 set .picnum 3905 break
141
		case 2045 set .picnum 3905 break
83
*/
142
*/
84
/*
143
/*
85
// Step 2: Pig Cops
144
// Step 2: Pig Cops
86
        case 2002 set .picnum 2000 break
145
		case 2002 set .picnum 2000 break
87
        case 2003 set .picnum 2001 break
146
		case 2003 set .picnum 2001 break
88
        case 2047 set .picnum 2045 break
147
		case 2047 set .picnum 2045 break
89
*/
148
*/
90
      endswitch
149
	endswitch
91
    }
150
	}
92
// fixing actors which spawn on triggers
151
// fixing actors which spawn on triggers
93
    for i allsprites, ifactor RESPAWN
152
	for i allsprites, ifactor RESPAWN
94
    {
153
	{
95
      switch .hitag
154
	switch .hitag
96
/*
155
/*
97
// Step 1: Santa
156
// Step 1: Santa
98
        case 2000 set .hitag 3900 addlogvar .x addlogvar .y break
157
		case 2000 set .hitag 3900 addlogvar .x addlogvar .y break
99
        case 2045 set .hitag 3905 addlogvar .x addlogvar .y break
158
		case 2045 set .hitag 3905 addlogvar .x addlogvar .y break
100
*/
159
*/
101
/*
160
/*
102
// Step 2: Pig Cops
161
// Step 2: Pig Cops
103
        case 2002 set .hitag 2000 addlogvar .x addlogvar .y break
162
		case 2002 set .hitag 2000 addlogvar .x addlogvar .y break
104
        case 2003 set .hitag 2001 addlogvar .x addlogvar .y break
163
		case 2003 set .hitag 2001 addlogvar .x addlogvar .y break
105
        case 2047 set .hitag 2045 addlogvar .x addlogvar .y break
164
		case 2047 set .hitag 2045 addlogvar .x addlogvar .y break
106
*/
165
*/
107
      endswitch
166
	endswitch
108
    }
167
	}
109
endevent
168
endevent