Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tales of MajEyal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
yutio888
Tales of MajEyal
Commits
2b2b7647
Commit
2b2b7647
authored
11 years ago
by
DarkGod
Browse files
Options
Downloads
Patches
Plain Diff
use textouline on buffs too
parent
ed8f9b5e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
game/modules/tome/class/uiset/Minimalist.lua
+35
-4
35 additions, 4 deletions
game/modules/tome/class/uiset/Minimalist.lua
game/modules/tome/data/gfx/shaders/textoutline.frag
+1
-2
1 addition, 2 deletions
game/modules/tome/data/gfx/shaders/textoutline.frag
with
36 additions
and
6 deletions
game/modules/tome/class/uiset/Minimalist.lua
+
35
−
4
View file @
2b2b7647
...
...
@@ -1238,6 +1238,8 @@ function _M:buffOrientStep(orient, bx, by, scale, x, y, w, h, next)
end
function
_M
:
handleEffect
(
player
,
eff_id
,
e
,
p
,
x
,
y
,
hs
,
bx
,
by
,
is_first
,
scale
,
allow_remove
)
local
shader
=
Shader
.
default
.
textoutline
and
Shader
.
default
.
textoutline
.
shad
local
dur
=
p
.
dur
+
1
local
charges
=
e
.
charges
and
tostring
(
e
.
charges
(
player
,
p
))
or
"0"
...
...
@@ -1303,19 +1305,48 @@ function _M:handleEffect(player, eff_id, e, p, x, y, hs, bx, by, is_first, scale
core
.
display
.
drawQuad
(
x
+
4
,
y
+
4
,
32
,
32
,
0
,
0
,
0
,
255
)
e
.
display_entity
:
toScreen
(
self
.
hotkeys_display_icons
.
tiles
,
x
+
4
,
y
+
4
,
32
,
32
)
UI
:
drawFrame
(
self
.
buffs_base
,
x
,
y
,
icon
[
1
],
icon
[
2
],
icon
[
3
],
1
)
if
txt
and
not
txt2
then
txt
.
_tex
:
toScreenFull
(
x
+
4
+
2
+
(
32
-
txt
.
fw
)
/
2
,
y
+
4
+
2
+
(
32
-
txt
.
fh
)
/
2
,
txt
.
w
,
txt
.
h
,
txt
.
_tex_w
,
txt
.
_tex_h
,
0
,
0
,
0
,
0
.
7
)
if
shader
then
shader
:
paramNumber2
(
"outlineSize"
,
1
,
1
)
shader
:
paramNumber2
(
"textSize"
,
txt
.
_tex_w
,
txt
.
_tex_h
)
shader
:
use
(
true
)
else
txt
.
_tex
:
toScreenFull
(
x
+
4
+
2
+
(
32
-
txt
.
fw
)
/
2
,
y
+
4
+
2
+
(
32
-
txt
.
fh
)
/
2
,
txt
.
w
,
txt
.
h
,
txt
.
_tex_w
,
txt
.
_tex_h
,
0
,
0
,
0
,
0
.
7
)
end
txt
.
_tex
:
toScreenFull
(
x
+
4
+
(
32
-
txt
.
fw
)
/
2
,
y
+
4
+
(
32
-
txt
.
fh
)
/
2
,
txt
.
w
,
txt
.
h
,
txt
.
_tex_w
,
txt
.
_tex_h
)
elseif
not
txt
and
txt2
then
txt2
.
_tex
:
toScreenFull
(
x
+
4
+
2
+
(
32
-
txt2
.
fw
)
/
2
,
y
+
4
+
2
+
(
32
-
txt2
.
fh
)
/
2
,
txt2
.
w
,
txt2
.
h
,
txt2
.
_tex_w
,
txt2
.
_tex_h
,
0
,
0
,
0
,
0
.
7
)
if
shader
then
shader
:
paramNumber2
(
"outlineSize"
,
1
,
1
)
shader
:
paramNumber2
(
"textSize"
,
txt2
.
_tex_w
,
txt2
.
_tex_h
)
shader
:
use
(
true
)
else
txt2
.
_tex
:
toScreenFull
(
x
+
4
+
2
+
(
32
-
txt2
.
fw
)
/
2
,
y
+
4
+
2
+
(
32
-
txt2
.
fh
)
/
2
,
txt2
.
w
,
txt2
.
h
,
txt2
.
_tex_w
,
txt2
.
_tex_h
,
0
,
0
,
0
,
0
.
7
)
end
txt2
.
_tex
:
toScreenFull
(
x
+
4
+
(
32
-
txt2
.
fw
)
/
2
,
y
+
4
+
(
32
-
txt2
.
fh
)
/
2
,
txt2
.
w
,
txt2
.
h
,
txt2
.
_tex_w
,
txt2
.
_tex_h
)
elseif
txt
and
txt2
then
txt
.
_tex
:
toScreenFull
(
x
+
4
+
2
+
(
32
-
txt
.
fw
),
y
+
4
+
2
+
(
32
-
txt
.
fh
)
/
2
-
5
,
txt
.
w
,
txt
.
h
,
txt
.
_tex_w
,
txt
.
_tex_h
,
0
,
0
,
0
,
0
.
7
)
if
shader
then
shader
:
paramNumber2
(
"outlineSize"
,
1
,
1
)
shader
:
paramNumber2
(
"textSize"
,
txt
.
_tex_w
,
txt
.
_tex_h
)
shader
:
use
(
true
)
else
txt
.
_tex
:
toScreenFull
(
x
+
4
+
2
+
(
32
-
txt
.
fw
),
y
+
4
+
2
+
(
32
-
txt
.
fh
)
/
2
-
5
,
txt
.
w
,
txt
.
h
,
txt
.
_tex_w
,
txt
.
_tex_h
,
0
,
0
,
0
,
0
.
7
)
end
txt
.
_tex
:
toScreenFull
(
x
+
4
+
(
32
-
txt
.
fw
),
y
+
4
+
(
32
-
txt
.
fh
)
/
2
-
5
,
txt
.
w
,
txt
.
h
,
txt
.
_tex_w
,
txt
.
_tex_h
)
txt2
.
_tex
:
toScreenFull
(
x
+
4
+
2
,
y
+
4
+
2
+
(
32
-
txt2
.
fh
)
/
2
+
5
,
txt2
.
w
,
txt2
.
h
,
txt2
.
_tex_w
,
txt2
.
_tex_h
,
0
,
0
,
0
,
0
.
7
)
if
shader
then
shader
:
use
(
false
)
shader
:
paramNumber2
(
"outlineSize"
,
1
,
1
)
shader
:
paramNumber2
(
"textSize"
,
txt2
.
_tex_w
,
txt2
.
_tex_h
)
shader
:
use
(
true
)
else
txt2
.
_tex
:
toScreenFull
(
x
+
4
+
2
,
y
+
4
+
2
+
(
32
-
txt2
.
fh
)
/
2
+
5
,
txt2
.
w
,
txt2
.
h
,
txt2
.
_tex_w
,
txt2
.
_tex_h
,
0
,
0
,
0
,
0
.
7
)
end
txt2
.
_tex
:
toScreenFull
(
x
+
4
,
y
+
4
+
(
32
-
txt2
.
fh
)
/
2
+
5
,
txt2
.
w
,
txt2
.
h
,
txt2
.
_tex_w
,
txt2
.
_tex_h
,
0
,
1
,
0
,
1
)
end
if
shader
and
(
txt
or
txt2
)
then
shader
:
use
(
false
)
end
if
flash
>
0
then
if
e
.
status
~=
"detrimental"
then
core
.
display
.
drawQuad
(
x
+
4
,
y
+
4
,
32
,
32
,
0
,
255
,
0
,
170
-
flash
*
30
)
else
core
.
display
.
drawQuad
(
x
+
4
,
y
+
4
,
32
,
32
,
255
,
0
,
0
,
170
-
flash
*
30
)
...
...
This diff is collapsed.
Click to expand it.
game/modules/tome/data/gfx/shaders/textoutline.frag
+
1
−
2
View file @
2b2b7647
...
...
@@ -30,6 +30,5 @@ void main(void)
//outlineColor = vec4(0, 0, 0, 1);
//blending character glyph over its outline
gl_FragColor
=
gl_FragColor
*
gl_FragColor
.
a
+
outlineColor
*
alpha
*
(
1
.
0
-
gl_FragColor
.
a
);
gl_FragColor
.
a
*=
gl_Color
.
a
;
gl_FragColor
=
(
gl_FragColor
*
gl_FragColor
.
a
+
outlineColor
*
alpha
*
(
1
.
0
-
gl_FragColor
.
a
))
*
gl_Color
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment