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 / 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;
@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 / 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 / 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 / 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 / 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 / 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 / ExportScoreForIRC.lua
Created January 31, 2015 01:07
SOMS2 score export, created 2010/08/09; last edit 2011/06/27
--[[
ExportScoreForIRC is something that AJ made for fun. It requires an
understanding of how StepMania views your filesystem, as well as knowledge
on how to make your IRC client play from a script file.
Since this was made for a limited purpose, it assumes you play as a single player
in non-course modes.
It spits out a string like this:
last played: $SONG by $ARTIST ($SONGGROUP) [$MODE $DIFFICULTY] $PERCENT | $W1 / $W2 / $W3 / $W4 / $W5 / $MISS | Holds: ($HELD/DROPPED) Max Combo: $MAXCOMBO
notes on the SM1 driver
=======================
[Introduction]
The main purpose of this document is to figure out how the SM1 driver accepts
parameters for some of its commands.
Examples are:
* Command $0A: Fade Out
* Command $14: Stop ADPCM-A sound?
* Command $18: Start ADPCM-A sound?
@freem
freem / Makefile
Created February 29, 2016 21:57
hybrid pceas/ca65 makefile
# makefile for example pce/tg16 project
# includes targets for pceas and ca65/ld65
#==============================================================================#
# pceas setup
PCEAS = pceas
EXAMPLE_PCEAS = ./example/pceas
SOURCE_PCEAS = $(EXAMPLE_PCEAS)/dummy.s
OUTPUT_PCEAS = $(EXAMPLE_PCEAS)/dummy.pce
SYMBOLS_PCEAS = $(EXAMPLE_PCEAS)/dummy.sym