mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-22 09:01:57 -05:00
Xbox: Get resource downloading to work at least
Also tidyup misc folder
This commit is contained in:
parent
3ea04335b9
commit
922f860a7d
21 changed files with 28 additions and 37 deletions
|
@ -1 +0,0 @@
|
|||
1 ICON "CCicon.ico"
|
|
@ -33,7 +33,7 @@ WIN64_FLAGS="-mwindows -nostartfiles -Wl,-emain_real -DCC_NOMAIN"
|
|||
|
||||
build_win32() {
|
||||
echo "Building win32.."
|
||||
cp $ROOT_DIR/misc/CCicon_32.res $ROOT_DIR/src/CCicon_32.res
|
||||
cp $ROOT_DIR/misc/windows/CCicon_32.res $ROOT_DIR/src/CCicon_32.res
|
||||
|
||||
$WIN32_CC *.c $ALL_FLAGS $WIN32_FLAGS -o cc-w32-d3d.exe CCicon_32.res -DCC_COMMIT_SHA=\"$LATEST\" -lwinmm -limagehlp
|
||||
if [ $? -ne 0 ]; then echo "Failed to compile Windows 32 bit" >> "$ERRS_FILE"; fi
|
||||
|
@ -49,7 +49,7 @@ build_win32() {
|
|||
|
||||
build_win64() {
|
||||
echo "Building win64.."
|
||||
cp $ROOT_DIR/misc/CCicon_64.res $ROOT_DIR/src/CCicon_64.res
|
||||
cp $ROOT_DIR/misc/windows/CCicon_64.res $ROOT_DIR/src/CCicon_64.res
|
||||
|
||||
$WIN64_CC *.c $ALL_FLAGS $WIN64_FLAGS -o cc-w64-d3d.exe CCicon_64.res -DCC_COMMIT_SHA=\"$LATEST\" -lwinmm -limagehlp
|
||||
if [ $? -ne 0 ]; then echo "Failed to compile Windows 64 bit" >> "$ERRS_FILE"; fi
|
9
misc/build_scripts/readme.md
Normal file
9
misc/build_scripts/readme.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
This folder contains build scripts for automatically compiling ClassiCube
|
||||
|
||||
|File|Description|
|
||||
|--------|-------|
|
||||
|buildbot.sh | Compiles the game to optimised executables (with icons) |
|
||||
|buildbot_plugin.sh | Compiles specified plugin for various platforms |
|
||||
|buildtestplugin.sh | Example script for how to use buildbot_plugin.sh |
|
||||
|makerelease.sh | Packages the executables to produce files for a release |
|
||||
|notify.py | Notifies a user on Discord if buildbot fails |
|
|
@ -1,23 +1,19 @@
|
|||
This folder contains addtitional information and resources for the game
|
||||
This folder contains additional files and resources for ClassiCube
|
||||
|
||||
## Icons
|
||||
|
||||
CCicon.ico is the basis icon for the other icon files
|
||||
|
||||
mac_icon_gen.cs/linux_icon_gen.cs use CCIcon.ico to generate icon files for macOS/Linux
|
||||
Generating icons that can be embedded in the executable is operating system and compiler specific - see the relevant operating system folder for more details
|
||||
|
||||
TODO: Explain how to compile your own icon for all the platforms
|
||||
|
||||
## Build scripts
|
||||
## Folder meanings
|
||||
|
||||
|File|Description|
|
||||
|--------|-------|
|
||||
|buildbot.sh | Compiles the game to optimised executables (with icons) |
|
||||
|buildbot_plugin.sh | Compiles specified plugin for various platforms |
|
||||
|buildtestplugin.sh | Example script for how to use buildbot_plugin.sh |
|
||||
|makerelease.sh | Packages the executables to produce files for a release |
|
||||
|notify.py | Notifies a user on Discord if buildbot fails |
|
||||
|
||||
## Other files
|
||||
|
||||
Info.plist is the Info.plist you would use when creating an Application Bundle for macOS.
|
||||
|windows | Contains icons |
|
||||
|macOS | Contains icons, Info.plist for generating macOS Application Bundle |
|
||||
|linux | Contains icons, script for generating a Desktop Entry |
|
||||
|xbox | Contains Xbox shaders |
|
||||
|build_scripts | Contains scripts for compiling plugins and optimised ClassiCube executables|
|
1
misc/windows/CCicon.rc
Normal file
1
misc/windows/CCicon.rc
Normal file
|
@ -0,0 +1 @@
|
|||
1 ICON "../CCicon.ico"
|
|
@ -553,7 +553,7 @@
|
|||
<ClCompile Include="_type1.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\misc\CCicon.rc" />
|
||||
<ResourceCompile Include="..\misc\windows\CCicon.rc" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
|
|
|
@ -41,12 +41,12 @@ static void LoadFragmentShader(void) {
|
|||
uint32_t* p;
|
||||
|
||||
p = pb_begin();
|
||||
#include "ps.inl"
|
||||
#include "../misc/xbox/ps_colored.inl"
|
||||
pb_end(p);
|
||||
}
|
||||
|
||||
static uint32_t vs_program[] = {
|
||||
#include "vs.inl"
|
||||
#include "../misc/xbox/vs_colored.inl"
|
||||
};
|
||||
|
||||
static void SetupShaders(void) {
|
||||
|
@ -368,22 +368,7 @@ void Gfx_CalcPerspectiveMatrix(struct Matrix* matrix, float fov, float aspect, f
|
|||
matrix->row4.W = 0.0f;
|
||||
}
|
||||
|
||||
/* Construct a viewport transformation matrix */
|
||||
static void CalcViewportTransform(struct Matrix* m, float width, float height, float z_min, float z_max) {
|
||||
*m = Matrix_Identity;
|
||||
m->row1.X = width / 2.0f;
|
||||
m->row2.Y = -height / 2.0f;
|
||||
m->row3.Z = z_max - z_min;
|
||||
m->row4.X = width / 2.0f;
|
||||
m->row4.Y = height / 2.0f;
|
||||
m->row4.Z = z_min;
|
||||
m->row4.W = 1.0f;
|
||||
}
|
||||
|
||||
struct Matrix viewport;
|
||||
void Gfx_OnWindowResize(void) {
|
||||
CalcViewportTransform(&viewport, WindowInfo.Width, WindowInfo.Height, 0, 65536.0f);
|
||||
}
|
||||
void Gfx_OnWindowResize(void) { }
|
||||
|
||||
static struct Matrix _view, _proj, _mvp;
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@ XBE_TITLE = ClassiCube
|
|||
GEN_XISO = $(XBE_TITLE).iso
|
||||
SRCS = $(wildcard src/*.c)
|
||||
NXDK_DIR = /home/test/Downloads/nxdk
|
||||
SHADER_OBJS = misc/xbox/ps.inl misc/xbox/vs.inl
|
||||
NXDK_STACKSIZE = 131072
|
||||
SHADER_OBJS = misc/xbox/vs_colored.inl misc/xbox/ps_colored.inl
|
||||
NXDK_NET = y
|
||||
NXDK_LDFLAGS = -stack:131072
|
||||
|
||||
include $(NXDK_DIR)/Makefile
|
||||
|
|
|
@ -424,7 +424,7 @@ static void InitHDD(void) {
|
|||
Platform_LogConst("Failed to mount E:\ from Data partition");
|
||||
return;
|
||||
}
|
||||
Directory_Create(&String_Empty);
|
||||
Directory_Create(&String_Empty); // create root ClassiCube folder
|
||||
}
|
||||
|
||||
void Platform_Init(void) {
|
||||
|
|
Loading…
Reference in a new issue