Compare commits

...

11 Commits

Author SHA1 Message Date
Amy Ackermann beec9bff69 Correct credit to match new name 2020-04-21 11:10:30 -07:00
Amy Ackermann eb16ec68a9 Merge pull request #73 from kb-1000/xwayland-fix
Fix crash on Xwayland
2020-02-10 09:10:49 -08:00
kb1000 35a493cfa3 Fix crash on Xwayland 2020-02-10 17:37:08 +01:00
Lucas de Vries a8def84fc9 Merge pull request #51 from Michael-Phoenix/master
Fix for "front() called on empty vector" Errors on debug builds.
2018-09-26 20:18:14 +02:00
kalvindukes 9481d94c98 Fix for "front() called on empty vector" Errors on debug builds.
Now using the C++11 vector.data() to fetch the proper pointer instead of $vector.front()
- Which fails on empty vectors because of the standard compiler setting _ITERATOR_DEBUG_LEVEL=2 when debugging
2018-09-26 19:23:46 +02:00
Lucas de Vries 6e97ea92a7 Merge pull request #46 from l29ah/master
do not disable cpu-specific optimizations
2018-09-26 12:19:09 +02:00
Lucas de Vries 565d3f9aa5 Merge pull request #47 from l29ah/ancient-ruins
Clarify the Ancient Ruins building (un)usefulness
2018-09-26 12:18:59 +02:00
Lucas de Vries 9e7dae60be Merge pull request #49 from l29ah/int-overflow-warning
source/game/obj/object.h: don't complain about int overflow
2018-09-26 12:18:40 +02:00
Sergey Alirzaev 75eac05e2e source/game/obj/object.h: don't complain about int overflow
./source/game/obj/object.h:19:49: warning: result of ‘(255 << 26)’ requires 35 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
 const unsigned ObjectTypeMask = (unsigned)(0xFF << ObjectTypeBitOffset);
                                            ~~~~~^~~~~~~~~~~~~~~~~~~~~~
