Directory common/

Total Files:
30
Deleted Files:
12
Lines of Code:
12065

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

Lines of Code

common/ Lines of Code

Developers

Author Changes Lines of Code Lines per Change
Totals 819 (100.0%) 15241 (100.0%) 18.6
partmedia 342 (41.8%) 5329 (35.0%) 15.5
mwedel 117 (14.3%) 2753 (18.1%) 23.5
akirschbaum 39 (4.8%) 2680 (17.6%) 68.7
kbulgrien 102 (12.5%) 2655 (17.4%) 26.0
ryo_saeba 75 (9.2%) 710 (4.7%) 9.4
anmaster 65 (7.9%) 575 (3.8%) 8.8
silvernexus 19 (2.3%) 140 (0.9%) 7.3
qal21 33 (4.0%) 137 (0.9%) 4.1
cavesomething 14 (1.7%) 108 (0.7%) 7.7
tchize 6 (0.7%) 91 (0.6%) 15.1
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 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)
partmedia 2019-01-14 00:21 Rev.: 20690

Lower CMake requirement to 3.1

3.1 is the lowest version we can use to keep taking advantage of
automatic C standard compile flag selection.

0 lines of code changed in 1 file:

  • common: CMakeLists.txt (-2)
partmedia 2019-01-12 15:13 Rev.: 20688

Call show_main_client() after addme_success

2 lines of code changed in 2 files:

  • common: commands.c (+1), external.h (+1)
silvernexus 2018-12-30 00:16 Rev.: 20656

Adjust minimum cmake version to match presence of c_std_99 item for compile targets.

1 lines of code changed in 1 file:

  • common: script.c (+1)
partmedia 2018-12-27 14:42 Rev.: 20624

Use target_compile_features()

2 lines of code changed in 1 file:

  • common: CMakeLists.txt (+2)
partmedia 2018-12-27 14:42 Rev.: 20623

Replace uses of include_directories()

12 lines of code changed in 1 file:

  • common: CMakeLists.txt (+12)
partmedia 2018-12-26 20:58 Rev.: 20621

Pass player and server name to client scripts

Submitted by: Frank Wilde <F.Wilde@casino2000.lu>

4 lines of code changed in 1 file:

  • common: script.c (+4)
partmedia 2018-11-18 19:53 Rev.: 20610

Check for divide by zero

7 lines of code changed in 1 file:

  • common: mapdata.c (+7 -1)
partmedia 2018-11-18 19:52 Rev.: 20609

Wrap error around LOG()

1 lines of code changed in 1 file:

  • common: client.c (+1 -1)
silvernexus 2018-10-25 20:21

Make blessed items display '(blessed)' to denote they are blessed.
This is mostly for scrolls, where being blessed makes a difference.

7 lines of code changed in 2 files:

  • common: item.c (+6 -2), item.h (+1)
silvernexus 2017-08-18 23:06 Rev.: 20500

Fix delayed update of weight limit display on Strength changes.

2 lines of code changed in 1 file:

  • common: commands.c (+2)
silvernexus 2017-08-01 20:44 Rev.: 20464

Check the packet size using an unsigned short, since a signed short rolls to negative before being converted to a size_t

19 lines of code changed in 1 file:

  • common: newsocket.c (+19 -1)
partmedia 2017-07-29 00:32 Rev.: 20454

Lower login windows after 'addme' command as well

After creating a new account and starting to play, 'addme' gets sent
without the player hitting the login button.

1 lines of code changed in 1 file:

  • common: commands.c (+1)
partmedia 2017-07-29 00:31 Rev.: 20453

Disable client-side socket timeout

0 lines of code changed in 1 file:

  • common: client.c (-1)
partmedia 2017-07-27 11:21 Rev.: 20451

Handle end of stream correctly

15 lines of code changed in 2 files:

  • common: client.c (+4), newsocket.c (+11 -2)
partmedia 2017-07-23 15:12 Rev.: 20437

Use pkg-config to find libcurl and SDL

1 lines of code changed in 1 file:

  • common: CMakeLists.txt (+1 -1)
partmedia 2017-07-23 14:34 Rev.: 20435

Update Windows build

2 lines of code changed in 2 files:

  • common: client.c (+2), script.h (-2)
partmedia 2017-07-23 14:03 Rev.: 20432

Replace ChildProcess with GLib functions

The sound server invocation now theoretically works on Windows. While
here, make the spawned sound server inherit stderr and stdout from the
parent to fix the issue of the sound server blocking on pipe write.

1 lines of code changed in 4 files:

  • common: client.c (+1 -1), client.h (-24), misc.c (-297), proto.h (-4)
partmedia 2017-07-23 14:00 Rev.: 20427

Return error when server sends an invalid packet

15 lines of code changed in 3 files:

  • common: client.c (+2), client.h (+10), newsocket.c (+3 -2)

(301 more)

Generated by StatSVN 0.7.0