Commit Graph

2282 Commits

Author SHA1 Message Date
helixhorned f0bf345233 Mapster32: fix cycling to the next link sprite with LShift+"]", tweak message.
git-svn-id: https://svn.eduke32.com/eduke32@3424 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-23 19:36:36 +00:00
helixhorned cbb4d3c6eb Reimplement pixel doubling by drawing scene at 1/(2*2) resolution and expanding.
The pixel doubling now only applies to the area where the world scene is drawn,
i.e. it may be smaller than the physical screen / WM window size. The optimized
version is slightly faster than for non-doubled pixels for me (optimized build),
but see code for caveats. Some other minor issues:
- won't work when the world is drawn from demo cameras (and offscreen, but that
  matters less)
- will leave a few pixels empty when running with x resolutions not evenly
  divisible by 4

git-svn-id: https://svn.eduke32.com/eduke32@3421 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-20 21:17:31 +00:00
helixhorned f132c9230f game.c: pull out two G_DrawRooms blocks into G_OROR_DupSprite and G_ReadGLFrame.
... to have a little moew overview.

git-svn-id: https://svn.eduke32.com/eduke32@3420 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-20 21:17:28 +00:00
helixhorned c927de54b1 Lunatic translator: handle overriding system GVs.
git-svn-id: https://svn.eduke32.com/eduke32@3419 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-20 21:17:23 +00:00
helixhorned 671bd67aa8 player.c: make four functions file-local.
git-svn-id: https://svn.eduke32.com/eduke32@3418 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-20 21:17:19 +00:00
helixhorned 9103d4987c CON/m32script: remove GAMEVAR_DEFAULT uses, since they had no effect.
In CON, the bit is still always cleared for user-defined gamevars.

git-svn-id: https://svn.eduke32.com/eduke32@3417 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-20 21:17:15 +00:00
helixhorned 99fd67211d gamevars.c: implement Gv_Clear() in terms of Gv_Free() + own code.
Also, some commenting.

git-svn-id: https://svn.eduke32.com/eduke32@3416 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-20 21:17:10 +00:00
helixhorned 142e36d6f4 Lunatic: cmdline switch to run test script, compile out more code, 2 more GVs.
git-svn-id: https://svn.eduke32.com/eduke32@3415 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-20 21:17:06 +00:00
helixhorned b6ca618694 Lunatic: hook up PIPEBOMB_CONTROL etc. with the player members.
git-svn-id: https://svn.eduke32.com/eduke32@3414 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-20 21:16:58 +00:00
helixhorned cd1f3739d9 player.c: factor out repeated code into P_SetWeaponGamevars().
git-svn-id: https://svn.eduke32.com/eduke32@3413 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-20 21:16:54 +00:00
helixhorned fdd652fd1a demo.c: correct strange indentation.
git-svn-id: https://svn.eduke32.com/eduke32@3412 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-20 21:16:50 +00:00
helixhorned 2b0b8d34cc Remove mixed Lunatic/legacy build option.
git-svn-id: https://svn.eduke32.com/eduke32@3410 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-19 18:29:00 +00:00
helixhorned d63ddb6e39 Lunatic translator: more of the same.
- more predefined vars
- fix recursive states and ones with a stray "else" before the end

git-svn-id: https://svn.eduke32.com/eduke32@3409 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-19 18:28:55 +00:00
helixhorned fb1db25c4e Consolidate badly named HUD weapon globals ("g_looking_angSR1") into struct.
git-svn-id: https://svn.eduke32.com/eduke32@3408 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-19 18:28:48 +00:00
helixhorned 7acd1ad743 Lunatic: more convenient weapon data access.
git-svn-id: https://svn.eduke32.com/eduke32@3407 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-19 18:28:43 +00:00
helixhorned fbaa00665d Lunatic: various.
- Fix "gv" access.
- camera
- translator: comparison predicates, predefs...

git-svn-id: https://svn.eduke32.com/eduke32@3406 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-19 18:28:40 +00:00
helixhorned c9190e79ae Wrap some ud.camera* and g_camera{Distance,Clock} into CAMERA* macros.
In Lunatic, make it a struct type "camera_t" instead.

git-svn-id: https://svn.eduke32.com/eduke32@3405 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-19 18:28:32 +00:00
helixhorned 753278cd12 Simplify HUD scale and viewport size logic and clean up related code.
* Make the "classic status bar fullscreen viewport" mode accessible
  in classic too.
