Commit graph

31286 commits

Author SHA1 Message Date
Timothy Flynn 0c6cc4ad96 LibUnicode: Generate unique lists of localized currencies 2021-12-13 21:28:56 -08:00
Timothy Flynn a45f2ccc25 LibUnicode: Generate unique lists of languages, territories, and scripts 2021-12-13 21:28:56 -08:00
Timothy Flynn 6e5f0b139b LibUnicode: Remove unused fields from generated structures
A couple of structures held a string index that is unused. Removing them
also removes the string values from the unique string list.
2021-12-13 21:28:56 -08:00
Timothy Flynn 77fc877c04 LibUnicode: Generate unique lists of hour cycles 2021-12-13 21:28:56 -08:00
Timothy Flynn 6f17696176 LibUnicode: Generate unique lists of time zone structures 2021-12-13 21:28:56 -08:00
Timothy Flynn df33156462 LibUnicode: Generate unique lists of day period structures 2021-12-13 21:28:56 -08:00
Timothy Flynn 265785e847 LibUnicode: Generate unique day period structures 2021-12-13 21:28:56 -08:00
Timothy Flynn 7af1818e76 LibUnicode: Generate unique time zone structures
Each of the 374 locales contain 156 time zone structures. Of these
58,344 structures, 13,578 are unique.
2021-12-13 21:28:56 -08:00
Timothy Flynn b14b37f386 LibUnicode: Generate unique calendar structures
Of the 374 generated calendars, 173 are unique.
2021-12-13 21:28:56 -08:00
Timothy Flynn 4b721597d7 LibUnicode: Generate unique lists of calendar range patterns
Of the 374 range pattern lists and 374 range12 pattern lists, 230 are
unique.
2021-12-13 21:28:56 -08:00
Timothy Flynn 9fc2442e7d LibUnicode: Generate unique lists of calendar patterns
Of the 374 generated lists, 152 are unique. These lists have upwards of
1000 entries as well, so the de-duplication is particularly nice.
2021-12-13 21:28:56 -08:00
Timothy Flynn 09547f4084 LibUnicode: Generate unique lists of calendar symbols structures
Of the 374 generated lists, 120 are unique.
2021-12-13 21:28:56 -08:00
Timothy Flynn f681ec9d98 LibUnicode: Generate unique calendar symbols structures
Each of the 374 generated calendars include 4 symbols structures. Of
these 1496 structures, only 386 are unique.
2021-12-13 21:28:56 -08:00
Timothy Flynn 62ff029890 LibUnicode: Generate CalendarSymbols in a predetermined order
Similar to commit 2a7f36b392, this change moves the generated
CalendarSymbol enumeration to the public LibUnicode/NumberFormat.h
header with a pre-defined set of symbols that we need. This is to
prepare for uniquely generating the CalendarSymbols structure.
2021-12-13 21:28:56 -08:00
Timothy Flynn cf8ef954e5 LibUnicode: Generate unique lists of calendar symbols
Each of the 374 generated calendars include 4 sets of symbols, each of
which have 3 lists of symbols (narrow, short, long). Of these 4488
lists, only 819 are unique.
2021-12-13 21:28:56 -08:00
Timothy Flynn af7caa97c8 LibUnicode: Generate unique calendar format structures
There are currently 374 calendars generated, each of which include 3
CalendarFormat structures. Of these 1122 instances, only 167 are unique.
2021-12-13 21:28:56 -08:00
Timothy Flynn 415763b1b3 LibUnicode: Define traits for a vector of integral/enum types
Any generator which defines a unique storage instance for a list of
numbers will need this.
2021-12-13 21:28:56 -08:00
Ali Mohammad Pur 6bf50bc40b Shell: Make the Join operation respect nodes that have a next chain
This would show up when resolving aliases, when an alias contains a
sequence.
Fixes #11219.
2021-12-13 16:26:10 +03:30
Michel Hermier 18f053ac31 Shell: Remove sigpipe.sh.out artefact after failure
Helps to avoid to erroneously add the file to git.
2021-12-13 16:20:29 +03:30
Luke Wilde 62af3acf56 Kernel: Fix backtrace dumping on x86_64
- dump_backtrace was using ebp instead of rbp on x86_64, only using the
  lower 32-bits of rbp.
- The symbol loader was only fetching half of the pointer from the
  symbol table. (8 chars instead of 16 chars)
2021-12-13 09:17:32 +01:00
Clay Freeman e3e40cca65 Kernel: Replace final loop in PhysicalRegion::return_page() with math
Since it's possible to determine where the small zones will start to
occur for each PhysicalRegion, we can use arithmetic so that the call
time for both large and small zones is identical.
2021-12-13 00:13:43 +01:00
Daniel Bertalan edb810f854 Ports: Remove obsolete openssh password prompt patch
As of 8dd11ae, we have `/dev/tty`, which is used by openssh's built-in
read_passphrase function to access the TTY, making our patch
unnecessary.

Removing it also fixes a subtle issue: we did not handle the case of
stdout not being a TTY correctly, so prompts failed to show up when e.g.
the ssh process was being piped to. This made `git clone` not work when
the server's fingerprint was not already verified.
2021-12-13 00:12:28 +01:00
Daniel Bertalan 8dd11ae717 Kernel+SystemServer: Add /dev/tty
This file refers to the controlling terminal associated with the current
process. It's specified by POSIX, and is used by ports like openssh to
interface with the terminal even if the standard input/output is
redirected to somewhere else.

