Skip to content
Permalink
Browse files

Alpha 2.1.2, GameSDK edition!

- Removed broken IRC client
- Replaced discord-rpc with Discord GameSDK, Windows only for now
- Small launcher tweaks
- New postfx 'toast'
  • Loading branch information
YellowberryHN committed Feb 8, 2020
1 parent 5ea10ef commit cbecf5e0e6e41350ff847a6d2895b2694c8a0af9
Showing with 12,771 additions and 320 deletions.
  1. BIN bin/discord_game_sdk.dll
  2. BIN bin64/discord_game_sdk.dll
  3. BIN data/cardboard.png
  4. BIN data/cardboard_missing.png
  5. +46 −1 data/glsl.cfg
  6. +3 −22 data/maps.cfg
  7. +6 −4 data/menus.cfg
  8. BIN res/Cardboard Gray Missing-1024.png
  9. BIN res/Cardboard Gray Missing-128.png
  10. BIN res/Cardboard Gray Missing-16.png
  11. BIN res/Cardboard Gray Missing-32.png
  12. BIN res/Cardboard Gray Missing-512.png
  13. BIN res/Cardboard Gray Missing-64.png
  14. BIN res/Cardboard Gray Missing.png
  15. +10 −0 res/Cardboard Gray Missing.svg
  16. +7,006 −0 res/Crimson-gamejolt-template.pdn
  17. BIN res/Crimson-gamejolt-template.png
  18. +1 −6 src/Makefile
  19. +0 −1 src/engine/engine.h
  20. +2 −13 src/engine/main.cpp
  21. +0 −6 src/engine/server.cpp
  22. +60 −123 src/fpsgame/discord.cpp
  23. +6 −3 src/fpsgame/fps.cpp
  24. +20 −2 src/launcher/MainForm.cs
  25. BIN src/lib/discord_game_sdk.dll.lib
  26. BIN src/lib64/discord_game_sdk.dll.lib
  27. +4 −1 src/shared/cube.h
  28. +98 −0 src/shared/discord/achievement_manager.cpp
  29. +34 −0 src/shared/discord/achievement_manager.h
  30. +177 −0 src/shared/discord/activity_manager.cpp
  31. +42 −0 src/shared/discord/activity_manager.h
  32. +78 −0 src/shared/discord/application_manager.cpp
  33. +30 −0 src/shared/discord/application_manager.h
  34. +182 −0 src/shared/discord/core.cpp
  35. +64 −0 src/shared/discord/core.h
  36. +16 −0 src/shared/discord/discord.h
  37. +646 −0 src/shared/discord/discord_game_sdk.h
  38. +59 −0 src/shared/discord/event.h
  39. +942 −0 src/shared/discord/ffi.h
  40. +57 −0 src/shared/discord/image_manager.cpp
  41. +28 −0 src/shared/discord/image_manager.h
  42. +547 −0 src/shared/discord/lobby_manager.cpp
  43. +88 −0 src/shared/discord/lobby_manager.h
  44. +103 −0 src/shared/discord/network_manager.cpp
  45. +63 −0 src/shared/discord/network_manager.h
  46. +112 −0 src/shared/discord/overlay_manager.cpp
  47. +33 −0 src/shared/discord/overlay_manager.h
  48. +90 −0 src/shared/discord/relationship_manager.cpp
  49. +32 −0 src/shared/discord/relationship_manager.h
  50. +158 −0 src/shared/discord/storage_manager.cpp
  51. +46 −0 src/shared/discord/storage_manager.h
  52. +160 −0 src/shared/discord/store_manager.cpp
  53. +38 −0 src/shared/discord/store_manager.h
  54. +769 −0 src/shared/discord/types.cpp
  55. +491 −0 src/shared/discord/types.h
  56. +80 −0 src/shared/discord/user_manager.cpp
  57. +31 −0 src/shared/discord/user_manager.h
  58. +124 −0 src/shared/discord/voice_manager.cpp
  59. +37 −0 src/shared/discord/voice_manager.h
  60. +0 −26 src/shared/discord_register.h
  61. +0 −87 src/shared/discord_rpc.h
  62. +2 −2 src/shared/iengine.h
  63. +45 −14 src/vcpp/cardboard.vcxproj
  64. +105 −9 src/vcpp/cardboard.vcxproj.filters
