Forum

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.

Moderator: InsideQC Admins

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

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

Firefox, Quake and attaching code while Quake runs

Postby daemonicky » Tue May 17, 2011 9:28 pm

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?
User avatar
daemonicky
 
Posts: 185
Joined: Wed Apr 13, 2011 1:34 pm

Postby mh » Tue May 17, 2011 10:35 pm

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
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby Spike » Wed May 18, 2011 12:14 am

mh, saved games. :P
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby mh » Wed May 18, 2011 9:05 am

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
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am


Return to General Programming

Who is online

Users browsing this forum: No registered users and 1 guest