profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/bwrsandman/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Sandy bwrsandman Montreal Graphics and Optimization.

bwrsandman/Bless-old-fork 57

Bless is a high quality, full featured hex editor.

bwrsandman/Bless 55

Bless - Gtk# Hex Editor (fork)

bkaradzic/bgfx.cmake 36

Independently maintained CMake build scripts for bgfx. Released under public domain.

bwrsandman/android_device_zte_roamer 0

This repository is for CM7 on ZTE N760 Roamer from Public Mobile.

bwrsandman/android_device_zte_warp2 0

Device tree for the ZTE Sequent

bwrsandman/android_kernel_zte_roamer 0

ZTE N762 (Roamer) Kernel based on Linux Stable 2.6.35.7

bwrsandman/anybox.recipe.odoo 0

Buildout recipe for Odoo 8, special branches for anybox.recipe.openerp handle Odoo 8 + OpenERP >= 5.0

push eventbwrsandman/Fusion-360---Linux-Wine-Version-

Sandy

commit sha 0bee9bf98eb49b7713a296b300b15c7a005f15dd

Arch: do not reinstall up to date packages

view details

push time in 22 days

pull request commentopenblack/openblack

Add audio playback

I'll test when you're done that refactor. Give me a shout when.

raffclar

comment created time in 2 months

Pull request review commentopenblack/openblack

Add support for temple, multiple creature meshes and cam files

 class Camera  	[[nodiscard]] glm::vec3 GetPosition() const { return _position; } 	[[nodiscard]] glm::vec3 GetRotation() const { return glm::degrees(_rotation); }+	[[nodiscard]] glm::vec3 GetMovementSpeed() const { return _movementSpeed; }

Speed + direction become a velocity.

GetVelocity
_velocity
raffclar

comment created time in 2 months

Pull request review commentopenblack/openblack

Add support for temple, multiple creature meshes and cam files

 class Camera 	void handleMouseInput(const SDL_Event&);  	[[nodiscard]] glm::mat4 getRotationMatrix() const;- protected:+	bool _focused;+	glm::vec3 _focusedPosition;+	float _focusedPositionRadius; 	glm::vec3 _position; 	glm::vec3 _rotation; 	glm::vec3 _dv;  	glm::mat4 _projectionMatrix;  	glm::vec3 _velocity;-	float _movementSpeed;+	glm::vec3 _movementSpeed;+	float _maxMovementSpeed = .0005f;+	glm::vec3 _acceleration = glm::vec3(0.0f);

Can you put these definitions in the constructor instead?

raffclar

comment created time in 2 months

Pull request review commentopenblack/openblack

Add support for temple, multiple creature meshes and cam files

+/*****************************************************************************+ * Copyright (c) 2018-2021 openblack developers+ *+ * For a complete list of all authors, please refer to contributors.md+ * Interested in contributing? Visit https://github.com/openblack/openblack+ *+ * openblack is licensed under the GNU General Public License version 3.+ *****************************************************************************/++#pragma once++#include "Common/FileSystem.h"+#include "Camera.h"++#include <glm/vec3.hpp>+#include <entt/entt.hpp>++namespace openblack+{++struct CameraPoint+{+	bool start;+	entt::entity next = entt::null;+	glm::vec3 position;+	glm::vec3 rotation;+};++class CameraPath+{+public:+	CameraPath() : _start(entt::null) {};+	~CameraPath() = default;+	bool LoadFromFile(const fs::path& path);+	const std::vector<CameraPoint>& GetPoints() const { return _points; }+	void CreatePathEntities(glm::vec3 position);+	void CreatePathStartEntity(glm::vec3 position);+	void CreatePathEndEntity(glm::vec3 position);+	glm::vec3 GetPathStartPosition() const { return _points.front().position; }+	void RemoveFromRegistry();+private:+	std::vector<CameraPoint> _points;+	entt::entity _start;

Can you explain why we're using a linked list instead of a vector?

raffclar

comment created time in 2 months

Pull request review commentopenblack/openblack

Add support for temple, multiple creature meshes and cam files

 #include "MeshPack.h"  #include "3D/L3DMesh.h"+#include "3D/MeshLocator.h" #include "AllMeshes.h" #include "Common/FileSystem.h" #include "Common/MemoryStream.h" #include "Entities/Components/Hand.h" #include "Game.h" #include "Graphics/Texture2D.h" +extern "C" {+#include "miniz.c"+}

Why include a c file here?

raffclar

comment created time in 2 months

Pull request review commentopenblack/openblack

