Firefox, Quake and attaching code while Quake runs

Discuss programming topics for any language, any source base. If it is programming related but doesn't fit in one of the below categories, it goes here.
Post Reply

Would you like to have some Quake C loaded on the fly?

yes
0
No votes
no
3
100%
 
Total votes: 3

daemonicky
Posts: 185
Joined: Wed Apr 13, 2011 1:34 pm

Firefox, Quake and attaching code while Quake runs

Post by daemonicky »

It has nothing to do with Quake, but I was wondering why Firefox needs restart after plugin is installed? Is it a safety reason? Is there a big obstacle in making no need for restart?

I dont want to leave it just in not having anything to do with Quake, so what if you could get some Quake C code attached to Quake while it runs. IFUIC it is possible to add entities on the fly in Quake. So I wonder, is it possible to add functions on the fly?
Imagine being able to load some functions. And even unload them. Quake would probably shout :). But what if you paused Quake, said rocket to stop flying, exchanged behaviour of that grunt and keept on testing.

IFUIC Firefox plugins are some zipped javascript+xul . XUL is how extension looks, it is a tree data structure (XML variation), its nodes have also parameters to specify to which Firefox's windows, contextmenus, statusbars, menubars (...) are they bound. Javascript is what srcipt does, XUL has him bound to its nodes.

Is it correct, that Quake C is attached to Quake by some function pointers (or maybe indirectly by some lookup_function("prethink", compiled_quake_c)) ?

What do You think about it?
mh
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Post by mh »

The size of an edict_t structure is defined by the current progs.dat so if anything in a proposed newly loaded QuakeC exceeds the old size, the engine will crash.

QC is not that flexible.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Post by Spike »

mh, saved games. :P
mh
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Post by mh »

Spike wrote:mh, saved games. :P
It was late and I wasn't thinking. At least that's what I'll tell the judge. :lol:

NQ savegames don't restore viewangles properly but one could hack together a modified format specifically for this.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
Post Reply