diff --git a/include/model.h b/include/model.h index 9b8b64d..8f09317 100644 --- a/include/model.h +++ b/include/model.h @@ -465,4 +465,6 @@ void Mod_TouchModel (char *name); mleaf_t *Mod_PointInLeaf (float *p, model_t *model); byte *Mod_LeafPVS (mleaf_t *leaf, model_t *model); +model_t *Mod_FindName (char *name); + #endif // _MODEL_H diff --git a/source/Makefile.am b/source/Makefile.am index 82e3280..d4a9f77 100644 --- a/source/Makefile.am +++ b/source/Makefile.am @@ -48,7 +48,7 @@ sound_ASM= snd_mixa.S common_ASM= sys_ia32.S worlda.S $(math_ASM) #endif -common_SOURCES= crc.c cvar.c cmd.c mathlib.c wad.c world.c \ +common_SOURCES= crc.c cvar.c cmd.c mathlib.c wad.c world.c model.c \ msg.c r_part.c sizebuf.c qendian.c qargs.c quakefs.c \ va.c quakeio.c link.c com.c \ zone.c $(common_ASM) @@ -133,7 +133,8 @@ soft_SOURCES= d_edge.c d_fill.c d_init.c d_modech.c d_part.c d_polyse.c \ d_scan.c d_sky.c d_sprite.c d_surf.c d_vars.c d_zpoint.c \ draw.c r_aclip.c r_alias.c r_bsp.c r_draw.c r_edge.c r_efrag.c \ r_light.c r_main.c r_misc.c sw_part.c r_sky.c r_sprite.c \ - r_surf.c r_vars.c screen.c model.c sw_view.c $(soft_ASM) + r_surf.c r_vars.c screen.c sw_model_alias.c sw_model_brush.c \ + sw_model_sprite.c sw_view.c $(soft_ASM) # # ... GGI @@ -188,7 +189,7 @@ nuq_x11_DEPENDENCIES=libqfsys.a libqfsnd.a libqfcd.a libqfnet.a # ogl_SOURCES= gl_draw.c gl_mesh.c gl_part.c gl_refrag.c gl_rlight.c \ gl_rmain.c gl_rmisc.c gl_rsurf.c gl_screen.c gl_view.c \ - gl_warp.c gl_model.c + gl_warp.c gl_model_alias.c gl_model_brush.c gl_model_sprite.c # # ... 3Dfx Voodoo 1 and 2 SVGAlib-based console GL diff --git a/source/gl_model_alias.c b/source/gl_model_alias.c index 4d773ab..4187b3b 100644 --- a/source/gl_model_alias.c +++ b/source/gl_model_alias.c @@ -33,6 +33,16 @@ # include "config.h" #endif +#include "r_local.h" +#include "sys.h" +#include "console.h" +#include "qendian.h" +#include "checksum.h" +#include "glquake.h" + +extern char loadname[]; +extern model_t *loadmodel; + /* ============================================================================== diff --git a/source/gl_model_brush.c b/source/gl_model_brush.c index a3a907c..a413445 100644 --- a/source/gl_model_brush.c +++ b/source/gl_model_brush.c @@ -40,6 +40,18 @@ #include "checksum.h" #include "glquake.h" +extern char loadname[]; +extern model_t *loadmodel; +extern byte mod_novis[]; + +void +Mod_LoadMMNearest(miptex_t *mt, texture_t *tx) +{ + texture_mode = GL_LINEAR_MIPMAP_NEAREST; //_LINEAR; + tx->gl_texturenum = GL_LoadTexture (mt->name, tx->width, tx->height, (byte *)(tx+1), true, false, 1); + texture_mode = GL_LINEAR; +} + /* =============== Mod_PointInLeaf @@ -1064,11 +1076,3 @@ void Mod_LoadBrushModel (model_t *mod, void *buffer) } } } - -void -Mod_LoadMMNearest(miptex_t *mt, texture_t *tx) -{ - texture_mode = GL_LINEAR_MIPMAP_NEAREST; //_LINEAR; - tx->gl_texturenum = GL_LoadTexture (mt->name, tx->width, tx->height, (byte *)(tx+1), true, false, 1); - texture_mode = GL_LINEAR; -} diff --git a/source/gl_model_sprite.c b/source/gl_model_sprite.c index 5f8aad2..7e3a357 100644 --- a/source/gl_model_sprite.c +++ b/source/gl_model_sprite.c @@ -40,6 +40,9 @@ #include "checksum.h" #include "glquake.h" +extern char loadname[]; +extern model_t *loadmodel; + /* ================= Mod_LoadSpriteFrame diff --git a/source/sw_model_alias.c b/source/sw_model_alias.c index 78a97ca..f2b54c0 100644 --- a/source/sw_model_alias.c +++ b/source/sw_model_alias.c @@ -36,6 +36,8 @@ #include "qendian.h" #include "checksum.h" +extern char loadname[]; + /* ============================================================================== diff --git a/source/sw_model_brush.c b/source/sw_model_brush.c index 0175175..2b1baf2 100644 --- a/source/sw_model_brush.c +++ b/source/sw_model_brush.c @@ -36,6 +36,10 @@ #include "qendian.h" #include "checksum.h" +extern char loadname[]; +model_t *loadmodel; +extern byte mod_novis[]; + /* =============== Mod_PointInLeaf diff --git a/source/sw_model_sprite.c b/source/sw_model_sprite.c index e99913b..eaf5c88 100644 --- a/source/sw_model_sprite.c +++ b/source/sw_model_sprite.c @@ -36,6 +36,8 @@ #include "qendian.h" #include "checksum.h" +extern char loadname[]; + /* ================= Mod_LoadSpriteFrame