Add support for temple, multiple creature meshes and cam files

 void Camera::handleMouseInput(const SDL_Event& e) 	} } +#define BV(v) (btVector3((v).x, (v).y, (v).z))

Are we using Bullet now?

raffclar

comment created time in 2 months

Pull request review commentopenblack/openblack

Add support for temple, multiple creature meshes and cam files

  *****************************************************************************/  #include "Camera.h"-#include <3D/LandIsland.h>-#include <Game.h>+#include "Game.h"+#include "3D/LandIsland.h"

If you're going to use relative imports, you should use them based on the current directory:

#include "../Game.h"
#include "../Entities/Registry.h"
#include "LandIsland.h"
raffclar

comment created time in 2 months

Pull request review commentopenblack/openblack

Add support for temple, multiple creature meshes and cam files

 void PackFile::ExtractTexturesFromBlock() 		DdsHeader ddsHeader; 		ddsStream.read(reinterpret_cast<char*>(&ddsHeader), sizeof(DdsHeader)); -		// TODO(bwrsandman) the extra sizeof(uint32_t) is unaccounted for-		if (header.ddsSize - sizeof(ddsHeader) - sizeof(uint32_t) != ddsHeader.pitchOrLinearSize)+		// Workaround for non-conforming DXT5 textures in Creature Isle+		if (ddsHeader.pitchOrLinearSize == 0 && ddsHeader.format.fourCC == std::string("DXT5")) 		{+			auto blockSize = 16;+			ddsHeader.pitchOrLinearSize = ((ddsHeader.width + 3) / 4) * ((ddsHeader.height + 3) / 4) * blockSize;+			;

dangling semi

raffclar

comment created time in 2 months

Pull request review commentopenblack/openblack

Add support for temple, multiple creature meshes and cam files

+/*****************************************************************************+ * Copyright (c) 2018-2021 openblack developers+ *+ * For a complete list of all authors, please refer to contributors.md+ * Interested in contributing? Visit https://github.com/openblack/openblack+ *+ * openblack is licensed under the GNU General Public License version 3.+ *****************************************************************************/++#include "CameraPath.h"+#include "CamFile.h"+#include "Game.h"+#include "Entities/Registry.h"++#include <glm/gtx/transform.hpp>+++using namespace openblack;++bool CameraPath::LoadFromFile(const fs::path& path)+{+	cam::CamFile file;+	file.Open(path.string());+	auto filePoints = file.GetPoints();++	for (auto& filePoint : filePoints)+	{+		CameraPoint node;+		node.start = _points.size() == 0;+		node.position = glm::vec3(filePoint.x, filePoint.y, filePoint.z);+		node.rotation = glm::normalize(node.position + glm::vec3(filePoint.pitch, filePoint.yaw, filePoint.roll));+		_points.emplace_back(node);

C++ question here: Does this do a move or copy? Seems like there will be a copy done here no matter what. Maybe use the reference returned by emplace instead?

CameraPoint& node = _points.emplace_back();
raffclar

comment created time in 2 months

Pull request review commentopenblack/openblack

Add support for temple, multiple creature meshes and cam files

 class Camera 	    , _dv(0.0f, 0.0f, 0.0f) 	    , _projectionMatrix(1.0f) 	    , _velocity(0.0f, 0.0f, 0.0f)-	    , _movementSpeed(0.0005f)+	    , _movementSpeed(0.0000f)+	    , _maxMovementSpeed(0.0005f) 	    , _freeLookSensitivity(1.0f)+	    , _focused(false)+	    , _focusedPosition(0.0f)+	    , _focusedPositionRadius(0.0f) 	{ 	} 	Camera()

You should move all function definitions that aren't very basic to an implementation file. It'll speed up compilation and make it more clean to read and maintain.

raffclar

comment created time in 2 months

Pull request review commentopenblack/openblack

Add support for temple, multiple creature meshes and cam files

 void Camera::handleMouseInput(const SDL_Event& e) 	} } +#define BV(v) (btVector3((v).x, (v).y, (v).z))+#define AIR_DENSITY (1.2f)+ void Camera::Update(std::chrono::microseconds dt) {-	_position += _velocity * (_movementSpeed * dt.count());+	auto maxSpeed = 0.005f;+	auto accelFactor = 0.001f;+	auto ghettoAirResistance = .9f;

Odd variable name???

raffclar

comment created time in 2 months

Pull request review commentopenblack/openblack

Add support for temple, multiple creature meshes and cam files

