diasurgical / diasurgical/devilution

Signed char types

Open
#833 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
C++
Stars
9k
Forks
920
PR merge metrics
No merged PRs in 30d

Description

On PowerPC `char` is defined as `unsigned char` and on x86 it is `signed char`, since we know that the source was ported to both architectures we should probably replace `char` with a more specific type. Looking int the symbol file I found `int8` on modern Windows SDK's `INT8` is defined as `signed char`, but in the VC6 WINDEF.H it is simply `char`, there also doesn't appear to be any other values that define `signed char`, so either they where explicit about it or had a custom type.

This change will probably get us closer to the original source, but also help out ARM (Android) and other platforms that define `char` as unsigned.

Contributor guide

Open the contributing guide

Research direction

Start by inspecting the symbol file and locating the relevant uses of char, then compare the platform definitions mentioned for PowerPC, x86, Windows SDKs, and ARM. Done means the affected character types are explicit signed types where required and the source remains portable across the named platforms.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.