* Make range of status bar scale 36..100
* Update ud.statusbarmode when executing OSD command r_size (ud.screen_size).
  NOTE: ud.statusbarmode is considered internal. Don't use from CON!
* Make sure 1) loading any configuration and 2) menu bars work correctly.
  (The "classic status bar fullscreen viewport" mode will never be restored
   though because ud.statusbarmode isn't handled by the OSD var system).

git-svn-id: https://svn.eduke32.com/eduke32@3402 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-17 21:59:11 +00:00
helixhorned e9bd1b7582 Various cleanup of status bar drawing code, remove some old commented out code.
git-svn-id: https://svn.eduke32.com/eduke32@3400 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-17 21:59:01 +00:00
helixhorned a98ea13f1e game.c: replace a couple of sbarsc() inline code with calls to sbarsc().
git-svn-id: https://svn.eduke32.com/eduke32@3399 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-17 21:58:54 +00:00
helixhorned dc9f4eb360 Mapster32: add cvar/mapster32.cfg option "keeptexturestretch".
If enabled, dragging wall vertices will correct the xrepeat after the
mouse button is released, so that the pre-drag absolute stretching is
restored.

git-svn-id: https://svn.eduke32.com/eduke32@3398 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-16 20:38:56 +00:00
helixhorned 8bca521ef4 Mapster32: slightly rework code for setting/querying some cvars.
git-svn-id: https://svn.eduke32.com/eduke32@3397 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-16 20:38:52 +00:00
helixhorned 0648d25db1 Mapster32: more or less fix the auto wall-alignment feature ([.]/[,]).
- Run it twice, since the first one is wrong.
- Warn when attempting to align based on a top-oriented wall. When the
  sequence of walls to align has "windows", only the bottom parts will
  be correct.
- Make the modifiers actually useful:
  * Pressing SHIFT aligns at most one wall, remove the old CTRL modifier.
  * The rest is as before: ALT makes the walls have (approximately) equal
    texture stretching, ['] (quote) aligns the immediate TROR-nextwalls.

git-svn-id: https://svn.eduke32.com/eduke32@3396 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-16 20:38:50 +00:00
helixhorned 8fb886b14a Replace dragpoint()'s "dragpoint_noreset" global with a "flags" argument.
Also, add another flag, signifying that from the editor, also the
"lastwall"s (i.e. the CCW-linked points) should get collected. This is
to signal the editor that their wall lengths should be displayed, too.

git-svn-id: https://svn.eduke32.com/eduke32@3394 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-16 20:38:41 +00:00
helixhorned 898462152c Fix MUSICANDSFX ambient sounds (bit 2) playing only one instance.
This is done by introducing an additional internal bit, meaning
"play only one instance". It is set for all sounds which have bit 1
("repeat in the sound system") set at definesound time, but not those
that set bit 1 temporarily (see r3336).

git-svn-id: https://svn.eduke32.com/eduke32@3393 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-13 16:40:36 +00:00
helixhorned 39ce7aee62 Lunatic: codegen beyond milestone 1.
- weapon data
- changing ones... (locals for now)
- operators

git-svn-id: https://svn.eduke32.com/eduke32@3392 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-13 16:40:32 +00:00
helixhorned 417dc33769 Lunatic translator: slight code reorganization to prevent too many local vars.
git-svn-id: https://svn.eduke32.com/eduke32@3391 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-13 16:40:26 +00:00
helixhorned 8e5d5f9b89 Lunatic: begin changing ones...
git-svn-id: https://svn.eduke32.com/eduke32@3390 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-13 16:40:21 +00:00
helixhorned 7d2dd223bb Mapster32: don't apply GL fogging to crosshair.
git-svn-id: https://svn.eduke32.com/eduke32@3389 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-13 16:40:14 +00:00
helixhorned 56ef10c893 Lunatic translator: handle -mx.
git-svn-id: https://svn.eduke32.com/eduke32@3388 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-13 16:40:07 +00:00
helixhorned 222e92ef37 Make r_downsize 0 by default.
Also, rewrite comparison to the non-tint in astub.c to be even less hackish.

git-svn-id: https://svn.eduke32.com/eduke32@3387 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-08 23:12:59 +00:00
hendricks266 8bb14fa13e Fix warnings that appear if big-endian || USE_OPENGL=0.
git-svn-id: https://svn.eduke32.com/eduke32@3382 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-08 06:17:10 +00:00
helixhorned 51c5afaae6 Lunatic: a couple of small changes.
git-svn-id: https://svn.eduke32.com/eduke32@3380 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-06 18:56:45 +00:00
helixhorned 87bd2c762e Fix NETCODE=0 build.
git-svn-id: https://svn.eduke32.com/eduke32@3379 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-06 18:56:38 +00:00
helixhorned 28d05e3fdd Reimplement pixel doubling by taking the upper left pixel of each 2x2 block.
This obviously won't help performance as the scene has still to be drawn at
the original resolution, but it's better than the draw-to-tile hack.

git-svn-id: https://svn.eduke32.com/eduke32@3378 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-06 18:56:34 +00:00
helixhorned 8ed4667265 Lunatic: grabbag of different things.
- fix error handing with recursing events
- wallsofsect iterator, sector[]:contains()
- more codegen; mangle function names
- m32: compinside

git-svn-id: https://svn.eduke32.com/eduke32@3375 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-05 13:09:31 +00:00
helixhorned e72557d9d9 Lunatic translator: dangling else, hopefully for the last time!
git-svn-id: https://svn.eduke32.com/eduke32@3374 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-05 13:09:25 +00:00
helixhorned 50f5a2340f Lunatic: more commands, mostly of the define* variety.
git-svn-id: https://svn.eduke32.com/eduke32@3373 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-05 13:09:19 +00:00
hendricks266 05a550c08d Address some macro madness in jaudiolib. (Should fix PowerPC builds.)
git-svn-id: https://svn.eduke32.com/eduke32@3370 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-04 17:29:03 +00:00
hendricks266 5493583140 Amend r3328 so that NAM gets WEAPON_RELOAD_TIMING.
git-svn-id: https://svn.eduke32.com/eduke32@3367 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-04 17:27:43 +00:00
helixhorned 0c44056945 Lunatic: getting closer to the first milestone.
On the C side, zrange, angrange and autoaimang are represented as
DukePlayer_t members then.

git-svn-id: https://svn.eduke32.com/eduke32@3366 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-02 22:33:37 +00:00
helixhorned 67cdd9d883 gameexec.c: factor code for "ifnosounds" into sounds.c: A_CheckAnySoundPlaying.
git-svn-id: https://svn.eduke32.com/eduke32@3365 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-02 22:33:32 +00:00
helixhorned e4caa58cf2 Move DukePlayer_t's .palette down so that 2-byte-sized members are 2-byte-aligned.
Bump BYTEVERSION.

git-svn-id: https://svn.eduke32.com/eduke32@3363 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-02 22:33:22 +00:00
helixhorned 2528fd3bf5 player.c: factoring continued.
New local functions:
Proj_DoRandDecalSize, SectorContainsSE13, HandleHitWall, Proj_CheckBlood,
Proj_HandleKnee.

git-svn-id: https://svn.eduke32.com/eduke32@3362 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-01 15:24:42 +00:00
helixhorned 10feaeb5b4 player.c: cleanup. "ProjectileData[atwith]." --> "proj->", ...
The diff may look daunting, but it's clear what is changed with
git diff (...) --color-words='[a-zA-Z0-9_]+|[^[:space:]]' -b

git-svn-id: https://svn.eduke32.com/eduke32@3361 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-01 15:24:39 +00:00
helixhorned 552708103f player.c: finish hitscan projectile handling cleanup.
Factoring out 2x almost duplicated code into {P,A}_PostFireHitscan().

git-svn-id: https://svn.eduke32.com/eduke32@3360 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-01 15:24:36 +00:00
helixhorned f65f547fef player.c: hitscan projectile handling cleanup continued.
git-svn-id: https://svn.eduke32.com/eduke32@3359 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-01 15:24:33 +00:00
helixhorned 15b7444b46 player.c: factor out 2x almost dup'd code preparing hitscan weapon firing.
The code is duplicated with small changes for the hardcoded and custom
projectiles.
Adding local functions P_PreFireHitscan(), A_PreFireHitscan() and
Proj_MaybeAddSpread().

git-svn-id: https://svn.eduke32.com/eduke32@3358 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-01 15:24:31 +00:00
helixhorned eda5b22030 Lunatic: more code...
git-svn-id: https://svn.eduke32.com/eduke32@3357 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-01 15:24:28 +00:00
helixhorned a24ab8d4fa Factor out some code into C_AllocQuote() and C_InitQuotes().
In Lunatic-only build, also always allocate the first 128 quotes.

git-svn-id: https://svn.eduke32.com/eduke32@3356 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-01 15:24:25 +00:00