Oblivion

File information

Last updated

Original upload

Created by

Faw

Uploaded by

Faw

Virus scan

Safe to use

Tags for this mod

About this mod

OBSE Plugin for the Logitech G15 LCD -Version 1.8 by Fawzib Rojas This is a plugin so modders are able to control and draw in the LCD of the Logitech G15 Keyboards and the Logitech Z10 Speakers.

Permissions and credits
OBSE Plugin for the Logitech G15 LCD -Version 1.8
by Fawzib Rojas

This is a plugin so modders are able to control and draw in the LCD of the Logitech G15 Keyboards and the Logitech Z10 Speakers. They have been tested with the old G15, they *should* work with the new ones. Included is a sample ESP that will display the health/magicka/fatigue + day/time in a different format depending on the LCD button you press

1. Horizontal format
2. Vertical format
3. Circular format
4. Use of textures

1. Horizontal format
2. Vertical format
3. Circular format
4. Use of textures

Well, let's see what modders can do with this.

What New

1.8 - Recompiled for OBSE v0015a, converted most of the functions to use Microsoft STL libraries instead of mine (mine were kind of flaky) also the plugin was compiled with wrong options which could have caused problems. . Hopefully the plugin will be more stable now.

1.7 - Recompiled for OBSE v0015

1.61 - 1.6 was an older version where texture rotation was not implemented (Thanks MD). Also added the source, just in case someone wants to look at it.

1.6 - Compiled for OBSE v0013, added OMOD that installs 3 versions, my sample ESP and version 1.3 or 1.4 beta of Maboroshi Daikon's awesome custom display, the one I actually use :)

1.5 - Fixed texture rotation, removed Oblivion version check (only checks for OBSE version). Added parameter to drawtexture (rotation center). Added OMOD version, zip is also OMOD ready.

1.4 - Added new parameter to LCD_drawtexture. Now textures can be rotated before they are drawn.

1.32 - Added a version compiled for OBSE v0012 beta. All new versions will be for OBSE v0012, also added a link in 'Requirements' to a LCD.esp made by MaboroshiDaikon. It has health/magicka/fatigue, weapon health, arrows, gold, encumbrance, compass, time, and a lot more.

1.32 - Fixed bug in LCD_drawtexture. First row of pixels in the texture was missing when you copied it.

1.31 - Fixed bug in progress bars/circles. When you used draw_value=1 is was a percent instead of the current value.

1.3 - Fixed bug in progress bars/circles. If the current value was greater than the max value, the bar would overflow (paint outside). Added new option to the progress bars/circles. Now draw_value has 4 options: 0=draw nothing, 1=draw current, 2=draw percent, 3=draw "curr/max"

1.2 - Added DDS reading functions and a new set of text writing functions

1.1 - Rewrote most of it so background drawing could be easier to implement. Now there are 2 DLLs, LCD_single.dll, LCD_multi.dll

Prerequisites

You need OBSE v0015.

Obviously you need the keyboard/speakers or at least the Logitech LCD Manager software.

It seems you need the latest version of Logitech LCD Manager (2.02.101 - 12/13/2007)

Installation

1. Download and install OBSE v0013

2. Copy LCD.esp to the Oblivion/Data folder

3. Copy LCD_single.dll (single-threaded) or LCD_multi.dll (multi-threaded) to the Oblivion/Data/OBSE/Plugins folder. USE ONLY ONE OF THE DLLs

4. Copy textures folder to Oblivion/Data

5. Enable LCD.esp with OBMM or the Oblivion launcher

6. Read #1 and #3 again.

LCD API

LCD_Open()
Connect to the LC

LCD_Close()
Close the connection to the LCD, not needed. The LCD will call this on unload

LCD_IsOpen()
Check if we are connected to the LCD

LCD_IsMulti()
Check if we are using the multi-threaded version of the DLL

LCD_GetWidth()
Get LCD *physical* width in pixels

