The GRIM define was incorrectly spelled GRIME which cause no shader
files to be included to the project preventing the game to start.
The freescape shader file freescape_triange.vertex also contained
a spelling error preventing the game to start.
Delete the old graphic handling in the IOS7 backend which is not
used anymore after implementing iOSGraphicsManager.
The Accelerate framework is not used anymore. The OpenGLGraphics
manager handles the different color formats.
The ios7 backend implements the graphic handling in the backend code.
iOS supports OpenGL through the OpenGL Framework since iOS 2.0. It's
marked as deprecated but is still shipped with the SDKs for iPhoneOS
and tvOS and will hopefully be so for some time.
The ios7 backend can therefore utilize the OpenGLGraphicsManager to
handle all graphics.
Implement an iOSGraphicsManager class that can be used in the ios7
backend. The iOSGraphicsManager will require some callback functions
in the ios7 backend. createOpenGLContext() will be called to ask the
backend to create an OpenGL context in which the graphic manager can
draw. The function returns the ID of the renderbuffer which shall be
used when creating the framebuffer object this differ iOS from other
platforms). A custom RenderBufferTarget class is added to address
this.
destroyOpenGLContext() will be called to make sure that the old GLES
context is not reused. notifyContextDestroy() does call the function
OpenGLContext.reset() but that will not destroy the context.
refreshScreen() will be called to ask the backend to present the
drawn graphics on the screen. getSystemHiDPIScreenFactor() is called
to get the screen scaling factor. getScreenWidth() and
getScreenHeight() are called to get the width and height of the
surface to draw on.
This commit adds the class but the ios7 backend doesn't make use of
it quite yet. To use it require the ios7 to be a child class of the
ModularGraphicsBackend. That change requires a lot of changes which
will be targeted in separate commits.
Update docportal and github ci worker to only disable the feature
opengl_classic_game since opengl and opengl_shaders are required to
compile the OpenGLGraphicsManager.
Apple never required bitcode to be enabled and with Xcode 14
bitcode is deprecated.
Set bitcode to disabled for iOS and tvOS projects. Else it will
be default on and give a build error due to the libraries in
scummvm-ios7-libs-v3 doesn't include bitcode.
The introduction of Apple M1 processor, which is based on the arm64
architecture, makes it impossible to use fat static libraries for iOS
and tvOS since building libraries for the simulators targeting the
arm64 architecture conflicts with the iOS and tvOS native arm64
libraries. It's not possible to have two arm64 libraries targeting
different platforms in the same fat library.
Apple resolves this problem with XCFrameworks. Each XCFramework
contain an Info.plist specifying which platforms and architectures it
targets.
The new iOS and tvOS library package, scummvm-ios7-libs-v3, utilize
the XCFramework format and includes pre-compiled libraries for both
iOS and tvOS with corresponding simulator.
Add the option to use XCFramework in create_project by passing the
switch '--use-xcframework'
Implement support to use XCFrameworks for iOS, tvOS and macOS. If not
passing '--use-xcframework' to create_project, legacy behaviour is
applied.
This commit also add support for mikmod for tvOS.
Add Apple Accelerate framework to iOS and tvOS targets. The framework
utilizes NEON extensions on the ARM chip to accelerate calculations.
This will come to use when processing texture data.
Add Apple TV OS as a new target to the xcode project creator utility.
Make sure that TV OS specific files are not part of the iOS and macOS
targets and the other way around.
The TV OS project will utilize the same source code files as the iOS
project but will instead use the tvos dist files.
Changes the following warnings to errors:
C4701: potential use of uninitialized local variable
C4703: potential use of uninitialized local pointer
C4456: declaration hides previous local declaration
C4003: not enough arguments for function-like macro invocation
C4840: use of non-trivial class as an argument to a variadic function
C4805: unsafe mix of bool and int in a numeric operation or comparison
C4305: truncation of double to float or int to bool
C4366: address taken of unaligned field and used as an aligned pointer
C4315: object constructed into an unaligned field with a constructor that expects it to be aligned
Some systems have fseeko but you need to check that off_t is a 64-bit
value (and this requires some magic incantation on some platforms),
others need fseeko64(), Windows has a different symbol, and then some
systems only have an fseek() that's limited to <2GB files.
This is a first step in trying to improve this.
It appears a lot, and these casts are intentional and look safe.
Example:
../scummvm/engines/glk/alan3/actor.cpp: In function 'Glk::Alan3::ScriptEntry* Glk::Alan3::scriptOf(int)':
../scummvm/engines/glk/alan3/lists.h:35:52: warning: converting a packed 'Glk::Alan3::ScriptEntry' pointer (alignment 1) to a 'Glk::Alan3::Aword' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member]
35 | #define isEndOfArray(x) implementationOfIsEndOfList((Aword *) (x))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
../scummvm/engines/glk/alan3/actor.cpp:38:84: note: in expansion of macro 'isEndOfArray'
38 | for (scr = (ScriptEntry *) pointerTo(header->scriptTableAddress); !isEndOfArray(scr); scr++)
| ^~~~~~~~~~~~
In file included from ../scummvm/engines/glk/alan3/actor.h:25,
from ../scummvm/engines/glk/alan3/actor.cpp:22:
../scummvm/engines/glk/alan3/acode.h:453:8: note: defined here
453 | struct ScriptEntry { /* SCRIPT TABLE */
| ^~~~~~~~~~~
Add the GameController framework to the project and enable support for
controller user interaction in the Info.plist file. This allows for
Game Controller compatible devices to notify the application when
connected.
Add GameController framework to configure and ports.mk if not using
Xcode to build the target.
Prior to this, create_project always set USE_TEXT_CONSOLE_FOR_DEBUGGER on Xcode.
This was hard-coded behavior that I should have removed when I added configuring
this feature on the command line in 8c32927f393dddcbe3dfa1b19b38cd332283b6bd
Now it's disabled by default and can be enabled by --enable-text-console, just
like the other projects.