Skip to content

Instantly share code, notes, and snippets.

View freem's full-sized avatar
⛏️
work continues

AJ Kelly freem

⛏️
work continues
View GitHub Profile
@freem
freem / example.lua
Created September 13, 2014 23:49
ActorFrameTexture, ActorMultiTexture
-- basic MultiTexture with quads
function MakeTexture()
-- [AJ] c is for children
local c;
-- [AJ] define Draw function
local Draw = function(self)
-- Render the quads to the texture.
-- [AJ] this becomes Target.
-- you must begin rendering to a target before drawing the
@freem
freem / ScreenTextEntry test,circa 2012-06-27
Created July 2, 2014 07:18
a test of calling ScreenTextEntry in StepMania 5 themes
-- ScreenTextEntry test
t[#t+1] = Def.Actor{
CodeMessageCommand=function(self,param)
if param.Name == "Toggle" then
SCREENMAN:AddNewScreenToTop("ScreenTextEntry");
local teSettings = {
SendOnPop = "",
Question = "Are you cool?",
InitialAnswer = "I am cool",
@freem
freem / ScreenSelectMusic PlayerOptions.lua
Last active December 28, 2015 01:39
adding PlayerOptions onto ScreenSelectMusic
-- Graphics/ScreenSelectMusic PlayerOptions.lua
-- player options text for selectmusic
local Player = ...
if not Player then error("ScreenSelectMusic PlayerOptions requires a Player") end
return Def.ActorFrame{
LoadFont("Common normal")..{
InitCommand=cmd(zoom,1);
BeginCommand=cmd(playcommand,"Update");
PlayerOptionsChangedMessageCommand=function(self,param)
@freem
freem / gist:7415492
Last active December 28, 2015 00:39
Judgment counter for ScreenGameplay
-- temporary gameplay overlay where I knock out something for staiain
local c
local textFont = "_helvblack normal 24px" -- replace as needed
local function UpdateJudgments(self)
local ss = STATSMAN:GetCurStageStats()
local p1ss = ss:GetPlayerStageStats(GAMESTATE:GetMasterPlayerNumber())
local w1Count = p1ss:GetTapNoteScores('TapNoteScore_W1')
c.CountW1:settext(w1Count)
@freem
freem / metrics.ini
Created October 21, 2013 22:21 — forked from shakesoda/metrics.ini
my 3d wheel transform from syszero ssc special
[ScreenSelectMusic]
MusicWheelX=WideScale(SCREEN_CENTER_X+132,SCREEN_CENTER_X+144)
MusicWheelY=SCREEN_CENTER_Y+4
MusicWheelOnCommand=SetDrawByZPosition,true;fov,45;rotationy,20;
[MusicWheel]
NumWheelItems=17
# 3.9 metrics I use in the wheel transform:
ItemCurveX=20
ItemSpacingY=44
@freem
freem / SMLua_5.2.diff
Created January 5, 2012 04:29
Getting Lua 5.2 to (mostly) work with StepMania 5. It messes up badly though so don't really use it.
diff -r a84f412c48bb extern/lua-5.2/src/lauxlib.c
--- a/extern/lua-5.2/src/lauxlib.c Wed Jan 04 22:23:01 2012 -0600
+++ b/extern/lua-5.2/src/lauxlib.c Wed Jan 04 22:27:12 2012 -0600
@@ -955,3 +955,20 @@
lua_pop(L, 1);
}
+/* StepMania Lua additions */
+/* unsure where this came from (glenn?) */
+LUALIB_API int luaL_pushtype (lua_State *L, int narg) {
@freem
freem / gameplay_out-extra.lua
Created September 8, 2011 04:49
how to get Extra Stage animations working (StepMania 5 rev. aa15a65bb901 and later)
local t = Def.ActorFrame {
Def.Quad{
InitCommand=cmd(FullScreen;diffuse,color("0,0,0,0"););
OnCommand=cmd(sleep,0.5;linear,1.5;diffusealpha,1);
};
-- Cleared
Def.ActorFrame {
Name="ClearedFrame";
Condition=GAMESTATE:GetPlayMode() ~= PLAY_MODE_BATTLE and GAMESTATE:GetPlayMode() ~= PLAY_MODE_RAVE;