Our implementation leverages ProcFS's existing facilities to create
process-specific symbolic links. In our setup, `/dev/tty` is a symbolic
link to `/proc/self/tty`, which itself is a symlink to the appropriate
`/dev/pts` entry. If no TTY is attached, `/dev/tty` is left dangling.
2021-12-12 22:32:35 +01:00
Nathan Ell 7ca2315659 Meta: Conditionally run QEMU with QMP
QMP is currently used with UNIX sockets, which can't be created on
Windows hosts. Let's just not start QMP if using Windows QEMU.
2021-12-12 22:31:43 +01:00
Jelle Raaijmakers 212334eaef LibGL: Simplify Texture2D reading; add support for RGB565 2021-12-12 21:51:08 +01:00
Jelle Raaijmakers 12c4491cca LibGL: Prevent limbo state if glEnd does not support drawing mode
If an unsupported drawing mode was configured, `glEnd` would not reach
the line where `m_in_draw_state` was set to `false`. This caused all
subsequent invocations to `glBegin` to fail.
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers 52d6ae36cb LibGL: Do not exclude points on the clip planes
Most resources seem to suggest that points on the clip planes are also
inside the frustum, e.g.: https://www.cubic.org/docs/3dclip.htm

This seems to resolve some rendering issues in Grim Fandango in OpenGL
mode where the screen remained black. This was because of quads being
drawn with their vertex positions exactly on the clip planes.
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers 4a2a68cd94 LibGL: Remove unused method from SoftwareRasterizer 2021-12-12 21:51:08 +01:00
Jelle Raaijmakers 46c564dd1a LibGL: Invoke own methods when drawing arrays or elements
Instead of calling the public API, call our own internal API.
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers b79642ef74 LibGL: Support missing context in glGetError and glGetIntegerv
In its current state, ScummVM seems to invoke these methods just after
destroying the current GL context. According to the OpenGL spec:

    "Issuing GL commands when the program does not have a current
     context results in undefined behavior, up to and including program
     termination."

Our old behavior was to deref a `nullptr`, which isn't that great. For
now, protect these two methods. If other ports seem to misbehave as
well, we can always expand the check to other methods.
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers a06b69c5b5 LibGL: Implement the GL_DITHER parameter 2021-12-12 21:51:08 +01:00
Jelle Raaijmakers b89524c981 LibGL: Implement the GL_LIGHTING parameter 2021-12-12 21:51:08 +01:00
Jelle Raaijmakers b1ac181537 LibGL: Centralize all context parameters
The `glGet*` family of functions requires that all parameters of
different types are transparently converted into each other. For
example, you can request a boolean parameter as a float or a list of
double values as an integer. It might be considered bad practice to
request parameters through the wrongly-typed function, but to be spec-
compliant we need to implement this.

Introduce a new `::get_context_parameter()` to obtain a parameter
value, which is then converted to the right type by the respective
`::gl_get_*()` functions.
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers 2af9b625e8 LibGL: Implement GL_*_BITS and GL_DOUBLEBUFFER parameters 2021-12-12 21:51:08 +01:00
Jelle Raaijmakers 033f224966 LibGL: Add GL_SHADING_LANGUAGE_VERSION to glGetString 2021-12-12 21:51:08 +01:00
Jelle Raaijmakers 6643775999 LibGL: Add stub for glCopyTexImage2D 2021-12-12 21:51:08 +01:00
Jelle Raaijmakers 401472c9a4 LibGL: Implement glDrawPixels and add stub for glBitmap 2021-12-12 21:51:08 +01:00
Jelle Raaijmakers c2960e68a8 LibGL: Implement glLightModelf and glLightModelfv 2021-12-12 21:51:08 +01:00
Jelle Raaijmakers 0453cad46c LibGL: Add stubs for glPushAttrib and glPopAttrib 2021-12-12 21:51:08 +01:00
Jelle Raaijmakers fbed7a5ba8 LibGL: Implement glLineWidth 2021-12-12 21:51:08 +01:00
Jelle Raaijmakers 22f8294a57 LibGL: Implement glLoadMatrixd 2021-12-12 21:51:08 +01:00
Jelle Raaijmakers 506abf2a61 LibGL: Implement glIsList 2021-12-12 21:51:08 +01:00
Jelle Raaijmakers 17c109f5d7 LibGL: Implement glTranslated 2021-12-12 21:51:08 +01:00
Jelle Raaijmakers 9c9fa33495 LibGL: Implement glClearStencil 2021-12-12 21:51:08 +01:00
Jelle Raaijmakers 07bf37be75 LibGL: Implement glScaled 2021-12-12 21:51:08 +01:00
Jelle Raaijmakers 9dbc8d7e3c LibGL: Add stubs for glMaterialf and glMaterialfv 2021-12-12 21:51:08 +01:00
Jelle Raaijmakers 4eb6295a57 LibGL: Implement glRasterPos2i 2021-12-12 21:51:08 +01:00
Jelle Raaijmakers 78d0674228 LibGL: Implement glNormal3f and glNormal3fv 2021-12-12 21:51:08 +01:00
Jelle Raaijmakers ea6bcda79c LibGL: Implement glStencil* functions
This implements the context state for stencil testing functions and
operations. No rasterization is implemented.
2021-12-12 21:51:08 +01:00
Jelle Raaijmakers 729349ce78 LibGL: Implement GL_STENCIL_TEST
Only the state is implemented; not the rasterization phase.
2021-12-12 21:51:08 +01:00