LCD_GetHeight()
Get LCD *physical* height in pixels

LCD_Scale(int x,int y)
Rescale LCD canvas to given dimensions, call LCD_Scale 100 100, and the logical size of the LCD will be 100 pixels x 100 pixels

LCD_Flush()
Will clear command queue, required because now it has a multithreaded option. Call this before you start to draw. It does nothing in the single-threaded DLL, but use it so you can switch back and forth between DLLs later if you want.

LCD_SetFont(string fontName,int height,int weight, int italic,int underline)
Set LCD font, all true type fonts accepted. Parameters: fontName ("Arial", "Verdada", any windows font), height (font height in *logical* pixels), weight (-1=thin,0=normal, 1=bold),italic (i=true, 0=false),underline (i=true, 0=false)

LCD_Refresh()
Update the LCD image.

LCD_SaveButtonSnapshot()
Get status of all the buttons at the same time and saves it in memory. That way you can call LCD_getbuttonstate as much as you want without actually asking the LCD. Before each LCD_GetButtonState made a request to the LCD.

LCD_GetButtonState(int num)
Get status of the buttons Parameters: num (0-3 button to check), returns 1 if pressed, 0 if not

LCD_ClearRect(int x,int y,int w, int h)
Clear a rectangular area.

LCD_DrawRect(int x,int y,int w, int h,int fill)
Draw a rectangle. Parameters: fill (1=filled, 0=frame only)

LCD_DrawCircle(int x,int y,int w, int h,int fill)
Draw a circle. Parameters: fill (1=filled, 0=frame only)

LCD_DrawLine(int x1,int y1,int x2, int y2)
Draw a line

LCD_DrawText(char* str,int x,int y,int w, int h,int alignx,int aligny)
Draw a text, text is XORed with the background, if part of the text falls in a black area it will be white, and viceversa (Thanks to Jaga for mentioning that). Parameters: alignx (-1=left, 0=center,1=right), aligny (-1=top, 0=center,1=bottom)

LCD_DrawInt(int value,int x,int y,int w, int h,int alignx,int aligny)
Same as LCD_DrawText but with an integer.

LCD_DrawProgressBarH(int x,int y,int w, int h,int curr,int max,int draw_value)
Draws a horizontal progress bar (like the health, fatigue, magicka bars). Parameters: curr (current bar value), max (max bar value), draw_value (0=draw nothing, 1=draw value centered in the bar, 2=draw percent centered in the bar, 3= draw both values centered in the bar like this "curr/max")

LCD_DrawProgressBarV(int x,int y,int w, int h,int curr,int max,int draw_value)
Same as LCD_DrawProgressBarH but vertical.

LCD_DrawProgressCircle(int x,int y,int w,int h,int curr,int max,int draw_value)
Same as LCD_DrawProgressBarH but instead of a bars is a growing or shrinking circle. Looks very cool/weird.

LCD_DrawGrid(int x,int y,int w,int h,int stepx,int stepy)
Draws a grid, good for testing and aligning things.

LCD_ClearTextBuffer()
Clears the text buffer

LCD_AddTextToBuffer(char *text)
Adds a string to the text buffer

LCD_AddIntToBuffer(int value, int field_size, int zero_pad)
Adds a integer to the text buffer. Example: To print "0002" you would use LCD_AddIntBuffer 2 4 1, means "Print 2 in a field of 4 characters, pad with zero.

LCD_DrawTexture(char *path,int sx,int sy,int sw,int sh,int dx,int dy,int dw,int dh,int angle,int rx,int ry)
Draws a DDS texture to the LCD. Path starts from the game directory, so to load you would use "data/textures/menus/...", sx,sy,sw,sh=source rectangle, dx,dy,dw,dh=destination rectangle,angle=rotate texture x degrees (clockwise), rx,ry=rotation center. Since I can only draw black & white I'm using the alpha channel to paint. Everything NOT transparent will be drawn.