+/*****************************************************************************+ * Copyright (c) 2018-2021 openblack developers+ *+ * For a complete list of all authors, please refer to contributors.md+ * Interested in contributing? Visit https://github.com/openblack/openblack+ *+ * openblack is licensed under the GNU General Public License version 3.+ *****************************************************************************/++#pragma once++#include <array>+#include <string>+#include <vector>++namespace openblack::cam+{++struct CamHeader+{+	uint32_t unk1; // No perceptible difference when altered. Some values cause the game to crash+	uint32_t movementSpeed;  // The larger this integer, the slower the movement speed+	uint32_t numberOfPoints; // How many path vertices there are in the file+};++struct CamPoint+{+	float x;+	float y;+	float z;

LHPoint, float[3] or vec3?

raffclar

comment created time in 2 months

Pull request review commentopenblack/openblack

Add support for temple, multiple creature meshes and cam files

 struct L3DSubmeshHeader 	{ 		uint32_t lod : 3; 		uint32_t status : 6;-		uint32_t unknown1 : 3; // always 0b0101+		uint32_t unknown1 : 1; // always 0b0101+		uint32_t unknown2 : 1; // always 0b0101+		uint32_t unknown3 : 1; // always 0b0101 		uint32_t isWindow : 1; 		uint32_t isPhysics : 1;-		uint32_t unknown2 : 16; // always 0, probably padding on 32 bits+		uint32_t unknown4 : 1; // always 0, probably padding on 32 bits+		uint32_t unknown5 : 1; // always 0, probably padding on 32 bits+		uint32_t unknown6 : 1; // always 0, probably padding on 32 bits+		uint32_t unknown7 : 1; // always 0, probably padding on 32 bits+		uint32_t unknown8 : 1; // always 0, probably padding on 32 bits+		uint32_t unknown9 : 1; // always 0, probably padding on 32 bits+		uint32_t unknown10 : 1; // always 0, probably padding on 32 bits+		uint32_t unknown11 : 1; // always 0, probably padding on 32 bits+		uint32_t unknown12 : 1; // always 0, probably padding on 32 bits+		uint32_t unknown13 : 1; // always 0, probably padding on 32 bits+		uint32_t unknown14 : 1; // always 0, probably padding on 32 bits+		uint32_t unknown15 : 1; // always 0, probably padding on 32 bits+		uint32_t unknown16 : 1; // always 0, probably padding on 32 bits+		uint32_t unknown17 : 1; // always 0, probably padding on 32 bits+		uint32_t unknown18 : 1; // always 0, probably padding on 32 bits+		uint32_t unknown19 : 1; // always 0, probably padding on 32 bits+		uint32_t unknown20 : 1; // always 0, probably padding on 32 bits+		uint32_t unknown21 : 1; // always 0, probably padding on 32 bits

What the reason for splitting up these flags?

raffclar

comment created time in 2 months

Pull request review commentopenblack/openblack

Add support for temple, multiple creature meshes and cam files

 int WriteFile(const Arguments::Write& args) 		L3DSubmeshHeader submesh; 		submesh.flags.lod = 0; 		submesh.flags.status = 0;-		submesh.flags.unknown1 = 0b0101;+		submesh.flags.unknown1 = 0b01;

What is this change about? Did you discover the meaning of this flag?

raffclar

comment created time in 2 months

PullRequestReviewEvent

Pull request review commentopenblack/openblack

Add support for temple, multiple creature meshes and cam files

 struct L3DSubmeshHeader 	{ 		uint32_t lod : 3; 		uint32_t status : 6;-		uint32_t unknown1 : 3; // always 0b0101+		uint32_t unknown1 : 1; // always 0b0101+		uint32_t unknown2 : 1; // always 0b0101+		uint32_t unknown3 : 1; // always 0b0101
		uint32_t unknown1 : 1; // always 1
		uint32_t unknown2 : 1; // always 0
		uint32_t unknown3 : 1; // always 1
raffclar

comment created time in 2 months

Pull request review commentopenblack/openblack

Add support for temple, multiple creature meshes and cam files

 void L3DFile::ReadFile(std::istream& stream) 		} 	} +	// Get additional data. Strictly in this order+	// Footprint data+	uint32_t additionalDataOffset = 0;+	uint32_t footprintDataSize = 0;+	if (static_cast<uint32_t>(_header.flags) & static_cast<uint32_t>(L3DMeshFlags::ContainsLandscapeFeature))+	{+		stream.seekg(0x48, stream.beg);