2018-09-26 11:41:34 +03:00
Sergey Alirzaev 6ebe079d62 Clarify the Ancient Ruins building (un)usefulness 2018-09-25 14:09:39 +03:00
Sergey Alirzaev c295e25d26 do not disable cpu-specific optimizations 2018-09-24 14:39:30 +03:00
16 changed files with 15 additions and 24 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
=== BLIND MIND STUDIOS ===
Andrew Ackermann
Amy Ackermann
James Woodall
=== GLACICLE ===
+1 -1
View File
@@ -341,7 +341,7 @@ COND_ANCIENT_RUINS_DESC: <<|
>>
BLD_ANCIENT_RUINS: Ancient Ruins
BLD_ANCIENT_RUINS_DESC: <<|
The ancient ruins of a military outpost constructed by an advanced race eons ago.
The ancient ruins of a military outpost constructed by an advanced race eons ago. When first colonized, gain a number of free research points.
>>
COND_HIGH_YIELD: High Yield Resource
-1
View File
@@ -12,7 +12,6 @@ ifeq ($(ARCH), 32)
ARCHNAME = x86
else
#Global
CXXFLAGS += -m64 -march=athlon64 -mtune=generic
#Arch name
ARCHNAME = x64
+2 -2
View File
@@ -824,7 +824,7 @@ Design::Design(SaveFile& file) : initialized(true), data(nullptr), clientData(nu
unsigned hexesCount = file;
hexes.resize(hexesCount);
file.read(&hexes.front(), sizeof(vec2u) * hexesCount);
file.read(hexes.data(), sizeof(vec2u) * hexesCount);
cropMin = vec2u(grid.width, grid.height);
cropMax = vec2u(0, 0);
@@ -948,7 +948,7 @@ void Design::save(SaveFile& file) const {
file.write(hexStatusIndex.data, sizeof(int) * hexStatusIndex.width * hexStatusIndex.height);
file << (unsigned)hexes.size();
file.write(&hexes.front(), sizeof(vec2u) * (unsigned)hexes.size());
file.write(hexes.data(), sizeof(vec2u) * (unsigned)hexes.size());
unsigned cnt = getShipVariableCount();
file << cnt;
+2 -2
View File
@@ -3646,7 +3646,7 @@ void Subsystem::init(SaveFile& file) {
unsigned hexCount = file;
hexes.resize(hexCount);
file.read(&hexes.front(), hexes.size() * sizeof(vec2u));
file.read(hexes.data(), hexes.size() * sizeof(vec2u));
hexEffects.resize(hexCount);
if(file >= SFV_0010) {
@@ -3799,7 +3799,7 @@ void Subsystem::save(SaveFile& file) const {
file << dataOffset;
file << unsigned(hexes.size());
file.write(&hexes.front(), hexes.size() * sizeof(vec2u));
file.write(hexes.data(), hexes.size() * sizeof(vec2u));
for(unsigned i = 0; i < hexes.size(); ++i) {
file << (unsigned)hexEffects[i].size();
+1 -1
View File
@@ -16,7 +16,7 @@
#endif
const unsigned ObjectTypeBitOffset = 26;
const unsigned ObjectTypeMask = (unsigned)(0xFF << ObjectTypeBitOffset);
const unsigned ObjectTypeMask = 0xFFU << ObjectTypeBitOffset;
const unsigned ObjectIDMask = 0xFFFFFFFF >> (32 - ObjectTypeBitOffset);
extern unsigned ObjectTypeCount;
+3 -3
View File
@@ -92,7 +92,7 @@ void loadBinaryMesh(const char* filename, Mesh& mesh) {
return;
vertices.resize(count);
file.read((char*)&vertices.front(), sizeof(vec3f) * count);
file.read((char*)vertices.data(), sizeof(vec3f) * count);
//Normals
file.read((char*)&count, sizeof(count));
@@ -100,7 +100,7 @@ void loadBinaryMesh(const char* filename, Mesh& mesh) {
return;
normals.resize(count);
file.read((char*)&normals.front(), sizeof(vec3f) * count);
file.read((char*)normals.data(), sizeof(vec3f) * count);
//UVs
file.read((char*)&count, sizeof(count));
@@ -108,7 +108,7 @@ void loadBinaryMesh(const char* filename, Mesh& mesh) {
return;
uvs.resize(count);
file.read((char*)&uvs.front(), sizeof(UV) * count);
file.read((char*)uvs.data(), sizeof(UV) * count);
//Faces
file.read((char*)&count, sizeof(count));
+1 -1
View File
@@ -237,7 +237,7 @@ namespace render {
bufferFlushes += 1;
vbFlushCounts[reason] += 1;
RenderStep* pSteps = &steps.front();
RenderStep* pSteps = steps.data();
for(unsigned i = 0, cnt = (unsigned)steps.size(); i < cnt; ++i) {
auto& step = pSteps[i];
shaderUniforms = step.shaderCache;
+4 -5
View File
@@ -231,9 +231,8 @@ static void updateKeyCodeLUT(void)
// keyboard layout
// Get keyboard description
descr = XkbGetKeyboard(_glfw.x11.display,
XkbAllComponentsMask,
XkbUseCoreKbd);
descr = XkbGetMap(_glfw.x11.display, 0, XkbUseCoreKbd);
XkbGetNames(_glfw.x11.display, XkbKeyNamesMask, descr);
// Find the X11 key code -> GLFW key code mapping
for (keyCode = descr->min_key_code; keyCode <= descr->max_key_code; ++keyCode)
@@ -304,8 +303,8 @@ static void updateKeyCodeLUT(void)
}
// Free the keyboard description
XkbFreeKeyboard(descr, 0, True);
XkbFreeNames(descr, XkbKeyNamesMask, True);
XkbFreeClientMap(descr, 0, True);
// Translate the un-translated key codes using traditional X11 KeySym
// lookups
for (keyCode = 0; keyCode < 256; keyCode++)
-1
View File
@@ -12,7 +12,6 @@ ifeq ($(ARCH), 32)
ARCHNAME = x86
else
#Global
CXXFLAGS += -m64 -march=athlon64 -mtune=generic
#Arch name
ARCHNAME = x64
-1
View File
@@ -55,7 +55,6 @@ ifeq ($(ARCH), 32)
ARCHNAME = x86
else
#Global
ARCHFLAGS = -m64 -march=athlon64 -mtune=generic
CXXFLAGS += $(ARCHFLAGS)
#Angelscript
-1
View File
@@ -60,7 +60,6 @@ for arg in $args; do
export ARCH=32
;;
64)
export ARCHFLAGS="-m64 -march=athlon64 -mtune=generic"
export ARCH=64
;;
debug)
-1
View File
@@ -12,7 +12,6 @@ ifeq ($(ARCH), 32)
ARCHNAME = x86
else
#Global
CXXFLAGS += -m64 -march=athlon64 -mtune=generic
#Arch name
ARCHNAME = x64
-1
View File
@@ -12,7 +12,6 @@ ifeq ($(ARCH), 32)
ARCHNAME = x86
else
#Global
CXXFLAGS += -m64 -march=athlon64 -mtune=generic
#Arch name
ARCHNAME = x64
-1
View File
@@ -12,7 +12,6 @@ ifeq ($(ARCH), 32)
ARCHNAME = x86
else
#Global
CXXFLAGS += -m64 -march=athlon64 -mtune=generic
#Arch name
ARCHNAME = x64
-1
View File
@@ -12,7 +12,6 @@ ifeq ($(ARCH), 32)
ARCHNAME = x86
else
#Global
CXXFLAGS += -m64 -march=athlon64 -mtune=generic
#Arch name
ARCHNAME = x64