Skip to content

Instantly share code, notes, and snippets.

@jrsa
Last active May 26, 2023 07:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jrsa/e71da9cfb0fd872c26357c09f9538762 to your computer and use it in GitHub Desktop.
Save jrsa/e71da9cfb0fd872c26357c09f9538762 to your computer and use it in GitHub Desktop.
snippets of cycript code for messing with wow's rendering (client version 3.3.5a / build 12340)
// here i am getting a pointer to the games camera, starting from
// s_currentWorldFrame which has a known address in the games memory.
// that static variable points to an instance of CGWorldFrame, which
// houses a lot of the rendering stuff, including the camera. the
// camera, among other things, has a variable for the field of view
// which is what ends up at *fovptr.
var s_currentWorldFrame = @encode(int*)(0xEEEA8C) // static pointer to active world frame
var m_camera = 32280; //offset of cgcamera pointer in worldframe object
var m_fov = 64; // offset of fov (field of view) value in cgcamera object (just a floating point number)
var cgcam = @encode(int*) (*s_currentWorldFrame + m_camera);
var fovptr = @encode(float*) (*cgcam + 64);
*fovptr = 4.0 // huge
*fovptr = 0.5 // small
// these are integer bitfields that control rendering settings. that is,
// each bit in these variables turns something on or off. these are where
// most of the weird effects in the video comes from
var unk_s_enables = @encode(int*)(0xda0d08)
var world_s_enables = @encode(int*)(0xda0d04)
var RENDER_ENABLE_TERRAIN_NORMALS = 1 << 30;
var RENDER_ENABLE_WIREFRAME = 1 << 29;
var RENDER_ENABLE_WDL = 1 << 26;
var RENDER_ENABLE_WATER = 1 << 24;
var RENDER_ENABLE_DEBUG = 1 << 21; // shows collisions and wmo portals?
var RENDER_ENABLE_WMO = 1 << 8;
var RENDER_ENABLE_TERRAIN = 1 << 1;
var RENDER_ENABLE_TERRAIN_DOODADS = 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment