Commit graph

3432 commits

Author SHA1 Message Date
hendricks266
ba1ac9d89a Load def modules even if no root def exists. Print a message to the log for each def module that is loaded.
git-svn-id: https://svn.eduke32.com/eduke32@3621 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-28 09:06:14 +00:00
hendricks266
cae310d8d5 weapons.con.sample: Sync with r3614 and r3616.
git-svn-id: https://svn.eduke32.com/eduke32@3620 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-28 09:05:55 +00:00
hendricks266
bfeff6b0ab Fix a multi-line comment in cache1d.c.
git-svn-id: https://svn.eduke32.com/eduke32@3619 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-28 09:05:36 +00:00
hendricks266
ae96d9a162 Correct the capitalization of NAPALM.
git-svn-id: https://svn.eduke32.com/eduke32@3618 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-28 09:05:18 +00:00
hendricks266
2bfb7736cb Fix loading of a user's previous "SelectedGRP" file.
git-svn-id: https://svn.eduke32.com/eduke32@3617 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-28 09:04:54 +00:00
terminx
cd235d2ec2 Don't continue animating Ripper, Shrinker, Expander and Freezethrower when the game is paused or the menu is up.
git-svn-id: https://svn.eduke32.com/eduke32@3616 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-27 06:37:19 +00:00
terminx
7e22c6d81c Read GOG.com and Steam Duke3D install paths from the registry instead of hard-coding the default paths.
git-svn-id: https://svn.eduke32.com/eduke32@3615 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-27 01:39:18 +00:00
terminx
f96788866c Fix shrunk player fist animation speed as requested on the forums. I didn't test this against the DOS version but it seems about right according to my memory. Let me know if it's still wrong and you care that much about it.
git-svn-id: https://svn.eduke32.com/eduke32@3614 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-27 01:38:42 +00:00
terminx
7f4185198c MSVC build fixes. The change to Makefile.deps is slightly questionable but it's not really an issue.
git-svn-id: https://svn.eduke32.com/eduke32@3613 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-27 01:38:21 +00:00
hendricks266
26fc1aa4f8 Fix a case in minitext_() overlooked by r3608.
(This should fix the inventory item box in the statusbar.)

git-svn-id: https://svn.eduke32.com/eduke32@3612 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-25 19:19:28 +00:00
hendricks266
9d3b96a636 LunaCON: Properly implement rotatesprite16 by adding ROTATESPRITE_FULL16 to orientation.
git-svn-id: https://svn.eduke32.com/eduke32@3611 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-25 19:19:05 +00:00
hendricks266
30f510d521 Add "rotatespritea" to CON and M32script.
I hope I didn't bruise Lunatic too much.

git-svn-id: https://svn.eduke32.com/eduke32@3610 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-25 04:33:03 +00:00
hendricks266
3d46bc1551 Implement alpha into rotatesprite (rotatesprite_) on the engine side.
git-svn-id: https://svn.eduke32.com/eduke32@3609 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-25 04:32:24 +00:00
hendricks266
c5044b3ecd Add orientation bit 2048, enumerated as ROTATESPRITE_FULL16, which is a courtesy provided by the engine for the purpose of the game to internally force use of full 32-bit coordinates. With this bit set, all CON screen drawing commands can use rotatesprite16-like coordinates.
While the functionality was already internally in place for gametext as one of two hacks using ROTATESPRITE_MAX (the other still used by minitext_() to align with the statusbar) we must codify a bit in the engine for safe external use. (Otherwise, ROTATESPRITE_MAX could/would theoretically increase and leave modders high and dry.)

(Dev note: In G_DrawTXDigiNumZ(), ROTATESPRITE_MAX was used to bitshift the value used to calculate digit spacing for no reason I can ascertain other than to introduce rounding errors into the zoom/textscale calculations. It was never used anywhere, so I removed it.)

Bonus: The scaling code for digitalnumberz and gametextz has been modified so that the spacing is no longer affected by rounding errors. Try animating the zoom value and compare how the text used to jump but now does not.

git-svn-id: https://svn.eduke32.com/eduke32@3608 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-25 04:31:58 +00:00
hendricks266
4c5fd9d9e2 Hackily implement spriteext.alpha into Classic by internally attaching 33% and 66% to the cstat bits.
git-svn-id: https://svn.eduke32.com/eduke32@3607 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-25 04:31:31 +00:00
hendricks266
d7e30a65dd Relax CAPITALIZATION restrictions.
git-svn-id: https://svn.eduke32.com/eduke32@3606 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-25 04:31:09 +00:00
helixhorned
a101698dfb engine: fix assertion failure with overlong walls in rintersect().
git-svn-id: https://svn.eduke32.com/eduke32@3605 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-24 18:55:40 +00:00
helixhorned
8d2a60ff70 Lunatic translator: proper Lua->CON line mapping for actor/event/etc. headers.
git-svn-id: https://svn.eduke32.com/eduke32@3604 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-24 18:55:27 +00:00
helixhorned
7faffdc674 engine: return early with 0 from cansee() if either sector is >= MAXSECTORS.
Previously, only the <0 condition was checked. However, the passed sectnums
could be >= MAXSECTORS (at least in C-CON), for example when issuing 'canseespr'
on a sprite not in the game world.

git-svn-id: https://svn.eduke32.com/eduke32@3603 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-24 18:55:18 +00:00
helixhorned
3a1c590572 LunaCON: readarrayfromfile: fail silently if file can't be opened.
git-svn-id: https://svn.eduke32.com/eduke32@3602 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-24 18:55:05 +00:00
helixhorned
c7d97d55ec Lunatic: simplify RETURN handling, make its behavior across events same as C-CON.
There's only one RETURN value on the C side (g_RETURN), which is also referenced
from Lua.  Upon entering an event, its value takes on the per-event default one,
and its value when the event code finishes is passed back to the game.
Independently of that, its value is always saved and restored across event calls.

git-svn-id: https://svn.eduke32.com/eduke32@3601 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-24 18:54:56 +00:00
helixhorned
57416c541a Lunatic: add LuaJIT's 'dump' module, printing traced bytecode, IR and mcode.
git-svn-id: https://svn.eduke32.com/eduke32@3600 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-24 18:54:14 +00:00
helixhorned
ebb71cf4ab Mapster32: don't wrongly report PANIC corruption with MAXSPRITES sprites present.
git-svn-id: https://svn.eduke32.com/eduke32@3599 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-24 18:53:56 +00:00
helixhorned
c5e76e73f3 Lunatic t.: don't error on changing stat/sect of sprite not in the game world.
git-svn-id: https://svn.eduke32.com/eduke32@3598 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-24 18:53:48 +00:00
helixhorned
efbc4cec90 Lunatic: actor usertypes from CON, set SFLAGs as 2nd gameactor() arg in Lua.
In passing, fix a couple of omissions: gameactor() being passed nil's in the
middle, more than one moveflag to CON *actor.

git-svn-id: https://svn.eduke32.com/eduke32@3597 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-24 18:53:28 +00:00
helixhorned
290eb3a962 Lunatic: make some variables local, fix some bugs found using listglobals.sh.
git-svn-id: https://svn.eduke32.com/eduke32@3596 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-24 18:53:14 +00:00
helixhorned
ea118fe436 Lunatic: fix weapondata_t read access, Lua->CON line mapping for if* commands.
git-svn-id: https://svn.eduke32.com/eduke32@3595 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-24 18:53:06 +00:00
helixhorned
b7ea1cb205 Lunatic: in readgamearray support code, use engine file functions.
This is so that files residing in GRPs (or anywhere the engine looks for them)
can be read, too.

git-svn-id: https://svn.eduke32.com/eduke32@3594 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-24 18:52:52 +00:00
helixhorned
3e4a0dadf5 Lunatic: cancel logo on EVENT_LOGO error, fix CON mulscale and writable gv.
git-svn-id: https://svn.eduke32.com/eduke32@3593 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-24 18:52:41 +00:00
helixhorned
95b1a2a791 premap.c: fix oob access of tagbitmap[] with formerly negative lo-/hitags.
Also, allocate that array dynamically instead of on the stack.

git-svn-id: https://svn.eduke32.com/eduke32@3592 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-21 10:20:37 +00:00
helixhorned
ad55e2d424 Lunatic: make ivec3 and dvec3 types share same metatable, orthogonalize API.
Specifically, remove ivec3's blen1() method and add from/to BUILD coordinate
(z scaled by 16) conversion methods.

git-svn-id: https://svn.eduke32.com/eduke32@3591 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-21 10:20:27 +00:00
helixhorned
700d9cef0c Lunatic: slightly cleaner weapondata_t access.
Also, for the embedded translator: don't warn on unrecognized command line opt.

git-svn-id: https://svn.eduke32.com/eduke32@3590 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-21 10:20:20 +00:00
helixhorned
904a26e045 Clean up mdsprite.c:voxdraw() a little.
git-svn-id: https://svn.eduke32.com/eduke32@3589 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-21 10:20:14 +00:00
helixhorned
286cd692ec Clean up mdsprite.c:md3draw() by factoring out m->head.flags == 1337 check.
... into a macro MFLAGS_NOCONV(m). Since it currently expands to (0), some dead
code will be eliminated.
Introduce a "compilation option" macro DO_MD2_MD3_CONV in mdsprite.c.

git-svn-id: https://svn.eduke32.com/eduke32@3588 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-21 10:20:01 +00:00
helixhorned
fdca2d232e Clean up mdsprite.c:md3draw() by factoring out spriteext[tspr->owner] access.
git-svn-id: https://svn.eduke32.com/eduke32@3587 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-21 10:19:55 +00:00
helixhorned
271bb545ec Make -testlua accepted (but ignored) in non-Lunatic build.
So that it doesn't result in the -t (respawn on) command line switch.

git-svn-id: https://svn.eduke32.com/eduke32@3586 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-21 10:19:46 +00:00
helixhorned
61f501c3fc Clean up mdsprite.c:md3draw() by tightening locals, factoring out 2x dup code.
git-svn-id: https://svn.eduke32.com/eduke32@3585 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-21 10:19:41 +00:00
helixhorned
182121a0aa engine: give sprite cstat 1024 a marco name, CSTAT_SPRITE_MDHACK.
git-svn-id: https://svn.eduke32.com/eduke32@3584 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-21 10:19:32 +00:00
helixhorned
ba6ad362bc sdlayer.c: fix incompatible-pointer-type warning.
git-svn-id: https://svn.eduke32.com/eduke32@3583 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-21 10:19:25 +00:00
hendricks266
ec1923b417 Wii: Fix Mapster32. It runs now.
git-svn-id: https://svn.eduke32.com/eduke32@3582 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-21 09:49:12 +00:00
hendricks266
bdc4f7cd68 Windows: Add the default installation paths for the GOG.com release of Duke Nukem 3D: Atomic Edition and the Steam release of Duke Nukem 3D: Megaton Edition (if they exist) to EDuke32's search path.
git-svn-id: https://svn.eduke32.com/eduke32@3581 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-21 09:48:21 +00:00
hendricks266
b46d4460bc Process ART animations on tspr->picnum early in all three renderers.
This enables ART animations to take effect on voxels in classic, voxels and models in Polymost, and models in Polymer.

git-svn-id: https://svn.eduke32.com/eduke32@3580 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-19 06:23:38 +00:00
hendricks266
e7d8256fc3 Save the configuration files whenever a savegame is made.
git-svn-id: https://svn.eduke32.com/eduke32@3579 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-19 06:23:12 +00:00
hendricks266
72156dd4c1 Prevent the middle chaingun muzzleflash from animating its position when the player is frozen.
The unmodified behavior is completely wrong and I don't see how any mod could ever use it.

