command1 args; command2 args
^
will cause help to not be shown for command2. Removing the space shows helpIInput::TouchFingerStates
function. This design is less complex than an event-based system where the touch events are delivered to the individual client components, as each sys...CProjectileData ProjData = ((CProjectile *)pEnt)->GetData();
// NOTE: do pEnt % 0xffff because the id will always be -1 somehow which doesn't work.
CNetObj_DDNetProjectile *pNetProj = SnapNewItem<CNetObj_DDNetProjectile>((uint64_t)pEnt % 0xffff);
if(pNetProj)
{
int Flags = 0;
if(ProjData.m_Bouncing & 1)
{
Flags |= PROJECTILEFLAG_BOUNCE_HORIZONTAL;
}
if(ProjData.m_Bouncing & 2)
{
Flags |= PROJECTILEFLAG_BOUNCE_VERTICAL;
}
if(ProjData.m_Explosive)
{
Flags |= PROJECTILEFLAG_EXPLOSIVE;
}
if(ProjData.m_Freeze)
{
Flags |= PROJECTILEFLAG_FREEZE;
}
Flags |= PROJECTILEFLAG_NORMALIZE_VEL;
pNetProj->m_VelX = round_to_int(ProjData.m_StartVel.x * 1e6f);
pNetProj->m_VelY = round_to_int(ProjData.m_StartVel.y * 1e6f);
pNetProj->m_X = round_to_int(ProjData.m_StartPos.x * 100.0f);
pNetProj->m_Y = round_to_int(ProjData.m_StartPos.y * 100.0f);
pNetProj->m_Type = ProjData.m_Type;
pNetProj->m_StartTick = ProjData.m_StartTick;
pNetProj->m_Owner = ProjData.m_Owner;
pNetProj->m_Flags = Flags;
pNetProj->m_SwitchNumber = ProjData.m_SwitchNumber;
pNetProj->m_TuneZone = ProjData.m_TuneZone;
}
pEnt
pointer to a 64 bit integer?pEnt
pointer to a 64 bit integer? void *SnapNewItem(int Type, int Id, int Size)
{
dbg_assert(Id >= -1 && Id <= 0xffff, "incorrect id");
return Id < 0 ? 0 : m_SnapshotBuilder.NewItem(Type, Id, Size);
}
template<typename T>
T *SnapNewItem(int Id)
{
return static_cast<T *>(SnapNewItem(T::ms_MsgId, Id, sizeof(T)));
}
these are the snap thingies functions. (also copied straight out of the serverside code)Unknown Architecture 'unknown'. Supported: x86, x86_64, ppc, ppc64
https://github.com/teeworlds-community/teeworlds/issues/109CNetObj_GameInfo
to the snap for the rendering to workextern "C" void mlirModuleCleanup(MlirModule mod) {
auto x = unwrap(mod);
for (auto &op : x.getOps().begin()->getBlock()->getOperations()) {
if (llvm::CastInfo<LLVMFuncOp, Operation>::isPossible(op)) {
LLVMFuncOp x = llvm::CastInfo<LLVMFuncOp, Operation>::doCast(op);
if (x.getSymName().starts_with("_mlir_ciface")) {
x->setLoc(mlir::UnknownLoc::get(x->getContext()));
}
}
}
}
extern "C" void mlirModuleCleanup(MlirModule mod) {
auto x = unwrap(mod);
for (auto &op : x.getOps().begin()->getBlock()->getOperations()) {
if (llvm::CastInfo<LLVMFuncOp, Operation>::isPossible(op)) {
LLVMFuncOp x = llvm::CastInfo<LLVMFuncOp, Operation>::doCast(op);
if (x.getSymName().starts_with("_mlir_ciface")) {
x->setLoc(mlir::UnknownLoc::get(x->getContext()));
}
}
}
}
CHud::RenderMovementInformation
looks really weird. Should use text containers to render these texts and calculate the text width, which would also be more efficient.