comparison src/s_merge.cc @ 107:20aa5a515896

Reformat one line /* */ comments to //
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 06 Oct 2014 12:42:55 +0300
parents a68786b9c74b
children
comparison
equal deleted inserted replaced
106:093497110727 107:20aa5a515896
38 38
39 /* 39 /*
40 merge two or more Sectors into one 40 merge two or more Sectors into one
41 */ 41 */
42 42
43 void MergeSectors(SelPtr * slist) /* SWAP! */ 43 void MergeSectors(SelPtr * slist) // SWAP!
44 { 44 {
45 SelPtr cur; 45 SelPtr cur;
46 int n, olds, news; 46 int n, olds, news;
47 47
48 /* save the first Sector number */ 48 // save the first Sector number
49 news = (*slist)->objnum; 49 news = (*slist)->objnum;
50 UnSelectObject(slist, news); 50 UnSelectObject(slist, news);
51 51
52 /* change all SideDefs references to the other Sectors */ 52 // change all SideDefs references to the other Sectors
53 for (cur = *slist; cur; cur = cur->next) 53 for (cur = *slist; cur; cur = cur->next)
54 { 54 {
55 olds = cur->objnum; 55 olds = cur->objnum;
56 for (n = 0; n < NumSideDefs; n++) 56 for (n = 0; n < NumSideDefs; n++)
57 { 57 {
58 if (SideDefs[n].sector == olds) 58 if (SideDefs[n].sector == olds)
59 SideDefs[n].sector = news; 59 SideDefs[n].sector = news;
60 } 60 }
61 } 61 }
62 62
63 /* delete the Sectors */ 63 // delete the Sectors
64 DeleteObjects(OBJ_SECTORS, slist); 64 DeleteObjects(OBJ_SECTORS, slist);
65 65
66 /* the returned list contains only the first Sector */ 66 // the returned list contains only the first Sector
67 SelectObject(slist, news); 67 SelectObject(slist, news);
68 } 68 }
69 69
70 70
71 71
72 /* 72 /*
73 delete one or several two-sided LineDefs and join the two Sectors 73 delete one or several two-sided LineDefs and join the two Sectors
74 */ 74 */
75 75
76 void DeleteLineDefsJoinSectors(SelPtr * ldlist) /* SWAP! */ 76 void DeleteLineDefsJoinSectors(SelPtr * ldlist) // SWAP!
77 { 77 {
78 SelPtr cur, slist; 78 SelPtr cur, slist;
79 int sd1, sd2; 79 int sd1, sd2;
80 int s1, s2; 80 int s1, s2;
81 char msg[80]; 81 char msg[80];
82 82
83 /* first, do the tests for all LineDefs */ 83 // first, do the tests for all LineDefs
84 for (cur = *ldlist; cur; cur = cur->next) 84 for (cur = *ldlist; cur; cur = cur->next)
85 { 85 {
86 sd1 = LineDefs[cur->objnum].sidedef1; 86 sd1 = LineDefs[cur->objnum].sidedef1;
87 sd2 = LineDefs[cur->objnum].sidedef2; 87 sd2 = LineDefs[cur->objnum].sidedef2;
88 if (sd1 < 0 || sd2 < 0) 88 if (sd1 < 0 || sd2 < 0)
102 Notify(-1, -1, msg, "side is not bound to any sector"); 102 Notify(-1, -1, msg, "side is not bound to any sector");
103 return; 103 return;
104 } 104 }
105 } 105 }
106 106
107 /* then join the Sectors and delete the LineDefs */ 107 // then join the Sectors and delete the LineDefs
108 for (cur = *ldlist; cur; cur = cur->next) 108 for (cur = *ldlist; cur; cur = cur->next)
109 { 109 {
110 sd1 = LineDefs[cur->objnum].sidedef1; 110 sd1 = LineDefs[cur->objnum].sidedef1;
111 sd2 = LineDefs[cur->objnum].sidedef2; 111 sd2 = LineDefs[cur->objnum].sidedef2;
112 s1 = SideDefs[sd1].sector; 112 s1 = SideDefs[sd1].sector;