/
haleyjd_changelog_3.txt
3289 lines (2563 loc) · 163 KB
/
haleyjd_changelog_3.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
NOTE: This file has been retired, and contains changelog entries
from v3.33.33 up to the release of v3.35.92.
See haleyjd_changelog_4.txt for more recent updates.
================================================================================
Changes since Eternity Engine v3.35.90
================================================================================
--------------------------------------------------------------------------------
03/22/09
I have added support for console variables which lack lower or upper bounds on
their values, in order to support unlimited-length file paths (though truth be
told, due to operating system limitations, file paths are still effectively
limited to anywhere from between 512 to 1024 characters - but at least EE will
not be to blame for this).
I altered the LALIGNED menuitem flag so that all items using it on a menu page
will draw their value components at the same x coordinate, making them aligned
to a global standard. This vastly improves the appearance of LALIGNED menuitem
groups, including particularly the one on the new IWAD paths page of the Wad
Options menu.
I have also added several options that were new since v3.33.33 to appropriate
locations in the menu system.
We are now prepared for the maintenance release. The version will be 3.35.92,
and the user-suggested version name is "Nekhbet," a reference to the Egyptian
hawk goddess, the personification of Upper Egypt, who holds a staff with a
shen ring representing "all" or infinity, which in reference to time, would mean
"eternity." A fitting name, I believe.
--------------------------------------------------------------------------------
03/17/09
I have made some changes to improve Heretic compatibility:
1. D'Sparil's teleport probability and teleport spot selection have been
restored to their vanilla behavior, now that the GPLing of the code allows me
to use it directly. EE still fixes the potential infinite loop, however, by
adding a termination condition in the new distance-checking spot selection
codepath through P_BossTeleport. In vanilla Heretic, if a level were made
where the spots were all less than 128 units apart, and D'Sparil tried to
teleport while in the midst of them, the game would lock up.
2. Gargoyle charging probabily has been reverted to 64/256 from 128/256, even
though this causes a serious issue in Black Plague skill level where the
imps seem to freeze constantly. This is, unfortunately, a "part" of the game
which fixing would cause the game balance to be thrown off significantly. I
was prompted to change this after watching some particularly brilliant
youtube runs of the game in Black Plague skill level. Noticing how the imp
stalls were often advantageous to the player makes me think that changing
this is probably not as good an idea as I previously thought it would be.
3. Weredragon fireball smoke no longer burns. This is another change like the
previous one. After seeing players strafing through those smoke trails
repeatedly, I got the idea that maybe Raven didn't fix this problem
intentionally, as it might make the beastballs too dangerous.
4. Iron Lich tornadoes can still change targets, which is an innovation I
added, but they will not do so if an old demo is trying to play. This has
almost zero impact on normal gameplay, but is very cool-looking when it
happens, so I'm leaving this tweak in place.
5. If old demos are trying to play, 3D object clipping and TerrainTypes will
be enabled. Even though Heretic demos stand pretty much zero chance of
ever syncing in EE once the player touches any mobj_t's or shoots a gun,
I'd like the reasons for the desyncs to at least be limited to things that
I simply cannot help, and not just say "screw it all."
--------------------------------------------------------------------------------
03/16/09
After continued problems with the console pausing feature, I have altered it to
work in the same manner as menu pausing, rather than having it create a
sendpause event. "consoleactive" is now checked along with "menuactive" in
various places, so that the console only pauses the game during single-player
play, and not during netgames or while playing demos.
--------------------------------------------------------------------------------
03/15/09
I added full comments to the i_picker.c module, and I also changed the IWAD
path variables to never be NULL, but rather default to the empty string, so that
I can safely attach console variables to them.
--------------------------------------------------------------------------------
03/14/09
I have finally decoupled autorun from the capslock key and killed off any code
expecting it to be bound there. There is now an autorun console variable, as
well as an autorun keybinding action. Capslock has also been hacked to behave
like a normal key under Windows, as I've been told it behaves under Linux. In
Windows, capslock alternately sends a keyup and keydown event every time it is
pressed once. This doesn't work with EE's dynamic keybinding system.
--------------------------------------------------------------------------------
03/13/09
I made a workaround for an issue in the menu system that was driving me up the
wall. The previous change that allows paging to take place if you move past the
first or last item on a menu using menu_up or menu_down actions was making me
angry because I was accustomed to the previous behavior, having used it for
years. So, I made it possible to trigger the old behavior by holding down Ctrl,
which still requires some learning on my part, but at least makes it possible to
have both behaviors at the same time. I also killed off the wrapping behavior
that would take place on the first and last pages respectively, which makes what
is going on a whole lot less confusing.
--------------------------------------------------------------------------------
03/08/09
I have completed a graphical IWAD choosing frontend for Eternity, implemented
using SDL. It displays the titlescreens for the various games over a background,
all of which are stored in a new base/startup.wad file, which uses the previous
private wad directory system I mentioned adding recently. Only those games with
an IWAD specified in the system.cfg file are displayed for choosing.
Esselfortium created the background graphic, after the ugly one I made for
initial testing was deemed far too hideous for public use ;) Unfortunately,
several people were turned to stone by it before we managed to make the switch.
--------------------------------------------------------------------------------
03/07/09
Added a specific finale font to EDF after I noticed that the finale line step
was off (this was previously handled with a special textmetric object in the
GameModeInfo structure).
After numerous commits, SoM and I have added mousewheel support. The mousewheel
behaves badly (in my opinion) under SDL, and doesn't work too well with EE's
keybinding system without some serious workarounds in the low-level input code.
--------------------------------------------------------------------------------
03/06/09
Added the long-planned system.cfg file, with support for specifying that all
DOOM gamemodes should use the base/doom/Eternity.cfg file rather than their
individual game-folder configurations. This allows you to have either one or
many configs for those games, depending on your preferences. There are some
other settings that I plan to add in short order, including most importantly the
ability to store IWAD settings (these cannot go in the base/game configs because
those cannot be used until we know what game we're using, and unless -game is
used, that information can only be ascertained from the IWAD file).
I started getting around to a bunch of the usability issues that EE has
accumulated as FIXME's for the past few years, in preparation for an upcoming
maintenance release. As of now, we have support for 8-button gamepads,
and next/previous weapon actions that are suitable for gamepad and mousewheel
use.
--------------------------------------------------------------------------------
03/02/09
I noticed that I forgot to add several of the new UDMF-related sector damage
properties to the savegame code, so that sector transfers involving damaging
floor types would be broken if you saved and then reloaded the game. Heretic
E2M2 was a simple level for triggering this problem, since it has some lower-
and-change-type floors right in the first room. It is, in fact, the level I
have always historically used to test changes to the sector type transfer
system. This is the third time I have used it for that purpose ;)
--------------------------------------------------------------------------------
03/01/09
I made some simple alterations to the wad file system that enable modules to
open private wad files that are not linked into the main wad directory. In
effect, I simply moved the main wad directory variables into a structure, and
changed the W_ functions to take a pointer to that structure instead of using
the main wad file directory explicitly.
My initial idea for this is to base the new savegame format on WAD files, which
would enable the data inside to be more easily examined and even edited.
However, there are some serious problems with the way I would like this to work
which remain unsolved. No decisions have been made yet.
Esselfortium mentioned a weird bug with EDF ambience sounds not being relocated
by linked portals. Turns out I had put the NOSECTOR flag on the EEAmbience and
EEEnvironmentSequence objects, which prevents them from having the appropriate
group id set as a side effect of not being attached to a sector. I have removed
this flag from several EE control point objects where it is inappropriate.
--------------------------------------------------------------------------------
02/28/09
Finished adding changes to the EDF font system that enable the proper freeing of
resources when font objects are overwritten (defined multiple times with the
same mnemonic).
--------------------------------------------------------------------------------
02/26/09
After some problems and complaints with how the block font system I added in
3.33.50 turned up, I decided to design and implement a complete EDF font system,
which externalizes all the previously natively defined details of font
construction for both patch and block fonts. All fonts are now defined in
fonts.edf, and all native subsystems now check global EDF-set variables to see
what fonts they should use for various purposes.
--------------------------------------------------------------------------------
02/19/09
Test commit for Manc.
--------------------------------------------------------------------------------
02/04/09
By request, I changed the resurrect console command to work any time that the
player is in PST_DEAD state, even if health is greater than zero. This allows
you to escape certain situations such as being a zombie player.
I also managed to very simply disable the R_Init loading box when -nodraw is
active, by adding a check for the parameter's variable in the box drawing
routine. Now all you get in -nodraw mode is a perfectly black screen.
--------------------------------------------------------------------------------
01/27/09
By implementing some more changes to the zone system, I was finally able to nail
down the precise location of the malloc responsible for the heap corruption.
Take a wild guess what it was before I tell you -- it was the TXTRCONV parser
from SMMU. The code was assuming that the lump was null-terminated, a problem I
had earlier in the SMMU skin parser, SMMU console script parser, and SMMU
MAPINFO parser.
This particular problem managed to stay just under the radar for all these years
because it was highly sensitive to the *exact* alignment of the zone heap. As
mentioned in the previous commit, even one configuration value differing could
be enough to cause this error to disappear. If there were any zeroes between the
end of the lump and the next block, the parser would stop there, leaving only
the very last entry in the TXTRCONV table possible corrupt. Because of what
tended to be loaded into the memory location previously, this had a very high
probability of happening.
The changes I made were to separate the CHECKHEAP and zone memory scrambling
functions from the INSTRUMENTED define, allowing all three to be enabled
independently. INSTRUMENTED itself can have side-effects on the heap, since it
writes additional values into the zone memory headers. Memory scrambling can
also be fatal to attempts to find heap corruption problems, and is generally
only useful for finding pointer-class errors, such as accessing freed memory
(it has been excellent at catching this in the past, particularly when mobj_t's
are being inappropriately referenced).
In this case, the ability to compile with CHECKHEAP in place but without zone
scrambling or INSTRUMENTED enabled me to nail down the precise cause of the heap
corruption, because it stopped the program at the exact time that the next block
was corrupted, rather than at the next time that block happened to be touched
by the zone heap, which was quite a bit later. None of my log files were able to
pinpoint the TXTRCONV lump as being the source of this problem, due to it having
been freed for a long time before the first level's Z_CheckHeap call.
--------------------------------------------------------------------------------
01/20/09
Esselfortium has finally succeeded in triggering the mysterious heap corruption
issue that has been dodging in and out of my sights for a couple of years now,
in a way that can be reliably replicated, but ONLY through the EXACT use of his
complete setup - any difference in directory structure, files loaded, or even
configuration file settings will cause the error to disappear. As such, I've had
him send me his whole EE directory minus anything that it's impossible to have
loaded in the way he's launching it, and I've been able to replicate the error
consistently.
There are still some issues with debugging the zone heap which I believe I can
tune up to accelerate cracking this one. The first one I have added today is a
paranoid check in Z_Free for invalid block tags - in particular, PU_FREE, or
anything greater than or equal to PU_MAX. The first would indicate a double
free taking place, which is something I had initially suspected for this problem
due to the way in which the zone blocks are being corrupted (this assumption
has proven itself false, however). The latter would indicate simple heap
corruption, as no value outside the range from PU_FREE to PU_MAX should ever be
written into a zoneblock's tag field.
--------------------------------------------------------------------------------
01/17/09
Applied a belated change for the Lost Episode - Evil Unleashed project.
Megaspheres may now be collected by the player in any DOOM gamemode, not only in
DOOM 2.
--------------------------------------------------------------------------------
01/12/09
Fraggle provided a fix for a strange Linux-only sprintf issue, where use of the
"%s%c" idiom to append a character to the end of the same string was going
haywire (sounds to me like maybe sprintf is being implemented with memcpy,
which AFAIK is not adhering to the specification, since the specification
doesn't say sprintf is forbidden from formatting into any of the same strings it
takes as arguments - at least, not that I've ever heard). The offending code in
the console had been there since SMMU and never had a problem until now, so who
knows what it's really about.
================================================================================
Changes since Eternity Engine v3.33.50
================================================================================
--------------------------------------------------------------------------------
01/11/09
Added a processor affinity setting and supporting code in i_cpu.c for SDL
builds on Windows and Linux. Setting processor affinity prevents the mysterious
SDL_mixer multicore issue, which is some kind of thread contention problem
(I suspect race conditions and/or inappropriate handling of resource locks).
This is the final commit for 3.35.90 release, which will be codenamed "Simorgh,"
for the wise and holy mythical bird of Persian origin.
--------------------------------------------------------------------------------
12/31/08
Sector damage has been completely rewritten to function through four new fields
in the sector: damage, damagemask, damagemod, and damageflags. These enable an
incredible variety of sector damage behaviors, and these flags replace all
previous code for doing sector damage, even for effects such as sector type 11.
It will accordingly be possible to replicate and customize all such effects
via use of ExtraData and/or UDMF.
--------------------------------------------------------------------------------
12/30/08
I have defined sector flags for purposes such as friction, push effects, and
SMMU sound properties, in order to replace the BOOM generalized sector special
system. In the process, I fixed the "oldspecial" hack from BOOM and two problems
related to it: the field was not saved in save games, and it was unnecessarily
transferred between sectors, causing sectors to appear secret that never were
(this was apparently intentional in BOOM, but I cannot figure out Jim Flynn's
logic behind doing it - it makes no sense at all, so now it is gone).
--------------------------------------------------------------------------------
12/16/08
I fixed up the disk flasher to not activate in gamemodes that do not support it,
such as Heretic. SoM was supposed to have done this originally, but it slipped
his mind ;) I had to have him commit it for me, however, because due to an
overzealous firewall, I can no longer perform SVN commits at work.
--------------------------------------------------------------------------------
12/04/08
I have implemented secure map loading. Almost all indices are now fully
rangechecked against the array they are accessing, so problems like bad segs or
bad sector references get redirected to the first entry in the lump. While not
guaranteed to produce an error-free experience, it will prevent virtually all
crashes possible from loading malformed levels.
In addition I have revamped REJECT handling so that too-large rejects are
warned about but used normally, too-small rejects are padded out to the
appropriate size, and 0-length rejects are handled as before (allocated at size
and filled completely with zeroes).
--------------------------------------------------------------------------------
11/28/08
For Evil Unleashed, I have implemented toggling of the super shotgun's
availability in DOOM gamemodes by testing for the presence of the SHT2A0 lump,
instead of assuming that it should only be available in commercial mode. I
have accordingly eliminated the COMMERCIAL weapons flag, as that was a stupid
idea anyway.
--------------------------------------------------------------------------------
11/25/08
SoM added a powersaver command which can make EE sleep, giving up some CPU
cycles so that it does not burn out CSonicGo's laptop battery so quickly. It
is possible that some more work needs to be done with this, though, due to the
performance drop it currently precipitates.
--------------------------------------------------------------------------------
11/16/08
Finally got around to converting all those GameModeInfo booleans into the flags
I earlier defined.
--------------------------------------------------------------------------------
11/14/08
PC speaker emulation is now complete and is available as an additional sound
driver setting under the sound menu.
SoM added a new sort of portal linedef which can apply tagged portals directly
to its front sector. Evidently this is very handy for mappers.
--------------------------------------------------------------------------------
11/11/08
I had to remove all calls to SDL_FreeRW which Julian had placed in his rewrite
of the music engine a few years ago. Turns out these are not needed and are
inappropriate. They cause a double free problem on the C heap which for some
reason only becomes troublesome to Eternity if a digital music format such as
OGG is loaded - some difference between this and MIDI dealing with subsequent
memory allocations causes it to become a problem.
--------------------------------------------------------------------------------
11/10/08
Extensive work has been done on PC speaker sound. It should be functional very
soon. I have begun adding EDF support for the feature. Sound definitions now
include the ability to explicitly specify a PC speaker data lump in addition to
their normal digital lump. When no such lump is specified, the engine searches
for various other possibilities, including adding the DP prefix in place of DS
when the sound is normally so prefixed.
There is also a new EDF sound field which disables the playing of that sound as
a PC speaker lump altogether, even if the PC speaker data lump is available.
There were a number of sounds in DOOM for which this is the case, primarily the
chainsaw idle sound and the various demons' snorts and pain sounds. I imagine
that if these were to play, the game would sound really annoying, and most of
the important sounds would get cut off.
--------------------------------------------------------------------------------
11/07/08
Fixed a new pair of int-to-bool conversion warnings in snes_spc that decided to
pop up after I fixed the first one (stupid VC++...)
I broke up i_sound.c, moving SDL-specific digital audio and music code into
modules i_sdlsound and i_sdlmusic, introducing new driver structures to hold
function pointers into the routines implemented there. This allows the generic
low-level code in i_sound.c to deal with sound support for any potential library
OR platform. This is mainly needed at the present to deal with PC speaker
support, but it could be useful in the future for supporting alternate digital
sound libraries such as OpenAL as well.
Related to this, I repaired the ability to have music when the -nosfx parameter
is used, by writing up code that the music engine can call to initialize and
setup SDL and SDL_mixer if and only if the digital sound engine hasn't done it
first. I could have done this originally, I just ended up taking the lazy route.
The condition of the sound and music code at that time was pretty damn bad, so
you really cannot blame me ;)
--------------------------------------------------------------------------------
11/05/08
SoM has completed a massive expansion of my VBuffer pseudo-class that has
transformed it into EE's primary means of dealing with the screen buffer,
period. VBuffers are now powerful, general graphic canvas objects that can
blit and scale. The old screens array is now pretty much history.
As a result of this work, SoM was also able to finally fix the disk flasher to
work in SDL builds. It's nice to see that old feature available again, although
EE has made it entirely optional, and it is disabled by default, since with the
blazing access speed of modern hard-drives, it's nearly invisible anyway.
--------------------------------------------------------------------------------
11/04/08
Fixed a big problem with confusion between the detailshift and c_detailshift
variables. One is supposed to be private to the renderer, and the other is for
use by the configuration and console code, so that the state of the variable is
not changed during bad times such as while rendering a frame. Failure to use
the proper one meant that the configuration variable wasn't being propagated to
the renderer at startup, leaving the game starting up in high detail mode even
when low detail was enabled.
Found out that the parameters extracted from the -geom command-line parameter
were not being rangechecked when Kate tried to test out 1200x800 mode (which
EE doesn't support quite yet).
--------------------------------------------------------------------------------
11/01/08
SoM eliminated almost all direct access to the video buffers outside of the
V_ and R_ modules, reducing the number of drawing pipelines, which is important
progress toward the ability to have features such as true color support.
Vertical screen patch clipping has now been fully repaired.
I fixed up C_Drawer so that it is not called while the -nodraw parameter is
active. Now only the R_Init loading box currently appears, which is hard to
get rid of without introducing some hacks.
--------------------------------------------------------------------------------
10/31/08
SoM split i_video.c up, creating a new module i_input.c, as I had noted needed
to be done ages ago. :)
SoM was also very busy with the following:
* Palette update, when needed, is now performed during the screen update process
in lieu of a call to SDL_Flip, instead of during gameplay. This is good for a
number of reasons, not the least of which is the fact that it helps to abate
problems with SDL's severe bug in DirectX 8-bit video modes which results in
it moving the entire surface out of and back into video memory while applying
an extremely expensive remapping operation to the entire buffer.
* Palette changes are no longer lost when the user changes the gamma level
setting, which is a bug stemming from the vanilla codebase. This was caused by
not caching the current palette as set by the gameplay logic for effects such
as radiation suit shielding, damage, and item flashes. This caching is now
necessary anyway to support palette change on screen update, so it kills two
birds with one stone.
I have defined a set of flags for use by the GameModeInfo structure, with the
goal of eliminating all of the boolean variables in the structure, which are
just wasting a lot of space.
--------------------------------------------------------------------------------
10/29/08
SoM found a real optimization to work on in the form of adding virtual screen
space to the screen buffers for resolutions whose horizontal dimension is a
power of two, such as 1024x768, which have been noted to suffer from extremely
disproportionate problems with cache misses.
Fraggle explained this to me as a key clustering sort of problem. The cache is
mapped to main memory through a hardware variation of a hash table. Each cache
line represents a chunk of memory that is N bytes long, and N is invariably a
power of two, such as 1024.
This means that if your screen buffer is such a size, then every step down a
row of pixels on the screen causes a cache line change, which means a potential
cache miss. DOOM's approach of rendering vertical columns is unfortunately not
very good when operating on buffers in main memory, as it typically has to do
now. The addressing runs orthogonal to the direction of access, giving poor
locality of reference to begin with. DOOM got away with this because it was
using a small screen size and could write directly into the VGA buffer.
Screen sizes of greater than 1024x768 are particularly vulnerable. Those below
this, even power of two sizes, do not seem to suffer the same degree of
crippling slow-down. Since EE will be adding widescreen support soon and raising
the resolution cap considerably, this is important.
Adding four bytes to the horizontal screen dimension was enough for SoM to see
a 20 FPS improvement in timedemos in 1024x768. This approach has previously
been implemented in the PrBoom-plus port, and thus we had been looking at adding
it for quite a while.
While he was at it, SoM also fixed up my console pausing feature, and improved
the console command list to have a full filter parameter that searches for
strings matching a prefix, as opposed to the simple alphabetic filter I had
earlier implemented.
--------------------------------------------------------------------------------
10/27/08 - 10/28/08
I have completed a new texture loader which streams in the texture definitions
through a byte pointer. It is capable of detecting and seamlessly handling both
DOOM- and Strife-format textures, and I'm quite proud of it. I also cleaned up
the gigantic mess that was R_Init, and to me at least, it seems to run just a
little faster as a result. I don't think compilers are very good at optimizing
1000-line-long functions; there's just too much crap in the way of doing
proper register allocation for them to deal with that much at once. Almost all
of the stuff I moved out should have been written in separate routines
originally, anyway, as they each deal with discrete, unrelated subproblems of
texture loading.
I also fixed a "conversion of bool to int" warning in the snes_spc library with
a simple !! on the argument. This occurs on the interface between the C and C++
code in the library, since C does not have a builtin boolean type.
--------------------------------------------------------------------------------
10/26/08
I added an I_GetTicks routine which calls a platform-appropriate low-level
timing routine for the purpose of timing optimizations. However, its resolution
under Windows via use of the SDL_GetTicks routine is apparently insufficient,
as it tends to return 0 a lot when timing routines such as R_FindPlane.
I attempted to apply entryway's suggested optimization to R_FindPlane, which
was to avoid calling sin and cos for flats with 0 angle, which is technically
unnecessary. However, according to both timing and fastdemo results, this had
absolutely NO measurable effect.
sin and cos are implemented in Visual C++ with the optimizer running as single
opcodes, fsin and fcos, which according to tables of Pentium IV and AMD CPU
instruction timings, take somewhere in the neighborhood of 13 cycles for
arguments between 0 and pi/2 (this is due to a hardware lookup table embedded
directly in the FPU). Evidently a branch to check for angle 0.0f just doesn't
save any real time.
--------------------------------------------------------------------------------
10/25/08
I have integrated Chocolate Doom's mouse acceleration behavior as an option
against Eternity's usual mouse behavior, for the benefit of those users who
find it to be better. I also added Choco's code for "novert" driver emulation.
novert was a program used by a lot of serious old-schoolers to eliminate all
vertical mouse movement, which by default causes relatively useless drift in
the player's forward/backward momentum.
SoM made some CPU usage improvements, since EE runs down CSonicGo's laptop
battery too quickly :P
--------------------------------------------------------------------------------
10/22/08
Performed some streamlining of P_MobjThinker, even though my attempts at
profiling EE seem to be leading me astray (I think that something is wrong with
Visual C++'s profiler...)
Removed various additional unnecessary or redundant demo version checks,
including many dealing with linked portals, which are handled instead by the
assertion of the useportalgroups variable, which is itself unasserted when
demo_version < 333, as well as code to deal with the FLOATBOB and REFLECTIVE
flags.
--------------------------------------------------------------------------------
10/21/08
SoM fixed an apparently long-lived and until-now-unnoticed bug with 3DMidTex
clipping involving the lower-unpegged line flag. The clip window of the line
would be improperly offset, allowing you to pass through the texture but
blocking you at another visually unrelated location. It was just a little bad
math.
In preparation for attempts at some more serious optimizations in EE, I have
moved the line->nodraw flag check from R_AddLine up to R_Subsector. There's
just no point in making the function call if the line won't be drawn.
I also moved a serious chunk of loop-invariant code dealing with handling of the
fixedcolormap variable outside of the inner segloop. This is the most critical
path of execution and yet it has sloppy stuff like that in it. And this stuff
has been there all along, having survived both Lee's earlier serious
optimizations, as well as Cardboard reorganization. That's what's amazing about
it. Sometimes stuff like this doesn't catch the eye.
--------------------------------------------------------------------------------
10/20/08
Yet even more Heretic work. We are so painfully close to complete support. It
now depends almost entirely on the finishing of the EDF weapons, inventory, and
pickup definition systems.
I tweaked the behavior of screenwipes on the transition from GS_CONSOLE to
GS_LEVEL so that demos don't start up before the game engine has a chance to
stabilize the screen resolution, etc. This makes sure that you have more time to
process what's going on before the demo just suddenly starts playing, resulting
in you missing some frames.
In the process of this fix, I also found some serious issues with GS_CONSOLE
that have evidently existed since SMMU:
* Menus could be opened in GS_CONSOLE, which could cause some serious problems
with responder/ticker/drawer order of execution, and the resulting undefined
behavior would result in the game completely shutting down without any
error message. You are now locked out of the menu system while you are in
GS_CONSOLE gamestate. A message appears in the console if menu_toggle is
activated alerting the user of this.
* The console's C_InstaPopup routine didn't bother to check if the gamemode was
GS_CONSOLE, so it would leave you staring at a screenful of HOM with no way
to control the game if anything managed to activate it.
I have also added screen-centering to EE for windowed video modes, via setting
the appropriate SDL environment variable at startup.
--------------------------------------------------------------------------------
10/16/08
More Heretic fixes and additions. Fixed the ability to use -timedemo for
entryway, who is interested in profiling EE against other ports.
--------------------------------------------------------------------------------
10/15/08
Heretic thingtype support is now at 77% after massive addition of inventory and
weapon additions (the thingtypes are currently inert and do nothing but look
pretty). Mapthing types are now 99% implemented; the only unimplemented mapthing
type is the mace spot, which is handled very specially in Heretic (some might
say strangely...)
Added the MF3_RIP flag to support Heretic projectiles that pass through
shootable things. The flags3 field is now unfortunately 100% used, however, so
with the next needed flag it'll become necessary to rewrite all code segments
that utilize the deh_ProcFlagsCombined routine to handle an array of four
results rather than three. This is going to be a little bit of work, but not
much, since I anticipated most of the problems back when combined flag support
was initially added.
--------------------------------------------------------------------------------
10/14/08
Eliminated the unnecessary demo version check on the PUSHABLE flag. There's no
need for any demo version checks on flags in the MF2/MF3 flag fields, because
such flags never existed and are not set on any of the original objects, or at
least not in a way that makes any difference in behavior (some may be set to
on to provide for original behaviors, of course).
This causes the first demo in Heretic v1.3 to sync for longer than it did
before, as the player was previously stopped by unpushable pods in the hallway.
Heretic demo support is still a lost cause, but I have enabled the playing of
Heretic demos nonetheless, because they make the title sequence more interesting
even when they desync ;)
--------------------------------------------------------------------------------
10/13/08
Restructured the screenwipe engine to support multiple arbitrary wipe effects.
I immediately took advantage of the new system to support the Strife cross-fade
effect, which can now be used in any gamemode by setting the wipetype console
variable to "fade" - as a Heretic purism fix, you can also now set the wipetype
to "none," which will disable the wipe engine altogether. EE will probably
default to using the cross-fade wipe in Heretic and Hexen, however, because I
think it fits those games very well, and that Raven's leaving out of a wipe
routine was a mistake. Their sudden abrupt transitions look kind of sloppy by
comparison.
--------------------------------------------------------------------------------
10/12/08
I have removed the R_DYNASEGS define and the now-dead code for the old handling
of PolyObjects that it was holding out of the engine. The dynaseg code has
proven stable and perfectly working in all tests thrown at it thus far.
Removed some dead code and debugging stuff from the bunny scroller.
--------------------------------------------------------------------------------
10/11/08
SoM has seriously cleaned up and fixed the patch scaling code, so that
horizontal clipping now works properly again. There are still lingering problems
with vertical clipping, which will also be addressed soon.
SoM also found time to apply a patch to the renderer which enables the drawing
of a full 32 unique lighting levels, the most that can be supported by the
normal COLORMAP lump without significant changes to the renderer. This makes new
maps that use tons of lighting sectors look a lot better, while having minimal
impact on old maps (it's practically impossible to tell the difference where it
exists).
--------------------------------------------------------------------------------
10/10/08
Repaired some serious issues with the bunny scroller in non-320x200-aspect
resolutions (most of the bunny scroll wasn't visible). Some of these bugs are
stemming from serious problems in SoM's recent screen patch scaling rewrite,
which need to be addressed as soon as possible.
Made changes to Heretic menu sound behavior so that it matches the vanilla EXE
more closely where applicable. I have started to lean more and more toward
Heretic purism since the GPLing of the source code. My excuse for having
incompatibilities has suddenly vanished, and with Choco-Heretic on the horizon,
people will probably be expecting compatible behavior from Eternity.
--------------------------------------------------------------------------------
10/08/08
Moved the PLAYERRADIUS define to am_map.c because that's the only place where
it has ever been used.
Added the ability for bringing down the console to pause the game, but this is
in beta and has several known problems.
--------------------------------------------------------------------------------
10/04/08
With the recent release of the Heretic and Hexen sources into the realm of the
GPL, the way has been cleared for the mass addition of Hexen codepointers in
advance of actual Hexen gamemode and EDF support. Most of the functions are
only stubs, many are functionally incomplete, and yet others may change in
implementation more than once before they get documented and added to the array
of BEX pointers.
--------------------------------------------------------------------------------
10/02/08
I have made further adjustments to D'Sparil's sound behaviors for Heretic
compatibility. I'm really not sure which of D'Sparil's sounds could and could
not cut each off in the vanilla executable, but I've at least gotten it to
where the most conspicuous ones will not do this.
Added the d_iwad.c module from Chocolate Doom, but EE is not currently capable
of using this code. It'll have to sit around and get bit-rot until I feel like
modifying the d_main IWAD finding code to support what I want it to be able to
do, which is provide an IWAD loading menu for cases where no immediate wad was
found, or where multiple valid wads are available.
Most importantly, I have rewritten the sound update loop to be perfectly
thread-safe after further investigation of SDL_mixer's multi-core problems,
which are caused by some sort of unknown thread contention/race condition issue.
It turns out that we ourselves have not been perfect in this department either,
and the SDL_mixer thread can get into race conditions with the low-level sound
code if the channels array is modified during sound buffer updates.
I've fixed it up by using semaphores to protect the channel data, and by
completely inverting the sound loops for efficiency reasons. As a side-effect,
the sound update loop is also even faster than before. Locality of access and
register motion are vastly improved.
After extensive testing, this does appear to improve stability on multi-core
systems, but does not eliminate 100% of the crashes - some of them are still
stemming from somewhere within SDL or SDL_mixer itself, and so far my efforts
to get those improved have fallen on deaf ears. The SDL guys don't seem to be
interested in any of my bug reports or patches.
--------------------------------------------------------------------------------
09/29/08
I have disabled the adjustment/scaling of mouse input relative to the screen
resolution in windowed modes, because this scaling is inappropriate and unneeded
under Windows, at least. It actually causes the mouse behavior to differ
between resolutions, since the behavior of the SDL mouse input under windowed
video modes appears to be entirely defined by the desktop resolution and Windows
system settings for mouse sensitivity.
SoM finally fixed a line portal HOM issue that had apparently been driving him
nuts for a while.
--------------------------------------------------------------------------------
09/27/08
I updated the text screen emulation code with segments from the most recent
Chocolate Doom commit in order to add proper support for blinking text, which
was previously being interpreted as extended foreground/background colors
instead (this was a bug in fraggle's original implementation that we dragged in
and then neglected to fix for ages).
Rewrote the Heretic status bar chain-end shader routines after I found out that
they were broken in aspect ratios other than that of 320x200. The single new
routine is now based on V_DrawBlockS and is used for all resolutions, even
unscaled.
--------------------------------------------------------------------------------
09/25/08
FreeBSD portability tweaks courtesy of Kate:
* linux/limits.h is just limits.h on that platform.
* NO_FCVT must be defined to provide an fcvt function for psnprintf.
* malloc.h is needed in mmus2mid.c for reasons I cannot imagine.
--------------------------------------------------------------------------------
09/18/08
Eliminated our dependency on the SDLmain library under the belief that it may
have been linked to unnecessary Win32 libraries causing the phantom dwmapi
dependency. It turns out that for a Win32 console library, SDLmain simply isn't
doing anything at all - it just redefines our own main, and then calls it
directly without doing anything else.
But, this still has not removed the dwmpai dependency. I don't think it's
possible to do anything about it.
Fixed a weird bug in my menu paging change of 9/13 that could leave the item
selection caret on non-selectable menu items. This wasn't really harmful, as in
it didn't crash anything, but it was very weird to see and confusing to use.
--------------------------------------------------------------------------------
09/14/08
Added -geom command-line parameter to match PrBoom-plus. It allows the user to
specify all parameters of the video mode in a simple string like the following:
-geom 1024x768w
This particular parameter would put the game in 1024x768 windowed mode.
--------------------------------------------------------------------------------
09/13/08
Applied a tweak to the menu system which allows the page to change if the user
moves up or down beyond the first or last item on a page respectively, after
continuous complaints about the way that paging works. If I keep adding new ways
to page between menus, we're going to break some kind of record for redundant
interface gestures :P
Attempted to fix a problem which is apparently wide-spread. Software compiled
under Vista using VC2008 and the most recent Win32 SDK results in an executable
that will not run on Windows XP boxes if they have Internet Explorer 7
installed. There's some kind of ridiculous dependency leak which results in the
software trying to load dwmapi.dll at startup. This is a Vista-only DLL which is
part of the dynamic loading business.
I initially attempted to get rid of the link to shell32.lib by using
LoadLibrary to get at the RemoveFileSpec routine, but this did nothing. So I
rewrote the code in question again to simply use our own portable M_GetFilePath
routine from m_misc.c - this still did not remove the phantom dependency,
however.
I think that MS needs to stop being lazy and have different compiles of IE for
XP and Vista, instead of making everybody else's stuff break. It simply isn't
possible for EE to use LoadLibrary on every single system function it calls.
Without doing that, I'm not sure how it will ever be possible to weed out this
dependency; it appears to be traceable through multiple dynamic libraries.
--------------------------------------------------------------------------------
09/12/08
Repaired a serious bug in parameterized ceilings: an uninitialized variable in
the setup routine would end up propagating a semi-random direction into the
ceiling thinker, causing erratic behavior as a result of most parameterized
ceiling actions.
--------------------------------------------------------------------------------
08/25/08
Inventory base-class flags are now defined for a ZDoom-equivalent level of
functionality.
I have applied a fix for the upcoming "Evil Unleashed" E5 project - sky floor
visplanes of differing height are no longer merged. This is apparently something
that ZDoom has done for a long time. I am concerned that this could cause a
compatibility issue with older maps, though, so I'll need to stay aware. If
such a problem is found, I'll provide a comp var to handle it.
--------------------------------------------------------------------------------
08/23/08
Tuned up the screen patch code to eliminate a bunch of dead code and unused
variables left after SoM's scaling fix rewrite. I am also laying significant
ground work for the EDF inventory/pickups/weapon system.
--------------------------------------------------------------------------------
08/18/08
Recoil values are now mapped through the weaponinfo structure (as they should
have been all along) in preparation for EDF weapon support. I also added a new
weapon flag, ALWAYSRECOIL. Besides being a good feature for editors, I believe
this will be needed for the Heretic Phoenix Rod, which has always had a recoil
effect on it.
--------------------------------------------------------------------------------
08/17/08
I have repaired EE's ability to allow the BFG to use zero ammo per shot by
making a small change to the P_SubtractAmmo function - the value passed in the
second parameter must be tested for a less-than-zero condition, not a less-
than-or-equal-to condition.
--------------------------------------------------------------------------------
08/16/08
By request I have implemented the ability to use screen patches as well as
linear graphics for the Heretic Demon Scroller episode finale. This just
required some creative use of the VBuffer code. A new function has been written
to support the creation of unscaled (320x200) VBuffers.
I also had to fix another problem caused by SoM's recent scaling rewrite.
V_DrawPatchInt was using the Cardboard video struct to initialize the screen
patch scaling factors, when it actually needed to calculate these based on the
dimensions of the passed-in VBuffer object.
A while back I added some new toy console commands and tweaks to the summon
command that allow you to pretend you're an Arch-vile. By combining the summon
of a VileFire object with the new vilehit command, you get a very authentic
attack. It's really fun to launch enemies with this.
--------------------------------------------------------------------------------
07/05/08
Blocks and masked blocks alike are all now fully clipped to the boundaries of
the screen, like screen patches, forever eliminating any potential for those
annoying "V_DrawBlock: block exceeds framebuffer boundary" errors, and allowing
the console text to properly clip at the top.
I tweaked console background drawing to change the amount of shading applied,
especially to the background used in Ultimate Doom, which is already very dark
on its own.
I altered all of the e_ family of console commands to account for the better
formatting capabilities of the new console font.
You can now spawn homing fireballs from the console if you are aiming at an
enemy when you issue the summon command. If the player has an aim target, it
will be set as the tracer target of the fireball. Fireballs which have homing
maintenance pointers will then properly home-in. This is fun to use with the
Revenant missiles.
--------------------------------------------------------------------------------
06/29/08
EE hit a major milestone today with its 500th SVN revision. It has been about
300 revisions since the last release, which should speak untold volumes about
the amount of work that's going into the next upcoming release.
The ACS interpreter has been further decoupled so that multiple threads of
execution can be supported on an individual script within the same codebase.
This will allow implementation of ZDoom features such as ACS_ExecuteAlways, but
this is again currently low priority. Getting the system up to basic Hexen-level
functionality is my main concern.
I finally broke down and wrote up support for the drawing of fonts that are
made up of a single linear-format graphic. Users can now provide fonts between
FONSTART and FONEND lumps, and these are automatically enumerated by the engine
to succeed the natively-defined fonts; this makes user fonts automatically
accessible to all Eternity features that allow the specification of a font,
such as HUD text widget scripting. I took immediate advantage of the new system
by providing a new console font which is of constant width and distinguishes
properly between upper and lower case; console readability and formatting are
vastly improved with this change, especially in Heretic where it was a major
problem.
I also added a new zone allocator tag, PU_RENDERER. This is used to replace an
unmaintainable code segment in the renderer added by fraggle in SMMU which is
called before R_Init when wad files are loaded at runtime - a giant list of
Z_Free calls on all renderer-related allocations. These allocations now use
the PU_RENDERER tag, and the list of frees is replaced with a single call to
Z_FreeTags(PU_RENDERER, PU_RENDERER). If we are going to maintain the zone
system, we ought to be using it to its fullest potential :)
The Doomguy will now make the status bar OUCH face when he screams during a
terminal fall with falling damage active. This looks really awesome IMO.
--------------------------------------------------------------------------------
06/26/08
The ACS virtual machine has now been decoupled from the level script codebase,
allowing multiple ACS virtual machines to exist on independent codebases at one
time. This may open the door to supporting such ZDoom features as ACS libraries
in the future. This is not currently planned as a short-term feature, however.
--------------------------------------------------------------------------------