Reply to thread
GBAtemp.net - The Independent Video Game Community
Search
Search titles only
By:
Search titles only
By:
Reply to thread
GBAtemp.net - The Independent Video Game Community
Home
Log in
Terms & Rules
Donate
Forums
New posts
Search forums
Groups
Public Events
New
New posts
New resources
New blog entries
New profile posts
New blog entry comments
New threadmarks
Latest activity
Cheats
Cheat Codes Add and Request group
The Legend of Zelda: Tears of the Kingdom cheat codes
Pokémon Legends: Arceus cheat codes
Xenoblade Chronicles 3 cheat codes
Fire Emblem Engage cheat codes
Request a cheat...
Tutorials
Nintendo Switch tutorials
Nintendo 3DS tutorials
Nintendo Wii U tutorials
Reviews
Overview
Official reviews
Downloads
Latest reviews
Search resources
Blogs
New entries
New comments
Blog list
Search blogs
Chat
Top chatters
Search
Search titles only
By:
Search titles only
By:
Log in
Register
New posts
Search forums
Log in
Register
Home
Forums
PC, Console & Handheld Discussions
Nintendo DS
DS Programming for Newbies!
Menu
Install the app
Install
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="BassAceGold" data-source="post: 4352166" data-attributes="member: 47050"><p>[code]touchPosition touch;</p><p>scanKeys();</p><p>touchRead(&touch);[/code]</p><p></p><p>This added to the function is redundant if you are checking keys outside the function. Otherwise, it is fine if that is the only input you are checking at a specific time. The function should not affect any previous stored results collected by these functions and will work fine for the current frame.</p><p></p><p>Declaring variables in a function is not really a bad thing or as much work as you might imagine. Declaring a variable on the stack and accessing it is usually much faster than accessing a globally declared variable, and the stack variable will no longer exist when the function exits itself. If there does happen to be a performance hit, it is very minimal. If you are actively avoiding declaring variables in functions for such a small performance gain, then your premature optimization will lead into less readable code over time.</p><p></p><p>In reality there is no "proper place" for variable declarations as it is entirely dependent on its needed locality and size.</p></blockquote><p></p>
[QUOTE="BassAceGold, post: 4352166, member: 47050"] [code]touchPosition touch; scanKeys(); touchRead(&touch);[/code] This added to the function is redundant if you are checking keys outside the function. Otherwise, it is fine if that is the only input you are checking at a specific time. The function should not affect any previous stored results collected by these functions and will work fine for the current frame. Declaring variables in a function is not really a bad thing or as much work as you might imagine. Declaring a variable on the stack and accessing it is usually much faster than accessing a globally declared variable, and the stack variable will no longer exist when the function exits itself. If there does happen to be a performance hit, it is very minimal. If you are actively avoiding declaring variables in functions for such a small performance gain, then your premature optimization will lead into less readable code over time. In reality there is no "proper place" for variable declarations as it is entirely dependent on its needed locality and size. [/QUOTE]
Insert quotes…
Verification
Post reply
Home
Forums
PC, Console & Handheld Discussions
Nintendo DS
DS Programming for Newbies!
General chit-chat
Help
Users
Settings
Notifications
Miscellaneous
Inverse message direction
Display editor on top
Enable maximized mode
Display images as links
Hide bot messages
Hide statuses
Hide chatter list
Show messages from ignored users
Temporarily disable chat
Receive mention alerts
Sound notifications
Normal messages
Private messages
Whisper messages
Mention messages
Bot messages
Desktop notifications
Normal messages
Private messages
Whisper messages
Mention messages
Bot messages
Options
Options
View top chatters
Psionic Roshambo
Loading…
@
Xdqwerty
:
https://garticphone.com/en/?c=0013ff1238
Yesterday at 10:58 PM
@
Xdqwerty
:
nobody?
Yesterday at 10:59 PM
@
Xdqwerty
:
ok then no
Yesterday at 11:01 PM
@
Xdqwerty
:
sigh
Yesterday at 11:16 PM
@
Sicklyboy
:
sup nerds
Today at 12:22 AM
@
Xdqwerty
:
@Sicklyboy
, hi
Today at 12:23 AM
@
Sicklyboy
:
How you doin xdq?
Today at 12:30 AM
@
Xdqwerty
:
@Sicklyboy
, not that bad ig
+1
Today at 12:34 AM
@
Sicklyboy
:
Good to hear
Today at 12:38 AM
@
Sicklyboy
:
Lazy day for me. Was gonna go grocery shopping but it's raining so I don't feel like going out. Listened to music and messed with server stuff instead
Today at 12:38 AM
@
Xdqwerty
:
@Sicklyboy
, and i have school tommorrow cuz its sunday
Today at 12:39 AM
@
Sicklyboy
:
I feel that, I got work tomorrow
Today at 12:39 AM
@
Xdqwerty
:
@Sicklyboy
,
atleast you get paid
Today at 12:42 AM
@
Sicklyboy
:
I feel like school, back when I was actually in school, was more entertaining though, because of how much I get to interact with people, hang out with friends, and other stuff like that. All I get to talk to at work is my boring coworkers lol
Today at 12:46 AM
@
Sicklyboy
:
Getting paid is definitely a plus, though
+2
Today at 12:47 AM
@
Psionic Roshambo
:
20 dollars is 20 dollars lol
Today at 12:47 AM
@
Psionic Roshambo
:
https://m.youtube.com/watch?v=6aie4...1dCAyMCBkb2xsYXJzIGlzIDIwIGRvbGxhcnMgbWVtZQ==
+1
Today at 12:49 AM
@
Xdqwerty
:
yawn
Today at 1:16 AM
@
K3Nv2
:
https://youtu.be/sGvT5FKSiyk?si=TYqsdjjbF-4N8Xc8
Today at 1:31 AM
@
BakerMan
:
laye to the paryy?
33 minutes ago
@
BakerMan
:
wow that was my best attempt at typing "late to the party?" with my eyes closed
33 minutes ago
@
BakerMan
:
know what, here's another attempt
33 minutes ago
@
BakerMan
:
laye to the party?
32 minutes ago
@
BakerMan
:
damn
32 minutes ago
@
Psionic Roshambo
:
Laid at the party is fun unless you're in prison lol
A moment ago
Submit
@
Psionic Roshambo
:
Laid at the party is fun unless you're in prison lol
A moment ago
Chat
1