current_context_usage(3)
π current_context_usage π
okay so bestie, this page is from the Arcan Lua API manual, and the main character is current_context_usage. π
β¨ NAME β¨
current_context_usage β return how many cells the current context has, and how many of those cells are currently unused. π«Ά
π¦ SYNOPSIS π¦
total, used
current_context_usage()
π DESCRIPTION π
So this function sweeps the VID pool of the currently active context and counts β thatβs O(n), no cap β how many of those are in use. Then it returns how many slots are available in total, and how many are maked as used. Yes, βmakedβ β we keep the original typo energy, itβs iconic. π
The number of free slots can be found by subtracting used from total. Math ate, fr fr. π₯
πΈ EXAMPLE πΈ
Peep the example β it fills a surface, prints the usage, fills another surface, and prints the usage again:
function current_context_usage0()
a = fill_surface(32, 32, 0, 0, 0);
print(current_context_usage());
b = fill_surface(32, 32, 0, 0, 0);
print(current_context_usage());
end
mwah π β this cute little page comes from source/version vidsys, dated October 2026. π
π¦ where this page comes from
- nixos 26.05: arcan 0.7.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms