Directory common/

Total Files:
29
Deleted Files:
13
Lines of Code:
12023

[root]/common
        directory in repo shared (2 files, 678 lines)

Lines of Code

common/ Lines of Code

Developers

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

Most Recent Commits

partmedia 2021-05-08 16:48 Rev.: 22117

Remove freelist remnants

0 lines of code changed in 1 file:

  • common: item.c (-3)
partmedia 2021-05-06 17:06 Rev.: 22113

Make function static

1 lines of code changed in 2 files:

  • common: item.c (+1 -1), proto.h (-1)
partmedia 2021-05-06 17:06 Rev.: 22112

Remove item free list

2 lines of code changed in 3 files:

  • common: item.c (+2 -69), p_cmd.c (-7), proto.h (-1)
partmedia 2021-04-11 15:02 Rev.: 22075

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:

  • common: client.c (+1 -1), commands.c (+13)
silvernexus 2021-04-06 13:40 Rev.: 22057

Expose the read flag to the scripting engine.

5 lines of code changed in 1 file:

  • common: script.c (+5 -4)
silvernexus 2021-04-05 23:05 Rev.: 22053

Support the flag added on the server-side in r22052 to denote read books.

5 lines of code changed in 2 files:

  • common: item.c (+4), item.h (+1)
partmedia 2021-02-24 23:42 Rev.: 21998

Fix format string warning

1 lines of code changed in 1 file:

  • common: item.c (+1 -1)
partmedia 2021-02-24 23:27 Rev.: 21997

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:

  • common: CMakeLists.txt (+2 -2)
partmedia 2021-01-04 13:44 Rev.: 21720

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:

  • common: script.c (+2 -6)
partmedia 2021-01-03 17:08 Rev.: 21713

Load default key bindings from a GResource

0 lines of code changed in 2 files:

  • common: CMakeLists.txt (-8), mdk.pl (del)
partmedia 2021-01-03 12:56 Rev.: 21710

Change MAP_MAX_SIZE to what the server currently supports

1 lines of code changed in 1 file:

  • common: client.h (+1 -1)
partmedia 2020-11-24 17:07 Rev.: 21563

Report relative coordinates for 'request map pos'

14 lines of code changed in 3 files:

  • common: mapdata.c (+10), mapdata.h (+2), script.c (+2 -1)
crowbert 2020-09-14 18:03 Rev.: 21435

add --script=SCRIPT_NAME command-line option (not tested on Windows)

2 lines of code changed in 1 file:

  • common: script.c (+2 -2)
crowbert 2020-09-01 22:52 Rev.: 21330

Client-side scripting: Fix 'request map' command in cases where the square is unknown.

2 lines of code changed in 1 file:

  • common: script.c (+2 -1)
crowbert 2020-09-01 22:47 Rev.: 21329

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:

  • common: script.c (+3 -3)
crowbert 2020-09-01 22:34 Rev.: 21328

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:

  • common: script.c (+45 -1)
partmedia 2020-08-25 23:18 Rev.: 21312

Better document input states

3 lines of code changed in 1 file:

  • common: client.h (+3 -2)
partmedia 2020-08-23 14:15 Rev.: 21305

Add missing header file

Submitted by: Josh Hoover (via IRC)

2 lines of code changed in 1 file:

  • common: player.c (+2)
partmedia 2020-03-25 14:39 Rev.: 21196

Fix data type

1 lines of code changed in 1 file:

  • common: client.h (+1 -1)
partmedia 2020-03-25 14:25 Rev.: 21194

Rename CMake GTK variable name

2 lines of code changed in 1 file:

  • common: CMakeLists.txt (+2 -2)
partmedia 2020-03-25 14:25 Rev.: 21193

Improve latency profiler output

14 lines of code changed in 1 file:

  • common: player.c (+14 -5)
partmedia 2020-03-25 14:25 Rev.: 21192

Update data type

1 lines of code changed in 1 file:

  • common: client.h (+1 -1)
partmedia 2019-12-29 22:12 Rev.: 21076

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:

  • common: mapdata.c (+2 -7)
silvernexus 2019-12-29 19:47 Rev.: 21074

Reduce calls to mapdata_cell

13 lines of code changed in 1 file:

  • common: mapdata.c (+13 -6)
partmedia 2019-08-31 11:53 Rev.: 20994

Make profiling output easier to parse

2 lines of code changed in 1 file:

  • common: player.c (+2 -2)
partmedia 2019-08-18 19:10 Rev.: 20972

Make code more readable

7 lines of code changed in 1 file:

  • common: item.c (+7 -3)
partmedia 2019-08-18 19:10 Rev.: 20971

Remove unnecessary helper

1 lines of code changed in 1 file:

  • common: commands.c (+1 -14)
partmedia 2019-08-09 20:37 Rev.: 20933

Check for NULL

4 lines of code changed in 1 file:

  • common: client.c (+4 -2)
partmedia 2019-08-09 20:37 Rev.: 20932

Add protocol debugging command-line option

10 lines of code changed in 3 files:

  • common: client.c (+5 -1), client.h (+2), newsocket.c (+3)
partmedia 2019-08-09 20:35 Rev.: 20930

Disconnect after receiving an unknown command

10 lines of code changed in 2 files:

  • common: client.c (+8 -1), proto.h (+2)
partmedia 2019-08-08 10:21 Rev.: 20924

Log time elapsed with LOG()

5 lines of code changed in 2 files:

  • common: client.h (+2), misc.c (+3 -1)
partmedia 2019-07-19 09:33 Rev.: 20917

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:

  • common: init.c (+1 -1), mapdata.c (+10 -4), mapdata.h (+6 -5)
partmedia 2019-07-12 20:46 Rev.: 20914

Use macro to access mapdata cells

52 lines of code changed in 2 files:

  • common: mapdata.c (+51 -51), mapdata.h (+1 -1)
partmedia 2019-07-12 20:46 Rev.: 20913

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:

  • common: mapdata.c (+6 -6), mapdata.h (+7 -1)
partmedia 2019-07-12 20:45 Rev.: 20912

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:

  • common: mapdata.c (+106 -106), mapdata.h (+2 -6)
partmedia 2019-07-12 10:31 Rev.: 20910

Reduce bit width for smooth info

3 lines of code changed in 2 files:

  • common: mapdata.c (+1 -1), mapdata.h (+2 -2)
partmedia 2019-07-12 09:04 Rev.: 20909

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:

  • common: client.c (-2), client.h (-1), commands.c (+11 -5)
partmedia 2019-05-05 14:50 Rev.: 20787

Handle 'newmapcmd' and 'tick' setup

4 lines of code changed in 1 file:

  • common: commands.c (+4)
partmedia 2019-05-05 14:49 Rev.: 20785

Add latency profiling command-line option

13 lines of code changed in 1 file:

  • common: player.c (+13 -1)
partmedia 2019-05-04 15:52 Rev.: 20767

Trim trailing whitespace from spell descriptions

14 lines of code changed in 1 file:

  • common: commands.c (+14)

(319 more)

Generated by StatSVN 0.7.0