Subversion Repositories eduke32

Rev

Rev 5198 | Rev 6055 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5198 Rev 5201
Line 32... Line 32...
32
#include "keys.h"
32
#include "keys.h"
33
#include "names2.h"
33
#include "names2.h"
34
#include "game.h"
34
#include "game.h"
35
35
36
36
37
extern int posx, posy, posz;
-
 
38
extern short cursectnum;
-
 
39
extern short ang;
-
 
40
extern int horiz;
-
 
41
extern int qsetmode;
37
extern int qsetmode;
42
38
43
SWBOOL FindCeilingView(short match, int32_t* x, int32_t* y, int32_t z, int16_t* sectnum);
39
SWBOOL FindCeilingView(short match, int32_t* x, int32_t* y, int32_t z, int16_t* sectnum);
44
SWBOOL FindFloorView(short match, int32_t* x, int32_t* y, int32_t z, int16_t* sectnum);
40
SWBOOL FindFloorView(short match, int32_t* x, int32_t* y, int32_t z, int16_t* sectnum);
45
short ViewSectorInScene(short cursectnum, short type, short level);
41
short ViewSectorInScene(short cursectnum, short type, short level);
Line 101... Line 97...
101
        }
97
        }
102
    }
98
    }
103
99
104
    if (FAFon && qsetmode == 200)
100
    if (FAFon && qsetmode == 200)
105
    {
101
    {
106
        DrawOverlapRoom(posx, posy, posz, ang, horiz, cursectnum);
102
        DrawOverlapRoom(pos.x, pos.y, pos.z, ang, horiz, cursectnum);
107
103
108
        // make it so that you can edit both areas in 3D
104
        // make it so that you can edit both areas in 3D
109
        // back up vars after the first drawrooms
105
        // back up vars after the first drawrooms
110
        bak_searchsector = searchsector;
106
        bak_searchsector = searchsector;
111
        bak_searchwall = searchwall;
107
        bak_searchwall = searchwall;
Line 119... Line 115...
119
        int tx,ty,tz;
115
        int tx,ty,tz;
120
        short tsectnum;
116
        short tsectnum;
121
        short i;
117
        short i;
122
        keystatus[KEYSC_4] = FALSE;
118
        keystatus[KEYSC_4] = FALSE;
123
119
124
        tx = posx;
120
        tx = pos.x;
125
        ty = posy;
121
        ty = pos.y;
126
        tz = posz;
122
        tz = pos.z;
127
        tsectnum = cursectnum;
123
        tsectnum = cursectnum;
128
124
129
        save.zcount = 0;
125
        save.zcount = 0;
130
126
131
        if (sector[cursectnum].ceilingpicnum == FAF_MIRROR_PIC)
127
        if (sector[cursectnum].ceilingpicnum == FAF_MIRROR_PIC)
Line 134... Line 130...
134
130
135
            FAF_DontMoveSectors = TRUE;
131
            FAF_DontMoveSectors = TRUE;
136
            FindCeilingView(match, &tx, &ty, tz, &tsectnum);
132
            FindCeilingView(match, &tx, &ty, tz, &tsectnum);
137
            FAF_DontMoveSectors = FALSE;
133
            FAF_DontMoveSectors = FALSE;
138
134
139
            posx = tx;
135
            pos.x = tx;
140
            posy = ty;
136
            pos.y = ty;
141
            cursectnum = tsectnum;
137
            cursectnum = tsectnum;
142
            posz = sector[cursectnum].floorz - Z(20);
138
            pos.z = sector[cursectnum].floorz - Z(20);
143
        }
139
        }
144
        else if (sector[cursectnum].floorpicnum == FAF_MIRROR_PIC)
140
        else if (sector[cursectnum].floorpicnum == FAF_MIRROR_PIC)
145
        {
141
        {
146
            match = ViewSectorInScene(tsectnum, VIEW_THRU_FLOOR, VIEW_LEVEL2);
142
            match = ViewSectorInScene(tsectnum, VIEW_THRU_FLOOR, VIEW_LEVEL2);
147
143
148
            FAF_DontMoveSectors = TRUE;
144
            FAF_DontMoveSectors = TRUE;
149
            FindFloorView(match, &tx, &ty, tz, &tsectnum);
145
            FindFloorView(match, &tx, &ty, tz, &tsectnum);
150
            FAF_DontMoveSectors = FALSE;
146
            FAF_DontMoveSectors = FALSE;
151
147
152
            posx = tx;
148
            pos.x = tx;
153
            posy = ty;
149
            pos.y = ty;
154
            cursectnum = tsectnum;
150
            cursectnum = tsectnum;
155
            posz = sector[cursectnum].ceilingz + Z(20);
151
            pos.z = sector[cursectnum].ceilingz + Z(20);
156
        }
152
        }
157
    }
153
    }
158
154
159
155
160
}
156
}
Line 690... Line 686...
690
    {
686
    {
691
        FindCeilingView(match, &tx, &ty, tz, &tsectnum);
687
        FindCeilingView(match, &tx, &ty, tz, &tsectnum);
692
688
693
        if (tsectnum < 0)
689
        if (tsectnum < 0)
694
        {
690
        {
695
            sprintf(ds,"COULD NOT FIND TAGGED LEVEL2 SECTOR FROM X %d, Y %d, SECTNUM %d.",posx,posy,cursectnum);
691
            sprintf(ds,"COULD NOT FIND TAGGED LEVEL2 SECTOR FROM X %d, Y %d, SECTNUM %d.",pos.x,pos.y,cursectnum);
696
            Message(ds, 0);
692
            Message(ds, 0);
697
            return;
693
            return;
698
        }
694
        }
699
695
700
        drawrooms(tx, ty, tz, tang, thoriz, tsectnum);
696
        drawrooms(tx, ty, tz, tang, thoriz, tsectnum);
Line 715... Line 711...
715
        {
711
        {
716
            FindFloorView(match, &tx, &ty, tz, &tsectnum);
712
            FindFloorView(match, &tx, &ty, tz, &tsectnum);
717
713
718
            if (tsectnum < 0)
714
            if (tsectnum < 0)
719
            {
715
            {
720
                sprintf(ds,"COULD NOT FIND TAGGED LEVEL1 SECTOR FROM X %d, Y %d, SECTNUM %d.",posx,posy,cursectnum);
716
                sprintf(ds,"COULD NOT FIND TAGGED LEVEL1 SECTOR FROM X %d, Y %d, SECTNUM %d.",pos.x,pos.y,cursectnum);
721
                Message(ds, 0);
717
                Message(ds, 0);
722
                return;
718
                return;
723
            }
719
            }
724
720
725
            drawrooms(tx, ty, tz, tang, thoriz, tsectnum);
721
            drawrooms(tx, ty, tz, tang, thoriz, tsectnum);