madlittlemods / fps-aim-analyzer Goto Github PK
View Code? Open in Web Editor NEWWIP
WIP
Luckily, Halo Infinite runs on Linux so that's what I've been using but PC games are typically played on Windows machines. It would be nice to support Windows.
These are just notes I can share around on this problem. I haven't gotten this working yet.
To make sure this isn't an X/Y problem, I'm trying to make the window background transparent but it's always just opaque even when giving it 32-bit colors(ARGB, 0xaabbccdd
). With a successful basic the window setup, we can set .parent_window_id = screen.root
, .depth = 0
(which means inherit from parent), and .visual_id = screen.root_visual
to get a opaque window showing on the screen. The reason it's 24-bit color-depth is because the root window is 24-bit depth and we inherit from the parent window. You can verify the color depth of the root window by running the xdpyinfo
command on your system (see the command output in the dev notes).
When trying to provide .depth = 32
but still using the same .visual_id
, we get a match
error from the connection setup which is as expected according to the docs.
So we need to find the correct matching .visual_id
that has 32-bit color depth and allows us to do transparency.
I'm trying to modify zigx
to parse the following buffer of data that you get back when the connection is accepted during setup because it looks like it has the necessary info.
There is already code that successfully parses up to and including the first screen but without the sub-lists of ScreenDepths
or VisualType
. Each Screen
has many ScreenDepths
and each ScreenDepth
has many VisualType
.
Buffer structure (X11 protocol docs source):
1 1 Success
1 unused
2 CARD16 protocol-major-version
2 CARD16 protocol-minor-version
2 8+2n+(v+p+m)/4 length in 4-byte units of
"additional data"
4 CARD32 release-number
4 CARD32 resource-id-base
4 CARD32 resource-id-mask
4 CARD32 motion-buffer-size
2 v length of vendor
2 CARD16 maximum-request-length
1 CARD8 number of SCREENs in roots
1 n number for FORMATs in
pixmap-formats
1 image-byte-order
0 LSBFirst
1 MSBFirst
1 bitmap-format-bit-order
0 LeastSignificant
1 MostSignificant
1 CARD8 bitmap-format-scanline-unit
1 CARD8 bitmap-format-scanline-pad
1 KEYCODE min-keycode
1 KEYCODE max-keycode
4 unused
v STRING8 vendor
p unused, p=pad(v)
8n LISTofFORMAT pixmap-formats
m LISTofSCREEN roots (m is always a multiple of 4)
FORMAT
1 CARD8 depth
1 CARD8 bits-per-pixel
1 CARD8 scanline-pad
5 unused
SCREEN
4 WINDOW root
4 COLORMAP default-colormap
4 CARD32 white-pixel
4 CARD32 black-pixel
4 SETofEVENT current-input-masks
2 CARD16 width-in-pixels
2 CARD16 height-in-pixels
2 CARD16 width-in-millimeters
2 CARD16 height-in-millimeters
2 CARD16 min-installed-maps
2 CARD16 max-installed-maps
4 VISUALID root-visual
1 backing-stores
0 Never
1 WhenMapped
2 Always
1 BOOL save-unders
1 CARD8 root-depth
1 CARD8 number of DEPTHs in allowed-depths
n LISTofDEPTH allowed-depths (n is always a
multiple of 4)
DEPTH
1 CARD8 depth
1 unused
2 n number of VISUALTYPES in visuals
4 unused
24n LISTofVISUALTYPE visuals
VISUALTYPE
4 VISUALID visual-id
1 class
0 StaticGray
1 GrayScale
2 StaticColor
3 PseudoColor
4 TrueColor
5 DirectColor
1 CARD8 bits-per-rgb-value
2 CARD16 colormap-entries
4 CARD32 red-mask
4 CARD32 green-mask
4 CARD32 blue-mask
4 unused
libx11
-> src/OpenDis.c#L59-570
x11-client
-> src/main/java/com/github/moaxcp/x11client/X11Connection.java#L34-L67
and src/main/xcbXmls/xproto.xml#L94-L267
Xlib/protocol/display.py#L1024-L1059
libxcb
breadx
x11rb
Keywords:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.