![]() |
JJ2 Source Code (partial)
Download here
The full JJ2 source code has never been released, but we do have access to a few files, even though we don't know where they came from. These are the files most useful to someone for AngelScript-writing purposes, dealing mostly with object (i.e. jjOBJ) setup, behavior, and interactions. If you want to slightly modify the behavior of some enemy, for example, it's helpful to know how it works already so you can change only the relevant bits. Keep in mind that these source files are for 1.22 or 1.23. They don't reflect any minor changes in 1.24 and they definitely don't reflect any changes in JJ2+: for example, the raven function in g_Ai.c still includes the bug where sometimes raven enemies would lock in place forever after returning from an attack. JJ2's original internal variable names are generally similar to what you're used to from JJ2+'s AngelScript API but do differ a bit. Here are some key points:
obj->xspeed=6*65536; obj->xacc=8192; This is equivalent to the following in AngelScript: obj.xSpeed=6; obj.xAcc=0.125; Keep this in mind when reviewing JJ2 code. Be prepared to divide various numbers by 65536 (0x10000 in hex) in your head to get numbers that look more like what you're expecting. |
| All times are GMT -8. The time now is 02:48 AM. |
Powered by vBulletin® Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
JCF © 2001-Infinity Jazz2Online