Coder Social home page Coder Social logo

Comments (2)

Baker7 avatar Baker7 commented on August 11, 2024 1

Zircon plays those by unloading incompatible csqc progs.

In the Zircon source code, search for "r1414" and the changes are marked so that, for instance, DarkPlaces can more easily acquire the enhancement.

"1414. Automatic unload of "fte csqc-lite" csprogs.dat allowing convenient play of these mods (see alk1.2.zip @ Quaddicted)
This is an alternate CSQC that FTE/Quakespasm Spiked supports."

fte csqc-lite is a HUD only version of csqc. Zircon loads the csqc, see that it does not have the required functions, prints a warning for the player and unloads the csqc.

Con_PrintLinef ("csprogs.dat not supported (DarkPlaces was not a target engine, lacks %s).  Unloading.", s_missing_fn);

A way to play those in DarkPlaces is finding the csprogs.dat and the .pak and deleting it.

Note: Zircon also has "csqc_enable" which can be set to 0. I did "csqc_enable" after thinking about Arcane Dimensions, I noticed 2 things annoying about the csqc like how during intermission I can move the mouse around and look.

from darkplaces.

Baker7 avatar Baker7 commented on August 11, 2024

If you are wanting to do this ...

(For full context, see the Zircon Engine source, this was added super early in Zircon Beta and probably is even in Zircon Beta Release #1.

const char *PRVM_Prog_Load(prvm_prog_t *prog, const char *filename, unsigned char *data, int64_t size, int numrequiredfunc, const char **required_func, int numrequiredfields, prvm_required_field_t *required_field, int numrequiredglobals, prvm_required_field_t *required_global);
In Zircon Engine, PRVM_Prog_Load returns a string if a CSQC function is missing.

CSQC-Lite -- spike's "HUD only" CSQC -- is used by mods like Alkaline. It does NOT have all the CSQC function that DarkPlaces requires.

In CL_VM_Init ... if the load of csprogs.dat returns a missing function string, Zircon Engine unloads the csprogs.dat and ignores it and plays the game without it.

This requires the user to do nothing at all and they can still play Alkaline, except whatever custom HUD isn't used.

This is no different than what happens when you play Alkaline in regular Quakespasm. Quakespasm does not have CSQC and does not load the HUD.

	// Baker r1414 - automatic unload of fte csqc-lite csprogs.dat
	const char *s_missing_fn = PRVM_Prog_Load(prog, csprogsname, csprogsdata, csprogsdatasize, cl_numrequiredfunc, cl_required_func, CL_REQFIELDS, cl_reqfields, CL_REQGLOBALS, cl_reqglobals);

	// Baker: See if csprogs supports DarkPlaces (pass is no guarantee, but we elim some)
	if (s_missing_fn) {
		Con_PrintLinef ("csprogs.dat not supported (DarkPlaces was not a target engine, lacks %s).  Unloading.", s_missing_fn);

		// unload
		PRVM_Prog_Reset(prog);
		cl.csqc_loaded = false;
		return;
	}

PRVM_Prog_Load ... Check required functions ... this block is added

	// check required functions
	for(i=0 ; i < numrequiredfunc ; i++) {
		if (PRVM_ED_FindFunction(prog, required_func[i]) == 0) {
			return required_func[i]; // Baker r1414 - automatic unload of fte csqc-lite csprogs.dat
			// prog->error_cmd("%s: %s not found in %s",prog->name, required_func[i], filename);

		}
	}

from darkplaces.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.