git-svn-id: https://svn.eduke32.com/eduke32@3578 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-19 06:22:52 +00:00
hendricks266
1ad01dbce4 weapons.con.sample: Fix three C to CON porting bugs. Thanks to Fox for the reports.
(Modders who used an older version: Take a look at the SVN diff, the fixes can easily be applied by hand.)

git-svn-id: https://svn.eduke32.com/eduke32@3577 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-19 06:22:33 +00:00
hendricks266
85f6a64deb Add to r3544.
git-svn-id: https://svn.eduke32.com/eduke32@3576 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-19 06:22:08 +00:00
helixhorned
90d71a5953 Classic screen tilting: fix it by passing bit 1024 to rotatesprite().
This now should look correct for both settings of r_usenewaspect.

git-svn-id: https://svn.eduke32.com/eduke32@3575 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-18 22:05:30 +00:00
helixhorned
cec987631a Lunatic: properly protect weapondata_t members, fix Lua->CON line mapping.
Also, make -Werror-bad-getactorvar disabled by default.

git-svn-id: https://svn.eduke32.com/eduke32@3574 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-18 22:05:26 +00:00
helixhorned
c397759217 Fix Lunatic build on Windows.
- Make _buildargv[_buildargc] NULL.
- With SDL layer, pass argv and argc directly and get rid of _build* ones.
- Add tilesiz* to dynsymlists.

git-svn-id: https://svn.eduke32.com/eduke32@3573 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-18 22:05:21 +00:00
helixhorned
38ee330c93 Lunatic translator embedded: handle command line arguments.
Also, fix an error() call in control.lua:gamearray_file_common().

git-svn-id: https://svn.eduke32.com/eduke32@3572 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-17 18:11:58 +00:00
helixhorned
d909173065 Lunatic t.: allow hex literals with >9 digits if the high ones are all 'F's.
(Or '0's, but that case is handled automatically.) The resulting generated
number is taken by looking at the 8 lower nibbles and interpreting them as
a signed 32-bit integer.
Also add some number parsing tests to test/nlcf_break.con.

git-svn-id: https://svn.eduke32.com/eduke32@3571 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-17 18:11:53 +00:00
helixhorned
15d9165199 Lunatic translator: new switch -W(no-)error-bad-getactorvar.
Toggling whether a getactorvar for a global or per-player gamevar issues
a warning or a hard error, the latter being the default.
Also, make it possible to readgamevar/savegamevar per-actor gamevars and
add userdefs member "idplayers" (read-only).

git-svn-id: https://svn.eduke32.com/eduke32@3570 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-17 18:11:47 +00:00
helixhorned
c7e90f2ed4 Lunatic translator: else if* -> elseif, fix codegen for "if {}".
The first transformation makes the "control structure too long" error appear
only with larger if/else cascades, though it's still possible.

git-svn-id: https://svn.eduke32.com/eduke32@3569 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-17 18:11:44 +00:00
helixhorned
56ea732ccd Lunatic translator: dynamic tile remapping.
Also, fix message when tiles get remapped in debugging builds.

git-svn-id: https://svn.eduke32.com/eduke32@3568 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-17 18:11:38 +00:00
helixhorned
92e85fa0d3 Lunatic translator: music 0, add two userdefs members.
git-svn-id: https://svn.eduke32.com/eduke32@3567 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-17 18:11:27 +00:00
helixhorned
4601b2d203 Add new LOGO_FLAGS bit 2048, preventing cutscene at E4 beginning if set.
git-svn-id: https://svn.eduke32.com/eduke32@3566 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-15 16:56:29 +00:00
helixhorned
90421f0e10 geom.lua: fix copy-paste bugs and clean up code. Remove __eq metamethod.
git-svn-id: https://svn.eduke32.com/eduke32@3565 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-15 16:56:24 +00:00
helixhorned
ef464f2a1d Lunatic: allow indexing some weapon/inventory arrays with their names.
git-svn-id: https://svn.eduke32.com/eduke32@3564 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-15 16:56:19 +00:00
helixhorned
9285a9054b Lunatic translator: warn if setting reserved bits in some system gamevar redef.
git-svn-id: https://svn.eduke32.com/eduke32@3563 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-15 16:56:15 +00:00
helixhorned
c02199be48 Lunatic: g_tile access, rudimentary system gamearray support for the translator.
The only operation for which proper code is generated is reading a single value
from a system gamearray.