Where does this magic number come from? Could you make a const with its derivation available? Either a bunch of sizeofs or offsetofs would make it easier to understand for others.

raffclar

comment created time in 2 months

Pull request review commentopenblack/openblack

Add support for temple, multiple creature meshes and cam files

 void Camera::handleMouseInput(const SDL_Event& e) 	} } +#define BV(v) (btVector3((v).x, (v).y, (v).z))+#define AIR_DENSITY (1.2f)

Use a static const, preferably as part of a namespace.

raffclar

comment created time in 2 months

Pull request review commentopenblack/openblack

Add support for temple, multiple creature meshes and cam files

 struct L3DBlend }; static_assert(sizeof(L3DBlend) == 8); +struct UV2Data+{++};++struct FootprintData+{+};+

Work in progress?

raffclar

comment created time in 2 months

PullRequestReviewEvent

pull request commentopenblack/openblack

Simple Input System

Can you expand a little bit on the km file format? Is it commonly used? I am not familiar with it

CyrilPaulus

comment created time in 2 months

Pull request review commentxenia-project/xenia

Linux windowing fixes

 void gtk_event_handler_(GtkWidget* widget, GdkEvent* event, gpointer data) {       window->HandleKeyboard(&(event->key));       break;     case GDK_SCROLL:-    case GDK_BUTTON_PRESS:     case GDK_MOTION_NOTIFY:+    case GDK_BUTTON_PRESS:+    case GDK_BUTTON_RELEASE:       window->HandleMouse(&(event->any));       break;     case GDK_FOCUS_CHANGE:       window->HandleWindowFocus(&(event->focus_change));       break;     case GDK_CONFIGURE:-      window->HandleWindowResize(&(event->configure));+      // Only handle the event for the drawing area so we don't save+      // a width and height that includes the menu bar on the full window+      if (event->configure.window ==+          gtk_widget_get_window(window->drawing_area_)) {+        window->HandleWindowResize(&(event->configure));+      }+      break;     default:       // Do nothing-      return;+      break;   }+  // Propagate the event to other handlers+  return GDK_EVENT_PROPAGATE;+}++gboolean draw_callback(GtkWidget* widget, GdkFrameClock* frame_clock,+                       gpointer data) {+  GTKWindow* window = reinterpret_cast<GTKWindow*>(data);+  window->HandleWindowPaint();+  return G_SOURCE_CONTINUE;+}++gboolean close_callback(GtkWidget* widget, gpointer data) {+  GTKWindow* window = reinterpret_cast<GTKWindow*>(data);+  window->Close();+  return G_SOURCE_CONTINUE; }  void GTKWindow::Create() {+  // GTK optionally allows passing argv and argc here for parsing gtk specific+  // options. We won't bother   window_ = gtk_window_new(GTK_WINDOW_TOPLEVEL);-  gtk_window_set_title(GTK_WINDOW(window_), (gchar*)title_.c_str());-  gtk_window_set_default_size(GTK_WINDOW(window_), 1280, 720);-  gtk_widget_show_all(window_);-  g_signal_connect(G_OBJECT(window_), "destroy", G_CALLBACK(gtk_main_quit),-                   NULL);-  g_signal_connect(G_OBJECT(window_), "event", G_CALLBACK(gtk_event_handler_),+  gtk_window_set_resizable(GTK_WINDOW(window_), true);+  gtk_window_set_title(GTK_WINDOW(window_), title_.c_str());+  gtk_window_set_default_size(GTK_WINDOW(window_), width_, height_);+  // Drawing area is where we will attach our vulkan/gl context+  drawing_area_ = gtk_drawing_area_new();+  // tick callback is for the refresh rate of the window+  gtk_widget_add_tick_callback(drawing_area_, draw_callback,+                               reinterpret_cast<gpointer>(this), nullptr);+  // Attach our event handler to both the main window (for keystrokes) and the+  // drawing area (for mouse input, resize event, etc)+  g_signal_connect(G_OBJECT(drawing_area_), "event",+                   G_CALLBACK(gtk_event_handler),                    reinterpret_cast<gpointer>(this));++  GdkDisplay* gdk_display = gtk_widget_get_display(window_);+  assert(GDK_IS_X11_DISPLAY(gdk_display));+  connection_ = XGetXCBConnection(gdk_x11_display_get_xdisplay(gdk_display));

Perhaps

connection_ = XGetXCBConnection(gdk_display);
bwrsandman

comment created time in 2 months

PullRequestReviewEvent
CommitCommentEvent
PullRequestReviewEvent