Binary file not shown.
Binary file not shown.
BIN -8.32 KB (45%) data/cardboard.png
Binary file not shown.
Binary file not shown.
@@ -1430,7 +1430,7 @@ lazyshader 0 "bw" (fsvs) (fsps [gl_FragColor = vec4(dot(color.xyz, vec3(0.33

lazyshader 0 "test1" (fsvs) (fsps [gl_FragColor = color * color;])
lazyshader 0 "test2" (fsvs) (fsps [gl_FragColor = color + color;])
lazyshader 0 "test3" (fsvs) (fsps [gl_FragColor = vec4(color.x-color.y, color.y-color.z, color.z-color.x, 1.0-color.w);])
lazyshader 0 "test3" (fsvs) (fsps [gl_FragColor = vec4(color.x-color.y, color.y-color.z, color.z-color.x, (1.0-color.w)*2);])

// lazyshader 0 "flip" (fsvs [vtexcoord0 = vtexcoord0.st * vec2(1.0, -1.0);]) (fsps)

@@ -1450,6 +1450,7 @@ lazyshader 0 "rotoscope" [
uniform vec2 postfxscale;
uniform vec4 params;
varying vec2 t11, t00, t12, t01, t20, t02, t21, t10, t22;

void main(void)
{
gl_Position = vvertex;
@@ -1498,6 +1499,50 @@ lazyshader 0 "rotoscope" [
}
]

// toast

lazyshader 0 "toast" [
attribute vec4 vvertex;
@(screentexcoord 0)
uniform vec2 postfxscale;
uniform vec4 params;
varying vec2 t11, t00, t12, t01, t20, t02, t21, t10, t22;

void main(void)
{
gl_Position = vvertex;
t11 = vtexcoord0;
vec2 scale = postfxscale*params.x;
t00 = vec2(-1.0, -1.0)*scale + vtexcoord0;
t12 = vec2( 0.0, 1.0)*scale + vtexcoord0;
t01 = vec2(-1.0, 0.0)*scale + vtexcoord0;
t20 = vec2( 1.0, -1.0)*scale + vtexcoord0;
t02 = vec2(-1.0, 1.0)*scale + vtexcoord0;
t21 = vec2( 1.0, 0.0)*scale + vtexcoord0;
t10 = vec2( 0.0, -1.0)*scale + vtexcoord0;
t22 = vec2( 1.0, 1.0)*scale + vtexcoord0;
}
] [
uniform sampler2D tex0;
varying vec2 t11, t00, t12, t01, t20, t02, t21, t10, t22;
void main(void)
{
vec4 c00 = texture2D(tex0, t00);
vec4 c01 = texture2D(tex0, t01);
vec4 c02 = texture2D(tex0, t02);
vec4 c10 = texture2D(tex0, t10);
vec4 c11 = texture2D(tex0, t11);
vec4 c12 = texture2D(tex0, t12);
vec4 c20 = texture2D(tex0, t20);
vec4 c21 = texture2D(tex0, t21);
vec4 c22 = texture2D(tex0, t22);

float bitd = 15.0;

gl_FragColor = vec4(int(c00.x*bitd)/bitd,int(c00.y*bitd)/bitd,int(c00.z*bitd)/bitd, (c00.w*bitd)/bitd);
}
]

blur3shader = [
lazyshader 0 $arg1 [
attribute vec4 vvertex;
@@ -1,4 +1,4 @@
currentmaps = "aard3c flux fz_burn highland illusion maze neo_falls neo_noir retrograde ruins zsolttest"
currentmaps = "aard3c duabo flux fz_burn highland illusion maze neo_falls neo_noir retrograde ruins space_ship zsolttest"
shadowmaps = "color"
parkourmaps = "ftdeluxe secondevermap"
ctfmaps = "hr retrograde zigguraut"
@@ -13,7 +13,7 @@ genmapitems = [

showmapshot = [
guibar
guiimage (concatword "packages/base/" (if (> $numargs 0) [result $arg1] [at $guirollovername 0]) ".png") $guirolloveraction 4 1 "data/cardboard.png"
guiimage (concatword "packages/base/" (if (> $numargs 0) [result $arg1] [at $guirollovername 0]) ".png") $guirolloveraction 4 1 "data/cardboard_missing.png"
]

newgui maps [
@@ -82,23 +82,4 @@ newgui maps [
// ]
// custommaps = (sortlist $custommaps x y [<=s $x $y])
// showgui maps2
//]

// prepare yourself for bad -Y 09/12/19

dbgmap = [
dbg_disablelightmap 1
map $arg1
calclight
savemap $arg1
disconnect
dbg_disablelightmap 0
map $arg1
calclight
savemap $arg1
disconnect
map $arg1
echo "dbgmap done"
]

complete dbgmap packages/base cmr
//]
@@ -589,7 +589,7 @@ genskyitems = [
]
]
alias showskyshot [ guibar; guiimage (concatword "<thumbnail:128>packages/" (if (> $numargs 0) [result $arg1] [result (at $guirollovername 0)]) "_ft.jpg") $guirolloveraction 4 1 "data/cardboard.png"]
alias showskyshot [ guibar; guiimage (concatword "<thumbnail:128>packages/" (if (> $numargs 0) [result $arg1] [result (at $guirollovername 0)]) "_ft.jpg") $guirolloveraction 4 1 "data/cardboard_missing.png"]
newgui materials [
@@ -749,6 +749,7 @@ newgui postfx [
guibutton "rotoscope" "rotoscope 1"
guibutton "rotoscope + blur3" "rotoscope 1 1"
guibutton "rotoscope + blur5" "rotoscope 1 2"
guibutton "toast" "setpostfx toast"
guibutton "sobel" "setpostfx sobel"
guibutton "invert" "setpostfx invert"
guibutton "gbr" "setpostfx gbr"
@@ -758,6 +759,10 @@ newgui postfx [
guibutton "experimental" "setpostfx test3"
]
postfx = [
showgui postfx
]
macro resbutton [
guibutton "%1x%2" "screenres %1 %2" (if (&& (= $scr_w %1) (= $scr_h %2)) [result "radio_on"] [result "radio_off"])
]
@@ -1058,9 +1063,6 @@ newgui options [
showfileeditor "autoexec.cfg" -60 15
] "t:gui.options.game"
sayirccommand = [inputcommand (if (>= $numargs 1) [result $arg1] [result ""]) [sayirc $ircname_ $ircchan_ $commandbuf] "[irc]"]
bind u sayirccommand
newgui resolution [
guitext "Field of view (default: 100)"
guislider fov
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,10 @@
<svg width="274" height="277" viewBox="0 0 274 277" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M136.821 14.0013L25.0892 71.8412L8 128.181L25.0892 137.374V204.74L136.82 269.118V269.12L136.821 269.119L136.823 269.12V269.118L248.553 204.74V137.375L265.643 128.181L248.554 71.8412L136.821 14.0013Z" stroke="black" stroke-width="15" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M25.0927 71.8391V204.739L136.826 269.118L136.825 129.678L25.0927 71.8391Z" fill="#BDBDBD"/>
<path d="M248.557 71.8391V204.739L136.823 269.118L136.824 129.678L248.557 71.8391Z" fill="#8E8E8E"/>
<path d="M25.0927 71.8391L136.825 14V129.678L25.0927 71.8391Z" fill="#797979"/>
<path d="M248.557 71.8391L136.825 14V129.678L248.557 71.8391Z" fill="#8E8E8E"/>
<path d="M136.825 129.678L118.335 187.533L8.00317 128.18L25.0927 71.8391L136.825 129.678Z" fill="#CACACA"/>
<path d="M136.825 129.678L155.314 187.533L265.646 128.18L248.557 71.8391L136.825 129.678Z" fill="#797979"/>
<path d="M124.8 163.4V130.6C135.733 130.067 144.267 127.4 150.4 122.6C156.667 117.8 159.8 111.2 159.8 102.8V100C159.8 93.2 157.667 87.8 153.4 83.8C149.133 79.6667 143.4 77.6 136.2 77.6C128.467 77.6 122.267 79.8 117.6 84.2C113.067 88.6 110 94.2 108.4 101L93.6 95.4C94.8 91.1333 96.5333 87.0667 98.8 83.2C101.2 79.2 104.133 75.7333 107.6 72.8C111.2 69.7333 115.4 67.3333 120.2 65.6C125 63.8667 130.533 63 136.8 63C149.2 63 159 66.4 166.2 73.2C173.4 80 177 89.2 177 100.8C177 107.2 175.867 112.8 173.6 117.6C171.467 122.267 168.667 126.267 165.2 129.6C161.733 132.933 157.8 135.6 153.4 137.6C149 139.6 144.6 141 140.2 141.8V163.4H124.8ZM132.6 207.4C128.333 207.4 125.2 206.333 123.2 204.2C121.333 202.067 120.4 199.267 120.4 195.8V193.2C120.4 189.733 121.333 186.933 123.2 184.8C125.2 182.667 128.333 181.6 132.6 181.6C136.867 181.6 139.933 182.667 141.8 184.8C143.8 186.933 144.8 189.733 144.8 193.2V195.8C144.8 199.267 143.8 202.067 141.8 204.2C139.933 206.333 136.867 207.4 132.6 207.4Z" fill="black"/>
</svg>

Large diffs are not rendered by default.

Binary file not shown.
@@ -76,7 +76,7 @@ ifneq (,$(findstring GNU,$(PLATFORM)))
CLIENT_LIBS+= -lrt
endif
endif
# commented out until i can get the .a file from my VM.

CLIENT_LIBS+= -lpthread lib/libdiscord-rpc.a
CLIENT_OBJS= \
shared/crypto.o \
@@ -98,7 +98,6 @@ CLIENT_OBJS= \
engine/dynlight.o \
engine/glare.o \
engine/grass.o \
engine/irc.o \
engine/lightmap.o \
engine/main.o \
engine/material.o \
@@ -327,10 +326,6 @@ engine/grass.o: shared/ents.h shared/command.h shared/glexts.h shared/glemu.h
engine/grass.o: shared/iengine.h shared/igame.h engine/world.h engine/octa.h
engine/grass.o: engine/lightmap.h engine/bih.h engine/texture.h
engine/grass.o: engine/model.h
engine/irc.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
engine/irc.o: shared/ents.h shared/command.h shared/iengine.h shared/igame.h
engine/irc.o: engine/world.h engine/octa.h engine/lightmap.h engine/bih.h
engine/irc.o: engine/texture.h engine/model.h
engine/lightmap.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
engine/lightmap.o: shared/ents.h shared/command.h shared/glexts.h
engine/lightmap.o: shared/glemu.h shared/iengine.h shared/igame.h
@@ -11,7 +11,6 @@
#include "bih.h"
#include "texture.h"
#include "model.h"
#include "irc.h"

extern dynent *player;
extern physent *camera1; // special ent that acts as camera, same object as player1 in FPS mode
@@ -25,21 +25,13 @@ void cleanup()
#ifdef __APPLE__
if(screen) SDL_SetWindowFullscreen(screen, 0);
#endif
#ifdef DISCORD
discord::updatePresence(discord::D_QUITTING);
Discord_Shutdown();
#endif
SDL_Quit();
}

extern void writeinitcfg();

void quit() // normal exit
{
#ifdef DISCORD
discord::updatePresence(discord::D_QUITTING);
Discord_Shutdown();
#endif
writeinitcfg();
writeservercfg();
abortconnect();
@@ -76,9 +68,6 @@ void fatal(const char *s, ...) // failure exit
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Cardboard Engine fatal error", msg, NULL);
}
}
#ifdef DISCORD
Discord_Shutdown();
#endif
exit(EXIT_FAILURE);
}

@@ -1452,7 +1441,7 @@ void getuserinfo_(bool debug) {
return;
}
if (debug) conoutf(CON_DEBUG, thing);
cJSON *json = cJSON_Parse(thing); // fix on linux, makefile doesn't work.
cJSON *json = cJSON_Parse(thing);

// error handling
const cJSON* status = cJSON_GetObjectItemCaseSensitive(json, "status");
@@ -1771,7 +1760,6 @@ int main(int argc, char **argv)
checksleep(lastmillis);

serverslice(false, 0);
ircslice();

if(frames) updatefpshistory(elapsedtime);
frames++;
@@ -1794,6 +1782,7 @@ int main(int argc, char **argv)
//gl_drawframe();
swapbuffers();
renderedframe = inbetweenframes = true;
discord::discordCallbacks();
}

ASSERT(0);
@@ -177,11 +177,6 @@ void cleanupserver()
if(pongsock != ENET_SOCKET_NULL) enet_socket_destroy(pongsock);
if(lansock != ENET_SOCKET_NULL) enet_socket_destroy(lansock);
pongsock = lansock = ENET_SOCKET_NULL;
#ifndef STANDALONE
irccleanup();
#endif


}

VARF(maxclients, 0, DEFAULTCLIENTS, MAXCLIENTS, { if(!maxclients) maxclients = DEFAULTCLIENTS; });
@@ -1035,7 +1030,6 @@ void rundedicatedserver()
DispatchMessage(&msg);
}
serverslice(true, 5);
ircslice();
}
#else
for(;;) serverslice(true, 5);

0 comments on commit cbecf5e

Please sign in to comment.
You can’t perform that action at this time.