git-svn-id: https://svn.eduke32.com/eduke32@3562 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-15 16:56:11 +00:00
helixhorned
7a58a818ca Lunatic t.: option for generating code caching sprite/actor/player structs...
...at the beginning of each function called back from C, and each case/default
function. Called -fcache-sap. Disabled by default.

git-svn-id: https://svn.eduke32.com/eduke32@3561 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-15 16:56:07 +00:00
helixhorned
0173c0908a Lunatic: spritesof{stat,sect} iterators that allow deletion inside the loop.
Also,
 - an optimization for sprite[]:setpos(). Calls to get_sprite_index()
   seem to be pretty slow (at least when they're not compiled).
 - add getzrange to the dynsymlists

git-svn-id: https://svn.eduke32.com/eduke32@3560 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-15 16:56:03 +00:00
helixhorned
83bc10791f Lunatic: correct SFLAG_* and actor_t definitions.
git-svn-id: https://svn.eduke32.com/eduke32@3559 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-15 16:55:59 +00:00
helixhorned
f6d1af0532 Lunatic: replace some allocations by static data, some translator fixes.
Fix 'setsprite' and 'music'. A good timing test for actors performance is
the starfield of WGR2's E1L1 ("Nexus").

git-svn-id: https://svn.eduke32.com/eduke32@3558 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-13 10:48:23 +00:00
helixhorned
3b3bc6bc01 Lunatic: also save min, max actor times; fix release build.
git-svn-id: https://svn.eduke32.com/eduke32@3557 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-13 10:48:19 +00:00
helixhorned
6b1df7f1e9 Lunatic translator: handle LOGO_FLAGS.
This is the only gamevar of its kind that is handled for Lunatic, neither
PLR_MORALE nor LOGO_FLAGS are.

git-svn-id: https://svn.eduke32.com/eduke32@3556 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-13 10:48:14 +00:00
hendricks266
88313f7b50 Plug up alpha leaks in Polymost textures/rotatesprite.
git-svn-id: https://svn.eduke32.com/eduke32@3555 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-04 09:10:54 +00:00
hendricks266
4b0cffaf81 Fix osxbuild.sh and wiibuild.bat after r3551.
git-svn-id: https://svn.eduke32.com/eduke32@3554 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-04 07:49:47 +00:00
hendricks266
7228700c87 Connect spriteext.alpha to models and voxels in Polymost.
This code is neat, tidy, organized, and sensical!

git-svn-id: https://svn.eduke32.com/eduke32@3553 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-04 07:49:27 +00:00
terminx
3e4ea93b20 Directory cleanup. Move the "Apple", "Windows", and "Wii" directories to a new "platform" dir, move the contents of "psd" to "rsrc/source", move eobj* and obj* directories so that they're under the "source" dir.
git-svn-id: https://svn.eduke32.com/eduke32@3551 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-04 04:14:19 +00:00
terminx
051112223c Remove the old MakeDistributions makefile. This was used to package the old manually released source archives we had years ago.
git-svn-id: https://svn.eduke32.com/eduke32@3550 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-04 04:08:02 +00:00
terminx
2fbd345062 Remove unused eduke32.vcxproj.user file, presumably used by VS2010 and up to store machine-dependent preferences
git-svn-id: https://svn.eduke32.com/eduke32@3549 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-04 04:07:53 +00:00
terminx
bb3ba4fb66 Remove unused rsrc/orange_icon.ico
git-svn-id: https://svn.eduke32.com/eduke32@3548 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-04 04:07:44 +00:00
terminx
04e292e023 Remove the old NSIS script used to generate the installers we had, what, 5 years ago? If we ever need it again we can just pull it from one of the old revisions stored in the repo.
git-svn-id: https://svn.eduke32.com/eduke32@3547 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-04 04:07:32 +00:00
terminx
db70f20a1d Remove old unused changelog files
git-svn-id: https://svn.eduke32.com/eduke32@3546 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-04 04:07:20 +00:00
hendricks266
27fa5e72f7 Make stopping of all sounds after completion of LOGO.ANM conditional on the newly introduced (LOGO_FLAGS & LOGO_STOPANIMSOUNDS). Modifies r3217.
git-svn-id: https://svn.eduke32.com/eduke32@3545 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-04 01:24:17 +00:00
hendricks266
e2701c9a5a Patch up some broken hardcoded behavior with regard to the Sentry versions of the bosses (minibosses), as suggested by Fox.
This should have no adverse effects or side-effects. The changes only apply if a modder chose to use completely broken functionality in the first place.

git-svn-id: https://svn.eduke32.com/eduke32@3544 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-04 01:23:55 +00:00
hendricks266
cbe28f89e0 Connect spriteext.alpha to Polymost.
Ugh, global variable hacks. Excuse me while I wash my hands.

git-svn-id: https://svn.eduke32.com/eduke32@3543 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-04 01:23:29 +00:00
helixhorned
2d01a81435 Fix starttrack crashing when a "null music" is selected.
Introduced with the refactoring in r3490.

git-svn-id: https://svn.eduke32.com/eduke32@3542 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-03 16:06:40 +00:00
helixhorned
0646e41fa4 Lunatic: make con.ai accept literal action/move, check for calling from top.
Also, fix con._setgamepalette.

git-svn-id: https://svn.eduke32.com/eduke32@3541 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-03 16:06:37 +00:00
helixhorned
596b3e6d6a Lunatic translator standalone: option specifying a directory for gen'd code.
The option is -fgendir=<directory>.

git-svn-id: https://svn.eduke32.com/eduke32@3540 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-03 16:06:32 +00:00
helixhorned
aeeec9d2aa Lunatic translator standalone: allow specifying list files.
All non-option positional arguments after an @ sign are taken as list files:
hashes at the beginning of a line denote comments, truly empty lines are
ignored, all other lines should contain one root CON file name.

git-svn-id: https://svn.eduke32.com/eduke32@3539 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-03 16:06:28 +00:00
helixhorned
1252e0d8e5 spriteclip.txt: refer to _clipshape0.map instead of _clipshape_.map.
git-svn-id: https://svn.eduke32.com/eduke32@3538 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-03 16:06:25 +00:00
helixhorned
deeb6306a9 Lunatic translator: fix some codegen and some commands.
git-svn-id: https://svn.eduke32.com/eduke32@3537 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-03 16:06:22 +00:00
helixhorned
07c7363d0f CON: Fix accessing gamearrays on 64-bit archs.
From the PM conversation "gamearrays in 64-bit". A test case is the breaking
glass at the beginning of the DukePlus map.

git-svn-id: https://svn.eduke32.com/eduke32@3536 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-03 16:06:18 +00:00
helixhorned
bad2da3026 Lunatic translator: in error tracebacks, show line numbers of the source file.
Instead of those of the translated code. Also some codegen tweaks and fixes.

git-svn-id: https://svn.eduke32.com/eduke32@3535 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-03 16:06:16 +00:00
helixhorned
ba0970cede Lunatic translator: dangling else for the 1000th time: not dangling any more.
Also update test/dangling_else.con. See there for how if* cascades are handled
in CON. It's actually kind of pretty. Also, take care to handle code deferred
to after the if/if-else properly (ifpdistl, ifpdistg, ifcanseetartet).

git-svn-id: https://svn.eduke32.com/eduke32@3534 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-03 16:06:12 +00:00
helixhorned
8955316bba Lunatic t.: {read,save}gamevar, fix break in nested while, fix rotatesprite16.
git-svn-id: https://svn.eduke32.com/eduke32@3533 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-28 17:30:15 +00:00
helixhorned
fe4090b9fd build.c: initialize g_doHardcodedMovement to 1.
Fixing movement when not loading a.m32.

git-svn-id: https://svn.eduke32.com/eduke32@3532 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-28 17:30:11 +00:00
helixhorned
5a5368a567 scriplib: attach const qualifiers to appropriate function input arguments.
git-svn-id: https://svn.eduke32.com/eduke32@3531 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-28 17:30:08 +00:00
helixhorned
1606c17a77 Lunatic: fixups and debugging helpers.
- add LuaJIT's 'v' module printing trace info
- translator: fix game function name definitions
- revert math.fmod -> math.modf, they are different!
- disable JIT compilation for a function we're getting strange crashes with
- Make some of DukePlayer_t's members 'bool' on the Lua side. It's way
  too easy to write something like "ps.jetpack_on" where "ps.jetpack_on~=0"
  was meant. [Background: Kyle873 observed that Duke was always floating.]
- Error out if looping in our_module(). I find this behavior more logical
  than returning true.
- fix a couple of missed FORBID variables

git-svn-id: https://svn.eduke32.com/eduke32@3530 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-28 17:30:04 +00:00
helixhorned
677c585b72 Lunatic translator: fix codegen for "break" inside while loops.
Note: usually, languages call this "continue". Jeez, CON...

git-svn-id: https://svn.eduke32.com/eduke32@3529 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-28 17:29:58 +00:00
helixhorned
d747e26fd0 Lunatic: initialize test Lua state earlier so that 'setdefname' has an effect.
git-svn-id: https://svn.eduke32.com/eduke32@3528 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-25 15:31:24 +00:00
helixhorned
e576224bb9 Remove some duplicate or unused control layer defines.
Notes:
 - MAXJOYBUTTONS is out of sync between the two definitions
 - In menus.c, NUMMOUSEFUNCTIONS must equal MAXMOUSEBUTTONS,
   fail to compile if this becomes false.

git-svn-id: https://svn.eduke32.com/eduke32@3527 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-25 15:31:22 +00:00
helixhorned
c5c1aa2331 Lunatic translator: handle RETURN across events.
git-svn-id: https://svn.eduke32.com/eduke32@3526 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-25 15:31:19 +00:00
helixhorned
fa61fed75c engine.c: in setpolymost2dview(), set gloy=-1 unconditionally.
This fixes an update issue: start EDuke32 without warping to a map in Polymost,
change to classic, and change to Polymost again. The OSD background will be
displaced.

git-svn-id: https://svn.eduke32.com/eduke32@3525 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-25 15:31:16 +00:00
helixhorned
f791b5af20 Lunatic: sector[]:zrangeat(), 'getzrange' command for the translator.
Also, fix quote commands there.

git-svn-id: https://svn.eduke32.com/eduke32@3524 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-25 15:31:13 +00:00
helixhorned
b92c487c6f Lunatic translator: codegen fixes, setgamepalette, -fno=onlycheck option.
git-svn-id: https://svn.eduke32.com/eduke32@3523 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-25 15:31:09 +00:00
helixhorned
0354e38843 CON parser: don't allow read-only gamevars to 'readgamevar' command.
git-svn-id: https://svn.eduke32.com/eduke32@3522 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-25 15:31:05 +00:00
helixhorned
01469bc45a Lunatic Makefile.deps: make game.c depend on defs.ilua.
Since the size of defs.ilua's bytecode is used in game.c.

git-svn-id: https://svn.eduke32.com/eduke32@3521 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-24 16:05:52 +00:00