mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
Add the Shadow Warrior source to our tree after astyling, uncrustifying, and renaming one file.
git-svn-id: https://svn.eduke32.com/eduke32@5196 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
086a9da9ee
commit
7493c36a94
157 changed files with 139815 additions and 0 deletions
90
polymer/eduke32/source/sw/Makefile.deps
Normal file
90
polymer/eduke32/source/sw/Makefile.deps
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
build_h=$(ENGINE_INC)/build.h $(ENGINE_INC)/compat.h
|
||||||
|
panel_h=$(SW_INC)/panel.h $(SW_INC)/mytypes.h $(SW_INC)/game.h $(SW_INC)/conpic.h
|
||||||
|
names2_h=$(SW_INC)/names2.h $(SW_INC)/names.h
|
||||||
|
game_h=$(SW_INC)/game.h $(SW_INC)/mytypes.h $(MACT_ROOT)/keyboard.h $(SW_INC)/sounds.h $(SW_INC)/settings.h $(SW_INC)/digi.h $(SW_INC)/damage.h $(SW_INC)/inv.h $(SW_INC)/stag.h
|
||||||
|
tags_h=$(SW_INC)/tags.h $(SW_INC)/jtags.h
|
||||||
|
|
||||||
|
$(SW_OBJ)/actor.$o: $(SW_SRC)/actor.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(tags_h) $(SW_INC)/weapon.h $(SW_INC)/sprite.h $(SW_INC)/actor.h $(SW_INC)/saveable.h
|
||||||
|
$(SW_OBJ)/ai.$o: $(SW_SRC)/ai.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(game_h) $(tags_h) $(SW_INC)/ninja.h $(SW_INC)/ai.h $(SW_INC)/sector.h $(SW_INC)/sprite.h $(SW_INC)/net.h $(SW_INC)/saveable.h
|
||||||
|
$(SW_OBJ)/anim.$o: $(SW_SRC)/anim.c $(build_h) $(SW_INC)/keys.h $(SW_INC)/mytypes.h $(MACT_ROOT)/develop.h $(AUDIOLIB_INC)/fx_man.h $(AUDIOLIB_INC)/music.h $(MACT_ROOT)/scriplib.h $(MACT_ROOT)/file_lib.h $(SW_INC)/gamedefs.h $(MACT_ROOT)/keyboard.h $(MACT_ROOT)/util_lib.h $(MACT_ROOT)/control.h $(SW_INC)/config.h $(SW_INC)/sounds.h $(SW_INC)/function.h $(MACT_ROOT)/animlib.h $(SW_INC)/anim.h $(game_h) $(SW_INC)/colormap.h $(SW_INC)/net.h
|
||||||
|
$(SW_OBJ)/border.$o: $(SW_SRC)/border.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(panel_h) $(SW_INC)/lists.h $(game_h) $(SW_INC)/net.h $(SW_INC)/text.h
|
||||||
|
$(SW_OBJ)/break.$o: $(SW_SRC)/break.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(tags_h) $(SW_INC)/break.h $(SW_INC)/sprite.h $(SW_INC)/sector.h $(SW_INC)/light.h $(SW_INC)/weapon.h
|
||||||
|
$(SW_OBJ)/bunny.$o: $(SW_SRC)/bunny.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(tags_h) $(SW_INC)/ai.h $(SW_INC)/pal.h $(SW_INC)/sprite.h $(SW_INC)/actor.h $(SW_INC)/weapon.h $(SW_INC)/track.h $(SW_INC)/saveable.h
|
||||||
|
$(SW_OBJ)/cache.$o: $(SW_SRC)/cache.c $(build_h) $(names2_h) $(game_h) $(tags_h) $(SW_INC)/break.h $(SW_INC)/quake.h $(SW_INC)/pal.h $(SW_INC)/cache.h $(SW_INC)/sounds.h $(SW_INC)/net.h
|
||||||
|
$(SW_OBJ)/cd.$o: $(SW_SRC)/cd.c $(SW_INC)/mytypes.h $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(tags_h) $(SW_INC)/player.h $(SW_INC)/lists.h $(SW_INC)/warp.h $(SW_INC)/quake.h $(SW_INC)/function.h $(MACT_ROOT)/control.h $(SW_INC)/trigger.h $(SW_INC)/savedef.h $(SW_INC)/menus.h $(SW_INC)/net.h $(SW_INC)/pal.h
|
||||||
|
$(SW_OBJ)/cheats.$o: $(SW_SRC)/cheats.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(SW_INC)/mytypes.h $(MACT_ROOT)/control.h $(SW_INC)/function.h $(SW_INC)/text.h
|
||||||
|
$(SW_OBJ)/colormap.$o: $(SW_SRC)/colormap.c $(build_h) $(SW_INC)/keys.h $(SW_INC)/pal.h $(game_h)
|
||||||
|
$(SW_OBJ)/config.$o: $(SW_SRC)/config.c $(build_h) $(SW_INC)/settings.h $(SW_INC)/mytypes.h $(MACT_ROOT)/develop.h $(MACT_ROOT)/scriplib.h $(MACT_ROOT)/file_lib.h $(SW_INC)/gamedefs.h $(MACT_ROOT)/keyboard.h $(MACT_ROOT)/util_lib.h $(SW_INC)/function.h $(MACT_ROOT)/control.h $(AUDIOLIB_INC)/fx_man.h $(SW_INC)/sounds.h $(SW_INC)/config.h $(SW_INC)/common_game.h $(SW_INC)/_functio.h $(SW_INC)/_config.h
|
||||||
|
$(SW_OBJ)/console.$o: $(SW_SRC)/console.c $(build_h) $(SW_INC)/mytypes.h $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(tags_h) $(SW_INC)/player.h $(SW_INC)/lists.h $(SW_INC)/warp.h $(SW_INC)/quake.h $(SW_INC)/function.h $(MACT_ROOT)/control.h $(SW_INC)/trigger.h $(SW_INC)/savedef.h $(SW_INC)/menus.h $(SW_INC)/net.h $(SW_INC)/pal.h $(SW_INC)/weapon.h $(SW_INC)/text.h $(SW_INC)/jsector.h
|
||||||
|
$(SW_OBJ)/coolg.$o: $(SW_SRC)/coolg.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(game_h) $(tags_h) $(SW_INC)/ai.h $(SW_INC)/sprite.h $(SW_INC)/actor.h $(SW_INC)/weapon.h $(SW_INC)/track.h $(SW_INC)/saveable.h
|
||||||
|
$(SW_OBJ)/coolie.$o: $(SW_SRC)/coolie.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(tags_h) $(SW_INC)/ai.h $(SW_INC)/sprite.h $(SW_INC)/actor.h $(SW_INC)/track.h $(SW_INC)/weapon.h $(SW_INC)/saveable.h
|
||||||
|
$(SW_OBJ)/copysect.$o: $(SW_SRC)/copysect.c $(build_h) $(names2_h) $(game_h) $(tags_h) $(SW_INC)/weapon.h $(SW_INC)/sprite.h $(SW_INC)/track.h
|
||||||
|
$(SW_OBJ)/demo.$o: $(SW_SRC)/demo.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(SW_INC)/net.h $(SW_INC)/mytypes.h $(MACT_ROOT)/control.h $(SW_INC)/function.h $(SW_INC)/demo.h $(SW_INC)/player.h $(SW_INC)/menus.h
|
||||||
|
$(SW_OBJ)/draw.$o: $(SW_SRC)/draw.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(SW_INC)/quake.h $(SW_INC)/vis.h $(SW_INC)/jsector.h $(SW_INC)/reserve.h $(SW_INC)/mytypes.h $(MACT_ROOT)/control.h $(SW_INC)/function.h $(SW_INC)/net.h $(SW_INC)/pal.h $(SW_INC)/player.h $(SW_INC)/jtags.h $(SW_INC)/parent.h $(SW_INC)/cache.h $(SW_INC)/text.h $(SW_INC)/menus.h $(SW_INC)/interp.h $(SW_INC)/sector.h
|
||||||
|
$(SW_OBJ)/eel.$o: $(SW_SRC)/eel.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(game_h) $(tags_h) $(SW_INC)/ai.h $(SW_INC)/actor.h $(SW_INC)/weapon.h $(SW_INC)/track.h $(SW_INC)/saveable.h
|
||||||
|
$(SW_OBJ)/game.$o: $(SW_SRC)/game.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(tags_h) $(SW_INC)/sector.h $(SW_INC)/sprite.h $(SW_INC)/weapon.h $(SW_INC)/player.h $(SW_INC)/lists.h $(SW_INC)/net.h $(SW_INC)/pal.h $(AUDIOLIB_INC)/fx_man.h $(SW_INC)/mytypes.h $(SW_INC)/menus.h $(MACT_ROOT)/control.h $(SW_INC)/function.h $(SW_INC)/demo.h $(SW_INC)/cache.h $(SW_INC)/anim.h $(SW_INC)/colormap.h $(SW_INC)/break.h $(SW_INC)/ninja.h $(SW_INC)/light.h $(SW_INC)/track.h $(SW_INC)/jsector.h $(MACT_ROOT)/keyboard.h $(SW_INC)/text.h $(AUDIOLIB_INC)/music.h $(SW_INC)/saveable.h
|
||||||
|
$(SW_OBJ)/girlninj.$o: $(SW_SRC)/girlninj.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(tags_h) $(SW_INC)/ai.h $(SW_INC)/pal.h $(SW_INC)/player.h $(SW_INC)/net.h $(SW_INC)/actor.h $(SW_INC)/track.h $(SW_INC)/sprite.h $(SW_INC)/saveable.h
|
||||||
|
$(SW_OBJ)/goro.$o: $(SW_SRC)/goro.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(game_h) $(tags_h) $(SW_INC)/ai.h $(SW_INC)/actor.h $(SW_INC)/track.h $(SW_INC)/saveable.h
|
||||||
|
$(SW_OBJ)/hornet.$o: $(SW_SRC)/hornet.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(game_h) $(tags_h) $(SW_INC)/ai.h $(SW_INC)/actor.h $(SW_INC)/weapon.h $(SW_INC)/track.h $(SW_INC)/sprite.h $(SW_INC)/saveable.h
|
||||||
|
$(SW_OBJ)/interp.$o: $(SW_SRC)/interp.c $(SW_INC)/interp.h
|
||||||
|
$(SW_OBJ)/interpsh.$o: $(SW_SRC)/interpsh.c $(SW_INC)/interp.h
|
||||||
|
$(SW_OBJ)/inv.$o: $(SW_SRC)/inv.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(SW_INC)/pal.h $(SW_INC)/text.h $(SW_INC)/colormap.h $(SW_INC)/player.h
|
||||||
|
$(SW_OBJ)/jplayer.$o: $(SW_SRC)/jplayer.c $(build_h) $(SW_INC)/mytypes.h $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(tags_h) $(SW_INC)/player.h $(SW_INC)/lists.h $(SW_INC)/warp.h $(SW_INC)/quake.h $(SW_INC)/function.h $(MACT_ROOT)/control.h $(SW_INC)/trigger.h $(SW_INC)/savedef.h $(SW_INC)/menus.h $(SW_INC)/net.h $(SW_INC)/pal.h $(SW_INC)/bots.h
|
||||||
|
$(SW_OBJ)/jsector.$o: $(SW_SRC)/jsector.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(SW_INC)/jnames.h $(panel_h) $(game_h) $(tags_h) $(SW_INC)/sector.h $(SW_INC)/player.h $(SW_INC)/sprite.h $(SW_INC)/reserve.h $(SW_INC)/jsector.h $(SW_INC)/jtags.h $(SW_INC)/lists.h $(SW_INC)/pal.h $(SW_INC)/parent.h
|
||||||
|
$(SW_OBJ)/jweapon.$o: $(SW_SRC)/jweapon.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(tags_h) $(SW_INC)/break.h $(SW_INC)/quake.h $(SW_INC)/net.h $(SW_INC)/pal.h $(SW_INC)/ai.h $(SW_INC)/weapon.h $(SW_INC)/sprite.h $(SW_INC)/sector.h $(SW_INC)/actor.h $(SW_INC)/saveable.h
|
||||||
|
$(SW_OBJ)/lava.$o: $(SW_SRC)/lava.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(tags_h) $(SW_INC)/ai.h $(SW_INC)/actor.h $(SW_INC)/track.h
|
||||||
|
$(SW_OBJ)/light.$o: $(SW_SRC)/light.c $(build_h) $(names2_h) $(game_h) $(SW_INC)/light.h
|
||||||
|
$(SW_OBJ)/mclip.$o: $(SW_SRC)/mclip.c $(build_h) $(SW_INC)/mytypes.h $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(tags_h) $(SW_INC)/player.h $(SW_INC)/mclip.h
|
||||||
|
$(SW_OBJ)/mdastr.$o: $(SW_SRC)/mdastr.c $(build_h) $(SW_INC)/mytypes.h $(SW_INC)/keys.h $(names2_h) $(game_h)
|
||||||
|
$(SW_OBJ)/menus.$o: $(SW_SRC)/menus.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(tags_h) $(SW_INC)/sector.h $(SW_INC)/sprite.h $(SW_INC)/weapon.h $(SW_INC)/player.h $(SW_INC)/jsector.h $(SW_INC)/reserve.h $(MACT_ROOT)/control.h $(SW_INC)/menus.h $(SW_INC)/sw_strs.h $(SW_INC)/pal.h $(SW_INC)/function.h $(SW_INC)/net.h $(AUDIOLIB_INC)/fx_man.h $(AUDIOLIB_INC)/music.h $(SW_INC)/text.h $(SW_INC)/colormap.h
|
||||||
|
$(SW_OBJ)/miscactr.$o: $(SW_SRC)/miscactr.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(tags_h) $(SW_INC)/ai.h $(SW_INC)/quake.h $(AUDIOLIB_INC)/fx_man.h $(SW_INC)/actor.h $(SW_INC)/sector.h $(SW_INC)/sprite.h $(SW_INC)/saveable.h
|
||||||
|
$(SW_OBJ)/morph.$o: $(SW_SRC)/morph.c $(build_h) $(names2_h) $(panel_h) $(game_h) $(tags_h) $(SW_INC)/sector.h $(SW_INC)/ai.h $(SW_INC)/player.h $(SW_INC)/saveable.h
|
||||||
|
$(SW_OBJ)/net.$o: $(SW_SRC)/net.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(tags_h) $(game_h) $(SW_INC)/net.h $(SW_INC)/pal.h $(SW_INC)/weapon.h $(SW_INC)/text.h $(SW_INC)/menus.h
|
||||||
|
$(SW_OBJ)/ninja.$o: $(SW_SRC)/ninja.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(tags_h) $(SW_INC)/ai.h $(SW_INC)/pal.h $(SW_INC)/player.h $(SW_INC)/net.h $(SW_INC)/weapon.h $(SW_INC)/track.h $(SW_INC)/actor.h $(SW_INC)/ninja.h $(SW_INC)/sprite.h $(SW_INC)/saveable.h
|
||||||
|
$(SW_OBJ)/panel.$o: $(SW_SRC)/panel.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(panel_h) $(SW_INC)/lists.h $(game_h) $(SW_INC)/net.h $(SW_INC)/pal.h $(SW_INC)/vis.h $(SW_INC)/weapon.h $(AUDIOLIB_INC)/fx_man.h $(SW_INC)/text.h $(SW_INC)/player.h $(SW_INC)/saveable.h
|
||||||
|
$(SW_OBJ)/player.$o: $(SW_SRC)/player.c $(build_h) $(SW_INC)/mytypes.h $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(tags_h) $(SW_INC)/player.h $(SW_INC)/lists.h $(SW_INC)/warp.h $(SW_INC)/quake.h $(SW_INC)/text.h $(SW_INC)/function.h $(MACT_ROOT)/control.h $(SW_INC)/trigger.h $(SW_INC)/savedef.h $(SW_INC)/menus.h $(SW_INC)/net.h $(SW_INC)/pal.h $(SW_INC)/demo.h $(SW_INC)/mclip.h $(AUDIOLIB_INC)/fx_man.h $(SW_INC)/sprite.h $(SW_INC)/weapon.h $(SW_INC)/ninja.h $(SW_INC)/break.h $(SW_INC)/jsector.h $(SW_INC)/sector.h $(SW_INC)/actor.h $(SW_INC)/colormap.h $(AUDIOLIB_INC)/music.h $(SW_INC)/vis.h $(SW_INC)/track.h $(SW_INC)/interp.h $(SW_INC)/saveable.h
|
||||||
|
$(SW_OBJ)/predict.$o: $(SW_SRC)/predict.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(SW_INC)/net.h
|
||||||
|
$(SW_OBJ)/quake.$o: $(SW_SRC)/quake.c $(build_h) $(names2_h) $(game_h) $(tags_h) $(SW_INC)/break.h $(SW_INC)/quake.h $(SW_INC)/sprite.h $(SW_INC)/saveable.h
|
||||||
|
$(SW_OBJ)/ripper.$o: $(SW_SRC)/ripper.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(tags_h) $(SW_INC)/ai.h $(SW_INC)/pal.h $(SW_INC)/actor.h $(SW_INC)/sprite.h $(SW_INC)/track.h $(SW_INC)/saveable.h
|
||||||
|
$(SW_OBJ)/ripper2.$o: $(SW_SRC)/ripper2.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(tags_h) $(SW_INC)/ai.h $(SW_INC)/pal.h $(SW_INC)/actor.h $(SW_INC)/sprite.h $(SW_INC)/track.h $(AUDIOLIB_INC)/fx_man.h $(SW_INC)/saveable.h
|
||||||
|
$(SW_OBJ)/rooms.$o: $(SW_SRC)/rooms.c $(build_h) $(names2_h) $(panel_h) $(game_h) $(SW_INC)/warp.h
|
||||||
|
$(SW_OBJ)/rotator.$o: $(SW_SRC)/rotator.c $(build_h) $(names2_h) $(panel_h) $(game_h) $(SW_INC)/net.h $(tags_h) $(SW_INC)/sector.h $(SW_INC)/text.h $(SW_INC)/interp.h $(SW_INC)/sprite.h $(SW_INC)/saveable.h
|
||||||
|
$(SW_OBJ)/rts.$o: $(SW_SRC)/rts.c $(SW_INC)/mytypes.h $(MACT_ROOT)/develop.h $(MACT_ROOT)/util_lib.h $(MACT_ROOT)/file_lib.h $(SW_INC)/_rts.h $(SW_INC)/rts.h $(SW_INC)/cache.h
|
||||||
|
$(SW_OBJ)/save.$o: $(SW_SRC)/save.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(tags_h) $(SW_INC)/lists.h $(SW_INC)/interp.h $(SW_INC)/net.h $(SW_INC)/savedef.h $(SW_INC)/jsector.h $(SW_INC)/parent.h $(SW_INC)/reserve.h $(SW_INC)/mfile.h $(SW_INC)/weapon.h $(SW_INC)/cache.h $(SW_INC)/colormap.h $(SW_INC)/player.h $(AUDIOLIB_INC)/fx_man.h $(AUDIOLIB_INC)/music.h $(SW_INC)/saveable.h
|
||||||
|
$(SW_OBJ)/scrip2.$o: $(SW_SRC)/scrip2.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(SW_INC)/parse.h $(SW_INC)/jsector.h $(SW_INC)/parent.h
|
||||||
|
$(SW_OBJ)/sector.$o: $(SW_SRC)/sector.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(tags_h) $(SW_INC)/sector.h $(SW_INC)/player.h $(SW_INC)/quake.h $(SW_INC)/weapon.h $(SW_INC)/jtags.h $(SW_INC)/net.h $(SW_INC)/break.h $(SW_INC)/track.h $(SW_INC)/sprite.h $(SW_INC)/light.h $(SW_INC)/text.h
|
||||||
|
$(SW_OBJ)/serp.$o: $(SW_SRC)/serp.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(game_h) $(tags_h) $(SW_INC)/ai.h $(SW_INC)/actor.h $(SW_INC)/track.h $(SW_INC)/sector.h
|
||||||
|
$(SW_OBJ)/setup.$o: $(SW_SRC)/setup.c $(build_h) $(SW_INC)/keys.h $(game_h) $(SW_INC)/mytypes.h $(MACT_ROOT)/develop.h $(AUDIOLIB_INC)/fx_man.h $(AUDIOLIB_INC)/music.h $(MACT_ROOT)/scriplib.h $(MACT_ROOT)/file_lib.h $(SW_INC)/gamedefs.h $(MACT_ROOT)/keyboard.h $(MACT_ROOT)/util_lib.h $(MACT_ROOT)/control.h $(SW_INC)/config.h $(SW_INC)/sounds.h $(SW_INC)/function.h $(SW_INC)/rts.h
|
||||||
|
$(SW_OBJ)/skel.$o: $(SW_SRC)/skel.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(game_h) $(tags_h) $(SW_INC)/ai.h $(SW_INC)/actor.h $(SW_INC)/track.h
|
||||||
|
$(SW_OBJ)/skull.$o: $(SW_SRC)/skull.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(game_h) $(tags_h) $(SW_INC)/ai.h $(SW_INC)/weapon.h $(SW_INC)/actor.h
|
||||||
|
$(SW_OBJ)/slidor.$o: $(SW_SRC)/slidor.c $(build_h) $(names2_h) $(panel_h) $(game_h) $(SW_INC)/net.h $(tags_h) $(SW_INC)/slidor.h $(SW_INC)/slidor.h $(SW_INC)/sector.h $(SW_INC)/interp.h $(SW_INC)/text.h $(SW_INC)/sprite.h $(SW_INC)/saveable.h
|
||||||
|
$(SW_OBJ)/sounds.$o: $(SW_SRC)/sounds.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(SW_INC)/mytypes.h $(AUDIOLIB_INC)/fx_man.h $(AUDIOLIB_INC)/music.h $(AUDIOLIB_INC)/cd.h $(MACT_ROOT)/util_lib.h $(SW_INC)/gamedefs.h $(SW_INC)/config.h $(panel_h) $(game_h) $(SW_INC)/sounds.h $(SW_INC)/ai.h $(SW_INC)/net.h $(SW_INC)/cache.h $(SW_INC)/text.h $(SW_INC)/rts.h $(SW_INC)/menus.h
|
||||||
|
$(SW_OBJ)/spike.$o: $(SW_SRC)/spike.c $(build_h) $(names2_h) $(panel_h) $(game_h) $(tags_h) $(SW_INC)/sector.h $(SW_INC)/sprite.h $(SW_INC)/saveable.h
|
||||||
|
$(SW_OBJ)/sprite.$o: $(SW_SRC)/sprite.c $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(tags_h) $(SW_INC)/ai.h $(SW_INC)/warp.h $(SW_INC)/light.h $(SW_INC)/break.h $(SW_INC)/net.h $(SW_INC)/pal.h $(SW_INC)/sounds.h $(SW_INC)/interp.h $(SW_INC)/sprite.h $(SW_INC)/weapon.h $(SW_INC)/jsector.h $(SW_INC)/text.h $(SW_INC)/slidor.h $(SW_INC)/player.h $(SW_INC)/saveable.h
|
||||||
|
$(SW_OBJ)/sumo.$o: $(SW_SRC)/sumo.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(tags_h) $(SW_INC)/ai.h $(SW_INC)/quake.h $(SW_INC)/actor.h $(SW_INC)/track.h $(SW_INC)/weapon.h $(SW_INC)/sector.h
|
||||||
|
$(SW_OBJ)/swconfig.$o: $(SW_SRC)/swconfig.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(SW_INC)/mytypes.h $(MACT_ROOT)/develop.h $(MACT_ROOT)/scriplib.h $(AUDIOLIB_INC)/fx_man.h $(SW_INC)/gamedefs.h $(SW_INC)/common_game.h $(SW_INC)/config.h $(SW_INC)/function.h $(SW_INC)/rts.h
|
||||||
|
$(SW_OBJ)/sync.$o: $(SW_SRC)/sync.c $(SW_INC)/keys.h $(game_h) $(tags_h) $(names2_h) $(SW_INC)/net.h $(SW_INC)/menus.h
|
||||||
|
$(SW_OBJ)/text.$o: $(SW_SRC)/text.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(panel_h) $(SW_INC)/lists.h $(game_h) $(SW_INC)/pal.h $(SW_INC)/text.h $(SW_INC)/net.h
|
||||||
|
$(SW_OBJ)/timer.$o: $(SW_SRC)/timer.c $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(tags_h) $(SW_INC)/sector.h $(SW_INC)/sprite.h $(SW_INC)/weapon.h $(AUDIOLIB_INC)/fx_man.h $(AUDIOLIB_INC)/music.h $(SW_INC)/audiofx.h
|
||||||
|
$(SW_OBJ)/track.$o: $(SW_SRC)/track.c $(build_h) $(names2_h) $(panel_h) $(tags_h) $(SW_INC)/sector.h $(SW_INC)/ai.h $(SW_INC)/player.h $(game_h) $(SW_INC)/net.h $(SW_INC)/sprite.h $(SW_INC)/track.h $(SW_INC)/weapon.h $(SW_INC)/saveable.h
|
||||||
|
$(SW_OBJ)/vator.$o: $(SW_SRC)/vator.c $(build_h) $(names2_h) $(panel_h) $(game_h) $(SW_INC)/net.h $(tags_h) $(SW_INC)/sector.h $(SW_INC)/interp.h $(SW_INC)/text.h $(SW_INC)/sprite.h $(SW_INC)/weapon.h $(SW_INC)/saveable.h
|
||||||
|
$(SW_OBJ)/vis.$o: $(SW_SRC)/vis.c $(build_h) $(names2_h) $(game_h) $(tags_h) $(SW_INC)/break.h $(SW_INC)/quake.h $(SW_INC)/pal.h $(SW_INC)/sprite.h
|
||||||
|
$(SW_OBJ)/wallmove.$o: $(SW_SRC)/wallmove.c $(build_h) $(names2_h) $(game_h) $(tags_h) $(SW_INC)/weapon.h $(SW_INC)/sprite.h
|
||||||
|
$(SW_OBJ)/warp.$o: $(SW_SRC)/warp.c $(build_h) $(names2_h) $(panel_h) $(game_h) $(SW_INC)/warp.h
|
||||||
|
$(SW_OBJ)/weapon.$o: $(SW_SRC)/weapon.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(tags_h) $(SW_INC)/break.h $(SW_INC)/quake.h $(SW_INC)/net.h $(SW_INC)/pal.h $(SW_INC)/vis.h $(SW_INC)/ai.h $(SW_INC)/weapon.h $(SW_INC)/anim.h $(SW_INC)/damage.h $(SW_INC)/sector.h $(SW_INC)/sprite.h $(SW_INC)/actor.h $(SW_INC)/track.h $(SW_INC)/player.h
|
||||||
|
$(SW_OBJ)/zilla.$o: $(SW_SRC)/zilla.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(tags_h) $(SW_INC)/ai.h $(SW_INC)/quake.h $(SW_INC)/actor.h $(SW_INC)/track.h $(AUDIOLIB_INC)/fx_man.h
|
||||||
|
$(SW_OBJ)/zombie.$o: $(SW_SRC)/zombie.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(tags_h) $(SW_INC)/ai.h $(SW_INC)/pal.h $(SW_INC)/player.h $(SW_INC)/net.h $(SW_INC)/sprite.h $(SW_INC)/weapon.h $(SW_INC)/actor.h $(SW_INC)/track.h
|
||||||
|
$(SW_OBJ)/saveable.$o: $(SW_SRC)/saveable.c $(ENGINE_INC)/compat.h $(SW_INC)/saveable.h
|
||||||
|
|
||||||
|
$(SW_OBJ)/jnstub.$o: $(SW_SRC)/jnstub.c $(build_h) $(SW_INC)/stag.h $(SW_INC)/keys.h $(names2_h) $(game_h) $(tags_h) $(SW_INC)/pal.h $(ENGINE_INC)/pragmas.h $(ENGINE_INC)/editor.h $(ENGINE_INC)/cache1d.h
|
||||||
|
$(SW_OBJ)/brooms.$o: $(SW_SRC)/brooms.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(game_h) $(ENGINE_INC)/editor.h
|
||||||
|
$(SW_OBJ)/bldscript.$o: $(SW_SRC)/bldscript.c $(build_h) $(names2_h) $(game_h) $(SW_INC)/parse.h $(ENGINE_INC)/editor.h $(ENGINE_INC)/cache1d.h
|
||||||
|
$(SW_OBJ)/jbhlp.$o: $(SW_SRC)/jbhlp.c $(build_h) $(SW_INC)/keys.h $(names2_h) $(game_h) $(ENGINE_INC)/editor.h $(ENGINE_INC)/cache1d.h
|
||||||
|
|
||||||
|
$(SW_OBJ)/game_icon.$o: $(SW_RSRC)/game_icon.c
|
||||||
|
|
||||||
|
$(SW_OBJ)/grpscan.$o: $(SW_SRC)/grpscan.c $(ENGINE_INC)/compat.h $(ENGINE_INC)/baselayer.h $(ENGINE_INC)/scriptfile.h $(ENGINE_INC)/cache1d.h $(ENGINE_INC)/crc32.h $(SW_INC)/grpscan.h
|
||||||
|
$(SW_OBJ)/gameres.$o: $(SW_RSRC)/gameres.rc $(SW_SRC)/startwin.game.h $(SW_RSRC)/game.bmp $(SW_RSRC)/game_icon.ico
|
||||||
|
$(SW_OBJ)/buildres.$o: $(SW_RSRC)/buildres.rc $(SW_RSRC)/build.bmp $(SW_RSRC)/game_icon.ico
|
||||||
|
$(SW_OBJ)/startwin.game.$o: $(SW_SRC)/startwin.game.c $(build_h) $(ENGINE_INC)/winlayer.h $(SW_INC)/grpscan.h
|
||||||
|
$(SW_OBJ)/startgtk.game.$o: $(SW_SRC)/startgtk.game.c $(build_h) $(ENGINE_INC)/dynamicgtk.h $(ENGINE_INC)/baselayer.h $(SW_INC)/grpscan.h
|
339
polymer/eduke32/source/sw/gpl-2.0.txt
Normal file
339
polymer/eduke32/source/sw/gpl-2.0.txt
Normal file
|
@ -0,0 +1,339 @@
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 2, June 1991
|
||||||
|
|
||||||
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
License is intended to guarantee your freedom to share and change free
|
||||||
|
software--to make sure the software is free for all its users. This
|
||||||
|
General Public License applies to most of the Free Software
|
||||||
|
Foundation's software and to any other program whose authors commit to
|
||||||
|
using it. (Some other Free Software Foundation software is covered by
|
||||||
|
the GNU Lesser General Public License instead.) You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
this service if you wish), that you receive source code or can get it
|
||||||
|
if you want it, that you can change the software or use pieces of it
|
||||||
|
in new free programs; and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid
|
||||||
|
anyone to deny you these rights or to ask you to surrender the rights.
|
||||||
|
These restrictions translate to certain responsibilities for you if you
|
||||||
|
distribute copies of the software, or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must give the recipients all the rights that
|
||||||
|
you have. You must make sure that they, too, receive or can get the
|
||||||
|
source code. And you must show them these terms so they know their
|
||||||
|
rights.
|
||||||
|
|
||||||
|
We protect your rights with two steps: (1) copyright the software, and
|
||||||
|
(2) offer you this license which gives you legal permission to copy,
|
||||||
|
distribute and/or modify the software.
|
||||||
|
|
||||||
|
Also, for each author's protection and ours, we want to make certain
|
||||||
|
that everyone understands that there is no warranty for this free
|
||||||
|
software. If the software is modified by someone else and passed on, we
|
||||||
|
want its recipients to know that what they have is not the original, so
|
||||||
|
that any problems introduced by others will not reflect on the original
|
||||||
|
authors' reputations.
|
||||||
|
|
||||||
|
Finally, any free program is threatened constantly by software
|
||||||
|
patents. We wish to avoid the danger that redistributors of a free
|
||||||
|
program will individually obtain patent licenses, in effect making the
|
||||||
|
program proprietary. To prevent this, we have made it clear that any
|
||||||
|
patent must be licensed for everyone's free use or not licensed at all.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License applies to any program or other work which contains
|
||||||
|
a notice placed by the copyright holder saying it may be distributed
|
||||||
|
under the terms of this General Public License. The "Program", below,
|
||||||
|
refers to any such program or work, and a "work based on the Program"
|
||||||
|
means either the Program or any derivative work under copyright law:
|
||||||
|
that is to say, a work containing the Program or a portion of it,
|
||||||
|
either verbatim or with modifications and/or translated into another
|
||||||
|
language. (Hereinafter, translation is included without limitation in
|
||||||
|
the term "modification".) Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running the Program is not restricted, and the output from the Program
|
||||||
|
is covered only if its contents constitute a work based on the
|
||||||
|
Program (independent of having been made by running the Program).
|
||||||
|
Whether that is true depends on what the Program does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Program's
|
||||||
|
source code as you receive it, in any medium, provided that you
|
||||||
|
conspicuously and appropriately publish on each copy an appropriate
|
||||||
|
copyright notice and disclaimer of warranty; keep intact all the
|
||||||
|
notices that refer to this License and to the absence of any warranty;
|
||||||
|
and give any other recipients of the Program a copy of this License
|
||||||
|
along with the Program.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy, and
|
||||||
|
you may at your option offer warranty protection in exchange for a fee.
|
||||||
|
|
||||||
|
2. You may modify your copy or copies of the Program or any portion
|
||||||
|
of it, thus forming a work based on the Program, and copy and
|
||||||
|
distribute such modifications or work under the terms of Section 1
|
||||||
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) You must cause the modified files to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
b) You must cause any work that you distribute or publish, that in
|
||||||
|
whole or in part contains or is derived from the Program or any
|
||||||
|
part thereof, to be licensed as a whole at no charge to all third
|
||||||
|
parties under the terms of this License.
|
||||||
|
|
||||||
|
c) If the modified program normally reads commands interactively
|
||||||
|
when run, you must cause it, when started running for such
|
||||||
|
interactive use in the most ordinary way, to print or display an
|
||||||
|
announcement including an appropriate copyright notice and a
|
||||||
|
notice that there is no warranty (or else, saying that you provide
|
||||||
|
a warranty) and that users may redistribute the program under
|
||||||
|
these conditions, and telling the user how to view a copy of this
|
||||||
|
License. (Exception: if the Program itself is interactive but
|
||||||
|
does not normally print such an announcement, your work based on
|
||||||
|
the Program is not required to print an announcement.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Program,
|
||||||
|
and can be reasonably considered independent and separate works in
|
||||||
|
themselves, then this License, and its terms, do not apply to those
|
||||||
|
sections when you distribute them as separate works. But when you
|
||||||
|
distribute the same sections as part of a whole which is a work based
|
||||||
|
on the Program, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the
|
||||||
|
entire whole, and thus to each and every part regardless of who wrote it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
|
exercise the right to control the distribution of derivative or
|
||||||
|
collective works based on the Program.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Program
|
||||||
|
with the Program (or with a work based on the Program) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may copy and distribute the Program (or a work based on it,
|
||||||
|
under Section 2) in object code or executable form under the terms of
|
||||||
|
Sections 1 and 2 above provided that you also do one of the following:
|
||||||
|
|
||||||
|
a) Accompany it with the complete corresponding machine-readable
|
||||||
|
source code, which must be distributed under the terms of Sections
|
||||||
|
1 and 2 above on a medium customarily used for software interchange; or,
|
||||||
|
|
||||||
|
b) Accompany it with a written offer, valid for at least three
|
||||||
|
years, to give any third party, for a charge no more than your
|
||||||
|
cost of physically performing source distribution, a complete
|
||||||
|
machine-readable copy of the corresponding source code, to be
|
||||||
|
distributed under the terms of Sections 1 and 2 above on a medium
|
||||||
|
customarily used for software interchange; or,
|
||||||
|
|
||||||
|
c) Accompany it with the information you received as to the offer
|
||||||
|
to distribute corresponding source code. (This alternative is
|
||||||
|
allowed only for noncommercial distribution and only if you
|
||||||
|
received the program in object code or executable form with such
|
||||||
|
an offer, in accord with Subsection b above.)
|
||||||
|
|
||||||
|
The source code for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For an executable work, complete source
|
||||||
|
code means all the source code for all modules it contains, plus any
|
||||||
|
associated interface definition files, plus the scripts used to
|
||||||
|
control compilation and installation of the executable. However, as a
|
||||||
|
special exception, the source code distributed need not include
|
||||||
|
anything that is normally distributed (in either source or binary
|
||||||
|
form) with the major components (compiler, kernel, and so on) of the
|
||||||
|
operating system on which the executable runs, unless that component
|
||||||
|
itself accompanies the executable.
|
||||||
|
|
||||||
|
If distribution of executable or object code is made by offering
|
||||||
|
access to copy from a designated place, then offering equivalent
|
||||||
|
access to copy the source code from the same place counts as
|
||||||
|
distribution of the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
4. You may not copy, modify, sublicense, or distribute the Program
|
||||||
|
except as expressly provided under this License. Any attempt
|
||||||
|
otherwise to copy, modify, sublicense or distribute the Program is
|
||||||
|
void, and will automatically terminate your rights under this License.
|
||||||
|
However, parties who have received copies, or rights, from you under
|
||||||
|
this License will not have their licenses terminated so long as such
|
||||||
|
parties remain in full compliance.
|
||||||
|
|
||||||
|
5. You are not required to accept this License, since you have not
|
||||||
|
signed it. However, nothing else grants you permission to modify or
|
||||||
|
distribute the Program or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Program (or any work based on the
|
||||||
|
Program), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Program or works based on it.
|
||||||
|
|
||||||
|
6. Each time you redistribute the Program (or any work based on the
|
||||||
|
Program), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute or modify the Program subject to
|
||||||
|
these terms and conditions. You may not impose any further
|
||||||
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
|
You are not responsible for enforcing compliance by third parties to
|
||||||
|
this License.
|
||||||
|
|
||||||
|
7. If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues),
|
||||||
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot
|
||||||
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you
|
||||||
|
may not distribute the Program at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Program by
|
||||||
|
all those who receive copies directly or indirectly through you, then
|
||||||
|
the only way you could satisfy both it and this License would be to
|
||||||
|
refrain entirely from distribution of the Program.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under
|
||||||
|
any particular circumstance, the balance of the section is intended to
|
||||||
|
apply and the section as a whole is intended to apply in other
|
||||||
|
circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any
|
||||||
|
patents or other property right claims or to contest validity of any
|
||||||
|
such claims; this section has the sole purpose of protecting the
|
||||||
|
integrity of the free software distribution system, which is
|
||||||
|
implemented by public license practices. Many people have made
|
||||||
|
generous contributions to the wide range of software distributed
|
||||||
|
through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
|
to distribute software through any other system and a licensee cannot
|
||||||
|
impose that choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
|
8. If the distribution and/or use of the Program is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Program under this License
|
||||||
|
may add an explicit geographical distribution limitation excluding
|
||||||
|
those countries, so that distribution is permitted only in or among
|
||||||
|
countries not thus excluded. In such case, this License incorporates
|
||||||
|
the limitation as if written in the body of this License.
|
||||||
|
|
||||||
|
9. The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Program
|
||||||
|
specifies a version number of this License which applies to it and "any
|
||||||
|
later version", you have the option of following the terms and conditions
|
||||||
|
either of that version or of any later version published by the Free
|
||||||
|
Software Foundation. If the Program does not specify a version number of
|
||||||
|
this License, you may choose any version ever published by the Free Software
|
||||||
|
Foundation.
|
||||||
|
|
||||||
|
10. If you wish to incorporate parts of the Program into other free
|
||||||
|
programs whose distribution conditions are different, write to the author
|
||||||
|
to ask for permission. For software which is copyrighted by the Free
|
||||||
|
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||||
|
make exceptions for this. Our decision will be guided by the two goals
|
||||||
|
of preserving the free status of all derivatives of our free software and
|
||||||
|
of promoting the sharing and reuse of software generally.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||||
|
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||||
|
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||||
|
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||||
|
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||||
|
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||||
|
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||||
|
REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||||
|
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||||
|
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||||
|
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||||
|
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||||
|
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
convey the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along
|
||||||
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program is interactive, make it output a short notice like this
|
||||||
|
when it starts in an interactive mode:
|
||||||
|
|
||||||
|
Gnomovision version 69, Copyright (C) year name of author
|
||||||
|
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, the commands you use may
|
||||||
|
be called something other than `show w' and `show c'; they could even be
|
||||||
|
mouse-clicks or menu items--whatever suits your program.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||||
|
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||||
|
|
||||||
|
<signature of Ty Coon>, 1 April 1989
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
This General Public License does not permit incorporating your program into
|
||||||
|
proprietary programs. If your program is a subroutine library, you may
|
||||||
|
consider it more useful to permit linking proprietary applications with the
|
||||||
|
library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License.
|
41
polymer/eduke32/source/sw/rsrc/32/manifest.build.xml
Normal file
41
polymer/eduke32/source/sw/rsrc/32/manifest.build.xml
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<asmv3:application>
|
||||||
|
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
|
||||||
|
<dpiAware>true</dpiAware>
|
||||||
|
</asmv3:windowsSettings>
|
||||||
|
</asmv3:application>
|
||||||
|
<assemblyIdentity
|
||||||
|
version="1.0.0.0"
|
||||||
|
processorArchitecture="X86"
|
||||||
|
name="EDuke32.SW.Editor"
|
||||||
|
type="win32"
|
||||||
|
/>
|
||||||
|
<description>BUILD for Shadow Warrior</description>
|
||||||
|
<dependency>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity
|
||||||
|
type="win32"
|
||||||
|
name="Microsoft.Windows.Common-Controls"
|
||||||
|
version="6.0.0.0"
|
||||||
|
processorArchitecture="X86"
|
||||||
|
publicKeyToken="6595b64144ccf1df"
|
||||||
|
language="*"
|
||||||
|
/>
|
||||||
|
</dependentAssembly>
|
||||||
|
</dependency>
|
||||||
|
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||||
|
<application>
|
||||||
|
<!-- Windows Vista -->
|
||||||
|
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
|
||||||
|
<!-- Windows 7 -->
|
||||||
|
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
|
||||||
|
<!-- Windows 8 -->
|
||||||
|
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
|
||||||
|
<!-- Windows 8.1 -->
|
||||||
|
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
|
||||||
|
<!-- Windows 10 -->
|
||||||
|
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
|
||||||
|
</application>
|
||||||
|
</compatibility>
|
||||||
|
</assembly>
|
41
polymer/eduke32/source/sw/rsrc/32/manifest.game.xml
Normal file
41
polymer/eduke32/source/sw/rsrc/32/manifest.game.xml
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<asmv3:application>
|
||||||
|
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
|
||||||
|
<dpiAware>true</dpiAware>
|
||||||
|
</asmv3:windowsSettings>
|
||||||
|
</asmv3:application>
|
||||||
|
<assemblyIdentity
|
||||||
|
version="1.0.0.0"
|
||||||
|
processorArchitecture="X86"
|
||||||
|
name="EDuke32.SW.Game"
|
||||||
|
type="win32"
|
||||||
|
/>
|
||||||
|
<description>Shadow Warrior</description>
|
||||||
|
<dependency>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity
|
||||||
|
type="win32"
|
||||||
|
name="Microsoft.Windows.Common-Controls"
|
||||||
|
version="6.0.0.0"
|
||||||
|
processorArchitecture="X86"
|
||||||
|
publicKeyToken="6595b64144ccf1df"
|
||||||
|
language="*"
|
||||||
|
/>
|
||||||
|
</dependentAssembly>
|
||||||
|
</dependency>
|
||||||
|
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||||
|
<application>
|
||||||
|
<!-- Windows Vista -->
|
||||||
|
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
|
||||||
|
<!-- Windows 7 -->
|
||||||
|
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
|
||||||
|
<!-- Windows 8 -->
|
||||||
|
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
|
||||||
|
<!-- Windows 8.1 -->
|
||||||
|
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
|
||||||
|
<!-- Windows 10 -->
|
||||||
|
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
|
||||||
|
</application>
|
||||||
|
</compatibility>
|
||||||
|
</assembly>
|
41
polymer/eduke32/source/sw/rsrc/64/manifest.build.xml
Normal file
41
polymer/eduke32/source/sw/rsrc/64/manifest.build.xml
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<asmv3:application>
|
||||||
|
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
|
||||||
|
<dpiAware>true</dpiAware>
|
||||||
|
</asmv3:windowsSettings>
|
||||||
|
</asmv3:application>
|
||||||
|
<assemblyIdentity
|
||||||
|
version="1.0.0.0"
|
||||||
|
processorArchitecture="amd64"
|
||||||
|
name="EDuke32.SW.Editor"
|
||||||
|
type="win32"
|
||||||
|
/>
|
||||||
|
<description>BUILD for Shadow Warrior</description>
|
||||||
|
<dependency>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity
|
||||||
|
type="win32"
|
||||||
|
name="Microsoft.Windows.Common-Controls"
|
||||||
|
version="6.0.0.0"
|
||||||
|
processorArchitecture="amd64"
|
||||||
|
publicKeyToken="6595b64144ccf1df"
|
||||||
|
language="*"
|
||||||
|
/>
|
||||||
|
</dependentAssembly>
|
||||||
|
</dependency>
|
||||||
|
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||||
|
<application>
|
||||||
|
<!-- Windows Vista -->
|
||||||
|
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
|
||||||
|
<!-- Windows 7 -->
|
||||||
|
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
|
||||||
|
<!-- Windows 8 -->
|
||||||
|
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
|
||||||
|
<!-- Windows 8.1 -->
|
||||||
|
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
|
||||||
|
<!-- Windows 10 -->
|
||||||
|
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
|
||||||
|
</application>
|
||||||
|
</compatibility>
|
||||||
|
</assembly>
|
41
polymer/eduke32/source/sw/rsrc/64/manifest.game.xml
Normal file
41
polymer/eduke32/source/sw/rsrc/64/manifest.game.xml
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<asmv3:application>
|
||||||
|
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
|
||||||
|
<dpiAware>true</dpiAware>
|
||||||
|
</asmv3:windowsSettings>
|
||||||
|
</asmv3:application>
|
||||||
|
<assemblyIdentity
|
||||||
|
version="1.0.0.0"
|
||||||
|
processorArchitecture="amd64"
|
||||||
|
name="EDuke32.SW.Game"
|
||||||
|
type="win32"
|
||||||
|
/>
|
||||||
|
<description>Shadow Warrior</description>
|
||||||
|
<dependency>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity
|
||||||
|
type="win32"
|
||||||
|
name="Microsoft.Windows.Common-Controls"
|
||||||
|
version="6.0.0.0"
|
||||||
|
processorArchitecture="amd64"
|
||||||
|
publicKeyToken="6595b64144ccf1df"
|
||||||
|
language="*"
|
||||||
|
/>
|
||||||
|
</dependentAssembly>
|
||||||
|
</dependency>
|
||||||
|
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||||
|
<application>
|
||||||
|
<!-- Windows Vista -->
|
||||||
|
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
|
||||||
|
<!-- Windows 7 -->
|
||||||
|
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
|
||||||
|
<!-- Windows 8 -->
|
||||||
|
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
|
||||||
|
<!-- Windows 8.1 -->
|
||||||
|
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
|
||||||
|
<!-- Windows 10 -->
|
||||||
|
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
|
||||||
|
</application>
|
||||||
|
</compatibility>
|
||||||
|
</assembly>
|
BIN
polymer/eduke32/source/sw/rsrc/build.bmp
Normal file
BIN
polymer/eduke32/source/sw/rsrc/build.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 74 KiB |
38
polymer/eduke32/source/sw/rsrc/buildres.rc
Normal file
38
polymer/eduke32/source/sw/rsrc/buildres.rc
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
#include <windows.h>
|
||||||
|
#include <commctrl.h>
|
||||||
|
#include "startwin.editor.h"
|
||||||
|
|
||||||
|
RSRC_ICON ICON "game_icon.ico"
|
||||||
|
RSRC_BMP BITMAP "build.bmp"
|
||||||
|
|
||||||
|
WIN_STARTWIN DIALOGEX DISCARDABLE 20, 40, 260, 200
|
||||||
|
STYLE DS_MODALFRAME | DS_CENTER | DS_SETFONT | DS_FIXEDSYS | WS_OVERLAPPED | WS_CAPTION | WS_VISIBLE | WS_SYSMENU
|
||||||
|
CAPTION "Startup"
|
||||||
|
FONT 8, "MS Shell Dlg"
|
||||||
|
BEGIN
|
||||||
|
CONTROL "", WIN_STARTWIN_BITMAP, "STATIC", SS_BITMAP | WS_CHILD | WS_VISIBLE, 0, 0, 32, 32
|
||||||
|
CONTROL "", WIN_STARTWIN_TABCTL, WC_TABCONTROL, WS_CLIPSIBLINGS | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 5, 5, 250, 170
|
||||||
|
CONTROL "&Start", WIN_STARTWIN_START, "BUTTON", BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 154, 180, 48, 14
|
||||||
|
CONTROL "&Cancel", WIN_STARTWIN_CANCEL, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 207, 180, 48, 14
|
||||||
|
|
||||||
|
CONTROL "", WIN_STARTWIN_MESSAGES, "EDIT", ES_MULTILINE | ES_READONLY | WS_CHILD | WS_VSCROLL, 0, 0, 32, 32
|
||||||
|
END
|
||||||
|
|
||||||
|
WIN_STARTWINPAGE_CONFIG DIALOGEX DISCARDABLE 20, 40, 279, 168
|
||||||
|
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
|
||||||
|
CAPTION "Dialog"
|
||||||
|
FONT 8, "MS Shell Dlg"
|
||||||
|
BEGIN
|
||||||
|
CONTROL "&2D Video mode:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 5, 8, 50, 8
|
||||||
|
CONTROL "", IDC2DVMODE, "COMBOBOX", CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 60, 6, 80, 56
|
||||||
|
CONTROL "&Fullscreen", IDCFULLSCREEN, "BUTTON", BS_CHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 148, 8, 49, 10
|
||||||
|
CONTROL "&3D Video mode:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 5, 24, 50, 8
|
||||||
|
CONTROL "", IDC3DVMODE, "COMBOBOX", CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 60, 22, 80, 56
|
||||||
|
CONTROL "&Always show configuration on start", IDCALWAYSSHOW, "BUTTON", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 118, 116, 140, 8
|
||||||
|
END
|
||||||
|
|
||||||
|
#if defined(_M_X64) || defined(__amd64__) || defined(__x86_64__)
|
||||||
|
1 24 "64/manifest.build.xml"
|
||||||
|
#else
|
||||||
|
1 24 "32/manifest.build.xml"
|
||||||
|
#endif
|
BIN
polymer/eduke32/source/sw/rsrc/game.bmp
Normal file
BIN
polymer/eduke32/source/sw/rsrc/game.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 74 KiB |
408
polymer/eduke32/source/sw/rsrc/game_icon.c
Normal file
408
polymer/eduke32/source/sw/rsrc/game_icon.c
Normal file
|
@ -0,0 +1,408 @@
|
||||||
|
|
||||||
|
#include "compat.h"
|
||||||
|
#include "sdlappicon.h"
|
||||||
|
|
||||||
|
static uint8_t sdlappicon_pixels[] = {
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0l\342\32"
|
||||||
|
"\32w\346Zx\251\343\200\275\321\346\253\316\332\346\327\323\334\347\370\346"
|
||||||
|
"\346\347\377\347\347\347\377\347\347\347\367\350\350\350\344\351\351\351"
|
||||||
|
"\306\267\333\351\242\235\325\354x\353\353\353'\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0q\354\33\0n\350y\21t\343\267s\246\340\310\342\344\347\365\350\350"
|
||||||
|
"\350\377\351\351\351\377\351\351\351\377\351\351\351\377\351\351\351\377"
|
||||||
|
"\351\351\351\377\303\336\351\377\331\344\351\377\351\351\351\377\210\314"
|
||||||
|
"\350\377\350\350\350\377\324\342\347\377\314\337\347\325\346\346\346o\341"
|
||||||
|
"\341\341\21\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0l\350!\2n\350\234\1m\347\367G\220\342\310\344\346\350\371\351\351\351"
|
||||||
|
"\377\352\352\352\377\352\352\352\377\353\353\353\377\353\353\353\377\353"
|
||||||
|
"\353\353\377\353\353\353\377\353\353\353\377\353\353\353\377\353\353\353"
|
||||||
|
"\377\267\334\353\377\16\251\352\377\230\322\352\377.\261\351\377\204\314"
|
||||||
|
"\351\377\350\350\350\377\347\347\347\366\317\340\350\236`\312\3640\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\337\10\0k\345\201\1m\347\366\1m\347\367\212"
|
||||||
|
"\263\344\315\352\352\352\377\353\353\353\377\353\353\353\377\354\354\354"
|
||||||
|
"\377\354\354\354\377\355\355\355\377\355\355\355\377\355\355\355\377\355"
|
||||||
|
"\355\355\377\355\355\355\377\355\355\355\377:\270\355\377\17\253\355\377"
|
||||||
|
"\1\247\354\377\1\247\354\377\1\246\353\377\7\250\353\377:\266\352\377\215"
|
||||||
|
"\316\351\377\307\336\350\377\325\342\347\363\345\345\345\201\350\350\350"
|
||||||
|
"\13\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0q\350-\1l\347\325\1m\350\377\1n\351\377z\254\344\310\353\353"
|
||||||
|
"\353\377\354\354\354\377\354\354\354\377\355\355\355\377\356\356\356\377"
|
||||||
|
"\356\356\356\377\357\357\357\377\357\357\357\377\302\342\357\377\275\340"
|
||||||
|
"\357\377\346\354\357\377\201\317\357\377\2\251\357\377\1\251\357\377\1\250"
|
||||||
|
"\356\377\1\250\356\377\1\247\355\377\1\247\354\377\1\247\354\377J\273\353"
|
||||||
|
"\377\350\351\352\377\351\351\351\377\350\350\350\377\351\351\351\336\352"
|
||||||
|
"\352\3521\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0n\347_\1m\347\367\1m\350\377\1n\352\377\36|\346\312\354\354\354\377\355"
|
||||||
|
"\355\355\377\356\356\356\377\356\356\356\377\357\357\357\377\337\353\360"
|
||||||
|
"\3779\272\360\377g\310\361\377\326\350\361\377\351\357\361\377^\306\361\377"
|
||||||
|
"\7\254\361\377\1\252\361\377\1\252\361\377\1\252\361\377\1\251\360\377\1"
|
||||||
|
"\251\360\377\1\251\357\377\1\250\356\377\1\250\356\377\1\247\355\377G\273"
|
||||||
|
"\354\377\274\335\353\377\352\352\352\377\350\350\350\377\347\347\347\363"
|
||||||
|
"\346\346\346Z\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0o\350z\1m\347"
|
||||||
|
"\376\1n\351\377\1n\352\377\1o\353\377\272\320\351\337\355\355\355\377\357"
|
||||||
|
"\357\357\377\357\357\357\377\360\360\360\377\361\361\361\377\362\362\362"
|
||||||
|
"\377\347\356\362\377\325\352\363\3778\274\363\377`\307\363\377t\316\364\377"
|
||||||
|
"\1\254\364\377\1\254\363\377\27\262\363\377r\315\363\377\247\334\362\377"
|
||||||
|
"\206\322\362\377!\264\361\377\1\251\360\377\1\251\357\377;\272\357\377\235"
|
||||||
|
"\326\355\377\246\330\354\377\223\321\353\377\265\332\352\377\351\351\351"
|
||||||
|
"\377\347\347\347\376\351\351\351\202\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0m\351"
|
||||||
|
"u\1m\347\377\1n\351\377\1n\352\377\1o\354\377\21w\351\325\356\356\356\377"
|
||||||
|
"\357\357\357\377\360\360\360\377\361\361\361\377\362\362\362\377\363\363"
|
||||||
|
"\363\377\364\364\364\377\364\364\364\377\365\365\365\377\361\364\365\377"
|
||||||
|
"\276\346\366\377'\270\366\377\1\256\366\377\40\266\366\377\342\357\365\377"
|
||||||
|
"\365\365\365\377\364\364\364\377\364\364\364\377\345\357\363\3773\272\362"
|
||||||
|
"\377\1\252\361\377\313\346\360\377\356\357\357\377\326\347\356\377\355\355"
|
||||||
|
"\355\377\354\354\354\377\352\352\352\377\351\351\351\377\347\347\347\377"
|
||||||
|
"\352\352\352x\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0m\346[\1m\347\375\1n\351\377\1n\352\377\1o"
|
||||||
|
"\354\377\1p\355\377P\230\352\303\360\360\360\377\361\361\361\377\362\362"
|
||||||
|
"\362\377\363\363\363\377\364\364\364\377\365\365\365\377\366\366\366\377"
|
||||||
|
"\366\366\366\377\367\367\367\377\367\367\367\377\370\370\370\377S\307\370"
|
||||||
|
"\377\1\257\370\377\227\334\370\377\367\367\367\377\367\367\367\377\366\366"
|
||||||
|
"\366\377\366\366\366\377\365\365\365\377\315\351\364\377\2\254\363\3774\272"
|
||||||
|
"\362\377`\306\361\377\307\344\360\377\357\357\357\377\355\355\355\377\354"
|
||||||
|
"\354\354\377\352\352\352\377\351\351\351\377\347\347\347\375\350\350\350"
|
||||||
|
"Y\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0p\3440\1m\347\365\1n\351\377\1n\352\377\1o\354\377\1p\355\377\1p\357\377"
|
||||||
|
"\201\263\354\307\361\361\361\377\363\363\363\377\364\364\364\377\365\365"
|
||||||
|
"\365\377\366\366\366\377\367\367\367\377\370\370\370\377\364\367\370\377"
|
||||||
|
"t\322\371\377\212\330\371\377U\311\372\377\1\260\372\377\1\260\372\377\300"
|
||||||
|
"\351\372\377\371\371\371\377\371\371\371\377\370\370\370\377\370\370\370"
|
||||||
|
"\377\367\367\367\377\366\366\366\377\32\265\365\377\13\257\364\377\331\353"
|
||||||
|
"\363\377\263\337\361\377\360\360\360\377\357\357\357\377\355\355\355\377"
|
||||||
|
"\354\354\354\377\352\352\352\377\351\351\351\377\347\347\347\367\344\344"
|
||||||
|
"\3440\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\337\10\1"
|
||||||
|
"m\350\332\1m\350\377\1n\352\377\1o\354\377\1p\355\377\1p\357\377\1q\360\377"
|
||||||
|
"\221\275\357\312\363\363\363\377\364\364\364\377\366\366\366\377\367\367"
|
||||||
|
"\367\377\370\370\370\377\371\371\371\377\372\372\372\377\372\372\372\377"
|
||||||
|
"\373\373\373\377\373\373\373\377\364\372\374\377\36\273\374\377\1\262\374"
|
||||||
|
"\377\237\340\374\377\373\373\373\377\373\373\373\377\372\372\372\377\372"
|
||||||
|
"\372\372\377\371\371\371\377\362\366\370\377\7\260\367\377;\277\366\377\364"
|
||||||
|
"\364\364\377\363\363\363\377\362\362\362\377\360\360\360\377\357\357\357"
|
||||||
|
"\377\355\355\355\377\354\354\354\377\352\352\352\377\350\350\350\377\347"
|
||||||
|
"\347\347\326\377\377\377\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0m\350\203\1m\350\377\1n\351\377\1o\353\377\1p\355\377\1p\357\377\1q\360"
|
||||||
|
"\377\1r\362\377\202\266\360\316\365\365\365\377\366\366\366\377\367\367\367"
|
||||||
|
"\377\371\371\371\377\372\372\372\377\373\373\373\377\374\374\374\377\374"
|
||||||
|
"\374\374\377\375\375\375\377\362\372\375\377\376\376\376\377m\323\376\377"
|
||||||
|
"\1\263\376\377*\277\376\377\361\371\375\377\375\375\375\377\374\374\374\377"
|
||||||
|
"\374\374\374\377\373\373\373\377\230\336\372\377\1\260\371\377\202\324\367"
|
||||||
|
"\377\366\366\366\377\365\365\365\377\363\363\363\377\362\362\362\377\360"
|
||||||
|
"\360\360\377\357\357\357\377\355\355\355\377\353\353\353\377\351\351\351"
|
||||||
|
"\377\350\350\350\377\350\350\350\205\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0p\347\40\1m\347\367\1n\351\377\1o\353\377\1o\354\377\1p\356\377\1q"
|
||||||
|
"\360\377\1q\361\377\1r\363\377`\245\363\332\366\366\366\377\370\370\370\377"
|
||||||
|
"\371\371\371\377\372\372\372\377\373\373\373\377\374\374\374\377\375\375"
|
||||||
|
"\375\377\277\353\376\377\377\377\377\377\346\370\377\377\377\377\377\377"
|
||||||
|
"\233\342\377\377\1\264\377\377\1\264\377\3778\304\377\377\303\355\377\377"
|
||||||
|
"\355\371\376\377\336\364\375\377\204\330\374\377\10\263\373\377\1\260\372"
|
||||||
|
"\3770\275\371\377\370\370\370\377\366\366\366\377\365\365\365\377\363\363"
|
||||||
|
"\363\377\361\361\361\377\352\356\360\377\275\340\356\377\354\354\354\377"
|
||||||
|
"\353\353\353\377\351\351\351\377\347\347\347\364\352\352\352\30\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\2m\347\237\1m\350\377\1n\352\377\1o\354\377\1p\355"
|
||||||
|
"\377\1p\357\377\1q\361\377\1r\363\377\1s\364\377)\210\365\356\370\370\370"
|
||||||
|
"\377\371\371\371\377\373\373\373\377\374\374\374\377\375\375\375\377\376"
|
||||||
|
"\376\376\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||||
|
"\377\377\377\377\377\346\370\377\377\21\271\377\377\1\264\377\377\1\264\377"
|
||||||
|
"\377\1\264\377\377\1\264\377\377\1\264\377\377\1\263\376\377\1\263\375\377"
|
||||||
|
"\1\262\374\377\2\261\373\377\331\357\371\377\370\370\370\377\366\366\366"
|
||||||
|
"\377\364\364\364\377\363\363\363\377\361\361\361\377\357\357\357\377\355"
|
||||||
|
"\355\355\377\354\354\354\377\352\352\352\377\350\350\350\377\347\347\347"
|
||||||
|
"\224\0\0\0\0\0\0\0\0\0\0\0\0\0j\352\30\1l\350\372\1n\351\377\1o\353\377\1"
|
||||||
|
"p\355\377\1p\357\377\1q\360\377\1r\362\377\1s\364\377\1t\366\377\2u\367\377"
|
||||||
|
"\333\351\371\377\373\373\373\377\374\374\374\377\375\375\375\377\377\377"
|
||||||
|
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||||
|
"\377\377\377\377\377\377\377\377\377\377\377\377\276\354\377\377\1\264\377"
|
||||||
|
"\377\1\264\377\377\1\264\377\377\1\264\377\377\1\264\377\377\1\264\377\377"
|
||||||
|
"\1\264\377\377\1\263\375\377\1\262\374\377\205\331\373\377\371\371\371\377"
|
||||||
|
"\367\367\367\377\366\366\366\377\364\364\364\377\362\362\362\377\360\360"
|
||||||
|
"\360\377\357\357\357\377\355\355\355\377\353\353\353\377\351\351\351\377"
|
||||||
|
"\347\347\347\367\350\350\350\26\0\0\0\0\0\0\0\0\0n\350y\1m\350\377\1n\352"
|
||||||
|
"\377\1o\354\377\1p\356\377\1p\357\377\1q\361\377\1r\363\377\1s\365\377\1"
|
||||||
|
"t\367\377\1u\371\377r\261\372\377\374\374\374\377\375\375\375\377\377\377"
|
||||||
|
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||||
|
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\307\357"
|
||||||
|
"\377\377~\331\377\377\244\344\377\377\1\264\377\377\1\264\377\377\1\264\377"
|
||||||
|
"\377\1\264\377\377\1\264\377\377\1\264\377\377\1\263\375\377\27\270\374\377"
|
||||||
|
"\352\365\372\377\371\371\371\377\367\367\367\377\365\365\365\377\363\363"
|
||||||
|
"\363\377\361\361\361\377\357\357\357\377\356\356\356\377\354\354\354\377"
|
||||||
|
"\352\352\352\377\350\350\350\377\350\350\350|\0\0\0\0\0\0\0\0\1m\350\320"
|
||||||
|
"\1n\351\377\1o\353\377\1o\354\377\1p\356\377\1q\360\377\1r\362\377\1s\364"
|
||||||
|
"\377\1t\366\377\1u\370\377\1v\372\377\12{\373\377\336\355\375\377\377\377"
|
||||||
|
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||||
|
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||||
|
"\377\377l\323\377\377\353\371\377\377\377\377\377\377<\305\377\377\1\264"
|
||||||
|
"\377\377\1\264\377\377\1\264\377\377\1\264\377\377\1\264\377\377\25\272\377"
|
||||||
|
"\377_\316\375\377f\317\373\377\372\372\372\377\370\370\370\377\366\366\366"
|
||||||
|
"\377\364\364\364\377\362\362\362\377\360\360\360\377\356\356\356\377\354"
|
||||||
|
"\354\354\377\353\353\353\377\351\351\351\377\350\350\350\322\0\0\0\0\0k\346"
|
||||||
|
"\37\1m\347\376\1n\351\377\1o\353\377\1p\355\377\1p\357\377\1q\361\377\1r"
|
||||||
|
"\363\377\1s\365\377\1t\367\377\1u\371\377\1v\373\377\1w\374\377H\235\376"
|
||||||
|
"\377\375\376\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||||
|
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||||
|
"\377\377\377\377\377V\315\377\377\373\376\377\377\377\377\377\377\201\332"
|
||||||
|
"\377\377\1\264\377\377\1\264\377\377\1\264\377\377\1\264\377\377\1\264\377"
|
||||||
|
"\377\227\340\377\377\372\375\376\377T\313\374\377\372\373\373\377\371\371"
|
||||||
|
"\371\377\367\367\367\377\365\365\365\377\363\363\363\377\361\361\361\377"
|
||||||
|
"\357\357\357\377\355\355\355\377\353\353\353\377\351\351\351\377\347\347"
|
||||||
|
"\347\376\347\347\347\40\0l\347a\1m\350\377\1n\352\377\1o\354\377\1p\356\377"
|
||||||
|
"\1q\360\377\1r\362\377\1s\364\377\1t\366\377\1u\370\377\1v\372\377\1w\374"
|
||||||
|
"\377\1w\375\377\1x\377\377\177\273\377\377\377\377\377\377\377\377\377\377"
|
||||||
|
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||||
|
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||||
|
"\377\377\377\377\241\343\377\377\1\264\377\377\33\274\377\377\301\355\377"
|
||||||
|
"\377\3\265\377\377\7\266\377\377\363\373\377\377\377\377\377\377\375\375"
|
||||||
|
"\375\377\374\374\374\377\372\372\372\377\370\370\370\377\366\366\366\377"
|
||||||
|
"\364\364\364\377\362\362\362\377\360\360\360\377\356\356\356\377\354\354"
|
||||||
|
"\354\377\352\352\352\377\350\350\350\377\350\350\350d\2m\350\230\1m\350\377"
|
||||||
|
"\1n\352\377\1o\354\377\1p\356\377\1q\360\377\1r\362\377\1s\364\377\1t\366"
|
||||||
|
"\377\1u\370\377\1v\372\377\1w\374\377\1x\376\377\1x\377\377\1x\377\377\222"
|
||||||
|
"\305\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||||
|
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||||
|
"\377\377\377\255\347\377\377\377\377\377\377\235\342\377\377\1\264\377\377"
|
||||||
|
"\261\350\377\377\377\377\377\377\40\275\377\377F\310\377\377\377\377\377"
|
||||||
|
"\377\377\377\377\377\376\376\376\377\374\374\374\377\372\372\372\377\370"
|
||||||
|
"\370\370\377\366\366\366\377\364\364\364\377\362\362\362\377\360\360\360"
|
||||||
|
"\377\356\356\356\377\354\354\354\377\352\352\352\377\350\350\350\377\350"
|
||||||
|
"\350\350\230\1m\347\300\1n\351\377\1o\353\377\1p\355\377\1p\357\377\1q\361"
|
||||||
|
"\377\1r\363\377\1s\365\377\1t\367\377\1u\371\377\1v\373\377\1w\375\377\1"
|
||||||
|
"x\377\377\1x\377\377\1x\377\377\2y\377\377\236\314\377\377\377\377\377\377"
|
||||||
|
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||||
|
"\377\377\377\377\377\377\377\377\377\377\337\366\377\377\377\377\377\377"
|
||||||
|
"u\326\377\377\32\273\377\377\374\376\377\377\377\377\377\377*\300\377\377"
|
||||||
|
"\222\337\377\377\377\377\377\377\377\377\377\377\377\377\377\377\375\375"
|
||||||
|
"\375\377\373\373\373\377\371\371\371\377\367\367\367\377\365\365\365\377"
|
||||||
|
"\363\363\363\377\361\361\361\377\357\357\357\377\355\355\355\377\353\353"
|
||||||
|
"\353\377\351\351\351\377\350\350\350\300\1l\347\340\1n\351\377\1o\353\377"
|
||||||
|
"\1p\355\377\1p\357\377\1q\361\377\1r\363\377\1s\365\377\1t\367\377\1u\371"
|
||||||
|
"\377\1v\373\377\1w\375\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\2"
|
||||||
|
"y\377\377o\262\377\377\370\373\377\377\377\377\377\377\377\377\377\377\377"
|
||||||
|
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||||
|
"\377\377\377\377\377?\306\377\377e\321\377\377\377\377\377\377\377\377\377"
|
||||||
|
"\377\35\274\377\377\302\355\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||||
|
"\377\377\375\375\375\377\373\373\373\377\371\371\371\377\367\367\367\377"
|
||||||
|
"\365\365\365\377\363\363\363\377\361\361\361\377\357\357\357\377\355\355"
|
||||||
|
"\355\377\353\353\353\377\351\351\351\377\347\347\347\337\1m\350\366\1n\351"
|
||||||
|
"\377\1o\353\377\1p\355\377\1p\357\377\1q\361\377\1r\363\377\1s\365\377\1"
|
||||||
|
"u\370\377\1v\372\377\1w\374\377\1x\376\377\1x\377\377\1x\377\377\1x\377\377"
|
||||||
|
"\1x\377\377\1x\377\377\1x\377\3772\222\377\377\325\351\377\377\377\377\377"
|
||||||
|
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||||
|
"\377\377\377\376\377\377\377\14\267\377\377\207\334\377\377\377\377\377\377"
|
||||||
|
"\377\377\377\377=\306\377\377\322\362\377\377\377\377\377\377\377\377\377"
|
||||||
|
"\377\377\377\377\377\376\376\376\377\374\374\374\377\372\372\372\377\370"
|
||||||
|
"\370\370\377\365\365\365\377\363\363\363\377\361\361\361\377\357\357\357"
|
||||||
|
"\377\355\355\355\377\353\353\353\377\351\351\351\377\350\350\350\366\1m\347"
|
||||||
|
"\377\1n\351\377\1o\353\377\1p\355\377\1p\357\377\1q\361\377\1s\364\377\1"
|
||||||
|
"t\366\377\1u\370\377\1v\372\377\1w\374\377\1x\376\377\1x\377\377\1x\377\377"
|
||||||
|
"\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\7{\377\377y\270\377"
|
||||||
|
"\377\363\371\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
|
||||||
|
"\377\377\377\365\374\377\377\1\264\377\377}\330\377\377\377\377\377\377\377"
|
||||||
|
"\377\377\377l\323\377\377\250\345\377\377\377\377\377\377\377\377\377\377"
|
||||||
|
"\377\377\377\377\376\376\376\377\374\374\374\377\372\372\372\377\370\370"
|
||||||
|
"\370\377\366\366\366\377\364\364\364\377\361\361\361\377\357\357\357\377"
|
||||||
|
"\355\355\355\377\353\353\353\377\351\351\351\377\350\350\350\377\1m\350\377"
|
||||||
|
"\1n\351\377\1o\353\377\1p\355\377\1p\357\377\1q\361\377\1s\364\377\1t\366"
|
||||||
|
"\377\1u\370\377\1v\372\377\1w\374\377\1x\376\377\1x\377\377\1x\377\377\1"
|
||||||
|
"x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377"
|
||||||
|
"\24\202\377\377\201\274\377\377\353\364\377\377\377\377\377\377\377\377\377"
|
||||||
|
"\377\377\377\377\377\22\271\377\377g\322\377\377\377\377\377\377\377\377"
|
||||||
|
"\377\377w\327\377\377\250\345\377\377\377\377\377\377\377\377\377\377\377"
|
||||||
|
"\377\377\377\376\376\376\377\374\374\374\377\372\372\372\377\370\370\370"
|
||||||
|
"\377\366\366\366\377\364\364\364\377\361\361\361\377\357\357\357\377\355"
|
||||||
|
"\355\355\377\353\353\353\377\351\351\351\377\350\350\350\377\1m\350\365\1"
|
||||||
|
"n\351\377\1o\353\377\1p\355\377\1p\357\377\1q\361\377\1r\363\377\1s\365\377"
|
||||||
|
"\1u\370\377\1v\372\377\1w\374\377\1x\376\377\1x\377\377\1x\377\377\1x\377"
|
||||||
|
"\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1"
|
||||||
|
"x\377\377\1x\377\377\10|\377\377\\\250\377\377\320\346\377\377\377\377\377"
|
||||||
|
"\377.\301\377\377X\316\377\377\377\377\377\377\377\377\377\377\225\340\377"
|
||||||
|
"\377d\321\377\377\377\377\377\377\377\377\377\377\377\377\377\377\376\376"
|
||||||
|
"\376\377\374\374\374\377\372\372\372\377\370\370\370\377\365\365\365\377"
|
||||||
|
"\363\363\363\377\361\361\361\377\357\357\357\377\355\355\355\377\353\353"
|
||||||
|
"\353\377\351\351\351\377\350\350\350\365\1l\347\341\1n\351\377\1o\353\377"
|
||||||
|
"\1p\355\377\1p\357\377\1q\361\377\1r\363\377\1s\365\377\1t\367\377\1u\371"
|
||||||
|
"\377\1v\373\377\1w\375\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1"
|
||||||
|
"x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377"
|
||||||
|
"\1x\377\377\1x\377\377\2y\377\377U\244\377\377B\305\377\377Y\316\377\377"
|
||||||
|
"\377\377\377\377\377\377\377\377\264\351\377\377\203\333\377\377\377\377"
|
||||||
|
"\377\377\377\377\377\377\377\377\377\377\375\375\375\377\373\373\373\377"
|
||||||
|
"\371\371\371\377\367\367\367\377\365\365\365\377\363\363\363\377\361\361"
|
||||||
|
"\361\377\357\357\357\377\355\355\355\377\353\353\353\377\351\351\351\377"
|
||||||
|
"\347\347\347\340\1m\347\302\1n\351\377\1o\353\377\1p\355\377\1p\357\377\1"
|
||||||
|
"q\361\377\1r\363\377\1s\365\377\1t\367\377\1u\371\377\1v\373\377\1w\375\377"
|
||||||
|
"\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377"
|
||||||
|
"\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1"
|
||||||
|
"x\377\377\1x\377\377\5\240\377\377<\271\377\377\373\375\377\377\377\377\377"
|
||||||
|
"\377\221\337\377\377\277\354\377\377\377\377\377\377\377\377\377\377\377"
|
||||||
|
"\377\377\377\375\375\375\377\373\373\373\377\371\371\371\377\367\367\367"
|
||||||
|
"\377\365\365\365\377\363\363\363\377\361\361\361\377\357\357\357\377\355"
|
||||||
|
"\355\355\377\353\353\353\377\351\351\351\377\347\347\347\274\2l\346\216\1"
|
||||||
|
"m\350\377\1n\352\377\1o\354\377\1p\356\377\1q\360\377\1r\362\377\1s\364\377"
|
||||||
|
"\1t\366\377\1u\370\377\1v\372\377\1w\374\377\1x\376\377\1x\377\377\1x\377"
|
||||||
|
"\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1"
|
||||||
|
"x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1\232\377"
|
||||||
|
"\377\1\222\377\377;\227\377\377\346\362\377\377T\314\377\377\336\365\377"
|
||||||
|
"\377\377\377\377\377\377\377\377\377\376\376\376\377\374\374\374\377\372"
|
||||||
|
"\372\372\377\370\370\370\377\366\366\366\377\364\364\364\377\362\362\362"
|
||||||
|
"\377\360\360\360\377\356\356\356\377\354\354\354\377\352\352\352\377\350"
|
||||||
|
"\350\350\377\347\347\347\223\0o\346Z\1m\350\377\1n\352\377\1o\354\377\1p"
|
||||||
|
"\356\377\1q\360\377\1r\362\377\1s\364\377\1t\366\377\1u\370\377\1v\372\377"
|
||||||
|
"\1w\374\377\1w\375\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377"
|
||||||
|
"\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1"
|
||||||
|
"x\377\377\1x\377\377\1x\377\377\1\231\377\377\1\217\377\377\1x\377\377\40"
|
||||||
|
"\210\377\377\242\333\377\377\374\376\377\377\377\377\377\377\377\377\377"
|
||||||
|
"\377\375\375\375\377\374\374\374\377\372\372\372\377\370\370\370\377\366"
|
||||||
|
"\366\366\377\364\364\364\377\362\362\362\377\360\360\360\377\356\356\356"
|
||||||
|
"\377\354\354\354\377\352\352\352\377\350\350\350\377\352\352\352_\0r\355"
|
||||||
|
"\35\1m\347\376\1n\351\377\1o\353\377\1p\355\377\1p\357\377\1q\361\377\1r"
|
||||||
|
"\363\377\1s\365\377\1t\367\377\1u\371\377\1v\373\377\1w\374\377\1x\376\377"
|
||||||
|
"\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377"
|
||||||
|
"\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1"
|
||||||
|
"\230\377\377\1\216\377\377\1x\377\377\1x\377\377\21\200\377\377\317\346\377"
|
||||||
|
"\377\377\377\377\377\376\376\376\377\374\374\374\377\373\373\373\377\371"
|
||||||
|
"\371\371\377\367\367\367\377\365\365\365\377\363\363\363\377\361\361\361"
|
||||||
|
"\377\357\357\357\377\355\355\355\377\353\353\353\377\351\351\351\377\347"
|
||||||
|
"\347\347\375\350\350\350\26\0\0\0\0\1l\347\306\1n\351\377\1o\353\377\1o\354"
|
||||||
|
"\377\1p\356\377\1q\360\377\1r\362\377\1s\364\377\1t\366\377\1u\370\377\1"
|
||||||
|
"v\372\377\1v\373\377\1w\375\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377"
|
||||||
|
"\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377"
|
||||||
|
"\377\1x\377\377\1x\377\377\1\232\377\377\1\214\377\377\1x\377\377\1x\377"
|
||||||
|
"\377\1x\377\377\35\207\377\377\351\363\377\377\375\375\375\377\373\373\373"
|
||||||
|
"\377\372\372\372\377\370\370\370\377\366\366\366\377\364\364\364\377\362"
|
||||||
|
"\362\362\377\360\360\360\377\356\356\356\377\354\354\354\377\353\353\353"
|
||||||
|
"\377\351\351\351\377\351\351\351\317\0\0\0\0\0\0\0\0\0n\347k\1m\350\377\1"
|
||||||
|
"n\352\377\1o\354\377\1p\356\377\1p\357\377\1q\361\377\1r\363\377\1s\365\377"
|
||||||
|
"\1t\367\377\1u\370\377\1v\372\377\1w\374\377\1w\375\377\1x\377\377\1x\377"
|
||||||
|
"\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1"
|
||||||
|
"x\377\377\1x\377\377\1x\377\377\1x\377\377\1\232\377\377\1\212\377\377\1"
|
||||||
|
"x\377\377\1x\377\377\1x\377\377\1x\377\377M\240\375\377\374\374\374\377\372"
|
||||||
|
"\372\372\377\370\370\370\377\367\367\367\377\365\365\365\377\363\363\363"
|
||||||
|
"\377\361\361\361\377\357\357\357\377\356\356\356\377\354\354\354\377\352"
|
||||||
|
"\352\352\377\350\350\350\377\351\351\351r\0\0\0\0\0\0\0\0\0k\344\23\1m\347"
|
||||||
|
"\365\1n\351\377\1o\353\377\1p\355\377\1p\357\377\1q\360\377\1r\362\377\1"
|
||||||
|
"s\364\377\1t\366\377\1t\367\377\1u\371\377\1v\372\377\1w\374\377\1w\375\377"
|
||||||
|
"\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377"
|
||||||
|
"\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1\235\377\377\1\212\377"
|
||||||
|
"\377\1x\377\377\1x\377\377\1x\377\377\1w\375\377\1w\374\377\257\322\372\377"
|
||||||
|
"\371\371\371\377\367\367\367\377\366\366\366\377\364\364\364\377\362\362"
|
||||||
|
"\362\377\360\360\360\377\357\357\357\377\355\355\355\377\353\353\353\377"
|
||||||
|
"\351\351\351\377\347\347\347\366\350\350\350\26\0\0\0\0\0\0\0\0\0\0\0\0\2"
|
||||||
|
"l\346\216\1m\350\377\1n\352\377\1o\354\377\1p\355\377\1p\357\377\1q\361\377"
|
||||||
|
"\1r\363\377\1s\364\377\1t\366\377\1u\370\377\1u\371\377\1v\372\377\1w\374"
|
||||||
|
"\377\1w\375\377\1x\376\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1"
|
||||||
|
"x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1\233\377\377\1\215"
|
||||||
|
"\377\377\1x\377\377\1x\376\377\1w\375\377\1w\374\377\1v\372\3774\221\371"
|
||||||
|
"\377\370\370\370\377\366\366\366\377\364\364\364\377\363\363\363\377\361"
|
||||||
|
"\361\361\377\357\357\357\377\355\355\355\377\354\354\354\377\352\352\352"
|
||||||
|
"\377\350\350\350\377\351\351\351\226\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0a\333"
|
||||||
|
"\25\1m\347\361\1n\351\377\1o\353\377\1o\354\377\1p\356\377\1q\360\377\1q"
|
||||||
|
"\361\377\1r\363\377\1s\365\377\1t\366\377\1u\370\377\1u\371\377\1v\372\377"
|
||||||
|
"\1v\373\377\4y\374\377N\240\375\377\203\275\376\377l\261\377\377\32\205\377"
|
||||||
|
"\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1x\377\377\1\225\377\377"
|
||||||
|
"\1\221\376\377\1w\375\377\1w\374\377\1v\373\377\1v\372\377\1u\371\377\1u"
|
||||||
|
"\370\377\314\340\366\377\365\365\365\377\363\363\363\377\361\361\361\377"
|
||||||
|
"\360\360\360\377\356\356\356\377\354\354\354\377\353\353\353\377\351\351"
|
||||||
|
"\351\377\347\347\347\361\351\351\351\27\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0n\351\200\1m\350\377\1n\351\377\1o\353\377\1p\355\377\1p\357\377"
|
||||||
|
"\1q\360\377\1r\362\377\1r\363\377\1s\365\377\1t\366\377\1t\367\377\1u\370"
|
||||||
|
"\377\15|\372\377\303\335\373\377\374\374\374\377\374\374\374\377\375\375"
|
||||||
|
"\375\377\360\366\375\377N\240\376\377\1x\376\377\1x\376\377\1x\376\377\1"
|
||||||
|
"w\375\377\1\211\375\377\1\231\374\377\1w\374\377\1v\373\377\1v\372\377\1"
|
||||||
|
"u\370\377\1t\367\377\1t\366\377\207\273\365\377\363\363\363\377\362\362\362"
|
||||||
|
"\377\360\360\360\377\357\357\357\377\355\355\355\377\353\353\353\377\351"
|
||||||
|
"\351\351\377\350\350\350\377\351\351\351\177\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0f\314\5\1m\346\312\1m\350\377\1n\352\377\1o\354\377"
|
||||||
|
"\1p\355\377\1p\357\377\1q\360\377\1r\362\377\1r\363\377\1s\364\377\1t\366"
|
||||||
|
"\377\1t\367\377\202\272\370\377\371\371\371\377\372\372\372\377\372\372\372"
|
||||||
|
"\377\373\373\373\377\373\373\373\377\362\367\374\377\31\203\374\377\1w\374"
|
||||||
|
"\377\1w\374\377\1v\373\377\1w\373\377\1\243\372\377\1v\372\377\1u\371\377"
|
||||||
|
"\1u\370\377\1t\367\377\1t\366\377\1s\364\377\\\243\363\377\362\362\362\377"
|
||||||
|
"\360\360\360\377\357\357\357\377\355\355\355\377\354\354\354\377\352\352"
|
||||||
|
"\352\377\350\350\350\377\347\347\347\314\377\377\377\4\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0q\352$\1m\350\361\1n\351\377\1n\352"
|
||||||
|
"\377\1o\354\377\1p\355\377\1p\357\377\1q\360\377\1q\361\377\1r\363\377\1"
|
||||||
|
"s\364\377\1s\365\377\307\335\366\377\367\367\367\377\370\370\370\377\370"
|
||||||
|
"\370\370\377\371\371\371\377\371\371\371\377\372\372\372\377V\243\372\377"
|
||||||
|
"\1v\372\377\1v\372\377\1u\371\377\1u\371\377\1\237\370\377\1x\370\377\1t"
|
||||||
|
"\367\377\1t\366\377\1s\365\377\1s\364\377\1r\363\377N\232\361\377\360\360"
|
||||||
|
"\360\377\357\357\357\377\355\355\355\377\354\354\354\377\352\352\352\377"
|
||||||
|
"\351\351\351\377\350\350\350\363\356\356\356,\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0o\347U\1m\347\374\1n\351\377"
|
||||||
|
"\1n\352\377\1o\354\377\1p\355\377\1p\357\377\1q\360\377\1q\361\377\1r\362"
|
||||||
|
"\377\1r\363\377\271\324\364\377\365\365\365\377\366\366\366\377\366\366\366"
|
||||||
|
"\377\367\367\367\377\367\367\367\377\370\370\370\377L\235\370\377\1u\370"
|
||||||
|
"\377\1u\370\377\1t\367\377\1t\367\377\1\231\366\377\1z\366\377\1s\365\377"
|
||||||
|
"\1s\364\377\1r\363\377\1r\362\377\1q\361\377W\236\360\377\357\357\357\377"
|
||||||
|
"\355\355\355\377\354\354\354\377\352\352\352\377\351\351\351\377\347\347"
|
||||||
|
"\347\376\352\352\352W\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0l\347j\1m\347\376\1n\351\377\1n\352"
|
||||||
|
"\377\1o\354\377\1p\355\377\1p\356\377\1p\357\377\1q\360\377\1q\361\377Y\240"
|
||||||
|
"\362\377\363\363\363\377\364\364\364\377\364\364\364\377\365\365\365\377"
|
||||||
|
"\365\365\365\377\334\350\365\377\15z\366\377\1t\366\377\1s\365\377\1s\365"
|
||||||
|
"\377\1s\365\377\1\230\364\377\1z\364\377\1r\363\377\1r\362\377\1q\361\377"
|
||||||
|
"\1q\360\377\1p\357\377|\261\356\377\355\355\355\377\354\354\354\377\352\352"
|
||||||
|
"\352\377\351\351\351\377\347\347\347\375\346\346\346g\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0o\353s\1m\347\375\1n\351\377\1n\352\377\1o\353\377\1o\354\377"
|
||||||
|
"\1p\355\377\1p\357\377\1p\357\377\1q\360\377p\254\361\377\356\360\362\377"
|
||||||
|
"\362\362\362\377\363\363\363\377\326\344\363\3775\216\363\377\1s\364\377"
|
||||||
|
"\1s\364\377\1r\363\377\1r\363\377\1r\363\377\1\222\362\377\1x\362\377\1q"
|
||||||
|
"\361\377\1q\360\377\1p\357\377\1p\357\377\1p\355\377\303\327\354\377\353"
|
||||||
|
"\353\353\377\352\352\352\377\351\351\351\377\350\350\350\375\353\353\353"
|
||||||
|
"s\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0m\347T\1m\347\364\1m\350"
|
||||||
|
"\377\1n\351\377\1o\353\377\1o\354\377\1p\355\377\1p\356\377\1p\356\377\1"
|
||||||
|
"p\357\377\24{\360\377N\231\360\377B\224\361\377\10u\361\377\1q\361\377\1"
|
||||||
|
"q\361\377\1q\361\377\1q\361\377\1q\361\377\1q\361\377\1\221\360\377\1x\360"
|
||||||
|
"\377\1p\357\377\1p\356\377\1p\356\377\1p\355\377D\222\354\377\353\353\353"
|
||||||
|
"\377\351\351\351\377\350\350\350\377\347\347\347\366\352\352\352W\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0p\3520\1n\350\317"
|
||||||
|
"\1m\350\377\1n\351\377\1n\352\377\1o\353\377\1o\354\377\1o\354\377\1p\355"
|
||||||
|
"\377\1p\356\377\1p\356\377\1p\357\377\1p\357\377\1p\357\377\1p\357\377\1"
|
||||||
|
"p\357\377\1p\357\377\1p\357\377\1p\357\377\1\227\356\377\1y\356\377\1p\355"
|
||||||
|
"\377\1o\354\377\1o\354\377\21w\353\377\314\332\352\377\351\351\351\377\350"
|
||||||
|
"\350\350\377\350\350\350\321\356\356\356,\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\377\3\0n\351t\1m\347"
|
||||||
|
"\362\1m\350\377\1n\351\377\1n\352\377\1o\353\377\1o\353\377\1o\354\377\1"
|
||||||
|
"o\354\377\1p\355\377\1p\355\377\1p\355\377\1p\355\377\1p\355\377\1p\355\377"
|
||||||
|
"\1p\355\377\1p\355\377\1q\354\377\1o\354\377\1o\353\377\1o\353\377\14t\352"
|
||||||
|
"\377\260\313\351\377\350\350\350\377\350\350\350\360\354\354\354w\377\377"
|
||||||
|
"\377\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0o\346\36\2m\350\235\1m\347\367\1"
|
||||||
|
"m\350\377\1n\351\377\1n\351\377\1n\352\377\1n\352\377\1o\353\377\1o\353\377"
|
||||||
|
"\1o\353\377\1o\353\377\1o\353\377\1o\353\377\1o\353\377\1o\353\377\1n\352"
|
||||||
|
"\377\1n\352\377\1n\351\377-\204\351\377\277\322\350\377\347\347\347\365\350"
|
||||||
|
"\350\350\231\350\350\350\26\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0h\350\26\0n\351t\1m\347\314\1m\347\374\1m\350\377\1m"
|
||||||
|
"\350\377\1n\351\377\1n\351\377\1n\351\377\1n\351\377\1n\351\377\1n\351\377"
|
||||||
|
"\1n\351\377\1n\351\377\1m\350\377'\201\350\377\206\263\347\375\341\344\347"
|
||||||
|
"\303\347\347\347j\343\343\343\22\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0f\335\17"
|
||||||
|
"\0j\345M\2m\345\210\1m\347\276\1m\347\343\12r\350\371\20u\351\376\24x\351"
|
||||||
|
"\375)\204\351\374D\221\351\365i\245\352\335\235\302\351\242\344\344\347U"
|
||||||
|
"\351\351\351\27\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
||||||
|
"\0\0\0",
|
||||||
|
};
|
||||||
|
|
||||||
|
struct sdlappicon sdlappicon = {
|
||||||
|
48,48,
|
||||||
|
sdlappicon_pixels
|
||||||
|
};
|
BIN
polymer/eduke32/source/sw/rsrc/game_icon.ico
Normal file
BIN
polymer/eduke32/source/sw/rsrc/game_icon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 60 KiB |
BIN
polymer/eduke32/source/sw/rsrc/game_icon.png
Normal file
BIN
polymer/eduke32/source/sw/rsrc/game_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
134
polymer/eduke32/source/sw/rsrc/game_icon.svg
Normal file
134
polymer/eduke32/source/sw/rsrc/game_icon.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 23 KiB |
53
polymer/eduke32/source/sw/rsrc/gameres.rc
Normal file
53
polymer/eduke32/source/sw/rsrc/gameres.rc
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
#include <windows.h>
|
||||||
|
#include <commctrl.h>
|
||||||
|
#include "startwin.game.h"
|
||||||
|
|
||||||
|
RSRC_ICON ICON "game_icon.ico"
|
||||||
|
RSRC_BMP BITMAP "game.bmp"
|
||||||
|
|
||||||
|
WIN_STARTWIN DIALOGEX DISCARDABLE 20, 40, 260, 200
|
||||||
|
STYLE DS_MODALFRAME | DS_CENTER | DS_SETFONT | DS_FIXEDSYS | WS_OVERLAPPED | WS_CAPTION | WS_VISIBLE | WS_SYSMENU
|
||||||
|
CAPTION "Startup"
|
||||||
|
FONT 8, "MS Shell Dlg"
|
||||||
|
BEGIN
|
||||||
|
CONTROL "", WIN_STARTWIN_BITMAP, "STATIC", SS_BITMAP | WS_CHILD | WS_VISIBLE, 0, 0, 32, 32
|
||||||
|
CONTROL "", WIN_STARTWIN_TABCTL, WC_TABCONTROL, WS_CLIPSIBLINGS | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 5, 5, 250, 170
|
||||||
|
CONTROL "&Start", WIN_STARTWIN_START, "BUTTON", BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 154, 180, 48, 14
|
||||||
|
CONTROL "&Cancel", WIN_STARTWIN_CANCEL, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 207, 180, 48, 14
|
||||||
|
|
||||||
|
CONTROL "", WIN_STARTWIN_MESSAGES, "EDIT", ES_MULTILINE | ES_READONLY | WS_CHILD | WS_VSCROLL, 0, 0, 32, 32
|
||||||
|
END
|
||||||
|
|
||||||
|
WIN_STARTWINPAGE_CONFIG DIALOGEX DISCARDABLE 20, 40, 279, 168
|
||||||
|
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
|
||||||
|
CAPTION "Dialog"
|
||||||
|
FONT 8, "MS Shell Dlg"
|
||||||
|
BEGIN
|
||||||
|
CONTROL "&Video mode:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 5, 8, 50, 8
|
||||||
|
CONTROL "", IDCVMODE, "COMBOBOX", CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 60, 6, 80, 56
|
||||||
|
CONTROL "&Fullscreen", IDCFULLSCREEN, "BUTTON", BS_CHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 148, 8, 49, 10
|
||||||
|
|
||||||
|
CONTROL "S&ound quality:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 5, 24, 50, 8
|
||||||
|
CONTROL "", IDCSOUNDQUAL, "COMBOBOX", CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 60, 22, 110, 72
|
||||||
|
|
||||||
|
CONTROL "Input devices:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 5, 50, 50, 8
|
||||||
|
CONTROL "Mo&use", IDCINPUTMOUSE, "BUTTON", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 60, 50, 49, 8
|
||||||
|
CONTROL "&Joystick", IDCINPUTJOY, "BUTTON", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 110, 50, 49, 8
|
||||||
|
|
||||||
|
CONTROL "&Always show configuration on start", IDCALWAYSSHOW, "BUTTON", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 118, 116, 140, 8
|
||||||
|
END
|
||||||
|
|
||||||
|
WIN_STARTWINPAGE_GAME DIALOGEX DISCARDABLE 20, 40, 279, 168
|
||||||
|
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
|
||||||
|
CAPTION "Dialog"
|
||||||
|
FONT 8, "MS Shell Dlg"
|
||||||
|
BEGIN
|
||||||
|
CONTROL "&Game or addon:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 5, 5, 100, 8
|
||||||
|
CONTROL "", IDGDATA, "LISTBOX", LBS_NOINTEGRALHEIGHT | LBS_USETABSTOPS | LBS_SORT | WS_CHILD | WS_BORDER | WS_VISIBLE | WS_TABSTOP, 10, 15, 226, 50
|
||||||
|
END
|
||||||
|
|
||||||
|
#if defined(_M_X64) || defined(__amd64__) || defined(__x86_64__)
|
||||||
|
1 24 "64/manifest.game.xml"
|
||||||
|
#else
|
||||||
|
1 24 "32/manifest.game.xml"
|
||||||
|
#endif
|
37
polymer/eduke32/source/sw/src/GameListSource.game.h
Normal file
37
polymer/eduke32/source/sw/src/GameListSource.game.h
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 2013 Jonathon Fowler <jf@jonof.id.au>
|
||||||
|
|
||||||
|
This file is part of JFShadowWarrior
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@interface GameListSource : NSObject <NSComboBoxDataSource>
|
||||||
|
{
|
||||||
|
NSMutableArray *list;
|
||||||
|
}
|
||||||
|
- (id)init;
|
||||||
|
- (void)dealloc;
|
||||||
|
- (GrpFile *)grpAtIndex:(int)index;
|
||||||
|
- (int)findIndexForGrpname:(NSString *)grpname;
|
||||||
|
- (id)tableView:(NSTableView *)aTableView
|
||||||
|
objectValueForTableColumn:(NSTableColumn *)aTableColumn
|
||||||
|
row:(NSInteger)rowIndex;
|
||||||
|
- (int)numberOfRowsInTableView:(NSTableView *)aTableView;
|
||||||
|
@end
|
||||||
|
|
89
polymer/eduke32/source/sw/src/GameListSource.game.m
Normal file
89
polymer/eduke32/source/sw/src/GameListSource.game.m
Normal file
|
@ -0,0 +1,89 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 2013 Jonathon Fowler <jf@jonof.id.au>
|
||||||
|
|
||||||
|
This file is part of JFShadowWarrior
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
|
||||||
|
#import "GrpFile.game.h"
|
||||||
|
#import "GameListSource.game.h"
|
||||||
|
|
||||||
|
@implementation GameListSource
|
||||||
|
- (id)init
|
||||||
|
{
|
||||||
|
self = [super init];
|
||||||
|
if (self) {
|
||||||
|
struct grpfile *p;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
list = [[NSMutableArray alloc] init];
|
||||||
|
|
||||||
|
for (p = foundgrps; p; p=p->next) {
|
||||||
|
for (i=0; i<numgrpfiles; i++) if (p->crcval == grpfiles[i].crcval) break;
|
||||||
|
if (i == numgrpfiles) continue;
|
||||||
|
[list addObject:[[GrpFile alloc] initWithGrpfile:p andName:[NSString stringWithUTF8String:grpfiles[i].name]]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)dealloc
|
||||||
|
{
|
||||||
|
[list release];
|
||||||
|
[super dealloc];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (GrpFile*)grpAtIndex:(int)index
|
||||||
|
{
|
||||||
|
return [list objectAtIndex:index];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (int)findIndexForGrpname:(NSString*)grpname
|
||||||
|
{
|
||||||
|
unsigned i;
|
||||||
|
for (i=0; i<[list count]; i++) {
|
||||||
|
if ([[[list objectAtIndex:i] grpname] isEqual:grpname]) return i;
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (id)tableView:(NSTableView *)aTableView
|
||||||
|
objectValueForTableColumn:(NSTableColumn *)aTableColumn
|
||||||
|
row:(NSInteger)rowIndex
|
||||||
|
{
|
||||||
|
NSParameterAssert(rowIndex >= 0 && rowIndex < [list count]);
|
||||||
|
switch ([[aTableColumn identifier] intValue]) {
|
||||||
|
case 0: // name column
|
||||||
|
return [[list objectAtIndex:rowIndex] name];
|
||||||
|
case 1: // grp column
|
||||||
|
return [[list objectAtIndex:rowIndex] grpname];
|
||||||
|
default: return nil;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (int)numberOfRowsInTableView:(NSTableView *)aTableView
|
||||||
|
{
|
||||||
|
return [list count];
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
|
40
polymer/eduke32/source/sw/src/GrpFile.game.h
Normal file
40
polymer/eduke32/source/sw/src/GrpFile.game.h
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 2013 Jonathon Fowler <jf@jonof.id.au>
|
||||||
|
|
||||||
|
This file is part of JFShadowWarrior
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
|
||||||
|
#include "grpscan.h"
|
||||||
|
|
||||||
|
@interface GrpFile : NSObject
|
||||||
|
{
|
||||||
|
NSString *name;
|
||||||
|
struct grpfile *fg;
|
||||||
|
}
|
||||||
|
- (id)initWithGrpfile:(struct grpfile *)grpfile andName:(NSString *)aName;
|
||||||
|
- (void)dealloc;
|
||||||
|
- (NSString *)name;
|
||||||
|
- (NSString *)grpname;
|
||||||
|
- (struct grpfile *)entryptr;
|
||||||
|
@end
|
||||||
|
|
54
polymer/eduke32/source/sw/src/GrpFile.game.m
Normal file
54
polymer/eduke32/source/sw/src/GrpFile.game.m
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 2013 Jonathon Fowler <jf@jonof.id.au>
|
||||||
|
|
||||||
|
This file is part of JFShadowWarrior
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include "GrpFile.game.h"
|
||||||
|
|
||||||
|
@implementation GrpFile
|
||||||
|
- (id)initWithGrpfile:(struct grpfile *)grpfile andName:(NSString*)aName
|
||||||
|
{
|
||||||
|
self = [super init];
|
||||||
|
if (self) {
|
||||||
|
fg = grpfile;
|
||||||
|
name = aName;
|
||||||
|
[aName retain];
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
- (void)dealloc
|
||||||
|
{
|
||||||
|
[name release];
|
||||||
|
[super dealloc];
|
||||||
|
}
|
||||||
|
- (NSString *)name
|
||||||
|
{
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
- (NSString *)grpname
|
||||||
|
{
|
||||||
|
return [NSString stringWithUTF8String:(fg->name)];
|
||||||
|
}
|
||||||
|
- (struct grpfile *)entryptr
|
||||||
|
{
|
||||||
|
return fg;
|
||||||
|
}
|
||||||
|
@end
|
463
polymer/eduke32/source/sw/src/StartupWinController.game.m
Normal file
463
polymer/eduke32/source/sw/src/StartupWinController.game.m
Normal file
|
@ -0,0 +1,463 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 2007 Jonathon Fowler <jf@jonof.id.au>
|
||||||
|
|
||||||
|
This file is part of JFShadowWarrior
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
|
||||||
|
#include "compat.h"
|
||||||
|
#include "types.h"
|
||||||
|
#include "build.h"
|
||||||
|
#include "baselayer.h"
|
||||||
|
#include "grpscan.h"
|
||||||
|
#include "gamedefs.h"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#import "GrpFile.game.h"
|
||||||
|
#import "GameListSource.game.h"
|
||||||
|
|
||||||
|
static struct {
|
||||||
|
int fullscreen;
|
||||||
|
int xdim3d, ydim3d, bpp3d;
|
||||||
|
int forcesetup;
|
||||||
|
char selectedgrp[BMAX_PATH+1];
|
||||||
|
int samplerate, bitspersample, channels;
|
||||||
|
int usemouse, usejoystick;
|
||||||
|
} settings;
|
||||||
|
|
||||||
|
static struct soundQuality_t {
|
||||||
|
int frequency;
|
||||||
|
int samplesize;
|
||||||
|
int channels;
|
||||||
|
} * soundQualities = 0;
|
||||||
|
|
||||||
|
|
||||||
|
@interface StartupWinController : NSWindowController
|
||||||
|
{
|
||||||
|
NSMutableArray *modeslist3d;
|
||||||
|
GameListSource *gamelistsrc;
|
||||||
|
|
||||||
|
IBOutlet NSButton *alwaysShowButton;
|
||||||
|
IBOutlet NSButton *fullscreenButton;
|
||||||
|
IBOutlet NSButton *useMouseButton;
|
||||||
|
IBOutlet NSButton *useJoystickButton;
|
||||||
|
IBOutlet NSTextView *messagesView;
|
||||||
|
IBOutlet NSTabView *tabView;
|
||||||
|
IBOutlet NSPopUpButton *videoMode3DPUButton;
|
||||||
|
IBOutlet NSPopUpButton *soundQualityPUButton;
|
||||||
|
IBOutlet NSScrollView *gameList;
|
||||||
|
|
||||||
|
IBOutlet NSButton *cancelButton;
|
||||||
|
IBOutlet NSButton *startButton;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)dealloc;
|
||||||
|
- (void)populateVideoModes:(BOOL)firstTime;
|
||||||
|
- (void)populateSoundQuality:(BOOL)firstTime;
|
||||||
|
|
||||||
|
- (IBAction)alwaysShowClicked:(id)sender;
|
||||||
|
- (IBAction)fullscreenClicked:(id)sender;
|
||||||
|
|
||||||
|
- (IBAction)cancel:(id)sender;
|
||||||
|
- (IBAction)start:(id)sender;
|
||||||
|
|
||||||
|
- (void)setupRunMode;
|
||||||
|
- (void)setupMessagesMode;
|
||||||
|
- (void)putsMessage:(NSString *)str;
|
||||||
|
- (void)setTitle:(NSString *)str;
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation StartupWinController
|
||||||
|
|
||||||
|
- (void)dealloc
|
||||||
|
{
|
||||||
|
[gamelistsrc release];
|
||||||
|
[modeslist3d release];
|
||||||
|
[super dealloc];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)populateVideoModes:(BOOL)firstTime
|
||||||
|
{
|
||||||
|
int i, mode3d, fullscreen = ([fullscreenButton state] == NSOnState);
|
||||||
|
int idx3d = -1;
|
||||||
|
int xdim, ydim, bpp;
|
||||||
|
|
||||||
|
if (firstTime) {
|
||||||
|
xdim = settings.xdim3d;
|
||||||
|
ydim = settings.ydim3d;
|
||||||
|
bpp = settings.bpp3d;
|
||||||
|
} else {
|
||||||
|
mode3d = [[modeslist3d objectAtIndex:[videoMode3DPUButton indexOfSelectedItem]] intValue];
|
||||||
|
if (mode3d >= 0) {
|
||||||
|
xdim = validmode[mode3d].xdim;
|
||||||
|
ydim = validmode[mode3d].ydim;
|
||||||
|
bpp = validmode[mode3d].bpp;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
mode3d = checkvideomode(&xdim, &ydim, bpp, fullscreen, 1);
|
||||||
|
if (mode3d < 0) {
|
||||||
|
int i, cd[] = { 32, 24, 16, 15, 8, 0 };
|
||||||
|
for (i=0; cd[i]; ) { if (cd[i] >= bpp) i++; else break; }
|
||||||
|
for ( ; cd[i]; i++) {
|
||||||
|
mode3d = checkvideomode(&xdim, &ydim, cd[i], fullscreen, 1);
|
||||||
|
if (mode3d < 0) continue;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[modeslist3d release];
|
||||||
|
[videoMode3DPUButton removeAllItems];
|
||||||
|
|
||||||
|
modeslist3d = [[NSMutableArray alloc] init];
|
||||||
|
|
||||||
|
for (i = 0; i < validmodecnt; i++) {
|
||||||
|
if (fullscreen == validmode[i].fs) {
|
||||||
|
if (i == mode3d) idx3d = [modeslist3d count];
|
||||||
|
[modeslist3d addObject:[NSNumber numberWithInt:i]];
|
||||||
|
[videoMode3DPUButton addItemWithTitle:[NSString stringWithFormat:@"%d %C %d %d-bpp",
|
||||||
|
validmode[i].xdim, 0xd7, validmode[i].ydim, validmode[i].bpp]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (idx3d >= 0) [videoMode3DPUButton selectItemAtIndex:idx3d];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)populateSoundQuality:(BOOL)firstTime
|
||||||
|
{
|
||||||
|
int i, curidx = -1;
|
||||||
|
|
||||||
|
[soundQualityPUButton removeAllItems];
|
||||||
|
|
||||||
|
for (i = 0; soundQualities[i].frequency > 0; i++) {
|
||||||
|
const char *ch;
|
||||||
|
switch (soundQualities[i].channels) {
|
||||||
|
case 1: ch = "Mono"; break;
|
||||||
|
case 2: ch = "Stereo"; break;
|
||||||
|
default: ch = "?"; break;
|
||||||
|
}
|
||||||
|
|
||||||
|
NSString *s = [NSString stringWithFormat:@"%dkHz, %d-bit, %s",
|
||||||
|
soundQualities[i].frequency / 1000,
|
||||||
|
soundQualities[i].samplesize,
|
||||||
|
ch
|
||||||
|
];
|
||||||
|
[soundQualityPUButton addItemWithTitle:s];
|
||||||
|
|
||||||
|
if (firstTime &&
|
||||||
|
soundQualities[i].frequency == settings.samplerate &&
|
||||||
|
soundQualities[i].samplesize == settings.bitspersample &&
|
||||||
|
soundQualities[i].channels == settings.channels) {
|
||||||
|
curidx = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (firstTime && curidx < 0) {
|
||||||
|
soundQualities[i].frequency = settings.samplerate;
|
||||||
|
soundQualities[i].samplesize = settings.bitspersample;
|
||||||
|
soundQualities[i].channels = settings.channels;
|
||||||
|
|
||||||
|
const char *ch;
|
||||||
|
switch (soundQualities[i].channels) {
|
||||||
|
case 1: ch = "Mono"; break;
|
||||||
|
case 2: ch = "Stereo"; break;
|
||||||
|
default: ch = "?"; break;
|
||||||
|
}
|
||||||
|
NSString *s = [NSString stringWithFormat:@"%dkHz, %d-bit, %s",
|
||||||
|
soundQualities[i].frequency / 1000,
|
||||||
|
soundQualities[i].samplesize,
|
||||||
|
ch
|
||||||
|
];
|
||||||
|
[soundQualityPUButton addItemWithTitle:s];
|
||||||
|
|
||||||
|
curidx = i++;
|
||||||
|
soundQualities[i].frequency = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (curidx >= 0) {
|
||||||
|
[soundQualityPUButton selectItemAtIndex:curidx];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (IBAction)alwaysShowClicked:(id)sender
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
- (IBAction)fullscreenClicked:(id)sender
|
||||||
|
{
|
||||||
|
[self populateVideoModes:NO];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (IBAction)cancel:(id)sender
|
||||||
|
{
|
||||||
|
[NSApp abortModal];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (IBAction)start:(id)sender
|
||||||
|
{
|
||||||
|
int mode = [[modeslist3d objectAtIndex:[videoMode3DPUButton indexOfSelectedItem]] intValue];
|
||||||
|
if (mode >= 0) {
|
||||||
|
settings.xdim3d = validmode[mode].xdim;
|
||||||
|
settings.ydim3d = validmode[mode].ydim;
|
||||||
|
settings.bpp3d = validmode[mode].bpp;
|
||||||
|
settings.fullscreen = validmode[mode].fs;
|
||||||
|
}
|
||||||
|
|
||||||
|
int quality = [soundQualityPUButton indexOfSelectedItem];
|
||||||
|
if (quality >= 0) {
|
||||||
|
settings.samplerate = soundQualities[quality].frequency;
|
||||||
|
settings.bitspersample = soundQualities[quality].samplesize;
|
||||||
|
settings.channels = soundQualities[quality].channels;
|
||||||
|
}
|
||||||
|
|
||||||
|
int row = [[gameList documentView] selectedRow];
|
||||||
|
if (row >= 0) {
|
||||||
|
struct grpfile *p = [[gamelistsrc grpAtIndex:row] entryptr];
|
||||||
|
if (p) {
|
||||||
|
strcpy(settings.selectedgrp, p->name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
settings.usemouse = [useMouseButton state] == NSOnState;
|
||||||
|
settings.usejoystick = [useJoystickButton state] == NSOnState;
|
||||||
|
settings.forcesetup = [alwaysShowButton state] == NSOnState;
|
||||||
|
|
||||||
|
[NSApp stopModal];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setupRunMode
|
||||||
|
{
|
||||||
|
getvalidmodes();
|
||||||
|
|
||||||
|
[fullscreenButton setState: (settings.fullscreen ? NSOnState : NSOffState)];
|
||||||
|
[alwaysShowButton setState: (settings.forcesetup ? NSOnState : NSOffState)];
|
||||||
|
[useMouseButton setState: (settings.usemouse ? NSOnState : NSOffState)];
|
||||||
|
[useJoystickButton setState: (settings.usejoystick ? NSOnState : NSOffState)];
|
||||||
|
[self populateVideoModes:YES];
|
||||||
|
[self populateSoundQuality:YES];
|
||||||
|
|
||||||
|
// enable all the controls on the Configuration page
|
||||||
|
NSEnumerator *enumerator = [[[[tabView tabViewItemAtIndex:0] view] subviews] objectEnumerator];
|
||||||
|
NSControl *control;
|
||||||
|
while ((control = [enumerator nextObject])) {
|
||||||
|
[control setEnabled:true];
|
||||||
|
}
|
||||||
|
|
||||||
|
gamelistsrc = [[GameListSource alloc] init];
|
||||||
|
[[gameList documentView] setDataSource:gamelistsrc];
|
||||||
|
[[gameList documentView] deselectAll:nil];
|
||||||
|
|
||||||
|
int row = [gamelistsrc findIndexForGrpname:[NSString stringWithUTF8String:settings.selectedgrp]];
|
||||||
|
if (row >= 0) {
|
||||||
|
[[gameList documentView] scrollRowToVisible:row];
|
||||||
|
[[gameList documentView] selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO];
|
||||||
|
}
|
||||||
|
|
||||||
|
[cancelButton setEnabled:true];
|
||||||
|
[startButton setEnabled:true];
|
||||||
|
|
||||||
|
[tabView selectTabViewItemAtIndex:0];
|
||||||
|
[NSCursor unhide]; // Why should I need to do this?
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setupMessagesMode
|
||||||
|
{
|
||||||
|
[tabView selectTabViewItemAtIndex:2];
|
||||||
|
|
||||||
|
// disable all the controls on the Configuration page except "always show", so the
|
||||||
|
// user can enable it if they want to while waiting for something else to happen
|
||||||
|
NSEnumerator *enumerator = [[[[tabView tabViewItemAtIndex:0] view] subviews] objectEnumerator];
|
||||||
|
NSControl *control;
|
||||||
|
while ((control = [enumerator nextObject])) {
|
||||||
|
if (control == alwaysShowButton) continue;
|
||||||
|
[control setEnabled:false];
|
||||||
|
}
|
||||||
|
|
||||||
|
[cancelButton setEnabled:false];
|
||||||
|
[startButton setEnabled:false];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)putsMessage:(NSString *)str
|
||||||
|
{
|
||||||
|
NSRange end;
|
||||||
|
NSTextStorage *text = [messagesView textStorage];
|
||||||
|
BOOL shouldAutoScroll;
|
||||||
|
|
||||||
|
shouldAutoScroll = ((int)NSMaxY([messagesView bounds]) == (int)NSMaxY([messagesView visibleRect]));
|
||||||
|
|
||||||
|
end.location = [text length];
|
||||||
|
end.length = 0;
|
||||||
|
|
||||||
|
[text beginEditing];
|
||||||
|
[messagesView replaceCharactersInRange:end withString:str];
|
||||||
|
[text endEditing];
|
||||||
|
|
||||||
|
if (shouldAutoScroll) {
|
||||||
|
end.location = [text length];
|
||||||
|
end.length = 0;
|
||||||
|
[messagesView scrollRangeToVisible:end];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setTitle:(NSString *)str
|
||||||
|
{
|
||||||
|
[[self window] setTitle:str];
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
static StartupWinController *startwin = nil;
|
||||||
|
|
||||||
|
int startwin_open(void)
|
||||||
|
{
|
||||||
|
if (startwin != nil) return 1;
|
||||||
|
|
||||||
|
startwin = [[StartupWinController alloc] initWithWindowNibName:@"startwin.game"];
|
||||||
|
if (startwin == nil) return -1;
|
||||||
|
|
||||||
|
{
|
||||||
|
static unsigned soundQualityFrequencies[] = { 44100, 22050, 11025 };
|
||||||
|
static unsigned soundQualitySampleSizes[] = { 16, 8 };
|
||||||
|
static unsigned soundQualityChannels[] = { 2, 1 };
|
||||||
|
unsigned f, b, c, i;
|
||||||
|
|
||||||
|
i = sizeof(soundQualityFrequencies) *
|
||||||
|
sizeof(soundQualitySampleSizes) *
|
||||||
|
sizeof(soundQualityChannels) /
|
||||||
|
sizeof(int) + 2; // one for the terminator, one for a custom setting
|
||||||
|
soundQualities = (struct soundQuality_t *) malloc(i * sizeof(struct soundQuality_t));
|
||||||
|
|
||||||
|
i = 0;
|
||||||
|
for (c = 0; c < sizeof(soundQualityChannels) / sizeof(int); c++) {
|
||||||
|
for (b = 0; b < sizeof(soundQualitySampleSizes) / sizeof(int); b++) {
|
||||||
|
for (f = 0; f < sizeof(soundQualityFrequencies) / sizeof(int); f++) {
|
||||||
|
soundQualities[i].frequency = soundQualityFrequencies[f];
|
||||||
|
soundQualities[i].samplesize = soundQualitySampleSizes[b];
|
||||||
|
soundQualities[i].channels = soundQualityChannels[c];
|
||||||
|
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
soundQualities[i].frequency = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
[startwin setupMessagesMode];
|
||||||
|
[startwin showWindow:nil];
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int startwin_close(void)
|
||||||
|
{
|
||||||
|
if (startwin == nil) return 1;
|
||||||
|
|
||||||
|
[startwin close];
|
||||||
|
[startwin release];
|
||||||
|
startwin = nil;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int startwin_puts(const char *s)
|
||||||
|
{
|
||||||
|
NSString *ns;
|
||||||
|
|
||||||
|
if (!s) return -1;
|
||||||
|
if (startwin == nil) return 1;
|
||||||
|
|
||||||
|
ns = [[NSString alloc] initWithCString:s];
|
||||||
|
[startwin putsMessage:ns];
|
||||||
|
[ns release];
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int startwin_settitle(const char *s)
|
||||||
|
{
|
||||||
|
NSString *ns;
|
||||||
|
|
||||||
|
if (!s) return -1;
|
||||||
|
if (startwin == nil) return 1;
|
||||||
|
|
||||||
|
ns = [[NSString alloc] initWithCString:s];
|
||||||
|
[startwin setTitle:ns];
|
||||||
|
[ns release];
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int startwin_idle(void *v)
|
||||||
|
{
|
||||||
|
if (startwin) [[startwin window] displayIfNeeded];
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
extern char* grpfile;
|
||||||
|
extern int32 ScreenMode, ScreenWidth, ScreenHeight, ScreenBPP, ForceSetup, UseMouse, UseJoystick;
|
||||||
|
|
||||||
|
int startwin_run(void)
|
||||||
|
{
|
||||||
|
int retval;
|
||||||
|
|
||||||
|
if (startwin == nil) return 0;
|
||||||
|
|
||||||
|
ScanGroups();
|
||||||
|
|
||||||
|
settings.fullscreen = ScreenMode;
|
||||||
|
settings.xdim3d = ScreenWidth;
|
||||||
|
settings.ydim3d = ScreenHeight;
|
||||||
|
settings.bpp3d = ScreenBPP;
|
||||||
|
settings.samplerate = MixRate;
|
||||||
|
settings.bitspersample = NumBits;
|
||||||
|
settings.channels = NumChannels;
|
||||||
|
settings.usemouse = UseMouse;
|
||||||
|
settings.usejoystick = UseJoystick;
|
||||||
|
settings.forcesetup = ForceSetup;
|
||||||
|
strncpy(settings.selectedgrp, grpfile, BMAX_PATH);
|
||||||
|
|
||||||
|
[startwin setupRunMode];
|
||||||
|
|
||||||
|
switch ([NSApp runModalForWindow:[startwin window]]) {
|
||||||
|
case NSRunStoppedResponse: retval = 1; break;
|
||||||
|
case NSRunAbortedResponse: retval = 0; break;
|
||||||
|
default: retval = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
[startwin setupMessagesMode];
|
||||||
|
|
||||||
|
if (retval) {
|
||||||
|
ScreenMode = settings.fullscreen;
|
||||||
|
ScreenWidth = settings.xdim3d;
|
||||||
|
ScreenHeight = settings.ydim3d;
|
||||||
|
ScreenBPP = settings.bpp3d;
|
||||||
|
MixRate = settings.samplerate;
|
||||||
|
NumBits = settings.bitspersample;
|
||||||
|
NumChannels = settings.channels;
|
||||||
|
UseMouse = settings.usemouse;
|
||||||
|
UseJoystick = settings.usejoystick;
|
||||||
|
ForceSetup = settings.forcesetup;
|
||||||
|
grpfile = settings.selectedgrp;
|
||||||
|
}
|
||||||
|
|
||||||
|
return retval;
|
||||||
|
}
|
34
polymer/eduke32/source/sw/src/_config.h
Normal file
34
polymer/eduke32/source/sw/src/_config.h
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef config_private_
|
||||||
|
#define config_private_
|
||||||
|
|
||||||
|
//#define SETUPFILENAME "SW.CFG"
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
382
polymer/eduke32/source/sw/src/_functio.h
Normal file
382
polymer/eduke32/source/sw/src/_functio.h
Normal file
|
@ -0,0 +1,382 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// _functio.h
|
||||||
|
|
||||||
|
// file created by makehead.exe
|
||||||
|
// these headers contain default key assignments, as well as
|
||||||
|
// default button assignments and game function names
|
||||||
|
// axis defaults are also included
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef function_private_
|
||||||
|
#define function_private_
|
||||||
|
char *gamefunctions[] =
|
||||||
|
{
|
||||||
|
"Move_Forward",
|
||||||
|
"Move_Backward",
|
||||||
|
"Turn_Left",
|
||||||
|
"Turn_Right",
|
||||||
|
"Strafe",
|
||||||
|
"Fire",
|
||||||
|
"Open",
|
||||||
|
"Run",
|
||||||
|
"AutoRun",
|
||||||
|
"Jump",
|
||||||
|
"Crouch",
|
||||||
|
"Look_Up",
|
||||||
|
"Look_Down",
|
||||||
|
"Strafe_Left",
|
||||||
|
"Strafe_Right",
|
||||||
|
"Aim_Up",
|
||||||
|
"Aim_Down",
|
||||||
|
"Weapon_1",
|
||||||
|
"Weapon_2",
|
||||||
|
"Weapon_3",
|
||||||
|
"Weapon_4",
|
||||||
|
"Weapon_5",
|
||||||
|
"Weapon_6",
|
||||||
|
"Weapon_7",
|
||||||
|
"Weapon_8",
|
||||||
|
"Weapon_9",
|
||||||
|
"Weapon_10",
|
||||||
|
"Inventory",
|
||||||
|
"Inventory_Left",
|
||||||
|
"Inventory_Right",
|
||||||
|
"Med_Kit",
|
||||||
|
"Smoke_Bomb",
|
||||||
|
"Night_Vision",
|
||||||
|
"Gas_Bomb",
|
||||||
|
"Flash_Bomb",
|
||||||
|
"Caltrops",
|
||||||
|
"TurnAround",
|
||||||
|
"SendMessage",
|
||||||
|
"Map",
|
||||||
|
"Shrink_Screen",
|
||||||
|
"Enlarge_Screen",
|
||||||
|
"Center_View",
|
||||||
|
"Holster_Weapon",
|
||||||
|
"Map_Follow_Mode",
|
||||||
|
"See_Co_Op_View",
|
||||||
|
"Mouse_Aiming",
|
||||||
|
"Toggle_Crosshair",
|
||||||
|
"Next_Weapon",
|
||||||
|
"Previous_Weapon",
|
||||||
|
"Show_Menu",
|
||||||
|
"Show_Console",
|
||||||
|
};
|
||||||
|
|
||||||
|
#define NUMKEYENTRIES 50
|
||||||
|
|
||||||
|
static char *keydefaults[] =
|
||||||
|
{
|
||||||
|
"Move_Forward", "Up", "Kpad8",
|
||||||
|
"Move_Backward", "Down", "Kpad2",
|
||||||
|
"Turn_Left", "Left", "Kpad4",
|
||||||
|
"Turn_Right", "Right", "KPad6",
|
||||||
|
"Strafe", "LAlt", "RAlt",
|
||||||
|
"Fire", "LCtrl", "RCtrl",
|
||||||
|
"Open", "Space", "",
|
||||||
|
"Run", "LShift", "RShift",
|
||||||
|
"AutoRun", "CapLck", "",
|
||||||
|
"Jump", "A", "/",
|
||||||
|
"Crouch", "Z", "",
|
||||||
|
"Look_Up", "PgUp", "Kpad9",
|
||||||
|
"Look_Down", "PgDn", "Kpad3",
|
||||||
|
"Strafe_Left", ",", "",
|
||||||
|
"Strafe_Right", ".", "",
|
||||||
|
"Aim_Up", "Home", "KPad7",
|
||||||
|
"Aim_Down", "End", "Kpad1",
|
||||||
|
"Weapon_1", "1", "",
|
||||||
|
"Weapon_2", "2", "",
|
||||||
|
"Weapon_3", "3", "",
|
||||||
|
"Weapon_4", "4", "",
|
||||||
|
"Weapon_5", "5", "",
|
||||||
|
"Weapon_6", "6", "",
|
||||||
|
"Weapon_7", "7", "",
|
||||||
|
"Weapon_8", "8", "",
|
||||||
|
"Weapon_9", "9", "",
|
||||||
|
"Weapon_10", "0", "",
|
||||||
|
"Inventory", "Enter", "KpdEnt",
|
||||||
|
"Inventory_Left", "[", "",
|
||||||
|
"Inventory_Right", "]", "",
|
||||||
|
"Med_Kit", "M", "",
|
||||||
|
"Smoke_Bomb", "S", "",
|
||||||
|
"Night_Vision", "N", "",
|
||||||
|
"Gas_Bomb", "G", "",
|
||||||
|
"Flash_Bomb", "F", "",
|
||||||
|
"Caltrops", "C", "",
|
||||||
|
"TurnAround", "BakSpc", "",
|
||||||
|
"SendMessage", "T", "",
|
||||||
|
"Map", "Tab", "",
|
||||||
|
"Shrink_Screen", "-", "Kpad-",
|
||||||
|
"Enlarge_Screen", "=", "Kpad+",
|
||||||
|
"Center_View", "KPad5", "",
|
||||||
|
"Holster_Weapon", "ScrLck", "",
|
||||||
|
"Map_Follow_Mode", "F", "",
|
||||||
|
"See_Co_Op_View", "K", "",
|
||||||
|
"Mouse_Aiming", "U", "",
|
||||||
|
"Toggle_Crosshair", "I", "",
|
||||||
|
"Next_Weapon", "'", "",
|
||||||
|
"Previous_Weapon", ";", "",
|
||||||
|
"Show_Console", "NumLck", "",
|
||||||
|
};
|
||||||
|
|
||||||
|
static char *keydefaults_modern[] =
|
||||||
|
{
|
||||||
|
"Move_Forward", "W", "",
|
||||||
|
"Move_Backward", "S", "",
|
||||||
|
"Turn_Left", "", "",
|
||||||
|
"Turn_Right", "", "",
|
||||||
|
"Strafe", "", "",
|
||||||
|
"Fire", "", "",
|
||||||
|
"Open", "E", "",
|
||||||
|
"Run", "LShift", "",
|
||||||
|
"AutoRun", "CapLck", "",
|
||||||
|
"Jump", "Space", "",
|
||||||
|
"Crouch", "LAlt", "",
|
||||||
|
"Look_Up", "", "",
|
||||||
|
"Look_Down", "", "",
|
||||||
|
"Strafe_Left", "A", "",
|
||||||
|
"Strafe_Right", "D", "",
|
||||||
|
"Aim_Up", "", "",
|
||||||
|
"Aim_Down", "", "",
|
||||||
|
"Weapon_1", "1", "",
|
||||||
|
"Weapon_2", "2", "",
|
||||||
|
"Weapon_3", "3", "",
|
||||||
|
"Weapon_4", "4", "",
|
||||||
|
"Weapon_5", "5", "",
|
||||||
|
"Weapon_6", "6", "",
|
||||||
|
"Weapon_7", "7", "",
|
||||||
|
"Weapon_8", "8", "",
|
||||||
|
"Weapon_9", "9", "",
|
||||||
|
"Weapon_10", "0", "",
|
||||||
|
"Inventory", "Enter", "",
|
||||||
|
"Inventory_Left", "[", "",
|
||||||
|
"Inventory_Right", "]", "",
|
||||||
|
"Med_Kit", "M", "",
|
||||||
|
"Smoke_Bomb", "B", "",
|
||||||
|
"Night_Vision", "N", "",
|
||||||
|
"Gas_Bomb", "G", "",
|
||||||
|
"Flash_Bomb", "F", "",
|
||||||
|
"Caltrops", "C", "",
|
||||||
|
"TurnAround", "BakSpc", "",
|
||||||
|
"SendMessage", "T", "",
|
||||||
|
"Map", "Tab", "",
|
||||||
|
"Shrink_Screen", "-", "",
|
||||||
|
"Enlarge_Screen", "=", "",
|
||||||
|
"Center_View", "", "",
|
||||||
|
"Holster_Weapon", "H", "",
|
||||||
|
"Map_Follow_Mode", "F", "",
|
||||||
|
"See_Co_Op_View", "K", "",
|
||||||
|
"Mouse_Aiming", "U", "",
|
||||||
|
"Toggle_Crosshair", "I", "",
|
||||||
|
"Next_Weapon", "", "",
|
||||||
|
"Previous_Weapon", "", "",
|
||||||
|
"Show_Console", "NumLck", "",
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static char *mousedefaults[] =
|
||||||
|
{
|
||||||
|
"Fire",
|
||||||
|
"Strafe",
|
||||||
|
"Move_Forward",
|
||||||
|
"",
|
||||||
|
""
|
||||||
|
};
|
||||||
|
|
||||||
|
static char *mousedefaults_modern[] =
|
||||||
|
{
|
||||||
|
"Fire",
|
||||||
|
"Open",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"Next_Weapon",
|
||||||
|
"Previous_Weapon"
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static char *mouseclickeddefaults[] =
|
||||||
|
{
|
||||||
|
"",
|
||||||
|
"Open",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
""
|
||||||
|
};
|
||||||
|
|
||||||
|
static char *mouseclickeddefaults_modern[] =
|
||||||
|
{
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
""
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static char *joystickdefaults[] =
|
||||||
|
{
|
||||||
|
"Fire",
|
||||||
|
"Strafe",
|
||||||
|
"Run",
|
||||||
|
"Open",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"Aim_Down",
|
||||||
|
"Look_Right",
|
||||||
|
"Aim_Up",
|
||||||
|
"Look_Left",
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static char *joystickclickeddefaults[] =
|
||||||
|
{
|
||||||
|
"",
|
||||||
|
"Inventory",
|
||||||
|
"Jump",
|
||||||
|
"Crouch",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static char *mouseanalogdefaults[] =
|
||||||
|
{
|
||||||
|
"analog_turning",
|
||||||
|
"analog_moving",
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static char *mousedigitaldefaults[] =
|
||||||
|
{
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static char *gamepaddigitaldefaults[] =
|
||||||
|
{
|
||||||
|
"Turn_Left",
|
||||||
|
"Turn_Right",
|
||||||
|
"Move_Forward",
|
||||||
|
"Move_Backward",
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static char *joystickanalogdefaults[] =
|
||||||
|
{
|
||||||
|
"analog_turning",
|
||||||
|
"analog_moving",
|
||||||
|
"analog_strafing",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static char *joystickdigitaldefaults[] =
|
||||||
|
{
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"Run",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
};
|
||||||
|
#endif
|
79
polymer/eduke32/source/sw/src/_rts.h
Normal file
79
polymer/eduke32/source/sw/src/_rts.h
Normal file
|
@ -0,0 +1,79 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1996, 2003 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Duke Nukem 3D version 1.5 - Atomic Edition
|
||||||
|
|
||||||
|
Duke Nukem 3D is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1996 - Todd Replogle
|
||||||
|
Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef rts_private__
|
||||||
|
#define rts_private__
|
||||||
|
|
||||||
|
//===============
|
||||||
|
// TYPES
|
||||||
|
//===============
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
char name[8];
|
||||||
|
int32 handle,position,size;
|
||||||
|
} lumpinfo_t;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
char identification[4]; // should be IWAD
|
||||||
|
int32 numlumps;
|
||||||
|
int32 infotableofs;
|
||||||
|
} wadinfo_t;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
int32 filepos;
|
||||||
|
int32 size;
|
||||||
|
char name[8];
|
||||||
|
} filelump_t;
|
||||||
|
|
||||||
|
#endif
|
1019
polymer/eduke32/source/sw/src/actor.c
Normal file
1019
polymer/eduke32/source/sw/src/actor.c
Normal file
File diff suppressed because it is too large
Load diff
8
polymer/eduke32/source/sw/src/actor.h
Normal file
8
polymer/eduke32/source/sw/src/actor.h
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
int DoBeginJump(short SpriteNum);
|
||||||
|
int DoJump(short SpriteNum);
|
||||||
|
int DoBeginFall(short SpriteNum);
|
||||||
|
int DoFall(short SpriteNum);
|
||||||
|
void KeepActorOnFloor(short SpriteNum);
|
||||||
|
int DoActorSlide(short SpriteNum);
|
||||||
|
int DoActorSectorDamage(short SpriteNum);
|
||||||
|
int DoScaleSprite(short SpriteNum);
|
2231
polymer/eduke32/source/sw/src/ai.c
Normal file
2231
polymer/eduke32/source/sw/src/ai.c
Normal file
File diff suppressed because it is too large
Load diff
166
polymer/eduke32/source/sw/src/ai.h
Normal file
166
polymer/eduke32/source/sw/src/ai.h
Normal file
|
@ -0,0 +1,166 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef AI_H
|
||||||
|
|
||||||
|
#define AI_H
|
||||||
|
|
||||||
|
// Call functions based on a random range value
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
short range;
|
||||||
|
ANIMATORp action;
|
||||||
|
} DECISION, *DECISIONp;
|
||||||
|
|
||||||
|
// Personality structure
|
||||||
|
struct PERSONALITYstruct
|
||||||
|
{
|
||||||
|
DECISIONp Battle;
|
||||||
|
DECISIONp Offense;
|
||||||
|
DECISIONp Broadcast;
|
||||||
|
DECISIONp Surprised;
|
||||||
|
DECISIONp Evasive;
|
||||||
|
DECISIONp LostTarget;
|
||||||
|
DECISIONp CloseRange;
|
||||||
|
DECISIONp TouchTarget;
|
||||||
|
};
|
||||||
|
|
||||||
|
enum ActorStates { SLOW_SPEED, NORM_SPEED, MID_SPEED, FAST_SPEED, MAX_SPEED};
|
||||||
|
|
||||||
|
#define MAXATTRIBSNDS 11
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
attr_ambient, attr_alert, attr_attack, attr_pain, attr_die,
|
||||||
|
attr_extra1, attr_extra2, attr_extra3,attr_extra4,attr_extra5,
|
||||||
|
attr_extra6
|
||||||
|
} ATTRIB_SNDS;
|
||||||
|
|
||||||
|
struct ATTRIBUTEstruct
|
||||||
|
{
|
||||||
|
short Speed[MAX_SPEED];
|
||||||
|
CHAR TicAdjust[MAX_SPEED];
|
||||||
|
BYTE MaxWeapons;
|
||||||
|
/*ATTRIB_SNDS*/ int Sounds[MAXATTRIBSNDS]; // JBF: ATTRIB_SNDS? Somehow I don't think this is what was intended...
|
||||||
|
};
|
||||||
|
|
||||||
|
extern ATTRIBUTE DefaultAttrib;
|
||||||
|
|
||||||
|
// AI.C functions
|
||||||
|
void DebugMoveHit(short SpriteNum);
|
||||||
|
BOOL ActorMoveHitReact(short SpriteNum);
|
||||||
|
BOOL ActorFlaming(short SpriteNum);
|
||||||
|
void DoActorSetSpeed(short SpriteNum,BYTE speed);
|
||||||
|
short ChooseActionNumber(short decision[]);
|
||||||
|
int DoActorNoise(ANIMATORp Action,short SpriteNum);
|
||||||
|
int CanSeePlayer(short SpriteNum);
|
||||||
|
int CanHitPlayer(short SpriteNum);
|
||||||
|
int DoActorPickClosePlayer(short SpriteNum);
|
||||||
|
int CloseRangeDist(SPRITEp sp1,SPRITEp sp2);
|
||||||
|
int InitActorDecide(short SpriteNum);
|
||||||
|
int DoActorDecide(short SpriteNum);
|
||||||
|
int InitActorAlertNoise(short SpriteNum);
|
||||||
|
int InitActorAmbientNoise(short SpriteNum);
|
||||||
|
int InitActorAttackNoise(short SpriteNum);
|
||||||
|
int InitActorPainNoise(short SpriteNum);
|
||||||
|
int InitActorDieNoise(short SpriteNum);
|
||||||
|
int InitActorExtra1Noise(short SpriteNum);
|
||||||
|
int InitActorExtra2Noise(short SpriteNum);
|
||||||
|
int InitActorExtra3Noise(short SpriteNum);
|
||||||
|
int InitActorExtra4Noise(short SpriteNum);
|
||||||
|
int InitActorExtra5Noise(short SpriteNum);
|
||||||
|
int InitActorExtra6Noise(short SpriteNum);
|
||||||
|
int InitActorMoveCloser(short SpriteNum);
|
||||||
|
int DoActorCantMoveCloser(short SpriteNum);
|
||||||
|
int DoActorMoveCloser(short SpriteNum);
|
||||||
|
short FindTrackToPlayer(USERp u);
|
||||||
|
short FindTrackAwayFromPlayer(USERp u);
|
||||||
|
short FindWanderTrack(USERp u);
|
||||||
|
int InitActorRunAway(short SpriteNum);
|
||||||
|
int InitActorRunToward(short SpriteNum);
|
||||||
|
int InitActorAttack(short SpriteNum);
|
||||||
|
int DoActorAttack(short SpriteNum);
|
||||||
|
int InitActorEvade(short SpriteNum);
|
||||||
|
int InitActorWanderAround(short SpriteNum);
|
||||||
|
int InitActorFindPlayer(short SpriteNum);
|
||||||
|
int InitActorDuck(short SpriteNum);
|
||||||
|
int DoActorDuck(short SpriteNum);
|
||||||
|
int DoActorMoveJump(short SpriteNum);
|
||||||
|
int move_scan(short SpriteNum,short ang,int dist,int *stopx,int *stopy,int *stopz,short *stopsect);
|
||||||
|
int FindNewAngle(short SpriteNum,signed char dir,int DistToMove);
|
||||||
|
int InitActorReposition(short SpriteNum);
|
||||||
|
int DoActorReposition(short SpriteNum);
|
||||||
|
int InitActorPause(short SpriteNum);
|
||||||
|
int DoActorPause(short SpriteNum);
|
||||||
|
|
||||||
|
/*
|
||||||
|
ANIMATOR
|
||||||
|
InitActorDecide,
|
||||||
|
InitActorMoveCloser,
|
||||||
|
InitActorAttack,
|
||||||
|
InitActorRunAway,
|
||||||
|
InitActorEvade,
|
||||||
|
InitActorWanderAround,
|
||||||
|
InitActorFindPlayer,
|
||||||
|
InitActorReposition,
|
||||||
|
InitActorPause,
|
||||||
|
InitActorDuck,
|
||||||
|
InitActorAmbientNoise,
|
||||||
|
InitActorAlertNoise,
|
||||||
|
InitActorAttackNoise,
|
||||||
|
InitActorPainNoise,
|
||||||
|
InitActorDieNoise,
|
||||||
|
InitActorExtra1Noise,
|
||||||
|
InitActorExtra2Noise,
|
||||||
|
InitActorExtra3Noise,
|
||||||
|
InitActorExtra4Noise,
|
||||||
|
InitActorExtra5Noise,
|
||||||
|
InitActorExtra6Noise;
|
||||||
|
|
||||||
|
ANIMATOR
|
||||||
|
DoActorDecide,
|
||||||
|
DoActorMoveCloser,
|
||||||
|
DoActorAttack,
|
||||||
|
DoActorRunAway,
|
||||||
|
DoActorWanderAround,
|
||||||
|
DoActorReposition,
|
||||||
|
DoActorPause,
|
||||||
|
DoActorDuck,
|
||||||
|
DoActorAmbientNoise,
|
||||||
|
DoActorAlertNoise,
|
||||||
|
DoActorAttackNoise,
|
||||||
|
DoActorPainNoise,
|
||||||
|
DoActorDieNoise,
|
||||||
|
DoActorExtra1Noise,
|
||||||
|
DoActorExtra2Noise,
|
||||||
|
DoActorExtra3Noise,
|
||||||
|
DoActorExtra4Noise,
|
||||||
|
DoActorExtra5Noise,
|
||||||
|
DoActorExtra6Noise;
|
||||||
|
*/
|
||||||
|
|
||||||
|
VOID DoActorSetSpeed(short SpriteNum, BYTE speed);
|
||||||
|
|
||||||
|
#endif
|
215
polymer/eduke32/source/sw/src/ambient.h
Normal file
215
polymer/eduke32/source/sw/src/ambient.h
Normal file
|
@ -0,0 +1,215 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifdef AMBIENT_TABLE
|
||||||
|
#define AMB_ENTRY(name, diginame, ambient_flags, maxtics) {name, diginame, ambient_flags, maxtics},
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef AMBIENT_ENUM
|
||||||
|
#define AMB_ENTRY(name, diginame, ambient_flags, maxtics) name,
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Ambient Flags, flags can be added whenever needed, up to 16 bits
|
||||||
|
#define AMB_NONE 0
|
||||||
|
#define AMB_FOLLOW 1 // 1 = Do coordinate updates on sound
|
||||||
|
// Use this only if the sprite won't be deleted soon
|
||||||
|
#define AMB_DOPPLER 4 // 1 = Don't use doppler pitch variance
|
||||||
|
|
||||||
|
#define AMB_PAN 8 // 1 = Don't do panning of sound
|
||||||
|
#define AMB_INTERMIT 32 // 1 = This is a non-looping intermittant sound
|
||||||
|
|
||||||
|
// Tic counts used for intermittent sounds
|
||||||
|
#define AMB_TICRATE 12 // 120/10 since it's only called 10x per second
|
||||||
|
#define AMB_NOTICS 0
|
||||||
|
#define AMB_5 5 *AMB_TICRATE
|
||||||
|
#define AMB_10 10*AMB_TICRATE // AMB_TICRATE is the game's tic rate
|
||||||
|
#define AMB_15 15*AMB_TICRATE
|
||||||
|
#define AMB_20 20*AMB_TICRATE
|
||||||
|
#define AMB_30 30*AMB_TICRATE
|
||||||
|
#define AMB_45 45*AMB_TICRATE
|
||||||
|
#define AMB_60 60*AMB_TICRATE
|
||||||
|
#define AMB_120 120*AMB_TICRATE
|
||||||
|
|
||||||
|
|
||||||
|
// BUBBLES
|
||||||
|
AMB_ENTRY(0, DIGI_BUBBLES, AMB_PAN, AMB_NOTICS)
|
||||||
|
|
||||||
|
// CRICKETS
|
||||||
|
AMB_ENTRY(1, DIGI_CRICKETS, AMB_PAN, AMB_NOTICS)
|
||||||
|
|
||||||
|
// AMBIENT WATER DRIPPING IN CAVE
|
||||||
|
AMB_ENTRY(2, DIGI_CAVEDRIP1, AMB_NONE, AMB_NOTICS)
|
||||||
|
AMB_ENTRY(3, DIGI_CAVEDRIP2, AMB_INTERMIT, AMB_10)
|
||||||
|
AMB_ENTRY(4, DIGI_DRIP, AMB_PAN|AMB_INTERMIT, AMB_20)
|
||||||
|
|
||||||
|
// WATER FALL
|
||||||
|
AMB_ENTRY(5, DIGI_WATERFALL1, AMB_NONE, AMB_NOTICS)
|
||||||
|
AMB_ENTRY(6, DIGI_WATERFALL2, AMB_NONE, AMB_NOTICS)
|
||||||
|
|
||||||
|
// WATER FLOWING
|
||||||
|
AMB_ENTRY(7, DIGI_WATERFLOW1, AMB_NONE, AMB_NOTICS)
|
||||||
|
AMB_ENTRY(8, DIGI_WATERFLOW2, AMB_NONE, AMB_NOTICS)
|
||||||
|
|
||||||
|
// CRACKLING FIRE FOR CONTINUOUS BURN
|
||||||
|
AMB_ENTRY(9, DIGI_FIRE1, AMB_NONE, AMB_NOTICS)
|
||||||
|
|
||||||
|
// POWERFULL HIGH HEAT CONTINUOUS BURN
|
||||||
|
AMB_ENTRY(10, DIGI_FIRE2, AMB_NONE, AMB_NOTICS)
|
||||||
|
|
||||||
|
// AMBIENT GONG FOR USE IN TEMPLE/PALACE LEVELS
|
||||||
|
AMB_ENTRY(11, DIGI_GONG, AMB_INTERMIT, AMB_120)
|
||||||
|
|
||||||
|
// AMBIENT LAVA FLOW
|
||||||
|
AMB_ENTRY(12, DIGI_LAVAFLOW1, AMB_NONE, AMB_NOTICS)
|
||||||
|
|
||||||
|
// AMBIENT MUD BUBBLES
|
||||||
|
AMB_ENTRY(13, DIGI_MUBBUBBLES1, AMB_NONE, AMB_NOTICS)
|
||||||
|
|
||||||
|
// AMBIENT EARTH QUAKE
|
||||||
|
AMB_ENTRY(14, DIGI_EARTHQUAKE, AMB_NONE, AMB_NOTICS)
|
||||||
|
|
||||||
|
// YUCKY SEWER FLOW
|
||||||
|
AMB_ENTRY(15, DIGI_SEWERFLOW1, AMB_NONE, AMB_NOTICS)
|
||||||
|
|
||||||
|
// STEAM FLOW
|
||||||
|
AMB_ENTRY(16, DIGI_STEAM1, AMB_NONE, AMB_NOTICS)
|
||||||
|
|
||||||
|
// VOLCANIC STEAM VENT
|
||||||
|
AMB_ENTRY(17, DIGI_VOLCANOSTEAM1, AMB_NONE, AMB_NOTICS)
|
||||||
|
|
||||||
|
// SCARY AMBIENT SWAMP SOUNDS
|
||||||
|
AMB_ENTRY(18, DIGI_SWAMP, AMB_NONE, AMB_NOTICS)
|
||||||
|
|
||||||
|
// AMBIENT ROLLING THUNDER
|
||||||
|
AMB_ENTRY(19, DIGI_THUNDER, AMB_PAN|AMB_INTERMIT, AMB_60)
|
||||||
|
|
||||||
|
// UNDERWATER AMBIENCE
|
||||||
|
AMB_ENTRY(20, DIGI_UNDERWATER, AMB_PAN, AMB_NOTICS)
|
||||||
|
|
||||||
|
// SPOOKY ETHERAL VOID AMBIENCE (NETHERWORLDLY SOUNDS)
|
||||||
|
AMB_ENTRY(21, DIGI_VOID1, AMB_NONE, AMB_NOTICS)
|
||||||
|
AMB_ENTRY(22, DIGI_VOID2, AMB_NONE, AMB_NOTICS)
|
||||||
|
AMB_ENTRY(23, DIGI_VOID3, AMB_NONE, AMB_NOTICS)
|
||||||
|
AMB_ENTRY(24, DIGI_VOID4, AMB_NONE, AMB_NOTICS)
|
||||||
|
AMB_ENTRY(25, DIGI_VOID5, AMB_NONE, AMB_NOTICS)
|
||||||
|
|
||||||
|
// VOLCANIC ERUPTION
|
||||||
|
AMB_ENTRY(26, DIGI_ERUPTION, AMB_NONE, AMB_NOTICS)
|
||||||
|
|
||||||
|
// VOLCANIC SIZZLING PROJECTILES FLYING THROUGH AIR
|
||||||
|
AMB_ENTRY(27, DIGI_VOLCANOPROJECTILE, AMB_NONE, AMB_NOTICS)
|
||||||
|
|
||||||
|
// LIGHT WIND AMBIENCE
|
||||||
|
AMB_ENTRY(28, DIGI_LIGHTWIND, AMB_NONE, AMB_NOTICS)
|
||||||
|
|
||||||
|
// STRONG BLOWING WIND AMBIENCE
|
||||||
|
AMB_ENTRY(29, DIGI_STRONGWIND, AMB_PAN|AMB_INTERMIT, AMB_20)
|
||||||
|
|
||||||
|
// BREAKING WOOD AMBIENCE
|
||||||
|
AMB_ENTRY(30, DIGI_BREAKINGWOOD, AMB_INTERMIT, AMB_120)
|
||||||
|
|
||||||
|
// BREAKING, TUMBLING STONES FALLING AMBIENCE
|
||||||
|
AMB_ENTRY(31, DIGI_BREAKSTONES, AMB_NONE, AMB_NOTICS)
|
||||||
|
|
||||||
|
// MOTOR BOAT
|
||||||
|
AMB_ENTRY(32, DIGI_NULL, AMB_NONE, AMB_NOTICS)
|
||||||
|
AMB_ENTRY(33, DIGI_NULL, AMB_NONE, AMB_NOTICS)
|
||||||
|
AMB_ENTRY(34, DIGI_NULL, AMB_NONE, AMB_NOTICS)
|
||||||
|
|
||||||
|
// WWII JAP ARMY TANK
|
||||||
|
AMB_ENTRY(35, DIGI_NULL, AMB_NONE, AMB_NOTICS)
|
||||||
|
AMB_ENTRY(36, DIGI_NULL, AMB_NONE, AMB_NOTICS)
|
||||||
|
AMB_ENTRY(37, DIGI_NULL, AMB_NONE, AMB_NOTICS)
|
||||||
|
AMB_ENTRY(38, DIGI_NULL, AMB_NONE, AMB_NOTICS)
|
||||||
|
AMB_ENTRY(39, DIGI_NULL, AMB_NONE, AMB_NOTICS)
|
||||||
|
|
||||||
|
// WWII JAP BOMBER PLANE
|
||||||
|
AMB_ENTRY(40, DIGI_BOMBRFLYING, AMB_NONE, AMB_NOTICS)
|
||||||
|
AMB_ENTRY(41, DIGI_BOMBRDROPBOMB, AMB_NONE, AMB_NOTICS)
|
||||||
|
|
||||||
|
// GIANT DRILL MACHINE
|
||||||
|
AMB_ENTRY(42, DIGI_DRILL, AMB_NONE, AMB_NOTICS)
|
||||||
|
|
||||||
|
// SECTOR GEAR COG TURNING
|
||||||
|
AMB_ENTRY(43, DIGI_GEAR1, AMB_NONE, AMB_NOTICS)
|
||||||
|
|
||||||
|
// GENERIC SECTOR OBJECT MACHINE RUNNING
|
||||||
|
AMB_ENTRY(44, DIGI_MACHINE1, AMB_NONE, AMB_NOTICS)
|
||||||
|
|
||||||
|
// ENGINE ROOM
|
||||||
|
AMB_ENTRY(45, DIGI_ENGROOM1, AMB_NONE, AMB_NOTICS)
|
||||||
|
AMB_ENTRY(46, DIGI_ENGROOM2, AMB_NONE, AMB_NOTICS)
|
||||||
|
AMB_ENTRY(47, DIGI_ENGROOM3, AMB_NONE, AMB_NOTICS)
|
||||||
|
AMB_ENTRY(48, DIGI_ENGROOM4, AMB_NONE, AMB_NOTICS)
|
||||||
|
AMB_ENTRY(49, DIGI_ENGROOM5, AMB_NONE, AMB_NOTICS)
|
||||||
|
|
||||||
|
// HELICOPTER, SPINNING BLADE SOUND
|
||||||
|
AMB_ENTRY(50, DIGI_HELI, AMB_NONE, AMB_NOTICS)
|
||||||
|
|
||||||
|
// ECHOING HEART
|
||||||
|
AMB_ENTRY(51, DIGI_BIGHART, AMB_NONE, AMB_NOTICS)
|
||||||
|
|
||||||
|
// ETHERAL WIND
|
||||||
|
AMB_ENTRY(52, DIGI_WIND4, AMB_NONE, AMB_NOTICS)
|
||||||
|
|
||||||
|
// SPOOKY SINE WAVE
|
||||||
|
AMB_ENTRY(53, DIGI_SPOOKY1, AMB_NONE, AMB_NOTICS)
|
||||||
|
|
||||||
|
// JET ENGINE
|
||||||
|
AMB_ENTRY(54, DIGI_JET, AMB_NONE, AMB_NOTICS)
|
||||||
|
|
||||||
|
// CEREMONIAL DRUM CHANT
|
||||||
|
AMB_ENTRY(55, DIGI_DRUMCHANT, AMB_NONE, AMB_NOTICS)
|
||||||
|
|
||||||
|
AMB_ENTRY(56, DIGI_ASIREN1, AMB_INTERMIT, AMB_45)
|
||||||
|
AMB_ENTRY(57, DIGI_FIRETRK1, AMB_INTERMIT, AMB_60)
|
||||||
|
AMB_ENTRY(58, DIGI_TRAFFIC1, AMB_INTERMIT, AMB_60)
|
||||||
|
AMB_ENTRY(59, DIGI_TRAFFIC2, AMB_INTERMIT, AMB_60)
|
||||||
|
AMB_ENTRY(60, DIGI_TRAFFIC3, AMB_INTERMIT, AMB_60)
|
||||||
|
AMB_ENTRY(61, DIGI_TRAFFIC4, AMB_INTERMIT, AMB_60)
|
||||||
|
AMB_ENTRY(62, DIGI_TRAFFIC5, AMB_INTERMIT, AMB_30)
|
||||||
|
AMB_ENTRY(63, DIGI_TRAFFIC6, AMB_INTERMIT, AMB_60)
|
||||||
|
AMB_ENTRY(64, DIGI_HELI1, AMB_INTERMIT, AMB_120)
|
||||||
|
AMB_ENTRY(65, DIGI_JET1, AMB_INTERMIT, AMB_120)
|
||||||
|
AMB_ENTRY(66, DIGI_MOTO1, AMB_INTERMIT, AMB_45)
|
||||||
|
AMB_ENTRY(67, DIGI_MOTO2, AMB_INTERMIT, AMB_60)
|
||||||
|
AMB_ENTRY(68, DIGI_NEON1, AMB_INTERMIT, AMB_5)
|
||||||
|
AMB_ENTRY(69, DIGI_SUBWAY, AMB_INTERMIT, AMB_30)
|
||||||
|
AMB_ENTRY(70, DIGI_TRAIN1, AMB_INTERMIT, AMB_120)
|
||||||
|
AMB_ENTRY(71, DIGI_BIRDS1, AMB_INTERMIT, AMB_10)
|
||||||
|
AMB_ENTRY(72, DIGI_BIRDS2, AMB_INTERMIT, AMB_10)
|
||||||
|
AMB_ENTRY(73, DIGI_AMOEBA, AMB_NONE, AMB_NOTICS)
|
||||||
|
AMB_ENTRY(74, DIGI_TRAIN3, AMB_INTERMIT, AMB_120)
|
||||||
|
AMB_ENTRY(75, DIGI_TRAIN8, AMB_INTERMIT, AMB_120)
|
||||||
|
AMB_ENTRY(76, DIGI_WHIPME, AMB_NONE, AMB_NOTICS)
|
||||||
|
AMB_ENTRY(77, DIGI_FLAGWAVE, AMB_NONE, AMB_NOTICS)
|
||||||
|
AMB_ENTRY(78, DIGI_ANIMECRY, AMB_NONE, AMB_NOTICS)
|
||||||
|
AMB_ENTRY(79, DIGI_WINDCHIMES, AMB_INTERMIT, AMB_10)
|
||||||
|
AMB_ENTRY(80, DIGI_BOATCREAK, AMB_INTERMIT, AMB_10)
|
||||||
|
AMB_ENTRY(81, DIGI_SHIPBELL, AMB_INTERMIT, AMB_30)
|
||||||
|
AMB_ENTRY(82, DIGI_FOGHORN, AMB_INTERMIT, AMB_120)
|
||||||
|
|
||||||
|
#undef AMB_ENTRY
|
385
polymer/eduke32/source/sw/src/anim.c
Normal file
385
polymer/eduke32/source/sw/src/anim.c
Normal file
|
@ -0,0 +1,385 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
#include "build.h"
|
||||||
|
#include "cache1d.h"
|
||||||
|
|
||||||
|
#include "keys.h"
|
||||||
|
#include "mytypes.h"
|
||||||
|
#include "develop.h"
|
||||||
|
#include "fx_man.h"
|
||||||
|
#include "music.h"
|
||||||
|
#include "scriplib.h"
|
||||||
|
#include "file_lib.h"
|
||||||
|
#include "gamedefs.h"
|
||||||
|
#include "keyboard.h"
|
||||||
|
#include "util_lib.h"
|
||||||
|
|
||||||
|
#include "control.h"
|
||||||
|
#include "config.h"
|
||||||
|
#include "sounds.h"
|
||||||
|
#include "function.h"
|
||||||
|
|
||||||
|
#include "game.h"
|
||||||
|
#include "colormap.h"
|
||||||
|
#include "net.h"
|
||||||
|
|
||||||
|
#include "animlib.h"
|
||||||
|
#include "anim.h"
|
||||||
|
|
||||||
|
#define MAX_ANMS 10
|
||||||
|
anim_t *anm_ptr[MAX_ANMS];
|
||||||
|
|
||||||
|
int ANIMnumframes;
|
||||||
|
unsigned char ANIMpal[3*256];
|
||||||
|
unsigned char ANIMnum = 0;
|
||||||
|
short SoundState;
|
||||||
|
|
||||||
|
char *ANIMname[] =
|
||||||
|
{
|
||||||
|
"sw.anm",
|
||||||
|
"swend.anm",
|
||||||
|
"sumocinm.anm",
|
||||||
|
"zfcin.anm",
|
||||||
|
};
|
||||||
|
|
||||||
|
#define ANIM_TILE(num) (MAXTILES-11 + (num))
|
||||||
|
|
||||||
|
VOID AnimShareIntro(int frame, int numframes)
|
||||||
|
{
|
||||||
|
int zero=0;
|
||||||
|
|
||||||
|
if (frame == numframes-1)
|
||||||
|
ototalclock += 120;
|
||||||
|
else if (frame == 1)
|
||||||
|
{
|
||||||
|
PlaySound(DIGI_NOMESSWITHWANG,&zero,&zero,&zero,v3df_none);
|
||||||
|
ototalclock += 120*3;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ototalclock += 8;
|
||||||
|
|
||||||
|
if (frame == 5)
|
||||||
|
{
|
||||||
|
PlaySound(DIGI_INTRO_SLASH,&zero,&zero,&zero,v3df_none);
|
||||||
|
}
|
||||||
|
else if (frame == 15)
|
||||||
|
{
|
||||||
|
PlaySound(DIGI_INTRO_WHIRL,&zero,&zero,&zero,v3df_none);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID AnimSerp(int frame, int numframes)
|
||||||
|
{
|
||||||
|
int zero=0;
|
||||||
|
ototalclock += 16;
|
||||||
|
|
||||||
|
if (frame == numframes-1)
|
||||||
|
ototalclock += 1*120;
|
||||||
|
|
||||||
|
if (frame == 1)
|
||||||
|
{
|
||||||
|
PlaySound(DIGI_SERPTAUNTWANG,&zero,&zero,&zero,v3df_none);
|
||||||
|
}
|
||||||
|
else if (frame == 16)
|
||||||
|
{
|
||||||
|
PlaySound(DIGI_SHAREND_TELEPORT,&zero,&zero,&zero,v3df_none);
|
||||||
|
}
|
||||||
|
else if (frame == 35)
|
||||||
|
{
|
||||||
|
SoundState++;
|
||||||
|
PlaySound(DIGI_WANGTAUNTSERP1,&zero,&zero,&zero,v3df_none);
|
||||||
|
}
|
||||||
|
else if (frame == 51)
|
||||||
|
{
|
||||||
|
SoundState++;
|
||||||
|
PlaySound(DIGI_SHAREND_UGLY1,&zero,&zero,&zero,v3df_none);
|
||||||
|
}
|
||||||
|
else if (frame == 64)
|
||||||
|
{
|
||||||
|
SoundState++;
|
||||||
|
PlaySound(DIGI_SHAREND_UGLY2,&zero,&zero,&zero,v3df_none);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID AnimSumo(int frame, int numframes)
|
||||||
|
{
|
||||||
|
int zero=0;
|
||||||
|
ototalclock += 10;
|
||||||
|
|
||||||
|
if (frame == numframes-1)
|
||||||
|
ototalclock += 1*120;
|
||||||
|
|
||||||
|
if (frame == 1)
|
||||||
|
ototalclock += 30;
|
||||||
|
|
||||||
|
if (frame == 2)
|
||||||
|
{
|
||||||
|
// hungry
|
||||||
|
PlaySound(DIGI_JG41012,&zero,&zero,&zero,v3df_none);
|
||||||
|
}
|
||||||
|
else if (frame == 30)
|
||||||
|
{
|
||||||
|
PlaySound(DIGI_HOTHEADSWITCH,&zero,&zero,&zero,v3df_none);
|
||||||
|
}
|
||||||
|
else if (frame == 42)
|
||||||
|
{
|
||||||
|
PlaySound(DIGI_HOTHEADSWITCH,&zero,&zero,&zero,v3df_none);
|
||||||
|
}
|
||||||
|
else if (frame == 59)
|
||||||
|
{
|
||||||
|
PlaySound(DIGI_JG41028,&zero,&zero,&zero,v3df_none);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID AnimZilla(int frame, int numframes)
|
||||||
|
{
|
||||||
|
int zero=0;
|
||||||
|
ototalclock += 16;
|
||||||
|
|
||||||
|
if (frame == numframes-1)
|
||||||
|
ototalclock += 1*120;
|
||||||
|
|
||||||
|
if (frame == 1)
|
||||||
|
{
|
||||||
|
PlaySound(DIGI_ZC1,&zero,&zero,&zero,v3df_none);
|
||||||
|
}
|
||||||
|
else if (frame == 5)
|
||||||
|
{
|
||||||
|
PlaySound(DIGI_JG94024,&zero,&zero,&zero,v3df_none);
|
||||||
|
}
|
||||||
|
else if (frame == 14)
|
||||||
|
{
|
||||||
|
PlaySound(DIGI_ZC2,&zero,&zero,&zero,v3df_none);
|
||||||
|
}
|
||||||
|
else if (frame == 30)
|
||||||
|
{
|
||||||
|
PlaySound(DIGI_ZC3,&zero,&zero,&zero,v3df_none);
|
||||||
|
}
|
||||||
|
else if (frame == 32)
|
||||||
|
{
|
||||||
|
PlaySound(DIGI_ZC4,&zero,&zero,&zero,v3df_none);
|
||||||
|
}
|
||||||
|
else if (frame == 37)
|
||||||
|
{
|
||||||
|
PlaySound(DIGI_ZC5,&zero,&zero,&zero,v3df_none);
|
||||||
|
}
|
||||||
|
else if (frame == 63)
|
||||||
|
{
|
||||||
|
PlaySound(DIGI_Z16043,&zero,&zero,&zero,v3df_none);
|
||||||
|
PlaySound(DIGI_ZC6,&zero,&zero,&zero,v3df_none);
|
||||||
|
PlaySound(DIGI_ZC7,&zero,&zero,&zero,v3df_none);
|
||||||
|
}
|
||||||
|
else if (frame == 72)
|
||||||
|
{
|
||||||
|
PlaySound(DIGI_ZC7,&zero,&zero,&zero,v3df_none);
|
||||||
|
}
|
||||||
|
else if (frame == 73)
|
||||||
|
{
|
||||||
|
PlaySound(DIGI_ZC4,&zero,&zero,&zero,v3df_none);
|
||||||
|
}
|
||||||
|
else if (frame == 77)
|
||||||
|
{
|
||||||
|
PlaySound(DIGI_ZC5,&zero,&zero,&zero,v3df_none);
|
||||||
|
}
|
||||||
|
else if (frame == 87)
|
||||||
|
{
|
||||||
|
PlaySound(DIGI_ZC8,&zero,&zero,&zero,v3df_none);
|
||||||
|
}
|
||||||
|
else if (frame == 103)
|
||||||
|
{
|
||||||
|
PlaySound(DIGI_ZC7,&zero,&zero,&zero,v3df_none);
|
||||||
|
}
|
||||||
|
else if (frame == 108)
|
||||||
|
{
|
||||||
|
PlaySound(DIGI_ZC9,&zero,&zero,&zero,v3df_none);
|
||||||
|
}
|
||||||
|
else if (frame == 120)
|
||||||
|
{
|
||||||
|
PlaySound(DIGI_JG94039,&zero,&zero,&zero,v3df_none);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned char *LoadAnm(short anim_num)
|
||||||
|
{
|
||||||
|
int handle;
|
||||||
|
int length;
|
||||||
|
unsigned char *animbuf, *palptr;
|
||||||
|
int i,j,k;
|
||||||
|
|
||||||
|
DSPRINTF(ds,"LoadAnm");
|
||||||
|
MONO_PRINT(ds);
|
||||||
|
|
||||||
|
// this seperate allows the anim to be precached easily
|
||||||
|
|
||||||
|
ANIMnum = anim_num;
|
||||||
|
|
||||||
|
// lock it
|
||||||
|
walock[ANIM_TILE(ANIMnum)] = 219;
|
||||||
|
|
||||||
|
if (anm_ptr[anim_num] == 0)
|
||||||
|
{
|
||||||
|
handle = kopen4load(ANIMname[ANIMnum], 0);
|
||||||
|
if (handle == -1)
|
||||||
|
return NULL;
|
||||||
|
length = kfilelength(handle);
|
||||||
|
|
||||||
|
allocache((void **) &anm_ptr[anim_num], length + sizeof(anim_t), &walock[ANIM_TILE(ANIMnum)]);
|
||||||
|
animbuf = (unsigned char *)((intptr_t)anm_ptr[anim_num] + sizeof(anim_t));
|
||||||
|
|
||||||
|
kread(handle, animbuf, length);
|
||||||
|
kclose(handle);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
animbuf = (unsigned char *)((intptr_t)anm_ptr[anim_num] + sizeof(anim_t));
|
||||||
|
}
|
||||||
|
|
||||||
|
return animbuf;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
playanm(short anim_num)
|
||||||
|
{
|
||||||
|
unsigned char *animbuf, *palptr;
|
||||||
|
int i, j, k, length = 0, numframes = 0;
|
||||||
|
int32 handle = -1;
|
||||||
|
unsigned char ANIMvesapal[4*256];
|
||||||
|
unsigned char tempbuf[256];
|
||||||
|
unsigned char *palook_bak = palookup[0];
|
||||||
|
UserInput uinfo = { FALSE, FALSE, dir_None };
|
||||||
|
|
||||||
|
ANIMnum = anim_num;
|
||||||
|
|
||||||
|
KB_FlushKeyboardQueue();
|
||||||
|
KB_ClearKeysDown();
|
||||||
|
|
||||||
|
DSPRINTF(ds,"PlayAnm");
|
||||||
|
MONO_PRINT(ds);
|
||||||
|
|
||||||
|
DSPRINTF(ds,"PlayAnm");
|
||||||
|
MONO_PRINT(ds);
|
||||||
|
|
||||||
|
animbuf = LoadAnm(anim_num);
|
||||||
|
if (!animbuf)
|
||||||
|
return;
|
||||||
|
|
||||||
|
DSPRINTF(ds,"PlayAnm - Palette Stuff");
|
||||||
|
MONO_PRINT(ds);
|
||||||
|
|
||||||
|
for (i = 0; i < 256; i++)
|
||||||
|
tempbuf[i] = i;
|
||||||
|
palookup[0] = tempbuf;
|
||||||
|
|
||||||
|
ANIM_LoadAnim(animbuf);
|
||||||
|
ANIMnumframes = ANIM_NumFrames();
|
||||||
|
numframes = ANIMnumframes;
|
||||||
|
|
||||||
|
palptr = ANIM_GetPalette();
|
||||||
|
for (i = 0; i < 768; i++)
|
||||||
|
ANIMvesapal[i] = palptr[i]>>2;
|
||||||
|
|
||||||
|
tilesizx[ANIM_TILE(ANIMnum)] = 200;
|
||||||
|
tilesizy[ANIM_TILE(ANIMnum)] = 320;
|
||||||
|
|
||||||
|
clearview(0);
|
||||||
|
|
||||||
|
setbrightness(gs.Brightness,ANIMvesapal,2);
|
||||||
|
if (ANIMnum == 1)
|
||||||
|
{
|
||||||
|
// draw the first frame
|
||||||
|
waloff[ANIM_TILE(ANIMnum)] = (intptr_t)ANIM_DrawFrame(1);
|
||||||
|
invalidatetile(ANIM_TILE(ANIMnum), 0, 1<<4);
|
||||||
|
rotatesprite(0 << 16, 0 << 16, 65536L, 512, ANIM_TILE(ANIMnum), 0, 0, 2 + 4 + 8 + 16 + 64, 0, 0, xdim - 1, ydim - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
SoundState = 0;
|
||||||
|
//ototalclock = totalclock + 120*2;
|
||||||
|
ototalclock = totalclock;
|
||||||
|
|
||||||
|
for (i = 1; i < numframes; i++)
|
||||||
|
{
|
||||||
|
while (totalclock < ototalclock)
|
||||||
|
{
|
||||||
|
handleevents();
|
||||||
|
CONTROL_GetUserInput(&uinfo);
|
||||||
|
CONTROL_ClearUserInput(&uinfo);
|
||||||
|
switch (ANIMnum)
|
||||||
|
{
|
||||||
|
case ANIM_INTRO:
|
||||||
|
if (KB_KeyWaiting() || uinfo.button0 || uinfo.button1 || quitevent)
|
||||||
|
goto ENDOFANIMLOOP;
|
||||||
|
break;
|
||||||
|
case ANIM_SERP:
|
||||||
|
if (KEY_PRESSED(KEYSC_ESC) || uinfo.button1 || quitevent)
|
||||||
|
goto ENDOFANIMLOOP;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
getpackets();
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (ANIMnum)
|
||||||
|
{
|
||||||
|
case ANIM_INTRO:
|
||||||
|
AnimShareIntro(i,numframes);
|
||||||
|
break;
|
||||||
|
case ANIM_SERP:
|
||||||
|
AnimSerp(i,numframes);
|
||||||
|
break;
|
||||||
|
case ANIM_SUMO:
|
||||||
|
AnimSumo(i,numframes);
|
||||||
|
break;
|
||||||
|
case ANIM_ZILLA:
|
||||||
|
AnimZilla(i,numframes);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
waloff[ANIM_TILE(ANIMnum)] = (intptr_t)ANIM_DrawFrame(i);
|
||||||
|
invalidatetile(ANIM_TILE(ANIMnum), 0, 1<<4);
|
||||||
|
|
||||||
|
rotatesprite(0 << 16, 0 << 16, 65536L, 512, ANIM_TILE(ANIMnum), 0, 0, 2 + 4 + 8 + 16 + 64, 0, 0, xdim - 1, ydim - 1);
|
||||||
|
nextpage();
|
||||||
|
}
|
||||||
|
|
||||||
|
// pause on final frame
|
||||||
|
while (totalclock < ototalclock)
|
||||||
|
{
|
||||||
|
handleevents();
|
||||||
|
getpackets();
|
||||||
|
}
|
||||||
|
|
||||||
|
ENDOFANIMLOOP:
|
||||||
|
|
||||||
|
clearview(0);
|
||||||
|
nextpage();
|
||||||
|
palookup[0] = palook_bak;
|
||||||
|
setbrightness(gs.Brightness, (unsigned char *)palette_data, 2);
|
||||||
|
|
||||||
|
KB_FlushKeyboardQueue();
|
||||||
|
KB_ClearKeysDown();
|
||||||
|
ANIM_FreeAnim();
|
||||||
|
walock[ANIM_TILE(ANIMnum)] = 1;
|
||||||
|
}
|
33
polymer/eduke32/source/sw/src/anim.h
Normal file
33
polymer/eduke32/source/sw/src/anim.h
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#define ANIM_INTRO 0
|
||||||
|
#define ANIM_SERP 1
|
||||||
|
#define ANIM_SUMO 2
|
||||||
|
#define ANIM_ZILLA 3
|
||||||
|
|
||||||
|
unsigned char *LoadAnm(short anim_num);
|
||||||
|
void playanm(short anim_num);
|
643
polymer/eduke32/source/sw/src/bldscript.c
Normal file
643
polymer/eduke32/source/sw/src/bldscript.c
Normal file
|
@ -0,0 +1,643 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1996, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is NOT part of Shadow Warrior version 1.2
|
||||||
|
However, it is either an older version of a file that is, or is
|
||||||
|
some test code written during the development of Shadow Warrior.
|
||||||
|
This file is provided purely for educational interest.
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// scriplib.c
|
||||||
|
#include "build.h"
|
||||||
|
#include "editor.h"
|
||||||
|
#include "cache1d.h"
|
||||||
|
|
||||||
|
#include "names2.h"
|
||||||
|
#include "game.h"
|
||||||
|
|
||||||
|
#include "parse.h"
|
||||||
|
|
||||||
|
#define PATHSEPERATOR '\\'
|
||||||
|
|
||||||
|
|
||||||
|
//#define COMPUTE_TOTALS 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
=============================================================================
|
||||||
|
|
||||||
|
ABNORMAL TERMINATION
|
||||||
|
|
||||||
|
=============================================================================
|
||||||
|
*/
|
||||||
|
void Error(char *error, ...)
|
||||||
|
{
|
||||||
|
va_list argptr;
|
||||||
|
|
||||||
|
va_start(argptr,error);
|
||||||
|
vprintf(error,argptr);
|
||||||
|
va_end(argptr);
|
||||||
|
printf("\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
=============================================================================
|
||||||
|
|
||||||
|
PARSING STUFF
|
||||||
|
|
||||||
|
=============================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
|
char token[MAXTOKEN];
|
||||||
|
char *scriptbuffer,*script_p,*scriptend_p;
|
||||||
|
int grabbed;
|
||||||
|
int scriptline;
|
||||||
|
BOOL endofscript;
|
||||||
|
BOOL tokenready; // only TRUE if UnGetToken was just called
|
||||||
|
|
||||||
|
/*
|
||||||
|
==============
|
||||||
|
=
|
||||||
|
= LoadScriptFile
|
||||||
|
=
|
||||||
|
==============
|
||||||
|
*/
|
||||||
|
|
||||||
|
BOOL LoadScriptFile(char *filename)
|
||||||
|
{
|
||||||
|
int size, readsize;
|
||||||
|
int fp;
|
||||||
|
|
||||||
|
|
||||||
|
if ((fp=kopen4load(filename,0)) == -1)
|
||||||
|
{
|
||||||
|
// If there's no script file, forget it.
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
size = kfilelength(fp);
|
||||||
|
|
||||||
|
scriptbuffer = (char *)malloc(size);
|
||||||
|
|
||||||
|
ASSERT(scriptbuffer != NULL);
|
||||||
|
|
||||||
|
readsize = kread(fp, scriptbuffer, size);
|
||||||
|
|
||||||
|
kclose(fp);
|
||||||
|
|
||||||
|
ASSERT(readsize == size);
|
||||||
|
|
||||||
|
|
||||||
|
// Convert filebuffer to all upper case
|
||||||
|
//strupr(scriptbuffer);
|
||||||
|
|
||||||
|
script_p = scriptbuffer;
|
||||||
|
scriptend_p = script_p + size;
|
||||||
|
scriptline = 1;
|
||||||
|
endofscript = FALSE;
|
||||||
|
tokenready = FALSE;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
==============
|
||||||
|
=
|
||||||
|
= UnGetToken
|
||||||
|
=
|
||||||
|
= Signals that the current token was not used, and should be reported
|
||||||
|
= for the next GetToken. Note that
|
||||||
|
|
||||||
|
GetToken (TRUE);
|
||||||
|
UnGetToken ();
|
||||||
|
GetToken (FALSE);
|
||||||
|
|
||||||
|
= could cross a line boundary.
|
||||||
|
=
|
||||||
|
==============
|
||||||
|
*/
|
||||||
|
|
||||||
|
void UnGetToken(void)
|
||||||
|
{
|
||||||
|
tokenready = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
==============
|
||||||
|
=
|
||||||
|
= GetToken
|
||||||
|
=
|
||||||
|
==============
|
||||||
|
*/
|
||||||
|
|
||||||
|
void GetToken(BOOL crossline)
|
||||||
|
{
|
||||||
|
char *token_p;
|
||||||
|
|
||||||
|
if (tokenready) // is a token already waiting?
|
||||||
|
{
|
||||||
|
tokenready = FALSE;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (script_p >= scriptend_p)
|
||||||
|
{
|
||||||
|
if (!crossline)
|
||||||
|
Error("Line %i is incomplete\n",scriptline);
|
||||||
|
endofscript = TRUE;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// skip space
|
||||||
|
//
|
||||||
|
skipspace:
|
||||||
|
while (*script_p <= 32)
|
||||||
|
{
|
||||||
|
if (script_p >= scriptend_p)
|
||||||
|
{
|
||||||
|
if (!crossline)
|
||||||
|
Error("Line %i is incomplete\n",scriptline);
|
||||||
|
endofscript = TRUE;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (*script_p++ == '\n')
|
||||||
|
{
|
||||||
|
if (!crossline)
|
||||||
|
Error("Line %i is incomplete\n",scriptline);
|
||||||
|
scriptline++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (script_p >= scriptend_p)
|
||||||
|
{
|
||||||
|
if (!crossline)
|
||||||
|
Error("Line %i is incomplete\n",scriptline);
|
||||||
|
endofscript = TRUE;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (*script_p == '#') // # is comment field
|
||||||
|
{
|
||||||
|
if (!crossline)
|
||||||
|
Error("Line %i is incomplete\n",scriptline);
|
||||||
|
while (*script_p++ != '\n')
|
||||||
|
if (script_p >= scriptend_p)
|
||||||
|
{
|
||||||
|
endofscript = TRUE;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
goto skipspace;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// copy token
|
||||||
|
//
|
||||||
|
token_p = token;
|
||||||
|
|
||||||
|
while (*script_p > 32 && *script_p != '#')
|
||||||
|
{
|
||||||
|
*token_p++ = *script_p++;
|
||||||
|
if (script_p == scriptend_p)
|
||||||
|
break;
|
||||||
|
ASSERT(token_p != &token[MAXTOKEN]);
|
||||||
|
// Error ("Token too large on line %i\n",scriptline);
|
||||||
|
}
|
||||||
|
|
||||||
|
*token_p = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
==============
|
||||||
|
=
|
||||||
|
= TokenAvailable
|
||||||
|
=
|
||||||
|
= Returns true if there is another token on the line
|
||||||
|
=
|
||||||
|
==============
|
||||||
|
*/
|
||||||
|
|
||||||
|
BOOL TokenAvailable(void)
|
||||||
|
{
|
||||||
|
char *search_p;
|
||||||
|
|
||||||
|
search_p = script_p;
|
||||||
|
|
||||||
|
if (search_p >= scriptend_p)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
while (*search_p <= 32)
|
||||||
|
{
|
||||||
|
if (*search_p == '\n')
|
||||||
|
return FALSE;
|
||||||
|
search_p++;
|
||||||
|
if (search_p == scriptend_p)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (*search_p == '#')
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DefaultExtension(char *path, char *extension)
|
||||||
|
{
|
||||||
|
char *src;
|
||||||
|
//
|
||||||
|
// if path doesn't have a .EXT, append extension
|
||||||
|
// (extension should include the .)
|
||||||
|
//
|
||||||
|
src = path + strlen(path) - 1;
|
||||||
|
|
||||||
|
while (*src != '\\' && src != path)
|
||||||
|
{
|
||||||
|
if (*src == '.')
|
||||||
|
return; // it has an extension
|
||||||
|
src--;
|
||||||
|
}
|
||||||
|
|
||||||
|
strcat(path, extension);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void DefaultPath(char *path, char *basepath)
|
||||||
|
{
|
||||||
|
char temp[128];
|
||||||
|
|
||||||
|
if (path[0] == '\\')
|
||||||
|
return; // absolute path location
|
||||||
|
strcpy(temp,path);
|
||||||
|
strcpy(path,basepath);
|
||||||
|
strcat(path,temp);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void StripFilename(char *path)
|
||||||
|
{
|
||||||
|
int length;
|
||||||
|
|
||||||
|
length = strlen(path)-1;
|
||||||
|
while (length > 0 && path[length] != PATHSEPERATOR)
|
||||||
|
length--;
|
||||||
|
path[length] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ExtractFileBase(char *path, char *dest)
|
||||||
|
{
|
||||||
|
char *src;
|
||||||
|
int length;
|
||||||
|
|
||||||
|
src = path + strlen(path) - 1;
|
||||||
|
|
||||||
|
//
|
||||||
|
// back up until a \ or the start
|
||||||
|
//
|
||||||
|
while (src != path && *(src-1) != '\\')
|
||||||
|
src--;
|
||||||
|
|
||||||
|
//
|
||||||
|
// copy up to eight characters
|
||||||
|
//
|
||||||
|
memset(dest,0,8);
|
||||||
|
length = 0;
|
||||||
|
while (*src && *src != '.')
|
||||||
|
{
|
||||||
|
if (++length == 9)
|
||||||
|
Error("Filename base of %s >8 chars",path);
|
||||||
|
*dest++ = toupper(*src++);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
==============
|
||||||
|
=
|
||||||
|
= ParseNum / ParseHex
|
||||||
|
=
|
||||||
|
==============
|
||||||
|
*/
|
||||||
|
|
||||||
|
int ParseHex(char *hex)
|
||||||
|
{
|
||||||
|
char *str;
|
||||||
|
int num;
|
||||||
|
|
||||||
|
num = 0;
|
||||||
|
str = hex;
|
||||||
|
|
||||||
|
while (*str)
|
||||||
|
{
|
||||||
|
num <<= 4;
|
||||||
|
if (*str >= '0' && *str <= '9')
|
||||||
|
num += *str-'0';
|
||||||
|
else if (*str >= 'a' && *str <= 'f')
|
||||||
|
num += 10 + *str-'a';
|
||||||
|
else if (*str >= 'A' && *str <= 'F')
|
||||||
|
num += 10 + *str-'A';
|
||||||
|
else
|
||||||
|
Error("Bad hex number: %s",hex);
|
||||||
|
str++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return num;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int ParseNum(char *str)
|
||||||
|
{
|
||||||
|
if (str[0] == '$')
|
||||||
|
return ParseHex(str+1);
|
||||||
|
if (str[0] == '0' && str[1] == 'x')
|
||||||
|
return ParseHex(str+2);
|
||||||
|
return atol(str);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// voxelarray format is:
|
||||||
|
// spritenumber, voxelnumber
|
||||||
|
int aVoxelArray[MAXTILES];
|
||||||
|
|
||||||
|
extern int nextvoxid;
|
||||||
|
|
||||||
|
// Load all the voxel files using swvoxfil.txt script file
|
||||||
|
// Script file format:
|
||||||
|
|
||||||
|
// # - Comment
|
||||||
|
// spritenumber (in artfile), voxel number, filename
|
||||||
|
// Ex. 1803 0 medkit2.kvx
|
||||||
|
// 1804 1 shotgun.kvx
|
||||||
|
// etc....
|
||||||
|
|
||||||
|
void LoadKVXFromScript(char *filename)
|
||||||
|
{
|
||||||
|
int lNumber=0,lTile=0; // lNumber is the voxel no. and lTile is the editart tile being
|
||||||
|
// replaced.
|
||||||
|
char *sName; // KVS file being loaded in.
|
||||||
|
|
||||||
|
int grabbed=0; // Number of lines parsed
|
||||||
|
|
||||||
|
sName = (char *)malloc(256); // Up to 256 bytes for path
|
||||||
|
ASSERT(sName != NULL);
|
||||||
|
|
||||||
|
// zero out the array memory with -1's for pics not being voxelized
|
||||||
|
memset(aVoxelArray,-1,sizeof(aVoxelArray));
|
||||||
|
|
||||||
|
// Load the file
|
||||||
|
if (!LoadScriptFile(filename)) return;
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
GetToken(TRUE); // Crossing a line boundary on the end of line to first token
|
||||||
|
// of a new line is permitted (and expected)
|
||||||
|
if (endofscript)
|
||||||
|
break;
|
||||||
|
|
||||||
|
lTile = atol(token);
|
||||||
|
|
||||||
|
GetToken(FALSE);
|
||||||
|
lNumber = atol(token);
|
||||||
|
|
||||||
|
GetToken(FALSE);
|
||||||
|
strcpy(sName,token); // Copy the whole token as a file name and path
|
||||||
|
|
||||||
|
// Load the voxel file into memory
|
||||||
|
if (!qloadkvx(lNumber,sName))
|
||||||
|
{
|
||||||
|
// Store the sprite and voxel numbers for later use
|
||||||
|
aVoxelArray[lTile] = lNumber; // Voxel num
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lNumber >= nextvoxid) // JBF: so voxels in the def file append to the list
|
||||||
|
nextvoxid = lNumber + 1;
|
||||||
|
|
||||||
|
grabbed++;
|
||||||
|
ASSERT(grabbed < MAXSPRITES);
|
||||||
|
|
||||||
|
}
|
||||||
|
while (script_p < scriptend_p);
|
||||||
|
|
||||||
|
free(scriptbuffer);
|
||||||
|
script_p = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// MISC ////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/*
|
||||||
|
extern int idleclock,slackerclock;
|
||||||
|
|
||||||
|
// Watch dog function. Tracks user's work times.
|
||||||
|
void LogUserTime( BOOL bIsLoggingIn )
|
||||||
|
{
|
||||||
|
int size, readsize;
|
||||||
|
time_t time_of_day;
|
||||||
|
char serialid[20],filename[100],fbase[20],buf[26],filetemp[100];
|
||||||
|
FILE *fp;
|
||||||
|
int tothours, totmins, totsecs, gtotalclock=0,gidleclock=0;
|
||||||
|
ldiv_t mins_secs;
|
||||||
|
ldiv_t hrs_mins;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
char path[] = "o:\\user\\jimn\\logs\\";
|
||||||
|
// char path[] = "c:\\jim\\sw\\";
|
||||||
|
|
||||||
|
memset(filename,0,sizeof(filename));
|
||||||
|
memset(fbase,0,sizeof(fbase));
|
||||||
|
memset(serialid,0,sizeof(serialid));
|
||||||
|
memset(buf,0,sizeof(buf));
|
||||||
|
memset(filetemp,0,sizeof(filetemp));
|
||||||
|
|
||||||
|
// Get the time of day user logged in to build
|
||||||
|
time_of_day = time( NULL );
|
||||||
|
|
||||||
|
// Get the serial number from the user's disk drive "it's unique!"
|
||||||
|
system("dir > serid.bld");
|
||||||
|
LoadScriptFile("serid.bld");
|
||||||
|
|
||||||
|
// Go to the serial number
|
||||||
|
for (i=0; i<11; i++)
|
||||||
|
{
|
||||||
|
GetToken (TRUE);
|
||||||
|
if (endofscript)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Copy the token to serialid
|
||||||
|
strcpy(serialid,token);
|
||||||
|
|
||||||
|
// Free the script memory when done
|
||||||
|
free(scriptbuffer);
|
||||||
|
script_p = NULL;
|
||||||
|
|
||||||
|
// Build a file name using serial id.
|
||||||
|
strcpy(filename,path);
|
||||||
|
strncpy(fbase,serialid,8);
|
||||||
|
strcat(fbase,".bld");
|
||||||
|
strcat(filename,fbase);
|
||||||
|
|
||||||
|
// Delete the temp file
|
||||||
|
system("erase serid.bld");
|
||||||
|
|
||||||
|
// Unhide the file so it can be opened
|
||||||
|
_dos_setfileattr(filename,_A_NORMAL);
|
||||||
|
|
||||||
|
|
||||||
|
// Open the file
|
||||||
|
fp = fopen( filename, "a+" );
|
||||||
|
|
||||||
|
// Opening on the network failed, try putting it on the current disk drive
|
||||||
|
if(fp == NULL)
|
||||||
|
{
|
||||||
|
// Unhide the file so it can be opened/this works if file was created before!
|
||||||
|
_dos_setfileattr(fbase,_A_NORMAL);
|
||||||
|
fp = fopen( fbase, "a+" );
|
||||||
|
strcpy(filetemp,fbase);
|
||||||
|
} else
|
||||||
|
strcpy(filetemp,filename);
|
||||||
|
|
||||||
|
|
||||||
|
if( fp == NULL)
|
||||||
|
return;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(bIsLoggingIn)
|
||||||
|
{
|
||||||
|
fprintf(fp, "//////////////////////////////\n");
|
||||||
|
fprintf(fp, "User logged into build at: %s", _ctime( &time_of_day, buf ) );
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
totsecs = totalclock/120; // Convert totalclock to seconds.
|
||||||
|
|
||||||
|
mins_secs = ldiv( totsecs, 60L );
|
||||||
|
totmins = mins_secs.quot;
|
||||||
|
totsecs = mins_secs.rem;
|
||||||
|
|
||||||
|
hrs_mins = ldiv( totmins, 60L);
|
||||||
|
tothours = hrs_mins.quot;
|
||||||
|
totmins = hrs_mins.rem;
|
||||||
|
|
||||||
|
fprintf(fp, "TotalClock: %ld\n",totalclock);
|
||||||
|
#ifdef COMPUTE_TOTALS
|
||||||
|
fprintf(fp, "IdleClock: %ld\n",slackerclock);
|
||||||
|
#endif
|
||||||
|
fprintf(fp, "Time this session: %ld Hours %ld Mins %ld Secs\n",tothours,totmins,totsecs);
|
||||||
|
#ifdef COMPUTE_TOTALS
|
||||||
|
totsecs = (totalclock-slackerclock)/120; // Convert totalclock to seconds.
|
||||||
|
if(totsecs<=0) totsecs = 0;
|
||||||
|
|
||||||
|
mins_secs = ldiv( totsecs, 60L );
|
||||||
|
totmins = mins_secs.quot;
|
||||||
|
totsecs = mins_secs.rem;
|
||||||
|
|
||||||
|
hrs_mins = ldiv( totmins, 60L);
|
||||||
|
tothours = hrs_mins.quot;
|
||||||
|
totmins = hrs_mins.rem;
|
||||||
|
fprintf(fp, "Time - idleclock : %ld Hours %ld Mins %ld Secs\n",tothours,totmins,totsecs);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
fclose( fp );
|
||||||
|
}
|
||||||
|
|
||||||
|
#if 1
|
||||||
|
if(!bIsLoggingIn)
|
||||||
|
{
|
||||||
|
// Compute total time for file
|
||||||
|
LoadScriptFile(filetemp);
|
||||||
|
|
||||||
|
do {
|
||||||
|
GetToken (TRUE);
|
||||||
|
|
||||||
|
if (endofscript)
|
||||||
|
break;
|
||||||
|
|
||||||
|
if(!strcmpi(token,"totalclock:"))
|
||||||
|
{
|
||||||
|
GetToken(TRUE);
|
||||||
|
gtotalclock += atol(token);
|
||||||
|
}
|
||||||
|
#if 0
|
||||||
|
if(!strcmpi(token,"idleclock:"))
|
||||||
|
{
|
||||||
|
GetToken(TRUE);
|
||||||
|
gidleclock += atol(token);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
} while (script_p < scriptend_p);
|
||||||
|
|
||||||
|
// Free the script memory when done
|
||||||
|
free(scriptbuffer);
|
||||||
|
script_p = NULL;
|
||||||
|
|
||||||
|
// Open the file
|
||||||
|
fp = fopen( filetemp, "a+" );
|
||||||
|
|
||||||
|
// Now compute the grand total
|
||||||
|
if(fp != NULL)
|
||||||
|
{
|
||||||
|
totsecs = gtotalclock/120; // Convert totalclock to seconds.
|
||||||
|
|
||||||
|
mins_secs = ldiv( totsecs, 60L );
|
||||||
|
totmins = mins_secs.quot;
|
||||||
|
totsecs = mins_secs.rem;
|
||||||
|
|
||||||
|
hrs_mins = ldiv( totmins, 60L);
|
||||||
|
tothours = hrs_mins.quot;
|
||||||
|
totmins = hrs_mins.rem;
|
||||||
|
|
||||||
|
fprintf(fp, "\nTotal time so far : %ld Hours %ld Mins %ld Secs\n",tothours,totmins,totsecs);
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
totsecs = (gtotalclock-gidleclock)/120; // Convert totalclock to seconds.
|
||||||
|
if(totsecs<=0) totsecs = 0;
|
||||||
|
|
||||||
|
mins_secs = ldiv( totsecs, 60L );
|
||||||
|
totmins = mins_secs.quot;
|
||||||
|
totsecs = mins_secs.rem;
|
||||||
|
|
||||||
|
hrs_mins = ldiv( totmins, 60L);
|
||||||
|
tothours = hrs_mins.quot;
|
||||||
|
totmins = hrs_mins.rem;
|
||||||
|
|
||||||
|
fprintf(fp, "\nTotal actual time : %ld Hours %ld Mins %ld Secs\n",tothours,totmins,totsecs);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
fclose(fp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
_dos_setfileattr(filename,_A_HIDDEN);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
*/
|
585
polymer/eduke32/source/sw/src/border.c
Normal file
585
polymer/eduke32/source/sw/src/border.c
Normal file
|
@ -0,0 +1,585 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
#include "build.h"
|
||||||
|
|
||||||
|
#include "keys.h"
|
||||||
|
#include "names2.h"
|
||||||
|
#include "panel.h"
|
||||||
|
#include "lists.h"
|
||||||
|
#include "game.h"
|
||||||
|
#include "common_game.h"
|
||||||
|
#include "net.h"
|
||||||
|
#include "text.h"
|
||||||
|
|
||||||
|
#define BAR_HEIGHT 48
|
||||||
|
#define XDIM 320
|
||||||
|
#define YDIM 200
|
||||||
|
|
||||||
|
short DebugBorderShade = 0;
|
||||||
|
|
||||||
|
short RegBorderTest[] =
|
||||||
|
{
|
||||||
|
51, 53, 127, 128, 140, 145, 152, 197, 198, 201, 205, 206, 213, 218, 242, 243,
|
||||||
|
245, 246, 247, 257, 2560, 2561, 2562, 2570, 2571, 2572, 2573, 2576, 2578,
|
||||||
|
2579, 2580, 2581, 2582, 2583, 2584, 2585, 2593, 2594
|
||||||
|
};
|
||||||
|
short SWBorderTest[] =
|
||||||
|
{
|
||||||
|
51, 53, 127, 128, 140, 145, 201, 205, 206, 213, 218,
|
||||||
|
245, 2560, 2573, 2576, 2580, 2581, 2582, 2583, 2584, 2593
|
||||||
|
};
|
||||||
|
|
||||||
|
#undef BORDER_TILE
|
||||||
|
#define BORDER_TILE \
|
||||||
|
(isShareware ? \
|
||||||
|
SWBorderTest[gs.BorderTile % SIZ(SWBorderTest)] : \
|
||||||
|
RegBorderTest[gs.BorderTile % SIZ(RegBorderTest)] \
|
||||||
|
)
|
||||||
|
|
||||||
|
#define f_320 FIXED(320,0)
|
||||||
|
#define f_200 FIXED(200,0)
|
||||||
|
|
||||||
|
#define X_TO_FIXED(val) (x_aspect_mul*(val))
|
||||||
|
#define Y_TO_FIXED(val) (y_aspect_mul*(val))
|
||||||
|
|
||||||
|
BOOL RedrawScreen = FALSE;
|
||||||
|
|
||||||
|
int f_xdim, f_ydim, x_pix_size, y_pix_size, x_aspect_mul, y_aspect_mul;
|
||||||
|
int CrosshairX, CrosshairY;
|
||||||
|
|
||||||
|
extern BOOL BorderAdjust;
|
||||||
|
BOOL GlobSpriteBoxUpdateEveryFrame = FALSE;
|
||||||
|
|
||||||
|
PANEL_SPRITEp
|
||||||
|
pSpawnFullScreenSpriteBox(PLAYERp pp, short id, short pic, short pri, int x, int y, short x1, short y1, short x2, short y2)
|
||||||
|
{
|
||||||
|
PANEL_SPRITEp psp;
|
||||||
|
extern BOOL DrawBeforeView;
|
||||||
|
|
||||||
|
psp = pSpawnSprite(pp, NULL, pri, x, y);
|
||||||
|
|
||||||
|
psp->ID = id;
|
||||||
|
psp->numpages = numpages;
|
||||||
|
if (GlobSpriteBoxUpdateEveryFrame)
|
||||||
|
{
|
||||||
|
psp->numpages = 1;
|
||||||
|
}
|
||||||
|
psp->picndx = -1;
|
||||||
|
psp->picnum = pic;
|
||||||
|
psp->x1 = x1;
|
||||||
|
psp->y1 = y1;
|
||||||
|
psp->x2 = x2;
|
||||||
|
psp->y2 = y2;
|
||||||
|
psp->shade = DebugBorderShade;
|
||||||
|
|
||||||
|
//SET(psp->flags, PANF_STATUS_AREA | PANF_KILL_AFTER_SHOW | PANF_IGNORE_START_MOST | PANF_DRAW_BEFORE_VIEW | PANF_NOT_ALL_PAGES);
|
||||||
|
SET(psp->flags, PANF_STATUS_AREA | PANF_KILL_AFTER_SHOW | PANF_IGNORE_START_MOST | PANF_DRAW_BEFORE_VIEW);
|
||||||
|
//DrawBeforeView = TRUE;
|
||||||
|
|
||||||
|
//SET(psp->flags, PANF_SCREEN_CLIP | PANF_KILL_AFTER_SHOW | PANF_IGNORE_START_MOST);
|
||||||
|
|
||||||
|
return psp;
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID SetCrosshair(VOID)
|
||||||
|
{
|
||||||
|
int wdx,wdy,x,y;
|
||||||
|
|
||||||
|
wdx = ((windowx2-windowx1)/2);
|
||||||
|
wdy = ((windowy2-windowy1)/2);
|
||||||
|
x = windowx1 + wdx;
|
||||||
|
y = windowy1 + wdy;
|
||||||
|
|
||||||
|
CrosshairX = x / (xdim/320.0);
|
||||||
|
CrosshairY = y / (ydim/200.0);
|
||||||
|
|
||||||
|
// rotatesprite takes FIXED point number
|
||||||
|
CrosshairX <<= 16;
|
||||||
|
CrosshairY <<= 16;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
VOID
|
||||||
|
SetupAspectRatio(VOID)
|
||||||
|
{
|
||||||
|
f_xdim = FIXED(xdim, 0);
|
||||||
|
f_ydim = FIXED(ydim, 0);
|
||||||
|
|
||||||
|
x_pix_size = (f_320 / xdim);
|
||||||
|
y_pix_size = (f_200 / ydim);
|
||||||
|
|
||||||
|
x_aspect_mul = (f_xdim / 320);
|
||||||
|
y_aspect_mul = (f_ydim / 200);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
SetConsoleDmost(VOID)
|
||||||
|
{
|
||||||
|
int ystart;
|
||||||
|
int xstart;
|
||||||
|
|
||||||
|
int i;
|
||||||
|
int adj=0;
|
||||||
|
|
||||||
|
// dont setup the startumost/dmost arrays if border is 0
|
||||||
|
if (gs.BorderNum == BORDER_NONE || gs.BorderNum == BORDER_MINI_BAR)
|
||||||
|
return;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Set the whole thing to the size of the bar
|
||||||
|
//
|
||||||
|
|
||||||
|
ystart = f_ydim - Y_TO_FIXED(BAR_HEIGHT);
|
||||||
|
|
||||||
|
if (ydim == 480 && gs.BorderNum == 2)
|
||||||
|
adj = 1;
|
||||||
|
|
||||||
|
//for (i = FIXED(0, 0); i < f_320; i += x_pix_size)
|
||||||
|
for (i = 0; i < xdim; i++)
|
||||||
|
// define picture
|
||||||
|
// boundaries
|
||||||
|
{
|
||||||
|
startdmost[i] = MSW(ystart) + adj;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID ClearStartMost(VOID)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < xdim; i++)
|
||||||
|
startdmost[i] = ydim;
|
||||||
|
|
||||||
|
memset(startumost, 0, sizeof(startumost));
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
SetFragBar(PLAYERp pp)
|
||||||
|
{
|
||||||
|
short i, num_frag_bars;
|
||||||
|
int y;
|
||||||
|
extern SHORT OrigCommPlayers;
|
||||||
|
|
||||||
|
if (numplayers <= 1)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (gNet.MultiGameType == MULTI_GAME_COOPERATIVE)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// if player sprite has not been initialized we have no business
|
||||||
|
// sticking a frag bar up. Prevents processing from MenuLevel etc.
|
||||||
|
if (!pp->SpriteP)
|
||||||
|
return;
|
||||||
|
|
||||||
|
//num_frag_bars = ((numplayers-1)/4)+1;
|
||||||
|
num_frag_bars = ((OrigCommPlayers-1)/4)+1;
|
||||||
|
|
||||||
|
for (i = windowx1; i <= windowx2; i++)
|
||||||
|
{
|
||||||
|
y = (tilesizy[FRAG_BAR] * num_frag_bars) - (2 * (num_frag_bars-1));
|
||||||
|
y = y * (ydim/200.0);
|
||||||
|
|
||||||
|
if (windowy1 < y)
|
||||||
|
startumost[i] = y;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0, y = 0; i < num_frag_bars; i++)
|
||||||
|
{
|
||||||
|
pSpawnFullScreenSprite(pp, FRAG_BAR, PRI_MID, 0, y);
|
||||||
|
y += tilesizy[FRAG_BAR] - 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// write each persons kill info to everybody
|
||||||
|
// for (i = 0; i < numplayers; i++)
|
||||||
|
TRAVERSE_CONNECT(i)
|
||||||
|
{
|
||||||
|
PlayerUpdateKills(Player + i, 0);
|
||||||
|
DisplayFragNames(Player + i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL RectOverlap(short tx1, short ty1, short bx1, short by1, short tx2, short ty2, short bx2, short by2)
|
||||||
|
{
|
||||||
|
if (bx1 >= tx2)
|
||||||
|
if (tx1 <= bx2)
|
||||||
|
if (ty1 <= by2)
|
||||||
|
if (by1 >= ty2)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID DrawBorderShade(PLAYERp pp, short shade_num, short wx1, short wy1, short wx2, short wy2)
|
||||||
|
{
|
||||||
|
short i,j,k,l;
|
||||||
|
PANEL_SPRITEp psp;
|
||||||
|
int dark_shade = 27 - (shade_num * 6);
|
||||||
|
int light_shade = 20 - (shade_num * 6);
|
||||||
|
|
||||||
|
for (i = 0; i < xdim; i += tilesizx[BORDER_TILE])
|
||||||
|
{
|
||||||
|
for (j = 0; j < ydim; j += tilesizy[BORDER_TILE])
|
||||||
|
{
|
||||||
|
k = i + tilesizx[BORDER_TILE];
|
||||||
|
l = j + tilesizy[BORDER_TILE];
|
||||||
|
|
||||||
|
if (RectOverlap(i, j, k, l, wx1 - 1, wy1 - 1, wx2 + 1, wy1))
|
||||||
|
{
|
||||||
|
// draw top box of the border
|
||||||
|
psp = pSpawnFullScreenSpriteBox(pp, ID_BORDER_TOP, BORDER_TILE, PRI_BACK + 1, i, j, wx1 - 1, wy1 - 1, wx2 + 1, wy1);
|
||||||
|
psp->shade = dark_shade;
|
||||||
|
psp->ID = ID_BORDER_SHADE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (RectOverlap(i, j, k, l, wx1 - 1, wy2, wx2 + 1, wy2 + 1))
|
||||||
|
{
|
||||||
|
// draw bottom box of the border
|
||||||
|
psp = pSpawnFullScreenSpriteBox(pp, ID_BORDER_BOTTOM, BORDER_TILE, PRI_BACK + 1, i, j, wx1 - 1, wy2, wx2 + 1, wy2 + 1);
|
||||||
|
psp->shade = light_shade;
|
||||||
|
psp->ID = ID_BORDER_SHADE;
|
||||||
|
}
|
||||||
|
if (RectOverlap(i, j, k, l, wx1 - 1, wy1 - 1, wx1, wy2 + 1))
|
||||||
|
{
|
||||||
|
// draw left box of the border
|
||||||
|
psp = pSpawnFullScreenSpriteBox(pp, ID_BORDER_LEFT, BORDER_TILE, PRI_BACK + 1, i, j, wx1 - 1, wy1 - 1, wx1, wy2 + 1);
|
||||||
|
psp->shade = dark_shade;
|
||||||
|
psp->ID = ID_BORDER_SHADE;
|
||||||
|
}
|
||||||
|
if (RectOverlap(i, j, k, l, wx2, wy1 - 1, wx2 + 1, wy2 + 1))
|
||||||
|
{
|
||||||
|
// draw right box of the border
|
||||||
|
psp = pSpawnFullScreenSpriteBox(pp, ID_BORDER_RIGHT, BORDER_TILE, PRI_BACK + 1, i, j, wx2, wy1 - 1, wx2 + 1, wy2 + 1);
|
||||||
|
psp->shade = light_shade;
|
||||||
|
psp->ID = ID_BORDER_SHADE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
BorderShade(PLAYERp pp, BOOL refresh)
|
||||||
|
{
|
||||||
|
int i, j, k, l, wx1, wx2, wy1, wy2;
|
||||||
|
PANEL_SPRITEp psp;
|
||||||
|
BYTE lines;
|
||||||
|
|
||||||
|
wx1 = windowx1 - 1;
|
||||||
|
wy1 = windowy1 - 1;
|
||||||
|
wx2 = windowx2 + 1;
|
||||||
|
wy2 = windowy2 + 1;
|
||||||
|
|
||||||
|
for (lines = 0; lines < 4; lines++)
|
||||||
|
{
|
||||||
|
|
||||||
|
// make sure that these values dont go out of bound - which they do
|
||||||
|
wx1 = max(wx1, 0);
|
||||||
|
wx2 = min(wx2, xdim - 1);
|
||||||
|
wy1 = max(wy1, 0);
|
||||||
|
|
||||||
|
if (refresh)
|
||||||
|
{
|
||||||
|
// silly thing seems off by 1
|
||||||
|
wy2 = min(wy2, ydim - (Y_TO_FIXED(BAR_HEIGHT) >> 16) - 2);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (gs.BorderNum >= BORDER_BAR+1 && gs.BorderNum <= BORDER_BAR+2)
|
||||||
|
wy2 = min(wy2, ydim - 1);
|
||||||
|
else
|
||||||
|
wy2 = min(wy2, ydim - (Y_TO_FIXED(BAR_HEIGHT) >> 16) - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
DrawBorderShade(pp, lines, wx1, wy1, wx2, wy2);
|
||||||
|
// increase view size by one - dont do a set view though
|
||||||
|
wx1--;
|
||||||
|
wy1--;
|
||||||
|
wx2++;
|
||||||
|
wy2++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BORDER_INFO BorderInfoValues[] =
|
||||||
|
{
|
||||||
|
// x,y,screensize
|
||||||
|
{0, 0, 0},
|
||||||
|
{0, 0, 0},
|
||||||
|
{0, BAR_HEIGHT, 0},
|
||||||
|
|
||||||
|
{0, BAR_HEIGHT, (1 * 16)},
|
||||||
|
{0, BAR_HEIGHT, (2 * 16)},
|
||||||
|
{0, BAR_HEIGHT, (3 * 16)},
|
||||||
|
{0, BAR_HEIGHT, (4 * 16)},
|
||||||
|
{0, BAR_HEIGHT, (5 * 16)},
|
||||||
|
{0, BAR_HEIGHT, (6 * 16)},
|
||||||
|
{0, BAR_HEIGHT, (7 * 16)},
|
||||||
|
{0, BAR_HEIGHT, (8 * 16)},
|
||||||
|
{0, BAR_HEIGHT, (9 * 16)},
|
||||||
|
{0, BAR_HEIGHT, (10 * 16)},
|
||||||
|
{0, BAR_HEIGHT, (11 * 16)},
|
||||||
|
{0, BAR_HEIGHT, (12 * 16)}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
VOID DrawBorder(PLAYERp pp, short x, short y, short x2, short y2)
|
||||||
|
{
|
||||||
|
short i,j,k,l;
|
||||||
|
short count = 0;
|
||||||
|
|
||||||
|
for (i = 0; i < xdim; i += tilesizx[BORDER_TILE])
|
||||||
|
{
|
||||||
|
for (j = 0; j < ydim; j += tilesizy[BORDER_TILE])
|
||||||
|
{
|
||||||
|
k = i + tilesizx[BORDER_TILE];
|
||||||
|
l = j + tilesizy[BORDER_TILE];
|
||||||
|
|
||||||
|
if (RectOverlap(i, j, k, l, x, y, windowx1-1, y2))
|
||||||
|
{
|
||||||
|
// draw top box of the border
|
||||||
|
pSpawnFullScreenSpriteBox(pp, ID_BORDER_TOP, BORDER_TILE, PRI_BACK, i, j, x, y, windowx1-1, y2);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (RectOverlap(i, j, k, l, windowx2+1, y, x2, y2))
|
||||||
|
{
|
||||||
|
// draw bottom box of the border
|
||||||
|
pSpawnFullScreenSpriteBox(pp, ID_BORDER_BOTTOM, BORDER_TILE, PRI_BACK, i, j, windowx2+1, y, x2, y2);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (RectOverlap(i, j, k, l, windowx1, y, windowx2, windowy1-1))
|
||||||
|
{
|
||||||
|
// draw left box of the border
|
||||||
|
pSpawnFullScreenSpriteBox(pp, ID_BORDER_LEFT, BORDER_TILE, PRI_BACK, i, j, windowx1, y, windowx2, windowy1-1);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (RectOverlap(i, j, k, l, windowx1, windowy2+1, windowx2, y2))
|
||||||
|
{
|
||||||
|
// draw right box of the border
|
||||||
|
pSpawnFullScreenSpriteBox(pp, ID_BORDER_RIGHT, BORDER_TILE, PRI_BACK, i, j, windowx1, windowy2+1, windowx2, y2);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID DrawPanelBorderSides(PLAYERp pp, short x, short y, short x2, short y2, short panl, short panr)
|
||||||
|
{
|
||||||
|
short i,j,k,l;
|
||||||
|
short count = 0;
|
||||||
|
|
||||||
|
for (i = 0; i < xdim; i += tilesizx[BORDER_TILE])
|
||||||
|
{
|
||||||
|
for (j = 0; j < ydim; j += tilesizy[BORDER_TILE])
|
||||||
|
{
|
||||||
|
k = i + tilesizx[BORDER_TILE];
|
||||||
|
l = j + tilesizy[BORDER_TILE];
|
||||||
|
|
||||||
|
if (RectOverlap(i, j, k, l, x, y, panl, y2))
|
||||||
|
{
|
||||||
|
pSpawnFullScreenSpriteBox(pp, ID_PANEL_BORDER_LEFT, BORDER_TILE, PRI_BACK, i, j, x, y, panl, y2);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (RectOverlap(i, j, k, l, panr, y, x2, y2))
|
||||||
|
{
|
||||||
|
pSpawnFullScreenSpriteBox(pp, ID_PANEL_BORDER_RIGHT, BORDER_TILE, PRI_BACK, i, j, panr, y, x2, y2);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static
|
||||||
|
VOID BorderSetView(PLAYERp UNUSED(pp), int *Xdim, int *Ydim, int *ScreenSize)
|
||||||
|
{
|
||||||
|
void setview(int scrx1, int scry1, int scrx2, int scry2);
|
||||||
|
int x, x2, y, y2;
|
||||||
|
BORDER_INFO *b;
|
||||||
|
|
||||||
|
BorderInfo = BorderInfoValues[gs.BorderNum];
|
||||||
|
|
||||||
|
b = &BorderInfo;
|
||||||
|
|
||||||
|
// figure out the viewing window x and y dimensions
|
||||||
|
*Xdim = MSW(f_xdim - X_TO_FIXED(b->Xdim));
|
||||||
|
*Ydim = MSW(f_ydim - Y_TO_FIXED(b->Ydim));
|
||||||
|
*ScreenSize = MSW(f_xdim - X_TO_FIXED(b->ScreenSize));
|
||||||
|
|
||||||
|
// figure out the viewing window x and y coordinates
|
||||||
|
x = DIV2(*Xdim) - DIV2(*ScreenSize);
|
||||||
|
x2 = x + *ScreenSize - 1;
|
||||||
|
y = DIV2(*Ydim) - DIV2((*ScreenSize **Ydim) / *Xdim);
|
||||||
|
y2 = y + ((*ScreenSize **Ydim) / *Xdim) - 1;
|
||||||
|
|
||||||
|
if (ydim == 480 && gs.BorderNum == 2)
|
||||||
|
{
|
||||||
|
y2+=2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// global windowx1, windowx2, windowy1, windowy2 coords set here
|
||||||
|
setview(x, y, x2, y2);
|
||||||
|
SetCrosshair();
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Redraw the border without changing the view
|
||||||
|
//
|
||||||
|
|
||||||
|
static VOID
|
||||||
|
BorderRefresh(PLAYERp pp)
|
||||||
|
{
|
||||||
|
int i, j;
|
||||||
|
int x, x2, y, y2;
|
||||||
|
BORDER_INFO *b;
|
||||||
|
|
||||||
|
if (pp != Player + myconnectindex)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!BorderAdjust)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (gs.BorderNum < BORDER_BAR)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Redraw the BORDER_TILE only if getting smaller
|
||||||
|
BorderInfo = BorderInfoValues[gs.BorderNum];
|
||||||
|
|
||||||
|
b = &BorderInfo;
|
||||||
|
|
||||||
|
// A refresh does not change the view size so we dont need to do a
|
||||||
|
// setview
|
||||||
|
// We don't need the calculations for the border drawing boxes - its
|
||||||
|
// the whole screen
|
||||||
|
// minus the border if necessary
|
||||||
|
|
||||||
|
// fill in the sides of the panel when the screen is wide
|
||||||
|
if (gs.BorderNum >= BORDER_BAR && widescreen)
|
||||||
|
{
|
||||||
|
int sidew = (xdim - scale(320, ydim, mulscale16(200, pixelaspect))) / 2;
|
||||||
|
|
||||||
|
x = 0;
|
||||||
|
x2 = xdim - 1;
|
||||||
|
|
||||||
|
y = ydim - (Y_TO_FIXED(b->Ydim) >> 16);
|
||||||
|
y2 = ydim - 1;
|
||||||
|
|
||||||
|
DrawPanelBorderSides(pp, x, y, x2, y2, sidew, xdim-sidew);
|
||||||
|
}
|
||||||
|
|
||||||
|
// only need a border if border is > BORDER_BAR
|
||||||
|
if (gs.BorderNum > BORDER_BAR)
|
||||||
|
{
|
||||||
|
// make sure that these values dont go out of bound - which they do
|
||||||
|
x = 0;
|
||||||
|
x2 = xdim - 1;
|
||||||
|
|
||||||
|
y = 0;
|
||||||
|
y2 = ydim - (Y_TO_FIXED(b->Ydim) >> 16) - 1;
|
||||||
|
|
||||||
|
DrawBorder(pp, x, y, x2, y2);
|
||||||
|
|
||||||
|
// kill ALL outstanding (not yet drawn) border shade sprites before
|
||||||
|
// doing more shading
|
||||||
|
pKillScreenSpiteIDs(pp, ID_BORDER_SHADE);
|
||||||
|
|
||||||
|
BorderShade(pp, TRUE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Redraw the whole screen
|
||||||
|
//
|
||||||
|
|
||||||
|
VOID SetBorder(PLAYERp pp, int value)
|
||||||
|
{
|
||||||
|
int diff;
|
||||||
|
int Xdim, Ydim, ScreenSize;
|
||||||
|
BOOL set_view = TRUE;
|
||||||
|
|
||||||
|
if (pp != Player + myconnectindex)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!BorderAdjust)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (value >= 0) // just refresh
|
||||||
|
gs.BorderNum = value;
|
||||||
|
|
||||||
|
if (gs.BorderNum < BORDER_NONE)
|
||||||
|
{
|
||||||
|
gs.BorderNum = BORDER_NONE;
|
||||||
|
//return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gs.BorderNum > (int)SIZ(BorderInfoValues) - 1)
|
||||||
|
{
|
||||||
|
gs.BorderNum = SIZ(BorderInfoValues) - 1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
BorderSetView(pp, &Xdim, &Ydim, &ScreenSize);
|
||||||
|
|
||||||
|
if (gs.BorderNum >= BORDER_BAR)
|
||||||
|
{
|
||||||
|
BorderRefresh(pp);
|
||||||
|
|
||||||
|
if (gs.BorderNum == BORDER_BAR)
|
||||||
|
SetConsoleDmost();
|
||||||
|
|
||||||
|
pSpawnFullScreenSprite(pp, STATUS_BAR, PRI_FRONT, 0, 200 - tilesizy[STATUS_BAR]);
|
||||||
|
PlayerUpdatePanelInfo(Player + screenpeek);
|
||||||
|
}
|
||||||
|
|
||||||
|
SetFragBar(pp);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
SetRedrawScreen(PLAYERp pp)
|
||||||
|
{
|
||||||
|
int i, j;
|
||||||
|
//int x, x2, y, y2;
|
||||||
|
BORDER_INFO *b;
|
||||||
|
|
||||||
|
if (pp != Player + myconnectindex)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!BorderAdjust)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (gs.BorderNum < BORDER_NONE)
|
||||||
|
gs.BorderNum = BORDER_NONE;
|
||||||
|
|
||||||
|
// Redraw the BORDER_TILE only if getting smaller
|
||||||
|
BorderInfo = BorderInfoValues[gs.BorderNum];
|
||||||
|
|
||||||
|
b = &BorderInfo;
|
||||||
|
|
||||||
|
// test at redrawing the whole screen
|
||||||
|
RedrawScreen = TRUE;
|
||||||
|
}
|
||||||
|
|
109
polymer/eduke32/source/sw/src/bots.h
Normal file
109
polymer/eduke32/source/sw/src/bots.h
Normal file
|
@ -0,0 +1,109 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// BOTS.H
|
||||||
|
// Contains useful header information for bot creation
|
||||||
|
|
||||||
|
#ifndef BOTS_H
|
||||||
|
#define BOTS_H
|
||||||
|
|
||||||
|
|
||||||
|
// BOT DEFINITIONS AND STRUCTURES
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
BOTstand, BOThide, BOTrun, BOTduck, BOTjump, BOTstrafe, BOTshoot, BOTuseinv,
|
||||||
|
BOTopen, BOTswimup, BOTswimdown, BOTturn, BOTuserts
|
||||||
|
} BOT_Actions;
|
||||||
|
|
||||||
|
// Linked lists containing node trees that are chosen based on desired actions
|
||||||
|
struct NODEstruct;
|
||||||
|
typedef struct NODEstruct NODE, *NODEp;
|
||||||
|
|
||||||
|
struct NODEstruct
|
||||||
|
{
|
||||||
|
NODEp p, l, r; // Pointers to tree nodes
|
||||||
|
int goalx, goaly, goalz; // x,y,z point bot wants to get to
|
||||||
|
BOT_Actions action; // Action to take if this node is reached
|
||||||
|
int tics; // Optionally stay in this node for x tics.
|
||||||
|
};
|
||||||
|
|
||||||
|
struct NODETREEstruct;
|
||||||
|
typedef struct NODETREEstruct NODETREE, *NODETREEp;
|
||||||
|
|
||||||
|
struct NODETREEstruct
|
||||||
|
{
|
||||||
|
short SpriteNum; // Sprite number in sprite array of goal item
|
||||||
|
NODEp tree; // This is the node tree used to navigate to goal
|
||||||
|
BOOL Locked; // If list is locked, a bot is using/modifying it and
|
||||||
|
// other bots cannot modify it while it's locked
|
||||||
|
};
|
||||||
|
|
||||||
|
// Bots main action variables
|
||||||
|
typedef struct BOT_BRAIN
|
||||||
|
{
|
||||||
|
short tgt_inv; // Inventory item it wants to use
|
||||||
|
short tgt_weapon; // Weapon in wants to activate and use
|
||||||
|
short tgt_enemy; // Enemy it wants to kill
|
||||||
|
short tgt_sprite; // Sprite it wants to pickup or operate
|
||||||
|
short tgt_sector; // Sector it wants to get to
|
||||||
|
short tgt_wall; // Wall it wants to touch
|
||||||
|
BOT_Actions action; // Bot's current action
|
||||||
|
} BotBrain, *BotBrain_p;
|
||||||
|
|
||||||
|
// NOTE:
|
||||||
|
// The following arrays should be saved off with save games!
|
||||||
|
|
||||||
|
// 0 = Item not accessible, no item of type was found
|
||||||
|
// 1 = Shuriken
|
||||||
|
// 3 = Caltrops
|
||||||
|
// 4 = Gas Bomb
|
||||||
|
// 5 = Flash Bomb
|
||||||
|
// 6 = Uzi Ammo
|
||||||
|
// 7 = Shotgun Ammo
|
||||||
|
// 8 = Rocket Ammo
|
||||||
|
// 9 = 40mm Ammo
|
||||||
|
// 10 = Sticky Bombs
|
||||||
|
// 11 = Rail Ammo
|
||||||
|
// 12 = Head Ammo
|
||||||
|
// 13 = Heart Ammo
|
||||||
|
// 14 = Uzi
|
||||||
|
// 15 = Shotgun
|
||||||
|
// 16 = Rocket Launcher
|
||||||
|
// 17 = 40mm Launcher
|
||||||
|
// 18 = Rail Gun
|
||||||
|
// 19 = Head
|
||||||
|
// 20 = Heart
|
||||||
|
// 21 = MedKit
|
||||||
|
// 22 = Armor
|
||||||
|
// 23 = Big Armor
|
||||||
|
// 24 = Portable MedKit
|
||||||
|
// 25 = Fortune Cookie
|
||||||
|
////////////////////////
|
||||||
|
extern NODETREE BOT_TREELIST[25][50]; // There can be up to 50 of each item
|
||||||
|
// with a cooresponding search tree for each
|
||||||
|
|
||||||
|
#endif
|
1140
polymer/eduke32/source/sw/src/break.c
Normal file
1140
polymer/eduke32/source/sw/src/break.c
Normal file
File diff suppressed because it is too large
Load diff
55
polymer/eduke32/source/sw/src/break.h
Normal file
55
polymer/eduke32/source/sw/src/break.h
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef BREAK_PUBLIC_
|
||||||
|
#define BREAK_PUBLIC_
|
||||||
|
|
||||||
|
#define BF_TOUGH (BIT(0))
|
||||||
|
#define BF_KILL (BIT(1))
|
||||||
|
#define BF_BURN (BIT(2))
|
||||||
|
#define BF_OVERRIDE_BLOCK (BIT(3))
|
||||||
|
#define BF_FIRE_FALL (BIT(4))
|
||||||
|
#define BF_LEAVE_BREAK (BIT(5))
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
short picnum, breaknum, shrap_type;
|
||||||
|
short flags, shrap_amt;
|
||||||
|
} BREAK_INFO, *BREAK_INFOp;
|
||||||
|
|
||||||
|
BREAK_INFOp FindWallBreakInfo(short picnum);
|
||||||
|
BREAK_INFOp FindSpriteBreakInfo(short picnum);
|
||||||
|
void SortBreakInfo(void);
|
||||||
|
BREAK_INFOp SetupWallForBreak(WALLp wallp);
|
||||||
|
BREAK_INFOp SetupSpriteForBreak(SPRITEp sp);
|
||||||
|
short FindBreakSpriteMatch(short match);
|
||||||
|
BOOL HitBreakWall(WALLp wp, int, int, int, short ang, short type);
|
||||||
|
int HitBreakSprite(short BreakSprite, short type);
|
||||||
|
BOOL CheckBreakToughness(BREAK_INFOp break_info, short ID);
|
||||||
|
int WallBreakPosition(short hitwall, short *sectnum, int *x, int *y, int *z, short *ang);
|
||||||
|
void SortBreakInfo(void);
|
||||||
|
|
||||||
|
#endif
|
737
polymer/eduke32/source/sw/src/brooms.c
Normal file
737
polymer/eduke32/source/sw/src/brooms.c
Normal file
|
@ -0,0 +1,737 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1996, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is NOT part of Shadow Warrior version 1.2
|
||||||
|
However, it is either an older version of a file that is, or is
|
||||||
|
some test code written during the development of Shadow Warrior.
|
||||||
|
This file is provided purely for educational interest.
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include "build.h"
|
||||||
|
#include "editor.h"
|
||||||
|
|
||||||
|
#include "keys.h"
|
||||||
|
#include "names2.h"
|
||||||
|
#include "game.h"
|
||||||
|
|
||||||
|
|
||||||
|
extern int posx, posy, posz;
|
||||||
|
extern short cursectnum;
|
||||||
|
extern short ang;
|
||||||
|
extern int horiz;
|
||||||
|
extern int qsetmode;
|
||||||
|
|
||||||
|
BOOL FindCeilingView(short match, LONGp x, LONGp y, LONG z, SHORTp sectnum);
|
||||||
|
BOOL FindFloorView(short match, LONGp x, LONGp y, LONG z, SHORTp sectnum);
|
||||||
|
short ViewSectorInScene(short cursectnum, short type, short level);
|
||||||
|
void Message(char *string, char color);
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
_Assert(char *expr, char *strFile, unsigned uLine)
|
||||||
|
{
|
||||||
|
printf(ds, "Assertion failed: %s %s, line %u\n", expr, strFile, uLine);
|
||||||
|
//DSPRINTF(ds, "Assertion failed: %s %s, line %u", expr, strFile, uLine);
|
||||||
|
MONO_PRINT(ds);
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// FLOOR ABOVE FLOOR
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
#define ZMAX 400
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
LONG zval[ZMAX];
|
||||||
|
SHORT sectnum[ZMAX];
|
||||||
|
SHORT pic[ZMAX];
|
||||||
|
SHORT slope[ZMAX];
|
||||||
|
SHORT zcount;
|
||||||
|
} SAVE, *SAVEp;
|
||||||
|
|
||||||
|
SAVE save;
|
||||||
|
|
||||||
|
BOOL FAF_DebugView = 0;
|
||||||
|
BOOL FAFon = 0;
|
||||||
|
BOOL FAF_DontMoveSectors = FALSE;
|
||||||
|
|
||||||
|
short bak_searchsector, bak_searchwall, bak_searchstat;
|
||||||
|
extern short searchsector, searchwall, searchstat, searchit;
|
||||||
|
|
||||||
|
VOID SetupBuildFAF(VOID);
|
||||||
|
VOID ResetBuildFAF(VOID);
|
||||||
|
|
||||||
|
void ToggleFAF(void)
|
||||||
|
{
|
||||||
|
if (keystatus[KEYSC_3])
|
||||||
|
{
|
||||||
|
keystatus[KEYSC_3] = FALSE;
|
||||||
|
|
||||||
|
FLIP(FAFon, 1);
|
||||||
|
if (FAFon)
|
||||||
|
{
|
||||||
|
SetupBuildFAF();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ResetBuildFAF();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (FAFon && qsetmode == 200)
|
||||||
|
{
|
||||||
|
DrawOverlapRoom(posx, posy, posz, ang, horiz, cursectnum);
|
||||||
|
|
||||||
|
// make it so that you can edit both areas in 3D
|
||||||
|
// back up vars after the first drawrooms
|
||||||
|
bak_searchsector = searchsector;
|
||||||
|
bak_searchwall = searchwall;
|
||||||
|
bak_searchstat = searchstat;
|
||||||
|
searchit = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (FAFon && qsetmode == 200 && keystatus[KEYSC_4])
|
||||||
|
{
|
||||||
|
short match;
|
||||||
|
int tx,ty,tz;
|
||||||
|
short tsectnum;
|
||||||
|
short i;
|
||||||
|
keystatus[KEYSC_4] = FALSE;
|
||||||
|
|
||||||
|
tx = posx;
|
||||||
|
ty = posy;
|
||||||
|
tz = posz;
|
||||||
|
tsectnum = cursectnum;
|
||||||
|
|
||||||
|
save.zcount = 0;
|
||||||
|
|
||||||
|
if (sector[cursectnum].ceilingpicnum == FAF_MIRROR_PIC)
|
||||||
|
{
|
||||||
|
match = ViewSectorInScene(tsectnum, VIEW_THRU_CEILING, VIEW_LEVEL1);
|
||||||
|
|
||||||
|
FAF_DontMoveSectors = TRUE;
|
||||||
|
FindCeilingView(match, &tx, &ty, tz, &tsectnum);
|
||||||
|
FAF_DontMoveSectors = FALSE;
|
||||||
|
|
||||||
|
posx = tx;
|
||||||
|
posy = ty;
|
||||||
|
cursectnum = tsectnum;
|
||||||
|
posz = sector[cursectnum].floorz - Z(20);
|
||||||
|
}
|
||||||
|
else if (sector[cursectnum].floorpicnum == FAF_MIRROR_PIC)
|
||||||
|
{
|
||||||
|
match = ViewSectorInScene(tsectnum, VIEW_THRU_FLOOR, VIEW_LEVEL2);
|
||||||
|
|
||||||
|
FAF_DontMoveSectors = TRUE;
|
||||||
|
FindFloorView(match, &tx, &ty, tz, &tsectnum);
|
||||||
|
FAF_DontMoveSectors = FALSE;
|
||||||
|
|
||||||
|
posx = tx;
|
||||||
|
posy = ty;
|
||||||
|
cursectnum = tsectnum;
|
||||||
|
posz = sector[cursectnum].ceilingz + Z(20);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void FAF_AfterDrawRooms(void)
|
||||||
|
{
|
||||||
|
// make it so that you can edit both areas in 3D
|
||||||
|
// if your cursor is in the FAF_MIRROR_PIC area use the vars from the first
|
||||||
|
// drawrooms instead
|
||||||
|
if ((searchstat == 1 && sector[searchsector].ceilingpicnum == FAF_MIRROR_PIC) ||
|
||||||
|
(searchstat == 2 && sector[searchsector].floorpicnum == FAF_MIRROR_PIC))
|
||||||
|
{
|
||||||
|
searchsector = bak_searchsector;
|
||||||
|
searchwall = bak_searchwall;
|
||||||
|
searchstat = bak_searchstat;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
SetupBuildFAF(VOID)
|
||||||
|
{
|
||||||
|
short i, nexti;
|
||||||
|
SPRITEp sp,vc_sp,vf_sp,vl_sp;
|
||||||
|
short SpriteNum, NextSprite;
|
||||||
|
short vc,nextvc,vf,nextvf,l,nextl;
|
||||||
|
int zdiff;
|
||||||
|
|
||||||
|
// move every sprite to the correct list
|
||||||
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_DEFAULT], SpriteNum, NextSprite)
|
||||||
|
{
|
||||||
|
sp = &sprite[SpriteNum];
|
||||||
|
|
||||||
|
if (sp->picnum != ST1)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
switch (sp->hitag)
|
||||||
|
{
|
||||||
|
case VIEW_THRU_CEILING:
|
||||||
|
case VIEW_THRU_FLOOR:
|
||||||
|
{
|
||||||
|
int i,nexti;
|
||||||
|
// make sure there is only one set per level of these
|
||||||
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_FAF], i, nexti)
|
||||||
|
{
|
||||||
|
if (sprite[i].hitag == sp->hitag && sprite[i].lotag == sp->lotag)
|
||||||
|
{
|
||||||
|
sprintf(ds,"Two VIEW_THRU_ tags with same match found on level\n1: x %d, y %d \n2: x %d, y %d", sp->x, sp->y, sprite[i].x, sprite[i].y);
|
||||||
|
Message(ds,0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
changespritestat(SpriteNum, STAT_FAF);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case VIEW_LEVEL1:
|
||||||
|
case VIEW_LEVEL2:
|
||||||
|
case VIEW_LEVEL3:
|
||||||
|
case VIEW_LEVEL4:
|
||||||
|
case VIEW_LEVEL5:
|
||||||
|
case VIEW_LEVEL6:
|
||||||
|
{
|
||||||
|
changespritestat(SpriteNum, STAT_FAF);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_FAF], i, nexti)
|
||||||
|
{
|
||||||
|
sp = &sprite[i];
|
||||||
|
|
||||||
|
if (sector[sp->sectnum].ceilingpicnum == FAF_PLACE_MIRROR_PIC)
|
||||||
|
{
|
||||||
|
sector[sp->sectnum].ceilingpicnum = FAF_MIRROR_PIC;
|
||||||
|
if (sector[sp->sectnum].floorz == sector[sp->sectnum].ceilingz)
|
||||||
|
{
|
||||||
|
sprintf(ds, "Mirror used for non-connect area. Use tile 342. Sect %d, x %d, y %d\n", sp->sectnum, wall[sector[sp->sectnum].wallptr].x, wall[sector[sp->sectnum].wallptr].y);
|
||||||
|
Message(ds,0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sector[sp->sectnum].floorpicnum == FAF_PLACE_MIRROR_PIC)
|
||||||
|
{
|
||||||
|
sector[sp->sectnum].floorpicnum = FAF_MIRROR_PIC;
|
||||||
|
if (sector[sp->sectnum].floorz == sector[sp->sectnum].ceilingz)
|
||||||
|
{
|
||||||
|
sprintf(ds, "Mirror used for non-connect area. Use tile 342. Sect %d, x %d, y %d\n", sp->sectnum, wall[sector[sp->sectnum].wallptr].x, wall[sector[sp->sectnum].wallptr].y);
|
||||||
|
Message(ds,0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sector[sp->sectnum].ceilingpicnum == FAF_PLACE_MIRROR_PIC+1)
|
||||||
|
sector[sp->sectnum].ceilingpicnum = FAF_MIRROR_PIC+1;
|
||||||
|
|
||||||
|
if (sector[sp->sectnum].floorpicnum == FAF_PLACE_MIRROR_PIC+1)
|
||||||
|
sector[sp->sectnum].floorpicnum = FAF_MIRROR_PIC+1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
for (i = 0; i < numwalls; i++)
|
||||||
|
{
|
||||||
|
if (wall[i].picnum == FAF_PLACE_MIRROR_PIC)
|
||||||
|
wall[i].picnum = FAF_MIRROR_PIC;
|
||||||
|
|
||||||
|
if (wall[i].picnum == FAF_PLACE_MIRROR_PIC+1)
|
||||||
|
wall[i].picnum = FAF_MIRROR_PIC+1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
// check ceiling and floor heights
|
||||||
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_FAF], vc, nextvc)
|
||||||
|
{
|
||||||
|
vc_sp = &sprite[vc];
|
||||||
|
|
||||||
|
if (vc_sp->hitag == VIEW_THRU_CEILING)
|
||||||
|
{
|
||||||
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_FAF], vf, nextvf)
|
||||||
|
{
|
||||||
|
vf_sp = &sprite[vf];
|
||||||
|
|
||||||
|
if (vf_sp->hitag == VIEW_THRU_FLOOR && vf_sp->lotag == vc_sp->lotag)
|
||||||
|
{
|
||||||
|
zdiff = labs(sector[vc_sp->sectnum].ceilingz - sector[vf_sp->sectnum].floorz);
|
||||||
|
|
||||||
|
//DSPRINTF(ds,"zdiff %d",zdiff);
|
||||||
|
MONO_PRINT(ds);
|
||||||
|
|
||||||
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_FAF], l, nextl)
|
||||||
|
{
|
||||||
|
vl_sp = &sprite[l];
|
||||||
|
|
||||||
|
if (vl_sp->hitag == VIEW_LEVEL1)
|
||||||
|
{
|
||||||
|
if (sector[vl_sp->sectnum].ceilingz < sector[vc_sp->sectnum].ceilingz + zdiff)
|
||||||
|
{
|
||||||
|
sprintf(ds,"Sector %d (x %d, y %d) ceiling z to close to VIEW_THRU_CEILING z",
|
||||||
|
vl_sp->sectnum, wall[sector[vl_sp->sectnum].wallptr].x, wall[sector[vl_sp->sectnum].wallptr].y);
|
||||||
|
Message(ds,0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (vl_sp->hitag == VIEW_LEVEL2)
|
||||||
|
{
|
||||||
|
if (sector[vl_sp->sectnum].floorz > sector[vf_sp->sectnum].floorz + zdiff)
|
||||||
|
{
|
||||||
|
sprintf(ds,"Sector %d (x %d, y %d)floor z to close to VIEW_THRU_FLOOR z",
|
||||||
|
vl_sp->sectnum, wall[sector[vl_sp->sectnum].wallptr].x, wall[sector[vl_sp->sectnum].wallptr].y);
|
||||||
|
Message(ds,0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
ResetBuildFAF(VOID)
|
||||||
|
{
|
||||||
|
short i, nexti;
|
||||||
|
SPRITEp sp;
|
||||||
|
|
||||||
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_FAF], i, nexti)
|
||||||
|
{
|
||||||
|
sp = &sprite[i];
|
||||||
|
|
||||||
|
if (sector[sp->sectnum].ceilingpicnum == FAF_MIRROR_PIC)
|
||||||
|
sector[sp->sectnum].ceilingpicnum = FAF_PLACE_MIRROR_PIC;
|
||||||
|
|
||||||
|
if (sector[sp->sectnum].floorpicnum == FAF_MIRROR_PIC)
|
||||||
|
sector[sp->sectnum].floorpicnum = FAF_PLACE_MIRROR_PIC;
|
||||||
|
|
||||||
|
if (sector[sp->sectnum].ceilingpicnum == FAF_MIRROR_PIC+1)
|
||||||
|
sector[sp->sectnum].ceilingpicnum = FAF_PLACE_MIRROR_PIC+1;
|
||||||
|
|
||||||
|
if (sector[sp->sectnum].floorpicnum == FAF_MIRROR_PIC+1)
|
||||||
|
sector[sp->sectnum].floorpicnum = FAF_PLACE_MIRROR_PIC+1;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < numwalls; i++)
|
||||||
|
{
|
||||||
|
if (wall[i].picnum == FAF_MIRROR_PIC)
|
||||||
|
wall[i].picnum = FAF_PLACE_MIRROR_PIC;
|
||||||
|
|
||||||
|
if (wall[i].picnum == FAF_MIRROR_PIC+1)
|
||||||
|
wall[i].picnum = FAF_PLACE_MIRROR_PIC+1;
|
||||||
|
}
|
||||||
|
|
||||||
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_FAF], i, nexti)
|
||||||
|
{
|
||||||
|
changespritestat(i, STAT_DEFAULT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BOOL
|
||||||
|
PicInView(short tile_num, BOOL reset)
|
||||||
|
{
|
||||||
|
if (TEST(gotpic[tile_num >> 3], 1 << (tile_num & 7)))
|
||||||
|
{
|
||||||
|
if (reset)
|
||||||
|
RESET(gotpic[tile_num >> 3], 1 << (tile_num & 7));
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
GetUpperLowerSector(short match, int x, int y, short *upper, short *lower)
|
||||||
|
{
|
||||||
|
int i, j;
|
||||||
|
short sectorlist[16];
|
||||||
|
short sln = 0;
|
||||||
|
short SpriteNum, Next;
|
||||||
|
SPRITEp sp;
|
||||||
|
|
||||||
|
// didn't find it yet so test ALL sectors
|
||||||
|
if (sln < 2)
|
||||||
|
{
|
||||||
|
sln = 0;
|
||||||
|
for (i = numsectors - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
if (inside(x, y, (short) i) == 1)
|
||||||
|
{
|
||||||
|
BOOL found = FALSE;
|
||||||
|
|
||||||
|
TRAVERSE_SPRITE_SECT(headspritesect[i], SpriteNum, Next)
|
||||||
|
{
|
||||||
|
sp = &sprite[SpriteNum];
|
||||||
|
|
||||||
|
if (sp->statnum == STAT_FAF &&
|
||||||
|
(sp->hitag >= VIEW_LEVEL1 && sp->hitag <= VIEW_LEVEL6)
|
||||||
|
&& sp->lotag == match)
|
||||||
|
{
|
||||||
|
found = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!found)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
sectorlist[sln] = i;
|
||||||
|
sln++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sln == 0)
|
||||||
|
{
|
||||||
|
*upper = -1;
|
||||||
|
*lower = -1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Map rooms have NOT been dragged on top of each other
|
||||||
|
if (sln == 1)
|
||||||
|
{
|
||||||
|
*lower = sectorlist[0];
|
||||||
|
*upper = sectorlist[0];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
// Map rooms HAVE been dragged on top of each other
|
||||||
|
if (sln > 2)
|
||||||
|
{
|
||||||
|
// try again moving the x,y pos around until you only get two sectors
|
||||||
|
GetUpperLowerSector(match, x - 1, y, upper, lower);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sln == 2)
|
||||||
|
{
|
||||||
|
if (sector[sectorlist[0]].floorz < sector[sectorlist[1]].floorz)
|
||||||
|
{
|
||||||
|
// swap
|
||||||
|
// make sectorlist[0] the LOW sector
|
||||||
|
short hold;
|
||||||
|
|
||||||
|
hold = sectorlist[0];
|
||||||
|
sectorlist[0] = sectorlist[1];
|
||||||
|
sectorlist[1] = hold;
|
||||||
|
}
|
||||||
|
|
||||||
|
*lower = sectorlist[0];
|
||||||
|
*upper = sectorlist[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL
|
||||||
|
FindCeilingView(short match, LONGp x, LONGp y, LONG z, SHORTp sectnum)
|
||||||
|
{
|
||||||
|
int xoff = 0;
|
||||||
|
int yoff = 0;
|
||||||
|
short i, nexti;
|
||||||
|
SPRITEp sp = NULL;
|
||||||
|
short top_sprite = -1;
|
||||||
|
int pix_diff;
|
||||||
|
int newz;
|
||||||
|
|
||||||
|
save.zcount = 0;
|
||||||
|
|
||||||
|
// Search Stat List For closest ceiling view sprite
|
||||||
|
// Get the match, xoff, yoff from this point
|
||||||
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_FAF], i, nexti)
|
||||||
|
{
|
||||||
|
sp = &sprite[i];
|
||||||
|
|
||||||
|
if (sp->hitag == VIEW_THRU_CEILING && sp->lotag == match)
|
||||||
|
{
|
||||||
|
xoff = *x - sp->x;
|
||||||
|
yoff = *y - sp->y;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_FAF], i, nexti)
|
||||||
|
{
|
||||||
|
sp = &sprite[i];
|
||||||
|
|
||||||
|
if (sp->lotag == match)
|
||||||
|
{
|
||||||
|
// determine x,y position
|
||||||
|
if (sp->hitag == VIEW_THRU_FLOOR)
|
||||||
|
{
|
||||||
|
short upper, lower;
|
||||||
|
|
||||||
|
*x = sp->x + xoff;
|
||||||
|
*y = sp->y + yoff;
|
||||||
|
|
||||||
|
// get new sector
|
||||||
|
GetUpperLowerSector(match, *x, *y, &upper, &lower);
|
||||||
|
*sectnum = upper;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (*sectnum < 0)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
ASSERT(sp);
|
||||||
|
ASSERT(sp->hitag == VIEW_THRU_FLOOR);
|
||||||
|
|
||||||
|
if (FAF_DontMoveSectors)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
pix_diff = labs(z - sector[sp->sectnum].floorz) >> 8;
|
||||||
|
newz = sector[sp->sectnum].floorz + ((pix_diff / 128) + 1) * Z(128);
|
||||||
|
|
||||||
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_FAF], i, nexti)
|
||||||
|
{
|
||||||
|
sp = &sprite[i];
|
||||||
|
|
||||||
|
if (sp->lotag == match)
|
||||||
|
{
|
||||||
|
// move lower levels ceilings up for the correct view
|
||||||
|
if (sp->hitag == VIEW_LEVEL2)
|
||||||
|
{
|
||||||
|
// save it off
|
||||||
|
save.sectnum[save.zcount] = sp->sectnum;
|
||||||
|
save.zval[save.zcount] = sector[sp->sectnum].floorz;
|
||||||
|
save.pic[save.zcount] = sector[sp->sectnum].floorpicnum;
|
||||||
|
save.slope[save.zcount] = sector[sp->sectnum].floorheinum;
|
||||||
|
|
||||||
|
sector[sp->sectnum].floorz = newz;
|
||||||
|
sector[sp->sectnum].floorpicnum = FAF_MIRROR_PIC+1;
|
||||||
|
sector[sp->sectnum].floorheinum = 0;
|
||||||
|
|
||||||
|
save.zcount++;
|
||||||
|
ASSERT(save.zcount < ZMAX);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL
|
||||||
|
FindFloorView(short match, LONGp x, LONGp y, LONG z, SHORTp sectnum)
|
||||||
|
{
|
||||||
|
int xoff = 0;
|
||||||
|
int yoff = 0;
|
||||||
|
short i, nexti;
|
||||||
|
SPRITEp sp = NULL;
|
||||||
|
int newz;
|
||||||
|
int pix_diff;
|
||||||
|
|
||||||
|
save.zcount = 0;
|
||||||
|
|
||||||
|
// Search Stat List For closest ceiling view sprite
|
||||||
|
// Get the match, xoff, yoff from this point
|
||||||
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_FAF], i, nexti)
|
||||||
|
{
|
||||||
|
sp = &sprite[i];
|
||||||
|
|
||||||
|
if (sp->hitag == VIEW_THRU_FLOOR && sp->lotag == match)
|
||||||
|
{
|
||||||
|
xoff = *x - sp->x;
|
||||||
|
yoff = *y - sp->y;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_FAF], i, nexti)
|
||||||
|
{
|
||||||
|
sp = &sprite[i];
|
||||||
|
|
||||||
|
if (sp->lotag == match)
|
||||||
|
{
|
||||||
|
// determine x,y position
|
||||||
|
if (sp->hitag == VIEW_THRU_CEILING)
|
||||||
|
{
|
||||||
|
short upper, lower;
|
||||||
|
|
||||||
|
*x = sp->x + xoff;
|
||||||
|
*y = sp->y + yoff;
|
||||||
|
|
||||||
|
// get new sector
|
||||||
|
GetUpperLowerSector(match, *x, *y, &upper, &lower);
|
||||||
|
*sectnum = lower;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (*sectnum < 0)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
ASSERT(sp);
|
||||||
|
ASSERT(sp->hitag == VIEW_THRU_CEILING);
|
||||||
|
|
||||||
|
if (FAF_DontMoveSectors)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
// move ceiling multiple of 128 so that the wall tile will line up
|
||||||
|
pix_diff = labs(z - sector[sp->sectnum].ceilingz) >> 8;
|
||||||
|
newz = sector[sp->sectnum].ceilingz - ((pix_diff / 128) + 1) * Z(128);
|
||||||
|
|
||||||
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_FAF], i, nexti)
|
||||||
|
{
|
||||||
|
sp = &sprite[i];
|
||||||
|
|
||||||
|
if (sp->lotag == match)
|
||||||
|
{
|
||||||
|
// move upper levels floors down for the correct view
|
||||||
|
if (sp->hitag == VIEW_LEVEL1)
|
||||||
|
{
|
||||||
|
// save it off
|
||||||
|
save.sectnum[save.zcount] = sp->sectnum;
|
||||||
|
save.zval[save.zcount] = sector[sp->sectnum].ceilingz;
|
||||||
|
save.pic[save.zcount] = sector[sp->sectnum].ceilingpicnum;
|
||||||
|
save.slope[save.zcount] = sector[sp->sectnum].ceilingheinum;
|
||||||
|
|
||||||
|
sector[sp->sectnum].ceilingz = newz;
|
||||||
|
|
||||||
|
sector[sp->sectnum].ceilingpicnum = FAF_MIRROR_PIC+1;
|
||||||
|
sector[sp->sectnum].ceilingheinum = 0;
|
||||||
|
|
||||||
|
save.zcount++;
|
||||||
|
ASSERT(save.zcount < ZMAX);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL
|
||||||
|
SectorInScene(short tile_num)
|
||||||
|
{
|
||||||
|
if (TEST(gotsector[tile_num >> 3], 1 << (tile_num & 7)))
|
||||||
|
{
|
||||||
|
RESET(gotsector[tile_num >> 3], 1 << (tile_num & 7));
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
short
|
||||||
|
ViewSectorInScene(short cursectnum, short type, short level)
|
||||||
|
{
|
||||||
|
int i, nexti;
|
||||||
|
int j, nextj;
|
||||||
|
SPRITEp sp;
|
||||||
|
SPRITEp sp2;
|
||||||
|
int cz, fz;
|
||||||
|
short match;
|
||||||
|
|
||||||
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_FAF], i, nexti)
|
||||||
|
{
|
||||||
|
sp = &sprite[i];
|
||||||
|
|
||||||
|
if (sp->hitag == level)
|
||||||
|
{
|
||||||
|
if (cursectnum == sp->sectnum)
|
||||||
|
{
|
||||||
|
// ignore case if sprite is pointing up
|
||||||
|
if (sp->ang == 1536)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// only gets to here is sprite is pointing down
|
||||||
|
// found a potential match
|
||||||
|
match = sp->lotag;
|
||||||
|
|
||||||
|
return match;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
DrawOverlapRoom(int tx, int ty, int tz, short tang, int thoriz, short tsectnum)
|
||||||
|
{
|
||||||
|
short i;
|
||||||
|
short match;
|
||||||
|
|
||||||
|
save.zcount = 0;
|
||||||
|
|
||||||
|
match = ViewSectorInScene(tsectnum, VIEW_THRU_CEILING, VIEW_LEVEL1);
|
||||||
|
if (match != -1)
|
||||||
|
{
|
||||||
|
FindCeilingView(match, &tx, &ty, tz, &tsectnum);
|
||||||
|
|
||||||
|
if (tsectnum < 0)
|
||||||
|
{
|
||||||
|
sprintf(ds,"COULD NOT FIND TAGGED LEVEL2 SECTOR FROM X %d, Y %d, SECTNUM %d.",posx,posy,cursectnum);
|
||||||
|
Message(ds, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
drawrooms(tx, ty, tz, tang, thoriz, tsectnum);
|
||||||
|
drawmasks();
|
||||||
|
|
||||||
|
// reset Z's
|
||||||
|
for (i = 0; i < save.zcount; i++)
|
||||||
|
{
|
||||||
|
sector[save.sectnum[i]].floorz = save.zval[i];
|
||||||
|
sector[save.sectnum[i]].floorpicnum = save.pic[i];
|
||||||
|
sector[save.sectnum[i]].floorheinum = save.slope[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
match = ViewSectorInScene(tsectnum, VIEW_THRU_FLOOR, VIEW_LEVEL2);
|
||||||
|
if (match != -1)
|
||||||
|
{
|
||||||
|
FindFloorView(match, &tx, &ty, tz, &tsectnum);
|
||||||
|
|
||||||
|
if (tsectnum < 0)
|
||||||
|
{
|
||||||
|
sprintf(ds,"COULD NOT FIND TAGGED LEVEL1 SECTOR FROM X %d, Y %d, SECTNUM %d.",posx,posy,cursectnum);
|
||||||
|
Message(ds, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
drawrooms(tx, ty, tz, tang, thoriz, tsectnum);
|
||||||
|
drawmasks();
|
||||||
|
|
||||||
|
// reset Z's
|
||||||
|
for (i = 0; i < save.zcount; i++)
|
||||||
|
{
|
||||||
|
sector[save.sectnum[i]].ceilingz = save.zval[i];
|
||||||
|
sector[save.sectnum[i]].ceilingpicnum = save.pic[i];
|
||||||
|
sector[save.sectnum[i]].ceilingheinum = save.slope[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
1630
polymer/eduke32/source/sw/src/bunny.c
Normal file
1630
polymer/eduke32/source/sw/src/bunny.c
Normal file
File diff suppressed because it is too large
Load diff
728
polymer/eduke32/source/sw/src/cache.c
Normal file
728
polymer/eduke32/source/sw/src/cache.c
Normal file
|
@ -0,0 +1,728 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/****************************************
|
||||||
|
Removed sounds that were causing "Could
|
||||||
|
not load" error messages.
|
||||||
|
****************************************/
|
||||||
|
|
||||||
|
#include "build.h"
|
||||||
|
|
||||||
|
#include "names2.h"
|
||||||
|
#include "game.h"
|
||||||
|
#include "tags.h"
|
||||||
|
#include "common_game.h"
|
||||||
|
#include "break.h"
|
||||||
|
#include "quake.h"
|
||||||
|
#include "pal.h"
|
||||||
|
#include "cache.h"
|
||||||
|
#include "sounds.h"
|
||||||
|
#include "net.h"
|
||||||
|
|
||||||
|
// Run the game with the -CACHEPRINT option and redirect to a file.
|
||||||
|
// It will save out the tile and sound number every time one caches.
|
||||||
|
//
|
||||||
|
// sw -map $bullet -cacheprint > foofile
|
||||||
|
extern BOOL PreCaching;
|
||||||
|
|
||||||
|
// player weaponry, item usage, etc. Precache every time.
|
||||||
|
short Player_SCTable[] =
|
||||||
|
{
|
||||||
|
1,2,3,4,5,6,7,8,9,10, // weapons
|
||||||
|
11,12,14,16,18,20,
|
||||||
|
22,23,24,25,26,27,28,30,
|
||||||
|
31,32,33,34,35,40,145,291,445,362,269,
|
||||||
|
158,476, // underwater
|
||||||
|
47,359, // cloaking
|
||||||
|
48,50, // dead head
|
||||||
|
196,52,53,54,55, // splash & getting items
|
||||||
|
56,57,58,73,74,410, // bodies hitting ground
|
||||||
|
484,442, // teleport & respawn
|
||||||
|
417,418, // healing
|
||||||
|
238,239,240,241,242,243,244, // bring weapons up
|
||||||
|
181,182,183,184,187,216, // explosions
|
||||||
|
272,273,274,275,486, // nuke associated sounds
|
||||||
|
276,277,278,279,477, // chem bomb
|
||||||
|
280,281,282,283,284,288,289,290,450, // various player sounds
|
||||||
|
295, // armor hit
|
||||||
|
312, // sword clank
|
||||||
|
324,325,209, // unlocking sound
|
||||||
|
395,396,411, // gibs
|
||||||
|
175, // drip
|
||||||
|
435,436,311,221,220,227, // breakage
|
||||||
|
246,247,248,249,250,251,252,253,254,255,256, // common player talk
|
||||||
|
257,258,259,260,261,262,263,264,266,267,438,439,440,441,
|
||||||
|
326, // ancient chinese secret
|
||||||
|
330,331,332,333,334,335,336,337,338,339,340, // player kill talk
|
||||||
|
341,342,343,344,345,346,347,348,
|
||||||
|
376,377,378,379,380,381,382,383,384,385,386,387, // more asst. talking
|
||||||
|
370,443 // repair talk
|
||||||
|
};
|
||||||
|
|
||||||
|
// Actor specific sound tables. Cache only if the actor appears on the map.
|
||||||
|
// Exceptions would include ghosts, which are spawned by coolies, and
|
||||||
|
// rippers, which are spawned by the serpent boss.
|
||||||
|
short Coolie_SCTable[] =
|
||||||
|
{
|
||||||
|
75,76,77,78,79
|
||||||
|
};
|
||||||
|
|
||||||
|
short Ghost_SCTable[] =
|
||||||
|
{
|
||||||
|
80,81,82,83,84,85,86,87,213
|
||||||
|
};
|
||||||
|
|
||||||
|
short Ninja_SCTable[] =
|
||||||
|
{
|
||||||
|
88,89,90,91,92,93,94,412,
|
||||||
|
319, // firing sound
|
||||||
|
430 // death by sword
|
||||||
|
};
|
||||||
|
|
||||||
|
short Ripper_SCTable[] =
|
||||||
|
{
|
||||||
|
95,96,97,98,99,100,431
|
||||||
|
};
|
||||||
|
|
||||||
|
short Ripper2_SCTable[] =
|
||||||
|
{
|
||||||
|
313,314,315,316,317,318,431
|
||||||
|
};
|
||||||
|
|
||||||
|
short Head_SCTable[] =
|
||||||
|
{
|
||||||
|
115,116,117,118 // accursed heads
|
||||||
|
};
|
||||||
|
|
||||||
|
short Hornet_SCTable[] =
|
||||||
|
{
|
||||||
|
119,120,121,122
|
||||||
|
};
|
||||||
|
|
||||||
|
short Guardian_SCTable[] =
|
||||||
|
{
|
||||||
|
101,102,103,104,105,106,107
|
||||||
|
};
|
||||||
|
|
||||||
|
short Serpent_SCTable[] =
|
||||||
|
{
|
||||||
|
123,124,125,126,127,128,129,130,131 // serpent boss
|
||||||
|
};
|
||||||
|
|
||||||
|
short Sumo_SCTable[] =
|
||||||
|
{
|
||||||
|
320,321,322,323 // sumo boss
|
||||||
|
};
|
||||||
|
|
||||||
|
short Bunny_SCTable[] =
|
||||||
|
{
|
||||||
|
424,425,426,427,428
|
||||||
|
};
|
||||||
|
|
||||||
|
short Toilet_SCTable[] =
|
||||||
|
{
|
||||||
|
388,389,390,391,392,393,488,489,490 // anime girl on toilet
|
||||||
|
}; // I suspect some of these are no longer in use
|
||||||
|
|
||||||
|
short Trash_SCTable[] =
|
||||||
|
{
|
||||||
|
416 // I heard the trash can was an actor, so here is is
|
||||||
|
};
|
||||||
|
|
||||||
|
short Pachinko_SCTable[] =
|
||||||
|
{
|
||||||
|
419,420,421,422,423
|
||||||
|
};
|
||||||
|
|
||||||
|
void PreCacheSoundList(short table[], int num);
|
||||||
|
void PreCacheTable(short table[], int num);
|
||||||
|
VOID PreCacheGhost(VOID);
|
||||||
|
|
||||||
|
void
|
||||||
|
SetupPreCache(void)
|
||||||
|
{
|
||||||
|
if (PreCaching)
|
||||||
|
{
|
||||||
|
precache();
|
||||||
|
|
||||||
|
PreCacheSoundList(Player_SCTable, SIZ(Player_SCTable));
|
||||||
|
|
||||||
|
// actors cache ranges are called from SpriteSetup
|
||||||
|
// only caches the actor if its on the level
|
||||||
|
|
||||||
|
// weapons
|
||||||
|
PreCacheRange(2000, 2227);
|
||||||
|
PreCacheRange(4090, 4093);
|
||||||
|
// Explosions
|
||||||
|
PreCacheRange(3072, 3225);
|
||||||
|
// ninja player character
|
||||||
|
PreCacheRange(1024, 1175);
|
||||||
|
// console
|
||||||
|
PreCacheRange(2380, 2409);
|
||||||
|
PreCacheRange(3600, 3645);
|
||||||
|
PreCacheRange(2434, 2435);
|
||||||
|
// common
|
||||||
|
PreCacheRange(204, 208);
|
||||||
|
// message font
|
||||||
|
PreCacheRange(4608, 4701);
|
||||||
|
// gibs
|
||||||
|
PreCacheRange(1150,1568);
|
||||||
|
PreCacheRange(1685,1690);
|
||||||
|
PreCacheRange(900,944);
|
||||||
|
PreCacheRange(1670,1681);
|
||||||
|
// blood
|
||||||
|
PreCacheRange(1710,1715);
|
||||||
|
PreCacheRange(2410,2425);
|
||||||
|
PreCacheRange(389,389); // blood puddle by itself in art file
|
||||||
|
PreCacheRange(2500,2503);
|
||||||
|
// shrap
|
||||||
|
PreCacheRange(3840,3911);
|
||||||
|
PreCacheRange(3924,3947);
|
||||||
|
PreCacheRange(1397,1398);
|
||||||
|
// water *** animated tiles, can be deleted now ***
|
||||||
|
// PreCacheRange(780,794);
|
||||||
|
// switches
|
||||||
|
PreCacheRange(561,584);
|
||||||
|
PreCacheRange(551,552);
|
||||||
|
PreCacheRange(1846,1847);
|
||||||
|
PreCacheRange(1850,1859);
|
||||||
|
// bullet smoke
|
||||||
|
PreCacheRange(1748,1753);
|
||||||
|
// small blue font
|
||||||
|
PreCacheRange(2930,3023);
|
||||||
|
// gas can
|
||||||
|
PreCacheRange(3038,3042);
|
||||||
|
// lava *** animated tiles, can be deleted now ***
|
||||||
|
// PreCacheRange(175,182);
|
||||||
|
// gas clouds & teleport effect
|
||||||
|
PreCacheRange(3240,3277);
|
||||||
|
// nuke mushroom cloud
|
||||||
|
PreCacheRange(3280,3300);
|
||||||
|
// blood drops
|
||||||
|
PreCacheRange(1718,1721);
|
||||||
|
// smoke
|
||||||
|
PreCacheRange(3948,3968);
|
||||||
|
// footprints
|
||||||
|
PreCacheRange(2490,2492);
|
||||||
|
// player fists
|
||||||
|
PreCacheRange(4070,4077);
|
||||||
|
PreCacheRange(4050,4051);
|
||||||
|
PreCacheRange(4090,4093);
|
||||||
|
// fish actor
|
||||||
|
PreCacheRange(3760,3771);
|
||||||
|
PreCacheRange(3780,3795);
|
||||||
|
// coins
|
||||||
|
PreCacheRange(2531,2533);
|
||||||
|
// respawn markers & console keys
|
||||||
|
PreCacheRange(2440,2467);
|
||||||
|
// light/torch sprites
|
||||||
|
PreCacheRange(537,548);
|
||||||
|
PreCacheRange(521,528);
|
||||||
|
PreCacheRange(512,515);
|
||||||
|
PreCacheRange(396,399);
|
||||||
|
PreCacheRange(443,446);
|
||||||
|
// bubbles
|
||||||
|
PreCacheRange(716,720);
|
||||||
|
// bullet splashes
|
||||||
|
PreCacheRange(772,776);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID PreCacheRipper(VOID)
|
||||||
|
{
|
||||||
|
PreCacheSoundList(Ripper_SCTable, SIZ(Ripper_SCTable));
|
||||||
|
PreCacheRange(1580, 1644);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID PreCacheRipper2(VOID)
|
||||||
|
{
|
||||||
|
PreCacheSoundList(Ripper2_SCTable, SIZ(Ripper2_SCTable));
|
||||||
|
PreCacheRange(4320, 4427);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID PreCacheCoolie(VOID)
|
||||||
|
{
|
||||||
|
PreCacheGhost();
|
||||||
|
PreCacheSoundList(Coolie_SCTable, SIZ(Coolie_SCTable));
|
||||||
|
PreCacheRange(1400, 1440);
|
||||||
|
PreCacheRange(4260, 4276); // coolie explode
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID PreCacheGhost(VOID)
|
||||||
|
{
|
||||||
|
PreCacheSoundList(Ghost_SCTable, SIZ(Ghost_SCTable));
|
||||||
|
PreCacheRange(4277, 4312);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID PreCacheSerpent(VOID)
|
||||||
|
{
|
||||||
|
PreCacheSoundList(Serpent_SCTable, SIZ(Serpent_SCTable));
|
||||||
|
PreCacheRange(960, 1016);
|
||||||
|
PreCacheRange(1300, 1314);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID PreCacheGuardian(VOID)
|
||||||
|
{
|
||||||
|
PreCacheSoundList(Guardian_SCTable, SIZ(Guardian_SCTable));
|
||||||
|
PreCacheRange(1469,1497);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID PreCacheNinja(VOID)
|
||||||
|
{
|
||||||
|
PreCacheSoundList(Ninja_SCTable, SIZ(Ninja_SCTable));
|
||||||
|
PreCacheRange(4096, 4239);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID PreCacheNinjaGirl(VOID)
|
||||||
|
{
|
||||||
|
//PreCacheSoundList(NinjaGirl_SCTable, SIZ(NinjaGirl_SCTable));
|
||||||
|
PreCacheRange(5162, 5260);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID PreCacheSumo(VOID)
|
||||||
|
{
|
||||||
|
PreCacheSoundList(Sumo_SCTable, SIZ(Sumo_SCTable));
|
||||||
|
PreCacheRange(4490, 4544);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID PreCacheZilla(VOID)
|
||||||
|
{
|
||||||
|
PreCacheSoundList(Sumo_SCTable, SIZ(Sumo_SCTable));
|
||||||
|
PreCacheRange(4490, 4544);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID PreCacheEel(VOID)
|
||||||
|
{
|
||||||
|
PreCacheRange(4430, 4479);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID PreCacheToiletGirl(VOID)
|
||||||
|
{
|
||||||
|
PreCacheSoundList(Toilet_SCTable, SIZ(Toilet_SCTable));
|
||||||
|
PreCacheRange(5023, 5027);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID PreCacheWashGirl(VOID)
|
||||||
|
{
|
||||||
|
PreCacheSoundList(Toilet_SCTable, SIZ(Toilet_SCTable));
|
||||||
|
PreCacheRange(5032, 5035);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID PreCacheCarGirl(VOID)
|
||||||
|
{
|
||||||
|
PreCacheSoundList(Toilet_SCTable, SIZ(Toilet_SCTable));
|
||||||
|
PreCacheRange(4594,4597);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID PreCacheMechanicGirl(VOID)
|
||||||
|
{
|
||||||
|
PreCacheSoundList(Toilet_SCTable, SIZ(Toilet_SCTable));
|
||||||
|
PreCacheRange(4590,4593);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID PreCacheSailorGirl(VOID)
|
||||||
|
{
|
||||||
|
PreCacheSoundList(Toilet_SCTable, SIZ(Toilet_SCTable));
|
||||||
|
PreCacheRange(4600,4602);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID PreCachePruneGirl(VOID)
|
||||||
|
{
|
||||||
|
PreCacheSoundList(Toilet_SCTable, SIZ(Toilet_SCTable));
|
||||||
|
PreCacheRange(4604,4604);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID PreCacheTrash(VOID)
|
||||||
|
{
|
||||||
|
PreCacheSoundList(Trash_SCTable, SIZ(Trash_SCTable));
|
||||||
|
PreCacheRange(2540, 2546);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID PreCacheBunny(VOID)
|
||||||
|
{
|
||||||
|
PreCacheSoundList(Bunny_SCTable, SIZ(Bunny_SCTable));
|
||||||
|
PreCacheRange(4550, 4584);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID PreCacheSkel(VOID)
|
||||||
|
{
|
||||||
|
PreCacheRange(1320, 1396);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID PreCacheHornet(VOID)
|
||||||
|
{
|
||||||
|
PreCacheSoundList(Hornet_SCTable, SIZ(Hornet_SCTable));
|
||||||
|
PreCacheRange(800, 811);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID PreCacheSkull(VOID)
|
||||||
|
{
|
||||||
|
PreCacheSoundList(Head_SCTable, SIZ(Head_SCTable));
|
||||||
|
PreCacheRange(820, 854);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID PreCacheBetty(VOID)
|
||||||
|
{
|
||||||
|
PreCacheRange(817, 819);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID PreCachePachinko(VOID)
|
||||||
|
{
|
||||||
|
PreCacheRange(618,623);
|
||||||
|
PreCacheRange(618,623);
|
||||||
|
PreCacheRange(4768,4790);
|
||||||
|
PreCacheRange(4792,4814);
|
||||||
|
PreCacheRange(4816,4838);
|
||||||
|
PreCacheRange(4840,4863);
|
||||||
|
PreCacheSoundList(Pachinko_SCTable, SIZ(Pachinko_SCTable));
|
||||||
|
}
|
||||||
|
|
||||||
|
void PreCacheSoundList(short table[], int num)
|
||||||
|
{
|
||||||
|
short j;
|
||||||
|
|
||||||
|
for (j = 0; j < num; j++)
|
||||||
|
{
|
||||||
|
CacheSound(table[j], CACHE_SOUND_PRECACHE);
|
||||||
|
AnimateCacheCursor();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
PreCacheTable(short table[], int num)
|
||||||
|
{
|
||||||
|
short j;
|
||||||
|
|
||||||
|
for (j = 0; j < num; j++)
|
||||||
|
{
|
||||||
|
SET(gotpic[table[j]>>3], 1<<(table[j]&7));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
PreCacheRange(short start_pic, short end_pic)
|
||||||
|
{
|
||||||
|
short j;
|
||||||
|
|
||||||
|
for (j = start_pic; j <= end_pic; j++)
|
||||||
|
{
|
||||||
|
SET(gotpic[j>>3], 1<<(j&7));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID PreCacheAmbient(VOID)
|
||||||
|
{
|
||||||
|
int i,nexti;
|
||||||
|
int num;
|
||||||
|
SPRITEp sp;
|
||||||
|
extern AMB_INFO ambarray[];
|
||||||
|
|
||||||
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_AMBIENT], i, nexti)
|
||||||
|
{
|
||||||
|
sp = &sprite[i];
|
||||||
|
|
||||||
|
num = sp->lotag;
|
||||||
|
num = ambarray[num].diginame;
|
||||||
|
|
||||||
|
CacheSound(num, CACHE_SOUND_PRECACHE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID PreCacheOverride(VOID)
|
||||||
|
{
|
||||||
|
int i,nexti;
|
||||||
|
|
||||||
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_CEILING_FLOOR_PIC_OVERRIDE], i, nexti)
|
||||||
|
{
|
||||||
|
ASSERT(SPRITE_TAG2(i) >= 0 && SPRITE_TAG2(i) <= MAXTILES);
|
||||||
|
SET_GOTPIC(SPRITE_TAG2(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
VOID PreCacheSoundSpot(VOID)
|
||||||
|
{
|
||||||
|
int i,nexti;
|
||||||
|
int num;
|
||||||
|
SPRITEp sp;
|
||||||
|
|
||||||
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_SOUND_SPOT], i, nexti)
|
||||||
|
{
|
||||||
|
sp = &sprite[i];
|
||||||
|
|
||||||
|
num = SP_TAG13(sp); // tag4 is copied to tag13
|
||||||
|
if (num > 0 && num < DIGI_MAX)
|
||||||
|
CacheSound(num, CACHE_SOUND_PRECACHE);
|
||||||
|
|
||||||
|
num = SP_TAG5(sp);
|
||||||
|
if (num > 0 && num < DIGI_MAX)
|
||||||
|
CacheSound(num, CACHE_SOUND_PRECACHE);
|
||||||
|
|
||||||
|
num = SP_TAG6(sp);
|
||||||
|
if (num > 0 && num < DIGI_MAX)
|
||||||
|
CacheSound(num, CACHE_SOUND_PRECACHE);
|
||||||
|
|
||||||
|
CacheSound(num, CACHE_SOUND_PRECACHE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
PreCacheActor(VOID)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
short pic;
|
||||||
|
|
||||||
|
for (i=0; i < MAXSPRITES; i++)
|
||||||
|
{
|
||||||
|
if (sprite[i].statnum >= MAXSTATUS)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (User[i])
|
||||||
|
pic = User[i]->ID;
|
||||||
|
else
|
||||||
|
pic = sprite[i].picnum;
|
||||||
|
|
||||||
|
switch (pic)
|
||||||
|
{
|
||||||
|
case COOLIE_RUN_R0:
|
||||||
|
PreCacheCoolie();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case NINJA_RUN_R0:
|
||||||
|
case NINJA_CRAWL_R0:
|
||||||
|
PreCacheNinja();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GORO_RUN_R0:
|
||||||
|
PreCacheGuardian();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 1441:
|
||||||
|
case COOLG_RUN_R0:
|
||||||
|
PreCacheGhost();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case EEL_RUN_R0:
|
||||||
|
PreCacheEel();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SUMO_RUN_R0:
|
||||||
|
PreCacheZilla();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ZILLA_RUN_R0:
|
||||||
|
PreCacheSumo();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TOILETGIRL_R0:
|
||||||
|
PreCacheToiletGirl();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WASHGIRL_R0:
|
||||||
|
PreCacheWashGirl();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case CARGIRL_R0:
|
||||||
|
PreCacheCarGirl();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MECHANICGIRL_R0:
|
||||||
|
PreCacheMechanicGirl();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SAILORGIRL_R0:
|
||||||
|
PreCacheSailorGirl();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PRUNEGIRL_R0:
|
||||||
|
PreCachePruneGirl();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TRASHCAN:
|
||||||
|
PreCacheTrash();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case BUNNY_RUN_R0:
|
||||||
|
PreCacheBunny();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case RIPPER_RUN_R0:
|
||||||
|
PreCacheRipper();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case RIPPER2_RUN_R0:
|
||||||
|
PreCacheRipper2();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SERP_RUN_R0:
|
||||||
|
PreCacheSerpent();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LAVA_RUN_R0:
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SKEL_RUN_R0:
|
||||||
|
PreCacheSkel();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case HORNET_RUN_R0:
|
||||||
|
PreCacheHornet();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SKULL_R0:
|
||||||
|
PreCacheSkull();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case BETTY_R0:
|
||||||
|
PreCacheBetty();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GIRLNINJA_RUN_R0:
|
||||||
|
PreCacheNinjaGirl();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 623: // Pachinko win light
|
||||||
|
case PACHINKO1:
|
||||||
|
case PACHINKO2:
|
||||||
|
case PACHINKO3:
|
||||||
|
case PACHINKO4:
|
||||||
|
PreCachePachinko();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void DoTheCache(void)
|
||||||
|
{
|
||||||
|
extern char CacheLastLevel[32],LevelName[20];
|
||||||
|
int i, cnt=0;
|
||||||
|
|
||||||
|
PreCacheAmbient();
|
||||||
|
PreCacheSoundSpot();
|
||||||
|
PreCacheActor();
|
||||||
|
PreCacheOverride();
|
||||||
|
|
||||||
|
for (i = 0; i < MAXTILES; i++)
|
||||||
|
{
|
||||||
|
if ((TEST(gotpic[i>>3], 1<<(i&7))) && (!waloff[i]))
|
||||||
|
{
|
||||||
|
loadtile(i);
|
||||||
|
cnt++;
|
||||||
|
if (!(cnt&7))
|
||||||
|
{
|
||||||
|
AnimateCacheCursor();
|
||||||
|
handleevents();
|
||||||
|
getpackets();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
memset(gotpic,0,sizeof(gotpic));
|
||||||
|
strcpy(CacheLastLevel, LevelName);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
precache(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
short j;
|
||||||
|
SECTORp sectp;
|
||||||
|
WALLp wp;
|
||||||
|
SPRITEp sp;
|
||||||
|
|
||||||
|
memset(gotpic,0,sizeof(gotpic));
|
||||||
|
|
||||||
|
for (sectp = sector; sectp < §or[numsectors]; sectp++)
|
||||||
|
{
|
||||||
|
j = sectp->ceilingpicnum;
|
||||||
|
|
||||||
|
SET(gotpic[j>>3], 1<<(j&7));
|
||||||
|
|
||||||
|
if (TEST(picanm[j],TILE_ANIM_TYPE))
|
||||||
|
{
|
||||||
|
for (i = 1; i <= TEST(picanm[j],TILE_ANIM_NUM); i++)
|
||||||
|
{
|
||||||
|
SET(gotpic[(j+i)>>3], 1<<((j+i)&7));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
j = sectp->floorpicnum;
|
||||||
|
|
||||||
|
SET(gotpic[j>>3], 1<<(j&7));
|
||||||
|
|
||||||
|
if (TEST(picanm[j],TILE_ANIM_TYPE))
|
||||||
|
{
|
||||||
|
for (i = 1; i <= TEST(picanm[j],TILE_ANIM_NUM); i++)
|
||||||
|
{
|
||||||
|
SET(gotpic[(j+i)>>3], 1<<((j+i)&7));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
for (wp = wall; wp < &wall[numwalls]; wp++)
|
||||||
|
{
|
||||||
|
j = wp->picnum;
|
||||||
|
|
||||||
|
SET(gotpic[j>>3], 1<<(j&7));
|
||||||
|
|
||||||
|
if (TEST(picanm[j],TILE_ANIM_TYPE))
|
||||||
|
{
|
||||||
|
for (i = 1; i <= TEST(picanm[j],TILE_ANIM_NUM); i++)
|
||||||
|
{
|
||||||
|
SET(gotpic[(j+i)>>3], 1<<((j+i)&7));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (wp->overpicnum > 0 && wp->overpicnum < MAXTILES)
|
||||||
|
{
|
||||||
|
j = wp->overpicnum;
|
||||||
|
SET(gotpic[j>>3], 1<<(j&7));
|
||||||
|
|
||||||
|
if (TEST(picanm[j],TILE_ANIM_TYPE))
|
||||||
|
{
|
||||||
|
for (i = 1; i <= TEST(picanm[j],TILE_ANIM_NUM); i++)
|
||||||
|
{
|
||||||
|
SET(gotpic[(j+i)>>3], 1<<((j+i)&7));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (sp = sprite; sp < &sprite[MAXSPRITES]; sp++)
|
||||||
|
{
|
||||||
|
if (sp->statnum < MAXSTATUS)
|
||||||
|
{
|
||||||
|
j = sp->picnum;
|
||||||
|
|
||||||
|
SET(gotpic[j>>3], 1<<(j&7));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
40
polymer/eduke32/source/sw/src/cache.h
Normal file
40
polymer/eduke32/source/sw/src/cache.h
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#define CACHE_NONE 0 // don't use this - this is for ken
|
||||||
|
#define CACHE_LOCK_MAX 255
|
||||||
|
#define CACHE_LOCK_START 200
|
||||||
|
#define CACHE_UNLOCK_START 1
|
||||||
|
#define CACHE_UNLOCK_MAX 199
|
||||||
|
|
||||||
|
#define CACHE_SOUND_PRECACHE 0
|
||||||
|
#define CACHE_SOUND_PLAY 1
|
||||||
|
|
||||||
|
void SetupPreCache(void);
|
||||||
|
void PreCacheRange(short start_pic, short end_pic);
|
||||||
|
void DoTheCache(void);
|
||||||
|
void precache(void);
|
||||||
|
|
470
polymer/eduke32/source/sw/src/cheats.c
Normal file
470
polymer/eduke32/source/sw/src/cheats.c
Normal file
|
@ -0,0 +1,470 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
#include "build.h"
|
||||||
|
|
||||||
|
#include "keys.h"
|
||||||
|
#include "names2.h"
|
||||||
|
#include "panel.h"
|
||||||
|
#include "game.h"
|
||||||
|
#include "mytypes.h"
|
||||||
|
#include "text.h"
|
||||||
|
|
||||||
|
#include "control.h"
|
||||||
|
#include "function.h"
|
||||||
|
//#include "inv.h"
|
||||||
|
|
||||||
|
|
||||||
|
BOOL CheatInputMode = FALSE;
|
||||||
|
char CheatInputString[256];
|
||||||
|
BOOL EveryCheat = FALSE;
|
||||||
|
BOOL ResCheat = FALSE;
|
||||||
|
|
||||||
|
VOID ResCheatOn(PLAYERp UNUSED(pp), char *UNUSED(cheat_string))
|
||||||
|
{
|
||||||
|
ResCheat = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID VoxCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string))
|
||||||
|
{
|
||||||
|
//gs.Voxel ^= 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID RestartCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string))
|
||||||
|
{
|
||||||
|
ExitLevel = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID RoomCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string))
|
||||||
|
{
|
||||||
|
extern BOOL FAF_DebugView;
|
||||||
|
FAF_DebugView ^= 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID SecretCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string))
|
||||||
|
{
|
||||||
|
gs.Stats = !gs.Stats;
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID NextCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string))
|
||||||
|
{
|
||||||
|
Level++;
|
||||||
|
ExitLevel = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID PrevCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string))
|
||||||
|
{
|
||||||
|
Level--;
|
||||||
|
ExitLevel = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID MapCheat(PLAYERp pp, char *UNUSED(cheat_string))
|
||||||
|
{
|
||||||
|
automapping ^= 1;
|
||||||
|
|
||||||
|
if (automapping)
|
||||||
|
MapSetAll2D(0);
|
||||||
|
else
|
||||||
|
MapSetAll2D(0xFF);
|
||||||
|
|
||||||
|
sprintf(ds, "AUTOMAPPING %s", automapping ? "ON" : "OFF");
|
||||||
|
PutStringInfo(pp, ds);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
VOID LocCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string))
|
||||||
|
{
|
||||||
|
extern BOOL LocationInfo;
|
||||||
|
LocationInfo++;
|
||||||
|
if (LocationInfo > 2)
|
||||||
|
LocationInfo = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
VOID WeaponCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string))
|
||||||
|
{
|
||||||
|
PLAYERp p;
|
||||||
|
short pnum;
|
||||||
|
unsigned int i;
|
||||||
|
USERp u;
|
||||||
|
|
||||||
|
TRAVERSE_CONNECT(pnum)
|
||||||
|
{
|
||||||
|
p = &Player[pnum];
|
||||||
|
u = User[p->PlayerSprite];
|
||||||
|
|
||||||
|
// ALL WEAPONS
|
||||||
|
if (!SW_SHAREWARE)
|
||||||
|
p->WpnFlags = 0xFFFFFFFF;
|
||||||
|
else
|
||||||
|
p->WpnFlags = 0x0000207F; // Disallows high weapon cheat in shareware
|
||||||
|
|
||||||
|
for (i = 0; i < SIZ(p->WpnAmmo); i++)
|
||||||
|
{
|
||||||
|
p->WpnAmmo[i] = DamageData[i].max_ammo;
|
||||||
|
}
|
||||||
|
|
||||||
|
PlayerUpdateWeapon(p, u->WeaponNum);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
VOID GodCheat(PLAYERp pp, char *UNUSED(cheat_string))
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// GOD mode
|
||||||
|
//
|
||||||
|
GodMode ^= 1;
|
||||||
|
|
||||||
|
sprintf(ds, "GOD MODE %s", GodMode ? "ON" : "OFF");
|
||||||
|
PutStringInfo(pp, ds);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID ClipCheat(PLAYERp pp, char *UNUSED(cheat_string))
|
||||||
|
{
|
||||||
|
FLIP(pp->Flags, PF_CLIP_CHEAT);
|
||||||
|
|
||||||
|
sprintf(ds, "NO CLIP MODE %s", TEST(pp->Flags, PF_CLIP_CHEAT) ? "ON" : "OFF");
|
||||||
|
PutStringInfo(pp, ds);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID WarpCheat(PLAYERp pp, char *cheat_string)
|
||||||
|
{
|
||||||
|
char *cp = cheat_string;
|
||||||
|
int episode_num;
|
||||||
|
int level_num;
|
||||||
|
|
||||||
|
cp += sizeof("swtrek")-1;
|
||||||
|
level_num = atol(cp);
|
||||||
|
|
||||||
|
//DSPRINTF(ds,"ep %d, lev %d",episode_num, level_num);
|
||||||
|
//MONO_PRINT(ds);
|
||||||
|
|
||||||
|
if (!SW_SHAREWARE)
|
||||||
|
{
|
||||||
|
if (level_num > 28 || level_num < 1)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (level_num > 4 || level_num < 1)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Level = level_num;
|
||||||
|
ExitLevel = TRUE;
|
||||||
|
|
||||||
|
sprintf(ds, "ENTERING %1d", Level);
|
||||||
|
PutStringInfo(pp, ds);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID ItemCheat(PLAYERp pp, char *cheat_string)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// Get all ITEMS
|
||||||
|
//
|
||||||
|
PLAYERp p;
|
||||||
|
short pnum;
|
||||||
|
short inv;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
PutStringInfo(pp, "ITEMS");
|
||||||
|
|
||||||
|
TRAVERSE_CONNECT(pnum)
|
||||||
|
{
|
||||||
|
p = &Player[pnum];
|
||||||
|
memset(p->HasKey, TRUE, sizeof(p->HasKey));
|
||||||
|
|
||||||
|
if (p->Wpn[WPN_UZI] && p->CurWpn == p->Wpn[WPN_UZI])
|
||||||
|
{
|
||||||
|
SET(p->Flags, PF_TWO_UZI);
|
||||||
|
SET(p->Flags, PF_PICKED_UP_AN_UZI);
|
||||||
|
InitWeaponUzi(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
p->WpnShotgunAuto = 50;
|
||||||
|
p->WpnRocketHeat = 5;
|
||||||
|
p->WpnRocketNuke = 1;
|
||||||
|
p->Armor = 100;
|
||||||
|
|
||||||
|
for (inv = 0; inv < MAX_INVENTORY; inv++)
|
||||||
|
{
|
||||||
|
p->InventoryPercent[inv] = 100;
|
||||||
|
//p->InventoryAmount[inv] = 1;
|
||||||
|
p->InventoryAmount[inv] = InventoryData[inv].MaxInv;
|
||||||
|
//PlayerUpdateInventory(p, inv);
|
||||||
|
}
|
||||||
|
|
||||||
|
PlayerUpdateInventory(p, p->InventoryNum);
|
||||||
|
//p->InventoryNum = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i=0; i<numsectors; i++)
|
||||||
|
{
|
||||||
|
if (SectUser[i] && SectUser[i]->stag == SECT_LOCK_DOOR)
|
||||||
|
SectUser[i]->number = 0; // unlock all doors of this type
|
||||||
|
}
|
||||||
|
|
||||||
|
WeaponCheat(pp, cheat_string);
|
||||||
|
PlayerUpdateKeys(pp);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID EveryCheatToggle(PLAYERp pp, char *cheat_string)
|
||||||
|
{
|
||||||
|
EveryCheat ^= 1;
|
||||||
|
|
||||||
|
WeaponCheat(pp, cheat_string);
|
||||||
|
GodCheat(pp, cheat_string);
|
||||||
|
ItemCheat(pp, cheat_string);
|
||||||
|
|
||||||
|
sprintf(ds, "EVERY CHEAT %s", EveryCheat ? "ON" : "OFF");
|
||||||
|
PutStringInfo(pp, ds);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID SaveCheat(PLAYERp pp, char *UNUSED(cheat_string))
|
||||||
|
{
|
||||||
|
saveboard("swsave.map", &pp->posx, &pp->posy, &pp->posz,
|
||||||
|
&pp->pang, &pp->cursectnum);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID GeorgeFunc(PLAYERp pp, char *UNUSED(cheat_string))
|
||||||
|
{
|
||||||
|
PlayerSound(DIGI_TAUNTAI9,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_doppler|v3df_follow,pp);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID BlackburnFunc(PLAYERp pp, char *UNUSED(cheat_string))
|
||||||
|
{
|
||||||
|
PlayerSound(DIGI_TAUNTAI3,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_doppler|v3df_follow,pp);
|
||||||
|
}
|
||||||
|
|
||||||
|
int cheatcmp(char *str1, char *str2, int len)
|
||||||
|
{
|
||||||
|
char *cp1 = str1;
|
||||||
|
char *cp2 = str2;
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
if (*cp1 != *cp2)
|
||||||
|
{
|
||||||
|
if (!((*cp1 == '#' && isdigit(*cp2)) || (*cp2 == '#' && isdigit(*cp1))))
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
cp1++;
|
||||||
|
cp2++;
|
||||||
|
}
|
||||||
|
while (--len);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#define CF_ALL BIT(0)
|
||||||
|
#define CF_NOTSW BIT(1)
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
char *CheatInputCode;
|
||||||
|
void (*CheatInputFunc)(PLAYERp, char *);
|
||||||
|
char flags;
|
||||||
|
} CHEAT_INFO, *CHEAT_INFOp;
|
||||||
|
|
||||||
|
|
||||||
|
CHEAT_INFO ci[] =
|
||||||
|
{
|
||||||
|
{"swchan", GodCheat, 0},
|
||||||
|
{"swgimme", ItemCheat, 0},
|
||||||
|
{"swtrek##", WarpCheat, 0},
|
||||||
|
{"swgreed", EveryCheatToggle, 0},
|
||||||
|
{"swghost", ClipCheat, 0},
|
||||||
|
|
||||||
|
{"swstart", RestartCheat, 0},
|
||||||
|
|
||||||
|
{"swres", ResCheatOn, 0},
|
||||||
|
{"swloc", LocCheat, 0},
|
||||||
|
{"swmap", MapCheat, 0},
|
||||||
|
{"swsave", SaveCheat, CF_ALL},
|
||||||
|
{"swroom", RoomCheat, CF_NOTSW}, // Room above room dbug
|
||||||
|
#if DEBUG
|
||||||
|
{"swsecret", SecretCheat, CF_ALL},
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// !JIM! My simplified version of CheatInput which simply processes MessageInputString
|
||||||
|
void CheatInput(void)
|
||||||
|
{
|
||||||
|
static BOOL cur_show;
|
||||||
|
int ret;
|
||||||
|
BOOL match = FALSE;
|
||||||
|
unsigned int i;
|
||||||
|
|
||||||
|
//if (CommEnabled)
|
||||||
|
// return;
|
||||||
|
|
||||||
|
strcpy(CheatInputString,MessageInputString);
|
||||||
|
|
||||||
|
// make sure string is lower cased
|
||||||
|
Bstrlwr(CheatInputString);
|
||||||
|
|
||||||
|
// check for at least one single match
|
||||||
|
for (i = 0; i < SIZ(ci); i++)
|
||||||
|
{
|
||||||
|
// compare without the NULL
|
||||||
|
if (cheatcmp(CheatInputString, ci[i].CheatInputCode, strlen(CheatInputString)) == 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
// if they are equal in length then its a complet match
|
||||||
|
if (strlen(CheatInputString) == strlen(ci[i].CheatInputCode))
|
||||||
|
{
|
||||||
|
match = TRUE;
|
||||||
|
CheatInputMode = FALSE;
|
||||||
|
|
||||||
|
if (TEST(ci[i].flags, CF_NOTSW) && SW_SHAREWARE)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!TEST(ci[i].flags, CF_ALL))
|
||||||
|
{
|
||||||
|
if (CommEnabled)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (Skill >= 3)
|
||||||
|
{
|
||||||
|
PutStringInfo(Player, "You're too skillful to cheat\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ci[i].CheatInputFunc)
|
||||||
|
(*ci[i].CheatInputFunc)(Player, CheatInputString);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
match = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!match)
|
||||||
|
{
|
||||||
|
////DSPRINTF(ds,"Lost A Match %s", CheatInputString);
|
||||||
|
//MONO_PRINT(ds);
|
||||||
|
|
||||||
|
CheatInputMode = FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* OLD CODE
|
||||||
|
void CheatInput(void)
|
||||||
|
{
|
||||||
|
static BOOL cur_show;
|
||||||
|
signed char MNU_InputString(char *, short);
|
||||||
|
int ret;
|
||||||
|
BOOL match = FALSE;
|
||||||
|
short i;
|
||||||
|
|
||||||
|
// don't use InputMode here - its set for CheatInputMode
|
||||||
|
if (MessageInputMode || MenuInputMode)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!CheatInputMode)
|
||||||
|
{
|
||||||
|
if (KEY_PRESSED(KEYSC_S))
|
||||||
|
{
|
||||||
|
//KEY_PRESSED(KEYSC_S) = FALSE;
|
||||||
|
CheatInputMode = TRUE;
|
||||||
|
strcpy(CheatInputString,"s");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CheatInputMode)
|
||||||
|
{
|
||||||
|
// get new chars
|
||||||
|
ret = MNU_InputString(CheatInputString, 320-20);
|
||||||
|
|
||||||
|
// quick check input
|
||||||
|
switch (ret)
|
||||||
|
{
|
||||||
|
case FALSE: // Input finished (RETURN)
|
||||||
|
case -1: // Cancel Input (pressed ESC) or Err
|
||||||
|
CheatInputMode = FALSE;
|
||||||
|
KB_FlushKeyboardQueue();
|
||||||
|
return;
|
||||||
|
|
||||||
|
case TRUE: // Got input
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// make sure string is lower cased
|
||||||
|
strlwr(CheatInputString);
|
||||||
|
|
||||||
|
// check for at least one single match
|
||||||
|
for (i = 0; i < SIZ(ci); i++)
|
||||||
|
{
|
||||||
|
// compare without the NULL
|
||||||
|
if (cheatcmp(CheatInputString, ci[i].CheatInputCode, strlen(CheatInputString)) == 0)
|
||||||
|
{
|
||||||
|
////DSPRINTF(ds,"%s",CheatInputString);
|
||||||
|
//MONO_PRINT(ds);
|
||||||
|
|
||||||
|
// if they are equal in length then its a complet match
|
||||||
|
if (strlen(CheatInputString) == strlen(ci[i].CheatInputCode))
|
||||||
|
{
|
||||||
|
////DSPRINTF(ds,"Found A Match %s", CheatInputString);
|
||||||
|
//MONO_PRINT(ds);
|
||||||
|
|
||||||
|
match = TRUE;
|
||||||
|
|
||||||
|
CheatInputMode = FALSE;
|
||||||
|
KB_FlushKeyboardQueue();
|
||||||
|
|
||||||
|
if (ci[i].CheatInputFunc)
|
||||||
|
(*ci[i].CheatInputFunc)(Player, CheatInputString);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
match = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!match)
|
||||||
|
{
|
||||||
|
////DSPRINTF(ds,"Lost A Match %s", CheatInputString);
|
||||||
|
//MONO_PRINT(ds);
|
||||||
|
|
||||||
|
CheatInputMode = FALSE;
|
||||||
|
KB_FlushKeyboardQueue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
*/
|
466
polymer/eduke32/source/sw/src/colormap.c
Normal file
466
polymer/eduke32/source/sw/src/colormap.c
Normal file
|
@ -0,0 +1,466 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
#include "build.h"
|
||||||
|
|
||||||
|
#include "keys.h"
|
||||||
|
#include "pal.h"
|
||||||
|
#include "game.h"
|
||||||
|
|
||||||
|
short f_c = 3;
|
||||||
|
static unsigned char tempbuf[256];
|
||||||
|
unsigned char DefaultPalette[256 * 32];
|
||||||
|
#if 1
|
||||||
|
VOID
|
||||||
|
MapColors(short num, COLOR_MAP cm, short create)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
float inc;
|
||||||
|
|
||||||
|
if (create)
|
||||||
|
{
|
||||||
|
for (i = 0; i < 256; i++)
|
||||||
|
tempbuf[i] = i;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cm.FromRange == 0 || num <= 0 || num >= 256)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
inc = cm.ToRange/((float)cm.FromRange);
|
||||||
|
|
||||||
|
for (i = 0; i < cm.FromRange; i++)
|
||||||
|
tempbuf[i + cm.FromColor] = (i*inc) + cm.ToColor;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
VOID
|
||||||
|
MapColors(short num, COLOR_MAP cm, short create)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if (create)
|
||||||
|
{
|
||||||
|
for (i = 0; i < 256; i++)
|
||||||
|
tempbuf[i] = i;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cm.FromRange == 0 || num <= 0 || num >= 256)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// from 32 to 32 || 16 to 16
|
||||||
|
if (cm.ToRange == cm.FromRange)
|
||||||
|
{
|
||||||
|
for (i = 0; i < cm.FromRange; i++)
|
||||||
|
tempbuf[i + cm.FromColor] = i + cm.ToColor;
|
||||||
|
|
||||||
|
// Quick fix for grey
|
||||||
|
if (cm.ToColor == LT_GREY)
|
||||||
|
tempbuf[cm.FromColor+31] = 0; // Set to black
|
||||||
|
}
|
||||||
|
else
|
||||||
|
// from 32 to 16
|
||||||
|
if (cm.ToRange == DIV2(cm.FromRange))
|
||||||
|
{
|
||||||
|
for (i = 0; i < cm.FromRange; i++)
|
||||||
|
tempbuf[cm.FromColor + i] = cm.ToColor + DIV2(i);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
// from 16 to 32
|
||||||
|
if (DIV2(cm.ToRange) == cm.FromRange)
|
||||||
|
{
|
||||||
|
for (i = 0; i < cm.FromRange; i++)
|
||||||
|
tempbuf[cm.FromColor + DIV2(i)] = cm.ToColor;
|
||||||
|
|
||||||
|
// Quick fix for grey
|
||||||
|
if (cm.ToColor == LT_GREY)
|
||||||
|
tempbuf[cm.FromColor+31] = 0; // Set to black
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define PLAYER_COLOR_MAPS 15
|
||||||
|
static COLOR_MAP PlayerColorMap[PLAYER_COLOR_MAPS][1] =
|
||||||
|
{
|
||||||
|
|
||||||
|
{
|
||||||
|
{32, 32, LT_BLUE, LT_BROWN},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{32, 31, LT_BLUE, LT_GREY},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{32, 16, LT_BLUE, PURPLE}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{32, 16, LT_BLUE, RUST_RED},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{32, 16, LT_BLUE, YELLOW},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{32, 16, LT_BLUE, DK_GREEN},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{32, 16, LT_BLUE, GREEN},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{32, 32, LT_BLUE, LT_BLUE}, // Redundant, but has to be here for position
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{32, 32, LT_BLUE, LT_TAN},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{32, 16, LT_BLUE, RED},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{32, 16, LT_BLUE, DK_GREY},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{32, 16, LT_BLUE, BRIGHT_GREEN},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{32, 16, LT_BLUE, DK_BLUE},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{32, 16, LT_BLUE, FIRE},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{32, 16, LT_BLUE, FIRE},
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
VOID
|
||||||
|
InitPalette(VOID)
|
||||||
|
{
|
||||||
|
static COLOR_MAP AllToRed[] =
|
||||||
|
{
|
||||||
|
{31, 16, LT_GREY, RED},
|
||||||
|
{32, 16, LT_BROWN, RED},
|
||||||
|
{32, 16, LT_TAN, RED},
|
||||||
|
{16, 16, RUST_RED, RED},
|
||||||
|
{16, 16, YELLOW, RED},
|
||||||
|
{16, 16, BRIGHT_GREEN, RED},
|
||||||
|
{16, 16, DK_GREEN, RED},
|
||||||
|
{16, 16, GREEN, RED},
|
||||||
|
{32, 16, LT_BLUE, RED},
|
||||||
|
{16, 16, PURPLE, RED},
|
||||||
|
{16, 16, FIRE, RED}
|
||||||
|
};
|
||||||
|
|
||||||
|
static COLOR_MAP AllToBlue[] =
|
||||||
|
{
|
||||||
|
{31, 32, LT_GREY, LT_BLUE},
|
||||||
|
{32, 32, LT_BROWN, LT_BLUE},
|
||||||
|
{32, 32, LT_TAN, LT_BLUE},
|
||||||
|
{16, 32, RUST_RED, LT_BLUE},
|
||||||
|
{16, 32, YELLOW, LT_BLUE},
|
||||||
|
{16, 32, BRIGHT_GREEN, LT_BLUE},
|
||||||
|
{16, 32, DK_GREEN, LT_BLUE},
|
||||||
|
{16, 32, GREEN, LT_BLUE},
|
||||||
|
{16, 32, RED, LT_BLUE},
|
||||||
|
{16, 32, PURPLE, LT_BLUE},
|
||||||
|
{16, 32, FIRE, LT_BLUE}
|
||||||
|
};
|
||||||
|
|
||||||
|
static COLOR_MAP AllToGreen[] =
|
||||||
|
{
|
||||||
|
{31, 16, LT_GREY, GREEN},
|
||||||
|
{32, 16, LT_BROWN, GREEN},
|
||||||
|
{32, 16, LT_TAN, GREEN},
|
||||||
|
{16, 16, RUST_RED, GREEN},
|
||||||
|
{16, 16, YELLOW, GREEN},
|
||||||
|
{16, 16, BRIGHT_GREEN, GREEN},
|
||||||
|
{16, 16, DK_GREEN, GREEN},
|
||||||
|
{16, 16, GREEN, GREEN},
|
||||||
|
{32, 16, LT_BLUE, GREEN},
|
||||||
|
{16, 16, RED, GREEN},
|
||||||
|
{16, 16, PURPLE, GREEN},
|
||||||
|
{16, 16, FIRE, GREEN}
|
||||||
|
};
|
||||||
|
|
||||||
|
static COLOR_MAP NinjaBasic[] =
|
||||||
|
{
|
||||||
|
{32, 16, LT_TAN, DK_GREY},
|
||||||
|
{32, 16, LT_BROWN,DK_GREY},
|
||||||
|
{32, 31, LT_BLUE,LT_GREY},
|
||||||
|
{16, 16, DK_GREEN,DK_GREY},
|
||||||
|
{16, 16, GREEN, DK_GREY},
|
||||||
|
{16, 16, YELLOW, DK_GREY}
|
||||||
|
};
|
||||||
|
|
||||||
|
static COLOR_MAP NinjaRed[] =
|
||||||
|
{
|
||||||
|
{16, 16, DK_TAN, DK_GREY},
|
||||||
|
{16, 16, GREEN, DK_TAN},
|
||||||
|
{16, 8, DK_BROWN, RED + 8},
|
||||||
|
|
||||||
|
{32, 16, LT_BLUE, RED}
|
||||||
|
};
|
||||||
|
|
||||||
|
static COLOR_MAP NinjaGreen[] =
|
||||||
|
{
|
||||||
|
{16, 16, DK_TAN, DK_GREY},
|
||||||
|
{16, 16, GREEN, DK_TAN},
|
||||||
|
{16, 8, DK_BROWN, GREEN + 6},
|
||||||
|
|
||||||
|
{32, 16, LT_BLUE, GREEN}
|
||||||
|
};
|
||||||
|
|
||||||
|
static COLOR_MAP Illuminate[] =
|
||||||
|
{
|
||||||
|
{16, 8, LT_GREY, BRIGHT_GREEN},
|
||||||
|
{16, 8, DK_GREY, BRIGHT_GREEN},
|
||||||
|
{16, 8, LT_BROWN, BRIGHT_GREEN},
|
||||||
|
{16, 8, DK_BROWN, BRIGHT_GREEN},
|
||||||
|
{16, 8, LT_TAN, BRIGHT_GREEN},
|
||||||
|
{16, 8, DK_TAN, BRIGHT_GREEN},
|
||||||
|
{16, 8, RUST_RED, BRIGHT_GREEN},
|
||||||
|
{16, 8, YELLOW, BRIGHT_GREEN},
|
||||||
|
{16, 8, DK_GREEN, BRIGHT_GREEN},
|
||||||
|
{16, 8, GREEN, BRIGHT_GREEN},
|
||||||
|
{32, 8, LT_BLUE, BRIGHT_GREEN},
|
||||||
|
{16, 8, RED, BRIGHT_GREEN},
|
||||||
|
{16, 8, PURPLE, BRIGHT_GREEN},
|
||||||
|
{16, 8, FIRE, BRIGHT_GREEN}
|
||||||
|
};
|
||||||
|
|
||||||
|
static COLOR_MAP BrownRipper = {31, 32, LT_GREY, LT_TAN};
|
||||||
|
|
||||||
|
static COLOR_MAP SkelGore = {16, 16, RED, BRIGHT_GREEN};
|
||||||
|
static COLOR_MAP ElectroGore = {16, 16, RED, DK_BLUE};
|
||||||
|
|
||||||
|
static COLOR_MAP MenuHighlight = {16, 16, RED, FIRE};
|
||||||
|
|
||||||
|
unsigned int i;
|
||||||
|
short play;
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
// I need this for doing fog... Not sure why it wasn't already here.
|
||||||
|
initfastcolorlookup(1,1,1);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//
|
||||||
|
// Save default palette
|
||||||
|
//
|
||||||
|
|
||||||
|
memcpy(DefaultPalette, palookup[PALETTE_DEFAULT], 256 * 32);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Dive palettes
|
||||||
|
//
|
||||||
|
|
||||||
|
for (i = 0; i < 256; i++)
|
||||||
|
tempbuf[i] = i;
|
||||||
|
// palette for underwater
|
||||||
|
makepalookup(PALETTE_DIVE, tempbuf, 0, 0, 15, TRUE);
|
||||||
|
|
||||||
|
#define FOG_AMT 15
|
||||||
|
for (i = 0; i < 256; i++)
|
||||||
|
tempbuf[i] = i;
|
||||||
|
makepalookup(PALETTE_FOG, tempbuf, FOG_AMT, FOG_AMT, FOG_AMT, TRUE);
|
||||||
|
|
||||||
|
for (i = 0; i < 256; i++)
|
||||||
|
tempbuf[i] = i;
|
||||||
|
makepalookup(PALETTE_DIVE_LAVA, tempbuf, 11, 0, 0, TRUE);
|
||||||
|
|
||||||
|
//
|
||||||
|
// 1 Range changes
|
||||||
|
//
|
||||||
|
|
||||||
|
MapColors(PALETTE_BROWN_RIPPER, BrownRipper, TRUE);
|
||||||
|
makepalookup(PALETTE_BROWN_RIPPER, tempbuf, 0, 0, 0, TRUE);
|
||||||
|
|
||||||
|
MapColors(PALETTE_SKEL_GORE, SkelGore, TRUE);
|
||||||
|
makepalookup(PALETTE_SKEL_GORE, tempbuf, 0, 0, 0, TRUE);
|
||||||
|
|
||||||
|
MapColors(PALETTE_ELECTRO_GORE, ElectroGore, TRUE);
|
||||||
|
makepalookup(PALETTE_ELECTRO_GORE, tempbuf, 0, 0, 0, TRUE);
|
||||||
|
|
||||||
|
MapColors(PALETTE_MENU_HIGHLIGHT, MenuHighlight, TRUE);
|
||||||
|
makepalookup(PALETTE_MENU_HIGHLIGHT, tempbuf, 0, 0, 0, TRUE);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Multiple range changes
|
||||||
|
//
|
||||||
|
|
||||||
|
MapColors(PALETTE_BASIC_NINJA, NinjaBasic[0], TRUE);
|
||||||
|
for (i = 1; i < SIZ(NinjaBasic); i++)
|
||||||
|
MapColors(PALETTE_BASIC_NINJA, NinjaBasic[i], FALSE);
|
||||||
|
makepalookup(PALETTE_BASIC_NINJA, tempbuf, 0, 0, 0, TRUE);
|
||||||
|
|
||||||
|
MapColors(PALETTE_RED_NINJA, NinjaRed[0], TRUE);
|
||||||
|
for (i = 1; i < SIZ(NinjaRed); i++)
|
||||||
|
MapColors(PALETTE_RED_NINJA, NinjaRed[i], FALSE);
|
||||||
|
makepalookup(PALETTE_RED_NINJA, tempbuf, 0, 0, 0, TRUE);
|
||||||
|
|
||||||
|
MapColors(PALETTE_GREEN_NINJA, NinjaGreen[0], TRUE);
|
||||||
|
for (i = 1; i < SIZ(NinjaGreen); i++)
|
||||||
|
MapColors(PALETTE_GREEN_NINJA, NinjaGreen[i], FALSE);
|
||||||
|
makepalookup(PALETTE_GREEN_NINJA, tempbuf, 0, 0, 0, TRUE);
|
||||||
|
|
||||||
|
MapColors(PALETTE_GREEN_LIGHTING, AllToGreen[0], TRUE);
|
||||||
|
for (i = 1; i < SIZ(AllToGreen); i++)
|
||||||
|
MapColors(PALETTE_GREEN_LIGHTING, AllToGreen[i], FALSE);
|
||||||
|
makepalookup(PALETTE_GREEN_LIGHTING, tempbuf, 0, 0, 0, TRUE);
|
||||||
|
|
||||||
|
MapColors(PALETTE_RED_LIGHTING, AllToRed[0], TRUE);
|
||||||
|
for (i = 1; i < SIZ(AllToRed); i++)
|
||||||
|
MapColors(PALETTE_RED_LIGHTING, AllToRed[i], FALSE);
|
||||||
|
makepalookup(PALETTE_RED_LIGHTING, tempbuf, 0, 0, 0, TRUE);
|
||||||
|
|
||||||
|
MapColors(PALETTE_BLUE_LIGHTING, AllToBlue[0], TRUE);
|
||||||
|
for (i = 1; i < SIZ(AllToBlue); i++)
|
||||||
|
MapColors(PALETTE_BLUE_LIGHTING, AllToBlue[i], FALSE);
|
||||||
|
makepalookup(PALETTE_BLUE_LIGHTING, tempbuf, 0, 0, 0, TRUE);
|
||||||
|
|
||||||
|
MapColors(PALETTE_ILLUMINATE, Illuminate[0], TRUE);
|
||||||
|
for (i = 1; i < SIZ(Illuminate); i++)
|
||||||
|
MapColors(PALETTE_ILLUMINATE, Illuminate[i], FALSE);
|
||||||
|
makepalookup(PALETTE_ILLUMINATE, tempbuf, 0, 0, 0, TRUE);
|
||||||
|
|
||||||
|
// PLAYER COLORS - ALSO USED FOR OTHER THINGS
|
||||||
|
for (play = 0; play < PLAYER_COLOR_MAPS; play++)
|
||||||
|
{
|
||||||
|
MapColors(PALETTE_PLAYER0 + play, PlayerColorMap[play][0], TRUE);
|
||||||
|
MapColors(PALETTE_PLAYER0 + play, PlayerColorMap[play][0], FALSE);
|
||||||
|
makepalookup(PALETTE_PLAYER0 + play, tempbuf, 0, 0, 0, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Special Brown sludge
|
||||||
|
//
|
||||||
|
|
||||||
|
for (i = 0; i < 256; i++)
|
||||||
|
tempbuf[i] = i;
|
||||||
|
// invert the brown palette
|
||||||
|
for (i = 0; i < 32; i++)
|
||||||
|
tempbuf[LT_BROWN + i] = (LT_BROWN + 32) - i;
|
||||||
|
makepalookup(PALETTE_SLUDGE, tempbuf, 0, 0, 0, TRUE);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
2. You must now use my function to set or get any palette
|
||||||
|
registers.This means that the keywords "3c7", "3c8", and "3c9" should not even exist in your code.I really
|
||||||
|
didn 't want to force you to use my palette functions, but
|
||||||
|
since VESA 2.0 supports non VGA compatible cards, you must
|
||||||
|
do
|
||||||
|
it this way.If you use setbrightness for all of your
|
||||||
|
palette setting, then you can ignore this.Note that the
|
||||||
|
palette format here is VESA 's palette format, which is
|
||||||
|
different than my other palette control functions.It 's
|
||||||
|
4 bytes and RGB are backwards.Here are the function
|
||||||
|
prototypes:
|
||||||
|
|
||||||
|
VBE_setPalette(long palstart, long palnum, char *dapal);
|
||||||
|
|
||||||
|
VBE_getPalette(long palstart, long palnum, char *dapal);
|
||||||
|
palstart is the offset of the first palette to set
|
||||||
|
palnum is the number of the palette entries to set
|
||||||
|
dapal is a pointer to the palette buffer.The palette
|
||||||
|
buffer must be in this format:
|
||||||
|
char Blue, Green, Red, reserved;
|
||||||
|
I think this format stinks, but since VESA 2.0 uses
|
||||||
|
it, the code will run fastest if the buffer is not
|
||||||
|
copied.You can make your own cover up function if
|
||||||
|
you don 't like this format.
|
||||||
|
|
||||||
|
This example sets up a wasteful gray scale palette:
|
||||||
|
|
||||||
|
char mypalette[1024];
|
||||||
|
|
||||||
|
for (i = 0; i < 256; i++)
|
||||||
|
{
|
||||||
|
mypalette[i * 4 + 0] = (i >> 2); // Blue
|
||||||
|
mypalette[i * 4 + 1] = (i >> 2); // Green
|
||||||
|
mypalette[i * 4 + 2] = (i >> 2); // Red
|
||||||
|
mypalette[i * 4 + 3] = 0; // reserved
|
||||||
|
}
|
||||||
|
VBE_setPalette(0, 256, mypalette);
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define ORED 0
|
||||||
|
#define OGREEN 1
|
||||||
|
#define OBLUE 2
|
||||||
|
|
||||||
|
#define NBLUE 0
|
||||||
|
#define NGREEN 1
|
||||||
|
#define NRED 2
|
||||||
|
#define NRESERVED 3
|
||||||
|
|
||||||
|
VOID SetPaletteToVESA(unsigned char *pal)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
char pal_buff[1024];
|
||||||
|
short i;
|
||||||
|
|
||||||
|
for (i = 0; i < 256; i++)
|
||||||
|
{
|
||||||
|
pal_buff[i * 4 + NRED] = pal[i * 3 + ORED];
|
||||||
|
pal_buff[i * 4 + NGREEN] = pal[i * 3 + OGREEN];
|
||||||
|
pal_buff[i * 4 + NBLUE] = pal[i * 3 + OBLUE];
|
||||||
|
pal_buff[i * 4 + NRESERVED] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
VBE_setPalette(0, 256, pal_buff);
|
||||||
|
*/
|
||||||
|
setbrightness(0,pal,4|2);
|
||||||
|
// fprintf(stderr,"SetPaletteToVESA() called\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID set_pal(unsigned char *pal)
|
||||||
|
{
|
||||||
|
SetPaletteToVESA(pal);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID GetPaletteFromVESA(unsigned char *pal)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
char pal_buff[1024];
|
||||||
|
short i;
|
||||||
|
|
||||||
|
VBE_getPalette(0, 256, pal_buff);
|
||||||
|
|
||||||
|
for (i = 0; i < 256; i++)
|
||||||
|
{
|
||||||
|
pal[i * 3 + ORED] = pal_buff[i * 4 + NRED];
|
||||||
|
pal[i * 3 + OGREEN] = pal_buff[i * 4 + NGREEN];
|
||||||
|
pal[i * 3 + OBLUE] = pal_buff[i * 4 + NBLUE];
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
int i;
|
||||||
|
for (i=0; i<256; i++)
|
||||||
|
{
|
||||||
|
pal[i*3+0] = curpalette[i].r>>2;
|
||||||
|
pal[i*3+1] = curpalette[i].g>>2;
|
||||||
|
pal[i*3+2] = curpalette[i].b>>2;
|
||||||
|
}
|
||||||
|
// fprintf(stderr,"GetPaletteFromVESA() called\n");
|
||||||
|
}
|
6
polymer/eduke32/source/sw/src/colormap.h
Normal file
6
polymer/eduke32/source/sw/src/colormap.h
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
void MapColors(short num,COLOR_MAP cm,short create);
|
||||||
|
void InitPalette(void);
|
||||||
|
void SetPaletteToVESA(unsigned char *pal);
|
||||||
|
void set_pal(unsigned char *pal);
|
||||||
|
void GetPaletteFromVESA(unsigned char *pal);
|
||||||
|
void InitPalette(void);
|
137
polymer/eduke32/source/sw/src/common_game.h
Normal file
137
polymer/eduke32/source/sw/src/common_game.h
Normal file
|
@ -0,0 +1,137 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
//****************************************************************************
|
||||||
|
//
|
||||||
|
// common_game.h
|
||||||
|
//
|
||||||
|
// common defines for the setup program
|
||||||
|
//
|
||||||
|
//****************************************************************************
|
||||||
|
|
||||||
|
#ifndef common_public_
|
||||||
|
#define common_public_
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//****************************************************************************
|
||||||
|
//
|
||||||
|
// DEFINES
|
||||||
|
//
|
||||||
|
//****************************************************************************
|
||||||
|
|
||||||
|
//
|
||||||
|
// Color Defines
|
||||||
|
//
|
||||||
|
|
||||||
|
#define MENUBACK_FOREGROUND COLOR_BLACK
|
||||||
|
#define MENUBACK_BACKGROUND COLOR_DARKGRAY
|
||||||
|
|
||||||
|
#define MENUBACKBORDER_FOREGROUND COLOR_BLACK
|
||||||
|
#define MENUBACKBORDER_BACKGROUND COLOR_GRAY
|
||||||
|
|
||||||
|
#define MENU_ACTIVE_FOREGROUND COLOR_WHITE
|
||||||
|
#define MENU_INACTIVE_FOREGROUND COLOR_GRAY
|
||||||
|
#define MENU_DISPLAY_FOREGROUND COLOR_LIGHTGREEN
|
||||||
|
|
||||||
|
#define MENU_SECTIONHEADER_FOREGROUND COLOR_YELLOW
|
||||||
|
|
||||||
|
//
|
||||||
|
// Setup program defines
|
||||||
|
//
|
||||||
|
|
||||||
|
#define SETUPFILENAME "sw.cfg"
|
||||||
|
|
||||||
|
#define SETUPPROGRAMNAME ("Shadow Warrior Setup")
|
||||||
|
#define SETUPPROGRAMVERSION ("1.2")
|
||||||
|
|
||||||
|
#define GAMENAME "Shadow Warrior"
|
||||||
|
#define GAMELAUNCHER ("SW.EXE")
|
||||||
|
#define GAMETOTYPE ("SW")
|
||||||
|
|
||||||
|
#define MENUFOOTER "Esc Exits Move ÄÙ Selects\0"
|
||||||
|
|
||||||
|
#define COMMITLAUNCHER ("COMMIT.EXE")
|
||||||
|
#define COMMITFILENAME ("COMMIT.DAT")
|
||||||
|
|
||||||
|
#define MAXVOICES 32
|
||||||
|
#define SONGNAME ("Shadow Warrior Theme Song")
|
||||||
|
//#define SOUNDSETUPLAUNCHER ("SNDSETUP.EXE")
|
||||||
|
|
||||||
|
// Default Socket Number
|
||||||
|
|
||||||
|
#define DEFAULTSOCKETNUMBER 0x8849
|
||||||
|
|
||||||
|
// Default RTS file
|
||||||
|
|
||||||
|
#define DEFAULTRTSFILE "sw.rts"
|
||||||
|
|
||||||
|
// Default RTS path
|
||||||
|
|
||||||
|
#define DEFAULTRTSPATH ".\\"
|
||||||
|
|
||||||
|
// Default UserLevel path
|
||||||
|
|
||||||
|
#define DEFAULTLEVELPATH ".\\"
|
||||||
|
|
||||||
|
// Default External Control file
|
||||||
|
|
||||||
|
#define DEFAULTCONTROLFILE "EXTERNAL.EXE"
|
||||||
|
|
||||||
|
// Default Help file
|
||||||
|
|
||||||
|
#define DEFAULTHELPFILE "SWHELP.EXE"
|
||||||
|
|
||||||
|
// RTS extension
|
||||||
|
|
||||||
|
#define RTSEXTENSION "RTS"
|
||||||
|
|
||||||
|
// MAP extension
|
||||||
|
|
||||||
|
#define MAPEXTENSION "MAP"
|
||||||
|
|
||||||
|
// Default Player name
|
||||||
|
|
||||||
|
#define DEFAULTPLAYERNAME "KATO"
|
||||||
|
|
||||||
|
// Default Macros
|
||||||
|
|
||||||
|
#define MACRO1 "Burn baby burn..."
|
||||||
|
#define MACRO2 "You make another stupid move."
|
||||||
|
#define MACRO3 "Blocking with your head again?"
|
||||||
|
#define MACRO4 "You not fight well with hands!"
|
||||||
|
#define MACRO5 "You so stupid!"
|
||||||
|
#define MACRO6 "Quit jerking off. Come fight me!"
|
||||||
|
#define MACRO7 "What the matter you scaredy cat?"
|
||||||
|
#define MACRO8 "Did I break your concentration?"
|
||||||
|
#define MACRO9 "Hope you were paying attention."
|
||||||
|
#define MACRO10 "ITTAIIIUUU!!!"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
#endif
|
731
polymer/eduke32/source/sw/src/config.c
Normal file
731
polymer/eduke32/source/sw/src/config.c
Normal file
|
@ -0,0 +1,731 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
#include "build.h"
|
||||||
|
#include "baselayer.h"
|
||||||
|
#include "osd.h"
|
||||||
|
|
||||||
|
#include "settings.h"
|
||||||
|
#include "mytypes.h"
|
||||||
|
#include "develop.h"
|
||||||
|
#include "scriplib.h"
|
||||||
|
#include "file_lib.h"
|
||||||
|
#include "gamedefs.h"
|
||||||
|
#include "keyboard.h"
|
||||||
|
#include "util_lib.h"
|
||||||
|
#include "function.h"
|
||||||
|
#include "control.h"
|
||||||
|
#include "fx_man.h"
|
||||||
|
#include "sounds.h"
|
||||||
|
#include "config.h"
|
||||||
|
#include "common_game.h"
|
||||||
|
|
||||||
|
// we load this in to get default button and key assignments
|
||||||
|
// as well as setting up function mappings
|
||||||
|
|
||||||
|
#include "_functio.h"
|
||||||
|
#include "_config.h"
|
||||||
|
|
||||||
|
extern void ReadGameSetup(int32 scripthandle);
|
||||||
|
extern void WriteGameSetup(int32 scripthandle);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Comm variables
|
||||||
|
//
|
||||||
|
|
||||||
|
char CommPlayerName[32];
|
||||||
|
int32 NumberPlayers,CommPort,PortSpeed,IrqNumber,UartAddress;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Sound variables
|
||||||
|
//
|
||||||
|
int32 FXDevice = 0;
|
||||||
|
int32 MusicDevice = 0;
|
||||||
|
int32 NumVoices = 32;
|
||||||
|
int32 NumChannels = 2;
|
||||||
|
int32 NumBits = 16;
|
||||||
|
int32 MixRate = 44100;
|
||||||
|
|
||||||
|
int32 UseMouse = 1, UseJoystick = 0;
|
||||||
|
|
||||||
|
byte KeyboardKeys[NUMGAMEFUNCTIONS][2];
|
||||||
|
int32 MouseButtons[MAXMOUSEBUTTONS];
|
||||||
|
int32 MouseButtonsClicked[MAXMOUSEBUTTONS];
|
||||||
|
int32 MouseDigitalAxes[MAXMOUSEAXES][2];
|
||||||
|
int32 MouseAnalogAxes[MAXMOUSEAXES];
|
||||||
|
int32 MouseAnalogScale[MAXMOUSEAXES];
|
||||||
|
int32 JoystickButtons[MAXJOYBUTTONS];
|
||||||
|
int32 JoystickButtonsClicked[MAXJOYBUTTONS];
|
||||||
|
int32 JoystickDigitalAxes[MAXJOYAXES][2];
|
||||||
|
int32 JoystickAnalogAxes[MAXJOYAXES];
|
||||||
|
int32 JoystickAnalogScale[MAXJOYAXES];
|
||||||
|
int32 JoystickAnalogDead[MAXJOYAXES];
|
||||||
|
int32 JoystickAnalogSaturate[MAXJOYAXES];
|
||||||
|
|
||||||
|
//
|
||||||
|
// Screen variables
|
||||||
|
//
|
||||||
|
|
||||||
|
int32 ScreenMode = 1;
|
||||||
|
int32 ScreenWidth = 640;
|
||||||
|
int32 ScreenHeight = 480;
|
||||||
|
int32 ScreenBPP = 8;
|
||||||
|
int32 ForceSetup = 1;
|
||||||
|
|
||||||
|
extern char WangBangMacro[10][64];
|
||||||
|
char RTSName[MAXRTSNAMELENGTH];
|
||||||
|
//static char setupfilename[64]={SETUPFILENAME};
|
||||||
|
char setupfilename[64]= {SETUPFILENAME};
|
||||||
|
static int32 scripthandle = -1;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
===================
|
||||||
|
=
|
||||||
|
= CONFIG_FunctionNameToNum
|
||||||
|
=
|
||||||
|
===================
|
||||||
|
*/
|
||||||
|
|
||||||
|
int32 CONFIG_FunctionNameToNum(const char *func)
|
||||||
|
{
|
||||||
|
int32 i;
|
||||||
|
|
||||||
|
if (!func) return -1;
|
||||||
|
for (i=0; i<NUMGAMEFUNCTIONS; i++)
|
||||||
|
{
|
||||||
|
if (!Bstrcasecmp(func,gamefunctions[i]))
|
||||||
|
{
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
===================
|
||||||
|
=
|
||||||
|
= CONFIG_FunctionNumToName
|
||||||
|
=
|
||||||
|
===================
|
||||||
|
*/
|
||||||
|
|
||||||
|
const char *CONFIG_FunctionNumToName(int32 func)
|
||||||
|
{
|
||||||
|
if ((unsigned)func >= (unsigned)NUMGAMEFUNCTIONS)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return gamefunctions[func];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
===================
|
||||||
|
=
|
||||||
|
= CONFIG_AnalogNameToNum
|
||||||
|
=
|
||||||
|
===================
|
||||||
|
*/
|
||||||
|
int32 CONFIG_AnalogNameToNum(const char *func)
|
||||||
|
{
|
||||||
|
if (!Bstrcasecmp(func,"analog_turning"))
|
||||||
|
{
|
||||||
|
return analog_turning;
|
||||||
|
}
|
||||||
|
if (!Bstrcasecmp(func,"analog_strafing"))
|
||||||
|
{
|
||||||
|
return analog_strafing;
|
||||||
|
}
|
||||||
|
if (!Bstrcasecmp(func,"analog_moving"))
|
||||||
|
{
|
||||||
|
return analog_moving;
|
||||||
|
}
|
||||||
|
if (!Bstrcasecmp(func,"analog_lookingupanddown"))
|
||||||
|
{
|
||||||
|
return analog_lookingupanddown;
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *CONFIG_AnalogNumToName(int32 func)
|
||||||
|
{
|
||||||
|
switch (func)
|
||||||
|
{
|
||||||
|
case analog_turning:
|
||||||
|
return "analog_turning";
|
||||||
|
case analog_strafing:
|
||||||
|
return "analog_strafing";
|
||||||
|
case analog_moving:
|
||||||
|
return "analog_moving";
|
||||||
|
case analog_lookingupanddown:
|
||||||
|
return "analog_lookingupanddown";
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
===================
|
||||||
|
=
|
||||||
|
= CONFIG_SetDefaults
|
||||||
|
=
|
||||||
|
===================
|
||||||
|
*/
|
||||||
|
|
||||||
|
void CONFIG_SetDefaults(void)
|
||||||
|
{
|
||||||
|
// JBF 20031211
|
||||||
|
int32 i,f;
|
||||||
|
byte k1,k2;
|
||||||
|
|
||||||
|
ScreenMode = 1;
|
||||||
|
ScreenWidth = 640;
|
||||||
|
ScreenHeight = 480;
|
||||||
|
ScreenBPP = 8;
|
||||||
|
FXDevice = 0;
|
||||||
|
MusicDevice = 0;
|
||||||
|
NumVoices = 32;
|
||||||
|
NumChannels = 2;
|
||||||
|
NumBits = 16;
|
||||||
|
MixRate = 44100;
|
||||||
|
memcpy(&gs, &gs_defaults, sizeof(gs));
|
||||||
|
|
||||||
|
Bstrcpy(RTSName, DEFAULTRTSFILE);
|
||||||
|
Bstrcpy(CommPlayerName, DEFAULTPLAYERNAME);
|
||||||
|
|
||||||
|
Bstrcpy(WangBangMacro[0], MACRO1);
|
||||||
|
Bstrcpy(WangBangMacro[1], MACRO2);
|
||||||
|
Bstrcpy(WangBangMacro[2], MACRO3);
|
||||||
|
Bstrcpy(WangBangMacro[3], MACRO4);
|
||||||
|
Bstrcpy(WangBangMacro[4], MACRO5);
|
||||||
|
Bstrcpy(WangBangMacro[5], MACRO6);
|
||||||
|
Bstrcpy(WangBangMacro[6], MACRO7);
|
||||||
|
Bstrcpy(WangBangMacro[7], MACRO8);
|
||||||
|
Bstrcpy(WangBangMacro[8], MACRO9);
|
||||||
|
Bstrcpy(WangBangMacro[9], MACRO10);
|
||||||
|
|
||||||
|
SetDefaultKeyDefinitions(0);
|
||||||
|
SetMouseDefaults(0);
|
||||||
|
|
||||||
|
memset(MouseDigitalAxes, -1, sizeof(MouseDigitalAxes));
|
||||||
|
for (i=0; i<MAXMOUSEAXES; i++)
|
||||||
|
{
|
||||||
|
MouseAnalogScale[i] = 65536;
|
||||||
|
|
||||||
|
MouseDigitalAxes[i][0] = CONFIG_FunctionNameToNum(mousedigitaldefaults[i*2]);
|
||||||
|
MouseDigitalAxes[i][1] = CONFIG_FunctionNameToNum(mousedigitaldefaults[i*2+1]);
|
||||||
|
|
||||||
|
MouseAnalogAxes[i] = CONFIG_AnalogNameToNum(mouseanalogdefaults[i]);
|
||||||
|
}
|
||||||
|
CONTROL_SetMouseSensitivity(gs.MouseSpeed);
|
||||||
|
|
||||||
|
memset(JoystickButtons, -1, sizeof(JoystickButtons));
|
||||||
|
memset(JoystickButtonsClicked, -1, sizeof(JoystickButtonsClicked));
|
||||||
|
for (i=0; i < (int32)(sizeof(joystickdefaults)/sizeof(char *)); i++)
|
||||||
|
{
|
||||||
|
JoystickButtons[i] = CONFIG_FunctionNameToNum(joystickdefaults[i]);
|
||||||
|
JoystickButtonsClicked[i] = CONFIG_FunctionNameToNum(joystickclickeddefaults[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
memset(JoystickDigitalAxes, -1, sizeof(JoystickDigitalAxes));
|
||||||
|
for (i=0; i < (int32)(sizeof(joystickanalogdefaults)/sizeof(char *)); i++)
|
||||||
|
{
|
||||||
|
JoystickAnalogScale[i] = 65536;
|
||||||
|
JoystickAnalogDead[i] = 1024;
|
||||||
|
JoystickAnalogSaturate[i] = 32767-1024;
|
||||||
|
|
||||||
|
JoystickDigitalAxes[i][0] = CONFIG_FunctionNameToNum(joystickdigitaldefaults[i*2]);
|
||||||
|
JoystickDigitalAxes[i][1] = CONFIG_FunctionNameToNum(joystickdigitaldefaults[i*2+1]);
|
||||||
|
|
||||||
|
JoystickAnalogAxes[i] = CONFIG_AnalogNameToNum(joystickanalogdefaults[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SetDefaultKeyDefinitions(int style)
|
||||||
|
{
|
||||||
|
int numkeydefaults;
|
||||||
|
char **keydefaultset;
|
||||||
|
int i, f, k1, k2;
|
||||||
|
|
||||||
|
if (style)
|
||||||
|
{
|
||||||
|
numkeydefaults = sizeof(keydefaults_modern) / sizeof(char *) / 3;
|
||||||
|
keydefaultset = keydefaults_modern;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
numkeydefaults = sizeof(keydefaults) / sizeof(char *) / 3;
|
||||||
|
keydefaultset = keydefaults;
|
||||||
|
}
|
||||||
|
|
||||||
|
memset(KeyboardKeys, 0xff, sizeof(KeyboardKeys));
|
||||||
|
for (i=0; i < numkeydefaults; i++)
|
||||||
|
{
|
||||||
|
f = CONFIG_FunctionNameToNum(keydefaultset[3*i+0]);
|
||||||
|
if (f == -1) continue;
|
||||||
|
k1 = KB_StringToScanCode(keydefaultset[3*i+1]);
|
||||||
|
k2 = KB_StringToScanCode(keydefaultset[3*i+2]);
|
||||||
|
|
||||||
|
CONTROL_MapKey(i, k1, k2);
|
||||||
|
|
||||||
|
KeyboardKeys[f][0] = k1;
|
||||||
|
KeyboardKeys[f][1] = k2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetMouseDefaults(int style)
|
||||||
|
{
|
||||||
|
int nummousedefaults;
|
||||||
|
char **mousedefaultset, **mouseclickeddefaultset;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if (style)
|
||||||
|
{
|
||||||
|
nummousedefaults = sizeof(mousedefaults_modern) / sizeof(char *);
|
||||||
|
mousedefaultset = mousedefaults_modern;
|
||||||
|
mouseclickeddefaultset = mouseclickeddefaults_modern;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
nummousedefaults = sizeof(mousedefaults) / sizeof(char *);
|
||||||
|
mousedefaultset = mousedefaults;
|
||||||
|
mouseclickeddefaultset = mouseclickeddefaults;
|
||||||
|
}
|
||||||
|
|
||||||
|
memset(MouseButtons, -1, sizeof(MouseButtons));
|
||||||
|
memset(MouseButtonsClicked, -1, sizeof(MouseButtonsClicked));
|
||||||
|
for (i=0; i < nummousedefaults; i++)
|
||||||
|
{
|
||||||
|
MouseButtons[i] = CONFIG_FunctionNameToNum(mousedefaultset[i]);
|
||||||
|
CONTROL_MapButton(MouseButtons[i], i, FALSE, controldevice_mouse);
|
||||||
|
|
||||||
|
if (i<4) continue;
|
||||||
|
|
||||||
|
MouseButtonsClicked[i] = CONFIG_FunctionNameToNum(mouseclickeddefaultset[i]);
|
||||||
|
CONTROL_MapButton(MouseButtonsClicked[i], i, TRUE, controldevice_mouse);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
===================
|
||||||
|
=
|
||||||
|
= CONFIG_ReadKeys
|
||||||
|
=
|
||||||
|
===================
|
||||||
|
*/
|
||||||
|
|
||||||
|
void CONFIG_ReadKeys(int32 scripthandle)
|
||||||
|
{
|
||||||
|
int32 i;
|
||||||
|
int32 numkeyentries;
|
||||||
|
int32 function;
|
||||||
|
char keyname1[80];
|
||||||
|
char keyname2[80];
|
||||||
|
kb_scancode key1,key2;
|
||||||
|
|
||||||
|
if (scripthandle < 0) return;
|
||||||
|
|
||||||
|
numkeyentries = SCRIPT_NumberEntries(scripthandle,"KeyDefinitions");
|
||||||
|
|
||||||
|
for (i=0; i<numkeyentries; i++)
|
||||||
|
{
|
||||||
|
function = CONFIG_FunctionNameToNum(SCRIPT_Entry(scripthandle,"KeyDefinitions", i));
|
||||||
|
if (function != -1)
|
||||||
|
{
|
||||||
|
memset(keyname1,0,sizeof(keyname1));
|
||||||
|
memset(keyname2,0,sizeof(keyname2));
|
||||||
|
SCRIPT_GetDoubleString
|
||||||
|
(
|
||||||
|
scripthandle,
|
||||||
|
"KeyDefinitions",
|
||||||
|
SCRIPT_Entry(scripthandle, "KeyDefinitions", i),
|
||||||
|
keyname1,
|
||||||
|
keyname2
|
||||||
|
);
|
||||||
|
key1 = 0xff;
|
||||||
|
key2 = 0xff;
|
||||||
|
if (keyname1[0])
|
||||||
|
{
|
||||||
|
key1 = (byte) KB_StringToScanCode(keyname1);
|
||||||
|
}
|
||||||
|
if (keyname2[0])
|
||||||
|
{
|
||||||
|
key2 = (byte) KB_StringToScanCode(keyname2);
|
||||||
|
}
|
||||||
|
KeyboardKeys[function][0] = key1;
|
||||||
|
KeyboardKeys[function][1] = key2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i=0; i<NUMGAMEFUNCTIONS; i++)
|
||||||
|
{
|
||||||
|
if (i == gamefunc_Show_Console)
|
||||||
|
OSD_CaptureKey(KeyboardKeys[i][0]);
|
||||||
|
else
|
||||||
|
CONTROL_MapKey(i, KeyboardKeys[i][0], KeyboardKeys[i][1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
===================
|
||||||
|
=
|
||||||
|
= CONFIG_SetupMouse
|
||||||
|
=
|
||||||
|
===================
|
||||||
|
*/
|
||||||
|
|
||||||
|
void CONFIG_SetupMouse(void)
|
||||||
|
{
|
||||||
|
int32 i;
|
||||||
|
char str[80],*p;
|
||||||
|
char temp[80];
|
||||||
|
int32 function, scale;
|
||||||
|
|
||||||
|
if (scripthandle < 0) return;
|
||||||
|
|
||||||
|
for (i=0; i<MAXMOUSEBUTTONS; i++)
|
||||||
|
{
|
||||||
|
Bsprintf(str,"MouseButton%d",i); temp[0] = 0;
|
||||||
|
if (!SCRIPT_GetString(scripthandle,"Controls", str,temp))
|
||||||
|
MouseButtons[i] = CONFIG_FunctionNameToNum(temp);
|
||||||
|
|
||||||
|
Bsprintf(str,"MouseButtonClicked%d",i); temp[0] = 0;
|
||||||
|
if (!SCRIPT_GetString(scripthandle,"Controls", str,temp))
|
||||||
|
MouseButtonsClicked[i] = CONFIG_FunctionNameToNum(temp);
|
||||||
|
}
|
||||||
|
|
||||||
|
// map over the axes
|
||||||
|
for (i=0; i<MAXMOUSEAXES; i++)
|
||||||
|
{
|
||||||
|
Bsprintf(str,"MouseAnalogAxes%d",i); temp[0] = 0;
|
||||||
|
if (!SCRIPT_GetString(scripthandle, "Controls", str,temp))
|
||||||
|
MouseAnalogAxes[i] = CONFIG_AnalogNameToNum(temp);
|
||||||
|
|
||||||
|
Bsprintf(str,"MouseDigitalAxes%d_0",i); temp[0] = 0;
|
||||||
|
if (!SCRIPT_GetString(scripthandle, "Controls", str,temp))
|
||||||
|
MouseDigitalAxes[i][0] = CONFIG_FunctionNameToNum(temp);
|
||||||
|
|
||||||
|
Bsprintf(str,"MouseDigitalAxes%d_1",i); temp[0] = 0;
|
||||||
|
if (!SCRIPT_GetString(scripthandle, "Controls", str,temp))
|
||||||
|
MouseDigitalAxes[i][1] = CONFIG_FunctionNameToNum(temp);
|
||||||
|
|
||||||
|
Bsprintf(str,"MouseAnalogScale%d",i);
|
||||||
|
scale = MouseAnalogScale[i];
|
||||||
|
SCRIPT_GetNumber(scripthandle, "Controls", str,&scale);
|
||||||
|
MouseAnalogScale[i] = scale;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 0 to 65536
|
||||||
|
SCRIPT_GetNumber(scripthandle, "Controls","MouseSensitivity",&function);
|
||||||
|
gs.MouseSpeed = function;
|
||||||
|
|
||||||
|
for (i=0; i<MAXMOUSEBUTTONS; i++)
|
||||||
|
{
|
||||||
|
CONTROL_MapButton(MouseButtons[i], i, FALSE, controldevice_mouse);
|
||||||
|
CONTROL_MapButton(MouseButtonsClicked[i], i, TRUE, controldevice_mouse);
|
||||||
|
}
|
||||||
|
for (i=0; i<MAXMOUSEAXES; i++)
|
||||||
|
{
|
||||||
|
CONTROL_MapAnalogAxis(i, MouseAnalogAxes[i], controldevice_mouse);
|
||||||
|
CONTROL_MapDigitalAxis(i, MouseDigitalAxes[i][0], 0,controldevice_mouse);
|
||||||
|
CONTROL_MapDigitalAxis(i, MouseDigitalAxes[i][1], 1,controldevice_mouse);
|
||||||
|
CONTROL_SetAnalogAxisScale(i, MouseAnalogScale[i], controldevice_mouse);
|
||||||
|
}
|
||||||
|
|
||||||
|
CONTROL_SetMouseSensitivity(gs.MouseSpeed);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
===================
|
||||||
|
=
|
||||||
|
= CONFIG_SetupJoystick
|
||||||
|
=
|
||||||
|
===================
|
||||||
|
*/
|
||||||
|
|
||||||
|
void CONFIG_SetupJoystick(void)
|
||||||
|
{
|
||||||
|
int32 i;
|
||||||
|
char str[80],*p;
|
||||||
|
char temp[80];
|
||||||
|
int32 function, scale;
|
||||||
|
|
||||||
|
if (scripthandle < 0) return;
|
||||||
|
|
||||||
|
for (i=0; i<MAXJOYBUTTONS; i++)
|
||||||
|
{
|
||||||
|
Bsprintf(str,"JoystickButton%d",i); temp[0] = 0;
|
||||||
|
if (!SCRIPT_GetString(scripthandle,"Controls", str,temp))
|
||||||
|
JoystickButtons[i] = CONFIG_FunctionNameToNum(temp);
|
||||||
|
|
||||||
|
Bsprintf(str,"JoystickButtonClicked%d",i); temp[0] = 0;
|
||||||
|
if (!SCRIPT_GetString(scripthandle,"Controls", str,temp))
|
||||||
|
JoystickButtonsClicked[i] = CONFIG_FunctionNameToNum(temp);
|
||||||
|
}
|
||||||
|
|
||||||
|
// map over the axes
|
||||||
|
for (i=0; i<MAXJOYAXES; i++)
|
||||||
|
{
|
||||||
|
Bsprintf(str,"JoystickAnalogAxes%d",i); temp[0] = 0;
|
||||||
|
if (!SCRIPT_GetString(scripthandle, "Controls", str,temp))
|
||||||
|
JoystickAnalogAxes[i] = CONFIG_AnalogNameToNum(temp);
|
||||||
|
|
||||||
|
Bsprintf(str,"JoystickDigitalAxes%d_0",i); temp[0] = 0;
|
||||||
|
if (!SCRIPT_GetString(scripthandle, "Controls", str,temp))
|
||||||
|
JoystickDigitalAxes[i][0] = CONFIG_FunctionNameToNum(temp);
|
||||||
|
|
||||||
|
Bsprintf(str,"JoystickDigitalAxes%d_1",i); temp[0] = 0;
|
||||||
|
if (!SCRIPT_GetString(scripthandle, "Controls", str,temp))
|
||||||
|
JoystickDigitalAxes[i][1] = CONFIG_FunctionNameToNum(temp);
|
||||||
|
|
||||||
|
Bsprintf(str,"JoystickAnalogScale%d",i);
|
||||||
|
scale = JoystickAnalogScale[i];
|
||||||
|
SCRIPT_GetNumber(scripthandle, "Controls", str,&scale);
|
||||||
|
JoystickAnalogScale[i] = scale;
|
||||||
|
|
||||||
|
Bsprintf(str,"JoystickAnalogDead%d",i);
|
||||||
|
scale = JoystickAnalogDead[i];
|
||||||
|
SCRIPT_GetNumber(scripthandle, "Controls", str,&scale);
|
||||||
|
JoystickAnalogDead[i] = scale;
|
||||||
|
|
||||||
|
Bsprintf(str,"JoystickAnalogSaturate%d",i);
|
||||||
|
scale = JoystickAnalogSaturate[i];
|
||||||
|
SCRIPT_GetNumber(scripthandle, "Controls", str,&scale);
|
||||||
|
JoystickAnalogSaturate[i] = scale;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i=0; i<MAXJOYBUTTONS; i++)
|
||||||
|
{
|
||||||
|
CONTROL_MapButton(JoystickButtons[i], i, FALSE, controldevice_joystick);
|
||||||
|
CONTROL_MapButton(JoystickButtonsClicked[i], i, TRUE, controldevice_joystick);
|
||||||
|
}
|
||||||
|
for (i=0; i<MAXJOYAXES; i++)
|
||||||
|
{
|
||||||
|
CONTROL_MapAnalogAxis(i, JoystickAnalogAxes[i], controldevice_joystick);
|
||||||
|
CONTROL_MapDigitalAxis(i, JoystickDigitalAxes[i][0], 0, controldevice_joystick);
|
||||||
|
CONTROL_MapDigitalAxis(i, JoystickDigitalAxes[i][1], 1, controldevice_joystick);
|
||||||
|
CONTROL_SetAnalogAxisScale(i, JoystickAnalogScale[i], controldevice_joystick);
|
||||||
|
CONTROL_SetJoyAxisDead(i, JoystickAnalogDead[i]);
|
||||||
|
CONTROL_SetJoyAxisSaturate(i, JoystickAnalogSaturate[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
===================
|
||||||
|
=
|
||||||
|
= CONFIG_ReadSetup
|
||||||
|
=
|
||||||
|
===================
|
||||||
|
*/
|
||||||
|
|
||||||
|
int32 CONFIG_ReadSetup(void)
|
||||||
|
{
|
||||||
|
int32 dummy;
|
||||||
|
char ret;
|
||||||
|
extern char ds[];
|
||||||
|
extern char PlayerNameArg[32];
|
||||||
|
|
||||||
|
char oggtrackname[MAXOGGTRACKLENGTH] = {0};
|
||||||
|
|
||||||
|
CONTROL_ClearAssignments();
|
||||||
|
CONFIG_SetDefaults();
|
||||||
|
|
||||||
|
if (SafeFileExists(setupfilename))
|
||||||
|
scripthandle = SCRIPT_Load(setupfilename);
|
||||||
|
|
||||||
|
if (scripthandle < 0) return -1;
|
||||||
|
|
||||||
|
SCRIPT_GetNumber(scripthandle, "Screen Setup", "ScreenMode",&ScreenMode);
|
||||||
|
SCRIPT_GetNumber(scripthandle, "Screen Setup", "ScreenWidth",&ScreenWidth);
|
||||||
|
SCRIPT_GetNumber(scripthandle, "Screen Setup", "ScreenHeight",&ScreenHeight);
|
||||||
|
SCRIPT_GetNumber(scripthandle, "Screen Setup", "ScreenBPP", &ScreenBPP);
|
||||||
|
if (ScreenBPP < 8) ScreenBPP = 8;
|
||||||
|
|
||||||
|
#ifdef RENDERTYPEWIN
|
||||||
|
SCRIPT_GetNumber(scripthandle, "Screen Setup", "MaxRefreshFreq", (int32 *)&maxrefreshfreq);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
SCRIPT_GetNumber(scripthandle, "Screen Setup", "GLTextureMode", &gltexfiltermode);
|
||||||
|
SCRIPT_GetNumber(scripthandle, "Screen Setup", "GLAnisotropy", &glanisotropy);
|
||||||
|
SCRIPT_GetNumber(scripthandle, "Screen Setup", "GLUseTextureCompr", &glusetexcompr);
|
||||||
|
|
||||||
|
SCRIPT_GetNumber(scripthandle, "Sound Setup", "FXDevice",&FXDevice);
|
||||||
|
SCRIPT_GetNumber(scripthandle, "Sound Setup", "MusicDevice",&MusicDevice);
|
||||||
|
SCRIPT_GetNumber(scripthandle, "Sound Setup", "FXVolume",&dummy);
|
||||||
|
gs.SoundVolume = dummy;
|
||||||
|
SCRIPT_GetNumber(scripthandle, "Sound Setup", "MusicVolume",&dummy);
|
||||||
|
gs.MusicVolume = dummy;
|
||||||
|
|
||||||
|
SCRIPT_GetNumber(scripthandle, "Sound Setup", "NumVoices",&NumVoices);
|
||||||
|
SCRIPT_GetNumber(scripthandle, "Sound Setup", "NumChannels",&NumChannels);
|
||||||
|
SCRIPT_GetNumber(scripthandle, "Sound Setup", "NumBits",&NumBits);
|
||||||
|
SCRIPT_GetNumber(scripthandle, "Sound Setup", "MixRate",&MixRate);
|
||||||
|
SCRIPT_GetNumber(scripthandle, "Sound Setup", "ReverseStereo",&dummy);
|
||||||
|
gs.FlipStereo = dummy;
|
||||||
|
if (gs.FlipStereo) gs.FlipStereo = 1;
|
||||||
|
|
||||||
|
SCRIPT_GetString(scripthandle, "Sound Setup", "OggTrackName", oggtrackname);
|
||||||
|
if (oggtrackname[0] != '\0')
|
||||||
|
memcpy(gs.OggTrackName, oggtrackname, MAXOGGTRACKLENGTH);
|
||||||
|
|
||||||
|
SCRIPT_GetNumber(scripthandle, "Setup", "ForceSetup",&ForceSetup);
|
||||||
|
SCRIPT_GetNumber(scripthandle, "Controls","UseMouse",&UseMouse);
|
||||||
|
SCRIPT_GetNumber(scripthandle, "Controls","UseJoystick",&UseJoystick);
|
||||||
|
SCRIPT_GetString(scripthandle, "Comm Setup", "RTSName",RTSName);
|
||||||
|
|
||||||
|
SCRIPT_GetString(scripthandle, "Comm Setup","PlayerName",CommPlayerName);
|
||||||
|
|
||||||
|
ReadGameSetup(scripthandle);
|
||||||
|
|
||||||
|
CONFIG_ReadKeys(scripthandle);
|
||||||
|
|
||||||
|
//CONFIG_SetupMouse(scripthandle);
|
||||||
|
//CONFIG_SetupJoystick(scripthandle);
|
||||||
|
|
||||||
|
if (PlayerNameArg[0] != '\0')
|
||||||
|
{
|
||||||
|
strcpy(CommPlayerName, PlayerNameArg);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
===================
|
||||||
|
=
|
||||||
|
= CONFIG_WriteSetup
|
||||||
|
=
|
||||||
|
===================
|
||||||
|
*/
|
||||||
|
|
||||||
|
void CONFIG_WriteSetup(void)
|
||||||
|
{
|
||||||
|
int32 dummy;
|
||||||
|
char buf[80];
|
||||||
|
|
||||||
|
if (scripthandle < 0)
|
||||||
|
scripthandle = SCRIPT_Init(setupfilename);
|
||||||
|
|
||||||
|
SCRIPT_PutNumber(scripthandle, "Screen Setup", "ScreenWidth", ScreenWidth,FALSE,FALSE);
|
||||||
|
SCRIPT_PutNumber(scripthandle, "Screen Setup", "ScreenHeight",ScreenHeight,FALSE,FALSE);
|
||||||
|
SCRIPT_PutNumber(scripthandle, "Screen Setup", "ScreenMode",ScreenMode,FALSE,FALSE);
|
||||||
|
SCRIPT_PutNumber(scripthandle, "Screen Setup", "ScreenBPP",ScreenBPP,FALSE,FALSE);
|
||||||
|
#ifdef RENDERTYPEWIN
|
||||||
|
SCRIPT_PutNumber(scripthandle, "Screen Setup", "MaxRefreshFreq",maxrefreshfreq,FALSE,FALSE);
|
||||||
|
#endif
|
||||||
|
SCRIPT_PutNumber(scripthandle, "Screen Setup", "GLTextureMode",gltexfiltermode,FALSE,FALSE);
|
||||||
|
SCRIPT_PutNumber(scripthandle, "Screen Setup", "GLAnisotropy",glanisotropy,FALSE,FALSE);
|
||||||
|
SCRIPT_PutNumber(scripthandle, "Screen Setup", "GLUseTextureCompr",glusetexcompr,FALSE,FALSE);
|
||||||
|
|
||||||
|
SCRIPT_PutNumber(scripthandle, "Sound Setup", "FXDevice", FXDevice, FALSE, FALSE);
|
||||||
|
SCRIPT_PutNumber(scripthandle, "Sound Setup", "MusicDevice", MusicDevice, FALSE, FALSE);
|
||||||
|
SCRIPT_PutNumber(scripthandle, "Sound Setup", "NumVoices", NumVoices, FALSE, FALSE);
|
||||||
|
SCRIPT_PutNumber(scripthandle, "Sound Setup", "NumChannels", NumChannels, FALSE, FALSE);
|
||||||
|
SCRIPT_PutNumber(scripthandle, "Sound Setup", "NumBits", NumBits, FALSE, FALSE);
|
||||||
|
SCRIPT_PutNumber(scripthandle, "Sound Setup", "MixRate", MixRate, FALSE, FALSE);
|
||||||
|
SCRIPT_PutNumber(scripthandle, "Sound Setup", "FXVolume",gs.SoundVolume,FALSE,FALSE);
|
||||||
|
SCRIPT_PutNumber(scripthandle, "Sound Setup", "MusicVolume",gs.MusicVolume,FALSE,FALSE);
|
||||||
|
dummy = gs.FlipStereo;
|
||||||
|
SCRIPT_PutNumber(scripthandle, "Sound Setup", "ReverseStereo",dummy,FALSE,FALSE);
|
||||||
|
SCRIPT_PutString(scripthandle, "Sound Setup", "OggTrackName", gs.OggTrackName);
|
||||||
|
|
||||||
|
SCRIPT_PutNumber(scripthandle, "Setup", "ForceSetup",ForceSetup,FALSE,FALSE);
|
||||||
|
SCRIPT_PutNumber(scripthandle, "Controls","UseMouse",UseMouse,FALSE,FALSE);
|
||||||
|
SCRIPT_PutNumber(scripthandle, "Controls","UseJoystick",UseJoystick,FALSE,FALSE);
|
||||||
|
SCRIPT_PutNumber(scripthandle, "Controls","MouseSensitivity",gs.MouseSpeed,FALSE,FALSE);
|
||||||
|
|
||||||
|
WriteGameSetup(scripthandle);
|
||||||
|
|
||||||
|
for (dummy=0; dummy<NUMGAMEFUNCTIONS; dummy++)
|
||||||
|
{
|
||||||
|
SCRIPT_PutDoubleString(scripthandle, "KeyDefinitions", CONFIG_FunctionNumToName(dummy),
|
||||||
|
KB_ScanCodeToString(KeyboardKeys[dummy][0]), KB_ScanCodeToString(KeyboardKeys[dummy][1]));
|
||||||
|
}
|
||||||
|
|
||||||
|
for (dummy=0; dummy<MAXMOUSEBUTTONS; dummy++)
|
||||||
|
{
|
||||||
|
Bsprintf(buf,"MouseButton%d",dummy);
|
||||||
|
SCRIPT_PutString(scripthandle,"Controls", buf, CONFIG_FunctionNumToName(MouseButtons[dummy]));
|
||||||
|
|
||||||
|
if (dummy >= (MAXMOUSEBUTTONS-2)) continue; // scroll wheel
|
||||||
|
|
||||||
|
Bsprintf(buf,"MouseButtonClicked%d",dummy);
|
||||||
|
SCRIPT_PutString(scripthandle,"Controls", buf, CONFIG_FunctionNumToName(MouseButtonsClicked[dummy]));
|
||||||
|
}
|
||||||
|
|
||||||
|
for (dummy=0; dummy<MAXMOUSEAXES; dummy++)
|
||||||
|
{
|
||||||
|
Bsprintf(buf,"MouseAnalogAxes%d",dummy);
|
||||||
|
SCRIPT_PutString(scripthandle, "Controls", buf, CONFIG_AnalogNumToName(MouseAnalogAxes[dummy]));
|
||||||
|
|
||||||
|
Bsprintf(buf,"MouseDigitalAxes%d_0",dummy);
|
||||||
|
SCRIPT_PutString(scripthandle, "Controls", buf, CONFIG_FunctionNumToName(MouseDigitalAxes[dummy][0]));
|
||||||
|
|
||||||
|
Bsprintf(buf,"MouseDigitalAxes%d_1",dummy);
|
||||||
|
SCRIPT_PutString(scripthandle, "Controls", buf, CONFIG_FunctionNumToName(MouseDigitalAxes[dummy][1]));
|
||||||
|
|
||||||
|
Bsprintf(buf,"MouseAnalogScale%d",dummy);
|
||||||
|
SCRIPT_PutNumber(scripthandle, "Controls", buf, MouseAnalogScale[dummy], FALSE, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (dummy=0; dummy<MAXJOYBUTTONS; dummy++)
|
||||||
|
{
|
||||||
|
Bsprintf(buf,"JoystickButton%d",dummy);
|
||||||
|
SCRIPT_PutString(scripthandle,"Controls", buf, CONFIG_FunctionNumToName(JoystickButtons[dummy]));
|
||||||
|
|
||||||
|
Bsprintf(buf,"JoystickButtonClicked%d",dummy);
|
||||||
|
SCRIPT_PutString(scripthandle,"Controls", buf, CONFIG_FunctionNumToName(JoystickButtonsClicked[dummy]));
|
||||||
|
}
|
||||||
|
|
||||||
|
for (dummy=0; dummy<MAXJOYAXES; dummy++)
|
||||||
|
{
|
||||||
|
Bsprintf(buf,"JoystickAnalogAxes%d",dummy);
|
||||||
|
SCRIPT_PutString(scripthandle, "Controls", buf, CONFIG_AnalogNumToName(JoystickAnalogAxes[dummy]));
|
||||||
|
|
||||||
|
Bsprintf(buf,"JoystickDigitalAxes%d_0",dummy);
|
||||||
|
SCRIPT_PutString(scripthandle, "Controls", buf, CONFIG_FunctionNumToName(JoystickDigitalAxes[dummy][0]));
|
||||||
|
|
||||||
|
Bsprintf(buf,"JoystickDigitalAxes%d_1",dummy);
|
||||||
|
SCRIPT_PutString(scripthandle, "Controls", buf, CONFIG_FunctionNumToName(JoystickDigitalAxes[dummy][1]));
|
||||||
|
|
||||||
|
Bsprintf(buf,"JoystickAnalogScale%d",dummy);
|
||||||
|
SCRIPT_PutNumber(scripthandle, "Controls", buf, JoystickAnalogScale[dummy], FALSE, FALSE);
|
||||||
|
|
||||||
|
Bsprintf(buf,"JoystickAnalogDead%d",dummy);
|
||||||
|
SCRIPT_PutNumber(scripthandle, "Controls", buf, JoystickAnalogDead[dummy], FALSE, FALSE);
|
||||||
|
|
||||||
|
Bsprintf(buf,"JoystickAnalogSaturate%d",dummy);
|
||||||
|
SCRIPT_PutNumber(scripthandle, "Controls", buf, JoystickAnalogSaturate[dummy], FALSE, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
SCRIPT_Save(scripthandle, setupfilename);
|
||||||
|
SCRIPT_Free(scripthandle);
|
||||||
|
}
|
||||||
|
|
133
polymer/eduke32/source/sw/src/config.h
Normal file
133
polymer/eduke32/source/sw/src/config.h
Normal file
|
@ -0,0 +1,133 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef config_public_
|
||||||
|
#define config_public_
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "function.h"
|
||||||
|
|
||||||
|
#define SETUPNAMEPARM "SETUPFILE"
|
||||||
|
|
||||||
|
// screen externs
|
||||||
|
extern int32 ScreenMode; // Screen mode
|
||||||
|
extern int32 ScreenWidth;
|
||||||
|
extern int32 ScreenHeight;
|
||||||
|
extern int32 ScreenBPP;
|
||||||
|
extern int32 ScreenBufferMode;
|
||||||
|
extern int32 VesaBufferMode;
|
||||||
|
extern int32 ForceSetup;
|
||||||
|
|
||||||
|
// sound externs
|
||||||
|
extern int32 FXDevice; // Sound FX Card number
|
||||||
|
extern int32 MusicDevice; // Music Card number
|
||||||
|
extern int32 FXVolume; // FX Volume
|
||||||
|
extern int32 MusicVolume; // Music Volume
|
||||||
|
extern int32 NumVoices; // Number of voices
|
||||||
|
extern int32 NumChannels; // Number of channels
|
||||||
|
extern int32 NumBits; // Number of bits
|
||||||
|
extern int32 MixRate; // Mixing rate
|
||||||
|
extern int32 MidiPort; // Midi Port
|
||||||
|
extern int32 ReverseStereo; // Reverse Stereo Channels
|
||||||
|
|
||||||
|
// comm externs
|
||||||
|
extern int32 ComPort;
|
||||||
|
extern int32 IrqNumber;
|
||||||
|
extern int32 UartAddress;
|
||||||
|
extern int32 PortSpeed;
|
||||||
|
|
||||||
|
extern int32 ToneDial;
|
||||||
|
extern char ModemName[MAXMODEMSTRING];
|
||||||
|
extern char InitString[MAXMODEMSTRING];
|
||||||
|
extern char HangupString[MAXMODEMSTRING];
|
||||||
|
extern char DialoutString[MAXMODEMSTRING];
|
||||||
|
extern int32 SocketNumber;
|
||||||
|
extern char CommbatMacro[MAXMACROS][MAXMACROLENGTH];
|
||||||
|
extern char PhoneNames[MAXPHONEENTRIES][PHONENAMELENGTH];
|
||||||
|
extern char PhoneNumbers[MAXPHONEENTRIES][PHONENUMBERLENGTH];
|
||||||
|
extern char PhoneNumber[PHONENUMBERLENGTH];
|
||||||
|
extern int32 NumberPlayers;
|
||||||
|
extern int32 ConnectType;
|
||||||
|
extern char PlayerName[MAXPLAYERNAMELENGTH];
|
||||||
|
extern char RTSName[MAXRTSNAMELENGTH];
|
||||||
|
extern char UserLevel[MAXUSERLEVELNAMELENGTH];
|
||||||
|
extern char RTSPath[MAXRTSPATHLENGTH];
|
||||||
|
extern char UserPath[MAXUSERLEVELPATHLENGTH];
|
||||||
|
|
||||||
|
// controller externs
|
||||||
|
extern int32 UseMouse, UseJoystick;
|
||||||
|
extern int32 JoystickPort;
|
||||||
|
extern int32 MouseSensitivity;
|
||||||
|
extern int32 MouseAiming;
|
||||||
|
extern int32 MouseAimingFlipped;
|
||||||
|
|
||||||
|
extern byte KeyboardKeys[NUMGAMEFUNCTIONS][2];
|
||||||
|
|
||||||
|
extern int32 MouseButtons[MAXMOUSEBUTTONS];
|
||||||
|
extern int32 MouseButtonsClicked[MAXMOUSEBUTTONS];
|
||||||
|
|
||||||
|
extern int32 JoystickButtons[MAXJOYBUTTONS];
|
||||||
|
extern int32 JoystickButtonsClicked[MAXJOYBUTTONS];
|
||||||
|
|
||||||
|
extern int32 MouseAnalogAxes[MAXMOUSEAXES];
|
||||||
|
extern int32 JoystickAnalogAxes[MAXJOYAXES];
|
||||||
|
extern int32 MouseAnalogScale[MAXMOUSEAXES];
|
||||||
|
extern int32 JoystickAnalogScale[MAXJOYAXES];
|
||||||
|
extern int32 JoystickAnalogDead[MAXJOYAXES];
|
||||||
|
extern int32 JoystickAnalogSaturate[MAXJOYAXES];
|
||||||
|
|
||||||
|
extern int32 EnableRudder;
|
||||||
|
|
||||||
|
extern int32 MouseDigitalAxes[MAXMOUSEAXES][2];
|
||||||
|
extern int32 JoystickDigitalAxes[MAXJOYAXES][2];
|
||||||
|
|
||||||
|
extern char setupfilename[64];
|
||||||
|
extern char ExternalControlFilename[64];
|
||||||
|
|
||||||
|
//style=0: classic
|
||||||
|
//style=1: modern
|
||||||
|
void SetMouseDefaults(int style);
|
||||||
|
void SetJoystickDefaults(void);
|
||||||
|
void SetDefaultKeyDefinitions(int style);
|
||||||
|
|
||||||
|
int32 CONFIG_ReadSetup(void);
|
||||||
|
void CONFIG_SetupMouse(void);
|
||||||
|
void CONFIG_SetupJoystick(void);
|
||||||
|
void CONFIG_WriteSetup(void);
|
||||||
|
void WriteCommitFile(int32 gametype);
|
||||||
|
void CONFIG_GetSetupFilename(void);
|
||||||
|
|
||||||
|
const char *CONFIG_FunctionNumToName(int32 func);
|
||||||
|
int32 CONFIG_FunctionNameToNum(const char *func);
|
||||||
|
const char *CONFIG_AnalogNumToName(int32 func);
|
||||||
|
int32 CONFIG_AnalogNameToNum(const char *func);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
#endif
|
479
polymer/eduke32/source/sw/src/conpic.h
Normal file
479
polymer/eduke32/source/sw/src/conpic.h
Normal file
|
@ -0,0 +1,479 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include "names.h"
|
||||||
|
#include "names2.h"
|
||||||
|
//#include "panel.h"
|
||||||
|
|
||||||
|
#ifdef MAKE_CONPIC_ENUM
|
||||||
|
#define CONPIC_ENTRY(tile,name) ID_ ## name = tile,
|
||||||
|
#endif
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// SWORD
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#define SWORD_REST 2080
|
||||||
|
#define SWORD_SWING0 2081
|
||||||
|
#define SWORD_SWING1 2082
|
||||||
|
#define SWORD_SWING2 2083
|
||||||
|
|
||||||
|
CONPIC_ENTRY(SWORD_REST+0,SwordPresent0)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(SWORD_SWING0,SwordSwing0)
|
||||||
|
CONPIC_ENTRY(SWORD_SWING1,SwordSwing1)
|
||||||
|
CONPIC_ENTRY(SWORD_SWING2,SwordSwing2)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(SWORD_SWING0,SwordSwingR0)
|
||||||
|
CONPIC_ENTRY(SWORD_SWING1,SwordSwingR1)
|
||||||
|
CONPIC_ENTRY(SWORD_SWING2,SwordSwingR2)
|
||||||
|
|
||||||
|
#define BLOODYSWORD_REST 4090
|
||||||
|
#define BLOODYSWORD_SWING0 4091
|
||||||
|
#define BLOODYSWORD_SWING1 4092
|
||||||
|
#define BLOODYSWORD_SWING2 4093
|
||||||
|
|
||||||
|
CONPIC_ENTRY(BLOODYSWORD_REST,BloodySwordPresent0)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(BLOODYSWORD_SWING0,BloodySwordSwing0)
|
||||||
|
CONPIC_ENTRY(BLOODYSWORD_SWING1,BloodySwordSwing1)
|
||||||
|
CONPIC_ENTRY(BLOODYSWORD_SWING2,BloodySwordSwing2)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(BLOODYSWORD_SWING0,BloodySwordSwingR0)
|
||||||
|
CONPIC_ENTRY(BLOODYSWORD_SWING1,BloodySwordSwingR1)
|
||||||
|
CONPIC_ENTRY(BLOODYSWORD_SWING2,BloodySwordSwingR2)
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// FIST
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#define FIST_REST 4070
|
||||||
|
#define FIST_SWING0 4071
|
||||||
|
#define FIST_SWING1 4072
|
||||||
|
#define FIST_SWING2 4073
|
||||||
|
|
||||||
|
CONPIC_ENTRY(FIST_REST+0,FistPresent0)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(FIST_SWING0,FistSwing0)
|
||||||
|
CONPIC_ENTRY(FIST_SWING1,FistSwing1)
|
||||||
|
CONPIC_ENTRY(FIST_SWING2,FistSwing2)
|
||||||
|
|
||||||
|
#define BLOODYFIST_REST 4074
|
||||||
|
#define BLOODYFIST_SWING0 4075
|
||||||
|
#define BLOODYFIST_SWING1 4076
|
||||||
|
#define BLOODYFIST_SWING2 4077
|
||||||
|
|
||||||
|
#define FIST2_REST 4050
|
||||||
|
#define FIST2_SWING0 4051
|
||||||
|
#define FIST2_SWING1 4052
|
||||||
|
#define FIST2_SWING2 4053
|
||||||
|
|
||||||
|
CONPIC_ENTRY(FIST2_REST+0,Fist2Present0)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(FIST2_SWING0,Fist2Swing0)
|
||||||
|
CONPIC_ENTRY(FIST2_SWING1,Fist2Swing1)
|
||||||
|
CONPIC_ENTRY(FIST2_SWING2,Fist2Swing2)
|
||||||
|
|
||||||
|
#define BLOODYFIST2_REST 4054
|
||||||
|
#define BLOODYFIST2_SWING0 4055
|
||||||
|
#define BLOODYFIST2_SWING1 4056
|
||||||
|
#define BLOODYFIST2_SWING2 4057
|
||||||
|
|
||||||
|
#define FIST3_REST 4060
|
||||||
|
#define FIST3_SWING0 4061
|
||||||
|
#define FIST3_SWING1 4062
|
||||||
|
#define FIST3_SWING2 4063
|
||||||
|
|
||||||
|
CONPIC_ENTRY(FIST3_REST+0,Fist3Present0)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(FIST3_SWING0,Fist3Swing0)
|
||||||
|
CONPIC_ENTRY(FIST3_SWING1,Fist3Swing1)
|
||||||
|
CONPIC_ENTRY(FIST3_SWING2,Fist3Swing2)
|
||||||
|
|
||||||
|
#define BLOODYFIST3_REST 4064
|
||||||
|
#define BLOODYFIST3_SWING0 4065
|
||||||
|
#define BLOODYFIST3_SWING1 4066
|
||||||
|
#define BLOODYFIST3_SWING2 4067
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// KICK
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#define KICK0 4080
|
||||||
|
#define KICK1 4081
|
||||||
|
|
||||||
|
CONPIC_ENTRY(KICK0,Kick0)
|
||||||
|
CONPIC_ENTRY(KICK1,Kick1)
|
||||||
|
|
||||||
|
#define BLOODYKICK0 4082
|
||||||
|
#define BLOODYKICK1 4083
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// SHRUIKEN
|
||||||
|
//
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#define STAR_REST 2130
|
||||||
|
#define STAR_THROW 2133
|
||||||
|
|
||||||
|
CONPIC_ENTRY(STAR_REST+0,StarPresent0)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(STAR_REST+1,StarDown0)
|
||||||
|
CONPIC_ENTRY(STAR_REST+2,StarDown1)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(STAR_THROW+0,ThrowStar0)
|
||||||
|
CONPIC_ENTRY(STAR_THROW+1,ThrowStar1)
|
||||||
|
CONPIC_ENTRY(STAR_THROW+2,ThrowStar2)
|
||||||
|
CONPIC_ENTRY(STAR_THROW+3,ThrowStar3)
|
||||||
|
CONPIC_ENTRY(STAR_THROW+4,ThrowStar4)
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// UZI
|
||||||
|
//
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
#define UZI_REST 2000
|
||||||
|
#define UZI_FIRE_0 2001
|
||||||
|
#define UZI_FIRE_1 2001
|
||||||
|
#define UZI_EJECT 2003
|
||||||
|
#define UZI_CLIP 2005
|
||||||
|
#define UZI_RELOAD 2007
|
||||||
|
#else
|
||||||
|
// silencer
|
||||||
|
#define UZI_REST 2004
|
||||||
|
#define UZI_FIRE_0 2006
|
||||||
|
#define UZI_FIRE_1 2008
|
||||||
|
#define UZI_EJECT 2009
|
||||||
|
#define UZI_CLIP 2005
|
||||||
|
#define UZI_RELOAD 2007
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define UZI_SHELL 2152
|
||||||
|
|
||||||
|
|
||||||
|
// RIGHT UZI
|
||||||
|
CONPIC_ENTRY(UZI_REST,UziPresent0)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(UZI_FIRE_0,UziFire0)
|
||||||
|
CONPIC_ENTRY(UZI_FIRE_1,UziFire1)
|
||||||
|
|
||||||
|
// LEFT UZI
|
||||||
|
CONPIC_ENTRY(UZI_REST,Uzi2Present0)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(UZI_FIRE_0,Uzi2Fire0)
|
||||||
|
CONPIC_ENTRY(UZI_FIRE_1,Uzi2Fire1)
|
||||||
|
//eject
|
||||||
|
CONPIC_ENTRY(UZI_EJECT,UziEject0)
|
||||||
|
|
||||||
|
//clip
|
||||||
|
CONPIC_ENTRY(UZI_CLIP,UziClip0)
|
||||||
|
|
||||||
|
//reload
|
||||||
|
CONPIC_ENTRY(UZI_RELOAD,UziReload0)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(UZI_SHELL+0,UziShell0)
|
||||||
|
CONPIC_ENTRY(UZI_SHELL+1,UziShell1)
|
||||||
|
CONPIC_ENTRY(UZI_SHELL+2,UziShell2)
|
||||||
|
CONPIC_ENTRY(UZI_SHELL+3,UziShell3)
|
||||||
|
CONPIC_ENTRY(UZI_SHELL+4,UziShell4)
|
||||||
|
CONPIC_ENTRY(UZI_SHELL+5,UziShell5)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(UZI_SHELL+0,Uzi2Shell0)
|
||||||
|
CONPIC_ENTRY(UZI_SHELL+1,Uzi2Shell1)
|
||||||
|
CONPIC_ENTRY(UZI_SHELL+2,Uzi2Shell2)
|
||||||
|
CONPIC_ENTRY(UZI_SHELL+3,Uzi2Shell3)
|
||||||
|
CONPIC_ENTRY(UZI_SHELL+4,Uzi2Shell4)
|
||||||
|
CONPIC_ENTRY(UZI_SHELL+5,Uzi2Shell5)
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// SHOTGUN
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#define SHOTGUN_REST 2213
|
||||||
|
#define SHOTGUN_FIRE 2214
|
||||||
|
#define SHOTGUN_RELOAD0 2216
|
||||||
|
#define SHOTGUN_RELOAD1 2211
|
||||||
|
#define SHOTGUN_RELOAD2 2212
|
||||||
|
|
||||||
|
CONPIC_ENTRY(SHOTGUN_REST,ShotgunPresent0)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(SHOTGUN_REST,ShotgunRest0)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(SHOTGUN_RELOAD0,ShotgunReload0)
|
||||||
|
CONPIC_ENTRY(SHOTGUN_RELOAD1,ShotgunReload1)
|
||||||
|
CONPIC_ENTRY(SHOTGUN_RELOAD2,ShotgunReload2)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(SHOTGUN_FIRE+0,ShotgunFire0)
|
||||||
|
CONPIC_ENTRY(SHOTGUN_FIRE+1,ShotgunFire1)
|
||||||
|
|
||||||
|
#define SHOTGUN_SHELL 2180
|
||||||
|
CONPIC_ENTRY(SHOTGUN_SHELL+0,ShotgunShell0)
|
||||||
|
CONPIC_ENTRY(SHOTGUN_SHELL+1,ShotgunShell1)
|
||||||
|
CONPIC_ENTRY(SHOTGUN_SHELL+2,ShotgunShell2)
|
||||||
|
CONPIC_ENTRY(SHOTGUN_SHELL+3,ShotgunShell3)
|
||||||
|
CONPIC_ENTRY(SHOTGUN_SHELL+4,ShotgunShell4)
|
||||||
|
CONPIC_ENTRY(SHOTGUN_SHELL+5,ShotgunShell5)
|
||||||
|
CONPIC_ENTRY(SHOTGUN_SHELL+6,ShotgunShell6)
|
||||||
|
CONPIC_ENTRY(SHOTGUN_SHELL+7,ShotgunShell7)
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// ROCKET
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#define ROCKET_REST 2211
|
||||||
|
#define ROCKET_FIRE 2212
|
||||||
|
|
||||||
|
CONPIC_ENTRY(ROCKET_REST+0,RocketPresent0)
|
||||||
|
CONPIC_ENTRY(ROCKET_REST+0,RocketRest0)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(ROCKET_FIRE+0,RocketFire0)
|
||||||
|
CONPIC_ENTRY(ROCKET_FIRE+1,RocketFire1)
|
||||||
|
CONPIC_ENTRY(ROCKET_FIRE+2,RocketFire2)
|
||||||
|
CONPIC_ENTRY(ROCKET_FIRE+3,RocketFire3)
|
||||||
|
CONPIC_ENTRY(ROCKET_FIRE+4,RocketFire4)
|
||||||
|
CONPIC_ENTRY(ROCKET_FIRE+5,RocketFire5)
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// RAIL
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#define RAIL_REST 2010
|
||||||
|
#define RAIL_CHARGE 2015
|
||||||
|
#define RAIL_FIRE 2018
|
||||||
|
|
||||||
|
CONPIC_ENTRY(RAIL_REST+0,RailPresent0)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(RAIL_REST+0,RailRest0)
|
||||||
|
CONPIC_ENTRY(RAIL_REST+1,RailRest1)
|
||||||
|
CONPIC_ENTRY(RAIL_REST+2,RailRest2)
|
||||||
|
CONPIC_ENTRY(RAIL_REST+3,RailRest3)
|
||||||
|
CONPIC_ENTRY(RAIL_REST+4,RailRest4)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(RAIL_FIRE+0,RailFire0)
|
||||||
|
CONPIC_ENTRY(RAIL_FIRE+1,RailFire1)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(RAIL_CHARGE+0,RailCharge0)
|
||||||
|
CONPIC_ENTRY(RAIL_CHARGE+1,RailCharge1)
|
||||||
|
CONPIC_ENTRY(RAIL_CHARGE+2,RailCharge2)
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// FIREBALL
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
//#define HOTHEAD_REST 2327
|
||||||
|
//#define HOTHEAD_ATTACK 2327
|
||||||
|
#define HOTHEAD_REST 2048
|
||||||
|
#define HOTHEAD_ATTACK 2049
|
||||||
|
#define HOTHEAD_CENTER 2327
|
||||||
|
#define HOTHEAD_TURN 2314
|
||||||
|
#define HOTHEAD_CHOMP 2318
|
||||||
|
|
||||||
|
CONPIC_ENTRY(HOTHEAD_REST+0,HotheadPresent0)
|
||||||
|
CONPIC_ENTRY(HOTHEAD_REST+0,HotheadRest0)
|
||||||
|
CONPIC_ENTRY(HOTHEAD_ATTACK+0,HotheadAttack0)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(HOTHEAD_CENTER+0,HotheadCenter0)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(HOTHEAD_TURN+0,HotheadTurn0)
|
||||||
|
CONPIC_ENTRY(HOTHEAD_TURN+1,HotheadTurn1)
|
||||||
|
CONPIC_ENTRY(HOTHEAD_TURN+2,HotheadTurn2)
|
||||||
|
CONPIC_ENTRY(HOTHEAD_TURN+3,HotheadTurn3)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(HOTHEAD_CHOMP+0,HotheadChomp0)
|
||||||
|
|
||||||
|
#define ON_FIRE 3157
|
||||||
|
|
||||||
|
CONPIC_ENTRY(ON_FIRE+0,OnFire0)
|
||||||
|
CONPIC_ENTRY(ON_FIRE+1,OnFire1)
|
||||||
|
CONPIC_ENTRY(ON_FIRE+2,OnFire2)
|
||||||
|
CONPIC_ENTRY(ON_FIRE+3,OnFire3)
|
||||||
|
CONPIC_ENTRY(ON_FIRE+4,OnFire4)
|
||||||
|
CONPIC_ENTRY(ON_FIRE+5,OnFire5)
|
||||||
|
CONPIC_ENTRY(ON_FIRE+6,OnFire6)
|
||||||
|
CONPIC_ENTRY(ON_FIRE+7,OnFire7)
|
||||||
|
CONPIC_ENTRY(ON_FIRE+8,OnFire8)
|
||||||
|
CONPIC_ENTRY(ON_FIRE+9,OnFire9)
|
||||||
|
CONPIC_ENTRY(ON_FIRE+10,OnFire10)
|
||||||
|
CONPIC_ENTRY(ON_FIRE+11,OnFire11)
|
||||||
|
CONPIC_ENTRY(ON_FIRE+12,OnFire12)
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// MICRO
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#define MICRO_REST 2070
|
||||||
|
#define MICRO_FIRE 2071
|
||||||
|
#define MICRO_SINGLE_FIRE 2071
|
||||||
|
|
||||||
|
CONPIC_ENTRY(MICRO_REST+0,MicroPresent0)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(MICRO_FIRE+0,MicroFire0)
|
||||||
|
CONPIC_ENTRY(MICRO_FIRE+1,MicroFire1)
|
||||||
|
CONPIC_ENTRY(MICRO_FIRE+2,MicroFire2)
|
||||||
|
CONPIC_ENTRY(MICRO_FIRE+3,MicroFire3)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(MICRO_SINGLE_FIRE+0,MicroSingleFire0)
|
||||||
|
CONPIC_ENTRY(MICRO_SINGLE_FIRE+1,MicroSingleFire1)
|
||||||
|
CONPIC_ENTRY(MICRO_SINGLE_FIRE+2,MicroSingleFire2)
|
||||||
|
CONPIC_ENTRY(MICRO_SINGLE_FIRE+3,MicroSingleFire3)
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// NAPALM
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#define NAPALM_REST 2020
|
||||||
|
#define NAPALM_FIRE 2021
|
||||||
|
|
||||||
|
CONPIC_ENTRY(NAPALM_REST+0,NapalmPresent0)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(NAPALM_FIRE+0,NapalmFire0)
|
||||||
|
CONPIC_ENTRY(NAPALM_FIRE+1,NapalmFire1)
|
||||||
|
CONPIC_ENTRY(NAPALM_FIRE+2,NapalmFire2)
|
||||||
|
CONPIC_ENTRY(NAPALM_FIRE+3,NapalmFire3)
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// RING
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#define RING_REST 2020
|
||||||
|
#define RING_FIRE 2021
|
||||||
|
|
||||||
|
CONPIC_ENTRY(RING_REST+0,RingPresent0)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(RING_FIRE+0,RingFire0)
|
||||||
|
CONPIC_ENTRY(RING_FIRE+1,RingFire1)
|
||||||
|
CONPIC_ENTRY(RING_FIRE+2,RingFire2)
|
||||||
|
CONPIC_ENTRY(RING_FIRE+3,RingFire3)
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// ELECTRO
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#define ELECTRO_REST 2020
|
||||||
|
#define ELECTRO_FIRE 2021
|
||||||
|
|
||||||
|
CONPIC_ENTRY(ELECTRO_REST+0,ElectroPresent0)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(ELECTRO_FIRE+0,ElectroFire0)
|
||||||
|
CONPIC_ENTRY(ELECTRO_FIRE+1,ElectroFire1)
|
||||||
|
CONPIC_ENTRY(ELECTRO_FIRE+2,ElectroFire2)
|
||||||
|
CONPIC_ENTRY(ELECTRO_FIRE+3,ElectroFire3)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// GRENADE
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#define GRENADE_REST 2121
|
||||||
|
#define GRENADE_FIRE 2122
|
||||||
|
#define GRENADE_RELOAD 2125
|
||||||
|
|
||||||
|
CONPIC_ENTRY(GRENADE_REST+0,GrenadePresent0)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(GRENADE_FIRE+0,GrenadeFire0)
|
||||||
|
CONPIC_ENTRY(GRENADE_FIRE+1,GrenadeFire1)
|
||||||
|
CONPIC_ENTRY(GRENADE_FIRE+2,GrenadeFire2)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(GRENADE_RELOAD+0,GrenadeReload0)
|
||||||
|
CONPIC_ENTRY(GRENADE_RELOAD+1,GrenadeReload1)
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// MINE
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#define MINE_REST 2220
|
||||||
|
#define MINE_THROW 2222
|
||||||
|
#define MINE_RELOAD 2222
|
||||||
|
|
||||||
|
CONPIC_ENTRY(MINE_REST+0,MinePresent0)
|
||||||
|
CONPIC_ENTRY(MINE_REST+1,MinePresent1)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(MINE_THROW+0,MineThrow0)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(MINE_RELOAD+0,MineReload0)
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// HEART
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#define HEART_REST 2050
|
||||||
|
|
||||||
|
#define HEART_ATTACK 2052
|
||||||
|
|
||||||
|
CONPIC_ENTRY(HEART_REST+0,HeartPresent0)
|
||||||
|
CONPIC_ENTRY(HEART_REST+1,HeartPresent1)
|
||||||
|
|
||||||
|
CONPIC_ENTRY(HEART_ATTACK+0,HeartAttack0)
|
||||||
|
CONPIC_ENTRY(HEART_ATTACK+1,HeartAttack1)
|
||||||
|
|
||||||
|
//#define HEART_BLOOD 2430
|
||||||
|
#define HEART_BLOOD 2420
|
||||||
|
CONPIC_ENTRY(HEART_BLOOD+0,HeartBlood0)
|
||||||
|
CONPIC_ENTRY(HEART_BLOOD+1,HeartBlood1)
|
||||||
|
CONPIC_ENTRY(HEART_BLOOD+2,HeartBlood2)
|
||||||
|
CONPIC_ENTRY(HEART_BLOOD+3,HeartBlood3)
|
||||||
|
CONPIC_ENTRY(HEART_BLOOD+4,HeartBlood4)
|
||||||
|
CONPIC_ENTRY(HEART_BLOOD+5,HeartBlood5)
|
||||||
|
|
||||||
|
#undef CONPIC_ENTRY
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
1429
polymer/eduke32/source/sw/src/console.c
Normal file
1429
polymer/eduke32/source/sw/src/console.c
Normal file
File diff suppressed because it is too large
Load diff
996
polymer/eduke32/source/sw/src/coolg.c
Normal file
996
polymer/eduke32/source/sw/src/coolg.c
Normal file
|
@ -0,0 +1,996 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
#include "build.h"
|
||||||
|
|
||||||
|
#include "keys.h"
|
||||||
|
#include "names2.h"
|
||||||
|
#include "game.h"
|
||||||
|
#include "tags.h"
|
||||||
|
#include "ai.h"
|
||||||
|
#include "sprite.h"
|
||||||
|
#include "actor.h"
|
||||||
|
#include "weapon.h"
|
||||||
|
#include "track.h"
|
||||||
|
|
||||||
|
ANIMATOR DoCoolgCircle,InitCoolgCircle;
|
||||||
|
|
||||||
|
DECISION CoolgBattle[] =
|
||||||
|
{
|
||||||
|
{50, InitCoolgCircle },
|
||||||
|
{450, InitActorMoveCloser },
|
||||||
|
//{456, InitActorAmbientNoise },
|
||||||
|
//{760, InitActorRunAway },
|
||||||
|
{1024, InitActorAttack }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION CoolgOffense[] =
|
||||||
|
{
|
||||||
|
{449, InitActorMoveCloser },
|
||||||
|
//{554, InitActorAmbientNoise },
|
||||||
|
{1024, InitActorAttack }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION CoolgBroadcast[] =
|
||||||
|
{
|
||||||
|
//{1, InitActorAlertNoise },
|
||||||
|
{1, InitActorAmbientNoise },
|
||||||
|
{1024, InitActorDecide }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION CoolgSurprised[] =
|
||||||
|
{
|
||||||
|
{100, InitCoolgCircle },
|
||||||
|
{701, InitActorMoveCloser },
|
||||||
|
{1024, InitActorDecide }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION CoolgEvasive[] =
|
||||||
|
{
|
||||||
|
{20, InitCoolgCircle },
|
||||||
|
{1024, InitActorRunAway },
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION CoolgLostTarget[] =
|
||||||
|
{
|
||||||
|
{900, InitActorFindPlayer },
|
||||||
|
{1024, InitActorWanderAround }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION CoolgCloseRange[] =
|
||||||
|
{
|
||||||
|
{800, InitActorAttack },
|
||||||
|
{1024, InitActorReposition }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION CoolgTouchTarget[] =
|
||||||
|
{
|
||||||
|
//{50, InitCoolgCircle },
|
||||||
|
{1024, InitActorAttack },
|
||||||
|
};
|
||||||
|
|
||||||
|
PERSONALITY CoolgPersonality =
|
||||||
|
{
|
||||||
|
CoolgBattle,
|
||||||
|
CoolgOffense,
|
||||||
|
CoolgBroadcast,
|
||||||
|
CoolgSurprised,
|
||||||
|
CoolgEvasive,
|
||||||
|
CoolgLostTarget,
|
||||||
|
CoolgCloseRange,
|
||||||
|
CoolgTouchTarget
|
||||||
|
};
|
||||||
|
|
||||||
|
ATTRIBUTE CoolgAttrib =
|
||||||
|
{
|
||||||
|
{60, 80, 150, 190}, // Speeds
|
||||||
|
{3, 0, -2, -3}, // Tic Adjusts
|
||||||
|
3, // MaxWeapons;
|
||||||
|
{
|
||||||
|
DIGI_CGAMBIENT, DIGI_CGALERT, 0,
|
||||||
|
DIGI_CGPAIN, DIGI_CGSCREAM, DIGI_CGMATERIALIZE,
|
||||||
|
DIGI_CGTHIGHBONE,DIGI_CGMAGIC,DIGI_CGMAGICHIT,0
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// COOLG RUN
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define COOLG_RUN_RATE 40
|
||||||
|
|
||||||
|
ANIMATOR DoCoolgMove,NullAnimator,DoStayOnFloor, DoActorDebris, NullCoolg, DoCoolgBirth;
|
||||||
|
|
||||||
|
STATE s_CoolgRun[5][4] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{COOLG_RUN_R0 + 0, COOLG_RUN_RATE, DoCoolgMove, &s_CoolgRun[0][1]},
|
||||||
|
{COOLG_RUN_R0 + 1, COOLG_RUN_RATE, DoCoolgMove, &s_CoolgRun[0][2]},
|
||||||
|
{COOLG_RUN_R0 + 2, COOLG_RUN_RATE, DoCoolgMove, &s_CoolgRun[0][3]},
|
||||||
|
{COOLG_RUN_R0 + 3, COOLG_RUN_RATE, DoCoolgMove, &s_CoolgRun[0][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLG_RUN_R1 + 0, COOLG_RUN_RATE, DoCoolgMove, &s_CoolgRun[1][1]},
|
||||||
|
{COOLG_RUN_R1 + 1, COOLG_RUN_RATE, DoCoolgMove, &s_CoolgRun[1][2]},
|
||||||
|
{COOLG_RUN_R1 + 2, COOLG_RUN_RATE, DoCoolgMove, &s_CoolgRun[1][3]},
|
||||||
|
{COOLG_RUN_R1 + 3, COOLG_RUN_RATE, DoCoolgMove, &s_CoolgRun[1][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLG_RUN_R2 + 0, COOLG_RUN_RATE, DoCoolgMove, &s_CoolgRun[2][1]},
|
||||||
|
{COOLG_RUN_R2 + 1, COOLG_RUN_RATE, DoCoolgMove, &s_CoolgRun[2][2]},
|
||||||
|
{COOLG_RUN_R2 + 2, COOLG_RUN_RATE, DoCoolgMove, &s_CoolgRun[2][3]},
|
||||||
|
{COOLG_RUN_R2 + 3, COOLG_RUN_RATE, DoCoolgMove, &s_CoolgRun[2][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLG_RUN_R3 + 0, COOLG_RUN_RATE, DoCoolgMove, &s_CoolgRun[3][1]},
|
||||||
|
{COOLG_RUN_R3 + 1, COOLG_RUN_RATE, DoCoolgMove, &s_CoolgRun[3][2]},
|
||||||
|
{COOLG_RUN_R3 + 2, COOLG_RUN_RATE, DoCoolgMove, &s_CoolgRun[3][3]},
|
||||||
|
{COOLG_RUN_R3 + 3, COOLG_RUN_RATE, DoCoolgMove, &s_CoolgRun[3][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLG_RUN_R4 + 0, COOLG_RUN_RATE, DoCoolgMove, &s_CoolgRun[4][1]},
|
||||||
|
{COOLG_RUN_R4 + 1, COOLG_RUN_RATE, DoCoolgMove, &s_CoolgRun[4][2]},
|
||||||
|
{COOLG_RUN_R4 + 2, COOLG_RUN_RATE, DoCoolgMove, &s_CoolgRun[4][3]},
|
||||||
|
{COOLG_RUN_R4 + 3, COOLG_RUN_RATE, DoCoolgMove, &s_CoolgRun[4][0]},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
STATEp sg_CoolgRun[] =
|
||||||
|
{
|
||||||
|
&s_CoolgRun[0][0],
|
||||||
|
&s_CoolgRun[1][0],
|
||||||
|
&s_CoolgRun[2][0],
|
||||||
|
&s_CoolgRun[3][0],
|
||||||
|
&s_CoolgRun[4][0]
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// COOLG STAND
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
STATE s_CoolgStand[5][1] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{COOLG_RUN_R0 + 0, COOLG_RUN_RATE, DoCoolgMove, &s_CoolgStand[0][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLG_RUN_R1 + 0, COOLG_RUN_RATE, DoCoolgMove, &s_CoolgStand[1][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLG_RUN_R2 + 0, COOLG_RUN_RATE, DoCoolgMove, &s_CoolgStand[2][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLG_RUN_R3 + 0, COOLG_RUN_RATE, DoCoolgMove, &s_CoolgStand[3][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLG_RUN_R4 + 0, COOLG_RUN_RATE, DoCoolgMove, &s_CoolgStand[4][0]},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
STATEp sg_CoolgStand[] =
|
||||||
|
{
|
||||||
|
&s_CoolgStand[0][0],
|
||||||
|
&s_CoolgStand[1][0],
|
||||||
|
&s_CoolgStand[2][0],
|
||||||
|
&s_CoolgStand[3][0],
|
||||||
|
&s_CoolgStand[4][0]
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// COOLG CLUB
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define COOLG_RATE 16
|
||||||
|
ANIMATOR InitCoolgBash;
|
||||||
|
|
||||||
|
STATE s_CoolgClub[5][6] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{COOLG_CLUB_R0 + 0, COOLG_RATE, NullCoolg, &s_CoolgClub[0][1]},
|
||||||
|
{COOLG_RUN_R0 + 0, COOLG_RATE, NullCoolg, &s_CoolgClub[0][2]},
|
||||||
|
{COOLG_CLUB_R0 + 1, 0|SF_QUICK_CALL, InitCoolgBash, &s_CoolgClub[0][3]},
|
||||||
|
{COOLG_CLUB_R0 + 1, COOLG_RATE, NullCoolg, &s_CoolgClub[0][4]},
|
||||||
|
{COOLG_CLUB_R0 + 1, 0|SF_QUICK_CALL, InitActorDecide, &s_CoolgClub[0][5]},
|
||||||
|
{COOLG_CLUB_R0 + 1, COOLG_RATE, DoCoolgMove, &s_CoolgClub[0][5]}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLG_CLUB_R1 + 0, COOLG_RATE, NullCoolg, &s_CoolgClub[1][1]},
|
||||||
|
{COOLG_RUN_R1 + 0, COOLG_RATE, NullCoolg, &s_CoolgClub[1][2]},
|
||||||
|
{COOLG_CLUB_R1 + 1, 0|SF_QUICK_CALL, InitCoolgBash, &s_CoolgClub[1][3]},
|
||||||
|
{COOLG_CLUB_R1 + 1, COOLG_RATE, NullCoolg, &s_CoolgClub[1][4]},
|
||||||
|
{COOLG_CLUB_R1 + 1, 0|SF_QUICK_CALL, InitActorDecide, &s_CoolgClub[1][5]},
|
||||||
|
{COOLG_CLUB_R1 + 1, COOLG_RATE, DoCoolgMove, &s_CoolgClub[1][5]}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLG_CLUB_R2 + 0, COOLG_RATE, NullCoolg, &s_CoolgClub[2][1]},
|
||||||
|
{COOLG_RUN_R2 + 0, COOLG_RATE, NullCoolg, &s_CoolgClub[2][2]},
|
||||||
|
{COOLG_CLUB_R2 + 1, 0|SF_QUICK_CALL, InitCoolgBash, &s_CoolgClub[2][3]},
|
||||||
|
{COOLG_CLUB_R2 + 1, COOLG_RATE, NullCoolg, &s_CoolgClub[2][4]},
|
||||||
|
{COOLG_CLUB_R2 + 1, 0|SF_QUICK_CALL, InitActorDecide, &s_CoolgClub[2][5]},
|
||||||
|
{COOLG_CLUB_R2 + 1, COOLG_RATE, DoCoolgMove, &s_CoolgClub[2][5]}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLG_CLUB_R3 + 0, COOLG_RATE, NullCoolg, &s_CoolgClub[3][1]},
|
||||||
|
{COOLG_RUN_R3 + 0, COOLG_RATE, NullCoolg, &s_CoolgClub[3][2]},
|
||||||
|
{COOLG_CLUB_R3 + 1, 0|SF_QUICK_CALL, InitCoolgBash, &s_CoolgClub[3][3]},
|
||||||
|
{COOLG_CLUB_R3 + 1, COOLG_RATE, NullCoolg, &s_CoolgClub[3][4]},
|
||||||
|
{COOLG_CLUB_R3 + 1, 0|SF_QUICK_CALL, InitActorDecide, &s_CoolgClub[3][5]},
|
||||||
|
{COOLG_CLUB_R3 + 1, COOLG_RATE, DoCoolgMove, &s_CoolgClub[3][5]}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLG_CLUB_R4 + 0, COOLG_RATE, NullCoolg, &s_CoolgClub[4][1]},
|
||||||
|
{COOLG_RUN_R4 + 0, COOLG_RATE, NullCoolg, &s_CoolgClub[4][2]},
|
||||||
|
{COOLG_CLUB_R4 + 1, 0|SF_QUICK_CALL, InitCoolgBash, &s_CoolgClub[4][3]},
|
||||||
|
{COOLG_CLUB_R4 + 1, COOLG_RATE, NullCoolg, &s_CoolgClub[4][4]},
|
||||||
|
{COOLG_CLUB_R4 + 1, 0|SF_QUICK_CALL, InitActorDecide, &s_CoolgClub[4][5]},
|
||||||
|
{COOLG_CLUB_R4 + 1, COOLG_RATE, DoCoolgMove, &s_CoolgClub[4][5]}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
STATEp sg_CoolgClub[] =
|
||||||
|
{
|
||||||
|
&s_CoolgClub[0][0],
|
||||||
|
&s_CoolgClub[1][0],
|
||||||
|
&s_CoolgClub[2][0],
|
||||||
|
&s_CoolgClub[3][0],
|
||||||
|
&s_CoolgClub[4][0]
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// COOLG FIRE
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
ANIMATOR InitCoolgFire;
|
||||||
|
#define COOLG_FIRE_RATE 12
|
||||||
|
|
||||||
|
STATE s_CoolgAttack[5][7] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{COOLG_FIRE_R0 + 0, COOLG_FIRE_RATE*2, NullCoolg, &s_CoolgAttack[0][1]},
|
||||||
|
{COOLG_FIRE_R0 + 1, COOLG_FIRE_RATE*2, NullCoolg, &s_CoolgAttack[0][2]},
|
||||||
|
{COOLG_FIRE_R0 + 2, COOLG_FIRE_RATE*2, NullCoolg, &s_CoolgAttack[0][3]},
|
||||||
|
{COOLG_FIRE_R0 + 2, 0|SF_QUICK_CALL, InitCoolgFire, &s_CoolgAttack[0][4]},
|
||||||
|
{COOLG_FIRE_R0 + 2, COOLG_FIRE_RATE, NullCoolg, &s_CoolgAttack[0][5]},
|
||||||
|
{COOLG_FIRE_R0 + 2, 0|SF_QUICK_CALL, InitActorDecide, &s_CoolgAttack[0][6]},
|
||||||
|
{COOLG_RUN_R0 + 2, COOLG_FIRE_RATE, DoCoolgMove, &s_CoolgAttack[0][6]}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLG_FIRE_R1 + 0, COOLG_FIRE_RATE*2, NullCoolg, &s_CoolgAttack[1][1]},
|
||||||
|
{COOLG_FIRE_R1 + 1, COOLG_FIRE_RATE*2, NullCoolg, &s_CoolgAttack[1][2]},
|
||||||
|
{COOLG_FIRE_R1 + 2, COOLG_FIRE_RATE*2, NullCoolg, &s_CoolgAttack[1][3]},
|
||||||
|
{COOLG_FIRE_R1 + 2, 0|SF_QUICK_CALL, InitCoolgFire, &s_CoolgAttack[1][4]},
|
||||||
|
{COOLG_FIRE_R1 + 2, COOLG_FIRE_RATE, NullCoolg, &s_CoolgAttack[1][5]},
|
||||||
|
{COOLG_FIRE_R1 + 2, 0|SF_QUICK_CALL, InitActorDecide, &s_CoolgAttack[1][6]},
|
||||||
|
{COOLG_RUN_R0 + 2, COOLG_FIRE_RATE, DoCoolgMove, &s_CoolgAttack[1][6]}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLG_FIRE_R2 + 0, COOLG_FIRE_RATE*2, NullCoolg, &s_CoolgAttack[2][1]},
|
||||||
|
{COOLG_FIRE_R2 + 1, COOLG_FIRE_RATE*2, NullCoolg, &s_CoolgAttack[2][2]},
|
||||||
|
{COOLG_FIRE_R2 + 2, COOLG_FIRE_RATE*2, NullCoolg, &s_CoolgAttack[2][3]},
|
||||||
|
{COOLG_FIRE_R2 + 2, 0|SF_QUICK_CALL, InitCoolgFire, &s_CoolgAttack[2][4]},
|
||||||
|
{COOLG_FIRE_R2 + 2, COOLG_FIRE_RATE, NullCoolg, &s_CoolgAttack[2][5]},
|
||||||
|
{COOLG_FIRE_R2 + 2, 0|SF_QUICK_CALL, InitActorDecide, &s_CoolgAttack[2][6]},
|
||||||
|
{COOLG_RUN_R0 + 2, COOLG_FIRE_RATE, DoCoolgMove, &s_CoolgAttack[2][6]}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLG_RUN_R3 + 0, COOLG_FIRE_RATE*2, NullCoolg, &s_CoolgAttack[3][1]},
|
||||||
|
{COOLG_RUN_R3 + 1, COOLG_FIRE_RATE*2, NullCoolg, &s_CoolgAttack[3][2]},
|
||||||
|
{COOLG_RUN_R3 + 2, COOLG_FIRE_RATE*2, NullCoolg, &s_CoolgAttack[3][3]},
|
||||||
|
{COOLG_RUN_R3 + 2, 0|SF_QUICK_CALL, InitCoolgFire, &s_CoolgAttack[3][4]},
|
||||||
|
{COOLG_RUN_R3 + 2, COOLG_FIRE_RATE, NullCoolg, &s_CoolgAttack[3][5]},
|
||||||
|
{COOLG_RUN_R3 + 2, 0|SF_QUICK_CALL, InitActorDecide, &s_CoolgAttack[3][6]},
|
||||||
|
{COOLG_RUN_R0 + 2, COOLG_FIRE_RATE, DoCoolgMove, &s_CoolgAttack[3][6]}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLG_RUN_R4 + 0, COOLG_FIRE_RATE*2, NullCoolg, &s_CoolgAttack[4][1]},
|
||||||
|
{COOLG_RUN_R4 + 1, COOLG_FIRE_RATE*2, NullCoolg, &s_CoolgAttack[4][2]},
|
||||||
|
{COOLG_RUN_R4 + 2, COOLG_FIRE_RATE*2, NullCoolg, &s_CoolgAttack[4][3]},
|
||||||
|
{COOLG_RUN_R4 + 2, 0|SF_QUICK_CALL, InitCoolgFire, &s_CoolgAttack[4][4]},
|
||||||
|
{COOLG_RUN_R4 + 2, COOLG_FIRE_RATE, NullCoolg, &s_CoolgAttack[4][5]},
|
||||||
|
{COOLG_RUN_R4 + 2, 0|SF_QUICK_CALL, InitActorDecide, &s_CoolgAttack[4][6]},
|
||||||
|
{COOLG_RUN_R0 + 2, COOLG_FIRE_RATE, DoCoolgMove, &s_CoolgAttack[4][6]}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
STATEp sg_CoolgAttack[] =
|
||||||
|
{
|
||||||
|
&s_CoolgAttack[0][0],
|
||||||
|
&s_CoolgAttack[1][0],
|
||||||
|
&s_CoolgAttack[2][0],
|
||||||
|
&s_CoolgAttack[3][0],
|
||||||
|
&s_CoolgAttack[4][0]
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// COOLG PAIN
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define COOLG_PAIN_RATE 15
|
||||||
|
ANIMATOR DoCoolgPain;
|
||||||
|
|
||||||
|
STATE s_CoolgPain[5][2] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{COOLG_PAIN_R0 + 0, COOLG_PAIN_RATE, DoCoolgPain, &s_CoolgPain[0][1]},
|
||||||
|
{COOLG_PAIN_R0 + 0, COOLG_PAIN_RATE, DoCoolgPain, &s_CoolgPain[0][1]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLG_RUN_R1 + 0, COOLG_PAIN_RATE, DoCoolgPain, &s_CoolgPain[1][1]},
|
||||||
|
{COOLG_RUN_R1 + 0, COOLG_PAIN_RATE, DoCoolgPain, &s_CoolgPain[1][1]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLG_RUN_R2 + 0, COOLG_PAIN_RATE, DoCoolgPain, &s_CoolgPain[2][1]},
|
||||||
|
{COOLG_RUN_R2 + 0, COOLG_PAIN_RATE, DoCoolgPain, &s_CoolgPain[2][1]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLG_RUN_R3 + 0, COOLG_PAIN_RATE, DoCoolgPain, &s_CoolgPain[3][1]},
|
||||||
|
{COOLG_RUN_R3 + 0, COOLG_PAIN_RATE, DoCoolgPain, &s_CoolgPain[3][1]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLG_RUN_R4 + 0, COOLG_PAIN_RATE, DoCoolgPain, &s_CoolgPain[4][1]},
|
||||||
|
{COOLG_RUN_R4 + 0, COOLG_PAIN_RATE, DoCoolgPain, &s_CoolgPain[4][1]},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
STATEp sg_CoolgPain[] =
|
||||||
|
{
|
||||||
|
s_CoolgPain[0],
|
||||||
|
s_CoolgPain[1],
|
||||||
|
s_CoolgPain[2],
|
||||||
|
s_CoolgPain[3],
|
||||||
|
s_CoolgPain[4]
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// COOLG DIE
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define COOLG_DIE_RATE 20
|
||||||
|
|
||||||
|
#define COOLG_DIE 4307
|
||||||
|
#define COOLG_DEAD 4307+5
|
||||||
|
ANIMATOR DoCoolgDeath;
|
||||||
|
STATE s_CoolgDie[] =
|
||||||
|
{
|
||||||
|
{COOLG_DIE + 0, COOLG_DIE_RATE, DoCoolgDeath, &s_CoolgDie[1]},
|
||||||
|
{COOLG_DIE + 1, COOLG_DIE_RATE, DoCoolgDeath, &s_CoolgDie[2]},
|
||||||
|
{COOLG_DIE + 2, COOLG_DIE_RATE, DoCoolgDeath, &s_CoolgDie[3]},
|
||||||
|
{COOLG_DIE + 3, COOLG_DIE_RATE, DoCoolgDeath, &s_CoolgDie[4]},
|
||||||
|
{COOLG_DIE + 4, COOLG_DIE_RATE, DoCoolgDeath, &s_CoolgDie[5]},
|
||||||
|
{COOLG_DIE + 5, COOLG_DIE_RATE, DoCoolgDeath, &s_CoolgDie[5]},
|
||||||
|
};
|
||||||
|
|
||||||
|
STATEp sg_CoolgDie[] =
|
||||||
|
{
|
||||||
|
s_CoolgDie
|
||||||
|
};
|
||||||
|
|
||||||
|
STATE s_CoolgDead[] =
|
||||||
|
{
|
||||||
|
{COOLG_DEAD, SF_QUICK_CALL, QueueFloorBlood, &s_CoolgDead[1]},
|
||||||
|
{COOLG_DEAD, COOLG_DIE_RATE, DoActorDebris, &s_CoolgDead[1]},
|
||||||
|
};
|
||||||
|
|
||||||
|
STATEp sg_CoolgDead[] =
|
||||||
|
{
|
||||||
|
s_CoolgDead
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// COOLG BIRTH
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define COOLG_BIRTH_RATE 20
|
||||||
|
#define COOLG_BIRTH 4268
|
||||||
|
|
||||||
|
STATE s_CoolgBirth[] =
|
||||||
|
{
|
||||||
|
{COOLG_BIRTH + 0, COOLG_BIRTH_RATE, NullAnimator, &s_CoolgBirth[1]},
|
||||||
|
{COOLG_BIRTH + 1, COOLG_BIRTH_RATE, NullAnimator, &s_CoolgBirth[2]},
|
||||||
|
{COOLG_BIRTH + 2, COOLG_BIRTH_RATE, NullAnimator, &s_CoolgBirth[3]},
|
||||||
|
{COOLG_BIRTH + 3, COOLG_BIRTH_RATE, NullAnimator, &s_CoolgBirth[4]},
|
||||||
|
{COOLG_BIRTH + 4, COOLG_BIRTH_RATE, NullAnimator, &s_CoolgBirth[5]},
|
||||||
|
{COOLG_BIRTH + 5, COOLG_BIRTH_RATE, NullAnimator, &s_CoolgBirth[6]},
|
||||||
|
{COOLG_BIRTH + 6, COOLG_BIRTH_RATE, NullAnimator, &s_CoolgBirth[7]},
|
||||||
|
{COOLG_BIRTH + 7, COOLG_BIRTH_RATE, NullAnimator, &s_CoolgBirth[8]},
|
||||||
|
{COOLG_BIRTH + 8, COOLG_BIRTH_RATE, NullAnimator, &s_CoolgBirth[9]},
|
||||||
|
{COOLG_BIRTH + 8, COOLG_BIRTH_RATE, NullAnimator, &s_CoolgBirth[10]},
|
||||||
|
{COOLG_BIRTH + 8, 0|SF_QUICK_CALL, DoCoolgBirth, &s_CoolgBirth[10]}
|
||||||
|
};
|
||||||
|
|
||||||
|
STATEp sg_CoolgBirth[] =
|
||||||
|
{
|
||||||
|
s_CoolgBirth
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
STATEp *Stand[MAX_WEAPONS];
|
||||||
|
STATEp *Run;
|
||||||
|
STATEp *Jump;
|
||||||
|
STATEp *Fall;
|
||||||
|
STATEp *Crawl;
|
||||||
|
STATEp *Swim;
|
||||||
|
STATEp *Fly;
|
||||||
|
STATEp *Rise;
|
||||||
|
STATEp *Sit;
|
||||||
|
STATEp *Look;
|
||||||
|
STATEp *Climb;
|
||||||
|
STATEp *Pain;
|
||||||
|
STATEp *Death1;
|
||||||
|
STATEp *Death2;
|
||||||
|
STATEp *Dead;
|
||||||
|
STATEp *DeathJump;
|
||||||
|
STATEp *DeathFall;
|
||||||
|
STATEp *CloseAttack[2];
|
||||||
|
STATEp *Attack[6];
|
||||||
|
STATEp *Special[2];
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
ACTOR_ACTION_SET CoolgActionSet =
|
||||||
|
{
|
||||||
|
sg_CoolgStand,
|
||||||
|
sg_CoolgRun,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL, //climb
|
||||||
|
sg_CoolgPain, //pain
|
||||||
|
sg_CoolgDie,
|
||||||
|
NULL,
|
||||||
|
sg_CoolgDead,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
// {sg_CoolgClub},
|
||||||
|
{sg_CoolgAttack},
|
||||||
|
{1024},
|
||||||
|
{sg_CoolgAttack},
|
||||||
|
{1024},
|
||||||
|
{NULL,NULL},
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
int DoCoolgMatchPlayerZ(short SpriteNum);
|
||||||
|
|
||||||
|
void
|
||||||
|
CoolgCommon(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
|
sp->clipdist = (200) >> 2;
|
||||||
|
//u->floor_dist = Z(5);
|
||||||
|
u->floor_dist = Z(16);
|
||||||
|
u->ceiling_dist = Z(20);
|
||||||
|
|
||||||
|
u->sz = sp->z;
|
||||||
|
|
||||||
|
sp->xrepeat = 42;
|
||||||
|
sp->yrepeat = 42;
|
||||||
|
SET(sp->extra, SPRX_PLAYER_OR_ENEMY);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
SetupCoolg(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
USERp u;
|
||||||
|
ANIMATOR DoActorDecide;
|
||||||
|
|
||||||
|
if (TEST(sp->cstat, CSTAT_SPRITE_RESTORE))
|
||||||
|
{
|
||||||
|
u = User[SpriteNum];
|
||||||
|
ASSERT(u);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
User[SpriteNum] = u = SpawnUser(SpriteNum,COOLG_RUN_R0,s_CoolgRun[0]);
|
||||||
|
u->Health = HEALTH_COOLIE_GHOST;
|
||||||
|
}
|
||||||
|
|
||||||
|
ChangeState(SpriteNum, s_CoolgRun[0]);
|
||||||
|
u->Attrib = &CoolgAttrib;
|
||||||
|
DoActorSetSpeed(SpriteNum, NORM_SPEED);
|
||||||
|
u->StateEnd = s_CoolgDie;
|
||||||
|
u->Rot = sg_CoolgRun;
|
||||||
|
|
||||||
|
EnemyDefaults(SpriteNum, &CoolgActionSet, &CoolgPersonality);
|
||||||
|
|
||||||
|
SET(u->Flags, SPR_NO_SCAREDZ|SPR_XFLIP_TOGGLE);
|
||||||
|
|
||||||
|
CoolgCommon(SpriteNum);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
extern short TotalKillable;
|
||||||
|
|
||||||
|
int
|
||||||
|
NewCoolg(short SpriteNum)
|
||||||
|
{
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
SPRITEp sp = User[SpriteNum]->SpriteP;
|
||||||
|
USERp nu;
|
||||||
|
SPRITEp np;
|
||||||
|
ANIMATOR DoActorDecide;
|
||||||
|
short new;
|
||||||
|
|
||||||
|
new = SpawnSprite(STAT_ENEMY, COOLG_RUN_R0, &s_CoolgBirth[0], sp->sectnum, sp->x, sp->y, sp->z, sp->ang, 50);
|
||||||
|
|
||||||
|
nu = User[new];
|
||||||
|
np = &sprite[new];
|
||||||
|
|
||||||
|
ChangeState(new, &s_CoolgBirth[0]);
|
||||||
|
nu->StateEnd = s_CoolgDie;
|
||||||
|
nu->Rot = sg_CoolgRun;
|
||||||
|
np->pal = nu->spal = u->spal;
|
||||||
|
|
||||||
|
nu->ActorActionSet = &CoolgActionSet;
|
||||||
|
|
||||||
|
np->shade = sp->shade;
|
||||||
|
nu->Personality = &CoolgPersonality;
|
||||||
|
nu->Attrib = &CoolgAttrib;
|
||||||
|
|
||||||
|
// special case
|
||||||
|
TotalKillable++;
|
||||||
|
CoolgCommon(new);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
DoCoolgBirth(short new)
|
||||||
|
{
|
||||||
|
SPRITEp sp;
|
||||||
|
USERp u;
|
||||||
|
ANIMATOR DoActorDecide;
|
||||||
|
|
||||||
|
u = User[new];
|
||||||
|
sp = &sprite[new];
|
||||||
|
|
||||||
|
u->Health = HEALTH_COOLIE_GHOST;
|
||||||
|
u->Attrib = &CoolgAttrib;
|
||||||
|
DoActorSetSpeed(new, NORM_SPEED);
|
||||||
|
|
||||||
|
ChangeState(new, s_CoolgRun[0]);
|
||||||
|
u->StateEnd = s_CoolgDie;
|
||||||
|
u->Rot = sg_CoolgRun;
|
||||||
|
|
||||||
|
EnemyDefaults(new, &CoolgActionSet, &CoolgPersonality);
|
||||||
|
// special case
|
||||||
|
TotalKillable--;
|
||||||
|
|
||||||
|
SET(u->Flags, SPR_NO_SCAREDZ|SPR_XFLIP_TOGGLE);
|
||||||
|
CoolgCommon(new);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int NullCoolg(short SpriteNum)
|
||||||
|
{
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
SPRITEp sp = User[SpriteNum]->SpriteP;
|
||||||
|
|
||||||
|
u->ShellNum -= ACTORMOVETICS;
|
||||||
|
|
||||||
|
if (TEST(u->Flags,SPR_SLIDING))
|
||||||
|
DoActorSlide(SpriteNum);
|
||||||
|
|
||||||
|
DoCoolgMatchPlayerZ(SpriteNum);
|
||||||
|
|
||||||
|
DoActorSectorDamage(SpriteNum);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int DoCoolgMatchPlayerZ(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
SPRITEp tsp = User[SpriteNum]->tgt_sp;
|
||||||
|
int zdiff,zdist;
|
||||||
|
int loz,hiz;
|
||||||
|
|
||||||
|
int bound;
|
||||||
|
|
||||||
|
// If blocking bits get unset, just die
|
||||||
|
if (!TEST(sp->cstat,CSTAT_SPRITE_BLOCK) || !TEST(sp->cstat,CSTAT_SPRITE_BLOCK_HITSCAN))
|
||||||
|
{
|
||||||
|
InitBloodSpray(SpriteNum, TRUE, 105);
|
||||||
|
InitBloodSpray(SpriteNum, TRUE, 105);
|
||||||
|
UpdateSinglePlayKills(SpriteNum);
|
||||||
|
SetSuicide(SpriteNum);
|
||||||
|
}
|
||||||
|
|
||||||
|
// actor does a sine wave about u->sz - this is the z mid point
|
||||||
|
|
||||||
|
zdiff = (SPRITEp_MID(tsp)) - u->sz;
|
||||||
|
|
||||||
|
// check z diff of the player and the sprite
|
||||||
|
zdist = Z(20 + RANDOM_RANGE(100)); // put a random amount
|
||||||
|
//zdist = Z(20);
|
||||||
|
if (labs(zdiff) > zdist)
|
||||||
|
{
|
||||||
|
if (zdiff > 0)
|
||||||
|
u->sz += 170 * ACTORMOVETICS;
|
||||||
|
else
|
||||||
|
u->sz -= 170 * ACTORMOVETICS;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define COOLG_BOB_AMT (Z(8))
|
||||||
|
|
||||||
|
// save off lo and hi z
|
||||||
|
loz = u->loz;
|
||||||
|
hiz = u->hiz;
|
||||||
|
|
||||||
|
// adjust loz/hiz for water depth
|
||||||
|
if (u->lo_sectp && SectUser[u->lo_sectp - sector] && SectUser[u->lo_sectp - sector]->depth)
|
||||||
|
loz -= Z(SectUser[u->lo_sectp - sector]->depth) - Z(8);
|
||||||
|
|
||||||
|
// lower bound
|
||||||
|
if (u->lo_sp)
|
||||||
|
bound = loz - u->floor_dist;
|
||||||
|
else
|
||||||
|
bound = loz - u->floor_dist - COOLG_BOB_AMT;
|
||||||
|
|
||||||
|
if (u->sz > bound)
|
||||||
|
{
|
||||||
|
u->sz = bound;
|
||||||
|
}
|
||||||
|
|
||||||
|
// upper bound
|
||||||
|
if (u->hi_sp)
|
||||||
|
bound = hiz + u->ceiling_dist;
|
||||||
|
else
|
||||||
|
bound = hiz + u->ceiling_dist + COOLG_BOB_AMT;
|
||||||
|
|
||||||
|
if (u->sz < bound)
|
||||||
|
{
|
||||||
|
u->sz = bound;
|
||||||
|
}
|
||||||
|
|
||||||
|
u->sz = min(u->sz, loz - u->floor_dist);
|
||||||
|
u->sz = max(u->sz, hiz + u->ceiling_dist);
|
||||||
|
|
||||||
|
u->Counter = (u->Counter + (ACTORMOVETICS<<3)) & 2047;
|
||||||
|
sp->z = u->sz + ((COOLG_BOB_AMT * (int)sintable[u->Counter]) >> 14);
|
||||||
|
|
||||||
|
bound = u->hiz + u->ceiling_dist + COOLG_BOB_AMT;
|
||||||
|
if (sp->z < bound)
|
||||||
|
{
|
||||||
|
// bumped something
|
||||||
|
sp->z = u->sz = bound + COOLG_BOB_AMT;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int InitCoolgCircle(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
|
|
||||||
|
u->ActorActionFunc = DoCoolgCircle;
|
||||||
|
|
||||||
|
NewStateGroup(SpriteNum, u->ActorActionSet->Run);
|
||||||
|
|
||||||
|
// set it close
|
||||||
|
DoActorSetSpeed(SpriteNum, FAST_SPEED);
|
||||||
|
|
||||||
|
// set to really fast
|
||||||
|
sp->xvel = 400;
|
||||||
|
// angle adjuster
|
||||||
|
u->Counter2 = sp->xvel/3;
|
||||||
|
// random angle direction
|
||||||
|
if (RANDOM_P2(1024) < 512)
|
||||||
|
u->Counter2 = -u->Counter2;
|
||||||
|
|
||||||
|
// z velocity
|
||||||
|
u->jump_speed = 400 + RANDOM_P2(256);
|
||||||
|
if (labs(u->sz - u->hiz) < labs(u->sz - u->loz))
|
||||||
|
u->jump_speed = -u->jump_speed;
|
||||||
|
|
||||||
|
u->WaitTics = (RANDOM_RANGE(3)+1) * 120;
|
||||||
|
|
||||||
|
(*u->ActorActionFunc)(SpriteNum);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int DoCoolgCircle(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
SPRITEp tsp = User[SpriteNum]->tgt_sp;
|
||||||
|
int nx,ny,bound;
|
||||||
|
|
||||||
|
|
||||||
|
sp->ang = NORM_ANGLE(sp->ang + u->Counter2);
|
||||||
|
|
||||||
|
nx = sp->xvel * (int) sintable[NORM_ANGLE(sp->ang + 512)] >> 14;
|
||||||
|
ny = sp->xvel * (int) sintable[sp->ang] >> 14;
|
||||||
|
|
||||||
|
if (!move_actor(SpriteNum, nx, ny, 0L))
|
||||||
|
{
|
||||||
|
InitActorReposition(SpriteNum);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// move in the z direction
|
||||||
|
u->sz -= u->jump_speed * ACTORMOVETICS;
|
||||||
|
|
||||||
|
bound = u->hiz + u->ceiling_dist + COOLG_BOB_AMT;
|
||||||
|
if (u->sz < bound)
|
||||||
|
{
|
||||||
|
// bumped something
|
||||||
|
u->sz = bound;
|
||||||
|
InitActorReposition(SpriteNum);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// time out
|
||||||
|
if ((u->WaitTics -= ACTORMOVETICS) < 0)
|
||||||
|
{
|
||||||
|
InitActorReposition(SpriteNum);
|
||||||
|
u->WaitTics = 0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
DoCoolgDeath(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
int nx, ny;
|
||||||
|
|
||||||
|
|
||||||
|
RESET(sp->cstat, CSTAT_SPRITE_TRANSLUCENT);
|
||||||
|
RESET(sp->cstat, CSTAT_SPRITE_INVISIBLE);
|
||||||
|
sp->xrepeat = 42;
|
||||||
|
sp->shade = -10;
|
||||||
|
|
||||||
|
if (TEST(u->Flags, SPR_FALLING))
|
||||||
|
{
|
||||||
|
DoFall(SpriteNum);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DoFindGroundPoint(SpriteNum);
|
||||||
|
u->floor_dist = 0;
|
||||||
|
DoBeginFall(SpriteNum);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (TEST(u->Flags, SPR_SLIDING))
|
||||||
|
DoActorSlide(SpriteNum);
|
||||||
|
|
||||||
|
// slide while falling
|
||||||
|
nx = sp->xvel * (int) sintable[NORM_ANGLE(sp->ang + 512)] >> 14;
|
||||||
|
ny = sp->xvel * (int) sintable[sp->ang] >> 14;
|
||||||
|
|
||||||
|
u->ret = move_sprite(SpriteNum, nx, ny, 0L, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, ACTORMOVETICS);
|
||||||
|
DoFindGroundPoint(SpriteNum);
|
||||||
|
|
||||||
|
// on the ground
|
||||||
|
if (sp->z >= u->loz)
|
||||||
|
{
|
||||||
|
RESET(u->Flags, SPR_FALLING|SPR_SLIDING);
|
||||||
|
RESET(sp->cstat, CSTAT_SPRITE_YFLIP); // If upside down, reset it
|
||||||
|
NewStateGroup(SpriteNum, u->ActorActionSet->Dead);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int DoCoolgMove(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
|
if ((u->ShellNum -= ACTORMOVETICS) <= 0)
|
||||||
|
{
|
||||||
|
switch (u->FlagOwner)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
SET(sp->cstat, CSTAT_SPRITE_TRANSLUCENT);
|
||||||
|
u->ShellNum = SEC(2);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
PlaySound(DIGI_VOID3, &sp->x, &sp->y, &sp->z, v3df_follow);
|
||||||
|
RESET(sp->cstat, CSTAT_SPRITE_TRANSLUCENT);
|
||||||
|
SET(sp->cstat, CSTAT_SPRITE_INVISIBLE);
|
||||||
|
u->ShellNum = SEC(1) + SEC(RANDOM_RANGE(2));
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
SET(sp->cstat, CSTAT_SPRITE_TRANSLUCENT);
|
||||||
|
RESET(sp->cstat, CSTAT_SPRITE_INVISIBLE);
|
||||||
|
u->ShellNum = SEC(2);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
PlaySound(DIGI_VOID3, &sp->x, &sp->y, &sp->z, v3df_follow);
|
||||||
|
RESET(sp->cstat, CSTAT_SPRITE_TRANSLUCENT);
|
||||||
|
RESET(sp->cstat, CSTAT_SPRITE_INVISIBLE);
|
||||||
|
u->ShellNum = SEC(2) + SEC(RANDOM_RANGE(3));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
u->FlagOwner = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
u->FlagOwner++;
|
||||||
|
if (u->FlagOwner > 3) u->FlagOwner = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (u->FlagOwner-1 == 0)
|
||||||
|
{
|
||||||
|
sp->xrepeat--;
|
||||||
|
sp->shade++;
|
||||||
|
if (sp->xrepeat < 4) sp->xrepeat = 4;
|
||||||
|
if (sp->shade > 126)
|
||||||
|
{
|
||||||
|
sp->shade = 127;
|
||||||
|
sp->hitag = 9998;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (u->FlagOwner-1 == 2)
|
||||||
|
{
|
||||||
|
sp->hitag = 0;
|
||||||
|
sp->xrepeat++;
|
||||||
|
sp->shade--;
|
||||||
|
if (sp->xrepeat > 42) sp->xrepeat = 42;
|
||||||
|
if (sp->shade < -10) sp->shade = -10;
|
||||||
|
}
|
||||||
|
else if (u->FlagOwner == 0)
|
||||||
|
{
|
||||||
|
sp->xrepeat = 42;
|
||||||
|
sp->shade = -10;
|
||||||
|
sp->hitag = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (TEST(u->Flags,SPR_SLIDING))
|
||||||
|
DoActorSlide(SpriteNum);
|
||||||
|
|
||||||
|
if (u->track >= 0)
|
||||||
|
ActorFollowTrack(SpriteNum, ACTORMOVETICS);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
(*u->ActorActionFunc)(SpriteNum);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (RANDOM_P2(1024) < 32 && !TEST(sp->cstat, CSTAT_SPRITE_INVISIBLE))
|
||||||
|
InitCoolgDrip(SpriteNum);
|
||||||
|
|
||||||
|
DoCoolgMatchPlayerZ(SpriteNum);
|
||||||
|
|
||||||
|
DoActorSectorDamage(SpriteNum);
|
||||||
|
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
int DoCoolgPain(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
|
NullCoolg(SpriteNum);
|
||||||
|
|
||||||
|
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
|
||||||
|
InitActorDecide(SpriteNum);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#include "saveable.h"
|
||||||
|
|
||||||
|
static saveable_code saveable_coolg_code[] =
|
||||||
|
{
|
||||||
|
SAVE_CODE(CoolgCommon),
|
||||||
|
SAVE_CODE(SetupCoolg),
|
||||||
|
SAVE_CODE(NewCoolg),
|
||||||
|
SAVE_CODE(DoCoolgBirth),
|
||||||
|
SAVE_CODE(NullCoolg),
|
||||||
|
SAVE_CODE(DoCoolgMatchPlayerZ),
|
||||||
|
SAVE_CODE(InitCoolgCircle),
|
||||||
|
SAVE_CODE(DoCoolgCircle),
|
||||||
|
SAVE_CODE(DoCoolgDeath),
|
||||||
|
SAVE_CODE(DoCoolgMove),
|
||||||
|
SAVE_CODE(DoCoolgPain),
|
||||||
|
};
|
||||||
|
|
||||||
|
static saveable_data saveable_coolg_data[] =
|
||||||
|
{
|
||||||
|
SAVE_DATA(CoolgBattle),
|
||||||
|
SAVE_DATA(CoolgOffense),
|
||||||
|
SAVE_DATA(CoolgBroadcast),
|
||||||
|
SAVE_DATA(CoolgSurprised),
|
||||||
|
SAVE_DATA(CoolgEvasive),
|
||||||
|
SAVE_DATA(CoolgLostTarget),
|
||||||
|
SAVE_DATA(CoolgCloseRange),
|
||||||
|
SAVE_DATA(CoolgTouchTarget),
|
||||||
|
|
||||||
|
SAVE_DATA(CoolgPersonality),
|
||||||
|
|
||||||
|
SAVE_DATA(CoolgAttrib),
|
||||||
|
|
||||||
|
SAVE_DATA(s_CoolgRun),
|
||||||
|
SAVE_DATA(sg_CoolgRun),
|
||||||
|
SAVE_DATA(s_CoolgStand),
|
||||||
|
SAVE_DATA(sg_CoolgStand),
|
||||||
|
SAVE_DATA(s_CoolgClub),
|
||||||
|
SAVE_DATA(sg_CoolgClub),
|
||||||
|
SAVE_DATA(s_CoolgAttack),
|
||||||
|
SAVE_DATA(sg_CoolgAttack),
|
||||||
|
SAVE_DATA(s_CoolgPain),
|
||||||
|
SAVE_DATA(sg_CoolgPain),
|
||||||
|
SAVE_DATA(s_CoolgDie),
|
||||||
|
SAVE_DATA(sg_CoolgDie),
|
||||||
|
SAVE_DATA(s_CoolgDead),
|
||||||
|
SAVE_DATA(sg_CoolgDead),
|
||||||
|
SAVE_DATA(s_CoolgBirth),
|
||||||
|
SAVE_DATA(sg_CoolgBirth),
|
||||||
|
|
||||||
|
SAVE_DATA(CoolgActionSet),
|
||||||
|
};
|
||||||
|
|
||||||
|
saveable_module saveable_coolg =
|
||||||
|
{
|
||||||
|
// code
|
||||||
|
saveable_coolg_code,
|
||||||
|
SIZ(saveable_coolg_code),
|
||||||
|
|
||||||
|
// data
|
||||||
|
saveable_coolg_data,
|
||||||
|
SIZ(saveable_coolg_data)
|
||||||
|
};
|
736
polymer/eduke32/source/sw/src/coolie.c
Normal file
736
polymer/eduke32/source/sw/src/coolie.c
Normal file
|
@ -0,0 +1,736 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
#include "build.h"
|
||||||
|
|
||||||
|
#include "keys.h"
|
||||||
|
#include "names2.h"
|
||||||
|
#include "panel.h"
|
||||||
|
#include "game.h"
|
||||||
|
#include "tags.h"
|
||||||
|
#include "ai.h"
|
||||||
|
#include "sprite.h"
|
||||||
|
#include "actor.h"
|
||||||
|
#include "track.h"
|
||||||
|
#include "weapon.h"
|
||||||
|
|
||||||
|
ANIMATOR InitCoolieCharge;
|
||||||
|
|
||||||
|
DECISION CoolieBattle[] =
|
||||||
|
{
|
||||||
|
{700, InitCoolieCharge },
|
||||||
|
{990, InitActorMoveCloser },
|
||||||
|
{1000, InitActorAttackNoise },
|
||||||
|
{1024, InitActorRunAway }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION CoolieOffense[] =
|
||||||
|
{
|
||||||
|
{700, InitCoolieCharge },
|
||||||
|
{1015, InitActorMoveCloser },
|
||||||
|
{1024, InitActorAttackNoise }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION CoolieBroadcast[] =
|
||||||
|
{
|
||||||
|
//{1, InitActorAlertNoise },
|
||||||
|
{16, InitActorAmbientNoise },
|
||||||
|
{1024, InitActorDecide }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION CoolieSurprised[] =
|
||||||
|
{
|
||||||
|
{700, InitActorMoveCloser },
|
||||||
|
{703, InitActorAmbientNoise },
|
||||||
|
{1024, InitActorDecide }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION CoolieEvasive[] =
|
||||||
|
{
|
||||||
|
{10, InitActorEvade },
|
||||||
|
{1024, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION CoolieLostTarget[] =
|
||||||
|
{
|
||||||
|
{900, InitActorFindPlayer },
|
||||||
|
{1024, InitActorWanderAround }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION CoolieCloseRange[] =
|
||||||
|
{
|
||||||
|
{400, InitCoolieCharge },
|
||||||
|
{1024, InitActorReposition }
|
||||||
|
};
|
||||||
|
|
||||||
|
PERSONALITY CooliePersonality =
|
||||||
|
{
|
||||||
|
CoolieBattle,
|
||||||
|
CoolieOffense,
|
||||||
|
CoolieBroadcast,
|
||||||
|
CoolieSurprised,
|
||||||
|
CoolieEvasive,
|
||||||
|
CoolieLostTarget,
|
||||||
|
CoolieCloseRange,
|
||||||
|
CoolieCloseRange
|
||||||
|
};
|
||||||
|
|
||||||
|
ATTRIBUTE CoolieAttrib =
|
||||||
|
{
|
||||||
|
{60, 80, 100, 200}, // Speeds
|
||||||
|
{3, 0, -2, -3}, // Tic Adjusts
|
||||||
|
3, // MaxWeapons;
|
||||||
|
{
|
||||||
|
DIGI_COOLIEAMBIENT, DIGI_COOLIEALERT, DIGI_COOLIEALERT,
|
||||||
|
DIGI_COOLIEPAIN, 0, DIGI_CGMATERIALIZE,
|
||||||
|
DIGI_COOLIEEXPLODE,0,0,0
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// COOLIE RUN
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define COOLIE_RATE 12
|
||||||
|
|
||||||
|
ANIMATOR DoCoolieMove,NullCoolie,DoStayOnFloor,
|
||||||
|
DoActorDebris, SpawnCoolieExp,
|
||||||
|
SpawnCoolg;
|
||||||
|
|
||||||
|
STATE s_CoolieRun[5][4] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{COOLIE_RUN_R0 + 0, COOLIE_RATE, DoCoolieMove, &s_CoolieRun[0][1]},
|
||||||
|
{COOLIE_RUN_R0 + 1, COOLIE_RATE, DoCoolieMove, &s_CoolieRun[0][2]},
|
||||||
|
{COOLIE_RUN_R0 + 2, COOLIE_RATE, DoCoolieMove, &s_CoolieRun[0][3]},
|
||||||
|
{COOLIE_RUN_R0 + 3, COOLIE_RATE, DoCoolieMove, &s_CoolieRun[0][0]}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLIE_RUN_R1 + 0, COOLIE_RATE, DoCoolieMove, &s_CoolieRun[1][1]},
|
||||||
|
{COOLIE_RUN_R1 + 1, COOLIE_RATE, DoCoolieMove, &s_CoolieRun[1][2]},
|
||||||
|
{COOLIE_RUN_R1 + 2, COOLIE_RATE, DoCoolieMove, &s_CoolieRun[1][3]},
|
||||||
|
{COOLIE_RUN_R1 + 3, COOLIE_RATE, DoCoolieMove, &s_CoolieRun[1][0]}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLIE_RUN_R2 + 0, COOLIE_RATE, DoCoolieMove, &s_CoolieRun[2][1]},
|
||||||
|
{COOLIE_RUN_R2 + 1, COOLIE_RATE, DoCoolieMove, &s_CoolieRun[2][2]},
|
||||||
|
{COOLIE_RUN_R2 + 2, COOLIE_RATE, DoCoolieMove, &s_CoolieRun[2][3]},
|
||||||
|
{COOLIE_RUN_R2 + 3, COOLIE_RATE, DoCoolieMove, &s_CoolieRun[2][0]}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLIE_RUN_R3 + 0, COOLIE_RATE, DoCoolieMove, &s_CoolieRun[3][1]},
|
||||||
|
{COOLIE_RUN_R3 + 1, COOLIE_RATE, DoCoolieMove, &s_CoolieRun[3][2]},
|
||||||
|
{COOLIE_RUN_R3 + 2, COOLIE_RATE, DoCoolieMove, &s_CoolieRun[3][3]},
|
||||||
|
{COOLIE_RUN_R3 + 3, COOLIE_RATE, DoCoolieMove, &s_CoolieRun[3][0]}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLIE_RUN_R4 + 0, COOLIE_RATE, DoCoolieMove, &s_CoolieRun[4][1]},
|
||||||
|
{COOLIE_RUN_R4 + 1, COOLIE_RATE, DoCoolieMove, &s_CoolieRun[4][2]},
|
||||||
|
{COOLIE_RUN_R4 + 2, COOLIE_RATE, DoCoolieMove, &s_CoolieRun[4][3]},
|
||||||
|
{COOLIE_RUN_R4 + 3, COOLIE_RATE, DoCoolieMove, &s_CoolieRun[4][0]},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
STATEp sg_CoolieRun[] =
|
||||||
|
{
|
||||||
|
&s_CoolieRun[0][0],
|
||||||
|
&s_CoolieRun[1][0],
|
||||||
|
&s_CoolieRun[2][0],
|
||||||
|
&s_CoolieRun[3][0],
|
||||||
|
&s_CoolieRun[4][0]
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// COOLIE CHARGE
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define COOLIE_RATE 12
|
||||||
|
|
||||||
|
ANIMATOR DoCoolieMove,NullCoolie,DoStayOnFloor,
|
||||||
|
DoActorDebris, SpawnCoolieExp,
|
||||||
|
SpawnCoolg;
|
||||||
|
|
||||||
|
STATE s_CoolieCharge[5][4] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{COOLIE_CHARGE_R0 + 0, COOLIE_RATE, DoCoolieMove, &s_CoolieCharge[0][1]},
|
||||||
|
{COOLIE_CHARGE_R0 + 1, COOLIE_RATE, DoCoolieMove, &s_CoolieCharge[0][2]},
|
||||||
|
{COOLIE_CHARGE_R0 + 2, COOLIE_RATE, DoCoolieMove, &s_CoolieCharge[0][3]},
|
||||||
|
{COOLIE_CHARGE_R0 + 3, COOLIE_RATE, DoCoolieMove, &s_CoolieCharge[0][0]}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLIE_CHARGE_R1 + 0, COOLIE_RATE, DoCoolieMove, &s_CoolieCharge[1][1]},
|
||||||
|
{COOLIE_CHARGE_R1 + 1, COOLIE_RATE, DoCoolieMove, &s_CoolieCharge[1][2]},
|
||||||
|
{COOLIE_CHARGE_R1 + 2, COOLIE_RATE, DoCoolieMove, &s_CoolieCharge[1][3]},
|
||||||
|
{COOLIE_CHARGE_R1 + 3, COOLIE_RATE, DoCoolieMove, &s_CoolieCharge[1][0]}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLIE_CHARGE_R2 + 0, COOLIE_RATE, DoCoolieMove, &s_CoolieCharge[2][1]},
|
||||||
|
{COOLIE_CHARGE_R2 + 1, COOLIE_RATE, DoCoolieMove, &s_CoolieCharge[2][2]},
|
||||||
|
{COOLIE_CHARGE_R2 + 2, COOLIE_RATE, DoCoolieMove, &s_CoolieCharge[2][3]},
|
||||||
|
{COOLIE_CHARGE_R2 + 3, COOLIE_RATE, DoCoolieMove, &s_CoolieCharge[2][0]}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLIE_CHARGE_R3 + 0, COOLIE_RATE, DoCoolieMove, &s_CoolieCharge[3][1]},
|
||||||
|
{COOLIE_CHARGE_R3 + 1, COOLIE_RATE, DoCoolieMove, &s_CoolieCharge[3][2]},
|
||||||
|
{COOLIE_CHARGE_R3 + 2, COOLIE_RATE, DoCoolieMove, &s_CoolieCharge[3][3]},
|
||||||
|
{COOLIE_CHARGE_R3 + 3, COOLIE_RATE, DoCoolieMove, &s_CoolieCharge[3][0]}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLIE_CHARGE_R4 + 0, COOLIE_RATE, DoCoolieMove, &s_CoolieCharge[4][1]},
|
||||||
|
{COOLIE_CHARGE_R4 + 1, COOLIE_RATE, DoCoolieMove, &s_CoolieCharge[4][2]},
|
||||||
|
{COOLIE_CHARGE_R4 + 2, COOLIE_RATE, DoCoolieMove, &s_CoolieCharge[4][3]},
|
||||||
|
{COOLIE_CHARGE_R4 + 3, COOLIE_RATE, DoCoolieMove, &s_CoolieCharge[4][0]},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
STATEp sg_CoolieCharge[] =
|
||||||
|
{
|
||||||
|
&s_CoolieCharge[0][0],
|
||||||
|
&s_CoolieCharge[1][0],
|
||||||
|
&s_CoolieCharge[2][0],
|
||||||
|
&s_CoolieCharge[3][0],
|
||||||
|
&s_CoolieCharge[4][0]
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// COOLIE STAND
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
STATE s_CoolieStand[5][6] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{COOLIE_RUN_R0 + 0, COOLIE_RATE, DoCoolieMove, &s_CoolieStand[0][0]}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLIE_RUN_R1 + 0, COOLIE_RATE, DoCoolieMove, &s_CoolieStand[1][0]}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLIE_RUN_R2 + 0, COOLIE_RATE, DoCoolieMove, &s_CoolieStand[2][0]}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLIE_RUN_R3 + 0, COOLIE_RATE, DoCoolieMove, &s_CoolieStand[3][0]}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLIE_RUN_R4 + 0, COOLIE_RATE, DoCoolieMove, &s_CoolieStand[4][0]}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
STATEp sg_CoolieStand[] =
|
||||||
|
{
|
||||||
|
&s_CoolieStand[0][0],
|
||||||
|
&s_CoolieStand[1][0],
|
||||||
|
&s_CoolieStand[2][0],
|
||||||
|
&s_CoolieStand[3][0],
|
||||||
|
&s_CoolieStand[4][0]
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// COOLIE PAIN
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define COOLIE_PAIN_RATE 60
|
||||||
|
ANIMATOR CooliePain;
|
||||||
|
|
||||||
|
STATE s_CooliePain[5][1] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{COOLIE_PAIN_R0 + 0, COOLIE_PAIN_RATE, CooliePain, &s_CooliePain[0][0]},
|
||||||
|
//{COOLIE_PAIN_R0 + 0, 0|SF_QUICK_CALL, InitActorDecide, &s_CooliePain[0][0]}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLIE_PAIN_R1 + 0, COOLIE_PAIN_RATE, CooliePain, &s_CooliePain[1][0]},
|
||||||
|
//{COOLIE_PAIN_R1 + 0, 0|SF_QUICK_CALL, InitActorDecide, &s_CooliePain[1][0]}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLIE_PAIN_R2 + 0, COOLIE_PAIN_RATE, CooliePain, &s_CooliePain[2][0]},
|
||||||
|
//{COOLIE_PAIN_R2 + 0, 0|SF_QUICK_CALL, InitActorDecide, &s_CooliePain[2][0]}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLIE_PAIN_R3 + 0, COOLIE_PAIN_RATE, CooliePain, &s_CooliePain[3][0]},
|
||||||
|
//{COOLIE_PAIN_R3 + 0, 0|SF_QUICK_CALL, InitActorDecide, &s_CooliePain[3][0]}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{COOLIE_PAIN_R4 + 0, COOLIE_PAIN_RATE, CooliePain, &s_CooliePain[4][0]},
|
||||||
|
//{COOLIE_PAIN_R4 + 0, 0|SF_QUICK_CALL, InitActorDecide, &s_CooliePain[4][0]}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
STATEp sg_CooliePain[] =
|
||||||
|
{
|
||||||
|
&s_CooliePain[0][0],
|
||||||
|
&s_CooliePain[1][0],
|
||||||
|
&s_CooliePain[2][0],
|
||||||
|
&s_CooliePain[3][0],
|
||||||
|
&s_CooliePain[4][0]
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// COOLIE DIE
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define COOLIE_DIE_RATE 30
|
||||||
|
ANIMATOR DoCoolieWaitBirth;
|
||||||
|
|
||||||
|
STATE s_CoolieDie[] =
|
||||||
|
{
|
||||||
|
{COOLIE_DIE + 0, COOLIE_DIE_RATE, NullCoolie, &s_CoolieDie[1]},
|
||||||
|
|
||||||
|
{COOLIE_DIE + 0, 0|SF_QUICK_CALL, SpawnCoolieExp, &s_CoolieDie[2]},
|
||||||
|
|
||||||
|
{COOLIE_DIE + 1, COOLIE_DIE_RATE, NullCoolie, &s_CoolieDie[3]},
|
||||||
|
{COOLIE_DIE + 2, COOLIE_DIE_RATE, NullCoolie, &s_CoolieDie[4]},
|
||||||
|
{COOLIE_DIE + 3, COOLIE_DIE_RATE, NullCoolie, &s_CoolieDie[5]},
|
||||||
|
{COOLIE_DIE + 4, COOLIE_DIE_RATE, NullCoolie, &s_CoolieDie[6]},
|
||||||
|
{COOLIE_DIE + 5, COOLIE_DIE_RATE, NullCoolie, &s_CoolieDie[7]},
|
||||||
|
{COOLIE_DIE + 6, COOLIE_DIE_RATE, NullCoolie, &s_CoolieDie[8]},
|
||||||
|
{COOLIE_DIE + 7, COOLIE_DIE_RATE, DoCoolieWaitBirth, &s_CoolieDie[8]},
|
||||||
|
|
||||||
|
{COOLIE_DIE + 7, COOLIE_DIE_RATE*5, DoActorDebris, &s_CoolieDie[10]},
|
||||||
|
{COOLIE_DIE + 7, 0|SF_QUICK_CALL, SpawnCoolg, &s_CoolieDie[11]},
|
||||||
|
{COOLIE_DEAD_NOHEAD, SF_QUICK_CALL, QueueFloorBlood, &s_CoolieDie[12]},
|
||||||
|
{COOLIE_DEAD_NOHEAD, COOLIE_DIE_RATE, DoActorDebris, &s_CoolieDie[12]}
|
||||||
|
};
|
||||||
|
|
||||||
|
STATEp sg_CoolieDie[] =
|
||||||
|
{
|
||||||
|
s_CoolieDie
|
||||||
|
};
|
||||||
|
|
||||||
|
STATE s_CoolieDead[] =
|
||||||
|
{
|
||||||
|
{COOLIE_DEAD, COOLIE_DIE_RATE, DoActorDebris, &s_CoolieDead[0]},
|
||||||
|
};
|
||||||
|
|
||||||
|
STATEp sg_CoolieDead[] =
|
||||||
|
{
|
||||||
|
s_CoolieDead
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
#define MAX_ACTOR_CLOSE_ATTACK 2
|
||||||
|
#define MAX_ACTOR_ATTACK 6
|
||||||
|
STATEp *Stand;
|
||||||
|
STATEp *Run;
|
||||||
|
STATEp *Jump;
|
||||||
|
STATEp *Fall;
|
||||||
|
STATEp *Crawl;
|
||||||
|
STATEp *Swim;
|
||||||
|
STATEp *Fly;
|
||||||
|
STATEp *Rise;
|
||||||
|
STATEp *Sit;
|
||||||
|
STATEp *Look;
|
||||||
|
STATEp *Climb;
|
||||||
|
STATEp *Pain;
|
||||||
|
STATEp *Death1;
|
||||||
|
STATEp *Death2;
|
||||||
|
STATEp *Dead;
|
||||||
|
STATEp *DeathJump;
|
||||||
|
STATEp *DeathFall;
|
||||||
|
|
||||||
|
STATEp *CloseAttack[MAX_ACTOR_CLOSE_ATTACK];
|
||||||
|
short CloseAttackPercent[MAX_ACTOR_CLOSE_ATTACK];
|
||||||
|
|
||||||
|
STATEp *Attack[MAX_ACTOR_ATTACK];
|
||||||
|
short AttackPercent[MAX_ACTOR_ATTACK];
|
||||||
|
|
||||||
|
STATEp *Special[2];
|
||||||
|
STATEp *Duck;
|
||||||
|
STATEp *Dive;
|
||||||
|
}ACTOR_ACTION_SET,*ACTOR_ACTION_SETp;
|
||||||
|
*/
|
||||||
|
|
||||||
|
ACTOR_ACTION_SET CoolieActionSet =
|
||||||
|
{
|
||||||
|
sg_CoolieStand,
|
||||||
|
sg_CoolieRun,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL, //climb
|
||||||
|
sg_CooliePain, //pain
|
||||||
|
sg_CoolieDie,
|
||||||
|
NULL,
|
||||||
|
sg_CoolieDead,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
{sg_CoolieCharge},
|
||||||
|
{1024},
|
||||||
|
{sg_CoolieCharge},
|
||||||
|
{1024},
|
||||||
|
{NULL},
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
VOID EnemyDefaults(short SpriteNum, ACTOR_ACTION_SETp action, PERSONALITYp person)
|
||||||
|
{
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
unsigned int wpn;
|
||||||
|
short wpn_cnt;
|
||||||
|
short depth = 0;
|
||||||
|
extern short TotalKillable;
|
||||||
|
extern BOOL DebugSecret;
|
||||||
|
|
||||||
|
switch (u->ID)
|
||||||
|
{
|
||||||
|
case PACHINKO1:
|
||||||
|
case PACHINKO2:
|
||||||
|
case PACHINKO3:
|
||||||
|
case PACHINKO4:
|
||||||
|
case 623:
|
||||||
|
case TOILETGIRL_R0:
|
||||||
|
case WASHGIRL_R0:
|
||||||
|
case CARGIRL_R0:
|
||||||
|
case MECHANICGIRL_R0:
|
||||||
|
case SAILORGIRL_R0:
|
||||||
|
case PRUNEGIRL_R0:
|
||||||
|
case TRASHCAN:
|
||||||
|
case BUNNY_RUN_R0:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
TotalKillable++;
|
||||||
|
#if DEBUG
|
||||||
|
if (DebugSecret)
|
||||||
|
{
|
||||||
|
sprintf(ds,"COUNTED: spnum %d, pic %d, x %d, y %d",SpriteNum,sp->picnum,sp->x,sp->y);
|
||||||
|
DebugWriteString(ds);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
RESET(sp->cstat, CSTAT_SPRITE_RESTORE);
|
||||||
|
|
||||||
|
u->spal = sp->pal;
|
||||||
|
|
||||||
|
u->RotNum = 5;
|
||||||
|
sp->clipdist = (256) >> 2;
|
||||||
|
|
||||||
|
u->zclip = Z(48);
|
||||||
|
u->lo_step = Z(32);
|
||||||
|
|
||||||
|
u->floor_dist = u->zclip - u->lo_step;
|
||||||
|
u->ceiling_dist = SPRITEp_SIZE_Z(sp) - u->zclip;
|
||||||
|
|
||||||
|
u->Radius = 400;
|
||||||
|
|
||||||
|
u->MaxHealth = u->Health;
|
||||||
|
|
||||||
|
u->PainThreshold = DIV16(u->Health) - 1;
|
||||||
|
//u->PainThreshold = DIV4(u->Health) - 1;
|
||||||
|
|
||||||
|
SET(sp->cstat,CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||||
|
SET(sp->extra,SPRX_PLAYER_OR_ENEMY);
|
||||||
|
|
||||||
|
sprite[SpriteNum].picnum = u->State->Pic;
|
||||||
|
change_sprite_stat(SpriteNum, STAT_ENEMY);
|
||||||
|
|
||||||
|
u->Personality = person;
|
||||||
|
u->ActorActionSet = action;
|
||||||
|
|
||||||
|
DoActorZrange(SpriteNum);
|
||||||
|
|
||||||
|
//KeepActorOnFloor(SpriteNum); // for swimming actors
|
||||||
|
|
||||||
|
// make sure we start in the water if thats where we are
|
||||||
|
if (u->lo_sectp) // && SectUser[u->lo_sectp - sector])
|
||||||
|
{
|
||||||
|
short i,nexti;
|
||||||
|
short sectnum = u->lo_sectp - sector;
|
||||||
|
|
||||||
|
if (SectUser[sectnum] && TEST(u->lo_sectp->extra, SECTFX_SINK))
|
||||||
|
{
|
||||||
|
depth = SectUser[sectnum]->depth;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TRAVERSE_SPRITE_SECT(headspritesect[sectnum],i,nexti)
|
||||||
|
{
|
||||||
|
SPRITEp np = &sprite[i];
|
||||||
|
if (np->picnum == ST1 && np->hitag == SECT_SINK)
|
||||||
|
{
|
||||||
|
depth = np->lotag;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (depth && labs(sp->z - u->loz) < Z(8))
|
||||||
|
{
|
||||||
|
sp->z += Z(depth);
|
||||||
|
u->loz = sp->z;
|
||||||
|
u->oz = sp->z;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!action)
|
||||||
|
return;
|
||||||
|
|
||||||
|
NewStateGroup(SpriteNum, u->ActorActionSet->Run);
|
||||||
|
|
||||||
|
u->ActorActionFunc = DoActorDecide;
|
||||||
|
|
||||||
|
// find the number of long range attacks
|
||||||
|
for (wpn = wpn_cnt = 0; wpn < SIZ(u->ActorActionSet->Attack); wpn++)
|
||||||
|
{
|
||||||
|
if (u->ActorActionSet->Attack[wpn])
|
||||||
|
wpn_cnt++;
|
||||||
|
else
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// for actors this tells the number of weapons available
|
||||||
|
// for player it tells the current weapon
|
||||||
|
u->WeaponNum = wpn_cnt;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
SetupCoolie(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
USERp u;
|
||||||
|
ANIMATOR DoActorDecide;
|
||||||
|
|
||||||
|
if (TEST(sp->cstat, CSTAT_SPRITE_RESTORE))
|
||||||
|
{
|
||||||
|
u = User[SpriteNum];
|
||||||
|
ASSERT(u);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
User[SpriteNum] = u = SpawnUser(SpriteNum,COOLIE_RUN_R0,s_CoolieRun[0]);
|
||||||
|
u->Health = HEALTH_COOLIE;
|
||||||
|
}
|
||||||
|
|
||||||
|
ChangeState(SpriteNum,s_CoolieRun[0]);
|
||||||
|
u->Attrib = &CoolieAttrib;
|
||||||
|
DoActorSetSpeed(SpriteNum, NORM_SPEED);
|
||||||
|
u->StateEnd = s_CoolieDie;
|
||||||
|
u->Rot = sg_CoolieRun;
|
||||||
|
|
||||||
|
EnemyDefaults(SpriteNum, &CoolieActionSet, &CooliePersonality);
|
||||||
|
|
||||||
|
sp->xrepeat = 42;
|
||||||
|
sp->yrepeat = 42;
|
||||||
|
|
||||||
|
SET(u->Flags, SPR_XFLIP_TOGGLE);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int SpawnCoolg(short SpriteNum)
|
||||||
|
{
|
||||||
|
int NewCoolg(short);
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
|
// Don't do a ghost every time
|
||||||
|
if (RANDOM_RANGE(1000) > 700) return 0;
|
||||||
|
|
||||||
|
NewCoolg(SpriteNum);
|
||||||
|
|
||||||
|
PlaySpriteSound(SpriteNum,attr_extra1,v3df_follow);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int CooliePain(short SpriteNum)
|
||||||
|
{
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
SPRITEp sp = User[SpriteNum]->SpriteP;
|
||||||
|
|
||||||
|
if (TEST(u->Flags,SPR_SLIDING))
|
||||||
|
DoActorSlide(SpriteNum);
|
||||||
|
|
||||||
|
if (!TEST(u->Flags,SPR_CLIMBING))
|
||||||
|
KeepActorOnFloor(SpriteNum);
|
||||||
|
|
||||||
|
DoActorSectorDamage(SpriteNum);
|
||||||
|
|
||||||
|
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
|
||||||
|
InitActorDecide(SpriteNum);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int NullCoolie(short SpriteNum)
|
||||||
|
{
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
SPRITEp sp = User[SpriteNum]->SpriteP;
|
||||||
|
|
||||||
|
if (TEST(u->Flags,SPR_SLIDING))
|
||||||
|
DoActorSlide(SpriteNum);
|
||||||
|
|
||||||
|
if (!TEST(u->Flags,SPR_CLIMBING))
|
||||||
|
KeepActorOnFloor(SpriteNum);
|
||||||
|
|
||||||
|
DoActorSectorDamage(SpriteNum);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int DoCoolieMove(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
|
if (TEST(u->Flags,SPR_SLIDING))
|
||||||
|
DoActorSlide(SpriteNum);
|
||||||
|
|
||||||
|
if (u->track >= 0)
|
||||||
|
ActorFollowTrack(SpriteNum, ACTORMOVETICS);
|
||||||
|
else
|
||||||
|
(*u->ActorActionFunc)(SpriteNum);
|
||||||
|
|
||||||
|
KeepActorOnFloor(SpriteNum);
|
||||||
|
|
||||||
|
if (DoActorSectorDamage(SpriteNum))
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Distance(sp->x, sp->y, u->tgt_sp->x, u->tgt_sp->y) < 1200)
|
||||||
|
{
|
||||||
|
//DoActorDie(SpriteNum, -3);
|
||||||
|
UpdateSinglePlayKills(SpriteNum);
|
||||||
|
DoActorDie(SpriteNum, SpriteNum);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int InitCoolieCharge(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
|
if (RANDOM_P2(1024) > 950)
|
||||||
|
PlaySound(DIGI_COOLIESCREAM, &sp->x, &sp->y, &sp->z, v3df_follow);
|
||||||
|
|
||||||
|
DoActorSetSpeed(SpriteNum, FAST_SPEED);
|
||||||
|
|
||||||
|
InitActorMoveCloser(SpriteNum);
|
||||||
|
|
||||||
|
NewStateGroup(SpriteNum, sg_CoolieCharge);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
DoCoolieWaitBirth(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp;
|
||||||
|
USERp u;
|
||||||
|
|
||||||
|
u = User[SpriteNum];
|
||||||
|
sp = &sprite[SpriteNum];
|
||||||
|
|
||||||
|
if ((u->Counter -= ACTORMOVETICS) <= 0)
|
||||||
|
{
|
||||||
|
ChangeState(SpriteNum,&s_CoolieDie[9]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#include "saveable.h"
|
||||||
|
|
||||||
|
static saveable_code saveable_coolie_code[] =
|
||||||
|
{
|
||||||
|
SAVE_CODE(EnemyDefaults),
|
||||||
|
SAVE_CODE(SetupCoolie),
|
||||||
|
SAVE_CODE(SpawnCoolg),
|
||||||
|
SAVE_CODE(CooliePain),
|
||||||
|
SAVE_CODE(NullCoolie),
|
||||||
|
SAVE_CODE(DoCoolieMove),
|
||||||
|
SAVE_CODE(InitCoolieCharge),
|
||||||
|
SAVE_CODE(DoCoolieWaitBirth),
|
||||||
|
};
|
||||||
|
|
||||||
|
static saveable_data saveable_coolie_data[] =
|
||||||
|
{
|
||||||
|
SAVE_DATA(CoolieBattle),
|
||||||
|
SAVE_DATA(CoolieOffense),
|
||||||
|
SAVE_DATA(CoolieBroadcast),
|
||||||
|
SAVE_DATA(CoolieSurprised),
|
||||||
|
SAVE_DATA(CoolieEvasive),
|
||||||
|
SAVE_DATA(CoolieLostTarget),
|
||||||
|
SAVE_DATA(CoolieCloseRange),
|
||||||
|
|
||||||
|
SAVE_DATA(CooliePersonality),
|
||||||
|
|
||||||
|
SAVE_DATA(CoolieAttrib),
|
||||||
|
|
||||||
|
SAVE_DATA(s_CoolieRun),
|
||||||
|
SAVE_DATA(sg_CoolieRun),
|
||||||
|
SAVE_DATA(s_CoolieCharge),
|
||||||
|
SAVE_DATA(sg_CoolieCharge),
|
||||||
|
SAVE_DATA(s_CoolieStand),
|
||||||
|
SAVE_DATA(sg_CoolieStand),
|
||||||
|
SAVE_DATA(s_CooliePain),
|
||||||
|
SAVE_DATA(sg_CooliePain),
|
||||||
|
SAVE_DATA(s_CoolieDie),
|
||||||
|
SAVE_DATA(sg_CoolieDie),
|
||||||
|
SAVE_DATA(s_CoolieDead),
|
||||||
|
SAVE_DATA(sg_CoolieDead),
|
||||||
|
|
||||||
|
SAVE_DATA(CoolieActionSet),
|
||||||
|
};
|
||||||
|
|
||||||
|
saveable_module saveable_coolie =
|
||||||
|
{
|
||||||
|
// code
|
||||||
|
saveable_coolie_code,
|
||||||
|
SIZ(saveable_coolie_code),
|
||||||
|
|
||||||
|
// data
|
||||||
|
saveable_coolie_data,
|
||||||
|
SIZ(saveable_coolie_data)
|
||||||
|
};
|
238
polymer/eduke32/source/sw/src/copysect.c
Normal file
238
polymer/eduke32/source/sw/src/copysect.c
Normal file
|
@ -0,0 +1,238 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
#include "build.h"
|
||||||
|
|
||||||
|
#include "names2.h"
|
||||||
|
#include "game.h"
|
||||||
|
#include "tags.h"
|
||||||
|
#include "weapon.h"
|
||||||
|
#include "sprite.h"
|
||||||
|
#include "track.h"
|
||||||
|
|
||||||
|
void CopySectorWalls(short dest_sectnum, short src_sectnum)
|
||||||
|
{
|
||||||
|
short dest_wall_num, src_wall_num, start_wall;
|
||||||
|
|
||||||
|
dest_wall_num = sector[dest_sectnum].wallptr;
|
||||||
|
src_wall_num = sector[src_sectnum].wallptr;
|
||||||
|
|
||||||
|
start_wall = dest_wall_num;
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
wall[dest_wall_num].picnum = wall[src_wall_num].picnum;
|
||||||
|
|
||||||
|
wall[dest_wall_num].xrepeat = wall[src_wall_num].xrepeat;
|
||||||
|
wall[dest_wall_num].yrepeat = wall[src_wall_num].yrepeat;
|
||||||
|
wall[dest_wall_num].overpicnum = wall[src_wall_num].overpicnum;
|
||||||
|
wall[dest_wall_num].pal = wall[src_wall_num].pal;
|
||||||
|
wall[dest_wall_num].cstat = wall[src_wall_num].cstat;
|
||||||
|
wall[dest_wall_num].shade = wall[src_wall_num].shade;
|
||||||
|
wall[dest_wall_num].xpanning = wall[src_wall_num].xpanning;
|
||||||
|
wall[dest_wall_num].ypanning = wall[src_wall_num].ypanning;
|
||||||
|
wall[dest_wall_num].hitag = wall[src_wall_num].hitag;
|
||||||
|
wall[dest_wall_num].lotag = wall[src_wall_num].lotag;
|
||||||
|
wall[dest_wall_num].extra = wall[src_wall_num].extra;
|
||||||
|
|
||||||
|
if (wall[dest_wall_num].nextwall >= 0 && wall[src_wall_num].nextwall >= 0)
|
||||||
|
{
|
||||||
|
wall[wall[dest_wall_num].nextwall].picnum = wall[wall[src_wall_num].nextwall].picnum;
|
||||||
|
wall[wall[dest_wall_num].nextwall].xrepeat = wall[wall[src_wall_num].nextwall].xrepeat;
|
||||||
|
wall[wall[dest_wall_num].nextwall].yrepeat = wall[wall[src_wall_num].nextwall].yrepeat;
|
||||||
|
wall[wall[dest_wall_num].nextwall].overpicnum = wall[wall[src_wall_num].nextwall].overpicnum;
|
||||||
|
wall[wall[dest_wall_num].nextwall].pal = wall[wall[src_wall_num].nextwall].pal;
|
||||||
|
wall[wall[dest_wall_num].nextwall].cstat = wall[wall[src_wall_num].nextwall].cstat;
|
||||||
|
wall[wall[dest_wall_num].nextwall].shade = wall[wall[src_wall_num].nextwall].shade;
|
||||||
|
wall[wall[dest_wall_num].nextwall].xpanning = wall[wall[src_wall_num].nextwall].xpanning;
|
||||||
|
wall[wall[dest_wall_num].nextwall].ypanning = wall[wall[src_wall_num].nextwall].ypanning;
|
||||||
|
wall[wall[dest_wall_num].nextwall].hitag = wall[wall[src_wall_num].nextwall].hitag;
|
||||||
|
wall[wall[dest_wall_num].nextwall].lotag = wall[wall[src_wall_num].nextwall].lotag;
|
||||||
|
wall[wall[dest_wall_num].nextwall].extra = wall[wall[src_wall_num].nextwall].extra;
|
||||||
|
}
|
||||||
|
|
||||||
|
dest_wall_num = wall[dest_wall_num].point2;
|
||||||
|
src_wall_num = wall[src_wall_num].point2;
|
||||||
|
}
|
||||||
|
while (dest_wall_num != start_wall);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CopySectorMatch(short match)
|
||||||
|
{
|
||||||
|
short ed,nexted,ss,nextss;
|
||||||
|
SPRITEp dest_sp, src_sp;
|
||||||
|
SECTORp dsectp,ssectp;
|
||||||
|
short kill, nextkill;
|
||||||
|
SPRITEp k;
|
||||||
|
|
||||||
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_COPY_DEST], ed, nexted)
|
||||||
|
{
|
||||||
|
dest_sp = &sprite[ed];
|
||||||
|
dsectp = §or[dest_sp->sectnum];
|
||||||
|
|
||||||
|
if (match != sprite[ed].lotag)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_COPY_SOURCE], ss, nextss)
|
||||||
|
{
|
||||||
|
src_sp = &sprite[ss];
|
||||||
|
|
||||||
|
if (SP_TAG2(src_sp) == SPRITE_TAG2(ed) &&
|
||||||
|
SP_TAG3(src_sp) == SPRITE_TAG3(ed))
|
||||||
|
{
|
||||||
|
short src_move, nextsrc_move;
|
||||||
|
ssectp = §or[src_sp->sectnum];
|
||||||
|
|
||||||
|
// !!!!!AAAAAAAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHH
|
||||||
|
// Don't kill anything you don't have to
|
||||||
|
// this wall killing things on a Queue causing
|
||||||
|
// invalid situations
|
||||||
|
|
||||||
|
#if 1
|
||||||
|
// kill all sprites in the dest sector that need to be
|
||||||
|
TRAVERSE_SPRITE_SECT(headspritesect[dest_sp->sectnum], kill, nextkill)
|
||||||
|
{
|
||||||
|
k = &sprite[kill];
|
||||||
|
|
||||||
|
// kill anything not invisible
|
||||||
|
if (!TEST(k->cstat, CSTAT_SPRITE_INVISIBLE))
|
||||||
|
{
|
||||||
|
if (User[kill])
|
||||||
|
{
|
||||||
|
// be safe with the killing
|
||||||
|
//SetSuicide(kill);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SpriteQueueDelete(kill); // new function to allow killing - hopefully
|
||||||
|
KillSprite(kill);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
CopySectorWalls(dest_sp->sectnum, src_sp->sectnum);
|
||||||
|
|
||||||
|
TRAVERSE_SPRITE_SECT(headspritesect[src_sp->sectnum], src_move, nextsrc_move)
|
||||||
|
{
|
||||||
|
// don't move ST1 Copy Tags
|
||||||
|
if (SPRITE_TAG1(src_move) != SECT_COPY_SOURCE)
|
||||||
|
{
|
||||||
|
int sx,sy,dx,dy,src_xoff,src_yoff,trash;
|
||||||
|
|
||||||
|
// move sprites from source to dest - use center offset
|
||||||
|
|
||||||
|
// get center of src and dest sect
|
||||||
|
SectorMidPoint(src_sp->sectnum, &sx, &sy, &trash);
|
||||||
|
SectorMidPoint(dest_sp->sectnum, &dx, &dy, &trash);
|
||||||
|
|
||||||
|
// get offset
|
||||||
|
src_xoff = sx - sprite[src_move].x;
|
||||||
|
src_yoff = sy - sprite[src_move].y;
|
||||||
|
|
||||||
|
// move sprite to dest sector
|
||||||
|
sprite[src_move].x = dx - src_xoff;
|
||||||
|
sprite[src_move].y = dy - src_yoff;
|
||||||
|
|
||||||
|
// change sector
|
||||||
|
changespritesect(src_move, dest_sp->sectnum);
|
||||||
|
|
||||||
|
// check to see if it moved on to a sector object
|
||||||
|
if (TEST(sector[dest_sp->sectnum].extra, SECTFX_SECTOR_OBJECT))
|
||||||
|
{
|
||||||
|
SECTOR_OBJECTp sop;
|
||||||
|
extern short GlobSpeedSO;
|
||||||
|
|
||||||
|
// find and add sprite to SO
|
||||||
|
sop = DetectSectorObject(§or[sprite[src_move].sectnum]);
|
||||||
|
AddSpriteToSectorObject(src_move, sop);
|
||||||
|
|
||||||
|
// update sprites postions so they aren't in the
|
||||||
|
// wrong place for one frame
|
||||||
|
GlobSpeedSO = 0;
|
||||||
|
RefreshPoints(sop, 0, 0, TRUE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// copy sector user if there is one
|
||||||
|
if (SectUser[src_sp->sectnum] || SectUser[dest_sp->sectnum])
|
||||||
|
{
|
||||||
|
SECT_USERp ssectu = GetSectUser(src_sp->sectnum);
|
||||||
|
SECT_USERp dsectu = GetSectUser(dest_sp->sectnum);
|
||||||
|
|
||||||
|
memcpy(dsectu, ssectu, sizeof(SECT_USER));
|
||||||
|
}
|
||||||
|
|
||||||
|
dsectp->hitag = ssectp->hitag;
|
||||||
|
dsectp->lotag = ssectp->lotag;
|
||||||
|
|
||||||
|
dsectp->floorz = ssectp->floorz;
|
||||||
|
dsectp->ceilingz = ssectp->ceilingz;
|
||||||
|
|
||||||
|
dsectp->floorshade = ssectp->floorshade;
|
||||||
|
dsectp->ceilingshade = ssectp->ceilingshade;
|
||||||
|
|
||||||
|
dsectp->floorpicnum = ssectp->floorpicnum;
|
||||||
|
dsectp->ceilingpicnum = ssectp->ceilingpicnum;
|
||||||
|
|
||||||
|
dsectp->floorheinum = ssectp->floorheinum;
|
||||||
|
dsectp->ceilingheinum = ssectp->ceilingheinum;
|
||||||
|
|
||||||
|
dsectp->floorpal = ssectp->floorpal;
|
||||||
|
dsectp->ceilingpal = ssectp->ceilingpal;
|
||||||
|
|
||||||
|
dsectp->floorxpanning = ssectp->floorxpanning;
|
||||||
|
dsectp->ceilingxpanning = ssectp->ceilingxpanning;
|
||||||
|
|
||||||
|
dsectp->floorypanning = ssectp->floorypanning;
|
||||||
|
dsectp->ceilingypanning = ssectp->ceilingypanning;
|
||||||
|
|
||||||
|
dsectp->floorstat = ssectp->floorstat;
|
||||||
|
dsectp->ceilingstat = ssectp->ceilingstat;
|
||||||
|
|
||||||
|
dsectp->extra = ssectp->extra;
|
||||||
|
dsectp->visibility = ssectp->visibility;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// do this outside of processing loop for safety
|
||||||
|
|
||||||
|
// kill all matching dest
|
||||||
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_COPY_DEST], ed, nexted)
|
||||||
|
{
|
||||||
|
if (match == sprite[ed].lotag)
|
||||||
|
KillSprite(ed);
|
||||||
|
}
|
||||||
|
|
||||||
|
// kill all matching sources
|
||||||
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_COPY_SOURCE], ss, nextss)
|
||||||
|
{
|
||||||
|
if (match == sprite[ss].lotag)
|
||||||
|
KillSprite(ss);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
108
polymer/eduke32/source/sw/src/damage.h
Normal file
108
polymer/eduke32/source/sw/src/damage.h
Normal file
|
@ -0,0 +1,108 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifdef DAMAGE_TABLE
|
||||||
|
#define DAMAGE_ENTRY(id, init_func, damage_lo, damage_hi, radius, max_ammo, min_ammo, with_weapon) \
|
||||||
|
{ init_func, damage_lo, damage_hi, radius, max_ammo, min_ammo, with_weapon, NULL, NULL, -1, -1 },
|
||||||
|
#define DAMAGE_ENTRY_WPN(id, init_func, damage_lo, damage_hi, radius, max_ammo, min_ammo, with_weapon, weapon_name, ammo_name, weapon_pickup, ammo_pickup ) \
|
||||||
|
{ init_func, damage_lo, damage_hi, radius, max_ammo, min_ammo, with_weapon, weapon_name, ammo_name, weapon_pickup, ammo_pickup },
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef DAMAGE_ENUM
|
||||||
|
#define DAMAGE_ENTRY(id, init_func, damage_lo, damage_hi, radius, max_ammo, min_ammo, with_weapon) \
|
||||||
|
id,
|
||||||
|
#define DAMAGE_ENTRY_WPN(id, init_func, damage_lo, damage_hi, radius, max_ammo, min_ammo, with_weapon, weapon_name, ammo_name, weapon_pickup, ammo_pickup ) \
|
||||||
|
id,
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// DAMAGES ////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// weapon
|
||||||
|
DAMAGE_ENTRY(WPN_FIST, InitWeaponFist, 10, 40, 0, -1, -1, -1)
|
||||||
|
DAMAGE_ENTRY_WPN(WPN_STAR, InitWeaponStar, 5, 10, 0, 99, 3, -1, "Shurikens", NULL, 9, -1)
|
||||||
|
DAMAGE_ENTRY_WPN(WPN_SHOTGUN, InitWeaponShotgun, 4, 4, 0, 52, 1, -1, "Riot Gun", "Shotshells", 8, 24)
|
||||||
|
DAMAGE_ENTRY_WPN(WPN_UZI, InitWeaponUzi, 5, 7, 0, 200, 1, -1, "UZI Submachine Gun", "UZI Clip", 50, 50)
|
||||||
|
DAMAGE_ENTRY_WPN(WPN_MICRO, InitWeaponMicro, 15, 30, 0, 50, 1, -1, "Missile Launcher", "Missiles", 5, 5)
|
||||||
|
DAMAGE_ENTRY_WPN(WPN_GRENADE, InitWeaponGrenade, 15, 30, 0, 50, 1, -1, "Grenade Launcher", "Grenade Shells", 6, 8)
|
||||||
|
DAMAGE_ENTRY_WPN(WPN_MINE, InitWeaponMine, 5, 10, 0, 20, 1, -1, "Sticky Bombs", NULL, 5, -1)
|
||||||
|
DAMAGE_ENTRY_WPN(WPN_RAIL, InitWeaponRail, 40, 60, 0, 20, 1, -1, "Rail Gun", "Rail Gun Rods", 10, 10)
|
||||||
|
DAMAGE_ENTRY_WPN(WPN_HOTHEAD, InitWeaponHothead, 10, 25, 0, 80, 1, -1, "Guardian Head", "Firebursts", 30, 60)
|
||||||
|
DAMAGE_ENTRY_WPN(WPN_HEART, InitWeaponHeart, 75, 100, 0, 5, 1, -1, "Ripper Heart", "Deathcoils", 1, 6)
|
||||||
|
|
||||||
|
DAMAGE_ENTRY(WPN_NAPALM, InitWeaponHothead, 50, 100, 0, 100, 40, WPN_HOTHEAD)
|
||||||
|
DAMAGE_ENTRY(WPN_RING, InitWeaponHothead, 15, 50, 0, 100, 20, WPN_HOTHEAD)
|
||||||
|
DAMAGE_ENTRY(WPN_ROCKET, InitWeaponMicro, 30, 60, 0, 100, 1, WPN_MICRO)
|
||||||
|
DAMAGE_ENTRY(WPN_SWORD, InitWeaponSword, 50, 80, 0, -1, -1, -1)
|
||||||
|
|
||||||
|
// extra weapons connected to other
|
||||||
|
|
||||||
|
// spell
|
||||||
|
DAMAGE_ENTRY(DMG_NAPALM, NULL, 90, 150, 0, -1, -1, -1)
|
||||||
|
DAMAGE_ENTRY(DMG_MIRV_METEOR, NULL, 35, 65, 0, -1, -1, -1)
|
||||||
|
DAMAGE_ENTRY(DMG_SERP_METEOR, NULL, 7, 15, 0, -1, -1, -1)
|
||||||
|
|
||||||
|
// radius damage
|
||||||
|
DAMAGE_ENTRY(DMG_ELECTRO_SHARD, NULL, 2, 6, 0, -1, -1, -1)
|
||||||
|
DAMAGE_ENTRY(DMG_SECTOR_EXP, NULL, 50, 100, 3200, -1, -1, -1)
|
||||||
|
DAMAGE_ENTRY(DMG_BOLT_EXP, NULL, 80, 160, 3200, -1, -1, -1)
|
||||||
|
DAMAGE_ENTRY(DMG_TANK_SHELL_EXP, NULL, 80, 200, 4500, -1, -1, -1)
|
||||||
|
DAMAGE_ENTRY(DMG_FIREBALL_EXP, NULL, -1, -1, 1000, -1, -1, -1)
|
||||||
|
DAMAGE_ENTRY(DMG_NAPALM_EXP, NULL, 60, 90, 3200, -1, -1, -1)
|
||||||
|
DAMAGE_ENTRY(DMG_SKULL_EXP, NULL, 40, 75, 4500, -1, -1, -1)
|
||||||
|
DAMAGE_ENTRY(DMG_BASIC_EXP, NULL, 10, 25, 1000, -1, -1, -1)
|
||||||
|
DAMAGE_ENTRY(DMG_GRENADE_EXP, NULL, 70, 140, 6500, -1, -1, -1)
|
||||||
|
DAMAGE_ENTRY(DMG_MINE_EXP, NULL, 85, 115, 6500, -1, -1, -1)
|
||||||
|
DAMAGE_ENTRY(DMG_MINE_SHRAP, NULL, 15, 30, 0, -1, -1, -1)
|
||||||
|
DAMAGE_ENTRY(DMG_MICRO_EXP, NULL, 50, 100, 4500, -1, -1, -1)
|
||||||
|
DAMAGE_ENTRY_WPN(DMG_NUCLEAR_EXP, NULL, 0, 800, 30000, -1, -1, -1, "Nuclear Warhead", "Heat Seeker Card", 1, 5)
|
||||||
|
DAMAGE_ENTRY(DMG_RADIATION_CLOUD, NULL, 2, 6, 5000, -1, -1, -1)
|
||||||
|
DAMAGE_ENTRY(DMG_FLASHBOMB, NULL, 100, 150, 16384, -1, -1, -1)
|
||||||
|
|
||||||
|
DAMAGE_ENTRY(DMG_FIREBALL_FLAMES, NULL, 2, 6, 300, -1, -1, -1)
|
||||||
|
|
||||||
|
// actor
|
||||||
|
DAMAGE_ENTRY(DMG_RIPPER_SLASH, NULL, 10, 30, 0, -1, -1, -1)
|
||||||
|
DAMAGE_ENTRY(DMG_SKEL_SLASH, NULL, 10, 20, 0, -1, -1, -1)
|
||||||
|
DAMAGE_ENTRY(DMG_COOLG_BASH, NULL, 10, 20, 0, -1, -1, -1)
|
||||||
|
DAMAGE_ENTRY(DMG_COOLG_FIRE, NULL, 15, 30, 0, -1, -1, -1)
|
||||||
|
DAMAGE_ENTRY(DMG_GORO_CHOP, NULL, 20, 40, 0, -1, -1, -1)
|
||||||
|
DAMAGE_ENTRY(DMG_GORO_FIREBALL, NULL, 5, 20, 0, -1, -1, -1)
|
||||||
|
DAMAGE_ENTRY(DMG_SERP_SLASH, NULL, 75, 75, 0, -1, -1, -1)
|
||||||
|
DAMAGE_ENTRY(DMG_LAVA_BOULDER, NULL, 100, 100, 0, -1, -1, -1)
|
||||||
|
DAMAGE_ENTRY(DMG_LAVA_SHARD, NULL, 25, 25, 0, -1, -1, -1)
|
||||||
|
DAMAGE_ENTRY(DMG_HORNET_STING, NULL, 5, 10, 0, -1, -1, -1)
|
||||||
|
DAMAGE_ENTRY(DMG_EEL_ELECTRO, NULL, 10, 40, 3400, -1, -1, -1)
|
||||||
|
|
||||||
|
// misc
|
||||||
|
DAMAGE_ENTRY(DMG_SPEAR_TRAP, NULL, 15, 20, 0, -1, -1, -1)
|
||||||
|
DAMAGE_ENTRY(DMG_VOMIT, NULL, 5, 15, 0, -1, -1, -1)
|
||||||
|
|
||||||
|
// inanimate objects
|
||||||
|
DAMAGE_ENTRY(DMG_BLADE, NULL, 10, 20, 0, -1, -1, -1)
|
||||||
|
DAMAGE_ENTRY(MAX_WEAPONS, NULL, 10, 20, 0, -1, -1, -1)
|
||||||
|
|
||||||
|
#undef DAMAGE_ENTRY
|
||||||
|
#undef DAMAGE_ENTRY_WPN
|
656
polymer/eduke32/source/sw/src/demo.c
Normal file
656
polymer/eduke32/source/sw/src/demo.c
Normal file
|
@ -0,0 +1,656 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
//#define MAIN
|
||||||
|
//#define QUIET
|
||||||
|
#include "build.h"
|
||||||
|
#include "cache1d.h"
|
||||||
|
|
||||||
|
#include "keys.h"
|
||||||
|
#include "names2.h"
|
||||||
|
#include "panel.h"
|
||||||
|
#include "game.h"
|
||||||
|
#include "net.h"
|
||||||
|
|
||||||
|
#include "mytypes.h"
|
||||||
|
#include "control.h"
|
||||||
|
#include "function.h"
|
||||||
|
#include "demo.h"
|
||||||
|
|
||||||
|
#include "player.h"
|
||||||
|
#include "menus.h"
|
||||||
|
|
||||||
|
|
||||||
|
DFILE DemoFileIn = DF_ERR;
|
||||||
|
FILE *DemoFileOut;
|
||||||
|
BOOL DemoPlaying = FALSE;
|
||||||
|
BOOL DemoRecording = FALSE;
|
||||||
|
BOOL DemoEdit = FALSE;
|
||||||
|
BOOL DemoMode = FALSE;
|
||||||
|
BOOL DemoModeMenuState = FALSE;
|
||||||
|
BOOL DemoOverride = FALSE;
|
||||||
|
char DemoFileName[16] = "demo.dmo";
|
||||||
|
char DemoLevelName[16] = "";
|
||||||
|
extern BOOL NewGame;
|
||||||
|
|
||||||
|
// Demo sync stuff
|
||||||
|
FILE *DemoSyncFile;
|
||||||
|
BOOL DemoSyncTest = FALSE, DemoSyncRecord = FALSE;
|
||||||
|
char DemoTmpName[16] = "";
|
||||||
|
|
||||||
|
SW_PACKET DemoBuffer[DEMO_BUFFER_MAX];
|
||||||
|
int DemoRecCnt = 0; // Can only record 1-player game
|
||||||
|
|
||||||
|
BOOL DemoDone;
|
||||||
|
|
||||||
|
VOID DemoWriteHeader(VOID);
|
||||||
|
VOID DemoReadHeader(VOID);
|
||||||
|
VOID DemoReadBuffer(VOID);
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// DemoDebug Vars
|
||||||
|
//
|
||||||
|
|
||||||
|
// DemoDebugMode will close the file after every write
|
||||||
|
BOOL DemoDebugMode = FALSE;
|
||||||
|
//BOOL DemoDebugMode = TRUE;
|
||||||
|
BOOL DemoInitOnce = FALSE;
|
||||||
|
short DemoDebugBufferMax = 1;
|
||||||
|
|
||||||
|
extern char LevelName[];
|
||||||
|
extern char LevelSong[16];
|
||||||
|
extern BYTE FakeMultiNumPlayers;
|
||||||
|
extern BOOL QuitFlag;
|
||||||
|
|
||||||
|
///////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Demo File Manipulation
|
||||||
|
//
|
||||||
|
///////////////////////////////////////////
|
||||||
|
|
||||||
|
char *DemoSyncFileName(VOID)
|
||||||
|
{
|
||||||
|
static char file_name[32];
|
||||||
|
char *ptr;
|
||||||
|
|
||||||
|
strcpy(file_name, DemoFileName);
|
||||||
|
|
||||||
|
if ((ptr = strchr(file_name, '.')) == 0)
|
||||||
|
strcat(file_name, ".dms");
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*ptr = '\0';
|
||||||
|
strcat(file_name, ".dms");
|
||||||
|
}
|
||||||
|
|
||||||
|
return file_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
DemoSetup(VOID)
|
||||||
|
{
|
||||||
|
if (DemoRecording)
|
||||||
|
{
|
||||||
|
if (DemoSyncRecord)
|
||||||
|
DemoSyncFile = fopen(DemoSyncFileName(),"wb");
|
||||||
|
|
||||||
|
DemoWriteHeader();
|
||||||
|
memset(&DemoBuffer, -1, sizeof(DemoBuffer));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (DemoPlaying)
|
||||||
|
{
|
||||||
|
if (DemoSyncRecord)
|
||||||
|
DemoSyncFile = fopen(DemoSyncFileName(),"wb");
|
||||||
|
if (DemoSyncTest)
|
||||||
|
DemoSyncFile = fopen(DemoSyncFileName(),"rb");
|
||||||
|
|
||||||
|
DemoReadHeader();
|
||||||
|
memset(&DemoBuffer, -1, sizeof(DemoBuffer));
|
||||||
|
DemoReadBuffer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
DemoRecordSetup(VOID)
|
||||||
|
{
|
||||||
|
if (DemoRecording)
|
||||||
|
{
|
||||||
|
if (DemoSyncRecord)
|
||||||
|
DemoSyncFile = fopen(DemoSyncFileName(),"wb");
|
||||||
|
|
||||||
|
DemoWriteHeader();
|
||||||
|
memset(&DemoBuffer, -1, sizeof(DemoBuffer));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
DemoPlaySetup(VOID)
|
||||||
|
{
|
||||||
|
if (DemoPlaying)
|
||||||
|
{
|
||||||
|
if (DemoSyncRecord)
|
||||||
|
DemoSyncFile = fopen(DemoSyncFileName(),"wb");
|
||||||
|
if (DemoSyncTest)
|
||||||
|
DemoSyncFile = fopen(DemoSyncFileName(),"rb");
|
||||||
|
|
||||||
|
DemoReadHeader();
|
||||||
|
memset(&DemoBuffer, -1, sizeof(DemoBuffer));
|
||||||
|
DemoReadBuffer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
DemoWriteHeader(VOID)
|
||||||
|
{
|
||||||
|
DEMO_HEADER dh;
|
||||||
|
DEMO_START_POS dsp;
|
||||||
|
PLAYERp pp;
|
||||||
|
|
||||||
|
DemoFileOut = fopen(DemoFileName, "wb");
|
||||||
|
|
||||||
|
if (!DemoFileOut)
|
||||||
|
return;
|
||||||
|
|
||||||
|
strcpy(dh.map_name, LevelName);
|
||||||
|
strcpy(dh.LevelSong, LevelSong);
|
||||||
|
dh.Level = Level;
|
||||||
|
|
||||||
|
if (FakeMultiNumPlayers)
|
||||||
|
dh.numplayers = FakeMultiNumPlayers;
|
||||||
|
else
|
||||||
|
dh.numplayers = numplayers;
|
||||||
|
|
||||||
|
fwrite(&dh, sizeof(dh), 1, DemoFileOut);
|
||||||
|
|
||||||
|
for (pp = Player; pp < Player + dh.numplayers; pp++)
|
||||||
|
{
|
||||||
|
dsp.x = pp->posx;
|
||||||
|
dsp.y = pp->posy;
|
||||||
|
dsp.z = pp->posz;
|
||||||
|
fwrite(&dsp, sizeof(dsp), 1, DemoFileOut);
|
||||||
|
fwrite(&pp->Flags, sizeof(pp->Flags), 1, DemoFileOut);
|
||||||
|
fwrite(&pp->pang, sizeof(pp->pang), 1, DemoFileOut);
|
||||||
|
}
|
||||||
|
|
||||||
|
fwrite(&Skill, sizeof(Skill), 1, DemoFileOut);
|
||||||
|
fwrite(&gNet, sizeof(gNet), 1, DemoFileOut);
|
||||||
|
|
||||||
|
if (DemoDebugMode)
|
||||||
|
{
|
||||||
|
DemoDebugBufferMax = numplayers;
|
||||||
|
fclose(DemoFileOut);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
DemoReadHeader(VOID)
|
||||||
|
{
|
||||||
|
DEMO_HEADER dh;
|
||||||
|
DEMO_START_POS dsp;
|
||||||
|
PLAYERp pp;
|
||||||
|
|
||||||
|
#if DEMO_FILE_TYPE != DEMO_FILE_GROUP
|
||||||
|
if (DemoEdit)
|
||||||
|
{
|
||||||
|
DemoFileIn = fopen(DemoFileName, "rb+");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
//DemoFileIn = fopen(DemoFileName, "rb");
|
||||||
|
DemoFileIn = DOPEN_READ(DemoFileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (DemoFileIn == DF_ERR)
|
||||||
|
{
|
||||||
|
TerminateGame();
|
||||||
|
printf("File %s is not a valid demo file.",DemoFileName);
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
DREAD(&dh, sizeof(dh), 1, DemoFileIn);
|
||||||
|
|
||||||
|
strcpy(DemoLevelName, dh.map_name);
|
||||||
|
strcpy(LevelSong, dh.LevelSong);
|
||||||
|
Level = dh.Level;
|
||||||
|
if (dh.numplayers > 1)
|
||||||
|
{
|
||||||
|
FakeMultiNumPlayers = dh.numplayers;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
numplayers = dh.numplayers;
|
||||||
|
|
||||||
|
for (pp = Player; pp < Player + dh.numplayers; pp++)
|
||||||
|
{
|
||||||
|
DREAD(&dsp, sizeof(dsp), 1, DemoFileIn);
|
||||||
|
pp->posx = dsp.x;
|
||||||
|
pp->posy = dsp.y;
|
||||||
|
pp->posz = dsp.z;
|
||||||
|
COVERupdatesector(pp->posx, pp->posy, &pp->cursectnum);
|
||||||
|
//pp->cursectnum = 0;
|
||||||
|
//updatesectorz(pp->posx, pp->posy, pp->posz, &pp->cursectnum);
|
||||||
|
DREAD(&pp->Flags, sizeof(pp->Flags), 1, DemoFileIn);
|
||||||
|
DREAD(&pp->pang, sizeof(pp->pang), 1, DemoFileIn);
|
||||||
|
}
|
||||||
|
|
||||||
|
DREAD(&Skill, sizeof(Skill), 1, DemoFileIn);
|
||||||
|
DREAD(&gNet, sizeof(gNet), 1, DemoFileIn);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
DemoDebugWrite(VOID)
|
||||||
|
{
|
||||||
|
int size;
|
||||||
|
|
||||||
|
DemoFileOut = fopen(DemoFileName, "ab");
|
||||||
|
|
||||||
|
ASSERT(DemoFileOut);
|
||||||
|
|
||||||
|
size = sizeof(SW_PACKET) * DemoDebugBufferMax;
|
||||||
|
fwrite(&DemoBuffer, size, 1, DemoFileOut);
|
||||||
|
memset(&DemoBuffer, -1, size);
|
||||||
|
|
||||||
|
fclose(DemoFileOut);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
DemoWriteBuffer(VOID)
|
||||||
|
{
|
||||||
|
fwrite(&DemoBuffer, sizeof(DemoBuffer), 1, DemoFileOut);
|
||||||
|
memset(&DemoBuffer, -1, sizeof(DemoBuffer));
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
DemoReadBuffer(VOID)
|
||||||
|
{
|
||||||
|
memset(&DemoBuffer, -1, sizeof(DemoBuffer));
|
||||||
|
DREAD(&DemoBuffer, sizeof(DemoBuffer), 1, DemoFileIn);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
DemoBackupBuffer(VOID)
|
||||||
|
{
|
||||||
|
#if DEMO_FILE_TYPE != DEMO_FILE_GROUP
|
||||||
|
FILE *NewDemoFile;
|
||||||
|
FILE *OldDemoFile = DemoFileIn;
|
||||||
|
int pos,i;
|
||||||
|
char copy_buffer;
|
||||||
|
char NewDemoFileName[16] = "!";
|
||||||
|
|
||||||
|
// seek backwards to beginning of last buffer
|
||||||
|
fseek(OldDemoFile, -sizeof(DemoBuffer), SEEK_CUR);
|
||||||
|
pos = ftell(OldDemoFile);
|
||||||
|
|
||||||
|
// open a new edit file
|
||||||
|
strcat(NewDemoFileName, DemoFileName);
|
||||||
|
NewDemoFile = fopen(NewDemoFileName, "wb");
|
||||||
|
|
||||||
|
rewind(OldDemoFile);
|
||||||
|
|
||||||
|
// copy old demo to new demo
|
||||||
|
for (i = 0; i < pos; i++)
|
||||||
|
{
|
||||||
|
fread(©_buffer, sizeof(copy_buffer), 1, OldDemoFile);
|
||||||
|
fwrite(©_buffer,sizeof(copy_buffer), 1, NewDemoFile);
|
||||||
|
}
|
||||||
|
|
||||||
|
DemoFileOut = NewDemoFile;
|
||||||
|
fclose(OldDemoFile);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
DemoTerm(VOID)
|
||||||
|
{
|
||||||
|
if (DemoRecording)
|
||||||
|
{
|
||||||
|
// if already closed
|
||||||
|
if (DemoFileOut == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (DemoDebugMode)
|
||||||
|
{
|
||||||
|
DemoFileOut = fopen(DemoFileName, "ab");
|
||||||
|
ASSERT(DemoFileOut);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// paste on a -1 record to the current buffer
|
||||||
|
if (DemoRecCnt < DEMO_BUFFER_MAX)
|
||||||
|
memset(&DemoBuffer[DemoRecCnt], -1, sizeof(DemoBuffer[DemoRecCnt]));
|
||||||
|
|
||||||
|
DemoWriteBuffer();
|
||||||
|
}
|
||||||
|
|
||||||
|
// write at least 1 record at the end filled with -1
|
||||||
|
// just for good measure
|
||||||
|
memset(&DemoBuffer[0], -1, sizeof(DemoBuffer[0]));
|
||||||
|
fwrite(&DemoBuffer[0], sizeof(DemoBuffer[0]), 1, DemoFileOut);
|
||||||
|
|
||||||
|
fclose(DemoFileOut);
|
||||||
|
DemoFileOut = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (DemoPlaying)
|
||||||
|
{
|
||||||
|
if (DemoFileIn == DF_ERR)
|
||||||
|
return;
|
||||||
|
|
||||||
|
DCLOSE(DemoFileIn);
|
||||||
|
DemoFileIn = DF_ERR;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (DemoSyncTest||DemoSyncRecord)
|
||||||
|
{
|
||||||
|
fclose(DemoSyncFile);
|
||||||
|
DemoSyncFile = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Demo Play Back
|
||||||
|
//
|
||||||
|
///////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
VOID
|
||||||
|
DemoPlayBack(VOID)
|
||||||
|
{
|
||||||
|
int pnum, cnt;
|
||||||
|
static int buf_ndx;
|
||||||
|
PLAYERp pp;
|
||||||
|
ControlInfo info;
|
||||||
|
int Xdim, Ydim, ScreenSize;
|
||||||
|
|
||||||
|
if (SW_SHAREWARE)
|
||||||
|
{
|
||||||
|
// code here needs to be similar to RunLevel startup code
|
||||||
|
PlaySong(LevelSong, -1, TRUE, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Initialize Game part of network code (When ready2send != 0)
|
||||||
|
InitNetVars();
|
||||||
|
|
||||||
|
// IMPORTANT - MUST be right before game loop
|
||||||
|
InitTimingVars();
|
||||||
|
|
||||||
|
// THIS STUFF DEPENDS ON MYCONNECTINDEX BEING SET RIGHT
|
||||||
|
pp = Player + myconnectindex;
|
||||||
|
SetRedrawScreen(pp);
|
||||||
|
|
||||||
|
if (!DemoInitOnce)
|
||||||
|
buf_ndx = 0;
|
||||||
|
|
||||||
|
// everything has been inited at least once for PLAYBACK
|
||||||
|
DemoInitOnce = TRUE;
|
||||||
|
|
||||||
|
cnt = 0;
|
||||||
|
ready2send = 0;
|
||||||
|
DemoDone = FALSE;
|
||||||
|
|
||||||
|
while (TRUE)
|
||||||
|
{
|
||||||
|
// makes code run at the same rate
|
||||||
|
while (totalclock > totalsynctics)
|
||||||
|
{
|
||||||
|
handleevents();
|
||||||
|
|
||||||
|
TRAVERSE_CONNECT(pnum)
|
||||||
|
{
|
||||||
|
pp = Player + pnum;
|
||||||
|
pp->inputfifo[pp->movefifoend & (MOVEFIFOSIZ-1)] = DemoBuffer[buf_ndx];
|
||||||
|
pp->movefifoend++;
|
||||||
|
buf_ndx++;
|
||||||
|
|
||||||
|
if (pp->inputfifo[(pp->movefifoend - 1) & (MOVEFIFOSIZ-1)].bits == -1)
|
||||||
|
{
|
||||||
|
DemoDone = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (buf_ndx > DEMO_BUFFER_MAX - 1)
|
||||||
|
{
|
||||||
|
DemoReadBuffer();
|
||||||
|
buf_ndx = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (DemoDone)
|
||||||
|
break;
|
||||||
|
|
||||||
|
cnt++;
|
||||||
|
|
||||||
|
CONTROL_GetInput(&info);
|
||||||
|
|
||||||
|
domovethings();
|
||||||
|
|
||||||
|
MNU_CheckForMenus();
|
||||||
|
|
||||||
|
// fast forward and slow mo
|
||||||
|
if (DemoEdit)
|
||||||
|
{
|
||||||
|
if (KEY_PRESSED(KEYSC_F))
|
||||||
|
{
|
||||||
|
if (KEY_PRESSED(KEYSC_LSHIFT) || KEY_PRESSED(KEYSC_RSHIFT))
|
||||||
|
totalclock += synctics;
|
||||||
|
else
|
||||||
|
totalclock += synctics-1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (KEY_PRESSED(KEYSC_S))
|
||||||
|
totalclock += 1-synctics;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
#if DEBUG
|
||||||
|
if (KEY_PRESSED(KEYSC_ALT) && KEY_PRESSED(KEYSC_CTRL) && KEY_PRESSED(KEYSC_S))
|
||||||
|
{
|
||||||
|
KEY_PRESSED(KEYSC_ALT) = KEY_PRESSED(KEYSC_CTRL) = KEY_PRESSED(KEYSC_S) = 0;
|
||||||
|
saveboard("demosave.map", &Player->posx, &Player->posy, &Player->posz, &Player->pang, &Player->cursectnum);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (BUTTON(gamefunc_See_Co_Op_View))
|
||||||
|
{
|
||||||
|
CONTROL_ClearButton(gamefunc_See_Co_Op_View);
|
||||||
|
|
||||||
|
screenpeek = connectpoint2[screenpeek];
|
||||||
|
|
||||||
|
if (screenpeek < 0)
|
||||||
|
screenpeek = connecthead;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
if (KEY_PRESSED(KEYSC_RIGHT) || KEY_PRESSED(KEYSC_UP))
|
||||||
|
{
|
||||||
|
if (KEY_PRESSED(KEYSC_LSHIFT) || KEY_PRESSED(KEYSC_RSHIFT))
|
||||||
|
totalclock += synctics;
|
||||||
|
else
|
||||||
|
totalclock += synctics-1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (KEY_PRESSED(KEYSC_LEFT) || KEY_PRESSED(KEYSC_DOWN))
|
||||||
|
totalclock += 1-synctics;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (DemoSyncRecord)
|
||||||
|
demosync_record();
|
||||||
|
if (DemoSyncTest)
|
||||||
|
demosync_test(cnt);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Put this back in later when keyboard stuff is stable
|
||||||
|
if (DemoEdit)
|
||||||
|
{
|
||||||
|
//CONTROL_GetButtonInput();
|
||||||
|
CONTROL_GetInput(&info);
|
||||||
|
|
||||||
|
// if a key is pressed, start recording from the point the key
|
||||||
|
// was pressed
|
||||||
|
if (BUTTON(gamefunc_Move_Forward) ||
|
||||||
|
BUTTON(gamefunc_Move_Backward) ||
|
||||||
|
BUTTON(gamefunc_Turn_Left) ||
|
||||||
|
BUTTON(gamefunc_Turn_Right) ||
|
||||||
|
BUTTON(gamefunc_Fire) ||
|
||||||
|
BUTTON(gamefunc_Open) ||
|
||||||
|
BUTTON(gamefunc_Jump) ||
|
||||||
|
BUTTON(gamefunc_Crouch) ||
|
||||||
|
BUTTON(gamefunc_Look_Up) ||
|
||||||
|
BUTTON(gamefunc_Look_Down))
|
||||||
|
{
|
||||||
|
DemoBackupBuffer();
|
||||||
|
|
||||||
|
DemoRecCnt = buf_ndx;
|
||||||
|
DemoPlaying = FALSE;
|
||||||
|
DemoRecording = TRUE;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (BUTTON(gamefunc_See_Co_Op_View))
|
||||||
|
{
|
||||||
|
screenpeek += 1;
|
||||||
|
if (screenpeek > numplayers-1)
|
||||||
|
screenpeek = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// demo is over
|
||||||
|
if (DemoDone)
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (QuitFlag)
|
||||||
|
{
|
||||||
|
DemoMode = FALSE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ExitLevel)
|
||||||
|
{
|
||||||
|
// Quiting Demo
|
||||||
|
ExitLevel = FALSE;
|
||||||
|
if (DemoMode)
|
||||||
|
{
|
||||||
|
DemoPlaying = FALSE;
|
||||||
|
DemoMode = FALSE;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
drawscreen(Player + screenpeek);
|
||||||
|
}
|
||||||
|
|
||||||
|
// only exit if conditions are write
|
||||||
|
if (DemoDone && !DemoMode && !NewGame)
|
||||||
|
{
|
||||||
|
TerminateLevel();
|
||||||
|
TerminateGame();
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Still using old method of playback - this was for opening demo
|
||||||
|
//
|
||||||
|
|
||||||
|
VOID
|
||||||
|
ScenePlayBack(VOID)
|
||||||
|
{
|
||||||
|
int buf_ndx, pnum, cnt;
|
||||||
|
PLAYERp pp;
|
||||||
|
|
||||||
|
if (SW_SHAREWARE)
|
||||||
|
{
|
||||||
|
// code here needs to be similar to RunLevel startup code
|
||||||
|
strcpy(LevelSong,"yokoha03.mid");
|
||||||
|
PlaySong(LevelSong, -1, TRUE, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// IMPORTANT - MUST be right before game loop
|
||||||
|
InitTimingVars();
|
||||||
|
|
||||||
|
buf_ndx = 0;
|
||||||
|
cnt = 0;
|
||||||
|
ready2send = 0;
|
||||||
|
DemoDone = FALSE;
|
||||||
|
|
||||||
|
ResetKeys();
|
||||||
|
|
||||||
|
while (TRUE)
|
||||||
|
{
|
||||||
|
// makes code run at the same rate
|
||||||
|
while ((totalclock > totalsynctics))
|
||||||
|
{
|
||||||
|
TRAVERSE_CONNECT(pnum)
|
||||||
|
{
|
||||||
|
pp = Player + pnum;
|
||||||
|
pp->inputfifo[pp->movefifoend & (MOVEFIFOSIZ - 1)] = DemoBuffer[buf_ndx];
|
||||||
|
pp->movefifoend++;
|
||||||
|
buf_ndx++;
|
||||||
|
|
||||||
|
if (pp->inputfifo[(pp->movefifoend - 1) & (MOVEFIFOSIZ - 1)].bits == -1)
|
||||||
|
{
|
||||||
|
DemoDone = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (buf_ndx > DEMO_BUFFER_MAX - 1)
|
||||||
|
{
|
||||||
|
DemoReadBuffer();
|
||||||
|
buf_ndx = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (KeyPressed())
|
||||||
|
DemoDone = TRUE;
|
||||||
|
|
||||||
|
if (DemoDone)
|
||||||
|
break;
|
||||||
|
|
||||||
|
cnt++;
|
||||||
|
|
||||||
|
//movethings();
|
||||||
|
domovethings();
|
||||||
|
|
||||||
|
MNU_CheckForMenus();
|
||||||
|
}
|
||||||
|
|
||||||
|
// demo is over
|
||||||
|
if (DemoDone)
|
||||||
|
break;
|
||||||
|
|
||||||
|
drawscreen(Player + screenpeek);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
76
polymer/eduke32/source/sw/src/demo.h
Normal file
76
polymer/eduke32/source/sw/src/demo.h
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
extern FILE *DemoFile;
|
||||||
|
extern BOOL DemoPlaying;
|
||||||
|
extern BOOL DemoRecording;
|
||||||
|
extern BOOL DemoEdit;
|
||||||
|
extern BOOL DemoMode;
|
||||||
|
extern BOOL DemoOverride;
|
||||||
|
extern char DemoFileName[16];
|
||||||
|
extern char DemoLevelName[16];
|
||||||
|
|
||||||
|
extern FILE *DemoSyncFile;
|
||||||
|
extern BOOL DemoSyncTest;
|
||||||
|
extern BOOL DemoSyncRecord;
|
||||||
|
extern char DemoTmpName[16];
|
||||||
|
|
||||||
|
extern BOOL DemoDebugMode;
|
||||||
|
extern BOOL DemoInitOnce;
|
||||||
|
extern short DemoDebugBufferMax;
|
||||||
|
|
||||||
|
#define DEMO_BUFFER_MAX 2048
|
||||||
|
extern SW_PACKET DemoBuffer[DEMO_BUFFER_MAX];
|
||||||
|
extern int DemoRecCnt; // Can only record 1-player game
|
||||||
|
|
||||||
|
#define DEMO_FILE_GROUP 0
|
||||||
|
#define DEMO_FILE_STD 1
|
||||||
|
#define DEMO_FILE_TYPE DEMO_FILE_GROUP
|
||||||
|
|
||||||
|
// Demo File - reading from group
|
||||||
|
#if DEMO_FILE_TYPE == DEMO_FILE_GROUP
|
||||||
|
typedef long DFILE;
|
||||||
|
#define DREAD(ptr, size, num, handle) kread((handle),(ptr),(size)*(num))
|
||||||
|
#define DOPEN_READ(name) kopen4load(name,0)
|
||||||
|
#define DCLOSE(handle) kclose(handle)
|
||||||
|
#define DF_ERR -1
|
||||||
|
#else
|
||||||
|
typedef FILE *DFILE;
|
||||||
|
#define DREAD(ptr, size, num,handle) fread((ptr),(size),(num),(handle))
|
||||||
|
#define DWRITE(ptr, size, num,handle) fwrite((ptr),(size),(num),(handle))
|
||||||
|
#define DOPEN_WRITE(name) fopen(name,"wb")
|
||||||
|
#define DOPEN_READ(name) fopen(name,"rb")
|
||||||
|
#define DCLOSE(handle) fclose(handle)
|
||||||
|
#define DF_ERR NULL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void DemoTerm(void);
|
||||||
|
void DemoPlaySetup(void);
|
||||||
|
void DemoPlayBack(void);
|
||||||
|
void ScenePlayBack(void);
|
||||||
|
void DemoRecordSetup(void);
|
||||||
|
void DemoDebugWrite(void);
|
||||||
|
void DemoWriteBuffer(void);
|
992
polymer/eduke32/source/sw/src/digi.h
Normal file
992
polymer/eduke32/source/sw/src/digi.h
Normal file
|
@ -0,0 +1,992 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifdef DIGI_TABLE
|
||||||
|
#define DIGI_ENTRY(name, id, id_num, pri, pitch_lo, pitch_hi, voc_num, voc_dist, voc_flags) { name, NULL, 0, pitch_lo, pitch_hi, pri, voc_num, voc_dist, voc_flags, 0,0},
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef DIGI_ENUM
|
||||||
|
#define DIGI_ENTRY(name, id, id_num, pri, pitch_lo, pitch_hi, voc_num, voc_dist, voc_flags) id = id_num,
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// !JIM! 09/20/95
|
||||||
|
// NOTE: HIGHER priority numbers have the highest precedence in the play list.
|
||||||
|
#define PRI_MAX 100
|
||||||
|
#define PRI_PLAYERDEATH 51
|
||||||
|
#define PRI_PLAYERVOICE 50
|
||||||
|
#define PRI_HI_PLAYERWEAP 49
|
||||||
|
#define PRI_LOW_PLAYERWEAP 48
|
||||||
|
#define PRI_PLAYERAMBIENT 40
|
||||||
|
#define PRI_NPCDEATH 49
|
||||||
|
#define PRI_NPCWEAP 47
|
||||||
|
#define PRI_NPCATTACK 42
|
||||||
|
#define PRI_NPCAMBIENT 39
|
||||||
|
#define PRI_ITEM 41
|
||||||
|
#define PRI_SWITCH PRI_MAX // To give a clue to player location
|
||||||
|
#define PRI_SECTOROBJ 30
|
||||||
|
#define PRI_ENVIRONMENT 20
|
||||||
|
#define PRI_AMBIENT 10
|
||||||
|
|
||||||
|
// Distance definitions for effective sound ranges
|
||||||
|
// Note: These are some useful constants, but you can type in whatever you want!
|
||||||
|
#define DIST_NORMAL 0 // Just play sound normaly
|
||||||
|
#define DIST_MAXNORMAL 16384 // This is max distance constant for normal sounds
|
||||||
|
// This is the limiting constant in Sound_Dist function.
|
||||||
|
#define DIST_WIDE 65536 // Half Level at full volume before sound begins to fade.
|
||||||
|
#define DIST_LEVELWIDE 131072 // Full Level
|
||||||
|
|
||||||
|
// VOC Flag definitions
|
||||||
|
#define VF_NORMAL 0
|
||||||
|
#define VF_LOOP 1
|
||||||
|
|
||||||
|
// WEAPONS ////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// NULL Entry used to detect a sound's presence in sprite attrib structs.
|
||||||
|
DIGI_ENTRY("NULL.VOC", DIGI_NULL, 0, 0, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// SWORD
|
||||||
|
DIGI_ENTRY("SWRDSTR1.VOC", DIGI_SWORDSWOOSH, 1, PRI_HI_PLAYERWEAP, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// SHURIKEN
|
||||||
|
DIGI_ENTRY("THROW.VOC", DIGI_STAR, 2, PRI_HI_PLAYERWEAP, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("STRCLNK.VOC", DIGI_STARCLINK, 3, PRI_PLAYERAMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
//DIGI_ENTRY("STRWIZ.VOC", DIGI_STARWIZ, 4, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_LOOP )
|
||||||
|
DIGI_ENTRY("NULL.VOC", DIGI_NULL_STARWIZ, 4, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// UZI
|
||||||
|
DIGI_ENTRY("UZIFIRE1.VOC", DIGI_UZIFIRE, 5, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("RICH1.VOC", DIGI_RICHOCHET1, 6, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("RICH2.VOC", DIGI_RICHOCHET2, 7, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("RMVCLIP.VOC", DIGI_REMOVECLIP, 8, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("RPLCLIP.VOC", DIGI_REPLACECLIP, 9, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
// SPENT SHELL HITTING FLOOR
|
||||||
|
DIGI_ENTRY("SHELL.VOC", DIGI_SHELL, 10, PRI_NPCATTACK, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// CROSSRIOT
|
||||||
|
DIGI_ENTRY("RIOTFIR1.VOC", DIGI_RIOTFIRE, 11, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SHOTGUN.VOC", DIGI_RIOTFIRE2, 12, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("RIOTRLD.VOC", DIGI_RIOTRELOAD, 13, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("EXPMED.VOC", DIGI_BOLTEXPLODE, 14, PRI_HI_PLAYERWEAP, -100, 100, 0, DIST_MAXNORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("RIOTWIZ.VOC", DIGI_BOLTWIZ, 15, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// 30MM GRENADE LAUNCHER
|
||||||
|
DIGI_ENTRY("40MMFIR2.VOC", DIGI_30MMFIRE, 16, PRI_HI_PLAYERWEAP, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("RIOTRLD.VOC", DIGI_30MMRELOAD, 17, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("40MMEXP2.VOC", DIGI_30MMEXPLODE, 18, PRI_HI_PLAYERWEAP, -100, 100, 0, DIST_WIDE, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("RIOTWIZ.VOC", DIGI_30MMWIZ, 19, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// GORO HEAD
|
||||||
|
DIGI_ENTRY("GHFIR1.VOC", DIGI_HEADFIRE, 20, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("GHWIZ.VOC", DIGI_HEADSHOTWIZ, 21, PRI_PLAYERAMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("EXPSML.VOC", DIGI_HEADSHOTHIT, 22, PRI_LOW_PLAYERWEAP,-100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// MINES
|
||||||
|
DIGI_ENTRY("THROW.VOC", DIGI_MINETHROW, 23, PRI_HI_PLAYERWEAP,-100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("PHITGRND.VOC", DIGI_MINEBOUNCE, 24, PRI_LOW_PLAYERWEAP,-100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("EXPLRG.VOC", DIGI_MINEBLOW, 25, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_WIDE, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("STSCAN2.VOC", DIGI_MINEBEEP, 26, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// HEART ATTACK
|
||||||
|
DIGI_ENTRY("HBLOOP1.VOC", DIGI_HEARTBEAT, 27, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
//#ifndef SW_SHAREWARE
|
||||||
|
DIGI_ENTRY("HSQUEEZ1.VOC", DIGI_HEARTFIRE, 28, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
//#else
|
||||||
|
//DIGI_ENTRY("NULL.VOC", DIGI_HEARTFIRE, 28, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL )
|
||||||
|
//#endif
|
||||||
|
DIGI_ENTRY("HRTWIZ.VOC", DIGI_HEARTWIZ, 29, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// MISSILE BATTERY
|
||||||
|
DIGI_ENTRY("RIOTFIR1.VOC", DIGI_MISSLFIRE, 30, PRI_HI_PLAYERWEAP, -75, 75, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("EXPMED.VOC", DIGI_MISSLEXP, 31, PRI_HI_PLAYERWEAP, -100, 100, 0, DIST_WIDE, VF_NORMAL)
|
||||||
|
|
||||||
|
// RING OF FIRE SPELL
|
||||||
|
//#ifndef SW_SHAREWARE
|
||||||
|
DIGI_ENTRY("RFWIZ.VOC", DIGI_RFWIZ, 32, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
//#else
|
||||||
|
//DIGI_ENTRY("NULL.VOC", DIGI_NULL_RFWIZ, 32, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL )
|
||||||
|
//#endif
|
||||||
|
|
||||||
|
// NAPALM SPELL
|
||||||
|
DIGI_ENTRY("NAPFIRE.VOC", DIGI_NAPFIRE, 33, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("NAPTWIZ.VOC", DIGI_NAPWIZ, 34, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
DIGI_ENTRY("NAPPUFF.VOC", DIGI_NAPPUFF, 35, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// MAGIC MIRV SPELL
|
||||||
|
DIGI_ENTRY("MMFIRE.VOC", DIGI_MIRVFIRE, 36, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("MMWIZ.VOC", DIGI_MIRVWIZ, 37, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// SPIRAL SPELL
|
||||||
|
DIGI_ENTRY("SPRLFIRE.VOC", DIGI_SPIRALFIRE, 38, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SPRLWIZ.VOC", DIGI_SPIRALWIZ, 39, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// MAGIC SOUNDS, GENERIC
|
||||||
|
// (USED FOR MAGIC CARPET RIDES,ETC.)
|
||||||
|
DIGI_ENTRY("MAGIC1.VOC", DIGI_MAGIC1, 40, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("MAGIC2.VOC", DIGI_MAGIC2, 41, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("MAGIC3.VOC", DIGI_MAGIC3, 42, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("MAGIC4.VOC", DIGI_MAGIC4, 43, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("MAGIC5.VOC", DIGI_MAGIC5, 44, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("MAGIC6.VOC", DIGI_MAGIC6, 45, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("MAGIC7.VOC", DIGI_MAGIC7, 46, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// SHADOW WARRIOR SPELL
|
||||||
|
//#ifndef SW_SHAREWARE
|
||||||
|
DIGI_ENTRY("SWSPELL.VOC", DIGI_SWCLOAKUNCLOAK, 47, PRI_LOW_PLAYERWEAP,-100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
//#else
|
||||||
|
//DIGI_ENTRY("NULL.VOC", DIGI_NULL_SWCLOAK, 47, PRI_LOW_PLAYERWEAP,-100, 100, 0, DIST_NORMAL, VF_NORMAL )
|
||||||
|
//#endif
|
||||||
|
|
||||||
|
// PLAYER DEAD HEAD
|
||||||
|
DIGI_ENTRY("DHVOMIT.VOC", DIGI_DHVOMIT, 48, PRI_PLAYERAMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("DHCLUNK.VOC", DIGI_DHCLUNK, 49, PRI_PLAYERAMBIENT, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
//DIGI_ENTRY("DHSQSH.VOC", DIGI_DHSQUISH, 50, PRI_PLAYERAMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL )
|
||||||
|
DIGI_ENTRY("NULL.VOC", DIGI_NULL_DHSQUISH, 50, PRI_PLAYERAMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// WEAPON RELATED
|
||||||
|
DIGI_ENTRY("LAVAHIT.VOC", DIGI_PROJECTILELAVAHIT,51, PRI_PLAYERAMBIENT,-100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("STSPL01.VOC", DIGI_PROJECTILEWATERHIT,52, PRI_PLAYERAMBIENT,-100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// ITEMS
|
||||||
|
DIGI_ENTRY("KEY.VOC", DIGI_KEY, 53, PRI_ITEM, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("ITEM5A.VOC", DIGI_ITEM, 54, PRI_ITEM, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("ITEMBIG2.VOC", DIGI_BIGITEM, 55, PRI_ITEM, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// DEATH/HURT
|
||||||
|
DIGI_ENTRY("BODY9.VOC", DIGI_BODYFALL1, 56, PRI_PLAYERDEATH, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("PHITGRND.VOC", DIGI_HITGROUND, 57, PRI_PLAYERAMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("BODY2.VOC", DIGI_BODYSQUISH1, 58, PRI_PLAYERAMBIENT, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("BURN1.VOC", DIGI_BODYBURN, 59, PRI_PLAYERAMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("BURNSCRM.VOC", DIGI_BODYBURNSCREAM, 60, PRI_PLAYERDEATH, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("BODY3.VOC", DIGI_BODYCRUSHED1, 61, PRI_PLAYERAMBIENT, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("BODY4.VOC", DIGI_BODYHACKED1, 62, PRI_PLAYERAMBIENT, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("BURN2.VOC", DIGI_BODYSINGED, 63, PRI_PLAYERAMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("DROWN1.VOC", DIGI_DROWN, 64, PRI_PLAYERDEATH, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SCREAM1.VOC", DIGI_SCREAM1, 65, PRI_PLAYERDEATH, -200, 400, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SCREAM2.VOC", DIGI_SCREAM2, 66, PRI_PLAYERDEATH, -200, 400, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SCREAM3.VOC", DIGI_SCREAM3, 67, PRI_PLAYERDEATH, -200, 400, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("HIT1.VOC", DIGI_HIT1, 68, PRI_LOW_PLAYERWEAP, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("ELECTRC1.VOC", DIGI_ELECTRICUTE1, 69, PRI_PLAYERAMBIENT, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SWDIE02.VOC", DIGI_REMOVEME, 70, PRI_PLAYERDEATH, -200, 500, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("IMPALE1.VOC", DIGI_IMPALED, 71, PRI_PLAYERDEATH, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("OOF1.VOC", DIGI_OOF1, 72, PRI_PLAYERAMBIENT, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// ACTOR SOUNDS THAT USER
|
||||||
|
// PLAYER SOUNDS AT A LOWER PRIORITY
|
||||||
|
DIGI_ENTRY("BODY1.VOC", DIGI_ACTORBODYFALL1, 73, PRI_NPCWEAP, 0, 0, DIGI_BODYFALL1, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("HITGRND.VOC", DIGI_ACTORHITGROUND, 74, PRI_NPCWEAP, 0, 0, DIGI_HITGROUND, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// NPC'S //////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// COOLIE
|
||||||
|
DIGI_ENTRY("COLEXP.VOC", DIGI_COOLIEEXPLODE, 75, PRI_NPCDEATH, -100, 100, 0, DIST_MAXNORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("COLSCRM.VOC", DIGI_COOLIESCREAM, 76, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("COLALRT.VOC", DIGI_COOLIEALERT, 77, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("COLAMB.VOC", DIGI_COOLIEAMBIENT, 78, PRI_NPCAMBIENT, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("COLPAIN.VOC", DIGI_COOLIEPAIN, 79, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// COOLIE GHOST
|
||||||
|
DIGI_ENTRY("CGMAT.VOC", DIGI_CGMATERIALIZE, 80, PRI_NPCAMBIENT, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("CGALRT.VOC", DIGI_CGALERT, 81, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("CGWHACK.VOC", DIGI_CGTHIGHBONE, 82, PRI_NPCWEAP, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("CGAMB.VOC", DIGI_CGAMBIENT, 83, PRI_NPCAMBIENT, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("CGPAIN.VOC", DIGI_CGPAIN, 84, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("CGSHOOT.VOC", DIGI_CGMAGIC, 85, PRI_NPCWEAP, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("CGHIT.VOC", DIGI_CGMAGICHIT, 86, PRI_NPCWEAP, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("CGSCRM.VOC", DIGI_CGSCREAM, 87, PRI_NPCDEATH, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// NINJA
|
||||||
|
DIGI_ENTRY("NINAMB.VOC", DIGI_NINJAAMBIENT, 88, PRI_NPCAMBIENT, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("NINSTAR.VOC", DIGI_NINJASTAR, 89, PRI_NPCWEAP, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("NINPAIN.VOC", DIGI_NINJAPAIN, 90, PRI_NPCWEAP, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("NINSCRM.VOC", DIGI_NINJASCREAM, 91, PRI_NPCDEATH, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("NINALRT.VOC", DIGI_NINJAALERT, 92, PRI_NPCATTACK, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("NINSHOOT.VOC", DIGI_NINJAUZIATTACK, 93, PRI_NPCWEAP, 0, 0, DIGI_UZIFIRE, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("RIOTFIR1.VOC", DIGI_NINJARIOTATTACK, 94, PRI_NPCWEAP, 0, 0, DIGI_RIOTFIRE, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// RIPPER
|
||||||
|
DIGI_ENTRY("RIPAMB.VOC", DIGI_RIPPERAMBIENT, 95, PRI_NPCAMBIENT, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("RIPALRT.VOC", DIGI_RIPPERALERT, 96, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("RIPATCK.VOC", DIGI_RIPPERATTACK, 97, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("RIPPAIN.VOC", DIGI_RIPPERPAIN, 98, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("RIPSCRM.VOC", DIGI_RIPPERSCREAM, 99, PRI_NPCDEATH, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("RIPHRT.VOC", DIGI_RIPPERHEARTOUT, 100, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// GUARDIAN
|
||||||
|
DIGI_ENTRY("GRDAMB.VOC", DIGI_GRDAMBIENT, 101, PRI_NPCAMBIENT, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("GRDALRT.VOC", DIGI_GRDALERT, 102, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("GRDPAIN.VOC", DIGI_GRDPAIN, 103, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("GRDSCRM.VOC", DIGI_GRDSCREAM, 104, PRI_NPCDEATH, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("GRDFIR.VOC", DIGI_GRDFIREBALL, 105, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("GRDAXE.VOC", DIGI_GRDSWINGAXE, 106, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("GRDAXHT.VOC", DIGI_GRDAXEHIT, 107, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// SKELETOR PRIEST
|
||||||
|
DIGI_ENTRY("SPAMB.VOC", DIGI_SPAMBIENT, 108, PRI_NPCAMBIENT, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SPALRT.VOC", DIGI_SPALERT, 109, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SPPAIN.VOC", DIGI_SPPAIN, 110, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SPSCRM.VOC", DIGI_SPSCREAM, 111, PRI_NPCDEATH, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SPBLADE.VOC", DIGI_SPBLADE, 112, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SPELEC.VOC", DIGI_SPELEC, 113, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SPTLPRT.VOC", DIGI_SPTELEPORT, 114, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// ACCURSED HEAD
|
||||||
|
DIGI_ENTRY("AHAMB.VOC", DIGI_AHAMBIENT, 115, PRI_NPCAMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("AHSCRM.VOC", DIGI_AHSCREAM, 116, PRI_NPCDEATH, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("AHEXP.VOC", DIGI_AHEXPLODE, 117, PRI_NPCDEATH, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("AHSHWSH.VOC", DIGI_AHSWOOSH, 118, PRI_NPCATTACK, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// HORNET
|
||||||
|
DIGI_ENTRY("HBUZZ.VOC", DIGI_HORNETBUZZ, 119, PRI_NPCAMBIENT, -100, 100, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
DIGI_ENTRY("HSTING.VOC", DIGI_HORNETSTING, 120, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("HPAIN.VOC", DIGI_HORNETPAIN, 121, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("HDEATH.VOC", DIGI_HORNETDEATH, 122, PRI_NPCDEATH, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// SERPENT GOD BOSS
|
||||||
|
DIGI_ENTRY("SGAMB.VOC", DIGI_SERPAMBIENT, 123, PRI_NPCAMBIENT, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SGALRT.VOC", DIGI_SERPALERT, 124, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SGPAIN.VOC", DIGI_SERPPAIN, 125, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SGSCRM.VOC", DIGI_SERPSCREAM, 126, PRI_MAX, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SGDETH.VOC", DIGI_SERPDEATHEXPLODE,127, PRI_NPCDEATH, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SGSWORD.VOC", DIGI_SERPSWORDATTACK, 128, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SGMAGIC.VOC", DIGI_SERPMAGICLAUNCH, 129, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SGHEADS.VOC", DIGI_SERPSUMMONHEADS, 130, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SGTAUNT.VOC", DIGI_SERPTAUNTYOU, 131, PRI_NPCAMBIENT, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// LAVA BOSS
|
||||||
|
DIGI_ENTRY("LVAMB.VOC", DIGI_LAVABOSSAMBIENT, 132, PRI_NPCAMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("LVSWIM.VOC", DIGI_LAVABOSSSWIM, 133, PRI_NPCAMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("LVRISE.VOC", DIGI_LAVABOSSRISE, 134, PRI_NPCAMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("LVALRT.VOC", DIGI_LAVABOSSALERT, 135, PRI_NPCATTACK, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("LVFLAME.VOC", DIGI_LAVABOSSFLAME, 136, PRI_NPCATTACK, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("LVMETEOR.VOC", DIGI_LAVABOSSMETEOR, 137, PRI_NPCATTACK, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("LVMETEXP.VOC", DIGI_LAVABOSSMETEXP, 138, PRI_NPCATTACK, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("LVPAIN.VOC", DIGI_LAVABOSSPAIN, 139, PRI_NPCATTACK, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("LVSIZZLE.VOC", DIGI_LAVABOSSSIZZLE, 140, PRI_NPCAMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("LVEXPL.VOC", DIGI_LAVABOSSEXPLODE, 141, PRI_NPCDEATH, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// LEVEL AND SECTOR OBJECT SOUNDS ///////////
|
||||||
|
|
||||||
|
// MOTOR BOAT
|
||||||
|
DIGI_ENTRY("BTSTRT.VOC", DIGI_BOATSTART, 142, PRI_SECTOROBJ, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("BTRUN01.VOC", DIGI_BOATRUN, 143, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
DIGI_ENTRY("BTSTOP.VOC", DIGI_BOATSTOP, 144, PRI_SECTOROBJ, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("BTFIRE.VOC", DIGI_BOATFIRE, 145, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// ARMY TANK
|
||||||
|
DIGI_ENTRY("TNKSTRT.VOC", DIGI_TANKSTART, 146, PRI_SECTOROBJ, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TNKRUN.VOC", DIGI_TANKRUN, 147, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
DIGI_ENTRY("TNKSTOP.VOC", DIGI_TANKSTOP, 148, PRI_SECTOROBJ, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TNKIDLE.VOC", DIGI_TANKIDLE, 149, PRI_SECTOROBJ, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
DIGI_ENTRY("TNKFIRE.VOC", DIGI_TANKFIRE, 150, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// ARMY TRUCK
|
||||||
|
DIGI_ENTRY("TRUKRUN.VOC", DIGI_TRUKRUN, 151, PRI_SECTOROBJ, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
DIGI_ENTRY("TRUKIDLE.VOC", DIGI_TRUKIDLE, 152, PRI_SECTOROBJ, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// SUBMARINE
|
||||||
|
DIGI_ENTRY("SUBRUN.VOC", DIGI_SUBRUN, 153, PRI_SECTOROBJ, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
DIGI_ENTRY("SUBIDLE.VOC", DIGI_SUBIDLE, 154, PRI_SECTOROBJ, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
DIGI_ENTRY("SUBDOOR.VOC", DIGI_SUBDOOR, 155, PRI_SECTOROBJ, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// WWII JAP BOMBER PLANE
|
||||||
|
DIGI_ENTRY("BMBFLY.VOC", DIGI_BOMBRFLYING, 156, PRI_SECTOROBJ, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
DIGI_ENTRY("BMBDROP.VOC", DIGI_BOMBRDROPBOMB, 157, PRI_SECTOROBJ, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// BUBBLES
|
||||||
|
DIGI_ENTRY("BUBBLE.VOC", DIGI_BUBBLES, 158, PRI_AMBIENT, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// CHAIN MOVING
|
||||||
|
// SOUND NOT AVAILABLE -- DELTED
|
||||||
|
DIGI_ENTRY("CHAIN.VOC", DIGI_CHAIN, 159, PRI_ENVIRONMENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// CHAIN DOOR
|
||||||
|
DIGI_ENTRY("CHNDOOR.VOC", DIGI_CHAINDOOR, 160, PRI_ENVIRONMENT, 0, 0, 0, 8000, VF_NORMAL)
|
||||||
|
|
||||||
|
// CRICKETS
|
||||||
|
DIGI_ENTRY("CRCKT2.VOC", DIGI_CRICKETS, 161, PRI_AMBIENT, -100, 100, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// WOOD DOOR OPEN/CLOSE
|
||||||
|
DIGI_ENTRY("DRWOODO.VOC", DIGI_WOODDOOROPEN, 162, PRI_ENVIRONMENT, -100, 100, 0, 8000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("DRWOODC.VOC", DIGI_WOODDOORCLOSE, 163, PRI_ENVIRONMENT, -100, 100, 0, 8000, VF_NORMAL)
|
||||||
|
|
||||||
|
// METAL DOOR OPEN/CLOSE
|
||||||
|
DIGI_ENTRY("DRMETO.VOC", DIGI_METALDOOROPEN, 164, PRI_ENVIRONMENT, -100, 100, 0, 8000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("DRMETC.VOC", DIGI_METALDOORCLOSE, 165, PRI_ENVIRONMENT, -100, 100, 0, 8000, VF_NORMAL)
|
||||||
|
|
||||||
|
// SLIDING DOOR OPEN/CLOSE
|
||||||
|
DIGI_ENTRY("DRSLDO.VOC", DIGI_SLIDEDOOROPEN, 166, PRI_ENVIRONMENT, -100, 100, 0, 8000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("DRSLDC.VOC", DIGI_SLIDEDOORCLOSE, 167, PRI_ENVIRONMENT, -100, 100, 0, 8000, VF_NORMAL)
|
||||||
|
|
||||||
|
// STONE SLIDING DOOR OPEN/CLOSE
|
||||||
|
DIGI_ENTRY("DRSTNO.VOC", DIGI_STONEDOOROPEN, 168, PRI_ENVIRONMENT, -100, 100, 0, 8000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("DRSTNC.VOC", DIGI_STONEDOORCLOSE, 169, PRI_ENVIRONMENT, -100, 100, 0, 8000, VF_NORMAL)
|
||||||
|
|
||||||
|
// SQUEAKY DOOR OPEN/CLOSE
|
||||||
|
DIGI_ENTRY("DRSQKO.VOC", DIGI_SQUEAKYDOOROPEN, 170, PRI_ENVIRONMENT, -100, 100, 0, 8000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("DRSQKC.VOC", DIGI_SQUEAKYDOORCLOSE,171, PRI_ENVIRONMENT, -100, 100, 0, 8000, VF_NORMAL)
|
||||||
|
|
||||||
|
// GIANT DRILL MACHINE
|
||||||
|
DIGI_ENTRY("DRILL.VOC", DIGI_DRILL, 172, PRI_SECTOROBJ, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// AMBIENT WATER DRIPPING IN CAVE
|
||||||
|
DIGI_ENTRY("CAVE1.VOC", DIGI_CAVEDRIP1, 173, PRI_AMBIENT, -100, 100, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
DIGI_ENTRY("CAVE2.VOC", DIGI_CAVEDRIP2, 174, PRI_AMBIENT, -100, 100, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
DIGI_ENTRY("DRIP.VOC", DIGI_DRIP, 175, PRI_AMBIENT, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// WATER FALL
|
||||||
|
DIGI_ENTRY("WTRFAL1.VOC", DIGI_WATERFALL1, 176, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
// THERE IS NO WTRFAL2 -- DELETED!!!
|
||||||
|
DIGI_ENTRY("WTRFAL2.VOC", DIGI_WATERFALL2, 177, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// WATER FLOWING
|
||||||
|
DIGI_ENTRY("WTRFLW1.VOC", DIGI_WATERFLOW1, 178, PRI_AMBIENT, -100, 100, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
// THERE IS NO WTRFLW2 -- DELETED!!!
|
||||||
|
DIGI_ENTRY("WTRFLW2.VOC", DIGI_WATERFLOW2, 179, PRI_AMBIENT, -100, 100, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// ELEVATOR START/STOP
|
||||||
|
DIGI_ENTRY("ELEV1.VOC", DIGI_ELEVATOR, 180, PRI_ENVIRONMENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// SMALL EXP
|
||||||
|
DIGI_ENTRY("EXPSML.VOC", DIGI_SMALLEXP, 181, PRI_ENVIRONMENT, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// MEDIUM EXP
|
||||||
|
DIGI_ENTRY("EXPMED.VOC", DIGI_MEDIUMEXP, 182, PRI_ENVIRONMENT, -200, 200, 0, DIST_WIDE, VF_NORMAL)
|
||||||
|
|
||||||
|
// LARGE EXP
|
||||||
|
DIGI_ENTRY("EXPLRG.VOC", DIGI_LARGEEXP, 183, PRI_ENVIRONMENT, -200, 200, 0, DIST_WIDE, VF_NORMAL)
|
||||||
|
|
||||||
|
// HUGE EXP
|
||||||
|
//DIGI_ENTRY("BIGEXP.VOC", DIGI_HUGEEXP, 184, PRI_ENVIRONMENT, -200, 200, 0, DIST_WIDE, VF_NORMAL )
|
||||||
|
DIGI_ENTRY("NULL.VOC", DIGI_NULL_HUGEEXP, 184, PRI_ENVIRONMENT, -200, 200, 0, DIST_WIDE, VF_NORMAL)
|
||||||
|
|
||||||
|
// CRACKLING FIRE FOR CONTINUOUS BURN
|
||||||
|
DIGI_ENTRY("FIRE1.VOC", DIGI_FIRE1, 185, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// POWERFULL HIGH HEAT CONTINUOUS BURN
|
||||||
|
DIGI_ENTRY("FIRE2.VOC", DIGI_FIRE2, 186, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// SHOOTING FIREBALL FOR FIREBALL TRAP
|
||||||
|
DIGI_ENTRY("FBALL1.VOC", DIGI_FIREBALL1, 187, PRI_SECTOROBJ, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// SHOOTING FIREBALL FOR FIREBALL TRAP
|
||||||
|
DIGI_ENTRY("FIREBALL1.VOC", DIGI_FIREBALL2, 188, PRI_SECTOROBJ, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// SECTOR GEAR COG TURNING
|
||||||
|
DIGI_ENTRY("GEAR1.VOC", DIGI_GEAR1, 189, PRI_ENVIRONMENT, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// AMBIENT GONG FOR USE IN TEMPLE/PALACE LEVELS
|
||||||
|
DIGI_ENTRY("GONG.VOC", DIGI_GONG, 190, PRI_HI_PLAYERWEAP,-100, 100, 0, 32336, VF_NORMAL)
|
||||||
|
|
||||||
|
// AMBIENT LAVA FLOW
|
||||||
|
DIGI_ENTRY("LAVAFLW1.VOC", DIGI_LAVAFLOW1, 191, PRI_AMBIENT, -100, 100, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// GENERIC SECTOR OBJECT MACHINE RUNNING
|
||||||
|
DIGI_ENTRY("MACHN1.VOC", DIGI_MACHINE1, 192, PRI_SECTOROBJ, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// AMBIENT MUD BUBBLES
|
||||||
|
DIGI_ENTRY("MUD1.VOC", DIGI_MUBBUBBLES1, 193, PRI_AMBIENT, -100, 100, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// AMBIENT EARTH QUAKE
|
||||||
|
DIGI_ENTRY("QUAKE1.VOC", DIGI_EARTHQUAKE, 194, PRI_AMBIENT, -100, 100, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// YUCKY SEWER FLOW
|
||||||
|
DIGI_ENTRY("SEWER1.VOC", DIGI_SEWERFLOW1, 195, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// WATER SPLASHING
|
||||||
|
//(USE FOR PLAYER/NPC'S JUMPING AROUND IN WATER)
|
||||||
|
DIGI_ENTRY("SPLASH1.VOC", DIGI_SPLASH1, 196, PRI_ENVIRONMENT, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// STEAM FLOW
|
||||||
|
DIGI_ENTRY("STEAM1.VOC", DIGI_STEAM1, 197, PRI_AMBIENT, -100, 100, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// VOLCANIC STEAM VENT
|
||||||
|
DIGI_ENTRY("VOLSTM1.VOC", DIGI_VOLCANOSTEAM1, 198, PRI_AMBIENT, -100, 100, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// STOMPER THUD SECTOR OBJECT
|
||||||
|
DIGI_ENTRY("STMPR.VOC", DIGI_STOMPER, 199, PRI_SECTOROBJ, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// SCARY AMBIENT SWAMP SOUNDS
|
||||||
|
DIGI_ENTRY("SWAMP1.VOC", DIGI_SWAMP, 200, PRI_AMBIENT, -100, 100, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// FLIP SWITCH
|
||||||
|
DIGI_ENTRY("SWITCH1.VOC", DIGI_REGULARSWITCH, 201, PRI_ENVIRONMENT, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// FLIP LARGE SWITCH
|
||||||
|
DIGI_ENTRY("SWITCH2.VOC", DIGI_BIGSWITCH, 202, PRI_ENVIRONMENT, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// STONE SWITCH
|
||||||
|
DIGI_ENTRY("SWITCH3.VOC", DIGI_STONESWITCH, 203, PRI_ENVIRONMENT, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// BREAKABLE GLASS SWITCH
|
||||||
|
DIGI_ENTRY("SWITCH4.VOC", DIGI_GLASSSWITCH, 204, PRI_ENVIRONMENT, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// HUGE ECHOING SWITCH
|
||||||
|
DIGI_ENTRY("SWITCH5.VOC", DIGI_HUGESWITCH, 205, PRI_ENVIRONMENT, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// AMBIENT ROLLING THUNDER
|
||||||
|
DIGI_ENTRY("THUNDR.VOC", DIGI_THUNDER, 206, PRI_AMBIENT, -200, 200, 0, DIST_LEVELWIDE, VF_NORMAL)
|
||||||
|
|
||||||
|
// TELEPORTER
|
||||||
|
DIGI_ENTRY("TELPORT.VOC", DIGI_TELEPORT, 207, PRI_ENVIRONMENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// UNDERWATER AMBIENCE
|
||||||
|
DIGI_ENTRY("UNDRWTR.VOC", DIGI_UNDERWATER, 208, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// UNLOCK BIG LOCKED DOOR
|
||||||
|
DIGI_ENTRY("UNLOCK.VOC", DIGI_UNLOCK, 209, PRI_ENVIRONMENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// SQUEAKY VALVE TURNING
|
||||||
|
DIGI_ENTRY("VALVE.VOC", DIGI_SQUEAKYVALVE, 210, PRI_ENVIRONMENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// SPOOKY ETHERAL VOID AMBIENCE
|
||||||
|
//(NETHERWORLDLY SOUNDS)
|
||||||
|
DIGI_ENTRY("VOID1.VOC", DIGI_VOID1, 211, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
DIGI_ENTRY("VOID2.VOC", DIGI_VOID2, 212, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
DIGI_ENTRY("VOID3.VOC", DIGI_VOID3, 213, PRI_NPCWEAP, 0, 0, 0, -8000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("VOID4.VOC", DIGI_VOID4, 214, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
DIGI_ENTRY("VOID5.VOC", DIGI_VOID5, 215, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// VOLCANIC ERUPTION
|
||||||
|
DIGI_ENTRY("ERUPT.VOC", DIGI_ERUPTION, 216, PRI_AMBIENT, 0, 0, 0, DIST_MAXNORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// VOLCANIC SIZZLING PROJECTILES FLYING THROUGH AIR
|
||||||
|
DIGI_ENTRY("VOLPRJCT.VOC", DIGI_VOLCANOPROJECTILE, 217, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// LIGHT WIND AMBIENCE
|
||||||
|
DIGI_ENTRY("WIND1.VOC", DIGI_LIGHTWIND, 218, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// STRONG BLOWING WIND AMBIENCE
|
||||||
|
DIGI_ENTRY("WIND2.VOC", DIGI_STRONGWIND, 219, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// BREAKING WOOD AMBIENCE
|
||||||
|
DIGI_ENTRY("WOODBRK.VOC", DIGI_BREAKINGWOOD, 220, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// BREAKING, TUMBLING STONES FALLING AMBIENCE
|
||||||
|
DIGI_ENTRY("STONEBRK.VOC", DIGI_BREAKSTONES, 221, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// ENGINE ROOM SOUND
|
||||||
|
DIGI_ENTRY("ENGROOM1.VOC", DIGI_ENGROOM1, 222, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
DIGI_ENTRY("ENGROOM2.VOC", DIGI_ENGROOM2, 223, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
DIGI_ENTRY("ENGROOM3.VOC", DIGI_ENGROOM3, 224, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
DIGI_ENTRY("ENGROOM4.VOC", DIGI_ENGROOM4, 225, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
DIGI_ENTRY("ENGROOM5.VOC", DIGI_ENGROOM5, 226, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// BREAKING GLASS, LARGE WINDOW PANE
|
||||||
|
DIGI_ENTRY("GLASS3.VOC", DIGI_BREAKGLASS, 227, PRI_NPCDEATH, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// MUSICAL STINGER
|
||||||
|
DIGI_ENTRY("MUSSTING.VOC", DIGI_MUSSTING, 228, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// HELICOPTER LIKE SOUND
|
||||||
|
DIGI_ENTRY("HELI.VOC", DIGI_HELI, 229, PRI_SECTOROBJ, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// HUGE ECHOING HEART LIKE AMBIENCE
|
||||||
|
DIGI_ENTRY("BIGHART.VOC", DIGI_BIGHART, 230, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// EERIE ETHERAL TYPE WIND
|
||||||
|
DIGI_ENTRY("WIND4.VOC", DIGI_WIND4, 231, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// SPOOKY SINE WAVE SOUND
|
||||||
|
DIGI_ENTRY("SPOOKY1.VOC", DIGI_SPOOKY1, 232, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// SPOOKY SINE WAVE SOUND
|
||||||
|
DIGI_ENTRY("DRILL1.VOC", DIGI_DRILL1, 233, PRI_SECTOROBJ, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// JET ENGINE
|
||||||
|
DIGI_ENTRY("JET.VOC", DIGI_JET, 234, PRI_AMBIENT, 0, 0, 0, DIST_MAXNORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// CERIMONIAL DRUM CHANT
|
||||||
|
DIGI_ENTRY("DRUMCHNT.VOC", DIGI_DRUMCHANT, 235, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
DIGI_ENTRY("FLY.VOC", DIGI_BUZZZ, 236, PRI_MAX, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("UZICLK.VOC", DIGI_CHOP_CLICK, 237, PRI_MAX, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// !IMPORTANT! Make sure all player voices stay together
|
||||||
|
DIGI_ENTRY("STICKY2R.VOC", DIGI_SWORD_UP, 238, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("UZI1R.VOC", DIGI_UZI_UP, 239, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SHOTG1R.VOC", DIGI_SHOTGUN_UP, 240, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("BOLT1R.VOC", DIGI_ROCKET_UP, 241, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("BOLT1R.VOC", DIGI_GRENADE_UP, 242, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("BOLT1R.VOC", DIGI_RAIL_UP, 243, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("STICKY1R.VOC", DIGI_MINE_UP, 244, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
DIGI_ENTRY("", DIGI_FIRSTPLAYERVOICE,245, 0, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("BADMAN04.VOC", DIGI_TAUNTAI1, 246, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("COMEGET2.VOC", DIGI_TAUNTAI2, 247, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("GHOP07.VOC", DIGI_TAUNTAI3, 248, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("GOODDAY4.VOC", DIGI_TAUNTAI4, 249, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("KILLU05.VOC", DIGI_TAUNTAI5, 250, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("NATURAL4.VOC", DIGI_TAUNTAI6, 251, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("NOHONOR6.VOC", DIGI_TAUNTAI7, 252, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SAYON09.VOC", DIGI_TAUNTAI8, 253, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TAKSAN1.VOC", DIGI_TAUNTAI9, 254, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SNATCH01.VOC", DIGI_TAUNTAI10, 255, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
DIGI_ENTRY("CHOTO7.VOC", DIGI_PLAYERPAIN1, 256, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SWPAIN05.VOC", DIGI_PLAYERPAIN2, 257, PRI_PLAYERVOICE, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SWPAIN03.VOC", DIGI_PLAYERPAIN3, 258, PRI_PLAYERVOICE, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SWPAIN07.VOC", DIGI_PLAYERPAIN4, 259, PRI_PLAYERVOICE, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SWPAIN22.VOC", DIGI_PLAYERPAIN5, 260, PRI_PLAYERVOICE, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
DIGI_ENTRY("SWYELL03.VOC", DIGI_PLAYERYELL1, 261, PRI_PLAYERVOICE, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SWYELL05.VOC", DIGI_PLAYERYELL2, 262, PRI_PLAYERVOICE, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SWYELL06.VOC", DIGI_PLAYERYELL3, 263, PRI_PLAYERVOICE, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
DIGI_ENTRY("GRUNT06.VOC", DIGI_SEARCHWALL, 264, PRI_PLAYERVOICE, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
DIGI_ENTRY("NOWAY1.VOC", DIGI_NOURINAL, 265, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
DIGI_ENTRY("SWDIE02.VOC", DIGI_FALLSCREAM, 266, PRI_PLAYERDEATH, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("AHSO5.VOC", DIGI_GOTITEM1, 267, PRI_PLAYERDEATH, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("", DIGI_LASTPLAYERVOICE, 268, 0, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
//#ifndef SW_SHAREWARE
|
||||||
|
// was RAILB10.VOC
|
||||||
|
DIGI_ENTRY("HSHOT1.VOC", DIGI_RAILFIRE, 269, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
//#else
|
||||||
|
//DIGI_ENTRY("NULL.VOC", DIGI_NULL_RAILFIRE, 269, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL )
|
||||||
|
//#endif
|
||||||
|
DIGI_ENTRY("RAIL2.VOC", DIGI_RAILREADY, 270, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
DIGI_ENTRY("RAILUP09.VOC", DIGI_RAILPWRUP, 271, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
DIGI_ENTRY("HBOMB2.VOC", DIGI_NUCLEAREXP, 272, PRI_MAX, 0, 0, 0, DIST_LEVELWIDE, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("STANDBY.VOC", DIGI_NUKESTDBY, 273, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("CDOWN.VOC", DIGI_NUKECDOWN, 274, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SYSREAD.VOC", DIGI_NUKEREADY, 275, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
DIGI_ENTRY("HISS1.VOC", DIGI_CHEMGAS, 276, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
DIGI_ENTRY("CHBNCE1.VOC", DIGI_CHEMBOUNCE, 277, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("THROW.VOC", DIGI_THROW, 278, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("PULL.VOC", DIGI_PULL, 279, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
DIGI_ENTRY("STSCAN2.VOC", DIGI_MINEARM, 280, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("HBDOWN1.VOC", DIGI_HEARTDOWN, 281, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
//DIGI_ENTRY("TOOLUSE1.VOC", DIGI_TOOLBOX, 282, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL )
|
||||||
|
DIGI_ENTRY("NULL.VOC", DIGI_NULL_TOOLBOX, 282, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("GASPOP.VOC", DIGI_GASPOP, 283, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("40MMBNCE.VOC", DIGI_40MMBNCE, 284, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("BURGALRM.VOC", DIGI_BURGLARALARM, 285, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
DIGI_ENTRY("CARALRM2.VOC", DIGI_CARALARM, 286, PRI_LOW_PLAYERWEAP, 0, 0, 0, 25000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("CAOFF1.VOC", DIGI_CARALARMOFF, 287, PRI_LOW_PLAYERWEAP, 0, 0, 0, 25000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TACK1.VOC", DIGI_CALTROPS, 288, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("NVON3.VOC", DIGI_NIGHTON, 289, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("NVOFF2.VOC", DIGI_NIGHTOFF, 290, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SGSH01.VOC", DIGI_SHOTSHELLSPENT, 291, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SKID3.VOC", DIGI_BUSSKID, 292, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("CRASH4.VOC", DIGI_BUSCRASH, 293, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("BUS1.VOC", DIGI_BUSENGINE, 294, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("BIMP01.VOC", DIGI_ARMORHIT, 295, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
DIGI_ENTRY("ASIREN1.VOC", DIGI_ASIREN1, 296, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("FIRETRK1.VOC", DIGI_FIRETRK1, 297, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TRAFFIC1.VOC", DIGI_TRAFFIC1, 298, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TRAFFIC2.VOC", DIGI_TRAFFIC2, 299, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TRAFFIC3.VOC", DIGI_TRAFFIC3, 300, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TRAFFIC4.VOC", DIGI_TRAFFIC4, 301, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TRAFFIC5.VOC", DIGI_TRAFFIC5, 302, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TRAFFIC6.VOC", DIGI_TRAFFIC6, 303, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("HELI1.VOC", DIGI_HELI1, 304, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JET1.VOC", DIGI_JET1, 305, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("MOTO1.VOC", DIGI_MOTO1, 306, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("MOTO2.VOC", DIGI_MOTO2, 307, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("NEON1.VOC", DIGI_NEON1, 308, PRI_AMBIENT, 0, 0, 0, -8000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SUBWAY1.VOC", DIGI_SUBWAY, 309, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TRAINS01.VOC", DIGI_TRAIN1, 310, PRI_PLAYERDEATH, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
DIGI_ENTRY("COIN.VOC", DIGI_COINS, 311, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SWRDSMK1.VOC", DIGI_SWORDCLANK, 312, PRI_HI_PLAYERWEAP, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
// RIPPER2
|
||||||
|
DIGI_ENTRY("RIP2AMB.VOC", DIGI_RIPPER2AMBIENT, 313, PRI_NPCAMBIENT, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("RIP2ALRT.VOC", DIGI_RIPPER2ALERT, 314, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("RIP2ATCK.VOC", DIGI_RIPPER2ATTACK, 315, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("RIP2PAIN.VOC", DIGI_RIPPER2PAIN, 316, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("RIP2SCRM.VOC", DIGI_RIPPER2SCREAM, 317, PRI_NPCDEATH, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("RIP2HRT.VOC", DIGI_RIPPER2HEARTOUT,318, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
DIGI_ENTRY("M60.VOC", DIGI_M60, 319, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// SUMO
|
||||||
|
DIGI_ENTRY("SUMSCRM.VOC", DIGI_SUMOSCREAM, 320, PRI_MAX, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SUMALRT.VOC", DIGI_SUMOALERT, 321, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SUMAMB.VOC", DIGI_SUMOAMBIENT, 322, PRI_NPCAMBIENT, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SUMPAIN.VOC", DIGI_SUMOPAIN, 323, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// UNLOCK RAM LOCKED DOOR
|
||||||
|
DIGI_ENTRY("RAMLOCK.VOC", DIGI_RAMUNLOCK, 324, PRI_ENVIRONMENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
// UNLOCK CARD LOCKED DOOR
|
||||||
|
DIGI_ENTRY("CARDLOCK.VOC", DIGI_CARDUNLOCK, 325, PRI_ENVIRONMENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// More player voices
|
||||||
|
DIGI_ENTRY("ACS10.VOC", DIGI_ANCIENTSECRET, 326, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("AMDRIV01.VOC", DIGI_AMERICANDRIVER, 327, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("BABOON03.VOC", DIGI_DRIVELIKEBABOON, 328, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("BBURN04.VOC", DIGI_BURNBABY, 329, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("BIGWPN01.VOC", DIGI_LIKEBIGWEAPONS, 330, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("CBUNG01.VOC", DIGI_COWABUNGA, 331, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("CHARAD09.VOC", DIGI_NOCHARADE, 332, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("DTIME.VOC", DIGI_TIMETODIE, 333, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("EAT02.VOC", DIGI_EATTHIS, 334, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("FCRACK01.VOC", DIGI_FIRECRACKERUPASS,335, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("HCOW03.VOC", DIGI_HOLYCOW, 336, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("HCOW06.VOC", DIGI_HOLYPEICESOFCOW, 337, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("HSHIT03.VOC", DIGI_HOLYSHIT, 338, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("HSHIT04.VOC", DIGI_HOLYPEICESOFSHIT,339, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("IHOPE01.VOC", DIGI_PAYINGATTENTION, 340, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("ILIKE01.VOC", DIGI_EVERYBODYDEAD, 341, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("KUNGFU06.VOC", DIGI_KUNGFU, 342, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("LMOVE01.VOC", DIGI_HOWYOULIKEMOVE, 343, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("LWANG05.VOC", DIGI_NOMESSWITHWANG, 344, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("RAW01.VOC", DIGI_RAWREVENGE, 345, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("STUPID01.VOC", DIGI_YOULOOKSTUPID, 346, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TDICK02.VOC", DIGI_TINYDICK, 347, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TOURN01.VOC", DIGI_NOTOURNAMENT, 348, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("WWANG11.VOC", DIGI_WHOWANTSWANG, 349, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("YAK02.VOC", DIGI_MOVELIKEYAK, 350, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("REFLEX08.VOC", DIGI_ALLINREFLEXES, 351, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("EVADE01.VOC", DIGI_EVADEFOREVER, 352, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("MFLY03.VOC", DIGI_MRFLY, 353, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SHISEI03.VOC", DIGI_SHISEISI, 354, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("FWORKS01.VOC", DIGI_LIKEFIREWORKS, 355, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("HIRO03.VOC", DIGI_LIKEHIROSHIMA, 356, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("NAGA06.VOC", DIGI_LIKENAGASAKI, 357, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("PEARL03.VOC", DIGI_LIKEPEARL, 358, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("IAM01.VOC", DIGI_IAMSHADOW, 359, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("LIKNUK01.VOC", DIGI_ILIKENUKES, 360, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("LIKSRD01.VOC", DIGI_ILIKESWORD, 361, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("LIKSHK02.VOC", DIGI_ILIKESHURIKEN, 362, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("LUCK06.VOC", DIGI_BADLUCK, 363, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("MCHAN01.VOC", DIGI_NOMOVIEMRCHAN, 364, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("RCHAN13.VOC", DIGI_REALLIFEMRCHAN, 365, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("MUSIC03.VOC", DIGI_NOLIKEMUSIC, 366, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("NODIFF07.VOC", DIGI_NODIFFERENCE, 367, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("NOFEAR01.VOC", DIGI_NOFEAR, 368, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("NOPAIN.VOC", DIGI_NOPAIN, 369, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("REPMAN15.VOC", DIGI_NOREPAIRMAN, 370, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SOB15.VOC", DIGI_SONOFABITCH, 371, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("WEAK03.VOC", DIGI_PAINFORWEAK, 372, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SPEED04.VOC", DIGI_GOSPEEDY, 373, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("STIFF01.VOC", DIGI_GETTINGSTIFF, 374, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TOMB05.VOC", DIGI_TOMBRAIDER, 375, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TSTICK01.VOC", DIGI_STICKYGOTU1, 376, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TSTICK05.VOC", DIGI_STICKYGOTU2, 377, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TSTICK07.VOC", DIGI_STICKYGOTU3, 378, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TSTICK10.VOC", DIGI_STICKYGOTU4, 379, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TSWORD05.VOC", DIGI_SWORDGOTU1, 380, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TSWORD08.VOC", DIGI_SWORDGOTU2, 381, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TSWORD01.VOC", DIGI_SWORDGOTU3, 382, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SWYELL22.VOC", DIGI_HURTBAD1, 383, PRI_PLAYERVOICE, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SWYELL14.VOC", DIGI_HURTBAD2, 384, PRI_PLAYERVOICE, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SWYELL23.VOC", DIGI_HURTBAD3, 385, PRI_PLAYERVOICE, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SWYELL16.VOC", DIGI_HURTBAD4, 386, PRI_PLAYERVOICE, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SWYELL13.VOC", DIGI_HURTBAD5, 387, PRI_PLAYERVOICE, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// TOILETGIRL
|
||||||
|
DIGI_ENTRY("TGSCRM.VOC", DIGI_TOILETGIRLSCREAM, 388, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TGALRT.VOC", DIGI_TOILETGIRLALERT, 389, PRI_NPCATTACK, -300, 300, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TGAMB.VOC", DIGI_TOILETGIRLAMBIENT,390, PRI_NPCAMBIENT, -300, 300, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TGPAIN.VOC", DIGI_TOILETGIRLPAIN, 391, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TGTNT1.VOC", DIGI_TOILETGIRLTAUNT1, 392, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TGTNT2.VOC", DIGI_TOILETGIRLTAUNT2, 393, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
// MORE SUMO
|
||||||
|
DIGI_ENTRY("SUMOFART.VOC", DIGI_SUMOFART, 394, PRI_PLAYERVOICE, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
DIGI_ENTRY("GIBS04.VOC", DIGI_GIBS1, 395, PRI_LOW_PLAYERWEAP, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("GIBS05.VOC", DIGI_GIBS2, 396, PRI_LOW_PLAYERWEAP, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
DIGI_ENTRY("BIRDS01.VOC", DIGI_BIRDS1, 397, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("BIRDS02.VOC", DIGI_BIRDS2, 398, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TOILET01.VOC", DIGI_TOILET, 399, PRI_AMBIENT, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("FLIDLE.VOC", DIGI_FORKLIFTIDLE, 400, PRI_SECTOROBJ, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("FLRUN01.VOC", DIGI_FORKLIFTRUN, 401, PRI_SECTOROBJ, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TOYCAR03.VOC", DIGI_TOYCAR, 402, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
DIGI_ENTRY("PRESS03.VOC", DIGI_UZIMATIC, 403, PRI_AMBIENT, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("COMPON01.VOC", DIGI_COMPUTERPOWER, 404, PRI_LOW_PLAYERWEAP, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TURBON01.VOC", DIGI_GENERATORON, 405, PRI_LOW_PLAYERWEAP, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TURBRN01.VOC", DIGI_GENERATORRUN, 406, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
DIGI_ENTRY("BIGDRL03.VOC", DIGI_BIGDRILL, 407, PRI_SECTOROBJ, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("FLUOR01.VOC", DIGI_FLUORLIGHT, 408, PRI_AMBIENT, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("AMOEBA03.VOC", DIGI_AMOEBA, 409, PRI_SECTOROBJ, -200, 200, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
DIGI_ENTRY("BODY6.VOC", DIGI_BODYFALL2, 410, PRI_PLAYERDEATH, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("GIBS01.VOC", DIGI_GIBS3, 411, PRI_LOW_PLAYERWEAP, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("CHOK01.VOC", DIGI_NINJACHOKE, 412, PRI_NPCDEATH, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
DIGI_ENTRY("TRAIN3.VOC", DIGI_TRAIN3, 413, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TRAINR02.VOC", DIGI_TRAINR02, 414, PRI_PLAYERDEATH, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TRAIN8.VOC", DIGI_TRAIN8, 415, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TCLID01.VOC", DIGI_TRASHLID, 416, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// player voices
|
||||||
|
DIGI_ENTRY("ACCU01.VOC", DIGI_GETMEDKIT, 417, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("AHH03.VOC", DIGI_AHH, 418, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// Pachinko
|
||||||
|
DIGI_ENTRY("PALARM1.VOC", DIGI_PALARM, 419, PRI_SECTOROBJ, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("PFLIP4.VOC", DIGI_PFLIP, 420, PRI_SECTOROBJ, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("PROLL1.VOC", DIGI_PROLL1, 421, PRI_SECTOROBJ, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("PROLL2.VOC", DIGI_PROLL2, 422, PRI_SECTOROBJ, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("PROLL3.VOC", DIGI_PROLL3, 423, PRI_SECTOROBJ, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// BUNNY
|
||||||
|
DIGI_ENTRY("RABATK1.VOC", DIGI_BUNNYATTACK, 424, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("RABDIE1.VOC", DIGI_BUNNYDIE1, 425, PRI_NPCDEATH, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("RABDIE2.VOC", DIGI_BUNNYDIE2, 426, PRI_NPCDEATH, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("RABDIE3.VOC", DIGI_BUNNYDIE3, 427, PRI_NPCDEATH, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("RABAMB.VOC", DIGI_BUNNYAMBIENT, 428, PRI_NPCAMBIENT, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
DIGI_ENTRY("STONE2.VOC", DIGI_STONESLIDE, 429, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
DIGI_ENTRY("NINCUT3.VOC", DIGI_NINJAINHALF, 430, PRI_NPCDEATH, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("RIPCHST1.VOC", DIGI_RIPPER2CHEST, 431, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
DIGI_ENTRY("WHIPIN2.VOC", DIGI_WHIPME, 432, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
DIGI_ENTRY("ENDLEV3.VOC", DIGI_ENDLEV, 433, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("MDALARM1.VOC", DIGI_MDALARM, 434, PRI_PLAYERDEATH, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
DIGI_ENTRY("METALBRK.VOC", DIGI_BREAKMETAL, 435, PRI_AMBIENT, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("DEBRIBRK.VOC", DIGI_BREAKDEBRIS, 436, PRI_AMBIENT, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("MARBELS.VOC", DIGI_BREAKMARBELS, 437, PRI_AMBIENT, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("BANZAI1.VOC", DIGI_BANZAI, 438, PRI_PLAYERDEATH, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("HAHA19.VOC", DIGI_HAHA1, 439, PRI_PLAYERDEATH, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("HAHA11.VOC", DIGI_HAHA2, 440, PRI_PLAYERDEATH, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("HAHA15.VOC", DIGI_HAHA3, 441, PRI_PLAYERDEATH, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TELEPT02.VOC", DIGI_ITEM_SPAWN, 442, PRI_ITEM, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// More Player Voices
|
||||||
|
DIGI_ENTRY("JG1075.VOC", DIGI_NOREPAIRMAN2, 443, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG1082.VOC", DIGI_NOPOWER, 444, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG1087.VOC", DIGI_DOUBLEUZI, 445, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG1088.VOC", DIGI_NOTORDBUNNY, 446, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG1103.VOC", DIGI_CANBEONLYONE, 447, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG2000.VOC", DIGI_MIRROR1, 448, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG2005.VOC", DIGI_MIRROR2, 449, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG2020.VOC", DIGI_HITTINGWALLS, 450, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG2032.VOC", DIGI_GOTRAILGUN, 451, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG2053.VOC", DIGI_RABBITHUMP1, 452, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG2054.VOC", DIGI_RABBITHUMP2, 453, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG2045.VOC", DIGI_RABBITHUMP3, 454, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG2087.VOC", DIGI_RABBITHUMP4, 455, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG2074.VOC", DIGI_FAGRABBIT1, 456, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG2075.VOC", DIGI_FAGRABBIT2, 457, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG2078.VOC", DIGI_FAGRABBIT3, 458, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG3005.VOC", DIGI_STINKLIKEBABBOON, 459, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG3017.VOC", DIGI_WHATYOUEATBABY, 460, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG3047.VOC", DIGI_WHATDIEDUPTHERE, 461, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG3022.VOC", DIGI_YOUGOPOOPOO, 462, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG6053.VOC", DIGI_PULLMYFINGER, 463, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG3059.VOC", DIGI_SOAPYOUGOOD, 464, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG4012.VOC", DIGI_WASHWANG, 465, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG3070.VOC", DIGI_DROPSOAP, 466, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG6051.VOC", DIGI_REALTITS, 467, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG4002.VOC", DIGI_MSTRLEEP, 468, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG4024.VOC", DIGI_SEEKLEEPADVICE, 469, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG5042.VOC", DIGI_AVENGELEEPDEATH, 470, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG5049A.VOC", DIGI_LEEPGHOST, 471, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
DIGI_ENTRY("WDOOR02.VOC", DIGI_DOOR1, 472, PRI_SECTOROBJ, -200, 200, 0, 8000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("MDOOR03.VOC", DIGI_DOOR2, 473, PRI_SECTOROBJ, -200, 200, 0, 8000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("603981_1.VOC", DIGI_DOOR3, 474, PRI_SECTOROBJ, -200, 200, 0, 8000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("FLAG03.VOC", DIGI_FLAGWAVE, 475, PRI_SECTOROBJ, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
DIGI_ENTRY("JG7009.VOC", DIGI_SURFACE, 476, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG7001.VOC", DIGI_GASHURT, 477, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG2001.VOC", DIGI_BONUS_GRAB, 478, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
DIGI_ENTRY("ACHCRY04.VOC", DIGI_ANIMECRY, 479, PRI_SECTOROBJ, 0, 0, 0, -8000, VF_LOOP)
|
||||||
|
DIGI_ENTRY("ACHS010.VOC", DIGI_ANIMESING1, 480, PRI_SECTOROBJ, 0, 0, 0, -8000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("ACHT1006.VOC", DIGI_ANIMEMAD1, 481, PRI_SECTOROBJ, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("ACHS016.VOC", DIGI_ANIMESING2, 482, PRI_SECTOROBJ, 0, 0, 0, -8000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("ACHT120A.VOC", DIGI_ANIMEMAD2, 483, PRI_SECTOROBJ, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
DIGI_ENTRY("TELEPT02.VOC", DIGI_PLAYER_TELEPORT, 484, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SLASH1.VOC", DIGI_INTRO_SLASH, 485, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
DIGI_ENTRY("WARNING.VOC", DIGI_WARNING, 486, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("WHIRL1.VOC", DIGI_INTRO_WHIRL, 487, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
DIGI_ENTRY("ACHF1003.VOC", DIGI_TOILETGIRLFART1, 488, PRI_NPCAMBIENT, -300, 300, 0, -16000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("ACHF1002.VOC", DIGI_TOILETGIRLFART2, 489, PRI_NPCAMBIENT, -300, 300, 0, -16000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("ACHF1016.VOC", DIGI_TOILETGIRLFART3, 490, PRI_NPCAMBIENT, -300, 300, 0, -16000, VF_NORMAL)
|
||||||
|
|
||||||
|
DIGI_ENTRY("CHIMES4.VOC", DIGI_WINDCHIMES, 491, PRI_SECTOROBJ, 0, 0, 0, -8000, VF_LOOP)
|
||||||
|
|
||||||
|
// Yet more LoWang voices
|
||||||
|
DIGI_ENTRY("JGB023.VOC", DIGI_MADATCARPET, 492, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JGB020.VOC", DIGI_JUMPONCARPET, 493, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JGB080.VOC", DIGI_USEBROKENVEHICLE, 494, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JGB106.VOC", DIGI_STEPONCALTROPS, 495, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JGB130.VOC", DIGI_WANGSEESERP, 496, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JGSB4.VOC", DIGI_SERPTAUNTWANG, 497, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JGB166.VOC", DIGI_WANGTAUNTSERP1, 498, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JGB156.VOC", DIGI_WANGTAUNTSERP2, 499, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JGB193.VOC", DIGI_WANGORDER1, 500, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JGB202.VOC", DIGI_WANGORDER2, 501, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JGB340A.VOC", DIGI_WANGDROWNING, 502, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
DIGI_ENTRY("JGEN06.VOC", DIGI_ZILLAREGARDS, 503, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("MSG9.VOC", DIGI_PMESSAGE, 504, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
DIGI_ENTRY("UGLY1A.VOC", DIGI_SHAREND_UGLY1, 505, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("UGLY1B.VOC", DIGI_SHAREND_UGLY2, 506, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("TELEPT07.VOC", DIGI_SHAREND_TELEPORT, 507, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
DIGI_ENTRY("GOROSW1.VOC", DIGI_HOTHEADSWITCH, 508, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("BTCREAK2.VOC", DIGI_BOATCREAK, 509, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("BTRUN05.VOC", DIGI_BOATRUN2, 510, PRI_SECTOROBJ, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
DIGI_ENTRY("BTIDLE4.VOC", DIGI_BOATIDLE, 511, PRI_SECTOROBJ, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
DIGI_ENTRY("SHIPBELL.VOC", DIGI_SHIPBELL, 512, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("SHIPHRN1.VOC", DIGI_FOGHORN, 513, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
DIGI_ENTRY("EXP3.VOC", DIGI_CANNON, 514, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_WIDE, VF_NORMAL)
|
||||||
|
|
||||||
|
// Yet even more player voices!
|
||||||
|
DIGI_ENTRY("JG41001.VOC", DIGI_JG41001, 515, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG41012.VOC", DIGI_JG41012, 516, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG41018.VOC", DIGI_JG41018, 517, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG41028.VOC", DIGI_JG41028, 518, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG41048.VOC", DIGI_JG41048, 519, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG41052.VOC", DIGI_JG41052, 520, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG41058.VOC", DIGI_JG41058, 521, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG41060.VOC", DIGI_JG41060, 522, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG41075.VOC", DIGI_JG41075, 523, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG42004.VOC", DIGI_JG42004, 524, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG42019.VOC", DIGI_JG42019, 525, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG42021.VOC", DIGI_JG42021, 526, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG42028.VOC", DIGI_JG42028, 527, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG42033.VOC", DIGI_JG42033, 528, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG42034.VOC", DIGI_JG42034, 529, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG42050.VOC", DIGI_JG42050, 530, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG42056.VOC", DIGI_JG42056, 531, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG42061.VOC", DIGI_JG42061, 532, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG43004.VOC", DIGI_JG43004, 533, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG43015.VOC", DIGI_JG43015, 534, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG43019.VOC", DIGI_JG43019, 535, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG43021.VOC", DIGI_JG43021, 536, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG44011.VOC", DIGI_JG44011, 537, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG44014.VOC", DIGI_JG44014, 538, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG44027.VOC", DIGI_JG44027, 539, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG44038.VOC", DIGI_JG44038, 540, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG44039.VOC", DIGI_JG44039, 541, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG44048.VOC", DIGI_JG44048, 542, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG44052.VOC", DIGI_JG44052, 543, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG45014.VOC", DIGI_JG45014, 544, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG44068.VOC", DIGI_JG44068, 545, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG45010.VOC", DIGI_JG45010, 546, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG45018.VOC", DIGI_JG45018, 547, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG45030.VOC", DIGI_JG45030, 548, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG45033.VOC", DIGI_JG45033, 549, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG45043.VOC", DIGI_JG45043, 550, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG45053.VOC", DIGI_JG45053, 551, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG45067.VOC", DIGI_JG45067, 552, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG46005.VOC", DIGI_JG46005, 553, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG46010.VOC", DIGI_JG46010, 554, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
// And the girls talk back to Wang
|
||||||
|
// Car Girl
|
||||||
|
DIGI_ENTRY("LANI049.VOC", DIGI_LANI049, 555, PRI_NPCAMBIENT, -200, 200, 0, -16000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("LANI051.VOC", DIGI_LANI051, 556, PRI_NPCAMBIENT, -200, 200, 0, -16000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("LANI052.VOC", DIGI_LANI052, 557, PRI_NPCAMBIENT, -200, 200, 0, -16000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("LANI054.VOC", DIGI_LANI054, 558, PRI_NPCAMBIENT, -200, 200, 0, -16000, VF_NORMAL)
|
||||||
|
|
||||||
|
// Sailor Moon
|
||||||
|
DIGI_ENTRY("LANI060.VOC", DIGI_LANI060, 559, PRI_NPCAMBIENT, -200, 200, 0, -16000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("LANI063.VOC", DIGI_LANI063, 560, PRI_NPCAMBIENT, -200, 200, 0, -16000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("LANI065.VOC", DIGI_LANI065, 561, PRI_NPCAMBIENT, -200, 200, 0, -16000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("LANI066.VOC", DIGI_LANI066, 562, PRI_NPCAMBIENT, -200, 200, 0, -16000, VF_NORMAL)
|
||||||
|
|
||||||
|
// Mechanic
|
||||||
|
DIGI_ENTRY("LANI073.VOC", DIGI_LANI073, 563, PRI_NPCAMBIENT, -200, 200, 0, -16000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("LANI075.VOC", DIGI_LANI075, 564, PRI_NPCAMBIENT, -200, 200, 0, -16000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("LANI077.VOC", DIGI_LANI077, 565, PRI_NPCAMBIENT, -200, 200, 0, -16000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("LANI079.VOC", DIGI_LANI079, 566, PRI_NPCAMBIENT, -200, 200, 0, -16000, VF_NORMAL)
|
||||||
|
|
||||||
|
// Prune
|
||||||
|
DIGI_ENTRY("LANI089.VOC", DIGI_LANI089, 567, PRI_NPCAMBIENT, -200, 200, 0, -16000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("LANI091.VOC", DIGI_LANI091, 568, PRI_NPCAMBIENT, -200, 200, 0, -16000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("LANI093.VOC", DIGI_LANI093, 569, PRI_NPCAMBIENT, -200, 200, 0, -16000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("LANI095.VOC", DIGI_LANI095, 570, PRI_NPCAMBIENT, -200, 200, 0, -16000, VF_NORMAL)
|
||||||
|
|
||||||
|
DIGI_ENTRY("AD5.VOC", DIGI_VENTWALK, 571, PRI_ENVIRONMENT, -300, 300, 0, 8000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("AD6.VOC", DIGI_CARWALK, 572, PRI_ENVIRONMENT, -300, 300, 0, 8000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JET05.VOC", DIGI_JETSOAR, 573, PRI_SECTOROBJ, -100, 100, 0, 8000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("VC04.VOC", DIGI_VACUUM, 574, PRI_SECTOROBJ, -100, 100, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
|
||||||
|
// GIRL NINJA
|
||||||
|
DIGI_ENTRY("LANI017.VOC", DIGI_GIRLNINJAALERTT, 575, PRI_NPCATTACK, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("LANI033.VOC", DIGI_GIRLNINJASCREAM, 576, PRI_NPCDEATH, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("LANI001.VOC", DIGI_GIRLNINJAALERT, 577, PRI_NPCATTACK, -200, 200, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
DIGI_ENTRY("CACKLE.VOC", DIGI_PRUNECACKLE, 578, PRI_NPCAMBIENT, -200, 200, 0, -16000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("CACKLE2.VOC", DIGI_PRUNECACKLE2, 579, PRI_NPCAMBIENT, -200, 200, 0, -16000, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("CACKLE3.VOC", DIGI_PRUNECACKLE3, 580, PRI_NPCAMBIENT, -200, 200, 0, -16000, VF_NORMAL)
|
||||||
|
|
||||||
|
DIGI_ENTRY("SUMO058.VOC", DIGI_SUMOSTOMP, 581, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("ELEV01.VOC", DIGI_VATOR, 582, PRI_SECTOROBJ, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
DIGI_ENTRY("JG9009.VOC", DIGI_JG9009, 583, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("Z16004.VOC", DIGI_Z16004, 584, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("Z16012.VOC", DIGI_Z16012, 585, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("Z16022.VOC", DIGI_Z16022, 586, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("Z16027.VOC", DIGI_Z16027, 587, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG93030.VOC", DIGI_JG93030, 588, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG94002.VOC", DIGI_JG94002, 589, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("Z17010.VOC", DIGI_Z17010, 590, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("Z17052.VOC", DIGI_Z17052, 591, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("Z17025.VOC", DIGI_Z17025, 592, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("ML25014.VOC", DIGI_ML25014, 593, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("ML250101.VOC",DIGI_ML250101, 594, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG9022.VOC", DIGI_JG9022, 595, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG9032.VOC", DIGI_JG9032, 596, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG9038.VOC", DIGI_JG9038, 597, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG9055.VOC", DIGI_JG9055, 598, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG9060.VOC", DIGI_JG9060, 599, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG92055.VOC", DIGI_JG92055, 600, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("ML25032.VOC", DIGI_ML25032, 601, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG92036.VOC", DIGI_JG92036, 602, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG92042.VOC", DIGI_JG92042, 603, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("ML26001.VOC", DIGI_ML26001, 604, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG93000.VOC", DIGI_JG93000, 605, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG93011.VOC", DIGI_JG93011, 606, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG93018.VOC", DIGI_JG93018, 607, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG93023.VOC", DIGI_JG93023, 608, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("ML26008.VOC", DIGI_ML26008, 609, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("ML26011.VOC", DIGI_ML26011, 610, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG94007.VOC", DIGI_JG94007, 611, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG94024.VOC", DIGI_JG94024, 612, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG94039.VOC", DIGI_JG94039, 613, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("JG95012.VOC", DIGI_JG95012, 614, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("ZWALK5.VOC", DIGI_ZILLASTOMP, 615, PRI_NPCATTACK, -100, 100, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("ZC1.VOC", DIGI_ZC1, 616, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("ZC2.VOC", DIGI_ZC2, 617, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("ZC3.VOC", DIGI_ZC3, 618, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("ZC4.VOC", DIGI_ZC4, 619, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("ZC5.VOC", DIGI_ZC5, 620, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("ZC6.VOC", DIGI_ZC6, 621, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("ZC7.VOC", DIGI_ZC7, 622, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_LOOP)
|
||||||
|
DIGI_ENTRY("ZC8.VOC", DIGI_ZC8, 623, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("ZC9.VOC", DIGI_ZC9, 624, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
DIGI_ENTRY("Z16043.VOC", DIGI_Z16043, 625, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
|
||||||
|
|
||||||
|
#undef DIGI_ENTRY
|
2724
polymer/eduke32/source/sw/src/draw.c
Normal file
2724
polymer/eduke32/source/sw/src/draw.c
Normal file
File diff suppressed because it is too large
Load diff
682
polymer/eduke32/source/sw/src/eel.c
Normal file
682
polymer/eduke32/source/sw/src/eel.c
Normal file
|
@ -0,0 +1,682 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
#include "build.h"
|
||||||
|
|
||||||
|
#include "keys.h"
|
||||||
|
#include "names2.h"
|
||||||
|
#include "game.h"
|
||||||
|
#include "tags.h"
|
||||||
|
#include "ai.h"
|
||||||
|
#include "actor.h"
|
||||||
|
#include "weapon.h"
|
||||||
|
#include "track.h"
|
||||||
|
|
||||||
|
|
||||||
|
DECISION EelBattle[] =
|
||||||
|
{
|
||||||
|
{649, InitActorMoveCloser },
|
||||||
|
{650, InitActorAlertNoise },
|
||||||
|
{1024, InitActorMoveCloser }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION EelOffense[] =
|
||||||
|
{
|
||||||
|
{649, InitActorMoveCloser },
|
||||||
|
{750, InitActorAlertNoise },
|
||||||
|
{1024, InitActorMoveCloser }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION EelBroadcast[] =
|
||||||
|
{
|
||||||
|
{3, InitActorAlertNoise },
|
||||||
|
{6, InitActorAmbientNoise },
|
||||||
|
{1024, InitActorDecide }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION EelSurprised[] =
|
||||||
|
{
|
||||||
|
{701, InitActorMoveCloser },
|
||||||
|
{1024, InitActorDecide }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION EelEvasive[] =
|
||||||
|
{
|
||||||
|
{ 790, InitActorRunAway },
|
||||||
|
{1024, InitActorMoveCloser },
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION EelLostTarget[] =
|
||||||
|
{
|
||||||
|
{900, InitActorFindPlayer },
|
||||||
|
{1024, InitActorWanderAround }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION EelCloseRange[] =
|
||||||
|
{
|
||||||
|
{950, InitActorAttack },
|
||||||
|
{1024, InitActorReposition }
|
||||||
|
};
|
||||||
|
|
||||||
|
ANIMATOR InitEelFire;
|
||||||
|
|
||||||
|
DECISION EelTouchTarget[] =
|
||||||
|
{
|
||||||
|
{1024, InitActorAttack },
|
||||||
|
};
|
||||||
|
|
||||||
|
PERSONALITY EelPersonality =
|
||||||
|
{
|
||||||
|
EelBattle,
|
||||||
|
EelOffense,
|
||||||
|
EelBroadcast,
|
||||||
|
EelSurprised,
|
||||||
|
EelEvasive,
|
||||||
|
EelLostTarget,
|
||||||
|
EelCloseRange,
|
||||||
|
EelTouchTarget
|
||||||
|
};
|
||||||
|
|
||||||
|
ATTRIBUTE EelAttrib =
|
||||||
|
{
|
||||||
|
{100, 110, 120, 130}, // Speeds
|
||||||
|
{3, 0, -2, -3}, // Tic Adjusts
|
||||||
|
3, // MaxWeapons;
|
||||||
|
{
|
||||||
|
0, 0, 0,
|
||||||
|
0, 0, 0,
|
||||||
|
0,0,0,0
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
// EEL RUN
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define EEL_RUN_RATE 20
|
||||||
|
|
||||||
|
ANIMATOR DoEelMove,NullAnimator,DoStayOnFloor, DoActorDebris, NullEel;
|
||||||
|
|
||||||
|
STATE s_EelRun[5][4] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{EEL_RUN_R0 + 0, EEL_RUN_RATE, DoEelMove, &s_EelRun[0][1]},
|
||||||
|
{EEL_RUN_R0 + 1, EEL_RUN_RATE, DoEelMove, &s_EelRun[0][2]},
|
||||||
|
{EEL_RUN_R0 + 2, EEL_RUN_RATE, DoEelMove, &s_EelRun[0][3]},
|
||||||
|
{EEL_RUN_R0 + 1, EEL_RUN_RATE, DoEelMove, &s_EelRun[0][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{EEL_RUN_R1 + 0, EEL_RUN_RATE, DoEelMove, &s_EelRun[1][1]},
|
||||||
|
{EEL_RUN_R1 + 1, EEL_RUN_RATE, DoEelMove, &s_EelRun[1][2]},
|
||||||
|
{EEL_RUN_R1 + 2, EEL_RUN_RATE, DoEelMove, &s_EelRun[1][3]},
|
||||||
|
{EEL_RUN_R1 + 1, EEL_RUN_RATE, DoEelMove, &s_EelRun[1][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{EEL_RUN_R2 + 0, EEL_RUN_RATE, DoEelMove, &s_EelRun[2][1]},
|
||||||
|
{EEL_RUN_R2 + 1, EEL_RUN_RATE, DoEelMove, &s_EelRun[2][2]},
|
||||||
|
{EEL_RUN_R2 + 2, EEL_RUN_RATE, DoEelMove, &s_EelRun[2][3]},
|
||||||
|
{EEL_RUN_R2 + 1, EEL_RUN_RATE, DoEelMove, &s_EelRun[2][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{EEL_RUN_R3 + 0, EEL_RUN_RATE, DoEelMove, &s_EelRun[3][1]},
|
||||||
|
{EEL_RUN_R3 + 1, EEL_RUN_RATE, DoEelMove, &s_EelRun[3][2]},
|
||||||
|
{EEL_RUN_R3 + 2, EEL_RUN_RATE, DoEelMove, &s_EelRun[3][3]},
|
||||||
|
{EEL_RUN_R3 + 1, EEL_RUN_RATE, DoEelMove, &s_EelRun[3][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{EEL_RUN_R4 + 0, EEL_RUN_RATE, DoEelMove, &s_EelRun[4][1]},
|
||||||
|
{EEL_RUN_R4 + 1, EEL_RUN_RATE, DoEelMove, &s_EelRun[4][2]},
|
||||||
|
{EEL_RUN_R4 + 2, EEL_RUN_RATE, DoEelMove, &s_EelRun[4][3]},
|
||||||
|
{EEL_RUN_R4 + 1, EEL_RUN_RATE, DoEelMove, &s_EelRun[4][0]},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
STATEp sg_EelRun[] =
|
||||||
|
{
|
||||||
|
&s_EelRun[0][0],
|
||||||
|
&s_EelRun[1][0],
|
||||||
|
&s_EelRun[2][0],
|
||||||
|
&s_EelRun[3][0],
|
||||||
|
&s_EelRun[4][0]
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// EEL STAND
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
STATE s_EelStand[5][1] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{EEL_RUN_R0 + 0, EEL_RUN_RATE, DoEelMove, &s_EelStand[0][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{EEL_RUN_R1 + 0, EEL_RUN_RATE, DoEelMove, &s_EelStand[1][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{EEL_RUN_R2 + 0, EEL_RUN_RATE, DoEelMove, &s_EelStand[2][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{EEL_RUN_R3 + 0, EEL_RUN_RATE, DoEelMove, &s_EelStand[3][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{EEL_RUN_R4 + 0, EEL_RUN_RATE, DoEelMove, &s_EelStand[4][0]},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
STATEp sg_EelStand[] =
|
||||||
|
{
|
||||||
|
&s_EelStand[0][0],
|
||||||
|
&s_EelStand[1][0],
|
||||||
|
&s_EelStand[2][0],
|
||||||
|
&s_EelStand[3][0],
|
||||||
|
&s_EelStand[4][0]
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// EEL FIRE
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
ANIMATOR InitEelFire, EelShock;
|
||||||
|
#define EEL_FIRE_RATE 12
|
||||||
|
|
||||||
|
STATE s_EelAttack[5][7] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{EEL_FIRE_R0 + 0, EEL_FIRE_RATE*2, NullEel, &s_EelAttack[0][1]},
|
||||||
|
{EEL_FIRE_R0 + 1, EEL_FIRE_RATE*2, NullEel, &s_EelAttack[0][2]},
|
||||||
|
{EEL_FIRE_R0 + 2, EEL_FIRE_RATE*2, NullEel, &s_EelAttack[0][3]},
|
||||||
|
{EEL_FIRE_R0 + 2, 0|SF_QUICK_CALL, InitEelFire, &s_EelAttack[0][4]},
|
||||||
|
{EEL_FIRE_R0 + 2, EEL_FIRE_RATE, NullEel, &s_EelAttack[0][5]},
|
||||||
|
{EEL_FIRE_R0 + 3, 0|SF_QUICK_CALL, InitActorDecide, &s_EelAttack[0][6]},
|
||||||
|
{EEL_RUN_R0 + 3, EEL_FIRE_RATE, DoEelMove, &s_EelAttack[0][6]}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{EEL_FIRE_R1 + 0, EEL_FIRE_RATE*2, NullEel, &s_EelAttack[1][1]},
|
||||||
|
{EEL_FIRE_R1 + 1, EEL_FIRE_RATE*2, NullEel, &s_EelAttack[1][2]},
|
||||||
|
{EEL_FIRE_R1 + 2, EEL_FIRE_RATE*2, NullEel, &s_EelAttack[1][3]},
|
||||||
|
{EEL_FIRE_R1 + 2, 0|SF_QUICK_CALL, InitEelFire, &s_EelAttack[1][5]},
|
||||||
|
{EEL_FIRE_R1 + 2, EEL_FIRE_RATE, NullEel, &s_EelAttack[1][6]},
|
||||||
|
{EEL_FIRE_R1 + 3, 0|SF_QUICK_CALL, InitActorDecide, &s_EelAttack[1][7]},
|
||||||
|
{EEL_RUN_R0 + 3, EEL_FIRE_RATE, DoEelMove, &s_EelAttack[1][7]}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{EEL_FIRE_R2 + 0, EEL_FIRE_RATE*2, NullEel, &s_EelAttack[2][1]},
|
||||||
|
{EEL_FIRE_R2 + 1, EEL_FIRE_RATE*2, NullEel, &s_EelAttack[2][2]},
|
||||||
|
{EEL_FIRE_R2 + 2, EEL_FIRE_RATE*2, NullEel, &s_EelAttack[2][3]},
|
||||||
|
{EEL_FIRE_R2 + 2, 0|SF_QUICK_CALL, InitEelFire, &s_EelAttack[2][4]},
|
||||||
|
{EEL_FIRE_R2 + 2, EEL_FIRE_RATE, NullEel, &s_EelAttack[2][5]},
|
||||||
|
{EEL_FIRE_R2 + 3, 0|SF_QUICK_CALL, InitActorDecide, &s_EelAttack[2][6]},
|
||||||
|
{EEL_RUN_R0 + 3, EEL_FIRE_RATE, DoEelMove, &s_EelAttack[2][6]}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{EEL_RUN_R3 + 0, EEL_FIRE_RATE*2, NullEel, &s_EelAttack[3][1]},
|
||||||
|
{EEL_RUN_R3 + 1, EEL_FIRE_RATE*2, NullEel, &s_EelAttack[3][2]},
|
||||||
|
{EEL_RUN_R3 + 2, EEL_FIRE_RATE*2, NullEel, &s_EelAttack[3][3]},
|
||||||
|
{EEL_RUN_R3 + 2, 0|SF_QUICK_CALL, InitEelFire, &s_EelAttack[3][4]},
|
||||||
|
{EEL_RUN_R3 + 2, EEL_FIRE_RATE, NullEel, &s_EelAttack[3][5]},
|
||||||
|
{EEL_RUN_R3 + 3, 0|SF_QUICK_CALL, InitActorDecide, &s_EelAttack[3][6]},
|
||||||
|
{EEL_RUN_R0 + 3, EEL_FIRE_RATE, DoEelMove, &s_EelAttack[3][6]}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{EEL_RUN_R4 + 0, EEL_FIRE_RATE*2, NullEel, &s_EelAttack[4][1]},
|
||||||
|
{EEL_RUN_R4 + 1, EEL_FIRE_RATE*2, NullEel, &s_EelAttack[4][2]},
|
||||||
|
{EEL_RUN_R4 + 2, EEL_FIRE_RATE*2, NullEel, &s_EelAttack[4][3]},
|
||||||
|
{EEL_RUN_R4 + 2, 0|SF_QUICK_CALL, InitEelFire, &s_EelAttack[4][4]},
|
||||||
|
{EEL_RUN_R4 + 2, EEL_FIRE_RATE, NullEel, &s_EelAttack[4][5]},
|
||||||
|
{EEL_RUN_R4 + 3, 0|SF_QUICK_CALL, InitActorDecide, &s_EelAttack[4][6]},
|
||||||
|
{EEL_RUN_R0 + 3, EEL_FIRE_RATE, DoEelMove, &s_EelAttack[4][6]}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
STATEp sg_EelAttack[] =
|
||||||
|
{
|
||||||
|
&s_EelAttack[0][0],
|
||||||
|
&s_EelAttack[1][0],
|
||||||
|
&s_EelAttack[2][0],
|
||||||
|
&s_EelAttack[3][0],
|
||||||
|
&s_EelAttack[4][0]
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// EEL DIE
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define EEL_DIE_RATE 20
|
||||||
|
|
||||||
|
ANIMATOR DoEelDeath;
|
||||||
|
STATE s_EelDie[] =
|
||||||
|
{
|
||||||
|
{EEL_DIE + 0, EEL_DIE_RATE, DoEelDeath, &s_EelDie[1]},
|
||||||
|
{EEL_DIE + 0, EEL_DIE_RATE, DoEelDeath, &s_EelDie[2]},
|
||||||
|
{EEL_DIE + 0, EEL_DIE_RATE, DoEelDeath, &s_EelDie[3]},
|
||||||
|
{EEL_DIE + 0, EEL_DIE_RATE, DoEelDeath, &s_EelDie[4]},
|
||||||
|
{EEL_DIE + 0, EEL_DIE_RATE, DoEelDeath, &s_EelDie[5]},
|
||||||
|
{EEL_DIE + 0, EEL_DIE_RATE, DoEelDeath, &s_EelDie[5]},
|
||||||
|
};
|
||||||
|
|
||||||
|
STATEp sg_EelDie[] =
|
||||||
|
{
|
||||||
|
s_EelDie
|
||||||
|
};
|
||||||
|
|
||||||
|
STATE s_EelDead[] =
|
||||||
|
{
|
||||||
|
// {EEL_DEAD, SF_QUICK_CALL , QueueFloorBlood, &s_EelDead[1]},
|
||||||
|
{EEL_DEAD, EEL_DIE_RATE, DoActorDebris, &s_EelDead[0]},
|
||||||
|
};
|
||||||
|
|
||||||
|
STATEp sg_EelDead[] =
|
||||||
|
{
|
||||||
|
s_EelDead
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
STATEp *Stand[MAX_WEAPONS];
|
||||||
|
STATEp *Run;
|
||||||
|
STATEp *Jump;
|
||||||
|
STATEp *Fall;
|
||||||
|
STATEp *Crawl;
|
||||||
|
STATEp *Swim;
|
||||||
|
STATEp *Fly;
|
||||||
|
STATEp *Rise;
|
||||||
|
STATEp *Sit;
|
||||||
|
STATEp *Look;
|
||||||
|
STATEp *Climb;
|
||||||
|
STATEp *Pain;
|
||||||
|
STATEp *Death1;
|
||||||
|
STATEp *Death2;
|
||||||
|
STATEp *Dead;
|
||||||
|
STATEp *DeathJump;
|
||||||
|
STATEp *DeathFall;
|
||||||
|
STATEp *CloseAttack[2];
|
||||||
|
STATEp *Attack[6];
|
||||||
|
STATEp *Special[2];
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
ACTOR_ACTION_SET EelActionSet =
|
||||||
|
{
|
||||||
|
sg_EelStand,
|
||||||
|
sg_EelRun,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
sg_EelRun,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
sg_EelStand,
|
||||||
|
NULL,
|
||||||
|
NULL, //climb
|
||||||
|
sg_EelStand, //pain
|
||||||
|
sg_EelDie,
|
||||||
|
NULL,
|
||||||
|
sg_EelDead,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
{sg_EelAttack},
|
||||||
|
{1024},
|
||||||
|
{sg_EelAttack},
|
||||||
|
{1024},
|
||||||
|
{NULL,NULL},
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
int DoEelMatchPlayerZ(short SpriteNum);
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
EelCommon(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
|
sp->clipdist = (100) >> 2;
|
||||||
|
u->floor_dist = Z(16);
|
||||||
|
u->floor_dist = Z(16);
|
||||||
|
u->ceiling_dist = Z(20);
|
||||||
|
|
||||||
|
u->sz = sp->z;
|
||||||
|
|
||||||
|
sp->xrepeat = 35;
|
||||||
|
sp->yrepeat = 27;
|
||||||
|
u->Radius = 400;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
SetupEel(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
USERp u;
|
||||||
|
ANIMATOR DoActorDecide;
|
||||||
|
|
||||||
|
if (TEST(sp->cstat, CSTAT_SPRITE_RESTORE))
|
||||||
|
{
|
||||||
|
u = User[SpriteNum];
|
||||||
|
ASSERT(u);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
User[SpriteNum] = u = SpawnUser(SpriteNum,EEL_RUN_R0,s_EelRun[0]);
|
||||||
|
u->Health = 40;
|
||||||
|
}
|
||||||
|
|
||||||
|
ChangeState(SpriteNum, s_EelRun[0]);
|
||||||
|
u->Attrib = &EelAttrib;
|
||||||
|
DoActorSetSpeed(SpriteNum, NORM_SPEED);
|
||||||
|
u->StateEnd = s_EelDie;
|
||||||
|
u->Rot = sg_EelRun;
|
||||||
|
|
||||||
|
EnemyDefaults(SpriteNum, &EelActionSet, &EelPersonality);
|
||||||
|
|
||||||
|
SET(u->Flags, SPR_NO_SCAREDZ|SPR_XFLIP_TOGGLE);
|
||||||
|
|
||||||
|
EelCommon(SpriteNum);
|
||||||
|
|
||||||
|
RESET(u->Flags, SPR_SHADOW); // Turn off shadows
|
||||||
|
u->zclip = Z(8);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
int
|
||||||
|
NewEel(short SpriteNum)
|
||||||
|
{
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
SPRITEp sp = User[SpriteNum]->SpriteP;
|
||||||
|
USERp nu;
|
||||||
|
SPRITEp np;
|
||||||
|
ANIMATOR DoActorDecide;
|
||||||
|
short new;
|
||||||
|
|
||||||
|
|
||||||
|
new = SpawnSprite(STAT_ENEMY, EEL_RUN_R0, &s_EelBirth, sp->sectnum, sp->x, sp->y, sp->z, sp->ang, 50);
|
||||||
|
|
||||||
|
nu = User[new];
|
||||||
|
np = &sprite[new];
|
||||||
|
|
||||||
|
ChangeState(new, &s_EelBirth);
|
||||||
|
nu->StateEnd = s_EelDie;
|
||||||
|
nu->Rot = sg_EelRun;
|
||||||
|
np->pal = nu->spal = u->spal;
|
||||||
|
|
||||||
|
nu->ActorActionSet = &EelActionSet;
|
||||||
|
|
||||||
|
np->shade = sp->shade;
|
||||||
|
|
||||||
|
EelCommon(new);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int NullEel(short SpriteNum)
|
||||||
|
{
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
SPRITEp sp = User[SpriteNum]->SpriteP;
|
||||||
|
|
||||||
|
if (TEST(u->Flags,SPR_SLIDING))
|
||||||
|
DoActorSlide(SpriteNum);
|
||||||
|
|
||||||
|
DoEelMatchPlayerZ(SpriteNum);
|
||||||
|
|
||||||
|
DoActorSectorDamage(SpriteNum);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int DoEelMatchPlayerZ(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
SPRITEp tsp = User[SpriteNum]->tgt_sp;
|
||||||
|
int zdiff,zdist;
|
||||||
|
int loz,hiz;
|
||||||
|
int dist,a,b,c;
|
||||||
|
|
||||||
|
int bound;
|
||||||
|
|
||||||
|
if (FAF_ConnectArea(sp->sectnum))
|
||||||
|
{
|
||||||
|
if (u->hi_sectp)
|
||||||
|
{
|
||||||
|
u->hiz = sector[sp->sectnum].ceilingz + Z(16);
|
||||||
|
u->hi_sectp = §or[sp->sectnum];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (u->hiz < sector[sp->sectnum].ceilingz + Z(16))
|
||||||
|
u->hiz = sector[sp->sectnum].ceilingz + Z(16);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// actor does a sine wave about u->sz - this is the z mid point
|
||||||
|
|
||||||
|
zdiff = (SPRITEp_BOS(tsp) - Z(8)) - u->sz;
|
||||||
|
|
||||||
|
// check z diff of the player and the sprite
|
||||||
|
zdist = Z(20 + RANDOM_RANGE(64)); // put a random amount
|
||||||
|
if (labs(zdiff) > zdist)
|
||||||
|
{
|
||||||
|
if (zdiff > 0)
|
||||||
|
// manipulate the z midpoint
|
||||||
|
u->sz += 160 * ACTORMOVETICS;
|
||||||
|
else
|
||||||
|
u->sz -= 160 * ACTORMOVETICS;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define EEL_BOB_AMT (Z(4))
|
||||||
|
|
||||||
|
// save off lo and hi z
|
||||||
|
loz = u->loz;
|
||||||
|
hiz = u->hiz;
|
||||||
|
|
||||||
|
// adjust loz/hiz for water depth
|
||||||
|
if (u->lo_sectp && SectUser[u->lo_sectp - sector] && SectUser[u->lo_sectp - sector]->depth)
|
||||||
|
loz -= Z(SectUser[u->lo_sectp - sector]->depth) - Z(8);
|
||||||
|
|
||||||
|
// lower bound
|
||||||
|
if (u->lo_sp && u->tgt_sp == u->hi_sp)
|
||||||
|
{
|
||||||
|
DISTANCE(sp->x, sp->y, u->lo_sp->x, u->lo_sp->y, dist, a, b, c);
|
||||||
|
if (dist <= 300)
|
||||||
|
bound = u->sz;
|
||||||
|
else
|
||||||
|
bound = loz - u->floor_dist;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
bound = loz - u->floor_dist - EEL_BOB_AMT;
|
||||||
|
|
||||||
|
if (u->sz > bound)
|
||||||
|
{
|
||||||
|
u->sz = bound;
|
||||||
|
}
|
||||||
|
|
||||||
|
// upper bound
|
||||||
|
if (u->hi_sp && u->tgt_sp == u->hi_sp)
|
||||||
|
{
|
||||||
|
DISTANCE(sp->x, sp->y, u->hi_sp->x, u->hi_sp->y, dist, a, b, c);
|
||||||
|
if (dist <= 300)
|
||||||
|
bound = u->sz;
|
||||||
|
else
|
||||||
|
bound = hiz + u->ceiling_dist;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
bound = hiz + u->ceiling_dist + EEL_BOB_AMT;
|
||||||
|
|
||||||
|
if (u->sz < bound)
|
||||||
|
{
|
||||||
|
u->sz = bound;
|
||||||
|
}
|
||||||
|
|
||||||
|
u->sz = min(u->sz, loz - u->floor_dist);
|
||||||
|
u->sz = max(u->sz, hiz + u->ceiling_dist);
|
||||||
|
|
||||||
|
u->Counter = (u->Counter + (ACTORMOVETICS << 3) + (ACTORMOVETICS << 1)) & 2047;
|
||||||
|
sp->z = u->sz + ((EEL_BOB_AMT * (int)sintable[u->Counter]) >> 14);
|
||||||
|
|
||||||
|
bound = u->hiz + u->ceiling_dist + EEL_BOB_AMT;
|
||||||
|
if (sp->z < bound)
|
||||||
|
{
|
||||||
|
// bumped something
|
||||||
|
sp->z = u->sz = bound + EEL_BOB_AMT;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
DoEelDeath(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
int nx, ny;
|
||||||
|
if (TEST(u->Flags, SPR_FALLING))
|
||||||
|
{
|
||||||
|
DoFall(SpriteNum);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DoFindGroundPoint(SpriteNum);
|
||||||
|
u->floor_dist = 0;
|
||||||
|
DoBeginFall(SpriteNum);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (TEST(u->Flags, SPR_SLIDING))
|
||||||
|
DoActorSlide(SpriteNum);
|
||||||
|
|
||||||
|
// slide while falling
|
||||||
|
nx = sp->xvel * (int) sintable[NORM_ANGLE(sp->ang + 512)] >> 14;
|
||||||
|
ny = sp->xvel * (int) sintable[sp->ang] >> 14;
|
||||||
|
|
||||||
|
u->ret = move_sprite(SpriteNum, nx, ny, 0L, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, ACTORMOVETICS);
|
||||||
|
DoFindGroundPoint(SpriteNum);
|
||||||
|
|
||||||
|
// on the ground
|
||||||
|
if (sp->z >= u->loz)
|
||||||
|
{
|
||||||
|
RESET(u->Flags, SPR_FALLING|SPR_SLIDING);
|
||||||
|
if (RANDOM_RANGE(1000) > 500)
|
||||||
|
SET(sp->cstat, CSTAT_SPRITE_XFLIP);
|
||||||
|
if (RANDOM_RANGE(1000) > 500)
|
||||||
|
SET(sp->cstat, CSTAT_SPRITE_YFLIP);
|
||||||
|
NewStateGroup(SpriteNum, u->ActorActionSet->Dead);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int DoEelMove(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
|
ASSERT(u->Rot != NULL);
|
||||||
|
|
||||||
|
if (SpriteOverlap(SpriteNum, u->tgt_sp - sprite))
|
||||||
|
NewStateGroup(SpriteNum, u->ActorActionSet->CloseAttack[0]);
|
||||||
|
|
||||||
|
if (TEST(u->Flags,SPR_SLIDING))
|
||||||
|
DoActorSlide(SpriteNum);
|
||||||
|
|
||||||
|
if (u->track >= 0)
|
||||||
|
ActorFollowTrack(SpriteNum, ACTORMOVETICS);
|
||||||
|
else
|
||||||
|
(*u->ActorActionFunc)(SpriteNum);
|
||||||
|
|
||||||
|
//if (TEST_SYNC_KEY((Player+myconnectindex), SK_OPERATE))
|
||||||
|
// CON_Message("Stop");
|
||||||
|
|
||||||
|
DoEelMatchPlayerZ(SpriteNum);
|
||||||
|
|
||||||
|
DoActorSectorDamage(SpriteNum);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#include "saveable.h"
|
||||||
|
|
||||||
|
static saveable_code saveable_eel_code[] =
|
||||||
|
{
|
||||||
|
SAVE_CODE(EelCommon),
|
||||||
|
SAVE_CODE(SetupEel),
|
||||||
|
//SAVE_CODE(NewEel),
|
||||||
|
SAVE_CODE(DoEelMatchPlayerZ),
|
||||||
|
SAVE_CODE(DoEelDeath),
|
||||||
|
SAVE_CODE(DoEelMove)
|
||||||
|
};
|
||||||
|
|
||||||
|
static saveable_data saveable_eel_data[] =
|
||||||
|
{
|
||||||
|
SAVE_DATA(EelBattle),
|
||||||
|
SAVE_DATA(EelOffense),
|
||||||
|
SAVE_DATA(EelBroadcast),
|
||||||
|
SAVE_DATA(EelSurprised),
|
||||||
|
SAVE_DATA(EelEvasive),
|
||||||
|
SAVE_DATA(EelLostTarget),
|
||||||
|
SAVE_DATA(EelCloseRange),
|
||||||
|
SAVE_DATA(EelTouchTarget),
|
||||||
|
|
||||||
|
SAVE_DATA(EelPersonality),
|
||||||
|
|
||||||
|
SAVE_DATA(EelAttrib),
|
||||||
|
|
||||||
|
SAVE_DATA(s_EelRun),
|
||||||
|
SAVE_DATA(sg_EelRun),
|
||||||
|
SAVE_DATA(s_EelStand),
|
||||||
|
SAVE_DATA(sg_EelStand),
|
||||||
|
SAVE_DATA(s_EelAttack),
|
||||||
|
SAVE_DATA(sg_EelAttack),
|
||||||
|
SAVE_DATA(s_EelDie),
|
||||||
|
SAVE_DATA(sg_EelDie),
|
||||||
|
SAVE_DATA(s_EelDead),
|
||||||
|
SAVE_DATA(sg_EelDead),
|
||||||
|
|
||||||
|
SAVE_DATA(EelActionSet)
|
||||||
|
};
|
||||||
|
|
||||||
|
saveable_module saveable_eel =
|
||||||
|
{
|
||||||
|
// code
|
||||||
|
saveable_eel_code,
|
||||||
|
SIZ(saveable_eel_code),
|
||||||
|
|
||||||
|
// data
|
||||||
|
saveable_eel_data,
|
||||||
|
SIZ(saveable_eel_data)
|
||||||
|
};
|
96
polymer/eduke32/source/sw/src/function.h
Normal file
96
polymer/eduke32/source/sw/src/function.h
Normal file
|
@ -0,0 +1,96 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// function.h
|
||||||
|
|
||||||
|
// file created by makehead.exe
|
||||||
|
// these headers contain default key assignments, as well as
|
||||||
|
// default button assignments and game function names
|
||||||
|
// axis defaults are also included
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef function_public_
|
||||||
|
#define function_public_
|
||||||
|
|
||||||
|
#define NUMGAMEFUNCTIONS 51
|
||||||
|
|
||||||
|
extern char *gamefunctions[];
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
gamefunc_Move_Forward,
|
||||||
|
gamefunc_Move_Backward,
|
||||||
|
gamefunc_Turn_Left,
|
||||||
|
gamefunc_Turn_Right,
|
||||||
|
gamefunc_Strafe,
|
||||||
|
gamefunc_Fire,
|
||||||
|
gamefunc_Open,
|
||||||
|
gamefunc_Run,
|
||||||
|
gamefunc_AutoRun,
|
||||||
|
gamefunc_Jump,
|
||||||
|
gamefunc_Crouch,
|
||||||
|
gamefunc_Look_Up,
|
||||||
|
gamefunc_Look_Down,
|
||||||
|
gamefunc_Strafe_Left,
|
||||||
|
gamefunc_Strafe_Right,
|
||||||
|
gamefunc_Aim_Up,
|
||||||
|
gamefunc_Aim_Down,
|
||||||
|
gamefunc_Weapon_1,
|
||||||
|
gamefunc_Weapon_2,
|
||||||
|
gamefunc_Weapon_3,
|
||||||
|
gamefunc_Weapon_4,
|
||||||
|
gamefunc_Weapon_5,
|
||||||
|
gamefunc_Weapon_6,
|
||||||
|
gamefunc_Weapon_7,
|
||||||
|
gamefunc_Weapon_8,
|
||||||
|
gamefunc_Weapon_9,
|
||||||
|
gamefunc_Weapon_10,
|
||||||
|
gamefunc_Inventory,
|
||||||
|
gamefunc_Inventory_Left,
|
||||||
|
gamefunc_Inventory_Right,
|
||||||
|
gamefunc_Med_Kit,
|
||||||
|
gamefunc_Smoke_Bomb,
|
||||||
|
gamefunc_Night_Vision,
|
||||||
|
gamefunc_Gas_Bomb,
|
||||||
|
gamefunc_Flash_Bomb,
|
||||||
|
gamefunc_Caltrops,
|
||||||
|
gamefunc_TurnAround,
|
||||||
|
gamefunc_SendMessage,
|
||||||
|
gamefunc_Map,
|
||||||
|
gamefunc_Shrink_Screen,
|
||||||
|
gamefunc_Enlarge_Screen,
|
||||||
|
gamefunc_Center_View,
|
||||||
|
gamefunc_Holster_Weapon,
|
||||||
|
gamefunc_Map_Follow_Mode,
|
||||||
|
gamefunc_See_Co_Op_View,
|
||||||
|
gamefunc_Mouse_Aiming,
|
||||||
|
gamefunc_Toggle_Crosshair,
|
||||||
|
gamefunc_Next_Weapon,
|
||||||
|
gamefunc_Previous_Weapon,
|
||||||
|
gamefunc_Show_Menu,
|
||||||
|
gamefunc_Show_Console,
|
||||||
|
};
|
||||||
|
#endif
|
6004
polymer/eduke32/source/sw/src/game.c
Normal file
6004
polymer/eduke32/source/sw/src/game.c
Normal file
File diff suppressed because it is too large
Load diff
2435
polymer/eduke32/source/sw/src/game.h
Normal file
2435
polymer/eduke32/source/sw/src/game.h
Normal file
File diff suppressed because it is too large
Load diff
222
polymer/eduke32/source/sw/src/gamedefs.h
Normal file
222
polymer/eduke32/source/sw/src/gamedefs.h
Normal file
|
@ -0,0 +1,222 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
//****************************************************************************
|
||||||
|
//
|
||||||
|
// gamedefs.h
|
||||||
|
//
|
||||||
|
// common defines between the game and the setup program
|
||||||
|
//
|
||||||
|
//****************************************************************************
|
||||||
|
|
||||||
|
#ifndef gamedefs_public_
|
||||||
|
#define gamedefs_public_
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//****************************************************************************
|
||||||
|
//
|
||||||
|
// DEFINES
|
||||||
|
//
|
||||||
|
//****************************************************************************
|
||||||
|
|
||||||
|
//#define SHARE 1
|
||||||
|
|
||||||
|
//
|
||||||
|
// Setup program defines
|
||||||
|
//
|
||||||
|
|
||||||
|
// Max number of players
|
||||||
|
|
||||||
|
//#ifdef SHARE
|
||||||
|
//#define MAXPLAYERS 4
|
||||||
|
//#else
|
||||||
|
//#define MAXPLAYERS 8
|
||||||
|
//#endif
|
||||||
|
|
||||||
|
// Number of Mouse buttons
|
||||||
|
|
||||||
|
#define MAXMOUSEBUTTONS 6
|
||||||
|
|
||||||
|
// Number of JOY buttons
|
||||||
|
|
||||||
|
#define MAXJOYBUTTONS (32+4)
|
||||||
|
|
||||||
|
// Number of EXTERNAL buttons
|
||||||
|
|
||||||
|
//#define MAXEXTERNALBUTTONS 6
|
||||||
|
|
||||||
|
// max path+track length for OGG music files
|
||||||
|
#define MAXOGGTRACKLENGTH 256
|
||||||
|
|
||||||
|
//
|
||||||
|
// modem string defines
|
||||||
|
//
|
||||||
|
|
||||||
|
#define MAXMODEMSTRING 50
|
||||||
|
|
||||||
|
// MACRO defines
|
||||||
|
|
||||||
|
#define MAXMACROS 10
|
||||||
|
#define MAXMACROLENGTH 34
|
||||||
|
|
||||||
|
// Phone list defines
|
||||||
|
|
||||||
|
#define PHONENUMBERLENGTH 28
|
||||||
|
#define PHONENAMELENGTH 16
|
||||||
|
#define MAXPHONEENTRIES 16
|
||||||
|
|
||||||
|
// length of program functions
|
||||||
|
|
||||||
|
#define MAXFUNCTIONLENGTH 30
|
||||||
|
|
||||||
|
// length of axis functions
|
||||||
|
|
||||||
|
#define MAXAXISFUNCTIONLENGTH 30
|
||||||
|
|
||||||
|
// Max Player Name length
|
||||||
|
|
||||||
|
#define MAXPLAYERNAMELENGTH 11
|
||||||
|
|
||||||
|
// Max RTS Name length
|
||||||
|
|
||||||
|
#define MAXRTSNAMELENGTH 15
|
||||||
|
|
||||||
|
// Max User Level Name length
|
||||||
|
|
||||||
|
#define MAXUSERLEVELNAMELENGTH 15
|
||||||
|
|
||||||
|
|
||||||
|
// Max RTS Path length
|
||||||
|
|
||||||
|
#define MAXRTSPATHLENGTH 48
|
||||||
|
|
||||||
|
// Max User Level Path length
|
||||||
|
|
||||||
|
#define MAXUSERLEVELPATHLENGTH 48
|
||||||
|
|
||||||
|
// Number of Mouse Axes
|
||||||
|
|
||||||
|
#define MAXMOUSEAXES 2
|
||||||
|
|
||||||
|
// Number of JOY axes
|
||||||
|
|
||||||
|
#define MAXJOYAXES 6
|
||||||
|
|
||||||
|
// Number of GAMEPAD axes
|
||||||
|
|
||||||
|
#define MAXGAMEPADAXES 2
|
||||||
|
|
||||||
|
#ifdef __FLAT__
|
||||||
|
#define CONTROLSHIFT 0
|
||||||
|
#else
|
||||||
|
#define CONTROLSHIFT 4
|
||||||
|
#endif
|
||||||
|
// MIN/MAX scale value for controller scales
|
||||||
|
|
||||||
|
#define MAXCONTROLSCALEVALUE (1<<(18-CONTROLSHIFT))
|
||||||
|
|
||||||
|
// DEFAULT scale value for controller scales
|
||||||
|
|
||||||
|
#define DEFAULTCONTROLSCALEVALUE (1<<(16-CONTROLSHIFT))
|
||||||
|
|
||||||
|
// base value for controller scales
|
||||||
|
|
||||||
|
#define BASECONTROLSCALEVALUE (1<<(16-CONTROLSHIFT))
|
||||||
|
|
||||||
|
// MAX mouse sensitivity scale
|
||||||
|
|
||||||
|
#define MAXMOUSESENSITIVITY (1<<(17-CONTROLSHIFT))
|
||||||
|
|
||||||
|
// mouse sensitivity base
|
||||||
|
|
||||||
|
#define MOUSECONTROLBASE ((1<<(15-CONTROLSHIFT))-1)
|
||||||
|
|
||||||
|
// DEFAULT mouse sensitivity scale
|
||||||
|
|
||||||
|
#define DEFAULTMOUSESENSITIVITY (1<<(15-CONTROLSHIFT))
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
gametype_network=3,
|
||||||
|
gametype_serial=1,
|
||||||
|
gametype_modem=2
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
connecttype_dialing=0,
|
||||||
|
connecttype_answer=1,
|
||||||
|
connecttype_alreadyconnected=2
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
screenbuffer_320x200,
|
||||||
|
screenbuffer_640x400,
|
||||||
|
screenbuffer_640x480,
|
||||||
|
screenbuffer_800x600,
|
||||||
|
screenbuffer_1024x768,
|
||||||
|
screenbuffer_1280x1024,
|
||||||
|
screenbuffer_1600x1200
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
vesa_320x200,
|
||||||
|
vesa_360x200,
|
||||||
|
vesa_320x240,
|
||||||
|
vesa_360x240,
|
||||||
|
vesa_320x400,
|
||||||
|
vesa_360x400,
|
||||||
|
vesa_640x350,
|
||||||
|
vesa_640x400,
|
||||||
|
vesa_640x480,
|
||||||
|
vesa_800x600,
|
||||||
|
vesa_1024x768,
|
||||||
|
vesa_1280x1024,
|
||||||
|
vesa_1600x1200
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
screenmode_chained,
|
||||||
|
screenmode_vesa,
|
||||||
|
screenmode_buffered,
|
||||||
|
screenmode_tseng,
|
||||||
|
screenmode_paradise,
|
||||||
|
screenmode_s3,
|
||||||
|
screenmode_crystal,
|
||||||
|
screenmode_redblue,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
932
polymer/eduke32/source/sw/src/girlninj.c
Normal file
932
polymer/eduke32/source/sw/src/girlninj.c
Normal file
|
@ -0,0 +1,932 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
#include "build.h"
|
||||||
|
|
||||||
|
#include "keys.h"
|
||||||
|
#include "names2.h"
|
||||||
|
#include "panel.h"
|
||||||
|
#include "game.h"
|
||||||
|
#include "tags.h"
|
||||||
|
#include "ai.h"
|
||||||
|
#include "pal.h"
|
||||||
|
#include "player.h"
|
||||||
|
#include "net.h"
|
||||||
|
#include "actor.h"
|
||||||
|
#include "track.h"
|
||||||
|
#include "sprite.h"
|
||||||
|
|
||||||
|
int DoHariKariBlood(short SpriteNum);
|
||||||
|
//int InitActorMoveCloser(short SpriteNum);
|
||||||
|
|
||||||
|
DECISION GirlNinjaBattle[] =
|
||||||
|
{
|
||||||
|
{499, InitActorMoveCloser},
|
||||||
|
//{509, InitActorAmbientNoise},
|
||||||
|
//{710, InitActorRunAway},
|
||||||
|
{1024, InitActorAttack}
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION GirlNinjaOffense[] =
|
||||||
|
{
|
||||||
|
{499, InitActorMoveCloser},
|
||||||
|
//{509, InitActorAmbientNoise},
|
||||||
|
{1024, InitActorAttack}
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION GirlNinjaBroadcast[] =
|
||||||
|
{
|
||||||
|
//{1, InitActorAlertNoise},
|
||||||
|
{6, InitActorAmbientNoise},
|
||||||
|
{1024, InitActorDecide}
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION GirlNinjaSurprised[] =
|
||||||
|
{
|
||||||
|
{701, InitActorMoveCloser},
|
||||||
|
{1024, InitActorDecide}
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION GirlNinjaEvasive[] =
|
||||||
|
{
|
||||||
|
{400, InitActorDuck}, // 100
|
||||||
|
// {300, InitActorEvade},
|
||||||
|
// {800, InitActorRunAway},
|
||||||
|
{1024, NULL}
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION GirlNinjaLostTarget[] =
|
||||||
|
{
|
||||||
|
{900, InitActorFindPlayer},
|
||||||
|
{1024, InitActorWanderAround}
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION GirlNinjaCloseRange[] =
|
||||||
|
{
|
||||||
|
{900, InitActorAttack },
|
||||||
|
{1024, InitActorReposition }
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
!AIC - Collection of decision tables
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
PERSONALITY GirlNinjaPersonality =
|
||||||
|
{
|
||||||
|
GirlNinjaBattle,
|
||||||
|
GirlNinjaOffense,
|
||||||
|
GirlNinjaBroadcast,
|
||||||
|
GirlNinjaSurprised,
|
||||||
|
GirlNinjaEvasive,
|
||||||
|
GirlNinjaLostTarget,
|
||||||
|
GirlNinjaCloseRange,
|
||||||
|
GirlNinjaCloseRange
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
ATTRIBUTE GirlNinjaAttrib =
|
||||||
|
{
|
||||||
|
{120, 140, 160, 190}, // Speeds
|
||||||
|
{4, 0, 0, -2}, // Tic Adjusts
|
||||||
|
3, // MaxWeapons;
|
||||||
|
{
|
||||||
|
DIGI_GIRLNINJAALERT, DIGI_GIRLNINJAALERT, DIGI_STAR,
|
||||||
|
DIGI_GIRLNINJAALERTT, DIGI_GIRLNINJASCREAM,0,0,0,0,0
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// GIRLNINJA RUN
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
ANIMATOR DoGirlNinjaMove, DoGirlNinjaCrawl, DoStayOnFloor, NullGirlNinja, DoActorJump, DoActorFall, DoActorDebris, DoGirlNinjaHariKari, DoActorSlide;
|
||||||
|
ANIMATOR InitActorDecide;
|
||||||
|
|
||||||
|
#define GIRLNINJA_RATE 18
|
||||||
|
|
||||||
|
STATE s_GirlNinjaRun[5][4] =
|
||||||
|
{
|
||||||
|
|
||||||
|
{
|
||||||
|
{GIRLNINJA_RUN_R0 + 0, GIRLNINJA_RATE | SF_TIC_ADJUST, DoGirlNinjaMove, &s_GirlNinjaRun[0][1]},
|
||||||
|
{GIRLNINJA_RUN_R0 + 1, GIRLNINJA_RATE | SF_TIC_ADJUST, DoGirlNinjaMove, &s_GirlNinjaRun[0][2]},
|
||||||
|
{GIRLNINJA_RUN_R0 + 2, GIRLNINJA_RATE | SF_TIC_ADJUST, DoGirlNinjaMove, &s_GirlNinjaRun[0][3]},
|
||||||
|
{GIRLNINJA_RUN_R0 + 3, GIRLNINJA_RATE | SF_TIC_ADJUST, DoGirlNinjaMove, &s_GirlNinjaRun[0][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_RUN_R1 + 0, GIRLNINJA_RATE | SF_TIC_ADJUST, DoGirlNinjaMove, &s_GirlNinjaRun[1][1]},
|
||||||
|
{GIRLNINJA_RUN_R1 + 1, GIRLNINJA_RATE | SF_TIC_ADJUST, DoGirlNinjaMove, &s_GirlNinjaRun[1][2]},
|
||||||
|
{GIRLNINJA_RUN_R1 + 2, GIRLNINJA_RATE | SF_TIC_ADJUST, DoGirlNinjaMove, &s_GirlNinjaRun[1][3]},
|
||||||
|
{GIRLNINJA_RUN_R1 + 3, GIRLNINJA_RATE | SF_TIC_ADJUST, DoGirlNinjaMove, &s_GirlNinjaRun[1][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_RUN_R2 + 0, GIRLNINJA_RATE | SF_TIC_ADJUST, DoGirlNinjaMove, &s_GirlNinjaRun[2][1]},
|
||||||
|
{GIRLNINJA_RUN_R2 + 1, GIRLNINJA_RATE | SF_TIC_ADJUST, DoGirlNinjaMove, &s_GirlNinjaRun[2][2]},
|
||||||
|
{GIRLNINJA_RUN_R2 + 2, GIRLNINJA_RATE | SF_TIC_ADJUST, DoGirlNinjaMove, &s_GirlNinjaRun[2][3]},
|
||||||
|
{GIRLNINJA_RUN_R2 + 3, GIRLNINJA_RATE | SF_TIC_ADJUST, DoGirlNinjaMove, &s_GirlNinjaRun[2][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_RUN_R3 + 0, GIRLNINJA_RATE | SF_TIC_ADJUST, DoGirlNinjaMove, &s_GirlNinjaRun[3][1]},
|
||||||
|
{GIRLNINJA_RUN_R3 + 1, GIRLNINJA_RATE | SF_TIC_ADJUST, DoGirlNinjaMove, &s_GirlNinjaRun[3][2]},
|
||||||
|
{GIRLNINJA_RUN_R3 + 2, GIRLNINJA_RATE | SF_TIC_ADJUST, DoGirlNinjaMove, &s_GirlNinjaRun[3][3]},
|
||||||
|
{GIRLNINJA_RUN_R3 + 3, GIRLNINJA_RATE | SF_TIC_ADJUST, DoGirlNinjaMove, &s_GirlNinjaRun[3][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_RUN_R4 + 0, GIRLNINJA_RATE | SF_TIC_ADJUST, DoGirlNinjaMove, &s_GirlNinjaRun[4][1]},
|
||||||
|
{GIRLNINJA_RUN_R4 + 1, GIRLNINJA_RATE | SF_TIC_ADJUST, DoGirlNinjaMove, &s_GirlNinjaRun[4][2]},
|
||||||
|
{GIRLNINJA_RUN_R4 + 2, GIRLNINJA_RATE | SF_TIC_ADJUST, DoGirlNinjaMove, &s_GirlNinjaRun[4][3]},
|
||||||
|
{GIRLNINJA_RUN_R4 + 3, GIRLNINJA_RATE | SF_TIC_ADJUST, DoGirlNinjaMove, &s_GirlNinjaRun[4][0]},
|
||||||
|
},
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
STATEp sg_GirlNinjaRun[] =
|
||||||
|
{
|
||||||
|
s_GirlNinjaRun[0],
|
||||||
|
s_GirlNinjaRun[1],
|
||||||
|
s_GirlNinjaRun[2],
|
||||||
|
s_GirlNinjaRun[3],
|
||||||
|
s_GirlNinjaRun[4]
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// GIRLNINJA STAND
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define GIRLNINJA_STAND_RATE 10
|
||||||
|
|
||||||
|
STATE s_GirlNinjaStand[5][1] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{GIRLNINJA_STAND_R0 + 0, GIRLNINJA_STAND_RATE, DoGirlNinjaMove, &s_GirlNinjaStand[0][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_STAND_R1 + 0, GIRLNINJA_STAND_RATE, DoGirlNinjaMove, &s_GirlNinjaStand[1][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_STAND_R2 + 0, GIRLNINJA_STAND_RATE, DoGirlNinjaMove, &s_GirlNinjaStand[2][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_STAND_R3 + 0, GIRLNINJA_STAND_RATE, DoGirlNinjaMove, &s_GirlNinjaStand[3][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_STAND_R4 + 0, GIRLNINJA_STAND_RATE, DoGirlNinjaMove, &s_GirlNinjaStand[4][0]},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
STATEp sg_GirlNinjaStand[] =
|
||||||
|
{
|
||||||
|
s_GirlNinjaStand[0],
|
||||||
|
s_GirlNinjaStand[1],
|
||||||
|
s_GirlNinjaStand[2],
|
||||||
|
s_GirlNinjaStand[3],
|
||||||
|
s_GirlNinjaStand[4]
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// GIRLNINJA RISE
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define GIRLNINJA_RISE_RATE 10
|
||||||
|
|
||||||
|
STATE s_GirlNinjaRise[5][3] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{GIRLNINJA_KNEEL_R0 + 0, GIRLNINJA_RISE_RATE, NullGirlNinja, &s_GirlNinjaRise[0][1]},
|
||||||
|
{GIRLNINJA_STAND_R0 + 0, GIRLNINJA_STAND_RATE, NullGirlNinja, &s_GirlNinjaRise[0][2]},
|
||||||
|
{0, 0, NULL, (STATEp)sg_GirlNinjaRun}, // JBF: sg_GirlNinjaRun really is supposed to be the
|
||||||
|
// pointer to the state group. See StateControl() where
|
||||||
|
// it says "if (!u->State->Pic)".
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_KNEEL_R1 + 0, GIRLNINJA_RISE_RATE, NullGirlNinja, &s_GirlNinjaRise[1][1]},
|
||||||
|
{GIRLNINJA_STAND_R1 + 0, GIRLNINJA_STAND_RATE, NullGirlNinja, &s_GirlNinjaRise[1][2]},
|
||||||
|
{0, 0, NULL, (STATEp)sg_GirlNinjaRun},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_KNEEL_R2 + 0, GIRLNINJA_RISE_RATE, NullGirlNinja, &s_GirlNinjaRise[2][1]},
|
||||||
|
{GIRLNINJA_STAND_R2 + 0, GIRLNINJA_STAND_RATE, NullGirlNinja, &s_GirlNinjaRise[2][2]},
|
||||||
|
{0, 0, NULL, (STATEp)sg_GirlNinjaRun},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_KNEEL_R3 + 0, GIRLNINJA_RISE_RATE, NullGirlNinja, &s_GirlNinjaRise[3][1]},
|
||||||
|
{GIRLNINJA_STAND_R3 + 0, GIRLNINJA_STAND_RATE, NullGirlNinja, &s_GirlNinjaRise[3][2]},
|
||||||
|
{0, 0, NULL, (STATEp)sg_GirlNinjaRun},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_KNEEL_R4 + 0, GIRLNINJA_RISE_RATE, NullGirlNinja, &s_GirlNinjaRise[4][1]},
|
||||||
|
{GIRLNINJA_STAND_R4 + 0, GIRLNINJA_STAND_RATE, NullGirlNinja, &s_GirlNinjaRise[4][2]},
|
||||||
|
{0, 0, NULL, (STATEp)sg_GirlNinjaRun},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
STATEp sg_GirlNinjaRise[] =
|
||||||
|
{
|
||||||
|
s_GirlNinjaRise[0],
|
||||||
|
s_GirlNinjaRise[1],
|
||||||
|
s_GirlNinjaRise[2],
|
||||||
|
s_GirlNinjaRise[3],
|
||||||
|
s_GirlNinjaRise[4]
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// GIRLNINJA DUCK
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define GIRLNINJA_DUCK_RATE 10
|
||||||
|
#define GIRLNINJA_CRAWL_RATE 14
|
||||||
|
|
||||||
|
STATE s_GirlNinjaDuck[5][2] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{GIRLNINJA_KNEEL_R0 + 0, GIRLNINJA_DUCK_RATE, NullGirlNinja, &s_GirlNinjaDuck[0][1]},
|
||||||
|
{GIRLNINJA_CRAWL_R0 + 0, GIRLNINJA_CRAWL_RATE, DoGirlNinjaMove, &s_GirlNinjaDuck[0][1]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_KNEEL_R1 + 0, GIRLNINJA_DUCK_RATE, NullGirlNinja, &s_GirlNinjaDuck[1][1]},
|
||||||
|
{GIRLNINJA_CRAWL_R1 + 0, GIRLNINJA_CRAWL_RATE, DoGirlNinjaMove, &s_GirlNinjaDuck[1][1]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_KNEEL_R2 + 0, GIRLNINJA_DUCK_RATE, NullGirlNinja, &s_GirlNinjaDuck[2][1]},
|
||||||
|
{GIRLNINJA_CRAWL_R2 + 0, GIRLNINJA_CRAWL_RATE, DoGirlNinjaMove, &s_GirlNinjaDuck[2][1]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_KNEEL_R3 + 0, GIRLNINJA_DUCK_RATE, NullGirlNinja, &s_GirlNinjaDuck[3][1]},
|
||||||
|
{GIRLNINJA_CRAWL_R3 + 0, GIRLNINJA_CRAWL_RATE, DoGirlNinjaMove, &s_GirlNinjaDuck[3][1]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_KNEEL_R4 + 0, GIRLNINJA_DUCK_RATE, NullGirlNinja, &s_GirlNinjaDuck[4][1]},
|
||||||
|
{GIRLNINJA_CRAWL_R4 + 0, GIRLNINJA_CRAWL_RATE, DoGirlNinjaMove, &s_GirlNinjaDuck[4][1]},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
STATEp sg_GirlNinjaDuck[] =
|
||||||
|
{
|
||||||
|
s_GirlNinjaDuck[0],
|
||||||
|
s_GirlNinjaDuck[1],
|
||||||
|
s_GirlNinjaDuck[2],
|
||||||
|
s_GirlNinjaDuck[3],
|
||||||
|
s_GirlNinjaDuck[4]
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// GIRLNINJA SIT
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
STATE s_GirlNinjaSit[5][1] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{GIRLNINJA_KNEEL_R0 + 0, GIRLNINJA_RISE_RATE, DoGirlNinjaMove, &s_GirlNinjaSit[0][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_KNEEL_R1 + 0, GIRLNINJA_RISE_RATE, DoGirlNinjaMove, &s_GirlNinjaSit[1][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_KNEEL_R2 + 0, GIRLNINJA_RISE_RATE, DoGirlNinjaMove, &s_GirlNinjaSit[2][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_KNEEL_R3 + 0, GIRLNINJA_RISE_RATE, DoGirlNinjaMove, &s_GirlNinjaSit[3][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_KNEEL_R4 + 0, GIRLNINJA_RISE_RATE, DoGirlNinjaMove, &s_GirlNinjaSit[4][0]},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
STATEp sg_GirlNinjaSit[] =
|
||||||
|
{
|
||||||
|
s_GirlNinjaSit[0],
|
||||||
|
s_GirlNinjaSit[1],
|
||||||
|
s_GirlNinjaSit[2],
|
||||||
|
s_GirlNinjaSit[3],
|
||||||
|
s_GirlNinjaSit[4]
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// GIRLNINJA JUMP
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define GIRLNINJA_JUMP_RATE 24
|
||||||
|
|
||||||
|
STATE s_GirlNinjaJump[5][2] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{GIRLNINJA_JUMP_R0 + 0, GIRLNINJA_JUMP_RATE, DoGirlNinjaMove, &s_GirlNinjaJump[0][1]},
|
||||||
|
{GIRLNINJA_JUMP_R0 + 1, GIRLNINJA_JUMP_RATE, DoGirlNinjaMove, &s_GirlNinjaJump[0][1]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_JUMP_R1 + 0, GIRLNINJA_JUMP_RATE, DoGirlNinjaMove, &s_GirlNinjaJump[1][1]},
|
||||||
|
{GIRLNINJA_JUMP_R1 + 1, GIRLNINJA_JUMP_RATE, DoGirlNinjaMove, &s_GirlNinjaJump[1][1]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_JUMP_R2 + 0, GIRLNINJA_JUMP_RATE, DoGirlNinjaMove, &s_GirlNinjaJump[2][1]},
|
||||||
|
{GIRLNINJA_JUMP_R2 + 1, GIRLNINJA_JUMP_RATE, DoGirlNinjaMove, &s_GirlNinjaJump[2][1]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_JUMP_R3 + 0, GIRLNINJA_JUMP_RATE, DoGirlNinjaMove, &s_GirlNinjaJump[3][1]},
|
||||||
|
{GIRLNINJA_JUMP_R3 + 1, GIRLNINJA_JUMP_RATE, DoGirlNinjaMove, &s_GirlNinjaJump[3][1]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_JUMP_R4 + 0, GIRLNINJA_JUMP_RATE, DoGirlNinjaMove, &s_GirlNinjaJump[4][1]},
|
||||||
|
{GIRLNINJA_JUMP_R4 + 1, GIRLNINJA_JUMP_RATE, DoGirlNinjaMove, &s_GirlNinjaJump[4][1]},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
STATEp sg_GirlNinjaJump[] =
|
||||||
|
{
|
||||||
|
s_GirlNinjaJump[0],
|
||||||
|
s_GirlNinjaJump[1],
|
||||||
|
s_GirlNinjaJump[2],
|
||||||
|
s_GirlNinjaJump[3],
|
||||||
|
s_GirlNinjaJump[4]
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// GIRLNINJA FALL
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define GIRLNINJA_FALL_RATE 16
|
||||||
|
|
||||||
|
STATE s_GirlNinjaFall[5][2] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{GIRLNINJA_JUMP_R0 + 1, GIRLNINJA_FALL_RATE, DoGirlNinjaMove, &s_GirlNinjaFall[0][1]},
|
||||||
|
{GIRLNINJA_JUMP_R0 + 2, GIRLNINJA_FALL_RATE, DoGirlNinjaMove, &s_GirlNinjaFall[0][1]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_JUMP_R1 + 1, GIRLNINJA_FALL_RATE, DoGirlNinjaMove, &s_GirlNinjaFall[1][1]},
|
||||||
|
{GIRLNINJA_JUMP_R1 + 2, GIRLNINJA_FALL_RATE, DoGirlNinjaMove, &s_GirlNinjaFall[1][1]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_JUMP_R2 + 1, GIRLNINJA_FALL_RATE, DoGirlNinjaMove, &s_GirlNinjaFall[2][1]},
|
||||||
|
{GIRLNINJA_JUMP_R2 + 2, GIRLNINJA_FALL_RATE, DoGirlNinjaMove, &s_GirlNinjaFall[2][1]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_JUMP_R3 + 1, GIRLNINJA_FALL_RATE, DoGirlNinjaMove, &s_GirlNinjaFall[3][1]},
|
||||||
|
{GIRLNINJA_JUMP_R3 + 2, GIRLNINJA_FALL_RATE, DoGirlNinjaMove, &s_GirlNinjaFall[3][1]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_JUMP_R4 + 1, GIRLNINJA_FALL_RATE, DoGirlNinjaMove, &s_GirlNinjaFall[4][1]},
|
||||||
|
{GIRLNINJA_JUMP_R4 + 2, GIRLNINJA_FALL_RATE, DoGirlNinjaMove, &s_GirlNinjaFall[4][1]},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
STATEp sg_GirlNinjaFall[] =
|
||||||
|
{
|
||||||
|
s_GirlNinjaFall[0],
|
||||||
|
s_GirlNinjaFall[1],
|
||||||
|
s_GirlNinjaFall[2],
|
||||||
|
s_GirlNinjaFall[3],
|
||||||
|
s_GirlNinjaFall[4]
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// GIRLNINJA PAIN
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define GIRLNINJA_PAIN_RATE 15
|
||||||
|
ANIMATOR DoGirlNinjaPain;
|
||||||
|
|
||||||
|
STATE s_GirlNinjaPain[5][1] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{GIRLNINJA_PAIN_R0 + 0, GIRLNINJA_PAIN_RATE, DoGirlNinjaPain, &s_GirlNinjaPain[0][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_PAIN_R1 + 0, GIRLNINJA_PAIN_RATE, DoGirlNinjaPain, &s_GirlNinjaPain[1][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_PAIN_R2 + 0, GIRLNINJA_PAIN_RATE, DoGirlNinjaPain, &s_GirlNinjaPain[2][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_PAIN_R3 + 0, GIRLNINJA_PAIN_RATE, DoGirlNinjaPain, &s_GirlNinjaPain[3][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_PAIN_R4 + 0, GIRLNINJA_PAIN_RATE, DoGirlNinjaPain, &s_GirlNinjaPain[4][0]},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
STATEp sg_GirlNinjaPain[] =
|
||||||
|
{
|
||||||
|
s_GirlNinjaPain[0],
|
||||||
|
s_GirlNinjaPain[1],
|
||||||
|
s_GirlNinjaPain[2],
|
||||||
|
s_GirlNinjaPain[3],
|
||||||
|
s_GirlNinjaPain[4]
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// GIRLNINJA STICKY
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define GIRLNINJA_STICKY_RATE 32
|
||||||
|
ANIMATOR InitEnemyMine;
|
||||||
|
|
||||||
|
STATE s_GirlNinjaSticky[5][6] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{GIRLNINJA_THROW_R0 + 0, GIRLNINJA_STICKY_RATE * 2, NullGirlNinja, &s_GirlNinjaSticky[0][1]},
|
||||||
|
{GIRLNINJA_THROW_R0 + 0, GIRLNINJA_STICKY_RATE, NullGirlNinja, &s_GirlNinjaSticky[0][2]},
|
||||||
|
{GIRLNINJA_THROW_R0 + 1, 0 | SF_QUICK_CALL, InitEnemyMine, &s_GirlNinjaSticky[0][3]},
|
||||||
|
{GIRLNINJA_THROW_R0 + 1, GIRLNINJA_STICKY_RATE * 2, NullGirlNinja, &s_GirlNinjaSticky[0][4]},
|
||||||
|
{GIRLNINJA_THROW_R0 + 2, 0 | SF_QUICK_CALL, InitActorDecide, &s_GirlNinjaSticky[0][5]},
|
||||||
|
{GIRLNINJA_THROW_R0 + 2, GIRLNINJA_STICKY_RATE, DoGirlNinjaMove, &s_GirlNinjaSticky[0][5]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_THROW_R1 + 0, GIRLNINJA_STICKY_RATE * 2, NullGirlNinja, &s_GirlNinjaSticky[1][1]},
|
||||||
|
{GIRLNINJA_THROW_R1 + 0, GIRLNINJA_STICKY_RATE, NullGirlNinja, &s_GirlNinjaSticky[1][2]},
|
||||||
|
{GIRLNINJA_THROW_R1 + 1, 0 | SF_QUICK_CALL, InitEnemyMine, &s_GirlNinjaSticky[1][3]},
|
||||||
|
{GIRLNINJA_THROW_R1 + 1, GIRLNINJA_STICKY_RATE * 2, NullGirlNinja, &s_GirlNinjaSticky[1][4]},
|
||||||
|
{GIRLNINJA_THROW_R1 + 2, 0 | SF_QUICK_CALL, InitActorDecide, &s_GirlNinjaSticky[1][5]},
|
||||||
|
{GIRLNINJA_THROW_R1 + 2, GIRLNINJA_STICKY_RATE, DoGirlNinjaMove, &s_GirlNinjaSticky[1][5]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_THROW_R2 + 0, GIRLNINJA_STICKY_RATE * 2, NullGirlNinja, &s_GirlNinjaSticky[2][1]},
|
||||||
|
{GIRLNINJA_THROW_R2 + 0, GIRLNINJA_STICKY_RATE, NullGirlNinja, &s_GirlNinjaSticky[2][2]},
|
||||||
|
{GIRLNINJA_THROW_R2 + 1, 0 | SF_QUICK_CALL, InitEnemyMine, &s_GirlNinjaSticky[2][3]},
|
||||||
|
{GIRLNINJA_THROW_R2 + 1, GIRLNINJA_STICKY_RATE * 2, NullGirlNinja, &s_GirlNinjaSticky[2][4]},
|
||||||
|
{GIRLNINJA_THROW_R2 + 2, 0 | SF_QUICK_CALL, InitActorDecide, &s_GirlNinjaSticky[2][5]},
|
||||||
|
{GIRLNINJA_THROW_R2 + 2, GIRLNINJA_STICKY_RATE, DoGirlNinjaMove, &s_GirlNinjaSticky[2][5]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_THROW_R2 + 0, GIRLNINJA_STICKY_RATE * 2, NullGirlNinja, &s_GirlNinjaSticky[3][1]},
|
||||||
|
{GIRLNINJA_THROW_R2 + 0, GIRLNINJA_STICKY_RATE, NullGirlNinja, &s_GirlNinjaSticky[3][2]},
|
||||||
|
{GIRLNINJA_THROW_R2 + 1, 0 | SF_QUICK_CALL, InitEnemyMine, &s_GirlNinjaSticky[3][3]},
|
||||||
|
{GIRLNINJA_THROW_R2 + 1, GIRLNINJA_STICKY_RATE * 2, NullGirlNinja, &s_GirlNinjaSticky[3][4]},
|
||||||
|
{GIRLNINJA_THROW_R2 + 2, 0 | SF_QUICK_CALL, InitActorDecide, &s_GirlNinjaSticky[3][5]},
|
||||||
|
{GIRLNINJA_THROW_R2 + 2, GIRLNINJA_STICKY_RATE, DoGirlNinjaMove, &s_GirlNinjaSticky[3][5]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_THROW_R2 + 0, GIRLNINJA_STICKY_RATE * 2, NullGirlNinja, &s_GirlNinjaSticky[4][1]},
|
||||||
|
{GIRLNINJA_THROW_R2 + 0, GIRLNINJA_STICKY_RATE, NullGirlNinja, &s_GirlNinjaSticky[4][2]},
|
||||||
|
{GIRLNINJA_THROW_R2 + 1, 0 | SF_QUICK_CALL, InitEnemyMine, &s_GirlNinjaSticky[4][3]},
|
||||||
|
{GIRLNINJA_THROW_R2 + 1, GIRLNINJA_STICKY_RATE * 2, NullGirlNinja, &s_GirlNinjaSticky[4][4]},
|
||||||
|
{GIRLNINJA_THROW_R2 + 2, 0 | SF_QUICK_CALL, InitActorDecide, &s_GirlNinjaSticky[4][5]},
|
||||||
|
{GIRLNINJA_THROW_R2 + 2, GIRLNINJA_STICKY_RATE, DoGirlNinjaMove, &s_GirlNinjaSticky[4][5]},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
STATEp sg_GirlNinjaSticky[] =
|
||||||
|
{
|
||||||
|
s_GirlNinjaSticky[0],
|
||||||
|
s_GirlNinjaSticky[1],
|
||||||
|
s_GirlNinjaSticky[2],
|
||||||
|
s_GirlNinjaSticky[3],
|
||||||
|
s_GirlNinjaSticky[4]
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// GIRLNINJA CROSSBOW
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define GIRLNINJA_CROSSBOW_RATE 14
|
||||||
|
ANIMATOR InitEnemyCrossbow;
|
||||||
|
|
||||||
|
STATE s_GirlNinjaCrossbow[5][5] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{GIRLNINJA_FIRE_R0 + 0, GIRLNINJA_CROSSBOW_RATE * 2, NullGirlNinja, &s_GirlNinjaCrossbow[0][1]},
|
||||||
|
{GIRLNINJA_FIRE_R0 + 1, 0 | SF_QUICK_CALL, InitEnemyCrossbow, &s_GirlNinjaCrossbow[0][2]},
|
||||||
|
{GIRLNINJA_FIRE_R0 + 1, GIRLNINJA_CROSSBOW_RATE, NullGirlNinja, &s_GirlNinjaCrossbow[0][3]},
|
||||||
|
{GIRLNINJA_FIRE_R0 + 1, 0 | SF_QUICK_CALL, InitActorDecide, &s_GirlNinjaCrossbow[0][4]},
|
||||||
|
{GIRLNINJA_FIRE_R0 + 1, GIRLNINJA_CROSSBOW_RATE, DoGirlNinjaMove, &s_GirlNinjaCrossbow[0][4]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_FIRE_R1 + 0, GIRLNINJA_CROSSBOW_RATE * 2, NullGirlNinja, &s_GirlNinjaCrossbow[1][1]},
|
||||||
|
{GIRLNINJA_FIRE_R1 + 1, 0 | SF_QUICK_CALL, InitEnemyCrossbow, &s_GirlNinjaCrossbow[1][2]},
|
||||||
|
{GIRLNINJA_FIRE_R1 + 1, GIRLNINJA_CROSSBOW_RATE, NullGirlNinja, &s_GirlNinjaCrossbow[1][3]},
|
||||||
|
{GIRLNINJA_FIRE_R1 + 1, 0 | SF_QUICK_CALL, InitActorDecide, &s_GirlNinjaCrossbow[1][4]},
|
||||||
|
{GIRLNINJA_FIRE_R1 + 1, GIRLNINJA_CROSSBOW_RATE, DoGirlNinjaMove, &s_GirlNinjaCrossbow[1][4]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_FIRE_R2 + 0, GIRLNINJA_CROSSBOW_RATE * 2, NullGirlNinja, &s_GirlNinjaCrossbow[2][1]},
|
||||||
|
{GIRLNINJA_FIRE_R2 + 1, 0 | SF_QUICK_CALL, InitEnemyCrossbow, &s_GirlNinjaCrossbow[2][2]},
|
||||||
|
{GIRLNINJA_FIRE_R2 + 1, GIRLNINJA_CROSSBOW_RATE, NullGirlNinja, &s_GirlNinjaCrossbow[2][3]},
|
||||||
|
{GIRLNINJA_FIRE_R2 + 1, 0 | SF_QUICK_CALL, InitActorDecide, &s_GirlNinjaCrossbow[2][4]},
|
||||||
|
{GIRLNINJA_FIRE_R2 + 1, GIRLNINJA_CROSSBOW_RATE, DoGirlNinjaMove, &s_GirlNinjaCrossbow[2][4]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_FIRE_R3 + 0, GIRLNINJA_CROSSBOW_RATE * 2, NullGirlNinja, &s_GirlNinjaCrossbow[3][1]},
|
||||||
|
{GIRLNINJA_FIRE_R3 + 1, 0 | SF_QUICK_CALL, InitEnemyCrossbow, &s_GirlNinjaCrossbow[3][2]},
|
||||||
|
{GIRLNINJA_FIRE_R3 + 1, GIRLNINJA_CROSSBOW_RATE, NullGirlNinja, &s_GirlNinjaCrossbow[3][3]},
|
||||||
|
{GIRLNINJA_FIRE_R3 + 1, 0 | SF_QUICK_CALL, InitActorDecide, &s_GirlNinjaCrossbow[3][4]},
|
||||||
|
{GIRLNINJA_FIRE_R3 + 1, GIRLNINJA_CROSSBOW_RATE, DoGirlNinjaMove, &s_GirlNinjaCrossbow[3][4]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GIRLNINJA_FIRE_R4 + 0, GIRLNINJA_CROSSBOW_RATE * 2, NullGirlNinja, &s_GirlNinjaCrossbow[4][1]},
|
||||||
|
{GIRLNINJA_FIRE_R4 + 1, 0 | SF_QUICK_CALL, InitEnemyCrossbow, &s_GirlNinjaCrossbow[4][2]},
|
||||||
|
{GIRLNINJA_FIRE_R4 + 1, GIRLNINJA_CROSSBOW_RATE, NullGirlNinja, &s_GirlNinjaCrossbow[4][3]},
|
||||||
|
{GIRLNINJA_FIRE_R4 + 1, 0 | SF_QUICK_CALL, InitActorDecide, &s_GirlNinjaCrossbow[4][4]},
|
||||||
|
{GIRLNINJA_FIRE_R4 + 1, GIRLNINJA_CROSSBOW_RATE, DoGirlNinjaMove, &s_GirlNinjaCrossbow[4][4]},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
STATEp sg_GirlNinjaCrossbow[] =
|
||||||
|
{
|
||||||
|
s_GirlNinjaCrossbow[0],
|
||||||
|
s_GirlNinjaCrossbow[1],
|
||||||
|
s_GirlNinjaCrossbow[2],
|
||||||
|
s_GirlNinjaCrossbow[3],
|
||||||
|
s_GirlNinjaCrossbow[4]
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// GIRLNINJA DIE
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define GIRLNINJA_DIE_RATE 30
|
||||||
|
ANIMATOR DoGirlNinjaSpecial;
|
||||||
|
|
||||||
|
STATE s_GirlNinjaDie[] =
|
||||||
|
{
|
||||||
|
{GIRLNINJA_DIE + 0, GIRLNINJA_DIE_RATE*2, NullGirlNinja, &s_GirlNinjaDie[1]},
|
||||||
|
{GIRLNINJA_DIE + 1, GIRLNINJA_DIE_RATE, NullGirlNinja, &s_GirlNinjaDie[2]},
|
||||||
|
{GIRLNINJA_DIE + 2, GIRLNINJA_DIE_RATE, NullGirlNinja, &s_GirlNinjaDie[3]},
|
||||||
|
{GIRLNINJA_DIE + 3, GIRLNINJA_DIE_RATE, NullGirlNinja, &s_GirlNinjaDie[4]},
|
||||||
|
{GIRLNINJA_DIE + 4, GIRLNINJA_DIE_RATE, NullGirlNinja, &s_GirlNinjaDie[5]},
|
||||||
|
{GIRLNINJA_DIE + 5, GIRLNINJA_DIE_RATE, NullGirlNinja, &s_GirlNinjaDie[6]},
|
||||||
|
{GIRLNINJA_DIE + 6, GIRLNINJA_DIE_RATE, NullGirlNinja, &s_GirlNinjaDie[7]},
|
||||||
|
{GIRLNINJA_DIE + 6, SF_QUICK_CALL, DoGirlNinjaSpecial, &s_GirlNinjaDie[8]},
|
||||||
|
{GIRLNINJA_DIE + 7, GIRLNINJA_DIE_RATE, NullGirlNinja, &s_GirlNinjaDie[9]},
|
||||||
|
{GIRLNINJA_DIE + 8, SF_QUICK_CALL, QueueFloorBlood, &s_GirlNinjaDie[10]},
|
||||||
|
{GIRLNINJA_DIE + 8, GIRLNINJA_DIE_RATE, DoActorDebris, &s_GirlNinjaDie[10]},
|
||||||
|
};
|
||||||
|
|
||||||
|
STATE s_GirlNinjaDead[] =
|
||||||
|
{
|
||||||
|
{GIRLNINJA_DIE + 6, GIRLNINJA_DIE_RATE, DoActorDebris, &s_GirlNinjaDead[1]},
|
||||||
|
{GIRLNINJA_DIE + 7, SF_QUICK_CALL, DoGirlNinjaSpecial, &s_GirlNinjaDead[2]},
|
||||||
|
{GIRLNINJA_DIE + 7, GIRLNINJA_DIE_RATE, DoActorDebris, &s_GirlNinjaDead[3]},
|
||||||
|
{GIRLNINJA_DIE + 8, SF_QUICK_CALL, QueueFloorBlood,&s_GirlNinjaDead[4]},
|
||||||
|
{GIRLNINJA_DIE + 8, GIRLNINJA_DIE_RATE, DoActorDebris, &s_GirlNinjaDead[4]},
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
STATE s_GirlNinjaDeathJump[] =
|
||||||
|
{
|
||||||
|
{GIRLNINJA_DIE + 0, GIRLNINJA_DIE_RATE, DoActorDeathMove, &s_GirlNinjaDeathJump[1]},
|
||||||
|
{GIRLNINJA_DIE + 1, GIRLNINJA_DIE_RATE, DoActorDeathMove, &s_GirlNinjaDeathJump[2]},
|
||||||
|
{GIRLNINJA_DIE + 2, GIRLNINJA_DIE_RATE, DoActorDeathMove, &s_GirlNinjaDeathJump[2]},
|
||||||
|
};
|
||||||
|
|
||||||
|
STATE s_GirlNinjaDeathFall[] =
|
||||||
|
{
|
||||||
|
{GIRLNINJA_DIE + 3, GIRLNINJA_DIE_RATE, DoActorDeathMove, &s_GirlNinjaDeathFall[1]},
|
||||||
|
{GIRLNINJA_DIE + 4, GIRLNINJA_DIE_RATE, DoActorDeathMove, &s_GirlNinjaDeathFall[1]},
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
STATEp *Stand[MAX_WEAPONS];
|
||||||
|
STATEp *Run;
|
||||||
|
STATEp *Jump;
|
||||||
|
STATEp *Fall;
|
||||||
|
STATEp *Crawl;
|
||||||
|
STATEp *Swim;
|
||||||
|
STATEp *Fly;
|
||||||
|
STATEp *Rise;
|
||||||
|
STATEp *Sit;
|
||||||
|
STATEp *Look;
|
||||||
|
STATEp *Climb;
|
||||||
|
STATEp *Pain;
|
||||||
|
STATEp *Death1;
|
||||||
|
STATEp *Death2;
|
||||||
|
STATEp *Dead;
|
||||||
|
STATEp *DeathJump;
|
||||||
|
STATEp *DeathFall;
|
||||||
|
STATEp *CloseAttack[2];
|
||||||
|
STATEp *Attack[6];
|
||||||
|
STATEp *Special[2];
|
||||||
|
*/
|
||||||
|
|
||||||
|
STATEp sg_GirlNinjaDie[] =
|
||||||
|
{
|
||||||
|
s_GirlNinjaDie
|
||||||
|
};
|
||||||
|
|
||||||
|
STATEp sg_GirlNinjaDead[] =
|
||||||
|
{
|
||||||
|
s_GirlNinjaDead
|
||||||
|
};
|
||||||
|
|
||||||
|
STATEp sg_GirlNinjaDeathJump[] =
|
||||||
|
{
|
||||||
|
s_GirlNinjaDeathJump
|
||||||
|
};
|
||||||
|
|
||||||
|
STATEp sg_GirlNinjaDeathFall[] =
|
||||||
|
{
|
||||||
|
s_GirlNinjaDeathFall
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
!AIC - Collection of states that connect action to states
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
ACTOR_ACTION_SET GirlNinjaActionSet =
|
||||||
|
{
|
||||||
|
sg_GirlNinjaStand,
|
||||||
|
sg_GirlNinjaRun,
|
||||||
|
sg_GirlNinjaJump,
|
||||||
|
sg_GirlNinjaFall,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
sg_GirlNinjaRise,
|
||||||
|
sg_GirlNinjaSit,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
sg_GirlNinjaPain,
|
||||||
|
sg_GirlNinjaDie,
|
||||||
|
NULL,
|
||||||
|
sg_GirlNinjaDead,
|
||||||
|
sg_GirlNinjaDeathJump,
|
||||||
|
sg_GirlNinjaDeathFall,
|
||||||
|
{sg_GirlNinjaCrossbow, sg_GirlNinjaSticky},
|
||||||
|
{800, 1024},
|
||||||
|
{sg_GirlNinjaCrossbow, sg_GirlNinjaSticky},
|
||||||
|
{800, 1024},
|
||||||
|
{NULL},
|
||||||
|
sg_GirlNinjaDuck,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
int
|
||||||
|
SetupGirlNinja(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
USERp u;
|
||||||
|
ANIMATOR DoActorDecide;
|
||||||
|
short pic = sp->picnum;
|
||||||
|
|
||||||
|
if (TEST(sp->cstat, CSTAT_SPRITE_RESTORE))
|
||||||
|
{
|
||||||
|
u = User[SpriteNum];
|
||||||
|
ASSERT(u);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
User[SpriteNum] = u = SpawnUser(SpriteNum, GIRLNINJA_RUN_R0, s_GirlNinjaRun[0]);
|
||||||
|
u->Health = 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
u->StateEnd = s_GirlNinjaDie;
|
||||||
|
u->Rot = sg_GirlNinjaRun;
|
||||||
|
sp->xrepeat = 51;
|
||||||
|
sp->yrepeat = 43;
|
||||||
|
|
||||||
|
u->Attrib = &GirlNinjaAttrib;
|
||||||
|
sp->pal = u->spal = 26;
|
||||||
|
EnemyDefaults(SpriteNum, &GirlNinjaActionSet, &GirlNinjaPersonality);
|
||||||
|
|
||||||
|
ChangeState(SpriteNum, s_GirlNinjaRun[0]);
|
||||||
|
DoActorSetSpeed(SpriteNum, NORM_SPEED);
|
||||||
|
|
||||||
|
u->Radius = 280;
|
||||||
|
RESET(u->Flags, SPR_XFLIP_TOGGLE);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
DoGirlNinjaMove(short SpriteNum)
|
||||||
|
{
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
SPRITEp sp = User[SpriteNum]->SpriteP;
|
||||||
|
|
||||||
|
// jumping and falling
|
||||||
|
if (TEST(u->Flags, SPR_JUMPING | SPR_FALLING) && !TEST(u->Flags, SPR_CLIMBING))
|
||||||
|
{
|
||||||
|
if (TEST(u->Flags, SPR_JUMPING))
|
||||||
|
DoActorJump(SpriteNum);
|
||||||
|
else if (TEST(u->Flags, SPR_FALLING))
|
||||||
|
DoActorFall(SpriteNum);
|
||||||
|
}
|
||||||
|
|
||||||
|
// sliding
|
||||||
|
if (TEST(u->Flags, SPR_SLIDING) && !TEST(u->Flags, SPR_CLIMBING))
|
||||||
|
DoActorSlide(SpriteNum);
|
||||||
|
|
||||||
|
// !AIC - do track or call current action function - such as DoActorMoveCloser()
|
||||||
|
if (u->track >= 0)
|
||||||
|
ActorFollowTrack(SpriteNum, ACTORMOVETICS);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
(*u->ActorActionFunc)(SpriteNum);
|
||||||
|
}
|
||||||
|
|
||||||
|
// stay on floor unless doing certain things
|
||||||
|
if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
|
||||||
|
{
|
||||||
|
KeepActorOnFloor(SpriteNum);
|
||||||
|
}
|
||||||
|
|
||||||
|
// take damage from environment
|
||||||
|
DoActorSectorDamage(SpriteNum);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
GirlNinjaJumpActionFunc(short SpriteNum)
|
||||||
|
{
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
SPRITEp sp = User[SpriteNum]->SpriteP;
|
||||||
|
int nx, ny;
|
||||||
|
|
||||||
|
// Move while jumping
|
||||||
|
nx = sp->xvel * (int) sintable[NORM_ANGLE(sp->ang + 512)] >> 14;
|
||||||
|
ny = sp->xvel * (int) sintable[sp->ang] >> 14;
|
||||||
|
|
||||||
|
// if cannot move the sprite
|
||||||
|
if (!move_actor(SpriteNum, nx, ny, 0L))
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!TEST(u->Flags, SPR_JUMPING|SPR_FALLING))
|
||||||
|
{
|
||||||
|
InitActorDecide(SpriteNum);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
NullGirlNinja(short SpriteNum)
|
||||||
|
{
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
SPRITEp sp = User[SpriteNum]->SpriteP;
|
||||||
|
|
||||||
|
if (u->WaitTics > 0) u->WaitTics -= ACTORMOVETICS;
|
||||||
|
|
||||||
|
if (TEST(u->Flags, SPR_SLIDING) && !TEST(u->Flags, SPR_CLIMBING) && !TEST(u->Flags, SPR_JUMPING|SPR_FALLING))
|
||||||
|
DoActorSlide(SpriteNum);
|
||||||
|
|
||||||
|
if (!TEST(u->Flags, SPR_CLIMBING) && !TEST(u->Flags, SPR_JUMPING|SPR_FALLING))
|
||||||
|
KeepActorOnFloor(SpriteNum);
|
||||||
|
|
||||||
|
DoActorSectorDamage(SpriteNum);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int DoGirlNinjaPain(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
|
NullGirlNinja(SpriteNum);
|
||||||
|
|
||||||
|
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
|
||||||
|
InitActorDecide(SpriteNum);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int DoGirlNinjaSpecial(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
|
if (u->spal == PALETTE_PLAYER5)
|
||||||
|
{
|
||||||
|
RESET(sp->cstat,CSTAT_SPRITE_TRANSLUCENT);
|
||||||
|
sp->hitag = 0;
|
||||||
|
sp->shade = -10;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#include "saveable.h"
|
||||||
|
|
||||||
|
static saveable_code saveable_girlninj_code[] =
|
||||||
|
{
|
||||||
|
SAVE_CODE(SetupGirlNinja),
|
||||||
|
SAVE_CODE(DoGirlNinjaMove),
|
||||||
|
SAVE_CODE(GirlNinjaJumpActionFunc),
|
||||||
|
SAVE_CODE(NullGirlNinja),
|
||||||
|
SAVE_CODE(DoGirlNinjaPain),
|
||||||
|
SAVE_CODE(DoGirlNinjaSpecial),
|
||||||
|
};
|
||||||
|
|
||||||
|
static saveable_data saveable_girlninj_data[] =
|
||||||
|
{
|
||||||
|
SAVE_DATA(GirlNinjaBattle),
|
||||||
|
SAVE_DATA(GirlNinjaOffense),
|
||||||
|
SAVE_DATA(GirlNinjaBroadcast),
|
||||||
|
SAVE_DATA(GirlNinjaSurprised),
|
||||||
|
SAVE_DATA(GirlNinjaEvasive),
|
||||||
|
SAVE_DATA(GirlNinjaLostTarget),
|
||||||
|
SAVE_DATA(GirlNinjaCloseRange),
|
||||||
|
|
||||||
|
SAVE_DATA(GirlNinjaPersonality),
|
||||||
|
|
||||||
|
SAVE_DATA(GirlNinjaAttrib),
|
||||||
|
|
||||||
|
SAVE_DATA(s_GirlNinjaRun),
|
||||||
|
SAVE_DATA(sg_GirlNinjaRun),
|
||||||
|
SAVE_DATA(s_GirlNinjaStand),
|
||||||
|
SAVE_DATA(sg_GirlNinjaStand),
|
||||||
|
SAVE_DATA(s_GirlNinjaRise),
|
||||||
|
SAVE_DATA(sg_GirlNinjaRise),
|
||||||
|
SAVE_DATA(s_GirlNinjaDuck),
|
||||||
|
SAVE_DATA(sg_GirlNinjaDuck),
|
||||||
|
SAVE_DATA(s_GirlNinjaSit),
|
||||||
|
SAVE_DATA(sg_GirlNinjaSit),
|
||||||
|
SAVE_DATA(s_GirlNinjaJump),
|
||||||
|
SAVE_DATA(sg_GirlNinjaJump),
|
||||||
|
SAVE_DATA(s_GirlNinjaFall),
|
||||||
|
SAVE_DATA(sg_GirlNinjaFall),
|
||||||
|
SAVE_DATA(s_GirlNinjaPain),
|
||||||
|
SAVE_DATA(sg_GirlNinjaPain),
|
||||||
|
SAVE_DATA(s_GirlNinjaSticky),
|
||||||
|
SAVE_DATA(sg_GirlNinjaSticky),
|
||||||
|
SAVE_DATA(s_GirlNinjaCrossbow),
|
||||||
|
SAVE_DATA(sg_GirlNinjaCrossbow),
|
||||||
|
SAVE_DATA(s_GirlNinjaDie),
|
||||||
|
SAVE_DATA(s_GirlNinjaDead),
|
||||||
|
SAVE_DATA(s_GirlNinjaDeathJump),
|
||||||
|
SAVE_DATA(s_GirlNinjaDeathFall),
|
||||||
|
SAVE_DATA(sg_GirlNinjaDie),
|
||||||
|
SAVE_DATA(sg_GirlNinjaDead),
|
||||||
|
SAVE_DATA(sg_GirlNinjaDeathJump),
|
||||||
|
SAVE_DATA(sg_GirlNinjaDeathFall),
|
||||||
|
|
||||||
|
SAVE_DATA(GirlNinjaActionSet),
|
||||||
|
};
|
||||||
|
|
||||||
|
saveable_module saveable_girlninj =
|
||||||
|
{
|
||||||
|
// code
|
||||||
|
saveable_girlninj_code,
|
||||||
|
SIZ(saveable_girlninj_code),
|
||||||
|
|
||||||
|
// data
|
||||||
|
saveable_girlninj_data,
|
||||||
|
SIZ(saveable_girlninj_data)
|
||||||
|
};
|
619
polymer/eduke32/source/sw/src/goro.c
Normal file
619
polymer/eduke32/source/sw/src/goro.c
Normal file
|
@ -0,0 +1,619 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
#include "build.h"
|
||||||
|
|
||||||
|
#include "keys.h"
|
||||||
|
#include "names2.h"
|
||||||
|
#include "tags.h"
|
||||||
|
#include "game.h"
|
||||||
|
#include "ai.h"
|
||||||
|
#include "actor.h"
|
||||||
|
#include "track.h"
|
||||||
|
|
||||||
|
#define GORO_PAIN_R0 GORO_STAND_R0
|
||||||
|
#define GORO_PAIN_R1 GORO_STAND_R1
|
||||||
|
#define GORO_PAIN_R2 GORO_STAND_R2
|
||||||
|
#define GORO_PAIN_R3 GORO_STAND_R3
|
||||||
|
#define GORO_PAIN_R4 GORO_STAND_R4
|
||||||
|
|
||||||
|
DECISION GoroBattle[] =
|
||||||
|
{
|
||||||
|
{697, InitActorMoveCloser },
|
||||||
|
{700, InitActorAmbientNoise },
|
||||||
|
{1024, InitActorAttack }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION GoroOffense[] =
|
||||||
|
{
|
||||||
|
{797, InitActorMoveCloser },
|
||||||
|
{800, InitActorAttackNoise },
|
||||||
|
{1024, InitActorAttack }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION GoroBroadcast[] =
|
||||||
|
{
|
||||||
|
{3, InitActorAmbientNoise },
|
||||||
|
{1024, InitActorDecide }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION GoroSurprised[] =
|
||||||
|
{
|
||||||
|
{701, InitActorMoveCloser },
|
||||||
|
{1024, InitActorDecide }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION GoroEvasive[] =
|
||||||
|
{
|
||||||
|
{10, InitActorEvade },
|
||||||
|
{1024, InitActorMoveCloser }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION GoroLostTarget[] =
|
||||||
|
{
|
||||||
|
{900, InitActorFindPlayer },
|
||||||
|
{1024, InitActorWanderAround }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION GoroCloseRange[] =
|
||||||
|
{
|
||||||
|
{700, InitActorAttack },
|
||||||
|
{1024, InitActorReposition }
|
||||||
|
};
|
||||||
|
|
||||||
|
PERSONALITY GoroPersonality =
|
||||||
|
{
|
||||||
|
GoroBattle,
|
||||||
|
GoroOffense,
|
||||||
|
GoroBroadcast,
|
||||||
|
GoroSurprised,
|
||||||
|
GoroEvasive,
|
||||||
|
GoroLostTarget,
|
||||||
|
GoroCloseRange,
|
||||||
|
GoroCloseRange
|
||||||
|
};
|
||||||
|
|
||||||
|
ATTRIBUTE GoroAttrib =
|
||||||
|
{
|
||||||
|
{160, 180, 200, 230}, // Speeds
|
||||||
|
{3, 0, -2, -3}, // Tic Adjusts
|
||||||
|
3, // MaxWeapons;
|
||||||
|
{
|
||||||
|
DIGI_GRDAMBIENT, DIGI_GRDALERT, 0,
|
||||||
|
DIGI_GRDPAIN, DIGI_GRDSCREAM, DIGI_GRDSWINGAXE,
|
||||||
|
DIGI_GRDFIREBALL,0,0,0
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// GORO RUN
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define GORO_RUN_RATE 18
|
||||||
|
|
||||||
|
ANIMATOR DoGoroMove,NullGoro,DoActorDebris,NullAnimator,InitEnemyFireball;
|
||||||
|
|
||||||
|
STATE s_GoroRun[5][4] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{GORO_RUN_R0 + 0, GORO_RUN_RATE|SF_TIC_ADJUST, DoGoroMove, &s_GoroRun[0][1]},
|
||||||
|
{GORO_RUN_R0 + 1, GORO_RUN_RATE|SF_TIC_ADJUST, DoGoroMove, &s_GoroRun[0][2]},
|
||||||
|
{GORO_RUN_R0 + 2, GORO_RUN_RATE|SF_TIC_ADJUST, DoGoroMove, &s_GoroRun[0][3]},
|
||||||
|
{GORO_RUN_R0 + 3, GORO_RUN_RATE|SF_TIC_ADJUST, DoGoroMove, &s_GoroRun[0][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GORO_RUN_R1 + 0, GORO_RUN_RATE|SF_TIC_ADJUST, DoGoroMove, &s_GoroRun[1][1]},
|
||||||
|
{GORO_RUN_R1 + 1, GORO_RUN_RATE|SF_TIC_ADJUST, DoGoroMove, &s_GoroRun[1][2]},
|
||||||
|
{GORO_RUN_R1 + 2, GORO_RUN_RATE|SF_TIC_ADJUST, DoGoroMove, &s_GoroRun[1][3]},
|
||||||
|
{GORO_RUN_R1 + 3, GORO_RUN_RATE|SF_TIC_ADJUST, DoGoroMove, &s_GoroRun[1][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GORO_RUN_R2 + 0, GORO_RUN_RATE|SF_TIC_ADJUST, DoGoroMove, &s_GoroRun[2][1]},
|
||||||
|
{GORO_RUN_R2 + 1, GORO_RUN_RATE|SF_TIC_ADJUST, DoGoroMove, &s_GoroRun[2][2]},
|
||||||
|
{GORO_RUN_R2 + 2, GORO_RUN_RATE|SF_TIC_ADJUST, DoGoroMove, &s_GoroRun[2][3]},
|
||||||
|
{GORO_RUN_R2 + 3, GORO_RUN_RATE|SF_TIC_ADJUST, DoGoroMove, &s_GoroRun[2][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GORO_RUN_R3 + 0, GORO_RUN_RATE|SF_TIC_ADJUST, DoGoroMove, &s_GoroRun[3][1]},
|
||||||
|
{GORO_RUN_R3 + 1, GORO_RUN_RATE|SF_TIC_ADJUST, DoGoroMove, &s_GoroRun[3][2]},
|
||||||
|
{GORO_RUN_R3 + 2, GORO_RUN_RATE|SF_TIC_ADJUST, DoGoroMove, &s_GoroRun[3][3]},
|
||||||
|
{GORO_RUN_R3 + 3, GORO_RUN_RATE|SF_TIC_ADJUST, DoGoroMove, &s_GoroRun[3][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GORO_RUN_R4 + 0, GORO_RUN_RATE|SF_TIC_ADJUST, DoGoroMove, &s_GoroRun[4][1]},
|
||||||
|
{GORO_RUN_R4 + 1, GORO_RUN_RATE|SF_TIC_ADJUST, DoGoroMove, &s_GoroRun[4][2]},
|
||||||
|
{GORO_RUN_R4 + 2, GORO_RUN_RATE|SF_TIC_ADJUST, DoGoroMove, &s_GoroRun[4][3]},
|
||||||
|
{GORO_RUN_R4 + 3, GORO_RUN_RATE|SF_TIC_ADJUST, DoGoroMove, &s_GoroRun[4][0]},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
STATEp sg_GoroRun[] =
|
||||||
|
{
|
||||||
|
&s_GoroRun[0][0],
|
||||||
|
&s_GoroRun[1][0],
|
||||||
|
&s_GoroRun[2][0],
|
||||||
|
&s_GoroRun[3][0],
|
||||||
|
&s_GoroRun[4][0]
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// GORO CHOP
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define GORO_CHOP_RATE 14
|
||||||
|
ANIMATOR InitActorDecide;
|
||||||
|
ANIMATOR InitGoroChop;
|
||||||
|
|
||||||
|
STATE s_GoroChop[5][7] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{GORO_CHOP_R0 + 0, GORO_CHOP_RATE, NullGoro, &s_GoroChop[0][1]},
|
||||||
|
{GORO_CHOP_R0 + 1, GORO_CHOP_RATE, NullGoro, &s_GoroChop[0][2]},
|
||||||
|
{GORO_CHOP_R0 + 2, GORO_CHOP_RATE, NullGoro, &s_GoroChop[0][3]},
|
||||||
|
{GORO_CHOP_R0 + 2, 0|SF_QUICK_CALL, InitGoroChop, &s_GoroChop[0][4]},
|
||||||
|
{GORO_CHOP_R0 + 2, GORO_CHOP_RATE, NullGoro, &s_GoroChop[0][5]},
|
||||||
|
{GORO_CHOP_R0 + 2, 0|SF_QUICK_CALL, InitActorDecide, &s_GoroChop[0][6]},
|
||||||
|
{GORO_CHOP_R0 + 2, GORO_CHOP_RATE, DoGoroMove, &s_GoroChop[0][6]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GORO_CHOP_R1 + 0, GORO_CHOP_RATE, NullGoro, &s_GoroChop[1][1]},
|
||||||
|
{GORO_CHOP_R1 + 1, GORO_CHOP_RATE, NullGoro, &s_GoroChop[1][2]},
|
||||||
|
{GORO_CHOP_R1 + 2, GORO_CHOP_RATE, NullGoro, &s_GoroChop[1][3]},
|
||||||
|
{GORO_CHOP_R1 + 2, 0|SF_QUICK_CALL, InitGoroChop, &s_GoroChop[1][4]},
|
||||||
|
{GORO_CHOP_R1 + 2, GORO_CHOP_RATE, NullGoro, &s_GoroChop[1][5]},
|
||||||
|
{GORO_CHOP_R1 + 2, 0|SF_QUICK_CALL, InitActorDecide, &s_GoroChop[1][6]},
|
||||||
|
{GORO_CHOP_R1 + 2, GORO_CHOP_RATE, DoGoroMove, &s_GoroChop[1][6]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GORO_CHOP_R2 + 0, GORO_CHOP_RATE, NullGoro, &s_GoroChop[2][1]},
|
||||||
|
{GORO_CHOP_R2 + 1, GORO_CHOP_RATE, NullGoro, &s_GoroChop[2][2]},
|
||||||
|
{GORO_CHOP_R2 + 2, GORO_CHOP_RATE, NullGoro, &s_GoroChop[2][3]},
|
||||||
|
{GORO_CHOP_R2 + 2, 0|SF_QUICK_CALL, InitGoroChop, &s_GoroChop[2][4]},
|
||||||
|
{GORO_CHOP_R2 + 2, GORO_CHOP_RATE, NullGoro, &s_GoroChop[2][5]},
|
||||||
|
{GORO_CHOP_R2 + 2, 0|SF_QUICK_CALL, InitActorDecide, &s_GoroChop[2][6]},
|
||||||
|
{GORO_CHOP_R2 + 2, GORO_CHOP_RATE, DoGoroMove, &s_GoroChop[2][6]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GORO_CHOP_R3 + 0, GORO_CHOP_RATE, NullGoro, &s_GoroChop[3][1]},
|
||||||
|
{GORO_CHOP_R3 + 1, GORO_CHOP_RATE, NullGoro, &s_GoroChop[3][2]},
|
||||||
|
{GORO_CHOP_R3 + 2, GORO_CHOP_RATE, NullGoro, &s_GoroChop[3][3]},
|
||||||
|
{GORO_CHOP_R3 + 2, 0|SF_QUICK_CALL, InitGoroChop, &s_GoroChop[3][4]},
|
||||||
|
{GORO_CHOP_R3 + 2, GORO_CHOP_RATE, NullGoro, &s_GoroChop[3][5]},
|
||||||
|
{GORO_CHOP_R3 + 2, 0|SF_QUICK_CALL, InitActorDecide, &s_GoroChop[3][6]},
|
||||||
|
{GORO_CHOP_R3 + 2, GORO_CHOP_RATE, DoGoroMove, &s_GoroChop[3][6]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GORO_CHOP_R4 + 0, GORO_CHOP_RATE, NullGoro, &s_GoroChop[4][1]},
|
||||||
|
{GORO_CHOP_R4 + 1, GORO_CHOP_RATE, NullGoro, &s_GoroChop[4][2]},
|
||||||
|
{GORO_CHOP_R4 + 2, GORO_CHOP_RATE, NullGoro, &s_GoroChop[4][3]},
|
||||||
|
{GORO_CHOP_R4 + 2, 0|SF_QUICK_CALL, InitGoroChop, &s_GoroChop[4][4]},
|
||||||
|
{GORO_CHOP_R4 + 2, GORO_CHOP_RATE, NullGoro, &s_GoroChop[4][5]},
|
||||||
|
{GORO_CHOP_R4 + 2, 0|SF_QUICK_CALL, InitActorDecide, &s_GoroChop[4][6]},
|
||||||
|
{GORO_CHOP_R4 + 2, GORO_CHOP_RATE, DoGoroMove, &s_GoroChop[4][6]},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
STATEp sg_GoroChop[] =
|
||||||
|
{
|
||||||
|
&s_GoroChop[0][0],
|
||||||
|
&s_GoroChop[1][0],
|
||||||
|
&s_GoroChop[2][0],
|
||||||
|
&s_GoroChop[3][0],
|
||||||
|
&s_GoroChop[4][0]
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// GORO SPELL
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define GORO_SPELL_RATE 6
|
||||||
|
#define GORO_SPELL_PAUSE 30
|
||||||
|
|
||||||
|
STATE s_GoroSpell[5][10] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{GORO_SPELL_R0 + 0, GORO_SPELL_PAUSE, NullGoro, &s_GoroSpell[0][1]},
|
||||||
|
{GORO_SPELL_R0 + 1, GORO_SPELL_PAUSE, NullGoro, &s_GoroSpell[0][2]},
|
||||||
|
{GORO_SPELL_R0 + 1, GORO_SPELL_RATE, InitEnemyFireball, &s_GoroSpell[0][3]},
|
||||||
|
{GORO_SPELL_R0 + 1, GORO_SPELL_RATE, NullGoro, &s_GoroSpell[0][4]},
|
||||||
|
{GORO_SPELL_R0 + 1, GORO_SPELL_RATE, InitEnemyFireball, &s_GoroSpell[0][5]},
|
||||||
|
{GORO_SPELL_R0 + 1, GORO_SPELL_RATE, NullGoro, &s_GoroSpell[0][6]},
|
||||||
|
{GORO_SPELL_R0 + 1, GORO_SPELL_RATE, InitEnemyFireball, &s_GoroSpell[0][7]},
|
||||||
|
{GORO_SPELL_R0 + 1, GORO_SPELL_PAUSE, NullGoro, &s_GoroSpell[0][8]},
|
||||||
|
{GORO_SPELL_R0 + 1, 0|SF_QUICK_CALL, InitActorDecide, &s_GoroSpell[0][9]},
|
||||||
|
{GORO_SPELL_R0 + 1, GORO_SPELL_RATE, DoGoroMove, &s_GoroSpell[0][9]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GORO_SPELL_R1 + 0, GORO_SPELL_PAUSE, NullGoro, &s_GoroSpell[1][1]},
|
||||||
|
{GORO_SPELL_R1 + 1, GORO_SPELL_PAUSE, NullGoro, &s_GoroSpell[1][2]},
|
||||||
|
{GORO_SPELL_R1 + 1, GORO_SPELL_RATE, InitEnemyFireball, &s_GoroSpell[1][3]},
|
||||||
|
{GORO_SPELL_R1 + 1, GORO_SPELL_RATE, NullGoro, &s_GoroSpell[1][4]},
|
||||||
|
{GORO_SPELL_R1 + 1, GORO_SPELL_RATE, InitEnemyFireball, &s_GoroSpell[1][5]},
|
||||||
|
{GORO_SPELL_R1 + 1, GORO_SPELL_RATE, NullGoro, &s_GoroSpell[1][6]},
|
||||||
|
{GORO_SPELL_R1 + 1, GORO_SPELL_RATE, InitEnemyFireball, &s_GoroSpell[1][7]},
|
||||||
|
{GORO_SPELL_R1 + 1, GORO_SPELL_PAUSE, NullGoro, &s_GoroSpell[1][8]},
|
||||||
|
{GORO_SPELL_R1 + 1, 0|SF_QUICK_CALL, InitActorDecide, &s_GoroSpell[1][9]},
|
||||||
|
{GORO_SPELL_R1 + 1, GORO_SPELL_RATE, DoGoroMove, &s_GoroSpell[1][9]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GORO_SPELL_R2 + 0, GORO_SPELL_PAUSE, NullGoro, &s_GoroSpell[2][1]},
|
||||||
|
{GORO_SPELL_R2 + 1, GORO_SPELL_PAUSE, NullGoro, &s_GoroSpell[2][2]},
|
||||||
|
{GORO_SPELL_R2 + 1, GORO_SPELL_RATE, InitEnemyFireball, &s_GoroSpell[2][3]},
|
||||||
|
{GORO_SPELL_R2 + 1, GORO_SPELL_RATE, NullGoro, &s_GoroSpell[2][4]},
|
||||||
|
{GORO_SPELL_R2 + 1, GORO_SPELL_RATE, InitEnemyFireball, &s_GoroSpell[2][5]},
|
||||||
|
{GORO_SPELL_R2 + 1, GORO_SPELL_RATE, NullGoro, &s_GoroSpell[2][6]},
|
||||||
|
{GORO_SPELL_R2 + 1, GORO_SPELL_RATE, InitEnemyFireball, &s_GoroSpell[2][7]},
|
||||||
|
{GORO_SPELL_R2 + 1, GORO_SPELL_PAUSE, NullGoro, &s_GoroSpell[2][8]},
|
||||||
|
{GORO_SPELL_R2 + 1, 0|SF_QUICK_CALL, InitActorDecide, &s_GoroSpell[2][9]},
|
||||||
|
{GORO_SPELL_R2 + 1, GORO_SPELL_RATE, DoGoroMove, &s_GoroSpell[2][9]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GORO_SPELL_R3 + 0, GORO_SPELL_PAUSE, NullGoro, &s_GoroSpell[3][1]},
|
||||||
|
{GORO_SPELL_R3 + 1, GORO_SPELL_PAUSE, NullGoro, &s_GoroSpell[3][2]},
|
||||||
|
{GORO_SPELL_R3 + 1, GORO_SPELL_RATE, InitEnemyFireball, &s_GoroSpell[3][3]},
|
||||||
|
{GORO_SPELL_R3 + 1, GORO_SPELL_RATE, NullGoro, &s_GoroSpell[3][4]},
|
||||||
|
{GORO_SPELL_R3 + 1, GORO_SPELL_RATE, InitEnemyFireball, &s_GoroSpell[3][5]},
|
||||||
|
{GORO_SPELL_R3 + 1, GORO_SPELL_RATE, NullGoro, &s_GoroSpell[3][6]},
|
||||||
|
{GORO_SPELL_R3 + 1, GORO_SPELL_RATE, InitEnemyFireball, &s_GoroSpell[3][7]},
|
||||||
|
{GORO_SPELL_R3 + 1, GORO_SPELL_PAUSE, NullGoro, &s_GoroSpell[3][8]},
|
||||||
|
{GORO_SPELL_R3 + 1, 0|SF_QUICK_CALL, InitActorDecide, &s_GoroSpell[3][9]},
|
||||||
|
{GORO_SPELL_R3 + 1, GORO_SPELL_RATE, DoGoroMove, &s_GoroSpell[3][9]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GORO_SPELL_R4 + 0, GORO_SPELL_PAUSE, NullGoro, &s_GoroSpell[4][1]},
|
||||||
|
{GORO_SPELL_R4 + 1, GORO_SPELL_PAUSE, NullGoro, &s_GoroSpell[4][2]},
|
||||||
|
{GORO_SPELL_R4 + 1, GORO_SPELL_RATE, InitEnemyFireball, &s_GoroSpell[4][3]},
|
||||||
|
{GORO_SPELL_R4 + 1, GORO_SPELL_RATE, NullGoro, &s_GoroSpell[4][4]},
|
||||||
|
{GORO_SPELL_R4 + 1, GORO_SPELL_RATE, InitEnemyFireball, &s_GoroSpell[4][5]},
|
||||||
|
{GORO_SPELL_R4 + 1, GORO_SPELL_RATE, NullGoro, &s_GoroSpell[4][6]},
|
||||||
|
{GORO_SPELL_R4 + 1, GORO_SPELL_RATE, InitEnemyFireball, &s_GoroSpell[4][7]},
|
||||||
|
{GORO_SPELL_R4 + 1, GORO_SPELL_PAUSE, NullGoro, &s_GoroSpell[4][8]},
|
||||||
|
{GORO_SPELL_R4 + 1, 0|SF_QUICK_CALL, InitActorDecide, &s_GoroSpell[4][9]},
|
||||||
|
{GORO_SPELL_R4 + 1, GORO_SPELL_RATE, DoGoroMove, &s_GoroSpell[4][9]},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
STATEp sg_GoroSpell[] =
|
||||||
|
{
|
||||||
|
&s_GoroSpell[0][0],
|
||||||
|
&s_GoroSpell[1][0],
|
||||||
|
&s_GoroSpell[2][0],
|
||||||
|
&s_GoroSpell[3][0],
|
||||||
|
&s_GoroSpell[4][0]
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// GORO STAND
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define GORO_STAND_RATE 12
|
||||||
|
|
||||||
|
STATE s_GoroStand[5][1] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{GORO_STAND_R0 + 0, GORO_STAND_RATE, DoGoroMove, &s_GoroStand[0][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GORO_STAND_R1 + 0, GORO_STAND_RATE, DoGoroMove, &s_GoroStand[1][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GORO_STAND_R2 + 0, GORO_STAND_RATE, DoGoroMove, &s_GoroStand[2][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GORO_STAND_R3 + 0, GORO_STAND_RATE, DoGoroMove, &s_GoroStand[3][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GORO_STAND_R4 + 0, GORO_STAND_RATE, DoGoroMove, &s_GoroStand[4][0]},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
STATEp sg_GoroStand[] =
|
||||||
|
{
|
||||||
|
s_GoroStand[0],
|
||||||
|
s_GoroStand[1],
|
||||||
|
s_GoroStand[2],
|
||||||
|
s_GoroStand[3],
|
||||||
|
s_GoroStand[4]
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// GORO PAIN
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define GORO_PAIN_RATE 12
|
||||||
|
ANIMATOR DoGoroPain;
|
||||||
|
|
||||||
|
STATE s_GoroPain[5][1] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{GORO_PAIN_R0 + 0, GORO_PAIN_RATE, DoGoroPain, &s_GoroPain[0][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GORO_PAIN_R1 + 0, GORO_PAIN_RATE, DoGoroPain, &s_GoroPain[1][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GORO_PAIN_R2 + 0, GORO_PAIN_RATE, DoGoroPain, &s_GoroPain[2][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GORO_PAIN_R3 + 0, GORO_PAIN_RATE, DoGoroPain, &s_GoroPain[3][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{GORO_PAIN_R4 + 0, GORO_PAIN_RATE, DoGoroPain, &s_GoroPain[4][0]},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
STATEp sg_GoroPain[] =
|
||||||
|
{
|
||||||
|
s_GoroPain[0],
|
||||||
|
s_GoroPain[1],
|
||||||
|
s_GoroPain[2],
|
||||||
|
s_GoroPain[3],
|
||||||
|
s_GoroPain[4]
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// GORO DIE
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define GORO_DIE_RATE 16
|
||||||
|
|
||||||
|
STATE s_GoroDie[] =
|
||||||
|
{
|
||||||
|
{GORO_DIE + 0, GORO_DIE_RATE, NullGoro, &s_GoroDie[1]},
|
||||||
|
{GORO_DIE + 1, GORO_DIE_RATE, NullGoro, &s_GoroDie[2]},
|
||||||
|
{GORO_DIE + 2, GORO_DIE_RATE, NullGoro, &s_GoroDie[3]},
|
||||||
|
{GORO_DIE + 3, GORO_DIE_RATE, NullGoro, &s_GoroDie[4]},
|
||||||
|
{GORO_DIE + 4, GORO_DIE_RATE, NullGoro, &s_GoroDie[5]},
|
||||||
|
{GORO_DIE + 5, GORO_DIE_RATE, NullGoro, &s_GoroDie[6]},
|
||||||
|
{GORO_DIE + 6, GORO_DIE_RATE, NullGoro, &s_GoroDie[7]},
|
||||||
|
{GORO_DIE + 7, GORO_DIE_RATE, NullGoro, &s_GoroDie[8]},
|
||||||
|
{GORO_DIE + 8, GORO_DIE_RATE, NullGoro, &s_GoroDie[9]},
|
||||||
|
{GORO_DEAD, SF_QUICK_CALL, QueueFloorBlood, &s_GoroDie[10]},
|
||||||
|
{GORO_DEAD, GORO_DIE_RATE, DoActorDebris, &s_GoroDie[10]},
|
||||||
|
};
|
||||||
|
|
||||||
|
STATE s_GoroDead[] =
|
||||||
|
{
|
||||||
|
{GORO_DEAD, GORO_DIE_RATE, DoActorDebris, &s_GoroDead[0]},
|
||||||
|
};
|
||||||
|
|
||||||
|
STATEp sg_GoroDie[] =
|
||||||
|
{
|
||||||
|
s_GoroDie
|
||||||
|
};
|
||||||
|
|
||||||
|
STATEp sg_GoroDead[] =
|
||||||
|
{
|
||||||
|
s_GoroDead
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
STATEp *Stand[MAX_WEAPONS];
|
||||||
|
STATEp *Run;
|
||||||
|
STATEp *Jump;
|
||||||
|
STATEp *Fall;
|
||||||
|
STATEp *Crawl;
|
||||||
|
STATEp *Swim;
|
||||||
|
STATEp *Fly;
|
||||||
|
STATEp *Rise;
|
||||||
|
STATEp *Sit;
|
||||||
|
STATEp *Look;
|
||||||
|
STATEp *Climb;
|
||||||
|
STATEp *Pain;
|
||||||
|
STATEp *Death1;
|
||||||
|
STATEp *Death2;
|
||||||
|
STATEp *Dead;
|
||||||
|
STATEp *DeathJump;
|
||||||
|
STATEp *DeathFall;
|
||||||
|
STATEp *CloseAttack[2];
|
||||||
|
STATEp *Attack[6];
|
||||||
|
STATEp *Special[2];
|
||||||
|
*/
|
||||||
|
|
||||||
|
ACTOR_ACTION_SET GoroActionSet =
|
||||||
|
{
|
||||||
|
sg_GoroStand,
|
||||||
|
sg_GoroRun,
|
||||||
|
NULL, //sg_GoroJump,
|
||||||
|
NULL, //sg_GoroFall,
|
||||||
|
NULL, //sg_GoroCrawl,
|
||||||
|
NULL, //sg_GoroSwim,
|
||||||
|
NULL, //sg_GoroFly,
|
||||||
|
NULL, //sg_GoroRise,
|
||||||
|
NULL, //sg_GoroSit,
|
||||||
|
NULL, //sg_GoroLook,
|
||||||
|
NULL, //climb
|
||||||
|
sg_GoroPain,
|
||||||
|
sg_GoroDie,
|
||||||
|
NULL, //sg_GoroHariKari,
|
||||||
|
sg_GoroDead,
|
||||||
|
NULL, //sg_GoroDeathJump,
|
||||||
|
NULL, //sg_GoroDeathFall,
|
||||||
|
{sg_GoroChop},
|
||||||
|
{1024},
|
||||||
|
{sg_GoroSpell},
|
||||||
|
{1024},
|
||||||
|
{NULL,NULL},
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
int
|
||||||
|
SetupGoro(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
USERp u;
|
||||||
|
ANIMATOR DoActorDecide;
|
||||||
|
|
||||||
|
if (TEST(sp->cstat, CSTAT_SPRITE_RESTORE))
|
||||||
|
{
|
||||||
|
u = User[SpriteNum];
|
||||||
|
ASSERT(u);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
User[SpriteNum] = u = SpawnUser(SpriteNum,GORO_RUN_R0,s_GoroRun[0]);
|
||||||
|
u->Health = HEALTH_GORO;
|
||||||
|
}
|
||||||
|
|
||||||
|
ChangeState(SpriteNum, s_GoroRun[0]);
|
||||||
|
u->Attrib = &GoroAttrib;
|
||||||
|
DoActorSetSpeed(SpriteNum, NORM_SPEED);
|
||||||
|
u->StateEnd = s_GoroDie;
|
||||||
|
u->Rot = sg_GoroRun;
|
||||||
|
|
||||||
|
|
||||||
|
EnemyDefaults(SpriteNum, &GoroActionSet, &GoroPersonality);
|
||||||
|
sp->clipdist = 512 >> 2;
|
||||||
|
SET(u->Flags, SPR_XFLIP_TOGGLE);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int NullGoro(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
|
ASSERT(SpriteNum >= 0);
|
||||||
|
|
||||||
|
if (TEST(u->Flags,SPR_SLIDING))
|
||||||
|
DoActorSlide(SpriteNum);
|
||||||
|
|
||||||
|
KeepActorOnFloor(SpriteNum);
|
||||||
|
|
||||||
|
DoActorSectorDamage(SpriteNum);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int DoGoroPain(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
|
ASSERT(SpriteNum >= 0);
|
||||||
|
|
||||||
|
NullGoro(SpriteNum);
|
||||||
|
|
||||||
|
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
|
||||||
|
InitActorDecide(SpriteNum);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int DoGoroMove(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
|
ASSERT(SpriteNum >= 0);
|
||||||
|
|
||||||
|
if (TEST(u->Flags,SPR_SLIDING))
|
||||||
|
DoActorSlide(SpriteNum);
|
||||||
|
|
||||||
|
if (u->track >= 0)
|
||||||
|
ActorFollowTrack(SpriteNum, ACTORMOVETICS);
|
||||||
|
else
|
||||||
|
(*u->ActorActionFunc)(SpriteNum);
|
||||||
|
|
||||||
|
ASSERT(User[SpriteNum]);
|
||||||
|
|
||||||
|
KeepActorOnFloor(SpriteNum);
|
||||||
|
|
||||||
|
DoActorSectorDamage(SpriteNum);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#include "saveable.h"
|
||||||
|
|
||||||
|
static saveable_code saveable_goro_code[] =
|
||||||
|
{
|
||||||
|
SAVE_CODE(SetupGoro),
|
||||||
|
SAVE_CODE(NullGoro),
|
||||||
|
SAVE_CODE(DoGoroPain),
|
||||||
|
SAVE_CODE(DoGoroMove),
|
||||||
|
};
|
||||||
|
|
||||||
|
static saveable_data saveable_goro_data[] =
|
||||||
|
{
|
||||||
|
SAVE_DATA(GoroBattle),
|
||||||
|
SAVE_DATA(GoroOffense),
|
||||||
|
SAVE_DATA(GoroBroadcast),
|
||||||
|
SAVE_DATA(GoroSurprised),
|
||||||
|
SAVE_DATA(GoroEvasive),
|
||||||
|
SAVE_DATA(GoroLostTarget),
|
||||||
|
SAVE_DATA(GoroCloseRange),
|
||||||
|
|
||||||
|
SAVE_DATA(GoroPersonality),
|
||||||
|
|
||||||
|
SAVE_DATA(GoroAttrib),
|
||||||
|
|
||||||
|
SAVE_DATA(s_GoroRun),
|
||||||
|
SAVE_DATA(sg_GoroRun),
|
||||||
|
SAVE_DATA(s_GoroChop),
|
||||||
|
SAVE_DATA(sg_GoroChop),
|
||||||
|
SAVE_DATA(s_GoroSpell),
|
||||||
|
SAVE_DATA(sg_GoroSpell),
|
||||||
|
SAVE_DATA(s_GoroStand),
|
||||||
|
SAVE_DATA(sg_GoroStand),
|
||||||
|
SAVE_DATA(s_GoroPain),
|
||||||
|
SAVE_DATA(sg_GoroPain),
|
||||||
|
SAVE_DATA(s_GoroDie),
|
||||||
|
SAVE_DATA(s_GoroDead),
|
||||||
|
SAVE_DATA(sg_GoroDie),
|
||||||
|
SAVE_DATA(sg_GoroDead),
|
||||||
|
|
||||||
|
SAVE_DATA(GoroActionSet),
|
||||||
|
};
|
||||||
|
|
||||||
|
saveable_module saveable_goro =
|
||||||
|
{
|
||||||
|
// code
|
||||||
|
saveable_goro_code,
|
||||||
|
SIZ(saveable_goro_code),
|
||||||
|
|
||||||
|
// data
|
||||||
|
saveable_goro_data,
|
||||||
|
SIZ(saveable_goro_data)
|
||||||
|
};
|
214
polymer/eduke32/source/sw/src/grpscan.c
Normal file
214
polymer/eduke32/source/sw/src/grpscan.c
Normal file
|
@ -0,0 +1,214 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 2007 Jonathon Fowler <jf@jonof.id.au>
|
||||||
|
|
||||||
|
This file is part of JFShadowWarrior
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include "build.h"
|
||||||
|
#include "baselayer.h"
|
||||||
|
|
||||||
|
#include "scriptfile.h"
|
||||||
|
#include "cache1d.h"
|
||||||
|
#include "crc32.h"
|
||||||
|
|
||||||
|
#include "grpscan.h"
|
||||||
|
|
||||||
|
struct grpfile grpfiles[numgrpfiles] =
|
||||||
|
{
|
||||||
|
{ "Registered Version", 0x7545319F, 47536148, NULL },
|
||||||
|
{ "Shareware Version", 0x08A7FA1F, 26056769, NULL },
|
||||||
|
{ "Wanton Destruction (Addon)", 0xA9AAA7B7, 48698128, NULL },
|
||||||
|
};
|
||||||
|
struct grpfile *foundgrps = NULL;
|
||||||
|
|
||||||
|
#define GRPCACHEFILE "grpfiles.cache"
|
||||||
|
static struct grpcache
|
||||||
|
{
|
||||||
|
struct grpcache *next;
|
||||||
|
char name[BMAX_PATH+1];
|
||||||
|
int size;
|
||||||
|
int mtime;
|
||||||
|
unsigned int crcval;
|
||||||
|
} *grpcache = NULL, *usedgrpcache = NULL;
|
||||||
|
|
||||||
|
static int LoadGroupsCache(void)
|
||||||
|
{
|
||||||
|
struct grpcache *fg;
|
||||||
|
|
||||||
|
int fsize, fmtime, fcrcval;
|
||||||
|
char *fname;
|
||||||
|
|
||||||
|
scriptfile *script;
|
||||||
|
|
||||||
|
script = scriptfile_fromfile(GRPCACHEFILE);
|
||||||
|
if (!script) return -1;
|
||||||
|
|
||||||
|
while (!scriptfile_eof(script))
|
||||||
|
{
|
||||||
|
if (scriptfile_getstring(script, &fname)) break; // filename
|
||||||
|
if (scriptfile_getnumber(script, &fsize)) break; // filesize
|
||||||
|
if (scriptfile_getnumber(script, &fmtime)) break; // modification time
|
||||||
|
if (scriptfile_getnumber(script, &fcrcval)) break; // crc checksum
|
||||||
|
|
||||||
|
fg = calloc(1, sizeof(struct grpcache));
|
||||||
|
fg->next = grpcache;
|
||||||
|
grpcache = fg;
|
||||||
|
|
||||||
|
strncpy(fg->name, fname, BMAX_PATH);
|
||||||
|
fg->size = fsize;
|
||||||
|
fg->mtime = fmtime;
|
||||||
|
fg->crcval = fcrcval;
|
||||||
|
}
|
||||||
|
|
||||||
|
scriptfile_close(script);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void FreeGroupsCache(void)
|
||||||
|
{
|
||||||
|
struct grpcache *fg;
|
||||||
|
|
||||||
|
while (grpcache)
|
||||||
|
{
|
||||||
|
fg = grpcache->next;
|
||||||
|
free(grpcache);
|
||||||
|
grpcache = fg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int ScanGroups(void)
|
||||||
|
{
|
||||||
|
CACHE1D_FIND_REC *srch, *sidx;
|
||||||
|
struct grpcache *fg, *fgg;
|
||||||
|
struct grpfile *grp;
|
||||||
|
char *fn;
|
||||||
|
struct Bstat st;
|
||||||
|
|
||||||
|
buildputs("Scanning for GRP files...\n");
|
||||||
|
|
||||||
|
LoadGroupsCache();
|
||||||
|
|
||||||
|
srch = klistpath("/", "*.grp", CACHE1D_FIND_FILE);
|
||||||
|
|
||||||
|
for (sidx = srch; sidx; sidx = sidx->next)
|
||||||
|
{
|
||||||
|
for (fg = grpcache; fg; fg = fg->next)
|
||||||
|
{
|
||||||
|
if (!Bstrcmp(fg->name, sidx->name)) break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fg)
|
||||||
|
{
|
||||||
|
if (findfrompath(sidx->name, &fn)) continue; // failed to resolve the filename
|
||||||
|
if (Bstat(fn, &st)) { free(fn); continue; } // failed to stat the file
|
||||||
|
free(fn);
|
||||||
|
if (fg->size == st.st_size && fg->mtime == st.st_mtime)
|
||||||
|
{
|
||||||
|
grp = (struct grpfile *)calloc(1, sizeof(struct grpfile));
|
||||||
|
grp->name = strdup(sidx->name);
|
||||||
|
grp->crcval = fg->crcval;
|
||||||
|
grp->size = fg->size;
|
||||||
|
grp->next = foundgrps;
|
||||||
|
foundgrps = grp;
|
||||||
|
|
||||||
|
fgg = (struct grpcache *)calloc(1, sizeof(struct grpcache));
|
||||||
|
strcpy(fgg->name, fg->name);
|
||||||
|
fgg->size = fg->size;
|
||||||
|
fgg->mtime = fg->mtime;
|
||||||
|
fgg->crcval = fg->crcval;
|
||||||
|
fgg->next = usedgrpcache;
|
||||||
|
usedgrpcache = fgg;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
int b, fh;
|
||||||
|
unsigned int crcval;
|
||||||
|
unsigned char buf[16*512];
|
||||||
|
|
||||||
|
fh = openfrompath(sidx->name, BO_RDONLY|BO_BINARY, BS_IREAD);
|
||||||
|
if (fh < 0) continue;
|
||||||
|
if (fstat(fh, &st)) continue;
|
||||||
|
|
||||||
|
buildprintf(" Checksumming %s...", sidx->name);
|
||||||
|
crc32init(&crcval);
|
||||||
|
do
|
||||||
|
{
|
||||||
|
b = read(fh, buf, sizeof(buf));
|
||||||
|
if (b > 0) crc32block(&crcval, buf, b);
|
||||||
|
}
|
||||||
|
while (b == sizeof(buf));
|
||||||
|
crc32finish(&crcval);
|
||||||
|
close(fh);
|
||||||
|
buildputs(" Done\n");
|
||||||
|
|
||||||
|
grp = (struct grpfile *)calloc(1, sizeof(struct grpfile));
|
||||||
|
grp->name = strdup(sidx->name);
|
||||||
|
grp->crcval = crcval;
|
||||||
|
grp->size = st.st_size;
|
||||||
|
grp->next = foundgrps;
|
||||||
|
foundgrps = grp;
|
||||||
|
|
||||||
|
fgg = (struct grpcache *)calloc(1, sizeof(struct grpcache));
|
||||||
|
strncpy(fgg->name, sidx->name, BMAX_PATH);
|
||||||
|
fgg->size = st.st_size;
|
||||||
|
fgg->mtime = st.st_mtime;
|
||||||
|
fgg->crcval = crcval;
|
||||||
|
fgg->next = usedgrpcache;
|
||||||
|
usedgrpcache = fgg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
klistfree(srch);
|
||||||
|
FreeGroupsCache();
|
||||||
|
|
||||||
|
if (usedgrpcache)
|
||||||
|
{
|
||||||
|
FILE *fp;
|
||||||
|
fp = fopen(GRPCACHEFILE, "wt");
|
||||||
|
if (fp)
|
||||||
|
{
|
||||||
|
for (fg = usedgrpcache; fg; fg=fgg)
|
||||||
|
{
|
||||||
|
fgg = fg->next;
|
||||||
|
fprintf(fp, "\"%s\" %d %d %d\n", fg->name, fg->size, fg->mtime, fg->crcval);
|
||||||
|
free(fg);
|
||||||
|
}
|
||||||
|
fclose(fp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void FreeGroups(void)
|
||||||
|
{
|
||||||
|
struct grpfile *fg;
|
||||||
|
|
||||||
|
while (foundgrps)
|
||||||
|
{
|
||||||
|
fg = foundgrps->next;
|
||||||
|
free((char *)foundgrps->name);
|
||||||
|
free(foundgrps);
|
||||||
|
foundgrps = fg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
40
polymer/eduke32/source/sw/src/grpscan.h
Normal file
40
polymer/eduke32/source/sw/src/grpscan.h
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 2007 Jonathon Fowler <jf@jonof.id.au>
|
||||||
|
|
||||||
|
This file is part of JFShadowWarrior
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef grpscan_h__
|
||||||
|
#define grpscan_h__
|
||||||
|
|
||||||
|
// List of internally-known GRP files
|
||||||
|
#define numgrpfiles 3
|
||||||
|
struct grpfile
|
||||||
|
{
|
||||||
|
const char *name;
|
||||||
|
int crcval;
|
||||||
|
int size;
|
||||||
|
struct grpfile *next;
|
||||||
|
} grpfiles[numgrpfiles], *foundgrps;
|
||||||
|
|
||||||
|
int ScanGroups(void);
|
||||||
|
void FreeGroups(void);
|
||||||
|
|
||||||
|
#endif
|
675
polymer/eduke32/source/sw/src/hornet.c
Normal file
675
polymer/eduke32/source/sw/src/hornet.c
Normal file
|
@ -0,0 +1,675 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
#include "build.h"
|
||||||
|
|
||||||
|
#include "keys.h"
|
||||||
|
#include "names2.h"
|
||||||
|
#include "game.h"
|
||||||
|
#include "tags.h"
|
||||||
|
#include "ai.h"
|
||||||
|
#include "actor.h"
|
||||||
|
#include "weapon.h"
|
||||||
|
#include "track.h"
|
||||||
|
#include "sprite.h"
|
||||||
|
|
||||||
|
ANIMATOR DoHornetCircle, InitHornetCircle;
|
||||||
|
|
||||||
|
|
||||||
|
DECISION HornetBattle[] =
|
||||||
|
{
|
||||||
|
{50, InitHornetCircle },
|
||||||
|
{798, InitActorMoveCloser },
|
||||||
|
{800, InitActorAlertNoise },
|
||||||
|
{1024, InitActorRunAway }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION HornetOffense[] =
|
||||||
|
{
|
||||||
|
{1022, InitActorMoveCloser },
|
||||||
|
{1024, InitActorAlertNoise }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION HornetBroadcast[] =
|
||||||
|
{
|
||||||
|
{3, InitActorAlertNoise },
|
||||||
|
{6, InitActorAmbientNoise },
|
||||||
|
{1024, InitActorDecide }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION HornetSurprised[] =
|
||||||
|
{
|
||||||
|
{100, InitHornetCircle },
|
||||||
|
{701, InitActorMoveCloser },
|
||||||
|
{1024, InitActorDecide }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION HornetEvasive[] =
|
||||||
|
{
|
||||||
|
{20, InitHornetCircle },
|
||||||
|
{1024, NULL },
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION HornetLostTarget[] =
|
||||||
|
{
|
||||||
|
{900, InitActorFindPlayer },
|
||||||
|
{1024, InitActorWanderAround }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION HornetCloseRange[] =
|
||||||
|
{
|
||||||
|
{900, InitActorMoveCloser },
|
||||||
|
{1024, InitActorReposition }
|
||||||
|
};
|
||||||
|
|
||||||
|
ANIMATOR InitHornetSting;
|
||||||
|
|
||||||
|
DECISION HornetTouchTarget[] =
|
||||||
|
{
|
||||||
|
{500, InitHornetCircle },
|
||||||
|
{1024, InitHornetSting }
|
||||||
|
};
|
||||||
|
|
||||||
|
PERSONALITY HornetPersonality =
|
||||||
|
{
|
||||||
|
HornetBattle,
|
||||||
|
HornetOffense,
|
||||||
|
HornetBroadcast,
|
||||||
|
HornetSurprised,
|
||||||
|
HornetEvasive,
|
||||||
|
HornetLostTarget,
|
||||||
|
HornetCloseRange,
|
||||||
|
HornetTouchTarget
|
||||||
|
};
|
||||||
|
|
||||||
|
ATTRIBUTE HornetAttrib =
|
||||||
|
{
|
||||||
|
{300, 350, 375, 400}, // Speeds
|
||||||
|
{0, 0, 0, 0}, // Tic Adjusts
|
||||||
|
0, //MaxWeapons;
|
||||||
|
{
|
||||||
|
0, 0, DIGI_HORNETSTING, DIGI_HORNETSTING, DIGI_HORNETDEATH,
|
||||||
|
0,0,0,0,0
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// HORNET RUN
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define HORNET_RUN_RATE 7
|
||||||
|
|
||||||
|
ANIMATOR DoHornetMove,NullHornet,DoStayOnFloor, DoActorDebris, NullHornet, DoHornetBirth;
|
||||||
|
|
||||||
|
STATE s_HornetRun[5][2] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{HORNET_RUN_R0 + 0, HORNET_RUN_RATE, DoHornetMove, &s_HornetRun[0][1]},
|
||||||
|
{HORNET_RUN_R0 + 1, HORNET_RUN_RATE, DoHornetMove, &s_HornetRun[0][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{HORNET_RUN_R1 + 0, HORNET_RUN_RATE, DoHornetMove, &s_HornetRun[1][1]},
|
||||||
|
{HORNET_RUN_R1 + 1, HORNET_RUN_RATE, DoHornetMove, &s_HornetRun[1][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{HORNET_RUN_R2 + 0, HORNET_RUN_RATE, DoHornetMove, &s_HornetRun[2][1]},
|
||||||
|
{HORNET_RUN_R2 + 1, HORNET_RUN_RATE, DoHornetMove, &s_HornetRun[2][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{HORNET_RUN_R3 + 0, HORNET_RUN_RATE, DoHornetMove, &s_HornetRun[3][1]},
|
||||||
|
{HORNET_RUN_R3 + 1, HORNET_RUN_RATE, DoHornetMove, &s_HornetRun[3][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{HORNET_RUN_R4 + 0, HORNET_RUN_RATE, DoHornetMove, &s_HornetRun[4][1]},
|
||||||
|
{HORNET_RUN_R4 + 1, HORNET_RUN_RATE, DoHornetMove, &s_HornetRun[4][0]},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
STATEp sg_HornetRun[] =
|
||||||
|
{
|
||||||
|
&s_HornetRun[0][0],
|
||||||
|
&s_HornetRun[1][0],
|
||||||
|
&s_HornetRun[2][0],
|
||||||
|
&s_HornetRun[3][0],
|
||||||
|
&s_HornetRun[4][0]
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// HORNET STAND
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define HORNET_STAND_RATE (HORNET_RUN_RATE + 5)
|
||||||
|
|
||||||
|
STATE s_HornetStand[5][2] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{HORNET_RUN_R0 + 0, HORNET_STAND_RATE, DoHornetMove, &s_HornetStand[0][1]},
|
||||||
|
{HORNET_RUN_R0 + 1, HORNET_STAND_RATE, DoHornetMove, &s_HornetStand[0][0]}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{HORNET_RUN_R1 + 0, HORNET_STAND_RATE, DoHornetMove, &s_HornetStand[1][1]},
|
||||||
|
{HORNET_RUN_R1 + 1, HORNET_STAND_RATE, DoHornetMove, &s_HornetStand[1][0]}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{HORNET_RUN_R2 + 0, HORNET_STAND_RATE, DoHornetMove, &s_HornetStand[2][1]},
|
||||||
|
{HORNET_RUN_R2 + 1, HORNET_STAND_RATE, DoHornetMove, &s_HornetStand[2][0]}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{HORNET_RUN_R3 + 0, HORNET_STAND_RATE, DoHornetMove, &s_HornetStand[3][1]},
|
||||||
|
{HORNET_RUN_R3 + 1, HORNET_STAND_RATE, DoHornetMove, &s_HornetStand[3][0]}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{HORNET_RUN_R4 + 0, HORNET_STAND_RATE, DoHornetMove, &s_HornetStand[4][1]},
|
||||||
|
{HORNET_RUN_R4 + 1, HORNET_STAND_RATE, DoHornetMove, &s_HornetStand[4][0]}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
STATEp sg_HornetStand[] =
|
||||||
|
{
|
||||||
|
&s_HornetStand[0][0],
|
||||||
|
&s_HornetStand[1][0],
|
||||||
|
&s_HornetStand[2][0],
|
||||||
|
&s_HornetStand[3][0],
|
||||||
|
&s_HornetStand[4][0]
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// HORNET DIE
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define HORNET_DIE_RATE 20
|
||||||
|
ANIMATOR DoHornetDeath;
|
||||||
|
STATE s_HornetDie[] =
|
||||||
|
{
|
||||||
|
#if 0
|
||||||
|
{HORNET_DIE + 0, HORNET_DIE_RATE, NullHornet, &s_HornetDie[1]},
|
||||||
|
{HORNET_DEAD, HORNET_DIE_RATE, DoActorDebris, &s_HornetDie[1]},
|
||||||
|
#else
|
||||||
|
{HORNET_DIE + 0, HORNET_DIE_RATE, DoHornetDeath, &s_HornetDie[0]},
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
STATEp sg_HornetDie[] =
|
||||||
|
{
|
||||||
|
s_HornetDie
|
||||||
|
};
|
||||||
|
|
||||||
|
STATE s_HornetDead[] =
|
||||||
|
{
|
||||||
|
{HORNET_DEAD, HORNET_DIE_RATE, DoActorDebris, &s_HornetDead[0]},
|
||||||
|
};
|
||||||
|
|
||||||
|
STATEp sg_HornetDead[] =
|
||||||
|
{
|
||||||
|
s_HornetDead
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
STATEp *Stand[MAX_WEAPONS];
|
||||||
|
STATEp *Run;
|
||||||
|
STATEp *Jump;
|
||||||
|
STATEp *Fall;
|
||||||
|
STATEp *Crawl;
|
||||||
|
STATEp *Swim;
|
||||||
|
STATEp *Fly;
|
||||||
|
STATEp *Rise;
|
||||||
|
STATEp *Sit;
|
||||||
|
STATEp *Look;
|
||||||
|
STATEp *Climb;
|
||||||
|
STATEp *Pain;
|
||||||
|
STATEp *Death1;
|
||||||
|
STATEp *Death2;
|
||||||
|
STATEp *Dead;
|
||||||
|
STATEp *DeathJump;
|
||||||
|
STATEp *DeathFall;
|
||||||
|
STATEp *CloseAttack[2];
|
||||||
|
STATEp *Attack[6];
|
||||||
|
STATEp *Special[2];
|
||||||
|
*/
|
||||||
|
|
||||||
|
ACTOR_ACTION_SET HornetActionSet =
|
||||||
|
{
|
||||||
|
sg_HornetStand,
|
||||||
|
sg_HornetRun,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL, //climb
|
||||||
|
NULL, //pain
|
||||||
|
sg_HornetDie,
|
||||||
|
NULL,
|
||||||
|
sg_HornetDead,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
{NULL},
|
||||||
|
{0},
|
||||||
|
{NULL},
|
||||||
|
{0},
|
||||||
|
{NULL},
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
int DoHornetMatchPlayerZ(short SpriteNum);
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
SetupHornet(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
USERp u;
|
||||||
|
ANIMATOR DoActorDecide;
|
||||||
|
|
||||||
|
if (TEST(sp->cstat, CSTAT_SPRITE_RESTORE))
|
||||||
|
{
|
||||||
|
u = User[SpriteNum];
|
||||||
|
ASSERT(u);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
User[SpriteNum] = u = SpawnUser(SpriteNum,HORNET_RUN_R0,s_HornetRun[0]);
|
||||||
|
u->Health = HEALTH_HORNET;
|
||||||
|
}
|
||||||
|
|
||||||
|
ChangeState(SpriteNum, s_HornetRun[0]);
|
||||||
|
u->Attrib = &HornetAttrib;
|
||||||
|
DoActorSetSpeed(SpriteNum, NORM_SPEED);
|
||||||
|
u->StateEnd = s_HornetDie;
|
||||||
|
u->Rot = sg_HornetRun;
|
||||||
|
|
||||||
|
EnemyDefaults(SpriteNum, &HornetActionSet, &HornetPersonality);
|
||||||
|
|
||||||
|
SET(u->Flags, SPR_NO_SCAREDZ|SPR_XFLIP_TOGGLE);
|
||||||
|
SET(sp->cstat, CSTAT_SPRITE_YCENTER);
|
||||||
|
|
||||||
|
sp->clipdist = (100) >> 2;
|
||||||
|
u->floor_dist = Z(16);
|
||||||
|
u->ceiling_dist = Z(16);
|
||||||
|
|
||||||
|
u->sz = sp->z;
|
||||||
|
|
||||||
|
sp->xrepeat = 37;
|
||||||
|
sp->yrepeat = 32;
|
||||||
|
|
||||||
|
// Special looping buzz sound attached to each hornet spawned
|
||||||
|
PlaySound(DIGI_HORNETBUZZ,&sp->x,&sp->y,&sp->z,v3df_follow|v3df_init);
|
||||||
|
Set3DSoundOwner(SpriteNum);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int NullHornet(short SpriteNum)
|
||||||
|
{
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
SPRITEp sp = User[SpriteNum]->SpriteP;
|
||||||
|
|
||||||
|
if (TEST(u->Flags,SPR_SLIDING))
|
||||||
|
DoActorSlide(SpriteNum);
|
||||||
|
|
||||||
|
DoHornetMatchPlayerZ(SpriteNum);
|
||||||
|
|
||||||
|
DoActorSectorDamage(SpriteNum);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int DoHornetMatchPlayerZ(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
SPRITEp tsp = User[SpriteNum]->tgt_sp;
|
||||||
|
long zdiff,zdist;
|
||||||
|
long loz,hiz;
|
||||||
|
|
||||||
|
long bound;
|
||||||
|
|
||||||
|
// actor does a sine wave about u->sz - this is the z mid point
|
||||||
|
|
||||||
|
//zdiff = (SPRITEp_LOWER(tsp) - Z(8)) - u->sz;
|
||||||
|
zdiff = (SPRITEp_MID(tsp)) - u->sz;
|
||||||
|
|
||||||
|
// check z diff of the player and the sprite
|
||||||
|
zdist = Z(20 + RANDOM_RANGE(200)); // put a random amount
|
||||||
|
if (labs(zdiff) > zdist)
|
||||||
|
{
|
||||||
|
if (zdiff > 0)
|
||||||
|
// manipulate the z midpoint
|
||||||
|
//u->sz += 256 * ACTORMOVETICS;
|
||||||
|
u->sz += 1024 * ACTORMOVETICS;
|
||||||
|
else
|
||||||
|
u->sz -= 256 * ACTORMOVETICS;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define HORNET_BOB_AMT (Z(16))
|
||||||
|
|
||||||
|
// save off lo and hi z
|
||||||
|
loz = u->loz;
|
||||||
|
hiz = u->hiz;
|
||||||
|
|
||||||
|
// adjust loz/hiz for water depth
|
||||||
|
if (u->lo_sectp && SectUser[u->lo_sectp - sector] && SectUser[u->lo_sectp - sector]->depth)
|
||||||
|
loz -= Z(SectUser[u->lo_sectp - sector]->depth) - Z(8);
|
||||||
|
|
||||||
|
// lower bound
|
||||||
|
if (u->lo_sp)
|
||||||
|
bound = loz - u->floor_dist;
|
||||||
|
else
|
||||||
|
bound = loz - u->floor_dist - HORNET_BOB_AMT;
|
||||||
|
|
||||||
|
if (u->sz > bound)
|
||||||
|
{
|
||||||
|
u->sz = bound;
|
||||||
|
}
|
||||||
|
|
||||||
|
// upper bound
|
||||||
|
if (u->hi_sp)
|
||||||
|
bound = hiz + u->ceiling_dist;
|
||||||
|
else
|
||||||
|
bound = hiz + u->ceiling_dist + HORNET_BOB_AMT;
|
||||||
|
|
||||||
|
if (u->sz < bound)
|
||||||
|
{
|
||||||
|
u->sz = bound;
|
||||||
|
}
|
||||||
|
|
||||||
|
u->sz = min(u->sz, loz - u->floor_dist);
|
||||||
|
u->sz = max(u->sz, hiz + u->ceiling_dist);
|
||||||
|
|
||||||
|
u->Counter = (u->Counter + (ACTORMOVETICS << 3) + (ACTORMOVETICS << 1)) & 2047;
|
||||||
|
sp->z = u->sz + ((HORNET_BOB_AMT * (long)sintable[u->Counter]) >> 14);
|
||||||
|
|
||||||
|
bound = u->hiz + u->ceiling_dist + HORNET_BOB_AMT;
|
||||||
|
if (sp->z < bound)
|
||||||
|
{
|
||||||
|
// bumped something
|
||||||
|
sp->z = u->sz = bound + HORNET_BOB_AMT;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int InitHornetCircle(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
|
u->ActorActionFunc = DoHornetCircle;
|
||||||
|
|
||||||
|
NewStateGroup(SpriteNum, u->ActorActionSet->Run);
|
||||||
|
|
||||||
|
// set it close
|
||||||
|
DoActorSetSpeed(SpriteNum, FAST_SPEED);
|
||||||
|
|
||||||
|
// set to really fast
|
||||||
|
sp->xvel = 400;
|
||||||
|
// angle adjuster
|
||||||
|
u->Counter2 = sp->xvel/3;
|
||||||
|
// random angle direction
|
||||||
|
if (RANDOM_P2(1024) < 512)
|
||||||
|
u->Counter2 = -u->Counter2;
|
||||||
|
|
||||||
|
// z velocity
|
||||||
|
u->jump_speed = 200 + RANDOM_P2(128);
|
||||||
|
if (labs(u->sz - u->hiz) < labs(u->sz - u->loz))
|
||||||
|
u->jump_speed = -u->jump_speed;
|
||||||
|
|
||||||
|
u->WaitTics = (RANDOM_RANGE(3)+1) * 60;
|
||||||
|
|
||||||
|
(*u->ActorActionFunc)(SpriteNum);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int DoHornetCircle(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
SPRITEp tsp = User[SpriteNum]->tgt_sp;
|
||||||
|
long nx,ny,bound;
|
||||||
|
|
||||||
|
sp->ang = NORM_ANGLE(sp->ang + u->Counter2);
|
||||||
|
|
||||||
|
nx = sp->xvel * (long) sintable[NORM_ANGLE(sp->ang + 512)] >> 14;
|
||||||
|
ny = sp->xvel * (long) sintable[sp->ang] >> 14;
|
||||||
|
|
||||||
|
if (!move_actor(SpriteNum, nx, ny, 0L))
|
||||||
|
{
|
||||||
|
//ActorMoveHitReact(SpriteNum);
|
||||||
|
|
||||||
|
// try moving in the opposite direction
|
||||||
|
u->Counter2 = -u->Counter2;
|
||||||
|
sp->ang = NORM_ANGLE(sp->ang + 1024);
|
||||||
|
nx = sp->xvel * (long) sintable[NORM_ANGLE(sp->ang + 512)] >> 14;
|
||||||
|
ny = sp->xvel * (long) sintable[sp->ang] >> 14;
|
||||||
|
|
||||||
|
if (!move_actor(SpriteNum, nx, ny, 0L))
|
||||||
|
{
|
||||||
|
InitActorReposition(SpriteNum);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// move in the z direction
|
||||||
|
u->sz -= u->jump_speed * ACTORMOVETICS;
|
||||||
|
|
||||||
|
bound = u->hiz + u->ceiling_dist + HORNET_BOB_AMT;
|
||||||
|
if (u->sz < bound)
|
||||||
|
{
|
||||||
|
// bumped something
|
||||||
|
u->sz = bound;
|
||||||
|
InitActorReposition(SpriteNum);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// time out
|
||||||
|
if ((u->WaitTics -= ACTORMOVETICS) < 0)
|
||||||
|
{
|
||||||
|
InitActorReposition(SpriteNum);
|
||||||
|
u->WaitTics = 0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
DoHornetDeath(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
long nx, ny;
|
||||||
|
|
||||||
|
if (TEST(u->Flags, SPR_FALLING))
|
||||||
|
{
|
||||||
|
u->loz = u->zclip;
|
||||||
|
DoFall(SpriteNum);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
RESET(sp->cstat, CSTAT_SPRITE_YCENTER);
|
||||||
|
u->jump_speed = 0;
|
||||||
|
u->floor_dist = 0;
|
||||||
|
DoBeginFall(SpriteNum);
|
||||||
|
DoFindGroundPoint(SpriteNum);
|
||||||
|
u->zclip = u->loz;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (TEST(u->Flags, SPR_SLIDING))
|
||||||
|
DoActorSlide(SpriteNum);
|
||||||
|
|
||||||
|
// slide while falling
|
||||||
|
nx = sp->xvel * (long) sintable[NORM_ANGLE(sp->ang + 512)] >> 14;
|
||||||
|
ny = sp->xvel * (long) sintable[sp->ang] >> 14;
|
||||||
|
|
||||||
|
u->ret = move_sprite(SpriteNum, nx, ny, 0L, u->ceiling_dist, u->floor_dist, 1, ACTORMOVETICS);
|
||||||
|
|
||||||
|
// on the ground
|
||||||
|
if (sp->z >= u->loz)
|
||||||
|
{
|
||||||
|
RESET(u->Flags, SPR_FALLING|SPR_SLIDING);
|
||||||
|
RESET(sp->cstat, CSTAT_SPRITE_YFLIP); // If upside down, reset it
|
||||||
|
NewStateGroup(SpriteNum, u->ActorActionSet->Dead);
|
||||||
|
DeleteNoSoundOwner(SpriteNum);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Hornets can swarm around other hornets or whatever is tagged as swarm target
|
||||||
|
int DoCheckSwarm(short SpriteNum)
|
||||||
|
{
|
||||||
|
short i,nexti;
|
||||||
|
SPRITEp sp = &sprite[SpriteNum], tsp;
|
||||||
|
USERp u = User[SpriteNum], tu;
|
||||||
|
long dist, pdist, a,b,c;
|
||||||
|
PLAYERp pp;
|
||||||
|
|
||||||
|
if (!MoveSkip8) return 0; // Don't over check
|
||||||
|
|
||||||
|
if (!u->tgt_sp) return 0;
|
||||||
|
|
||||||
|
// Who's the closest meat!?
|
||||||
|
DoActorPickClosePlayer(SpriteNum);
|
||||||
|
|
||||||
|
if (User[u->tgt_sp - sprite]->PlayerP)
|
||||||
|
{
|
||||||
|
pp = User[u->tgt_sp - sprite]->PlayerP;
|
||||||
|
DISTANCE(sp->x, sp->y, pp->posx, pp->posy, pdist, a, b, c);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
// all enemys
|
||||||
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_ENEMY], i, nexti)
|
||||||
|
{
|
||||||
|
tsp = &sprite[i];
|
||||||
|
tu = User[i];
|
||||||
|
|
||||||
|
if (!tu) continue;
|
||||||
|
|
||||||
|
if (tsp->hitag != TAG_SWARMSPOT || tsp->lotag != 2) continue;
|
||||||
|
|
||||||
|
DISTANCE(sp->x, sp->y, tsp->x, tsp->y, dist, a, b, c);
|
||||||
|
|
||||||
|
if (dist < pdist && u->ID == tu->ID) // Only flock to your own kind
|
||||||
|
{
|
||||||
|
u->tgt_sp = tsp; // Set target to swarm center
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
int DoHornetMove(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
|
// Check for swarming
|
||||||
|
// lotag of 1 = Swarm around lotags of 2
|
||||||
|
// lotag of 0 is normal
|
||||||
|
if (sp->hitag == TAG_SWARMSPOT && sp->lotag == 1)
|
||||||
|
DoCheckSwarm(SpriteNum);
|
||||||
|
|
||||||
|
if (TEST(u->Flags,SPR_SLIDING))
|
||||||
|
DoActorSlide(SpriteNum);
|
||||||
|
|
||||||
|
if (u->track >= 0)
|
||||||
|
ActorFollowTrack(SpriteNum, ACTORMOVETICS);
|
||||||
|
else
|
||||||
|
(*u->ActorActionFunc)(SpriteNum);
|
||||||
|
|
||||||
|
DoHornetMatchPlayerZ(SpriteNum);
|
||||||
|
|
||||||
|
DoActorSectorDamage(SpriteNum);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#include "saveable.h"
|
||||||
|
|
||||||
|
static saveable_code saveable_hornet_code[] =
|
||||||
|
{
|
||||||
|
SAVE_CODE(SetupHornet),
|
||||||
|
SAVE_CODE(NullHornet),
|
||||||
|
SAVE_CODE(DoHornetMatchPlayerZ),
|
||||||
|
SAVE_CODE(InitHornetCircle),
|
||||||
|
SAVE_CODE(DoHornetCircle),
|
||||||
|
SAVE_CODE(DoHornetDeath),
|
||||||
|
SAVE_CODE(DoCheckSwarm),
|
||||||
|
SAVE_CODE(DoHornetMove),
|
||||||
|
};
|
||||||
|
|
||||||
|
static saveable_data saveable_hornet_data[] =
|
||||||
|
{
|
||||||
|
SAVE_DATA(HornetBattle),
|
||||||
|
SAVE_DATA(HornetOffense),
|
||||||
|
SAVE_DATA(HornetBroadcast),
|
||||||
|
SAVE_DATA(HornetSurprised),
|
||||||
|
SAVE_DATA(HornetEvasive),
|
||||||
|
SAVE_DATA(HornetLostTarget),
|
||||||
|
SAVE_DATA(HornetCloseRange),
|
||||||
|
SAVE_DATA(HornetTouchTarget),
|
||||||
|
|
||||||
|
SAVE_DATA(HornetPersonality),
|
||||||
|
|
||||||
|
SAVE_DATA(HornetAttrib),
|
||||||
|
|
||||||
|
SAVE_DATA(s_HornetRun),
|
||||||
|
SAVE_DATA(sg_HornetRun),
|
||||||
|
SAVE_DATA(s_HornetStand),
|
||||||
|
SAVE_DATA(sg_HornetStand),
|
||||||
|
SAVE_DATA(s_HornetDie),
|
||||||
|
SAVE_DATA(sg_HornetDie),
|
||||||
|
SAVE_DATA(s_HornetDead),
|
||||||
|
SAVE_DATA(sg_HornetDead),
|
||||||
|
|
||||||
|
SAVE_DATA(HornetActionSet),
|
||||||
|
};
|
||||||
|
|
||||||
|
saveable_module saveable_hornet =
|
||||||
|
{
|
||||||
|
// code
|
||||||
|
saveable_hornet_code,
|
||||||
|
SIZ(saveable_hornet_code),
|
||||||
|
|
||||||
|
// data
|
||||||
|
saveable_hornet_data,
|
||||||
|
SIZ(saveable_hornet_data)
|
||||||
|
};
|
109
polymer/eduke32/source/sw/src/interp.c
Normal file
109
polymer/eduke32/source/sw/src/interp.c
Normal file
|
@ -0,0 +1,109 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include "compat.h"
|
||||||
|
#include "pragmas.h"
|
||||||
|
|
||||||
|
#include "interp.h"
|
||||||
|
|
||||||
|
#define MAXINTERPOLATIONS 1024
|
||||||
|
int numinterpolations = 0, startofdynamicinterpolations = 0;
|
||||||
|
int oldipos[MAXINTERPOLATIONS];
|
||||||
|
int bakipos[MAXINTERPOLATIONS];
|
||||||
|
int *curipos[MAXINTERPOLATIONS];
|
||||||
|
|
||||||
|
void setinterpolation(int *posptr)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if (numinterpolations >= MAXINTERPOLATIONS)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (i = numinterpolations - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
if (curipos[i] == posptr)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
curipos[numinterpolations] = posptr;
|
||||||
|
oldipos[numinterpolations] = *posptr;
|
||||||
|
numinterpolations++;
|
||||||
|
}
|
||||||
|
|
||||||
|
void stopinterpolation(int *posptr)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = numinterpolations - 1; i >= startofdynamicinterpolations; i--)
|
||||||
|
{
|
||||||
|
if (curipos[i] == posptr)
|
||||||
|
{
|
||||||
|
numinterpolations--;
|
||||||
|
oldipos[i] = oldipos[numinterpolations];
|
||||||
|
bakipos[i] = bakipos[numinterpolations];
|
||||||
|
curipos[i] = curipos[numinterpolations];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void updateinterpolations(void) // Stick at beginning of domovethings
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = numinterpolations - 1; i >= 0; i--)
|
||||||
|
oldipos[i] = *curipos[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
// must call restore for every do interpolations
|
||||||
|
// make sure you don't exit
|
||||||
|
void dointerpolations(int smoothratio) // Stick at beginning of drawscreen
|
||||||
|
{
|
||||||
|
int i, j, odelta, ndelta;
|
||||||
|
|
||||||
|
ndelta = 0;
|
||||||
|
j = 0;
|
||||||
|
|
||||||
|
for (i = numinterpolations - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
bakipos[i] = *curipos[i];
|
||||||
|
|
||||||
|
odelta = ndelta;
|
||||||
|
ndelta = (*curipos[i]) - oldipos[i];
|
||||||
|
|
||||||
|
if (odelta != ndelta)
|
||||||
|
j = mulscale16(ndelta, smoothratio);
|
||||||
|
|
||||||
|
*curipos[i] = oldipos[i] + j;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void restoreinterpolations(void) // Stick at end of drawscreen
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = numinterpolations - 1; i >= 0; i--)
|
||||||
|
*curipos[i] = bakipos[i];
|
||||||
|
}
|
43
polymer/eduke32/source/sw/src/interp.h
Normal file
43
polymer/eduke32/source/sw/src/interp.h
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#define SHORT_MAXINTERPOLATIONS 256
|
||||||
|
extern short short_numinterpolations, short_startofdynamicinterpolations;
|
||||||
|
extern short short_oldipos[SHORT_MAXINTERPOLATIONS];
|
||||||
|
extern short short_bakipos[SHORT_MAXINTERPOLATIONS];
|
||||||
|
extern short *short_curipos[SHORT_MAXINTERPOLATIONS];
|
||||||
|
|
||||||
|
#define MAXINTERPOLATIONS 1024
|
||||||
|
extern int numinterpolations, startofdynamicinterpolations;
|
||||||
|
extern int oldipos[MAXINTERPOLATIONS];
|
||||||
|
extern int bakipos[MAXINTERPOLATIONS];
|
||||||
|
extern int *curipos[MAXINTERPOLATIONS];
|
||||||
|
|
||||||
|
void setinterpolation(int *posptr);
|
||||||
|
void stopinterpolation(int *posptr);
|
||||||
|
void updateinterpolations(void);
|
||||||
|
void dointerpolations(int smoothratio);
|
||||||
|
void restoreinterpolations(void);
|
109
polymer/eduke32/source/sw/src/interpsh.c
Normal file
109
polymer/eduke32/source/sw/src/interpsh.c
Normal file
|
@ -0,0 +1,109 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include "compat.h"
|
||||||
|
#include "pragmas.h"
|
||||||
|
|
||||||
|
#include "interp.h"
|
||||||
|
|
||||||
|
#define SHORT_MAXINTERPOLATIONS 256
|
||||||
|
short short_numinterpolations = 0, short_startofdynamicinterpolations = 0;
|
||||||
|
short short_oldipos[SHORT_MAXINTERPOLATIONS];
|
||||||
|
short short_bakipos[SHORT_MAXINTERPOLATIONS];
|
||||||
|
short *short_curipos[SHORT_MAXINTERPOLATIONS];
|
||||||
|
|
||||||
|
void short_setinterpolation(short *posptr)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if (short_numinterpolations >= SHORT_MAXINTERPOLATIONS)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (i = short_numinterpolations - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
if (short_curipos[i] == posptr)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
short_curipos[short_numinterpolations] = posptr;
|
||||||
|
short_oldipos[short_numinterpolations] = *posptr;
|
||||||
|
short_numinterpolations++;
|
||||||
|
}
|
||||||
|
|
||||||
|
void short_stopinterpolation(short *posptr)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = short_numinterpolations - 1; i >= short_startofdynamicinterpolations; i--)
|
||||||
|
{
|
||||||
|
if (short_curipos[i] == posptr)
|
||||||
|
{
|
||||||
|
short_numinterpolations--;
|
||||||
|
short_oldipos[i] = short_oldipos[short_numinterpolations];
|
||||||
|
short_bakipos[i] = short_bakipos[short_numinterpolations];
|
||||||
|
short_curipos[i] = short_curipos[short_numinterpolations];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void short_updateinterpolations(void) // Stick at beginning of domovethings
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = short_numinterpolations - 1; i >= 0; i--)
|
||||||
|
short_oldipos[i] = *short_curipos[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
// must call restore for every do interpolations
|
||||||
|
// make sure you don't exit
|
||||||
|
void short_dointerpolations(int smoothratio) // Stick at beginning of drawscreen
|
||||||
|
{
|
||||||
|
int i, j, odelta, ndelta;
|
||||||
|
|
||||||
|
ndelta = 0;
|
||||||
|
j = 0;
|
||||||
|
|
||||||
|
for (i = short_numinterpolations - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
short_bakipos[i] = *short_curipos[i];
|
||||||
|
|
||||||
|
odelta = ndelta;
|
||||||
|
ndelta = (*short_curipos[i]) - short_oldipos[i];
|
||||||
|
|
||||||
|
if (odelta != ndelta)
|
||||||
|
j = mulscale16(ndelta, smoothratio);
|
||||||
|
|
||||||
|
*short_curipos[i] = short_oldipos[i] + j;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void short_restoreinterpolations(void) // Stick at end of drawscreen
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = short_numinterpolations - 1; i >= 0; i--)
|
||||||
|
*short_curipos[i] = short_bakipos[i];
|
||||||
|
}
|
1153
polymer/eduke32/source/sw/src/inv.c
Normal file
1153
polymer/eduke32/source/sw/src/inv.c
Normal file
File diff suppressed because it is too large
Load diff
61
polymer/eduke32/source/sw/src/inv.h
Normal file
61
polymer/eduke32/source/sw/src/inv.h
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
enum InventoryNames
|
||||||
|
{
|
||||||
|
INVENTORY_MEDKIT,
|
||||||
|
INVENTORY_REPAIR_KIT,
|
||||||
|
INVENTORY_CLOAK, // de-cloak when firing
|
||||||
|
INVENTORY_NIGHT_VISION,
|
||||||
|
INVENTORY_CHEMBOMB,
|
||||||
|
INVENTORY_FLASHBOMB,
|
||||||
|
INVENTORY_CALTROPS,
|
||||||
|
MAX_INVENTORY
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
char *Name;
|
||||||
|
VOID (*Init)(PLAYERp);
|
||||||
|
VOID (*Stop)(PLAYERp, short);
|
||||||
|
PANEL_STATEp State;
|
||||||
|
short DecPerSec;
|
||||||
|
short MaxInv;
|
||||||
|
long Scale;
|
||||||
|
short Flags;
|
||||||
|
} INVENTORY_DATA, *INVENTORY_DATAp;
|
||||||
|
|
||||||
|
extern INVENTORY_DATA InventoryData[MAX_INVENTORY+1];
|
||||||
|
|
||||||
|
#define INVF_AUTO_USE (BIT(0))
|
||||||
|
#define INVF_TIMED (BIT(1))
|
||||||
|
#define INVF_COUNT (BIT(2))
|
||||||
|
|
||||||
|
void PlayerUpdateInventory(PLAYERp pp,short InventoryNum);
|
||||||
|
void UpdateMiniBar(PLAYERp pp);
|
||||||
|
void InventoryKeys(PLAYERp pp);
|
||||||
|
void UseInventoryRepairKit(PLAYERp pp);
|
||||||
|
void InventoryTimer(PLAYERp pp);
|
221
polymer/eduke32/source/sw/src/jbhlp.c
Normal file
221
polymer/eduke32/source/sw/src/jbhlp.c
Normal file
|
@ -0,0 +1,221 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1996, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is NOT part of Shadow Warrior version 1.2
|
||||||
|
However, it is either an older version of a file that is, or is
|
||||||
|
some test code written during the development of Shadow Warrior.
|
||||||
|
This file is provided purely for educational interest.
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include "build.h"
|
||||||
|
#include "editor.h"
|
||||||
|
#include "cache1d.h"
|
||||||
|
|
||||||
|
#include "keys.h"
|
||||||
|
#include "names2.h"
|
||||||
|
#include "game.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define M_RED 12
|
||||||
|
#define M_BLUE 9
|
||||||
|
|
||||||
|
|
||||||
|
// Globals
|
||||||
|
|
||||||
|
static char tempbuf[256];
|
||||||
|
|
||||||
|
|
||||||
|
// Prototypes
|
||||||
|
|
||||||
|
void Message(char *string, char color);
|
||||||
|
long GetAToken(char *name, char *tc, long length);
|
||||||
|
BYTEp BKeyPressed(VOID);
|
||||||
|
VOID ResetKeys(VOID);
|
||||||
|
|
||||||
|
|
||||||
|
// Functions
|
||||||
|
|
||||||
|
void Msg(char *string, char color)
|
||||||
|
{
|
||||||
|
clearmidstatbar16();
|
||||||
|
|
||||||
|
printext16(1*4,ydim16+4*8,color,-1,string,1);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// @ symbol precedes a tag name target
|
||||||
|
// # symbol precedes a comment in the help file
|
||||||
|
long GetAToken(char *name, char *tc, long length)
|
||||||
|
{
|
||||||
|
int i,x=0;
|
||||||
|
char t,*tmp,tokenfound=0;
|
||||||
|
char token[10];
|
||||||
|
long count=0;
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
|
||||||
|
// Find the token symbol
|
||||||
|
do
|
||||||
|
{
|
||||||
|
t = *tc;
|
||||||
|
tc++;
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
while (t!='@' && count < length);
|
||||||
|
|
||||||
|
|
||||||
|
if (t=='@')
|
||||||
|
{
|
||||||
|
tmp = token;
|
||||||
|
x=1;
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
// Read in the token
|
||||||
|
*tmp = t;
|
||||||
|
tmp++;
|
||||||
|
t = *tc;
|
||||||
|
tc++;
|
||||||
|
x++;
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
while (t>=48 && t!='@' && x < 9 && count < length);
|
||||||
|
|
||||||
|
*tmp = 0;
|
||||||
|
|
||||||
|
if (!strcmp(name,Bstrupr(token)))
|
||||||
|
tokenfound = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while (!tokenfound && count < length);
|
||||||
|
|
||||||
|
|
||||||
|
if (!tokenfound) count=0;
|
||||||
|
return count;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ContextHelp(short spritenum)
|
||||||
|
{
|
||||||
|
int i,fp,x=0,y=4;
|
||||||
|
char t,*tc;
|
||||||
|
char name[20];
|
||||||
|
char *filebuffer;
|
||||||
|
SPRITEp sp;
|
||||||
|
short hitag=0;
|
||||||
|
long size=0,tokresult=0;
|
||||||
|
|
||||||
|
|
||||||
|
sp = &sprite[spritenum];
|
||||||
|
|
||||||
|
clearmidstatbar16();
|
||||||
|
|
||||||
|
if ((fp=kopen4load("swbhelp.hlp",0)) == -1)
|
||||||
|
{
|
||||||
|
Msg("ERROR: Help file not found.",M_RED);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Read in whole file
|
||||||
|
size = kfilelength(fp);
|
||||||
|
filebuffer = (char *)malloc(size);
|
||||||
|
if (filebuffer == NULL)
|
||||||
|
{
|
||||||
|
Msg("Not enough memory to load swhelp.hlp",M_RED);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (kread(fp, filebuffer, size) != size)
|
||||||
|
{
|
||||||
|
Msg("Unexpected end of file while reading swhelp.hlp",M_RED);
|
||||||
|
kclose(fp);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// close the file
|
||||||
|
kclose(fp);
|
||||||
|
|
||||||
|
// Conver filebuffer to all upper case
|
||||||
|
//strupr(filebuffer);
|
||||||
|
|
||||||
|
// Assign a token name to search for based on the sprite being pointed to.
|
||||||
|
|
||||||
|
// Make the token
|
||||||
|
// Make sure 500-600 SOBJ bounding tags all say the same thing.
|
||||||
|
hitag = sp->hitag;
|
||||||
|
if (hitag > 500 && hitag <= 600) hitag = 500;
|
||||||
|
// Give help summary for unknown sprites.
|
||||||
|
if ((hitag == 0 || hitag > 1006) && sp->lotag == 0) hitag = 999;
|
||||||
|
|
||||||
|
sprintf(name,"@TAG%d",hitag);
|
||||||
|
|
||||||
|
tc = filebuffer;
|
||||||
|
|
||||||
|
if (!(tokresult = GetAToken(name,tc,size)))
|
||||||
|
{
|
||||||
|
// This message should never happen unless something is real wrong!
|
||||||
|
Msg("No help available.",M_RED);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
tc += tokresult;
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
tc++;
|
||||||
|
t = *tc;
|
||||||
|
while (t!='\n' && t!='@' && t!='#' && x<128)
|
||||||
|
{
|
||||||
|
tempbuf[x]=t;
|
||||||
|
tc++;
|
||||||
|
t = *tc;
|
||||||
|
x++;
|
||||||
|
if (x >= 128) break;
|
||||||
|
}
|
||||||
|
tempbuf[x]=0;
|
||||||
|
x=0;
|
||||||
|
printext16(x*4,ydim16+(y*6)+2,11,-1,tempbuf,1);
|
||||||
|
y++;
|
||||||
|
|
||||||
|
if (y>16)
|
||||||
|
{
|
||||||
|
y=18;
|
||||||
|
printext16(x*4,ydim16+(y*6)+2,11,-1,"Hit any key to continue or Q to quit....",1);
|
||||||
|
while (BKeyPressed() == NULL) ;
|
||||||
|
if (keystatus[KEYSC_Q])
|
||||||
|
{
|
||||||
|
clearmidstatbar16();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ResetKeys();
|
||||||
|
clearmidstatbar16();
|
||||||
|
|
||||||
|
y=6;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
while (t!='@' && t!='#');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
37
polymer/eduke32/source/sw/src/jnames.h
Normal file
37
polymer/eduke32/source/sw/src/jnames.h
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// My pic names file
|
||||||
|
|
||||||
|
#ifndef JNAMES_H
|
||||||
|
#define JNAMES_H
|
||||||
|
|
||||||
|
#define MIRROR 340
|
||||||
|
#define FLOORMIRROR 341
|
||||||
|
#define CAMSPRITE 3830
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
3715
polymer/eduke32/source/sw/src/jnstub.c
Normal file
3715
polymer/eduke32/source/sw/src/jnstub.c
Normal file
File diff suppressed because it is too large
Load diff
899
polymer/eduke32/source/sw/src/jplayer.c
Normal file
899
polymer/eduke32/source/sw/src/jplayer.c
Normal file
|
@ -0,0 +1,899 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// JPLAYER.C
|
||||||
|
// Copyright (c) 1996 by Jim Norwood
|
||||||
|
|
||||||
|
#include "build.h"
|
||||||
|
|
||||||
|
#include "mytypes.h"
|
||||||
|
#include "keys.h"
|
||||||
|
#include "names2.h"
|
||||||
|
#include "panel.h"
|
||||||
|
#include "game.h"
|
||||||
|
#include "tags.h"
|
||||||
|
#include "player.h"
|
||||||
|
#include "lists.h"
|
||||||
|
#include "warp.h"
|
||||||
|
#include "quake.h"
|
||||||
|
|
||||||
|
#include "common_game.h"
|
||||||
|
#include "function.h"
|
||||||
|
#include "control.h"
|
||||||
|
#include "trigger.h"
|
||||||
|
|
||||||
|
#include "savedef.h"
|
||||||
|
#include "menus.h"
|
||||||
|
#include "net.h"
|
||||||
|
#include "pal.h"
|
||||||
|
|
||||||
|
#include "bots.h"
|
||||||
|
|
||||||
|
BOOL WeaponOK(PLAYERp pp);
|
||||||
|
|
||||||
|
#define MAXANGVEL 80
|
||||||
|
|
||||||
|
// From build.h
|
||||||
|
#define CLIPMASK0 (((1L)<<16)+1L)
|
||||||
|
#define CLIPMASK1 (((256L)<<16)+64L)
|
||||||
|
|
||||||
|
|
||||||
|
// PLAYER QUOTES TO OTHER PLAYERS ////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#define STARTALPHANUM 4608 // New SW font for typing in stuff, It's in ASCII order.
|
||||||
|
#define ENDALPHANUM 4701
|
||||||
|
#define MINIFONT 2930 // Start of small font, it's blue for good palette swapping
|
||||||
|
|
||||||
|
#define NUMPAGES 1
|
||||||
|
#define NUMOFFIRSTTIMEACTIVE 100 // You can save up to 100 strings in the message history queue
|
||||||
|
|
||||||
|
char pus, pub; // Global text vars
|
||||||
|
char fta_quotes[NUMOFFIRSTTIMEACTIVE][64];
|
||||||
|
|
||||||
|
|
||||||
|
int gametext(int x,int y,char *t,char s,short dabits)
|
||||||
|
{
|
||||||
|
short ac,newx;
|
||||||
|
char centre, *oldt;
|
||||||
|
|
||||||
|
centre = (x == (320>>1));
|
||||||
|
newx = 0;
|
||||||
|
oldt = t;
|
||||||
|
|
||||||
|
if (centre)
|
||||||
|
{
|
||||||
|
while (*t)
|
||||||
|
{
|
||||||
|
if (*t == 32) {newx+=5; t++; continue; }
|
||||||
|
else ac = *t - '!' + STARTALPHANUM;
|
||||||
|
|
||||||
|
if (ac < STARTALPHANUM || ac > ENDALPHANUM) break;
|
||||||
|
|
||||||
|
if (*t >= '0' && *t <= '9')
|
||||||
|
newx += 8;
|
||||||
|
else newx += tilesizx[ac];
|
||||||
|
t++;
|
||||||
|
}
|
||||||
|
|
||||||
|
t = oldt;
|
||||||
|
x = (320>>1)-(newx>>1);
|
||||||
|
}
|
||||||
|
|
||||||
|
while (*t)
|
||||||
|
{
|
||||||
|
if (*t == 32) {x+=5; t++; continue; }
|
||||||
|
else ac = *t - '!' + STARTALPHANUM;
|
||||||
|
|
||||||
|
if (ac < STARTALPHANUM || ac > ENDALPHANUM)
|
||||||
|
break;
|
||||||
|
|
||||||
|
rotatesprite(x<<16,y<<16,65536L,0,ac,s,16,dabits,0,0,xdim-1,ydim-1);
|
||||||
|
|
||||||
|
if (*t >= '0' && *t <= '9')
|
||||||
|
x += 8;
|
||||||
|
else x += tilesizx[ac];
|
||||||
|
|
||||||
|
t++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
|
||||||
|
int minigametext(int x,int y,char *t,char s,short dabits)
|
||||||
|
{
|
||||||
|
short ac,newx;
|
||||||
|
char centre, *oldt;
|
||||||
|
|
||||||
|
centre = (x == (320>>1));
|
||||||
|
newx = 0;
|
||||||
|
oldt = t;
|
||||||
|
|
||||||
|
if (centre)
|
||||||
|
{
|
||||||
|
while (*t)
|
||||||
|
{
|
||||||
|
if (*t == 32) {newx+=4; t++; continue; }
|
||||||
|
else ac = *t - '!' + 2930;
|
||||||
|
|
||||||
|
if ((ac < 2930 || ac > 3023) && *t != asc_Space) break;
|
||||||
|
|
||||||
|
if (*t > asc_Space && *t < 127)
|
||||||
|
{
|
||||||
|
newx += tilesizx[ac];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
x += 4;
|
||||||
|
|
||||||
|
t++;
|
||||||
|
}
|
||||||
|
|
||||||
|
t = oldt;
|
||||||
|
x = (320>>1)-(newx>>1);
|
||||||
|
}
|
||||||
|
|
||||||
|
while (*t)
|
||||||
|
{
|
||||||
|
if (*t == 32) {x+=4; t++; continue; }
|
||||||
|
else ac = *t - '!' + 2930;
|
||||||
|
|
||||||
|
if ((ac < 2930 || ac > 3023) && *t != asc_Space) break;
|
||||||
|
|
||||||
|
if (*t > asc_Space && *t < 127)
|
||||||
|
{
|
||||||
|
rotatesprite(x<<16,y<<16,65536L,0,ac,-128,17,dabits,0,0,xdim-1,ydim-1);
|
||||||
|
x += tilesizx[ac];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
x += 4;
|
||||||
|
|
||||||
|
t++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
|
||||||
|
int minitext(int x,int y,char *t,char p,char sb)
|
||||||
|
{
|
||||||
|
short ac;
|
||||||
|
|
||||||
|
while (*t)
|
||||||
|
{
|
||||||
|
*t = toupper(*t);
|
||||||
|
if (*t == 32) {x+=5; t++; continue; }
|
||||||
|
else ac = *t - '!' + MINIFONT;
|
||||||
|
|
||||||
|
rotatesprite(x<<16,y<<16,65536L,0,ac,0,p,sb,0,0,xdim-1,ydim-1);
|
||||||
|
x += 4; // tilesizx[ac]+1;
|
||||||
|
|
||||||
|
t++;
|
||||||
|
}
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
|
||||||
|
int minitextshade(int x,int y,char *t,char s,char p,char sb)
|
||||||
|
{
|
||||||
|
short ac;
|
||||||
|
|
||||||
|
while (*t)
|
||||||
|
{
|
||||||
|
*t = toupper(*t);
|
||||||
|
if (*t == 32) {x+=5; t++; continue; }
|
||||||
|
else ac = *t - '!' + MINIFONT;
|
||||||
|
|
||||||
|
rotatesprite(x<<16,y<<16,65536L,0,ac,s,p,sb,0,0,xdim-1,ydim-1);
|
||||||
|
x += 4; // tilesizx[ac]+1;
|
||||||
|
|
||||||
|
t++;
|
||||||
|
}
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
|
||||||
|
int quotebot, quotebotgoal;
|
||||||
|
short user_quote_time[MAXUSERQUOTES];
|
||||||
|
char user_quote[MAXUSERQUOTES][256];
|
||||||
|
|
||||||
|
void adduserquote(char *daquote)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
SetRedrawScreen(Player+myconnectindex);
|
||||||
|
|
||||||
|
for (i=MAXUSERQUOTES-1; i>0; i--)
|
||||||
|
{
|
||||||
|
strcpy(user_quote[i],user_quote[i-1]);
|
||||||
|
user_quote_time[i] = user_quote_time[i-1];
|
||||||
|
}
|
||||||
|
strcpy(user_quote[0],daquote);
|
||||||
|
user_quote_time[0] = 180;
|
||||||
|
}
|
||||||
|
|
||||||
|
void operatefta(void)
|
||||||
|
{
|
||||||
|
int i, j, k;
|
||||||
|
|
||||||
|
j=MESSAGE_LINE; // Base line position on screen
|
||||||
|
quotebot = min(quotebot,j);
|
||||||
|
quotebotgoal = min(quotebotgoal,j);
|
||||||
|
if (MessageInputMode)
|
||||||
|
j -= 6; // Bump all lines up one to make room for new line
|
||||||
|
quotebotgoal = j;
|
||||||
|
j = quotebot;
|
||||||
|
|
||||||
|
for (i=0; i<MAXUSERQUOTES; i++)
|
||||||
|
{
|
||||||
|
k = user_quote_time[i];
|
||||||
|
if (k <= 0)
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (gs.BorderNum <= BORDER_BAR+1)
|
||||||
|
{
|
||||||
|
// dont fade out
|
||||||
|
if (k > 4)
|
||||||
|
minigametext(320>>1,j,user_quote[i],0,2+8);
|
||||||
|
else if (k > 2)
|
||||||
|
minigametext(320>>1,j,user_quote[i],0,2+8+1);
|
||||||
|
else
|
||||||
|
minigametext(320>>1,j,user_quote[i],0,2+8+1+32);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// dont fade out
|
||||||
|
minigametext(320>>1,j,user_quote[i],0,2+8);
|
||||||
|
}
|
||||||
|
|
||||||
|
j -= 6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////// Console Message Queue ////////////////////////////////////
|
||||||
|
int conbot, conbotgoal;
|
||||||
|
char con_quote[MAXCONQUOTES][256];
|
||||||
|
|
||||||
|
void addconquote(char *daquote)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i=MAXCONQUOTES-1; i>0; i--)
|
||||||
|
{
|
||||||
|
strcpy(con_quote[i],con_quote[i-1]);
|
||||||
|
}
|
||||||
|
strcpy(con_quote[0],daquote);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define CON_ROT_FLAGS (ROTATE_SPRITE_CORNER|ROTATE_SPRITE_SCREEN_CLIP|ROTATE_SPRITE_NON_MASK)
|
||||||
|
void operateconfta(void)
|
||||||
|
{
|
||||||
|
int i, j, k;
|
||||||
|
|
||||||
|
if (!ConPanel) return; // If panel isn't up, don't draw anything
|
||||||
|
|
||||||
|
// Draw the background console pic
|
||||||
|
rotatesprite((0)<<16,(0)<<16,65536L,0,5119,0,0,CON_ROT_FLAGS,0,0,xdim-1,ydim-1);
|
||||||
|
|
||||||
|
j=99; // Base line position on screen
|
||||||
|
conbot = min(conbot,j);
|
||||||
|
conbotgoal = min(conbotgoal,j);
|
||||||
|
if (ConInputMode) j -= 6; // Bump all lines up one to make room for new line
|
||||||
|
conbotgoal = j; j = conbot;
|
||||||
|
|
||||||
|
for (i=0; i<MAXCONQUOTES; i++)
|
||||||
|
{
|
||||||
|
MNU_DrawSmallString(27, j, con_quote[i], 0, 17); // 17 = white
|
||||||
|
j -= 6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// BOT STUFF ////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void BOT_UseInventory(PLAYERp p, short targetitem, SW_PACKET *syn)
|
||||||
|
{
|
||||||
|
// Try to get to item
|
||||||
|
if (p->InventoryNum == targetitem)
|
||||||
|
syn->bits |= (1<<SK_INV_USE);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
syn->bits |= (1<<SK_INV_LEFT); // Scroll to it
|
||||||
|
syn->bits |= (1<<SK_INV_USE); // Use whatever you're on too
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void BOT_ChooseWeapon(PLAYERp p, USERp u, SW_PACKET *syn)
|
||||||
|
{
|
||||||
|
short weap;
|
||||||
|
|
||||||
|
// If you have a nuke, fire it
|
||||||
|
if (u->WeaponNum == WPN_MICRO && p->WpnRocketNuke && p->WpnRocketType != 2)
|
||||||
|
{
|
||||||
|
syn->bits ^= 15;
|
||||||
|
syn->bits |= 4;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
for (weap=9; weap>=0; weap--)
|
||||||
|
{
|
||||||
|
if (weap <= u->WeaponNum) break;
|
||||||
|
if (TEST(p->WpnFlags, BIT(weap)) && p->WpnAmmo[weap] > DamageData[weap].min_ammo)
|
||||||
|
{
|
||||||
|
syn->bits ^= 15;
|
||||||
|
syn->bits |= weap;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int getspritescore(int snum, int dapicnum)
|
||||||
|
{
|
||||||
|
|
||||||
|
switch (dapicnum)
|
||||||
|
{
|
||||||
|
case ICON_STAR: return 5;
|
||||||
|
case ICON_UZI: return 20;
|
||||||
|
case ICON_UZIFLOOR: return 20;
|
||||||
|
case ICON_LG_UZI_AMMO: return 15;
|
||||||
|
case ICON_HEART: return 160;
|
||||||
|
case ICON_HEART_LG_AMMO: return 60;
|
||||||
|
case ICON_GUARD_HEAD: return 170;
|
||||||
|
case ICON_FIREBALL_LG_AMMO: return 70;
|
||||||
|
case ICON_ROCKET: return 100;
|
||||||
|
case ICON_SHOTGUN: return 130;
|
||||||
|
case ICON_LG_ROCKET: return 100;
|
||||||
|
case ICON_LG_SHOTSHELL: return 30;
|
||||||
|
case ICON_MICRO_GUN: return 200;
|
||||||
|
case ICON_MICRO_BATTERY: return 100;
|
||||||
|
case ICON_GRENADE_LAUNCHER: return 150;
|
||||||
|
case ICON_LG_GRENADE: return 50;
|
||||||
|
case ICON_LG_MINE: return 150;
|
||||||
|
case ICON_RAIL_GUN: return 180;
|
||||||
|
case ICON_RAIL_AMMO: return 80;
|
||||||
|
|
||||||
|
case ST_QUICK_EXIT:
|
||||||
|
case ST_QUICK_SCAN:
|
||||||
|
case ICON_MEDKIT:
|
||||||
|
case ICON_CHEMBOMB:
|
||||||
|
case ICON_FLASHBOMB:
|
||||||
|
case ICON_NUKE:
|
||||||
|
case ICON_CALTROPS:
|
||||||
|
case TRACK_SPRITE:
|
||||||
|
case ST1:
|
||||||
|
case ST2:
|
||||||
|
case ST_QUICK_JUMP:
|
||||||
|
case ST_QUICK_JUMP_DOWN:
|
||||||
|
case ST_QUICK_SUPER_JUMP: return 120; break;
|
||||||
|
|
||||||
|
// Commented out for now, example.
|
||||||
|
// case FREEZEAMMO: if (ps[snum].ammo_amount[FREEZE_WEAPON] < max_ammo_amount[FREEZE_WEAPON]) return(10); else return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int fdmatrix[13][13] =
|
||||||
|
{
|
||||||
|
//SWRD SHUR UZI SHOT RPG 40MM MINE RAIL HEAD HEAD2HEAD3HEART
|
||||||
|
{ 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, //SWRD
|
||||||
|
{1024, 512, 128, 128,2560, 128,2560, 128,2560,2560,2560, 128, 128}, //SHUR
|
||||||
|
{2560,1024, 512, 512,2560, 128,2560,2560,1024,2560,2560,2560,2560}, //UZI
|
||||||
|
{ 512, 512, 512, 512,2560, 128,2560, 512, 512, 512, 512, 512, 512}, //SHOT
|
||||||
|
{2560,2560,2560,2560,2560,2560,2560,2560,2560,2560,2560,2560,2560}, //RPG
|
||||||
|
{ 512, 512, 512, 512,2048, 512,2560,2560, 512,2560,2560,2560,2560}, //40MM
|
||||||
|
{ 128, 128, 128, 128, 512, 128, 128, 128, 128, 128, 128, 128, 128}, //MINE
|
||||||
|
{1536,1536,1536,1536,2560,1536,1536,1536,1536,1536,1536,1536,1536}, //RAIL
|
||||||
|
{2560,1024, 512,1024,1024,1024,2560, 512,1024,2560,2560, 512, 512}, //HEAD1
|
||||||
|
{ 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, //HEAD2
|
||||||
|
{ 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512}, //HEAD3
|
||||||
|
{1024, 512, 128, 128,2560, 512,2560,1024, 128,2560,1024,1024,1024}, //HEART
|
||||||
|
};
|
||||||
|
|
||||||
|
static int goalx[MAX_SW_PLAYERS_REG], goaly[MAX_SW_PLAYERS_REG], goalz[MAX_SW_PLAYERS_REG];
|
||||||
|
static int goalsect[MAX_SW_PLAYERS_REG], goalwall[MAX_SW_PLAYERS_REG], goalsprite[MAX_SW_PLAYERS_REG];
|
||||||
|
static int goalplayer[MAX_SW_PLAYERS_REG], clipmovecount[MAX_SW_PLAYERS_REG];
|
||||||
|
short searchsect[MAXSECTORS], searchparent[MAXSECTORS];
|
||||||
|
char dashow2dsector[(MAXSECTORS+7)>>3];
|
||||||
|
|
||||||
|
void computergetinput(int snum, SW_PACKET *syn)
|
||||||
|
{
|
||||||
|
int i, j, k, l, x1, y1, z1, x2, y2, z2, x3, y3, z3, dx, dy, nextj;
|
||||||
|
int dist, daang, zang, fightdist, damyang, damysect;
|
||||||
|
int startsect, endsect, splc, send, startwall, endwall;
|
||||||
|
short dasect, dawall, daspr;
|
||||||
|
PLAYERp p;
|
||||||
|
walltype *wal;
|
||||||
|
int myx, myy, myz, myang, mycursectnum;
|
||||||
|
USERp u;
|
||||||
|
short weap;
|
||||||
|
//extern BOOL Pachinko_Win_Cheat;
|
||||||
|
|
||||||
|
if (!MoveSkip4) return; // Make it so the bots don't slow the game down so bad!
|
||||||
|
|
||||||
|
p = &Player[snum];
|
||||||
|
u = User[p->PlayerSprite]; // Set user struct
|
||||||
|
|
||||||
|
// Copy current weapon number to player struct
|
||||||
|
p->WpnNum = u->WeaponNum;
|
||||||
|
if (p->WpnNum >= MAX_WEAPONS) p->WpnNum = MAX_WEAPONS-1;
|
||||||
|
|
||||||
|
// Init local position variables
|
||||||
|
myx = p->posx;
|
||||||
|
myy = p->posy;
|
||||||
|
myz = p->posz;
|
||||||
|
myang = p->pang;
|
||||||
|
mycursectnum = p->cursectnum;
|
||||||
|
|
||||||
|
// Reset input bits
|
||||||
|
syn->vel = 0;
|
||||||
|
syn->svel = 0;
|
||||||
|
syn->angvel = 0;
|
||||||
|
syn->aimvel = 0;
|
||||||
|
syn->bits = 0;
|
||||||
|
|
||||||
|
x1 = p->posx;
|
||||||
|
y1 = p->posy;
|
||||||
|
z1 = p->posz;
|
||||||
|
|
||||||
|
damyang = p->pang;
|
||||||
|
damysect = sprite[p->PlayerSprite].sectnum;
|
||||||
|
if ((numplayers >= 2) && (snum == myconnectindex))
|
||||||
|
{ x1 = myx; y1 = myy; z1 = myz+PLAYER_HEIGHT; damyang = myang; damysect = mycursectnum; }
|
||||||
|
|
||||||
|
// Always operate everything
|
||||||
|
syn->bits |= (1<<SK_OPERATE);
|
||||||
|
|
||||||
|
// If bot can't see the goal enemy, set target to himself so that he
|
||||||
|
// will pick a new target
|
||||||
|
if (TEST(Player[goalplayer[snum]].Flags, PF_DEAD) || STD_RANDOM_RANGE(1000) > 800)
|
||||||
|
goalplayer[snum] = snum;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
x2 = Player[goalplayer[snum]].posx;
|
||||||
|
y2 = Player[goalplayer[snum]].posy;
|
||||||
|
z2 = Player[goalplayer[snum]].posz;
|
||||||
|
if (!FAFcansee(x1,y1,z1-(48<<8),damysect,x2,y2,z2-(48<<8),sprite[Player[goalplayer[snum]].PlayerSprite].sectnum))
|
||||||
|
goalplayer[snum] = snum;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Pick a new target player if goal is dead or target is itself
|
||||||
|
if (goalplayer[snum] == snum)
|
||||||
|
{
|
||||||
|
j = 0x7fffffff;
|
||||||
|
for (i=connecthead; i>=0; i=connectpoint2[i])
|
||||||
|
if (i != snum)
|
||||||
|
{
|
||||||
|
if (TEST(Player[i].Flags, PF_DEAD))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
x2 = Player[i].posx;
|
||||||
|
y2 = Player[i].posy;
|
||||||
|
z2 = Player[i].posz;
|
||||||
|
|
||||||
|
if (!FAFcansee(x1,y1,z1-(48<<8),damysect,x2,y2,z2-(48<<8),sprite[Player[i].PlayerSprite].sectnum))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
dist = ksqrt((sprite[Player[i].PlayerSprite].x-x1)*(sprite[Player[i].PlayerSprite].x-x1)+(sprite[Player[i].PlayerSprite].y-y1)*(sprite[Player[i].PlayerSprite].y-y1));
|
||||||
|
|
||||||
|
if (dist < j) { j = dist; goalplayer[snum] = i; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Pick a weapon
|
||||||
|
BOT_ChooseWeapon(p, u, syn);
|
||||||
|
|
||||||
|
// x2,y2,z2 is the coordinates of the target sprite
|
||||||
|
x2 = Player[goalplayer[snum]].posx;
|
||||||
|
y2 = Player[goalplayer[snum]].posy;
|
||||||
|
z2 = Player[goalplayer[snum]].posz;
|
||||||
|
|
||||||
|
// If bot is dead, either barf or respawn
|
||||||
|
if (TEST(p->Flags, PF_DEAD))
|
||||||
|
{
|
||||||
|
if (STD_RANDOM_RANGE(1000) > 990)
|
||||||
|
{
|
||||||
|
syn->bits |= (1<<SK_SPACE_BAR); // Respawn
|
||||||
|
}
|
||||||
|
else
|
||||||
|
syn->bits |= (1<<SK_SHOOT); // Try to barf
|
||||||
|
}
|
||||||
|
|
||||||
|
// Need Health?
|
||||||
|
if (u->Health < p->MaxHealth)
|
||||||
|
BOT_UseInventory(p, INVENTORY_MEDKIT, syn);
|
||||||
|
|
||||||
|
// Check the missile stat lists to see what's being fired and
|
||||||
|
// take the appropriate action
|
||||||
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_MISSILE], j, nextj)
|
||||||
|
{
|
||||||
|
switch (sprite[j].picnum)
|
||||||
|
{
|
||||||
|
case FIREBALL: k = 0; break;
|
||||||
|
case BOLT_THINMAN_R0:
|
||||||
|
k = 0;
|
||||||
|
syn->bits |= (1<<SK_JUMP); // Always jump when rockets being fired!
|
||||||
|
break;
|
||||||
|
default: k = 0; break;
|
||||||
|
}
|
||||||
|
if (k)
|
||||||
|
{
|
||||||
|
x3 = sprite[j].x;
|
||||||
|
y3 = sprite[j].y;
|
||||||
|
z3 = sprite[j].z;
|
||||||
|
for (l=0; l<=8; l++)
|
||||||
|
{
|
||||||
|
if (tmulscale11(x3-x1,x3-x1,y3-y1,y3-y1,(z3-z1)>>4,(z3-z1)>>4) < 3072)
|
||||||
|
{
|
||||||
|
dx = sintable[(sprite[j].ang+512)&2047];
|
||||||
|
dy = sintable[sprite[j].ang&2047];
|
||||||
|
if ((x1-x3)*dy > (y1-y3)*dx) i = -k*512; else i = k*512;
|
||||||
|
syn->vel -= mulscale17(dy,i);
|
||||||
|
syn->svel += mulscale17(dx,i);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (l < 7)
|
||||||
|
{
|
||||||
|
x3 += (mulscale14(sprite[j].xvel,sintable[(sprite[j].ang+512)&2047])<<2);
|
||||||
|
y3 += (mulscale14(sprite[j].xvel,sintable[sprite[j].ang&2047])<<2);
|
||||||
|
z3 += (sprite[j].zvel<<2);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
hitscan(sprite[j].x,sprite[j].y,sprite[j].z,sprite[j].sectnum,
|
||||||
|
mulscale14(sprite[j].xvel,sintable[(sprite[j].ang+512)&2047]),
|
||||||
|
mulscale14(sprite[j].xvel,sintable[sprite[j].ang&2047]),
|
||||||
|
(int)sprite[j].zvel,
|
||||||
|
&dasect,&dawall,&daspr,&x3,&y3,&z3,CLIPMASK1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!TEST(Player[goalplayer[snum]].Flags, PF_DEAD) && snum != goalplayer[snum] &&
|
||||||
|
((FAFcansee(x1,y1,z1-(24<<8),damysect,x2,y2,z2-(24<<8),sprite[Player[goalplayer[snum]].PlayerSprite].sectnum)) ||
|
||||||
|
(FAFcansee(x1,y1,z1-(48<<8),damysect,x2,y2,z2-(48<<8),sprite[Player[goalplayer[snum]].PlayerSprite].sectnum))))
|
||||||
|
{
|
||||||
|
// Shoot how often by skill level
|
||||||
|
short shootrnd=0;
|
||||||
|
|
||||||
|
shootrnd = STD_RANDOM_RANGE(1000);
|
||||||
|
|
||||||
|
if ((Skill == 0 && shootrnd > 990) ||
|
||||||
|
(Skill == 1 && shootrnd > 550) ||
|
||||||
|
(Skill == 2 && shootrnd > 350) ||
|
||||||
|
(Skill == 3))
|
||||||
|
syn->bits |= (1<<SK_SHOOT);
|
||||||
|
else
|
||||||
|
syn->bits &= ~(1<<SK_SHOOT);
|
||||||
|
|
||||||
|
// Jump sometimes, to try to be evasive
|
||||||
|
if (STD_RANDOM_RANGE(256) > 252)
|
||||||
|
syn->bits |= (1<<SK_JUMP);
|
||||||
|
|
||||||
|
// Make sure selected weapon is in range
|
||||||
|
//ASSERT(p->WpnNum < MAX_WEAPONS);
|
||||||
|
//ASSERT(Player[goalplayer[snum]].WpnNum < MAX_WEAPONS);
|
||||||
|
|
||||||
|
// Only fire explosive type weaps if you are not too close to the target!
|
||||||
|
if (u->WeaponNum == WPN_MICRO || u->WeaponNum == WPN_GRENADE || u->WeaponNum == WPN_RAIL)
|
||||||
|
{
|
||||||
|
int x4,y4,z4;
|
||||||
|
hitscan(x1,y1,z1-PLAYER_HEIGHT,damysect,sintable[(damyang+512)&2047],sintable[damyang&2047],
|
||||||
|
(100-p->horiz-p->horizoff)*32,&dasect,&dawall,&daspr,&x4,&y4,&z4,CLIPMASK1);
|
||||||
|
if ((x4-x1)*(x4-x1)+(y4-y1)*(y4-y1) < 2560*2560) syn->bits &= ~(1<<SK_SHOOT);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get fighting distance based on you and your opponents current weapons
|
||||||
|
fightdist = fdmatrix[p->WpnNum][Player[goalplayer[snum]].WpnNum];
|
||||||
|
if (fightdist < 128) fightdist = 128;
|
||||||
|
|
||||||
|
// Figure out your distance from the enemy target sprite
|
||||||
|
dist = ksqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)); if (dist == 0) dist = 1;
|
||||||
|
daang = NORM_ANGLE(getangle(x2+(Player[goalplayer[snum]].xvect>>14)-x1,y2+(Player[goalplayer[snum]].yvect>>14)-y1));
|
||||||
|
|
||||||
|
zang = 100-((z2-z1)*8)/dist;
|
||||||
|
fightdist = max(fightdist,(klabs(z2-z1)>>4));
|
||||||
|
|
||||||
|
x3 = x2+((x1-x2)*fightdist/dist);
|
||||||
|
y3 = y2+((y1-y2)*fightdist/dist);
|
||||||
|
syn->vel += (x3-x1)*2047/dist;
|
||||||
|
syn->svel += (y3-y1)*2047/dist;
|
||||||
|
|
||||||
|
//Strafe attack
|
||||||
|
if (fightdist)
|
||||||
|
{
|
||||||
|
j = totalclock+snum*13468;
|
||||||
|
i = sintable[(j<<6)&2047];
|
||||||
|
i += sintable[((j+4245)<<5)&2047];
|
||||||
|
i += sintable[((j+6745)<<4)&2047];
|
||||||
|
i += sintable[((j+15685)<<3)&2047];
|
||||||
|
dx = sintable[(sprite[Player[goalplayer[snum]].PlayerSprite].ang+512)&2047];
|
||||||
|
dy = sintable[sprite[Player[goalplayer[snum]].PlayerSprite].ang&2047];
|
||||||
|
if ((x1-x2)*dy > (y1-y2)*dx) i += 8192; else i -= 8192;
|
||||||
|
syn->vel += ((sintable[(daang+1024)&2047]*i)>>17);
|
||||||
|
syn->svel += ((sintable[(daang+512)&2047]*i)>>17);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Make aiming and running speed suck by skill level
|
||||||
|
if (Skill == 0)
|
||||||
|
{
|
||||||
|
daang = NORM_ANGLE((daang-256) + STD_RANDOM_RANGE(512));
|
||||||
|
syn->vel -= syn->vel/2;
|
||||||
|
syn->svel -= syn->svel/2;
|
||||||
|
}
|
||||||
|
else if (Skill == 1)
|
||||||
|
{
|
||||||
|
daang = NORM_ANGLE((daang-128) + STD_RANDOM_RANGE(256));
|
||||||
|
syn->vel -= syn->vel/8;
|
||||||
|
syn->svel -= syn->svel/8;
|
||||||
|
}
|
||||||
|
else if (Skill == 2)
|
||||||
|
daang = NORM_ANGLE((daang-64) + STD_RANDOM_RANGE(128));
|
||||||
|
|
||||||
|
// Below formula fails in certain cases
|
||||||
|
//syn->angvel = min(max((((daang+1024-damyang)&2047)-1024)>>1,-MAXANGVEL),MAXANGVEL); //was 127
|
||||||
|
p->pang = daang;
|
||||||
|
syn->aimvel = min(max((zang-p->horiz)>>1,-PLAYER_HORIZ_MAX),PLAYER_HORIZ_MAX);
|
||||||
|
// Sets type of aiming, auto aim for bots
|
||||||
|
syn->bits |= (1<<SK_AUTO_AIM);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
goalsect[snum] = -1;
|
||||||
|
|
||||||
|
#if 1
|
||||||
|
if (goalsect[snum] < 0)
|
||||||
|
{
|
||||||
|
goalwall[snum] = -1;
|
||||||
|
startsect = sprite[p->PlayerSprite].sectnum;
|
||||||
|
endsect = sprite[Player[goalplayer[snum]].PlayerSprite].sectnum;
|
||||||
|
|
||||||
|
clearbufbyte(dashow2dsector,(MAXSECTORS+7)>>3,0L);
|
||||||
|
searchsect[0] = startsect;
|
||||||
|
searchparent[0] = -1;
|
||||||
|
dashow2dsector[startsect>>3] |= (1<<(startsect&7));
|
||||||
|
for (splc=0,send=1; splc<send; splc++)
|
||||||
|
{
|
||||||
|
startwall = sector[searchsect[splc]].wallptr;
|
||||||
|
endwall = startwall + sector[searchsect[splc]].wallnum;
|
||||||
|
for (i=startwall,wal=&wall[startwall]; i<endwall; i++,wal++)
|
||||||
|
{
|
||||||
|
j = wal->nextsector; if (j < 0) continue;
|
||||||
|
|
||||||
|
dx = ((wall[wal->point2].x+wal->x)>>1);
|
||||||
|
dy = ((wall[wal->point2].y+wal->y)>>1);
|
||||||
|
if ((getceilzofslope(j,dx,dy) > getflorzofslope(j,dx,dy)-(28<<8)) && ((sector[j].lotag < 15) || (sector[j].lotag > 22)))
|
||||||
|
continue;
|
||||||
|
if (getflorzofslope(j,dx,dy) < getflorzofslope(searchsect[splc],dx,dy)-(72<<8))
|
||||||
|
continue;
|
||||||
|
if ((dashow2dsector[j>>3]&(1<<(j&7))) == 0)
|
||||||
|
{
|
||||||
|
dashow2dsector[j>>3] |= (1<<(j&7));
|
||||||
|
searchsect[send] = (short)j;
|
||||||
|
searchparent[send] = (short)splc;
|
||||||
|
send++;
|
||||||
|
if (j == endsect)
|
||||||
|
{
|
||||||
|
clearbufbyte(dashow2dsector,(MAXSECTORS+7)>>3,0L);
|
||||||
|
for (k=send-1; k>=0; k=searchparent[k])
|
||||||
|
dashow2dsector[searchsect[k]>>3] |= (1<<(searchsect[k]&7));
|
||||||
|
|
||||||
|
for (k=send-1; k>=0; k=searchparent[k])
|
||||||
|
if (!searchparent[k]) break;
|
||||||
|
|
||||||
|
goalsect[snum] = searchsect[k];
|
||||||
|
startwall = sector[goalsect[snum]].wallptr;
|
||||||
|
endwall = startwall+sector[goalsect[snum]].wallnum;
|
||||||
|
x3 = y3 = 0;
|
||||||
|
for (i=startwall; i<endwall; i++)
|
||||||
|
{
|
||||||
|
x3 += wall[i].x;
|
||||||
|
y3 += wall[i].y;
|
||||||
|
}
|
||||||
|
x3 /= (endwall-startwall);
|
||||||
|
y3 /= (endwall-startwall);
|
||||||
|
|
||||||
|
startwall = sector[startsect].wallptr;
|
||||||
|
endwall = startwall+sector[startsect].wallnum;
|
||||||
|
l = 0; k = startwall;
|
||||||
|
for (i=startwall; i<endwall; i++)
|
||||||
|
{
|
||||||
|
if (wall[i].nextsector != goalsect[snum]) continue;
|
||||||
|
dx = wall[wall[i].point2].x-wall[i].x;
|
||||||
|
dy = wall[wall[i].point2].y-wall[i].y;
|
||||||
|
|
||||||
|
//if (dx*(y1-wall[i].y) <= dy*(x1-wall[i].x))
|
||||||
|
// if (dx*(y2-wall[i].y) >= dy*(x2-wall[i].x))
|
||||||
|
if ((x3-x1)*(wall[i].y-y1) <= (y3-y1)*(wall[i].x-x1))
|
||||||
|
if ((x3-x1)*(wall[wall[i].point2].y-y1) >= (y3-y1)*(wall[wall[i].point2].x-x1))
|
||||||
|
{ k = i; break; }
|
||||||
|
|
||||||
|
dist = ksqrt(dx*dx+dy*dy);
|
||||||
|
if (dist > l) { l = dist; k = i; }
|
||||||
|
}
|
||||||
|
goalwall[snum] = k;
|
||||||
|
daang = ((getangle(wall[wall[k].point2].x-wall[k].x,wall[wall[k].point2].y-wall[k].y)+1536)&2047);
|
||||||
|
goalx[snum] = ((wall[k].x+wall[wall[k].point2].x)>>1)+(sintable[(daang+512)&2047]>>8);
|
||||||
|
goaly[snum] = ((wall[k].y+wall[wall[k].point2].y)>>1)+(sintable[daang&2047]>>8);
|
||||||
|
goalz[snum] = sector[goalsect[snum]].floorz-(32<<8);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
for (i=headspritesect[searchsect[splc]]; i>=0; i=nextspritesect[i])
|
||||||
|
if (sprite[i].lotag == 7)
|
||||||
|
{
|
||||||
|
j = sprite[sprite[i].owner].sectnum;
|
||||||
|
if ((dashow2dsector[j>>3]&(1<<(j&7))) == 0)
|
||||||
|
{
|
||||||
|
dashow2dsector[j>>3] |= (1<<(j&7));
|
||||||
|
searchsect[send] = (short)j;
|
||||||
|
searchparent[send] = (short)splc;
|
||||||
|
send++;
|
||||||
|
if (j == endsect)
|
||||||
|
{
|
||||||
|
clearbufbyte(dashow2dsector,(MAXSECTORS+7)>>3,0L);
|
||||||
|
for (k=send-1; k>=0; k=searchparent[k])
|
||||||
|
dashow2dsector[searchsect[k]>>3] |= (1<<(searchsect[k]&7));
|
||||||
|
|
||||||
|
for (k=send-1; k>=0; k=searchparent[k])
|
||||||
|
if (!searchparent[k]) break;
|
||||||
|
|
||||||
|
goalsect[snum] = searchsect[k];
|
||||||
|
startwall = sector[startsect].wallptr;
|
||||||
|
endwall = startwall+sector[startsect].wallnum;
|
||||||
|
l = 0; k = startwall;
|
||||||
|
for (i=startwall; i<endwall; i++)
|
||||||
|
{
|
||||||
|
dx = wall[wall[i].point2].x-wall[i].x;
|
||||||
|
dy = wall[wall[i].point2].y-wall[i].y;
|
||||||
|
dist = ksqrt(dx*dx+dy*dy);
|
||||||
|
if ((wall[i].nextsector == goalsect[snum]) && (dist > l))
|
||||||
|
{ l = dist; k = i; }
|
||||||
|
}
|
||||||
|
goalwall[snum] = k;
|
||||||
|
daang = ((getangle(wall[wall[k].point2].x-wall[k].x,wall[wall[k].point2].y-wall[k].y)+1536)&2047);
|
||||||
|
goalx[snum] = ((wall[k].x+wall[wall[k].point2].x)>>1)+(sintable[(daang+512)&2047]>>8);
|
||||||
|
goaly[snum] = ((wall[k].y+wall[wall[k].point2].y)>>1)+(sintable[daang&2047]>>8);
|
||||||
|
goalz[snum] = sector[goalsect[snum]].floorz-(32<<8);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (goalwall[snum] >= 0) break;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((goalsect[snum] < 0) || (goalwall[snum] < 0))
|
||||||
|
{
|
||||||
|
if (goalsprite[snum] < 0)
|
||||||
|
{
|
||||||
|
for (k=0; k<4; k++)
|
||||||
|
{
|
||||||
|
i = (rand()%numsectors);
|
||||||
|
for (j=headspritesect[i]; j>=0; j=nextspritesect[j])
|
||||||
|
{
|
||||||
|
if ((sprite[j].xrepeat <= 0) || (sprite[j].yrepeat <= 0)) continue;
|
||||||
|
if (getspritescore(snum,sprite[j].picnum) <= 0) continue;
|
||||||
|
if (FAFcansee(x1,y1,z1-(32<<8),damysect,sprite[j].x,sprite[j].y,sprite[j].z-(4<<8),i))
|
||||||
|
{ goalx[snum] = sprite[j].x; goaly[snum] = sprite[j].y; goalz[snum] = sprite[j].z; goalsprite[snum] = j; break; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
x2 = goalx[snum];
|
||||||
|
y2 = goaly[snum];
|
||||||
|
dist = ksqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)); if (!dist) return;
|
||||||
|
daang = getangle(x2-x1,y2-y1);
|
||||||
|
syn->vel += (x2-x1)*2047/dist;
|
||||||
|
syn->svel += (y2-y1)*2047/dist;
|
||||||
|
syn->angvel = min(max((((daang+1024-damyang)&2047)-1024)>>3,-MAXANGVEL),MAXANGVEL);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
goalsprite[snum] = -1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
x3 = p->posx; y3 = p->posy; z3 = p->posz; dasect = p->cursectnum;
|
||||||
|
i = clipmove(&x3,&y3,&z3,&dasect,p->xvect,p->yvect,164L,4L<<8,4L<<8,CLIPMASK0);
|
||||||
|
if (!i)
|
||||||
|
{
|
||||||
|
x3 = p->posx; y3 = p->posy; z3 = p->posz+(24<<8); dasect = p->cursectnum;
|
||||||
|
i = clipmove(&x3,&y3,&z3,&dasect,p->xvect,p->yvect,164L,4L<<8,4L<<8,CLIPMASK0);
|
||||||
|
}
|
||||||
|
if (i)
|
||||||
|
{
|
||||||
|
clipmovecount[snum]++;
|
||||||
|
|
||||||
|
j = 0;
|
||||||
|
if ((i&0xc000) == 32768) //Hit a wall (49152 for sprite)
|
||||||
|
if (wall[i&(MAXWALLS-1)].nextsector >= 0)
|
||||||
|
{
|
||||||
|
if (getflorzofslope(wall[i&(MAXWALLS-1)].nextsector,p->posx,p->posy) <= p->posz+(24<<8)) j |= 1;
|
||||||
|
if (getceilzofslope(wall[i&(MAXWALLS-1)].nextsector,p->posx,p->posy) >= p->posz-(24<<8)) j |= 2;
|
||||||
|
}
|
||||||
|
if ((i&0xc000) == 49152) j = 1;
|
||||||
|
// Jump
|
||||||
|
if (j&1) if (clipmovecount[snum] == 4) syn->bits |= (1<<SK_JUMP);
|
||||||
|
// Crawl
|
||||||
|
if (j&2) syn->bits |= (1<<SK_CRAWL);
|
||||||
|
|
||||||
|
//Strafe attack
|
||||||
|
daang = getangle(x2-x1,y2-y1);
|
||||||
|
if ((i&0xc000) == 32768)
|
||||||
|
daang = getangle(wall[wall[i&(MAXWALLS-1)].point2].x-wall[i&(MAXWALLS-1)].x,wall[wall[i&(MAXWALLS-1)].point2].y-wall[i&(MAXWALLS-1)].y);
|
||||||
|
j = totalclock+snum*13468;
|
||||||
|
i = sintable[(j<<6)&2047];
|
||||||
|
i += sintable[((j+4245)<<5)&2047];
|
||||||
|
i += sintable[((j+6745)<<4)&2047];
|
||||||
|
i += sintable[((j+15685)<<3)&2047];
|
||||||
|
syn->vel += ((sintable[(daang+1024)&2047]*i)>>17);
|
||||||
|
syn->svel += ((sintable[(daang+512)&2047]*i)>>17);
|
||||||
|
|
||||||
|
// Try to Open
|
||||||
|
if ((clipmovecount[snum]&31) == 2) syn->bits |= (1<<SK_OPERATE);
|
||||||
|
// *TODO: In Duke, this is Kick, but I need to select sword then fire in SW
|
||||||
|
// if ((clipmovecount[snum]&31) == 17) syn->bits |= (1<<22);
|
||||||
|
if (clipmovecount[snum] > 32) { goalsect[snum] = -1; goalwall[snum] = -1; clipmovecount[snum] = 0; }
|
||||||
|
|
||||||
|
goalsprite[snum] = -1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
clipmovecount[snum] = 0;
|
||||||
|
|
||||||
|
if ((goalsect[snum] >= 0) && (goalwall[snum] >= 0))
|
||||||
|
{
|
||||||
|
x2 = goalx[snum];
|
||||||
|
y2 = goaly[snum];
|
||||||
|
dist = ksqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)); if (!dist) return;
|
||||||
|
daang = getangle(x2-x1,y2-y1);
|
||||||
|
if ((goalwall[snum] >= 0) && (dist < 4096))
|
||||||
|
daang = ((getangle(wall[wall[goalwall[snum]].point2].x-wall[goalwall[snum]].x,wall[wall[goalwall[snum]].point2].y-wall[goalwall[snum]].y)+1536)&2047);
|
||||||
|
syn->vel += (x2-x1)*2047/dist;
|
||||||
|
syn->svel += (y2-y1)*2047/dist;
|
||||||
|
syn->angvel = min(max((((daang+1024-damyang)&2047)-1024)>>3,-MAXANGVEL),MAXANGVEL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
// Use extended bot logic for navigation through level
|
||||||
|
goalsect[snum] = -1;
|
||||||
|
goalwall[snum] = -1;
|
||||||
|
goalsprite[snum] = -1;
|
||||||
|
|
||||||
|
// Go to a goal place
|
||||||
|
if ((goalsect[snum] >= 0) && (goalwall[snum] >= 0))
|
||||||
|
{
|
||||||
|
x2 = goalx[snum];
|
||||||
|
y2 = goaly[snum];
|
||||||
|
dist = ksqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)); if (!dist) return;
|
||||||
|
daang = getangle(x2-x1,y2-y1);
|
||||||
|
if ((goalwall[snum] >= 0) && (dist < 4096))
|
||||||
|
daang = ((getangle(wall[wall[goalwall[snum]].point2].x-wall[goalwall[snum]].x,wall[wall[goalwall[snum]].point2].y-wall[goalwall[snum]].y)+1536)&2047);
|
||||||
|
syn->vel += (x2-x1)*2047/dist;
|
||||||
|
syn->svel += (y2-y1)*2047/dist;
|
||||||
|
syn->angvel = min(max((((daang+1024-damyang)&2047)-1024)>>3,-MAXANGVEL),MAXANGVEL);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
1477
polymer/eduke32/source/sw/src/jsector.c
Normal file
1477
polymer/eduke32/source/sw/src/jsector.c
Normal file
File diff suppressed because it is too large
Load diff
80
polymer/eduke32/source/sw/src/jsector.h
Normal file
80
polymer/eduke32/source/sw/src/jsector.h
Normal file
|
@ -0,0 +1,80 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef JSECTOR_H
|
||||||
|
#define JSECTOR_H
|
||||||
|
|
||||||
|
#include "reserve.h"
|
||||||
|
|
||||||
|
#define MAXMIRRORDIST 3300 // At this distance, or less, the magic mirrors activate.
|
||||||
|
#define MAXMIRRORMONSTERS 4 // Max monsters any one magic mirror can spawn
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
m_normal, m_viewon, m_pissed
|
||||||
|
} MIRRORSTATE;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
short mirrorwall; // Wall number containing the mirror
|
||||||
|
// tile
|
||||||
|
short mirrorsector; // nextsector used internally to draw
|
||||||
|
// mirror rooms
|
||||||
|
short camera; // Contains number of ST1 sprite used
|
||||||
|
// as a camera
|
||||||
|
short camsprite; // sprite pointing to campic
|
||||||
|
short campic; // Editart tile number to draw a
|
||||||
|
// screen to
|
||||||
|
short numspawnspots; // Number of spawnspots used
|
||||||
|
short spawnspots[MAXMIRRORMONSTERS]; // One spot for each possible skill
|
||||||
|
// level for a
|
||||||
|
// max of up to 4 coolie ghosts to spawn.
|
||||||
|
BOOL ismagic; // Is this a magic mirror?
|
||||||
|
MIRRORSTATE mstate; // What state the mirror is currently
|
||||||
|
// in
|
||||||
|
int maxtics; // Tic count used to time mirror
|
||||||
|
// events
|
||||||
|
int tics; // How much viewing time has been
|
||||||
|
// used on mirror?
|
||||||
|
} MIRRORTYPE, *MIRRORTYPEp;
|
||||||
|
|
||||||
|
extern MIRRORTYPE mirror[MAXMIRRORS];
|
||||||
|
|
||||||
|
extern short mirrorcnt, floormirrorcnt;
|
||||||
|
extern short floormirrorsector[MAXMIRRORS];
|
||||||
|
extern BOOL mirrorinview;
|
||||||
|
extern short NormalVisibility;
|
||||||
|
|
||||||
|
void JAnalyzeSprites(SPRITEp tspr);
|
||||||
|
void JS_DrawMirrors(PLAYERp pp,int tx,int ty,int tz,short tpang,int tphoriz);
|
||||||
|
void JS_InitMirrors(void);
|
||||||
|
void JS_InitLockouts(void);
|
||||||
|
void JS_ToggleLockouts(void);
|
||||||
|
void JS_UnInitLockouts(void);
|
||||||
|
void JS_ProcessEchoSpot(void);
|
||||||
|
void JS_SpriteSetup(void);
|
||||||
|
|
||||||
|
#endif
|
96
polymer/eduke32/source/sw/src/jtags.h
Normal file
96
polymer/eduke32/source/sw/src/jtags.h
Normal file
|
@ -0,0 +1,96 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef JTAGS_H
|
||||||
|
#define JTAGS_H
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// SPRITE TAGS (TAG THE SPRITES'S HITAG) ST1 tags
|
||||||
|
//
|
||||||
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
#define AI_NORMAL 0
|
||||||
|
#define AI_EVASIVE 1
|
||||||
|
#define AI_SNIPER 2
|
||||||
|
#define AI_GUNGHO 3
|
||||||
|
|
||||||
|
#define SWITCH_LOCKED 29
|
||||||
|
|
||||||
|
// My sprite sprite tags start at 1000 to be separate from Frank's
|
||||||
|
|
||||||
|
//* Magic mirror cameras
|
||||||
|
//* LOTAG is the unique camera number
|
||||||
|
#define MIRROR_CAM 1000
|
||||||
|
//* These are spots at which a pissed off mirror will spawn a coolie ghost
|
||||||
|
//* Make sure to set the skill levels on these sprites too.
|
||||||
|
#define MIRROR_SPAWNSPOT 1001
|
||||||
|
|
||||||
|
//* Ambient Sounds
|
||||||
|
//* LOTAG is the enumerated sound num to play
|
||||||
|
#define AMBIENT_SOUND 1002
|
||||||
|
#define TAG_NORESPAWN_FLAG 1003
|
||||||
|
#define TAG_GET_STAR 1004
|
||||||
|
#define TAG_ECHO_SOUND 1005
|
||||||
|
#define TAG_DRIPGEN 1006
|
||||||
|
#define TAG_BUBBLEGEN 1007
|
||||||
|
#define TAG_SWARMSPOT 1008
|
||||||
|
|
||||||
|
#define TAG_PACHINKOLIGHT 9997
|
||||||
|
#define TAG_INVISONINJA 9998
|
||||||
|
#define LUMINOUS 9999
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// WALL TAGS (TAG THE WALL'S LOTAG)
|
||||||
|
//
|
||||||
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
//* Turns a regular mirror into a magic mirror that shows a room containing ST1 sprite at
|
||||||
|
//* sprite's angle and z height.
|
||||||
|
//* HITAG is unique camera sprite number matching the ST1 camera sprite
|
||||||
|
#define TAG_WALL_MAGIC_MIRROR 306
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// LIGHTING TAGS (TAG THE SECTOR'S LOTAG)
|
||||||
|
//
|
||||||
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
//* Fade effect. Fades in and out smoothly.
|
||||||
|
//* Ceiling is minimum darkness.
|
||||||
|
//* Floor is maximum darkness.
|
||||||
|
//* High byte is speed of flicker.
|
||||||
|
//* The lower the number the faster. Default is 3. I recommend 8.
|
||||||
|
//* Use TAG_LIGHT_FADE_DIFFUSE tags around the initial torch sector just like light fade.
|
||||||
|
//* A good value to use for torches, is a 2 in high tag of TAG_LIGHT_FADE_DIFFUSE
|
||||||
|
|
||||||
|
#define TAG_LIGHT_TORCH_FADE 305
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
2622
polymer/eduke32/source/sw/src/jweapon.c
Normal file
2622
polymer/eduke32/source/sw/src/jweapon.c
Normal file
File diff suppressed because it is too large
Load diff
137
polymer/eduke32/source/sw/src/keys.h
Normal file
137
polymer/eduke32/source/sw/src/keys.h
Normal file
|
@ -0,0 +1,137 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef KEYS_H
|
||||||
|
|
||||||
|
#define KEYS_H
|
||||||
|
|
||||||
|
#include "mytypes.h"
|
||||||
|
|
||||||
|
#define NUM_CODES 128
|
||||||
|
|
||||||
|
#define ESC 0x1B
|
||||||
|
#define ENTER 0x0D
|
||||||
|
|
||||||
|
#define KEYSC_ESC 1
|
||||||
|
#define KEYSC_1 2
|
||||||
|
#define KEYSC_2 3
|
||||||
|
#define KEYSC_3 4
|
||||||
|
#define KEYSC_4 5
|
||||||
|
#define KEYSC_5 6
|
||||||
|
#define KEYSC_6 7
|
||||||
|
#define KEYSC_7 8
|
||||||
|
#define KEYSC_8 9
|
||||||
|
#define KEYSC_9 10
|
||||||
|
#define KEYSC_0 11
|
||||||
|
#define KEYSC_DASH 12
|
||||||
|
#define KEYSC_EQUAL 13
|
||||||
|
|
||||||
|
#define KEYSC_BS 14
|
||||||
|
#define KEYSC_TAB 15
|
||||||
|
#define KEYSC_Q 16
|
||||||
|
#define KEYSC_W 17
|
||||||
|
#define KEYSC_E 18
|
||||||
|
#define KEYSC_R 19
|
||||||
|
#define KEYSC_T 20
|
||||||
|
#define KEYSC_Y 21
|
||||||
|
#define KEYSC_U 22
|
||||||
|
#define KEYSC_I 23
|
||||||
|
#define KEYSC_O 24
|
||||||
|
#define KEYSC_P 25
|
||||||
|
#define KEYSC_LBRACK 26
|
||||||
|
#define KEYSC_RBRACK 27
|
||||||
|
#define KEYSC_ENTER 28
|
||||||
|
|
||||||
|
#define KEYSC_CTRL 29
|
||||||
|
#define KEYSC_A 30
|
||||||
|
#define KEYSC_S 31
|
||||||
|
#define KEYSC_D 32
|
||||||
|
#define KEYSC_F 33
|
||||||
|
#define KEYSC_G 34
|
||||||
|
#define KEYSC_H 35
|
||||||
|
#define KEYSC_J 36
|
||||||
|
#define KEYSC_K 37
|
||||||
|
#define KEYSC_L 38
|
||||||
|
#define KEYSC_SEMI 39
|
||||||
|
#define KEYSC_QUOTE 40
|
||||||
|
#define KEYSC_BQUOTE 41
|
||||||
|
#define KEYSC_TILDE 41
|
||||||
|
|
||||||
|
#define KEYSC_LSHIFT 42
|
||||||
|
#define KEYSC_BSLASH 43
|
||||||
|
#define KEYSC_Z 44
|
||||||
|
#define KEYSC_X 45
|
||||||
|
#define KEYSC_C 46
|
||||||
|
#define KEYSC_V 47
|
||||||
|
#define KEYSC_B 48
|
||||||
|
#define KEYSC_N 49
|
||||||
|
#define KEYSC_M 50
|
||||||
|
#define KEYSC_COMMA 51
|
||||||
|
#define KEYSC_PERIOD 52
|
||||||
|
#define KEYSC_SLASH 53
|
||||||
|
#define KEYSC_RSHIFT 54
|
||||||
|
#define KEYSC_STAR 55
|
||||||
|
|
||||||
|
#define KEYSC_ALT 56
|
||||||
|
#define KEYSC_SPACE 57
|
||||||
|
#define KEYSC_CAPS 58
|
||||||
|
|
||||||
|
#define KEYSC_F1 59
|
||||||
|
#define KEYSC_F2 60
|
||||||
|
#define KEYSC_F3 61
|
||||||
|
#define KEYSC_F4 62
|
||||||
|
#define KEYSC_F5 63
|
||||||
|
#define KEYSC_F6 64
|
||||||
|
#define KEYSC_F7 65
|
||||||
|
#define KEYSC_F8 66
|
||||||
|
#define KEYSC_F9 67
|
||||||
|
#define KEYSC_F10 68
|
||||||
|
|
||||||
|
#define KEYSC_F11 0x57
|
||||||
|
#define KEYSC_F12 0x58
|
||||||
|
|
||||||
|
#define KEYSC_NUM 69
|
||||||
|
#define KEYSC_SCROLL 70
|
||||||
|
|
||||||
|
#define KEYSC_HOME 71
|
||||||
|
#define KEYSC_UP 72
|
||||||
|
#define KEYSC_PGUP 73
|
||||||
|
#define KEYSC_GMINUS 74
|
||||||
|
#define KEYSC_LEFT 75
|
||||||
|
#define KEYSC_KP5 76
|
||||||
|
#define KEYSC_RIGHT 77
|
||||||
|
#define KEYSC_GPLUS 78
|
||||||
|
#define KEYSC_END 79
|
||||||
|
#define KEYSC_DOWN 80
|
||||||
|
#define KEYSC_PGDN 81
|
||||||
|
#define KEYSC_INS 82
|
||||||
|
#define KEYSC_DEL 83
|
||||||
|
|
||||||
|
#define asc_Esc 27
|
||||||
|
#define asc_Enter 13
|
||||||
|
#define asc_Space 32
|
||||||
|
|
||||||
|
#endif
|
569
polymer/eduke32/source/sw/src/lava.c
Normal file
569
polymer/eduke32/source/sw/src/lava.c
Normal file
|
@ -0,0 +1,569 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
#include "build.h"
|
||||||
|
|
||||||
|
#include "keys.h"
|
||||||
|
#include "names2.h"
|
||||||
|
#include "panel.h"
|
||||||
|
#include "game.h"
|
||||||
|
#include "tags.h"
|
||||||
|
#include "ai.h"
|
||||||
|
#include "actor.h"
|
||||||
|
#include "track.h"
|
||||||
|
|
||||||
|
DECISION LavaBattle[] =
|
||||||
|
{
|
||||||
|
{600, InitActorMoveCloser },
|
||||||
|
{700, InitActorAlertNoise },
|
||||||
|
{710, InitActorRunAway },
|
||||||
|
{1024, InitActorAttack }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION LavaOffense[] =
|
||||||
|
{
|
||||||
|
{700, InitActorMoveCloser },
|
||||||
|
{800, InitActorAlertNoise },
|
||||||
|
{1024, InitActorAttack }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION LavaBroadcast[] =
|
||||||
|
{
|
||||||
|
{21, InitActorAlertNoise },
|
||||||
|
{51, InitActorAmbientNoise },
|
||||||
|
{1024, InitActorDecide }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION LavaSurprised[] =
|
||||||
|
{
|
||||||
|
{701, InitActorMoveCloser },
|
||||||
|
{1024, InitActorDecide }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION LavaEvasive[] =
|
||||||
|
{
|
||||||
|
{10, InitActorEvade },
|
||||||
|
{1024, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION LavaLostTarget[] =
|
||||||
|
{
|
||||||
|
{900, InitActorFindPlayer },
|
||||||
|
{1024, InitActorWanderAround }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECISION LavaCloseRange[] =
|
||||||
|
{
|
||||||
|
{700, InitActorAttack },
|
||||||
|
{1024, InitActorReposition }
|
||||||
|
};
|
||||||
|
|
||||||
|
PERSONALITY LavaPersonality =
|
||||||
|
{
|
||||||
|
LavaBattle,
|
||||||
|
LavaOffense,
|
||||||
|
LavaBroadcast,
|
||||||
|
LavaSurprised,
|
||||||
|
LavaEvasive,
|
||||||
|
LavaLostTarget,
|
||||||
|
LavaCloseRange,
|
||||||
|
LavaCloseRange
|
||||||
|
};
|
||||||
|
|
||||||
|
ATTRIBUTE LavaAttrib =
|
||||||
|
{
|
||||||
|
{200, 220, 240, 270}, // Speeds
|
||||||
|
{3, 0, -2, -3}, // Tic Adjusts
|
||||||
|
3, // MaxWeapons;
|
||||||
|
{
|
||||||
|
DIGI_LAVABOSSAMBIENT,DIGI_LAVABOSSALERT,DIGI_LAVABOSSMETEOR,
|
||||||
|
DIGI_LAVABOSSPAIN,DIGI_LAVABOSSEXPLODE,DIGI_LAVABOSSSWIM,
|
||||||
|
DIGI_LAVABOSSRISE,DIGI_LAVABOSSFLAME,DIGI_LAVABOSSMETEXP,
|
||||||
|
DIGI_LAVABOSSSIZZLE
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
ATTRIBUTE LavaPissedAttrib =
|
||||||
|
{
|
||||||
|
{200, 220, 240, 270}, // Speeds
|
||||||
|
{3, 0, -2, -3}, // Tic Adjusts
|
||||||
|
3, // MaxWeapons;
|
||||||
|
{
|
||||||
|
DIGI_LAVABOSSAMBIENT,DIGI_LAVABOSSALERT,DIGI_LAVABOSSMETEOR,
|
||||||
|
DIGI_LAVABOSSPAIN,DIGI_LAVABOSSEXPLODE,DIGI_LAVABOSSSWIM,
|
||||||
|
DIGI_LAVABOSSRISE,DIGI_LAVABOSSFLAME,DIGI_LAVABOSSMETEXP,
|
||||||
|
DIGI_LAVABOSSSIZZLE
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// LAVA STAND
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define LAVA_STAND_RATE 12
|
||||||
|
ANIMATOR DoLavaMove,NullLava,DoActorDebris,NullLava;
|
||||||
|
|
||||||
|
STATE s_LavaStand[5][1] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{LAVA_RUN_R0 + 0, LAVA_STAND_RATE, DoLavaMove, &s_LavaStand[0][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{LAVA_RUN_R1 + 0, LAVA_STAND_RATE, DoLavaMove, &s_LavaStand[1][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{LAVA_RUN_R2 + 0, LAVA_STAND_RATE, DoLavaMove, &s_LavaStand[2][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{LAVA_RUN_R3 + 0, LAVA_STAND_RATE, DoLavaMove, &s_LavaStand[3][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{LAVA_RUN_R4 + 0, LAVA_STAND_RATE, DoLavaMove, &s_LavaStand[4][0]},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
STATEp sg_LavaStand[] =
|
||||||
|
{
|
||||||
|
s_LavaStand[0],
|
||||||
|
s_LavaStand[1],
|
||||||
|
s_LavaStand[2],
|
||||||
|
s_LavaStand[3],
|
||||||
|
s_LavaStand[4]
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// LAVA RUN
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define LAVA_RUN_RATE 24
|
||||||
|
|
||||||
|
|
||||||
|
STATE s_LavaRun[5][4] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{LAVA_RUN_R0 + 0, LAVA_RUN_RATE, DoLavaMove, &s_LavaRun[0][1]},
|
||||||
|
{LAVA_RUN_R0 + 0, LAVA_RUN_RATE, DoLavaMove, &s_LavaRun[0][2]},
|
||||||
|
{LAVA_RUN_R0 + 0, LAVA_RUN_RATE, DoLavaMove, &s_LavaRun[0][3]},
|
||||||
|
{LAVA_RUN_R0 + 0, LAVA_RUN_RATE, DoLavaMove, &s_LavaRun[0][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{LAVA_RUN_R1 + 0, LAVA_RUN_RATE, DoLavaMove, &s_LavaRun[1][1]},
|
||||||
|
{LAVA_RUN_R1 + 0, LAVA_RUN_RATE, DoLavaMove, &s_LavaRun[1][2]},
|
||||||
|
{LAVA_RUN_R1 + 0, LAVA_RUN_RATE, DoLavaMove, &s_LavaRun[1][3]},
|
||||||
|
{LAVA_RUN_R1 + 0, LAVA_RUN_RATE, DoLavaMove, &s_LavaRun[1][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{LAVA_RUN_R2 + 0, LAVA_RUN_RATE, DoLavaMove, &s_LavaRun[2][1]},
|
||||||
|
{LAVA_RUN_R2 + 0, LAVA_RUN_RATE, DoLavaMove, &s_LavaRun[2][2]},
|
||||||
|
{LAVA_RUN_R2 + 0, LAVA_RUN_RATE, DoLavaMove, &s_LavaRun[2][3]},
|
||||||
|
{LAVA_RUN_R2 + 0, LAVA_RUN_RATE, DoLavaMove, &s_LavaRun[2][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{LAVA_RUN_R3 + 0, LAVA_RUN_RATE, DoLavaMove, &s_LavaRun[3][1]},
|
||||||
|
{LAVA_RUN_R3 + 0, LAVA_RUN_RATE, DoLavaMove, &s_LavaRun[3][2]},
|
||||||
|
{LAVA_RUN_R3 + 0, LAVA_RUN_RATE, DoLavaMove, &s_LavaRun[3][3]},
|
||||||
|
{LAVA_RUN_R3 + 0, LAVA_RUN_RATE, DoLavaMove, &s_LavaRun[3][0]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{LAVA_RUN_R4 + 0, LAVA_RUN_RATE, DoLavaMove, &s_LavaRun[4][1]},
|
||||||
|
{LAVA_RUN_R4 + 0, LAVA_RUN_RATE, DoLavaMove, &s_LavaRun[4][2]},
|
||||||
|
{LAVA_RUN_R4 + 0, LAVA_RUN_RATE, DoLavaMove, &s_LavaRun[4][3]},
|
||||||
|
{LAVA_RUN_R4 + 0, LAVA_RUN_RATE, DoLavaMove, &s_LavaRun[4][0]},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
STATEp sg_LavaRun[] =
|
||||||
|
{
|
||||||
|
&s_LavaRun[0][0],
|
||||||
|
&s_LavaRun[1][0],
|
||||||
|
&s_LavaRun[2][0],
|
||||||
|
&s_LavaRun[3][0],
|
||||||
|
&s_LavaRun[4][0]
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// LAVA THROW
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define LAVA_THROW_RATE 9
|
||||||
|
ANIMATOR InitActorDecide;
|
||||||
|
ANIMATOR InitLavaThrow;
|
||||||
|
|
||||||
|
STATE s_LavaThrow[5][10] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{LAVA_THROW_R0 + 0, LAVA_THROW_RATE, NullLava, &s_LavaThrow[0][1]},
|
||||||
|
{LAVA_THROW_R0 + 0, LAVA_THROW_RATE, NullLava, &s_LavaThrow[0][2]},
|
||||||
|
{LAVA_THROW_R0 + 0, LAVA_THROW_RATE*2, NullLava, &s_LavaThrow[0][3]},
|
||||||
|
{LAVA_THROW_R0 + 0, LAVA_THROW_RATE, NullLava, &s_LavaThrow[0][4]},
|
||||||
|
{LAVA_THROW_R0 + 0, LAVA_THROW_RATE, NullLava, &s_LavaThrow[0][5]},
|
||||||
|
{LAVA_THROW_R0 + 0, SF_QUICK_CALL, InitLavaThrow, &s_LavaThrow[0][6]},
|
||||||
|
{LAVA_THROW_R0 + 0, LAVA_THROW_RATE, NullLava, &s_LavaThrow[0][7]},
|
||||||
|
{LAVA_THROW_R0 + 0, LAVA_THROW_RATE, NullLava, &s_LavaThrow[0][8]},
|
||||||
|
{LAVA_THROW_R0 + 0, 0|SF_QUICK_CALL, InitActorDecide, &s_LavaThrow[0][9]},
|
||||||
|
{LAVA_THROW_R0 + 0, LAVA_THROW_RATE, DoLavaMove, &s_LavaThrow[0][9]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{LAVA_THROW_R1 + 0, LAVA_THROW_RATE, NullLava, &s_LavaThrow[1][1]},
|
||||||
|
{LAVA_THROW_R1 + 0, LAVA_THROW_RATE, NullLava, &s_LavaThrow[1][2]},
|
||||||
|
{LAVA_THROW_R1 + 0, LAVA_THROW_RATE*2, NullLava, &s_LavaThrow[1][3]},
|
||||||
|
{LAVA_THROW_R1 + 0, LAVA_THROW_RATE, NullLava, &s_LavaThrow[1][4]},
|
||||||
|
{LAVA_THROW_R1 + 0, LAVA_THROW_RATE, NullLava, &s_LavaThrow[1][5]},
|
||||||
|
{LAVA_THROW_R1 + 0, SF_QUICK_CALL, InitLavaThrow, &s_LavaThrow[1][6]},
|
||||||
|
{LAVA_THROW_R1 + 0, LAVA_THROW_RATE, NullLava, &s_LavaThrow[1][7]},
|
||||||
|
{LAVA_THROW_R1 + 0, LAVA_THROW_RATE, NullLava, &s_LavaThrow[1][8]},
|
||||||
|
{LAVA_THROW_R1 + 0, 0|SF_QUICK_CALL, InitActorDecide, &s_LavaThrow[1][9]},
|
||||||
|
{LAVA_THROW_R1 + 0, LAVA_THROW_RATE, DoLavaMove, &s_LavaThrow[1][9]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{LAVA_THROW_R2 + 0, LAVA_THROW_RATE, NullLava, &s_LavaThrow[2][1]},
|
||||||
|
{LAVA_THROW_R2 + 0, LAVA_THROW_RATE, NullLava, &s_LavaThrow[2][2]},
|
||||||
|
{LAVA_THROW_R2 + 0, LAVA_THROW_RATE*2, NullLava, &s_LavaThrow[2][3]},
|
||||||
|
{LAVA_THROW_R2 + 0, LAVA_THROW_RATE, NullLava, &s_LavaThrow[2][4]},
|
||||||
|
{LAVA_THROW_R2 + 0, LAVA_THROW_RATE, NullLava, &s_LavaThrow[2][5]},
|
||||||
|
{LAVA_THROW_R2 + 0, SF_QUICK_CALL, InitLavaThrow, &s_LavaThrow[2][6]},
|
||||||
|
{LAVA_THROW_R2 + 0, LAVA_THROW_RATE, NullLava, &s_LavaThrow[2][7]},
|
||||||
|
{LAVA_THROW_R2 + 0, LAVA_THROW_RATE, NullLava, &s_LavaThrow[2][8]},
|
||||||
|
{LAVA_THROW_R2 + 0, 0|SF_QUICK_CALL, InitActorDecide, &s_LavaThrow[2][9]},
|
||||||
|
{LAVA_THROW_R2 + 0, LAVA_THROW_RATE, DoLavaMove, &s_LavaThrow[2][9]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{LAVA_THROW_R3 + 0, LAVA_THROW_RATE, NullLava, &s_LavaThrow[3][1]},
|
||||||
|
{LAVA_THROW_R3 + 0, LAVA_THROW_RATE, NullLava, &s_LavaThrow[3][2]},
|
||||||
|
{LAVA_THROW_R3 + 0, LAVA_THROW_RATE*2, NullLava, &s_LavaThrow[3][3]},
|
||||||
|
{LAVA_THROW_R3 + 0, LAVA_THROW_RATE, NullLava, &s_LavaThrow[3][4]},
|
||||||
|
{LAVA_THROW_R3 + 0, LAVA_THROW_RATE, NullLava, &s_LavaThrow[3][5]},
|
||||||
|
{LAVA_THROW_R3 + 0, SF_QUICK_CALL, InitLavaThrow, &s_LavaThrow[3][6]},
|
||||||
|
{LAVA_THROW_R3 + 0, LAVA_THROW_RATE, NullLava, &s_LavaThrow[3][7]},
|
||||||
|
{LAVA_THROW_R3 + 0, LAVA_THROW_RATE, NullLava, &s_LavaThrow[3][8]},
|
||||||
|
{LAVA_THROW_R3 + 0, 0|SF_QUICK_CALL, InitActorDecide, &s_LavaThrow[3][9]},
|
||||||
|
{LAVA_THROW_R3 + 0, LAVA_THROW_RATE, DoLavaMove, &s_LavaThrow[3][9]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{LAVA_THROW_R4 + 0, LAVA_THROW_RATE, NullLava, &s_LavaThrow[4][1]},
|
||||||
|
{LAVA_THROW_R4 + 0, LAVA_THROW_RATE, NullLava, &s_LavaThrow[4][2]},
|
||||||
|
{LAVA_THROW_R4 + 0, LAVA_THROW_RATE*2, NullLava, &s_LavaThrow[4][3]},
|
||||||
|
{LAVA_THROW_R4 + 0, LAVA_THROW_RATE, NullLava, &s_LavaThrow[4][4]},
|
||||||
|
{LAVA_THROW_R4 + 0, LAVA_THROW_RATE, NullLava, &s_LavaThrow[4][5]},
|
||||||
|
{LAVA_THROW_R4 + 0, SF_QUICK_CALL, InitLavaThrow, &s_LavaThrow[4][6]},
|
||||||
|
{LAVA_THROW_R4 + 0, LAVA_THROW_RATE, NullLava, &s_LavaThrow[4][7]},
|
||||||
|
{LAVA_THROW_R4 + 0, LAVA_THROW_RATE, NullLava, &s_LavaThrow[4][8]},
|
||||||
|
{LAVA_THROW_R4 + 0, 0|SF_QUICK_CALL, InitActorDecide, &s_LavaThrow[4][9]},
|
||||||
|
{LAVA_THROW_R4 + 0, LAVA_THROW_RATE, DoLavaMove, &s_LavaThrow[4][9]},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
STATEp sg_LavaThrow[] =
|
||||||
|
{
|
||||||
|
&s_LavaThrow[0][0],
|
||||||
|
&s_LavaThrow[1][0],
|
||||||
|
&s_LavaThrow[2][0],
|
||||||
|
&s_LavaThrow[3][0],
|
||||||
|
&s_LavaThrow[4][0]
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// LAVA FLAME
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define LAVA_FLAME_RATE 18
|
||||||
|
ANIMATOR InitLavaFlame;
|
||||||
|
|
||||||
|
STATE s_LavaFlame[5][8] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{LAVA_FLAME_R0 + 0, LAVA_FLAME_RATE*2, NullLava, &s_LavaFlame[0][1]},
|
||||||
|
{LAVA_FLAME_R0 + 0, LAVA_FLAME_RATE, NullLava, &s_LavaFlame[0][2]},
|
||||||
|
{LAVA_FLAME_R0 + 0, LAVA_FLAME_RATE*2, NullLava, &s_LavaFlame[0][3]},
|
||||||
|
{LAVA_FLAME_R0 + 0, SF_QUICK_CALL, InitLavaFlame, &s_LavaFlame[0][4]},
|
||||||
|
{LAVA_FLAME_R0 + 0, LAVA_FLAME_RATE, NullLava, &s_LavaFlame[0][5]},
|
||||||
|
{LAVA_FLAME_R0 + 0, LAVA_FLAME_RATE, NullLava, &s_LavaFlame[0][6]},
|
||||||
|
{LAVA_FLAME_R0 + 0, SF_QUICK_CALL, InitActorDecide, &s_LavaFlame[0][7]},
|
||||||
|
{LAVA_FLAME_R0 + 0, LAVA_FLAME_RATE, DoLavaMove, &s_LavaFlame[0][7]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{LAVA_FLAME_R1 + 0, LAVA_FLAME_RATE*2, NullLava, &s_LavaFlame[1][1]},
|
||||||
|
{LAVA_FLAME_R1 + 0, LAVA_FLAME_RATE, NullLava, &s_LavaFlame[1][2]},
|
||||||
|
{LAVA_FLAME_R1 + 0, LAVA_FLAME_RATE*2, NullLava, &s_LavaFlame[1][3]},
|
||||||
|
{LAVA_FLAME_R1 + 0, SF_QUICK_CALL, InitLavaFlame, &s_LavaFlame[1][4]},
|
||||||
|
{LAVA_FLAME_R1 + 0, LAVA_FLAME_RATE, NullLava, &s_LavaFlame[1][5]},
|
||||||
|
{LAVA_FLAME_R1 + 0, LAVA_FLAME_RATE, NullLava, &s_LavaFlame[1][6]},
|
||||||
|
{LAVA_FLAME_R1 + 0, SF_QUICK_CALL, InitActorDecide, &s_LavaFlame[1][7]},
|
||||||
|
{LAVA_FLAME_R1 + 0, LAVA_FLAME_RATE, DoLavaMove, &s_LavaFlame[1][7]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{LAVA_FLAME_R2 + 0, LAVA_FLAME_RATE*2, NullLava, &s_LavaFlame[2][1]},
|
||||||
|
{LAVA_FLAME_R2 + 0, LAVA_FLAME_RATE, NullLava, &s_LavaFlame[2][2]},
|
||||||
|
{LAVA_FLAME_R2 + 0, LAVA_FLAME_RATE*2, NullLava, &s_LavaFlame[2][3]},
|
||||||
|
{LAVA_FLAME_R2 + 0, SF_QUICK_CALL, InitLavaFlame, &s_LavaFlame[2][4]},
|
||||||
|
{LAVA_FLAME_R2 + 0, LAVA_FLAME_RATE, NullLava, &s_LavaFlame[2][5]},
|
||||||
|
{LAVA_FLAME_R2 + 0, LAVA_FLAME_RATE, NullLava, &s_LavaFlame[2][6]},
|
||||||
|
{LAVA_FLAME_R2 + 0, SF_QUICK_CALL, InitActorDecide, &s_LavaFlame[2][7]},
|
||||||
|
{LAVA_FLAME_R2 + 0, LAVA_FLAME_RATE, DoLavaMove, &s_LavaFlame[2][7]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{LAVA_FLAME_R3 + 0, LAVA_FLAME_RATE*2, NullLava, &s_LavaFlame[3][1]},
|
||||||
|
{LAVA_FLAME_R3 + 0, LAVA_FLAME_RATE, NullLava, &s_LavaFlame[3][2]},
|
||||||
|
{LAVA_FLAME_R3 + 0, LAVA_FLAME_RATE*2, NullLava, &s_LavaFlame[3][3]},
|
||||||
|
{LAVA_FLAME_R3 + 0, SF_QUICK_CALL, InitLavaFlame, &s_LavaFlame[3][4]},
|
||||||
|
{LAVA_FLAME_R3 + 0, LAVA_FLAME_RATE, NullLava, &s_LavaFlame[3][5]},
|
||||||
|
{LAVA_FLAME_R3 + 0, LAVA_FLAME_RATE, NullLava, &s_LavaFlame[3][6]},
|
||||||
|
{LAVA_FLAME_R3 + 0, SF_QUICK_CALL, InitActorDecide, &s_LavaFlame[3][7]},
|
||||||
|
{LAVA_FLAME_R3 + 0, LAVA_FLAME_RATE, DoLavaMove, &s_LavaFlame[3][7]},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{LAVA_FLAME_R4 + 0, LAVA_FLAME_RATE*2, NullLava, &s_LavaFlame[4][1]},
|
||||||
|
{LAVA_FLAME_R4 + 0, LAVA_FLAME_RATE, NullLava, &s_LavaFlame[4][2]},
|
||||||
|
{LAVA_FLAME_R4 + 0, LAVA_FLAME_RATE*2, NullLava, &s_LavaFlame[4][3]},
|
||||||
|
{LAVA_FLAME_R4 + 0, SF_QUICK_CALL, InitLavaFlame, &s_LavaFlame[4][4]},
|
||||||
|
{LAVA_FLAME_R4 + 0, LAVA_FLAME_RATE, NullLava, &s_LavaFlame[4][5]},
|
||||||
|
{LAVA_FLAME_R4 + 0, LAVA_FLAME_RATE, NullLava, &s_LavaFlame[4][6]},
|
||||||
|
{LAVA_FLAME_R4 + 0, SF_QUICK_CALL, InitActorDecide, &s_LavaFlame[4][7]},
|
||||||
|
{LAVA_FLAME_R4 + 0, LAVA_FLAME_RATE, DoLavaMove, &s_LavaFlame[4][7]},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
STATEp sg_LavaFlame[] =
|
||||||
|
{
|
||||||
|
&s_LavaFlame[0][0],
|
||||||
|
&s_LavaFlame[1][0],
|
||||||
|
&s_LavaFlame[2][0],
|
||||||
|
&s_LavaFlame[3][0],
|
||||||
|
&s_LavaFlame[4][0]
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
// LAVA DIE
|
||||||
|
//
|
||||||
|
//////////////////////
|
||||||
|
|
||||||
|
#define LAVA_DIE_RATE 20
|
||||||
|
|
||||||
|
STATE s_LavaDie[] =
|
||||||
|
{
|
||||||
|
{LAVA_DIE + 0, LAVA_DIE_RATE, NullLava, &s_LavaDie[1]},
|
||||||
|
{LAVA_DEAD, LAVA_DIE_RATE, DoActorDebris, &s_LavaDie[1]}
|
||||||
|
};
|
||||||
|
|
||||||
|
STATE s_LavaDead[] =
|
||||||
|
{
|
||||||
|
{LAVA_DEAD, LAVA_DIE_RATE, DoActorDebris, &s_LavaDead[0]},
|
||||||
|
};
|
||||||
|
|
||||||
|
STATEp sg_LavaDie[] =
|
||||||
|
{
|
||||||
|
s_LavaDie
|
||||||
|
};
|
||||||
|
|
||||||
|
STATEp sg_LavaDead[] =
|
||||||
|
{
|
||||||
|
s_LavaDead
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
STATEp *Stand[MAX_WEAPONS];
|
||||||
|
STATEp *Run;
|
||||||
|
STATEp *Jump;
|
||||||
|
STATEp *Fall;
|
||||||
|
STATEp *Crawl;
|
||||||
|
STATEp *Swim;
|
||||||
|
STATEp *Fly;
|
||||||
|
STATEp *Rise;
|
||||||
|
STATEp *Sit;
|
||||||
|
STATEp *Look;
|
||||||
|
STATEp *Climb;
|
||||||
|
STATEp *Pain;
|
||||||
|
STATEp *Death1;
|
||||||
|
STATEp *Death2;
|
||||||
|
STATEp *Dead;
|
||||||
|
STATEp *DeathJump;
|
||||||
|
STATEp *DeathFall;
|
||||||
|
STATEp *CloseAttack[2];
|
||||||
|
STATEp *Attack[6];
|
||||||
|
STATEp *Special[2];
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
ACTOR_ACTION_SET LavaActionSet =
|
||||||
|
{
|
||||||
|
sg_LavaStand,
|
||||||
|
sg_LavaRun,
|
||||||
|
NULL, //sg_LavaJump,
|
||||||
|
NULL, //sg_LavaFall,
|
||||||
|
NULL, //sg_LavaCrawl,
|
||||||
|
NULL, //sg_LavaSwim,
|
||||||
|
NULL, //sg_LavaFly,
|
||||||
|
NULL, //sg_LavaRise,
|
||||||
|
NULL, //sg_LavaSit,
|
||||||
|
NULL, //sg_LavaLook,
|
||||||
|
NULL, //climb
|
||||||
|
NULL, //pain
|
||||||
|
sg_LavaDie,
|
||||||
|
NULL, //sg_LavaHariKari,
|
||||||
|
sg_LavaDead,
|
||||||
|
NULL, //sg_LavaDeathJump,
|
||||||
|
NULL, //sg_LavaDeathFall,
|
||||||
|
{sg_LavaFlame},
|
||||||
|
{1024},
|
||||||
|
{sg_LavaFlame, sg_LavaThrow, sg_LavaThrow, sg_LavaThrow},
|
||||||
|
{256, 512, 768, 1024},
|
||||||
|
{NULL},
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
int
|
||||||
|
SetupLava(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
USERp u;
|
||||||
|
ANIMATOR DoActorDecide;
|
||||||
|
|
||||||
|
if (TEST(sp->cstat, CSTAT_SPRITE_RESTORE))
|
||||||
|
{
|
||||||
|
u = User[SpriteNum];
|
||||||
|
ASSERT(u);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
User[SpriteNum] = u = SpawnUser(SpriteNum,LAVA_RUN_R0,s_LavaRun[0]);
|
||||||
|
u->Health = 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
ChangeState(SpriteNum, s_LavaRun[0]);
|
||||||
|
u->Attrib = &LavaAttrib;
|
||||||
|
DoActorSetSpeed(SpriteNum, NORM_SPEED);
|
||||||
|
u->StateEnd = s_LavaDie;
|
||||||
|
u->Rot = sg_LavaRun;
|
||||||
|
|
||||||
|
EnemyDefaults(SpriteNum, &LavaActionSet, &LavaPersonality);
|
||||||
|
sp->xrepeat = sp->yrepeat = 110;
|
||||||
|
sp->clipdist = (512) >> 2;
|
||||||
|
SET(u->Flags, SPR_XFLIP_TOGGLE|SPR_ELECTRO_TOLERANT);
|
||||||
|
|
||||||
|
u->loz = sp->z;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int NullLava(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
|
if (TEST(u->Flags,SPR_SLIDING))
|
||||||
|
DoActorSlide(SpriteNum);
|
||||||
|
|
||||||
|
KeepActorOnFloor(SpriteNum);
|
||||||
|
|
||||||
|
DoActorSectorDamage(SpriteNum);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int DoLavaMove(short SpriteNum)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
|
if (TEST(u->Flags,SPR_SLIDING))
|
||||||
|
DoActorSlide(SpriteNum);
|
||||||
|
|
||||||
|
if (u->track >= 0)
|
||||||
|
ActorFollowTrack(SpriteNum, ACTORMOVETICS);
|
||||||
|
else
|
||||||
|
(*u->ActorActionFunc)(SpriteNum);
|
||||||
|
|
||||||
|
KeepActorOnFloor(SpriteNum);
|
||||||
|
|
||||||
|
DoActorSectorDamage(SpriteNum);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#include "saveable.h"
|
||||||
|
|
||||||
|
static saveable_code saveable_lava_code[] =
|
||||||
|
{
|
||||||
|
SAVE_CODE(SetupLava),
|
||||||
|
SAVE_CODE(NullLava),
|
||||||
|
SAVE_CODE(DoLavaMove),
|
||||||
|
};
|
||||||
|
|
||||||
|
static saveable_data saveable_lava_data[] =
|
||||||
|
{
|
||||||
|
SAVE_DATA(LavaBattle),
|
||||||
|
SAVE_DATA(LavaOffense),
|
||||||
|
SAVE_DATA(LavaBroadcast),
|
||||||
|
SAVE_DATA(LavaSurprised),
|
||||||
|
SAVE_DATA(LavaEvasive),
|
||||||
|
SAVE_DATA(LavaLostTarget),
|
||||||
|
SAVE_DATA(LavaCloseRange),
|
||||||
|
|
||||||
|
SAVE_DATA(LavaPersonality),
|
||||||
|
|
||||||
|
SAVE_DATA(LavaAttrib),
|
||||||
|
SAVE_DATA(LavaPissedAttrib),
|
||||||
|
|
||||||
|
SAVE_DATA(s_LavaStand),
|
||||||
|
SAVE_DATA(sg_LavaStand),
|
||||||
|
SAVE_DATA(s_LavaRun),
|
||||||
|
SAVE_DATA(sg_LavaRun),
|
||||||
|
SAVE_DATA(s_LavaThrow),
|
||||||
|
SAVE_DATA(sg_LavaThrow),
|
||||||
|
SAVE_DATA(s_LavaFlame),
|
||||||
|
SAVE_DATA(sg_LavaFlame),
|
||||||
|
SAVE_DATA(s_LavaDie),
|
||||||
|
SAVE_DATA(s_LavaDead),
|
||||||
|
SAVE_DATA(sg_LavaDie),
|
||||||
|
SAVE_DATA(sg_LavaDead),
|
||||||
|
|
||||||
|
SAVE_DATA(LavaActionSet),
|
||||||
|
};
|
||||||
|
|
||||||
|
saveable_module saveable_lava =
|
||||||
|
{
|
||||||
|
// code
|
||||||
|
saveable_lava_code,
|
||||||
|
SIZ(saveable_lava_code),
|
||||||
|
|
||||||
|
// data
|
||||||
|
saveable_lava_data,
|
||||||
|
SIZ(saveable_lava_data)
|
||||||
|
};
|
426
polymer/eduke32/source/sw/src/light.c
Normal file
426
polymer/eduke32/source/sw/src/light.c
Normal file
|
@ -0,0 +1,426 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
#include "build.h"
|
||||||
|
|
||||||
|
#include "names2.h"
|
||||||
|
#include "game.h"
|
||||||
|
#include "light.h"
|
||||||
|
|
||||||
|
/* #define LIGHT_Match(sp) (SP_TAG2((sp))) */
|
||||||
|
/* #define LIGHT_Type(sp) (SP_TAG3((sp))) */
|
||||||
|
/* #define LIGHT_MaxTics(sp) (SP_TAG4((sp))) */
|
||||||
|
/* #define LIGHT_MaxBright(sp) (SP_TAG5((sp))) */
|
||||||
|
/* #define LIGHT_MaxDark(sp) (SP_TAG6((sp))) */
|
||||||
|
/* #define LIGHT_ShadeInc(sp) (SP_TAG7((sp))) */
|
||||||
|
/* */
|
||||||
|
/* #define LIGHT_Dir(sp) (!!(TEST((sp)->extra, SPRX_BOOL10))) */
|
||||||
|
/* #define LIGHT_DirChange(sp) (FLIP((sp)->extra, SPRX_BOOL10)) */
|
||||||
|
/* */
|
||||||
|
/* #define LIGHT_Shade(sp) ((sp)->shade) */
|
||||||
|
/* #define LIGHT_FloorShade(sp) ((sp)->xoffset) */
|
||||||
|
/* #define LIGHT_CeilingShade(sp) ((sp)->yoffset) */
|
||||||
|
/* #define LIGHT_Tics(sp) ((sp)->z) */
|
||||||
|
/* */
|
||||||
|
/* #define LIGHT_DiffuseNum(sp) (SP_TAG3((sp))) */
|
||||||
|
/* #define LIGHT_DiffuseMult(sp) (SP_TAG4((sp))) */
|
||||||
|
|
||||||
|
void SectorLightShade(SPRITEp sp, short intensity)
|
||||||
|
{
|
||||||
|
short w, startwall, endwall;
|
||||||
|
void *void_ptr;
|
||||||
|
CHARp wall_shade;
|
||||||
|
short base_shade;
|
||||||
|
short wallcount;
|
||||||
|
|
||||||
|
if (TEST_BOOL8(sp))
|
||||||
|
intensity = -intensity;
|
||||||
|
|
||||||
|
if (!TEST_BOOL2(sp))
|
||||||
|
{
|
||||||
|
if (!TEST_BOOL6(sp))
|
||||||
|
sector[sp->sectnum].floorpal = sp->pal;
|
||||||
|
sector[sp->sectnum].floorshade = LIGHT_FloorShade(sp) + intensity; // floor change
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!TEST_BOOL3(sp))
|
||||||
|
{
|
||||||
|
if (!TEST_BOOL6(sp))
|
||||||
|
sector[sp->sectnum].ceilingpal = sp->pal;
|
||||||
|
sector[sp->sectnum].ceilingshade = LIGHT_CeilingShade(sp) + intensity; // ceiling change
|
||||||
|
}
|
||||||
|
|
||||||
|
// change wall
|
||||||
|
if (!TEST_BOOL4(sp))
|
||||||
|
{
|
||||||
|
ASSERT(User[sp - sprite] && User[sp - sprite]->WallShade);
|
||||||
|
wall_shade = User[sp - sprite]->WallShade;
|
||||||
|
|
||||||
|
startwall = sector[sp->sectnum].wallptr;
|
||||||
|
endwall = startwall + sector[sp->sectnum].wallnum - 1;
|
||||||
|
|
||||||
|
for (w = startwall, wallcount = 0; w <= endwall; w++)
|
||||||
|
{
|
||||||
|
base_shade = wall_shade[wallcount];
|
||||||
|
wall[w].shade = base_shade + intensity;
|
||||||
|
if (!TEST_BOOL6(sp))
|
||||||
|
wall[w].pal = sp->pal;
|
||||||
|
wallcount++;
|
||||||
|
|
||||||
|
if (TEST(sp->extra, SPRX_BOOL5) && wall[w].nextwall >= 0)
|
||||||
|
{
|
||||||
|
base_shade = wall_shade[wallcount];
|
||||||
|
wall[wall[w].nextwall].shade = base_shade + intensity;
|
||||||
|
if (!TEST_BOOL6(sp))
|
||||||
|
wall[wall[w].nextwall].pal = sp->pal;
|
||||||
|
wallcount++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
VOID DiffuseLighting(SPRITEp sp)
|
||||||
|
{
|
||||||
|
short i, nexti;
|
||||||
|
short count;
|
||||||
|
short shade;
|
||||||
|
SPRITEp dsp;
|
||||||
|
|
||||||
|
// diffused lighting
|
||||||
|
count = 0;
|
||||||
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_LIGHTING_DIFFUSE],i,nexti)
|
||||||
|
{
|
||||||
|
dsp = &sprite[i];
|
||||||
|
|
||||||
|
// make sure matchs match
|
||||||
|
if (LIGHT_Match(dsp) != LIGHT_Match(sp))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
shade = sp->shade + ((LIGHT_DiffuseNum(dsp) + 1) * LIGHT_DiffuseMult(dsp));
|
||||||
|
|
||||||
|
if (shade > LIGHT_MaxDark(sp))
|
||||||
|
shade = LIGHT_MaxDark(sp);
|
||||||
|
|
||||||
|
if (!TEST_BOOL6(dsp))
|
||||||
|
dsp->pal = sp->pal;
|
||||||
|
|
||||||
|
SectorLightShade(dsp, shade);
|
||||||
|
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID DoLightingMatch(short match, short state)
|
||||||
|
{
|
||||||
|
short i,nexti;
|
||||||
|
SPRITEp sp;
|
||||||
|
|
||||||
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_LIGHTING],i,nexti)
|
||||||
|
{
|
||||||
|
sp = &sprite[i];
|
||||||
|
|
||||||
|
if (LIGHT_Match(sp) != match)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
switch (LIGHT_Type(sp))
|
||||||
|
{
|
||||||
|
case LIGHT_CONSTANT:
|
||||||
|
|
||||||
|
// initialized
|
||||||
|
SET_BOOL9(sp);
|
||||||
|
|
||||||
|
// toggle
|
||||||
|
if (state == -1)
|
||||||
|
state = !TEST_BOOL1(sp);
|
||||||
|
|
||||||
|
if (state == ON)
|
||||||
|
{
|
||||||
|
SET_BOOL1(sp);
|
||||||
|
sp->shade = -LIGHT_MaxBright(sp);
|
||||||
|
sp->pal = User[sp-sprite]->spal; // on
|
||||||
|
SectorLightShade(sp, sp->shade);
|
||||||
|
DiffuseLighting(sp);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
RESET_BOOL1(sp);
|
||||||
|
sp->shade = LIGHT_MaxDark(sp);
|
||||||
|
sp->pal = 0; // off
|
||||||
|
SectorLightShade(sp, sp->shade);
|
||||||
|
DiffuseLighting(sp);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LIGHT_FLICKER:
|
||||||
|
case LIGHT_FADE:
|
||||||
|
// initialized
|
||||||
|
SET_BOOL9(sp);
|
||||||
|
|
||||||
|
// toggle
|
||||||
|
if (state == -1)
|
||||||
|
state = !TEST_BOOL1(sp);
|
||||||
|
|
||||||
|
if (state == ON)
|
||||||
|
{
|
||||||
|
// allow fade or flicker
|
||||||
|
SET_BOOL1(sp);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
RESET_BOOL1(sp);
|
||||||
|
sp->shade = LIGHT_MaxDark(sp);
|
||||||
|
SectorLightShade(sp, sp->shade);
|
||||||
|
DiffuseLighting(sp);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LIGHT_FADE_TO_ON_OFF:
|
||||||
|
|
||||||
|
// initialized
|
||||||
|
SET_BOOL9(sp);
|
||||||
|
|
||||||
|
// toggle
|
||||||
|
//if (state == -1)
|
||||||
|
// state = !TEST_BOOL1(sp);
|
||||||
|
|
||||||
|
if (state == ON)
|
||||||
|
{
|
||||||
|
if (LIGHT_Dir(sp) == 1)
|
||||||
|
{
|
||||||
|
LIGHT_DirChange(sp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (state == OFF)
|
||||||
|
{
|
||||||
|
if (LIGHT_Dir(sp) == 0)
|
||||||
|
{
|
||||||
|
LIGHT_DirChange(sp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// allow fade or flicker
|
||||||
|
SET_BOOL1(sp);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LIGHT_FLICKER_ON:
|
||||||
|
|
||||||
|
// initialized
|
||||||
|
SET_BOOL9(sp);
|
||||||
|
|
||||||
|
// toggle
|
||||||
|
if (state == -1)
|
||||||
|
state = !TEST_BOOL1(sp);
|
||||||
|
|
||||||
|
if (state == ON)
|
||||||
|
{
|
||||||
|
// allow fade or flicker
|
||||||
|
SET_BOOL1(sp);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// turn it off till next switch
|
||||||
|
short spal = sp->pal;
|
||||||
|
RESET_BOOL1(sp);
|
||||||
|
sp->pal = 0;
|
||||||
|
sp->shade = LIGHT_MaxDark(sp);
|
||||||
|
SectorLightShade(sp, sp->shade);
|
||||||
|
DiffuseLighting(sp);
|
||||||
|
sp->pal = spal;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID InitLighting(VOID)
|
||||||
|
{
|
||||||
|
short i,nexti;
|
||||||
|
SPRITEp sp;
|
||||||
|
|
||||||
|
|
||||||
|
// processed on level startup
|
||||||
|
// puts lights in correct state
|
||||||
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_LIGHTING],i,nexti)
|
||||||
|
{
|
||||||
|
sp = &sprite[i];
|
||||||
|
|
||||||
|
if (!TEST_BOOL9(sp))
|
||||||
|
{
|
||||||
|
DoLightingMatch(LIGHT_Match(sp), !!TEST_BOOL1(sp));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID DoLighting(VOID)
|
||||||
|
{
|
||||||
|
short i,nexti;
|
||||||
|
SPRITEp sp;
|
||||||
|
short count;
|
||||||
|
|
||||||
|
|
||||||
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_LIGHTING],i,nexti)
|
||||||
|
{
|
||||||
|
sp = &sprite[i];
|
||||||
|
|
||||||
|
// on/off test
|
||||||
|
if (TEST_BOOL1(sp) == OFF)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
switch (LIGHT_Type(sp))
|
||||||
|
{
|
||||||
|
case LIGHT_CONSTANT:
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LIGHT_FLICKER:
|
||||||
|
|
||||||
|
LIGHT_Tics(sp) += synctics;
|
||||||
|
while (LIGHT_Tics(sp) >= LIGHT_MaxTics(sp))
|
||||||
|
{
|
||||||
|
LIGHT_Tics(sp) -= LIGHT_MaxTics(sp);
|
||||||
|
|
||||||
|
if ((RANDOM_P2(128 << 8) >> 8) > 64)
|
||||||
|
{
|
||||||
|
sp->shade = -LIGHT_MaxBright(sp) + RANDOM_RANGE(LIGHT_MaxBright(sp) + LIGHT_MaxDark(sp));
|
||||||
|
SectorLightShade(sp, sp->shade);
|
||||||
|
DiffuseLighting(sp);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// turn off lighting - even colored lighting
|
||||||
|
short spal = sp->pal;
|
||||||
|
sp->pal = 0;
|
||||||
|
sp->shade = LIGHT_MaxDark(sp);
|
||||||
|
SectorLightShade(sp, sp->shade);
|
||||||
|
DiffuseLighting(sp);
|
||||||
|
sp->pal = spal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LIGHT_FADE:
|
||||||
|
|
||||||
|
LIGHT_Tics(sp) += synctics;
|
||||||
|
|
||||||
|
while (LIGHT_Tics(sp) >= LIGHT_MaxTics(sp))
|
||||||
|
{
|
||||||
|
LIGHT_Tics(sp) -= LIGHT_MaxTics(sp);
|
||||||
|
|
||||||
|
if (LIGHT_Dir(sp) == 1)
|
||||||
|
{
|
||||||
|
sp->shade += LIGHT_ShadeInc(sp);
|
||||||
|
if (sp->shade >= LIGHT_MaxDark(sp))
|
||||||
|
LIGHT_DirChange(sp);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sp->shade -= LIGHT_ShadeInc(sp);
|
||||||
|
if (sp->shade <= -LIGHT_MaxBright(sp))
|
||||||
|
LIGHT_DirChange(sp);
|
||||||
|
}
|
||||||
|
|
||||||
|
SectorLightShade(sp, sp->shade);
|
||||||
|
DiffuseLighting(sp);
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LIGHT_FADE_TO_ON_OFF:
|
||||||
|
|
||||||
|
LIGHT_Tics(sp) += synctics;
|
||||||
|
|
||||||
|
while (LIGHT_Tics(sp) >= LIGHT_MaxTics(sp))
|
||||||
|
{
|
||||||
|
LIGHT_Tics(sp) -= LIGHT_MaxTics(sp);
|
||||||
|
|
||||||
|
if (LIGHT_Dir(sp) == 1)
|
||||||
|
{
|
||||||
|
sp->shade += LIGHT_ShadeInc(sp);
|
||||||
|
if (sp->shade >= LIGHT_MaxDark(sp))
|
||||||
|
{
|
||||||
|
sp->pal = 0; // off
|
||||||
|
LIGHT_DirChange(sp);
|
||||||
|
// stop it until switch is hit
|
||||||
|
RESET_BOOL1(sp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sp->shade -= LIGHT_ShadeInc(sp);
|
||||||
|
sp->pal = User[sp-sprite]->spal; // on
|
||||||
|
if (sp->shade <= -LIGHT_MaxBright(sp))
|
||||||
|
{
|
||||||
|
LIGHT_DirChange(sp);
|
||||||
|
// stop it until switch is hit
|
||||||
|
RESET_BOOL1(sp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SectorLightShade(sp, sp->shade);
|
||||||
|
DiffuseLighting(sp);
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LIGHT_FLICKER_ON:
|
||||||
|
|
||||||
|
LIGHT_Tics(sp) += synctics;
|
||||||
|
|
||||||
|
while (LIGHT_Tics(sp) >= LIGHT_MaxTics(sp))
|
||||||
|
{
|
||||||
|
LIGHT_Tics(sp) -= LIGHT_MaxTics(sp);
|
||||||
|
|
||||||
|
if ((RANDOM_P2(128 << 8) >> 8) > 64)
|
||||||
|
{
|
||||||
|
sp->shade = -LIGHT_MaxBright(sp) + RANDOM_RANGE(LIGHT_MaxBright(sp) + LIGHT_MaxDark(sp));
|
||||||
|
SectorLightShade(sp, sp->shade);
|
||||||
|
DiffuseLighting(sp);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// turn off lighting - even colored lighting
|
||||||
|
short spal = sp->pal;
|
||||||
|
sp->pal = 0;
|
||||||
|
sp->shade = LIGHT_MaxDark(sp);
|
||||||
|
SectorLightShade(sp, sp->shade);
|
||||||
|
DiffuseLighting(sp);
|
||||||
|
sp->pal = spal;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((RANDOM_P2(128 << 8) >> 8) < 8)
|
||||||
|
{
|
||||||
|
// set to full brightness
|
||||||
|
sp->shade = -LIGHT_MaxBright(sp);
|
||||||
|
SectorLightShade(sp, sp->shade);
|
||||||
|
DiffuseLighting(sp);
|
||||||
|
// turn it off until a swith happens
|
||||||
|
RESET_BOOL1(sp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
54
polymer/eduke32/source/sw/src/light.h
Normal file
54
polymer/eduke32/source/sw/src/light.h
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
void SectorLightShade(SPRITEp sp, short intensity);
|
||||||
|
VOID DiffuseLighting(SPRITEp sp);
|
||||||
|
VOID DoLightingMatch(short match, short state);
|
||||||
|
VOID InitLighting(VOID);
|
||||||
|
VOID DoLighting(VOID);
|
||||||
|
|
||||||
|
// Descriptive Light variables mapped from other variables
|
||||||
|
|
||||||
|
#define LIGHT_Match(sp) (SP_TAG2((sp)))
|
||||||
|
#define LIGHT_Type(sp) (SP_TAG3((sp)))
|
||||||
|
#define LIGHT_MaxTics(sp) (SP_TAG4((sp)))
|
||||||
|
#define LIGHT_MaxBright(sp) (SP_TAG5((sp)))
|
||||||
|
#define LIGHT_MaxDark(sp) (SP_TAG6((sp)))
|
||||||
|
#define LIGHT_ShadeInc(sp) (SP_TAG7((sp)))
|
||||||
|
|
||||||
|
#define LIGHT_Dir(sp) (!!(TEST((sp)->extra, SPRX_BOOL10)))
|
||||||
|
#define LIGHT_DirChange(sp) (FLIP((sp)->extra, SPRX_BOOL10))
|
||||||
|
|
||||||
|
#define LIGHT_Shade(sp) ((sp)->shade)
|
||||||
|
#define LIGHT_FloorShade(sp) ((sp)->xoffset)
|
||||||
|
#define LIGHT_CeilingShade(sp) ((sp)->yoffset)
|
||||||
|
#define LIGHT_Tics(sp) ((sp)->z)
|
||||||
|
|
||||||
|
#define LIGHT_DiffuseNum(sp) (SP_TAG3((sp)))
|
||||||
|
#define LIGHT_DiffuseMult(sp) (SP_TAG4((sp)))
|
||||||
|
|
||||||
|
enum LightTypes {LIGHT_CONSTANT, LIGHT_FLICKER, LIGHT_FADE, LIGHT_FLICKER_ON, LIGHT_FADE_TO_ON_OFF};
|
69
polymer/eduke32/source/sw/src/lists.h
Normal file
69
polymer/eduke32/source/sw/src/lists.h
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef LISTS_H
|
||||||
|
|
||||||
|
#define LISTS_H
|
||||||
|
|
||||||
|
/********************************************************************/
|
||||||
|
|
||||||
|
typedef
|
||||||
|
struct List
|
||||||
|
{
|
||||||
|
struct List *Next;
|
||||||
|
struct List *Prev;
|
||||||
|
} LISTHEAD, *LIST;
|
||||||
|
|
||||||
|
#define FIRST(list) (list->Next)
|
||||||
|
#define LAST(list) (list->Prev)
|
||||||
|
|
||||||
|
|
||||||
|
#define INITLIST(list) ( ((LIST) list)->Prev = ((LIST) list)->Next = (LIST) list)
|
||||||
|
|
||||||
|
|
||||||
|
#define INSERT(list, nodep) ( ((LIST) nodep)->Prev = (LIST) list, \
|
||||||
|
((LIST) nodep)->Next = ((LIST) list)->Next, \
|
||||||
|
((LIST) list)->Next = (LIST) nodep, \
|
||||||
|
((LIST) nodep)->Next->Prev = (LIST) nodep)
|
||||||
|
|
||||||
|
#define INSERT_TAIL(list, nodep) ( ((LIST) nodep)->Next = (LIST) list, \
|
||||||
|
((LIST) nodep)->Prev = ((LIST) list)->Prev, \
|
||||||
|
((LIST) list)->Prev = (LIST) nodep, \
|
||||||
|
((LIST) nodep)->Prev->Next = (LIST) nodep)
|
||||||
|
|
||||||
|
#define DELETE(nodep) ( ((LIST) nodep)->Prev->Next = ((LIST) nodep)->Next, \
|
||||||
|
((LIST) nodep)->Next->Prev = ((LIST) nodep)->Prev)
|
||||||
|
|
||||||
|
|
||||||
|
#define TRAVERSE(l, o, n) ASSERT(((LIST)l)->Next && ((LIST)l)->Prev); for (o = (void*)(((LIST)l)->Next); \
|
||||||
|
n = o->Next, (LIST) o != (LIST) l; \
|
||||||
|
o = n)
|
||||||
|
|
||||||
|
#define EMPTY(list) (((LIST) list)->Next == (LIST) list)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
558
polymer/eduke32/source/sw/src/mclip.c
Normal file
558
polymer/eduke32/source/sw/src/mclip.c
Normal file
|
@ -0,0 +1,558 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
#include "build.h"
|
||||||
|
|
||||||
|
#include "mytypes.h"
|
||||||
|
#include "keys.h"
|
||||||
|
#include "names2.h"
|
||||||
|
#include "panel.h"
|
||||||
|
#include "game.h"
|
||||||
|
#include "tags.h"
|
||||||
|
#include "player.h"
|
||||||
|
#include "mclip.h"
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
int MultiClipMove(PLAYERp pp, int z, int floor_dist)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
int ox[MAX_CLIPBOX],oy[MAX_CLIPBOX];
|
||||||
|
SPRITEp sp = pp->sop->sp_child;
|
||||||
|
USERp u = User[sp - sprite];
|
||||||
|
SECTOR_OBJECTp sop = pp->sop;
|
||||||
|
short ang;
|
||||||
|
short min_ndx;
|
||||||
|
int min_dist = 999999;
|
||||||
|
int dist;
|
||||||
|
|
||||||
|
int ret_start;
|
||||||
|
int ret[MAX_CLIPBOX];
|
||||||
|
int x[MAX_CLIPBOX],y[MAX_CLIPBOX];
|
||||||
|
|
||||||
|
for (i = 0; i < sop->clipbox_num; i++)
|
||||||
|
{
|
||||||
|
ang = NORM_ANGLE(pp->pang + sop->clipbox_ang[i]);
|
||||||
|
ox[i] = x[i] = pp->posx + (sop->clipbox_vdist[i] * sintable[NORM_ANGLE(ang + 512)] >> 14);
|
||||||
|
oy[i] = y[i] = pp->posy + (sop->clipbox_vdist[i] * sintable[ang] >> 14);
|
||||||
|
|
||||||
|
// move the box
|
||||||
|
ret[i] = clipmove(&x[i], &y[i], &z, &pp->cursectnum, pp->xvect, pp->yvect, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||||
|
|
||||||
|
// save the dist moved
|
||||||
|
dist = FindDistance2D(x[i] - ox[i], y[i] - oy[i]);
|
||||||
|
|
||||||
|
if (dist < min_dist)
|
||||||
|
{
|
||||||
|
min_dist = dist;
|
||||||
|
min_ndx = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// put posx and y off from offset
|
||||||
|
pp->posx -= ox[min_ndx] - x[min_ndx];
|
||||||
|
pp->posy -= oy[min_ndx] - y[min_ndx];
|
||||||
|
|
||||||
|
return ret[min_ndx];
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
int MultiClipMove(PLAYERp pp, int z, int floor_dist)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
int ox[MAX_CLIPBOX],oy[MAX_CLIPBOX];
|
||||||
|
SPRITEp sp = pp->sop->sp_child;
|
||||||
|
USERp u = User[sp - sprite];
|
||||||
|
SECTOR_OBJECTp sop = pp->sop;
|
||||||
|
short ang;
|
||||||
|
short min_ndx;
|
||||||
|
int min_dist = 999999;
|
||||||
|
int dist;
|
||||||
|
|
||||||
|
int ret_start;
|
||||||
|
int ret[MAX_CLIPBOX];
|
||||||
|
int x[MAX_CLIPBOX],y[MAX_CLIPBOX];
|
||||||
|
|
||||||
|
for (i = 0; i < sop->clipbox_num; i++)
|
||||||
|
{
|
||||||
|
ang = NORM_ANGLE(pp->pang + sop->clipbox_ang[i]);
|
||||||
|
ox[i] = x[i] = pp->posx + (sop->clipbox_vdist[i] * sintable[NORM_ANGLE(ang + 512)] >> 14);
|
||||||
|
oy[i] = y[i] = pp->posy + (sop->clipbox_vdist[i] * sintable[ang] >> 14);
|
||||||
|
|
||||||
|
// move the box
|
||||||
|
//pushmove(&x[i], &y[i], &z, &pp->cursectnum, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||||
|
ret[i] = clipmove(&x[i], &y[i], &z, &pp->cursectnum, pp->xvect, pp->yvect, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||||
|
//pushmove(&x[i], &y[i], &z, &pp->cursectnum, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||||
|
|
||||||
|
// save the dist moved
|
||||||
|
dist = FindDistance2D(x[i] - ox[i], y[i] - oy[i]);
|
||||||
|
|
||||||
|
if (dist < min_dist)
|
||||||
|
{
|
||||||
|
min_dist = dist;
|
||||||
|
min_ndx = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// put posx and y off from offset
|
||||||
|
pp->posx -= ox[min_ndx] - x[min_ndx];
|
||||||
|
pp->posy -= oy[min_ndx] - y[min_ndx];
|
||||||
|
|
||||||
|
return ret[min_ndx];
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
int MultiClipMove(PLAYERp pp, int z, int floor_dist)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
int ox[MAX_CLIPBOX],oy[MAX_CLIPBOX];
|
||||||
|
SPRITEp sp = pp->sop->sp_child;
|
||||||
|
USERp u = User[sp - sprite];
|
||||||
|
SECTOR_OBJECTp sop = pp->sop;
|
||||||
|
short ang;
|
||||||
|
short min_ndx;
|
||||||
|
int min_dist = 999999;
|
||||||
|
int dist;
|
||||||
|
|
||||||
|
int ret_start;
|
||||||
|
int ret[MAX_CLIPBOX];
|
||||||
|
int x[MAX_CLIPBOX],y[MAX_CLIPBOX];
|
||||||
|
|
||||||
|
int xvect,yvect;
|
||||||
|
int xs,ys;
|
||||||
|
|
||||||
|
for (i = 0; i < sop->clipbox_num; i++)
|
||||||
|
{
|
||||||
|
// move the box to position instead of using offset- this prevents small rounding errors
|
||||||
|
// allowing you to move through wall
|
||||||
|
ang = NORM_ANGLE(pp->pang + sop->clipbox_ang[i]);
|
||||||
|
|
||||||
|
xs = pp->posx;
|
||||||
|
ys = pp->posy;
|
||||||
|
|
||||||
|
xvect = (sop->clipbox_vdist[i] * sintable[NORM_ANGLE(ang + 512)]);
|
||||||
|
yvect = (sop->clipbox_vdist[i] * sintable[ang]);
|
||||||
|
ret_start = clipmove(&xs, &ys, &z, &pp->cursectnum, xvect, yvect, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||||
|
|
||||||
|
// save off the start position
|
||||||
|
ox[i] = x[i] = xs;
|
||||||
|
oy[i] = y[i] = ys;
|
||||||
|
|
||||||
|
// move the box
|
||||||
|
ret[i] = clipmove(&x[i], &y[i], &z, &pp->cursectnum, pp->xvect, pp->yvect, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||||
|
|
||||||
|
// save the dist moved
|
||||||
|
dist = ksqrt(SQ(x[i] - ox[i]) + SQ(y[i] - oy[i]));
|
||||||
|
//dist = FindDistance2D(x[i] - ox[i], y[i] - oy[i]);
|
||||||
|
|
||||||
|
if (ret[i])
|
||||||
|
{
|
||||||
|
//DSPRINTF(ds,"i %d, ret %d, dist %d",i, ret[i], dist);
|
||||||
|
//printf("%s\n",ds);
|
||||||
|
MONO_PRINT(ds);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dist < min_dist)
|
||||||
|
{
|
||||||
|
min_dist = dist;
|
||||||
|
min_ndx = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// put posx and y off from offset
|
||||||
|
pp->posx -= ox[min_ndx] - x[min_ndx];
|
||||||
|
pp->posy -= oy[min_ndx] - y[min_ndx];
|
||||||
|
|
||||||
|
return ret[min_ndx];
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
int MultiClipMove(PLAYERp pp, int z, int floor_dist)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
int ox[MAX_CLIPBOX],oy[MAX_CLIPBOX];
|
||||||
|
SPRITEp sp = pp->sop->sp_child;
|
||||||
|
USERp u = User[sp - sprite];
|
||||||
|
SECTOR_OBJECTp sop = pp->sop;
|
||||||
|
short ang;
|
||||||
|
short min_ndx;
|
||||||
|
int min_dist = 999999;
|
||||||
|
int dist;
|
||||||
|
|
||||||
|
int ret_start;
|
||||||
|
int ret[MAX_CLIPBOX];
|
||||||
|
int x[MAX_CLIPBOX],y[MAX_CLIPBOX];
|
||||||
|
|
||||||
|
int xvect,yvect;
|
||||||
|
int xs,ys;
|
||||||
|
|
||||||
|
for (i = 0; i < sop->clipbox_num; i++)
|
||||||
|
{
|
||||||
|
// move the box to position instead of using offset- this prevents small rounding errors
|
||||||
|
// allowing you to move through wall
|
||||||
|
ang = NORM_ANGLE(pp->pang + sop->clipbox_ang[i]);
|
||||||
|
|
||||||
|
xs = pp->posx;
|
||||||
|
ys = pp->posy;
|
||||||
|
|
||||||
|
xvect = (sop->clipbox_vdist[i] * sintable[NORM_ANGLE(ang + 512)]);
|
||||||
|
yvect = (sop->clipbox_vdist[i] * sintable[ang]);
|
||||||
|
ret_start = clipmove(&xs, &ys, &z, &pp->cursectnum, xvect, yvect, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||||
|
|
||||||
|
if (ret_start)
|
||||||
|
{
|
||||||
|
// hit something moving into position
|
||||||
|
min_dist = 0;
|
||||||
|
min_ndx = i;
|
||||||
|
// ox is where it should be
|
||||||
|
ox[i] = x[i] = pp->posx + (sop->clipbox_vdist[i] * sintable[NORM_ANGLE(ang + 512)] >> 14);
|
||||||
|
oy[i] = y[i] = pp->posy + (sop->clipbox_vdist[i] * sintable[ang] >> 14);
|
||||||
|
|
||||||
|
x[i] = xs;
|
||||||
|
y[i] = ys;
|
||||||
|
|
||||||
|
dist = ksqrt(SQ(x[i] - ox[i]) + SQ(y[i] - oy[i]));
|
||||||
|
//ox[i] = x[i] = oy[i] = y[i] = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// save off the start position
|
||||||
|
ox[i] = x[i] = xs;
|
||||||
|
oy[i] = y[i] = ys;
|
||||||
|
|
||||||
|
// move the box
|
||||||
|
ret[i] = clipmove(&x[i], &y[i], &z, &pp->cursectnum, pp->xvect, pp->yvect, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||||
|
|
||||||
|
// save the dist moved
|
||||||
|
dist = ksqrt(SQ(x[i] - ox[i]) + SQ(y[i] - oy[i]));
|
||||||
|
//dist = FindDistance2D(x[i] - ox[i], y[i] - oy[i]);
|
||||||
|
|
||||||
|
if (ret[i])
|
||||||
|
{
|
||||||
|
//DSPRINTF(ds,"i %d, ret %d, dist %d",i, ret[i], dist);
|
||||||
|
MONO_PRINT(ds);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dist < min_dist)
|
||||||
|
{
|
||||||
|
min_dist = dist;
|
||||||
|
min_ndx = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// put posx and y off from offset
|
||||||
|
pp->posx -= ox[min_ndx] - x[min_ndx];
|
||||||
|
pp->posy -= oy[min_ndx] - y[min_ndx];
|
||||||
|
|
||||||
|
return ret[min_ndx];
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int MultiClipMove(PLAYERp pp, int z, int floor_dist)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
int ox[MAX_CLIPBOX],oy[MAX_CLIPBOX];
|
||||||
|
SPRITEp sp = pp->sop->sp_child;
|
||||||
|
USERp u = User[sp - sprite];
|
||||||
|
SECTOR_OBJECTp sop = pp->sop;
|
||||||
|
short ang;
|
||||||
|
short min_ndx = 0;
|
||||||
|
int min_dist = 999999;
|
||||||
|
int dist;
|
||||||
|
|
||||||
|
int ret_start;
|
||||||
|
int ret;
|
||||||
|
int min_ret=0;
|
||||||
|
int x[MAX_CLIPBOX],y[MAX_CLIPBOX];
|
||||||
|
|
||||||
|
int xvect,yvect;
|
||||||
|
int xs,ys;
|
||||||
|
|
||||||
|
for (i = 0; i < sop->clipbox_num; i++)
|
||||||
|
{
|
||||||
|
// move the box to position instead of using offset- this prevents small rounding errors
|
||||||
|
// allowing you to move through wall
|
||||||
|
ang = NORM_ANGLE(pp->pang + sop->clipbox_ang[i]);
|
||||||
|
|
||||||
|
xs = pp->posx;
|
||||||
|
ys = pp->posy;
|
||||||
|
|
||||||
|
xvect = (sop->clipbox_vdist[i] * sintable[NORM_ANGLE(ang + 512)]);
|
||||||
|
yvect = (sop->clipbox_vdist[i] * sintable[ang]);
|
||||||
|
clipmoveboxtracenum = 1;
|
||||||
|
ret_start = clipmove(&xs, &ys, &z, &pp->cursectnum, xvect, yvect, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||||
|
clipmoveboxtracenum = 3;
|
||||||
|
|
||||||
|
if (ret_start)
|
||||||
|
{
|
||||||
|
// hit something moving into start position
|
||||||
|
min_dist = 0;
|
||||||
|
min_ndx = i;
|
||||||
|
// ox is where it should be
|
||||||
|
ox[i] = x[i] = pp->posx + (sop->clipbox_vdist[i] * sintable[NORM_ANGLE(ang + 512)] >> 14);
|
||||||
|
oy[i] = y[i] = pp->posy + (sop->clipbox_vdist[i] * sintable[ang] >> 14);
|
||||||
|
|
||||||
|
// xs is where it hit
|
||||||
|
x[i] = xs;
|
||||||
|
y[i] = ys;
|
||||||
|
|
||||||
|
// see the dist moved
|
||||||
|
dist = ksqrt(SQ(x[i] - ox[i]) + SQ(y[i] - oy[i]));
|
||||||
|
|
||||||
|
// save it off
|
||||||
|
if (dist < min_dist)
|
||||||
|
{
|
||||||
|
min_dist = dist;
|
||||||
|
min_ndx = i;
|
||||||
|
min_ret = ret_start;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// save off the start position
|
||||||
|
ox[i] = x[i] = xs;
|
||||||
|
oy[i] = y[i] = ys;
|
||||||
|
|
||||||
|
// move the box
|
||||||
|
ret = clipmove(&x[i], &y[i], &z, &pp->cursectnum, pp->xvect, pp->yvect, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||||
|
|
||||||
|
// save the dist moved
|
||||||
|
dist = ksqrt(SQ(x[i] - ox[i]) + SQ(y[i] - oy[i]));
|
||||||
|
|
||||||
|
if (ret)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dist < min_dist)
|
||||||
|
{
|
||||||
|
min_dist = dist;
|
||||||
|
min_ndx = i;
|
||||||
|
min_ret = ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// put posx and y off from offset
|
||||||
|
pp->posx += x[min_ndx] - ox[min_ndx];
|
||||||
|
pp->posy += y[min_ndx] - oy[min_ndx];
|
||||||
|
|
||||||
|
return min_ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
short MultiClipTurn(PLAYERp pp, short new_ang, int z, int floor_dist)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
SECTOR_OBJECTp sop = pp->sop;
|
||||||
|
int ret;
|
||||||
|
int x,y;
|
||||||
|
short ang;
|
||||||
|
int xvect, yvect;
|
||||||
|
short cursectnum = pp->cursectnum;
|
||||||
|
|
||||||
|
for (i = 0; i < sop->clipbox_num; i++)
|
||||||
|
{
|
||||||
|
ang = NORM_ANGLE(new_ang + sop->clipbox_ang[i]);
|
||||||
|
|
||||||
|
x = pp->posx;
|
||||||
|
y = pp->posy;
|
||||||
|
|
||||||
|
xvect = (sop->clipbox_vdist[i] * sintable[NORM_ANGLE(ang + 512)]);
|
||||||
|
yvect = (sop->clipbox_vdist[i] * sintable[ang]);
|
||||||
|
|
||||||
|
// move the box
|
||||||
|
ret = clipmove(&x, &y, &z, &cursectnum, xvect, yvect, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||||
|
|
||||||
|
ASSERT(cursectnum >= 0);
|
||||||
|
|
||||||
|
if (ret)
|
||||||
|
{
|
||||||
|
// attempt to move a bit when turning against a wall
|
||||||
|
//ang = NORM_ANGLE(ang + 1024);
|
||||||
|
//pp->xvect += 20 * sintable[NORM_ANGLE(ang + 512)];
|
||||||
|
//pp->yvect += 20 * sintable[ang];
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
int testquadinsect(int *point_num, int qx[], int qy[], short sectnum)
|
||||||
|
{
|
||||||
|
int i,next_i;
|
||||||
|
|
||||||
|
*point_num = -1;
|
||||||
|
|
||||||
|
for (i=0; i < 4; i++)
|
||||||
|
{
|
||||||
|
if (!inside(qx[i], qy[i], sectnum))
|
||||||
|
{
|
||||||
|
////DSPRINTF(ds,"inside %ld failed",i);
|
||||||
|
//MONO_PRINT(ds);
|
||||||
|
|
||||||
|
*point_num = i;
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i=0; i<4; i++)
|
||||||
|
{
|
||||||
|
next_i = MOD4(i+1);
|
||||||
|
if (!cansee(qx[i], qy[i],0x3fffffff, sectnum,
|
||||||
|
qx[next_i], qy[next_i],0x3fffffff, sectnum))
|
||||||
|
{
|
||||||
|
DSPRINTF(ds,"cansee %ld failed, x1 %d, y1 %d, x2 %d, y2 %d, sectnum %d",i, qx[i], qy[i], qx[next_i], qy[next_i], sectnum);
|
||||||
|
MONO_PRINT(ds);
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//Ken gives the tank clippin' a try...
|
||||||
|
int RectClipMove(PLAYERp pp, int *qx, int *qy)
|
||||||
|
{
|
||||||
|
SECTORp *sectp;
|
||||||
|
SECTOR_OBJECTp sop = pp->sop;
|
||||||
|
WALLp wp;
|
||||||
|
int count=0;
|
||||||
|
int i, x[4], y[4];
|
||||||
|
short startwall,endwall;
|
||||||
|
int point_num;
|
||||||
|
|
||||||
|
for (i = 0; i < 4; i++)
|
||||||
|
{
|
||||||
|
x[i] = qx[i] + (pp->xvect>>14);
|
||||||
|
y[i] = qy[i] + (pp->yvect>>14);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Given the 4 points: x[4], y[4]
|
||||||
|
if (testquadinsect(&point_num, x, y, pp->cursectnum))
|
||||||
|
{
|
||||||
|
pp->posx += (pp->xvect>>14);
|
||||||
|
pp->posy += (pp->yvect>>14);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (point_num < 0)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
if ((point_num == 0) || (point_num == 3)) //Left side bad - strafe right
|
||||||
|
{
|
||||||
|
for (i = 0; i < 4; i++)
|
||||||
|
{
|
||||||
|
x[i] = qx[i] - (pp->yvect>>15);
|
||||||
|
y[i] = qy[i] + (pp->xvect>>15);
|
||||||
|
}
|
||||||
|
if (testquadinsect(&point_num, x, y, pp->cursectnum))
|
||||||
|
{
|
||||||
|
pp->posx -= (pp->yvect>>15);
|
||||||
|
pp->posy += (pp->xvect>>15);
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((point_num == 1) || (point_num == 2)) //Right side bad - strafe left
|
||||||
|
{
|
||||||
|
for (i = 0; i < 4; i++)
|
||||||
|
{
|
||||||
|
x[i] = qx[i] + (pp->yvect>>15);
|
||||||
|
y[i] = qy[i] - (pp->xvect>>15);
|
||||||
|
}
|
||||||
|
if (testquadinsect(&point_num, x, y, pp->cursectnum))
|
||||||
|
{
|
||||||
|
pp->posx += (pp->yvect>>15);
|
||||||
|
pp->posy -= (pp->xvect>>15);
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
int testpointinquad(int x, int y, int *qx, int *qy)
|
||||||
|
{
|
||||||
|
int i, cnt, x1, y1, x2, y2;
|
||||||
|
|
||||||
|
cnt = 0;
|
||||||
|
for (i=0; i<4; i++)
|
||||||
|
{
|
||||||
|
y1 = qy[i]-y;
|
||||||
|
y2 = qy[(i+1)&3]-y;
|
||||||
|
if ((y1^y2) >= 0) continue;
|
||||||
|
|
||||||
|
x1 = qx[i]-x;
|
||||||
|
x2 = qx[(i+1)&3]-x;
|
||||||
|
if ((x1^x2) >= 0)
|
||||||
|
cnt ^= x1;
|
||||||
|
else
|
||||||
|
cnt ^= (x1*y2-x2*y1)^y2;
|
||||||
|
}
|
||||||
|
return cnt>>31;
|
||||||
|
}
|
||||||
|
|
||||||
|
short RectClipTurn(PLAYERp pp, short new_ang, int *qx, int *qy, int *ox, int *oy)
|
||||||
|
{
|
||||||
|
int i, x[4], y[4];
|
||||||
|
SECTOR_OBJECTp sop = pp->sop;
|
||||||
|
int ret;
|
||||||
|
short ang;
|
||||||
|
short rot_ang;
|
||||||
|
int point_num;
|
||||||
|
|
||||||
|
rot_ang = NORM_ANGLE(new_ang + sop->spin_ang - sop->ang_orig);
|
||||||
|
for (i = 0; i < 4; i++)
|
||||||
|
{
|
||||||
|
rotatepoint(pp->posx, pp->posy, ox[i], oy[i], rot_ang, &x[i], &y[i]);
|
||||||
|
// cannot use sop->xmid and ymid because the SO is off the map at this point
|
||||||
|
//rotatepoint(sop->xmid, sop->ymid, ox[i], oy[i], rot_ang, &x[i], &y[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Given the 4 points: x[4], y[4]
|
||||||
|
if (testquadinsect(&point_num, x, y, pp->cursectnum))
|
||||||
|
{
|
||||||
|
// move to new pos
|
||||||
|
for (i = 0; i < 4; i++)
|
||||||
|
{
|
||||||
|
qx[i] = x[i];
|
||||||
|
qy[i] = y[i];
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (point_num < 0)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
35
polymer/eduke32/source/sw/src/mclip.h
Normal file
35
polymer/eduke32/source/sw/src/mclip.h
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#define RECT_CLIP 1
|
||||||
|
|
||||||
|
int MultiClipMove(PLAYERp pp, int z, int floor_dist);
|
||||||
|
short MultiClipTurn(PLAYERp pp, short new_ang, int z, int floor_dist);
|
||||||
|
int testquadinsect(int *point_num, int *qx, int *qy, short sectnum);
|
||||||
|
int RectClipMove(PLAYERp pp, int *qx, int *qy);
|
||||||
|
int testpointinquad(int x, int y, int *qx, int *qy);
|
||||||
|
//short RectClipTurn(PLAYERp pp, short new_ang, int z, int floor_dist, int *qx, int *qy);
|
||||||
|
short RectClipTurn(PLAYERp pp, short new_ang, int *qx, int *qy, int *ox, int *oy);
|
82
polymer/eduke32/source/sw/src/mdastr.c
Normal file
82
polymer/eduke32/source/sw/src/mdastr.c
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
#include "build.h"
|
||||||
|
|
||||||
|
#include "mytypes.h"
|
||||||
|
#include "keys.h"
|
||||||
|
#include "names2.h"
|
||||||
|
//#include "panel.h"
|
||||||
|
#include "game.h"
|
||||||
|
|
||||||
|
// macros this function needs
|
||||||
|
//#define MK_FP(seg,ofs) ((void _seg *)(seg)+(void near *)(ofs))
|
||||||
|
//#define PokeByte(a,b,c) (*((char far *)MK_FP((a),(b)))=(char)(c))
|
||||||
|
|
||||||
|
//#if DEBUG
|
||||||
|
VOID
|
||||||
|
PokeStringMono(BYTE Attr, BYTEp String)
|
||||||
|
{
|
||||||
|
fprintf(stderr,"MONO: %s\n",String);
|
||||||
|
#if 0
|
||||||
|
// Scrolls the monochrome display up one line, then prints the
|
||||||
|
// string with the desired attribute on the bottom line.
|
||||||
|
|
||||||
|
// EXAMPLE: PokeStringMono(MDA_NORMAL, "Hello, world.");
|
||||||
|
|
||||||
|
BYTEp Src, Dest;
|
||||||
|
LONGp s,d;
|
||||||
|
static char MonoBuf[4000];
|
||||||
|
|
||||||
|
#define BASE (MonoBuf)
|
||||||
|
#define LINE_SIZE 160
|
||||||
|
#define LINE_OFFSET(num) ((80*2)*(num))
|
||||||
|
|
||||||
|
// First scroll the screen up one line.
|
||||||
|
// copy lines 1-24 up to 0
|
||||||
|
s = (LONGp)(BASE + LINE_SIZE);
|
||||||
|
d = (LONGp)BASE;
|
||||||
|
memmove(d,s,LINE_OFFSET(24));
|
||||||
|
|
||||||
|
// clear bottom line
|
||||||
|
Dest = BASE + LINE_OFFSET(24);
|
||||||
|
//memset(Dest,0,LINE_SIZE);
|
||||||
|
memset(Dest,'.',LINE_SIZE);
|
||||||
|
|
||||||
|
// Now print the string on the bottom line.
|
||||||
|
Src = String;
|
||||||
|
Dest = BASE + LINE_OFFSET(24);
|
||||||
|
|
||||||
|
while (*Src)
|
||||||
|
{
|
||||||
|
*Dest++ = *Src++;
|
||||||
|
*Dest++ = Attr;
|
||||||
|
}
|
||||||
|
|
||||||
|
memcpy((char *)0xB0000, MonoBuf, sizeof(MonoBuf));
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
//#endif
|
||||||
|
|
5282
polymer/eduke32/source/sw/src/menus.c
Normal file
5282
polymer/eduke32/source/sw/src/menus.c
Normal file
File diff suppressed because it is too large
Load diff
341
polymer/eduke32/source/sw/src/menus.h
Normal file
341
polymer/eduke32/source/sw/src/menus.h
Normal file
|
@ -0,0 +1,341 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// MENUS.H
|
||||||
|
// Contains type definitions for all pop up menus
|
||||||
|
|
||||||
|
#ifndef MENUS_PUBLIC_
|
||||||
|
#define MENUS_PUBLIC_
|
||||||
|
|
||||||
|
#define MENU_SHADE_DEFAULT 0
|
||||||
|
#define MENU_SHADE_INACTIVE 20
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
ct_mainmenu, ct_savemenu, ct_loadmenu, ct_soundmenu, ct_optionmenu, ct_quickloadmenu,
|
||||||
|
ct_quitmenu, ct_ordermenu, ct_episodemenu, ct_max
|
||||||
|
} CTLType;
|
||||||
|
|
||||||
|
extern BOOL UsingMenus;
|
||||||
|
extern int SENSITIVITY;
|
||||||
|
extern CTLType ControlPanelType;
|
||||||
|
extern SHORT MenuTextShade;
|
||||||
|
extern SHORT MenuTextPalette;
|
||||||
|
|
||||||
|
// Prototypes
|
||||||
|
//void MNU_DoMenu( CTLType type, PLAYERp pp );
|
||||||
|
void MNU_InitMenus(void);
|
||||||
|
//void (*CustomRefresh)(void);
|
||||||
|
//void MNU_Refresh( void );
|
||||||
|
void MNU_DrawMenu(void); // This is used in drawscreen to refresh menus in
|
||||||
|
// multiplay situations.
|
||||||
|
void MNU_CheckForMenus(void);
|
||||||
|
void MNU_CheckForMenusAnyKey(void);
|
||||||
|
void MNU_MeasureString(const char *string, short *w, short *h);
|
||||||
|
void MNU_DrawString(short x, short y, const char *string, short shade, short pal);
|
||||||
|
void MNU_MeasureSmallString(const char *string,short *w,short *h);
|
||||||
|
void MNU_DrawSmallString(short x,short y,const char *string,short shade,short pal);
|
||||||
|
void MNU_MeasureStringLarge(const char *string, short *w, short *h);
|
||||||
|
void MNU_DrawStringLarge(short x, short y, const char *string);
|
||||||
|
|
||||||
|
// Functions from my other engine
|
||||||
|
//void Get_Palette (unsigned char *pal);
|
||||||
|
//void Set_Palette(unsigned char *buff);
|
||||||
|
//void Fade_Timer(int clicks);
|
||||||
|
void FadeIn(unsigned char targetcolor, unsigned int clicks);
|
||||||
|
void FadeOut(unsigned char targetcolor, unsigned int clicks);
|
||||||
|
VOID ResetPalette(PLAYERp pp);
|
||||||
|
|
||||||
|
void ExitMenus(void);
|
||||||
|
VOID ResetMenuInput(VOID);
|
||||||
|
|
||||||
|
#define BUTTONSET(x,value) \
|
||||||
|
( \
|
||||||
|
((x)>31) ? \
|
||||||
|
(CONTROL_ButtonState2 |= (value<<((x)-32))) : \
|
||||||
|
(CONTROL_ButtonState1 |= (value<<(x))) \
|
||||||
|
)
|
||||||
|
|
||||||
|
extern BOOL BorderAdjust;
|
||||||
|
extern int FXDevice,MusicDevice;
|
||||||
|
extern BOOL MultiPlayQuitFlag;
|
||||||
|
|
||||||
|
// Make memcpy an intrinsic function for an easy frame rate boost
|
||||||
|
//#pragma intrinsic( memcpy );
|
||||||
|
|
||||||
|
// L O C A L V A R I A B L E S ////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// Default menu pic brightness
|
||||||
|
#define m_defshade 2
|
||||||
|
|
||||||
|
#define FLASHTIME 60 // One second per icon flash
|
||||||
|
|
||||||
|
// Defines for permanentwritesprite clipping box
|
||||||
|
#define M_CX1 0
|
||||||
|
#define M_CY1 0
|
||||||
|
#define M_CX2 319
|
||||||
|
#define M_CY2 199
|
||||||
|
|
||||||
|
#define MZ 65536
|
||||||
|
|
||||||
|
#define asc_Esc 27
|
||||||
|
#define asc_Enter 13
|
||||||
|
#define asc_Space 32
|
||||||
|
|
||||||
|
|
||||||
|
#define pic_none 0
|
||||||
|
#define pic_radiobuttn1 2816
|
||||||
|
#define pic_radiobuttn2 2817
|
||||||
|
#define pic_newgame 2819
|
||||||
|
#define pic_load 2820
|
||||||
|
#define pic_save 2821
|
||||||
|
#define pic_options 2822
|
||||||
|
#define pic_orderinfo 2823
|
||||||
|
#define pic_todemo 2824
|
||||||
|
#define pic_togame 2825
|
||||||
|
#define pic_quit 2826
|
||||||
|
#define pic_newgametitl 2827
|
||||||
|
#define pic_training 2828
|
||||||
|
#define pic_easy 2829
|
||||||
|
#define pic_normal 2830
|
||||||
|
#define pic_hard 2831
|
||||||
|
#define pic_impossible 2832
|
||||||
|
#define pic_optionstitl 2833
|
||||||
|
#define pic_endgame 2834
|
||||||
|
#define pic_detail 2835
|
||||||
|
#define pic_high 2836
|
||||||
|
#define pic_low 2837
|
||||||
|
#define pic_mousesense 2838
|
||||||
|
#define pic_soundvol 2839
|
||||||
|
#define pic_toggles 2845
|
||||||
|
#define pic_togglestitl 2844
|
||||||
|
#define pic_mousenable 2840
|
||||||
|
#define pic_joyenable 2841
|
||||||
|
#define pic_bobbing 2842
|
||||||
|
#define pic_slidelend 2846
|
||||||
|
#define pic_slidebar 2847
|
||||||
|
#define pic_sliderend 2848
|
||||||
|
#define pic_sliderknob 2849
|
||||||
|
#define pic_shuriken1 2850
|
||||||
|
#define pic_yinyang 2870
|
||||||
|
#define pic_soundtitl 2870
|
||||||
|
#define pic_sndfxvol 2871
|
||||||
|
#define pic_musicvol 2872
|
||||||
|
#define pic_episode1 2873
|
||||||
|
#define pic_episode2 2874
|
||||||
|
#define pic_episode3 2875
|
||||||
|
#define pic_modem 2876
|
||||||
|
#define pic_scrsize 2877
|
||||||
|
#define pic_loadsavecursor 2918
|
||||||
|
#define pic_loadgame 2915
|
||||||
|
#define pic_savegame 2916
|
||||||
|
#define pic_loading 2917
|
||||||
|
#define pic_loadsavescreen 2919
|
||||||
|
#define pic_loadsavescreenbak 2922
|
||||||
|
#define pic_savedescr 2924
|
||||||
|
#define pic_shadow_warrior 2366
|
||||||
|
|
||||||
|
// This is the current values set with all slider bar functions
|
||||||
|
#define SENSE_DEFAULT 10 // Default mouse sensitivity ** should be 5!!!
|
||||||
|
#define FXVOL_DEFAULT 8 // Default sound fx volume
|
||||||
|
#define MUSIC_DEFAULT 8 // Default music volume
|
||||||
|
#define SCRSIZE_DEFAULT 9 // Default screen size, max is 10
|
||||||
|
#define BRIGHTNESS_DEFAULT 0 // Default is no gamma-correction
|
||||||
|
#define BORDERTILE_DEFAULT 0 // Default is no gamma-correction
|
||||||
|
#define GAMETYPE_DEFAULT 0 // Regular DeathMatch
|
||||||
|
#define NETLEVEL_DEFAULT 0 // Default is level 1 (0)
|
||||||
|
#define MONSTERS_DEFAULT 0 // No Monsters
|
||||||
|
#define KILLLIMIT_DEFAULT 0 // No kill limit
|
||||||
|
#define TIMELIMIT_DEFAULT 0 // None
|
||||||
|
#define PLAYERCOLOR_DEFAULT 0
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
sldr_none,
|
||||||
|
sldr_mouse, sldr_sndfxvolume, sldr_musicvolume, sldr_scrsize, sldr_brightness,
|
||||||
|
sldr_bordertile, sldr_gametype, sldr_netlevel, sldr_monsters, sldr_killlimit,
|
||||||
|
sldr_timelimit, sldr_playercolor, sldr_videores, sldr_videobpp,
|
||||||
|
sldr_mousescalex, sldr_mousescaley,
|
||||||
|
sldr_joyaxisscale, sldr_joyaxisanalog, sldr_joyaxisdead, sldr_joyaxissatur,
|
||||||
|
sldr_max
|
||||||
|
} SLDRType;
|
||||||
|
|
||||||
|
|
||||||
|
#define MAX_SLDR_WIDTH 16 // maximum size of slider before x is compressed
|
||||||
|
|
||||||
|
#define SLDR_MOUSESENSEMAX 20
|
||||||
|
#define SLDR_SNDFXVOLMAX 16
|
||||||
|
#define SLDR_MUSICVOLMAX 16
|
||||||
|
#define SLDR_SCRSIZEMAX 14
|
||||||
|
#define SLDR_BRIGHTNESSMAX 8
|
||||||
|
#define SLDR_BORDERTILEMAX (isShareware ? 21 : 38) // counted from border.c
|
||||||
|
#define SLDR_GAMETYPEMAX 3
|
||||||
|
|
||||||
|
#define SLDR_NETLEVELMAX_REG 28
|
||||||
|
#define SLDR_NETLEVELMAX_SW 4
|
||||||
|
#define SLDR_NETLEVELMAX (isShareware ? SLDR_NETLEVELMAX_SW : SLDR_NETLEVELMAX_REG)
|
||||||
|
|
||||||
|
#define SLDR_MONSTERSMAX 5 // Skill Levels
|
||||||
|
#define SLDR_KILLLIMITMAX 11 // Increments of 10 up to 100, 1 is no limit
|
||||||
|
#define SLDR_TIMELIMITMAX 9
|
||||||
|
#define SLDR_PLAYERCOLORMAX 8 // Up to 8 players different colors
|
||||||
|
|
||||||
|
|
||||||
|
#define MOUSE_SENS_MAX_VALUE (1<<16)
|
||||||
|
#define MUSIC_VOL_MAX_VALUE 255
|
||||||
|
#define FX_VOL_MAX_VALUE 255
|
||||||
|
|
||||||
|
// These are all the toggle button settings
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
btn_none, btn_auto_run, btn_crosshair, btn_auto_aim,
|
||||||
|
btn_mouse_aim, btn_messages, btn_mouse_invert, btn_bobbing, btn_shadows,
|
||||||
|
btn_sound, btn_music, btn_talking, btn_ambience, btn_flipstereo,
|
||||||
|
btn_res0, btn_res1, btn_res2, btn_res3, btn_res4, btn_res5, btn_res6,
|
||||||
|
btn_markers, btn_teamplay, btn_friendlyfire,btn_parental,btn_nuke,
|
||||||
|
btn_voxels, btn_stats, btn_playcd,
|
||||||
|
btn_videofs,
|
||||||
|
btn_max
|
||||||
|
} BTNType;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
mf_normal = BIT(0),
|
||||||
|
mf_pushed = BIT(1),
|
||||||
|
mf_selected = BIT(2),
|
||||||
|
mf_disabled = BIT(3),
|
||||||
|
mf_separated = BIT(4)
|
||||||
|
} MenuFlags;
|
||||||
|
|
||||||
|
#define MenuSelectFlags (mf_pushed | mf_selected | mf_disabled)
|
||||||
|
#define MenuDrawFlags (ROTATE_SPRITE_SCREEN_CLIP)
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
mt_none,
|
||||||
|
mt_inert, mt_slider, mt_button, mt_option, mt_layer
|
||||||
|
} MenuTag;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
uc_setup, uc_draw, uc_touchup, uc_hit
|
||||||
|
} UserCall;
|
||||||
|
|
||||||
|
typedef struct MENU_ITEM
|
||||||
|
{
|
||||||
|
MenuTag type; // What kind of item is this on the
|
||||||
|
// menu?
|
||||||
|
MenuFlags flags; // Menu item flags
|
||||||
|
SLDRType slider; // Slider type, if any
|
||||||
|
BTNType button; // Button state, if any
|
||||||
|
unsigned char hotkey; // First letter of item
|
||||||
|
char *text; // Text appearing in item, if any.
|
||||||
|
void *child; // Should be menugroup, used to spawn
|
||||||
|
// sub-groups from items.
|
||||||
|
int x, y; // x,y position on screen.
|
||||||
|
short pic; // Startpic to use
|
||||||
|
char shade; // Shade of pic
|
||||||
|
int tics; // Ticcount for item
|
||||||
|
BOOL(*custom)(void); // Work function on item select
|
||||||
|
|
||||||
|
BOOL (*preprocess)(struct MENU_ITEM *);
|
||||||
|
BOOL (*postprocess)(struct MENU_ITEM *); // Can do things on items select
|
||||||
|
} MenuItem, *MenuItem_p;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
int x, y; // Menu x,y position on screen.
|
||||||
|
char *text;
|
||||||
|
MenuItem_p items; // Array of menu items for this menu.
|
||||||
|
short titlepic; // Used to draw title on menu with.
|
||||||
|
short cursorpic; // Pic used for menu cursor, 1st in
|
||||||
|
// anim sequence if animated.
|
||||||
|
char shade; // Title pic shade
|
||||||
|
|
||||||
|
BOOL(*draw_custom)(UserCall, MenuItem *); // Custom routine
|
||||||
|
BOOL(*move_custom)(UserCall, MenuItem *); // Custom routine
|
||||||
|
|
||||||
|
short cursor; // This is the current menu item the
|
||||||
|
// cursor is resting on.
|
||||||
|
} MenuGroup, *MenuGroup_p;
|
||||||
|
|
||||||
|
// Custom Routine Prototypes ////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
BOOL MNU_QuitCustom(UserCall call, MenuItem *item);
|
||||||
|
BOOL MNU_QuickLoadCustom(UserCall call, MenuItem *item);
|
||||||
|
BOOL MNU_LoadSaveTouchupCustom(UserCall call, MenuItem *item);
|
||||||
|
BOOL MNU_DoParentalPassword(UserCall call, MenuItem *item);
|
||||||
|
BOOL MNU_OrderCustom(UserCall call, MenuItem *item);
|
||||||
|
BOOL MNU_DoEpisodeSelect(UserCall call, MenuItem *item);
|
||||||
|
|
||||||
|
BOOL MNU_MusicFxCheck(MenuItem_p item);
|
||||||
|
BOOL MNU_MusicCheck(MenuItem_p item);
|
||||||
|
BOOL MNU_FxCheck(MenuItem_p item);
|
||||||
|
BOOL MNU_MouseCheck(MenuItem_p item);
|
||||||
|
BOOL MNU_JoystickCheck(MenuItem_p item);
|
||||||
|
BOOL MNU_BorderCheck(MenuItem_p item);
|
||||||
|
BOOL MNU_ShareWareCheck(MenuItem_p item);
|
||||||
|
BOOL MNU_MenuLevelCheck(MenuItem_p item);
|
||||||
|
BOOL MNU_ShareWareMessage(MenuItem_p item);
|
||||||
|
|
||||||
|
// Custom MenuItem Routines /////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
BOOL MNU_StartGame(void);
|
||||||
|
BOOL MNU_StartNetGame(void);
|
||||||
|
BOOL MNU_EpisodeCustom(void);
|
||||||
|
BOOL MNU_GetDescripCustom(void);
|
||||||
|
BOOL MNU_LoadGameCustom(void);
|
||||||
|
BOOL MNU_SaveGameCustom(void);
|
||||||
|
BOOL MNU_GetLoadCustom(void);
|
||||||
|
BOOL MNU_GetSaveCustom(void);
|
||||||
|
BOOL MNU_ParentalCustom(void);
|
||||||
|
BOOL MNU_KeySetupCustom(UserCall call, MenuItem *item);
|
||||||
|
BOOL MNU_LoadModernDefaults(void);
|
||||||
|
BOOL MNU_LoadClassicDefaults(void);
|
||||||
|
|
||||||
|
// Menu Definitions /////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#define DefInert(key,text) mt_inert,mf_normal,sldr_none,btn_none,key,text,NULL
|
||||||
|
#define DefSlider(slider,key,text) mt_slider,mf_normal,slider,btn_none,key,text,NULL
|
||||||
|
#define DefOption(key,text) mt_option,mf_normal,sldr_none,btn_none,key,text,NULL
|
||||||
|
#define DefButton(button,key,text) mt_button,mf_normal,sldr_none,button,key,text,NULL
|
||||||
|
#define DefLayer(key,text,child) mt_layer,mf_normal,sldr_none,btn_none,key,text,child
|
||||||
|
|
||||||
|
#define DefDisabled(key,text,child) mt_layer,mf_disabled,sldr_none,btn_none,key,text,child
|
||||||
|
#define DefNone mt_none,0,0,0,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL
|
||||||
|
|
||||||
|
#define OPT_XS 30
|
||||||
|
#define OPT_YS 30
|
||||||
|
#define OPT_XSIDE (OPT_XS + 120)
|
||||||
|
#define OPT_YINC 10
|
||||||
|
#define OPT_LINE(line) (OPT_YS + (OPT_YINC * (line)))
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
int x,y;
|
||||||
|
} VMODE;
|
||||||
|
|
||||||
|
#endif
|
64
polymer/eduke32/source/sw/src/mfile.h
Normal file
64
polymer/eduke32/source/sw/src/mfile.h
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#define FILE_ANSI_STD 0
|
||||||
|
#define FILE_KEN 1
|
||||||
|
#define FILE_DOS 2
|
||||||
|
|
||||||
|
//#define FILE_TYPE FILE_ANSI_STD
|
||||||
|
#define FILE_TYPE FILE_KEN
|
||||||
|
|
||||||
|
#if FILE_TYPE == FILE_ANSI_STD
|
||||||
|
typedef FILE *MFILE;
|
||||||
|
#define MREAD(ptr, size, num,handle) fread((ptr),(size),(num),(handle))
|
||||||
|
#define MWRITE(ptr, size, num,handle) fwrite((ptr),(size),(num),(handle))
|
||||||
|
#define MOPEN_WRITE(name) fopen(name,"wb")
|
||||||
|
#define MOPEN_READ(name) fopen(name,"rb")
|
||||||
|
#define MCLOSE(handle) fclose(handle)
|
||||||
|
#define MF_ERR 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if FILE_TYPE == FILE_KEN
|
||||||
|
typedef FILE *MFILE;
|
||||||
|
size_t dfread(void *, size_t, size_t, FILE *);
|
||||||
|
size_t dfwrite(void *, size_t, size_t, FILE *);
|
||||||
|
#define MREAD(ptr, size, num,handle) dfread((ptr),(size),(num),(handle))
|
||||||
|
#define MWRITE(ptr, size, num,handle) dfwrite((ptr),(size),(num),(handle))
|
||||||
|
#define MOPEN_WRITE(name) fopen(name,"wb")
|
||||||
|
#define MOPEN_READ(name) fopen(name,"rb")
|
||||||
|
#define MCLOSE(handle) fclose(handle)
|
||||||
|
#define MF_ERR 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if FILE_TYPE == FILE_DOS
|
||||||
|
typedef long MFILE;
|
||||||
|
#define MREAD(ptr, size, num,handle) read((handle),(ptr),(size)*(num))
|
||||||
|
#define MWRITE(ptr, size, num,handle) write((handle),(ptr),(size)*(num))
|
||||||
|
#define MOPEN_WRITE(name) open(name,O_BINARY|O_TRUNC|O_CREAT|O_WRONLY,S_IREAD|S_IWRITE)
|
||||||
|
#define MOPEN_READ(name) open(name,O_BINARY|O_RDWR,S_IREAD)
|
||||||
|
#define MCLOSE(handle) close(handle)
|
||||||
|
#define MF_ERR -1
|
||||||
|
#endif
|
2213
polymer/eduke32/source/sw/src/miscactr.c
Normal file
2213
polymer/eduke32/source/sw/src/miscactr.c
Normal file
File diff suppressed because it is too large
Load diff
588
polymer/eduke32/source/sw/src/morph.c
Normal file
588
polymer/eduke32/source/sw/src/morph.c
Normal file
|
@ -0,0 +1,588 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
#include "build.h"
|
||||||
|
|
||||||
|
#include "names2.h"
|
||||||
|
#include "panel.h"
|
||||||
|
//#include "keys.h"
|
||||||
|
#include "tags.h"
|
||||||
|
#include "sector.h"
|
||||||
|
#include "ai.h"
|
||||||
|
#include "player.h"
|
||||||
|
#include "game.h"
|
||||||
|
|
||||||
|
VOID ScaleSectorObject(SECTOR_OBJECTp);
|
||||||
|
|
||||||
|
short
|
||||||
|
DoSectorObjectSetScale(short match)
|
||||||
|
{
|
||||||
|
SECTOR_OBJECTp sop;
|
||||||
|
|
||||||
|
for (sop = SectorObject; sop < &SectorObject[MAX_SECTOR_OBJECTS]; sop++)
|
||||||
|
{
|
||||||
|
if (sop->xmid == MAXLONG)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (sop->match_event == match)
|
||||||
|
{
|
||||||
|
SET(sop->flags, SOBJ_DYNAMIC);
|
||||||
|
sop->PreMoveAnimator = ScaleSectorObject;
|
||||||
|
|
||||||
|
switch (sop->scale_active_type)
|
||||||
|
{
|
||||||
|
case SO_SCALE_RANDOM_POINT:
|
||||||
|
if (sop->scale_type == SO_SCALE_HOLD || sop->scale_type == SO_SCALE_NONE)
|
||||||
|
{
|
||||||
|
// if holding start it up
|
||||||
|
sop->scale_type = sop->scale_active_type;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// if moving set to hold
|
||||||
|
sop->scale_type = SO_SCALE_HOLD;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SO_SCALE_DEST:
|
||||||
|
|
||||||
|
sop->scale_type = sop->scale_active_type;
|
||||||
|
|
||||||
|
if (sop->scale_dist == sop->scale_dist_max)
|
||||||
|
{
|
||||||
|
// make it negative
|
||||||
|
if (sop->scale_speed > 0)
|
||||||
|
sop->scale_speed = -sop->scale_speed;
|
||||||
|
}
|
||||||
|
else if (sop->scale_dist == sop->scale_dist_min)
|
||||||
|
{
|
||||||
|
// make it positive
|
||||||
|
if (sop->scale_speed < 0)
|
||||||
|
sop->scale_speed = -sop->scale_speed;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// make it positive
|
||||||
|
if (sop->scale_speed < 0)
|
||||||
|
sop->scale_speed = -sop->scale_speed;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SO_SCALE_RANDOM:
|
||||||
|
case SO_SCALE_CYCLE:
|
||||||
|
if (sop->scale_type == SO_SCALE_HOLD)
|
||||||
|
{
|
||||||
|
// if holding start it up
|
||||||
|
sop->scale_type = sop->scale_active_type;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// if moving set to hold
|
||||||
|
sop->scale_type = SO_SCALE_HOLD;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
short
|
||||||
|
DoSOevent(short match, short state)
|
||||||
|
{
|
||||||
|
SECTOR_OBJECTp sop;
|
||||||
|
SPRITEp me_sp;
|
||||||
|
short vel_adj=0, spin_adj=0;
|
||||||
|
|
||||||
|
for (sop = SectorObject; sop < &SectorObject[MAX_SECTOR_OBJECTS]; sop++)
|
||||||
|
{
|
||||||
|
if (sop->xmid == MAXLONG)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (sop->match_event == match)
|
||||||
|
{
|
||||||
|
if (TEST(sop->flags, SOBJ_WAIT_FOR_EVENT))
|
||||||
|
{
|
||||||
|
if (sop->save_vel > 0 || sop->save_spin_speed > 0)
|
||||||
|
{
|
||||||
|
RESET(sop->flags, SOBJ_WAIT_FOR_EVENT);
|
||||||
|
sop->vel = sop->save_vel;
|
||||||
|
sop->spin_speed = sop->save_spin_speed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sop->match_event_sprite == -1)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
me_sp = &sprite[sop->match_event_sprite];
|
||||||
|
|
||||||
|
// toggle
|
||||||
|
if (state == -1)
|
||||||
|
{
|
||||||
|
if (TEST_BOOL3(me_sp))
|
||||||
|
{
|
||||||
|
RESET_BOOL3(me_sp);
|
||||||
|
state = OFF;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SET_BOOL3(me_sp);
|
||||||
|
state = ON;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (state == ON)
|
||||||
|
{
|
||||||
|
spin_adj = (int)SP_TAG3(me_sp);
|
||||||
|
vel_adj = SP_TAG7(me_sp);
|
||||||
|
}
|
||||||
|
else if (state == OFF)
|
||||||
|
{
|
||||||
|
spin_adj = -(int)SP_TAG3(me_sp);
|
||||||
|
vel_adj = -SP_TAG7(me_sp);
|
||||||
|
}
|
||||||
|
|
||||||
|
sop->spin_speed += spin_adj;
|
||||||
|
|
||||||
|
if (TEST_BOOL1(me_sp))
|
||||||
|
sop->vel_tgt += vel_adj;
|
||||||
|
else
|
||||||
|
sop->vel += vel_adj;
|
||||||
|
|
||||||
|
if (TEST_BOOL2(me_sp))
|
||||||
|
{
|
||||||
|
sop->dir *= -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// SCALING - PreAnimator
|
||||||
|
//
|
||||||
|
|
||||||
|
VOID ScaleSectorObject(SECTOR_OBJECTp sop)
|
||||||
|
{
|
||||||
|
switch (sop->scale_type)
|
||||||
|
{
|
||||||
|
case SO_SCALE_NONE:
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SO_SCALE_HOLD:
|
||||||
|
break;
|
||||||
|
|
||||||
|
// to dest
|
||||||
|
case SO_SCALE_DEST:
|
||||||
|
sop->scale_dist += sop->scale_speed;
|
||||||
|
|
||||||
|
if (sop->scale_dist > sop->scale_dist_max)
|
||||||
|
{
|
||||||
|
sop->scale_dist = sop->scale_dist_max;
|
||||||
|
sop->scale_type = SO_SCALE_HOLD;
|
||||||
|
}
|
||||||
|
else if (sop->scale_dist < sop->scale_dist_min)
|
||||||
|
{
|
||||||
|
sop->scale_dist = sop->scale_dist_min;
|
||||||
|
sop->scale_type = SO_SCALE_HOLD;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
// random direction change
|
||||||
|
case SO_SCALE_RANDOM:
|
||||||
|
|
||||||
|
sop->scale_dist += sop->scale_speed;
|
||||||
|
if (sop->scale_dist > sop->scale_dist_max)
|
||||||
|
{
|
||||||
|
sop->scale_speed *= -1;
|
||||||
|
sop->scale_dist = sop->scale_dist_max;
|
||||||
|
}
|
||||||
|
else if (sop->scale_dist < sop->scale_dist_min)
|
||||||
|
{
|
||||||
|
sop->scale_speed *= -1;
|
||||||
|
sop->scale_dist = sop->scale_dist_min;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (RANDOM_P2(1024) < sop->scale_rand_freq<<3)
|
||||||
|
{
|
||||||
|
sop->scale_speed *= -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
// cycle through max and min
|
||||||
|
case SO_SCALE_CYCLE:
|
||||||
|
sop->scale_dist += sop->scale_speed;
|
||||||
|
|
||||||
|
if (sop->scale_dist > sop->scale_dist_max)
|
||||||
|
{
|
||||||
|
sop->scale_speed *= -1;
|
||||||
|
sop->scale_dist = sop->scale_dist_max;
|
||||||
|
}
|
||||||
|
else if (sop->scale_dist < sop->scale_dist_min)
|
||||||
|
{
|
||||||
|
sop->scale_speed *= -1;
|
||||||
|
sop->scale_dist = sop->scale_dist_min;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID ScaleRandomPoint(SECTOR_OBJECTp sop, short k, short ang, int x, int y, int *dx, int *dy)
|
||||||
|
{
|
||||||
|
int xmul,ymul;
|
||||||
|
|
||||||
|
sop->scale_point_dist[k] += sop->scale_point_speed[k];
|
||||||
|
if (sop->scale_point_dist[k] > sop->scale_point_dist_max)
|
||||||
|
{
|
||||||
|
sop->scale_point_speed[k] *= -1;
|
||||||
|
sop->scale_point_dist[k] = sop->scale_point_dist_max;
|
||||||
|
}
|
||||||
|
else if (sop->scale_point_dist[k] < sop->scale_point_dist_min)
|
||||||
|
{
|
||||||
|
sop->scale_point_speed[k] *= -1;
|
||||||
|
sop->scale_point_dist[k] = sop->scale_point_dist_min;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (RANDOM_P2(1024) < sop->scale_point_rand_freq)
|
||||||
|
{
|
||||||
|
sop->scale_point_speed[k] *= -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// change up speed at random
|
||||||
|
if (RANDOM_P2(1024) < (sop->scale_point_rand_freq/2))
|
||||||
|
{
|
||||||
|
//sop->scale_point_speed[k] = SCALE_POINT_SPEED;
|
||||||
|
short half = sop->scale_point_base_speed/2;
|
||||||
|
short quart = sop->scale_point_base_speed/4;
|
||||||
|
sop->scale_point_speed[k] = sop->scale_point_base_speed + (RANDOM_RANGE(half) - quart);
|
||||||
|
}
|
||||||
|
|
||||||
|
xmul = (sop->scale_point_dist[k] * sop->scale_x_mult)>>8;
|
||||||
|
ymul = (sop->scale_point_dist[k] * sop->scale_y_mult)>>8;
|
||||||
|
|
||||||
|
*dx = x + ((xmul * sintable[NORM_ANGLE(ang+512)]) >> 14);
|
||||||
|
*dy = y + ((ymul * sintable[ang]) >> 14);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Morph point - move point around
|
||||||
|
//
|
||||||
|
|
||||||
|
VOID
|
||||||
|
MorphTornado(SECTOR_OBJECTp sop)
|
||||||
|
{
|
||||||
|
int mx, my;
|
||||||
|
int ceilingz;
|
||||||
|
int floorz;
|
||||||
|
SECTORp *sectp;
|
||||||
|
int j;
|
||||||
|
int x,y,sx,sy;
|
||||||
|
|
||||||
|
// z direction
|
||||||
|
ASSERT(sop->op_main_sector >= 0);
|
||||||
|
sop->morph_z += Z(sop->morph_z_speed);
|
||||||
|
|
||||||
|
// move vector
|
||||||
|
if (sop->morph_wall_point < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// place at correct x,y offset from center
|
||||||
|
x = sop->xmid - sop->morph_xoff;
|
||||||
|
y = sop->ymid - sop->morph_yoff;
|
||||||
|
|
||||||
|
sx = x;
|
||||||
|
sy = y;
|
||||||
|
|
||||||
|
// move it from last x,y
|
||||||
|
mx = x + (((sop->morph_speed) * sintable[NORM_ANGLE(sop->morph_ang+512)]) >> 14);
|
||||||
|
my = y + (((sop->morph_speed) * sintable[sop->morph_ang]) >> 14);
|
||||||
|
|
||||||
|
// bound check radius
|
||||||
|
if (ksqrt(SQ(sop->xmid - mx) + SQ(sop->ymid - my)) > sop->morph_dist_max + sop->scale_dist)
|
||||||
|
{
|
||||||
|
// find angle
|
||||||
|
sop->morph_ang = NORM_ANGLE(getangle(mx - sop->xmid, my - sop->ymid));
|
||||||
|
// reverse angle
|
||||||
|
sop->morph_ang = NORM_ANGLE(sop->morph_ang + 1024);
|
||||||
|
|
||||||
|
// move back some from last point
|
||||||
|
mx = sx + (((sop->morph_speed*2) * sintable[NORM_ANGLE(sop->morph_ang+512)]) >> 14);
|
||||||
|
my = sy + (((sop->morph_speed*2) * sintable[sop->morph_ang]) >> 14);
|
||||||
|
|
||||||
|
sop->morph_xoff = sop->xmid - mx;
|
||||||
|
sop->morph_yoff = sop->ymid - my;
|
||||||
|
}
|
||||||
|
|
||||||
|
// save x,y back as offset info
|
||||||
|
sop->morph_xoff = sop->xmid - mx;
|
||||||
|
sop->morph_yoff = sop->ymid - my;
|
||||||
|
|
||||||
|
if ((RANDOM_P2(1024<<4)>>4) < sop->morph_rand_freq)
|
||||||
|
sop->morph_ang = RANDOM_P2(2048);
|
||||||
|
|
||||||
|
// move it x,y
|
||||||
|
dragpoint(sop->morph_wall_point, mx, my);
|
||||||
|
|
||||||
|
// bound the Z
|
||||||
|
ceilingz = sector[sop->op_main_sector].ceilingz;
|
||||||
|
floorz = sector[sop->op_main_sector].floorz;
|
||||||
|
|
||||||
|
for (sectp = sop->sectp, j = 0; *sectp; sectp++, j++)
|
||||||
|
{
|
||||||
|
if (SectUser[*sectp - sector] &&
|
||||||
|
TEST(SectUser[*sectp - sector]->flags, SECTFU_SO_SLOPE_CEILING_TO_POINT))
|
||||||
|
{
|
||||||
|
#define TOR_LOW (floorz)
|
||||||
|
if (sop->morph_z > TOR_LOW)
|
||||||
|
{
|
||||||
|
sop->morph_z_speed *= -1;
|
||||||
|
sop->morph_z = TOR_LOW;
|
||||||
|
}
|
||||||
|
else if (sop->morph_z < ceilingz)
|
||||||
|
{
|
||||||
|
sop->morph_z_speed *= -1;
|
||||||
|
sop->morph_z = ceilingz;
|
||||||
|
}
|
||||||
|
|
||||||
|
alignceilslope(*sectp - sector, mx, my, sop->morph_z);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// moves center point around and aligns slope
|
||||||
|
VOID
|
||||||
|
MorphFloor(SECTOR_OBJECTp sop)
|
||||||
|
{
|
||||||
|
int mx, my;
|
||||||
|
int floorz;
|
||||||
|
SECTORp *sectp;
|
||||||
|
int j;
|
||||||
|
int x,y;
|
||||||
|
|
||||||
|
// z direction
|
||||||
|
ASSERT(sop->op_main_sector >= 0);
|
||||||
|
sop->morph_z -= Z(sop->morph_z_speed);
|
||||||
|
|
||||||
|
// move vector
|
||||||
|
if (sop->morph_wall_point < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// place at correct x,y offset from center
|
||||||
|
x = sop->xmid - sop->morph_xoff;
|
||||||
|
y = sop->ymid - sop->morph_yoff;
|
||||||
|
|
||||||
|
// move it from last x,y
|
||||||
|
mx = x + (((sop->morph_speed) * sintable[NORM_ANGLE(sop->morph_ang+512)]) >> 14);
|
||||||
|
my = y + (((sop->morph_speed) * sintable[sop->morph_ang]) >> 14);
|
||||||
|
|
||||||
|
// save x,y back as offset info
|
||||||
|
sop->morph_xoff = sop->xmid - mx;
|
||||||
|
sop->morph_yoff = sop->ymid - my;
|
||||||
|
|
||||||
|
// bound check radius
|
||||||
|
if (Distance(sop->xmid, sop->ymid, mx, my) > sop->morph_dist_max)
|
||||||
|
{
|
||||||
|
// go in the other direction
|
||||||
|
//sop->morph_speed *= -1;
|
||||||
|
sop->morph_ang = NORM_ANGLE(sop->morph_ang + 1024);
|
||||||
|
|
||||||
|
// back it up and save it off
|
||||||
|
mx = x + (((sop->morph_speed) * sintable[NORM_ANGLE(sop->morph_ang+512)]) >> 14);
|
||||||
|
my = y + (((sop->morph_speed) * sintable[sop->morph_ang]) >> 14);
|
||||||
|
sop->morph_xoff = sop->xmid - mx;
|
||||||
|
sop->morph_yoff = sop->ymid - my;
|
||||||
|
|
||||||
|
// turn it all the way around and then do a random -512 to 512 from there
|
||||||
|
//sop->morph_ang = NORM_ANGLE(sop->morph_ang + 1024 + (RANDOM_P2(1024) - 512));
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((RANDOM_P2(1024<<4)>>4) < sop->morph_rand_freq)
|
||||||
|
sop->morph_ang = RANDOM_P2(2048);
|
||||||
|
|
||||||
|
// move x,y point "just like in build"
|
||||||
|
dragpoint(sop->morph_wall_point, mx, my);
|
||||||
|
|
||||||
|
// bound the Z
|
||||||
|
floorz = sector[sop->op_main_sector].floorz;
|
||||||
|
|
||||||
|
#define MORPH_FLOOR_ZRANGE Z(300)
|
||||||
|
|
||||||
|
if (sop->morph_z > MORPH_FLOOR_ZRANGE)
|
||||||
|
{
|
||||||
|
sop->morph_z = MORPH_FLOOR_ZRANGE;
|
||||||
|
//sop->morph_ang = NORM_ANGLE(sop->morph_ang + 1024);
|
||||||
|
sop->morph_z_speed *= -1;
|
||||||
|
}
|
||||||
|
else if (sop->morph_z < -MORPH_FLOOR_ZRANGE)
|
||||||
|
{
|
||||||
|
sop->morph_z = -MORPH_FLOOR_ZRANGE;
|
||||||
|
//sop->morph_ang = NORM_ANGLE(sop->morph_ang + 1024);
|
||||||
|
sop->morph_z_speed *= -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (sectp = sop->sectp, j = 0; *sectp; sectp++, j++)
|
||||||
|
{
|
||||||
|
if (SectUser[*sectp - sector] &&
|
||||||
|
TEST(SectUser[*sectp - sector]->flags, SECTFU_SO_SLOPE_CEILING_TO_POINT))
|
||||||
|
{
|
||||||
|
alignflorslope(*sectp - sector, mx, my, floorz + sop->morph_z);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
SOBJ_AlignFloorToPoint(SECTOR_OBJECTp sop, int x, int y, int z)
|
||||||
|
{
|
||||||
|
SECTORp *sectp;
|
||||||
|
int j;
|
||||||
|
|
||||||
|
for (sectp = sop->sectp, j = 0; *sectp; sectp++, j++)
|
||||||
|
{
|
||||||
|
if (SectUser[*sectp - sector] &&
|
||||||
|
TEST(SectUser[*sectp - sector]->flags, SECTFU_SO_SLOPE_CEILING_TO_POINT))
|
||||||
|
{
|
||||||
|
alignflorslope(*sectp - sector, x, y, z);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
SOBJ_AlignCeilingToPoint(SECTOR_OBJECTp sop, int x, int y, int z)
|
||||||
|
{
|
||||||
|
SECTORp *sectp;
|
||||||
|
int j;
|
||||||
|
|
||||||
|
for (sectp = sop->sectp, j = 0; *sectp; sectp++, j++)
|
||||||
|
{
|
||||||
|
if (SectUser[*sectp - sector] &&
|
||||||
|
TEST(SectUser[*sectp - sector]->flags, SECTFU_SO_SLOPE_CEILING_TO_POINT))
|
||||||
|
{
|
||||||
|
alignceilslope(*sectp - sector, x, y, z);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
SOBJ_AlignFloorCeilingToPoint(SECTOR_OBJECTp sop, int x, int y, int z)
|
||||||
|
{
|
||||||
|
SECTORp *sectp;
|
||||||
|
int j;
|
||||||
|
|
||||||
|
for (sectp = sop->sectp, j = 0; *sectp; sectp++, j++)
|
||||||
|
{
|
||||||
|
if (SectUser[*sectp - sector] &&
|
||||||
|
TEST(SectUser[*sectp - sector]->flags, SECTFU_SO_SLOPE_CEILING_TO_POINT))
|
||||||
|
{
|
||||||
|
alignflorslope(*sectp - sector, x, y, z);
|
||||||
|
alignceilslope(*sectp - sector, x, y, z);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// moves center point around and aligns slope
|
||||||
|
VOID
|
||||||
|
SpikeFloor(SECTOR_OBJECTp sop)
|
||||||
|
{
|
||||||
|
int mx, my;
|
||||||
|
int floorz;
|
||||||
|
SECTORp *sectp;
|
||||||
|
int j;
|
||||||
|
int x,y;
|
||||||
|
|
||||||
|
// z direction
|
||||||
|
ASSERT(sop->op_main_sector >= 0);
|
||||||
|
sop->morph_z -= Z(sop->morph_z_speed);
|
||||||
|
|
||||||
|
// move vector
|
||||||
|
if (sop->morph_wall_point < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// place at correct x,y offset from center
|
||||||
|
x = sop->xmid - sop->morph_xoff;
|
||||||
|
y = sop->ymid - sop->morph_yoff;
|
||||||
|
|
||||||
|
// move it from last x,y
|
||||||
|
mx = x;
|
||||||
|
my = y;
|
||||||
|
|
||||||
|
// bound the Z
|
||||||
|
floorz = sector[sop->op_main_sector].floorz;
|
||||||
|
|
||||||
|
#define MORPH_FLOOR_ZRANGE Z(300)
|
||||||
|
|
||||||
|
if (sop->morph_z > MORPH_FLOOR_ZRANGE)
|
||||||
|
{
|
||||||
|
sop->morph_z = MORPH_FLOOR_ZRANGE;
|
||||||
|
sop->morph_z_speed *= -1;
|
||||||
|
}
|
||||||
|
else if (sop->morph_z < -MORPH_FLOOR_ZRANGE)
|
||||||
|
{
|
||||||
|
sop->morph_z = -MORPH_FLOOR_ZRANGE;
|
||||||
|
sop->morph_z_speed *= -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
SOBJ_AlignFloorToPoint(sop, mx, my, floorz + sop->morph_z);
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
for (sectp = sop->sectp, j = 0; *sectp; sectp++, j++)
|
||||||
|
{
|
||||||
|
if (SectUser[*sectp - sector] &&
|
||||||
|
TEST(SectUser[*sectp - sector]->flags, SECTFU_SO_SLOPE_CEILING_TO_POINT))
|
||||||
|
{
|
||||||
|
alignflorslope(*sectp - sector, mx, my, floorz + sop->morph_z);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#include "saveable.h"
|
||||||
|
|
||||||
|
static saveable_code saveable_morph_code[] =
|
||||||
|
{
|
||||||
|
SAVE_CODE(DoSectorObjectSetScale),
|
||||||
|
SAVE_CODE(DoSOevent),
|
||||||
|
SAVE_CODE(ScaleSectorObject),
|
||||||
|
SAVE_CODE(ScaleRandomPoint),
|
||||||
|
SAVE_CODE(MorphTornado),
|
||||||
|
SAVE_CODE(MorphFloor),
|
||||||
|
SAVE_CODE(SOBJ_AlignFloorToPoint),
|
||||||
|
SAVE_CODE(SOBJ_AlignCeilingToPoint),
|
||||||
|
SAVE_CODE(SOBJ_AlignFloorCeilingToPoint),
|
||||||
|
SAVE_CODE(SpikeFloor),
|
||||||
|
};
|
||||||
|
|
||||||
|
saveable_module saveable_morph =
|
||||||
|
{
|
||||||
|
// code
|
||||||
|
saveable_morph_code,
|
||||||
|
SIZ(saveable_morph_code),
|
||||||
|
|
||||||
|
// data
|
||||||
|
NULL,0
|
||||||
|
};
|
321
polymer/eduke32/source/sw/src/mytypes.h
Normal file
321
polymer/eduke32/source/sw/src/mytypes.h
Normal file
|
@ -0,0 +1,321 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef TYPES_H
|
||||||
|
|
||||||
|
#define TYPES_H
|
||||||
|
|
||||||
|
// CTW ADDITION (from Duke 3d TYPES.H)
|
||||||
|
typedef unsigned char uint8;
|
||||||
|
typedef uint8 byte;
|
||||||
|
typedef signed char int8;
|
||||||
|
|
||||||
|
typedef unsigned short int uint16;
|
||||||
|
typedef uint16 word;
|
||||||
|
typedef short int int16;
|
||||||
|
|
||||||
|
typedef unsigned int uint32;
|
||||||
|
typedef int int32;
|
||||||
|
typedef uint32 dword;
|
||||||
|
|
||||||
|
typedef int32 fixed;
|
||||||
|
typedef int32 boolean;
|
||||||
|
typedef float float32;
|
||||||
|
typedef double float64;
|
||||||
|
//typedef long double float128;
|
||||||
|
typedef float64 appfloat;
|
||||||
|
|
||||||
|
#define MAXINT32 0x7fffffff
|
||||||
|
#define MININT32 -0x80000000
|
||||||
|
#define MAXUINT32 0xffffffff
|
||||||
|
#define MINUINT32 0
|
||||||
|
|
||||||
|
#define MAXINT16 0x7fff
|
||||||
|
#define MININT16 -0x8000
|
||||||
|
#define MAXUINT16 0xffff
|
||||||
|
#define MINUINT16 0
|
||||||
|
// CTW ADDITION END
|
||||||
|
|
||||||
|
#define FALSE 0
|
||||||
|
#define TRUE (!FALSE)
|
||||||
|
|
||||||
|
#ifndef NULL
|
||||||
|
#define NULL 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define OFF 0
|
||||||
|
#define ON (!OFF)
|
||||||
|
|
||||||
|
typedef unsigned char BOOL;
|
||||||
|
typedef BOOL *BOOLp;
|
||||||
|
typedef BOOL *fBOOLp;
|
||||||
|
|
||||||
|
|
||||||
|
typedef signed char CHAR;
|
||||||
|
typedef CHAR *CHARp;
|
||||||
|
typedef CHAR *fCHARp;
|
||||||
|
|
||||||
|
#define MINCHAR ((CHAR) -128)
|
||||||
|
#define MAXCHAR ((CHAR) 127)
|
||||||
|
|
||||||
|
|
||||||
|
typedef short SHORT;
|
||||||
|
typedef SHORT *SHORTp;
|
||||||
|
typedef SHORT *fSHORTp;
|
||||||
|
|
||||||
|
typedef unsigned short USHORT;
|
||||||
|
typedef USHORT *USHORTp;
|
||||||
|
typedef USHORT *fUSHORTp;
|
||||||
|
|
||||||
|
typedef unsigned char UCHAR;
|
||||||
|
typedef UCHAR *UCHARp;
|
||||||
|
typedef UCHAR *fUCHARp;
|
||||||
|
|
||||||
|
#define MINUCHAR ((UCHAR) 0)
|
||||||
|
#define MAXUCHAR ((UCHAR) 255)
|
||||||
|
|
||||||
|
|
||||||
|
typedef UCHARp TEXT;
|
||||||
|
typedef fUCHARp fTEXT;
|
||||||
|
|
||||||
|
|
||||||
|
typedef UCHAR BYTE;
|
||||||
|
typedef BYTE *BYTEp;
|
||||||
|
typedef BYTE *fBYTEp;
|
||||||
|
|
||||||
|
#define MINBYTE ((BYTE) 0)
|
||||||
|
#define MAXBYTE ((BYTE) 255)
|
||||||
|
|
||||||
|
|
||||||
|
typedef int INT;
|
||||||
|
typedef int *INTp;
|
||||||
|
typedef int *fINTp;
|
||||||
|
|
||||||
|
#define MININT (-32768)
|
||||||
|
#define MAXINT 32767
|
||||||
|
|
||||||
|
typedef unsigned int WORD;
|
||||||
|
typedef WORD *WORDp;
|
||||||
|
typedef WORD *fWORDp;
|
||||||
|
|
||||||
|
#define MINWORD ((WORD) 0)
|
||||||
|
#define MAXWORD ((WORD) 65535U)
|
||||||
|
|
||||||
|
|
||||||
|
typedef int LONG;
|
||||||
|
typedef LONG *LONGp;
|
||||||
|
typedef LONG *fLONGp;
|
||||||
|
|
||||||
|
typedef
|
||||||
|
union
|
||||||
|
{
|
||||||
|
LONG l;
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
WORD lsw;
|
||||||
|
WORD msw;
|
||||||
|
} w;
|
||||||
|
} DD, * DDp, * fDDp;
|
||||||
|
|
||||||
|
#define MINLONG (-2147483648L)
|
||||||
|
#define MAXLONG (2147483647L)
|
||||||
|
|
||||||
|
|
||||||
|
typedef unsigned int ULONG;
|
||||||
|
typedef ULONG *ULONGp;
|
||||||
|
typedef ULONG *fULONGp;
|
||||||
|
|
||||||
|
#define MINULONG (0L)
|
||||||
|
#define MAXULONG (ULONG(-1))
|
||||||
|
|
||||||
|
typedef float FLOAT;
|
||||||
|
typedef FLOAT *FLOATp;
|
||||||
|
typedef FLOAT *fFLOATp;
|
||||||
|
|
||||||
|
|
||||||
|
#define VOID void
|
||||||
|
|
||||||
|
typedef VOID *nPTR;
|
||||||
|
typedef VOID *fPTR;
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
#define FN pascal
|
||||||
|
#define fFN pascal
|
||||||
|
#define cFN cdecl
|
||||||
|
#define fcFN cdecl
|
||||||
|
#else
|
||||||
|
#define FN
|
||||||
|
#define fFN
|
||||||
|
#define cFN
|
||||||
|
#define fcFN
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef VOID FN VOIDfn (VOID);
|
||||||
|
typedef BOOL FN BOOLfn (VOID);
|
||||||
|
typedef CHAR FN CHARfn (VOID);
|
||||||
|
typedef SHORT FN SHORTfn (VOID);
|
||||||
|
typedef UCHAR FN UCHARfn (VOID);
|
||||||
|
typedef TEXT FN TEXTfn (VOID);
|
||||||
|
typedef fTEXT FN fTEXTfn (VOID);
|
||||||
|
typedef BYTE FN BYTEfn (VOID);
|
||||||
|
typedef int FN INTfn (VOID);
|
||||||
|
typedef WORD FN WORDfn (VOID);
|
||||||
|
typedef LONG FN LONGfn (VOID);
|
||||||
|
typedef ULONG FN ULONGfn (VOID);
|
||||||
|
|
||||||
|
typedef VOID fFN VOIDfFN (VOID);
|
||||||
|
typedef BOOL fFN BOOLfFN (VOID);
|
||||||
|
typedef CHAR fFN CHARfFN (VOID);
|
||||||
|
typedef SHORT fFN SHORTfFN (VOID);
|
||||||
|
typedef UCHAR fFN UCHARfFN (VOID);
|
||||||
|
typedef TEXT fFN TEXTfFN (VOID);
|
||||||
|
typedef fTEXT fFN fTEXTfFN (VOID);
|
||||||
|
typedef BYTE fFN BYTEfFN (VOID);
|
||||||
|
typedef int fFN INTfFN (VOID);
|
||||||
|
typedef WORD fFN WORDfFN (VOID);
|
||||||
|
typedef LONG fFN LONGfFN (VOID);
|
||||||
|
typedef ULONG fFN ULONGfFN (VOID);
|
||||||
|
|
||||||
|
/*
|
||||||
|
===========================
|
||||||
|
=
|
||||||
|
= FAST calculations
|
||||||
|
=
|
||||||
|
===========================
|
||||||
|
*/
|
||||||
|
|
||||||
|
// For fast DIVision of integers
|
||||||
|
|
||||||
|
#define DIV2(x) ((x) >> 1)
|
||||||
|
#define DIV4(x) ((x) >> 2)
|
||||||
|
#define DIV8(x) ((x) >> 3)
|
||||||
|
#define DIV16(x) ((x) >> 4)
|
||||||
|
#define DIV32(x) ((x) >> 5)
|
||||||
|
#define DIV64(x) ((x) >> 6)
|
||||||
|
#define DIV128(x) ((x) >> 7)
|
||||||
|
#define DIV256(x) ((x) >> 8)
|
||||||
|
|
||||||
|
// Constants used in fast mods
|
||||||
|
|
||||||
|
#define C_MOD2 1
|
||||||
|
#define C_MOD4 3
|
||||||
|
#define C_MOD8 7
|
||||||
|
#define C_MOD16 15
|
||||||
|
#define C_MOD32 31
|
||||||
|
#define C_MOD64 63
|
||||||
|
#define C_MOD128 127
|
||||||
|
#define C_MOD256 255
|
||||||
|
|
||||||
|
// Fast mods of select 2 power numbers
|
||||||
|
|
||||||
|
#define MOD2(x) ((x) & C_MOD2)
|
||||||
|
#define MOD4(x) ((x) & C_MOD4)
|
||||||
|
#define MOD8(x) ((x) & C_MOD8)
|
||||||
|
#define MOD16(x) ((x) & C_MOD16)
|
||||||
|
#define MOD32(x) ((x) & C_MOD32)
|
||||||
|
#define MOD64(x) ((x) & C_MOD64)
|
||||||
|
#define MOD128(x) ((x) & C_MOD128)
|
||||||
|
#define MOD256(x) ((x) & C_MOD256)
|
||||||
|
|
||||||
|
// Fast mods of any power of 2
|
||||||
|
|
||||||
|
#define MOD_P2(number,modby) ((number) & ((modby)-1))
|
||||||
|
|
||||||
|
// Truncates to select 2 power numbers
|
||||||
|
|
||||||
|
#define TRUNC2(x) ((x) & ~C_MOD2)
|
||||||
|
#define TRUNC4(x) ((x) & ~C_MOD4)
|
||||||
|
#define TRUNC8(x) ((x) & ~C_MOD8)
|
||||||
|
#define TRUNC16(x) ((x) & ~C_MOD16)
|
||||||
|
#define TRUNC32(x) ((x) & ~C_MOD32)
|
||||||
|
#define TRUNC64(x) ((x) & ~C_MOD64)
|
||||||
|
#define TRUNC128(x) ((x) & ~C_MOD128)
|
||||||
|
#define TRUNC256(x) ((x) & ~C_MOD256)
|
||||||
|
|
||||||
|
#define POWER2_TRUNC(number,truncby) ((number) & ~((truncby)-1))
|
||||||
|
|
||||||
|
// moves value to closest power of 2 pixel boundry
|
||||||
|
|
||||||
|
#define BOUND_2PIX(x) ( TRUNC2((x) + MOD2(x)) )
|
||||||
|
#define BOUND_4PIX(x) ( TRUNC4((x) + MOD4(x)) )
|
||||||
|
#define BOUND_8PIX(x) ( TRUNC8((x) + MOD8(x)) )
|
||||||
|
#define BOUND_16PIX(x) ( TRUNC16((x) + MOD16(x)) )
|
||||||
|
#define BOUND_32PIX(x) ( TRUNC32((x) + MOD32(x)) )
|
||||||
|
#define BOUND_64PIX(x) ( TRUNC64((x) + MOD64(x)) )
|
||||||
|
#define BOUND_128PIX(x) ( TRUNC128((x) + MOD128(x)) )
|
||||||
|
#define BOUND_256PIX(x) ( TRUNC256((x) + MOD256(x)) )
|
||||||
|
|
||||||
|
#define BOUND_POWER2_PIX(x,bound) ( POWER2_TRUNC((x,bound) + POWER2_MOD(x,bound)) )
|
||||||
|
|
||||||
|
// A few muls with shifts and adds
|
||||||
|
// probably not needed with good compiler
|
||||||
|
#define MUL2(x) ((x)*2)
|
||||||
|
#define MUL3(x) (((x)<<1) + (x))
|
||||||
|
#define MUL5(x) (((x)<<2) + (x))
|
||||||
|
#define MUL6(x) (((x)<<2) + (x) + (x))
|
||||||
|
#define MUL7(x) (((x)<<2) + (x) + (x) + (x))
|
||||||
|
#define MUL8(x) ((x)*8)
|
||||||
|
#define MUL9(x) (((x)<<3) + (x))
|
||||||
|
#define MUL10(x) (((x)<<3) + (x) + (x))
|
||||||
|
#define MUL11(x) (((x)<<3) + (x) + (x) + (x))
|
||||||
|
#define MUL12(x) (((x)<<3) + ((x)<<2))
|
||||||
|
#define MUL13(x) (((x)<<3) + ((x)<<2) + (x))
|
||||||
|
#define MUL14(x) (((x)<<3) + ((x)<<2) + (x) + (x))
|
||||||
|
#define MUL15(x) (((x)<<3) + ((x)<<2) + (x) + (x) + (x))
|
||||||
|
#define MUL16(x) ((x)*16)
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
===========================
|
||||||
|
=
|
||||||
|
= Bit manipulation
|
||||||
|
=
|
||||||
|
===========================
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define TEST(flags,mask) ((flags) & (mask))
|
||||||
|
#define SET(flags,mask) ((flags) |= (mask))
|
||||||
|
#define RESET(flags,mask) ((flags) &= ~(mask))
|
||||||
|
#define FLIP(flags,mask) ((flags) ^= (mask))
|
||||||
|
|
||||||
|
// mask definitions
|
||||||
|
|
||||||
|
#define BIT(shift) (1<<(shift))
|
||||||
|
|
||||||
|
/*
|
||||||
|
===========================
|
||||||
|
=
|
||||||
|
= Miscellaneous
|
||||||
|
=
|
||||||
|
===========================
|
||||||
|
*/
|
||||||
|
|
||||||
|
//#define ABS(num) ((num) < 0 ? -(num) : (num))
|
||||||
|
|
||||||
|
#define BETWEEN(x,low,high) (((x) >= (low)) && ((x) <= (high)))
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
94
polymer/eduke32/source/sw/src/names.h
Normal file
94
polymer/eduke32/source/sw/src/names.h
Normal file
|
@ -0,0 +1,94 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
//Be careful when changing this file - it is parsed by Editart and Build.
|
||||||
|
#define ALPHABET 85
|
||||||
|
#define MENU_MAIN 295
|
||||||
|
#define MENU_OPTION 296
|
||||||
|
#define MENU_WHICH 297
|
||||||
|
#define MENU_CURSOR 298
|
||||||
|
#define DART1 2000
|
||||||
|
#define DART2 2001
|
||||||
|
#define DART3 2002
|
||||||
|
#define DART4 2003
|
||||||
|
#define DART 2004
|
||||||
|
#define FIRE1 2005
|
||||||
|
#define FIRE2 2006
|
||||||
|
#define FIRE3 2007
|
||||||
|
#define FIRE4 2008
|
||||||
|
#define FIRE5 2009
|
||||||
|
#define FIREBALL1 2010
|
||||||
|
#define FIREBALL2 2011
|
||||||
|
#define FIREBALL3 2012
|
||||||
|
#define FIREBALL4 2013
|
||||||
|
#define FLAMES1 2014
|
||||||
|
#define FLAMES2 2015
|
||||||
|
#define FLAMES3 2016
|
||||||
|
#define FLAMES4 2017
|
||||||
|
#define FLAMES5 2018
|
||||||
|
#define GAS1 2019
|
||||||
|
#define GAS2 2020
|
||||||
|
#define GAS3 2021
|
||||||
|
#define GAS4 2022
|
||||||
|
#define GAS5 2023
|
||||||
|
#define GAS6 2024
|
||||||
|
#define GAS7 2025
|
||||||
|
#define GASCLOUD1 2026
|
||||||
|
#define GASCLOUD2 2027
|
||||||
|
#define GASCLOUD3 2028
|
||||||
|
#define GASCLOUD4 2029
|
||||||
|
#define GASCLOUD5 2030
|
||||||
|
#define GASCLOUD6 2031
|
||||||
|
#define GASCLOUD7 2032
|
||||||
|
#define GASCLOUD8 2033
|
||||||
|
#define GASCLOUD9 2034
|
||||||
|
#define LIGHT1 2035
|
||||||
|
#define LIGHT2 2036
|
||||||
|
#define LIGHT3 2037
|
||||||
|
#define LIGHT4 2038
|
||||||
|
#define LIGHT5 2039
|
||||||
|
#define LIGHT6 2040
|
||||||
|
#define ELECTRO1 2041
|
||||||
|
#define ELECTRO2 2042
|
||||||
|
#define ELECTRO3 2043
|
||||||
|
#define RIFLE1 2044
|
||||||
|
#define RIFLE2 2045
|
||||||
|
#define RIFLE3 2046
|
||||||
|
#define DONTUSE_EXTRA 2047
|
||||||
|
#define RIFLE4 2048
|
||||||
|
#define CARTRIGE3 2053
|
||||||
|
#define STATUE1 2054
|
||||||
|
#define STATUE2 2055
|
||||||
|
#define STATUE3 2056
|
||||||
|
#define STATUE4 2057
|
||||||
|
#define SWORD3 2065
|
||||||
|
#define SWORD4 2066
|
||||||
|
#define SWORD1 2067
|
||||||
|
#define SWORD2 2068
|
||||||
|
#define SWORD5 2069
|
||||||
|
#define BLACK___ 2306
|
||||||
|
#define FragBarErase 2375
|
||||||
|
#define FragBarErase2 2376
|
1249
polymer/eduke32/source/sw/src/names2.h
Normal file
1249
polymer/eduke32/source/sw/src/names2.h
Normal file
File diff suppressed because it is too large
Load diff
1626
polymer/eduke32/source/sw/src/net.c
Normal file
1626
polymer/eduke32/source/sw/src/net.c
Normal file
File diff suppressed because it is too large
Load diff
206
polymer/eduke32/source/sw/src/net.h
Normal file
206
polymer/eduke32/source/sw/src/net.h
Normal file
|
@ -0,0 +1,206 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#define PACKET_TYPE_MASTER_TO_SLAVE 0
|
||||||
|
#define PACKET_TYPE_SLAVE_TO_MASTER 1
|
||||||
|
//#define PACKET_TYPE_PLAYER_NAME 3
|
||||||
|
#define PACKET_TYPE_MESSAGE 4
|
||||||
|
//#define PACKET_TYPE_GAME_INFO 8
|
||||||
|
#define PACKET_TYPE_BROADCAST 17
|
||||||
|
#define SERVER_GENERATED_BROADCAST 18
|
||||||
|
#define PACKET_TYPE_PROXY 19
|
||||||
|
|
||||||
|
#define PACKET_TYPE_NEW_GAME 30
|
||||||
|
//#define PACKET_TYPE_NEW_LEVEL 31
|
||||||
|
#define PACKET_TYPE_PLAYER_OPTIONS 32
|
||||||
|
#define PACKET_TYPE_RTS 33
|
||||||
|
#define PACKET_TYPE_DUMMY 34
|
||||||
|
#define PACKET_TYPE_MENU_LEVEL_QUIT 35
|
||||||
|
#define PACKET_TYPE_NAME_CHANGE 36
|
||||||
|
#define PACKET_TYPE_VERSION 38
|
||||||
|
|
||||||
|
#define PACKET_TYPE_NULL_PACKET 127
|
||||||
|
#define PACKET_TYPE_PLAYER_READY 250
|
||||||
|
#define PACKET_TYPE_DONT_USE 255 // old logoff
|
||||||
|
|
||||||
|
#define BIT_CODEC TRUE
|
||||||
|
#define SYNC_TEST TRUE
|
||||||
|
#define MAXSYNCBYTES 16
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
# define PACKED __attribute__ ((packed))
|
||||||
|
#else
|
||||||
|
# define PACKED
|
||||||
|
# ifdef _MSC_VER
|
||||||
|
# pragma pack(1)
|
||||||
|
# endif
|
||||||
|
# ifdef __WATCOMC__
|
||||||
|
# pragma pack(push,1);
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Slave->Master: PlayerIndex = who to send the packet to (-1 = all)
|
||||||
|
// Master->Slave: PlayerIndex = who sent the packet originally
|
||||||
|
typedef struct PACKED
|
||||||
|
{
|
||||||
|
BYTE PacketType; // first byte is always packet type
|
||||||
|
BYTE PlayerIndex;
|
||||||
|
} PACKET_PROXY,*PACKET_PROXYp;
|
||||||
|
|
||||||
|
typedef struct PACKED
|
||||||
|
{
|
||||||
|
BYTE PacketType; // first byte is always packet type
|
||||||
|
BYTE FirstPlayerIndex;
|
||||||
|
BOOL AutoAim;
|
||||||
|
BYTE Level;
|
||||||
|
BYTE Episode;
|
||||||
|
CHAR Skill;
|
||||||
|
BYTE GameType;
|
||||||
|
BOOL HurtTeammate;
|
||||||
|
BOOL SpawnMarkers;
|
||||||
|
BOOL TeamPlay;
|
||||||
|
BYTE KillLimit;
|
||||||
|
BYTE TimeLimit;
|
||||||
|
BOOL Nuke;
|
||||||
|
} PACKET_NEW_GAME,*PACKET_NEW_GAMEp;
|
||||||
|
|
||||||
|
typedef struct PACKED
|
||||||
|
{
|
||||||
|
BYTE PacketType; // first byte is always packet type
|
||||||
|
BOOL AutoRun;
|
||||||
|
BYTE Color;
|
||||||
|
char PlayerName[32];
|
||||||
|
} PACKET_OPTIONS,*PACKET_OPTIONSp;
|
||||||
|
|
||||||
|
typedef struct PACKED
|
||||||
|
{
|
||||||
|
BYTE PacketType; // first byte is always packet type
|
||||||
|
char PlayerName[32];
|
||||||
|
} PACKET_NAME_CHANGE,*PACKET_NAME_CHANGEp;
|
||||||
|
|
||||||
|
typedef struct PACKED
|
||||||
|
{
|
||||||
|
BYTE PacketType; // first byte is always packet type
|
||||||
|
BYTE RTSnum;
|
||||||
|
} PACKET_RTS,*PACKET_RTSp;
|
||||||
|
|
||||||
|
typedef struct PACKED
|
||||||
|
{
|
||||||
|
BYTE PacketType; // first byte is always packet type
|
||||||
|
int Version;
|
||||||
|
} PACKET_VERSION,*PACKET_VERSIONp;
|
||||||
|
|
||||||
|
#undef PACKED
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
# pragma pack()
|
||||||
|
#endif
|
||||||
|
#ifdef __WATCOMC__
|
||||||
|
# pragma pack(pop);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern BYTE syncstat[MAXSYNCBYTES];
|
||||||
|
extern BOOL PredictionOn;
|
||||||
|
extern PLAYER PredictPlayer;
|
||||||
|
extern PLAYERp ppp;
|
||||||
|
extern short predictangpos[MOVEFIFOSIZ];
|
||||||
|
extern int predictmovefifoplc;
|
||||||
|
extern BOOL Prediction;
|
||||||
|
extern short NumSyncBytes;
|
||||||
|
|
||||||
|
void InitPrediction(PLAYERp pp);
|
||||||
|
void DoPrediction(PLAYERp ppp);
|
||||||
|
void CorrectPrediction(int actualfifoplc);
|
||||||
|
|
||||||
|
//TENSW: safe packet senders
|
||||||
|
void netsendpacket(int ind, BYTEp buf, int len);
|
||||||
|
void netbroadcastpacket(BYTEp buf, int len);
|
||||||
|
int netgetpacket(int *ind, BYTEp buf);
|
||||||
|
|
||||||
|
|
||||||
|
enum MultiGameTypes
|
||||||
|
{
|
||||||
|
MULTI_GAME_NONE,
|
||||||
|
MULTI_GAME_COMMBAT,
|
||||||
|
MULTI_GAME_COMMBAT_NO_RESPAWN, // JUST a place holder for menus. DO NOT USE!!!
|
||||||
|
MULTI_GAME_COOPERATIVE,
|
||||||
|
MULTI_GAME_AI_BOTS
|
||||||
|
};
|
||||||
|
|
||||||
|
//extern SHORT MultiGameType; // defaults to NONE
|
||||||
|
|
||||||
|
// global net vars
|
||||||
|
// not saved in .CFG file
|
||||||
|
// used for current game
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
LONG KillLimit;
|
||||||
|
LONG TimeLimit;
|
||||||
|
LONG TimeLimitClock;
|
||||||
|
SHORT MultiGameType; // used to be a stand alone global
|
||||||
|
BOOL TeamPlay;
|
||||||
|
BOOL HurtTeammate;
|
||||||
|
BOOL SpawnMarkers;
|
||||||
|
BOOL AutoAim;
|
||||||
|
BOOL NoRespawn; // for commbat type games
|
||||||
|
BOOL Nuke;
|
||||||
|
} gNET,*gNETp;
|
||||||
|
|
||||||
|
extern gNET gNet;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
int Rules,
|
||||||
|
Level,
|
||||||
|
Enemy,
|
||||||
|
Markers,
|
||||||
|
Team,
|
||||||
|
HurtTeam,
|
||||||
|
Kill,
|
||||||
|
Time,
|
||||||
|
Color,
|
||||||
|
Nuke;
|
||||||
|
} AUTO_NET, *AUTO_NETp;
|
||||||
|
|
||||||
|
extern AUTO_NET Auto;
|
||||||
|
extern BOOL AutoNet;
|
||||||
|
|
||||||
|
VOID getpackets(VOID);
|
||||||
|
VOID SendMulitNameChange(char *new_name);
|
||||||
|
VOID InitNetVars(void);
|
||||||
|
VOID InitTimingVars(void);
|
||||||
|
VOID PauseAction(void);
|
||||||
|
VOID ResumeAction(void);
|
||||||
|
void ErrorCorrectionQuit(void);
|
||||||
|
void Connect(void);
|
||||||
|
void waitforeverybody(void);
|
||||||
|
BOOL MenuCommPlayerQuit(short quit_player);
|
||||||
|
VOID SendVersion(int version);
|
||||||
|
VOID InitNetPlayerOptions(void);
|
||||||
|
VOID CheckVersion(int GameVersion);
|
||||||
|
VOID SendMessage(short pnum,char *text);
|
||||||
|
void PauseGame(void);
|
||||||
|
void ResumeGame(void);
|
||||||
|
|
2606
polymer/eduke32/source/sw/src/ninja.c
Normal file
2606
polymer/eduke32/source/sw/src/ninja.c
Normal file
File diff suppressed because it is too large
Load diff
42
polymer/eduke32/source/sw/src/ninja.h
Normal file
42
polymer/eduke32/source/sw/src/ninja.h
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef NINJA_H
|
||||||
|
#define NINJA_H
|
||||||
|
|
||||||
|
#define NINJA_NORMAL_SPEED 60
|
||||||
|
#define NINJA_RUN_AWAY_SPEED 130
|
||||||
|
#define NINJA_FIND_PLAYER_SPEED 100
|
||||||
|
#define NINJA_CRAWL_SPEED 50
|
||||||
|
#define NINJA_SWIM_SPEED 50
|
||||||
|
|
||||||
|
void InitPlayerSprite(PLAYERp pp);
|
||||||
|
void InitAllPlayerSprites(void);
|
||||||
|
void PlayerPanelSetup(void);
|
||||||
|
void PlayerDeathReset(PLAYERp pp);
|
||||||
|
void SpawnPlayerUnderSprite(PLAYERp pp);
|
||||||
|
|
||||||
|
#endif
|
121
polymer/eduke32/source/sw/src/pal.h
Normal file
121
polymer/eduke32/source/sw/src/pal.h
Normal file
|
@ -0,0 +1,121 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
////
|
||||||
|
//
|
||||||
|
// Misc Defines
|
||||||
|
//
|
||||||
|
////
|
||||||
|
|
||||||
|
#define LT_GREY (16 * 0 + 1)
|
||||||
|
#define DK_GREY (16 * 1)
|
||||||
|
#define LT_BROWN (16 * 2)
|
||||||
|
#define DK_BROWN (16 * 3)
|
||||||
|
#define LT_TAN (16 * 4)
|
||||||
|
#define DK_TAN (16 * 5)
|
||||||
|
#define RUST_RED (16 * 6)
|
||||||
|
#define RED (16 * 7)
|
||||||
|
#define YELLOW (16 * 8)
|
||||||
|
#define BRIGHT_GREEN (16 * 9)
|
||||||
|
#define DK_GREEN (16 * 10)
|
||||||
|
#define GREEN (16 * 11)
|
||||||
|
#define LT_BLUE (16 * 12)
|
||||||
|
#define DK_BLUE (16 * 13)
|
||||||
|
#define PURPLE (16 * 14)
|
||||||
|
#define FIRE (16 * 15)
|
||||||
|
|
||||||
|
//
|
||||||
|
// Palette numbers and meanings
|
||||||
|
//
|
||||||
|
|
||||||
|
#define PALETTE_DEFAULT 0
|
||||||
|
#define PALETTE_FOG 1
|
||||||
|
// blue sword blade test
|
||||||
|
#define PALETTE_MENU_HIGHLIGHT 2
|
||||||
|
// used for the elector gore pieces
|
||||||
|
#define PALETTE_ELECTRO_GORE 3
|
||||||
|
// turns ninjas belt and headband red
|
||||||
|
#define PALETTE_BASIC_NINJA 4
|
||||||
|
// diving in lava
|
||||||
|
#define PALETTE_DIVE_LAVA 5
|
||||||
|
// turns ninjas belt and headband red
|
||||||
|
#define PALETTE_RED_NINJA 6
|
||||||
|
// used for the mother ripper - she is bigger/stronger/brown
|
||||||
|
#define PALETTE_BROWN_RIPPER 7
|
||||||
|
// turns ninjas belt and headband red
|
||||||
|
#define PALETTE_GREEN_NINJA 8
|
||||||
|
// reserved diving palette this is copied over the default palette
|
||||||
|
// when needed - NOTE: could move this to a normal memory buffer if palette
|
||||||
|
// slot is needed.
|
||||||
|
#define PALETTE_DIVE 9
|
||||||
|
#define PALETTE_SKEL_GORE 10
|
||||||
|
// turns ALL colors to shades of GREEN/BLUE/RED
|
||||||
|
#define PALETTE_GREEN_LIGHTING 11
|
||||||
|
#define PALETTE_BLUE_LIGHTING 13
|
||||||
|
#define PALETTE_RED_LIGHTING 14
|
||||||
|
|
||||||
|
// for brown bubbling sludge
|
||||||
|
#define PALETTE_SLUDGE 15
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Player 0 uses default palette - others use these
|
||||||
|
// turns ninja's vests (when we get them) into different color ranges
|
||||||
|
#define PALETTE_PLAYER0 16
|
||||||
|
#define PAL_XLAT_BROWN 16
|
||||||
|
#define PALETTE_PLAYER1 17
|
||||||
|
#define PAL_XLAT_LT_GREY 17
|
||||||
|
#define PALETTE_PLAYER2 18
|
||||||
|
#define PAL_XLAT_PURPLE 18
|
||||||
|
#define PALETTE_PLAYER3 19
|
||||||
|
#define PAL_XLAT_RUST_RED 19
|
||||||
|
#define PALETTE_PLAYER4 20
|
||||||
|
#define PAL_XLAT_YELLOW 20
|
||||||
|
#define PALETTE_PLAYER5 21
|
||||||
|
#define PAL_XLAT_DK_GREEN 21
|
||||||
|
#define PALETTE_PLAYER6 22
|
||||||
|
#define PAL_XLAT_GREEN 22
|
||||||
|
#define PALETTE_PLAYER7 23
|
||||||
|
#define PAL_XLAT_LT_BLUE 23
|
||||||
|
#define PALETTE_PLAYER8 24
|
||||||
|
#define PAL_XLAT_LT_TAN 24
|
||||||
|
#define PALETTE_PLAYER9 25
|
||||||
|
#define PAL_XLAT_RED 25
|
||||||
|
#define PALETTE_PLAYER10 26
|
||||||
|
#define PAL_XLAT_DK_GREY 26
|
||||||
|
#define PALETTE_PLAYER11 27
|
||||||
|
#define PAL_XLAT_BRIGHT_GREEN 27
|
||||||
|
#define PALETTE_PLAYER12 28
|
||||||
|
#define PAL_XLAT_DK_BLUE 28
|
||||||
|
#define PALETTE_PLAYER13 29
|
||||||
|
#define PAL_XLAT_FIRE 29
|
||||||
|
#define PALETTE_PLAYER14 30
|
||||||
|
#define PALETTE_PLAYER15 31
|
||||||
|
|
||||||
|
#define PALETTE_ILLUMINATE 32 // Used to make sprites bright green in night vision
|
||||||
|
|
||||||
|
|
8074
polymer/eduke32/source/sw/src/panel.c
Normal file
8074
polymer/eduke32/source/sw/src/panel.c
Normal file
File diff suppressed because it is too large
Load diff
201
polymer/eduke32/source/sw/src/panel.h
Normal file
201
polymer/eduke32/source/sw/src/panel.h
Normal file
|
@ -0,0 +1,201 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
||||||
|
|
||||||
|
This file is part of Shadow Warrior version 1.2
|
||||||
|
|
||||||
|
Shadow Warrior is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
||||||
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef PANEL_H
|
||||||
|
|
||||||
|
#define PANEL_H
|
||||||
|
|
||||||
|
#include "mytypes.h"
|
||||||
|
#include "game.h"
|
||||||
|
|
||||||
|
#define FRAG_BAR 2920
|
||||||
|
|
||||||
|
#define PRI_FRONT_MAX 250
|
||||||
|
#define PRI_FRONT 192
|
||||||
|
#define PRI_MID 128
|
||||||
|
#define PRI_BACK 64
|
||||||
|
#define PRI_BACK_MAX 0
|
||||||
|
|
||||||
|
#define MAKE_CONPIC_ENUM
|
||||||
|
enum conpic_id
|
||||||
|
{
|
||||||
|
#include "conpic.h"
|
||||||
|
};
|
||||||
|
typedef enum conpic_id CONPIC_ID;
|
||||||
|
#undef MAKE_CONPIC_ENUM
|
||||||
|
|
||||||
|
enum PanelSpriteIDs
|
||||||
|
{
|
||||||
|
ID_BORDER_TOP = 1, ID_BORDER_BOTTOM, ID_BORDER_LEFT, ID_BORDER_RIGHT, ID_BORDER_SHADE,
|
||||||
|
ID_PANEL_BORDER_LEFT, ID_PANEL_BORDER_RIGHT,
|
||||||
|
ID_TEXT, ID_TEXT2, ID_TEXT3, ID_TEXT4
|
||||||
|
};
|
||||||
|
|
||||||
|
struct PANEL_STATEstruct
|
||||||
|
{
|
||||||
|
short picndx; // for pip stuff in conpic.h
|
||||||
|
int tics;
|
||||||
|
void (*Animator)(PANEL_SPRITEp); // JBF: return type was long
|
||||||
|
PANEL_STATEp NextState;
|
||||||
|
ULONG flags;
|
||||||
|
BYTE xvel;
|
||||||
|
BYTE yvel;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define PANF_PRIMARY (BIT(0)) // denotes primary weapon
|
||||||
|
#define PANF_SECONDARY (BIT(1)) // denotes secondary weapon
|
||||||
|
#define PANF_BOB (BIT(2))
|
||||||
|
#define PANF_REST_POS (BIT(3)) // used for certain weapons - fireball
|
||||||
|
#define PANF_RELOAD (BIT(4)) // reload flag used for uzi
|
||||||
|
#define PANF_TRANS_FLIP (BIT(5)) // translucent flip - matches rotate sprite
|
||||||
|
#define PANF_ACTION_POS (BIT(6)) // used for certain weapons - fireball
|
||||||
|
#define PANF_WEAPON_HIDE (BIT(7)) // hide when climbing/driving
|
||||||
|
#define PANF_TRANSLUCENT (BIT(8)) // turn invisible
|
||||||
|
#define PANF_INVISIBLE (BIT(9)) // turn invisible
|
||||||
|
#define PANF_DEATH_HIDE (BIT(10)) // hide done when dead
|
||||||
|
#define PANF_KILL_AFTER_SHOW (BIT(11)) // kill after showing numpages times
|
||||||
|
#define PANF_SCREEN_CLIP (BIT(12)) // maintain aspect to the screen
|
||||||
|
#define PANF_STATUS_AREA (BIT(13)) // maintain aspect to the screen
|
||||||
|
#define PANF_IGNORE_START_MOST (BIT(14)) // maintain aspect to the screen
|
||||||
|
#define PANF_XFLIP (BIT(15)) // xflip
|
||||||
|
#define PANF_SUICIDE (BIT(16)) // kill myself
|
||||||
|
#define PANF_WEAPON_SPRITE (BIT(17)) // its a weapon sprite - for V mode
|
||||||
|
#define PANF_CORNER (BIT(18)) // draw from the corner
|
||||||
|
#define PANF_NOT_IN_VIEW (BIT(19)) // not in view
|
||||||
|
#define PANF_UNHIDE_SHOOT (BIT(20)) // shoot after un-hiding a weapon
|
||||||
|
#define PANF_JUMPING (BIT(21))
|
||||||
|
#define PANF_FALLING (BIT(22))
|
||||||
|
#define PANF_DRAW_BEFORE_VIEW (BIT(30)) // draw before drawrooms
|
||||||
|
#define PANF_NOT_ALL_PAGES (BIT(31)) // DONT use permanentwritesprite bit for rotatesprite
|
||||||
|
|
||||||
|
typedef VOID (*PANEL_SPRITE_FUNCp)(PANEL_SPRITEp);
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
PANEL_STATEp State;
|
||||||
|
int flags;
|
||||||
|
short tics;
|
||||||
|
short pic;
|
||||||
|
short xoff; // from panel sprite center x
|
||||||
|
short yoff; // from panel sprite center y
|
||||||
|
} PANEL_SPRITE_OVERLAY, *PANEL_SPRITE_OVERLAYp;
|
||||||
|
|
||||||
|
struct PANEL_SPRITEstruct
|
||||||
|
{
|
||||||
|
PANEL_SPRITEp Next, Prev;
|
||||||
|
PANEL_SPRITEp sibling;
|
||||||
|
PANEL_STATEp State, RetractState, PresentState, ActionState, RestState;
|
||||||
|
PLAYERp PlayerP;
|
||||||
|
// Do not change the order of this line
|
||||||
|
USHORT xfract;
|
||||||
|
SHORT x;
|
||||||
|
USHORT yfract;
|
||||||
|
SHORT y; // Do not change the order of this
|
||||||
|
// line
|
||||||
|
|
||||||
|
PANEL_SPRITE_OVERLAY over[8];
|
||||||
|
PANEL_SPRITE_FUNCp PanelSpriteFunc;
|
||||||
|
short ID; // id for finding sprite types on the
|
||||||
|
// list
|
||||||
|
short picndx; // for pip stuff in conpic.h
|
||||||
|
short picnum; // bypass pip stuff in conpic.h
|
||||||
|
short x1, y1, x2, y2; // for rotatesprites box cliping
|
||||||
|
short vel, vel_adj;
|
||||||
|
short numpages;
|
||||||
|
int xorig, yorig, flags, priority;
|
||||||
|
int scale;
|
||||||
|
int jump_speed, jump_grav; // jumping vars
|
||||||
|
int xspeed;
|
||||||
|
short tics, delay; // time vars
|
||||||
|
short ang, rotate_ang;
|
||||||
|
short sin_ndx, sin_amt, sin_arc_speed;
|
||||||
|
short bob_height_shift;
|
||||||
|
short shade, pal;
|
||||||
|
short kill_tics;
|
||||||
|
short WeaponType; // remember my own weapon type for weapons with secondary function
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
PANEL_STATEp pstate;
|
||||||
|
short state_size;
|
||||||
|
} PANEL_STATE_TABLE, *PANEL_STATE_TABLEp;
|
||||||
|
|
||||||
|
extern PANEL_STATE_TABLE PanelStateTable[];
|
||||||
|
|
||||||
|
// Panel State flags - also used for
|
||||||
|
#define psf_Invisible BIT(16)
|
||||||
|
#define psf_QuickCall BIT(23)
|
||||||
|
#define psf_Xflip BIT(24)
|
||||||
|
#define psf_ShadeHalf BIT(25)
|
||||||
|
#define psf_ShadeNone BIT(26)
|
||||||
|
|
||||||
|
enum BorderTypes
|
||||||
|
{
|
||||||
|
BORDER_NONE = 0,
|
||||||
|
BORDER_MINI_BAR = 1,
|
||||||
|
BORDER_BAR = 2
|
||||||
|
};
|
||||||
|
|
||||||
|
#define MICRO_SIGHT_NUM 0
|
||||||
|
#define MICRO_SIGHT 2075
|
||||||
|
|
||||||
|
#define MICRO_SHOT_NUM 2
|
||||||
|
#define MICRO_SHOT_20 2076
|
||||||
|
#define MICRO_SHOT_1 2077
|
||||||
|
|
||||||
|
#define MICRO_HEAT_NUM 1
|
||||||
|
#define MICRO_HEAT 2084
|
||||||
|
|
||||||
|
#define UZI_COPEN 2040
|
||||||
|
#define UZI_CCLOSED 2041
|
||||||
|
#define UZI_CLIT 2042
|
||||||
|
#define UZI_CRELOAD 2043
|
||||||
|
|
||||||
|
#define HEAD_MODE1 2055
|
||||||
|
#define HEAD_MODE2 2056
|
||||||
|
#define HEAD_MODE3 2057
|
||||||
|
|
||||||
|
#define SHOTGUN_AUTO_NUM 0
|
||||||
|
#define SHOTGUN_AUTO 2078
|
||||||
|
|
||||||
|
PANEL_SPRITEp pSpawnSprite(PLAYERp pp, PANEL_STATEp state, BYTE priority, int x, int y);
|
||||||
|
PANEL_SPRITEp pSpawnFullScreenSprite(PLAYERp pp, short pic, short pri, int x, int y);
|
||||||
|
PANEL_SPRITEp pSpawnFullViewSprite(PLAYERp pp,short pic,short pri,int x,int y);
|
||||||
|
void pSetSuicide(PANEL_SPRITEp psp);
|
||||||
|
BOOL pKillScreenSpiteIDs(PLAYERp pp, short id);
|
||||||
|
VOID pFlushPerms(PLAYERp pp);
|
||||||
|
VOID PreUpdatePanel(void);
|
||||||
|
void UpdatePanel(void);
|
||||||
|
void PlayerUpdateKeys(PLAYERp pp);
|
||||||
|
void PlayerUpdateArmor(PLAYERp pp,short value);
|
||||||
|
void pToggleCrosshair(PLAYERp pp);
|
||||||
|
void pKillSprite(PANEL_SPRITEp psp);
|
||||||
|
void InitChops(PLAYERp pp);
|
||||||
|
void ChopsSetRetract(PLAYERp pp);
|
||||||
|
VOID PlayerUpdateTimeLimit(PLAYERp pp);
|
||||||
|
|
||||||
|
#endif
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue