* a.m32: new state 'correctslopes' which will check all ceilings and floors for a stat&2 and heinum mismatch and correct accordingly (the result isn't visible, but such an inconsistency can prevent planes from TROR-joining)

* helper feature: when shade preview is enabled, the ceilings and floors of highlighted sectors are shown in pal 6. This makes it possible to highlight the TROR-joining candidate sectors in 3D mode using e.g. 'sethighlightsector searchsector 1' while aiming at the respective ceilings and floors, and get visual feedback.
* when failing TROR-joining early ('no consistent joining combinations found'), print to the console why it failed.
* more Makefile.deps updating

git-svn-id: https://svn.eduke32.com/eduke32@1952 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2011-07-30 13:03:07 +00:00
parent 4124618874
commit 0713c44219
6 changed files with 112 additions and 11 deletions

View File

@ -4,10 +4,13 @@ duke3d_h=\
$(EINC)/build.h \
$(EINC)/baselayer.h \
$(EINC)/polymer.h \
$(EINC)/polymost.h \
$(EINC)/cache1d.h \
$(SRC)/jmact/file_lib.h \
$(SRC)/jmact/keyboard.h \
$(SRC)/jmact/control.h \
$(SRC)/jmact/mathutil.h \
$(SRC)/macros.h \
$(INC)/gamedefs.h \
$(INC)/function.h \
$(INC)/config.h \
@ -52,9 +55,43 @@ $(OBJ)/osdcmds.$o: $(SRC)/osdcmds.c $(INC)/osdcmds.h $(EINC)/osd.h $(duke3d_h)
$(OBJ)/animvpx.$o: $(SRC)/animvpx.c $(SRC)/animvpx.h $(duke3d_h) $(EINC)/glbuild.h
# editor objects
m32_script_hs=$(EINC)/m32script.h $(SRC)/m32def.h
$(OBJ)/astub.$o: $(SRC)/astub.c \
$(EINC)/compat.h \
$(EINC)/build.h \
$(EINC)/editor.h \
$(EINC)/pragmas.h \
$(EINC)/baselayer.h \
$(EINC)/osd.h \
$(EINC)/cache1d.h \
$(EINC)/crc32.h \
$(EINC)/scriptfile.h \
$(EINC)/quicklz.h \
$(SRC)/macros.h \
$(SRC)/osdfuncs.h \
$(SRC)/names.h \
$(SRC)/mapster32.h \
$(SRC)/keys.h \
$(m32_script_hs)
$(OBJ)/sounds_mapster32.$o: $(SRC)/sounds_mapster32.c \
$(SRC)/sounds_mapster32.h \
$(EINC)/compat.h \
$(EINC)/baselayer.h \
$(EINC)/cache1d.h \
$(EINC)/build.h \
$(EINC)/editor.h \
$(EINC)/osd.h \
$(SRC)/macros.h \
$(JAUDIOLIBDIR)/include/fx_man.h \
$(SRC)/jmact/mathutil.h
$(OBJ)/astub.$o: $(SRC)/astub.c $(SRC)/mapster32.h $(EINC)/build.h $(EINC)/pragmas.h $(EINC)/compat.h $(EINC)/editor.h
$(OBJ)/m32def.$o: $(SRC)/m32def.c $(m32_script_hs) $(EINC)/cache1d.h $(SRC)/sounds_mapster32.h $(SRC)/keys.h
$(OBJ)/m32exec.$o: $(SRC)/m32exec.c $(m32_script_hs) $(SRC)/sounds_mapster32.h $(EINC)/osd.h $(SRC)/keys.h $(JAUDIOLIBDIR)/include/fx_man.h
$(OBJ)/m32structures.$o: $(SRC)/m32structures.c $(m32_script_hs) $(EINC)/compat.h $(EINC)/prlights.h
$(OBJ)/m32vars.$o: $(SRC)/m32vars.c $(SRC)/m32structures.c $(m32_script_hs) $(EINC)/osd.h $(SRC)/keys.h $(EINC)/polymer.h
# misc objects
$(OBJ)/game_icon.$o: $(RSRC)/game_icon.c
$(OBJ)/build_icon.$o: $(RSRC)/build_icon.c
@ -71,7 +108,7 @@ $(OBJ)/file_lib.$o: $(SRC)/jmact/file_lib.c $(SRC)/jmact/file_lib.h
$(OBJ)/control.$o: $(SRC)/jmact/control.c $(SRC)/jmact/control.h $(SRC)/jmact/keyboard.h $(SRC)/jmact/mouse.h $(EINC)/baselayer.h
$(OBJ)/keyboard.$o: $(SRC)/jmact/keyboard.c $(SRC)/jmact/keyboard.h $(EINC)/compat.h $(EINC)/baselayer.h
$(OBJ)/mouse.$o: $(SRC)/jmact/mouse.c $(SRC)/jmact/mouse.h $(EINC)/baselayer.h
$(OBJ)/mathutil.$o: $(SRC)/jmact/mathutil.c
$(OBJ)/mathutil.$o: $(SRC)/jmact/mathutil.c $(EINC)/compat.h $(EINC)/pragmas.h
$(OBJ)/scriplib.$o: $(SRC)/jmact/scriplib.c $(SRC)/jmact/scriplib.h $(SRC)/jmact/_scrplib.h $(EINC)/compat.h
# jAudioLib objects
@ -83,7 +120,7 @@ $(OBJ)/mv_mix-c.$o: $(SRC)/jaudiolib/mv_mix-c.c
$(OBJ)/mvreverb-c.$o: $(SRC)/jaudiolib/mvreverb-c.c
$(OBJ)/pitch.$o: $(SRC)/jaudiolib/pitch.c $(SRC)/jaudiolib/pitch.h
$(OBJ)/multivoc.$o: $(SRC)/jaudiolib/multivoc.c $(SRC)/jaudiolib/linklist.h $(SRC)/jaudiolib/pitch.h $(SRC)/jaudiolib/multivoc.h $(SRC)/jaudiolib/_multivc.h
$(OBJ)/fx_man.$o: $(SRC)/jaudiolib/fx_man.c $(SRC)/jaudiolib/multivoc.h $(SRC)/jaudiolib/ll_man.h $(SRC)/jaudiolib/fx_man.h
$(OBJ)/fx_man.$o: $(SRC)/jaudiolib/fx_man.c $(SRC)/jaudiolib/multivoc.h $(SRC)/jaudiolib/ll_man.h $(JAUDIOLIBDIR)/include/fx_man.h
$(OBJ)/dsoundout.$o: $(SRC)/jaudiolib/dsoundout.c $(SRC)/jaudiolib/dsoundout.h
$(OBJ)/openal.$o: $(SRC)/jaudiolib/openal.c $(SRC)/jaudiolib/openal.h
$(OBJ)/dsl.$o: $(SRC)/jaudiolib/dsl.c $(SRC)/jaudiolib/dsl.h $(EINC)/compat.h

View File

@ -4699,6 +4699,9 @@ end_point_dragging:
if (joinstat==0)
{
message("No consistent joining combination found");
OSD_Printf("comp0: c=%d,f=%d; comp1: c=%d,f=%d (1:extended, 2:z mismatch, 4:sloped)\n",
compstat[0][YAX_CEILING], compstat[0][YAX_FLOOR],
compstat[1][YAX_CEILING], compstat[1][YAX_FLOOR]);
//for (i=0; i<2; i++) for (j=0; j<2; j++) message("%d", compstat[i][j]);
goto end_join_sectors;
}

View File

@ -1185,6 +1185,51 @@ defstate chselshade
}
ends
defstate correctslopes
for i allsectors
{
set j sector[i].ceilingstat, and j 2
ife j 2
{
ife sector[i].ceilingheinum 0
{
sub sector[i].ceilingstat 2
qsprintf TQUOTE "sec %d ceilingstat cleared bit 2" i
quote TQUOTE
}
}
else
{
ifn sector[i].ceilingheinum 0
{
set sector[i].ceilingheinum 0
qsprintf TQUOTE "sec %d ceilingheinum set to 0" i
quote TQUOTE
}
}
set j sector[i].floorstat, and j 2
ife j 2
{
ife sector[i].floorheinum 0
{
sub sector[i].floorstat 2
qsprintf TQUOTE "sec %d floorstat cleared bit 2" i
quote TQUOTE
}
}
else
{
ifn sector[i].floorheinum 0
{
set sector[i].floorheinum 0
qsprintf TQUOTE "sec %d floorheinum set to 0" i
quote TQUOTE
}
}
}
ends
////////// USER AREA //////////
// key settings

View File

@ -25,11 +25,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "editor.h"
#include "pragmas.h"
#include "baselayer.h"
#include "names.h"
#include "osd.h"
#include "osdfuncs.h"
#include "cache1d.h"
#include "osdfuncs.h"
#include "names.h"
#include "mapster32.h"
#include "keys.h"
@ -9194,7 +9195,8 @@ static int32_t osdcmd_do(const osdfuncparm_t *parm)
if (vm.updatehighlightsector)
{
update_highlightsector();
ovh_whiteoutgrab(1);
if (qsetmode != 200)
ovh_whiteoutgrab(1);
vm.updatehighlightsector = 0;
}
@ -10498,6 +10500,15 @@ void ExtPreCheckKeys(void) // just before drawrooms
{
if (shadepreview)
{
for (i=0; i<highlightsectorcnt; i++)
{
ii = highlightsector[i];
sectorpals[ii][0] = sector[ii].floorpal;
sectorpals[ii][1] = sector[ii].ceilingpal;
sector[ii].floorpal = sector[ii].ceilingpal = 6;
}
// int32_t i = 0;
for (i=0; i<MAXSPRITES; i++)
{
@ -11105,9 +11116,16 @@ void ExtCheckKeys(void)
if (qsetmode == 200 && shadepreview)
{
int32_t i = 0;
int32_t i = 0, ii;
int32_t w, isec, start_wall, end_wall;
for (i=0; i<highlightsectorcnt; i++)
{
ii = highlightsector[i];
sector[ii].floorpal = sectorpals[ii][0];
sector[ii].ceilingpal = sectorpals[ii][1];
}
for (i=0; i<MAXSPRITES; i++)
{
if (sprite[i].statnum==MAXSTATUS || sprite[i].picnum != SECTOREFFECTOR)

View File

@ -197,7 +197,8 @@ void VM_OnEvent(register int32_t iEventID, register int32_t iActor)
if (vm.updatehighlightsector)
{
update_highlightsector();
ovh_whiteoutgrab(1);
if (qsetmode != 200)
ovh_whiteoutgrab(1);
vm.updatehighlightsector = 0;
}

View File

@ -22,7 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// Stripped sounds.c for use in Mapster32, breaks all ties to game & music
//#include <conio.h>
#include <stdio.h>
#include <string.h>
@ -30,8 +29,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "baselayer.h"
#include "fx_man.h"
//#include "music.h"
//#include "duke3d.h"
#include "osd.h"
#include "cache1d.h"