[root]/common
shared
(2 files, 678 lines)
Author | Changes | Lines of Code | Lines per Change |
---|---|---|---|
Totals | 845 (100.0%) | 15345 (100.0%) | 18.1 |
partmedia | 361 (42.7%) | 5371 (35.0%) | 14.8 |
mwedel | 117 (13.8%) | 2753 (17.9%) | 23.5 |
akirschbaum | 39 (4.6%) | 2680 (17.5%) | 68.7 |
kbulgrien | 102 (12.1%) | 2655 (17.3%) | 26.0 |
ryo_saeba | 75 (8.9%) | 710 (4.6%) | 9.4 |
anmaster | 65 (7.7%) | 575 (3.7%) | 8.8 |
silvernexus | 22 (2.6%) | 150 (1.0%) | 6.8 |
qal21 | 33 (3.9%) | 137 (0.9%) | 4.1 |
cavesomething | 14 (1.7%) | 108 (0.7%) | 7.7 |
tchize | 6 (0.7%) | 91 (0.6%) | 15.1 |
crowbert | 4 (0.5%) | 52 (0.3%) | 13.0 |
quinet | 2 (0.2%) | 48 (0.3%) | 24.0 |
kstenger | 4 (0.5%) | 14 (0.1%) | 3.5 |
rjtanner | 1 (0.1%) | 1 (0.0%) | 1.0 |
Remove freelist remnants
0 lines of code changed in 1 file:
Make function static
1 lines of code changed in 2 files:
Remove item free list
2 lines of code changed in 3 files:
Resurrect setup for extendedTextInfos
Although the extendedTextInfos setup command is now deprecated because
servers use 'drawextinfo' instead of 'drawinfo' by default, old servers
are still in active use. Resurrect extendedTextInfos so that
'drawextinfo' is used on any server that supports it.
14 lines of code changed in 2 files:
Expose the read flag to the scripting engine.
5 lines of code changed in 1 file:
Support the flag added on the server-side in r22052 to denote read books.
5 lines of code changed in 2 files:
Fix format string warning
1 lines of code changed in 1 file:
Include project headers first
In the case that some system package installs a system-wide header file
named config.h, it will override our config.h, causing our build to
break. Prevent this from happening by changing the header file order to
bring in our header files first.
2 lines of code changed in 1 file:
Correctly set maxfd
The nfds argument to select() is the number of the highest file
descriptor that we're interested in. sysconf(_SC_OPEN_MAX) returns *one
more* than the largest file descriptor allocated by the system, which
causes select() to fail on FreeBSD. One fix would be to subtract one
from this number, but it is better to just make maxfd a local variable
set to the highest script file descriptor.
While here, unify the exec failure error message and print errors in the
future if select() fails.
2 lines of code changed in 1 file:
Load default key bindings from a GResource
0 lines of code changed in 2 files:
Change MAP_MAX_SIZE to what the server currently supports
1 lines of code changed in 1 file:
Report relative coordinates for 'request map pos'
14 lines of code changed in 3 files:
add --script=SCRIPT_NAME command-line option (not tested on Windows)
2 lines of code changed in 1 file:
Client-side scripting: Fix 'request map' command in cases where the square is unknown.
2 lines of code changed in 1 file:
Client-side scripting: Some commands can send a lot of data, and this data was
silently truncated. Now the full data is sent.
3 lines of code changed in 1 file:
Client-side scripting: Add support for commands with tags: drop, take, apply
The script will get tag numbers by requesting the inventory. These could
already be used with:
issue mark <tag>
issue lock <tag>
With this commit, that is expanded to now include
issue drop <tag> [<count>]
issue take <tag> [<count>]
issue apply <tag>
45 lines of code changed in 1 file:
Better document input states
3 lines of code changed in 1 file:
Add missing header file
Submitted by: Josh Hoover (via IRC)
2 lines of code changed in 1 file:
Fix data type
1 lines of code changed in 1 file:
Rename CMake GTK variable name
2 lines of code changed in 1 file:
Improve latency profiler output
14 lines of code changed in 1 file:
Update data type
1 lines of code changed in 1 file:
Refactor; remove notes about performance
There is probably no performance benefit from reducing the number of
calls to mapdata_cell(). However, this particular change made the code
more readable, so keep this change. I refactored the scope of the new
temporary MapCell variables.
I compared the assembly of the old code with the new code. I used clang
8.0.1 with -O2 on FreeBSD/amd64. In both versions, the assembly has
mapdata_cell() inlined and lifted out of the inner loop:
movq the_map(%rip), %r12
movslq %edi, %r13
movslq %esi, %rax
imulq $152, %rax, %r15
movq (%r12,%r13,8), %rdi
addq %r15, %rdi
Even though the old code has multiple calls and the new code has an
intermediate variable, both generated the same code! Notice how the
result of "calling" mapdata_cell() is never stored in memory; it stays
in a register.
In general, in the age of deep pipelines, large caches, and speculative
execution, even comparing assembly is generally not enough. However,
when both versions produce the same assembly, it's a pretty convincing
argument that there is no performance benefit.
There are plenty of inefficiencies hanging around in the client, for
example, the unnecessary double-buffering in Pixmap mode, that when
fixed would produce a measurable performance benefit. But trying to
outsmart the compiler probably isn't going to do much.
2 lines of code changed in 1 file:
Reduce calls to mapdata_cell
13 lines of code changed in 1 file:
Make profiling output easier to parse
2 lines of code changed in 1 file:
Make code more readable
7 lines of code changed in 1 file:
Remove unnecessary helper
1 lines of code changed in 1 file:
Check for NULL
4 lines of code changed in 1 file:
Add protocol debugging command-line option
10 lines of code changed in 3 files:
Disconnect after receiving an unknown command
10 lines of code changed in 2 files:
Log time elapsed with LOG()
5 lines of code changed in 2 files:
Initialize mapdata only after mapdata_set_size()
Avoid allocating map data on client init and again after loading config,
because map data is only used after negotiating a view size with the
server. Add corresponding mapdata_free() to deallocate map data after
disconnecting from a server.
17 lines of code changed in 3 files:
Use macro to access mapdata cells
52 lines of code changed in 2 files:
Reduce size of struct MapCell and BigCell
The client does not actually use any of the animation info fields in the
tail MapCellLayer structs. Reduce the size of struct MapCell by removing
these unused fields.
13 lines of code changed in 2 files:
Refactor map data
Rename x to width and y to height in struct Map. Replace uses of
FOG_MAP_SIZE with either width or height. Separate map data allocation
into separate function.
108 lines of code changed in 2 files:
Reduce bit width for smooth info
3 lines of code changed in 2 files:
Simplify event loop tick handling
Handle all time-based events in client_tick(), which is only called when
a tick is received from the server. Drop support for servers that do not
support the tick command, since it was already broken (the client would
have never called redraw()).
Add a comment explaining that supporting tickless servers again only
requires adding a timer event that calls client_tick().
11 lines of code changed in 3 files:
Handle 'newmapcmd' and 'tick' setup
4 lines of code changed in 1 file:
Add latency profiling command-line option
13 lines of code changed in 1 file:
Trim trailing whitespace from spell descriptions
14 lines of code changed in 1 file:
(319 more)