User Tag List

Results 1 to 10 of 11

Thread: Arrays of Arrays

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Keese Just registered
    Join Date
    Jan 2018
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    336
    Level
    6
    vBActivity - Bars
    Lv. Percent
    70.19%

    Arrays of Arrays

    Code:
    I would really, really like to see some double array int variables.
    Something like this: 
    
    
    //A variable int that is an array of several other arrays.
    int ComboData[128][176];
    //initialize all variables
    for(int screen=0;screen<=127;screen++)
    	{
    	for(int comboposition=0;comboposition<=175;comboposition++)
    		{
    		ComboData[screen][comboposition];
    		}
    	}
    void SaveMapComboData()
    for(int screen=0;screen<=127;screen++)
    	{	
    	for(int comboposition=0;comboposition<=175;comboposition++)
    		{
    		for(int x=0;x<=256;x+=16)//skips every 16 pixels
    			{
    			for(int y=0;y<=176;y+=16)//skips every 16 pixels
    				{
    				ComboData[screen][comboposition]=Game->GetComboData(Game->GetCurMap(),screen,comboposition);
    				}
    			}
    		}
    	}
    //then afterwards
    void WriteMapComboData()
    for(int screen=0;screen<=127;screen++)
    	{	
    	for(int comboposition=0;comboposition<=175;comboposition++)
    		{
    		for(int x=0;x<=256;x+=16)//skips every 16 pixels
    			{
    			for(int y=0;y<=176;y+=16)//skips every 16 pixels
    				{
    				ComboData[screen][comboposition]=Game->SetComboData(Game->GetCurMap(),screen,comboposition,ComboData[screen][comboposition]);
    				}
    			}
    		}
    	}
    Last edited by Chris Miller; 03-30-2018 at 10:52 AM. Reason: yikes

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social